@clerk/ui 1.14.0 → 1.14.1-canary.v20260527223243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ClerkUI.js +2 -2
- package/dist/components/ConfigureSSO/ConfigureSSO.js +1 -17
- package/dist/components/ConfigureSSO/ConfigureSSO.js.map +1 -1
- package/dist/components/ConfigureSSO/ConfigureSSONavbar.js +85 -6
- package/dist/components/ConfigureSSO/ConfigureSSONavbar.js.map +1 -1
- package/dist/configureSSO_ui_d2bc1f_1.14.1-canary.v20260527223243.js +1 -0
- package/dist/configureSSO_ui_e22e78_1.14.1-canary.v20260527223243.js +1 -0
- package/dist/configureSSO_ui_e6878d_1.14.1-canary.v20260527223243.js +1 -0
- package/dist/customizables/elementDescriptors.js +1 -0
- package/dist/customizables/elementDescriptors.js.map +1 -1
- package/dist/foundations/defaultFoundations.d.ts +153 -153
- package/dist/index.js +1 -1
- package/dist/internal/appearance.d.ts +1 -0
- package/dist/internal/appearance.d.ts.map +1 -1
- package/dist/no-rhc/ClerkUI.js +2 -2
- package/dist/no-rhc/components/ConfigureSSO/ConfigureSSO.js +1 -17
- package/dist/no-rhc/components/ConfigureSSO/ConfigureSSO.js.map +1 -1
- package/dist/no-rhc/components/ConfigureSSO/ConfigureSSONavbar.js +85 -6
- package/dist/no-rhc/components/ConfigureSSO/ConfigureSSONavbar.js.map +1 -1
- package/dist/no-rhc/customizables/elementDescriptors.js +1 -0
- package/dist/no-rhc/customizables/elementDescriptors.js.map +1 -1
- package/dist/no-rhc/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/{ui-common_ui_18e36c_1.14.0.js → ui-common_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +1 -1
- package/dist/ui-common_ui_e22e78_1.14.1-canary.v20260527223243.js +1 -0
- package/dist/{ui-common_ui_0f4a5c_1.14.0.js → ui-common_ui_e6878d_1.14.1-canary.v20260527223243.js} +1 -1
- package/dist/ui.browser.js +1 -1
- package/dist/ui.legacy.browser.js +1 -1
- package/dist/ui.shared.browser.js +2 -2
- package/package.json +3 -3
- package/dist/configureSSO_ui_0f4a5c_1.14.0.js +0 -1
- package/dist/configureSSO_ui_18e36c_1.14.0.js +0 -1
- package/dist/configureSSO_ui_745c75_1.14.0.js +0 -1
- package/dist/ui-common_ui_745c75_1.14.0.js +0 -1
- /package/dist/{2037_ui_745c75_1.14.0.js → 2037_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{2037_ui_0f4a5c_1.14.0.js → 2037_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{295_ui_18e36c_1.14.0.js → 295_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{37_ui_18e36c_1.14.0.js → 37_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{4718_ui_745c75_1.14.0.js → 4718_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{4718_ui_0f4a5c_1.14.0.js → 4718_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{5829_ui_745c75_1.14.0.js → 5829_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{5829_ui_0f4a5c_1.14.0.js → 5829_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{606_ui_18e36c_1.14.0.js → 606_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{606_ui_745c75_1.14.0.js → 606_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{606_ui_0f4a5c_1.14.0.js → 606_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{718_ui_18e36c_1.14.0.js → 718_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{746_ui_18e36c_1.14.0.js → 746_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{76_ui_18e36c_1.14.0.js → 76_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{76_ui_745c75_1.14.0.js → 76_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{76_ui_0f4a5c_1.14.0.js → 76_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{8295_ui_745c75_1.14.0.js → 8295_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{8295_ui_0f4a5c_1.14.0.js → 8295_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{829_ui_18e36c_1.14.0.js → 829_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{8746_ui_745c75_1.14.0.js → 8746_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{8746_ui_0f4a5c_1.14.0.js → 8746_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{apiKeys_ui_18e36c_1.14.0.js → apiKeys_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{apiKeys_ui_745c75_1.14.0.js → apiKeys_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{apiKeys_ui_0f4a5c_1.14.0.js → apiKeys_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{blankcaptcha_ui_18e36c_1.14.0.js → blankcaptcha_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{blankcaptcha_ui_745c75_1.14.0.js → blankcaptcha_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{blankcaptcha_ui_0f4a5c_1.14.0.js → blankcaptcha_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{checkout_ui_18e36c_1.14.0.js → checkout_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{checkout_ui_745c75_1.14.0.js → checkout_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{checkout_ui_0f4a5c_1.14.0.js → checkout_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_18e36c_1.14.0.js → copy-api-key-modal_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_745c75_1.14.0.js → copy-api-key-modal_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_0f4a5c_1.14.0.js → copy-api-key-modal_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{createorganization_ui_18e36c_1.14.0.js → createorganization_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{createorganization_ui_745c75_1.14.0.js → createorganization_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{createorganization_ui_0f4a5c_1.14.0.js → createorganization_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{enableOrganizationsPrompt_ui_18e36c_1.14.0.js → enableOrganizationsPrompt_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{enableOrganizationsPrompt_ui_745c75_1.14.0.js → enableOrganizationsPrompt_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{enableOrganizationsPrompt_ui_0f4a5c_1.14.0.js → enableOrganizationsPrompt_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{framework_ui_745c75_1.14.0.js → framework_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{framework_ui_0f4a5c_1.14.0.js → framework_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{impersonationfab_ui_18e36c_1.14.0.js → impersonationfab_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{impersonationfab_ui_745c75_1.14.0.js → impersonationfab_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{impersonationfab_ui_0f4a5c_1.14.0.js → impersonationfab_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{keylessPrompt_ui_18e36c_1.14.0.js → keylessPrompt_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{keylessPrompt_ui_745c75_1.14.0.js → keylessPrompt_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{keylessPrompt_ui_0f4a5c_1.14.0.js → keylessPrompt_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{oauthConsent_ui_18e36c_1.14.0.js → oauthConsent_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{oauthConsent_ui_745c75_1.14.0.js → oauthConsent_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{oauthConsent_ui_0f4a5c_1.14.0.js → oauthConsent_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{onetap_ui_18e36c_1.14.0.js → onetap_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{onetap_ui_745c75_1.14.0.js → onetap_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{onetap_ui_0f4a5c_1.14.0.js → onetap_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-api-keys-page_ui_18e36c_1.14.0.js → op-api-keys-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-api-keys-page_ui_745c75_1.14.0.js → op-api-keys-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-api-keys-page_ui_0f4a5c_1.14.0.js → op-api-keys-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-billing-page_ui_0f4a5c_1.14.0.js → op-billing-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-billing-page_ui_745c75_1.14.0.js → op-billing-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-billing-page_ui_18e36c_1.14.0.js → op-billing-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-plans-page_ui_18e36c_1.14.0.js → op-plans-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-plans-page_ui_745c75_1.14.0.js → op-plans-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-plans-page_ui_0f4a5c_1.14.0.js → op-plans-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-self-serve-sso-page_ui_18e36c_1.14.0.js → op-self-serve-sso-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-self-serve-sso-page_ui_745c75_1.14.0.js → op-self-serve-sso-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{op-self-serve-sso-page_ui_0f4a5c_1.14.0.js → op-self-serve-sso-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationlist_ui_18e36c_1.14.0.js → organizationlist_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationlist_ui_745c75_1.14.0.js → organizationlist_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationlist_ui_0f4a5c_1.14.0.js → organizationlist_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationprofile_ui_18e36c_1.14.0.js → organizationprofile_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationprofile_ui_745c75_1.14.0.js → organizationprofile_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationprofile_ui_0f4a5c_1.14.0.js → organizationprofile_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationswitcher_ui_18e36c_1.14.0.js → organizationswitcher_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationswitcher_ui_745c75_1.14.0.js → organizationswitcher_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{organizationswitcher_ui_0f4a5c_1.14.0.js → organizationswitcher_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{payment-attempt-page_ui_18e36c_1.14.0.js → payment-attempt-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{payment-attempt-page_ui_745c75_1.14.0.js → payment-attempt-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{payment-attempt-page_ui_0f4a5c_1.14.0.js → payment-attempt-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{planDetails_ui_18e36c_1.14.0.js → planDetails_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{planDetails_ui_745c75_1.14.0.js → planDetails_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{planDetails_ui_0f4a5c_1.14.0.js → planDetails_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_18e36c_1.14.0.js → prefetchorganizationlist_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_745c75_1.14.0.js → prefetchorganizationlist_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_0f4a5c_1.14.0.js → prefetchorganizationlist_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{pricingTable_ui_18e36c_1.14.0.js → pricingTable_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{pricingTable_ui_745c75_1.14.0.js → pricingTable_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{pricingTable_ui_0f4a5c_1.14.0.js → pricingTable_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_18e36c_1.14.0.js → revoke-api-key-modal_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_745c75_1.14.0.js → revoke-api-key-modal_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_0f4a5c_1.14.0.js → revoke-api-key-modal_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{sessionTasks_ui_18e36c_1.14.0.js → sessionTasks_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{sessionTasks_ui_745c75_1.14.0.js → sessionTasks_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{sessionTasks_ui_0f4a5c_1.14.0.js → sessionTasks_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{signin_ui_18e36c_1.14.0.js → signin_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{signin_ui_745c75_1.14.0.js → signin_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{signin_ui_0f4a5c_1.14.0.js → signin_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{signup_ui_18e36c_1.14.0.js → signup_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{signup_ui_745c75_1.14.0.js → signup_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{signup_ui_0f4a5c_1.14.0.js → signup_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{statement-page_ui_18e36c_1.14.0.js → statement-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{statement-page_ui_745c75_1.14.0.js → statement-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{statement-page_ui_0f4a5c_1.14.0.js → statement-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{subscriptionDetails_ui_18e36c_1.14.0.js → subscriptionDetails_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{subscriptionDetails_ui_745c75_1.14.0.js → subscriptionDetails_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{subscriptionDetails_ui_0f4a5c_1.14.0.js → subscriptionDetails_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskChooseOrganization_ui_18e36c_1.14.0.js → taskChooseOrganization_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskChooseOrganization_ui_745c75_1.14.0.js → taskChooseOrganization_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskChooseOrganization_ui_0f4a5c_1.14.0.js → taskChooseOrganization_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskResetPassword_ui_18e36c_1.14.0.js → taskResetPassword_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskResetPassword_ui_745c75_1.14.0.js → taskResetPassword_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskResetPassword_ui_0f4a5c_1.14.0.js → taskResetPassword_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskSetupMFA_ui_18e36c_1.14.0.js → taskSetupMFA_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskSetupMFA_ui_745c75_1.14.0.js → taskSetupMFA_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{taskSetupMFA_ui_0f4a5c_1.14.0.js → taskSetupMFA_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-api-keys-page_ui_18e36c_1.14.0.js → up-api-keys-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-api-keys-page_ui_745c75_1.14.0.js → up-api-keys-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-api-keys-page_ui_0f4a5c_1.14.0.js → up-api-keys-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-billing-page_ui_18e36c_1.14.0.js → up-billing-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-billing-page_ui_745c75_1.14.0.js → up-billing-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-billing-page_ui_0f4a5c_1.14.0.js → up-billing-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-plans-page_ui_18e36c_1.14.0.js → up-plans-page_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-plans-page_ui_745c75_1.14.0.js → up-plans-page_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{up-plans-page_ui_0f4a5c_1.14.0.js → up-plans-page_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{useravatar_ui_18e36c_1.14.0.js → useravatar_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{useravatar_ui_745c75_1.14.0.js → useravatar_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{useravatar_ui_0f4a5c_1.14.0.js → useravatar_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userbutton_ui_18e36c_1.14.0.js → userbutton_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userbutton_ui_745c75_1.14.0.js → userbutton_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userbutton_ui_0f4a5c_1.14.0.js → userbutton_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userprofile_ui_18e36c_1.14.0.js → userprofile_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userprofile_ui_745c75_1.14.0.js → userprofile_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userprofile_ui_0f4a5c_1.14.0.js → userprofile_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userverification_ui_18e36c_1.14.0.js → userverification_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userverification_ui_745c75_1.14.0.js → userverification_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{userverification_ui_0f4a5c_1.14.0.js → userverification_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{vendors_ui_18e36c_1.14.0.js → vendors_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{vendors_ui_745c75_1.14.0.js → vendors_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{vendors_ui_0f4a5c_1.14.0.js → vendors_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{waitlist_ui_18e36c_1.14.0.js → waitlist_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{waitlist_ui_745c75_1.14.0.js → waitlist_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{waitlist_ui_0f4a5c_1.14.0.js → waitlist_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{web3-solana-wallet-buttons_ui_18e36c_1.14.0.js → web3-solana-wallet-buttons_ui_d2bc1f_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{web3-solana-wallet-buttons_ui_745c75_1.14.0.js → web3-solana-wallet-buttons_ui_e22e78_1.14.1-canary.v20260527223243.js} +0 -0
- /package/dist/{web3-solana-wallet-buttons_ui_0f4a5c_1.14.0.js → web3-solana-wallet-buttons_ui_e6878d_1.14.1-canary.v20260527223243.js} +0 -0
package/dist/ClerkUI.js
CHANGED
|
@@ -23,8 +23,8 @@ import { isVersionAtLeast, parseVersion } from "@clerk/shared/versionCheck";
|
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
25
|
var ClerkUI = class ClerkUI {
|
|
26
|
-
static version = "1.14.
|
|
27
|
-
version = "1.14.
|
|
26
|
+
static version = "1.14.1-canary.v20260527223243";
|
|
27
|
+
version = "1.14.1-canary.v20260527223243";
|
|
28
28
|
#componentRenderer;
|
|
29
29
|
/**
|
|
30
30
|
* Creates a new `ClerkUI` instance and mounts the internal component renderer.
|
|
@@ -4,7 +4,6 @@ import { Route } from "../../router/Route.js";
|
|
|
4
4
|
import { Switch } from "../../router/Switch.js";
|
|
5
5
|
import exclamation_triangle_default from "../../icons/exclamation-triangle.js";
|
|
6
6
|
import { useProtect } from "../../common/Gate.js";
|
|
7
|
-
import { descriptors } from "../../customizables/elementDescriptors.js";
|
|
8
7
|
import { useCardState, withCardStateProvider } from "../../elements/contexts/index.js";
|
|
9
8
|
import { Flow } from "../../customizables/Flow.js";
|
|
10
9
|
import { Col, Flex, Heading, Icon, Text } from "../../customizables/index.js";
|
|
@@ -44,22 +43,7 @@ const AuthenticatedContent = withCoreUserGuard(() => {
|
|
|
44
43
|
}),
|
|
45
44
|
children: /* @__PURE__ */ jsx(ConfigureSSONavbar, {
|
|
46
45
|
contentRef,
|
|
47
|
-
children: /* @__PURE__ */ jsx(
|
|
48
|
-
ref: contentRef,
|
|
49
|
-
elementDescriptor: descriptors.scrollBox,
|
|
50
|
-
sx: (t) => ({
|
|
51
|
-
backgroundColor: t.colors.$colorBackground,
|
|
52
|
-
position: "relative",
|
|
53
|
-
borderRadius: t.radii.$lg,
|
|
54
|
-
width: "100%",
|
|
55
|
-
overflow: "hidden",
|
|
56
|
-
borderWidth: t.borderWidths.$normal,
|
|
57
|
-
borderStyle: t.borderStyles.$solid,
|
|
58
|
-
borderColor: t.colors.$borderAlpha150,
|
|
59
|
-
flex: 1
|
|
60
|
-
}),
|
|
61
|
-
children: /* @__PURE__ */ jsx(ConfigureSSOContent, { contentRef })
|
|
62
|
-
})
|
|
46
|
+
children: /* @__PURE__ */ jsx(ConfigureSSOContent, { contentRef })
|
|
63
47
|
})
|
|
64
48
|
});
|
|
65
49
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigureSSO.js","names":["ExclamationTriangle","ConfigureSSO: React.ComponentType<ConfigureSSOProps>"],"sources":["../../../src/components/ConfigureSSO/ConfigureSSO.tsx"],"sourcesContent":["import {\n __internal_useEnterpriseConnectionTestRuns,\n __internal_useUserEnterpriseConnections,\n useSession,\n} from '@clerk/shared/react';\nimport type { ConfigureSSOProps, EnterpriseConnectionResource } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useProtect } from '@/common';\nimport { withCoreUserGuard } from '@/contexts';\nimport { Col, descriptors, Flex, Flow, Heading, Icon, localizationKeys, Text } from '@/customizables';\nimport { useCardState, withCardStateProvider } from '@/elements/contexts';\nimport { ProfileCard } from '@/elements/ProfileCard';\nimport { ExclamationTriangle } from '@/icons';\nimport { Route, Switch } from '@/router';\n\nimport { ConfigureSSOProvider, useConfigureSSO } from './ConfigureSSOContext';\nimport { ConfigureSSOHeader } from './ConfigureSSOHeader';\nimport { ConfigureSSONavbar } from './ConfigureSSONavbar';\nimport { ConfigureSSOSkeleton } from './ConfigureSSOSkeleton';\nimport { ProfileCardFooter, ProfileCardHeader } from './elements/ProfileCard';\nimport { Step } from './elements/Step';\nimport { useWizard, Wizard } from './elements/Wizard';\nimport { ConfigureStep, ConfirmationStep, SelectProviderStep, TestConfigurationStep, VerifyDomainStep } from './steps';\n\nconst ConfigureSSOInternal = () => {\n return (\n <Flow.Root flow='configureSSO'>\n <Switch>\n <Route>\n <AuthenticatedContent />\n </Route>\n </Switch>\n </Flow.Root>\n );\n};\n\nconst AuthenticatedContent = withCoreUserGuard(() => {\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n return (\n <ProfileCard.Root\n sx={t => ({ display: 'grid', gridTemplateColumns: '1fr 3fr', height: t.sizes.$176, overflow: 'hidden' })}\n >\n <ConfigureSSONavbar contentRef={contentRef}>\n <Col\n ref={contentRef}\n elementDescriptor={descriptors.scrollBox}\n sx={t => ({\n backgroundColor: t.colors.$colorBackground,\n position: 'relative',\n borderRadius: t.radii.$lg,\n width: '100%',\n overflow: 'hidden',\n borderWidth: t.borderWidths.$normal,\n borderStyle: t.borderStyles.$solid,\n borderColor: t.colors.$borderAlpha150,\n flex: 1,\n })}\n >\n <ConfigureSSOContent contentRef={contentRef} />\n </Col>\n </ConfigureSSONavbar>\n </ProfileCard.Root>\n );\n});\n\nexport const ConfigureSSOContent = ({ contentRef }: { contentRef: React.RefObject<HTMLDivElement> }) => {\n const {\n data: enterpriseConnections,\n isLoading: isLoadingEnterpriseConnections,\n createEnterpriseConnection,\n updateEnterpriseConnection,\n deleteEnterpriseConnection,\n } = __internal_useUserEnterpriseConnections({ enabled: true });\n // Currently FAPI only supports one enterprise connection per user\n const enterpriseConnection = enterpriseConnections?.[0];\n\n const { hasSuccessfulTestRun, isLoading: isLoadingTestRuns } = useHasSuccessfulTestRun(enterpriseConnection);\n\n const isLoading = isLoadingEnterpriseConnections || isLoadingTestRuns;\n if (isLoading) {\n return <ConfigureSSOSkeleton />;\n }\n\n return (\n <ConfigureSSOProtect>\n <ConfigureSSOProvider\n hasSuccessfulTestRun={hasSuccessfulTestRun}\n enterpriseConnection={enterpriseConnection}\n contentRef={contentRef}\n createEnterpriseConnection={createEnterpriseConnection}\n updateEnterpriseConnection={updateEnterpriseConnection}\n deleteEnterpriseConnection={deleteEnterpriseConnection}\n >\n <ConfigureSSOSteps />\n </ConfigureSSOProvider>\n </ConfigureSSOProtect>\n );\n};\n\nconst ConfigureSSOSteps = () => {\n const { initialStepId, enterpriseConnection } = useConfigureSSO();\n\n return (\n <Wizard initialStepId={initialStepId}>\n <ResetCardErrorOnStepChange />\n <ConfigureSSOHeader />\n\n {/*\n * `select-provider` is only a wizard step while there's no enterprise\n * connection yet — creating one unregisters this step, which:\n * 1. Hides it from the breadcrumb (no need for a manual filter), and\n * 2. Prevents `goPrev` from any later step (e.g. configure's first\n * substep) from ever bubbling back into provider selection.\n */}\n {!enterpriseConnection && (\n <Wizard.Step id='select-provider'>\n <SelectProviderStep />\n </Wizard.Step>\n )}\n\n <Wizard.Step\n id='verify-domain'\n label='Verify domain'\n >\n <VerifyDomainStep />\n </Wizard.Step>\n\n <Wizard.Step\n id='configure'\n label='Configure'\n >\n <ConfigureStep />\n </Wizard.Step>\n\n <Wizard.Step\n id='test'\n label='Test'\n >\n <TestConfigurationStep />\n </Wizard.Step>\n\n <Wizard.Step\n id='confirmation'\n label='Confirmation'\n >\n <ConfirmationStep />\n </Wizard.Step>\n </Wizard>\n );\n};\n\nconst ConfigureSSOProtect = ({ children }: { children: React.ReactNode }) => {\n const { session } = useSession();\n const isPersonalWorkspace = !session?.lastActiveOrganizationId;\n const canManageEnterpriseConnections = useProtect(\n has => isPersonalWorkspace || has({ permission: 'org:sys_entconns:manage' }),\n );\n\n if (!canManageEnterpriseConnections) {\n return <MissingManageEnterpriseConnectionsPermission />;\n }\n\n return children;\n};\n\nconst MissingManageEnterpriseConnectionsPermission = () => (\n <>\n <ProfileCardHeader />\n\n <Step.Body>\n <Step.Section\n sx={{ flex: 1 }}\n align='center'\n justify='center'\n >\n <Flex\n align='center'\n justify='center'\n sx={t => ({ flex: 1, padding: t.space.$8 })}\n >\n <Col\n align='center'\n sx={t => ({ gap: t.space.$2, textAlign: 'center', maxWidth: t.sizes.$94 })}\n >\n <Icon\n icon={ExclamationTriangle}\n sx={t => ({ width: t.sizes.$8, height: t.sizes.$8, color: t.colors.$neutralAlpha600 })}\n />\n <Heading\n localizationKey={localizationKeys('configureSSO.missingManageEnterpriseConnectionsPermission.title')}\n textVariant='h1'\n sx={t => ({ fontSize: t.fontSizes.$lg, textWrap: 'balance' })}\n />\n <Text\n as='p'\n variant='body'\n colorScheme='secondary'\n localizationKey={localizationKeys('configureSSO.missingManageEnterpriseConnectionsPermission.subtitle')}\n sx={{ textWrap: 'balance' }}\n />\n </Col>\n </Flex>\n </Step.Section>\n </Step.Body>\n\n <ProfileCardFooter />\n </>\n);\n\n/**\n * Sentinel component rendered inside `<Wizard>`\n *\n * Clears any card-level error whenever the active step transitions, so a stale failure from one step\n * doesn't leak into the next\n */\nconst ResetCardErrorOnStepChange = (): null => {\n const { currentStep } = useWizard();\n const card = useCardState();\n const previousStepIdRef = React.useRef(currentStep?.id);\n\n React.useEffect(() => {\n if (previousStepIdRef.current === currentStep?.id) {\n return;\n }\n\n previousStepIdRef.current = currentStep?.id;\n card.setError(undefined);\n }, [currentStep?.id, card]);\n\n return null;\n};\n\n/**\n * Fetches a single successful test run for the given connection on mount\n */\nconst useHasSuccessfulTestRun = (\n enterpriseConnection: EnterpriseConnectionResource | undefined,\n): { hasSuccessfulTestRun: boolean; isLoading: boolean } => {\n const { data: successfulTestRuns, isLoading } = __internal_useEnterpriseConnectionTestRuns({\n enterpriseConnectionId: enterpriseConnection?.id ?? null,\n params: { initialPage: 1, pageSize: 1, status: ['success'] },\n });\n\n return {\n hasSuccessfulTestRun: (successfulTestRuns?.length ?? 0) > 0,\n isLoading,\n };\n};\n\nexport const ConfigureSSO: React.ComponentType<ConfigureSSOProps> = withCardStateProvider(ConfigureSSOInternal);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,6BAA6B;AACjC,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,oBAAC,oBACC,oBAAC,mBACC,oBAAC,yBAAuB,GAClB,GACD;GACC;;AAIhB,MAAM,uBAAuB,wBAAwB;CACnD,MAAM,aAAa,MAAM,OAAuB,KAAK;AAErD,QACE,oBAAC,YAAY;EACX,KAAI,OAAM;GAAE,SAAS;GAAQ,qBAAqB;GAAW,QAAQ,EAAE,MAAM;GAAM,UAAU;GAAU;YAEvG,oBAAC;GAA+B;aAC9B,oBAAC;IACC,KAAK;IACL,mBAAmB,YAAY;IAC/B,KAAI,OAAM;KACR,iBAAiB,EAAE,OAAO;KAC1B,UAAU;KACV,cAAc,EAAE,MAAM;KACtB,OAAO;KACP,UAAU;KACV,aAAa,EAAE,aAAa;KAC5B,aAAa,EAAE,aAAa;KAC5B,aAAa,EAAE,OAAO;KACtB,MAAM;KACP;cAED,oBAAC,uBAAgC,aAAc;KAC3C;IACa;GACJ;EAErB;AAEF,MAAa,uBAAuB,EAAE,iBAAkE;CACtG,MAAM,EACJ,MAAM,uBACN,WAAW,gCACX,4BACA,4BACA,+BACE,wCAAwC,EAAE,SAAS,MAAM,CAAC;CAE9D,MAAM,uBAAuB,wBAAwB;CAErD,MAAM,EAAE,sBAAsB,WAAW,sBAAsB,wBAAwB,qBAAqB;AAG5G,KADkB,kCAAkC,kBAElD,QAAO,oBAAC,yBAAuB;AAGjC,QACE,oBAAC,iCACC,oBAAC;EACuB;EACA;EACV;EACgB;EACA;EACA;YAE5B,oBAAC,sBAAoB;GACA,GACH;;AAI1B,MAAM,0BAA0B;CAC9B,MAAM,EAAE,eAAe,yBAAyB,iBAAiB;AAEjE,QACE,qBAAC;EAAsB;;GACrB,oBAAC,+BAA6B;GAC9B,oBAAC,uBAAqB;GASrB,CAAC,wBACA,oBAAC,OAAO;IAAK,IAAG;cACd,oBAAC,uBAAqB;KACV;GAGhB,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,qBAAmB;KACR;GAEd,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,kBAAgB;KACL;GAEd,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,0BAAwB;KACb;GAEd,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,qBAAmB;KACR;;GACP;;AAIb,MAAM,uBAAuB,EAAE,eAA8C;CAC3E,MAAM,EAAE,YAAY,YAAY;CAChC,MAAM,sBAAsB,CAAC,SAAS;AAKtC,KAAI,CAJmC,YACrC,QAAO,uBAAuB,IAAI,EAAE,YAAY,2BAA2B,CAAC,CAC7E,CAGC,QAAO,oBAAC,iDAA+C;AAGzD,QAAO;;AAGT,MAAM,qDACJ;CACE,oBAAC,sBAAoB;CAErB,oBAAC,KAAK,kBACJ,oBAAC,KAAK;EACJ,IAAI,EAAE,MAAM,GAAG;EACf,OAAM;EACN,SAAQ;YAER,oBAAC;GACC,OAAM;GACN,SAAQ;GACR,KAAI,OAAM;IAAE,MAAM;IAAG,SAAS,EAAE,MAAM;IAAI;aAE1C,qBAAC;IACC,OAAM;IACN,KAAI,OAAM;KAAE,KAAK,EAAE,MAAM;KAAI,WAAW;KAAU,UAAU,EAAE,MAAM;KAAK;;KAEzE,oBAAC;MACC,MAAMA;MACN,KAAI,OAAM;OAAE,OAAO,EAAE,MAAM;OAAI,QAAQ,EAAE,MAAM;OAAI,OAAO,EAAE,OAAO;OAAkB;OACrF;KACF,oBAAC;MACC,iBAAiB,iBAAiB,kEAAkE;MACpG,aAAY;MACZ,KAAI,OAAM;OAAE,UAAU,EAAE,UAAU;OAAK,UAAU;OAAW;OAC5D;KACF,oBAAC;MACC,IAAG;MACH,SAAQ;MACR,aAAY;MACZ,iBAAiB,iBAAiB,qEAAqE;MACvG,IAAI,EAAE,UAAU,WAAW;OAC3B;;KACE;IACD;GACM,GACL;CAEZ,oBAAC,sBAAoB;IACpB;;;;;;;AASL,MAAM,mCAAyC;CAC7C,MAAM,EAAE,gBAAgB,WAAW;CACnC,MAAM,OAAO,cAAc;CAC3B,MAAM,oBAAoB,MAAM,OAAO,aAAa,GAAG;AAEvD,OAAM,gBAAgB;AACpB,MAAI,kBAAkB,YAAY,aAAa,GAC7C;AAGF,oBAAkB,UAAU,aAAa;AACzC,OAAK,SAAS,OAAU;IACvB,CAAC,aAAa,IAAI,KAAK,CAAC;AAE3B,QAAO;;;;;AAMT,MAAM,2BACJ,yBAC0D;CAC1D,MAAM,EAAE,MAAM,oBAAoB,cAAc,2CAA2C;EACzF,wBAAwB,sBAAsB,MAAM;EACpD,QAAQ;GAAE,aAAa;GAAG,UAAU;GAAG,QAAQ,CAAC,UAAU;GAAE;EAC7D,CAAC;AAEF,QAAO;EACL,uBAAuB,oBAAoB,UAAU,KAAK;EAC1D;EACD;;AAGH,MAAaC,eAAuD,sBAAsB,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"ConfigureSSO.js","names":["ExclamationTriangle","ConfigureSSO: React.ComponentType<ConfigureSSOProps>"],"sources":["../../../src/components/ConfigureSSO/ConfigureSSO.tsx"],"sourcesContent":["import {\n __internal_useEnterpriseConnectionTestRuns,\n __internal_useUserEnterpriseConnections,\n useSession,\n} from '@clerk/shared/react';\nimport type { ConfigureSSOProps, EnterpriseConnectionResource } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useProtect } from '@/common';\nimport { withCoreUserGuard } from '@/contexts';\nimport { Col, Flex, Flow, Heading, Icon, localizationKeys, Text } from '@/customizables';\nimport { useCardState, withCardStateProvider } from '@/elements/contexts';\nimport { ProfileCard } from '@/elements/ProfileCard';\nimport { ExclamationTriangle } from '@/icons';\nimport { Route, Switch } from '@/router';\n\nimport { ConfigureSSOProvider, useConfigureSSO } from './ConfigureSSOContext';\nimport { ConfigureSSOHeader } from './ConfigureSSOHeader';\nimport { ConfigureSSONavbar } from './ConfigureSSONavbar';\nimport { ConfigureSSOSkeleton } from './ConfigureSSOSkeleton';\nimport { ProfileCardFooter, ProfileCardHeader } from './elements/ProfileCard';\nimport { Step } from './elements/Step';\nimport { useWizard, Wizard } from './elements/Wizard';\nimport { ConfigureStep, ConfirmationStep, SelectProviderStep, TestConfigurationStep, VerifyDomainStep } from './steps';\n\nconst ConfigureSSOInternal = () => {\n return (\n <Flow.Root flow='configureSSO'>\n <Switch>\n <Route>\n <AuthenticatedContent />\n </Route>\n </Switch>\n </Flow.Root>\n );\n};\n\nconst AuthenticatedContent = withCoreUserGuard(() => {\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n return (\n <ProfileCard.Root\n sx={t => ({ display: 'grid', gridTemplateColumns: '1fr 3fr', height: t.sizes.$176, overflow: 'hidden' })}\n >\n <ConfigureSSONavbar contentRef={contentRef}>\n <ConfigureSSOContent contentRef={contentRef} />\n </ConfigureSSONavbar>\n </ProfileCard.Root>\n );\n});\n\nexport const ConfigureSSOContent = ({ contentRef }: { contentRef: React.RefObject<HTMLDivElement> }) => {\n const {\n data: enterpriseConnections,\n isLoading: isLoadingEnterpriseConnections,\n createEnterpriseConnection,\n updateEnterpriseConnection,\n deleteEnterpriseConnection,\n } = __internal_useUserEnterpriseConnections({ enabled: true });\n // Currently FAPI only supports one enterprise connection per user\n const enterpriseConnection = enterpriseConnections?.[0];\n\n const { hasSuccessfulTestRun, isLoading: isLoadingTestRuns } = useHasSuccessfulTestRun(enterpriseConnection);\n\n const isLoading = isLoadingEnterpriseConnections || isLoadingTestRuns;\n if (isLoading) {\n return <ConfigureSSOSkeleton />;\n }\n\n return (\n <ConfigureSSOProtect>\n <ConfigureSSOProvider\n hasSuccessfulTestRun={hasSuccessfulTestRun}\n enterpriseConnection={enterpriseConnection}\n contentRef={contentRef}\n createEnterpriseConnection={createEnterpriseConnection}\n updateEnterpriseConnection={updateEnterpriseConnection}\n deleteEnterpriseConnection={deleteEnterpriseConnection}\n >\n <ConfigureSSOSteps />\n </ConfigureSSOProvider>\n </ConfigureSSOProtect>\n );\n};\n\nconst ConfigureSSOSteps = () => {\n const { initialStepId, enterpriseConnection } = useConfigureSSO();\n\n return (\n <Wizard initialStepId={initialStepId}>\n <ResetCardErrorOnStepChange />\n <ConfigureSSOHeader />\n\n {/*\n * `select-provider` is only a wizard step while there's no enterprise\n * connection yet — creating one unregisters this step, which:\n * 1. Hides it from the breadcrumb (no need for a manual filter), and\n * 2. Prevents `goPrev` from any later step (e.g. configure's first\n * substep) from ever bubbling back into provider selection.\n */}\n {!enterpriseConnection && (\n <Wizard.Step id='select-provider'>\n <SelectProviderStep />\n </Wizard.Step>\n )}\n\n <Wizard.Step\n id='verify-domain'\n label='Verify domain'\n >\n <VerifyDomainStep />\n </Wizard.Step>\n\n <Wizard.Step\n id='configure'\n label='Configure'\n >\n <ConfigureStep />\n </Wizard.Step>\n\n <Wizard.Step\n id='test'\n label='Test'\n >\n <TestConfigurationStep />\n </Wizard.Step>\n\n <Wizard.Step\n id='confirmation'\n label='Confirmation'\n >\n <ConfirmationStep />\n </Wizard.Step>\n </Wizard>\n );\n};\n\nconst ConfigureSSOProtect = ({ children }: { children: React.ReactNode }) => {\n const { session } = useSession();\n const isPersonalWorkspace = !session?.lastActiveOrganizationId;\n const canManageEnterpriseConnections = useProtect(\n has => isPersonalWorkspace || has({ permission: 'org:sys_entconns:manage' }),\n );\n\n if (!canManageEnterpriseConnections) {\n return <MissingManageEnterpriseConnectionsPermission />;\n }\n\n return children;\n};\n\nconst MissingManageEnterpriseConnectionsPermission = () => (\n <>\n <ProfileCardHeader />\n\n <Step.Body>\n <Step.Section\n sx={{ flex: 1 }}\n align='center'\n justify='center'\n >\n <Flex\n align='center'\n justify='center'\n sx={t => ({ flex: 1, padding: t.space.$8 })}\n >\n <Col\n align='center'\n sx={t => ({ gap: t.space.$2, textAlign: 'center', maxWidth: t.sizes.$94 })}\n >\n <Icon\n icon={ExclamationTriangle}\n sx={t => ({ width: t.sizes.$8, height: t.sizes.$8, color: t.colors.$neutralAlpha600 })}\n />\n <Heading\n localizationKey={localizationKeys('configureSSO.missingManageEnterpriseConnectionsPermission.title')}\n textVariant='h1'\n sx={t => ({ fontSize: t.fontSizes.$lg, textWrap: 'balance' })}\n />\n <Text\n as='p'\n variant='body'\n colorScheme='secondary'\n localizationKey={localizationKeys('configureSSO.missingManageEnterpriseConnectionsPermission.subtitle')}\n sx={{ textWrap: 'balance' }}\n />\n </Col>\n </Flex>\n </Step.Section>\n </Step.Body>\n\n <ProfileCardFooter />\n </>\n);\n\n/**\n * Sentinel component rendered inside `<Wizard>`\n *\n * Clears any card-level error whenever the active step transitions, so a stale failure from one step\n * doesn't leak into the next\n */\nconst ResetCardErrorOnStepChange = (): null => {\n const { currentStep } = useWizard();\n const card = useCardState();\n const previousStepIdRef = React.useRef(currentStep?.id);\n\n React.useEffect(() => {\n if (previousStepIdRef.current === currentStep?.id) {\n return;\n }\n\n previousStepIdRef.current = currentStep?.id;\n card.setError(undefined);\n }, [currentStep?.id, card]);\n\n return null;\n};\n\n/**\n * Fetches a single successful test run for the given connection on mount\n */\nconst useHasSuccessfulTestRun = (\n enterpriseConnection: EnterpriseConnectionResource | undefined,\n): { hasSuccessfulTestRun: boolean; isLoading: boolean } => {\n const { data: successfulTestRuns, isLoading } = __internal_useEnterpriseConnectionTestRuns({\n enterpriseConnectionId: enterpriseConnection?.id ?? null,\n params: { initialPage: 1, pageSize: 1, status: ['success'] },\n });\n\n return {\n hasSuccessfulTestRun: (successfulTestRuns?.length ?? 0) > 0,\n isLoading,\n };\n};\n\nexport const ConfigureSSO: React.ComponentType<ConfigureSSOProps> = withCardStateProvider(ConfigureSSOInternal);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,6BAA6B;AACjC,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,oBAAC,oBACC,oBAAC,mBACC,oBAAC,yBAAuB,GAClB,GACD;GACC;;AAIhB,MAAM,uBAAuB,wBAAwB;CACnD,MAAM,aAAa,MAAM,OAAuB,KAAK;AAErD,QACE,oBAAC,YAAY;EACX,KAAI,OAAM;GAAE,SAAS;GAAQ,qBAAqB;GAAW,QAAQ,EAAE,MAAM;GAAM,UAAU;GAAU;YAEvG,oBAAC;GAA+B;aAC9B,oBAAC,uBAAgC,aAAc;IAC5B;GACJ;EAErB;AAEF,MAAa,uBAAuB,EAAE,iBAAkE;CACtG,MAAM,EACJ,MAAM,uBACN,WAAW,gCACX,4BACA,4BACA,+BACE,wCAAwC,EAAE,SAAS,MAAM,CAAC;CAE9D,MAAM,uBAAuB,wBAAwB;CAErD,MAAM,EAAE,sBAAsB,WAAW,sBAAsB,wBAAwB,qBAAqB;AAG5G,KADkB,kCAAkC,kBAElD,QAAO,oBAAC,yBAAuB;AAGjC,QACE,oBAAC,iCACC,oBAAC;EACuB;EACA;EACV;EACgB;EACA;EACA;YAE5B,oBAAC,sBAAoB;GACA,GACH;;AAI1B,MAAM,0BAA0B;CAC9B,MAAM,EAAE,eAAe,yBAAyB,iBAAiB;AAEjE,QACE,qBAAC;EAAsB;;GACrB,oBAAC,+BAA6B;GAC9B,oBAAC,uBAAqB;GASrB,CAAC,wBACA,oBAAC,OAAO;IAAK,IAAG;cACd,oBAAC,uBAAqB;KACV;GAGhB,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,qBAAmB;KACR;GAEd,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,kBAAgB;KACL;GAEd,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,0BAAwB;KACb;GAEd,oBAAC,OAAO;IACN,IAAG;IACH,OAAM;cAEN,oBAAC,qBAAmB;KACR;;GACP;;AAIb,MAAM,uBAAuB,EAAE,eAA8C;CAC3E,MAAM,EAAE,YAAY,YAAY;CAChC,MAAM,sBAAsB,CAAC,SAAS;AAKtC,KAAI,CAJmC,YACrC,QAAO,uBAAuB,IAAI,EAAE,YAAY,2BAA2B,CAAC,CAC7E,CAGC,QAAO,oBAAC,iDAA+C;AAGzD,QAAO;;AAGT,MAAM,qDACJ;CACE,oBAAC,sBAAoB;CAErB,oBAAC,KAAK,kBACJ,oBAAC,KAAK;EACJ,IAAI,EAAE,MAAM,GAAG;EACf,OAAM;EACN,SAAQ;YAER,oBAAC;GACC,OAAM;GACN,SAAQ;GACR,KAAI,OAAM;IAAE,MAAM;IAAG,SAAS,EAAE,MAAM;IAAI;aAE1C,qBAAC;IACC,OAAM;IACN,KAAI,OAAM;KAAE,KAAK,EAAE,MAAM;KAAI,WAAW;KAAU,UAAU,EAAE,MAAM;KAAK;;KAEzE,oBAAC;MACC,MAAMA;MACN,KAAI,OAAM;OAAE,OAAO,EAAE,MAAM;OAAI,QAAQ,EAAE,MAAM;OAAI,OAAO,EAAE,OAAO;OAAkB;OACrF;KACF,oBAAC;MACC,iBAAiB,iBAAiB,kEAAkE;MACpG,aAAY;MACZ,KAAI,OAAM;OAAE,UAAU,EAAE,UAAU;OAAK,UAAU;OAAW;OAC5D;KACF,oBAAC;MACC,IAAG;MACH,SAAQ;MACR,aAAY;MACZ,iBAAiB,iBAAiB,qEAAqE;MACvG,IAAI,EAAE,UAAU,WAAW;OAC3B;;KACE;IACD;GACM,GACL;CAEZ,oBAAC,sBAAoB;IACpB;;;;;;;AASL,MAAM,mCAAyC;CAC7C,MAAM,EAAE,gBAAgB,WAAW;CACnC,MAAM,OAAO,cAAc;CAC3B,MAAM,oBAAoB,MAAM,OAAO,aAAa,GAAG;AAEvD,OAAM,gBAAgB;AACpB,MAAI,kBAAkB,YAAY,aAAa,GAC7C;AAGF,oBAAkB,UAAU,aAAa;AACzC,OAAK,SAAS,OAAU;IACvB,CAAC,aAAa,IAAI,KAAK,CAAC;AAE3B,QAAO;;;;;AAMT,MAAM,2BACJ,yBAC0D;CAC1D,MAAM,EAAE,MAAM,oBAAoB,cAAc,2CAA2C;EACzF,wBAAwB,sBAAsB,MAAM;EACpD,QAAQ;GAAE,aAAa;GAAG,UAAU;GAAG,QAAQ,CAAC,UAAU;GAAE;EAC7D,CAAC;AAEF,QAAO;EACL,uBAAuB,oBAAoB,UAAU,KAAK;EAC1D;EACD;;AAGH,MAAaC,eAAuD,sBAAsB,qBAAqB"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { useEnvironment } from "../../contexts/EnvironmentContext.js";
|
|
2
2
|
import { localizationKeys } from "../../localization/localizationKeys.js";
|
|
3
3
|
import box_default from "../../icons/box.js";
|
|
4
|
+
import { mqu } from "../../styledSystem/breakpoints.js";
|
|
5
|
+
import { descriptors } from "../../customizables/elementDescriptors.js";
|
|
4
6
|
import { useAppearance } from "../../customizables/AppearanceContext.js";
|
|
5
|
-
import { Box, Col, Flex, Icon, Text } from "../../customizables/index.js";
|
|
7
|
+
import { Box, Col, Flex, Heading, Icon, Text } from "../../customizables/index.js";
|
|
6
8
|
import { ApplicationLogo } from "../../elements/ApplicationLogo.js";
|
|
7
9
|
import { NavBar, NavbarContextProvider } from "../../elements/Navbar.js";
|
|
8
10
|
import React from "react";
|
|
9
11
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
10
|
-
import {
|
|
12
|
+
import { __internal_useOrganizationBase } from "@clerk/shared/react/index";
|
|
11
13
|
|
|
12
14
|
//#region src/components/ConfigureSSO/ConfigureSSONavbar.tsx
|
|
13
15
|
const ConfigureSSONavbar = ({ children, contentRef }) => {
|
|
@@ -63,14 +65,91 @@ const ConfigureSSONavbar = ({ children, contentRef }) => {
|
|
|
63
65
|
as: "p",
|
|
64
66
|
truncate: true,
|
|
65
67
|
children: applicationName
|
|
66
|
-
}), organizationSettings.enabled && /* @__PURE__ */ jsx(
|
|
68
|
+
}), organizationSettings.enabled && /* @__PURE__ */ jsx(OrganizationSubtitle, {})]
|
|
67
69
|
})]
|
|
68
70
|
})
|
|
69
|
-
}),
|
|
71
|
+
}), /* @__PURE__ */ jsxs(Col, {
|
|
72
|
+
ref: contentRef,
|
|
73
|
+
elementDescriptor: descriptors.scrollBox,
|
|
74
|
+
sx: (t) => ({
|
|
75
|
+
backgroundColor: t.colors.$colorBackground,
|
|
76
|
+
position: "relative",
|
|
77
|
+
borderRadius: t.radii.$lg,
|
|
78
|
+
width: "100%",
|
|
79
|
+
overflow: "hidden",
|
|
80
|
+
borderWidth: t.borderWidths.$normal,
|
|
81
|
+
borderStyle: t.borderStyles.$solid,
|
|
82
|
+
borderColor: t.colors.$borderAlpha150,
|
|
83
|
+
flex: 1
|
|
84
|
+
}),
|
|
85
|
+
children: [/* @__PURE__ */ jsx(ConfigureSSOMobileNavbar, {}), children]
|
|
86
|
+
})]
|
|
70
87
|
});
|
|
71
88
|
};
|
|
72
|
-
const
|
|
73
|
-
const {
|
|
89
|
+
const ConfigureSSOMobileNavbar = () => {
|
|
90
|
+
const { parsedOptions } = useAppearance();
|
|
91
|
+
const { organizationSettings, displayConfig: { applicationName, logoImageUrl } } = useEnvironment();
|
|
92
|
+
const hasLogo = Boolean(parsedOptions.logoImageUrl || logoImageUrl);
|
|
93
|
+
return /* @__PURE__ */ jsxs(Col, {
|
|
94
|
+
as: "header",
|
|
95
|
+
elementDescriptor: descriptors.configureSSOMobileNavbar,
|
|
96
|
+
sx: (t) => ({
|
|
97
|
+
display: "none",
|
|
98
|
+
[mqu.md]: { display: "flex" },
|
|
99
|
+
gap: t.space.$4,
|
|
100
|
+
padding: t.space.$5,
|
|
101
|
+
borderBottomWidth: t.borderWidths.$normal,
|
|
102
|
+
borderBottomStyle: t.borderStyles.$solid,
|
|
103
|
+
borderBottomColor: t.colors.$borderAlpha100
|
|
104
|
+
}),
|
|
105
|
+
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
106
|
+
align: "center",
|
|
107
|
+
sx: (t) => ({
|
|
108
|
+
gap: t.space.$2,
|
|
109
|
+
maxWidth: "100%"
|
|
110
|
+
}),
|
|
111
|
+
children: [hasLogo ? /* @__PURE__ */ jsx(ApplicationLogo, { sx: (t) => ({
|
|
112
|
+
width: t.space.$9,
|
|
113
|
+
height: t.space.$9,
|
|
114
|
+
borderRadius: t.radii.$md,
|
|
115
|
+
overflow: "hidden"
|
|
116
|
+
}) }) : /* @__PURE__ */ jsx(Box, {
|
|
117
|
+
sx: (t) => ({
|
|
118
|
+
width: t.space.$9,
|
|
119
|
+
height: t.space.$9,
|
|
120
|
+
flexShrink: 0,
|
|
121
|
+
borderRadius: t.radii.$md,
|
|
122
|
+
backgroundColor: t.colors.$primary500,
|
|
123
|
+
color: t.colors.$colorPrimaryForeground,
|
|
124
|
+
display: "flex",
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
justifyContent: "center"
|
|
127
|
+
}),
|
|
128
|
+
"aria-hidden": true,
|
|
129
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
130
|
+
icon: box_default,
|
|
131
|
+
sx: (t) => ({
|
|
132
|
+
width: t.sizes.$4,
|
|
133
|
+
height: t.sizes.$4
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
}), /* @__PURE__ */ jsxs(Col, {
|
|
137
|
+
sx: { minWidth: 0 },
|
|
138
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
139
|
+
as: "p",
|
|
140
|
+
truncate: true,
|
|
141
|
+
children: applicationName
|
|
142
|
+
}), organizationSettings.enabled && /* @__PURE__ */ jsx(OrganizationSubtitle, {})]
|
|
143
|
+
})]
|
|
144
|
+
}), /* @__PURE__ */ jsx(Heading, {
|
|
145
|
+
as: "h3",
|
|
146
|
+
localizationKey: localizationKeys("configureSSO.navbar.title"),
|
|
147
|
+
sx: (t) => ({ fontSize: t.fontSizes.$lg })
|
|
148
|
+
})]
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
const OrganizationSubtitle = () => {
|
|
152
|
+
const organization = __internal_useOrganizationBase();
|
|
74
153
|
if (!organization) return null;
|
|
75
154
|
return /* @__PURE__ */ jsx(Text, {
|
|
76
155
|
as: "span",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigureSSONavbar.js","names":["BoxIcon"],"sources":["../../../src/components/ConfigureSSO/ConfigureSSONavbar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ConfigureSSONavbar.js","names":["BoxIcon"],"sources":["../../../src/components/ConfigureSSO/ConfigureSSONavbar.tsx"],"sourcesContent":["import { __internal_useOrganizationBase } from '@clerk/shared/react/index';\nimport React from 'react';\n\nimport { useEnvironment } from '@/contexts';\nimport { Box, Col, descriptors, Flex, Heading, Icon, localizationKeys, Text, useAppearance } from '@/customizables';\nimport { ApplicationLogo } from '@/elements/ApplicationLogo';\nimport { NavBar, NavbarContextProvider } from '@/elements/Navbar';\nimport { BoxIcon } from '@/icons';\nimport { mqu } from '@/styledSystem';\n\ntype ConfigureSSONavbarProps = React.PropsWithChildren<{\n contentRef: React.RefObject<HTMLDivElement>;\n}>;\n\nexport const ConfigureSSONavbar = ({ children, contentRef }: ConfigureSSONavbarProps) => {\n const { parsedOptions } = useAppearance();\n const {\n organizationSettings,\n displayConfig: { applicationName, logoImageUrl },\n } = useEnvironment();\n\n const hasLogo = Boolean(parsedOptions.logoImageUrl || logoImageUrl);\n\n return (\n <NavbarContextProvider contentRef={contentRef}>\n <NavBar\n contentRef={contentRef}\n title={localizationKeys('configureSSO.navbar.title')}\n titleSx={t => ({ fontSize: t.fontSizes.$lg })}\n containerSx={{\n flexDirection: 'column-reverse',\n flex: 0,\n }}\n routes={[]}\n header={\n <Flex\n align='center'\n sx={t => ({\n gap: t.space.$2,\n padding: `${t.space.$none} ${t.space.$3}`,\n maxWidth: '100%',\n })}\n >\n {hasLogo ? (\n <ApplicationLogo\n sx={t => ({ width: t.space.$9, height: t.space.$9, borderRadius: t.radii.$md, overflow: 'hidden' })}\n />\n ) : (\n <Box\n sx={t => ({\n width: t.space.$9,\n height: t.space.$9,\n flexShrink: 0,\n borderRadius: t.radii.$md,\n backgroundColor: t.colors.$primary500,\n color: t.colors.$colorPrimaryForeground,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n })}\n aria-hidden\n >\n <Icon\n icon={BoxIcon}\n sx={t => ({ width: t.sizes.$4, height: t.sizes.$4 })}\n />\n </Box>\n )}\n\n <Col sx={{ minWidth: 0 }}>\n <Text\n as='p'\n truncate\n >\n {applicationName}\n </Text>\n {organizationSettings.enabled && <OrganizationSubtitle />}\n </Col>\n </Flex>\n }\n />\n <Col\n ref={contentRef}\n elementDescriptor={descriptors.scrollBox}\n sx={t => ({\n backgroundColor: t.colors.$colorBackground,\n position: 'relative',\n borderRadius: t.radii.$lg,\n width: '100%',\n overflow: 'hidden',\n borderWidth: t.borderWidths.$normal,\n borderStyle: t.borderStyles.$solid,\n borderColor: t.colors.$borderAlpha150,\n flex: 1,\n })}\n >\n <ConfigureSSOMobileNavbar />\n {children}\n </Col>\n </NavbarContextProvider>\n );\n};\n\nconst ConfigureSSOMobileNavbar = () => {\n const { parsedOptions } = useAppearance();\n const {\n organizationSettings,\n displayConfig: { applicationName, logoImageUrl },\n } = useEnvironment();\n\n const hasLogo = Boolean(parsedOptions.logoImageUrl || logoImageUrl);\n\n return (\n <Col\n as='header'\n elementDescriptor={descriptors.configureSSOMobileNavbar}\n sx={t => ({\n display: 'none',\n [mqu.md]: {\n display: 'flex',\n },\n gap: t.space.$4,\n padding: t.space.$5,\n borderBottomWidth: t.borderWidths.$normal,\n borderBottomStyle: t.borderStyles.$solid,\n borderBottomColor: t.colors.$borderAlpha100,\n })}\n >\n <Flex\n align='center'\n sx={t => ({\n gap: t.space.$2,\n maxWidth: '100%',\n })}\n >\n {hasLogo ? (\n <ApplicationLogo\n sx={t => ({\n width: t.space.$9,\n height: t.space.$9,\n borderRadius: t.radii.$md,\n overflow: 'hidden',\n })}\n />\n ) : (\n <Box\n sx={t => ({\n width: t.space.$9,\n height: t.space.$9,\n flexShrink: 0,\n borderRadius: t.radii.$md,\n backgroundColor: t.colors.$primary500,\n color: t.colors.$colorPrimaryForeground,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n })}\n aria-hidden\n >\n <Icon\n icon={BoxIcon}\n sx={t => ({ width: t.sizes.$4, height: t.sizes.$4 })}\n />\n </Box>\n )}\n\n <Col sx={{ minWidth: 0 }}>\n <Text\n as='p'\n truncate\n >\n {applicationName}\n </Text>\n {organizationSettings.enabled && <OrganizationSubtitle />}\n </Col>\n </Flex>\n\n <Heading\n as='h3'\n localizationKey={localizationKeys('configureSSO.navbar.title')}\n sx={t => ({ fontSize: t.fontSizes.$lg })}\n />\n </Col>\n );\n};\n\nconst OrganizationSubtitle = (): JSX.Element | null => {\n const organization = __internal_useOrganizationBase();\n\n if (!organization) {\n return null;\n }\n\n return (\n <Text\n as='span'\n truncate\n sx={t => ({ color: t.colors.$colorMutedForeground })}\n >\n {organization?.name}\n </Text>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAa,sBAAsB,EAAE,UAAU,iBAA0C;CACvF,MAAM,EAAE,kBAAkB,eAAe;CACzC,MAAM,EACJ,sBACA,eAAe,EAAE,iBAAiB,mBAChC,gBAAgB;CAEpB,MAAM,UAAU,QAAQ,cAAc,gBAAgB,aAAa;AAEnE,QACE,qBAAC;EAAkC;aACjC,oBAAC;GACa;GACZ,OAAO,iBAAiB,4BAA4B;GACpD,UAAS,OAAM,EAAE,UAAU,EAAE,UAAU,KAAK;GAC5C,aAAa;IACX,eAAe;IACf,MAAM;IACP;GACD,QAAQ,EAAE;GACV,QACE,qBAAC;IACC,OAAM;IACN,KAAI,OAAM;KACR,KAAK,EAAE,MAAM;KACb,SAAS,GAAG,EAAE,MAAM,MAAM,GAAG,EAAE,MAAM;KACrC,UAAU;KACX;eAEA,UACC,oBAAC,mBACC,KAAI,OAAM;KAAE,OAAO,EAAE,MAAM;KAAI,QAAQ,EAAE,MAAM;KAAI,cAAc,EAAE,MAAM;KAAK,UAAU;KAAU,IAClG,GAEF,oBAAC;KACC,KAAI,OAAM;MACR,OAAO,EAAE,MAAM;MACf,QAAQ,EAAE,MAAM;MAChB,YAAY;MACZ,cAAc,EAAE,MAAM;MACtB,iBAAiB,EAAE,OAAO;MAC1B,OAAO,EAAE,OAAO;MAChB,SAAS;MACT,YAAY;MACZ,gBAAgB;MACjB;KACD;eAEA,oBAAC;MACC,MAAMA;MACN,KAAI,OAAM;OAAE,OAAO,EAAE,MAAM;OAAI,QAAQ,EAAE,MAAM;OAAI;OACnD;MACE,EAGR,qBAAC;KAAI,IAAI,EAAE,UAAU,GAAG;gBACtB,oBAAC;MACC,IAAG;MACH;gBAEC;OACI,EACN,qBAAqB,WAAW,oBAAC,yBAAuB;MACrD;KACD;IAET,EACF,qBAAC;GACC,KAAK;GACL,mBAAmB,YAAY;GAC/B,KAAI,OAAM;IACR,iBAAiB,EAAE,OAAO;IAC1B,UAAU;IACV,cAAc,EAAE,MAAM;IACtB,OAAO;IACP,UAAU;IACV,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,OAAO;IACtB,MAAM;IACP;cAED,oBAAC,6BAA2B,EAC3B;IACG;GACgB;;AAI5B,MAAM,iCAAiC;CACrC,MAAM,EAAE,kBAAkB,eAAe;CACzC,MAAM,EACJ,sBACA,eAAe,EAAE,iBAAiB,mBAChC,gBAAgB;CAEpB,MAAM,UAAU,QAAQ,cAAc,gBAAgB,aAAa;AAEnE,QACE,qBAAC;EACC,IAAG;EACH,mBAAmB,YAAY;EAC/B,KAAI,OAAM;GACR,SAAS;IACR,IAAI,KAAK,EACR,SAAS,QACV;GACD,KAAK,EAAE,MAAM;GACb,SAAS,EAAE,MAAM;GACjB,mBAAmB,EAAE,aAAa;GAClC,mBAAmB,EAAE,aAAa;GAClC,mBAAmB,EAAE,OAAO;GAC7B;aAED,qBAAC;GACC,OAAM;GACN,KAAI,OAAM;IACR,KAAK,EAAE,MAAM;IACb,UAAU;IACX;cAEA,UACC,oBAAC,mBACC,KAAI,OAAM;IACR,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU;IACX,IACD,GAEF,oBAAC;IACC,KAAI,OAAM;KACR,OAAO,EAAE,MAAM;KACf,QAAQ,EAAE,MAAM;KAChB,YAAY;KACZ,cAAc,EAAE,MAAM;KACtB,iBAAiB,EAAE,OAAO;KAC1B,OAAO,EAAE,OAAO;KAChB,SAAS;KACT,YAAY;KACZ,gBAAgB;KACjB;IACD;cAEA,oBAAC;KACC,MAAMA;KACN,KAAI,OAAM;MAAE,OAAO,EAAE,MAAM;MAAI,QAAQ,EAAE,MAAM;MAAI;MACnD;KACE,EAGR,qBAAC;IAAI,IAAI,EAAE,UAAU,GAAG;eACtB,oBAAC;KACC,IAAG;KACH;eAEC;MACI,EACN,qBAAqB,WAAW,oBAAC,yBAAuB;KACrD;IACD,EAEP,oBAAC;GACC,IAAG;GACH,iBAAiB,iBAAiB,4BAA4B;GAC9D,KAAI,OAAM,EAAE,UAAU,EAAE,UAAU,KAAK;IACvC;GACE;;AAIV,MAAM,6BAAiD;CACrD,MAAM,eAAe,gCAAgC;AAErD,KAAI,CAAC,aACH,QAAO;AAGT,QACE,oBAAC;EACC,IAAG;EACH;EACA,KAAI,OAAM,EAAE,OAAO,EAAE,OAAO,uBAAuB;YAElD,cAAc;GACV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["971"],{7215(e,i,t){t.r(i),t.d(i,{ConfigureSSO:()=>iO,ConfigureSSOContent:()=>ih});var r=t(9763),o=t(2959),n=t(630),a=t.n(n),l=t(2396),s=t(9203),c=t(1522),d=t(7996),u=t(8342),p=t(7308),S=t(1581),g=t(1202),m=t(6661),f=t(9922);let h=a().createContext(null);h.displayName="ConfigureSSOContext";let Y=({enterpriseConnection:e,hasSuccessfulTestRun:i,contentRef:t,createEnterpriseConnection:l,updateEnterpriseConnection:s,deleteEnterpriseConnection:c,children:d})=>{let[u,S]=a().useState(e?.provider),{session:g}=(0,o.wV)(),{user:m}=(0,o.Jd)(),f=(0,p.f0)(),Y=y(m,g,e),$=((e,i)=>{let t,{isDomainTakenByOtherOrg:r,hasSuccessfulTestRun:o}=i;return r?"verify-domain":e?e?.active?"confirmation":(t=e,t.samlConnection?.idpSsoUrl&&t.samlConnection?.idpEntityId)?o?"confirmation":"test":"configure":"select-provider"})(e,{isDomainTakenByOtherOrg:Y,hasSuccessfulTestRun:i}),D=(0,n.useCallback)(async(e,i)=>{let t=i?.emailAddress.split("@")[1],r=g?.lastActiveOrganizationId??null;if(t){f.setLoading();try{await l({provider:e,name:t,organizationId:r})}finally{f.setIdle()}}},[f,g,l]),b=a().useMemo(()=>({provider:u,contentRef:t,setProvider:S,initialStepId:$,enterpriseConnection:e,isDomainTakenByOtherOrg:Y,createEnterpriseConnection:D,updateEnterpriseConnection:s,deleteEnterpriseConnection:c}),[u,t,$,e,D,s,c,Y]);return(0,r.Y)(h.Provider,{value:b,children:d})},$=()=>{let e=a().useContext(h);if(!e)throw Error("useConfigureSSO called outside <ConfigureSSOProvider>.");return e},y=(e,i,t)=>{let r=e?.primaryEmailAddress??e?.emailAddresses?.find(e=>"verified"!==e.verification.status),o=r?.verification.status==="verified",n=i?.lastActiveOrganizationId??null;return!!(o&&t&&t.organizationId!==n)};var D=t(4722),b=t(6447),O=t(8343);let z=e=>(0,r.Y)(d.so,{as:"header",elementDescriptor:b.$z.configureSSOHeader,...e,sx:e=>({gap:e.space.$2,width:"100%",minHeight:e.sizes.$13,padding:e.space.$5,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100})}),x=e=>(0,r.Y)(d.so,{as:"footer",elementDescriptor:b.$z.configureSSOFooter,align:"center",justify:"end",...e,sx:e=>({gap:e.space.$2,minHeight:e.sizes.$16,padding:e.space.$4,background:O.s.mutedBackground(e),borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100})});var C=t(9242),v=t(3693);let F=({bullet:e,isCurrent:i,isCompleted:t,isReachable:o=!0,onClick:n,children:a})=>(0,r.FD)(d.dF,{elementDescriptor:b.$z.configureSSOStepperItem,isActive:i,variant:"unstyled",isDisabled:!o,onClick:n,sx:e=>({gap:e.space.$1x5,padding:0,color:i||t?e.colors.$colorForeground:e.colors.$colorMutedForeground,"&:disabled,&[data-disabled]":{opacity:1}}),children:[(0,r.Y)(d.so,{elementDescriptor:b.$z.configureSSOStepperItemBullet,isActive:i,align:"center",justify:"center",sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:i?e.colors.$colorForeground:t?e.colors.$success500:e.colors.$colorMutedForeground}),children:t&&!i?(0,r.Y)(d.In,{icon:v.A,size:"sm",sx:e=>({color:e.colors.$white})}):(0,r.Y)(d.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs,fontWeight:e.fontWeights.$medium,color:e.colors.$colorBackground}),children:e})}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOStepperItemLabel,as:"span",variant:"body",sx:{fontWeight:"inherit",color:"inherit"},children:a})]});F.displayName="Stepper.Item";let I=()=>(0,r.FD)(d.so,{align:"center",sx:e=>({gap:e.space.$1x5,minHeight:e.sizes.$4x5,opacity:.16}),children:[(0,r.Y)(d.az,{sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorMutedForeground})}),(0,r.Y)(d.az,{sx:e=>({width:e.sizes.$17,height:e.sizes.$1x5,borderRadius:e.radii.$md,backgroundColor:e.colors.$colorMutedForeground})})]}),E=Object.assign(({children:e})=>{let i=a().Children.toArray(e).filter(e=>a().isValidElement(e));return(0,r.Y)(d.so,{elementDescriptor:b.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap"}),children:i.map((e,t)=>(0,r.FD)(a().Fragment,{children:[e,t<i.length-1&&(0,r.Y)(d.In,{elementDescriptor:b.$z.configureSSOStepperSeparator,icon:C.A,size:"md",colorScheme:"neutral"})]},t))})},{Item:F,Skeleton:({totalSteps:e=4})=>(0,r.Y)(d.so,{elementDescriptor:b.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap"}),children:Array.from({length:e}).map((i,t)=>(0,r.FD)(a().Fragment,{children:[(0,r.Y)(I,{}),t<e-1&&(0,r.Y)(d.In,{elementDescriptor:b.$z.configureSSOStepperSeparator,icon:C.A,size:"md",colorScheme:"neutral",sx:{opacity:.16}})]},t))})}),k=a().createContext(null);function G(){let e=a().useContext(k);if(!e)throw Error("useWizard called outside of <Wizard>");return e}k.displayName="WizardContext";let w=()=>{let{activeSteps:e,currentStep:i,goToStep:t}=G(),{t:o}=(0,D._)(),n=e.filter(e=>"select-provider"!==e.id),a=n.findIndex(e=>e.id===i?.id);return(0,r.Y)(z,{children:(0,r.Y)(E,{children:n.map((e,i)=>{let n=e.isCompleted??i<a,l=n||i<=a,s=e.label?"string"==typeof e.label?e.label:o(e.label):"";return(0,r.Y)(E.Item,{bullet:i+1,isCurrent:i===a,isCompleted:n,isReachable:l,onClick:()=>void t(e.id),children:s},e.id)})})})};var R=t(1868),T=t(9735),A=t(914),_=t(611),K=t(4281),L=t(4260);let P=({children:e,contentRef:i})=>{let{parsedOptions:t}=(0,T.KP)(),{organizationSettings:o,displayConfig:{applicationName:n,logoImageUrl:a}}=(0,R.O)(),l=!!(t.logoImageUrl||a);return(0,r.FD)(_.XM,{contentRef:i,children:[(0,r.Y)(_.jq,{contentRef:i,title:(0,u.G)("configureSSO.navbar.title"),titleSx:e=>({fontSize:e.fontSizes.$lg}),containerSx:{flexDirection:"column-reverse",flex:0},routes:[],header:(0,r.FD)(d.so,{align:"center",sx:e=>({gap:e.space.$2,padding:`${e.space.$none} ${e.space.$3}`,maxWidth:"100%"}),children:[l?(0,r.Y)(A.G,{sx:e=>({width:e.space.$9,height:e.space.$9,borderRadius:e.radii.$md,overflow:"hidden"})}):(0,r.Y)(d.az,{sx:e=>({width:e.space.$9,height:e.space.$9,flexShrink:0,borderRadius:e.radii.$md,backgroundColor:e.colors.$primary500,color:e.colors.$colorPrimaryForeground,display:"flex",alignItems:"center",justifyContent:"center"}),"aria-hidden":!0,children:(0,r.Y)(d.In,{icon:K.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4})})}),(0,r.FD)(d.fv,{sx:{minWidth:0},children:[(0,r.Y)(d.EY,{as:"p",truncate:!0,children:n}),o.enabled&&(0,r.Y)(W,{})]})]})}),(0,r.FD)(d.fv,{ref:i,elementDescriptor:b.$z.scrollBox,sx:e=>({backgroundColor:e.colors.$colorBackground,position:"relative",borderRadius:e.radii.$lg,width:"100%",overflow:"hidden",borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,flex:1}),children:[(0,r.Y)(B,{}),e]})]})},B=()=>{let{parsedOptions:e}=(0,T.KP)(),{organizationSettings:i,displayConfig:{applicationName:t,logoImageUrl:o}}=(0,R.O)(),n=!!(e.logoImageUrl||o);return(0,r.FD)(d.fv,{as:"header",elementDescriptor:b.$z.configureSSOMobileNavbar,sx:e=>({display:"none",[L.g.md]:{display:"flex"},gap:e.space.$4,padding:e.space.$5,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:[(0,r.FD)(d.so,{align:"center",sx:e=>({gap:e.space.$2,maxWidth:"100%"}),children:[n?(0,r.Y)(A.G,{sx:e=>({width:e.space.$9,height:e.space.$9,borderRadius:e.radii.$md,overflow:"hidden"})}):(0,r.Y)(d.az,{sx:e=>({width:e.space.$9,height:e.space.$9,flexShrink:0,borderRadius:e.radii.$md,backgroundColor:e.colors.$primary500,color:e.colors.$colorPrimaryForeground,display:"flex",alignItems:"center",justifyContent:"center"}),"aria-hidden":!0,children:(0,r.Y)(d.In,{icon:K.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4})})}),(0,r.FD)(d.fv,{sx:{minWidth:0},children:[(0,r.Y)(d.EY,{as:"p",truncate:!0,children:t}),i.enabled&&(0,r.Y)(W,{})]})]}),(0,r.Y)(d.DZ,{as:"h3",localizationKey:(0,u.G)("configureSSO.navbar.title"),sx:e=>({fontSize:e.fontSizes.$lg})})]})},W=()=>{let e=(0,o.It)();return e?(0,r.Y)(d.EY,{as:"span",truncate:!0,sx:e=>({color:e.colors.$colorMutedForeground}),children:e?.name}):null};var V=t(3919);let U=({fill:e,sx:i,...t})=>(0,r.Y)(d.fv,{elementDescriptor:b.$z.configureSSOStepSection,...t,sx:[e=>({padding:e.space.$5}),e&&{flex:1},i]}),M=({onClick:e,isDisabled:i,isLoading:t,label:o="Previous"})=>{let{t:n}=(0,D._)(),a="string"==typeof o?o:n(o);return(0,r.FD)(d.$n,{elementDescriptor:b.$z.configureSSOFooterPreviousButton,variant:"outline",size:"sm",isDisabled:i,isLoading:t,onClick:e?()=>{e()}:void 0,children:[(0,r.Y)(d.In,{icon:V.A,size:"sm",sx:e=>({marginInlineEnd:e.space.$1})}),a]})};M.displayName="Step.Footer.Previous";let N=({onClick:e,isDisabled:i,isLoading:t,label:o="Continue"})=>{let{t:n}=(0,D._)(),a="string"==typeof o?o:n(o);return(0,r.FD)(d.$n,{elementDescriptor:b.$z.configureSSOFooterContinueButton,variant:"solid",size:"sm",isDisabled:i,isLoading:t,onClick:e?()=>{e()}:void 0,children:[a,(0,r.Y)(d.In,{icon:C.A,size:"sm",sx:e=>({marginInlineStart:e.space.$1})})]})};N.displayName="Step.Footer.Continue";let H=Object.assign(({children:e})=>(0,r.Y)(x,{children:e}),{Previous:M,Continue:N}),j=({total:e,current:i})=>e<=1?null:(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOStepCounter,colorScheme:"primary",sx:{whiteSpace:"nowrap"},children:(0,r.FD)(d.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs}),children:["Step ",i,"/",e]})});j.displayName="Step.Counter";let q=Object.assign(({sx:e,...i})=>(0,r.Y)(d.fv,{...i,sx:[{flex:1,minHeight:0},e]}),{Section:U,Header:({title:e,description:i,children:t})=>{let{t:o}=(0,D._)(),n="string"==typeof e?e:o(e),a=i?"string"==typeof i?i:o(i):null;return(0,r.Y)(U,{elementDescriptor:b.$z.configureSSOStepHeader,sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(d.so,{align:"start",justify:"between",sx:e=>({gap:e.space.$4}),children:[(0,r.FD)(d.fv,{sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOStepHeaderTitle,textVariant:"h2",children:n}),a&&(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOStepHeaderDescription,as:"p",colorScheme:"secondary",children:a})]}),t]})})},Body:({sx:e,...i})=>(0,r.Y)(d.fv,{elementDescriptor:b.$z.configureSSOStepBody,as:"main",...i,sx:[e=>({flex:1,minHeight:0,overflowY:"auto",...O.s.unstyledScrollbar(e)}),e]}),Footer:H,Counter:j}),Z=()=>(0,r.FD)(r.FK,{children:[(0,r.Y)(z,{children:(0,r.Y)(E.Skeleton,{})}),(0,r.Y)(d.so,{align:"center",justify:"center",sx:e=>({flex:1,padding:e.space.$5}),children:(0,r.Y)(d.y$,{size:"xs",colorScheme:"neutral",elementDescriptor:b.$z.spinner})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{isDisabled:!0}),(0,r.Y)(q.Footer.Continue,{isDisabled:!0})]})]}),J=({parentWizard:e,isNested:i,initialStepId:t,children:o})=>{let[n,l]=a().useState([]),[s,c]=a().useState(t),d=a().useCallback(e=>{l(i=>{let t=i.findIndex(i=>i.id===e.id);if(t>=0){let r=i[t];if(r.label===e.label&&r.isCompleted===e.isCompleted)return i;let o=i.slice();return o[t]=e,o}return[...i,e]}),c(i=>i??e.id)},[]),u=a().useCallback(e=>{l(i=>i.some(i=>i.id===e)?i.filter(i=>i.id!==e):i),c(i=>i===e?void 0:i)},[]),p=a().useMemo(()=>n.find(e=>e.id===s),[n,s]),S=a().useMemo(()=>p?n.findIndex(e=>e.id===p.id):-1,[n,p]),g=a().useCallback(()=>{if(S<0)return;let i=n[S+1];return i?void c(i.id):e?.goNext()},[n,S,e]),m=a().useCallback(()=>{if(S<0)return;let i=n[S-1];return i?void c(i.id):e?.goPrev()},[n,S,e]),f=a().useCallback(e=>{n.some(i=>i.id===e)&&c(e)},[n]),h=a().useMemo(()=>({activeSteps:n,currentStep:p,currentIndex:S,totalSteps:n.length,isNested:i,isFirstStep:S<=0&&(!e||e.isFirstStep),isLastStep:S===n.length-1&&(!e||e.isLastStep),goNext:g,goPrev:m,goToStep:f,registerStep:d,unregisterStep:u}),[n,p,S,i,e,g,m,f,d,u]);return(0,r.Y)(k.Provider,{value:h,children:o})},X=({id:e,label:i,isCompleted:t,children:o})=>{let{registerStep:n,unregisterStep:l,currentStep:s}=G();return(a().useLayoutEffect(()=>{n({id:e,label:i,isCompleted:t})},[e,i,t,n]),a().useLayoutEffect(()=>()=>l(e),[e,l]),s?.id!==e)?null:(0,r.Y)(r.FK,{children:o})};X.displayName="Wizard.Step";let Q=Object.assign(({children:e,initialStepId:i})=>{let t=a().useContext(k);return(0,r.Y)(J,{parentWizard:t,isNested:null!==t,initialStepId:i,children:e})},{Step:X});var ee=t(1307),ei=t(395),et=t(869);let er=new Set(["okta"]),eo=[{id:"saml",label:(0,u.G)("configureSSO.selectProviderStep.saml.groupLabel"),options:[{id:"saml_okta",label:(0,u.G)("configureSSO.selectProviderStep.saml.okta"),iconId:"okta"},{id:"saml_custom",label:(0,u.G)("configureSSO.selectProviderStep.saml.customSaml"),iconId:"saml"}]}],en=()=>{let{goToStep:e}=G(),{provider:i,setProvider:t,createEnterpriseConnection:n}=$(),[l,s]=a().useState(i??null),{user:S}=(0,o.Jd)(),g=(0,p.f0)(),m=async()=>{if(!l||!S)return;t(l);let i=S?.primaryEmailAddress,r=i?.verification.status==="verified";if(!i||!r)return void e("verify-domain");try{await n(l,i)}catch(e){(0,et.H4)(e,[],g.setError);return}e("configure")};return(0,r.Y)(c.n.Part,{part:"selectProvider",children:(0,r.FD)(q,{elementDescriptor:b.$z.configureSSOStep,elementId:b.$z.configureSSOStep.setId("select-provider"),children:[(0,r.Y)(q.Header,{title:(0,u.G)("configureSSO.selectProviderStep.title"),description:(0,u.G)("configureSSO.selectProviderStep.subtitle")}),(0,r.Y)(q.Body,{children:(0,r.FD)(q.Section,{sx:e=>({gap:e.space.$5}),children:[eo.map(e=>(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOProviderGroup,elementId:b.$z.configureSSOProviderGroup.setId(e.id),gap:3,children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOProviderGroupLabel,elementId:b.$z.configureSSOProviderGroupLabel.setId(e.id),as:"label",variant:"subtitle",localizationKey:e.label}),(0,r.Y)(d.xA,{elementDescriptor:b.$z.configureSSOProviderGrid,gap:3,sx:{gridTemplateColumns:"repeat(2, 1fr)",[L.g.sm]:{gridTemplateColumns:"1fr"}},children:e.options.map(e=>(0,r.Y)(ea,{name:"configure-sso-provider",value:e.id,iconId:e.iconId,label:e.label,checked:l===e.id,onChange:()=>s(e.id)},e.id))})]},e.id)),(0,r.Y)(ei.F,{variant:"warning",title:(0,u.G)("configureSSO.selectProviderStep.warning")}),g.error&&(0,r.Y)(ei.F,{variant:"danger",title:g.error,sx:e=>({margin:e.space.$3})})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{isDisabled:!0}),(0,r.Y)(q.Footer.Continue,{onClick:m,isLoading:g.isLoading,isDisabled:!l})]})]})})},ea=({name:e,value:i,iconId:t,label:o,checked:n,onChange:a})=>{let{t:l}=(0,D._)(),s=l(o);return(0,r.FD)(d.az,{as:"label",elementDescriptor:b.$z.configureSSOProviderCard,elementId:b.$z.configureSSOProviderCard.setId(i),isActive:n,sx:e=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:e.space.$2,height:e.sizes.$32,padding:e.space.$1x5,cursor:"pointer",position:"relative",...O.s.borderVariants(e).normal,"&:has(input:focus-visible)":{...O.s.focusRingStyles(e),borderColor:e.colors.$borderAlpha300},"&:hover":{backgroundColor:e.colors.$neutralAlpha50},"&:has(input:checked)":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(d.AT,{elementDescriptor:b.$z.configureSSOProviderCardRadio,elementId:b.$z.configureSSOProviderCardRadio.setId(i),name:e,value:i,checked:n,onChange:a,focusRing:!1,sx:e=>({position:"absolute",top:e.space.$1x5,insetInlineStart:e.space.$1x5,margin:0,width:"fit-content",boxShadow:"none","&:hover":{boxShadow:"none"}})}),(0,r.Y)(d.L9,{elementDescriptor:b.$z.configureSSOProviderCardIcon,elementId:b.$z.configureSSOProviderCardIcon.setId(i),"aria-hidden":!0,sx:e=>{let i=er.has(t),r={width:e.sizes.$8,height:e.sizes.$8};return i?{...r,backgroundColor:e.colors.$colorForeground,maskImage:`url(${(0,ee.p)(t)})`,maskSize:"contain",maskPosition:"center",maskRepeat:"no-repeat"}:{...r,backgroundImage:`url(${(0,ee.p)(t)})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOProviderCardLabel,elementId:b.$z.configureSSOProviderCardLabel.setId(i),as:"span",variant:"body",sx:e=>({color:e.colors.$colorForeground}),children:s})]})};var el=t(747),es=t(7447),ec=t(7709);let ed=()=>{let{user:e}=(0,o.Jd)(),{session:i}=(0,o.wV)(),{enterpriseConnection:t}=$(),{t:a}=(0,D._)(),{goNext:l}=G(),s=e?.primaryEmailAddress??e?.emailAddresses?.find(e=>"verified"!==e.verification.status),p=s?.verification.status==="verified",S=i?.lastActiveOrganizationId??null,m=!!(p&&t&&t.organizationId!==S),f=(0,n.useRef)(p),h=(0,n.useRef)(s),Y=(0,n.useRef)(s?.id),y=(0,n.useRef)(s?"verify-email-address":"provide-email");if(m){let e=t?.domains[0];return(0,r.Y)(c.n.Part,{part:"verifyDomain",children:(0,r.Y)(q,{children:(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOVerifyDomainErrorRoot,justify:"center",align:"center",sx:e=>({gap:e.space.$3,alignItems:"center",flex:1}),children:[(0,r.Y)(d.In,{elementDescriptor:b.$z.configureSSOVerifyDomainErrorIcon,icon:g.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.FD)(d.fv,{gap:1,sx:e=>({textAlign:"center",maxWidth:e.sizes.$94}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOVerifyDomainErrorTitle,textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,textWrap:"balance"}),localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.domainTaken.title",{domain:e})}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOVerifyDomainErrorSubtitle,as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.domainTaken.subtitle")})]})]})})})}return f.current&&s?.emailAddress?(0,r.Y)(c.n.Part,{part:"verifyDomain",children:(0,r.FD)(q,{elementDescriptor:b.$z.configureSSOStep,elementId:b.$z.configureSSOStep.setId("verify-domain"),children:[(0,r.Y)(q.Header,{title:a((0,u.G)("configureSSO.verifyEmailDomainStep.title")),description:a((0,u.G)("configureSSO.verifyEmailDomainStep.subtitle"))}),(0,r.Y)(q.Body,{children:(0,r.Y)(q.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.Y)(em,{emailAddress:s.emailAddress})})}),(0,r.Y)(q.Footer,{children:(0,r.Y)(q.Footer.Continue,{onClick:()=>l()})})]})}):(0,r.Y)(c.n.Part,{part:"verifyDomain",children:(0,r.Y)(q,{elementDescriptor:b.$z.configureSSOStep,elementId:b.$z.configureSSOStep.setId("verify-domain"),children:(0,r.FD)(Q,{initialStepId:y.current,children:[(0,r.Y)(q.Header,{title:a((0,u.G)("configureSSO.verifyEmailDomainStep.title")),description:a((0,u.G)("configureSSO.verifyEmailDomainStep.subtitle")),children:(0,r.Y)(eu,{})}),(0,r.FD)(q.Body,{children:[(0,r.Y)(Q.Step,{id:"provide-email",children:(0,r.Y)(eS,{emailAddressRef:h,preExistingEmailIdRef:Y})}),(0,r.Y)(Q.Step,{id:"verify-email-address",children:(0,r.Y)(eg,{emailAddressRef:h})})]})]})})})},eu=()=>{let{currentIndex:e,totalSteps:i}=G();return(0,r.Y)(q.Counter,{total:i,current:e+1})},ep=e=>e.trim().toLowerCase(),eS=({emailAddressRef:e,preExistingEmailIdRef:i})=>{let{goNext:t,goPrev:a}=G(),{user:l}=(0,o.Jd)(),s=(0,p.f0)(),{t:c}=(0,D._)(),[S,g]=(0,n.useState)(()=>e.current?.emailAddress??""),m=(0,o.Wp)(e=>l?.createEmailAddress({email:e})),f=/^\S+@\S+\.\S+$/.test(S)&&!s.isLoading,h=(0,n.useCallback)(async()=>{if(!f)return;let r=e.current,o=S.trim();if(r&&ep(r.emailAddress)===ep(o))return void await t();s.setError(void 0),s.setLoading();try{let n=await m(o);if(e.current=n??void 0,r&&r.id!==i.current&&r.id!==n?.id)try{await r.destroy()}catch{}await t()}catch(e){(0,et.H4)(e,[],s.setError)}finally{s.setIdle()}},[f,S,m,s,t,e,i]);return(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.FD)(es.l.Root,{elementDescriptor:b.$z.configureSSOEmailVerificationForm,elementId:b.$z.configureSSOEmailVerificationForm.setId("provide"),onSubmit:h,gap:3,sx:e=>({display:"flex",maxWidth:e.sizes.$66,textAlign:"center",flexDirection:"column",alignItems:"center"}),children:[(0,r.Y)(d.In,{elementDescriptor:b.$z.configureSSOEmailVerificationIcon,elementId:b.$z.configureSSOEmailVerificationIcon.setId("provide"),icon:ec.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.Y)(d.fv,{gap:1,children:(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOEmailVerificationTitle,elementId:b.$z.configureSSOEmailVerificationTitle.setId("provide"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,fontWeight:e.fontWeights.$bold}),localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.formTitle")})}),(0,r.FD)(d.fv,{gap:1,sx:{width:"100%"},children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOEmailVerificationSubtitle,elementId:b.$z.configureSSOEmailVerificationSubtitle.setId("provide"),as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.formSubtitle")}),(0,r.Y)(d.pd,{elementDescriptor:b.$z.configureSSOEmailVerificationInput,elementId:b.$z.configureSSOEmailVerificationInput.setId("provide"),type:"email",placeholder:c((0,u.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.inputPlaceholder")),"aria-label":c((0,u.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.inputLabel")),value:S,onChange:e=>g(e.currentTarget.value),hasError:!!s.error,isDisabled:s.isLoading,autoFocus:!0}),s.error?(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOEmailVerificationError,as:"p",variant:"body",sx:e=>({color:e.colors.$danger500,fontSize:e.fontSizes.$sm,textAlign:"start"}),children:s.error}):null]})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>a(),isDisabled:!0}),(0,r.Y)(q.Footer.Continue,{onClick:h,isLoading:s.isLoading,isDisabled:!f||s.isLoading})]})]})},eg=({emailAddressRef:e})=>{let{user:i}=(0,o.Jd)(),t=(0,p.f0)(),{goNext:a,goPrev:l}=G(),s=i?.primaryEmailAddress,c=e.current,S=c?.verification.status==="verified",g=c?.id===i?.primaryEmailAddressId,m=(0,o.Wp)(()=>e.current?.prepareVerification({strategy:"email_code"})),f=(0,o.Wp)(i=>e.current?.attemptVerification({code:i})),h=(0,o.Wp)(e=>i?.update({primaryEmailAddressId:e})),Y=(0,n.useCallback)(()=>m()?.catch(e=>(0,et.H4)(e,[],t.setError)),[m,t]),$=(0,el.xM)({onCodeEntryFinished:(e,i,t)=>{f(e).then(()=>i()).catch(t)},onResendCodeClicked:()=>{Y()},onResolve:async()=>{let i=e.current;if(i&&!g)try{await h(i.id)}catch(e){(0,et.H4)(e,[],t.setError);return}a()}});return((0,n.useEffect)(()=>{c&&!S&&Y()},[]),c)?(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.FD)(d.fv,{gap:4,sx:{textAlign:"center"},children:[(0,r.FD)(d.fv,{gap:1,children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOEmailVerificationTitle,elementId:b.$z.configureSSOEmailVerificationTitle.setId("enter-code"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$sm}),localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.emailCode.formTitle")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOEmailVerificationSubtitle,elementId:b.$z.configureSSOEmailVerificationSubtitle.setId("enter-code"),as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.emailCode.formSubtitle",{identifier:c.emailAddress})})]}),(0,r.Y)(es.l.OTPInput,{...$,resendButton:(0,u.G)("configureSSO.verifyEmailDomainStep.emailCode.resendButton")})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>l(),isDisabled:!!s}),(0,r.Y)(q.Footer.Continue,{onClick:()=>a(),isLoading:$.isLoading||t.isLoading,isDisabled:!S})]})]}):null},em=({emailAddress:e})=>{let{t:i}=(0,D._)();return(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOEmailVerificationForm,elementId:b.$z.configureSSOEmailVerificationForm.setId("verified"),gap:3,sx:{alignItems:"center"},children:[(0,r.Y)(d.In,{elementDescriptor:b.$z.configureSSOEmailVerificationIcon,elementId:b.$z.configureSSOEmailVerificationIcon.setId("verified"),icon:ec.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.FD)(d.fv,{gap:2,sx:e=>({textAlign:"center",maxWidth:e.sizes.$66}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOEmailVerificationTitle,elementId:b.$z.configureSSOEmailVerificationTitle.setId("verified"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,fontWeight:e.fontWeights.$bold}),localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.emailCode.verified.title")}),(0,r.Y)(d.fv,{gap:3,sx:{flex:1},children:(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOEmailVerificationSubtitle,elementId:b.$z.configureSSOEmailVerificationSubtitle.setId("verified"),as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.verifyEmailDomainStep.emailCode.verified.subtitle")})}),(0,r.Y)(d.pd,{elementDescriptor:b.$z.configureSSOEmailVerificationInput,elementId:b.$z.configureSSOEmailVerificationInput.setId("verified"),type:"email",value:e,readOnly:!0,"aria-label":i((0,u.G)("configureSSO.verifyEmailDomainStep.emailCode.verified.inputLabel")),sx:e=>({backgroundColor:e.colors.$neutralAlpha50})})]})]})};var ef=t(1457),eh=t(6363),eY=t(4438),e$=t(2386),ey=t(6504),eD=t(9582),eb=t(2310),eO=t(1637);let ez={saml_okta:"configureSSO.configureStep.samlOkta",saml_custom:"configureSSO.configureStep.samlCustom"};function ex(){let{provider:e}=$();if(!e)throw Error("useConfigureStepTranslations called without a selected provider.");return{provider:e,key:i=>`${ez[e]}.${i}`}}let eC=()=>{let{key:e}=ex();return(0,r.Y)(c.n.Part,{part:"configureCreateApp",children:(0,r.Y)(q,{elementDescriptor:b.$z.configureSSOStep,elementId:b.$z.configureSSOStep.setId("configure"),children:(0,r.FD)(Q,{children:[(0,r.FD)(Q.Step,{id:"create-app",children:[(0,r.Y)(q.Header,{title:(0,u.G)(e("headerTitle")),description:(0,u.G)(e("createApp.headerSubtitle")),children:(0,r.Y)(ev,{})}),(0,r.Y)(eI,{})]}),(0,r.FD)(Q.Step,{id:"configure-attributes",children:[(0,r.Y)(q.Header,{title:(0,u.G)(e("headerTitle")),description:(0,u.G)(e("configureAttributes.headerSubtitle")),children:(0,r.Y)(ev,{})}),(0,r.Y)(ew,{})]}),(0,r.FD)(Q.Step,{id:"assign-users",children:[(0,r.Y)(q.Header,{title:(0,u.G)(e("headerTitle")),description:(0,u.G)(e("assignUsers.headerSubtitle")),children:(0,r.Y)(ev,{})}),(0,r.Y)(eA,{})]}),(0,r.FD)(Q.Step,{id:"submit-saml-config",children:[(0,r.Y)(q.Header,{title:(0,u.G)(e("headerTitle")),description:(0,u.G)(e("metadataUrl.headerSubtitle")),children:(0,r.Y)(ev,{})}),(0,r.Y)(e_,{})]})]})})})},ev=()=>{let{currentIndex:e,totalSteps:i}=G();return(0,r.Y)(q.Counter,{total:i,current:e+1})},eF={saml_okta:{columns:{first:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.columns.name"),second:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.columns.value")},monoFirst:!0,rows:[{id:"email",isRequired:!0,first:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.email.name"),second:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.email.value")},{id:"firstName",isRequired:!1,first:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.firstName.name"),second:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.firstName.value")},{id:"lastName",isRequired:!1,first:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.lastName.name"),second:(0,u.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.lastName.value")}]},saml_custom:{columns:{first:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.columns.userProfile"),second:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.columns.attributeName")},rows:[{id:"id",isRequired:!0,first:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.id.userProfile"),second:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.id.attributeName")},{id:"email",isRequired:!0,first:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.email.userProfile"),second:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.email.attributeName")},{id:"firstName",isRequired:!1,first:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.firstName.userProfile"),second:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.firstName.attributeName")},{id:"lastName",isRequired:!1,first:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.lastName.userProfile"),second:(0,u.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.lastName.attributeName")}]}},eI=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=G(),{enterpriseConnection:n,provider:a}=$(),{key:l}=ex(),s=n?.samlConnection?.acsUrl??"",c=n?.samlConnection?.spEntityId??"",p=(0,eO.tJ)("acsUrl",s,{type:"text",label:(0,u.G)(l("spFields.acsUrl.label")),isRequired:!1}),S=(0,eO.tJ)("spEntityId",c,{type:"text",label:(0,u.G)(l("spFields.spEntityId.label")),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Body,{children:(0,r.FD)(q.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(d.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)(l("createApp.title"))}),"saml_okta"===a&&(0,r.Y)(ek,{}),"saml_custom"===a&&(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlCustom.createApp.subtitle")})]}),"saml_okta"===a&&(0,r.Y)(eE,{}),(0,r.Y)(es.l.ControlRow,{elementId:p.id,children:(0,r.Y)(es.l.CommonInputWrapper,{...p.props,children:(0,r.Y)(eh.r,{value:s,readOnly:!0,copyIcon:ey.A,copiedIcon:v.A})})}),(0,r.Y)(es.l.ControlRow,{elementId:S.id,children:(0,r.Y)(es.l.CommonInputWrapper,{...S.props,children:(0,r.Y)(eh.r,{value:c,readOnly:!0,copyIcon:ey.A,copiedIcon:v.A})})}),"saml_okta"===a&&(0,r.Y)(eG,{})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(q.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eE=()=>(0,r.FD)(d.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.serviceProvider.title")}),(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.serviceProvider.paragraph1")}),(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.serviceProvider.paragraph2")})]}),ek=()=>(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.createApp.step1")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.createApp.step2")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.createApp.step3")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.createApp.step4")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.createApp.step5")})]}),eG=()=>(0,r.FD)(d.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.completeSamlIntegration.title")}),(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.completeSamlIntegration.step1")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.completeSamlIntegration.step2")})]})]}),ew=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=G(),{provider:n}=$(),a=n?eF[n]:void 0;return(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Body,{children:(0,r.FD)(q.Section,{sx:e=>({gap:e.space.$3}),children:["saml_custom"===n&&(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)("configureSSO.configureStep.samlCustom.configureAttributes.title")}),"saml_okta"===n&&(0,r.Y)(eR,{}),a&&(0,r.Y)(eT,{config:a})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(q.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},eR=()=>(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.configureAttributes.step1")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.configureAttributes.step2")})]}),eT=({config:e})=>(0,r.FD)(d.XI,{elementDescriptor:b.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(d.d8,{children:(0,r.FD)(d.Tr,{children:[(0,r.Y)(d.Th,{children:(0,r.Y)(d.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:e.columns.first})}),(0,r.Y)(d.Th,{children:(0,r.Y)(d.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:e.columns.second})})]})}),(0,r.Y)(d.NN,{children:e.rows.map(i=>(0,r.FD)(d.Tr,{children:[(0,r.Y)(d.Td,{children:(0,r.FD)(d.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(d.EY,{as:"span",colorScheme:e.monoFirst?void 0:"secondary",sx:e.monoFirst?{fontFamily:"monospace"}:void 0,localizationKey:i.first}),(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOAttributeMappingBadge,elementId:b.$z.configureSSOAttributeMappingBadge.setId(i.isRequired?"required":"optional"),colorScheme:i.isRequired?"warning":"primary",localizationKey:(0,u.G)(i.isRequired?"configureSSO.configureStep.attributeMapping.badges.required":"configureSSO.configureStep.attributeMapping.badges.optional")})]})}),(0,r.Y)(d.Td,{children:(0,r.Y)(d.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:i.second})})]},i.id))})]}),eA=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:o}=G(),{provider:n}=$();return"saml_custom"===n?(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Body,{children:(0,r.FD)(q.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)("configureSSO.configureStep.samlCustom.assignUsers.title")}),(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlCustom.assignUsers.paragraph")})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(q.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Body,{children:(0,r.FD)(q.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.title")}),(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.paragraph")}),(0,r.FD)(d.fv,{elementDescriptor:b.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.step1")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.step2")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.step3")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.step4")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.assignUsers.step5")})]})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(q.Footer.Continue,{onClick:()=>e(),isDisabled:o})]})]})},e_=()=>{let e=(0,p.f0)(),{t:i}=(0,D._)(),{goNext:t,goPrev:n,isFirstStep:l}=G(),{enterpriseConnection:s,updateEnterpriseConnection:c}=$(),{key:S}=ex(),g=s?.samlConnection,m=!!(g?.idpSsoUrl||g?.idpEntityId||g?.idpCertificate||g?.idpMetadataUrl),f=!!g?.idpCertificate,[h,Y]=a().useState(m?"manual":"metadataUrl"),[y,O]=a().useState(null),z=(0,o.Wp)(a().useCallback(async e=>{if(!s)throw Error("Enterprise connection required");return c(s.id,e)},[s,c])),x=(0,eO.tJ)("idpMetadataUrl",g?.idpMetadataUrl??"",{type:"text",label:(0,u.G)(S("metadataUrl.label")),placeholder:(0,u.G)(S("metadataUrl.placeholder")),isRequired:!0}),C=(0,eO.tJ)("idpSsoUrl",g?.idpSsoUrl??"",{type:"text",label:(0,u.G)(S("manual.signOnUrl.label")),placeholder:(0,u.G)(S("manual.signOnUrl.placeholder")),isRequired:!0}),v=(0,eO.tJ)("idpEntityId",g?.idpEntityId??"",{type:"text",label:(0,u.G)(S("manual.issuer.label")),placeholder:(0,u.G)(S("manual.issuer.placeholder")),isRequired:!0}),F=(0,eO.tJ)("idpCertificate","",{type:"text",label:(0,u.G)(S("manual.signingCertificate.label")),isRequired:!0}),I=x.value.trim(),E=C.value.trim(),k=v.value.trim(),w=null!==y||f,R=!e.isLoading&&("metadataUrl"===h&&I.length>0||"manual"===h&&E.length>0&&k.length>0&&w),T=async()=>{if(s&&R){e.setError(void 0),e.setLoading();try{if("metadataUrl"===h)await z({saml:{idpMetadataUrl:I}});else{let e={idpSsoUrl:E,idpEntityId:k};null!==y&&(e.idpCertificate=await y.text()),await z({saml:e})}t()}catch(t){let i="metadataUrl"===h?[x]:[C,v,F];if((0,et.H4)(t,i,e.setError),(0,ef.$R)(t)){let i=t.errors.find(e=>e.code?.startsWith("saml_")&&!e.meta?.paramName);i&&(("metadataUrl"===h?x:C).setError(i),e.setError(void 0))}}finally{e.setIdle()}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(q.Body,{children:(0,r.FD)(q.Section,{fill:!0,gap:5,children:[(0,r.Y)(d.DZ,{elementDescriptor:b.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,u.G)(S("submitSamlConfig.title"))}),(0,r.FD)(e$.I.Root,{"aria-label":i((0,u.G)(S("modes.ariaLabel"))),value:h,onChange:i=>{e.setError(void 0),Y(i)},fullWidth:!0,children:[(0,r.Y)(e$.I.Button,{value:"metadataUrl",text:(0,u.G)(S("modes.metadataUrl"))}),(0,r.Y)(e$.I.Button,{value:"manual",text:(0,u.G)(S("modes.manual"))})]}),"metadataUrl"===h?(0,r.Y)(eK,{field:x}):(0,r.Y)(eL,{signOnUrlField:C,issuerField:v,certFileField:F,certFile:y,setCertFile:O,existingCertPresent:f})]})}),(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>n(),isDisabled:l||e.isLoading}),(0,r.Y)(q.Footer.Continue,{onClick:T,isLoading:e.isLoading,isDisabled:!R})]})]})},eK=({field:e})=>{let{key:i}=ex();return(0,r.FD)(r.FK,{children:[(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)(i("metadataUrl.description"))}),(0,r.Y)(es.l.ControlRow,{elementId:e.id,children:(0,r.Y)(es.l.PlainInput,{...e.props})})]})},eL=({signOnUrlField:e,issuerField:i,certFileField:t,certFile:o,setCertFile:n,existingCertPresent:l})=>{let{t:s}=(0,D._)(),c=a().useRef(null),{key:p}=ex();return(0,r.FD)(r.FK,{children:[(0,r.Y)(d.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,u.G)(p("manual.description"))}),(0,r.Y)(es.l.ControlRow,{elementId:e.id,children:(0,r.Y)(es.l.PlainInput,{...e.props})}),(0,r.Y)(es.l.ControlRow,{elementId:i.id,children:(0,r.Y)(es.l.PlainInput,{...i.props})}),(0,r.Y)(d.az,{children:(0,r.FD)(eY.D.Root,{...t.props,children:[(0,r.FD)(d.fv,{gap:2,children:[(0,r.Y)(eY.D.LabelRow,{children:(0,r.Y)(eY.D.Label,{})}),(0,r.Y)("input",{ref:c,type:"file",accept:".pem,.key,.crt,.cer,.cert",multiple:!1,style:{display:"none"},onChange:e=>{n(e.target.files?.[0]??null),t.clearFeedback()}}),null===o?(0,r.FD)(d.so,{align:"center",gap:2,sx:{alignSelf:"flex-start",flexWrap:"wrap"},children:[l&&(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOCertificateFileBadge,localizationKey:(0,u.G)("configureSSO.configureStep.samlOkta.manual.signingCertificate.fileUploaded")}),(0,r.FD)(d.$n,{elementDescriptor:b.$z.configureSSOCertificateUploadButton,size:"xs",variant:"outline",onClick:()=>c.current?.click(),children:[(0,r.Y)(d.In,{icon:eD.A,size:"sm",colorScheme:"neutral",sx:e=>({marginInlineEnd:e.space.$1})}),(0,r.Y)(d.EY,{as:"span",localizationKey:(0,u.G)(l?"configureSSO.configureStep.samlOkta.manual.signingCertificate.replaceFile":"configureSSO.configureStep.samlOkta.manual.signingCertificate.uploadFile")})]})]}):(0,r.FD)(d.so,{align:"center",gap:2,sx:e=>({paddingTop:e.space.$1,paddingBottom:e.space.$1}),children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOCertificateFileName,as:"span",colorScheme:"secondary",variant:"buttonSmall",children:o.name}),(0,r.Y)(d.$n,{elementDescriptor:b.$z.configureSSOCertificateRemoveButton,variant:"ghost",colorScheme:"neutral","aria-label":s((0,u.G)("configureSSO.configureStep.samlOkta.manual.signingCertificate.removeFile")),onClick:()=>{n(null),t.clearFeedback(),c.current&&(c.current.value="")},sx:e=>({padding:e.space.$1}),children:(0,r.Y)(d.In,{icon:eb.A,size:"xs"})})]})]}),(0,r.Y)(eY.D.Feedback,{})]})})]})};var eP=t(8749),eB=t(4874),eW=t(9792),eV=t(9982),eU=t(8087),eM=t(8426),eN=t(4657),eH=t(9154),ej=t(408);let eq={saml_user_attribute_missing:{kind:"steps",introKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.intro"),stepKeys:[(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step1"),(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step2"),(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step3")]},saml_response_relaystate_missing:{kind:"description",descriptionKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_response_relaystate_missing.description")},saml_email_address_domain_mismatch:{kind:"description",descriptionKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_email_address_domain_mismatch.description")},oauth_access_denied:{kind:"description",descriptionKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_access_denied.description")},oauth_token_exchange_error:{kind:"description",descriptionKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_token_exchange_error.description")},oauth_fetch_user_error:{kind:"steps",introKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.intro"),stepKeys:[(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step1"),(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step2")]}},eZ=({errorCode:e})=>{if(!e)return null;let i=eq[e];if(!i)return null;let t=`https://clerk.com/docs/guides/organizations/add-members/sso#${e.replaceAll("_","-")}`;return(0,r.FD)(d.so,{elementDescriptor:b.$z.configureSSOTestRunHowToFixSection,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(d.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.sectionTitle")}),(0,r.FD)(d.az,{sx:e=>({padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow}),children:[(0,r.Y)(eJ,{content:i}),(0,r.FD)(d.N_,{elementDescriptor:b.$z.configureSSOTestRunHowToFixDocsLink,href:t,target:"_blank",rel:"noopener noreferrer",sx:e=>({alignSelf:"flex-start",display:"inline-flex",alignItems:"center",gap:e.space.$1x5,paddingBlock:e.space.$1,paddingInline:e.space.$3,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,color:e.colors.$colorForeground,fontSize:e.fontSizes.$sm,fontWeight:e.fontWeights.$medium,textDecoration:"none",marginTop:e.space.$2,"&:hover":{backgroundColor:e.colors.$neutralAlpha50,textDecoration:"none"}}),children:[(0,r.Y)(d.L9,{localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.actionLabel__viewDocumentation")}),(0,r.Y)(d.In,{icon:ej.A,size:"sm"})]})]})]})},eJ=({content:e})=>"description"===e.kind?(0,r.Y)(d.EY,{colorScheme:"secondary",localizationKey:e.descriptionKey}):(0,r.FD)(d.so,{direction:"col",gap:2,children:[e.introKey?(0,r.Y)(d.EY,{colorScheme:"secondary",localizationKey:e.introKey}):null,(0,r.Y)(d.az,{as:"ol",sx:e=>({margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal",display:"flex",flexDirection:"column",gap:e.space.$1}),children:e.stepKeys.map(e=>(0,r.Y)(d.az,{as:"li",sx:e=>({color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm,"&::marker":{color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm}}),children:(0,r.Y)(d.EY,{as:"span",colorScheme:"secondary",localizationKey:e})},e.key))})]}),eX=()=>{let{goNext:e,goPrev:i}=G(),{enterpriseConnection:t}=$(),a=(0,p.f0)(),[l,s]=(0,n.useState)(1),{data:S,totalCount:g,isLoading:m,isFetching:f,isPolling:h,revalidate:Y}=(0,o.ND)({enterpriseConnectionId:t?.id??null,params:{initialPage:l,pageSize:5}}),y=(0,eV.P)(f&&!m),D=g?Math.ceil(g/5):0;return(0,r.Y)(c.n.Part,{part:"testSso",children:(0,r.FD)(q,{elementDescriptor:b.$z.configureSSOStep,elementId:b.$z.configureSSOStep.setId("test"),children:[(0,r.Y)(q.Header,{title:(0,u.G)("configureSSO.testConfigurationStep.title")}),(0,r.FD)(q.Body,{children:[(0,r.Y)(q.Section,{sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(d.fv,{gap:3,children:[(0,r.Y)(d.EY,{as:"p",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.subtitle")}),(0,r.Y)(e7,{onTestRunCreated:()=>{s(1),Y()}})]})}),(0,r.FD)(q.Section,{sx:e=>({flex:1,minHeight:0,gap:e.space.$3}),children:[(0,r.FD)(d.so,{align:"center",justify:"between",sx:e=>({gap:e.space.$2,flexShrink:0}),children:[(0,r.Y)(d.EY,{variant:"subtitle",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.title")}),(0,r.FD)(d.$n,{elementDescriptor:b.$z.configureSSOTestRefreshButton,variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>void Y(),isDisabled:y,sx:e=>({gap:e.space.$1x5}),children:[y?(0,r.Y)(d.y$,{elementDescriptor:b.$z.spinner,size:"xs"}):(0,r.Y)(d.In,{icon:eM.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(d.EY,{as:"span",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.actionLabel__refresh")})]})]}),(0,r.Y)(d.fv,{sx:{flex:1,minHeight:0},children:(0,r.Y)(e0,{rows:S??[],isPolling:h,isLoading:m,page:l,pageCount:D,pageSize:5,totalCount:g??0,onPageChange:s})})]})]}),a.error?(0,r.Y)(d.az,{elementDescriptor:b.$z.configureSSOTestError,sx:e=>({flexShrink:0,paddingInline:e.space.$5,paddingBlock:e.space.$3,borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100}),children:(0,r.Y)(d.EY,{as:"p",variant:"body",sx:e=>({color:e.colors.$danger500,fontSize:e.fontSizes.$sm}),children:a.error})}):null,(0,r.FD)(q.Footer,{children:[(0,r.Y)(q.Footer.Previous,{onClick:()=>i()}),(0,r.Y)(eQ,{enterpriseConnectionId:t?.id,onContinue:()=>void e()})]})]})})},eQ=({enterpriseConnectionId:e,onContinue:i})=>{let{user:t}=(0,o.Jd)(),{t:a}=(0,D._)(),l=(0,p.f0)(),[s,c]=(0,n.useState)(!1),d=async()=>{if(t&&e){c(!0),l.setError(void 0);try{(await t.getEnterpriseConnectionTestRuns(e,{initialPage:1,pageSize:1,status:["success"]})).data.length>0?i():l.setError(a((0,u.G)("configureSSO.testConfigurationStep.error__noSuccessfulTestRun")))}catch(e){(0,et.H4)(e,[],l.setError)}finally{c(!1)}}};return(0,r.Y)(q.Footer.Continue,{onClick:()=>void d(),isLoading:s})},e0=({rows:e,isLoading:i,isPolling:t,page:o,pageCount:a,pageSize:l,totalCount:s,onPageChange:c})=>{let{t:p}=(0,D._)(),{contentRef:S}=$(),[g,m]=(0,n.useState)(null),f=g?.status==="failed"&&g.logs?.[0]?.shortMessage||p((0,u.G)("configureSSO.testConfigurationStep.testRunDetails.title"));return(0,r.FD)(r.FK,{children:[(0,r.Y)(d.so,{direction:"col",sx:e=>({width:"100%",flex:"0 1 auto",minHeight:0,overflowY:"auto",borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,...O.s.unstyledScrollbar(e),[L.g.sm]:{overflowX:"auto",padding:e.space.$0x25}}),children:(0,r.FD)(d.XI,{elementDescriptor:b.$z.configureSSOTestResultsTable,tableHeadVisuallyHidden:!e.length,sx:e=>({background:e.colors.$colorBackground,"&&":{border:"none",borderRadius:0}}),children:[(0,r.Y)(d.d8,{children:(0,r.FD)(d.Tr,{children:[(0,r.Y)(d.Th,{localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp")}),(0,r.Y)(d.Th,{localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.Y)(d.Th,{localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status")})]})}),(0,r.Y)(d.NN,{children:i||t?(0,r.Y)(d.Tr,{children:(0,r.Y)(d.Td,{colSpan:3,children:(0,r.FD)(d.so,{direction:"col",align:"center",gap:2,sx:e=>({padding:`${e.space.$10} 0`}),children:[(0,r.Y)(d.y$,{colorScheme:"primary",elementDescriptor:b.$z.configureSSOTestResultsLoadingSpinner}),(0,r.Y)(d.EY,{colorScheme:"secondary",localizationKey:t?(0,u.G)("configureSSO.testConfigurationStep.testResults.polling"):void 0})]})})}):e.length?e.map(e=>(0,r.FD)(d.Tr,{elementDescriptor:b.$z.configureSSOTestResultsRow,onClick:()=>m(e),sx:e=>({cursor:"pointer","&:hover > td":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(d.Td,{children:(0,r.Y)(e5,{testRun:e})}),(0,r.Y)(d.Td,{children:(0,r.Y)(e6,{testRun:e})}),(0,r.Y)(d.Td,{children:(0,r.Y)(e8,{testRun:e})})]},e.id)):(0,r.Y)(d.Tr,{children:(0,r.Y)(d.Td,{colSpan:3,children:(0,r.FD)(d.so,{elementDescriptor:b.$z.configureSSOTestResultsEmpty,direction:"col",align:"center",justify:"center",sx:e=>({padding:`${e.space.$10} 0`,flex:1,gap:e.space.$1,textAlign:"center"}),children:[(0,r.Y)(d.EY,{variant:"subtitle",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.empty.title")}),(0,r.Y)(d.EY,{colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.empty.subtitle")})]})})})})]})}),a>1?(0,r.Y)(d.az,{sx:{flexShrink:0},children:(0,r.Y)(eW.d,{page:Math.min(o,a),count:a,onChange:c,siblingCount:1,rowInfo:{allRowsCount:s,startingRow:s>0?Math.max(0,(o-1)*l)+1:0,endingRow:Math.min(o*l,s)}})}):null,(0,r.FD)(eP.Drawer.Root,{open:null!==g,onOpenChange:e=>{e||m(null)},strategy:"absolute",portalProps:{root:S},children:[(0,r.Y)(eP.Drawer.Overlay,{}),(0,r.FD)(eP.Drawer.Content,{children:[(0,r.Y)(eP.Drawer.Header,{title:f}),g?(0,r.Y)(e2,{testRun:g}):null]})]})]})},e1=e=>{let{locale:i}=(0,D._)();return e.createdAt?{time:new Intl.DateTimeFormat(i,{timeStyle:"medium"}).format(e.createdAt),day:new Intl.DateTimeFormat(i,{month:"short",day:"numeric"}).format(e.createdAt)}:null},e5=({testRun:e})=>{let i=e1(e);return i?(0,r.FD)(d.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(d.EY,{children:i.time}),(0,r.Y)(d.EY,{colorScheme:"secondary",children:i.day})]}):null},e3=({title:e,children:i})=>(0,r.FD)(d.az,{as:"div",sx:e=>({display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:e.space.$2}),children:[(0,r.Y)(d.Dt,{localizationKey:e,sx:e=>({color:e.colors.$colorForeground,...O.s.textVariants(e).subtitle})}),(0,r.Y)(d.Dd,{sx:e=>({display:"grid",justifyContent:"end",color:e.colors.$colorForeground}),children:i})]}),e2=({testRun:e})=>{let i=e1(e),t="failed"===e.status?e.logs?.[0]:null;return(0,r.FD)(eP.Drawer.Body,{sx:e=>({display:"flex",flexDirection:"column",flex:1,overflowY:"auto",padding:e.space.$4,gap:e.space.$4}),children:[(0,r.Y)(d.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.FD)(d.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[i?(0,r.Y)(e3,{title:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp"),children:(0,r.FD)(d.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(d.EY,{children:i.time}),(0,r.Y)(d.EY,{colorScheme:"secondary",children:i.day})]})}):null,"failed"===e.status?t?.code?(0,r.Y)(e3,{title:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.errorCode"),children:(0,r.Y)(d.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:t.code})}):null:(0,r.Y)(e3,{title:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status"),children:(0,r.Y)(e8,{testRun:e})})]}),"failed"===e.status&&t?.message?(0,r.Y)(e9,{message:t.message}):null,"failed"===e.status?(0,r.Y)(eZ,{errorCode:t?.code}):null,"success"===e.status?(0,r.Y)(e4,{parsedUserInfo:e.parsedUserInfo}):null]})},e4=({parsedUserInfo:e})=>e?.emailAddress||e?.firstName?(0,r.FD)(d.so,{elementDescriptor:b.$z.configureSSOTestRunParsedUserInfo,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(d.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.sectionTitle")}),(0,r.FD)(d.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[e.emailAddress?(0,r.Y)(e3,{title:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.email"),children:(0,r.Y)(d.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:e.emailAddress})}):null,e.firstName?(0,r.Y)(e3,{title:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.firstName"),children:(0,r.Y)(d.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:e.firstName})}):null]})]}):null,e9=({message:e})=>{let{t:i}=(0,D._)(),{onCopy:t,hasCopied:o}=(0,eU.i)(e),n=i((0,u.G)(o?"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copied":"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copy"));return(0,r.FD)(d.so,{direction:"col",gap:2,children:[(0,r.FD)(d.so,{justify:"between",align:"center",gap:4,children:[(0,r.Y)(d.EY,{colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.fullMessage")}),(0,r.Y)(eB.K,{elementDescriptor:b.$z.configureSSOTestRunFullMessageCopyButton,variant:"ghost",colorScheme:"neutral",size:"xs",icon:o?v.A:eN.A,"aria-label":n,onClick:()=>t()})]}),(0,r.Y)(d.az,{elementDescriptor:b.$z.configureSSOTestRunFullMessage,as:"pre",sx:e=>({margin:0,padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow,fontFamily:e.fonts.$mono,fontSize:e.fontSizes.$sm,color:e.colors.$colorForeground,whiteSpace:"pre-wrap",wordBreak:"break-word"}),children:e})]})},e6=({testRun:e})=>"pending"===e.status?(0,r.Y)(d.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(d.EY,{children:"-"})}):"success"===e.status?(0,r.Y)(d.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(d.EY,{children:e.parsedUserInfo?.emailAddress})}):(0,r.Y)(d.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(d.EY,{children:e.logs?.[0]?.shortMessage})}),e8=({testRun:e})=>"success"===e.status?(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOTestRunStatusBadge,elementId:b.$z.configureSSOTestRunStatusBadge.setId("success"),colorScheme:"success",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.status__success")}):"failed"===e.status?(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOTestRunStatusBadge,elementId:b.$z.configureSSOTestRunStatusBadge.setId("failed"),colorScheme:"danger",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.status__failed")}):(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOTestRunStatusBadge,elementId:b.$z.configureSSOTestRunStatusBadge.setId("pending"),colorScheme:"warning",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testResults.status__pending")}),e7=({onTestRunCreated:e})=>{let{user:i}=(0,o.Jd)(),t=(0,p.f0)(),{enterpriseConnection:a}=$(),[l,s]=(0,n.useState)(!1);return(0,r.FD)(d.$n,{elementDescriptor:b.$z.configureSSOTestUrlOpenButton,id:"testSsoUrl",variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>{i&&a&&(s(!0),i.createEnterpriseConnectionTestRun(a.id).then(({url:i})=>{e?.(i),window.open(i,"_blank","noopener,noreferrer")}).catch(e=>(0,et.H4)(e,[],t.setError)).finally(()=>s(!1)))},isDisabled:l,sx:e=>({gap:e.space.$1x5,width:"fit-content"}),children:[l?(0,r.Y)(d.y$,{elementDescriptor:b.$z.spinner,size:"sm"}):(0,r.Y)(d.In,{icon:eH.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(d.EY,{as:"span",localizationKey:(0,u.G)("configureSSO.testConfigurationStep.testUrl.actionLabel__open")})]})};var ie=t(704),ii=t(3662),it=t(6600),ir=t(5870),io=t(6516),ia=t(9297);let il=()=>(0,r.Y)(c.n.Part,{part:"ssoConfirmation",children:(0,r.FD)(q,{elementDescriptor:b.$z.configureSSOStep,elementId:b.$z.configureSSOStep.setId("confirmation"),children:[(0,r.FD)(q.Body,{sx:e=>({paddingInline:e.space.$8,paddingBlock:e.space.$4}),children:[(0,r.Y)(is,{}),(0,r.Y)(ic,{}),(0,r.Y)(id,{}),(0,r.Y)(iu,{}),(0,r.Y)(ig,{})]}),(0,r.Y)(q.Footer,{})]})}),is=()=>{let{enterpriseConnection:e}=$(),i=!!e?.active;return(0,r.Y)(io.rd.Root,{title:(0,u.G)("configureSSO.confirmation.statusSection.title"),id:"ssoStatus",sx:{border:0},children:(0,r.Y)(d.so,{justify:"start",children:(0,r.Y)(d.Ex,{elementDescriptor:b.$z.configureSSOConfirmationStatusBadge,elementId:b.$z.configureSSOConfirmationStatusBadge.setId(i?"active":"inactive"),colorScheme:i?"success":"danger",localizationKey:i?(0,u.G)("configureSSO.confirmation.statusSection.activeBadge"):(0,u.G)("configureSSO.confirmation.statusSection.inactiveBadge")})})})},ic=()=>{let{enterpriseConnection:e,updateEnterpriseConnection:i}=$(),t=(0,p.f0)(),[a,l]=(0,n.useState)(!!e?.active),s=(0,o.Wp)((e,t)=>i(e,{active:t})),c=async i=>{if(!t.isLoading){t.setError(void 0),t.setLoading(),l(i);try{let t=await s(e.id,i);t&&l(t.active)}catch(e){l(!i),(0,et.H4)(e,[],t.setError)}finally{t.setIdle()}}};return(0,r.Y)(io.rd.Root,{title:(0,u.G)("configureSSO.confirmation.enableSection.title"),id:"enableSso",sx:e=>({border:0,paddingBlock:e.space.$2}),children:(0,r.Y)(ia.d,{isChecked:a,isDisabled:t.isLoading,onChange:e=>void c(e),"aria-label":"Enable SSO"})})},id=()=>{let{enterpriseConnection:e}=$(),i=e?.domains?.[0];return i?(0,r.Y)(io.rd.Root,{title:(0,u.G)("configureSSO.confirmation.domainSection.title"),id:"ssoDomain",sx:{border:0},children:(0,r.Y)(d.N_,{elementDescriptor:b.$z.configureSSOConfirmationDomainLink,href:`https://${i}`,isExternal:!0,title:i,sx:{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textDecoration:"underline"},children:i})}):null},iu=()=>{let{enterpriseConnection:e}=$(),{goToStep:i}=G(),t=e?.samlConnection;return(0,r.Y)(io.rd.Root,{title:(0,u.G)("configureSSO.confirmation.configurationSection.title"),id:"ssoConfiguration",centered:!1,children:(0,r.FD)(d.fv,{gap:3,children:[(0,r.FD)(d.xA,{gap:3,sx:{width:"100%",alignItems:"center",gridTemplateColumns:"150px minmax(0, 1fr)"},children:[(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOConfirmationConfigDetailsLabel,colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.confirmation.configurationSection.ssoUrlLabel")}),(0,r.Y)(d.N_,{elementDescriptor:b.$z.configureSSOConfirmationConfigDetailsLink,href:t?.idpSsoUrl??"",isExternal:!0,title:t?.idpSsoUrl,sx:{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:t?.idpSsoUrl}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOConfirmationConfigDetailsLabel,colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.confirmation.configurationSection.issuerLabel")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOConfirmationConfigDetailsValue,truncate:!0,title:t?.idpEntityId,children:t?.idpEntityId}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOConfirmationConfigDetailsLabel,colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.confirmation.configurationSection.certificateLabel")}),(0,r.Y)(d.EY,{elementDescriptor:b.$z.configureSSOConfirmationConfigDetailsValue,truncate:!0,title:t?.idpCertificate,children:t?.idpCertificate})]}),(0,r.Y)(d.so,{justify:"start",sx:e=>({marginTop:e.space.$2,paddingInlineStart:0,marginInline:"-10px"}),children:(0,r.Y)(io.rd.Button,{elementDescriptor:b.$z.configureSSOConfirmationReconfigureButton,id:"configureAgain",onClick:()=>i("configure"),variant:"ghost",colorScheme:"primary",localizationKey:(0,u.G)("configureSSO.confirmation.configurationSection.configureAgainLink")})})]})})},ip=(0,p.dm)(e=>{let{onReset:i,onSuccess:t}=e,n=(0,p.f0)(),{enterpriseConnection:a,deleteEnterpriseConnection:l}=$(),{goToStep:s}=G(),c=(0,o.Wp)(e=>l(e)),S=(0,eO.tJ)("deleteConfirmation","",{type:"text",label:(0,u.G)("configureSSO.confirmation.resetSection.confirmationFieldLabel",{name:a?.name??""}),isRequired:!0,placeholder:a?.name}),g=!!(a?.name&&S.value===a.name),m=async()=>{if(a&&g)try{await c(a.id),t(),await s("select-provider")}catch(e){(0,et.H4)(e,[S],n.setError)}};return(0,r.Y)(ir.M,{headerTitle:(0,u.G)("configureSSO.confirmation.resetSection.title"),sx:e=>({gap:e.space.$0x5}),children:(0,r.FD)(es.l.Root,{onSubmit:m,children:[(0,r.Y)(d.fv,{gap:1,children:(0,r.Y)(d.EY,{colorScheme:"danger",localizationKey:(0,u.G)("configureSSO.confirmation.resetSection.warning")})}),(0,r.Y)(es.l.ControlRow,{elementId:S.id,children:(0,r.Y)(es.l.PlainInput,{...S.props,ignorePasswordManager:!0})}),(0,r.Y)(it.G,{submitLabel:(0,u.G)("configureSSO.confirmation.resetSection.submitButton"),colorScheme:"danger",isDisabled:!g,onReset:i})]})})}),iS=()=>{let{close:e}=(0,ii.D5)();return(0,r.Y)(ip,{onSuccess:e,onReset:e})},ig=()=>(0,r.Y)(io.rd.Root,{title:(0,u.G)("configureSSO.confirmation.resetSection.title"),id:"resetSso",sx:{alignItems:"center",[L.g.md]:{alignItems:"flex-start"}},children:(0,r.FD)(ie.r.Root,{children:[(0,r.Y)(ie.r.Closed,{value:"reset",children:(0,r.Y)(io.rd.Item,{id:"resetSso",sx:{paddingInlineStart:0,marginInline:"-10px"},children:(0,r.Y)(ie.r.Trigger,{value:"reset",children:(0,r.Y)(io.rd.Button,{elementDescriptor:b.$z.configureSSOConfirmationResetButton,id:"resetSso",variant:"ghost",colorScheme:"danger",localizationKey:(0,u.G)("configureSSO.confirmation.resetSection.title")})})})}),(0,r.Y)(ie.r.Open,{value:"reset",children:(0,r.Y)(ie.r.Card,{variant:"destructive",children:(0,r.Y)(iS,{})})})]})}),im=(0,s.G)(()=>{let e=a().useRef(null);return(0,r.Y)(S.a.Root,{sx:e=>({display:"grid",gridTemplateColumns:"1fr 3fr",height:e.sizes.$176,overflow:"hidden"}),children:(0,r.Y)(P,{contentRef:e,children:(0,r.Y)(ih,{contentRef:e})})})}),ih=({contentRef:e})=>{let{data:i,isLoading:t,createEnterpriseConnection:n,updateEnterpriseConnection:a,deleteEnterpriseConnection:l}=(0,o.bm)({enabled:!0}),s=i?.[0],{hasSuccessfulTestRun:c,isLoading:d}=ib(s);return t||d?(0,r.Y)(Z,{}):(0,r.Y)(i$,{children:(0,r.Y)(Y,{hasSuccessfulTestRun:c,enterpriseConnection:s,contentRef:e,createEnterpriseConnection:n,updateEnterpriseConnection:a,deleteEnterpriseConnection:l,children:(0,r.Y)(iY,{})})})},iY=()=>{let{initialStepId:e,enterpriseConnection:i}=$();return(0,r.FD)(Q,{initialStepId:e,children:[(0,r.Y)(iD,{}),(0,r.Y)(w,{}),!i&&(0,r.Y)(Q.Step,{id:"select-provider",children:(0,r.Y)(en,{})}),(0,r.Y)(Q.Step,{id:"verify-domain",label:"Verify domain",children:(0,r.Y)(ed,{})}),(0,r.Y)(Q.Step,{id:"configure",label:"Configure",children:(0,r.Y)(eC,{})}),(0,r.Y)(Q.Step,{id:"test",label:"Test",children:(0,r.Y)(eX,{})}),(0,r.Y)(Q.Step,{id:"confirmation",label:"Confirmation",children:(0,r.Y)(il,{})})]})},i$=({children:e})=>{let{session:i}=(0,o.wV)(),t=!i?.lastActiveOrganizationId;return(0,l.Fd)(e=>t||e({permission:"org:sys_entconns:manage"}))?e:(0,r.Y)(iy,{})},iy=()=>(0,r.FD)(r.FK,{children:[(0,r.Y)(z,{}),(0,r.Y)(q.Body,{children:(0,r.Y)(q.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.Y)(d.so,{align:"center",justify:"center",sx:e=>({flex:1,padding:e.space.$8}),children:(0,r.FD)(d.fv,{align:"center",sx:e=>({gap:e.space.$2,textAlign:"center",maxWidth:e.sizes.$94}),children:[(0,r.Y)(d.In,{icon:g.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.Y)(d.DZ,{localizationKey:(0,u.G)("configureSSO.missingManageEnterpriseConnectionsPermission.title"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,textWrap:"balance"})}),(0,r.Y)(d.EY,{as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,u.G)("configureSSO.missingManageEnterpriseConnectionsPermission.subtitle"),sx:{textWrap:"balance"}})]})})})}),(0,r.Y)(x,{})]}),iD=()=>{let{currentStep:e}=G(),i=(0,p.f0)(),t=a().useRef(e?.id);return a().useEffect(()=>{t.current!==e?.id&&(t.current=e?.id,i.setError(void 0))},[e?.id,i]),null},ib=e=>{let{data:i,isLoading:t}=(0,o.ND)({enterpriseConnectionId:e?.id??null,params:{initialPage:1,pageSize:1,status:["success"]}});return{hasSuccessfulTestRun:(i?.length??0)>0,isLoading:t}},iO=(0,p.dm)(()=>(0,r.Y)(c.n.Root,{flow:"configureSSO",children:(0,r.Y)(m.d,{children:(0,r.Y)(f.q,{children:(0,r.Y)(im,{})})})}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["7971"],{37215(e,i,t){t.r(i),t.d(i,{ConfigureSSO:()=>iD,ConfigureSSOContent:()=>im});var r=t(59763),n=t(42959),o=t(59701),l=t(82396),a=t(9203),s=t(41522),c=t(67996),d=t(78342),u=t(17308),p=t(61581),S=t(61202),g=t(66661),m=t(59922);t(36395),t(85281),t(15254),t(42949),t(49678);let f=o.createContext(null);f.displayName="ConfigureSSOContext";let h=e=>{let{enterpriseConnection:i,hasSuccessfulTestRun:t,contentRef:l,createEnterpriseConnection:a,updateEnterpriseConnection:s,deleteEnterpriseConnection:c,children:d}=e,[p,S]=o.useState(null==i?void 0:i.provider),{session:g}=(0,n.wV)(),{user:m}=(0,n.Jd)(),h=(0,u.f0)(),Y=$(m,g,i),y=((e,i)=>{var t,r,n;let{isDomainTakenByOtherOrg:o,hasSuccessfulTestRun:l}=i;return o?"verify-domain":e?(null==e?void 0:e.active)?"confirmation":(null==(r=(t=e).samlConnection)?void 0:r.idpSsoUrl)&&(null==(n=t.samlConnection)?void 0:n.idpEntityId)?l?"confirmation":"test":"configure":"select-provider"})(i,{isDomainTakenByOtherOrg:Y,hasSuccessfulTestRun:t}),v=(0,o.useCallback)(async(e,i)=>{var t;let r=null==i?void 0:i.emailAddress.split("@")[1],n=null!=(t=null==g?void 0:g.lastActiveOrganizationId)?t:null;if(r){h.setLoading();try{await a({provider:e,name:r,organizationId:n})}finally{h.setIdle()}}},[h,g,a]),D=o.useMemo(()=>({provider:p,contentRef:l,setProvider:S,initialStepId:y,enterpriseConnection:i,isDomainTakenByOtherOrg:Y,createEnterpriseConnection:v,updateEnterpriseConnection:s,deleteEnterpriseConnection:c}),[p,l,y,i,v,s,c,Y]);return(0,r.Y)(f.Provider,{value:D,children:d})},Y=()=>{let e=o.useContext(f);if(!e)throw Error("useConfigureSSO called outside <ConfigureSSOProvider>.");return e},$=(e,i,t)=>{var r,n,o;let l=null!=(r=null==e?void 0:e.primaryEmailAddress)?r:null==e||null==(o=e.emailAddresses)?void 0:o.find(e=>"verified"!==e.verification.status),a=(null==l?void 0:l.verification.status)==="verified",s=null!=(n=null==i?void 0:i.lastActiveOrganizationId)?n:null;return!!(a&&t&&t.organizationId!==s)};t(18723),t(37891);var y=t(84722),v=t(26447),D=t(8343);let b=e=>(0,r.Y)(c.so,{as:"header",elementDescriptor:v.$z.configureSSOHeader,...e,sx:e=>({gap:e.space.$2,width:"100%",minHeight:e.sizes.$13,padding:e.space.$5,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100})}),O=e=>(0,r.Y)(c.so,{as:"footer",elementDescriptor:v.$z.configureSSOFooter,align:"center",justify:"end",...e,sx:e=>({gap:e.space.$2,minHeight:e.sizes.$16,padding:e.space.$4,background:D.s.mutedBackground(e),borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100})});t(98972),t(73560);var z=t(59242),x=t(53693);let C=e=>{let{bullet:i,isCurrent:t,isCompleted:n,isReachable:o=!0,onClick:l,children:a}=e;return(0,r.FD)(c.dF,{elementDescriptor:v.$z.configureSSOStepperItem,isActive:t,variant:"unstyled",isDisabled:!o,onClick:l,sx:e=>({gap:e.space.$1x5,padding:0,color:t||n?e.colors.$colorForeground:e.colors.$colorMutedForeground,"&:disabled,&[data-disabled]":{opacity:1}}),children:[(0,r.Y)(c.so,{elementDescriptor:v.$z.configureSSOStepperItemBullet,isActive:t,align:"center",justify:"center",sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:t?e.colors.$colorForeground:n?e.colors.$success500:e.colors.$colorMutedForeground}),children:n&&!t?(0,r.Y)(c.In,{icon:x.A,size:"sm",sx:e=>({color:e.colors.$white})}):(0,r.Y)(c.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs,fontWeight:e.fontWeights.$medium,color:e.colors.$colorBackground}),children:i})}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOStepperItemLabel,as:"span",variant:"body",sx:{fontWeight:"inherit",color:"inherit"},children:a})]})};C.displayName="Stepper.Item";let F=()=>(0,r.FD)(c.so,{align:"center",sx:e=>({gap:e.space.$1x5,minHeight:e.sizes.$4x5,opacity:.16}),children:[(0,r.Y)(c.az,{sx:e=>({width:e.sizes.$4,height:e.sizes.$4,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorMutedForeground})}),(0,r.Y)(c.az,{sx:e=>({width:e.sizes.$17,height:e.sizes.$1x5,borderRadius:e.radii.$md,backgroundColor:e.colors.$colorMutedForeground})})]}),I=Object.assign(e=>{let{children:i}=e,t=o.Children.toArray(i).filter(e=>o.isValidElement(e));return(0,r.Y)(c.so,{elementDescriptor:v.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap"}),children:t.map((e,i)=>(0,r.FD)(o.Fragment,{children:[e,i<t.length-1&&(0,r.Y)(c.In,{elementDescriptor:v.$z.configureSSOStepperSeparator,icon:z.A,size:"md",colorScheme:"neutral"})]},i))})},{Item:C,Skeleton:e=>{let{totalSteps:i=4}=e;return(0,r.Y)(c.so,{elementDescriptor:v.$z.configureSSOStepper,align:"center",sx:e=>({gap:e.space.$2,flexWrap:"wrap"}),children:Array.from({length:i}).map((e,t)=>(0,r.FD)(o.Fragment,{children:[(0,r.Y)(F,{}),t<i-1&&(0,r.Y)(c.In,{elementDescriptor:v.$z.configureSSOStepperSeparator,icon:z.A,size:"md",colorScheme:"neutral",sx:{opacity:.16}})]},t))})}}),E=o.createContext(null);function k(){let e=o.useContext(E);if(!e)throw Error("useWizard called outside of <Wizard>");return e}E.displayName="WizardContext";let G=()=>{let{activeSteps:e,currentStep:i,goToStep:t}=k(),{t:n}=(0,y._)(),o=e.filter(e=>"select-provider"!==e.id),l=o.findIndex(e=>e.id===(null==i?void 0:i.id));return(0,r.Y)(b,{children:(0,r.Y)(I,{children:o.map((e,i)=>{var o;let a=null!=(o=e.isCompleted)?o:i<l,s=a||i<=l,c=e.label?"string"==typeof e.label?e.label:n(e.label):"";return(0,r.Y)(I.Item,{bullet:i+1,isCurrent:i===l,isCompleted:a,isReachable:s,onClick:()=>void t(e.id),children:c},e.id)})})})};var w=t(91868),R=t(79735),T=t(30914),A=t(40611),_=t(94281),K=t(34260);let L=e=>{let{children:i,contentRef:t}=e,{parsedOptions:n}=(0,R.KP)(),{organizationSettings:o,displayConfig:{applicationName:l,logoImageUrl:a}}=(0,w.O)(),s=!!(n.logoImageUrl||a);return(0,r.FD)(A.XM,{contentRef:t,children:[(0,r.Y)(A.jq,{contentRef:t,title:(0,d.G)("configureSSO.navbar.title"),titleSx:e=>({fontSize:e.fontSizes.$lg}),containerSx:{flexDirection:"column-reverse",flex:0},routes:[],header:(0,r.FD)(c.so,{align:"center",sx:e=>({gap:e.space.$2,padding:"".concat(e.space.$none," ").concat(e.space.$3),maxWidth:"100%"}),children:[s?(0,r.Y)(T.G,{sx:e=>({width:e.space.$9,height:e.space.$9,borderRadius:e.radii.$md,overflow:"hidden"})}):(0,r.Y)(c.az,{sx:e=>({width:e.space.$9,height:e.space.$9,flexShrink:0,borderRadius:e.radii.$md,backgroundColor:e.colors.$primary500,color:e.colors.$colorPrimaryForeground,display:"flex",alignItems:"center",justifyContent:"center"}),"aria-hidden":!0,children:(0,r.Y)(c.In,{icon:_.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4})})}),(0,r.FD)(c.fv,{sx:{minWidth:0},children:[(0,r.Y)(c.EY,{as:"p",truncate:!0,children:l}),o.enabled&&(0,r.Y)(B,{})]})]})}),(0,r.FD)(c.fv,{ref:t,elementDescriptor:v.$z.scrollBox,sx:e=>({backgroundColor:e.colors.$colorBackground,position:"relative",borderRadius:e.radii.$lg,width:"100%",overflow:"hidden",borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,flex:1}),children:[(0,r.Y)(P,{}),i]})]})},P=()=>{let{parsedOptions:e}=(0,R.KP)(),{organizationSettings:i,displayConfig:{applicationName:t,logoImageUrl:n}}=(0,w.O)(),o=!!(e.logoImageUrl||n);return(0,r.FD)(c.fv,{as:"header",elementDescriptor:v.$z.configureSSOMobileNavbar,sx:e=>({display:"none",[K.g.md]:{display:"flex"},gap:e.space.$4,padding:e.space.$5,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:[(0,r.FD)(c.so,{align:"center",sx:e=>({gap:e.space.$2,maxWidth:"100%"}),children:[o?(0,r.Y)(T.G,{sx:e=>({width:e.space.$9,height:e.space.$9,borderRadius:e.radii.$md,overflow:"hidden"})}):(0,r.Y)(c.az,{sx:e=>({width:e.space.$9,height:e.space.$9,flexShrink:0,borderRadius:e.radii.$md,backgroundColor:e.colors.$primary500,color:e.colors.$colorPrimaryForeground,display:"flex",alignItems:"center",justifyContent:"center"}),"aria-hidden":!0,children:(0,r.Y)(c.In,{icon:_.A,sx:e=>({width:e.sizes.$4,height:e.sizes.$4})})}),(0,r.FD)(c.fv,{sx:{minWidth:0},children:[(0,r.Y)(c.EY,{as:"p",truncate:!0,children:t}),i.enabled&&(0,r.Y)(B,{})]})]}),(0,r.Y)(c.DZ,{as:"h3",localizationKey:(0,d.G)("configureSSO.navbar.title"),sx:e=>({fontSize:e.fontSizes.$lg})})]})},B=()=>{let e=(0,n.It)();return e?(0,r.Y)(c.EY,{as:"span",truncate:!0,sx:e=>({color:e.colors.$colorMutedForeground}),children:null==e?void 0:e.name}):null};var W=t(43919);let V=e=>{let{fill:i,sx:t,...n}=e;return(0,r.Y)(c.fv,{elementDescriptor:v.$z.configureSSOStepSection,...n,sx:[e=>({padding:e.space.$5}),i&&{flex:1},t]})},U=e=>{let{onClick:i,isDisabled:t,isLoading:n,label:o="Previous"}=e,{t:l}=(0,y._)(),a="string"==typeof o?o:l(o);return(0,r.FD)(c.$n,{elementDescriptor:v.$z.configureSSOFooterPreviousButton,variant:"outline",size:"sm",isDisabled:t,isLoading:n,onClick:i?()=>{i()}:void 0,children:[(0,r.Y)(c.In,{icon:W.A,size:"sm",sx:e=>({marginInlineEnd:e.space.$1})}),a]})};U.displayName="Step.Footer.Previous";let M=e=>{let{onClick:i,isDisabled:t,isLoading:n,label:o="Continue"}=e,{t:l}=(0,y._)(),a="string"==typeof o?o:l(o);return(0,r.FD)(c.$n,{elementDescriptor:v.$z.configureSSOFooterContinueButton,variant:"solid",size:"sm",isDisabled:t,isLoading:n,onClick:i?()=>{i()}:void 0,children:[a,(0,r.Y)(c.In,{icon:z.A,size:"sm",sx:e=>({marginInlineStart:e.space.$1})})]})};M.displayName="Step.Footer.Continue";let N=Object.assign(e=>{let{children:i}=e;return(0,r.Y)(O,{children:i})},{Previous:U,Continue:M}),H=e=>{let{total:i,current:t}=e;return i<=1?null:(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOStepCounter,colorScheme:"primary",sx:{whiteSpace:"nowrap"},children:(0,r.FD)(c.EY,{as:"span",sx:e=>({fontSize:e.fontSizes.$xs}),children:["Step ",t,"/",i]})})};H.displayName="Step.Counter";let j=Object.assign(e=>{let{sx:i,...t}=e;return(0,r.Y)(c.fv,{...t,sx:[{flex:1,minHeight:0},i]})},{Section:V,Header:e=>{let{title:i,description:t,children:n}=e,{t:o}=(0,y._)(),l="string"==typeof i?i:o(i),a=t?"string"==typeof t?t:o(t):null;return(0,r.Y)(V,{elementDescriptor:v.$z.configureSSOStepHeader,sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(c.so,{align:"start",justify:"between",sx:e=>({gap:e.space.$4}),children:[(0,r.FD)(c.fv,{sx:e=>({gap:e.space.$2,minWidth:0}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOStepHeaderTitle,textVariant:"h2",children:l}),a&&(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOStepHeaderDescription,as:"p",colorScheme:"secondary",children:a})]}),n]})})},Body:e=>{let{sx:i,...t}=e;return(0,r.Y)(c.fv,{elementDescriptor:v.$z.configureSSOStepBody,as:"main",...t,sx:[e=>({flex:1,minHeight:0,overflowY:"auto",...D.s.unstyledScrollbar(e)}),i]})},Footer:N,Counter:H}),q=()=>(0,r.FD)(r.FK,{children:[(0,r.Y)(b,{children:(0,r.Y)(I.Skeleton,{})}),(0,r.Y)(c.so,{align:"center",justify:"center",sx:e=>({flex:1,padding:e.space.$5}),children:(0,r.Y)(c.y$,{size:"xs",colorScheme:"neutral",elementDescriptor:v.$z.spinner})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{isDisabled:!0}),(0,r.Y)(j.Footer.Continue,{isDisabled:!0})]})]});t(12021);let Z=e=>{let{parentWizard:i,isNested:t,initialStepId:n,children:l}=e,[a,s]=o.useState([]),[c,d]=o.useState(n),u=o.useCallback(e=>{s(i=>{let t=i.findIndex(i=>i.id===e.id);if(t>=0){let r=i[t];if(r.label===e.label&&r.isCompleted===e.isCompleted)return i;let n=i.slice();return n[t]=e,n}return[...i,e]}),d(i=>null!=i?i:e.id)},[]),p=o.useCallback(e=>{s(i=>i.some(i=>i.id===e)?i.filter(i=>i.id!==e):i),d(i=>i===e?void 0:i)},[]),S=o.useMemo(()=>a.find(e=>e.id===c),[a,c]),g=o.useMemo(()=>S?a.findIndex(e=>e.id===S.id):-1,[a,S]),m=o.useCallback(()=>{if(g<0)return;let e=a[g+1];return e?void d(e.id):null==i?void 0:i.goNext()},[a,g,i]),f=o.useCallback(()=>{if(g<0)return;let e=a[g-1];return e?void d(e.id):null==i?void 0:i.goPrev()},[a,g,i]),h=o.useCallback(e=>{a.some(i=>i.id===e)&&d(e)},[a]),Y=o.useMemo(()=>({activeSteps:a,currentStep:S,currentIndex:g,totalSteps:a.length,isNested:t,isFirstStep:g<=0&&(!i||i.isFirstStep),isLastStep:g===a.length-1&&(!i||i.isLastStep),goNext:m,goPrev:f,goToStep:h,registerStep:u,unregisterStep:p}),[a,S,g,t,i,m,f,h,u,p]);return(0,r.Y)(E.Provider,{value:Y,children:l})},J=e=>{let{id:i,label:t,isCompleted:n,children:l}=e,{registerStep:a,unregisterStep:s,currentStep:c}=k();return(o.useLayoutEffect(()=>{a({id:i,label:t,isCompleted:n})},[i,t,n,a]),o.useLayoutEffect(()=>()=>s(i),[i,s]),(null==c?void 0:c.id)!==i)?null:(0,r.Y)(r.FK,{children:l})};J.displayName="Wizard.Step";let X=Object.assign(e=>{let{children:i,initialStepId:t}=e,n=o.useContext(E);return(0,r.Y)(Z,{parentWizard:n,isNested:null!==n,initialStepId:t,children:i})},{Step:J});t(67548),t(70954),t(98803),t(79162),t(15385),t(39342),t(69152);var Q=t(11307),ee=t(40395),ei=t(30869);let et=new Set(["okta"]),er=[{id:"saml",label:(0,d.G)("configureSSO.selectProviderStep.saml.groupLabel"),options:[{id:"saml_okta",label:(0,d.G)("configureSSO.selectProviderStep.saml.okta"),iconId:"okta"},{id:"saml_custom",label:(0,d.G)("configureSSO.selectProviderStep.saml.customSaml"),iconId:"saml"}]}],en=()=>{let{goToStep:e}=k(),{provider:i,setProvider:t,createEnterpriseConnection:l}=Y(),[a,p]=o.useState(null!=i?i:null),{user:S}=(0,n.Jd)(),g=(0,u.f0)(),m=async()=>{if(!a||!S)return;t(a);let i=null==S?void 0:S.primaryEmailAddress,r=(null==i?void 0:i.verification.status)==="verified";if(!i||!r)return void e("verify-domain");try{await l(a,i)}catch(e){(0,ei.H4)(e,[],g.setError);return}e("configure")};return(0,r.Y)(s.n.Part,{part:"selectProvider",children:(0,r.FD)(j,{elementDescriptor:v.$z.configureSSOStep,elementId:v.$z.configureSSOStep.setId("select-provider"),children:[(0,r.Y)(j.Header,{title:(0,d.G)("configureSSO.selectProviderStep.title"),description:(0,d.G)("configureSSO.selectProviderStep.subtitle")}),(0,r.Y)(j.Body,{children:(0,r.FD)(j.Section,{sx:e=>({gap:e.space.$5}),children:[er.map(e=>(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOProviderGroup,elementId:v.$z.configureSSOProviderGroup.setId(e.id),gap:3,children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOProviderGroupLabel,elementId:v.$z.configureSSOProviderGroupLabel.setId(e.id),as:"label",variant:"subtitle",localizationKey:e.label}),(0,r.Y)(c.xA,{elementDescriptor:v.$z.configureSSOProviderGrid,gap:3,sx:{gridTemplateColumns:"repeat(2, 1fr)",[K.g.sm]:{gridTemplateColumns:"1fr"}},children:e.options.map(e=>(0,r.Y)(eo,{name:"configure-sso-provider",value:e.id,iconId:e.iconId,label:e.label,checked:a===e.id,onChange:()=>p(e.id)},e.id))})]},e.id)),(0,r.Y)(ee.F,{variant:"warning",title:(0,d.G)("configureSSO.selectProviderStep.warning")}),g.error&&(0,r.Y)(ee.F,{variant:"danger",title:g.error,sx:e=>({margin:e.space.$3})})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{isDisabled:!0}),(0,r.Y)(j.Footer.Continue,{onClick:m,isLoading:g.isLoading,isDisabled:!a})]})]})})},eo=e=>{let{name:i,value:t,iconId:n,label:o,checked:l,onChange:a}=e,{t:s}=(0,y._)(),d=s(o);return(0,r.FD)(c.az,{as:"label",elementDescriptor:v.$z.configureSSOProviderCard,elementId:v.$z.configureSSOProviderCard.setId(t),isActive:l,sx:e=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:e.space.$2,height:e.sizes.$32,padding:e.space.$1x5,cursor:"pointer",position:"relative",...D.s.borderVariants(e).normal,"&:has(input:focus-visible)":{...D.s.focusRingStyles(e),borderColor:e.colors.$borderAlpha300},"&:hover":{backgroundColor:e.colors.$neutralAlpha50},"&:has(input:checked)":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(c.AT,{elementDescriptor:v.$z.configureSSOProviderCardRadio,elementId:v.$z.configureSSOProviderCardRadio.setId(t),name:i,value:t,checked:l,onChange:a,focusRing:!1,sx:e=>({position:"absolute",top:e.space.$1x5,insetInlineStart:e.space.$1x5,margin:0,width:"fit-content",boxShadow:"none","&:hover":{boxShadow:"none"}})}),(0,r.Y)(c.L9,{elementDescriptor:v.$z.configureSSOProviderCardIcon,elementId:v.$z.configureSSOProviderCardIcon.setId(t),"aria-hidden":!0,sx:e=>{let i=et.has(n),t={width:e.sizes.$8,height:e.sizes.$8};return i?{...t,backgroundColor:e.colors.$colorForeground,maskImage:"url(".concat((0,Q.p)(n),")"),maskSize:"contain",maskPosition:"center",maskRepeat:"no-repeat"}:{...t,backgroundImage:"url(".concat((0,Q.p)(n),")"),backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOProviderCardLabel,elementId:v.$z.configureSSOProviderCardLabel.setId(t),as:"span",variant:"body",sx:e=>({color:e.colors.$colorForeground}),children:d})]})};var el=t(70747),ea=t(17447),es=t(37709);let ec=()=>{var e,i,t;let{user:l}=(0,n.Jd)(),{session:a}=(0,n.wV)(),{enterpriseConnection:u}=Y(),{t:p}=(0,y._)(),{goNext:g}=k(),m=null!=(e=null==l?void 0:l.primaryEmailAddress)?e:null==l||null==(t=l.emailAddresses)?void 0:t.find(e=>"verified"!==e.verification.status),f=(null==m?void 0:m.verification.status)==="verified",h=null!=(i=null==a?void 0:a.lastActiveOrganizationId)?i:null,$=!!(f&&u&&u.organizationId!==h),D=(0,o.useRef)(f),b=(0,o.useRef)(m),O=(0,o.useRef)(null==m?void 0:m.id),z=(0,o.useRef)(m?"verify-email-address":"provide-email");if($){let e=null==u?void 0:u.domains[0];return(0,r.Y)(s.n.Part,{part:"verifyDomain",children:(0,r.Y)(j,{children:(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOVerifyDomainErrorRoot,justify:"center",align:"center",sx:e=>({gap:e.space.$3,alignItems:"center",flex:1}),children:[(0,r.Y)(c.In,{elementDescriptor:v.$z.configureSSOVerifyDomainErrorIcon,icon:S.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.FD)(c.fv,{gap:1,sx:e=>({textAlign:"center",maxWidth:e.sizes.$94}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOVerifyDomainErrorTitle,textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,textWrap:"balance"}),localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.domainTaken.title",{domain:e})}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOVerifyDomainErrorSubtitle,as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.domainTaken.subtitle")})]})]})})})}return D.current&&(null==m?void 0:m.emailAddress)?(0,r.Y)(s.n.Part,{part:"verifyDomain",children:(0,r.FD)(j,{elementDescriptor:v.$z.configureSSOStep,elementId:v.$z.configureSSOStep.setId("verify-domain"),children:[(0,r.Y)(j.Header,{title:p((0,d.G)("configureSSO.verifyEmailDomainStep.title")),description:p((0,d.G)("configureSSO.verifyEmailDomainStep.subtitle"))}),(0,r.Y)(j.Body,{children:(0,r.Y)(j.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.Y)(eg,{emailAddress:m.emailAddress})})}),(0,r.Y)(j.Footer,{children:(0,r.Y)(j.Footer.Continue,{onClick:()=>g()})})]})}):(0,r.Y)(s.n.Part,{part:"verifyDomain",children:(0,r.Y)(j,{elementDescriptor:v.$z.configureSSOStep,elementId:v.$z.configureSSOStep.setId("verify-domain"),children:(0,r.FD)(X,{initialStepId:z.current,children:[(0,r.Y)(j.Header,{title:p((0,d.G)("configureSSO.verifyEmailDomainStep.title")),description:p((0,d.G)("configureSSO.verifyEmailDomainStep.subtitle")),children:(0,r.Y)(ed,{})}),(0,r.FD)(j.Body,{children:[(0,r.Y)(X.Step,{id:"provide-email",children:(0,r.Y)(ep,{emailAddressRef:b,preExistingEmailIdRef:O})}),(0,r.Y)(X.Step,{id:"verify-email-address",children:(0,r.Y)(eS,{emailAddressRef:b})})]})]})})})},ed=()=>{let{currentIndex:e,totalSteps:i}=k();return(0,r.Y)(j.Counter,{total:i,current:e+1})},eu=e=>e.trim().toLowerCase(),ep=e=>{let{emailAddressRef:i,preExistingEmailIdRef:t}=e,{goNext:l,goPrev:a}=k(),{user:s}=(0,n.Jd)(),p=(0,u.f0)(),{t:S}=(0,y._)(),[g,m]=(0,o.useState)(()=>{var e,t;return null!=(e=null==(t=i.current)?void 0:t.emailAddress)?e:""}),f=(0,n.Wp)(e=>null==s?void 0:s.createEmailAddress({email:e})),h=/^\S+@\S+\.\S+$/.test(g)&&!p.isLoading,Y=(0,o.useCallback)(async()=>{if(!h)return;let e=i.current,r=g.trim();if(e&&eu(e.emailAddress)===eu(r))return void await l();p.setError(void 0),p.setLoading();try{let n=await f(r);if(i.current=null!=n?n:void 0,e&&e.id!==t.current&&e.id!==(null==n?void 0:n.id))try{await e.destroy()}catch{}await l()}catch(e){(0,ei.H4)(e,[],p.setError)}finally{p.setIdle()}},[h,g,f,p,l,i,t]);return(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.FD)(ea.l.Root,{elementDescriptor:v.$z.configureSSOEmailVerificationForm,elementId:v.$z.configureSSOEmailVerificationForm.setId("provide"),onSubmit:Y,gap:3,sx:e=>({display:"flex",maxWidth:e.sizes.$66,textAlign:"center",flexDirection:"column",alignItems:"center"}),children:[(0,r.Y)(c.In,{elementDescriptor:v.$z.configureSSOEmailVerificationIcon,elementId:v.$z.configureSSOEmailVerificationIcon.setId("provide"),icon:es.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.Y)(c.fv,{gap:1,children:(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOEmailVerificationTitle,elementId:v.$z.configureSSOEmailVerificationTitle.setId("provide"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,fontWeight:e.fontWeights.$bold}),localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.formTitle")})}),(0,r.FD)(c.fv,{gap:1,sx:{width:"100%"},children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOEmailVerificationSubtitle,elementId:v.$z.configureSSOEmailVerificationSubtitle.setId("provide"),as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.formSubtitle")}),(0,r.Y)(c.pd,{elementDescriptor:v.$z.configureSSOEmailVerificationInput,elementId:v.$z.configureSSOEmailVerificationInput.setId("provide"),type:"email",placeholder:S((0,d.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.inputPlaceholder")),"aria-label":S((0,d.G)("configureSSO.verifyEmailDomainStep.addEmailAddress.inputLabel")),value:g,onChange:e=>m(e.currentTarget.value),hasError:!!p.error,isDisabled:p.isLoading,autoFocus:!0}),p.error?(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOEmailVerificationError,as:"p",variant:"body",sx:e=>({color:e.colors.$danger500,fontSize:e.fontSizes.$sm,textAlign:"start"}),children:p.error}):null]})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>a(),isDisabled:!0}),(0,r.Y)(j.Footer.Continue,{onClick:Y,isLoading:p.isLoading,isDisabled:!h||p.isLoading})]})]})},eS=e=>{let{emailAddressRef:i}=e,{user:t}=(0,n.Jd)(),l=(0,u.f0)(),{goNext:a,goPrev:s}=k(),p=null==t?void 0:t.primaryEmailAddress,S=i.current,g=(null==S?void 0:S.verification.status)==="verified",m=(null==S?void 0:S.id)===(null==t?void 0:t.primaryEmailAddressId),f=(0,n.Wp)(()=>{var e;return null==(e=i.current)?void 0:e.prepareVerification({strategy:"email_code"})}),h=(0,n.Wp)(e=>{var t;return null==(t=i.current)?void 0:t.attemptVerification({code:e})}),Y=(0,n.Wp)(e=>null==t?void 0:t.update({primaryEmailAddressId:e})),$=(0,o.useCallback)(()=>{var e;return null==(e=f())?void 0:e.catch(e=>(0,ei.H4)(e,[],l.setError))},[f,l]),y=(0,el.xM)({onCodeEntryFinished:(e,i,t)=>{h(e).then(()=>i()).catch(t)},onResendCodeClicked:()=>{$()},onResolve:async()=>{let e=i.current;if(e&&!m)try{await Y(e.id)}catch(e){(0,ei.H4)(e,[],l.setError);return}a()}});return((0,o.useEffect)(()=>{S&&!g&&$()},[]),S)?(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.FD)(c.fv,{gap:4,sx:{textAlign:"center"},children:[(0,r.FD)(c.fv,{gap:1,children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOEmailVerificationTitle,elementId:v.$z.configureSSOEmailVerificationTitle.setId("enter-code"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$sm}),localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.emailCode.formTitle")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOEmailVerificationSubtitle,elementId:v.$z.configureSSOEmailVerificationSubtitle.setId("enter-code"),as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.emailCode.formSubtitle",{identifier:S.emailAddress})})]}),(0,r.Y)(ea.l.OTPInput,{...y,resendButton:(0,d.G)("configureSSO.verifyEmailDomainStep.emailCode.resendButton")})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>s(),isDisabled:!!p}),(0,r.Y)(j.Footer.Continue,{onClick:()=>a(),isLoading:y.isLoading||l.isLoading,isDisabled:!g})]})]}):null},eg=e=>{let{emailAddress:i}=e,{t}=(0,y._)();return(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOEmailVerificationForm,elementId:v.$z.configureSSOEmailVerificationForm.setId("verified"),gap:3,sx:{alignItems:"center"},children:[(0,r.Y)(c.In,{elementDescriptor:v.$z.configureSSOEmailVerificationIcon,elementId:v.$z.configureSSOEmailVerificationIcon.setId("verified"),icon:es.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.FD)(c.fv,{gap:2,sx:e=>({textAlign:"center",maxWidth:e.sizes.$66}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOEmailVerificationTitle,elementId:v.$z.configureSSOEmailVerificationTitle.setId("verified"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,fontWeight:e.fontWeights.$bold}),localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.emailCode.verified.title")}),(0,r.Y)(c.fv,{gap:3,sx:{flex:1},children:(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOEmailVerificationSubtitle,elementId:v.$z.configureSSOEmailVerificationSubtitle.setId("verified"),as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.verifyEmailDomainStep.emailCode.verified.subtitle")})}),(0,r.Y)(c.pd,{elementDescriptor:v.$z.configureSSOEmailVerificationInput,elementId:v.$z.configureSSOEmailVerificationInput.setId("verified"),type:"email",value:i,readOnly:!0,"aria-label":t((0,d.G)("configureSSO.verifyEmailDomainStep.emailCode.verified.inputLabel")),sx:e=>({backgroundColor:e.colors.$neutralAlpha50})})]})]})};var em=t(41457),ef=t(16363),eh=t(54438),eY=t(92386),e$=t(76504),ey=t(59582),ev=t(72310),eD=t(51637);let eb={saml_okta:"configureSSO.configureStep.samlOkta",saml_custom:"configureSSO.configureStep.samlCustom"};function eO(){let{provider:e}=Y();if(!e)throw Error("useConfigureStepTranslations called without a selected provider.");return{provider:e,key:i=>"".concat(eb[e],".").concat(i)}}let ez=()=>{let{key:e}=eO();return(0,r.Y)(s.n.Part,{part:"configureCreateApp",children:(0,r.Y)(j,{elementDescriptor:v.$z.configureSSOStep,elementId:v.$z.configureSSOStep.setId("configure"),children:(0,r.FD)(X,{children:[(0,r.FD)(X.Step,{id:"create-app",children:[(0,r.Y)(j.Header,{title:(0,d.G)(e("headerTitle")),description:(0,d.G)(e("createApp.headerSubtitle")),children:(0,r.Y)(ex,{})}),(0,r.Y)(eF,{})]}),(0,r.FD)(X.Step,{id:"configure-attributes",children:[(0,r.Y)(j.Header,{title:(0,d.G)(e("headerTitle")),description:(0,d.G)(e("configureAttributes.headerSubtitle")),children:(0,r.Y)(ex,{})}),(0,r.Y)(eG,{})]}),(0,r.FD)(X.Step,{id:"assign-users",children:[(0,r.Y)(j.Header,{title:(0,d.G)(e("headerTitle")),description:(0,d.G)(e("assignUsers.headerSubtitle")),children:(0,r.Y)(ex,{})}),(0,r.Y)(eT,{})]}),(0,r.FD)(X.Step,{id:"submit-saml-config",children:[(0,r.Y)(j.Header,{title:(0,d.G)(e("headerTitle")),description:(0,d.G)(e("metadataUrl.headerSubtitle")),children:(0,r.Y)(ex,{})}),(0,r.Y)(eA,{})]})]})})})},ex=()=>{let{currentIndex:e,totalSteps:i}=k();return(0,r.Y)(j.Counter,{total:i,current:e+1})},eC={saml_okta:{columns:{first:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.columns.name"),second:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.columns.value")},monoFirst:!0,rows:[{id:"email",isRequired:!0,first:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.email.name"),second:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.email.value")},{id:"firstName",isRequired:!1,first:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.firstName.name"),second:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.firstName.value")},{id:"lastName",isRequired:!1,first:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.lastName.name"),second:(0,d.G)("configureSSO.configureStep.samlOkta.attributeMapping.rows.lastName.value")}]},saml_custom:{columns:{first:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.columns.userProfile"),second:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.columns.attributeName")},rows:[{id:"id",isRequired:!0,first:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.id.userProfile"),second:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.id.attributeName")},{id:"email",isRequired:!0,first:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.email.userProfile"),second:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.email.attributeName")},{id:"firstName",isRequired:!1,first:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.firstName.userProfile"),second:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.firstName.attributeName")},{id:"lastName",isRequired:!1,first:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.lastName.userProfile"),second:(0,d.G)("configureSSO.configureStep.samlCustom.attributeMapping.rows.lastName.attributeName")}]}},eF=()=>{var e,i,t,n;let{goNext:o,goPrev:l,isFirstStep:a,isLastStep:s}=k(),{enterpriseConnection:u,provider:p}=Y(),{key:S}=eO(),g=null!=(e=null==u||null==(t=u.samlConnection)?void 0:t.acsUrl)?e:"",m=null!=(i=null==u||null==(n=u.samlConnection)?void 0:n.spEntityId)?i:"",f=(0,eD.tJ)("acsUrl",g,{type:"text",label:(0,d.G)(S("spFields.acsUrl.label")),isRequired:!1}),h=(0,eD.tJ)("spEntityId",m,{type:"text",label:(0,d.G)(S("spFields.spEntityId.label")),isRequired:!1});return(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Body,{children:(0,r.FD)(j.Section,{sx:e=>({gap:e.space.$5}),children:[(0,r.FD)(c.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)(S("createApp.title"))}),"saml_okta"===p&&(0,r.Y)(eE,{}),"saml_custom"===p&&(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlCustom.createApp.subtitle")})]}),"saml_okta"===p&&(0,r.Y)(eI,{}),(0,r.Y)(ea.l.ControlRow,{elementId:f.id,children:(0,r.Y)(ea.l.CommonInputWrapper,{...f.props,children:(0,r.Y)(ef.r,{value:g,readOnly:!0,copyIcon:e$.A,copiedIcon:x.A})})}),(0,r.Y)(ea.l.ControlRow,{elementId:h.id,children:(0,r.Y)(ea.l.CommonInputWrapper,{...h.props,children:(0,r.Y)(ef.r,{value:m,readOnly:!0,copyIcon:e$.A,copiedIcon:x.A})})}),"saml_okta"===p&&(0,r.Y)(ek,{})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>l(),isDisabled:a}),(0,r.Y)(j.Footer.Continue,{onClick:()=>o(),isDisabled:s})]})]})},eI=()=>(0,r.FD)(c.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.serviceProvider.title")}),(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.serviceProvider.paragraph1")}),(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.serviceProvider.paragraph2")})]}),eE=()=>(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.createApp.step1")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.createApp.step2")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.createApp.step3")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.createApp.step4")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.createApp.step5")})]}),ek=()=>(0,r.FD)(c.fv,{sx:e=>({gap:e.space.$1x5}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.completeSamlIntegration.title")}),(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOInstructionsList,as:"ul",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"disc"}),children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.completeSamlIntegration.step1")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.completeSamlIntegration.step2")})]})]}),eG=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:n}=k(),{provider:o}=Y(),l=o?eC[o]:void 0;return(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Body,{children:(0,r.FD)(j.Section,{sx:e=>({gap:e.space.$3}),children:["saml_custom"===o&&(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)("configureSSO.configureStep.samlCustom.configureAttributes.title")}),"saml_okta"===o&&(0,r.Y)(ew,{}),l&&(0,r.Y)(eR,{config:l})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(j.Footer.Continue,{onClick:()=>e(),isDisabled:n})]})]})},ew=()=>(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.configureAttributes.step1")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.configureAttributes.step2")})]}),eR=e=>{let{config:i}=e;return(0,r.FD)(c.XI,{elementDescriptor:v.$z.configureSSOAttributeMappingTable,sx:e=>({"tr > th:first-of-type":{paddingInlineStart:e.space.$4}}),children:[(0,r.Y)(c.d8,{children:(0,r.FD)(c.Tr,{children:[(0,r.Y)(c.Th,{children:(0,r.Y)(c.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:i.columns.first})}),(0,r.Y)(c.Th,{children:(0,r.Y)(c.EY,{sx:e=>({fontSize:e.fontSizes.$xs}),localizationKey:i.columns.second})})]})}),(0,r.Y)(c.NN,{children:i.rows.map(e=>(0,r.FD)(c.Tr,{children:[(0,r.Y)(c.Td,{children:(0,r.FD)(c.so,{as:"span",align:"center",sx:e=>({gap:e.space.$2}),children:[(0,r.Y)(c.EY,{as:"span",colorScheme:i.monoFirst?void 0:"secondary",sx:i.monoFirst?{fontFamily:"monospace"}:void 0,localizationKey:e.first}),(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOAttributeMappingBadge,elementId:v.$z.configureSSOAttributeMappingBadge.setId(e.isRequired?"required":"optional"),colorScheme:e.isRequired?"warning":"primary",localizationKey:(0,d.G)(e.isRequired?"configureSSO.configureStep.attributeMapping.badges.required":"configureSSO.configureStep.attributeMapping.badges.optional")})]})}),(0,r.Y)(c.Td,{children:(0,r.Y)(c.EY,{as:"span",sx:{fontFamily:"monospace"},localizationKey:e.second})})]},e.id))})]})},eT=()=>{let{goNext:e,goPrev:i,isFirstStep:t,isLastStep:n}=k(),{provider:o}=Y();return"saml_custom"===o?(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Body,{children:(0,r.FD)(j.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)("configureSSO.configureStep.samlCustom.assignUsers.title")}),(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlCustom.assignUsers.paragraph")})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(j.Footer.Continue,{onClick:()=>e(),isDisabled:n})]})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Body,{children:(0,r.FD)(j.Section,{sx:e=>({gap:e.space.$3}),children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.title")}),(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.paragraph")}),(0,r.FD)(c.fv,{elementDescriptor:v.$z.configureSSOInstructionsList,as:"ol",sx:e=>({gap:e.space.$1x5,margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal"}),children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.step1")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.step2")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.step3")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.step4")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOInstructionsListItem,as:"li",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.assignUsers.step5")})]})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>i(),isDisabled:t}),(0,r.Y)(j.Footer.Continue,{onClick:()=>e(),isDisabled:n})]})]})},eA=()=>{var e,i,t;let l=(0,u.f0)(),{t:a}=(0,y._)(),{goNext:s,goPrev:p,isFirstStep:S}=k(),{enterpriseConnection:g,updateEnterpriseConnection:m}=Y(),{key:f}=eO(),h=null==g?void 0:g.samlConnection,$=!!((null==h?void 0:h.idpSsoUrl)||(null==h?void 0:h.idpEntityId)||(null==h?void 0:h.idpCertificate)||(null==h?void 0:h.idpMetadataUrl)),D=!!(null==h?void 0:h.idpCertificate),[b,O]=o.useState($?"manual":"metadataUrl"),[z,x]=o.useState(null),C=(0,n.Wp)(o.useCallback(async e=>{if(!g)throw Error("Enterprise connection required");return m(g.id,e)},[g,m])),F=(0,eD.tJ)("idpMetadataUrl",null!=(e=null==h?void 0:h.idpMetadataUrl)?e:"",{type:"text",label:(0,d.G)(f("metadataUrl.label")),placeholder:(0,d.G)(f("metadataUrl.placeholder")),isRequired:!0}),I=(0,eD.tJ)("idpSsoUrl",null!=(i=null==h?void 0:h.idpSsoUrl)?i:"",{type:"text",label:(0,d.G)(f("manual.signOnUrl.label")),placeholder:(0,d.G)(f("manual.signOnUrl.placeholder")),isRequired:!0}),E=(0,eD.tJ)("idpEntityId",null!=(t=null==h?void 0:h.idpEntityId)?t:"",{type:"text",label:(0,d.G)(f("manual.issuer.label")),placeholder:(0,d.G)(f("manual.issuer.placeholder")),isRequired:!0}),G=(0,eD.tJ)("idpCertificate","",{type:"text",label:(0,d.G)(f("manual.signingCertificate.label")),isRequired:!0}),w=F.value.trim(),R=I.value.trim(),T=E.value.trim(),A=null!==z||D,_=!l.isLoading&&("metadataUrl"===b&&w.length>0||"manual"===b&&R.length>0&&T.length>0&&A),K=async()=>{if(g&&_){l.setError(void 0),l.setLoading();try{if("metadataUrl"===b)await C({saml:{idpMetadataUrl:w}});else{let e={idpSsoUrl:R,idpEntityId:T};null!==z&&(e.idpCertificate=await z.text()),await C({saml:e})}s()}catch(i){let e="metadataUrl"===b?[F]:[I,E,G];if((0,ei.H4)(i,e,l.setError),(0,em.$R)(i)){let e=i.errors.find(e=>{var i,t;return(null==(i=e.code)?void 0:i.startsWith("saml_"))&&!(null==(t=e.meta)?void 0:t.paramName)});e&&(("metadataUrl"===b?F:I).setError(e),l.setError(void 0))}}finally{l.setIdle()}}};return(0,r.FD)(r.FK,{children:[(0,r.Y)(j.Body,{children:(0,r.FD)(j.Section,{fill:!0,gap:5,children:[(0,r.Y)(c.DZ,{elementDescriptor:v.$z.configureSSOInstructionsHeading,as:"h3",textVariant:"subtitle",localizationKey:(0,d.G)(f("submitSamlConfig.title"))}),(0,r.FD)(eY.I.Root,{"aria-label":a((0,d.G)(f("modes.ariaLabel"))),value:b,onChange:e=>{l.setError(void 0),O(e)},fullWidth:!0,children:[(0,r.Y)(eY.I.Button,{value:"metadataUrl",text:(0,d.G)(f("modes.metadataUrl"))}),(0,r.Y)(eY.I.Button,{value:"manual",text:(0,d.G)(f("modes.manual"))})]}),"metadataUrl"===b?(0,r.Y)(e_,{field:F}):(0,r.Y)(eK,{signOnUrlField:I,issuerField:E,certFileField:G,certFile:z,setCertFile:x,existingCertPresent:D})]})}),(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>p(),isDisabled:S||l.isLoading}),(0,r.Y)(j.Footer.Continue,{onClick:K,isLoading:l.isLoading,isDisabled:!_})]})]})},e_=e=>{let{field:i}=e,{key:t}=eO();return(0,r.FD)(r.FK,{children:[(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)(t("metadataUrl.description"))}),(0,r.Y)(ea.l.ControlRow,{elementId:i.id,children:(0,r.Y)(ea.l.PlainInput,{...i.props})})]})},eK=e=>{let{signOnUrlField:i,issuerField:t,certFileField:n,certFile:l,setCertFile:a,existingCertPresent:s}=e,{t:u}=(0,y._)(),p=o.useRef(null),{key:S}=eO();return(0,r.FD)(r.FK,{children:[(0,r.Y)(c.EY,{as:"p",colorScheme:"secondary",localizationKey:(0,d.G)(S("manual.description"))}),(0,r.Y)(ea.l.ControlRow,{elementId:i.id,children:(0,r.Y)(ea.l.PlainInput,{...i.props})}),(0,r.Y)(ea.l.ControlRow,{elementId:t.id,children:(0,r.Y)(ea.l.PlainInput,{...t.props})}),(0,r.Y)(c.az,{children:(0,r.FD)(eh.D.Root,{...n.props,children:[(0,r.FD)(c.fv,{gap:2,children:[(0,r.Y)(eh.D.LabelRow,{children:(0,r.Y)(eh.D.Label,{})}),(0,r.Y)("input",{ref:p,type:"file",accept:".pem,.key,.crt,.cer,.cert",multiple:!1,style:{display:"none"},onChange:e=>{var i,t;a(null!=(i=null==(t=e.target.files)?void 0:t[0])?i:null),n.clearFeedback()}}),null===l?(0,r.FD)(c.so,{align:"center",gap:2,sx:{alignSelf:"flex-start",flexWrap:"wrap"},children:[s&&(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOCertificateFileBadge,localizationKey:(0,d.G)("configureSSO.configureStep.samlOkta.manual.signingCertificate.fileUploaded")}),(0,r.FD)(c.$n,{elementDescriptor:v.$z.configureSSOCertificateUploadButton,size:"xs",variant:"outline",onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},children:[(0,r.Y)(c.In,{icon:ey.A,size:"sm",colorScheme:"neutral",sx:e=>({marginInlineEnd:e.space.$1})}),(0,r.Y)(c.EY,{as:"span",localizationKey:(0,d.G)(s?"configureSSO.configureStep.samlOkta.manual.signingCertificate.replaceFile":"configureSSO.configureStep.samlOkta.manual.signingCertificate.uploadFile")})]})]}):(0,r.FD)(c.so,{align:"center",gap:2,sx:e=>({paddingTop:e.space.$1,paddingBottom:e.space.$1}),children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOCertificateFileName,as:"span",colorScheme:"secondary",variant:"buttonSmall",children:l.name}),(0,r.Y)(c.$n,{elementDescriptor:v.$z.configureSSOCertificateRemoveButton,variant:"ghost",colorScheme:"neutral","aria-label":u((0,d.G)("configureSSO.configureStep.samlOkta.manual.signingCertificate.removeFile")),onClick:()=>{a(null),n.clearFeedback(),p.current&&(p.current.value="")},sx:e=>({padding:e.space.$1}),children:(0,r.Y)(c.In,{icon:ev.A,size:"xs"})})]})]}),(0,r.Y)(eh.D.Feedback,{})]})})]})};t(86449);var eL=t(68749),eP=t(4874),eB=t(59792),eW=t(9982),eV=t(58087),eU=t(38426),eM=t(54657),eN=t(69154);t(96954),t(50260);var eH=t(70408);let ej={saml_user_attribute_missing:{kind:"steps",introKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.intro"),stepKeys:[(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step1"),(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step2"),(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_user_attribute_missing.step3")]},saml_response_relaystate_missing:{kind:"description",descriptionKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_response_relaystate_missing.description")},saml_email_address_domain_mismatch:{kind:"description",descriptionKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.saml_email_address_domain_mismatch.description")},oauth_access_denied:{kind:"description",descriptionKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_access_denied.description")},oauth_token_exchange_error:{kind:"description",descriptionKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_token_exchange_error.description")},oauth_fetch_user_error:{kind:"steps",introKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.intro"),stepKeys:[(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step1"),(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.oauth_fetch_user_error.step2")]}},eq=e=>{let{errorCode:i}=e;if(!i)return null;let t=ej[i];if(!t)return null;let n="".concat("https://clerk.com/docs/guides/organizations/add-members/sso","#").concat(i.replaceAll("_","-"));return(0,r.FD)(c.so,{elementDescriptor:v.$z.configureSSOTestRunHowToFixSection,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(c.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.sectionTitle")}),(0,r.FD)(c.az,{sx:e=>({padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow}),children:[(0,r.Y)(eZ,{content:t}),(0,r.FD)(c.N_,{elementDescriptor:v.$z.configureSSOTestRunHowToFixDocsLink,href:n,target:"_blank",rel:"noopener noreferrer",sx:e=>({alignSelf:"flex-start",display:"inline-flex",alignItems:"center",gap:e.space.$1x5,paddingBlock:e.space.$1,paddingInline:e.space.$3,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,color:e.colors.$colorForeground,fontSize:e.fontSizes.$sm,fontWeight:e.fontWeights.$medium,textDecoration:"none",marginTop:e.space.$2,"&:hover":{backgroundColor:e.colors.$neutralAlpha50,textDecoration:"none"}}),children:[(0,r.Y)(c.L9,{localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.howToFix.actionLabel__viewDocumentation")}),(0,r.Y)(c.In,{icon:eH.A,size:"sm"})]})]})]})},eZ=e=>{let{content:i}=e;return"description"===i.kind?(0,r.Y)(c.EY,{colorScheme:"secondary",localizationKey:i.descriptionKey}):(0,r.FD)(c.so,{direction:"col",gap:2,children:[i.introKey?(0,r.Y)(c.EY,{colorScheme:"secondary",localizationKey:i.introKey}):null,(0,r.Y)(c.az,{as:"ol",sx:e=>({margin:0,paddingInlineStart:e.space.$5,listStyleType:"decimal",display:"flex",flexDirection:"column",gap:e.space.$1}),children:i.stepKeys.map(e=>(0,r.Y)(c.az,{as:"li",sx:e=>({color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm,"&::marker":{color:e.colors.$colorMutedForeground,fontSize:e.fontSizes.$sm}}),children:(0,r.Y)(c.EY,{as:"span",colorScheme:"secondary",localizationKey:e})},e.key))})]})},eJ=()=>{var e;let{goNext:i,goPrev:t}=k(),{enterpriseConnection:l}=Y(),a=(0,u.f0)(),[p,S]=(0,o.useState)(1),{data:g,totalCount:m,isLoading:f,isFetching:h,isPolling:$,revalidate:y}=(0,n.ND)({enterpriseConnectionId:null!=(e=null==l?void 0:l.id)?e:null,params:{initialPage:p,pageSize:5}}),D=(0,eW.P)(h&&!f),b=m?Math.ceil(m/5):0;return(0,r.Y)(s.n.Part,{part:"testSso",children:(0,r.FD)(j,{elementDescriptor:v.$z.configureSSOStep,elementId:v.$z.configureSSOStep.setId("test"),children:[(0,r.Y)(j.Header,{title:(0,d.G)("configureSSO.testConfigurationStep.title")}),(0,r.FD)(j.Body,{children:[(0,r.Y)(j.Section,{sx:e=>({borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,r.FD)(c.fv,{gap:3,children:[(0,r.Y)(c.EY,{as:"p",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.subtitle")}),(0,r.Y)(e8,{onTestRunCreated:()=>{S(1),y()}})]})}),(0,r.FD)(j.Section,{sx:e=>({flex:1,minHeight:0,gap:e.space.$3}),children:[(0,r.FD)(c.so,{align:"center",justify:"between",sx:e=>({gap:e.space.$2,flexShrink:0}),children:[(0,r.Y)(c.EY,{variant:"subtitle",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.title")}),(0,r.FD)(c.$n,{elementDescriptor:v.$z.configureSSOTestRefreshButton,variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>void y(),isDisabled:D,sx:e=>({gap:e.space.$1x5}),children:[D?(0,r.Y)(c.y$,{elementDescriptor:v.$z.spinner,size:"xs"}):(0,r.Y)(c.In,{icon:eU.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(c.EY,{as:"span",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.actionLabel__refresh")})]})]}),(0,r.Y)(c.fv,{sx:{flex:1,minHeight:0},children:(0,r.Y)(eQ,{rows:null!=g?g:[],isPolling:$,isLoading:f,page:p,pageCount:b,pageSize:5,totalCount:null!=m?m:0,onPageChange:S})})]})]}),a.error?(0,r.Y)(c.az,{elementDescriptor:v.$z.configureSSOTestError,sx:e=>({flexShrink:0,paddingInline:e.space.$5,paddingBlock:e.space.$3,borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100}),children:(0,r.Y)(c.EY,{as:"p",variant:"body",sx:e=>({color:e.colors.$danger500,fontSize:e.fontSizes.$sm}),children:a.error})}):null,(0,r.FD)(j.Footer,{children:[(0,r.Y)(j.Footer.Previous,{onClick:()=>t()}),(0,r.Y)(eX,{enterpriseConnectionId:null==l?void 0:l.id,onContinue:()=>void i()})]})]})})},eX=e=>{let{enterpriseConnectionId:i,onContinue:t}=e,{user:l}=(0,n.Jd)(),{t:a}=(0,y._)(),s=(0,u.f0)(),[c,p]=(0,o.useState)(!1),S=async()=>{if(l&&i){p(!0),s.setError(void 0);try{(await l.getEnterpriseConnectionTestRuns(i,{initialPage:1,pageSize:1,status:["success"]})).data.length>0?t():s.setError(a((0,d.G)("configureSSO.testConfigurationStep.error__noSuccessfulTestRun")))}catch(e){(0,ei.H4)(e,[],s.setError)}finally{p(!1)}}};return(0,r.Y)(j.Footer.Continue,{onClick:()=>void S(),isLoading:c})},eQ=e=>{var i,t;let{rows:n,isLoading:l,isPolling:a,page:s,pageCount:u,pageSize:p,totalCount:S,onPageChange:g}=e,{t:m}=(0,y._)(),{contentRef:f}=Y(),[h,$]=(0,o.useState)(null),b=(null==h?void 0:h.status)==="failed"&&(null==(t=h.logs)||null==(i=t[0])?void 0:i.shortMessage)||m((0,d.G)("configureSSO.testConfigurationStep.testRunDetails.title"));return(0,r.FD)(r.FK,{children:[(0,r.Y)(c.so,{direction:"col",sx:e=>({width:"100%",flex:"0 1 auto",minHeight:0,overflowY:"auto",borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$lg,...D.s.unstyledScrollbar(e),[K.g.sm]:{overflowX:"auto",padding:e.space.$0x25}}),children:(0,r.FD)(c.XI,{elementDescriptor:v.$z.configureSSOTestResultsTable,tableHeadVisuallyHidden:!n.length,sx:e=>({background:e.colors.$colorBackground,"&&":{border:"none",borderRadius:0}}),children:[(0,r.Y)(c.d8,{children:(0,r.FD)(c.Tr,{children:[(0,r.Y)(c.Th,{localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp")}),(0,r.Y)(c.Th,{localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.Y)(c.Th,{localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status")})]})}),(0,r.Y)(c.NN,{children:l||a?(0,r.Y)(c.Tr,{children:(0,r.Y)(c.Td,{colSpan:3,children:(0,r.FD)(c.so,{direction:"col",align:"center",gap:2,sx:e=>({padding:"".concat(e.space.$10," 0")}),children:[(0,r.Y)(c.y$,{colorScheme:"primary",elementDescriptor:v.$z.configureSSOTestResultsLoadingSpinner}),(0,r.Y)(c.EY,{colorScheme:"secondary",localizationKey:a?(0,d.G)("configureSSO.testConfigurationStep.testResults.polling"):void 0})]})})}):n.length?n.map(e=>(0,r.FD)(c.Tr,{elementDescriptor:v.$z.configureSSOTestResultsRow,onClick:()=>$(e),sx:e=>({cursor:"pointer","&:hover > td":{backgroundColor:e.colors.$neutralAlpha50}}),children:[(0,r.Y)(c.Td,{children:(0,r.Y)(e1,{testRun:e})}),(0,r.Y)(c.Td,{children:(0,r.Y)(e9,{testRun:e})}),(0,r.Y)(c.Td,{children:(0,r.Y)(e6,{testRun:e})})]},e.id)):(0,r.Y)(c.Tr,{children:(0,r.Y)(c.Td,{colSpan:3,children:(0,r.FD)(c.so,{elementDescriptor:v.$z.configureSSOTestResultsEmpty,direction:"col",align:"center",justify:"center",sx:e=>({padding:"".concat(e.space.$10," 0"),flex:1,gap:e.space.$1,textAlign:"center"}),children:[(0,r.Y)(c.EY,{variant:"subtitle",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.empty.title")}),(0,r.Y)(c.EY,{colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.empty.subtitle")})]})})})})]})}),u>1?(0,r.Y)(c.az,{sx:{flexShrink:0},children:(0,r.Y)(eB.d,{page:Math.min(s,u),count:u,onChange:g,siblingCount:1,rowInfo:{allRowsCount:S,startingRow:S>0?Math.max(0,(s-1)*p)+1:0,endingRow:Math.min(s*p,S)}})}):null,(0,r.FD)(eL.Drawer.Root,{open:null!==h,onOpenChange:e=>{e||$(null)},strategy:"absolute",portalProps:{root:f},children:[(0,r.Y)(eL.Drawer.Overlay,{}),(0,r.FD)(eL.Drawer.Content,{children:[(0,r.Y)(eL.Drawer.Header,{title:b}),h?(0,r.Y)(e3,{testRun:h}):null]})]})]})},e0=e=>{let{locale:i}=(0,y._)();return e.createdAt?{time:new Intl.DateTimeFormat(i,{timeStyle:"medium"}).format(e.createdAt),day:new Intl.DateTimeFormat(i,{month:"short",day:"numeric"}).format(e.createdAt)}:null},e1=e=>{let{testRun:i}=e,t=e0(i);return t?(0,r.FD)(c.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(c.EY,{children:t.time}),(0,r.Y)(c.EY,{colorScheme:"secondary",children:t.day})]}):null},e5=e=>{let{title:i,children:t}=e;return(0,r.FD)(c.az,{as:"div",sx:e=>({display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:e.space.$2}),children:[(0,r.Y)(c.Dt,{localizationKey:i,sx:e=>({color:e.colors.$colorForeground,...D.s.textVariants(e).subtitle})}),(0,r.Y)(c.Dd,{sx:e=>({display:"grid",justifyContent:"end",color:e.colors.$colorForeground}),children:t})]})},e3=e=>{var i;let{testRun:t}=e,n=e0(t),o="failed"===t.status?null==(i=t.logs)?void 0:i[0]:null;return(0,r.FD)(eL.Drawer.Body,{sx:e=>({display:"flex",flexDirection:"column",flex:1,overflowY:"auto",padding:e.space.$4,gap:e.space.$4}),children:[(0,r.Y)(c.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.sectionTitle")}),(0,r.FD)(c.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[n?(0,r.Y)(e5,{title:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.timestamp"),children:(0,r.FD)(c.so,{gap:2,align:"baseline",sx:{whiteSpace:"nowrap"},children:[(0,r.Y)(c.EY,{children:n.time}),(0,r.Y)(c.EY,{colorScheme:"secondary",children:n.day})]})}):null,"failed"===t.status?(null==o?void 0:o.code)?(0,r.Y)(e5,{title:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.errorCode"),children:(0,r.Y)(c.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:o.code})}):null:(0,r.Y)(e5,{title:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.status"),children:(0,r.Y)(e6,{testRun:t})})]}),"failed"===t.status&&(null==o?void 0:o.message)?(0,r.Y)(e4,{message:o.message}):null,"failed"===t.status?(0,r.Y)(eq,{errorCode:null==o?void 0:o.code}):null,"success"===t.status?(0,r.Y)(e2,{parsedUserInfo:t.parsedUserInfo}):null]})},e2=e=>{let{parsedUserInfo:i}=e;return(null==i?void 0:i.emailAddress)||(null==i?void 0:i.firstName)?(0,r.FD)(c.so,{elementDescriptor:v.$z.configureSSOTestRunParsedUserInfo,direction:"col",gap:3,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,paddingTop:e.space.$4}),children:[(0,r.Y)(c.DZ,{as:"h3",textVariant:"h3",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.sectionTitle")}),(0,r.FD)(c.Dl,{sx:e=>({display:"grid",gridRowGap:e.space.$2}),children:[i.emailAddress?(0,r.Y)(e5,{title:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.email"),children:(0,r.Y)(c.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:i.emailAddress})}):null,i.firstName?(0,r.Y)(e5,{title:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.parsedUserInfo.firstName"),children:(0,r.Y)(c.EY,{sx:e=>({fontFamily:e.fonts.$mono}),children:i.firstName})}):null]})]}):null},e4=e=>{let{message:i}=e,{t}=(0,y._)(),{onCopy:n,hasCopied:o}=(0,eV.i)(i),l=t((0,d.G)(o?"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copied":"configureSSO.testConfigurationStep.testRunDetails.runDetails.actionLabel__copy"));return(0,r.FD)(c.so,{direction:"col",gap:2,children:[(0,r.FD)(c.so,{justify:"between",align:"center",gap:4,children:[(0,r.Y)(c.EY,{colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testRunDetails.runDetails.fullMessage")}),(0,r.Y)(eP.K,{elementDescriptor:v.$z.configureSSOTestRunFullMessageCopyButton,variant:"ghost",colorScheme:"neutral",size:"xs",icon:o?x.A:eM.A,"aria-label":l,onClick:()=>n()})]}),(0,r.Y)(c.az,{elementDescriptor:v.$z.configureSSOTestRunFullMessage,as:"pre",sx:e=>({margin:0,padding:e.space.$3,backgroundColor:e.colors.$colorBackground,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$md,boxShadow:e.shadows.$cardContentShadow,fontFamily:e.fonts.$mono,fontSize:e.fontSizes.$sm,color:e.colors.$colorForeground,whiteSpace:"pre-wrap",wordBreak:"break-word"}),children:i})]})},e9=e=>{var i,t,n;let{testRun:o}=e;return"pending"===o.status?(0,r.Y)(c.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(c.EY,{children:"-"})}):"success"===o.status?(0,r.Y)(c.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(c.EY,{children:null==(n=o.parsedUserInfo)?void 0:n.emailAddress})}):(0,r.Y)(c.so,{sx:e=>({fontFamily:e.fonts.$mono}),children:(0,r.Y)(c.EY,{children:null==(t=o.logs)||null==(i=t[0])?void 0:i.shortMessage})})},e6=e=>{let{testRun:i}=e;return"success"===i.status?(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOTestRunStatusBadge,elementId:v.$z.configureSSOTestRunStatusBadge.setId("success"),colorScheme:"success",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.status__success")}):"failed"===i.status?(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOTestRunStatusBadge,elementId:v.$z.configureSSOTestRunStatusBadge.setId("failed"),colorScheme:"danger",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.status__failed")}):(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOTestRunStatusBadge,elementId:v.$z.configureSSOTestRunStatusBadge.setId("pending"),colorScheme:"warning",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testResults.status__pending")})},e8=e=>{let{onTestRunCreated:i}=e,{user:t}=(0,n.Jd)(),l=(0,u.f0)(),{enterpriseConnection:a}=Y(),[s,p]=(0,o.useState)(!1);return(0,r.FD)(c.$n,{elementDescriptor:v.$z.configureSSOTestUrlOpenButton,id:"testSsoUrl",variant:"bordered",colorScheme:"secondary",size:"xs",onClick:()=>{t&&a&&(p(!0),t.createEnterpriseConnectionTestRun(a.id).then(e=>{let{url:t}=e;null==i||i(t),window.open(t,"_blank","noopener,noreferrer")}).catch(e=>(0,ei.H4)(e,[],l.setError)).finally(()=>p(!1)))},isDisabled:s,sx:e=>({gap:e.space.$1x5,width:"fit-content"}),children:[s?(0,r.Y)(c.y$,{elementDescriptor:v.$z.spinner,size:"sm"}):(0,r.Y)(c.In,{icon:eN.A,size:"sm",colorScheme:"neutral"}),(0,r.Y)(c.EY,{as:"span",localizationKey:(0,d.G)("configureSSO.testConfigurationStep.testUrl.actionLabel__open")})]})};var e7=t(704),ie=t(3662),ii=t(46600),it=t(5870),ir=t(86516),io=t(89297);let il=()=>(0,r.Y)(s.n.Part,{part:"ssoConfirmation",children:(0,r.FD)(j,{elementDescriptor:v.$z.configureSSOStep,elementId:v.$z.configureSSOStep.setId("confirmation"),children:[(0,r.FD)(j.Body,{sx:e=>({paddingInline:e.space.$8,paddingBlock:e.space.$4}),children:[(0,r.Y)(ia,{}),(0,r.Y)(is,{}),(0,r.Y)(ic,{}),(0,r.Y)(id,{}),(0,r.Y)(iS,{})]}),(0,r.Y)(j.Footer,{})]})}),ia=()=>{let{enterpriseConnection:e}=Y(),i=!!(null==e?void 0:e.active);return(0,r.Y)(ir.rd.Root,{title:(0,d.G)("configureSSO.confirmation.statusSection.title"),id:"ssoStatus",sx:{border:0},children:(0,r.Y)(c.so,{justify:"start",children:(0,r.Y)(c.Ex,{elementDescriptor:v.$z.configureSSOConfirmationStatusBadge,elementId:v.$z.configureSSOConfirmationStatusBadge.setId(i?"active":"inactive"),colorScheme:i?"success":"danger",localizationKey:i?(0,d.G)("configureSSO.confirmation.statusSection.activeBadge"):(0,d.G)("configureSSO.confirmation.statusSection.inactiveBadge")})})})},is=()=>{let{enterpriseConnection:e,updateEnterpriseConnection:i}=Y(),t=(0,u.f0)(),[l,a]=(0,o.useState)(!!(null==e?void 0:e.active)),s=(0,n.Wp)((e,t)=>i(e,{active:t})),c=async i=>{if(!t.isLoading){t.setError(void 0),t.setLoading(),a(i);try{let t=await s(e.id,i);t&&a(t.active)}catch(e){a(!i),(0,ei.H4)(e,[],t.setError)}finally{t.setIdle()}}};return(0,r.Y)(ir.rd.Root,{title:(0,d.G)("configureSSO.confirmation.enableSection.title"),id:"enableSso",sx:e=>({border:0,paddingBlock:e.space.$2}),children:(0,r.Y)(io.d,{isChecked:l,isDisabled:t.isLoading,onChange:e=>void c(e),"aria-label":"Enable SSO"})})},ic=()=>{var e;let{enterpriseConnection:i}=Y(),t=null==i||null==(e=i.domains)?void 0:e[0];return t?(0,r.Y)(ir.rd.Root,{title:(0,d.G)("configureSSO.confirmation.domainSection.title"),id:"ssoDomain",sx:{border:0},children:(0,r.Y)(c.N_,{elementDescriptor:v.$z.configureSSOConfirmationDomainLink,href:"https://".concat(t),isExternal:!0,title:t,sx:{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textDecoration:"underline"},children:t})}):null},id=()=>{var e;let{enterpriseConnection:i}=Y(),{goToStep:t}=k(),n=null==i?void 0:i.samlConnection;return(0,r.Y)(ir.rd.Root,{title:(0,d.G)("configureSSO.confirmation.configurationSection.title"),id:"ssoConfiguration",centered:!1,children:(0,r.FD)(c.fv,{gap:3,children:[(0,r.FD)(c.xA,{gap:3,sx:{width:"100%",alignItems:"center",gridTemplateColumns:"150px minmax(0, 1fr)"},children:[(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOConfirmationConfigDetailsLabel,colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.confirmation.configurationSection.ssoUrlLabel")}),(0,r.Y)(c.N_,{elementDescriptor:v.$z.configureSSOConfirmationConfigDetailsLink,href:null!=(e=null==n?void 0:n.idpSsoUrl)?e:"",isExternal:!0,title:null==n?void 0:n.idpSsoUrl,sx:{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:null==n?void 0:n.idpSsoUrl}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOConfirmationConfigDetailsLabel,colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.confirmation.configurationSection.issuerLabel")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOConfirmationConfigDetailsValue,truncate:!0,title:null==n?void 0:n.idpEntityId,children:null==n?void 0:n.idpEntityId}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOConfirmationConfigDetailsLabel,colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.confirmation.configurationSection.certificateLabel")}),(0,r.Y)(c.EY,{elementDescriptor:v.$z.configureSSOConfirmationConfigDetailsValue,truncate:!0,title:null==n?void 0:n.idpCertificate,children:null==n?void 0:n.idpCertificate})]}),(0,r.Y)(c.so,{justify:"start",sx:e=>({marginTop:e.space.$2,paddingInlineStart:0,marginInline:"-10px"}),children:(0,r.Y)(ir.rd.Button,{elementDescriptor:v.$z.configureSSOConfirmationReconfigureButton,id:"configureAgain",onClick:()=>t("configure"),variant:"ghost",colorScheme:"primary",localizationKey:(0,d.G)("configureSSO.confirmation.configurationSection.configureAgainLink")})})]})})},iu=(0,u.dm)(e=>{var i;let{onReset:t,onSuccess:o}=e,l=(0,u.f0)(),{enterpriseConnection:a,deleteEnterpriseConnection:s}=Y(),{goToStep:p}=k(),S=(0,n.Wp)(e=>s(e)),g=(0,eD.tJ)("deleteConfirmation","",{type:"text",label:(0,d.G)("configureSSO.confirmation.resetSection.confirmationFieldLabel",{name:null!=(i=null==a?void 0:a.name)?i:""}),isRequired:!0,placeholder:null==a?void 0:a.name}),m=!!((null==a?void 0:a.name)&&g.value===a.name),f=async()=>{if(a&&m)try{await S(a.id),o(),await p("select-provider")}catch(e){(0,ei.H4)(e,[g],l.setError)}};return(0,r.Y)(it.M,{headerTitle:(0,d.G)("configureSSO.confirmation.resetSection.title"),sx:e=>({gap:e.space.$0x5}),children:(0,r.FD)(ea.l.Root,{onSubmit:f,children:[(0,r.Y)(c.fv,{gap:1,children:(0,r.Y)(c.EY,{colorScheme:"danger",localizationKey:(0,d.G)("configureSSO.confirmation.resetSection.warning")})}),(0,r.Y)(ea.l.ControlRow,{elementId:g.id,children:(0,r.Y)(ea.l.PlainInput,{...g.props,ignorePasswordManager:!0})}),(0,r.Y)(ii.G,{submitLabel:(0,d.G)("configureSSO.confirmation.resetSection.submitButton"),colorScheme:"danger",isDisabled:!m,onReset:t})]})})}),ip=()=>{let{close:e}=(0,ie.D5)();return(0,r.Y)(iu,{onSuccess:e,onReset:e})},iS=()=>(0,r.Y)(ir.rd.Root,{title:(0,d.G)("configureSSO.confirmation.resetSection.title"),id:"resetSso",sx:{alignItems:"center",[K.g.md]:{alignItems:"flex-start"}},children:(0,r.FD)(e7.r.Root,{children:[(0,r.Y)(e7.r.Closed,{value:"reset",children:(0,r.Y)(ir.rd.Item,{id:"resetSso",sx:{paddingInlineStart:0,marginInline:"-10px"},children:(0,r.Y)(e7.r.Trigger,{value:"reset",children:(0,r.Y)(ir.rd.Button,{elementDescriptor:v.$z.configureSSOConfirmationResetButton,id:"resetSso",variant:"ghost",colorScheme:"danger",localizationKey:(0,d.G)("configureSSO.confirmation.resetSection.title")})})})}),(0,r.Y)(e7.r.Open,{value:"reset",children:(0,r.Y)(e7.r.Card,{variant:"destructive",children:(0,r.Y)(ip,{})})})]})}),ig=(0,a.G)(()=>{let e=o.useRef(null);return(0,r.Y)(p.a.Root,{sx:e=>({display:"grid",gridTemplateColumns:"1fr 3fr",height:e.sizes.$176,overflow:"hidden"}),children:(0,r.Y)(L,{contentRef:e,children:(0,r.Y)(im,{contentRef:e})})})}),im=e=>{let{contentRef:i}=e,{data:t,isLoading:o,createEnterpriseConnection:l,updateEnterpriseConnection:a,deleteEnterpriseConnection:s}=(0,n.bm)({enabled:!0}),c=null==t?void 0:t[0],{hasSuccessfulTestRun:d,isLoading:u}=iv(c);return o||u?(0,r.Y)(q,{}):(0,r.Y)(iY,{children:(0,r.Y)(h,{hasSuccessfulTestRun:d,enterpriseConnection:c,contentRef:i,createEnterpriseConnection:l,updateEnterpriseConnection:a,deleteEnterpriseConnection:s,children:(0,r.Y)(ih,{})})})},ih=()=>{let{initialStepId:e,enterpriseConnection:i}=Y();return(0,r.FD)(X,{initialStepId:e,children:[(0,r.Y)(iy,{}),(0,r.Y)(G,{}),!i&&(0,r.Y)(X.Step,{id:"select-provider",children:(0,r.Y)(en,{})}),(0,r.Y)(X.Step,{id:"verify-domain",label:"Verify domain",children:(0,r.Y)(ec,{})}),(0,r.Y)(X.Step,{id:"configure",label:"Configure",children:(0,r.Y)(ez,{})}),(0,r.Y)(X.Step,{id:"test",label:"Test",children:(0,r.Y)(eJ,{})}),(0,r.Y)(X.Step,{id:"confirmation",label:"Confirmation",children:(0,r.Y)(il,{})})]})},iY=e=>{let{children:i}=e,{session:t}=(0,n.wV)(),o=!(null==t?void 0:t.lastActiveOrganizationId);return(0,l.Fd)(e=>o||e({permission:"org:sys_entconns:manage"}))?i:(0,r.Y)(i$,{})},i$=()=>(0,r.FD)(r.FK,{children:[(0,r.Y)(b,{}),(0,r.Y)(j.Body,{children:(0,r.Y)(j.Section,{sx:{flex:1},align:"center",justify:"center",children:(0,r.Y)(c.so,{align:"center",justify:"center",sx:e=>({flex:1,padding:e.space.$8}),children:(0,r.FD)(c.fv,{align:"center",sx:e=>({gap:e.space.$2,textAlign:"center",maxWidth:e.sizes.$94}),children:[(0,r.Y)(c.In,{icon:S.A,sx:e=>({width:e.sizes.$8,height:e.sizes.$8,color:e.colors.$neutralAlpha600})}),(0,r.Y)(c.DZ,{localizationKey:(0,d.G)("configureSSO.missingManageEnterpriseConnectionsPermission.title"),textVariant:"h1",sx:e=>({fontSize:e.fontSizes.$lg,textWrap:"balance"})}),(0,r.Y)(c.EY,{as:"p",variant:"body",colorScheme:"secondary",localizationKey:(0,d.G)("configureSSO.missingManageEnterpriseConnectionsPermission.subtitle"),sx:{textWrap:"balance"}})]})})})}),(0,r.Y)(O,{})]}),iy=()=>{let{currentStep:e}=k(),i=(0,u.f0)(),t=o.useRef(null==e?void 0:e.id);return o.useEffect(()=>{t.current!==(null==e?void 0:e.id)&&(t.current=null==e?void 0:e.id,i.setError(void 0))},[null==e?void 0:e.id,i]),null},iv=e=>{var i,t;let{data:r,isLoading:o}=(0,n.ND)({enterpriseConnectionId:null!=(i=null==e?void 0:e.id)?i:null,params:{initialPage:1,pageSize:1,status:["success"]}});return{hasSuccessfulTestRun:(null!=(t=null==r?void 0:r.length)?t:0)>0,isLoading:o}},iD=(0,u.dm)(()=>(0,r.Y)(s.n.Root,{flow:"configureSSO",children:(0,r.Y)(g.d,{children:(0,r.Y)(m.q,{children:(0,r.Y)(ig,{})})})}))}}]);
|