@volter/twin-clerk 0.1.0
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/LICENSE +202 -0
- package/README.md +102 -0
- package/client/clerk-js-dist/167_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/2172_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/2172_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/368_clerk.headless_b86dff_5.127.2.js +3 -0
- package/client/clerk-js-dist/377_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/4170_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/4170_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/437_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/5192_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/5192_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/553_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/5645_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/5645_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/623_clerk.headless_b86dff_5.127.2.js +42 -0
- package/client/clerk-js-dist/7067_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/7067_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/7502_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/7502_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/785_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/785_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/8043_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/825_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/825_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/890_clerk.headless_b86dff_5.127.2.js +2 -0
- package/client/clerk-js-dist/901_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/apiKeys_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/apiKeys_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/base-account-sdk_clerk.browser_0cc2cc_5.127.2.js +42 -0
- package/client/clerk-js-dist/base-account-sdk_clerk.headless.browser_540199_5.127.2.js +42 -0
- package/client/clerk-js-dist/base-account-sdk_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/blankcaptcha_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/blankcaptcha_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/checkout_clerk.browser_0cc2cc_5.127.2.js +9 -0
- package/client/clerk-js-dist/checkout_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/clerk.browser.js +19 -0
- package/client/clerk-js-dist/clerk.headless.browser.js +19 -0
- package/client/clerk-js-dist/clerk.headless.js +19 -0
- package/client/clerk-js-dist/clerk.js +809 -0
- package/client/clerk-js-dist/clerk.legacy.browser.js +1 -0
- package/client/clerk-js-dist/clerk.no-rhc.js +766 -0
- package/client/clerk-js-dist/coinbase-wallet-sdk_clerk.browser_0cc2cc_5.127.2.js +3 -0
- package/client/clerk-js-dist/coinbase-wallet-sdk_clerk.headless.browser_540199_5.127.2.js +3 -0
- package/client/clerk-js-dist/coinbase-wallet-sdk_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/cookieSuffix_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/cookieSuffix_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/cookieSuffix_clerk.headless_b86dff_5.127.2.js +1 -0
- package/client/clerk-js-dist/cookieSuffix_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/copy-api-key-modal_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/copy-api-key-modal_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/createorganization_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/createorganization_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/enableOrganizationsPrompt_clerk.browser_0cc2cc_5.127.2.js +247 -0
- package/client/clerk-js-dist/enableOrganizationsPrompt_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/framework_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/framework_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/impersonationfab_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/impersonationfab_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/keylessPrompt_clerk.browser_0cc2cc_5.127.2.js +228 -0
- package/client/clerk-js-dist/keylessPrompt_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/oauthConsent_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/oauthConsent_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/onetap_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/onetap_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/op-api-keys-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/op-api-keys-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/op-billing-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/op-billing-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/op-plans-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/op-plans-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/organizationlist_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/organizationlist_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/organizationprofile_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/organizationprofile_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/organizationswitcher_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/organizationswitcher_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/payment-attempt-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/payment-attempt-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/planDetails_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/planDetails_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/prefetchorganizationlist_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/prefetchorganizationlist_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/pricingTable_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/pricingTable_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/query-core-vendors_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/query-core-vendors_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/query-core-vendors_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/revoke-api-key-modal_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/revoke-api-key-modal_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/sessionTasks_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/sessionTasks_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/signin_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/signin_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/signup_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/signup_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/statement-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/statement-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/stripe-vendors_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/stripe-vendors_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/stripe-vendors_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/subscriptionDetails_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/subscriptionDetails_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/taskChooseOrganization_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/taskChooseOrganization_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/taskResetPassword_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/taskResetPassword_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/taskSetupMFA_clerk.browser_0cc2cc_5.127.2.js +4 -0
- package/client/clerk-js-dist/taskSetupMFA_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/ui-common_clerk.browser_0cc2cc_5.127.2.js +124 -0
- package/client/clerk-js-dist/ui-common_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/up-api-keys-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/up-api-keys-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/up-billing-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/up-billing-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/up-plans-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/up-plans-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/useravatar_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/useravatar_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/userbutton_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/userbutton_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/userprofile_clerk.browser_0cc2cc_5.127.2.js +4 -0
- package/client/clerk-js-dist/userprofile_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/userverification_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/userverification_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/vendors_clerk.browser_0cc2cc_5.127.2.js +20 -0
- package/client/clerk-js-dist/vendors_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/vendors_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/waitlist_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/waitlist_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/web3-solana-wallet-buttons_clerk.browser_0cc2cc_5.127.2.js +143 -0
- package/client/clerk-js-dist/web3-solana-wallet-buttons_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/zxcvbn-common_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/client/clerk-js-dist/zxcvbn-common_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/client/clerk-js-dist/zxcvbn-common_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-js-dist/zxcvbn-ts-core_clerk.browser_0cc2cc_5.127.2.js +2 -0
- package/client/clerk-js-dist/zxcvbn-ts-core_clerk.headless.browser_540199_5.127.2.js +2 -0
- package/client/clerk-js-dist/zxcvbn-ts-core_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/client/clerk-mirror.css +72 -0
- package/client/clerk-mirror.tsx +204 -0
- package/client/clerk.browser.js +19 -0
- package/dist/client/clerk-js-dist/167_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/2172_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/2172_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/368_clerk.headless_b86dff_5.127.2.js +3 -0
- package/dist/client/clerk-js-dist/377_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/4170_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/4170_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/437_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/5192_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/5192_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/553_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/5645_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/5645_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/623_clerk.headless_b86dff_5.127.2.js +42 -0
- package/dist/client/clerk-js-dist/7067_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/7067_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/7502_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/7502_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/785_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/785_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/8043_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/825_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/825_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/890_clerk.headless_b86dff_5.127.2.js +2 -0
- package/dist/client/clerk-js-dist/901_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/apiKeys_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/apiKeys_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/base-account-sdk_clerk.browser_0cc2cc_5.127.2.js +42 -0
- package/dist/client/clerk-js-dist/base-account-sdk_clerk.headless.browser_540199_5.127.2.js +42 -0
- package/dist/client/clerk-js-dist/base-account-sdk_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/blankcaptcha_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/blankcaptcha_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/checkout_clerk.browser_0cc2cc_5.127.2.js +9 -0
- package/dist/client/clerk-js-dist/checkout_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/clerk.browser.js +19 -0
- package/dist/client/clerk-js-dist/clerk.headless.browser.js +19 -0
- package/dist/client/clerk-js-dist/clerk.headless.js +19 -0
- package/dist/client/clerk-js-dist/clerk.js +809 -0
- package/dist/client/clerk-js-dist/clerk.legacy.browser.js +1 -0
- package/dist/client/clerk-js-dist/clerk.no-rhc.js +766 -0
- package/dist/client/clerk-js-dist/coinbase-wallet-sdk_clerk.browser_0cc2cc_5.127.2.js +3 -0
- package/dist/client/clerk-js-dist/coinbase-wallet-sdk_clerk.headless.browser_540199_5.127.2.js +3 -0
- package/dist/client/clerk-js-dist/coinbase-wallet-sdk_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/cookieSuffix_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/cookieSuffix_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/cookieSuffix_clerk.headless_b86dff_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/cookieSuffix_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/copy-api-key-modal_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/copy-api-key-modal_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/createorganization_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/createorganization_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/enableOrganizationsPrompt_clerk.browser_0cc2cc_5.127.2.js +247 -0
- package/dist/client/clerk-js-dist/enableOrganizationsPrompt_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/framework_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/framework_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/impersonationfab_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/impersonationfab_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/keylessPrompt_clerk.browser_0cc2cc_5.127.2.js +228 -0
- package/dist/client/clerk-js-dist/keylessPrompt_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/oauthConsent_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/oauthConsent_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/onetap_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/onetap_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/op-api-keys-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/op-api-keys-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/op-billing-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/op-billing-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/op-plans-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/op-plans-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/organizationlist_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/organizationlist_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/organizationprofile_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/organizationprofile_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/organizationswitcher_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/organizationswitcher_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/payment-attempt-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/payment-attempt-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/planDetails_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/planDetails_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/prefetchorganizationlist_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/prefetchorganizationlist_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/pricingTable_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/pricingTable_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/query-core-vendors_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/query-core-vendors_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/query-core-vendors_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/revoke-api-key-modal_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/revoke-api-key-modal_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/sessionTasks_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/sessionTasks_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/signin_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/signin_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/signup_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/signup_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/statement-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/statement-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/stripe-vendors_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/stripe-vendors_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/stripe-vendors_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/subscriptionDetails_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/subscriptionDetails_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/taskChooseOrganization_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/taskChooseOrganization_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/taskResetPassword_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/taskResetPassword_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/taskSetupMFA_clerk.browser_0cc2cc_5.127.2.js +4 -0
- package/dist/client/clerk-js-dist/taskSetupMFA_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/ui-common_clerk.browser_0cc2cc_5.127.2.js +124 -0
- package/dist/client/clerk-js-dist/ui-common_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/up-api-keys-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/up-api-keys-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/up-billing-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/up-billing-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/up-plans-page_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/up-plans-page_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/useravatar_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/useravatar_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/userbutton_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/userbutton_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/userprofile_clerk.browser_0cc2cc_5.127.2.js +4 -0
- package/dist/client/clerk-js-dist/userprofile_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/userverification_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/userverification_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/vendors_clerk.browser_0cc2cc_5.127.2.js +20 -0
- package/dist/client/clerk-js-dist/vendors_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/vendors_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/waitlist_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/waitlist_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/web3-solana-wallet-buttons_clerk.browser_0cc2cc_5.127.2.js +143 -0
- package/dist/client/clerk-js-dist/web3-solana-wallet-buttons_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/zxcvbn-common_clerk.browser_0cc2cc_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/zxcvbn-common_clerk.headless.browser_540199_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/zxcvbn-common_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-js-dist/zxcvbn-ts-core_clerk.browser_0cc2cc_5.127.2.js +2 -0
- package/dist/client/clerk-js-dist/zxcvbn-ts-core_clerk.headless.browser_540199_5.127.2.js +2 -0
- package/dist/client/clerk-js-dist/zxcvbn-ts-core_clerk.legacy.browser_6070dd_5.127.2.js +1 -0
- package/dist/client/clerk-mirror.bundle.js +321 -0
- package/dist/client/clerk-mirror.css +72 -0
- package/dist/client/clerk-mirror.d.ts +33 -0
- package/dist/client/clerk-mirror.js +143 -0
- package/dist/client/clerk-mirror.tsx +204 -0
- package/dist/client/clerk.browser.js +19 -0
- package/dist/src/clerk-capabilities.d.ts +4 -0
- package/dist/src/clerk-capabilities.js +1132 -0
- package/dist/src/clerk-conformance.d.ts +32 -0
- package/dist/src/clerk-conformance.js +158 -0
- package/dist/src/clerk-connector.d.ts +170 -0
- package/dist/src/clerk-connector.js +223 -0
- package/dist/src/clerk-events.d.ts +55 -0
- package/dist/src/clerk-events.js +146 -0
- package/dist/src/clerk-fapi.d.ts +19 -0
- package/dist/src/clerk-fapi.js +665 -0
- package/dist/src/clerk-jwt.d.ts +109 -0
- package/dist/src/clerk-jwt.js +230 -0
- package/dist/src/clerk-mirror-ui.d.ts +34 -0
- package/dist/src/clerk-mirror-ui.js +160 -0
- package/dist/src/clerk-server.d.ts +35 -0
- package/dist/src/clerk-server.js +172 -0
- package/dist/src/clerk-twin.d.ts +28 -0
- package/dist/src/clerk-twin.js +1658 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +35 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.js +56 -0
- package/dist/test-fixtures/clerk-openapi-operations.SOURCE.md +16 -0
- package/dist/test-fixtures/clerk-openapi-operations.json +1989 -0
- package/package.json +76 -0
- package/src/clerk-capabilities.ts +1246 -0
- package/src/clerk-conformance.ts +172 -0
- package/src/clerk-connector.ts +268 -0
- package/src/clerk-events.ts +166 -0
- package/src/clerk-fapi.ts +673 -0
- package/src/clerk-jwt.ts +256 -0
- package/src/clerk-mirror-ui.ts +165 -0
- package/src/clerk-server.ts +175 -0
- package/src/clerk-twin.ts +1580 -0
- package/src/cli.ts +33 -0
- package/src/index.ts +94 -0
- package/test-fixtures/clerk-openapi-operations.SOURCE.md +16 -0
- package/test-fixtures/clerk-openapi-operations.json +1989 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["3875"],{59900:function(a,t,e){e.r(t),e.d(t,{BlankCaptchaModal:()=>o});var l=e(73312),c=e(92418),n=e(2672),i=e(64204),r=e(24676);let h=(0,n.withCardStateProvider)(()=>{let{parsedCaptcha:a}=(0,i.useAppearance)(),{locale:t}=(0,i.useLocalizations)(),e=a?.theme,n=a?.size,r=a?.language||t?.toLowerCase();return(0,l.tZ)(c.Z.Root,{children:(0,l.tZ)(c.Z.Content,{children:(0,l.tZ)("div",{id:"cl-modal-captcha-container","data-cl-theme":e,"data-cl-size":n,"data-cl-language":r})})})});function o(){return(0,l.tZ)(r.Route,{path:"blank-captcha",children:(0,l.tZ)("div",{children:(0,l.tZ)(i.Flow.Root,{flow:"blankCaptcha",children:(0,l.tZ)(r.Switch,{children:(0,l.tZ)(r.Route,{index:!0,children:(0,l.tZ)(h,{})})})})})})}o.displayName="BlankCaptchaModal"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["3875"],{59900:function(a,l,t){t.r(l),t.d(l,{BlankCaptchaModal:()=>r});var e=t(73312),n=t(92418),c=t(2672),i=t(64204),o=t(24676);let d=(0,c.withCardStateProvider)(()=>{let{parsedCaptcha:a}=(0,i.useAppearance)(),{locale:l}=(0,i.useLocalizations)(),t=null==a?void 0:a.theme,c=null==a?void 0:a.size,o=(null==a?void 0:a.language)||(null==l?void 0:l.toLowerCase());return(0,e.tZ)(n.Z.Root,{children:(0,e.tZ)(n.Z.Content,{children:(0,e.tZ)("div",{id:"cl-modal-captcha-container","data-cl-theme":t,"data-cl-size":c,"data-cl-language":o})})})});function r(){return(0,e.tZ)(o.Route,{path:"blank-captcha",children:(0,e.tZ)("div",{children:(0,e.tZ)(i.Flow.Root,{flow:"blankCaptcha",children:(0,e.tZ)(o.Switch,{children:(0,e.tZ)(o.Route,{index:!0,children:(0,e.tZ)(d,{})})})})})})}r.displayName="BlankCaptchaModal"}}]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["8237"],{10670:function(e,t,r){r.r(t),r.d(t,{Checkout:()=>Q});var i=r(73312),o=r(81102),n=r(11576),a=r(64204),l=r(61869),s=r(69144),c=r(28e3),d=r(39082),u=r(73003),p=r(65695),m=r(24676);let h=e=>e[0].toUpperCase()+e.slice(1),y=(e,t,r)=>e+(t-e)*r,f=({positionX:e,positionY:t})=>{let r=(0,s.useRef)(null),[o,n]=(0,s.useState)({x:256,y:256}),l="undefined"==typeof window||window.matchMedia("(hover: hover) and (pointer: fine)").matches;(0,s.useEffect)(()=>{if(!l)return;let i=()=>{n(r=>({x:y(r.x,e,.15),y:y(r.y,t,.15)})),r.current=requestAnimationFrame(i)};return r.current=requestAnimationFrame(i),()=>{r.current&&cancelAnimationFrame(r.current)}},[e,t,l]);let c=(0,s.useId)(),d=(0,s.useId)(),u=(0,s.useId)();return(0,i.BX)(a.Box,{elementDescriptor:a.descriptors.checkoutSuccessRings,as:"svg",viewBox:"0 0 512 512",sx:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":!0,children:[(0,i.BX)("defs",{children:[(0,i.BX)("radialGradient",{id:"clerk-checkout-success-gradient",children:[(0,i.tZ)("stop",{offset:"0%",style:{stopColor:"var(--ring-highlight)"}}),(0,i.tZ)("stop",{offset:"100%",stopOpacity:"0",style:{stopColor:"var(--ring-highlight)"}})]}),(0,i.tZ)("filter",{id:"clerk-checkout-success-blur-effect",children:(0,i.tZ)("feGaussianBlur",{stdDeviation:"10"})}),[{r:225,maskStart:10,maskEnd:90,id:c},{r:162.5,maskStart:15,maskEnd:85,id:d},{r:100,maskStart:20,maskEnd:80,id:u}].map(({maskStart:e,maskEnd:t,id:r})=>(0,i.BX)("linearGradient",{id:`gradient-${r}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,i.tZ)("stop",{offset:`${e+5}%`,stopColor:"white",stopOpacity:"0"}),(0,i.tZ)("stop",{offset:`${e+35}%`,stopColor:"white",stopOpacity:"1"}),(0,i.tZ)("stop",{offset:`${t-35}%`,stopColor:"white",stopOpacity:"1"}),(0,i.tZ)("stop",{offset:`${t-5}%`,stopColor:"white",stopOpacity:"0"})]},r)),(0,i.tZ)("mask",{id:"clerk-checkout-success-mask",children:[{r:225,id:c},{r:162.5,id:d},{r:100,id:u}].map(({r:e,id:t})=>(0,i.tZ)("circle",{cx:"256",cy:"256",r:e,stroke:`url(#gradient-${t})`,fill:"none",strokeWidth:"1"},t))})]}),(0,i.BX)("g",{mask:"url(#clerk-checkout-success-mask)",children:[(0,i.tZ)("rect",{width:"512",height:"512",style:{fill:"var(--ring-fill)"}}),l&&(0,i.tZ)("rect",{id:"movingGradientHighlight",width:"256",height:"256",x:o.x-128,y:o.y-128,fill:"url(#clerk-checkout-success-gradient)",filter:"url(#clerk-checkout-success-blur-effect)"})]})]})},g=()=>{let e=(0,m.useRouter)(),{setIsOpen:t}=(0,o.useDrawerContext)(),{newSubscriptionRedirectUrl:r}=(0,n.useCheckoutContext)(),{checkout:y}=(0,l.z4)(),{totals:g,paymentMethod:b,planPeriodStart:x,freeTrialEndsAt:Z}=y,[$,B]=(0,s.useState)({x:256,y:256}),k=(0,p.Tb)(),{animations:w}=(0,a.useAppearance)().parsedLayout,v=!k&&!0===w,S=(0,s.useRef)(null),z="undefined"==typeof window||window.matchMedia("(hover: hover) and (pointer: fine)").matches;return g?(0,i.BX)(i.HY,{children:[(0,i.tZ)(o.Drawer.Body,{children:(0,i.BX)(a.Span,{elementDescriptor:a.descriptors.checkoutSuccessRoot,sx:e=>({"--ring-fill":e.colors.$neutralAlpha200,"--ring-highlight":e.colors.$success500,margin:"auto",position:"relative",aspectRatio:"1/1",display:"grid",width:"100%",flexShrink:0,transformOrigin:"bottom center",animationName:"scaleIn",animationDuration:`${u.bf.slowest}ms`,animationTimingFunction:u.$$.bezier,animationFillMode:"forwards",opacity:0,overflow:"hidden",backgroundColor:e.colors.$colorBackground,"@keyframes scaleIn":{"0%":{filter:"blur(10px)",transform:"scale(0.85)",opacity:0},"100%":{filter:"blur(0px)",transform:"scale(1)",opacity:1}},...!v&&{animation:"none",opacity:1}}),ref:S,onMouseMove:e=>{if(z&&S.current){let t=S.current.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,o=t.width;o>0?B({x:r/o*512,y:i/o*512}):B({x:256,y:256})}},children:[(0,i.tZ)(f,{positionX:$.x,positionY:$.y}),(0,i.BX)(a.Box,{elementDescriptor:a.descriptors.checkoutSuccessBadge,sx:e=>({margin:"auto",gridArea:"1/1",display:"flex",position:"relative",width:e.sizes.$16,height:e.sizes.$16,borderRadius:e.radii.$circle,backgroundImage:"linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.30) 95.31%)",boxShadow:"0px 4px 12px 0px rgba(0, 0, 0, 0.35), 0px 1px 0px 0px rgba(255, 255, 255, 0.05) inset",color:z?e.colors.$success500:e.colors.$colorForeground,":before":{content:'""',position:"absolute",inset:e.space.$1,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorBackground}}),children:[(0,i.tZ)("svg",{fill:"none",viewBox:"0 0 10 10","aria-hidden":"true",style:{position:"relative",margin:"auto",width:"1rem",height:"1rem"},children:(0,i.tZ)("path",{d:"m1 6 3 3 5-8",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"1",pathLength:"1",style:{strokeDashoffset:"1",animation:v?`check ${u.bf.drawer}ms ${u.$$.bezier} forwards ${u.bf.slow}ms`:"none",...!v&&{strokeDashoffset:"0"}}})}),(0,i.tZ)("style",{children:`
|
|
2
|
+
@keyframes check {
|
|
3
|
+
0% {
|
|
4
|
+
stroke-dashoffset: 1;
|
|
5
|
+
}
|
|
6
|
+
100% {
|
|
7
|
+
stroke-dashoffset: 0;
|
|
8
|
+
}
|
|
9
|
+
`})]}),(0,i.BX)(a.Span,{sx:e=>({margin:"auto",gridArea:"1/1",position:"relative",textAlign:"center",transform:`translateY(${e.space.$20})`}),children:[(0,i.tZ)(a.Heading,{elementDescriptor:a.descriptors.checkoutSuccessTitle,as:"h2",textVariant:"h2",localizationKey:Z?(0,a.localizationKeys)("billing.checkout.title__trialSuccess"):g.totalDueNow.amount>0?(0,a.localizationKeys)("billing.checkout.title__paymentSuccessful"):(0,a.localizationKeys)("billing.checkout.title__subscriptionSuccessful"),sx:e=>({opacity:0,animationName:"slideUp",animationDuration:`${u.bf.slowest}ms`,animationTimingFunction:u.$$.bezier,animationFillMode:"forwards",color:e.colors.$colorForeground,"@keyframes slideUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!v&&{opacity:1,animation:"none"}})}),(0,i.tZ)(a.Text,{elementDescriptor:a.descriptors.checkoutSuccessDescription,colorScheme:"secondary",sx:e=>({textAlign:"center",paddingInline:e.space.$8,marginBlockStart:e.space.$2,opacity:0,animationName:"slideUp",animationDuration:`${1.5*u.bf.slowest}ms`,animationTimingFunction:u.$$.bezier,animationFillMode:"forwards","@keyframes slideUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!v&&{opacity:1,animation:"none"}}),localizationKey:g.totalDueNow.amount>0?(0,a.localizationKeys)("billing.checkout.description__paymentSuccessful"):(0,a.localizationKeys)("billing.checkout.description__subscriptionSuccessful")})]})]})}),(0,i.BX)(o.Drawer.Footer,{sx:e=>({rowGap:e.space.$4,animationName:"footerSlideInUp",animationDuration:`${u.bf.drawer}ms`,animationTimingFunction:u.$$.bezier,"@keyframes footerSlideInUp":{"0%":{transform:"translateY(100%)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!v&&{animation:"none"}}),children:[(0,i.BX)(c.a.Root,{children:[(0,i.BX)(c.a.Group,{variant:"secondary",children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.checkout.lineItems.title__totalPaid")}),(0,i.tZ)(c.a.Description,{text:`${g.totalDueNow.currencySymbol}${g.totalDueNow.amountFormatted}`})]}),Z?(0,i.BX)(c.a.Group,{variant:"secondary",children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.checkout.lineItems.title__freeTrialEndsAt")}),(0,i.tZ)(c.a.Description,{text:(0,d.p)(Z)})]}):null,(0,i.BX)(c.a.Group,{variant:"secondary",children:[(0,i.tZ)(c.a.Title,{title:g.totalDueNow.amount>0||null!==Z?(0,a.localizationKeys)("billing.checkout.lineItems.title__paymentMethod"):(0,a.localizationKeys)("billing.checkout.lineItems.title__subscriptionBegins")}),(0,i.tZ)(c.a.Description,{text:g.totalDueNow.amount>0||null!==Z?b?"card"!==b.paymentType?b.paymentType?`${h(b.paymentType)}`:"–":b.cardType?`${h(b.cardType)} \u{22EF} ${b.last4}`:"–":"–":x?(0,d.p)(new Date(x)):"–"})]})]}),(0,i.tZ)(a.Button,{onClick:()=>{r&&e.navigate(r),t&&t(!1)},localizationKey:(0,a.localizationKeys)("formButtonPrimary")})]})]}):null};var b=r(92418),x=r(2672),Z=r(47291),$=r(3146),B=r(19732),k=r(88870),w=r(22189),v=r(34174),S=r(74557),z=r(79176),_=r(95746);let D=e=>e[0].toUpperCase()+e.slice(1),C="payment_method_id",T=(0,x.withCardStateProvider)(()=>{let{checkout:e}=(0,l.z4)(),{id:t,plan:r,totals:n,isImmediatePlanChange:s,planPeriod:d,freeTrialEndsAt:u}=e;if(!t)return null;let p=!!n.credits?.proration?.amount&&n.credits.proration.amount.amount>0,m=!!n.credits?.payer?.appliedAmount&&n.credits.payer.appliedAmount.amount>0,h=!!n.pastDue?.amount&&n.pastDue.amount>0,y="month"===d?r.fee:r.annualMonthlyFee;return(0,i.BX)(o.Drawer.Body,{children:[(0,i.tZ)(a.Box,{elementDescriptor:a.descriptors.checkoutFormLineItemsRoot,sx:e=>({padding:e.space.$4,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,i.BX)(c.a.Root,{children:[(0,i.BX)(c.a.Group,{children:[(0,i.tZ)(c.a.Title,{title:r.name,description:"annual"===d?(0,a.localizationKeys)("billing.billedAnnually"):void 0,badge:r.freeTrialEnabled&&u?(0,i.tZ)(_.u,{subscription:{status:"free_trial"}}):null}),(0,i.tZ)(c.a.Description,{prefix:"annual"===d?"x12":void 0,text:`${y.currencySymbol}${y.amountFormatted}`,suffix:(0,a.localizationKeys)("billing.checkout.perMonth")})]}),(0,i.BX)(c.a.Group,{borderTop:!0,variant:"tertiary",children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.subtotal")}),(0,i.tZ)(c.a.Description,{text:`${n.subtotal.currencySymbol}${n.subtotal.amountFormatted}`})]}),p&&(0,i.BX)(c.a.Group,{variant:"tertiary",children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.creditRemainder")}),(0,i.tZ)(c.a.Description,{text:`- ${n.credits?.proration?.amount.currencySymbol}${n.credits?.proration?.amount.amountFormatted}`})]}),m&&(0,i.BX)(c.a.Group,{variant:"tertiary",children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.payerCreditRemainder")}),(0,i.tZ)(c.a.Description,{text:`- ${n.credits?.payer?.appliedAmount?.currencySymbol}${n.credits?.payer?.appliedAmount?.amountFormatted}`})]}),h&&(0,i.BX)(c.a.Group,{variant:"tertiary",children:[(0,i.BX)(B.u.Root,{children:[(0,i.tZ)(B.u.Trigger,{children:(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.pastDue"),icon:v.I$})}),(0,i.tZ)(B.u.Content,{text:(0,a.localizationKeys)("billing.checkout.pastDueNotice")})]}),(0,i.tZ)(c.a.Description,{text:`${n.pastDue?.currencySymbol}${n.pastDue?.amountFormatted}`})]}),!!u&&!!r.freeTrialDays&&n.totalDueAfterFreeTrial&&(0,i.BX)(c.a.Group,{variant:"tertiary",children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.checkout.totalDueAfterTrial",{days:r.freeTrialDays})}),(0,i.tZ)(c.a.Description,{text:`${n.totalDueAfterFreeTrial.currencySymbol}${n.totalDueAfterFreeTrial.amountFormatted}`})]}),(0,i.BX)(c.a.Group,{borderTop:!0,children:[(0,i.tZ)(c.a.Title,{title:(0,a.localizationKeys)("billing.totalDueToday")}),(0,i.tZ)(c.a.Description,{text:`${n.totalDueNow.currencySymbol}${n.totalDueNow.amountFormatted}`})]})]})}),!s&&(0,i.tZ)(a.Box,{elementDescriptor:a.descriptors.checkoutFormLineItemsRoot,sx:e=>({paddingBlockStart:e.space.$4,paddingInline:e.space.$4}),children:(0,i.tZ)(a.Text,{localizationKey:(0,a.localizationKeys)("billing.checkout.downgradeNotice"),variant:"caption",colorScheme:"secondary"})}),(0,i.tZ)(P,{})]})}),K=()=>{let{onSubscriptionComplete:e}=(0,n.useCheckoutContext)(),{checkout:t}=(0,l.z4)(),{id:r,confirm:i}=t,o=(0,x.useCardState)();if(!r)throw Error("Checkout not found");let a=async t=>{o.setLoading(),o.setError(void 0);let{data:r,error:n}=await i(t);n?(0,k.S3)(n,[],o.setError):r&&e?.(),o.setIdle()};return{payWithExistingPaymentMethod:e=>(e.preventDefault(),a({paymentMethodId:new FormData(e.currentTarget).get(C)})),addPaymentMethodAndPay:e=>a(e),payWithTestCard:()=>a({gateway:"stripe",useTestCard:!0}),payWithoutPaymentMethod:e=>(e.preventDefault(),a({}))}},P=()=>{let{checkout:e}=(0,l.z4)(),{id:t}=e,{isLoading:r}=(0,n.usePaymentMethods)();return t?r?(0,i.tZ)(a.Spinner,{sx:{margin:"auto"}}):(0,i.tZ)(A,{}):null},A=()=>{let{checkout:e}=(0,l.z4)(),{id:t,isImmediatePlanChange:r,needsPaymentMethod:o}=e,{data:c}=(0,n.usePaymentMethods)(),[d,u]=(0,s.useState)(()=>c.length>0?"existing":"new");return t?(0,i.BX)(a.Col,{elementDescriptor:a.descriptors.checkoutFormElementsRoot,gap:4,sx:e=>({padding:e.space.$4}),children:[(0,i.tZ)(i.HY,{children:c.length>0&&r&&o&&(0,i.BX)(Z.s.Root,{"aria-label":"Payment method source",value:d,onChange:e=>u(e),size:"lg",fullWidth:!0,children:[(0,i.tZ)(Z.s.Button,{value:"existing",text:(0,a.localizationKeys)("billing.paymentMethods__label")}),(0,i.tZ)(Z.s.Button,{value:"new",text:(0,a.localizationKeys)("billing.addPaymentMethod__label")})]})}),o?"existing"===d?(0,i.tZ)(L,{paymentMethods:c}):"new"===d&&(0,i.tZ)(M,{}):(0,i.tZ)(R,{})]}):null},F=()=>{let{isLoading:e}=(0,x.useCardState)(),{payWithTestCard:t}=K();return(0,i.BX)(a.Box,{sx:e=>({background:e.colors.$neutralAlpha50,padding:e.space.$2x5,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha100,display:"flex",flexDirection:"column",rowGap:e.space.$2,position:"relative"}),children:[(0,i.tZ)(a.Box,{sx:e=>({position:"absolute",inset:0,background:`repeating-linear-gradient(-45deg,${e.colors.$warningAlpha100},${e.colors.$warningAlpha100} 6px,${e.colors.$warningAlpha150} 6px,${e.colors.$warningAlpha150} 12px)`,maskImage:"linear-gradient(transparent 20%, black)",pointerEvents:"none"})}),(0,i.BX)(a.Flex,{sx:e=>({alignItems:"center",justifyContent:"center",flexDirection:"column",rowGap:e.space.$2}),children:[(0,i.tZ)(a.Text,{sx:e=>({color:e.colors.$warning500,fontWeight:e.fontWeights.$semibold}),localizationKey:(0,a.localizationKeys)("billing.paymentMethod.dev.developmentMode")}),(0,i.tZ)(a.Button,{type:"button",block:!0,variant:"bordered",localizationKey:(0,a.localizationKeys)("userProfile.billingPage.paymentMethodsSection.payWithTestCardButton"),colorScheme:"secondary",isLoading:e,onClick:t})]})]})},X=()=>{let{checkout:e}=(0,l.z4)(),{status:t,freeTrialEndsAt:r,totals:i}=e;if("needs_initialization"===t)throw Error("Clerk: Invalid state");return r?(0,a.localizationKeys)("billing.startFreeTrial"):i.totalDueNow.amount>0?(0,a.localizationKeys)("billing.pay",{amount:`${i.totalDueNow.currencySymbol}${i.totalDueNow.amountFormatted}`}):(0,a.localizationKeys)("billing.subscribe")},R=(0,x.withCardStateProvider)(()=>{let{for:e}=(0,n.useCheckoutContext)(),{payWithoutPaymentMethod:t}=K(),r=(0,x.useCardState)();return(0,i.BX)(a.Form,{onSubmit:t,sx:E,children:[(0,i.tZ)(b.Z.Alert,{children:r.error}),(0,i.tZ)(I,{})]})}),M=(0,x.withCardStateProvider)(()=>{let{addPaymentMethodAndPay:e}=K(),t=X(),{checkout:r}=(0,l.z4)();return(0,i.BX)(S.fC,{onSuccess:e,checkout:r,children:[(0,i.tZ)(w.P,{children:(0,i.tZ)(F,{})}),(0,i.tZ)(S.OL,{text:t})]})}),I=e=>{let t=(0,x.useCardState)(),r=X();return(0,i.tZ)(a.Button,{type:"submit",colorScheme:"primary",size:"sm",textVariant:"buttonLarge",sx:{width:"100%"},isLoading:t.isLoading,localizationKey:r,...e})},E=e=>({display:"flex",flexDirection:"column",rowGap:e.space.$4}),L=(0,x.withCardStateProvider)(({paymentMethods:e})=>{let{checkout:t}=(0,l.z4)(),{paymentMethod:r,isImmediatePlanChange:o,needsPaymentMethod:n}=t,{payWithExistingPaymentMethod:c}=K(),d=(0,x.useCardState)(),[u,p]=(0,s.useState)(r||e.find(e=>e.isDefault)),m=(0,s.useMemo)(()=>e.map(e=>{let t="card"!==e.paymentType?e.paymentType?`${D(e.paymentType)}`:"–":e.cardType?`${D(e.cardType)} \u{22EF} ${e.last4}`:"–";return{value:e.id,label:t}}),[e]);return(0,i.BX)(a.Form,{onSubmit:c,sx:E,children:[o&&n?(0,i.BX)($.Ph,{elementId:"paymentMethod",options:m,value:u?.id||null,onChange:t=>{p(e.find(e=>e.id===t.value))},portal:!0,children:[(0,i.tZ)("input",{name:C,type:"hidden",value:u?.id}),(0,i.tZ)($.UN,{icon:v.jC,sx:e=>({justifyContent:"space-between",backgroundColor:e.colors.$colorBackground}),children:u&&(0,i.tZ)(z.Q,{paymentMethod:u})}),(0,i.tZ)($.pp,{sx:e=>({paddingBlock:e.space.$1,color:e.colors.$colorForeground})})]}):(0,i.tZ)("input",{name:C,type:"hidden",value:u?.id}),(0,i.tZ)(b.Z.Alert,{children:d.error}),(0,i.tZ)(I,{})]})});var j=r(7439);let W=()=>{let{checkout:e}=(0,l.z4)();return(0,s.useEffect)(()=>(e.start(),e.clear),[]),null},G=({children:e})=>{let{planId:t,planPeriod:r,for:o}=(0,j.w6)();return(0,i.BX)(l.hA,{for:o,planId:t,planPeriod:r,children:[(0,i.tZ)(W,{}),e]})},N=({children:e,name:t})=>{let{checkout:r}=(0,l.z4)();return r.status!==t?null:e},U=({children:e,status:t})=>{let{checkout:r}=(0,l.z4)(),{fetchStatus:i,error:o}=r;return(0,s.useMemo)(()=>{if("error"===i){let e=o.errors.map(e=>e.code);if(e.includes("missing_payer_email"))return"missing_payer_email";if(e.includes("invalid_plan_change"))return"invalid_plan_change"}return i},[i])!==t?null:e};var Y=r(9117),H=r(99140);let O=()=>{let{checkout:e}=(0,l.z4)(),{translateError:t}=(0,a.useLocalizations)(),{t:r}=(0,a.useLocalizations)();return(0,i.tZ)(o.Drawer.Body,{children:(0,i.tZ)(a.Flex,{align:"center",justify:"center",sx:e=>({height:"100%",padding:e.space.$4,fontSize:e.fontSizes.$md}),children:(0,i.tZ)(Y.b,{variant:"danger",colorScheme:"danger",children:e.error?t(e.error.errors[0]):r((0,a.localizationKeys)("unstable__errors.form_param_value_invalid"))})})})},V=()=>{let{planPeriod:e}=(0,n.useCheckoutContext)(),{checkout:t}=(0,l.z4)(),r=t.error,d=(0,s.useMemo)(()=>{let e=r?.errors.find(e=>"invalid_plan_change"===e.code);return e?.meta?.plan},[r]),u=(0,s.useMemo)(()=>{let e=r?.errors.find(e=>"invalid_plan_change"===e.code);return e?.meta?.isPlanUpgradePossible||!1},[r]);return d?(0,i.tZ)(o.Drawer.Body,{children:(0,i.BX)(a.Flex,{gap:4,direction:"col",children:[(0,i.tZ)(a.Box,{elementDescriptor:a.descriptors.checkoutFormLineItemsRoot,sx:e=>({padding:e.space.$4,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,i.tZ)(c.a.Root,{children:(0,i.BX)(c.a.Group,{children:[(0,i.tZ)(c.a.Title,{title:d.name,description:"annual"===e?(0,a.localizationKeys)("billing.billedAnnually"):void 0}),(0,i.tZ)(c.a.Description,{prefix:"annual"===e?"x12":void 0,text:`${d.currency_symbol}${"month"===e?d.amount_formatted:d.annual_monthly_amount_formatted}`,suffix:(0,a.localizationKeys)("billing.checkout.perMonth")})]})})}),(0,i.tZ)(a.Box,{sx:e=>({padding:e.space.$4}),children:(0,i.tZ)(Y.b,{variant:"info",colorScheme:"info",title:u?(0,a.localizationKeys)("billing.cannotSubscribeMonthly"):(0,a.localizationKeys)("billing.cannotSubscribeUnrecoverable")})})]})}):null},q=()=>{let{checkout:e}=(0,l.z4)(),{setIsOpen:t}=(0,o.useDrawerContext)();return(0,i.tZ)(o.Drawer.Body,{children:(0,i.tZ)(a.Box,{sx:e=>({padding:e.space.$4}),children:(0,i.tZ)(H._,{title:(0,a.localizationKeys)("billing.checkout.emailForm.title"),subtitle:(0,a.localizationKeys)("billing.checkout.emailForm.subtitle"),onSuccess:()=>void e.start(),onReset:()=>t(!1),disableAutoFocus:!0})})})},Q=e=>(0,i.tZ)(a.Flow.Root,{flow:"checkout",children:(0,i.tZ)(a.Flow.Part,{children:(0,i.tZ)(n.SubscriberTypeContext.Provider,{value:e.for||"user",children:(0,i.tZ)(n.CheckoutContext.Provider,{value:{componentName:"Checkout",...e},children:(0,i.BX)(o.Drawer.Content,{children:[(0,i.tZ)(o.Drawer.Header,{title:(0,a.localizationKeys)("billing.checkout.title")}),(0,i.BX)(G,{children:[(0,i.BX)(N,{name:"needs_initialization",children:[(0,i.tZ)(U,{status:"fetching",children:(0,i.tZ)(a.Spinner,{sx:{margin:"auto"}})}),(0,i.tZ)(U,{status:"invalid_plan_change",children:(0,i.tZ)(V,{})}),(0,i.tZ)(U,{status:"missing_payer_email",children:(0,i.tZ)(q,{})}),(0,i.tZ)(U,{status:"error",children:(0,i.tZ)(O,{})})]}),(0,i.tZ)(N,{name:"completed",children:(0,i.tZ)(g,{})}),(0,i.tZ)(N,{name:"needs_confirmation",children:(0,i.tZ)(T,{})})]})]})})})})})},74557:function(e,t,r){r.d(t,{hG:()=>z,ph:()=>S,fC:()=>w,OL:()=>_});var i=r(73312),o=r(61869),n=r(69144),a=r(92418),l=r(2672),s=r(70431),c=r(19460),d=r(68487),u=r(68849),p=r(88870),m=r(11576),h=r(64204);let y=e=>(0,i.tZ)(h.Box,{sx:[e=>({height:e.space.$2,width:"100%",borderRadius:e.radii.$md,background:e.colors.$neutralAlpha100}),e.sx]}),f=()=>(0,i.tZ)(y,{sx:e=>({height:e.space.$10,width:"100%"})}),g=e=>(0,i.tZ)(h.Flex,{direction:"col",gap:2,children:e.children}),b=()=>(0,i.tZ)(h.Box,{"aria-label":"Loading...",sx:{position:"relative",minHeight:0,flex:1,overflowY:"auto"},children:(0,i.BX)(h.Flex,{direction:"col",gap:5,children:[(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$24})}),(0,i.tZ)(f,{})]}),(0,i.BX)(h.Grid,{columns:2,gap:4,children:[(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$20})}),(0,i.tZ)(f,{})]}),(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$24})}),(0,i.tZ)(f,{})]})]}),(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$16})}),(0,i.tZ)(f,{})]}),(0,i.BX)(g,{children:[(0,i.tZ)(y,{}),(0,i.tZ)(y,{}),(0,i.tZ)(y,{sx:{width:"66.666667%"}})]})]})}),[x,Z]=(0,o.uH)("AddPaymentMethodRoot"),$=({children:e,checkout:t,...r})=>{let a=(0,m.useSubscriberTypeContext)(),l=(0,n.useRef)(null),{t:s}=(0,h.useLocalizations)(),[c,d]=(0,n.useState)(void 0),[p,y]=(0,n.useState)(void 0),[f,g]=(0,n.useState)(void 0),b=(e=>{let t=(0,h.useAppearance)().parsedInternalTheme;return(0,n.useMemo)(()=>{if(!e)return;let{colors:r,fontWeights:i,fontSizes:o,radii:n,space:a}=t;return{colorPrimary:(0,u.Aj)(e,r.$primary500,r.$colorBackground),colorBackground:(0,u.Aj)(e,r.$colorInput,r.$colorBackground),colorText:(0,u.Aj)(e,r.$colorForeground,r.$colorBackground),colorTextSecondary:(0,u.Aj)(e,r.$colorMutedForeground,r.$colorBackground),colorSuccess:(0,u.Aj)(e,r.$success500,r.$colorBackground),colorDanger:(0,u.Aj)(e,r.$danger500,r.$colorBackground),colorWarning:(0,u.Aj)(e,r.$warning500,r.$colorBackground),fontWeightNormal:(0,u.uj)(e,"font-weight",i.$normal.toString()),fontWeightMedium:(0,u.uj)(e,"font-weight",i.$medium.toString()),fontWeightBold:(0,u.uj)(e,"font-weight",i.$bold.toString()),fontSizeXl:(0,u.uj)(e,"font-size",o.$xl),fontSizeLg:(0,u.uj)(e,"font-size",o.$lg),fontSizeSm:(0,u.uj)(e,"font-size",o.$md),fontSizeXs:(0,u.uj)(e,"font-size",o.$sm),borderRadius:(0,u.uj)(e,"border-radius",n.$lg),spacingUnit:(0,u.uj)(e,"padding",a.$1)}},[t,e])})(l.current);return(0,i.BX)(x.Provider,{value:{value:{headerTitle:c,headerSubtitle:p,submitLabel:f,setHeaderTitle:d,setHeaderSubtitle:y,setSubmitLabel:g,checkout:t,...r}},children:[(0,i.tZ)("div",{ref:l,style:{display:"none"}}),(0,i.tZ)(o.pe,{checkout:t,for:a,stripeAppearance:b,paymentDescription:s((0,h.localizationKeys)(t?.planPeriod==="month"?"billing.paymentMethod.applePayDescription.monthly":"billing.paymentMethod.applePayDescription.annual")),children:e})]})},B=e=>{let{isProviderReady:t}=(0,o.Wh)();return t?null:e.children},k=e=>{let{isProviderReady:t}=(0,o.Wh)();return t?(0,i.tZ)(i.HY,{children:e.children}):null},w=e=>{let{children:t,...r}=e;return(0,i.BX)($,{...r,children:[(0,i.tZ)(B,{children:(0,i.tZ)(h.Flex,{direction:"row",align:"center",justify:"center",sx:e=>({width:"100%",minHeight:e.sizes.$60}),children:(0,i.tZ)(h.Spinner,{size:"lg",colorScheme:"primary",elementDescriptor:h.descriptors.spinner})})}),(0,i.tZ)(k,{children:(0,i.tZ)(D,{children:t})})]})},v=(e,t)=>{(0,n.useRef)(()=>{t(e)}),(0,n.useEffect)(()=>{t(e)},[e,t])},S=({text:e})=>{let{setHeaderTitle:t}=Z();return v(e,t),null},z=({text:e})=>{let{setHeaderSubtitle:t}=Z();return v(e,t),null},_=({text:e})=>{let{setSubmitLabel:t}=Z();return v(e,t),null},D=({children:e})=>{let{headerTitle:t,headerSubtitle:r,submitLabel:n,checkout:u,onSuccess:y,cancelAction:f}=Z(),g=(0,l.useCardState)(),x=(0,m.useSubscriberTypeLocalizationRoot)(),{isFormReady:$,submit:B,reset:k}=(0,o.Wh)(),w=async e=>{e.preventDefault(),g.setLoading(),g.setError(void 0);let{data:t,error:r}=await B();if(!r)try{await y(t)}catch(e){(0,p.S3)(e,[],g.setError)}finally{g.setIdle(),k()}};return(0,i.tZ)(d.Y,{headerTitle:t,headerSubtitle:r,children:(0,i.BX)(s.l.Root,{onSubmit:w,sx:e=>({display:"flex",flexDirection:"column",rowGap:e.space.$3}),children:[e,(0,i.tZ)(o.Y7,{fallback:(0,i.tZ)(b,{})}),(0,i.tZ)(a.Z.Alert,{children:g.error}),(0,i.tZ)(c.A,{isDisabled:!$,submitLabel:n??(0,h.localizationKeys)(`${x}.billingPage.paymentMethodsSection.formButtonPrimary__add`),onReset:f,hideReset:!f,sx:{flex:u?1:void 0}})]})})}},79176:function(e,t,r){r.d(t,{Q:()=>a});var i=r(73312),o=r(64204),n=r(34174);let a=({paymentMethod:e})=>(0,i.BX)(o.Flex,{sx:{overflow:"hidden"},gap:2,align:"baseline",elementDescriptor:o.descriptors.paymentMethodRow,children:[(0,i.tZ)(o.Icon,{icon:"card"===e.paymentType?n.aB:n.Nn,sx:e=>({alignSelf:"center",color:e.colors.$colorMutedForeground}),elementDescriptor:o.descriptors.paymentMethodRowIcon}),(0,i.tZ)(o.Text,{sx:e=>({color:e.colors.$colorForeground,textTransform:"capitalize"}),truncate:!0,elementDescriptor:o.descriptors.paymentMethodRowType,children:"card"===e.paymentType?e.cardType:e.paymentType}),(0,i.tZ)(o.Text,{sx:e=>({color:e.colors.$colorMutedForeground}),variant:"caption",truncate:!0,elementDescriptor:o.descriptors.paymentMethodRowValue,children:"card"===e.paymentType?`\u{22EF} ${e.last4}`:null}),e.isDefault&&(0,i.tZ)(o.Badge,{elementDescriptor:o.descriptors.paymentMethodRowBadge,elementId:o.descriptors.paymentMethodRowBadge.setId("default"),localizationKey:(0,o.localizationKeys)("badge__default")}),"expired"===e.status&&(0,i.tZ)(o.Badge,{elementDescriptor:o.descriptors.paymentMethodRowBadge,elementId:o.descriptors.paymentMethodRowBadge.setId("expired"),colorScheme:"danger",localizationKey:(0,o.localizationKeys)("badge__expired")})]})},95746:function(e,t,r){r.d(t,{u:()=>l});var i=r(73312),o=r(64204);let n={active:"badge__activePlan",upcoming:"badge__upcomingPlan",past_due:"badge__pastDuePlan",free_trial:"badge__freeTrial"},a={active:"secondary",upcoming:"primary",past_due:"warning",free_trial:"secondary"},l=({subscription:e,elementDescriptor:t})=>(0,i.tZ)(o.Badge,{elementDescriptor:t,colorScheme:a[e.status],localizationKey:(0,o.localizationKeys)(n[e.status])})},99140:function(e,t,r){r.d(t,{_:()=>B});var i=r(73312),o=r(61869),n=r(69144),a=r(2672),l=r(70431),s=r(19460),c=r(68487),d=r(88870),u=r(36788),p=r(96231),m=r(11576),h=r(17703),y=r(10207),f=r(24676),g=r(63872),b=r(64204),x=r(65695);let Z=e=>{let{navigate:t}=(0,f.useRouter)(),{email:r,nextStep:o,onReset:l}=e,c=(0,a.useCardState)(),u=(0,m.useUserProfileContext)(),{startEnterpriseSSOLinkFlow:p}=(0,x.eq)(r);async function h(){await t(r.verification.externalVerificationRedirectURL?.href||"")}return n.useEffect(()=>{let{mode:e,componentName:t}=u;p({redirectUrl:"modal"===e?(0,g.bX)({url:window.location.href,componentName:t}):window.location.href}).then(()=>o()).catch(e=>(0,d.S3)(e,[],c.setError))},[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(b.Flex,{justify:"center",children:(0,i.tZ)(b.Button,{variant:"link",onClick:h,localizationKey:(0,b.localizationKeys)("userProfile.emailAddressPage.enterpriseSSOLink.formButton")})}),(0,i.tZ)(s.K,{children:(0,i.tZ)(b.Button,{variant:"ghost",localizationKey:(0,b.localizationKeys)("userProfile.formButtonReset"),elementDescriptor:b.descriptors.formButtonReset,onClick:l})})]})};var $=r(12786);let B=(0,a.withCardStateProvider)(e=>{let{emailId:t,onSuccess:r,onReset:f,disableAutoFocus:g=!1}=e,b=(0,a.useCardState)(),{user:x}=(0,o.aF)(),B=(0,m.useEnvironment)(),v=(0,o.WZ)(e=>x?.createEmailAddress({email:e})),S=n.useRef(x?.emailAddresses.find(e=>e.id===t)),z=w(S.current,B),_=(0,p.a2)({defaultStep:+!!S.current,onNextStep:()=>b.setError(void 0)}),D=(0,u.Yp)("emailAddress","",{type:"email",label:(0,h.u1)("formFieldLabel__emailAddress"),placeholder:(0,h.u1)("formFieldInputPlaceholder__emailAddress"),isRequired:!0}),C=D.value.length>1&&x?.username!==D.value,T=async e=>{if(e.preventDefault(),x)return v(D.value).then(e=>{S.current=e,_.nextStep()}).catch(e=>(0,d.S3)(e,[D],b.setError))},K=k(z);return(0,i.BX)(p.en,{..._.props,children:[(0,i.tZ)(c.Y,{headerTitle:e.title||(0,h.u1)("userProfile.emailAddressPage.title"),headerSubtitle:e.subtitle||(0,h.u1)("userProfile.emailAddressPage.formHint"),children:(0,i.BX)(l.l.Root,{onSubmit:T,children:[(0,i.tZ)(l.l.ControlRow,{elementId:D.id,children:(0,i.tZ)(l.l.PlainInput,{...D.props,autoFocus:!g})}),(0,i.tZ)(s.A,{submitLabel:(0,h.u1)("userProfile.formButtonPrimary__add"),isDisabled:!C,onReset:f})]})}),(0,i.BX)(c.Y,{headerTitle:(0,h.u1)("userProfile.emailAddressPage.verifyTitle"),headerSubtitle:(0,h.u1)(`${K}.formSubtitle`,{identifier:S.current?.emailAddress||""}),children:["email_link"===z&&(0,i.tZ)($.K,{nextStep:r,email:S.current,onReset:f}),"email_code"===z&&(0,i.tZ)(y.H,{nextStep:r,identification:S.current,identifier:S.current?.emailAddress,prepareVerification:()=>S.current?.prepareVerification({strategy:"email_code"}),onReset:f}),"enterprise_sso"===z&&(0,i.tZ)(Z,{nextStep:r,email:S.current,onReset:f})]})]})}),k=e=>{switch(e){case"email_code":return"userProfile.emailAddressPage.emailCode";case"enterprise_sso":return"userProfile.emailAddressPage.enterpriseSSOLink";case"email_link":return"userProfile.emailAddressPage.emailLink";default:throw Error(`Unsupported strategy for email verification: ${e}`)}},w=(e,t)=>e?.matchesSsoConnection?"enterprise_sso":!function(e){let{userSettings:t}=e,{email_address:r}=t.attributes;return!!(r?.enabled&&r?.verifications.includes("email_link"))}(t)?"email_code":"email_link"},10207:function(e,t,r){r.d(t,{H:()=>u});var i=r(73312),o=r(69144),n=r(12667),a=r(2672),l=r(70431),s=r(19460),c=r(88870),d=r(64204);let u=e=>{let t=(0,a.useCardState)(),{nextStep:r,identification:u,identifier:p,onReset:m,prepareVerification:h}=e,y=()=>h?.()?.catch(e=>(0,c.S3)(e,[],t.setError)),f=(0,n.e3)({onCodeEntryFinished:(e,t,r)=>{u?.attemptVerification({code:e}).then(()=>t()).catch(r)},onResendCodeClicked:y,onResolve:r});return o.useEffect(()=>{y()},[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(l.l.OTPInput,{...f,label:(0,d.localizationKeys)("userProfile.emailAddressPage.emailCode.formTitle"),description:(0,d.localizationKeys)("userProfile.emailAddressPage.emailCode.formSubtitle",{identifier:p||""}),resendButton:(0,d.localizationKeys)("userProfile.emailAddressPage.emailCode.resendButton"),centerAlign:!1}),(0,i.BX)(s.K,{children:[(0,i.tZ)(d.Button,{isLoading:f.isLoading,localizationKey:(0,d.localizationKeys)("formButtonPrimary__verify"),elementDescriptor:d.descriptors.formButtonPrimary,onClick:f.onFakeContinue}),(0,i.tZ)(d.Button,{variant:"ghost",isDisabled:f.isLoading,localizationKey:(0,d.localizationKeys)("userProfile.formButtonReset"),elementDescriptor:d.descriptors.formButtonReset,onClick:m})]})]})}},12786:function(e,t,r){r.d(t,{K:()=>h,M:()=>y});var i=r(73312),o=r(69144),n=r(2672),a=r(19460),l=r(65495),s=r(88870),c=r(96231),d=r(56749),u=r(11576),p=r(64204),m=r(65695);let h=e=>{let{email:t,nextStep:r,onReset:c}=e,h=(0,n.useCardState)(),y=(0,u.useUserProfileContext)(),{startEmailLinkFlow:f}=(0,m.E2)(t),{displayConfig:g}=(0,u.useEnvironment)();function b(){let{routing:e}=y,t="virtual"===e?g.userProfileUrl:"";f({redirectUrl:(0,d.Uu)({ctx:y,baseUrl:t,intent:"profile"})}).then(()=>r()).catch(e=>(0,s.S3)(e,[],h.setError))}return o.useEffect(()=>{b()},[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(l.V,{resendButton:(0,p.localizationKeys)("userProfile.emailAddressPage.emailLink.resendButton"),onResendCodeClicked:b}),(0,i.tZ)(a.K,{children:(0,i.tZ)(p.Button,{variant:"ghost",localizationKey:(0,p.localizationKeys)("userProfile.formButtonReset"),elementDescriptor:p.descriptors.formButtonReset,onClick:c})})]})},y=()=>(0,i.tZ)(c.Ej,{title:(0,p.localizationKeys)("signUp.emailLink.verifiedSwitchTab.title"),subtitle:(0,p.localizationKeys)("signUp.emailLink.verifiedSwitchTab.subtitle"),status:"verified"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["8237"],{10670:function(e,t,r){r.r(t),r.d(t,{Checkout:()=>Q});var i=r(73312),o=r(81102),n=r(11576),a=r(64204);r(65223);var l=r(61869),c=r(69144),s=r(28e3),d=r(39082),u=r(73003),p=r(65695),m=r(24676);let h=e=>e[0].toUpperCase()+e.slice(1),y=(e,t,r)=>e+(t-e)*r,f=e=>{let{positionX:t,positionY:r}=e,o=(0,c.useRef)(null),[n,l]=(0,c.useState)({x:256,y:256}),s="undefined"==typeof window||window.matchMedia("(hover: hover) and (pointer: fine)").matches;(0,c.useEffect)(()=>{if(!s)return;let e=()=>{l(e=>({x:y(e.x,t,.15),y:y(e.y,r,.15)})),o.current=requestAnimationFrame(e)};return o.current=requestAnimationFrame(e),()=>{o.current&&cancelAnimationFrame(o.current)}},[t,r,s]);let d=(0,c.useId)(),u=(0,c.useId)(),p=(0,c.useId)();return(0,i.BX)(a.Box,{elementDescriptor:a.descriptors.checkoutSuccessRings,as:"svg",viewBox:"0 0 512 512",sx:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":!0,children:[(0,i.BX)("defs",{children:[(0,i.BX)("radialGradient",{id:"clerk-checkout-success-gradient",children:[(0,i.tZ)("stop",{offset:"0%",style:{stopColor:"var(--ring-highlight)"}}),(0,i.tZ)("stop",{offset:"100%",stopOpacity:"0",style:{stopColor:"var(--ring-highlight)"}})]}),(0,i.tZ)("filter",{id:"clerk-checkout-success-blur-effect",children:(0,i.tZ)("feGaussianBlur",{stdDeviation:"10"})}),[{r:225,maskStart:10,maskEnd:90,id:d},{r:162.5,maskStart:15,maskEnd:85,id:u},{r:100,maskStart:20,maskEnd:80,id:p}].map(e=>{let{maskStart:t,maskEnd:r,id:o}=e;return(0,i.BX)("linearGradient",{id:"gradient-".concat(o),x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,i.tZ)("stop",{offset:"".concat(t+5,"%"),stopColor:"white",stopOpacity:"0"}),(0,i.tZ)("stop",{offset:"".concat(t+35,"%"),stopColor:"white",stopOpacity:"1"}),(0,i.tZ)("stop",{offset:"".concat(r-35,"%"),stopColor:"white",stopOpacity:"1"}),(0,i.tZ)("stop",{offset:"".concat(r-5,"%"),stopColor:"white",stopOpacity:"0"})]},o)}),(0,i.tZ)("mask",{id:"clerk-checkout-success-mask",children:[{r:225,id:d},{r:162.5,id:u},{r:100,id:p}].map(e=>{let{r:t,id:r}=e;return(0,i.tZ)("circle",{cx:"256",cy:"256",r:t,stroke:"url(#gradient-".concat(r,")"),fill:"none",strokeWidth:"1"},r)})})]}),(0,i.BX)("g",{mask:"url(#clerk-checkout-success-mask)",children:[(0,i.tZ)("rect",{width:"512",height:"512",style:{fill:"var(--ring-fill)"}}),s&&(0,i.tZ)("rect",{id:"movingGradientHighlight",width:"256",height:"256",x:n.x-128,y:n.y-128,fill:"url(#clerk-checkout-success-gradient)",filter:"url(#clerk-checkout-success-blur-effect)"})]})]})},g=()=>{let e=(0,m.useRouter)(),{setIsOpen:t}=(0,o.useDrawerContext)(),{newSubscriptionRedirectUrl:r}=(0,n.useCheckoutContext)(),{checkout:y}=(0,l.z4)(),{totals:g,paymentMethod:b,planPeriodStart:x,freeTrialEndsAt:Z}=y,[v,B]=(0,c.useState)({x:256,y:256}),k=(0,p.Tb)(),{animations:w}=(0,a.useAppearance)().parsedLayout,S=!k&&!0===w,z=(0,c.useRef)(null),$="undefined"==typeof window||window.matchMedia("(hover: hover) and (pointer: fine)").matches;return g?(0,i.BX)(i.HY,{children:[(0,i.tZ)(o.Drawer.Body,{children:(0,i.BX)(a.Span,{elementDescriptor:a.descriptors.checkoutSuccessRoot,sx:e=>({"--ring-fill":e.colors.$neutralAlpha200,"--ring-highlight":e.colors.$success500,margin:"auto",position:"relative",aspectRatio:"1/1",display:"grid",width:"100%",flexShrink:0,transformOrigin:"bottom center",animationName:"scaleIn",animationDuration:"".concat(u.bf.slowest,"ms"),animationTimingFunction:u.$$.bezier,animationFillMode:"forwards",opacity:0,overflow:"hidden",backgroundColor:e.colors.$colorBackground,"@keyframes scaleIn":{"0%":{filter:"blur(10px)",transform:"scale(0.85)",opacity:0},"100%":{filter:"blur(0px)",transform:"scale(1)",opacity:1}},...!S&&{animation:"none",opacity:1}}),ref:z,onMouseMove:e=>{if($&&z.current){let t=z.current.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,o=t.width;o>0?B({x:r/o*512,y:i/o*512}):B({x:256,y:256})}},children:[(0,i.tZ)(f,{positionX:v.x,positionY:v.y}),(0,i.BX)(a.Box,{elementDescriptor:a.descriptors.checkoutSuccessBadge,sx:e=>({margin:"auto",gridArea:"1/1",display:"flex",position:"relative",width:e.sizes.$16,height:e.sizes.$16,borderRadius:e.radii.$circle,backgroundImage:"linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.30) 95.31%)",boxShadow:"0px 4px 12px 0px rgba(0, 0, 0, 0.35), 0px 1px 0px 0px rgba(255, 255, 255, 0.05) inset",color:$?e.colors.$success500:e.colors.$colorForeground,":before":{content:'""',position:"absolute",inset:e.space.$1,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorBackground}}),children:[(0,i.tZ)("svg",{fill:"none",viewBox:"0 0 10 10","aria-hidden":"true",style:{position:"relative",margin:"auto",width:"1rem",height:"1rem"},children:(0,i.tZ)("path",{d:"m1 6 3 3 5-8",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"1",pathLength:"1",style:{strokeDashoffset:"1",animation:S?"check ".concat(u.bf.drawer,"ms ").concat(u.$$.bezier," forwards ").concat(u.bf.slow,"ms"):"none",...!S&&{strokeDashoffset:"0"}}})}),(0,i.tZ)("style",{children:"\n @keyframes check {\n 0% {\n stroke-dashoffset: 1;\n }\n 100% {\n stroke-dashoffset: 0;\n }\n "})]}),(0,i.BX)(a.Span,{sx:e=>({margin:"auto",gridArea:"1/1",position:"relative",textAlign:"center",transform:"translateY(".concat(e.space.$20,")")}),children:[(0,i.tZ)(a.Heading,{elementDescriptor:a.descriptors.checkoutSuccessTitle,as:"h2",textVariant:"h2",localizationKey:Z?(0,a.localizationKeys)("billing.checkout.title__trialSuccess"):g.totalDueNow.amount>0?(0,a.localizationKeys)("billing.checkout.title__paymentSuccessful"):(0,a.localizationKeys)("billing.checkout.title__subscriptionSuccessful"),sx:e=>({opacity:0,animationName:"slideUp",animationDuration:"".concat(u.bf.slowest,"ms"),animationTimingFunction:u.$$.bezier,animationFillMode:"forwards",color:e.colors.$colorForeground,"@keyframes slideUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!S&&{opacity:1,animation:"none"}})}),(0,i.tZ)(a.Text,{elementDescriptor:a.descriptors.checkoutSuccessDescription,colorScheme:"secondary",sx:e=>({textAlign:"center",paddingInline:e.space.$8,marginBlockStart:e.space.$2,opacity:0,animationName:"slideUp",animationDuration:"".concat(1.5*u.bf.slowest,"ms"),animationTimingFunction:u.$$.bezier,animationFillMode:"forwards","@keyframes slideUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!S&&{opacity:1,animation:"none"}}),localizationKey:g.totalDueNow.amount>0?(0,a.localizationKeys)("billing.checkout.description__paymentSuccessful"):(0,a.localizationKeys)("billing.checkout.description__subscriptionSuccessful")})]})]})}),(0,i.BX)(o.Drawer.Footer,{sx:e=>({rowGap:e.space.$4,animationName:"footerSlideInUp",animationDuration:"".concat(u.bf.drawer,"ms"),animationTimingFunction:u.$$.bezier,"@keyframes footerSlideInUp":{"0%":{transform:"translateY(100%)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!S&&{animation:"none"}}),children:[(0,i.BX)(s.a.Root,{children:[(0,i.BX)(s.a.Group,{variant:"secondary",children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.checkout.lineItems.title__totalPaid")}),(0,i.tZ)(s.a.Description,{text:"".concat(g.totalDueNow.currencySymbol).concat(g.totalDueNow.amountFormatted)})]}),Z?(0,i.BX)(s.a.Group,{variant:"secondary",children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.checkout.lineItems.title__freeTrialEndsAt")}),(0,i.tZ)(s.a.Description,{text:(0,d.p)(Z)})]}):null,(0,i.BX)(s.a.Group,{variant:"secondary",children:[(0,i.tZ)(s.a.Title,{title:g.totalDueNow.amount>0||null!==Z?(0,a.localizationKeys)("billing.checkout.lineItems.title__paymentMethod"):(0,a.localizationKeys)("billing.checkout.lineItems.title__subscriptionBegins")}),(0,i.tZ)(s.a.Description,{text:g.totalDueNow.amount>0||null!==Z?b?"card"!==b.paymentType?b.paymentType?"".concat(h(b.paymentType)):"–":b.cardType?"".concat(h(b.cardType)," ⋯ ").concat(b.last4):"–":"–":x?(0,d.p)(new Date(x)):"–"})]})]}),(0,i.tZ)(a.Button,{onClick:()=>{r&&e.navigate(r),t&&t(!1)},localizationKey:(0,a.localizationKeys)("formButtonPrimary")})]})]}):null};r(92037);var b=r(92418),x=r(2672),Z=r(47291),v=r(3146),B=r(19732),k=r(88870),w=r(22189),S=r(96519),z=r(74557),$=r(79176),_=r(95746);let D=e=>e[0].toUpperCase()+e.slice(1),C="payment_method_id",T=(0,x.withCardStateProvider)(()=>{var e,t,r,n,c,d,u,p,m,h,y,f,g,b,x,Z,v;let{checkout:k}=(0,l.z4)(),{id:w,plan:z,totals:$,isImmediatePlanChange:D,planPeriod:C,freeTrialEndsAt:T}=k;if(!w)return null;let K=!!(null==(t=$.credits)||null==(e=t.proration)?void 0:e.amount)&&$.credits.proration.amount.amount>0,A=!!(null==(n=$.credits)||null==(r=n.payer)?void 0:r.appliedAmount)&&$.credits.payer.appliedAmount.amount>0,X=!!(null==(c=$.pastDue)?void 0:c.amount)&&$.pastDue.amount>0,R="month"===C?z.fee:z.annualMonthlyFee;return(0,i.BX)(o.Drawer.Body,{children:[(0,i.tZ)(a.Box,{elementDescriptor:a.descriptors.checkoutFormLineItemsRoot,sx:e=>({padding:e.space.$4,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,i.BX)(s.a.Root,{children:[(0,i.BX)(s.a.Group,{children:[(0,i.tZ)(s.a.Title,{title:z.name,description:"annual"===C?(0,a.localizationKeys)("billing.billedAnnually"):void 0,badge:z.freeTrialEnabled&&T?(0,i.tZ)(_.u,{subscription:{status:"free_trial"}}):null}),(0,i.tZ)(s.a.Description,{prefix:"annual"===C?"x12":void 0,text:"".concat(R.currencySymbol).concat(R.amountFormatted),suffix:(0,a.localizationKeys)("billing.checkout.perMonth")})]}),(0,i.BX)(s.a.Group,{borderTop:!0,variant:"tertiary",children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.subtotal")}),(0,i.tZ)(s.a.Description,{text:"".concat($.subtotal.currencySymbol).concat($.subtotal.amountFormatted)})]}),K&&(0,i.BX)(s.a.Group,{variant:"tertiary",children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.creditRemainder")}),(0,i.tZ)(s.a.Description,{text:"- ".concat(null==(u=$.credits)||null==(d=u.proration)?void 0:d.amount.currencySymbol).concat(null==(m=$.credits)||null==(p=m.proration)?void 0:p.amount.amountFormatted)})]}),A&&(0,i.BX)(s.a.Group,{variant:"tertiary",children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.payerCreditRemainder")}),(0,i.tZ)(s.a.Description,{text:"- ".concat(null==(f=$.credits)||null==(y=f.payer)||null==(h=y.appliedAmount)?void 0:h.currencySymbol).concat(null==(x=$.credits)||null==(b=x.payer)||null==(g=b.appliedAmount)?void 0:g.amountFormatted)})]}),X&&(0,i.BX)(s.a.Group,{variant:"tertiary",children:[(0,i.BX)(B.u.Root,{children:[(0,i.tZ)(B.u.Trigger,{children:(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.pastDue"),icon:S.I$})}),(0,i.tZ)(B.u.Content,{text:(0,a.localizationKeys)("billing.checkout.pastDueNotice")})]}),(0,i.tZ)(s.a.Description,{text:"".concat(null==(Z=$.pastDue)?void 0:Z.currencySymbol).concat(null==(v=$.pastDue)?void 0:v.amountFormatted)})]}),!!T&&!!z.freeTrialDays&&$.totalDueAfterFreeTrial&&(0,i.BX)(s.a.Group,{variant:"tertiary",children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.checkout.totalDueAfterTrial",{days:z.freeTrialDays})}),(0,i.tZ)(s.a.Description,{text:"".concat($.totalDueAfterFreeTrial.currencySymbol).concat($.totalDueAfterFreeTrial.amountFormatted)})]}),(0,i.BX)(s.a.Group,{borderTop:!0,children:[(0,i.tZ)(s.a.Title,{title:(0,a.localizationKeys)("billing.totalDueToday")}),(0,i.tZ)(s.a.Description,{text:"".concat($.totalDueNow.currencySymbol).concat($.totalDueNow.amountFormatted)})]})]})}),!D&&(0,i.tZ)(a.Box,{elementDescriptor:a.descriptors.checkoutFormLineItemsRoot,sx:e=>({paddingBlockStart:e.space.$4,paddingInline:e.space.$4}),children:(0,i.tZ)(a.Text,{localizationKey:(0,a.localizationKeys)("billing.checkout.downgradeNotice"),variant:"caption",colorScheme:"secondary"})}),(0,i.tZ)(P,{})]})}),K=()=>{let{onSubscriptionComplete:e}=(0,n.useCheckoutContext)(),{checkout:t}=(0,l.z4)(),{id:r,confirm:i}=t,o=(0,x.useCardState)();if(!r)throw Error("Checkout not found");let a=async t=>{o.setLoading(),o.setError(void 0);let{data:r,error:n}=await i(t);n?(0,k.S3)(n,[],o.setError):r&&(null==e||e()),o.setIdle()};return{payWithExistingPaymentMethod:e=>(e.preventDefault(),a({paymentMethodId:new FormData(e.currentTarget).get(C)})),addPaymentMethodAndPay:e=>a(e),payWithTestCard:()=>a({gateway:"stripe",useTestCard:!0}),payWithoutPaymentMethod:e=>(e.preventDefault(),a({}))}},P=()=>{let{checkout:e}=(0,l.z4)(),{id:t}=e,{isLoading:r}=(0,n.usePaymentMethods)();return t?r?(0,i.tZ)(a.Spinner,{sx:{margin:"auto"}}):(0,i.tZ)(A,{}):null},A=()=>{let{checkout:e}=(0,l.z4)(),{id:t,isImmediatePlanChange:r,needsPaymentMethod:o}=e,{data:s}=(0,n.usePaymentMethods)(),[d,u]=(0,c.useState)(()=>s.length>0?"existing":"new");return t?(0,i.BX)(a.Col,{elementDescriptor:a.descriptors.checkoutFormElementsRoot,gap:4,sx:e=>({padding:e.space.$4}),children:[(0,i.tZ)(i.HY,{children:s.length>0&&r&&o&&(0,i.BX)(Z.s.Root,{"aria-label":"Payment method source",value:d,onChange:e=>u(e),size:"lg",fullWidth:!0,children:[(0,i.tZ)(Z.s.Button,{value:"existing",text:(0,a.localizationKeys)("billing.paymentMethods__label")}),(0,i.tZ)(Z.s.Button,{value:"new",text:(0,a.localizationKeys)("billing.addPaymentMethod__label")})]})}),o?"existing"===d?(0,i.tZ)(E,{paymentMethods:s}):"new"===d&&(0,i.tZ)(M,{}):(0,i.tZ)(F,{})]}):null},X=()=>{let{isLoading:e}=(0,x.useCardState)(),{payWithTestCard:t}=K();return(0,i.BX)(a.Box,{sx:e=>({background:e.colors.$neutralAlpha50,padding:e.space.$2x5,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha100,display:"flex",flexDirection:"column",rowGap:e.space.$2,position:"relative"}),children:[(0,i.tZ)(a.Box,{sx:e=>({position:"absolute",inset:0,background:"repeating-linear-gradient(-45deg,".concat(e.colors.$warningAlpha100,",").concat(e.colors.$warningAlpha100," 6px,").concat(e.colors.$warningAlpha150," 6px,").concat(e.colors.$warningAlpha150," 12px)"),maskImage:"linear-gradient(transparent 20%, black)",pointerEvents:"none"})}),(0,i.BX)(a.Flex,{sx:e=>({alignItems:"center",justifyContent:"center",flexDirection:"column",rowGap:e.space.$2}),children:[(0,i.tZ)(a.Text,{sx:e=>({color:e.colors.$warning500,fontWeight:e.fontWeights.$semibold}),localizationKey:(0,a.localizationKeys)("billing.paymentMethod.dev.developmentMode")}),(0,i.tZ)(a.Button,{type:"button",block:!0,variant:"bordered",localizationKey:(0,a.localizationKeys)("userProfile.billingPage.paymentMethodsSection.payWithTestCardButton"),colorScheme:"secondary",isLoading:e,onClick:t})]})]})},R=()=>{let{checkout:e}=(0,l.z4)(),{status:t,freeTrialEndsAt:r,totals:i}=e;if("needs_initialization"===t)throw Error("Clerk: Invalid state");return r?(0,a.localizationKeys)("billing.startFreeTrial"):i.totalDueNow.amount>0?(0,a.localizationKeys)("billing.pay",{amount:"".concat(i.totalDueNow.currencySymbol).concat(i.totalDueNow.amountFormatted)}):(0,a.localizationKeys)("billing.subscribe")},F=(0,x.withCardStateProvider)(()=>{let{for:e}=(0,n.useCheckoutContext)(),{payWithoutPaymentMethod:t}=K(),r=(0,x.useCardState)();return(0,i.BX)(a.Form,{onSubmit:t,sx:L,children:[(0,i.tZ)(b.Z.Alert,{children:r.error}),(0,i.tZ)(I,{})]})}),M=(0,x.withCardStateProvider)(()=>{let{addPaymentMethodAndPay:e}=K(),t=R(),{checkout:r}=(0,l.z4)();return(0,i.BX)(z.fC,{onSuccess:e,checkout:r,children:[(0,i.tZ)(w.P,{children:(0,i.tZ)(X,{})}),(0,i.tZ)(z.OL,{text:t})]})}),I=e=>{let t=(0,x.useCardState)(),r=R();return(0,i.tZ)(a.Button,{type:"submit",colorScheme:"primary",size:"sm",textVariant:"buttonLarge",sx:{width:"100%"},isLoading:t.isLoading,localizationKey:r,...e})},L=e=>({display:"flex",flexDirection:"column",rowGap:e.space.$4}),E=(0,x.withCardStateProvider)(e=>{let{paymentMethods:t}=e,{checkout:r}=(0,l.z4)(),{paymentMethod:o,isImmediatePlanChange:n,needsPaymentMethod:s}=r,{payWithExistingPaymentMethod:d}=K(),u=(0,x.useCardState)(),[p,m]=(0,c.useState)(o||t.find(e=>e.isDefault)),h=(0,c.useMemo)(()=>t.map(e=>{let t="card"!==e.paymentType?e.paymentType?"".concat(D(e.paymentType)):"–":e.cardType?"".concat(D(e.cardType)," ⋯ ").concat(e.last4):"–";return{value:e.id,label:t}}),[t]);return(0,i.BX)(a.Form,{onSubmit:d,sx:L,children:[n&&s?(0,i.BX)(v.Ph,{elementId:"paymentMethod",options:h,value:(null==p?void 0:p.id)||null,onChange:e=>{m(t.find(t=>t.id===e.value))},portal:!0,children:[(0,i.tZ)("input",{name:C,type:"hidden",value:null==p?void 0:p.id}),(0,i.tZ)(v.UN,{icon:S.jC,sx:e=>({justifyContent:"space-between",backgroundColor:e.colors.$colorBackground}),children:p&&(0,i.tZ)($.Q,{paymentMethod:p})}),(0,i.tZ)(v.pp,{sx:e=>({paddingBlock:e.space.$1,color:e.colors.$colorForeground})})]}):(0,i.tZ)("input",{name:C,type:"hidden",value:null==p?void 0:p.id}),(0,i.tZ)(b.Z.Alert,{children:u.error}),(0,i.tZ)(I,{})]})});r(28419);var j=r(7439);let W=()=>{let{checkout:e}=(0,l.z4)();return(0,c.useEffect)(()=>(e.start(),e.clear),[]),null},G=e=>{let{children:t}=e,{planId:r,planPeriod:o,for:n}=(0,j.w6)();return(0,i.BX)(l.hA,{for:n,planId:r,planPeriod:o,children:[(0,i.tZ)(W,{}),t]})},N=e=>{let{children:t,name:r}=e,{checkout:i}=(0,l.z4)();return i.status!==r?null:t},U=e=>{let{children:t,status:r}=e,{checkout:i}=(0,l.z4)(),{fetchStatus:o,error:n}=i;return(0,c.useMemo)(()=>{if("error"===o){let e=n.errors.map(e=>e.code);if(e.includes("missing_payer_email"))return"missing_payer_email";if(e.includes("invalid_plan_change"))return"invalid_plan_change"}return o},[o])!==r?null:t};var Y=r(9117),H=r(99140);let O=()=>{let{checkout:e}=(0,l.z4)(),{translateError:t}=(0,a.useLocalizations)(),{t:r}=(0,a.useLocalizations)();return(0,i.tZ)(o.Drawer.Body,{children:(0,i.tZ)(a.Flex,{align:"center",justify:"center",sx:e=>({height:"100%",padding:e.space.$4,fontSize:e.fontSizes.$md}),children:(0,i.tZ)(Y.b,{variant:"danger",colorScheme:"danger",children:e.error?t(e.error.errors[0]):r((0,a.localizationKeys)("unstable__errors.form_param_value_invalid"))})})})},V=()=>{let{planPeriod:e}=(0,n.useCheckoutContext)(),{checkout:t}=(0,l.z4)(),r=t.error,d=(0,c.useMemo)(()=>{var e;let t=null==r?void 0:r.errors.find(e=>"invalid_plan_change"===e.code);return null==t||null==(e=t.meta)?void 0:e.plan},[r]),u=(0,c.useMemo)(()=>{var e;let t=null==r?void 0:r.errors.find(e=>"invalid_plan_change"===e.code);return(null==t||null==(e=t.meta)?void 0:e.isPlanUpgradePossible)||!1},[r]);return d?(0,i.tZ)(o.Drawer.Body,{children:(0,i.BX)(a.Flex,{gap:4,direction:"col",children:[(0,i.tZ)(a.Box,{elementDescriptor:a.descriptors.checkoutFormLineItemsRoot,sx:e=>({padding:e.space.$4,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,i.tZ)(s.a.Root,{children:(0,i.BX)(s.a.Group,{children:[(0,i.tZ)(s.a.Title,{title:d.name,description:"annual"===e?(0,a.localizationKeys)("billing.billedAnnually"):void 0}),(0,i.tZ)(s.a.Description,{prefix:"annual"===e?"x12":void 0,text:"".concat(d.currency_symbol).concat("month"===e?d.amount_formatted:d.annual_monthly_amount_formatted),suffix:(0,a.localizationKeys)("billing.checkout.perMonth")})]})})}),(0,i.tZ)(a.Box,{sx:e=>({padding:e.space.$4}),children:(0,i.tZ)(Y.b,{variant:"info",colorScheme:"info",title:u?(0,a.localizationKeys)("billing.cannotSubscribeMonthly"):(0,a.localizationKeys)("billing.cannotSubscribeUnrecoverable")})})]})}):null},q=()=>{let{checkout:e}=(0,l.z4)(),{setIsOpen:t}=(0,o.useDrawerContext)();return(0,i.tZ)(o.Drawer.Body,{children:(0,i.tZ)(a.Box,{sx:e=>({padding:e.space.$4}),children:(0,i.tZ)(H._,{title:(0,a.localizationKeys)("billing.checkout.emailForm.title"),subtitle:(0,a.localizationKeys)("billing.checkout.emailForm.subtitle"),onSuccess:()=>void e.start(),onReset:()=>t(!1),disableAutoFocus:!0})})})},Q=e=>(0,i.tZ)(a.Flow.Root,{flow:"checkout",children:(0,i.tZ)(a.Flow.Part,{children:(0,i.tZ)(n.SubscriberTypeContext.Provider,{value:e.for||"user",children:(0,i.tZ)(n.CheckoutContext.Provider,{value:{componentName:"Checkout",...e},children:(0,i.BX)(o.Drawer.Content,{children:[(0,i.tZ)(o.Drawer.Header,{title:(0,a.localizationKeys)("billing.checkout.title")}),(0,i.BX)(G,{children:[(0,i.BX)(N,{name:"needs_initialization",children:[(0,i.tZ)(U,{status:"fetching",children:(0,i.tZ)(a.Spinner,{sx:{margin:"auto"}})}),(0,i.tZ)(U,{status:"invalid_plan_change",children:(0,i.tZ)(V,{})}),(0,i.tZ)(U,{status:"missing_payer_email",children:(0,i.tZ)(q,{})}),(0,i.tZ)(U,{status:"error",children:(0,i.tZ)(O,{})})]}),(0,i.tZ)(N,{name:"completed",children:(0,i.tZ)(g,{})}),(0,i.tZ)(N,{name:"needs_confirmation",children:(0,i.tZ)(T,{})})]})]})})})})})},74557:function(e,t,r){r.d(t,{hG:()=>$,ph:()=>z,fC:()=>w,OL:()=>_}),r(65223);var i=r(73312),o=r(61869),n=r(69144),a=r(92418),l=r(2672),c=r(70431),s=r(19460),d=r(68487),u=r(68849),p=r(88870),m=r(11576),h=r(64204);let y=e=>(0,i.tZ)(h.Box,{sx:[e=>({height:e.space.$2,width:"100%",borderRadius:e.radii.$md,background:e.colors.$neutralAlpha100}),e.sx]}),f=()=>(0,i.tZ)(y,{sx:e=>({height:e.space.$10,width:"100%"})}),g=e=>(0,i.tZ)(h.Flex,{direction:"col",gap:2,children:e.children}),b=()=>(0,i.tZ)(h.Box,{"aria-label":"Loading...",sx:{position:"relative",minHeight:0,flex:1,overflowY:"auto"},children:(0,i.BX)(h.Flex,{direction:"col",gap:5,children:[(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$24})}),(0,i.tZ)(f,{})]}),(0,i.BX)(h.Grid,{columns:2,gap:4,children:[(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$20})}),(0,i.tZ)(f,{})]}),(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$24})}),(0,i.tZ)(f,{})]})]}),(0,i.BX)(g,{children:[(0,i.tZ)(y,{sx:e=>({height:e.space.$3,width:e.sizes.$16})}),(0,i.tZ)(f,{})]}),(0,i.BX)(g,{children:[(0,i.tZ)(y,{}),(0,i.tZ)(y,{}),(0,i.tZ)(y,{sx:{width:"66.666667%"}})]})]})}),[x,Z]=(0,o.uH)("AddPaymentMethodRoot"),v=e=>{let{children:t,checkout:r,...a}=e,l=(0,m.useSubscriberTypeContext)(),c=(0,n.useRef)(null),{t:s}=(0,h.useLocalizations)(),[d,p]=(0,n.useState)(void 0),[y,f]=(0,n.useState)(void 0),[g,b]=(0,n.useState)(void 0),Z=(e=>{let t=(0,h.useAppearance)().parsedInternalTheme;return(0,n.useMemo)(()=>{if(!e)return;let{colors:r,fontWeights:i,fontSizes:o,radii:n,space:a}=t;return{colorPrimary:(0,u.Aj)(e,r.$primary500,r.$colorBackground),colorBackground:(0,u.Aj)(e,r.$colorInput,r.$colorBackground),colorText:(0,u.Aj)(e,r.$colorForeground,r.$colorBackground),colorTextSecondary:(0,u.Aj)(e,r.$colorMutedForeground,r.$colorBackground),colorSuccess:(0,u.Aj)(e,r.$success500,r.$colorBackground),colorDanger:(0,u.Aj)(e,r.$danger500,r.$colorBackground),colorWarning:(0,u.Aj)(e,r.$warning500,r.$colorBackground),fontWeightNormal:(0,u.uj)(e,"font-weight",i.$normal.toString()),fontWeightMedium:(0,u.uj)(e,"font-weight",i.$medium.toString()),fontWeightBold:(0,u.uj)(e,"font-weight",i.$bold.toString()),fontSizeXl:(0,u.uj)(e,"font-size",o.$xl),fontSizeLg:(0,u.uj)(e,"font-size",o.$lg),fontSizeSm:(0,u.uj)(e,"font-size",o.$md),fontSizeXs:(0,u.uj)(e,"font-size",o.$sm),borderRadius:(0,u.uj)(e,"border-radius",n.$lg),spacingUnit:(0,u.uj)(e,"padding",a.$1)}},[t,e])})(c.current);return(0,i.BX)(x.Provider,{value:{value:{headerTitle:d,headerSubtitle:y,submitLabel:g,setHeaderTitle:p,setHeaderSubtitle:f,setSubmitLabel:b,checkout:r,...a}},children:[(0,i.tZ)("div",{ref:c,style:{display:"none"}}),(0,i.tZ)(o.pe,{checkout:r,for:l,stripeAppearance:Z,paymentDescription:s((0,h.localizationKeys)((null==r?void 0:r.planPeriod)==="month"?"billing.paymentMethod.applePayDescription.monthly":"billing.paymentMethod.applePayDescription.annual")),children:t})]})},B=e=>{let{isProviderReady:t}=(0,o.Wh)();return t?null:e.children},k=e=>{let{isProviderReady:t}=(0,o.Wh)();return t?(0,i.tZ)(i.HY,{children:e.children}):null},w=e=>{let{children:t,...r}=e;return(0,i.BX)(v,{...r,children:[(0,i.tZ)(B,{children:(0,i.tZ)(h.Flex,{direction:"row",align:"center",justify:"center",sx:e=>({width:"100%",minHeight:e.sizes.$60}),children:(0,i.tZ)(h.Spinner,{size:"lg",colorScheme:"primary",elementDescriptor:h.descriptors.spinner})})}),(0,i.tZ)(k,{children:(0,i.tZ)(D,{children:t})})]})},S=(e,t)=>{(0,n.useRef)(()=>{t(e)}),(0,n.useEffect)(()=>{t(e)},[e,t])},z=e=>{let{text:t}=e,{setHeaderTitle:r}=Z();return S(t,r),null},$=e=>{let{text:t}=e,{setHeaderSubtitle:r}=Z();return S(t,r),null},_=e=>{let{text:t}=e,{setSubmitLabel:r}=Z();return S(t,r),null},D=e=>{let{children:t}=e,{headerTitle:r,headerSubtitle:n,submitLabel:u,checkout:y,onSuccess:f,cancelAction:g}=Z(),x=(0,l.useCardState)(),v=(0,m.useSubscriberTypeLocalizationRoot)(),{isFormReady:B,submit:k,reset:w}=(0,o.Wh)(),S=async e=>{e.preventDefault(),x.setLoading(),x.setError(void 0);let{data:t,error:r}=await k();if(!r)try{await f(t)}catch(e){(0,p.S3)(e,[],x.setError)}finally{x.setIdle(),w()}};return(0,i.tZ)(d.Y,{headerTitle:r,headerSubtitle:n,children:(0,i.BX)(c.l.Root,{onSubmit:S,sx:e=>({display:"flex",flexDirection:"column",rowGap:e.space.$3}),children:[t,(0,i.tZ)(o.Y7,{fallback:(0,i.tZ)(b,{})}),(0,i.tZ)(a.Z.Alert,{children:x.error}),(0,i.tZ)(s.A,{isDisabled:!B,submitLabel:null!=u?u:(0,h.localizationKeys)("".concat(v,".billingPage.paymentMethodsSection.formButtonPrimary__add")),onReset:g,hideReset:!g,sx:{flex:y?1:void 0}})]})})}},79176:function(e,t,r){r.d(t,{Q:()=>a});var i=r(73312),o=r(64204),n=r(96519);let a=e=>{let{paymentMethod:t}=e;return(0,i.BX)(o.Flex,{sx:{overflow:"hidden"},gap:2,align:"baseline",elementDescriptor:o.descriptors.paymentMethodRow,children:[(0,i.tZ)(o.Icon,{icon:"card"===t.paymentType?n.aB:n.Nn,sx:e=>({alignSelf:"center",color:e.colors.$colorMutedForeground}),elementDescriptor:o.descriptors.paymentMethodRowIcon}),(0,i.tZ)(o.Text,{sx:e=>({color:e.colors.$colorForeground,textTransform:"capitalize"}),truncate:!0,elementDescriptor:o.descriptors.paymentMethodRowType,children:"card"===t.paymentType?t.cardType:t.paymentType}),(0,i.tZ)(o.Text,{sx:e=>({color:e.colors.$colorMutedForeground}),variant:"caption",truncate:!0,elementDescriptor:o.descriptors.paymentMethodRowValue,children:"card"===t.paymentType?"⋯ ".concat(t.last4):null}),t.isDefault&&(0,i.tZ)(o.Badge,{elementDescriptor:o.descriptors.paymentMethodRowBadge,elementId:o.descriptors.paymentMethodRowBadge.setId("default"),localizationKey:(0,o.localizationKeys)("badge__default")}),"expired"===t.status&&(0,i.tZ)(o.Badge,{elementDescriptor:o.descriptors.paymentMethodRowBadge,elementId:o.descriptors.paymentMethodRowBadge.setId("expired"),colorScheme:"danger",localizationKey:(0,o.localizationKeys)("badge__expired")})]})}},95746:function(e,t,r){r.d(t,{u:()=>l});var i=r(73312),o=r(64204);let n={active:"badge__activePlan",upcoming:"badge__upcomingPlan",past_due:"badge__pastDuePlan",free_trial:"badge__freeTrial"},a={active:"secondary",upcoming:"primary",past_due:"warning",free_trial:"secondary"},l=e=>{let{subscription:t,elementDescriptor:r}=e;return(0,i.tZ)(o.Badge,{elementDescriptor:r,colorScheme:a[t.status],localizationKey:(0,o.localizationKeys)(n[t.status])})}},99140:function(e,t,r){r.d(t,{_:()=>B}),r(92037),r(28419);var i=r(73312),o=r(61869),n=r(69144),a=r(2672),l=r(70431),c=r(19460),s=r(68487),d=r(88870),u=r(36788),p=r(96231),m=r(11576),h=r(17703),y=r(10207);r(50725);var f=r(24676),g=r(96620),b=r(64204),x=r(65695);let Z=e=>{let{navigate:t}=(0,f.useRouter)(),{email:r,nextStep:o,onReset:l}=e,s=(0,a.useCardState)(),u=(0,m.useUserProfileContext)(),{startEnterpriseSSOLinkFlow:p}=(0,x.eq)(r);async function h(){var e;await t((null==(e=r.verification.externalVerificationRedirectURL)?void 0:e.href)||"")}return n.useEffect(()=>{let{mode:e,componentName:t}=u;p({redirectUrl:"modal"===e?(0,g.bX)({url:window.location.href,componentName:t}):window.location.href}).then(()=>o()).catch(e=>(0,d.S3)(e,[],s.setError))},[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(b.Flex,{justify:"center",children:(0,i.tZ)(b.Button,{variant:"link",onClick:h,localizationKey:(0,b.localizationKeys)("userProfile.emailAddressPage.enterpriseSSOLink.formButton")})}),(0,i.tZ)(c.K,{children:(0,i.tZ)(b.Button,{variant:"ghost",localizationKey:(0,b.localizationKeys)("userProfile.formButtonReset"),elementDescriptor:b.descriptors.formButtonReset,onClick:l})})]})};var v=r(12786);let B=(0,a.withCardStateProvider)(e=>{var t,r;let{emailId:f,onSuccess:g,onReset:b,disableAutoFocus:x=!1}=e,B=(0,a.useCardState)(),{user:S}=(0,o.aF)(),z=(0,m.useEnvironment)(),$=(0,o.WZ)(e=>null==S?void 0:S.createEmailAddress({email:e})),_=n.useRef(null==S?void 0:S.emailAddresses.find(e=>e.id===f)),D=w(_.current,z),C=(0,p.a2)({defaultStep:+!!_.current,onNextStep:()=>B.setError(void 0)}),T=(0,u.Yp)("emailAddress","",{type:"email",label:(0,h.u1)("formFieldLabel__emailAddress"),placeholder:(0,h.u1)("formFieldInputPlaceholder__emailAddress"),isRequired:!0}),K=T.value.length>1&&(null==S?void 0:S.username)!==T.value,P=async e=>{if(e.preventDefault(),S)return $(T.value).then(e=>{_.current=e,C.nextStep()}).catch(e=>(0,d.S3)(e,[T],B.setError))},A=k(D);return(0,i.BX)(p.en,{...C.props,children:[(0,i.tZ)(s.Y,{headerTitle:e.title||(0,h.u1)("userProfile.emailAddressPage.title"),headerSubtitle:e.subtitle||(0,h.u1)("userProfile.emailAddressPage.formHint"),children:(0,i.BX)(l.l.Root,{onSubmit:P,children:[(0,i.tZ)(l.l.ControlRow,{elementId:T.id,children:(0,i.tZ)(l.l.PlainInput,{...T.props,autoFocus:!x})}),(0,i.tZ)(c.A,{submitLabel:(0,h.u1)("userProfile.formButtonPrimary__add"),isDisabled:!K,onReset:b})]})}),(0,i.BX)(s.Y,{headerTitle:(0,h.u1)("userProfile.emailAddressPage.verifyTitle"),headerSubtitle:(0,h.u1)("".concat(A,".formSubtitle"),{identifier:(null==(t=_.current)?void 0:t.emailAddress)||""}),children:["email_link"===D&&(0,i.tZ)(v.K,{nextStep:g,email:_.current,onReset:b}),"email_code"===D&&(0,i.tZ)(y.H,{nextStep:g,identification:_.current,identifier:null==(r=_.current)?void 0:r.emailAddress,prepareVerification:()=>{var e;return null==(e=_.current)?void 0:e.prepareVerification({strategy:"email_code"})},onReset:b}),"enterprise_sso"===D&&(0,i.tZ)(Z,{nextStep:g,email:_.current,onReset:b})]})]})}),k=e=>{switch(e){case"email_code":return"userProfile.emailAddressPage.emailCode";case"enterprise_sso":return"userProfile.emailAddressPage.enterpriseSSOLink";case"email_link":return"userProfile.emailAddressPage.emailLink";default:throw Error("Unsupported strategy for email verification: ".concat(e))}},w=(e,t)=>(null==e?void 0:e.matchesSsoConnection)?"enterprise_sso":!function(e){let{userSettings:t}=e,{email_address:r}=t.attributes;return!!((null==r?void 0:r.enabled)&&(null==r?void 0:r.verifications.includes("email_link")))}(t)?"email_code":"email_link"},10207:function(e,t,r){r.d(t,{H:()=>u});var i=r(73312),o=r(69144),n=r(12667),a=r(2672),l=r(70431),c=r(19460),s=r(88870),d=r(64204);let u=e=>{let t=(0,a.useCardState)(),{nextStep:r,identification:u,identifier:p,onReset:m,prepareVerification:h}=e,y=()=>{var e;return null==h||null==(e=h())?void 0:e.catch(e=>(0,s.S3)(e,[],t.setError))},f=(0,n.e3)({onCodeEntryFinished:(e,t,r)=>{null==u||u.attemptVerification({code:e}).then(()=>t()).catch(r)},onResendCodeClicked:y,onResolve:r});return o.useEffect(()=>{y()},[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(l.l.OTPInput,{...f,label:(0,d.localizationKeys)("userProfile.emailAddressPage.emailCode.formTitle"),description:(0,d.localizationKeys)("userProfile.emailAddressPage.emailCode.formSubtitle",{identifier:p||""}),resendButton:(0,d.localizationKeys)("userProfile.emailAddressPage.emailCode.resendButton"),centerAlign:!1}),(0,i.BX)(c.K,{children:[(0,i.tZ)(d.Button,{isLoading:f.isLoading,localizationKey:(0,d.localizationKeys)("formButtonPrimary__verify"),elementDescriptor:d.descriptors.formButtonPrimary,onClick:f.onFakeContinue}),(0,i.tZ)(d.Button,{variant:"ghost",isDisabled:f.isLoading,localizationKey:(0,d.localizationKeys)("userProfile.formButtonReset"),elementDescriptor:d.descriptors.formButtonReset,onClick:m})]})]})}},12786:function(e,t,r){r.d(t,{K:()=>h,M:()=>y});var i=r(73312),o=r(69144),n=r(2672),a=r(19460),l=r(65495),c=r(88870),s=r(96231),d=r(56749),u=r(11576),p=r(64204),m=r(65695);let h=e=>{let{email:t,nextStep:r,onReset:s}=e,h=(0,n.useCardState)(),y=(0,u.useUserProfileContext)(),{startEmailLinkFlow:f}=(0,m.E2)(t),{displayConfig:g}=(0,u.useEnvironment)();function b(){let{routing:e}=y,t="virtual"===e?g.userProfileUrl:"";f({redirectUrl:(0,d.Uu)({ctx:y,baseUrl:t,intent:"profile"})}).then(()=>r()).catch(e=>(0,c.S3)(e,[],h.setError))}return o.useEffect(()=>{b()},[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(l.V,{resendButton:(0,p.localizationKeys)("userProfile.emailAddressPage.emailLink.resendButton"),onResendCodeClicked:b}),(0,i.tZ)(a.K,{children:(0,i.tZ)(p.Button,{variant:"ghost",localizationKey:(0,p.localizationKeys)("userProfile.formButtonReset"),elementDescriptor:p.descriptors.formButtonReset,onClick:s})})]})},y=()=>(0,i.tZ)(s.Ej,{title:(0,p.localizationKeys)("signUp.emailLink.verifiedSwitchTab.title"),subtitle:(0,p.localizationKeys)("signUp.emailLink.verifiedSwitchTab.subtitle"),status:"verified"})}}]);
|