@saasquatch/mint-components 1.10.2-6 → 1.10.2-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/{ShadowViewAddon-3777ddbe.js → ShadowViewAddon-3e537eb3.js} +49 -46
- package/dist/cjs/{global-975908ec.js → global-02e50f09.js} +10 -161
- package/dist/cjs/{index.module-b1f9bdb8.js → index.module-df530553.js} +227 -1398
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{luxon-20eafbd9.js → luxon-05098e19.js} +1 -1
- package/dist/cjs/mint-components.cjs.js +4 -4
- package/dist/cjs/{mockRewardData-3c470512.js → mockRewardData-4258e067.js} +1 -1
- package/dist/cjs/{re-render-95d86b86.js → re-render-1976e05e.js} +2 -2
- package/dist/cjs/sqm-asset-card.cjs.entry.js +3 -3
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +410 -411
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +78 -67
- package/dist/cjs/sqm-close-button.cjs.entry.js +3 -3
- package/dist/cjs/sqm-context-router.cjs.entry.js +3 -3
- package/dist/cjs/sqm-empty_4.cjs.entry.js +6 -6
- package/dist/cjs/sqm-form-message.cjs.entry.js +2 -2
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +3 -3
- package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +6 -6
- package/dist/cjs/{sqm-invoice-table-view-c3a5024d.js → sqm-invoice-table-view-28b14d28.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +8 -9
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +7 -8
- package/dist/cjs/{sqm-navigation-sidebar-item-view-d8a21014.js → sqm-navigation-sidebar-item-view-a125ec5f.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +4 -4
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/sqm-password-field.cjs.entry.js +4 -4
- package/dist/cjs/sqm-popup-container.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-email-verification-view-72dca980.js → sqm-portal-email-verification-view-292b5bf4.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-c3754c1c.js → sqm-portal-profile-view-fde54e35.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +11 -12
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +6 -7
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +3 -3
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +16 -17
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +6 -6
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -4
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +61 -62
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +75 -19
- package/dist/cjs/sqm-tab.cjs.entry.js +4 -4
- package/dist/cjs/sqm-tabs.cjs.entry.js +5 -5
- package/dist/cjs/sqm-text-span.cjs.entry.js +2 -2
- package/dist/cjs/{stencil-hooks.module-a5a04d8a.js → stencil-hooks.module-72742a0b.js} +4 -1
- package/dist/cjs/{useChildElements-91b9f4ff.js → useChildElements-e0d44916.js} +2 -2
- package/dist/cjs/{useInstantAccessRegistration-610f4be8.js → useInstantAccessRegistration-bbe746d1.js} +3 -3
- package/dist/cjs/{useReferralTable-4756d4fc.js → useReferralTable-a76adb0d.js} +13 -14
- package/dist/cjs/{useRegistrationFormState-49251027.js → useRegistrationFormState-876ed65d.js} +2 -2
- package/dist/cjs/{utilities-42a1810d.js → utilities-cec9dd36.js} +2 -2
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +1 -1
- package/dist/collection/components/sqm-image/sqm-image-view.js +2 -1
- package/dist/collection/components/sqm-image/sqm-image.js +20 -0
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +57 -2
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +18 -13
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +60 -4
- package/dist/esm/{ShadowViewAddon-7ae0f3a0.js → ShadowViewAddon-2ac771ca.js} +23 -20
- package/dist/esm/{global-8a95a0d3.js → global-04c7d3b5.js} +10 -161
- package/dist/esm/{index.module-f9338fc3.js → index.module-def4aec5.js} +222 -1396
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{luxon-63e24900.js → luxon-7600be8d.js} +1 -1
- package/dist/esm/mint-components.js +4 -4
- package/dist/esm/{mockRewardData-e6b763d1.js → mockRewardData-0eb6e778.js} +1 -1
- package/dist/esm/{re-render-f023c070.js → re-render-12fd274a.js} +2 -2
- package/dist/esm/sqm-asset-card.entry.js +2 -2
- package/dist/esm/sqm-banking-info-form_16.entry.js +9 -10
- package/dist/esm/sqm-big-stat_38.entry.js +25 -14
- package/dist/esm/sqm-close-button.entry.js +2 -2
- package/dist/esm/sqm-context-router.entry.js +2 -2
- package/dist/esm/sqm-empty_4.entry.js +3 -3
- package/dist/esm/sqm-form-message.entry.js +1 -1
- package/dist/esm/sqm-graphql-client-provider.entry.js +2 -2
- package/dist/esm/sqm-header-logo.entry.js +1 -1
- package/dist/esm/sqm-instant-access-registration.entry.js +5 -5
- package/dist/esm/{sqm-invoice-table-view-4ee8e011.js → sqm-invoice-table-view-34ac7513.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +3 -4
- package/dist/esm/sqm-logout-current-user.entry.js +2 -3
- package/dist/esm/{sqm-navigation-sidebar-item-view-05fa5ccd.js → sqm-navigation-sidebar-item-view-60ef06cc.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
- package/dist/esm/sqm-navigation-sidebar.entry.js +2 -2
- package/dist/esm/sqm-password-field.entry.js +3 -3
- package/dist/esm/sqm-popup-container.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-de203924.js → sqm-portal-email-verification-view-4307c992.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/sqm-portal-forgot-password.entry.js +3 -3
- package/dist/esm/sqm-portal-logout.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-0a31702e.js → sqm-portal-profile-view-ffe955c8.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +5 -6
- package/dist/esm/sqm-portal-protected-route.entry.js +2 -2
- package/dist/esm/sqm-portal-registration-form.entry.js +4 -5
- package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
- package/dist/esm/sqm-portal-verify-email.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +8 -9
- package/dist/esm/sqm-referred-registration.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +3 -3
- package/dist/esm/sqm-rewards-table_9.entry.js +8 -9
- package/dist/esm/sqm-stencilbook.entry.js +73 -17
- package/dist/esm/sqm-tab.entry.js +3 -3
- package/dist/esm/sqm-tabs.entry.js +4 -4
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm/{stencil-hooks.module-3c7f7c90.js → stencil-hooks.module-ac12ca1c.js} +1 -1
- package/dist/esm/{useChildElements-e32fe084.js → useChildElements-32e1bda1.js} +2 -2
- package/dist/esm/{useInstantAccessRegistration-59d8b278.js → useInstantAccessRegistration-46b89952.js} +3 -3
- package/dist/esm/{useReferralTable-34d7f6ee.js → useReferralTable-f4de0650.js} +4 -5
- package/dist/esm/{useRegistrationFormState-a140a962.js → useRegistrationFormState-9fc1ac80.js} +2 -2
- package/dist/esm/{utilities-c197ef25.js → utilities-3f5bba22.js} +2 -2
- package/dist/esm-es5/ShadowViewAddon-2ac771ca.js +1 -0
- package/dist/esm-es5/global-04c7d3b5.js +285 -0
- package/dist/esm-es5/index.module-def4aec5.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{luxon-63e24900.js → luxon-7600be8d.js} +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{mockRewardData-e6b763d1.js → mockRewardData-0eb6e778.js} +1 -1
- package/dist/esm-es5/{re-render-f023c070.js → re-render-12fd274a.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-4ee8e011.js → sqm-invoice-table-view-34ac7513.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-60ef06cc.js +1 -0
- 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-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-de203924.js → sqm-portal-email-verification-view-4307c992.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-0a31702e.js → sqm-portal-profile-view-ffe955c8.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/{stencil-hooks.module-3c7f7c90.js → stencil-hooks.module-ac12ca1c.js} +1 -1
- package/dist/esm-es5/useChildElements-32e1bda1.js +1 -0
- package/dist/esm-es5/useInstantAccessRegistration-46b89952.js +1 -0
- package/dist/esm-es5/useReferralTable-f4de0650.js +1 -0
- package/dist/esm-es5/useRegistrationFormState-9fc1ac80.js +1 -0
- package/dist/esm-es5/{utilities-c197ef25.js → utilities-3f5bba22.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-01cfff8a.system.entry.js +1 -0
- package/dist/mint-components/{p-2e6e8fc0.system.js → p-02424350.system.js} +1 -1
- package/dist/mint-components/{p-de1ab7b7.system.entry.js → p-07f675ab.system.entry.js} +1 -1
- package/dist/mint-components/{p-2755b7e6.js → p-0b9fa97f.js} +1 -1
- package/dist/mint-components/{p-fc5fa9b1.system.js → p-0d8c53ac.system.js} +1 -1
- package/dist/mint-components/p-0e507dfe.system.entry.js +1 -0
- package/dist/mint-components/p-10e89d0a.entry.js +1 -0
- package/dist/mint-components/{p-1e0a0f60.entry.js → p-137ea86e.entry.js} +1 -1
- package/dist/mint-components/{p-cdd04337.entry.js → p-178d2d2e.entry.js} +1 -1
- package/dist/mint-components/p-1c857edb.entry.js +33 -0
- package/dist/mint-components/p-1dd69917.system.entry.js +1 -0
- package/dist/mint-components/{p-4e792e17.entry.js → p-1fe65a36.entry.js} +1 -1
- package/dist/mint-components/{p-9223640e.js → p-251e7567.js} +1 -1
- package/dist/mint-components/{p-0979f82e.system.js → p-2a414b2e.system.js} +2 -2
- package/dist/mint-components/p-2dd67762.entry.js +1 -0
- package/dist/mint-components/{p-0d77f228.js → p-2ee2ebba.js} +4 -4
- package/dist/mint-components/{p-bd25d190.entry.js → p-3223ba7b.entry.js} +1 -1
- package/dist/mint-components/p-32d1d162.entry.js +1 -0
- package/dist/mint-components/{p-1b5eeaa4.system.entry.js → p-34fd1229.system.entry.js} +1 -1
- package/dist/mint-components/p-35d84041.system.entry.js +1 -0
- package/dist/mint-components/{p-cb45d0a8.system.js → p-370a1a73.system.js} +1 -1
- package/dist/mint-components/{p-0ad02032.system.js → p-3d4656bb.system.js} +1 -1
- package/dist/mint-components/p-3ec16698.entry.js +13 -0
- package/dist/mint-components/{p-d7bc0a83.js → p-41a11a7f.js} +1 -1
- package/dist/mint-components/{p-15399c43.entry.js → p-41f15489.entry.js} +1 -1
- package/dist/mint-components/p-4348de13.system.js +1 -0
- package/dist/mint-components/{p-af870849.system.entry.js → p-4502ed11.system.entry.js} +1 -1
- package/dist/mint-components/{p-21b00d45.js → p-4d233cd4.js} +1 -1
- package/dist/mint-components/{p-8dd1b127.system.js → p-4df8f1d2.system.js} +1 -1
- package/dist/mint-components/p-4ea58025.system.entry.js +1 -0
- package/dist/mint-components/{p-76b4892f.entry.js → p-4edde470.entry.js} +1 -1
- package/dist/mint-components/p-51f517a2.js +1 -0
- package/dist/mint-components/{p-31f08988.entry.js → p-560f7316.entry.js} +2 -2
- package/dist/mint-components/{p-2cc82672.entry.js → p-56f14840.entry.js} +1 -1
- package/dist/mint-components/{p-183c8ecc.system.entry.js → p-58ef25d3.system.entry.js} +1 -1
- package/dist/mint-components/{p-87165876.system.js → p-59fe4ad1.system.js} +22 -22
- package/dist/mint-components/{p-65c4e820.entry.js → p-5a1b4b5d.entry.js} +16 -16
- package/dist/mint-components/p-5be235f9.entry.js +1 -0
- package/dist/mint-components/{p-b30636fc.system.entry.js → p-5cac90e8.system.entry.js} +1 -1
- package/dist/mint-components/{p-9396fa35.system.entry.js → p-5f1c4160.system.entry.js} +1 -1
- package/dist/mint-components/{p-773cead3.js → p-61eab172.js} +1 -1
- package/dist/mint-components/{p-f9780efd.system.js → p-674a64fe.system.js} +1 -1
- package/dist/mint-components/{p-95af445c.system.entry.js → p-6afb4f48.system.entry.js} +1 -1
- package/dist/mint-components/{p-00d12178.entry.js → p-6cef104b.entry.js} +1 -1
- package/dist/mint-components/p-7049e9b0.entry.js +1 -0
- package/dist/mint-components/p-733825fa.system.entry.js +1 -0
- package/dist/mint-components/p-770368bc.system.js +1 -0
- package/dist/mint-components/{p-37f67540.system.entry.js → p-7731f793.system.entry.js} +1 -1
- package/dist/mint-components/p-79191f88.entry.js +1 -0
- package/dist/mint-components/{p-545402ff.entry.js → p-7f088154.entry.js} +1 -1
- package/dist/mint-components/{p-b5db456f.system.entry.js → p-8679ed9f.system.entry.js} +1 -1
- package/dist/mint-components/{p-1948d476.entry.js → p-86990110.entry.js} +1 -1
- package/dist/mint-components/{p-70890ada.js → p-8704937c.js} +153 -153
- package/dist/mint-components/{p-14beec1b.system.entry.js → p-88aac6a9.system.entry.js} +1 -1
- package/dist/mint-components/p-8b5b78ca.entry.js +1 -0
- package/dist/mint-components/p-8e907ac7.system.entry.js +1 -0
- package/dist/mint-components/p-91669312.entry.js +1 -0
- package/dist/mint-components/p-9c310991.system.entry.js +1 -0
- package/dist/mint-components/p-a1dba9a1.system.entry.js +1 -0
- package/dist/mint-components/p-a6a7dcaa.js +1 -0
- package/dist/mint-components/{p-b6593d79.js → p-a7949e42.js} +24 -24
- package/dist/mint-components/p-a8f7cb95.js +1 -0
- package/dist/mint-components/{p-bd229b60.entry.js → p-a9050eb0.entry.js} +1 -1
- package/dist/mint-components/p-aad11a68.entry.js +1 -0
- package/dist/mint-components/{p-3c9b7cf5.system.entry.js → p-af062c8f.system.entry.js} +1 -1
- package/dist/mint-components/{p-e6024536.system.entry.js → p-afd366ae.system.entry.js} +1 -1
- package/dist/mint-components/{p-4519b7a5.system.entry.js → p-b12f7281.system.entry.js} +1 -1
- package/dist/mint-components/{p-1426f887.js → p-b23d5520.js} +1 -1
- package/dist/mint-components/p-b370fca8.system.js +1 -0
- package/dist/mint-components/p-b3b5b4b7.system.entry.js +1 -0
- package/dist/mint-components/{p-2b4fbcf7.entry.js → p-b45ba369.entry.js} +9 -9
- package/dist/mint-components/{p-c96b66e0.entry.js → p-b4c52c5a.entry.js} +3 -3
- package/dist/mint-components/p-b5861974.system.entry.js +1 -0
- package/dist/mint-components/{p-8369d5c3.system.entry.js → p-b6fc1227.system.entry.js} +1 -1
- package/dist/mint-components/{p-105d3cea.system.js → p-bc51264d.system.js} +1 -1
- package/dist/mint-components/{p-022d8077.system.entry.js → p-be4b748a.system.entry.js} +1 -1
- package/dist/mint-components/p-c34a507e.system.entry.js +1 -0
- package/dist/mint-components/p-c84659a3.system.js +1 -0
- package/dist/mint-components/p-c8878e79.entry.js +1 -0
- package/dist/mint-components/{p-7c4879fd.entry.js → p-ce5afa40.entry.js} +1 -1
- package/dist/mint-components/{p-350f61cd.js → p-ce621bcc.js} +1 -1
- package/dist/mint-components/{p-e5299352.system.js → p-ce9e7c98.system.js} +1 -1
- package/dist/mint-components/{p-dd18c75b.system.entry.js → p-cf690d55.system.entry.js} +1 -1
- package/dist/mint-components/p-cfb48ad2.system.entry.js +1 -0
- package/dist/mint-components/{p-5c602e84.entry.js → p-dd0d79bf.entry.js} +1 -1
- package/dist/mint-components/{p-07957c5a.system.js → p-dd7ee007.system.js} +1 -1
- package/dist/mint-components/{p-cb550bef.entry.js → p-e3735866.entry.js} +2 -2
- package/dist/mint-components/p-e5a0c50e.entry.js +13 -0
- package/dist/mint-components/p-e82b056c.system.entry.js +1 -0
- package/dist/mint-components/{p-86ba3785.js → p-eaada4da.js} +1 -1
- package/dist/mint-components/{p-208cf52b.system.entry.js → p-eba44835.system.entry.js} +1 -1
- package/dist/mint-components/{p-02acb970.system.js → p-ed095674.system.js} +1 -1
- package/dist/mint-components/{p-2932de37.system.js → p-ed17e637.system.js} +1 -1
- package/dist/mint-components/{p-7ab14d4b.system.entry.js → p-f0806232.system.entry.js} +1 -1
- package/dist/mint-components/{p-48704504.js → p-f3053c61.js} +1 -1
- package/dist/mint-components/{p-43701d0d.system.entry.js → p-fb20eb5e.system.entry.js} +1 -1
- package/dist/mint-components/{p-79097c07.entry.js → p-fbdf0738.entry.js} +1 -1
- package/dist/mint-components/{p-1b24bb52.js → p-fd2c5407.js} +1 -1
- package/dist/mint-components/{p-45e6592d.entry.js → p-fe5675b3.entry.js} +1 -1
- package/dist/types/components/sqm-image/sqm-image-view.d.ts +1 -0
- package/dist/types/components/sqm-image/sqm-image.d.ts +5 -0
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +2 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +2 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +12 -1
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -0
- package/dist/types/components.d.ts +28 -2
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-56d1fa5b.js +0 -2227
- package/dist/esm/index-0c7b14c5.js +0 -2225
- package/dist/esm-es5/ShadowViewAddon-7ae0f3a0.js +0 -1
- package/dist/esm-es5/global-8a95a0d3.js +0 -285
- package/dist/esm-es5/index-0c7b14c5.js +0 -1
- package/dist/esm-es5/index.module-f9338fc3.js +0 -53
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-05fa5ccd.js +0 -1
- package/dist/esm-es5/useChildElements-e32fe084.js +0 -1
- package/dist/esm-es5/useInstantAccessRegistration-59d8b278.js +0 -1
- package/dist/esm-es5/useReferralTable-34d7f6ee.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-a140a962.js +0 -1
- package/dist/mint-components/p-0043bc3c.js +0 -1
- package/dist/mint-components/p-08bf5051.system.entry.js +0 -1
- package/dist/mint-components/p-098b5cef.system.entry.js +0 -1
- package/dist/mint-components/p-118c20e6.system.entry.js +0 -1
- package/dist/mint-components/p-12a1697b.system.js +0 -1
- package/dist/mint-components/p-17554cca.system.entry.js +0 -1
- package/dist/mint-components/p-1975adfc.entry.js +0 -1
- package/dist/mint-components/p-269fbf0d.entry.js +0 -1
- package/dist/mint-components/p-2db204e7.entry.js +0 -1
- package/dist/mint-components/p-3030c6ba.system.js +0 -1
- package/dist/mint-components/p-38211322.system.entry.js +0 -1
- package/dist/mint-components/p-3bd60021.system.js +0 -53
- package/dist/mint-components/p-4414e194.system.entry.js +0 -1
- package/dist/mint-components/p-48409171.entry.js +0 -33
- package/dist/mint-components/p-55d7380c.entry.js +0 -13
- package/dist/mint-components/p-57e9275a.system.entry.js +0 -1
- package/dist/mint-components/p-5873fc01.js +0 -1
- package/dist/mint-components/p-6fbfd683.js +0 -1
- package/dist/mint-components/p-755073e7.entry.js +0 -1
- package/dist/mint-components/p-858a87ce.entry.js +0 -1
- package/dist/mint-components/p-85c56a32.system.entry.js +0 -1
- package/dist/mint-components/p-89669879.system.js +0 -1
- package/dist/mint-components/p-9a8180f3.entry.js +0 -1
- package/dist/mint-components/p-a06ac84d.entry.js +0 -1
- package/dist/mint-components/p-a252acc8.system.entry.js +0 -1
- package/dist/mint-components/p-a3e853b9.entry.js +0 -1
- package/dist/mint-components/p-a716994f.entry.js +0 -13
- package/dist/mint-components/p-af4357ee.system.js +0 -1
- package/dist/mint-components/p-bc9b2c8b.entry.js +0 -1
- package/dist/mint-components/p-bd124285.system.entry.js +0 -1
- package/dist/mint-components/p-c176d02b.js +0 -42
- package/dist/mint-components/p-c1c5ca28.system.entry.js +0 -1
- package/dist/mint-components/p-c7572e7e.system.entry.js +0 -1
- package/dist/mint-components/p-cac64545.system.entry.js +0 -1
- package/dist/mint-components/p-d6dd11db.system.entry.js +0 -1
- package/dist/mint-components/p-db39e02a.entry.js +0 -1
|
@@ -1,205 +1,202 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as useMemo$1, d as useEffect$1, e as useRef, f as useState$1, h as useReducer$1, c as createCommonjsModule, a as commonjsGlobal, i as getDefaultExportFromCjs } from './stencil-hooks.module-3c7f7c90.js';
|
|
1
|
+
import { u as useMemo, d as c, s, c as createCommonjsModule, a as commonjsGlobal, e as getDefaultExportFromCjs, f as useEffect, h, y, i as d, j as useReducer, k as useState, m as useRef } from './stencil-hooks.module-ac12ca1c.js';
|
|
3
2
|
|
|
4
|
-
const useCallback = (fn, inputs) => useMemo
|
|
3
|
+
const useCallback = (fn, inputs) => useMemo(() => fn, inputs);
|
|
5
4
|
|
|
6
5
|
function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
case '[object
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
case '[object
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
case '[object
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (a
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
//
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
case '[object
|
|
111
|
-
case '[object
|
|
112
|
-
case '[object
|
|
113
|
-
case '[object
|
|
114
|
-
case '[object
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
case '[object
|
|
132
|
-
case '[object
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
//
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
// to
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
bSet.add(b);
|
|
202
|
-
return false;
|
|
7
|
+
const { toString, hasOwnProperty } = Object.prototype;
|
|
8
|
+
const fnToStr = Function.prototype.toString;
|
|
9
|
+
const previousComparisons = new Map();
|
|
10
|
+
/**
|
|
11
|
+
* Performs a deep equality check on two JavaScript values, tolerating cycles.
|
|
12
|
+
*/
|
|
13
|
+
function equal(a, b) {
|
|
14
|
+
try {
|
|
15
|
+
return check(a, b);
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
previousComparisons.clear();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function check(a, b) {
|
|
22
|
+
// If the two values are strictly equal, our job is easy.
|
|
23
|
+
if (a === b) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
// Object.prototype.toString returns a representation of the runtime type of
|
|
27
|
+
// the given value that is considerably more precise than typeof.
|
|
28
|
+
const aTag = toString.call(a);
|
|
29
|
+
const bTag = toString.call(b);
|
|
30
|
+
// If the runtime types of a and b are different, they could maybe be equal
|
|
31
|
+
// under some interpretation of equality, but for simplicity and performance
|
|
32
|
+
// we just return false instead.
|
|
33
|
+
if (aTag !== bTag) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
switch (aTag) {
|
|
37
|
+
case '[object Array]':
|
|
38
|
+
// Arrays are a lot like other objects, but we can cheaply compare their
|
|
39
|
+
// lengths as a short-cut before comparing their elements.
|
|
40
|
+
if (a.length !== b.length)
|
|
41
|
+
return false;
|
|
42
|
+
// Fall through to object case...
|
|
43
|
+
case '[object Object]': {
|
|
44
|
+
if (previouslyCompared(a, b))
|
|
45
|
+
return true;
|
|
46
|
+
const aKeys = definedKeys(a);
|
|
47
|
+
const bKeys = definedKeys(b);
|
|
48
|
+
// If `a` and `b` have a different number of enumerable keys, they
|
|
49
|
+
// must be different.
|
|
50
|
+
const keyCount = aKeys.length;
|
|
51
|
+
if (keyCount !== bKeys.length)
|
|
52
|
+
return false;
|
|
53
|
+
// Now make sure they have the same keys.
|
|
54
|
+
for (let k = 0; k < keyCount; ++k) {
|
|
55
|
+
if (!hasOwnProperty.call(b, aKeys[k])) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Finally, check deep equality of all child properties.
|
|
60
|
+
for (let k = 0; k < keyCount; ++k) {
|
|
61
|
+
const key = aKeys[k];
|
|
62
|
+
if (!check(a[key], b[key])) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
case '[object Error]':
|
|
69
|
+
return a.name === b.name && a.message === b.message;
|
|
70
|
+
case '[object Number]':
|
|
71
|
+
// Handle NaN, which is !== itself.
|
|
72
|
+
if (a !== a)
|
|
73
|
+
return b !== b;
|
|
74
|
+
// Fall through to shared +a === +b case...
|
|
75
|
+
case '[object Boolean]':
|
|
76
|
+
case '[object Date]':
|
|
77
|
+
return +a === +b;
|
|
78
|
+
case '[object RegExp]':
|
|
79
|
+
case '[object String]':
|
|
80
|
+
return a == `${b}`;
|
|
81
|
+
case '[object Map]':
|
|
82
|
+
case '[object Set]': {
|
|
83
|
+
if (a.size !== b.size)
|
|
84
|
+
return false;
|
|
85
|
+
if (previouslyCompared(a, b))
|
|
86
|
+
return true;
|
|
87
|
+
const aIterator = a.entries();
|
|
88
|
+
const isMap = aTag === '[object Map]';
|
|
89
|
+
while (true) {
|
|
90
|
+
const info = aIterator.next();
|
|
91
|
+
if (info.done)
|
|
92
|
+
break;
|
|
93
|
+
// If a instanceof Set, aValue === aKey.
|
|
94
|
+
const [aKey, aValue] = info.value;
|
|
95
|
+
// So this works the same way for both Set and Map.
|
|
96
|
+
if (!b.has(aKey)) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
// However, we care about deep equality of values only when dealing
|
|
100
|
+
// with Map structures.
|
|
101
|
+
if (isMap && !check(aValue, b.get(aKey))) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
case '[object Uint16Array]':
|
|
108
|
+
case '[object Uint8Array]': // Buffer, in Node.js.
|
|
109
|
+
case '[object Uint32Array]':
|
|
110
|
+
case '[object Int32Array]':
|
|
111
|
+
case '[object Int8Array]':
|
|
112
|
+
case '[object Int16Array]':
|
|
113
|
+
case '[object ArrayBuffer]':
|
|
114
|
+
// DataView doesn't need these conversions, but the equality check is
|
|
115
|
+
// otherwise the same.
|
|
116
|
+
a = new Uint8Array(a);
|
|
117
|
+
b = new Uint8Array(b);
|
|
118
|
+
// Fall through...
|
|
119
|
+
case '[object DataView]': {
|
|
120
|
+
let len = a.byteLength;
|
|
121
|
+
if (len === b.byteLength) {
|
|
122
|
+
while (len-- && a[len] === b[len]) {
|
|
123
|
+
// Keep looping as long as the bytes are equal.
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return len === -1;
|
|
127
|
+
}
|
|
128
|
+
case '[object AsyncFunction]':
|
|
129
|
+
case '[object GeneratorFunction]':
|
|
130
|
+
case '[object AsyncGeneratorFunction]':
|
|
131
|
+
case '[object Function]': {
|
|
132
|
+
const aCode = fnToStr.call(a);
|
|
133
|
+
if (aCode !== fnToStr.call(b)) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
// We consider non-native functions equal if they have the same code
|
|
137
|
+
// (native functions require === because their code is censored).
|
|
138
|
+
// Note that this behavior is not entirely sound, since !== function
|
|
139
|
+
// objects with the same code can behave differently depending on
|
|
140
|
+
// their closure scope. However, any function can behave differently
|
|
141
|
+
// depending on the values of its input arguments (including this)
|
|
142
|
+
// and its calling context (including its closure scope), even
|
|
143
|
+
// though the function object is === to itself; and it is entirely
|
|
144
|
+
// possible for functions that are not === to behave exactly the
|
|
145
|
+
// same under all conceivable circumstances. Because none of these
|
|
146
|
+
// factors are statically decidable in JavaScript, JS function
|
|
147
|
+
// equality is not well-defined. This ambiguity allows us to
|
|
148
|
+
// consider the best possible heuristic among various imperfect
|
|
149
|
+
// options, and equating non-native functions that have the same
|
|
150
|
+
// code has enormous practical benefits, such as when comparing
|
|
151
|
+
// functions that are repeatedly passed as fresh function
|
|
152
|
+
// expressions within objects that are otherwise deeply equal. Since
|
|
153
|
+
// any function created from the same syntactic expression (in the
|
|
154
|
+
// same code location) will always stringify to the same code
|
|
155
|
+
// according to fnToStr.call, we can reasonably expect these
|
|
156
|
+
// repeatedly passed function expressions to have the same code, and
|
|
157
|
+
// thus behave "the same" (with all the caveats mentioned above),
|
|
158
|
+
// even though the runtime function objects are !== to one another.
|
|
159
|
+
return !endsWith(aCode, nativeCodeSuffix);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Otherwise the values are not equal.
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
function definedKeys(obj) {
|
|
166
|
+
// Remember that the second argument to Array.prototype.filter will be
|
|
167
|
+
// used as `this` within the callback function.
|
|
168
|
+
return Object.keys(obj).filter(isDefinedKey, obj);
|
|
169
|
+
}
|
|
170
|
+
function isDefinedKey(key) {
|
|
171
|
+
return this[key] !== void 0;
|
|
172
|
+
}
|
|
173
|
+
const nativeCodeSuffix = "{ [native code] }";
|
|
174
|
+
function endsWith(full, suffix) {
|
|
175
|
+
const fromIndex = full.length - suffix.length;
|
|
176
|
+
return fromIndex >= 0 &&
|
|
177
|
+
full.indexOf(suffix, fromIndex) === fromIndex;
|
|
178
|
+
}
|
|
179
|
+
function previouslyCompared(a, b) {
|
|
180
|
+
// Though cyclic references can make an object graph appear infinite from the
|
|
181
|
+
// perspective of a depth-first traversal, the graph still contains a finite
|
|
182
|
+
// number of distinct object references. We use the previousComparisons cache
|
|
183
|
+
// to avoid comparing the same pair of object references more than once, which
|
|
184
|
+
// guarantees termination (even if we end up comparing every object in one
|
|
185
|
+
// graph to every object in the other graph, which is extremely unlikely),
|
|
186
|
+
// while still allowing weird isomorphic structures (like rings with different
|
|
187
|
+
// lengths) a chance to pass the equality test.
|
|
188
|
+
let bSet = previousComparisons.get(a);
|
|
189
|
+
if (bSet) {
|
|
190
|
+
// Return true here because we can be sure false will be returned somewhere
|
|
191
|
+
// else if the objects are not equivalent.
|
|
192
|
+
if (bSet.has(b))
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
previousComparisons.set(a, bSet = new Set);
|
|
197
|
+
}
|
|
198
|
+
bSet.add(b);
|
|
199
|
+
return false;
|
|
203
200
|
}
|
|
204
201
|
|
|
205
202
|
var __defProp = Object.defineProperty;
|
|
@@ -635,15 +632,12 @@ function userIdentityFromJwt(jwt) {
|
|
|
635
632
|
const exp = decoded.exp;
|
|
636
633
|
let userId = void 0;
|
|
637
634
|
let accountId = void 0;
|
|
638
|
-
let tenantAlias = void 0;
|
|
639
635
|
if (isDecodedWidgetAPIJWT(decoded)) {
|
|
640
636
|
const matches = decoded.sub.match(/(.*):(.*)@(.*):users/);
|
|
641
637
|
if (matches == null ? void 0 : matches[1])
|
|
642
638
|
accountId = atob(matches[1]);
|
|
643
639
|
if (matches == null ? void 0 : matches[2])
|
|
644
640
|
userId = atob(matches[2]);
|
|
645
|
-
if (matches == null ? void 0 : matches[3])
|
|
646
|
-
tenantAlias = matches[3];
|
|
647
641
|
} else if (isDecodedSquatchJWT(decoded)) {
|
|
648
642
|
accountId = decoded.user.accountId;
|
|
649
643
|
userId = decoded.user.id;
|
|
@@ -652,10 +646,6 @@ function userIdentityFromJwt(jwt) {
|
|
|
652
646
|
debug6("No user information");
|
|
653
647
|
return void 0;
|
|
654
648
|
}
|
|
655
|
-
if (tenantAlias && getTenantAlias() && tenantAlias !== getTenantAlias()) {
|
|
656
|
-
debug6("tenantAlias in JWT doesn't match environment");
|
|
657
|
-
return void 0;
|
|
658
|
-
}
|
|
659
649
|
if (exp && Date.now() >= exp * 1e3) {
|
|
660
650
|
debug6("JWT has expired");
|
|
661
651
|
return void 0;
|
|
@@ -748,10 +738,6 @@ function setProgramId(programId) {
|
|
|
748
738
|
}
|
|
749
739
|
}
|
|
750
740
|
|
|
751
|
-
function t$2(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i);}}function n$2(n,e,i){return e&&t$2(n.prototype,e),i&&t$2(n,i),n}var s$1=function(){function t(t){var n=this,e=this;this._status="Initial",this.onChange=function(t,n){e.options.onChange&&e.options.onChange(t,n);},this.onConnect=function(t){try{return n.status="Connected",n.options.onChange&&n.options.onChange(t,t),Promise.resolve(new Promise(function(t){n.resolvePromise=t;}))}catch(t){return Promise.reject(t)}},this.onDisconnect=function(){e.status="Connecting",e.start();},this.options=t;}var e=t.prototype;return e.start=function(){var t=this,n=0;this.status="Connecting";var e=function(){return t.status},i=a$1(this.options.attempts)||10,o=function(){if("Connected"!==e()){var o=new CustomEvent(t.options.contextName,{bubbles:!0,cancelable:!0,composed:!0,detail:{onConnect:t.onConnect,onChange:t.onChange,onDisconnect:t.onDisconnect}});a$1(t.options.element).dispatchEvent(o),"Connected"!==e()?++n>=i&&(t._interval&&clearInterval(t._interval),t.status="Timeout"):"Connected"===e()&&t._interval&&clearInterval(t._interval);}};return (a$1(this.options.pollingMs)||100)>0&&i>1&&(this._interval=setInterval(o,a$1(this.options.pollingMs)||100)),o(),this},e.stop=function(){return this._interval&&clearInterval(this._interval),this.resolvePromise&&this.resolvePromise(),this.status="Initial",this},n$2(t,[{key:"status",set:function(t){this._status=t,this.options.onStatus&&this.options.onStatus(t);},get:function(){return this._status}}]),t}(),c$1=function(){function t(t){var n=this;this.__listeners=[],this.connectListener=function(t){try{t.stopPropagation(),n.__listeners=[].concat(n.__listeners,[t.detail]);var e=function(e,i){try{var o=Promise.resolve(t.detail.onConnect(n.__current)).then(function(){});}catch(t){return i(!0,t)}return o&&o.then?o.then(i.bind(null,!1),i.bind(null,!0)):i(!1,o)}(0,function(e,i){var o,r;if(n.__listeners=(r=(o=n.__listeners).indexOf(t.detail),o.slice(0,r).concat(o.slice(r+1,o.length))),e)throw i;return i});return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},this.options=t,this.__current=a$1(t.initialState);}var e=t.prototype;return e.start=function(){return a$1(this.options.element).addEventListener(this.options.contextName,this.connectListener),this},e.stop=function(){return a$1(this.options.element).removeEventListener(this.options.contextName,this.connectListener),this.__listeners.map(function(t){t.onDisconnect();}),this.__listeners=[],this},n$2(t,[{key:"context",set:function(t){var n=this.__current;this.__current=t,this.__listeners.forEach(function(e){return e.onChange(t,n)});},get:function(){return a$1(this.__current)}},{key:"listeners",get:function(){return Object.freeze([].concat(this.__listeners))}}]),t}();function a$1(t){return "function"==typeof typeof t?t():t}
|
|
752
|
-
|
|
753
|
-
function c$2(){return (c$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var u=1e3,C=60*u,l=60*C,d=24*l,f=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*l;case"minutes":case"minute":case"mins":case"min":case"m":return n*C;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=d?g(e,t,d,"day"):t>=l?g(e,t,l,"hour"):t>=C?g(e,t,C,"minute"):t>=u?g(e,t,u,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=d?Math.round(e/d)+"d":t>=l?Math.round(e/l)+"h":t>=C?Math.round(e/C)+"m":t>=u?Math.round(e/u)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function g(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}var p,m=(function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(o=r));}),t.splice(o,0,n);},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug");}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=function(e){function t(e){let r,o=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date);n.diff=o-(r||o),n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return "%";a++;const s=t.formatters[o];return "function"==typeof s&&(r=s.call(n,e[a]),e.splice(a,1),a--),r}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e);}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?t.enabled(e):o,set:e=>{o=e;}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));},t.enabled=function(e){if("*"===e[e.length-1])return !0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return !1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return !0;return !1},t.humanize=f,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(n=>{t[n]=e[n];}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(p={exports:{}},p.exports),p.exports)("useDomContext");function h(e,n,i){void 0===i&&(i={});var u=useRef(void 0),C=useState$1(void 0),l=C[0],d=C[1],f=useMemo$1(function(){var r;try{(r=new s$1(c$2({contextName:n,element:e,onChange:function(e){u&&(u.current=e),d(e);}},i))).start();}catch(e){m("Listener failed to start",e);}return m("Listener initialized",r),{listener:r}},[n,u]).listener;return useEffect$1(function(){return m("Listener starting (or restarting)",f),f.start(),function(){m("Listener stopping (or restopping)",f),f.stop();}},[f,e.isConnected]),l||(null==u?void 0:u.current)}function y(e,t,r){var o=useMemo$1(function(){var o=new c$1({contextName:t,element:e,initialState:r});return o.start(),m("Provider initialized",o),o},[t,e]);useEffect$1(function(){return m("Provider starting (or restarting)",o),o.start(),function(){m("Provider stopping (or re-stopping)",o),o.stop();}},[o,e.isConnected]);var c=useReducer$1(function(e,t){var n;return m("New context value",t),n="function"==typeof t?t(o.context):t,o.context=n,o.context},o.context);return [c[0],c[1],o]}
|
|
754
|
-
|
|
755
741
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
756
742
|
|
|
757
743
|
/**
|
|
@@ -1504,6 +1490,7 @@ function devAssert(condition, message) {
|
|
|
1504
1490
|
* A replacement for instanceof which includes an error warning when multi-realm
|
|
1505
1491
|
* constructors are detected.
|
|
1506
1492
|
*/
|
|
1493
|
+
|
|
1507
1494
|
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
|
|
1508
1495
|
// See: https://webpack.js.org/guides/production/
|
|
1509
1496
|
const instanceOf = // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
|
|
@@ -4532,8 +4519,6 @@ function hasMultilineItems(maybeArray) {
|
|
|
4532
4519
|
return maybeArray != null && maybeArray.some(isMultiline);
|
|
4533
4520
|
}
|
|
4534
4521
|
|
|
4535
|
-
function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r$1="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$3(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r$1(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r$1(t)}}function n$3(e){this.message=e;}function o$1(e,r){if("string"!=typeof e)throw new n$3("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$3(e.split(".")[o]))}catch(e){throw new n$3("Invalid token specified: "+e.message)}}n$3.prototype=new Error,n$3.prototype.name="InvalidTokenError";
|
|
4536
|
-
|
|
4537
4522
|
//
|
|
4538
4523
|
// Main
|
|
4539
4524
|
//
|
|
@@ -4680,6 +4665,11 @@ var strategies = {
|
|
|
4680
4665
|
};
|
|
4681
4666
|
src.strategies = strategies;
|
|
4682
4667
|
|
|
4668
|
+
const memoize$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), src, {
|
|
4669
|
+
'default': src,
|
|
4670
|
+
strategies: strategies
|
|
4671
|
+
}));
|
|
4672
|
+
|
|
4683
4673
|
var utils = createCommonjsModule(function (module, exports) {
|
|
4684
4674
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
4685
4675
|
__assign = Object.assign || function(t) {
|
|
@@ -4929,14 +4919,15 @@ exports.default = combinedQuery;
|
|
|
4929
4919
|
const M = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
4930
4920
|
|
|
4931
4921
|
var browserPonyfill = createCommonjsModule(function (module, exports) {
|
|
4932
|
-
var
|
|
4922
|
+
var global = typeof self !== 'undefined' ? self : commonjsGlobal;
|
|
4923
|
+
var __self__ = (function () {
|
|
4933
4924
|
function F() {
|
|
4934
4925
|
this.fetch = false;
|
|
4935
|
-
this.DOMException =
|
|
4926
|
+
this.DOMException = global.DOMException;
|
|
4936
4927
|
}
|
|
4937
|
-
F.prototype =
|
|
4928
|
+
F.prototype = global;
|
|
4938
4929
|
return new F();
|
|
4939
|
-
})(
|
|
4930
|
+
})();
|
|
4940
4931
|
(function(self) {
|
|
4941
4932
|
|
|
4942
4933
|
var irrelevant = (function (exports) {
|
|
@@ -5463,17 +5454,24 @@ var irrelevant = (function (exports) {
|
|
|
5463
5454
|
exports.Response = Response;
|
|
5464
5455
|
exports.fetch = fetch;
|
|
5465
5456
|
|
|
5457
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5458
|
+
|
|
5466
5459
|
return exports;
|
|
5467
5460
|
|
|
5468
|
-
}({})
|
|
5461
|
+
})({});
|
|
5469
5462
|
})(__self__);
|
|
5463
|
+
__self__.fetch.ponyfill = true;
|
|
5464
|
+
// Remove "polyfill" property added by whatwg-fetch
|
|
5470
5465
|
delete __self__.fetch.polyfill;
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
exports
|
|
5475
|
-
exports.
|
|
5476
|
-
exports.
|
|
5466
|
+
// Choose between native implementation (global) or custom implementation (__self__)
|
|
5467
|
+
// var ctx = global.fetch ? global : __self__;
|
|
5468
|
+
var ctx = __self__; // this line disable service worker support temporarily
|
|
5469
|
+
exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
|
|
5470
|
+
exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.
|
|
5471
|
+
exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
|
|
5472
|
+
exports.Headers = ctx.Headers;
|
|
5473
|
+
exports.Request = ctx.Request;
|
|
5474
|
+
exports.Response = ctx.Response;
|
|
5477
5475
|
module.exports = exports;
|
|
5478
5476
|
});
|
|
5479
5477
|
|
|
@@ -8200,1178 +8198,6 @@ function dispatchBufferClose(arg) {
|
|
|
8200
8198
|
subscriber.closeContext(context);
|
|
8201
8199
|
}
|
|
8202
8200
|
|
|
8203
|
-
var _a$1 = Object.prototype, toString$1 = _a$1.toString, hasOwnProperty$1 = _a$1.hasOwnProperty;
|
|
8204
|
-
var fnToStr$1 = Function.prototype.toString;
|
|
8205
|
-
var previousComparisons$1 = new Map();
|
|
8206
|
-
/**
|
|
8207
|
-
* Performs a deep equality check on two JavaScript values, tolerating cycles.
|
|
8208
|
-
*/
|
|
8209
|
-
function equal$1(a, b) {
|
|
8210
|
-
try {
|
|
8211
|
-
return check$1(a, b);
|
|
8212
|
-
}
|
|
8213
|
-
finally {
|
|
8214
|
-
previousComparisons$1.clear();
|
|
8215
|
-
}
|
|
8216
|
-
}
|
|
8217
|
-
function check$1(a, b) {
|
|
8218
|
-
// If the two values are strictly equal, our job is easy.
|
|
8219
|
-
if (a === b) {
|
|
8220
|
-
return true;
|
|
8221
|
-
}
|
|
8222
|
-
// Object.prototype.toString returns a representation of the runtime type of
|
|
8223
|
-
// the given value that is considerably more precise than typeof.
|
|
8224
|
-
var aTag = toString$1.call(a);
|
|
8225
|
-
var bTag = toString$1.call(b);
|
|
8226
|
-
// If the runtime types of a and b are different, they could maybe be equal
|
|
8227
|
-
// under some interpretation of equality, but for simplicity and performance
|
|
8228
|
-
// we just return false instead.
|
|
8229
|
-
if (aTag !== bTag) {
|
|
8230
|
-
return false;
|
|
8231
|
-
}
|
|
8232
|
-
switch (aTag) {
|
|
8233
|
-
case '[object Array]':
|
|
8234
|
-
// Arrays are a lot like other objects, but we can cheaply compare their
|
|
8235
|
-
// lengths as a short-cut before comparing their elements.
|
|
8236
|
-
if (a.length !== b.length)
|
|
8237
|
-
return false;
|
|
8238
|
-
// Fall through to object case...
|
|
8239
|
-
case '[object Object]': {
|
|
8240
|
-
if (previouslyCompared$1(a, b))
|
|
8241
|
-
return true;
|
|
8242
|
-
var aKeys = definedKeys$1(a);
|
|
8243
|
-
var bKeys = definedKeys$1(b);
|
|
8244
|
-
// If `a` and `b` have a different number of enumerable keys, they
|
|
8245
|
-
// must be different.
|
|
8246
|
-
var keyCount = aKeys.length;
|
|
8247
|
-
if (keyCount !== bKeys.length)
|
|
8248
|
-
return false;
|
|
8249
|
-
// Now make sure they have the same keys.
|
|
8250
|
-
for (var k = 0; k < keyCount; ++k) {
|
|
8251
|
-
if (!hasOwnProperty$1.call(b, aKeys[k])) {
|
|
8252
|
-
return false;
|
|
8253
|
-
}
|
|
8254
|
-
}
|
|
8255
|
-
// Finally, check deep equality of all child properties.
|
|
8256
|
-
for (var k = 0; k < keyCount; ++k) {
|
|
8257
|
-
var key = aKeys[k];
|
|
8258
|
-
if (!check$1(a[key], b[key])) {
|
|
8259
|
-
return false;
|
|
8260
|
-
}
|
|
8261
|
-
}
|
|
8262
|
-
return true;
|
|
8263
|
-
}
|
|
8264
|
-
case '[object Error]':
|
|
8265
|
-
return a.name === b.name && a.message === b.message;
|
|
8266
|
-
case '[object Number]':
|
|
8267
|
-
// Handle NaN, which is !== itself.
|
|
8268
|
-
if (a !== a)
|
|
8269
|
-
return b !== b;
|
|
8270
|
-
// Fall through to shared +a === +b case...
|
|
8271
|
-
case '[object Boolean]':
|
|
8272
|
-
case '[object Date]':
|
|
8273
|
-
return +a === +b;
|
|
8274
|
-
case '[object RegExp]':
|
|
8275
|
-
case '[object String]':
|
|
8276
|
-
return a == "" + b;
|
|
8277
|
-
case '[object Map]':
|
|
8278
|
-
case '[object Set]': {
|
|
8279
|
-
if (a.size !== b.size)
|
|
8280
|
-
return false;
|
|
8281
|
-
if (previouslyCompared$1(a, b))
|
|
8282
|
-
return true;
|
|
8283
|
-
var aIterator = a.entries();
|
|
8284
|
-
var isMap = aTag === '[object Map]';
|
|
8285
|
-
while (true) {
|
|
8286
|
-
var info = aIterator.next();
|
|
8287
|
-
if (info.done)
|
|
8288
|
-
break;
|
|
8289
|
-
// If a instanceof Set, aValue === aKey.
|
|
8290
|
-
var _a = info.value, aKey = _a[0], aValue = _a[1];
|
|
8291
|
-
// So this works the same way for both Set and Map.
|
|
8292
|
-
if (!b.has(aKey)) {
|
|
8293
|
-
return false;
|
|
8294
|
-
}
|
|
8295
|
-
// However, we care about deep equality of values only when dealing
|
|
8296
|
-
// with Map structures.
|
|
8297
|
-
if (isMap && !check$1(aValue, b.get(aKey))) {
|
|
8298
|
-
return false;
|
|
8299
|
-
}
|
|
8300
|
-
}
|
|
8301
|
-
return true;
|
|
8302
|
-
}
|
|
8303
|
-
case '[object Uint16Array]':
|
|
8304
|
-
case '[object Uint8Array]': // Buffer, in Node.js.
|
|
8305
|
-
case '[object Uint32Array]':
|
|
8306
|
-
case '[object Int32Array]':
|
|
8307
|
-
case '[object Int8Array]':
|
|
8308
|
-
case '[object Int16Array]':
|
|
8309
|
-
case '[object ArrayBuffer]':
|
|
8310
|
-
// DataView doesn't need these conversions, but the equality check is
|
|
8311
|
-
// otherwise the same.
|
|
8312
|
-
a = new Uint8Array(a);
|
|
8313
|
-
b = new Uint8Array(b);
|
|
8314
|
-
// Fall through...
|
|
8315
|
-
case '[object DataView]': {
|
|
8316
|
-
var len = a.byteLength;
|
|
8317
|
-
if (len === b.byteLength) {
|
|
8318
|
-
while (len-- && a[len] === b[len]) {
|
|
8319
|
-
// Keep looping as long as the bytes are equal.
|
|
8320
|
-
}
|
|
8321
|
-
}
|
|
8322
|
-
return len === -1;
|
|
8323
|
-
}
|
|
8324
|
-
case '[object AsyncFunction]':
|
|
8325
|
-
case '[object GeneratorFunction]':
|
|
8326
|
-
case '[object AsyncGeneratorFunction]':
|
|
8327
|
-
case '[object Function]': {
|
|
8328
|
-
var aCode = fnToStr$1.call(a);
|
|
8329
|
-
if (aCode !== fnToStr$1.call(b)) {
|
|
8330
|
-
return false;
|
|
8331
|
-
}
|
|
8332
|
-
// We consider non-native functions equal if they have the same code
|
|
8333
|
-
// (native functions require === because their code is censored).
|
|
8334
|
-
// Note that this behavior is not entirely sound, since !== function
|
|
8335
|
-
// objects with the same code can behave differently depending on
|
|
8336
|
-
// their closure scope. However, any function can behave differently
|
|
8337
|
-
// depending on the values of its input arguments (including this)
|
|
8338
|
-
// and its calling context (including its closure scope), even
|
|
8339
|
-
// though the function object is === to itself; and it is entirely
|
|
8340
|
-
// possible for functions that are not === to behave exactly the
|
|
8341
|
-
// same under all conceivable circumstances. Because none of these
|
|
8342
|
-
// factors are statically decidable in JavaScript, JS function
|
|
8343
|
-
// equality is not well-defined. This ambiguity allows us to
|
|
8344
|
-
// consider the best possible heuristic among various imperfect
|
|
8345
|
-
// options, and equating non-native functions that have the same
|
|
8346
|
-
// code has enormous practical benefits, such as when comparing
|
|
8347
|
-
// functions that are repeatedly passed as fresh function
|
|
8348
|
-
// expressions within objects that are otherwise deeply equal. Since
|
|
8349
|
-
// any function created from the same syntactic expression (in the
|
|
8350
|
-
// same code location) will always stringify to the same code
|
|
8351
|
-
// according to fnToStr.call, we can reasonably expect these
|
|
8352
|
-
// repeatedly passed function expressions to have the same code, and
|
|
8353
|
-
// thus behave "the same" (with all the caveats mentioned above),
|
|
8354
|
-
// even though the runtime function objects are !== to one another.
|
|
8355
|
-
return !endsWith$1(aCode, nativeCodeSuffix$1);
|
|
8356
|
-
}
|
|
8357
|
-
}
|
|
8358
|
-
// Otherwise the values are not equal.
|
|
8359
|
-
return false;
|
|
8360
|
-
}
|
|
8361
|
-
function definedKeys$1(obj) {
|
|
8362
|
-
// Remember that the second argument to Array.prototype.filter will be
|
|
8363
|
-
// used as `this` within the callback function.
|
|
8364
|
-
return Object.keys(obj).filter(isDefinedKey$1, obj);
|
|
8365
|
-
}
|
|
8366
|
-
function isDefinedKey$1(key) {
|
|
8367
|
-
return this[key] !== void 0;
|
|
8368
|
-
}
|
|
8369
|
-
var nativeCodeSuffix$1 = "{ [native code] }";
|
|
8370
|
-
function endsWith$1(full, suffix) {
|
|
8371
|
-
var fromIndex = full.length - suffix.length;
|
|
8372
|
-
return fromIndex >= 0 &&
|
|
8373
|
-
full.indexOf(suffix, fromIndex) === fromIndex;
|
|
8374
|
-
}
|
|
8375
|
-
function previouslyCompared$1(a, b) {
|
|
8376
|
-
// Though cyclic references can make an object graph appear infinite from the
|
|
8377
|
-
// perspective of a depth-first traversal, the graph still contains a finite
|
|
8378
|
-
// number of distinct object references. We use the previousComparisons cache
|
|
8379
|
-
// to avoid comparing the same pair of object references more than once, which
|
|
8380
|
-
// guarantees termination (even if we end up comparing every object in one
|
|
8381
|
-
// graph to every object in the other graph, which is extremely unlikely),
|
|
8382
|
-
// while still allowing weird isomorphic structures (like rings with different
|
|
8383
|
-
// lengths) a chance to pass the equality test.
|
|
8384
|
-
var bSet = previousComparisons$1.get(a);
|
|
8385
|
-
if (bSet) {
|
|
8386
|
-
// Return true here because we can be sure false will be returned somewhere
|
|
8387
|
-
// else if the objects are not equivalent.
|
|
8388
|
-
if (bSet.has(b))
|
|
8389
|
-
return true;
|
|
8390
|
-
}
|
|
8391
|
-
else {
|
|
8392
|
-
previousComparisons$1.set(a, bSet = new Set);
|
|
8393
|
-
}
|
|
8394
|
-
bSet.add(b);
|
|
8395
|
-
return false;
|
|
8396
|
-
}
|
|
8397
|
-
|
|
8398
|
-
/**
|
|
8399
|
-
* @license
|
|
8400
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8401
|
-
* This code may only be used under the BSD style license found at
|
|
8402
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8403
|
-
* The complete set of authors may be found at
|
|
8404
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
8405
|
-
* The complete set of contributors may be found at
|
|
8406
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8407
|
-
* Code distributed by Google as part of the polymer project is also
|
|
8408
|
-
* subject to an additional IP rights grant found at
|
|
8409
|
-
* http://polymer.github.io/PATENTS.txt
|
|
8410
|
-
*/
|
|
8411
|
-
/**
|
|
8412
|
-
* An expression marker with embedded unique key to avoid collision with
|
|
8413
|
-
* possible text in templates.
|
|
8414
|
-
*/
|
|
8415
|
-
const marker = `{{lit-${String(Math.random()).slice(2)}}}`;
|
|
8416
|
-
|
|
8417
|
-
/**
|
|
8418
|
-
* @license
|
|
8419
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8420
|
-
* This code may only be used under the BSD style license found at
|
|
8421
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8422
|
-
* The complete set of authors may be found at
|
|
8423
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
8424
|
-
* The complete set of contributors may be found at
|
|
8425
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8426
|
-
* Code distributed by Google as part of the polymer project is also
|
|
8427
|
-
* subject to an additional IP rights grant found at
|
|
8428
|
-
* http://polymer.github.io/PATENTS.txt
|
|
8429
|
-
*/
|
|
8430
|
-
/**
|
|
8431
|
-
* Our TrustedTypePolicy for HTML which is declared using the html template
|
|
8432
|
-
* tag function.
|
|
8433
|
-
*
|
|
8434
|
-
* That HTML is a developer-authored constant, and is parsed with innerHTML
|
|
8435
|
-
* before any untrusted expressions have been mixed in. Therefor it is
|
|
8436
|
-
* considered safe by construction.
|
|
8437
|
-
*/
|
|
8438
|
-
const policy = window.trustedTypes &&
|
|
8439
|
-
trustedTypes.createPolicy('lit-html', { createHTML: (s) => s });
|
|
8440
|
-
|
|
8441
|
-
/**
|
|
8442
|
-
* @license
|
|
8443
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8444
|
-
* This code may only be used under the BSD style license found at
|
|
8445
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8446
|
-
* The complete set of authors may be found at
|
|
8447
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
8448
|
-
* The complete set of contributors may be found at
|
|
8449
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8450
|
-
* Code distributed by Google as part of the polymer project is also
|
|
8451
|
-
* subject to an additional IP rights grant found at
|
|
8452
|
-
* http://polymer.github.io/PATENTS.txt
|
|
8453
|
-
*/
|
|
8454
|
-
// Wrap into an IIFE because MS Edge <= v41 does not support having try/catch
|
|
8455
|
-
// blocks right into the body of a module
|
|
8456
|
-
(() => {
|
|
8457
|
-
try {
|
|
8458
|
-
const options = {
|
|
8459
|
-
get capture() {
|
|
8460
|
-
return false;
|
|
8461
|
-
}
|
|
8462
|
-
};
|
|
8463
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8464
|
-
window.addEventListener('test', options, options);
|
|
8465
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8466
|
-
window.removeEventListener('test', options, options);
|
|
8467
|
-
}
|
|
8468
|
-
catch (_e) {
|
|
8469
|
-
// event options not supported
|
|
8470
|
-
}
|
|
8471
|
-
})();
|
|
8472
|
-
|
|
8473
|
-
/**
|
|
8474
|
-
* @license
|
|
8475
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
8476
|
-
* This code may only be used under the BSD style license found at
|
|
8477
|
-
* http://polymer.github.io/LICENSE.txt
|
|
8478
|
-
* The complete set of authors may be found at
|
|
8479
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
8480
|
-
* The complete set of contributors may be found at
|
|
8481
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
8482
|
-
* Code distributed by Google as part of the polymer project is also
|
|
8483
|
-
* subject to an additional IP rights grant found at
|
|
8484
|
-
* http://polymer.github.io/PATENTS.txt
|
|
8485
|
-
*/
|
|
8486
|
-
// IMPORTANT: do not change the property name or the assignment expression.
|
|
8487
|
-
// This line will be used in regexes to search for lit-html usage.
|
|
8488
|
-
// TODO(justinfagnani): inject version number at build time
|
|
8489
|
-
if (typeof window !== 'undefined') {
|
|
8490
|
-
(window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.4.1');
|
|
8491
|
-
}
|
|
8492
|
-
|
|
8493
|
-
let current;
|
|
8494
|
-
let currentId = 0;
|
|
8495
|
-
function notify() {
|
|
8496
|
-
return currentId++;
|
|
8497
|
-
}
|
|
8498
|
-
|
|
8499
|
-
const hookSymbol = Symbol('haunted.hook');
|
|
8500
|
-
const effectsSymbol = Symbol('haunted.effects');
|
|
8501
|
-
const layoutEffectsSymbol = Symbol('haunted.layoutEffects');
|
|
8502
|
-
const contextEvent = 'haunted.context';
|
|
8503
|
-
|
|
8504
|
-
const defer = Promise.resolve().then.bind(Promise.resolve());
|
|
8505
|
-
|
|
8506
|
-
class Hook {
|
|
8507
|
-
constructor(id, state) {
|
|
8508
|
-
this.id = id;
|
|
8509
|
-
this.state = state;
|
|
8510
|
-
}
|
|
8511
|
-
}
|
|
8512
|
-
function use(Hook, ...args) {
|
|
8513
|
-
let id = notify();
|
|
8514
|
-
let hooks = current[hookSymbol];
|
|
8515
|
-
let hook = hooks.get(id);
|
|
8516
|
-
if (!hook) {
|
|
8517
|
-
hook = new Hook(id, current, ...args);
|
|
8518
|
-
hooks.set(id, hook);
|
|
8519
|
-
}
|
|
8520
|
-
return hook.update(...args);
|
|
8521
|
-
}
|
|
8522
|
-
function hook(Hook) {
|
|
8523
|
-
return use.bind(null, Hook);
|
|
8524
|
-
}
|
|
8525
|
-
|
|
8526
|
-
function createEffect(setEffects) {
|
|
8527
|
-
return hook(class extends Hook {
|
|
8528
|
-
constructor(id, state, ignored1, ignored2) {
|
|
8529
|
-
super(id, state);
|
|
8530
|
-
setEffects(state, this);
|
|
8531
|
-
}
|
|
8532
|
-
update(callback, values) {
|
|
8533
|
-
this.callback = callback;
|
|
8534
|
-
this.values = values;
|
|
8535
|
-
}
|
|
8536
|
-
call() {
|
|
8537
|
-
if (!this.values || this.hasChanged()) {
|
|
8538
|
-
this.run();
|
|
8539
|
-
}
|
|
8540
|
-
this.lastValues = this.values;
|
|
8541
|
-
}
|
|
8542
|
-
run() {
|
|
8543
|
-
this.teardown();
|
|
8544
|
-
this._teardown = this.callback.call(this.state);
|
|
8545
|
-
}
|
|
8546
|
-
teardown() {
|
|
8547
|
-
if (typeof this._teardown === 'function') {
|
|
8548
|
-
this._teardown();
|
|
8549
|
-
}
|
|
8550
|
-
}
|
|
8551
|
-
hasChanged() {
|
|
8552
|
-
return !this.lastValues || this.values.some((value, i) => this.lastValues[i] !== value);
|
|
8553
|
-
}
|
|
8554
|
-
});
|
|
8555
|
-
}
|
|
8556
|
-
|
|
8557
|
-
function setEffects(state, cb) {
|
|
8558
|
-
state[effectsSymbol].push(cb);
|
|
8559
|
-
}
|
|
8560
|
-
const useEffect = createEffect(setEffects);
|
|
8561
|
-
|
|
8562
|
-
const useContext = hook(class extends Hook {
|
|
8563
|
-
constructor(id, state, _) {
|
|
8564
|
-
super(id, state);
|
|
8565
|
-
this._updater = this._updater.bind(this);
|
|
8566
|
-
this._ranEffect = false;
|
|
8567
|
-
this._unsubscribe = null;
|
|
8568
|
-
setEffects(state, this);
|
|
8569
|
-
}
|
|
8570
|
-
update(Context) {
|
|
8571
|
-
if (this.state.virtual) {
|
|
8572
|
-
throw new Error('can\'t be used with virtual components');
|
|
8573
|
-
}
|
|
8574
|
-
if (this.Context !== Context) {
|
|
8575
|
-
this._subscribe(Context);
|
|
8576
|
-
this.Context = Context;
|
|
8577
|
-
}
|
|
8578
|
-
return this.value;
|
|
8579
|
-
}
|
|
8580
|
-
call() {
|
|
8581
|
-
if (!this._ranEffect) {
|
|
8582
|
-
this._ranEffect = true;
|
|
8583
|
-
if (this._unsubscribe)
|
|
8584
|
-
this._unsubscribe();
|
|
8585
|
-
this._subscribe(this.Context);
|
|
8586
|
-
this.state.update();
|
|
8587
|
-
}
|
|
8588
|
-
}
|
|
8589
|
-
_updater(value) {
|
|
8590
|
-
this.value = value;
|
|
8591
|
-
this.state.update();
|
|
8592
|
-
}
|
|
8593
|
-
_subscribe(Context) {
|
|
8594
|
-
const detail = { Context, callback: this._updater };
|
|
8595
|
-
this.state.host.dispatchEvent(new CustomEvent(contextEvent, {
|
|
8596
|
-
detail,
|
|
8597
|
-
bubbles: true,
|
|
8598
|
-
cancelable: true,
|
|
8599
|
-
composed: true,
|
|
8600
|
-
}));
|
|
8601
|
-
const { unsubscribe = null, value } = detail;
|
|
8602
|
-
this.value = unsubscribe ? value : Context.defaultValue;
|
|
8603
|
-
this._unsubscribe = unsubscribe;
|
|
8604
|
-
}
|
|
8605
|
-
teardown() {
|
|
8606
|
-
if (this._unsubscribe) {
|
|
8607
|
-
this._unsubscribe();
|
|
8608
|
-
}
|
|
8609
|
-
}
|
|
8610
|
-
});
|
|
8611
|
-
|
|
8612
|
-
const useMemo = hook(class extends Hook {
|
|
8613
|
-
constructor(id, state, fn, values) {
|
|
8614
|
-
super(id, state);
|
|
8615
|
-
this.value = fn();
|
|
8616
|
-
this.values = values;
|
|
8617
|
-
}
|
|
8618
|
-
update(fn, values) {
|
|
8619
|
-
if (this.hasChanged(values)) {
|
|
8620
|
-
this.values = values;
|
|
8621
|
-
this.value = fn();
|
|
8622
|
-
}
|
|
8623
|
-
return this.value;
|
|
8624
|
-
}
|
|
8625
|
-
hasChanged(values = []) {
|
|
8626
|
-
return values.some((value, i) => this.values[i] !== value);
|
|
8627
|
-
}
|
|
8628
|
-
});
|
|
8629
|
-
|
|
8630
|
-
function setLayoutEffects(state, cb) {
|
|
8631
|
-
state[layoutEffectsSymbol].push(cb);
|
|
8632
|
-
}
|
|
8633
|
-
const useLayoutEffect = createEffect(setLayoutEffects);
|
|
8634
|
-
|
|
8635
|
-
const useState = hook(class extends Hook {
|
|
8636
|
-
constructor(id, state, initialValue) {
|
|
8637
|
-
super(id, state);
|
|
8638
|
-
this.updater = this.updater.bind(this);
|
|
8639
|
-
if (typeof initialValue === 'function') {
|
|
8640
|
-
initialValue = initialValue();
|
|
8641
|
-
}
|
|
8642
|
-
this.makeArgs(initialValue);
|
|
8643
|
-
}
|
|
8644
|
-
update() {
|
|
8645
|
-
return this.args;
|
|
8646
|
-
}
|
|
8647
|
-
updater(value) {
|
|
8648
|
-
if (typeof value === 'function') {
|
|
8649
|
-
const updaterFn = value;
|
|
8650
|
-
const [previousValue] = this.args;
|
|
8651
|
-
value = updaterFn(previousValue);
|
|
8652
|
-
}
|
|
8653
|
-
this.makeArgs(value);
|
|
8654
|
-
this.state.update();
|
|
8655
|
-
}
|
|
8656
|
-
makeArgs(value) {
|
|
8657
|
-
this.args = Object.freeze([value, this.updater]);
|
|
8658
|
-
}
|
|
8659
|
-
});
|
|
8660
|
-
|
|
8661
|
-
const useReducer = hook(class extends Hook {
|
|
8662
|
-
constructor(id, state, _, initialState, init) {
|
|
8663
|
-
super(id, state);
|
|
8664
|
-
this.dispatch = this.dispatch.bind(this);
|
|
8665
|
-
this.currentState = init !== undefined ? init(initialState) : initialState;
|
|
8666
|
-
}
|
|
8667
|
-
update(reducer) {
|
|
8668
|
-
this.reducer = reducer;
|
|
8669
|
-
return [this.currentState, this.dispatch];
|
|
8670
|
-
}
|
|
8671
|
-
dispatch(action) {
|
|
8672
|
-
this.currentState = this.reducer(this.currentState, action);
|
|
8673
|
-
this.state.update();
|
|
8674
|
-
}
|
|
8675
|
-
});
|
|
8676
|
-
|
|
8677
|
-
/**
|
|
8678
|
-
* Helpers.
|
|
8679
|
-
*/
|
|
8680
|
-
|
|
8681
|
-
var s$2 = 1000;
|
|
8682
|
-
var m$1 = s$2 * 60;
|
|
8683
|
-
var h$1 = m$1 * 60;
|
|
8684
|
-
var d$1 = h$1 * 24;
|
|
8685
|
-
var w = d$1 * 7;
|
|
8686
|
-
var y$1 = d$1 * 365.25;
|
|
8687
|
-
|
|
8688
|
-
/**
|
|
8689
|
-
* Parse or format the given `val`.
|
|
8690
|
-
*
|
|
8691
|
-
* Options:
|
|
8692
|
-
*
|
|
8693
|
-
* - `long` verbose formatting [false]
|
|
8694
|
-
*
|
|
8695
|
-
* @param {String|Number} val
|
|
8696
|
-
* @param {Object} [options]
|
|
8697
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
8698
|
-
* @return {String|Number}
|
|
8699
|
-
* @api public
|
|
8700
|
-
*/
|
|
8701
|
-
|
|
8702
|
-
var ms = function(val, options) {
|
|
8703
|
-
options = options || {};
|
|
8704
|
-
var type = typeof val;
|
|
8705
|
-
if (type === 'string' && val.length > 0) {
|
|
8706
|
-
return parse$1(val);
|
|
8707
|
-
} else if (type === 'number' && isFinite(val)) {
|
|
8708
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
8709
|
-
}
|
|
8710
|
-
throw new Error(
|
|
8711
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
8712
|
-
JSON.stringify(val)
|
|
8713
|
-
);
|
|
8714
|
-
};
|
|
8715
|
-
|
|
8716
|
-
/**
|
|
8717
|
-
* Parse the given `str` and return milliseconds.
|
|
8718
|
-
*
|
|
8719
|
-
* @param {String} str
|
|
8720
|
-
* @return {Number}
|
|
8721
|
-
* @api private
|
|
8722
|
-
*/
|
|
8723
|
-
|
|
8724
|
-
function parse$1(str) {
|
|
8725
|
-
str = String(str);
|
|
8726
|
-
if (str.length > 100) {
|
|
8727
|
-
return;
|
|
8728
|
-
}
|
|
8729
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
8730
|
-
str
|
|
8731
|
-
);
|
|
8732
|
-
if (!match) {
|
|
8733
|
-
return;
|
|
8734
|
-
}
|
|
8735
|
-
var n = parseFloat(match[1]);
|
|
8736
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
8737
|
-
switch (type) {
|
|
8738
|
-
case 'years':
|
|
8739
|
-
case 'year':
|
|
8740
|
-
case 'yrs':
|
|
8741
|
-
case 'yr':
|
|
8742
|
-
case 'y':
|
|
8743
|
-
return n * y$1;
|
|
8744
|
-
case 'weeks':
|
|
8745
|
-
case 'week':
|
|
8746
|
-
case 'w':
|
|
8747
|
-
return n * w;
|
|
8748
|
-
case 'days':
|
|
8749
|
-
case 'day':
|
|
8750
|
-
case 'd':
|
|
8751
|
-
return n * d$1;
|
|
8752
|
-
case 'hours':
|
|
8753
|
-
case 'hour':
|
|
8754
|
-
case 'hrs':
|
|
8755
|
-
case 'hr':
|
|
8756
|
-
case 'h':
|
|
8757
|
-
return n * h$1;
|
|
8758
|
-
case 'minutes':
|
|
8759
|
-
case 'minute':
|
|
8760
|
-
case 'mins':
|
|
8761
|
-
case 'min':
|
|
8762
|
-
case 'm':
|
|
8763
|
-
return n * m$1;
|
|
8764
|
-
case 'seconds':
|
|
8765
|
-
case 'second':
|
|
8766
|
-
case 'secs':
|
|
8767
|
-
case 'sec':
|
|
8768
|
-
case 's':
|
|
8769
|
-
return n * s$2;
|
|
8770
|
-
case 'milliseconds':
|
|
8771
|
-
case 'millisecond':
|
|
8772
|
-
case 'msecs':
|
|
8773
|
-
case 'msec':
|
|
8774
|
-
case 'ms':
|
|
8775
|
-
return n;
|
|
8776
|
-
default:
|
|
8777
|
-
return undefined;
|
|
8778
|
-
}
|
|
8779
|
-
}
|
|
8780
|
-
|
|
8781
|
-
/**
|
|
8782
|
-
* Short format for `ms`.
|
|
8783
|
-
*
|
|
8784
|
-
* @param {Number} ms
|
|
8785
|
-
* @return {String}
|
|
8786
|
-
* @api private
|
|
8787
|
-
*/
|
|
8788
|
-
|
|
8789
|
-
function fmtShort(ms) {
|
|
8790
|
-
var msAbs = Math.abs(ms);
|
|
8791
|
-
if (msAbs >= d$1) {
|
|
8792
|
-
return Math.round(ms / d$1) + 'd';
|
|
8793
|
-
}
|
|
8794
|
-
if (msAbs >= h$1) {
|
|
8795
|
-
return Math.round(ms / h$1) + 'h';
|
|
8796
|
-
}
|
|
8797
|
-
if (msAbs >= m$1) {
|
|
8798
|
-
return Math.round(ms / m$1) + 'm';
|
|
8799
|
-
}
|
|
8800
|
-
if (msAbs >= s$2) {
|
|
8801
|
-
return Math.round(ms / s$2) + 's';
|
|
8802
|
-
}
|
|
8803
|
-
return ms + 'ms';
|
|
8804
|
-
}
|
|
8805
|
-
|
|
8806
|
-
/**
|
|
8807
|
-
* Long format for `ms`.
|
|
8808
|
-
*
|
|
8809
|
-
* @param {Number} ms
|
|
8810
|
-
* @return {String}
|
|
8811
|
-
* @api private
|
|
8812
|
-
*/
|
|
8813
|
-
|
|
8814
|
-
function fmtLong(ms) {
|
|
8815
|
-
var msAbs = Math.abs(ms);
|
|
8816
|
-
if (msAbs >= d$1) {
|
|
8817
|
-
return plural(ms, msAbs, d$1, 'day');
|
|
8818
|
-
}
|
|
8819
|
-
if (msAbs >= h$1) {
|
|
8820
|
-
return plural(ms, msAbs, h$1, 'hour');
|
|
8821
|
-
}
|
|
8822
|
-
if (msAbs >= m$1) {
|
|
8823
|
-
return plural(ms, msAbs, m$1, 'minute');
|
|
8824
|
-
}
|
|
8825
|
-
if (msAbs >= s$2) {
|
|
8826
|
-
return plural(ms, msAbs, s$2, 'second');
|
|
8827
|
-
}
|
|
8828
|
-
return ms + ' ms';
|
|
8829
|
-
}
|
|
8830
|
-
|
|
8831
|
-
/**
|
|
8832
|
-
* Pluralization helper.
|
|
8833
|
-
*/
|
|
8834
|
-
|
|
8835
|
-
function plural(ms, msAbs, n, name) {
|
|
8836
|
-
var isPlural = msAbs >= n * 1.5;
|
|
8837
|
-
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
8838
|
-
}
|
|
8839
|
-
|
|
8840
|
-
/**
|
|
8841
|
-
* This is the common logic for both the Node.js and web browser
|
|
8842
|
-
* implementations of `debug()`.
|
|
8843
|
-
*/
|
|
8844
|
-
|
|
8845
|
-
function setup(env) {
|
|
8846
|
-
createDebug.debug = createDebug;
|
|
8847
|
-
createDebug.default = createDebug;
|
|
8848
|
-
createDebug.coerce = coerce;
|
|
8849
|
-
createDebug.disable = disable;
|
|
8850
|
-
createDebug.enable = enable;
|
|
8851
|
-
createDebug.enabled = enabled;
|
|
8852
|
-
createDebug.humanize = ms;
|
|
8853
|
-
createDebug.destroy = destroy;
|
|
8854
|
-
|
|
8855
|
-
Object.keys(env).forEach(key => {
|
|
8856
|
-
createDebug[key] = env[key];
|
|
8857
|
-
});
|
|
8858
|
-
|
|
8859
|
-
/**
|
|
8860
|
-
* The currently active debug mode names, and names to skip.
|
|
8861
|
-
*/
|
|
8862
|
-
|
|
8863
|
-
createDebug.names = [];
|
|
8864
|
-
createDebug.skips = [];
|
|
8865
|
-
|
|
8866
|
-
/**
|
|
8867
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
8868
|
-
*
|
|
8869
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
8870
|
-
*/
|
|
8871
|
-
createDebug.formatters = {};
|
|
8872
|
-
|
|
8873
|
-
/**
|
|
8874
|
-
* Selects a color for a debug namespace
|
|
8875
|
-
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
|
8876
|
-
* @return {Number|String} An ANSI color code for the given namespace
|
|
8877
|
-
* @api private
|
|
8878
|
-
*/
|
|
8879
|
-
function selectColor(namespace) {
|
|
8880
|
-
let hash = 0;
|
|
8881
|
-
|
|
8882
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
8883
|
-
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
8884
|
-
hash |= 0; // Convert to 32bit integer
|
|
8885
|
-
}
|
|
8886
|
-
|
|
8887
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
8888
|
-
}
|
|
8889
|
-
createDebug.selectColor = selectColor;
|
|
8890
|
-
|
|
8891
|
-
/**
|
|
8892
|
-
* Create a debugger with the given `namespace`.
|
|
8893
|
-
*
|
|
8894
|
-
* @param {String} namespace
|
|
8895
|
-
* @return {Function}
|
|
8896
|
-
* @api public
|
|
8897
|
-
*/
|
|
8898
|
-
function createDebug(namespace) {
|
|
8899
|
-
let prevTime;
|
|
8900
|
-
let enableOverride = null;
|
|
8901
|
-
|
|
8902
|
-
function debug(...args) {
|
|
8903
|
-
// Disabled?
|
|
8904
|
-
if (!debug.enabled) {
|
|
8905
|
-
return;
|
|
8906
|
-
}
|
|
8907
|
-
|
|
8908
|
-
const self = debug;
|
|
8909
|
-
|
|
8910
|
-
// Set `diff` timestamp
|
|
8911
|
-
const curr = Number(new Date());
|
|
8912
|
-
const ms = curr - (prevTime || curr);
|
|
8913
|
-
self.diff = ms;
|
|
8914
|
-
self.prev = prevTime;
|
|
8915
|
-
self.curr = curr;
|
|
8916
|
-
prevTime = curr;
|
|
8917
|
-
|
|
8918
|
-
args[0] = createDebug.coerce(args[0]);
|
|
8919
|
-
|
|
8920
|
-
if (typeof args[0] !== 'string') {
|
|
8921
|
-
// Anything else let's inspect with %O
|
|
8922
|
-
args.unshift('%O');
|
|
8923
|
-
}
|
|
8924
|
-
|
|
8925
|
-
// Apply any `formatters` transformations
|
|
8926
|
-
let index = 0;
|
|
8927
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
8928
|
-
// If we encounter an escaped % then don't increase the array index
|
|
8929
|
-
if (match === '%%') {
|
|
8930
|
-
return '%';
|
|
8931
|
-
}
|
|
8932
|
-
index++;
|
|
8933
|
-
const formatter = createDebug.formatters[format];
|
|
8934
|
-
if (typeof formatter === 'function') {
|
|
8935
|
-
const val = args[index];
|
|
8936
|
-
match = formatter.call(self, val);
|
|
8937
|
-
|
|
8938
|
-
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
8939
|
-
args.splice(index, 1);
|
|
8940
|
-
index--;
|
|
8941
|
-
}
|
|
8942
|
-
return match;
|
|
8943
|
-
});
|
|
8944
|
-
|
|
8945
|
-
// Apply env-specific formatting (colors, etc.)
|
|
8946
|
-
createDebug.formatArgs.call(self, args);
|
|
8947
|
-
|
|
8948
|
-
const logFn = self.log || createDebug.log;
|
|
8949
|
-
logFn.apply(self, args);
|
|
8950
|
-
}
|
|
8951
|
-
|
|
8952
|
-
debug.namespace = namespace;
|
|
8953
|
-
debug.useColors = createDebug.useColors();
|
|
8954
|
-
debug.color = createDebug.selectColor(namespace);
|
|
8955
|
-
debug.extend = extend;
|
|
8956
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
8957
|
-
|
|
8958
|
-
Object.defineProperty(debug, 'enabled', {
|
|
8959
|
-
enumerable: true,
|
|
8960
|
-
configurable: false,
|
|
8961
|
-
get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,
|
|
8962
|
-
set: v => {
|
|
8963
|
-
enableOverride = v;
|
|
8964
|
-
}
|
|
8965
|
-
});
|
|
8966
|
-
|
|
8967
|
-
// Env-specific initialization logic for debug instances
|
|
8968
|
-
if (typeof createDebug.init === 'function') {
|
|
8969
|
-
createDebug.init(debug);
|
|
8970
|
-
}
|
|
8971
|
-
|
|
8972
|
-
return debug;
|
|
8973
|
-
}
|
|
8974
|
-
|
|
8975
|
-
function extend(namespace, delimiter) {
|
|
8976
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
8977
|
-
newDebug.log = this.log;
|
|
8978
|
-
return newDebug;
|
|
8979
|
-
}
|
|
8980
|
-
|
|
8981
|
-
/**
|
|
8982
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
8983
|
-
* separated by a colon and wildcards.
|
|
8984
|
-
*
|
|
8985
|
-
* @param {String} namespaces
|
|
8986
|
-
* @api public
|
|
8987
|
-
*/
|
|
8988
|
-
function enable(namespaces) {
|
|
8989
|
-
createDebug.save(namespaces);
|
|
8990
|
-
|
|
8991
|
-
createDebug.names = [];
|
|
8992
|
-
createDebug.skips = [];
|
|
8993
|
-
|
|
8994
|
-
let i;
|
|
8995
|
-
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
8996
|
-
const len = split.length;
|
|
8997
|
-
|
|
8998
|
-
for (i = 0; i < len; i++) {
|
|
8999
|
-
if (!split[i]) {
|
|
9000
|
-
// ignore empty strings
|
|
9001
|
-
continue;
|
|
9002
|
-
}
|
|
9003
|
-
|
|
9004
|
-
namespaces = split[i].replace(/\*/g, '.*?');
|
|
9005
|
-
|
|
9006
|
-
if (namespaces[0] === '-') {
|
|
9007
|
-
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
9008
|
-
} else {
|
|
9009
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
9010
|
-
}
|
|
9011
|
-
}
|
|
9012
|
-
}
|
|
9013
|
-
|
|
9014
|
-
/**
|
|
9015
|
-
* Disable debug output.
|
|
9016
|
-
*
|
|
9017
|
-
* @return {String} namespaces
|
|
9018
|
-
* @api public
|
|
9019
|
-
*/
|
|
9020
|
-
function disable() {
|
|
9021
|
-
const namespaces = [
|
|
9022
|
-
...createDebug.names.map(toNamespace),
|
|
9023
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
9024
|
-
].join(',');
|
|
9025
|
-
createDebug.enable('');
|
|
9026
|
-
return namespaces;
|
|
9027
|
-
}
|
|
9028
|
-
|
|
9029
|
-
/**
|
|
9030
|
-
* Returns true if the given mode name is enabled, false otherwise.
|
|
9031
|
-
*
|
|
9032
|
-
* @param {String} name
|
|
9033
|
-
* @return {Boolean}
|
|
9034
|
-
* @api public
|
|
9035
|
-
*/
|
|
9036
|
-
function enabled(name) {
|
|
9037
|
-
if (name[name.length - 1] === '*') {
|
|
9038
|
-
return true;
|
|
9039
|
-
}
|
|
9040
|
-
|
|
9041
|
-
let i;
|
|
9042
|
-
let len;
|
|
9043
|
-
|
|
9044
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
9045
|
-
if (createDebug.skips[i].test(name)) {
|
|
9046
|
-
return false;
|
|
9047
|
-
}
|
|
9048
|
-
}
|
|
9049
|
-
|
|
9050
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
9051
|
-
if (createDebug.names[i].test(name)) {
|
|
9052
|
-
return true;
|
|
9053
|
-
}
|
|
9054
|
-
}
|
|
9055
|
-
|
|
9056
|
-
return false;
|
|
9057
|
-
}
|
|
9058
|
-
|
|
9059
|
-
/**
|
|
9060
|
-
* Convert regexp to namespace
|
|
9061
|
-
*
|
|
9062
|
-
* @param {RegExp} regxep
|
|
9063
|
-
* @return {String} namespace
|
|
9064
|
-
* @api private
|
|
9065
|
-
*/
|
|
9066
|
-
function toNamespace(regexp) {
|
|
9067
|
-
return regexp.toString()
|
|
9068
|
-
.substring(2, regexp.toString().length - 2)
|
|
9069
|
-
.replace(/\.\*\?$/, '*');
|
|
9070
|
-
}
|
|
9071
|
-
|
|
9072
|
-
/**
|
|
9073
|
-
* Coerce `val`.
|
|
9074
|
-
*
|
|
9075
|
-
* @param {Mixed} val
|
|
9076
|
-
* @return {Mixed}
|
|
9077
|
-
* @api private
|
|
9078
|
-
*/
|
|
9079
|
-
function coerce(val) {
|
|
9080
|
-
if (val instanceof Error) {
|
|
9081
|
-
return val.stack || val.message;
|
|
9082
|
-
}
|
|
9083
|
-
return val;
|
|
9084
|
-
}
|
|
9085
|
-
|
|
9086
|
-
/**
|
|
9087
|
-
* XXX DO NOT USE. This is a temporary stub function.
|
|
9088
|
-
* XXX It WILL be removed in the next major release.
|
|
9089
|
-
*/
|
|
9090
|
-
function destroy() {
|
|
9091
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
9092
|
-
}
|
|
9093
|
-
|
|
9094
|
-
createDebug.enable(createDebug.load());
|
|
9095
|
-
|
|
9096
|
-
return createDebug;
|
|
9097
|
-
}
|
|
9098
|
-
|
|
9099
|
-
var common = setup;
|
|
9100
|
-
|
|
9101
|
-
var browser$1 = createCommonjsModule(function (module, exports) {
|
|
9102
|
-
/* eslint-env browser */
|
|
9103
|
-
|
|
9104
|
-
/**
|
|
9105
|
-
* This is the web browser implementation of `debug()`.
|
|
9106
|
-
*/
|
|
9107
|
-
|
|
9108
|
-
exports.formatArgs = formatArgs;
|
|
9109
|
-
exports.save = save;
|
|
9110
|
-
exports.load = load;
|
|
9111
|
-
exports.useColors = useColors;
|
|
9112
|
-
exports.storage = localstorage();
|
|
9113
|
-
exports.destroy = (() => {
|
|
9114
|
-
let warned = false;
|
|
9115
|
-
|
|
9116
|
-
return () => {
|
|
9117
|
-
if (!warned) {
|
|
9118
|
-
warned = true;
|
|
9119
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
9120
|
-
}
|
|
9121
|
-
};
|
|
9122
|
-
})();
|
|
9123
|
-
|
|
9124
|
-
/**
|
|
9125
|
-
* Colors.
|
|
9126
|
-
*/
|
|
9127
|
-
|
|
9128
|
-
exports.colors = [
|
|
9129
|
-
'#0000CC',
|
|
9130
|
-
'#0000FF',
|
|
9131
|
-
'#0033CC',
|
|
9132
|
-
'#0033FF',
|
|
9133
|
-
'#0066CC',
|
|
9134
|
-
'#0066FF',
|
|
9135
|
-
'#0099CC',
|
|
9136
|
-
'#0099FF',
|
|
9137
|
-
'#00CC00',
|
|
9138
|
-
'#00CC33',
|
|
9139
|
-
'#00CC66',
|
|
9140
|
-
'#00CC99',
|
|
9141
|
-
'#00CCCC',
|
|
9142
|
-
'#00CCFF',
|
|
9143
|
-
'#3300CC',
|
|
9144
|
-
'#3300FF',
|
|
9145
|
-
'#3333CC',
|
|
9146
|
-
'#3333FF',
|
|
9147
|
-
'#3366CC',
|
|
9148
|
-
'#3366FF',
|
|
9149
|
-
'#3399CC',
|
|
9150
|
-
'#3399FF',
|
|
9151
|
-
'#33CC00',
|
|
9152
|
-
'#33CC33',
|
|
9153
|
-
'#33CC66',
|
|
9154
|
-
'#33CC99',
|
|
9155
|
-
'#33CCCC',
|
|
9156
|
-
'#33CCFF',
|
|
9157
|
-
'#6600CC',
|
|
9158
|
-
'#6600FF',
|
|
9159
|
-
'#6633CC',
|
|
9160
|
-
'#6633FF',
|
|
9161
|
-
'#66CC00',
|
|
9162
|
-
'#66CC33',
|
|
9163
|
-
'#9900CC',
|
|
9164
|
-
'#9900FF',
|
|
9165
|
-
'#9933CC',
|
|
9166
|
-
'#9933FF',
|
|
9167
|
-
'#99CC00',
|
|
9168
|
-
'#99CC33',
|
|
9169
|
-
'#CC0000',
|
|
9170
|
-
'#CC0033',
|
|
9171
|
-
'#CC0066',
|
|
9172
|
-
'#CC0099',
|
|
9173
|
-
'#CC00CC',
|
|
9174
|
-
'#CC00FF',
|
|
9175
|
-
'#CC3300',
|
|
9176
|
-
'#CC3333',
|
|
9177
|
-
'#CC3366',
|
|
9178
|
-
'#CC3399',
|
|
9179
|
-
'#CC33CC',
|
|
9180
|
-
'#CC33FF',
|
|
9181
|
-
'#CC6600',
|
|
9182
|
-
'#CC6633',
|
|
9183
|
-
'#CC9900',
|
|
9184
|
-
'#CC9933',
|
|
9185
|
-
'#CCCC00',
|
|
9186
|
-
'#CCCC33',
|
|
9187
|
-
'#FF0000',
|
|
9188
|
-
'#FF0033',
|
|
9189
|
-
'#FF0066',
|
|
9190
|
-
'#FF0099',
|
|
9191
|
-
'#FF00CC',
|
|
9192
|
-
'#FF00FF',
|
|
9193
|
-
'#FF3300',
|
|
9194
|
-
'#FF3333',
|
|
9195
|
-
'#FF3366',
|
|
9196
|
-
'#FF3399',
|
|
9197
|
-
'#FF33CC',
|
|
9198
|
-
'#FF33FF',
|
|
9199
|
-
'#FF6600',
|
|
9200
|
-
'#FF6633',
|
|
9201
|
-
'#FF9900',
|
|
9202
|
-
'#FF9933',
|
|
9203
|
-
'#FFCC00',
|
|
9204
|
-
'#FFCC33'
|
|
9205
|
-
];
|
|
9206
|
-
|
|
9207
|
-
/**
|
|
9208
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
9209
|
-
* and the Firebug extension (any Firefox version) are known
|
|
9210
|
-
* to support "%c" CSS customizations.
|
|
9211
|
-
*
|
|
9212
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
9213
|
-
*/
|
|
9214
|
-
|
|
9215
|
-
// eslint-disable-next-line complexity
|
|
9216
|
-
function useColors() {
|
|
9217
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
|
9218
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
9219
|
-
// explicitly
|
|
9220
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
9221
|
-
return true;
|
|
9222
|
-
}
|
|
9223
|
-
|
|
9224
|
-
// Internet Explorer and Edge do not support colors.
|
|
9225
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
9226
|
-
return false;
|
|
9227
|
-
}
|
|
9228
|
-
|
|
9229
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
9230
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
9231
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
9232
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
9233
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
9234
|
-
// Is firefox >= v31?
|
|
9235
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
9236
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
9237
|
-
// Double check webkit in userAgent just in case we are in a worker
|
|
9238
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
9239
|
-
}
|
|
9240
|
-
|
|
9241
|
-
/**
|
|
9242
|
-
* Colorize log arguments if enabled.
|
|
9243
|
-
*
|
|
9244
|
-
* @api public
|
|
9245
|
-
*/
|
|
9246
|
-
|
|
9247
|
-
function formatArgs(args) {
|
|
9248
|
-
args[0] = (this.useColors ? '%c' : '') +
|
|
9249
|
-
this.namespace +
|
|
9250
|
-
(this.useColors ? ' %c' : ' ') +
|
|
9251
|
-
args[0] +
|
|
9252
|
-
(this.useColors ? '%c ' : ' ') +
|
|
9253
|
-
'+' + module.exports.humanize(this.diff);
|
|
9254
|
-
|
|
9255
|
-
if (!this.useColors) {
|
|
9256
|
-
return;
|
|
9257
|
-
}
|
|
9258
|
-
|
|
9259
|
-
const c = 'color: ' + this.color;
|
|
9260
|
-
args.splice(1, 0, c, 'color: inherit');
|
|
9261
|
-
|
|
9262
|
-
// The final "%c" is somewhat tricky, because there could be other
|
|
9263
|
-
// arguments passed either before or after the %c, so we need to
|
|
9264
|
-
// figure out the correct index to insert the CSS into
|
|
9265
|
-
let index = 0;
|
|
9266
|
-
let lastC = 0;
|
|
9267
|
-
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
9268
|
-
if (match === '%%') {
|
|
9269
|
-
return;
|
|
9270
|
-
}
|
|
9271
|
-
index++;
|
|
9272
|
-
if (match === '%c') {
|
|
9273
|
-
// We only are interested in the *last* %c
|
|
9274
|
-
// (the user may have provided their own)
|
|
9275
|
-
lastC = index;
|
|
9276
|
-
}
|
|
9277
|
-
});
|
|
9278
|
-
|
|
9279
|
-
args.splice(lastC, 0, c);
|
|
9280
|
-
}
|
|
9281
|
-
|
|
9282
|
-
/**
|
|
9283
|
-
* Invokes `console.debug()` when available.
|
|
9284
|
-
* No-op when `console.debug` is not a "function".
|
|
9285
|
-
* If `console.debug` is not available, falls back
|
|
9286
|
-
* to `console.log`.
|
|
9287
|
-
*
|
|
9288
|
-
* @api public
|
|
9289
|
-
*/
|
|
9290
|
-
exports.log = console.debug || console.log || (() => {});
|
|
9291
|
-
|
|
9292
|
-
/**
|
|
9293
|
-
* Save `namespaces`.
|
|
9294
|
-
*
|
|
9295
|
-
* @param {String} namespaces
|
|
9296
|
-
* @api private
|
|
9297
|
-
*/
|
|
9298
|
-
function save(namespaces) {
|
|
9299
|
-
try {
|
|
9300
|
-
if (namespaces) {
|
|
9301
|
-
exports.storage.setItem('debug', namespaces);
|
|
9302
|
-
} else {
|
|
9303
|
-
exports.storage.removeItem('debug');
|
|
9304
|
-
}
|
|
9305
|
-
} catch (error) {
|
|
9306
|
-
// Swallow
|
|
9307
|
-
// XXX (@Qix-) should we be logging these?
|
|
9308
|
-
}
|
|
9309
|
-
}
|
|
9310
|
-
|
|
9311
|
-
/**
|
|
9312
|
-
* Load `namespaces`.
|
|
9313
|
-
*
|
|
9314
|
-
* @return {String} returns the previously persisted debug modes
|
|
9315
|
-
* @api private
|
|
9316
|
-
*/
|
|
9317
|
-
function load() {
|
|
9318
|
-
let r;
|
|
9319
|
-
try {
|
|
9320
|
-
r = exports.storage.getItem('debug');
|
|
9321
|
-
} catch (error) {
|
|
9322
|
-
// Swallow
|
|
9323
|
-
// XXX (@Qix-) should we be logging these?
|
|
9324
|
-
}
|
|
9325
|
-
|
|
9326
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
9327
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
9328
|
-
r = process.env.DEBUG;
|
|
9329
|
-
}
|
|
9330
|
-
|
|
9331
|
-
return r;
|
|
9332
|
-
}
|
|
9333
|
-
|
|
9334
|
-
/**
|
|
9335
|
-
* Localstorage attempts to return the localstorage.
|
|
9336
|
-
*
|
|
9337
|
-
* This is necessary because safari throws
|
|
9338
|
-
* when a user disables cookies/localstorage
|
|
9339
|
-
* and you attempt to access it.
|
|
9340
|
-
*
|
|
9341
|
-
* @return {LocalStorage}
|
|
9342
|
-
* @api private
|
|
9343
|
-
*/
|
|
9344
|
-
|
|
9345
|
-
function localstorage() {
|
|
9346
|
-
try {
|
|
9347
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
9348
|
-
// The Browser also has localStorage in the global context.
|
|
9349
|
-
return localStorage;
|
|
9350
|
-
} catch (error) {
|
|
9351
|
-
// Swallow
|
|
9352
|
-
// XXX (@Qix-) should we be logging these?
|
|
9353
|
-
}
|
|
9354
|
-
}
|
|
9355
|
-
|
|
9356
|
-
module.exports = common(exports);
|
|
9357
|
-
|
|
9358
|
-
const {formatters} = module.exports;
|
|
9359
|
-
|
|
9360
|
-
/**
|
|
9361
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
9362
|
-
*/
|
|
9363
|
-
|
|
9364
|
-
formatters.j = function (v) {
|
|
9365
|
-
try {
|
|
9366
|
-
return JSON.stringify(v);
|
|
9367
|
-
} catch (error) {
|
|
9368
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
9369
|
-
}
|
|
9370
|
-
};
|
|
9371
|
-
});
|
|
9372
|
-
|
|
9373
|
-
function s$3(){return getRenderingRef()}function l$1(){var e=s$3();return getElement(e)}function d$2(e,t){void 0===t&&(t={});var n=l$1();return h(n,e,t)}var p$1=browser$1("stencil-hook");
|
|
9374
|
-
|
|
9375
8201
|
var umd = createCommonjsModule(function (module, exports) {
|
|
9376
8202
|
(function (global, factory) {
|
|
9377
8203
|
factory(exports) ;
|
|
@@ -9931,6 +8757,6 @@ var umd = createCommonjsModule(function (module, exports) {
|
|
|
9931
8757
|
|
|
9932
8758
|
});
|
|
9933
8759
|
|
|
9934
|
-
var N={current:void 0};function _(){if(void 0===N.current)throw new Error("no implementation of useHost provided");return N.current()}function U(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");N.current=e;}function L(){lazilyStartLocaleContext();var t=_();return h(t,LOCALE_CONTEXT_NAME)}function H(){lazilyStartProgramContext();var e=_();return h(e,PROGRAM_CONTEXT_NAME)}function J(){var e;return null==(e=Q())?void 0:e.jwt}function Q(){lazilyStartUserContext();var e=_(),n=h(e,USER_CONTEXT_NAME),t=userIdentityFromJwt(null==n?void 0:n.jwt);if(isDemo()||!n||t)return n;setUserIdentity(void 0);}var z=getTenantAlias,G=getAppDomain,B=getEngagementMedium;function K(){return (K=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function Z(e,n){return (Z=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function X(e,n){return n||(n=e.slice(0)),e.raw=n,e}function Y(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ee(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return (t=e[Symbol.iterator]()).next.bind(t)}var ne=function(){return (ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)},te=new Map,re=new Map,ae=!0,oe=!1;function ie(e){return e.replace(/[\s,]+/g," ").trim()}function se(e){var n,t,r,a=ie(e);if(!te.has(a)){var o=parse(e,{experimentalFragmentVariables:oe});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");te.set(a,function(e){var n=new Set(e.definitions);n.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&n.add(r);});});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}((n=o,t=new Set,r=[],n.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,a=ie((i=e.loc).source.body.substring(i.start,i.end)),o=re.get(n);o&&!o.has(a)?ae&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||re.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),ne(ne({},n),{definitions:r}))));}return te.get(a)}function ue(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var r=e[0];return n.forEach(function(n,t){r+=n&&"Document"===n.kind?n.loc.source.body:n,r+=e[t+1];}),se(r)}var ce,de=ue;(ce=ue||(ue={})).gql=de,ce.resetCaches=function(){te.clear(),re.clear();},ce.disableFragmentWarnings=function(){ae=!1;},ce.enableExperimentalFragmentVariables=function(){oe=!0;},ce.disableExperimentalFragmentVariables=function(){oe=!1;},ue.default=ue;var le=ue;function fe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var me=function(e){var n,t;function r(n,t){var r;(r=e.call(this,n,t)||this).subject=new Subject;var a=new Subject;return r.subject.pipe(bufferTime(200,void 0,10)).subscribe(function(e){try{if(!e.length)return Promise.resolve();for(var n,t=he(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=ee(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(fe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){be(e,s);})},function(e){if(e instanceof types.ClientError){var n=function(){var n=e.response,t=n.data,r=n.errors;if(!t)return {v:Ie(s,e)};for(var a,o=Object.keys(t),i=[].concat(s),u=function(){var n=a.value,t=void 0;n.path.find(function(r,a,s){if(o.includes(r)){var u=pe(r),c=i.findIndex(function(e){return e.id===u});if(-1===c)return !1;o.splice(a,1),t=i.splice(c,1)[0];var d=ye(e.response.data,t);s[a]=ge(s[a],u);var l=t.query,f=t.variables,m=K({},e.response,{errors:[n],data:d,path:s}),v=new types.ClientError(m,{query:"string"!=typeof l?print(l):l,variables:f});return we(t,v),!0}return !1});},c=ee(r);!(a=c()).done;)u();be(t,i);}();if("object"==typeof n)return n.v}else Ie(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=fe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Ce(n,e);})},function(n){we(e,n);});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),r}t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,Z(n,t);var a=r.prototype;return a.superRequest=function(n,t){return e.prototype.request.call(this,n,t)},a.request=function(e,n,t){var r=this;return new Promise(function(a,o){var i={query:e,variables:n,id:ve(),options:t,resolve:a,reject:o};r.subject.next(i);})},r}(dist$1.GraphQLClient),ve=function(){return nanoid().replace(/[-_]/g,"")},ge=function(e,n){return e.replace("_"+n,"")},pe=function(e){var n=e.split("_");return n[n.length-1]},he=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id,s=r.options;if(null==s||!s.batch)return t.push(r),e;try{var u="string"==typeof a?parse(a):a,c=u.definitions.find(function(e){return "FragmentDefinition"===e.kind}),d="string"==typeof a?a:print(a),l=/@/.test(d);if(c||l)return t.push(r),e;var f=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(u,[o],f,f),n.push(r),e}catch(n){return t.push(r),e}},M("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},ye=function(e,n){if(!e)return e;var t=Object.keys(e),r=n.id;return t.reduce(function(n,t){var a;return t.endsWith(r)&&(n=K({},n,((a={})[ge(t,r)]=e[t],a))),n},{})},Ce=function(e,n){(0, n.resolve)(e);},be=function(e,n){for(var t,r=ee(n);!(t=r()).done;){var a=t.value,o=ye(e,a);a.resolve(o);}},we=function(e,n){(0, e.reject)(n);},Ie=function(e,n){for(var t,r=ee(e);!(t=r()).done;)(0, t.value.reject)(n);},Pe="sq:graphql-client",Ee=src(function(e,n,t){return new me(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Fe(e,n){switch(n.type){case"loading":return {data:void 0,errors:void 0,loading:!0};case"data":return {data:n.payload,errors:void 0,loading:!1};case"errors":return {data:void 0,errors:n.payload,loading:!1}}}function Me(e,n,t){void 0===t&&(t={batch:!0});var r,a,o,i,s,u,c=(r=J(),a=G(),o=z(),i=Ee(a,o,r),s=_(),null!=(u=h(s,"sq:graphql-client",{attempts:0}))?u:i),d=useReducer$1(Fe,n),l=d[1];return [d[0],useCallback(function(n,r){void 0===r&&(r=!1);try{if(!c){var a=new Error("No GraphQL client found");return l({type:"errors",payload:a}),Promise.resolve(a)}return Promise.resolve(function(a,o){try{var i=(r||l({type:"loading"}),Promise.resolve(c.request(e,n,t)).then(function(e){return l({type:"data",payload:e}),e}));}catch(e){return o(e)}return i&&i.then?i.then(void 0,o):i}(0,function(e){return l({type:"errors",payload:e}),e}))}catch(e){return Promise.reject(e)}},[c,e,l])]}var Se,De={loading:!1,data:void 0,errors:void 0};function $e(e){var n=Me(e,De);return [n[1],n[0]]}var Ae,ke=le(Se||(Se=X(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function qe(){var e=$e(ke),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.authenticateManagedIdentityWithEmailAndPassword){var n=e.authenticateManagedIdentityWithEmailAndPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.authenticateManagedIdentityWithEmailAndPassword.email,emailVerified:e.authenticateManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.authenticateManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var je,Re=le(Ae||(Ae=X(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function xe(){var e=$e(Re),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.registerManagedIdentityWithEmailAndPassword){var n=e.registerManagedIdentityWithEmailAndPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.registerManagedIdentityWithEmailAndPassword.email,emailVerified:e.registerManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.registerManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var Ve,Oe=le(je||(je=X(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function We(){var e=$e(Oe),n=e[0],t=e[1],r=t.loading,a=t.data,o=t.errors,i=useState$1(null),s=i[1];return [function(e){try{return s(null),Promise.resolve(n(e)).then(function(e){var n,t,r,a;if(e instanceof Error)return e;var o=null==(n=e.submitForm)||null==(t=n.results)?void 0:t.find(function(e){var n;return "identity"===(null==e||null==(n=e.formHandler)?void 0:n.namespace)});if(o&&null!=(r=o.result)&&null!=(a=r.results)&&a.length){var i=o.result.results[0];if(i.success){var c=i.data.token,d=o$1(c).user;setUserIdentity({jwt:c,id:d.id,accountId:d.accountId,managedIdentity:{email:i.data.email,emailVerified:i.data.emailVerified,sessionData:i.data.sessionData}});}else s(i.message);}return e})}catch(e){return Promise.reject(e)}},{loading:r,data:a,errors:o,formError:i[0]}]}var Ne,_e=le(Ve||(Ve=X(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Ue(){var e=$e(_e),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Le,He=le(Ne||(Ne=X(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Te(){var e=$e(He),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.resetManagedIdentityPassword){var n=e.resetManagedIdentityPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.resetManagedIdentityPassword.email,emailVerified:e.resetManagedIdentityPassword.emailVerified,sessionData:e.resetManagedIdentityPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var Je=le(Le||(Le=X(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Qe(){return $e(Je)}function ze(){var e=_();return {refresh:useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function Ge(e){var n=e.skip,t=void 0!==n&&n,r=e.update,a=e.variables;useEffect$1(function(){var e=function(e){!t&&r(a,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=useRef(e),t=useRef(0);return equal$1(e,n.current)||(n.current=e,t.current+=1),useMemo$1(function(){return n.current},[t.current])}([a,r,t]));}var Be,Ke={loading:!1,data:void 0,errors:void 0},Ze=Symbol();function Xe(e){var n=Me(e,Ke),t=n[0],r=n[1],a=useRef(Ze);Ge({skip:a.current===Ze,update:r,variables:a.current});var o=useCallback(function(e){return a.current=e,r(e)},[r]);return [r,K({},t,{refetch:o})]}var Ye,en=le(Be||(Be=X(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function nn(){var e=Q(),n=Xe(en),t=n[0],r=n[1],a=r.refetch,o=function(n){n instanceof Error||!n.managedIdentitySession||setUserIdentity(K({},e,{managedIdentity:n.managedIdentitySession}));};return [function(){try{return Promise.resolve(t({})).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}},{loading:r.loading,data:r.data,errors:r.errors,refetch:function(){try{return Promise.resolve(a()).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}}}]}var tn,rn=le(Ye||(Ye=X(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function an(){var e=nn()[0],n=$e(rn),t=n[0],r=n[1];return [function(n){try{return Promise.resolve(t(n)).then(function(n){var t=function(){if(!(n instanceof Error)&&n.verifyManagedIdentityEmail.success)return Promise.resolve(e()).then(function(){})}();return t&&t.then?t.then(function(){return n}):n})}catch(n){return Promise.reject(n)}},{loading:r.loading,data:r.data,errors:r.errors}]}var on,sn=le(tn||(tn=X(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function un(){return $e(sn)}var cn,dn=le(on||(on=X(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function ln(){return $e(dn)}var fn=le(cn||(cn=X(["\n mutation authenticateManagedIdentityWithInstantAccess(\n $email: String!\n $firstName: String\n $lastName: String\n $locale: RSLocale\n $countryCode: RSCountryCode\n $cookies: String\n ) {\n authenticateManagedIdentityWithInstantAccess(\n authenticateManagedIdentityWithInstantAccessInput: {\n email: $email\n firstName: $firstName\n lastName: $lastName\n locale: $locale\n countryCode: $countryCode\n cookies: $cookies\n }\n ) {\n email\n emailVerified\n sessionData\n token\n }\n }\n"])));function mn(){var e=H(),n=getEnvironment(),t=$e(fn),r=t[0],a=t[1];return [function(t){try{return Promise.resolve(r(t)).then(function(t){var r=function(){if(!(t instanceof Error)&&t.authenticateManagedIdentityWithInstantAccess)return Promise.resolve(function(e,n){try{return Promise.resolve(function(t,r){try{var a=Promise.resolve(fetch(getAppDomain()+"/api/v1/"+getTenantAlias()+"/graphql",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify({query:"\n query checkReferralFraudStatus($programId: ID) {\n viewer {\n ... on User {\n id\n instantAccessRewards(filter: { programId_eq: $programId }) {\n data {\n id\n pendingReasons\n cancelledReason\n }\n }\n }\n }\n }\n",variables:{programId:e}})})).then(function(e){if(!e.ok)throw new Error("Failed to fetch locale");return Promise.resolve(e.json()).then(function(e){var n;if(e.errors)throw new Error(JSON.stringify(e.errors,null,2));var t=(null==(n=e.data.viewer.instantAccessRewards)?void 0:n.data)||[];return t.some(function(e){return "SUSPECTED_FRAUD"===e.cancelledReason})?"DENIED":t.some(function(e){var n;return null==(n=e.pendingReasons)?void 0:n.includes("SUSPECTED_FRAUD")})?"PENDING_REVIEW":"APPROVED"})});}catch(e){return r(e)}return a&&a.then?a.then(void 0,r):a}(0,function(e){console.error(e);}))}catch(e){return Promise.reject(e)}}(e,t.authenticateManagedIdentityWithInstantAccess.token)).then(function(e){if("APPROVED"!==e)throw {name:"fraud_error",message:"Referral flagged as fraud."};var r=t.authenticateManagedIdentityWithInstantAccess.email;if(setUserIdentity({jwt:t.authenticateManagedIdentityWithInstantAccess.token,id:r,accountId:r}),"SquatchJS2"===n){var a=new CustomEvent("sq:user-registration",{bubbles:!0,detail:{userId:r,accountId:r}});document.dispatchEvent(a);}})}();return r&&r.then?r.then(function(e){return t}):t})}catch(e){return Promise.reject(e)}},{loading:a.loading,data:a.data,errors:a.errors}]}function vn(e,n){var t=useRef();return t.current&&equal$1(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function gn(){return useReducer$1(function(e){return e+1},0)}function pn(e){for(var n,t=ee(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&pn(r);}return Object.freeze(e)}var hn={loading:!0,data:void 0,errors:void 0};function yn(e,n,t,r){var a=Me(e,hn,K({batch:!0},r||{})),o=a[0],i=a[1],s=gn(),u=s[1];return vn(function(){!t&&i(n);},[e,n,i,s[0],t]),Ge({skip:t,update:i,variables:n}),pn(K({},o,{refetch:u}))}function Cn(e){var n=_(),t=y(n,Pn(e.namespace),e.initialValue),r=t[0],a=t[1];return y(n,En(e.namespace),[r,a]),[r,a]}function bn(e){var n=d$2(En(e)),t=d$2(Pn(e));return n?[t,n[1]]:[void 0,void 0]}function wn(e){var n=d$2(En(e));if(n)return n[1]}function In(e){return d$2(Pn(e))}function Pn(e){return e+"-value"}function En(e){return e+"-state"}function Fn(e){var n=_(),t=yn(e.query,e.variables||{},e.skip,K({batch:!0},e.options||{})),r=y(n,Pn(e.namespace),t),a=r[0],o=r[1];return useEffect$1(function(){umd.deepEqual(t,a)||o(t);},[t,a]),t}function Mn(e){return d$2(Pn(e))||{data:null,loading:!0,refetch:function(){return console.warn("component still loading")}}}function Sn(){var e=gn()[1];return useEffect$1(function(){return history_default.listen(function(){e();})},[]),history_default.location}var Dn,$n=history_default;function An(e){var n=useState$1({limit:e.limit,offset:e.offset}),t=n[0],r=n[1],a=t.offset,o=t.limit,i=function(e,n){return e*n},s=function(e,n){return Math.ceil(e/n)||0};return {limit:o,setLimit:function(e){var n=s(a,e),o=i(e,n);r(K({},t,{limit:e,offset:o}));},offset:a,setCurrentPage:function(e){var n=i(e,o);r(function(e){return K({},e,{offset:n})});},calculatePagination:function(e,n){var t=s(a,o),r=function(e,n){return Math.ceil(e/n)||0}(n,o),i=0===e?"0":e>1?a+1+"-"+(a+e):""+(a+1);return {currentPage:t,pageCount:r,rangeOnPage:i,pageProgress:i+" of "+n}}}}function kn(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=An(t),s=i.limit,u=i.setLimit,c=i.setCurrentPage,d=i.calculatePagination,l=yn(e,K({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),p=d((null==g||null==(o=g.data)?void 0:o.length)||0,(null==g?void 0:g.totalCount)||0);return {envelope:g,states:{errors:m,loading:f,limit:s,currentPage:p.currentPage,pageCount:p.pageCount,pageProgress:p.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:c}}}var xn=dist$1.gql(Dn||(Dn=X(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var On=1e3,Wn=60*On,Nn=60*Wn,_n=24*Nn,Un=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*_n;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Nn;case"minutes":case"minute":case"mins":case"min":case"m":return t*Wn;case"seconds":case"second":case"secs":case"sec":case"s":return t*On;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);return n>=_n?Ln(e,n,_n,"day"):n>=Nn?Ln(e,n,Nn,"hour"):n>=Wn?Ln(e,n,Wn,"minute"):n>=On?Ln(e,n,On,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=_n?Math.round(e/_n)+"d":n>=Nn?Math.round(e/Nn)+"h":n>=Wn?Math.round(e/Wn)+"m":n>=On?Math.round(e/On)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Ln(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var Hn,Tn,Jn,Qn,zn,Gn=(function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let r=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(a=r));}),n.splice(a,0,t);},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug");}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=function(e){function n(e){let r,a=null;function o(...e){if(!o.enabled)return;const t=o,a=Number(new Date);t.diff=a-(r||a),t.prev=r,t.curr=a,r=a,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return "%";i++;const o=n.formatters[a];return "function"==typeof o&&(r=o.call(t,e[i]),e.splice(i,1),i--),r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e);}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=t,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===a?n.enabled(e):a,set:e=>{a=e;}}),"function"==typeof n.init&&n.init(o),o}function t(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(t=0;t<a;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));},n.enabled=function(e){if("*"===e[e.length-1])return !0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return !1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return !0;return !1},n.humanize=Un,n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(t=>{n[t]=e[t];}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(Hn={exports:{}},Hn.exports),Hn.exports),Bn=Gn("sq:load-event"),Kn=dist$1.gql(Tn||(Tn=X(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var Xn=Gn("sq:useForm"),Yn=dist$1.gql(Jn||(Jn=X(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),et=dist$1.gql(Qn||(Qn=X(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),nt=dist$1.gql(zn||(zn=X(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));
|
|
8760
|
+
var N={current:void 0};function _(){if(void 0===N.current)throw new Error("no implementation of useHost provided");return N.current()}function U(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");N.current=e;}function L(){lazilyStartLocaleContext();var t=_();return h(t,LOCALE_CONTEXT_NAME)}function H(){lazilyStartProgramContext();var e=_();return h(e,PROGRAM_CONTEXT_NAME)}function J(){var e;return null==(e=Q())?void 0:e.jwt}function Q(){lazilyStartUserContext();var e=_(),n=h(e,USER_CONTEXT_NAME),t=userIdentityFromJwt(null==n?void 0:n.jwt);if(isDemo()||!n||t)return n;setUserIdentity(void 0);}var z=getTenantAlias,G=getAppDomain,B=getEngagementMedium;function K(){return (K=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function Z(e,n){return (Z=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function X(e,n){return n||(n=e.slice(0)),e.raw=n,e}function Y(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ee(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return (t=e[Symbol.iterator]()).next.bind(t)}var ne=function(){return (ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)},te=new Map,re=new Map,ae=!0,oe=!1;function ie(e){return e.replace(/[\s,]+/g," ").trim()}function se(e){var n,t,r,a=ie(e);if(!te.has(a)){var o=parse(e,{experimentalFragmentVariables:oe});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");te.set(a,function(e){var n=new Set(e.definitions);n.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&n.add(r);});});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}((n=o,t=new Set,r=[],n.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,a=ie((i=e.loc).source.body.substring(i.start,i.end)),o=re.get(n);o&&!o.has(a)?ae&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||re.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),ne(ne({},n),{definitions:r}))));}return te.get(a)}function ue(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var r=e[0];return n.forEach(function(n,t){r+=n&&"Document"===n.kind?n.loc.source.body:n,r+=e[t+1];}),se(r)}var ce,de=ue;(ce=ue||(ue={})).gql=de,ce.resetCaches=function(){te.clear(),re.clear();},ce.disableFragmentWarnings=function(){ae=!1;},ce.enableExperimentalFragmentVariables=function(){oe=!0;},ce.disableExperimentalFragmentVariables=function(){oe=!1;},ue.default=ue;var le=ue;function fe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var me=function(e){var n,t;function r(n,t){var r;(r=e.call(this,n,t)||this).subject=new Subject;var a=new Subject;return r.subject.pipe(bufferTime(200,void 0,10)).subscribe(function(e){try{if(!e.length)return Promise.resolve();for(var n,t=he(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=ee(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(fe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){be(e,s);})},function(e){if(e instanceof types.ClientError){var n=function(){var n=e.response,t=n.data,r=n.errors;if(!t)return {v:Ie(s,e)};for(var a,o=Object.keys(t),i=[].concat(s),u=function(){var n=a.value,t=void 0;n.path.find(function(r,a,s){if(o.includes(r)){var u=pe(r),c=i.findIndex(function(e){return e.id===u});if(-1===c)return !1;o.splice(a,1),t=i.splice(c,1)[0];var d=ye(e.response.data,t);s[a]=ge(s[a],u);var l=t.query,f=t.variables,m=K({},e.response,{errors:[n],data:d,path:s}),v=new types.ClientError(m,{query:"string"!=typeof l?print(l):l,variables:f});return we(t,v),!0}return !1});},c=ee(r);!(a=c()).done;)u();be(t,i);}();if("object"==typeof n)return n.v}else Ie(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=fe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Ce(n,e);})},function(n){we(e,n);});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),r}t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,Z(n,t);var a=r.prototype;return a.superRequest=function(n,t){return e.prototype.request.call(this,n,t)},a.request=function(e,n,t){var r=this;return new Promise(function(a,o){var i={query:e,variables:n,id:ve(),options:t,resolve:a,reject:o};r.subject.next(i);})},r}(dist$1.GraphQLClient),ve=function(){return nanoid().replace(/[-_]/g,"")},ge=function(e,n){return e.replace("_"+n,"")},pe=function(e){var n=e.split("_");return n[n.length-1]},he=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id,s=r.options;if(null==s||!s.batch)return t.push(r),e;try{var u="string"==typeof a?parse(a):a,c=u.definitions.find(function(e){return "FragmentDefinition"===e.kind}),d="string"==typeof a?a:print(a),l=/@/.test(d);if(c||l)return t.push(r),e;var f=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(u,[o],f,f),n.push(r),e}catch(n){return t.push(r),e}},M("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},ye=function(e,n){if(!e)return e;var t=Object.keys(e),r=n.id;return t.reduce(function(n,t){var a;return t.endsWith(r)&&(n=K({},n,((a={})[ge(t,r)]=e[t],a))),n},{})},Ce=function(e,n){(0, n.resolve)(e);},be=function(e,n){for(var t,r=ee(n);!(t=r()).done;){var a=t.value,o=ye(e,a);a.resolve(o);}},we=function(e,n){(0, e.reject)(n);},Ie=function(e,n){for(var t,r=ee(e);!(t=r()).done;)(0, t.value.reject)(n);},Pe="sq:graphql-client",Ee=src(function(e,n,t){return new me(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Fe(e,n){switch(n.type){case"loading":return {data:void 0,errors:void 0,loading:!0};case"data":return {data:n.payload,errors:void 0,loading:!1};case"errors":return {data:void 0,errors:n.payload,loading:!1}}}function Me(e,n,t){void 0===t&&(t={batch:!0});var r,a,o,i,s,u,c=(r=J(),a=G(),o=z(),i=Ee(a,o,r),s=_(),null!=(u=h(s,"sq:graphql-client",{attempts:0}))?u:i),d=useReducer(Fe,n),l=d[1];return [d[0],useCallback(function(n,r){void 0===r&&(r=!1);try{if(!c){var a=new Error("No GraphQL client found");return l({type:"errors",payload:a}),Promise.resolve(a)}return Promise.resolve(function(a,o){try{var i=(r||l({type:"loading"}),Promise.resolve(c.request(e,n,t)).then(function(e){return l({type:"data",payload:e}),e}));}catch(e){return o(e)}return i&&i.then?i.then(void 0,o):i}(0,function(e){return l({type:"errors",payload:e}),e}))}catch(e){return Promise.reject(e)}},[c,e,l])]}var Se,De={loading:!1,data:void 0,errors:void 0};function $e(e){var n=Me(e,De);return [n[1],n[0]]}var Ae,ke=le(Se||(Se=X(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function qe(){var e=$e(ke),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.authenticateManagedIdentityWithEmailAndPassword){var n=e.authenticateManagedIdentityWithEmailAndPassword.token,t=o(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.authenticateManagedIdentityWithEmailAndPassword.email,emailVerified:e.authenticateManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.authenticateManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var je,Re=le(Ae||(Ae=X(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function xe(){var e=$e(Re),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.registerManagedIdentityWithEmailAndPassword){var n=e.registerManagedIdentityWithEmailAndPassword.token,t=o(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.registerManagedIdentityWithEmailAndPassword.email,emailVerified:e.registerManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.registerManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var Ve,Oe=le(je||(je=X(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function We(){var e=$e(Oe),n=e[0],t=e[1],r=t.loading,a=t.data,o$1=t.errors,i=useState(null),s=i[1];return [function(e){try{return s(null),Promise.resolve(n(e)).then(function(e){var n,t,r,a;if(e instanceof Error)return e;var o$1=null==(n=e.submitForm)||null==(t=n.results)?void 0:t.find(function(e){var n;return "identity"===(null==e||null==(n=e.formHandler)?void 0:n.namespace)});if(o$1&&null!=(r=o$1.result)&&null!=(a=r.results)&&a.length){var i=o$1.result.results[0];if(i.success){var c=i.data.token,d=o(c).user;setUserIdentity({jwt:c,id:d.id,accountId:d.accountId,managedIdentity:{email:i.data.email,emailVerified:i.data.emailVerified,sessionData:i.data.sessionData}});}else s(i.message);}return e})}catch(e){return Promise.reject(e)}},{loading:r,data:a,errors:o$1,formError:i[0]}]}var Ne,_e=le(Ve||(Ve=X(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Ue(){var e=$e(_e),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Le,He=le(Ne||(Ne=X(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Te(){var e=$e(He),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.resetManagedIdentityPassword){var n=e.resetManagedIdentityPassword.token,t=o(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.resetManagedIdentityPassword.email,emailVerified:e.resetManagedIdentityPassword.emailVerified,sessionData:e.resetManagedIdentityPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var Je=le(Le||(Le=X(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Qe(){return $e(Je)}function ze(){var e=_();return {refresh:useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function Ge(e){var n=e.skip,t=void 0!==n&&n,r=e.update,a=e.variables;useEffect(function(){var e=function(e){!t&&r(a,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=useRef(e),t=useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),useMemo(function(){return n.current},[t.current])}([a,r,t]));}var Be,Ke={loading:!1,data:void 0,errors:void 0},Ze=Symbol();function Xe(e){var n=Me(e,Ke),t=n[0],r=n[1],a=useRef(Ze);Ge({skip:a.current===Ze,update:r,variables:a.current});var o=useCallback(function(e){return a.current=e,r(e)},[r]);return [r,K({},t,{refetch:o})]}var Ye,en=le(Be||(Be=X(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function nn(){var e=Q(),n=Xe(en),t=n[0],r=n[1],a=r.refetch,o=function(n){n instanceof Error||!n.managedIdentitySession||setUserIdentity(K({},e,{managedIdentity:n.managedIdentitySession}));};return [function(){try{return Promise.resolve(t({})).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}},{loading:r.loading,data:r.data,errors:r.errors,refetch:function(){try{return Promise.resolve(a()).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}}}]}var tn,rn=le(Ye||(Ye=X(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function an(){var e=nn()[0],n=$e(rn),t=n[0],r=n[1];return [function(n){try{return Promise.resolve(t(n)).then(function(n){var t=function(){if(!(n instanceof Error)&&n.verifyManagedIdentityEmail.success)return Promise.resolve(e()).then(function(){})}();return t&&t.then?t.then(function(){return n}):n})}catch(n){return Promise.reject(n)}},{loading:r.loading,data:r.data,errors:r.errors}]}var on,sn=le(tn||(tn=X(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function un(){return $e(sn)}var cn,dn=le(on||(on=X(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function ln(){return $e(dn)}var fn=le(cn||(cn=X(["\n mutation authenticateManagedIdentityWithInstantAccess(\n $email: String!\n $firstName: String\n $lastName: String\n $locale: RSLocale\n $countryCode: RSCountryCode\n $cookies: String\n ) {\n authenticateManagedIdentityWithInstantAccess(\n authenticateManagedIdentityWithInstantAccessInput: {\n email: $email\n firstName: $firstName\n lastName: $lastName\n locale: $locale\n countryCode: $countryCode\n cookies: $cookies\n }\n ) {\n email\n emailVerified\n sessionData\n token\n }\n }\n"])));function mn(){var e=H(),n=getEnvironment(),t=$e(fn),r=t[0],a=t[1];return [function(t){try{return Promise.resolve(r(t)).then(function(t){var r=function(){if(!(t instanceof Error)&&t.authenticateManagedIdentityWithInstantAccess)return Promise.resolve(function(e,n){try{return Promise.resolve(function(t,r){try{var a=Promise.resolve(fetch(getAppDomain()+"/api/v1/"+getTenantAlias()+"/graphql",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify({query:"\n query checkReferralFraudStatus($programId: ID) {\n viewer {\n ... on User {\n id\n instantAccessRewards(filter: { programId_eq: $programId }) {\n data {\n id\n pendingReasons\n cancelledReason\n }\n }\n }\n }\n }\n",variables:{programId:e}})})).then(function(e){if(!e.ok)throw new Error("Failed to fetch locale");return Promise.resolve(e.json()).then(function(e){var n;if(e.errors)throw new Error(JSON.stringify(e.errors,null,2));var t=(null==(n=e.data.viewer.instantAccessRewards)?void 0:n.data)||[];return t.some(function(e){return "SUSPECTED_FRAUD"===e.cancelledReason})?"DENIED":t.some(function(e){var n;return null==(n=e.pendingReasons)?void 0:n.includes("SUSPECTED_FRAUD")})?"PENDING_REVIEW":"APPROVED"})});}catch(e){return r(e)}return a&&a.then?a.then(void 0,r):a}(0,function(e){console.error(e);}))}catch(e){return Promise.reject(e)}}(e,t.authenticateManagedIdentityWithInstantAccess.token)).then(function(e){if("APPROVED"!==e)throw {name:"fraud_error",message:"Referral flagged as fraud."};var r=t.authenticateManagedIdentityWithInstantAccess.email;if(setUserIdentity({jwt:t.authenticateManagedIdentityWithInstantAccess.token,id:r,accountId:r}),"SquatchJS2"===n){var a=new CustomEvent("sq:user-registration",{bubbles:!0,detail:{userId:r,accountId:r}});document.dispatchEvent(a);}})}();return r&&r.then?r.then(function(e){return t}):t})}catch(e){return Promise.reject(e)}},{loading:a.loading,data:a.data,errors:a.errors}]}function vn(e,n){var t=useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function gn(){return useReducer(function(e){return e+1},0)}function pn(e){for(var n,t=ee(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&pn(r);}return Object.freeze(e)}var hn={loading:!0,data:void 0,errors:void 0};function yn(e,n,t,r){var a=Me(e,hn,K({batch:!0},r||{})),o=a[0],i=a[1],s=gn(),u=s[1];return vn(function(){!t&&i(n);},[e,n,i,s[0],t]),Ge({skip:t,update:i,variables:n}),pn(K({},o,{refetch:u}))}function Cn(e){var n=_(),t=y(n,Pn(e.namespace),e.initialValue),r=t[0],a=t[1];return y(n,En(e.namespace),[r,a]),[r,a]}function bn(e){var n=d(En(e)),t=d(Pn(e));return n?[t,n[1]]:[void 0,void 0]}function wn(e){var n=d(En(e));if(n)return n[1]}function In(e){return d(Pn(e))}function Pn(e){return e+"-value"}function En(e){return e+"-state"}function Fn(e){var n=_(),t=yn(e.query,e.variables||{},e.skip,K({batch:!0},e.options||{})),r=y(n,Pn(e.namespace),t),a=r[0],o=r[1];return useEffect(function(){umd.deepEqual(t,a)||o(t);},[t,a]),t}function Mn(e){return d(Pn(e))||{data:null,loading:!0,refetch:function(){return console.warn("component still loading")}}}function Sn(){var e=gn()[1];return useEffect(function(){return history_default.listen(function(){e();})},[]),history_default.location}var Dn,$n=history_default;function An(e){var n=useState({limit:e.limit,offset:e.offset}),t=n[0],r=n[1],a=t.offset,o=t.limit,i=function(e,n){return e*n},s=function(e,n){return Math.ceil(e/n)||0};return {limit:o,setLimit:function(e){var n=s(a,e),o=i(e,n);r(K({},t,{limit:e,offset:o}));},offset:a,setCurrentPage:function(e){var n=i(e,o);r(function(e){return K({},e,{offset:n})});},calculatePagination:function(e,n){var t=s(a,o),r=function(e,n){return Math.ceil(e/n)||0}(n,o),i=0===e?"0":e>1?a+1+"-"+(a+e):""+(a+1);return {currentPage:t,pageCount:r,rangeOnPage:i,pageProgress:i+" of "+n}}}}function kn(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=An(t),s=i.limit,u=i.setLimit,c=i.setCurrentPage,d=i.calculatePagination,l=yn(e,K({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),p=d((null==g||null==(o=g.data)?void 0:o.length)||0,(null==g?void 0:g.totalCount)||0);return {envelope:g,states:{errors:m,loading:f,limit:s,currentPage:p.currentPage,pageCount:p.pageCount,pageProgress:p.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:c}}}var xn=dist$1.gql(Dn||(Dn=X(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var On=1e3,Wn=60*On,Nn=60*Wn,_n=24*Nn,Un=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*_n;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Nn;case"minutes":case"minute":case"mins":case"min":case"m":return t*Wn;case"seconds":case"second":case"secs":case"sec":case"s":return t*On;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);return n>=_n?Ln(e,n,_n,"day"):n>=Nn?Ln(e,n,Nn,"hour"):n>=Wn?Ln(e,n,Wn,"minute"):n>=On?Ln(e,n,On,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=_n?Math.round(e/_n)+"d":n>=Nn?Math.round(e/Nn)+"h":n>=Wn?Math.round(e/Wn)+"m":n>=On?Math.round(e/On)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Ln(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var Hn,Tn,Jn,Qn,zn,Gn=(function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let r=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(a=r));}),n.splice(a,0,t);},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug");}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=function(e){function n(e){let r,a=null;function o(...e){if(!o.enabled)return;const t=o,a=Number(new Date);t.diff=a-(r||a),t.prev=r,t.curr=a,r=a,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return "%";i++;const o=n.formatters[a];return "function"==typeof o&&(r=o.call(t,e[i]),e.splice(i,1),i--),r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e);}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=t,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===a?n.enabled(e):a,set:e=>{a=e;}}),"function"==typeof n.init&&n.init(o),o}function t(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(t=0;t<a;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));},n.enabled=function(e){if("*"===e[e.length-1])return !0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return !1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return !0;return !1},n.humanize=Un,n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(t=>{n[t]=e[t];}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(Hn={exports:{}},Hn.exports),Hn.exports),Bn=Gn("sq:load-event"),Kn=dist$1.gql(Tn||(Tn=X(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var Xn=Gn("sq:useForm"),Yn=dist$1.gql(Jn||(Jn=X(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),et=dist$1.gql(Qn||(Qn=X(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),nt=dist$1.gql(zn||(zn=X(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));
|
|
9935
8761
|
|
|
9936
|
-
export { $n as $, B, Cn as C, Ee as E, Fn as F, H, In as I, J, L, Mn as M, Pe as P, Q, Sn as S, Te as T, U, We as W, Xe as X, _, getEnvironmentSDK as a,
|
|
8762
|
+
export { $n as $, B, Cn as C, Ee as E, Fn as F, H, In as I, J, L, Mn as M, Pe as P, Q, Sn as S, Te as T, U, We as W, Xe as X, _, getEnvironmentSDK as a, setUserIdentity as b, mn as c, dist$1 as d, un as e, $e as f, gn as g, Qe as h, isDemo as i, an as j, kn as k, ln as l, memoize$1 as m, nn as n, setProgramId as o, Ue as p, qe as q, ze as r, src as s, bn as t, useCallback as u, Pn as v, wn as w, xe as x, yn as y, z };
|