@unidy.io/sdk 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-DSKjcXX_.js +10 -0
- package/dist/cjs/app-globals-DSKjcXX_.js.map +1 -0
- package/dist/cjs/auth-B83pzi0f.js +582 -0
- package/dist/cjs/auth-B83pzi0f.js.map +1 -0
- package/dist/cjs/auth-store-DPHWWmXf.js +183 -0
- package/dist/cjs/auth-store-DPHWWmXf.js.map +1 -0
- package/dist/cjs/component-utils-BpMyeVQo.js +35 -0
- package/dist/cjs/component-utils-BpMyeVQo.js.map +1 -0
- package/dist/{sdk/flash-store-DXuduRA_.js → cjs/flash-store-BuIBuQDx.js} +8 -6
- package/dist/cjs/flash-store-BuIBuQDx.js.map +1 -0
- package/dist/cjs/helpers-BcPlKlBG.js +11 -0
- package/dist/cjs/helpers-BcPlKlBG.js.map +1 -0
- package/dist/cjs/helpers-DJyRa0Qo.js +11 -0
- package/dist/cjs/helpers-DJyRa0Qo.js.map +1 -0
- package/dist/{sdk/i18n-CacW7WuC.js → cjs/i18n-BoDZ8kd2.js} +18 -24
- package/dist/cjs/i18n-BoDZ8kd2.js.map +1 -0
- package/dist/cjs/index-B_N5xKgH.js +12025 -0
- package/dist/cjs/index-B_N5xKgH.js.map +1 -0
- package/dist/{sdk/index-O6h7SI7-.js → cjs/index-DLz3FT7T.js} +10 -8
- package/dist/cjs/index-DLz3FT7T.js.map +1 -0
- package/dist/cjs/index-R2MKLaem.js +5267 -0
- package/dist/cjs/index-R2MKLaem.js.map +1 -0
- package/dist/cjs/index.cjs.js +64 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +14 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-CLSTOCvO.js → cjs/newsletter-helpers-D-V_8kiN.js} +83 -70
- package/dist/cjs/newsletter-helpers-D-V_8kiN.js.map +1 -0
- package/dist/cjs/newsletter-store-BzytX7Qh.js +38 -0
- package/dist/cjs/newsletter-store-BzytX7Qh.js.map +1 -0
- package/dist/cjs/pagination-store-BEiW3MQd.js +16 -0
- package/dist/cjs/pagination-store-BEiW3MQd.js.map +1 -0
- package/dist/{sdk/profile-helpers-mfEp18Tq.js → cjs/profile-helpers-B2h2III_.js} +10 -7
- package/dist/cjs/profile-helpers-B2h2III_.js.map +1 -0
- package/dist/cjs/profile-store-P_BcYkef.js +22 -0
- package/dist/cjs/profile-store-P_BcYkef.js.map +1 -0
- package/dist/cjs/sdk.cjs.js +26 -0
- package/dist/cjs/sdk.cjs.js.map +1 -0
- package/dist/cjs/u-conditional-render.cjs.entry.js +103 -0
- package/dist/cjs/u-conditional-render.entry.cjs.js.map +1 -0
- package/dist/cjs/u-config.cjs.entry.js +87 -0
- package/dist/cjs/u-config.entry.cjs.js.map +1 -0
- package/dist/cjs/u-email-field.cjs.entry.js +77 -0
- package/dist/cjs/u-email-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-error-message.cjs.entry.js +82 -0
- package/dist/cjs/u-error-message.entry.cjs.js.map +1 -0
- package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-field_2.cjs.entry.js +375 -0
- package/dist/cjs/u-flash-message.cjs.entry.js +37 -0
- package/dist/cjs/u-flash-message.entry.cjs.js.map +1 -0
- package/dist/cjs/u-full-profile.cjs.entry.js +37 -0
- package/dist/cjs/u-full-profile.entry.cjs.js.map +1 -0
- package/dist/cjs/u-logout-button.cjs.entry.js +38 -0
- package/dist/cjs/u-logout-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-magic-code-field.cjs.entry.js +91 -0
- package/dist/cjs/u-magic-code-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-missing-field.cjs.entry.js +22 -0
- package/dist/cjs/u-missing-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +46 -0
- package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +63 -0
- package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +36 -0
- package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +106 -0
- package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +49 -0
- package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-root.cjs.entry.js +72 -0
- package/dist/cjs/u-newsletter-root.entry.cjs.js.map +1 -0
- package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +73 -0
- package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-pagination-button.cjs.entry.js +63 -0
- package/dist/cjs/u-pagination-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-pagination-page.cjs.entry.js +44 -0
- package/dist/cjs/u-pagination-page.entry.cjs.js.map +1 -0
- package/dist/cjs/u-passkey.cjs.entry.js +47 -0
- package/dist/cjs/u-passkey.entry.cjs.js.map +1 -0
- package/dist/cjs/u-password-field.cjs.entry.js +104 -0
- package/dist/cjs/u-password-field.entry.cjs.js.map +1 -0
- package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-profile_2.cjs.entry.js +327 -0
- package/dist/cjs/u-registration-button.cjs.entry.js +48 -0
- package/dist/cjs/u-registration-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-reset-password-button.cjs.entry.js +47 -0
- package/dist/cjs/u-reset-password-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-send-magic-code-button.cjs.entry.js +68 -0
- package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signed-in.cjs.entry.js +25 -0
- package/dist/cjs/u-signed-in.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signin-root.cjs.entry.js +43 -0
- package/dist/cjs/u-signin-root.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signin-step.cjs.entry.js +66 -0
- package/dist/cjs/u-signin-step.entry.cjs.js.map +1 -0
- package/dist/cjs/u-signin-strategy.cjs.entry.js +30 -0
- package/dist/cjs/u-signin-strategy.entry.cjs.js.map +1 -0
- package/dist/cjs/u-social-login-button.cjs.entry.js +100 -0
- package/dist/cjs/u-social-login-button.entry.cjs.js.map +1 -0
- package/dist/cjs/u-spinner.cjs.entry.js +18 -0
- package/dist/cjs/u-spinner.entry.cjs.js.map +1 -0
- package/dist/cjs/u-ticketable-list.cjs.entry.js +6087 -0
- package/dist/cjs/u-ticketable-list.entry.cjs.js.map +1 -0
- package/dist/{sdk/unidy-store-DPcuwuXf.js → cjs/unidy-store-7AbWnZ6g.js} +9 -6
- package/dist/cjs/unidy-store-7AbWnZ6g.js.map +1 -0
- package/dist/collection/api/client.js +144 -0
- package/dist/collection/api/client.js.map +1 -0
- package/dist/collection/api/index.js +42 -0
- package/dist/collection/api/index.js.map +1 -0
- package/dist/collection/api/shared.js +18 -0
- package/dist/collection/api/shared.js.map +1 -0
- package/dist/collection/auth/api/auth.js +264 -0
- package/dist/collection/auth/api/auth.js.map +1 -0
- package/dist/collection/auth/auth-helpers.js +297 -0
- package/dist/collection/auth/auth-helpers.js.map +1 -0
- package/dist/collection/auth/auth.js +124 -0
- package/dist/collection/auth/auth.js.map +1 -0
- package/dist/collection/auth/components/helpers.js +5 -0
- package/dist/collection/auth/components/helpers.js.map +1 -0
- package/dist/collection/auth/components/logout-button/logout-button.js +85 -0
- package/dist/collection/auth/components/logout-button/logout-button.js.map +1 -0
- package/dist/collection/auth/components/magic-code-field/magic-code-field.css +1 -0
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js +113 -0
- package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +1 -0
- package/dist/collection/auth/components/missing-field/missing-field.js +14 -0
- package/dist/collection/auth/components/missing-field/missing-field.js.map +1 -0
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +39 -0
- package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +1 -0
- package/dist/collection/auth/components/passkey/passkey.js +103 -0
- package/dist/collection/auth/components/passkey/passkey.js.map +1 -0
- package/dist/collection/auth/components/password-field/password-field.js +166 -0
- package/dist/collection/auth/components/password-field/password-field.js.map +1 -0
- package/dist/collection/auth/components/registration/registration-button.js +104 -0
- package/dist/collection/auth/components/registration/registration-button.js.map +1 -0
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +59 -0
- package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +1 -0
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +104 -0
- package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +1 -0
- package/dist/collection/auth/components/signed-in/signed-in.js +59 -0
- package/dist/collection/auth/components/signed-in/signed-in.js.map +1 -0
- package/dist/collection/auth/components/signin-root/signin-root.js +97 -0
- package/dist/collection/auth/components/signin-root/signin-root.js.map +1 -0
- package/dist/collection/auth/components/signin-step/signin-step.js +135 -0
- package/dist/collection/auth/components/signin-step/signin-step.js.map +1 -0
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js +64 -0
- package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/apple.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/apple.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/discord.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/discord.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/facebook.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/facebook.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/google.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/google.js.map +1 -0
- package/dist/collection/auth/components/social-logins/logos/linkedin.js +3 -0
- package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +1 -0
- package/dist/collection/auth/components/social-logins/social-login-button.css +1 -0
- package/dist/collection/auth/components/social-logins/social-login-button.js +188 -0
- package/dist/collection/auth/components/social-logins/social-login-button.js.map +1 -0
- package/dist/collection/auth/components/submit-button/auth-submit-button.js +62 -0
- package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +1 -0
- package/dist/{sdk/index-CYip1Wgu.js → collection/auth/error-definitions.js} +2 -19
- package/dist/collection/auth/error-definitions.js.map +1 -0
- package/dist/collection/auth/index.js +14 -0
- package/dist/collection/auth/index.js.map +1 -0
- package/dist/collection/auth/passkey-auth.js +106 -0
- package/dist/collection/auth/passkey-auth.js.map +1 -0
- package/dist/{sdk/auth-store-Mjo3PyJP.js → collection/auth/store/auth-store.js} +7 -12
- package/dist/collection/auth/store/auth-store.js.map +1 -0
- package/dist/collection/collection-manifest.json +46 -0
- package/dist/collection/globalScript.js +18 -0
- package/dist/collection/globalScript.js.map +1 -0
- package/dist/collection/i18n.js +31 -0
- package/dist/collection/i18n.js.map +1 -0
- package/dist/collection/index.js +16 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/locales/de.json +133 -0
- package/dist/collection/locales/en.json +133 -0
- package/dist/collection/locales/fr.json +133 -0
- package/dist/collection/locales/it.json +133 -0
- package/dist/collection/locales/nl_be.json +133 -0
- package/dist/collection/locales/ro.json +133 -0
- package/dist/collection/logger.js +106 -0
- package/dist/collection/logger.js.map +1 -0
- package/dist/collection/newsletter/api/newsletters.js +189 -0
- package/dist/collection/newsletter/api/newsletters.js.map +1 -0
- package/dist/collection/newsletter/components/helpers.js +5 -0
- package/dist/collection/newsletter/components/helpers.js.map +1 -0
- package/dist/collection/newsletter/components/logout-button/logout-button.js +48 -0
- package/dist/collection/newsletter/components/logout-button/logout-button.js.map +1 -0
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +109 -0
- package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +1 -0
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +119 -0
- package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +1 -0
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +178 -0
- package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +1 -0
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.css +1 -0
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +89 -0
- package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +1 -0
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +18 -0
- package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +1 -0
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.css +1 -0
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +154 -0
- package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +1 -0
- package/dist/collection/newsletter/index.js +11 -0
- package/dist/collection/newsletter/index.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-C3t2fsCe.js → collection/newsletter/newsletter-helpers.js} +25 -24
- package/dist/collection/newsletter/newsletter-helpers.js.map +1 -0
- package/dist/{sdk/newsletter-store-CvULKmsu.js → collection/newsletter/store/newsletter-store.js} +6 -11
- package/dist/collection/newsletter/store/newsletter-store.js.map +1 -0
- package/dist/collection/profile/api/profile.js +168 -0
- package/dist/collection/profile/api/profile.js.map +1 -0
- package/dist/collection/profile/components/field/field.css +1 -0
- package/dist/collection/profile/components/field/field.js +359 -0
- package/dist/collection/profile/components/field/field.js.map +1 -0
- package/dist/collection/profile/components/full-profile/full-profile.css +1 -0
- package/dist/collection/profile/components/full-profile/full-profile.js +78 -0
- package/dist/collection/profile/components/full-profile/full-profile.js.map +1 -0
- package/dist/collection/profile/components/profile/profile.js +250 -0
- package/dist/collection/profile/components/profile/profile.js.map +1 -0
- package/dist/collection/profile/components/raw-field/raw-field.js +697 -0
- package/dist/collection/profile/components/raw-field/raw-field.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/Input.js +3 -0
- package/dist/collection/profile/components/raw-input-fields/Input.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +8 -0
- package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +8 -0
- package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/Select.js +11 -0
- package/dist/collection/profile/components/raw-input-fields/Select.js.map +1 -0
- package/dist/collection/profile/components/raw-input-fields/Textarea.js +3 -0
- package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +1 -0
- package/dist/collection/profile/components/submit-button/profile-submit-button.js +17 -0
- package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +1 -0
- package/dist/collection/profile/index.js +13 -0
- package/dist/collection/profile/index.js.map +1 -0
- package/dist/collection/profile/profile-helpers.js +31 -0
- package/dist/collection/profile/profile-helpers.js.map +1 -0
- package/dist/collection/profile/store/profile-store.js +15 -0
- package/dist/collection/profile/store/profile-store.js.map +1 -0
- package/dist/collection/sdk.css +39 -0
- package/dist/collection/shared/component-utils.js +28 -0
- package/dist/collection/shared/component-utils.js.map +1 -0
- package/dist/collection/shared/components/conditional-render/conditional-render.js +178 -0
- package/dist/collection/shared/components/conditional-render/conditional-render.js.map +1 -0
- package/dist/collection/shared/components/config/config.js +260 -0
- package/dist/collection/shared/components/config/config.js.map +1 -0
- package/dist/collection/shared/components/email-field/email-field.css +1 -0
- package/dist/collection/shared/components/email-field/email-field.js +145 -0
- package/dist/collection/shared/components/email-field/email-field.js.map +1 -0
- package/dist/collection/shared/components/error-message/error-message.js +141 -0
- package/dist/collection/shared/components/error-message/error-message.js.map +1 -0
- package/dist/collection/shared/components/flash-message/close-icon.js +3 -0
- package/dist/collection/shared/components/flash-message/close-icon.js.map +1 -0
- package/dist/collection/shared/components/flash-message/flash-message.css +1 -0
- package/dist/collection/shared/components/flash-message/flash-message.js +79 -0
- package/dist/collection/shared/components/flash-message/flash-message.js.map +1 -0
- package/dist/collection/shared/components/spinner/spinner.css +1 -0
- package/dist/collection/shared/components/spinner/spinner.js +19 -0
- package/dist/collection/shared/components/spinner/spinner.js.map +1 -0
- package/dist/collection/shared/components/submit-button/context.js +10 -0
- package/dist/collection/shared/components/submit-button/context.js.map +1 -0
- package/dist/collection/shared/components/submit-button/submit-button.css +1 -0
- package/dist/collection/shared/components/submit-button/submit-button.js +196 -0
- package/dist/collection/shared/components/submit-button/submit-button.js.map +1 -0
- package/dist/collection/shared/store/flash-store.js +43 -0
- package/dist/collection/shared/store/flash-store.js.map +1 -0
- package/dist/collection/shared/store/unidy-store.js +33 -0
- package/dist/collection/shared/store/unidy-store.js.map +1 -0
- package/dist/collection/ticketable/api/get-with-schema.js +35 -0
- package/dist/collection/ticketable/api/get-with-schema.js.map +1 -0
- package/dist/collection/ticketable/api/schemas.js +12 -0
- package/dist/collection/ticketable/api/schemas.js.map +1 -0
- package/dist/collection/ticketable/api/subscriptions.js +47 -0
- package/dist/collection/ticketable/api/subscriptions.js.map +1 -0
- package/dist/collection/ticketable/api/tickets.js +48 -0
- package/dist/collection/ticketable/api/tickets.js.map +1 -0
- package/dist/collection/ticketable/components/pagination/pagination-button.js +108 -0
- package/dist/collection/ticketable/components/pagination/pagination-button.js.map +1 -0
- package/dist/collection/ticketable/components/pagination/pagination-page.js +69 -0
- package/dist/collection/ticketable/components/pagination/pagination-page.js.map +1 -0
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +54 -0
- package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +1 -0
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +498 -0
- package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +1 -0
- package/dist/collection/ticketable/index.js +13 -0
- package/dist/collection/ticketable/index.js.map +1 -0
- package/dist/collection/ticketable/store/pagination-store.js +9 -0
- package/dist/collection/ticketable/store/pagination-store.js.map +1 -0
- package/dist/{sdk/auth-store-BzXDlgNb.js → components/auth-store.js} +5 -6
- package/dist/components/auth-store.js.map +1 -0
- package/dist/{sdk/auth-Che07PeV.js → components/auth.js} +134 -124
- package/dist/components/auth.js.map +1 -0
- package/dist/components/component-utils.js +32 -0
- package/dist/components/component-utils.js.map +1 -0
- package/dist/components/exports.js +4106 -0
- package/dist/components/exports.js.map +1 -0
- package/dist/{sdk/u-field.entry.js → components/field.js} +57 -14
- package/dist/components/field.js.map +1 -0
- package/dist/{sdk/flash-store-Cgu7WoSN.js → components/flash-store.js} +3 -4
- package/dist/components/flash-store.js.map +1 -0
- package/dist/components/helpers.js +9 -0
- package/dist/components/helpers.js.map +1 -0
- package/dist/components/helpers2.js +9 -0
- package/dist/components/helpers2.js.map +1 -0
- package/dist/{sdk/i18n-CRBOSzNq.js → components/i18n.js} +11 -19
- package/dist/components/i18n.js.map +1 -0
- package/dist/components/index.js +5902 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +5256 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/{sdk/index-XIuHpSzj.js → components/index3.js} +3 -3
- package/dist/components/index3.js.map +1 -0
- package/dist/components/logger.js +111 -0
- package/dist/components/logger.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-CnufIbIZ.js → components/newsletter-helpers.js} +14 -12
- package/dist/components/newsletter-helpers.js.map +1 -0
- package/dist/{sdk/newsletter-store-CPY2gFnU.js → components/newsletter-store.js} +3 -8
- package/dist/components/newsletter-store.js.map +1 -0
- package/dist/components/pagination-store.js +14 -0
- package/dist/components/pagination-store.js.map +1 -0
- package/dist/{sdk/profile-helpers-Bdz6gmG8.js → components/profile-helpers.js} +4 -4
- package/dist/components/profile-helpers.js.map +1 -0
- package/dist/{sdk/profile-store-Dr1DP9Te.js → components/profile-store.js} +3 -3
- package/dist/components/profile-store.js.map +1 -0
- package/dist/{sdk/u-profile.entry.js → components/profile.js} +51 -18
- package/dist/components/profile.js.map +1 -0
- package/dist/{sdk/u-raw-field.entry.js → components/raw-field.js} +51 -10
- package/dist/components/raw-field.js.map +1 -0
- package/dist/components/spinner.js +35 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/submit-button.js +231 -0
- package/dist/components/submit-button.js.map +1 -0
- package/dist/components/u-conditional-render.js +121 -0
- package/dist/components/u-conditional-render.js.map +1 -0
- package/dist/components/u-config.js +113 -0
- package/dist/components/u-config.js.map +1 -0
- package/dist/components/u-email-field.js +99 -0
- package/dist/components/u-email-field.js.map +1 -0
- package/dist/components/u-error-message.js +105 -0
- package/dist/components/u-error-message.js.map +1 -0
- package/dist/components/u-field.js +9 -0
- package/dist/components/u-field.js.map +1 -0
- package/dist/components/u-flash-message.js +58 -0
- package/dist/components/u-flash-message.js.map +1 -0
- package/dist/components/u-full-profile.js +87 -0
- package/dist/components/u-full-profile.js.map +1 -0
- package/dist/components/u-logout-button.js +53 -0
- package/dist/components/u-logout-button.js.map +1 -0
- package/dist/components/u-magic-code-field.js +106 -0
- package/dist/components/u-magic-code-field.js.map +1 -0
- package/dist/components/u-missing-field.js +57 -0
- package/dist/components/u-missing-field.js.map +1 -0
- package/dist/components/u-missing-fields-submit-button.js +70 -0
- package/dist/components/u-missing-fields-submit-button.js.map +1 -0
- package/dist/components/u-newsletter-checkbox.js +77 -0
- package/dist/components/u-newsletter-checkbox.js.map +1 -0
- package/dist/components/u-newsletter-logout-button.js +51 -0
- package/dist/components/u-newsletter-logout-button.js.map +1 -0
- package/dist/components/u-newsletter-preference-checkbox.js +124 -0
- package/dist/components/u-newsletter-preference-checkbox.js.map +1 -0
- package/dist/components/u-newsletter-resend-doi-button.js +70 -0
- package/dist/components/u-newsletter-resend-doi-button.js.map +1 -0
- package/dist/components/u-newsletter-root.js +90 -0
- package/dist/components/u-newsletter-root.js.map +1 -0
- package/dist/components/u-newsletter-toggle-subscription-button.js +97 -0
- package/dist/components/u-newsletter-toggle-subscription-button.js.map +1 -0
- package/dist/components/u-pagination-button.js +86 -0
- package/dist/components/u-pagination-button.js.map +1 -0
- package/dist/components/u-pagination-page.js +66 -0
- package/dist/components/u-pagination-page.js.map +1 -0
- package/dist/components/u-passkey.js +65 -0
- package/dist/components/u-passkey.js.map +1 -0
- package/dist/components/u-password-field.js +125 -0
- package/dist/components/u-password-field.js.map +1 -0
- package/dist/components/u-profile.js +9 -0
- package/dist/components/u-profile.js.map +1 -0
- package/dist/components/u-raw-field.js +9 -0
- package/dist/components/u-raw-field.js.map +1 -0
- package/dist/components/u-registration-button.js +70 -0
- package/dist/components/u-registration-button.js.map +1 -0
- package/dist/components/u-reset-password-button.js +63 -0
- package/dist/components/u-reset-password-button.js.map +1 -0
- package/dist/components/u-send-magic-code-button.js +85 -0
- package/dist/components/u-send-magic-code-button.js.map +1 -0
- package/dist/components/u-signed-in.js +44 -0
- package/dist/components/u-signed-in.js.map +1 -0
- package/dist/components/u-signin-root.js +63 -0
- package/dist/components/u-signin-root.js.map +1 -0
- package/dist/components/u-signin-step.js +84 -0
- package/dist/components/u-signin-step.js.map +1 -0
- package/dist/components/u-signin-strategy.js +50 -0
- package/dist/components/u-signin-strategy.js.map +1 -0
- package/dist/components/u-social-login-button.js +125 -0
- package/dist/components/u-social-login-button.js.map +1 -0
- package/dist/components/u-spinner.js +9 -0
- package/dist/components/u-spinner.js.map +1 -0
- package/dist/components/u-submit-button.js +9 -0
- package/dist/components/u-submit-button.js.map +1 -0
- package/dist/components/u-ticketable-list.js +6122 -0
- package/dist/components/u-ticketable-list.js.map +1 -0
- package/dist/{sdk/unidy-store-BwZym11Y.js → components/unidy-store.js} +3 -4
- package/dist/components/unidy-store.js.map +1 -0
- package/dist/esm/app-globals-CPU9ZcqZ.js +8 -0
- package/dist/esm/app-globals-CPU9ZcqZ.js.map +1 -0
- package/dist/{sdk/auth-B95hXtvh.js → esm/auth-B0RIcDM-.js} +132 -123
- package/dist/esm/auth-B0RIcDM-.js.map +1 -0
- package/dist/{sdk/auth-store-CapiC8gJ.js → esm/auth-store-BGMYm_jK.js} +5 -6
- package/dist/esm/auth-store-BGMYm_jK.js.map +1 -0
- package/dist/esm/component-utils-D1lzXl_Z.js.map +1 -0
- package/dist/{sdk/flash-store-DNcSEn2p.js → esm/flash-store-CEvWSG0c.js} +3 -4
- package/dist/{sdk/flash-store-DXuduRA_.js.map → esm/flash-store-CEvWSG0c.js.map} +1 -1
- package/dist/esm/helpers-BqFCd65h.js.map +1 -0
- package/dist/esm/helpers-DUHc_Cx7.js.map +1 -0
- package/dist/{sdk/i18n-BCI_ARJL.js → esm/i18n-CLdWzy5J.js} +10 -19
- package/dist/esm/i18n-CLdWzy5J.js.map +1 -0
- package/dist/{sdk/index-BnBstyfp.js → esm/index-Bjp1XO-f.js} +3 -3
- package/dist/{sdk/index-XIuHpSzj.js.map → esm/index-Bjp1XO-f.js.map} +1 -1
- package/dist/esm/index-Ci3aTmzp.js +12007 -0
- package/dist/esm/index-Ci3aTmzp.js.map +1 -0
- package/dist/esm/index-DSDkaHWI.js +5254 -0
- package/dist/esm/index-DSDkaHWI.js.map +1 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +12 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/{sdk/newsletter-helpers-DEXEBD0F.js → esm/newsletter-helpers-CONtbKYi.js} +14 -12
- package/dist/esm/newsletter-helpers-CONtbKYi.js.map +1 -0
- package/dist/{sdk/newsletter-store-CqD-GcDC.js → esm/newsletter-store-DBL1A203.js} +3 -8
- package/dist/{sdk/newsletter-store-CPY2gFnU.js.map → esm/newsletter-store-DBL1A203.js.map} +1 -1
- package/dist/esm/pagination-store-DzdJOp-n.js +14 -0
- package/dist/esm/pagination-store-DzdJOp-n.js.map +1 -0
- package/dist/{sdk/profile-helpers-Bs3aj0CO.js → esm/profile-helpers-CglNd6Nw.js} +4 -4
- package/dist/{sdk/profile-helpers-Bdz6gmG8.js.map → esm/profile-helpers-CglNd6Nw.js.map} +1 -1
- package/dist/{sdk/profile-store-BZKApsQm.js → esm/profile-store-RmZB2PTc.js} +3 -3
- package/dist/{sdk/profile-store-Dr1DP9Te.js.map → esm/profile-store-RmZB2PTc.js.map} +1 -1
- package/dist/esm/sdk.js +22 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/{sdk → esm}/u-conditional-render.entry.js +12 -12
- package/dist/esm/u-conditional-render.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-config.entry.js +15 -16
- package/dist/esm/u-config.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-email-field.entry.js +7 -7
- package/dist/esm/u-email-field.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-error-message.entry.js +7 -7
- package/dist/esm/u-error-message.entry.js.map +1 -0
- package/dist/esm/u-field.u-raw-field.entry.js.map +1 -0
- package/dist/esm/u-field_2.entry.js +372 -0
- package/dist/{sdk → esm}/u-flash-message.entry.js +4 -4
- package/dist/esm/u-flash-message.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-full-profile.entry.js +7 -7
- package/dist/esm/u-full-profile.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-logout-button.entry.js +12 -12
- package/dist/esm/u-logout-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-magic-code-field.entry.js +10 -10
- package/dist/esm/u-magic-code-field.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-missing-field.entry.js +5 -5
- package/dist/esm/u-missing-field.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-missing-fields-submit-button.entry.js +9 -9
- package/dist/esm/u-missing-fields-submit-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-checkbox.entry.js +13 -13
- package/dist/esm/u-newsletter-checkbox.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-logout-button.entry.js +12 -12
- package/dist/esm/u-newsletter-logout-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-preference-checkbox.entry.js +13 -13
- package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-resend-doi-button.entry.js +12 -12
- package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-root.entry.js +13 -13
- package/dist/esm/u-newsletter-root.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-newsletter-toggle-subscription-button.entry.js +13 -13
- package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-pagination-button.entry.js +2 -2
- package/dist/esm/u-pagination-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-pagination-page.entry.js +2 -2
- package/dist/esm/u-pagination-page.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-passkey.entry.js +10 -10
- package/dist/esm/u-passkey.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-password-field.entry.js +6 -6
- package/dist/esm/u-password-field.entry.js.map +1 -0
- package/dist/esm/u-profile.u-submit-button.entry.js.map +1 -0
- package/dist/esm/u-profile_2.entry.js +324 -0
- package/dist/{sdk → esm}/u-registration-button.entry.js +6 -6
- package/dist/esm/u-registration-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-reset-password-button.entry.js +10 -10
- package/dist/esm/u-reset-password-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-send-magic-code-button.entry.js +10 -10
- package/dist/esm/u-send-magic-code-button.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signed-in.entry.js +5 -5
- package/dist/esm/u-signed-in.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signin-root.entry.js +7 -7
- package/dist/esm/u-signin-root.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signin-step.entry.js +10 -11
- package/dist/esm/u-signin-step.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-signin-strategy.entry.js +5 -5
- package/dist/esm/u-signin-strategy.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-social-login-button.entry.js +7 -7
- package/dist/esm/u-social-login-button.entry.js.map +1 -0
- package/dist/esm/u-spinner.entry.js +16 -0
- package/dist/esm/u-spinner.entry.js.map +1 -0
- package/dist/{sdk → esm}/u-ticketable-list.entry.js +84 -143
- package/dist/esm/u-ticketable-list.entry.js.map +1 -0
- package/dist/{sdk/unidy-store-CtifvCkV.js → esm/unidy-store-BldTAtO0.js} +3 -4
- package/dist/{sdk/unidy-store-DPcuwuXf.js.map → esm/unidy-store-BldTAtO0.js.map} +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/sdk/auth-BopPjv7G.js.map +1 -0
- package/dist/sdk/auth-C0vldOq6.js.map +1 -0
- package/dist/sdk/auth-store-DQaam_Qh.js.map +1 -0
- package/dist/sdk/auth-store-sOmplc4z.js.map +1 -0
- package/dist/sdk/{i18n-CRBOSzNq.js.map → i18n-B6rRU-m3.js.map} +1 -1
- package/dist/sdk/{i18n-BCI_ARJL.js.map → i18n-CZii1E-s.js.map} +1 -1
- package/dist/sdk/{index-CKre5JEG.js.map → index-B1aDcaWd.js.map} +1 -1
- package/dist/sdk/index-Df-7P3r0.js.map +1 -0
- package/dist/sdk/{index-CYip1Wgu.js.map → index-Eu7hg2ii.js.map} +1 -1
- package/dist/sdk/{index-CoYUNBeF.js.map → index-Iulyfmzq.js.map} +1 -1
- package/dist/sdk/index.esm.js +2 -22
- package/dist/sdk/index.esm.js.map +1 -1
- package/dist/sdk/loader.esm.js.map +1 -1
- package/dist/sdk/locales/de.json +1 -0
- package/dist/sdk/locales/en.json +1 -0
- package/dist/sdk/locales/fr.json +1 -0
- package/dist/sdk/locales/it.json +1 -0
- package/dist/sdk/locales/nl_be.json +1 -0
- package/dist/sdk/locales/ro.json +1 -0
- package/dist/sdk/newsletter-helpers-8ByV38YW.js.map +1 -0
- package/dist/sdk/newsletter-helpers-B-Md6T9k.js.map +1 -0
- package/dist/sdk/p-08ff2de2.entry.js +2 -0
- package/dist/sdk/p-08ff2de2.entry.js.map +1 -0
- package/dist/sdk/p-1ea49938.entry.js +2 -0
- package/dist/sdk/p-1ea49938.entry.js.map +1 -0
- package/dist/sdk/p-2a65bcbb.entry.js +2 -0
- package/dist/sdk/p-2a65bcbb.entry.js.map +1 -0
- package/dist/sdk/p-2af8b45f.entry.js +2 -0
- package/dist/sdk/p-2af8b45f.entry.js.map +1 -0
- package/dist/sdk/p-3411c743.entry.js +2 -0
- package/dist/sdk/p-3411c743.entry.js.map +1 -0
- package/dist/sdk/p-467c7304.entry.js +2 -0
- package/dist/sdk/p-467c7304.entry.js.map +1 -0
- package/dist/sdk/p-56abb377.entry.js +2 -0
- package/dist/sdk/p-56abb377.entry.js.map +1 -0
- package/dist/sdk/p-5703102b.entry.js +2 -0
- package/dist/sdk/p-5703102b.entry.js.map +1 -0
- package/dist/sdk/p-593c6dde.entry.js +2 -0
- package/dist/sdk/p-593c6dde.entry.js.map +1 -0
- package/dist/sdk/p-5b627aea.entry.js +2 -0
- package/dist/sdk/p-5b627aea.entry.js.map +1 -0
- package/dist/sdk/p-5babee6b.entry.js +2 -0
- package/dist/sdk/p-5babee6b.entry.js.map +1 -0
- package/dist/sdk/p-5cc20a8b.entry.js +2 -0
- package/dist/sdk/p-5cc20a8b.entry.js.map +1 -0
- package/dist/sdk/p-628ccd68.entry.js +2 -0
- package/dist/sdk/p-628ccd68.entry.js.map +1 -0
- package/dist/sdk/p-675eb13d.entry.js +2 -0
- package/dist/sdk/p-675eb13d.entry.js.map +1 -0
- package/dist/sdk/p-6893d167.entry.js +2 -0
- package/dist/sdk/p-6893d167.entry.js.map +1 -0
- package/dist/sdk/p-6a642433.entry.js +2 -0
- package/dist/sdk/p-6a642433.entry.js.map +1 -0
- package/dist/sdk/p-73c2ec89.entry.js +2 -0
- package/dist/sdk/p-73c2ec89.entry.js.map +1 -0
- package/dist/sdk/p-7a0cefff.entry.js +2 -0
- package/dist/sdk/p-7a0cefff.entry.js.map +1 -0
- package/dist/sdk/p-91bb8b59.entry.js +2 -0
- package/dist/sdk/p-91bb8b59.entry.js.map +1 -0
- package/dist/sdk/p-9f59909b.entry.js +2 -0
- package/dist/sdk/p-9f59909b.entry.js.map +1 -0
- package/dist/sdk/p-BZ1kW_eK.js +2 -0
- package/dist/sdk/p-BZ1kW_eK.js.map +1 -0
- package/dist/sdk/p-BlAULXyw.js +2 -0
- package/dist/sdk/p-BlAULXyw.js.map +1 -0
- package/dist/sdk/p-BlOjABPD.js +2 -0
- package/dist/sdk/p-BlOjABPD.js.map +1 -0
- package/dist/sdk/p-BqFCd65h.js +2 -0
- package/dist/sdk/p-BqFCd65h.js.map +1 -0
- package/dist/sdk/p-C0feI0p8.js +2 -0
- package/dist/sdk/p-C0feI0p8.js.map +1 -0
- package/dist/sdk/p-C3fhudPT.js +2 -0
- package/dist/sdk/p-C3fhudPT.js.map +1 -0
- package/dist/sdk/p-CFiZLMAA.js +2 -0
- package/dist/sdk/p-CFiZLMAA.js.map +1 -0
- package/dist/sdk/p-CPPYdoIv.js +2 -0
- package/dist/sdk/p-CPPYdoIv.js.map +1 -0
- package/dist/sdk/p-CbRhHGU5.js +2 -0
- package/dist/sdk/p-CbRhHGU5.js.map +1 -0
- package/dist/sdk/p-Ce8zGAi1.js +2 -0
- package/dist/sdk/p-Ce8zGAi1.js.map +1 -0
- package/dist/sdk/p-Ci3aTmzp.js +3 -0
- package/dist/sdk/p-Ci3aTmzp.js.map +1 -0
- package/dist/sdk/p-D1lzXl_Z.js +2 -0
- package/dist/sdk/p-D1lzXl_Z.js.map +1 -0
- package/dist/sdk/p-DA84OuuU.js +2 -0
- package/dist/sdk/p-DA84OuuU.js.map +1 -0
- package/dist/sdk/p-DUHc_Cx7.js +2 -0
- package/dist/sdk/p-DUHc_Cx7.js.map +1 -0
- package/dist/sdk/p-DYtgart8.js +2 -0
- package/dist/sdk/p-DYtgart8.js.map +1 -0
- package/dist/sdk/p-DdUvQelg.js +2 -0
- package/dist/sdk/p-DdUvQelg.js.map +1 -0
- package/dist/sdk/p-S3-2d2Qd.js +2 -0
- package/dist/sdk/p-S3-2d2Qd.js.map +1 -0
- package/dist/sdk/p-a4b7ffd8.entry.js +2 -0
- package/dist/sdk/p-a4b7ffd8.entry.js.map +1 -0
- package/dist/sdk/p-a5db968f.entry.js +2 -0
- package/dist/sdk/p-a5db968f.entry.js.map +1 -0
- package/dist/sdk/p-a6393d19.entry.js +2 -0
- package/dist/sdk/p-a6393d19.entry.js.map +1 -0
- package/dist/sdk/p-c31dbbb4.entry.js +2 -0
- package/dist/sdk/p-c31dbbb4.entry.js.map +1 -0
- package/dist/sdk/p-c5bffd90.entry.js +2 -0
- package/dist/sdk/p-c5bffd90.entry.js.map +1 -0
- package/dist/sdk/p-da363474.entry.js +2 -0
- package/dist/sdk/p-da363474.entry.js.map +1 -0
- package/dist/sdk/p-e3611b71.entry.js +2 -0
- package/dist/sdk/p-e3611b71.entry.js.map +1 -0
- package/dist/sdk/p-e3f28800.entry.js +2 -0
- package/dist/sdk/p-e3f28800.entry.js.map +1 -0
- package/dist/sdk/p-effaf86b.entry.js +2 -0
- package/dist/sdk/p-effaf86b.entry.js.map +1 -0
- package/dist/sdk/p-f0598e42.entry.js +2 -0
- package/dist/sdk/p-f0598e42.entry.js.map +1 -0
- package/dist/sdk/p-f369a996.entry.js +2 -0
- package/dist/sdk/p-f369a996.entry.js.map +1 -0
- package/dist/sdk/p-ffac964c.entry.js +2 -0
- package/dist/sdk/p-ffac964c.entry.js.map +1 -0
- package/dist/sdk/{profile-helpers-Bs3aj0CO.js.map → profile-helpers-BDjk573F.js.map} +1 -1
- package/dist/sdk/{profile-helpers-mfEp18Tq.js.map → profile-helpers-b8Koj20a.js.map} +1 -1
- package/dist/sdk/sdk.esm.js +2 -48
- package/dist/sdk/sdk.esm.js.map +1 -1
- package/dist/sdk/u-config.entry.esm.js.map +1 -1
- package/dist/sdk/u-error-message.entry.esm.js.map +1 -1
- package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -0
- package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
- package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-password-field.entry.esm.js.map +1 -1
- package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -0
- package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
- package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
- package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
- package/dist/types/auth/auth-helpers.d.ts +24 -25
- package/dist/types/auth/auth.d.ts +1 -1
- package/dist/types/auth/store/auth-store.d.ts +4 -4
- package/dist/types/components.d.ts +72 -0
- package/dist/types/profile/api/profile.d.ts +1 -1
- package/dist/types/profile/components/profile/profile.d.ts +15 -0
- package/dist/types/shared/components/config/config.d.ts +1 -1
- package/dist/types/shared/components/error-message/error-message.d.ts +1 -1
- package/dist/types/ticketable/components/ticketable-list/ticketable-list.d.ts +12 -2
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +1 -1
- package/dist/sdk/auth-B95hXtvh.js.map +0 -1
- package/dist/sdk/auth-BiFlsRm-.js +0 -6821
- package/dist/sdk/auth-BiFlsRm-.js.map +0 -1
- package/dist/sdk/auth-Che07PeV.js.map +0 -1
- package/dist/sdk/auth-store-BzXDlgNb.js.map +0 -1
- package/dist/sdk/auth-store-CapiC8gJ.js.map +0 -1
- package/dist/sdk/auth-store-Mjo3PyJP.js.map +0 -1
- package/dist/sdk/auth-wavto6GW.js +0 -6822
- package/dist/sdk/auth-wavto6GW.js.map +0 -1
- package/dist/sdk/auth-y_LsX4Zn.js +0 -6822
- package/dist/sdk/auth-y_LsX4Zn.js.map +0 -1
- package/dist/sdk/i18n-CacW7WuC.js.map +0 -1
- package/dist/sdk/index-BDX4bHnk.js +0 -15349
- package/dist/sdk/index-BDX4bHnk.js.map +0 -1
- package/dist/sdk/index-BqL27K_R.js +0 -49640
- package/dist/sdk/index-C5jZjlU8.js +0 -49640
- package/dist/sdk/index-CKre5JEG.js +0 -15349
- package/dist/sdk/index-CoYUNBeF.js +0 -43
- package/dist/sdk/index-CvfZ-LfN.js +0 -43
- package/dist/sdk/index-CvfZ-LfN.js.map +0 -1
- package/dist/sdk/index-Cz3idqu9.js +0 -43
- package/dist/sdk/index-Cz3idqu9.js.map +0 -1
- package/dist/sdk/index-DJUE7Ceb.js +0 -6254
- package/dist/sdk/index-DJUE7Ceb.js.map +0 -1
- package/dist/sdk/index-DOyWRKSD.js +0 -43
- package/dist/sdk/index-DOyWRKSD.js.map +0 -1
- package/dist/sdk/index-gEcJztft.js +0 -15349
- package/dist/sdk/index-gEcJztft.js.map +0 -1
- package/dist/sdk/index-mfIOXLHL.js +0 -49640
- package/dist/sdk/index-mfIOXLHL.js.map +0 -1
- package/dist/sdk/newsletter-helpers-C3t2fsCe.js.map +0 -1
- package/dist/sdk/newsletter-helpers-CLSTOCvO.js.map +0 -1
- package/dist/sdk/newsletter-helpers-CnufIbIZ.js.map +0 -1
- package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +0 -1
- package/dist/sdk/newsletter-helpers-MgFueAV9.js +0 -276
- package/dist/sdk/newsletter-helpers-MgFueAV9.js.map +0 -1
- package/dist/sdk/profile-store-DD6sq42i.js +0 -18
- package/dist/sdk/u-field.entry.esm.js.map +0 -1
- package/dist/sdk/u-profile.entry.esm.js.map +0 -1
- package/dist/sdk/u-raw-field.entry.esm.js.map +0 -1
- package/dist/sdk/u-spinner.entry.js +0 -16
- package/dist/sdk/u-submit-button.entry.esm.js.map +0 -1
- package/dist/sdk/u-submit-button.entry.js +0 -204
- /package/dist/{sdk → esm}/component-utils-D1lzXl_Z.js +0 -0
- /package/dist/{sdk → esm}/helpers-BqFCd65h.js +0 -0
- /package/dist/{sdk → esm}/helpers-DUHc_Cx7.js +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { g as getUnidyClient } from './index2.js';
|
|
2
|
+
import { t } from './i18n.js';
|
|
3
|
+
import { w as waitForConfig } from './unidy-store.js';
|
|
4
|
+
import { a as authStore, s as state } from './auth-store.js';
|
|
5
|
+
import { c as createLogger } from './logger.js';
|
|
6
|
+
import { s as state$1 } from './profile-store.js';
|
|
7
|
+
import { c as clearUrlParam } from './component-utils.js';
|
|
8
|
+
import { F as Flash } from './flash-store.js';
|
|
9
|
+
import { Y as captureException } from './exports.js';
|
|
9
10
|
|
|
10
11
|
class InvalidTokenError extends Error {
|
|
11
12
|
}
|
|
@@ -124,21 +125,21 @@ function handlePasskeyError(error) {
|
|
|
124
125
|
if (error instanceof DOMException) {
|
|
125
126
|
errorMessage = PASSKEY_ERRORS[error.name] || "passkey_error";
|
|
126
127
|
}
|
|
127
|
-
authStore.
|
|
128
|
+
authStore.setFieldError("passkey", errorMessage);
|
|
128
129
|
authStore.setLoading(false);
|
|
129
130
|
}
|
|
130
131
|
async function authenticateWithPasskey(client, onSuccess) {
|
|
131
132
|
authStore.setLoading(true);
|
|
132
133
|
authStore.clearErrors();
|
|
133
134
|
if (!window.PublicKeyCredential) {
|
|
134
|
-
authStore.
|
|
135
|
+
authStore.setFieldError("passkey", "passkey_not_supported");
|
|
135
136
|
authStore.setLoading(false);
|
|
136
137
|
return;
|
|
137
138
|
}
|
|
138
139
|
try {
|
|
139
140
|
const [optionsError, options] = await client.auth.getPasskeyOptions(state.sid || undefined);
|
|
140
141
|
if (optionsError || !options) {
|
|
141
|
-
authStore.
|
|
142
|
+
authStore.setFieldError("passkey", optionsError || "bad_request");
|
|
142
143
|
authStore.setLoading(false);
|
|
143
144
|
return;
|
|
144
145
|
}
|
|
@@ -147,7 +148,7 @@ async function authenticateWithPasskey(client, onSuccess) {
|
|
|
147
148
|
publicKey: publicKeyOptions,
|
|
148
149
|
}));
|
|
149
150
|
if (!credential) {
|
|
150
|
-
authStore.
|
|
151
|
+
authStore.setFieldError("passkey", "passkey_cancelled");
|
|
151
152
|
authStore.setLoading(false);
|
|
152
153
|
return;
|
|
153
154
|
}
|
|
@@ -182,7 +183,7 @@ class AuthHelpers {
|
|
|
182
183
|
authStore.clearErrors();
|
|
183
184
|
const [error, response] = await this.client.auth.createSignIn(email, password, sendMagicCode);
|
|
184
185
|
if (error) {
|
|
185
|
-
this.handleAuthError(error, response);
|
|
186
|
+
this.handleAuthError(error, response, password ? "password" : "email");
|
|
186
187
|
return;
|
|
187
188
|
}
|
|
188
189
|
if (password) {
|
|
@@ -218,7 +219,7 @@ class AuthHelpers {
|
|
|
218
219
|
authStore.clearErrors();
|
|
219
220
|
const [error, response] = await this.client.auth.authenticateWithPassword(state.sid, password);
|
|
220
221
|
if (error) {
|
|
221
|
-
this.handleAuthError(error, response);
|
|
222
|
+
this.handleAuthError(error, response, "password");
|
|
222
223
|
}
|
|
223
224
|
else {
|
|
224
225
|
authStore.setLoading(false);
|
|
@@ -226,29 +227,24 @@ class AuthHelpers {
|
|
|
226
227
|
return;
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
|
-
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
authStore.setLoading(false);
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
if (error === "missing_required_fields") {
|
|
236
|
-
authStore.setMissingFields(response.fields);
|
|
237
|
-
state$1.data = response.fields;
|
|
238
|
-
if (response.sid) {
|
|
239
|
-
authStore.setSignInId(response.sid);
|
|
240
|
-
}
|
|
241
|
-
authStore.setStep("missing-fields");
|
|
242
|
-
authStore.setLoading(false);
|
|
243
|
-
return;
|
|
230
|
+
async authenticateWithMagicCode(code) {
|
|
231
|
+
if (!state.sid) {
|
|
232
|
+
throw new Error(t("errors.no_sign_in_id"));
|
|
244
233
|
}
|
|
245
|
-
if (
|
|
246
|
-
|
|
234
|
+
if (!code) {
|
|
235
|
+
throw new Error(t("errors.magic_code_is_missing"));
|
|
247
236
|
}
|
|
248
|
-
|
|
249
|
-
|
|
237
|
+
authStore.setLoading(true);
|
|
238
|
+
authStore.clearErrors();
|
|
239
|
+
const [error, response] = await this.client.auth.authenticateWithMagicCode(state.sid, code);
|
|
240
|
+
if (error) {
|
|
241
|
+
this.handleAuthError(error, response, "magicCode");
|
|
242
|
+
return;
|
|
250
243
|
}
|
|
251
|
-
|
|
244
|
+
this.handleAuthSuccess(response);
|
|
245
|
+
}
|
|
246
|
+
authenticateWithPasskey() {
|
|
247
|
+
return authenticateWithPasskey(this.client, (response) => this.handleAuthSuccess(response));
|
|
252
248
|
}
|
|
253
249
|
async logout() {
|
|
254
250
|
const [error, _] = await this.client.auth.signOut(state.sid);
|
|
@@ -261,7 +257,10 @@ class AuthHelpers {
|
|
|
261
257
|
if (state.step === "missing-fields") {
|
|
262
258
|
return;
|
|
263
259
|
}
|
|
264
|
-
|
|
260
|
+
const sid = clearUrlParam("sid");
|
|
261
|
+
if (sid) {
|
|
262
|
+
authStore.setSignInId(sid);
|
|
263
|
+
}
|
|
265
264
|
if (!state.sid) {
|
|
266
265
|
this.logger.warn("No sign-in ID in the session");
|
|
267
266
|
return;
|
|
@@ -275,40 +274,6 @@ class AuthHelpers {
|
|
|
275
274
|
authStore.setToken(response.jwt);
|
|
276
275
|
}
|
|
277
276
|
}
|
|
278
|
-
handleSocialAuthRedirect() {
|
|
279
|
-
// missing required fields flow
|
|
280
|
-
const url = new URL(window.location.href);
|
|
281
|
-
const params = url.searchParams;
|
|
282
|
-
const error = params.get("error");
|
|
283
|
-
if (error !== "missing_required_fields") {
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
const fieldsFromUrl = params.get("fields");
|
|
287
|
-
if (!fieldsFromUrl) {
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const signInId = params.get("sid");
|
|
291
|
-
if (signInId) {
|
|
292
|
-
authStore.setSignInId(signInId);
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
try {
|
|
298
|
-
const fields = JSON.parse(fieldsFromUrl);
|
|
299
|
-
authStore.setMissingFields(fields);
|
|
300
|
-
state$1.data = fields;
|
|
301
|
-
authStore.setStep("missing-fields");
|
|
302
|
-
params.delete("error");
|
|
303
|
-
params.delete("fields");
|
|
304
|
-
const cleanUrl = `${url.origin}${url.pathname}${url.hash}`;
|
|
305
|
-
window.history.replaceState(null, "", cleanUrl);
|
|
306
|
-
}
|
|
307
|
-
catch (e) {
|
|
308
|
-
this.logger.error("Failed to parse missing fields payload:", e);
|
|
309
|
-
authStore.setGlobalError("auth", "invalid_required_fields_payload");
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
277
|
async sendMagicCode() {
|
|
313
278
|
if (!state.sid && state.step !== "single-login") {
|
|
314
279
|
throw new Error(t("errors.no_sign_in_id"));
|
|
@@ -334,27 +299,6 @@ class AuthHelpers {
|
|
|
334
299
|
}
|
|
335
300
|
return [error, response];
|
|
336
301
|
}
|
|
337
|
-
async authenticateWithMagicCode(code) {
|
|
338
|
-
if (!state.sid) {
|
|
339
|
-
throw new Error(t("errors.no_sign_in_id"));
|
|
340
|
-
}
|
|
341
|
-
if (!code) {
|
|
342
|
-
throw new Error(t("errors.magic_code_is_missing"));
|
|
343
|
-
}
|
|
344
|
-
authStore.setLoading(true);
|
|
345
|
-
authStore.clearErrors();
|
|
346
|
-
const [error, response] = await this.client.auth.authenticateWithMagicCode(state.sid, code);
|
|
347
|
-
if (!error) {
|
|
348
|
-
this.handleAuthSuccess(response);
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
if (error === "missing_required_fields") {
|
|
352
|
-
this.handleMissingFields(response);
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
authStore.setLoading(false);
|
|
356
|
-
authStore.setFieldError("magicCode", error);
|
|
357
|
-
}
|
|
358
302
|
async sendResetPasswordEmail() {
|
|
359
303
|
if (!state.sid) {
|
|
360
304
|
throw new Error(t("errors.no_sign_in_id"));
|
|
@@ -371,28 +315,6 @@ class AuthHelpers {
|
|
|
371
315
|
}
|
|
372
316
|
authStore.setLoading(false);
|
|
373
317
|
}
|
|
374
|
-
async handleResetPasswordRedirect() {
|
|
375
|
-
const url = new URL(window.location.href);
|
|
376
|
-
const params = url.searchParams;
|
|
377
|
-
const resetToken = params.get("reset_password_token");
|
|
378
|
-
if (!resetToken) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
381
|
-
if (state.sid) {
|
|
382
|
-
authStore.setLoading(true);
|
|
383
|
-
const [error] = await this.client.auth.validateResetPasswordToken(state.sid, resetToken);
|
|
384
|
-
if (error) {
|
|
385
|
-
authStore.setFieldError("resetPassword", error);
|
|
386
|
-
authStore.setStep("reset-password");
|
|
387
|
-
authStore.setLoading(false);
|
|
388
|
-
return false;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
authStore.setResetToken(resetToken);
|
|
392
|
-
authStore.setStep("reset-password");
|
|
393
|
-
authStore.setLoading(false);
|
|
394
|
-
return true;
|
|
395
|
-
}
|
|
396
318
|
async resetPassword() {
|
|
397
319
|
if (!state.resetPassword.token) {
|
|
398
320
|
throw new Error("No reset token available");
|
|
@@ -429,18 +351,103 @@ class AuthHelpers {
|
|
|
429
351
|
}
|
|
430
352
|
authStore.setLoading(false);
|
|
431
353
|
}
|
|
432
|
-
|
|
433
|
-
|
|
354
|
+
async handleResetPasswordRedirect() {
|
|
355
|
+
const url = new URL(window.location.href);
|
|
356
|
+
const params = url.searchParams;
|
|
357
|
+
const resetToken = params.get("reset_password_token");
|
|
358
|
+
if (!resetToken) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
if (state.sid) {
|
|
362
|
+
authStore.setLoading(true);
|
|
363
|
+
const [error] = await this.client.auth.validateResetPasswordToken(state.sid, resetToken);
|
|
364
|
+
if (error) {
|
|
365
|
+
authStore.setFieldError("resetPassword", error);
|
|
366
|
+
authStore.setStep("reset-password");
|
|
367
|
+
authStore.setLoading(false);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
authStore.setResetToken(resetToken);
|
|
372
|
+
authStore.setStep("reset-password");
|
|
373
|
+
authStore.setLoading(false);
|
|
434
374
|
}
|
|
435
|
-
|
|
375
|
+
handleSocialAuthRedirect() {
|
|
376
|
+
const url = new URL(window.location.href);
|
|
377
|
+
const params = url.searchParams;
|
|
378
|
+
const error = params.get("error");
|
|
379
|
+
// Not a social auth redirect (normal page load)
|
|
380
|
+
if (!error && !params.has("sid")) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
// Handle successful social auth redirect
|
|
384
|
+
if (!error && params.has("sid") && params.has("id_token")) {
|
|
385
|
+
authStore.setSignInId(clearUrlParam("sid"));
|
|
386
|
+
const idToken = clearUrlParam("id_token");
|
|
387
|
+
if (idToken) {
|
|
388
|
+
authStore.setToken(idToken);
|
|
389
|
+
this.handleAuthSuccess({ jwt: idToken });
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
this.logger.error("No ID token found in the URL on social auth redirect");
|
|
393
|
+
}
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
// Handle missing required fields
|
|
397
|
+
if (error !== "missing_required_fields") {
|
|
398
|
+
this.logger.error("Social auth redirect error:", error);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const fieldsFromUrl = clearUrlParam("fields");
|
|
436
402
|
const sid = clearUrlParam("sid");
|
|
437
|
-
|
|
403
|
+
clearUrlParam("error");
|
|
404
|
+
if (!fieldsFromUrl || !sid) {
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
try {
|
|
408
|
+
const fields = JSON.parse(fieldsFromUrl);
|
|
438
409
|
authStore.setSignInId(sid);
|
|
410
|
+
this.handleMissingFields(fields);
|
|
439
411
|
}
|
|
412
|
+
catch (e) {
|
|
413
|
+
this.logger.error("Failed to parse missing fields payload:", e);
|
|
414
|
+
authStore.setGlobalError("auth", "invalid_required_fields_payload");
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
handleAuthError(error, response, fallbackField) {
|
|
418
|
+
switch (error) {
|
|
419
|
+
case "account_not_found":
|
|
420
|
+
authStore.setFieldError("email", error);
|
|
421
|
+
break;
|
|
422
|
+
case "missing_required_fields": {
|
|
423
|
+
const { fields, sid } = response;
|
|
424
|
+
this.handleMissingFields(fields);
|
|
425
|
+
if (sid) {
|
|
426
|
+
authStore.setSignInId(sid);
|
|
427
|
+
}
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
default:
|
|
431
|
+
if (fallbackField === "password") {
|
|
432
|
+
authStore.setFieldError("password", error);
|
|
433
|
+
}
|
|
434
|
+
else if (fallbackField === "magicCode") {
|
|
435
|
+
authStore.setFieldError("magicCode", error);
|
|
436
|
+
}
|
|
437
|
+
else if (fallbackField === "email") {
|
|
438
|
+
authStore.setFieldError("email", error);
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
// e.g. "account_locked", "internal_server_error"
|
|
442
|
+
authStore.setGlobalError("auth", error);
|
|
443
|
+
}
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
authStore.setLoading(false);
|
|
440
447
|
}
|
|
441
|
-
handleMissingFields(
|
|
442
|
-
authStore.setMissingFields(
|
|
443
|
-
state$1.data =
|
|
448
|
+
handleMissingFields(fields) {
|
|
449
|
+
authStore.setMissingFields(fields);
|
|
450
|
+
state$1.data = fields;
|
|
444
451
|
authStore.setStep("missing-fields");
|
|
445
452
|
authStore.setLoading(false);
|
|
446
453
|
}
|
|
@@ -456,8 +463,6 @@ class Auth {
|
|
|
456
463
|
helpers;
|
|
457
464
|
constructor(client) {
|
|
458
465
|
this.helpers = new AuthHelpers(client);
|
|
459
|
-
this.helpers.handleSocialAuthRedirect();
|
|
460
|
-
this.helpers.handleResetPasswordRedirect();
|
|
461
466
|
}
|
|
462
467
|
static Errors = {
|
|
463
468
|
email: {
|
|
@@ -486,8 +491,13 @@ class Auth {
|
|
|
486
491
|
}
|
|
487
492
|
return Auth.instance;
|
|
488
493
|
}
|
|
489
|
-
static initialize(client) {
|
|
494
|
+
static async initialize(client) {
|
|
495
|
+
if (Auth.instance) {
|
|
496
|
+
return Auth.instance;
|
|
497
|
+
}
|
|
490
498
|
Auth.instance = new Auth(client);
|
|
499
|
+
Auth.instance.helpers.handleSocialAuthRedirect();
|
|
500
|
+
await Auth.instance.helpers.handleResetPasswordRedirect();
|
|
491
501
|
if (Auth.instance.isTokenValid(state.token)) {
|
|
492
502
|
authStore.setAuthenticated(true);
|
|
493
503
|
}
|
|
@@ -566,6 +576,6 @@ class Auth {
|
|
|
566
576
|
}
|
|
567
577
|
|
|
568
578
|
export { Auth as A };
|
|
569
|
-
//# sourceMappingURL=auth
|
|
579
|
+
//# sourceMappingURL=auth.js.map
|
|
570
580
|
|
|
571
|
-
//# sourceMappingURL=auth
|
|
581
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"auth.js","mappings":";;;;;;;;;;AAAO,MAAM,iBAAiB,SAAS,KAAK,CAAC;AAC7C;AACA,iBAAiB,CAAC,SAAS,CAAC,IAAI,GAAG,mBAAmB;AACtD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;AAClE,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE;AAC7D,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;AAC7B,YAAY,IAAI,GAAG,GAAG,GAAG,IAAI;AAC7B;AACA,QAAQ,OAAO,GAAG,GAA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I;;;AAIf,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QAE9C,IAAI,KAAK,EAAE;AACT,YAAA,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC;;QAGvG,SAAS,CAAC,KAAK,EAAE;AAEjB,QAAA,OAAO,IAAI;;IAGb,QAAQ,GAAA;QACN,OAAOF,KAAS,CAAC,KAAK;;AAGhB,IAAA,eAAe,CAAC,OAAe,EAAE,IAAuB,EAAE,cAAc,GAAG,KAAK,EAAA;AACtF,QAAA,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAc;AAC7C,QAAA,KAAK,CAAC,IAAI,GAAG,IAAI;AACjB,QAAA,KAAK,CAAC,cAAc,GAAG,cAAc;AAErC,QAAA,OAAO,KAAK;;;;;;","names":["authState","profileState","Sentry.captureException"],"sources":["../../node_modules/jwt-decode/build/esm/index.js","src/auth/passkey-auth.ts","src/auth/auth-helpers.ts","src/auth/auth.ts"],"sourcesContent":["export class InvalidTokenError extends Error {\n}\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\nfunction b64DecodeUnicode(str) {\n return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {\n let code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = \"0\" + code;\n }\n return \"%\" + code;\n }));\n}\nfunction base64UrlDecode(str) {\n let output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += \"==\";\n break;\n case 3:\n output += \"=\";\n break;\n default:\n throw new Error(\"base64 string is not of the correct length\");\n }\n try {\n return b64DecodeUnicode(output);\n }\n catch (err) {\n return atob(output);\n }\n}\nexport function jwtDecode(token, options) {\n if (typeof token !== \"string\") {\n throw new InvalidTokenError(\"Invalid token specified: must be a string\");\n }\n options || (options = {});\n const pos = options.header === true ? 0 : 1;\n const part = token.split(\".\")[pos];\n if (typeof part !== \"string\") {\n throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);\n }\n let decoded;\n try {\n decoded = base64UrlDecode(part);\n }\n catch (e) {\n throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);\n }\n try {\n return JSON.parse(decoded);\n }\n catch (e) {\n throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);\n }\n}\n","import { jwtDecode } from \"jwt-decode\";\nimport type { PasskeyOptionsResponse, TokenResponse, UnidyClient } from \"../api\";\nimport { createLogger } from \"../logger\";\nimport type { TokenPayload } from \"./auth\";\nimport { authState, authStore } from \"./store/auth-store\";\n\nconst logger = createLogger(\"PasskeyAuth\");\n\nconst PASSKEY_ERRORS: Record<string, string> = {\n NotSupportedError: \"passkey_not_supported\",\n NotAllowedError: \"passkey_cancelled\",\n SecurityError: \"passkey_security_error\",\n InvalidStateError: \"passkey_invalid_state\",\n};\n\nfunction decodeBase64Url(base64url: string): Uint8Array {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64 + \"=\".repeat((4 - (base64.length % 4)) % 4);\n return Uint8Array.from(atob(padded), (c) => c.charCodeAt(0));\n}\n\nfunction buildPublicKeyOptions(options: PasskeyOptionsResponse): PublicKeyCredentialRequestOptions {\n return {\n challenge: Uint8Array.from(atob(options.challenge), (c) => c.charCodeAt(0)),\n timeout: options.timeout || 60000,\n rpId: options.rpId,\n userVerification: (options.userVerification as UserVerificationRequirement) || \"required\",\n allowCredentials: options.allowCredentials?.map((cred) => ({\n ...cred,\n id: decodeBase64Url(cred.id),\n })),\n };\n}\n\nfunction formatCredentialForServer(credential: PublicKeyCredential) {\n const response = credential.response as AuthenticatorAssertionResponse;\n return {\n id: credential.id,\n rawId: btoa(String.fromCharCode(...new Uint8Array(credential.rawId))),\n response: {\n authenticatorData: btoa(String.fromCharCode(...new Uint8Array(response.authenticatorData))),\n clientDataJSON: btoa(String.fromCharCode(...new Uint8Array(response.clientDataJSON))),\n signature: btoa(String.fromCharCode(...new Uint8Array(response.signature))),\n },\n type: credential.type,\n };\n}\n\nfunction extractAndSetSignInId(tokenResponse: TokenResponse) {\n if (tokenResponse.sid) {\n authStore.setSignInId(tokenResponse.sid);\n return;\n }\n\n // Fallback: extract sid from JWT token payload\n try {\n const decoded = jwtDecode<TokenPayload>(tokenResponse.jwt);\n if (decoded.sid) {\n authStore.setSignInId(decoded.sid);\n }\n } catch {\n // Failed to decode JWT token to extract sid, continue without it\n }\n}\n\nfunction handlePasskeyError(error: unknown) {\n logger.error(\"Passkey error:\", error);\n\n let errorMessage = \"passkey_error\";\n if (error instanceof DOMException) {\n errorMessage = PASSKEY_ERRORS[error.name] || \"passkey_error\";\n }\n\n authStore.setFieldError(\"passkey\", errorMessage);\n authStore.setLoading(false);\n}\n\nexport async function authenticateWithPasskey(client: UnidyClient, onSuccess: (response: TokenResponse) => void) {\n authStore.setLoading(true);\n authStore.clearErrors();\n\n if (!window.PublicKeyCredential) {\n authStore.setFieldError(\"passkey\", \"passkey_not_supported\");\n authStore.setLoading(false);\n return;\n }\n\n try {\n const [optionsError, options] = await client.auth.getPasskeyOptions(authState.sid || undefined);\n\n if (optionsError || !options) {\n authStore.setFieldError(\"passkey\", optionsError || \"bad_request\");\n authStore.setLoading(false);\n return;\n }\n\n const publicKeyOptions = buildPublicKeyOptions(options as PasskeyOptionsResponse);\n\n const credential = (await navigator.credentials.get({\n publicKey: publicKeyOptions,\n })) as PublicKeyCredential | null;\n\n if (!credential) {\n authStore.setFieldError(\"passkey\", \"passkey_cancelled\");\n authStore.setLoading(false);\n return;\n }\n\n const formattedCredential = formatCredentialForServer(credential);\n\n const [verifyError, tkResponse] = await client.auth.authenticateWithPasskey(formattedCredential);\n\n const tokenResponse = tkResponse as TokenResponse;\n if (verifyError || !tokenResponse) {\n authStore.setGlobalError(\"auth\", verifyError || \"authentication_failed\");\n authStore.setLoading(false);\n return;\n }\n\n authStore.setToken(tokenResponse.jwt);\n extractAndSetSignInId(tokenResponse);\n onSuccess(tokenResponse);\n } catch (error) {\n handlePasskeyError(error);\n }\n}\n","import { jwtDecode } from \"jwt-decode\";\nimport type { CreateSignInResponse, RequiredFieldsResponse, TokenResponse, UnidyClient } from \"../api\";\nimport { authState, authStore } from \"../auth/store/auth-store\";\nimport { t } from \"../i18n\";\nimport { createLogger } from \"../logger\";\nimport type { ProfileRaw } from \"../profile\";\nimport { state as profileState } from \"../profile/store/profile-store\";\nimport { clearUrlParam } from \"../shared/component-utils\";\nimport { Flash } from \"../shared/store/flash-store\";\nimport type { TokenPayload } from \"./auth\";\nimport { authenticateWithPasskey } from \"./passkey-auth\";\n\nexport class AuthHelpers {\n private client: UnidyClient;\n private logger = createLogger(\"AuthHelpers\");\n\n constructor(client: UnidyClient) {\n this.client = client;\n }\n\n async createSignIn(email: string, password?: string, sendMagicCode?: boolean) {\n if (!email) {\n throw new Error(t(\"errors.required_field\", { field: \"Email\" }));\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.createSignIn(email, password, sendMagicCode);\n\n if (error) {\n this.handleAuthError(error, response, password ? \"password\" : \"email\");\n return;\n }\n\n if (password) {\n const token = jwtDecode<TokenPayload>((response as TokenResponse).jwt);\n authStore.setSignInId(token.sid);\n authStore.setToken((response as TokenResponse).jwt);\n authStore.setLoading(false);\n authStore.getRootComponentRef()?.onAuth(response as TokenResponse);\n return;\n }\n\n if (sendMagicCode) {\n authStore.setSignInId((response as CreateSignInResponse).sid);\n authStore.setMagicCodeStep(\"sent\");\n authStore.setStep(\"magic-code\");\n authStore.setLoading(false);\n return [error, response] as const;\n }\n const signInResponse = response as CreateSignInResponse;\n authStore.setStep(\"verification\");\n authStore.setEmail(email);\n authStore.setSignInId(signInResponse.sid);\n authStore.setLoginOptions(signInResponse.login_options);\n authStore.setLoading(false);\n }\n\n async authenticateWithPassword(password: string) {\n if (!authState.sid) {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n if (!password) {\n throw new Error(t(\"errors.required_field\", { field: \"Password\" }));\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.authenticateWithPassword(authState.sid, password);\n\n if (error) {\n this.handleAuthError(error, response, \"password\");\n } else {\n authStore.setLoading(false);\n this.handleAuthSuccess(response as TokenResponse);\n return;\n }\n }\n\n async authenticateWithMagicCode(code: string) {\n if (!authState.sid) {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n if (!code) {\n throw new Error(t(\"errors.magic_code_is_missing\"));\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.authenticateWithMagicCode(authState.sid, code);\n\n if (error) {\n this.handleAuthError(error, response, \"magicCode\");\n return;\n }\n\n this.handleAuthSuccess(response as TokenResponse);\n }\n\n authenticateWithPasskey() {\n return authenticateWithPasskey(this.client, (response) => this.handleAuthSuccess(response));\n }\n\n async logout() {\n const [error, _] = await this.client.auth.signOut(authState.sid as string);\n\n if (error) {\n authStore.setGlobalError(\"auth\", error);\n }\n\n return [error, _] as const;\n }\n\n async refreshToken() {\n if (authState.step === \"missing-fields\") {\n return;\n }\n\n const sid = clearUrlParam(\"sid\");\n if (sid) {\n authStore.setSignInId(sid);\n }\n\n if (!authState.sid) {\n this.logger.warn(\"No sign-in ID in the session\");\n return;\n }\n\n const [error, response] = await this.client.auth.refreshToken(authState.sid);\n\n if (error) {\n authStore.reset();\n authStore.setGlobalError(\"auth\", error);\n } else {\n authStore.setToken((response as TokenResponse).jwt);\n }\n }\n\n async sendMagicCode() {\n if (!authState.sid && authState.step !== \"single-login\") {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n authStore.setMagicCodeStep(\"requested\");\n authStore.setLoading(true);\n authStore.clearErrors();\n\n if (authState.step === \"single-login\") {\n const [error, response] = await this.createSignIn(authState.email, undefined, true);\n authStore.setLoading(false);\n return [error, response] as const;\n }\n\n const [error, response] = await this.client.auth.sendMagicCode(authState.sid);\n\n authStore.setLoading(false);\n\n authStore.setStep(\"magic-code\");\n\n if (!error) {\n authStore.setMagicCodeStep(\"sent\");\n\n return [null, response] as const;\n }\n\n authStore.setFieldError(\"magicCode\", error);\n\n if (error === \"magic_code_recently_created\") {\n authStore.setMagicCodeStep(\"sent\");\n }\n\n return [error, response] as const;\n }\n\n async sendResetPasswordEmail() {\n if (!authState.sid) {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n authStore.setLoading(true);\n authStore.setResetPasswordStep(\"requested\");\n\n const [error, _] = await this.client.auth.sendResetPasswordEmail(authState.sid, window.location.href);\n\n if (error) {\n authStore.setFieldError(\"resetPassword\", error);\n } else {\n authStore.setResetPasswordStep(\"sent\");\n authStore.clearErrors();\n }\n\n authStore.setLoading(false);\n }\n\n async resetPassword() {\n if (!authState.resetPassword.token) {\n throw new Error(\"No reset token available\");\n }\n\n if (!authState.resetPassword.newPassword) {\n authStore.setFieldError(\"resetPassword\", \"password_required\");\n return;\n }\n\n if (\n authState.resetPassword.passwordConfirmation &&\n authState.resetPassword.newPassword !== authState.resetPassword.passwordConfirmation\n ) {\n authStore.setFieldError(\"resetPassword\", \"passwords_do_not_match\");\n return;\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.resetPassword(\n authState.sid as string,\n authState.resetPassword.token,\n authState.resetPassword.newPassword,\n authState.resetPassword.passwordConfirmation,\n );\n\n if (error) {\n authStore.setFieldError(\"resetPassword\", error);\n\n // TODO: add proper password requirements handling --> for now this is fine\n if (error === \"invalid_password\") {\n authStore.setFieldError(\"password\", response.error_details?.password.map((p) => t(`errors.password_requirements.${p}`)).join(\"\\n\"));\n }\n } else {\n authStore.setStep(\"email\");\n authStore.updateResetPassword({\n step: \"completed\",\n token: null,\n newPassword: \"\",\n passwordConfirmation: \"\",\n });\n\n clearUrlParam(\"reset_password_token\");\n Flash.success.addMessage(\"Password reset successfully\");\n }\n\n authStore.setLoading(false);\n }\n\n async handleResetPasswordRedirect() {\n const url = new URL(window.location.href);\n const params = url.searchParams;\n const resetToken = params.get(\"reset_password_token\");\n\n if (!resetToken) {\n return;\n }\n\n if (authState.sid) {\n authStore.setLoading(true);\n\n const [error] = await this.client.auth.validateResetPasswordToken(authState.sid, resetToken);\n\n if (error) {\n authStore.setFieldError(\"resetPassword\", error);\n authStore.setStep(\"reset-password\");\n authStore.setLoading(false);\n return;\n }\n }\n\n authStore.setResetToken(resetToken);\n authStore.setStep(\"reset-password\");\n authStore.setLoading(false);\n }\n\n handleSocialAuthRedirect(): void {\n const url = new URL(window.location.href);\n const params = url.searchParams;\n const error = params.get(\"error\");\n\n // Not a social auth redirect (normal page load)\n if (!error && !params.has(\"sid\")) {\n return;\n }\n\n // Handle successful social auth redirect\n if (!error && params.has(\"sid\") && params.has(\"id_token\")) {\n authStore.setSignInId(clearUrlParam(\"sid\"));\n\n const idToken = clearUrlParam(\"id_token\");\n\n if (idToken) {\n authStore.setToken(idToken);\n this.handleAuthSuccess({ jwt: idToken } as TokenResponse);\n } else {\n this.logger.error(\"No ID token found in the URL on social auth redirect\");\n }\n\n return;\n }\n\n // Handle missing required fields\n if (error !== \"missing_required_fields\") {\n this.logger.error(\"Social auth redirect error:\", error);\n return;\n }\n\n const fieldsFromUrl = clearUrlParam(\"fields\");\n const sid = clearUrlParam(\"sid\");\n clearUrlParam(\"error\");\n\n if (!fieldsFromUrl || !sid) {\n return;\n }\n\n try {\n const fields = JSON.parse(fieldsFromUrl);\n authStore.setSignInId(sid);\n\n this.handleMissingFields(fields);\n } catch (e) {\n this.logger.error(\"Failed to parse missing fields payload:\", e);\n authStore.setGlobalError(\"auth\", \"invalid_required_fields_payload\");\n }\n }\n\n private handleAuthError(error: string, response: unknown, fallbackField?: \"email\" | \"password\" | \"magicCode\") {\n switch (error) {\n case \"account_not_found\":\n authStore.setFieldError(\"email\", error);\n break;\n\n case \"missing_required_fields\": {\n const { fields, sid } = response as RequiredFieldsResponse;\n this.handleMissingFields(fields);\n if (sid) {\n authStore.setSignInId(sid);\n }\n break;\n }\n\n default:\n if (fallbackField === \"password\") {\n authStore.setFieldError(\"password\", error);\n } else if (fallbackField === \"magicCode\") {\n authStore.setFieldError(\"magicCode\", error);\n } else if (fallbackField === \"email\") {\n authStore.setFieldError(\"email\", error);\n } else {\n // e.g. \"account_locked\", \"internal_server_error\"\n authStore.setGlobalError(\"auth\", error);\n }\n break;\n }\n\n authStore.setLoading(false);\n }\n\n private handleMissingFields(fields: RequiredFieldsResponse[\"fields\"]) {\n authStore.setMissingFields(fields);\n profileState.data = fields as ProfileRaw;\n authStore.setStep(\"missing-fields\");\n authStore.setLoading(false);\n }\n\n private handleAuthSuccess(response: TokenResponse) {\n authStore.setToken(response.jwt);\n authStore.setLoading(false);\n authStore.getRootComponentRef()?.onAuth(response);\n }\n}\n","import * as Sentry from \"@sentry/browser\";\nimport { jwtDecode } from \"jwt-decode\";\nimport type { UnidyClient } from \"../api\";\nimport { getUnidyClient } from \"../api\";\nimport { t } from \"../i18n\";\nimport { waitForConfig } from \"../shared/store/unidy-store\";\nimport { AuthHelpers } from \"./auth-helpers\";\nimport { authState, authStore } from \"./store/auth-store\";\n\nexport interface TokenPayload {\n sub: string; // unidy id\n sid: string; // sign-in id\n exp: number;\n iat: number;\n iss: string;\n aud: string;\n nonce: string;\n auth_time: number;\n email: string;\n email_verified: boolean;\n [key: string]: unknown;\n}\n\nexport type AuthError = Error & {\n code: \"TOKEN_EXPIRED\" | \"REFRESH_FAILED\" | \"NO_TOKEN\" | \"INVALID_TOKEN\" | \"SIGN_IN_NOT_FOUND\" | \"SIGN_OUT_FAILED\";\n requiresReauth: boolean;\n};\n\nexport class Auth {\n private static instance: Auth;\n\n readonly helpers: AuthHelpers;\n\n private constructor(client: UnidyClient) {\n this.helpers = new AuthHelpers(client);\n }\n\n static Errors = {\n email: {\n NOT_FOUND: \"account_not_found\",\n },\n magicCode: {\n RECENTLY_CREATED: \"magic_code_recently_created\",\n NOT_VALID: \"magic_code_not_valid\",\n EXPIRED: \"magic_code_expired\",\n USED: \"magic_code_used\",\n },\n password: {\n INVALID: \"invalid_password\",\n NOT_SET: \"password_not_set\",\n RESET_PASSWORD_ALREADY_SENT: \"reset_password_already_sent\",\n },\n general: {\n ACCOUNT_LOCKED: \"account_locked\",\n SIGN_IN_EXPIRED: \"sign_in_expired\",\n },\n } as const;\n\n static async getInstance(): Promise<Auth> {\n if (!Auth.isInitialized()) {\n await waitForConfig();\n\n return Auth.initialize(getUnidyClient());\n }\n\n return Auth.instance;\n }\n\n static async initialize(client: UnidyClient): Promise<Auth> {\n if (Auth.instance) {\n return Auth.instance;\n }\n\n Auth.instance = new Auth(client);\n\n Auth.instance.helpers.handleSocialAuthRedirect();\n await Auth.instance.helpers.handleResetPasswordRedirect();\n\n if (Auth.instance.isTokenValid(authState.token)) {\n authStore.setAuthenticated(true);\n }\n\n return Auth.instance;\n }\n\n static isInitialized(): boolean {\n return !!Auth.instance;\n }\n\n isTokenValid(token: string | TokenPayload | null): boolean {\n try {\n let decoded: TokenPayload | null;\n\n if (typeof token === \"string\") {\n decoded = jwtDecode<TokenPayload>(token);\n } else {\n decoded = token;\n }\n\n if (!decoded) return false;\n\n const currentTime = Date.now() / 1000;\n return decoded.exp > currentTime;\n } catch (error) {\n Sentry.captureException(error);\n return false;\n }\n }\n\n async isAuthenticated(): Promise<boolean> {\n const token = await this.getToken();\n return typeof token === \"string\";\n }\n\n async getToken(): Promise<string | AuthError> {\n const currentToken = authState.token;\n\n if (currentToken && this.isTokenValid(currentToken)) {\n return currentToken;\n }\n\n await this.helpers.refreshToken();\n\n if (authState.globalErrors.auth || !authState.token) {\n return this.createAuthError(t(\"errors.refresh_failed\"), \"REFRESH_FAILED\", true);\n }\n\n return authState.token as string;\n }\n\n async userData(): Promise<TokenPayload | null> {\n const token = await this.getToken();\n\n if (typeof token !== \"string\") {\n return null;\n }\n\n if (!token) {\n return null;\n }\n\n try {\n return jwtDecode<TokenPayload>(token);\n } catch (error) {\n Sentry.captureException(error);\n return null;\n }\n }\n\n async logout(): Promise<boolean | AuthError> {\n const [error, _] = await this.helpers.logout();\n\n if (error) {\n return this.createAuthError(t(\"errors.sign_out_failed\", { reason: error }), \"SIGN_OUT_FAILED\", false);\n }\n\n authStore.reset();\n\n return true;\n }\n\n getEmail(): string | null {\n return authState.email;\n }\n\n private createAuthError(message: string, code: AuthError[\"code\"], requiresReauth = false): AuthError {\n const error = new Error(message) as AuthError;\n error.code = code;\n error.requiresReauth = requiresReauth;\n\n return error;\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a Stencil component's slot has content.
|
|
3
|
+
* Use this in components to render fallback content when a slot is empty.
|
|
4
|
+
*
|
|
5
|
+
* @param element - The host element of the component (accessed via @Element())
|
|
6
|
+
* @returns true if the slot has content, false otherwise
|
|
7
|
+
*/
|
|
8
|
+
function hasSlotContent(element) {
|
|
9
|
+
if (!element.hasChildNodes())
|
|
10
|
+
return false;
|
|
11
|
+
for (const child of Array.from(element.childNodes)) {
|
|
12
|
+
if (child.nodeType === Node.ELEMENT_NODE)
|
|
13
|
+
return true;
|
|
14
|
+
if (child.nodeType === Node.TEXT_NODE && child.textContent?.trim())
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
function clearUrlParam(param) {
|
|
20
|
+
const url = new URL(window.location.href);
|
|
21
|
+
const value = url.searchParams.get(param);
|
|
22
|
+
if (value) {
|
|
23
|
+
url.searchParams.delete(param);
|
|
24
|
+
window.history.replaceState(null, "", url.toString());
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { clearUrlParam as c, hasSlotContent as h };
|
|
30
|
+
//# sourceMappingURL=component-utils.js.map
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=component-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"component-utils.js","mappings":"AAAA;;;;;;AAMG;AACG,SAAU,cAAc,CAAC,OAAoB,EAAA;AACjD,IAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;AAAE,QAAA,OAAO,KAAK;AAE1C,IAAA,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAClD,QAAA,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,IAAI;AACrD,QAAA,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE;AAAE,YAAA,OAAO,IAAI;;AAGjF,IAAA,OAAO,KAAK;AACd;AAEM,SAAU,aAAa,CAAC,KAAa,EAAA;IACzC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IACzC,MAAM,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC;IAEzC,IAAI,KAAK,EAAE;AACT,QAAA,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9B,QAAA,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC;;AAGvD,IAAA,OAAO,KAAK;AACd;;;;","names":[],"sources":["src/shared/component-utils.ts"],"sourcesContent":["/**\n * Checks if a Stencil component's slot has content.\n * Use this in components to render fallback content when a slot is empty.\n *\n * @param element - The host element of the component (accessed via @Element())\n * @returns true if the slot has content, false otherwise\n */\nexport function hasSlotContent(element: HTMLElement): boolean {\n if (!element.hasChildNodes()) return false;\n\n for (const child of Array.from(element.childNodes)) {\n if (child.nodeType === Node.ELEMENT_NODE) return true;\n if (child.nodeType === Node.TEXT_NODE && child.textContent?.trim()) return true;\n }\n\n return false;\n}\n\nexport function clearUrlParam(param: string): string | null {\n const url = new URL(window.location.href);\n const value = url.searchParams.get(param);\n\n if (value) {\n url.searchParams.delete(param);\n window.history.replaceState(null, \"\", url.toString());\n }\n\n return value;\n}\n"],"version":3}
|