@clerk/ui 1.0.0-snapshot.v20251217194100 → 1.0.0-snapshot.v20251218165926
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/573_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/ClerkUi.js +2 -2
- package/dist/common/WalletInitialIcon.js +36 -0
- package/dist/common/WalletInitialIcon.js.map +1 -0
- package/dist/components/OrganizationProfile/MemberListTable.js +3 -1
- package/dist/components/OrganizationProfile/MemberListTable.js.map +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js +50 -21
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js.map +1 -1
- package/dist/components/SignIn/AlternativeMethods.js +1 -1
- package/dist/components/SignIn/SignInFactorOneSolanaWalletsCard.js +79 -0
- package/dist/components/SignIn/SignInFactorOneSolanaWalletsCard.js.map +1 -0
- package/dist/components/SignIn/SignInSocialButtons.js +2 -1
- package/dist/components/SignIn/SignInSocialButtons.js.map +1 -1
- package/dist/components/SignIn/index.js +5 -0
- package/dist/components/SignIn/index.js.map +1 -1
- package/dist/components/SignUp/SignUpSocialButtons.js +2 -1
- package/dist/components/SignUp/SignUpSocialButtons.js.map +1 -1
- package/dist/components/SignUp/SignUpStartSolanaWalletsCard.js +79 -0
- package/dist/components/SignUp/SignUpStartSolanaWalletsCard.js.map +1 -0
- package/dist/components/SignUp/index.js +5 -0
- package/dist/components/SignUp/index.js.map +1 -1
- package/dist/components/UserProfile/Web3Form.js +62 -41
- package/dist/components/UserProfile/Web3Form.js.map +1 -1
- package/dist/components/UserProfile/Web3Section.js +1 -1
- package/dist/components/UserProfile/Web3Section.js.map +1 -1
- package/dist/components/UserProfile/Web3SelectSolanaWalletScreen.js +73 -0
- package/dist/components/UserProfile/Web3SelectSolanaWalletScreen.js.map +1 -0
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js +173 -110
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js.map +1 -1
- package/dist/customizables/elementDescriptors.js +10 -1
- package/dist/customizables/elementDescriptors.js.map +1 -1
- package/dist/elements/Web3SolanaWalletButtons.js +182 -0
- package/dist/elements/Web3SolanaWalletButtons.js.map +1 -0
- package/dist/elements/contexts/index.js.map +1 -1
- package/dist/{enableOrganizationsPrompt_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → enableOrganizationsPrompt_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +108 -22
- package/dist/index.js +1 -1
- package/dist/internal/appearance.d.ts +9 -0
- package/dist/internal/appearance.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/lazyModules/components.d.ts +20 -20
- package/dist/lazyModules/components.d.ts.map +1 -1
- package/dist/sessionTasks_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/signin_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/signup_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/taskChooseOrganization_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/taskResetPassword_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/themes/shadcn.js +2 -2
- package/dist/themes/shadcn.js.map +1 -1
- package/dist/ui-common_ui_17c90e_1.0.0-snapshot.v20251218165926.js +139 -0
- package/dist/ui.browser.js +3 -3
- package/dist/{userprofile_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → userprofile_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +2 -2
- package/dist/utils/web3CallbackErrorHandler.js +1 -1
- package/dist/utils/web3CallbackErrorHandler.js.map +1 -1
- package/dist/vendors_ui_17c90e_1.0.0-snapshot.v20251218165926.js +20 -0
- package/dist/web3-solana-wallet-buttons_ui_17c90e_1.0.0-snapshot.v20251218165926.js +143 -0
- package/package.json +10 -4
- package/dist/573_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/sessionTasks_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/signin_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/signup_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/taskChooseOrganization_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/taskResetPassword_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -1
- package/dist/ui-common_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -139
- package/dist/vendors_ui_cc41a8_1.0.0-snapshot.v20251217194100.js +0 -20
- /package/dist/{207_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 207_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{217_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 217_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{360_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 360_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{444_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 444_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{970_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → 970_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{apiKeys_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → apiKeys_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{blankcaptcha_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → blankcaptcha_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{checkout_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → checkout_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → copy-api-key-modal_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{createorganization_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → createorganization_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{framework_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → framework_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{impersonationfab_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → impersonationfab_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{keylessPrompt_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → keylessPrompt_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{oauthConsent_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → oauthConsent_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{onetap_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → onetap_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{op-api-keys-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → op-api-keys-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{op-billing-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → op-billing-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{op-plans-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → op-plans-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{organizationlist_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → organizationlist_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{organizationprofile_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → organizationprofile_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{organizationswitcher_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → organizationswitcher_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{payment-attempt-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → payment-attempt-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{planDetails_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → planDetails_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → prefetchorganizationlist_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{pricingTable_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → pricingTable_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → revoke-api-key-modal_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{statement-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → statement-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{subscriptionDetails_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → subscriptionDetails_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{up-api-keys-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → up-api-keys-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{up-billing-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → up-billing-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{up-plans-page_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → up-plans-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{useravatar_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → useravatar_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{userbutton_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → userbutton_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{userverification_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → userverification_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{waitlist_ui_cc41a8_1.0.0-snapshot.v20251217194100.js → waitlist_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
package/dist/internal/index.js
CHANGED
|
@@ -3,38 +3,38 @@ import { AvailableComponentProps } from "../types.js";
|
|
|
3
3
|
import { WithInternalRouting } from "../internal/routing.js";
|
|
4
4
|
import * as react0 from "react";
|
|
5
5
|
import * as _emotion_react_jsx_runtime0 from "@emotion/react/jsx-runtime";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _clerk_shared_types151 from "@clerk/shared/types";
|
|
7
7
|
|
|
8
8
|
//#region src/lazyModules/components.d.ts
|
|
9
9
|
|
|
10
10
|
declare const ClerkComponents: {
|
|
11
|
-
SignIn: react0.LazyExoticComponent<react0.ComponentType<
|
|
12
|
-
SignUp: react0.LazyExoticComponent<react0.ComponentType<
|
|
13
|
-
UserAvatar: react0.LazyExoticComponent<react0.ComponentType<
|
|
11
|
+
SignIn: react0.LazyExoticComponent<react0.ComponentType<_clerk_shared_types151.SignInProps>>;
|
|
12
|
+
SignUp: react0.LazyExoticComponent<react0.ComponentType<_clerk_shared_types151.SignUpProps>>;
|
|
13
|
+
UserAvatar: react0.LazyExoticComponent<react0.ComponentType<_clerk_shared_types151.UserAvatarProps>>;
|
|
14
14
|
UserButton: react0.LazyExoticComponent<react0.ComponentType<unknown>>;
|
|
15
|
-
UserProfile: react0.LazyExoticComponent<react0.ComponentType<
|
|
16
|
-
UserVerification: react0.LazyExoticComponent<react0.ComponentType<WithInternalRouting<
|
|
17
|
-
EnableOrganizationsPrompt: react0.LazyExoticComponent<(props:
|
|
15
|
+
UserProfile: react0.LazyExoticComponent<react0.ComponentType<_clerk_shared_types151.UserProfileProps>>;
|
|
16
|
+
UserVerification: react0.LazyExoticComponent<react0.ComponentType<WithInternalRouting<_clerk_shared_types151.__internal_UserVerificationProps>>>;
|
|
17
|
+
EnableOrganizationsPrompt: react0.LazyExoticComponent<(props: _clerk_shared_types151.__internal_EnableOrganizationsPromptProps) => JSX.Element>;
|
|
18
18
|
OrganizationSwitcher: react0.LazyExoticComponent<react0.ComponentType<unknown>>;
|
|
19
19
|
OrganizationList: react0.LazyExoticComponent<() => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
20
|
-
OrganizationProfile: react0.LazyExoticComponent<react0.ComponentType<
|
|
20
|
+
OrganizationProfile: react0.LazyExoticComponent<react0.ComponentType<_clerk_shared_types151.OrganizationProfileProps>>;
|
|
21
21
|
CreateOrganization: react0.LazyExoticComponent<(props: unknown) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
22
|
-
SignInModal: react0.LazyExoticComponent<(props:
|
|
23
|
-
SignUpModal: react0.LazyExoticComponent<(props:
|
|
24
|
-
UserProfileModal: react0.LazyExoticComponent<(props:
|
|
25
|
-
OrganizationProfileModal: react0.LazyExoticComponent<(props:
|
|
26
|
-
CreateOrganizationModal: react0.LazyExoticComponent<(props:
|
|
27
|
-
UserVerificationModal: react0.LazyExoticComponent<(props:
|
|
28
|
-
GoogleOneTap: react0.LazyExoticComponent<react0.ComponentType<
|
|
22
|
+
SignInModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.SignInModalProps) => JSX.Element>;
|
|
23
|
+
SignUpModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.SignUpModalProps) => JSX.Element>;
|
|
24
|
+
UserProfileModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.UserProfileModalProps) => JSX.Element>;
|
|
25
|
+
OrganizationProfileModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.OrganizationProfileModalProps) => JSX.Element>;
|
|
26
|
+
CreateOrganizationModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.CreateOrganizationModalProps) => JSX.Element>;
|
|
27
|
+
UserVerificationModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.__internal_UserVerificationModalProps) => JSX.Element>;
|
|
28
|
+
GoogleOneTap: react0.LazyExoticComponent<react0.ComponentType<_clerk_shared_types151.GoogleOneTapProps>>;
|
|
29
29
|
Waitlist: react0.LazyExoticComponent<(props: unknown) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
30
|
-
WaitlistModal: react0.LazyExoticComponent<(props:
|
|
30
|
+
WaitlistModal: react0.LazyExoticComponent<(props: _clerk_shared_types151.WaitlistModalProps) => JSX.Element>;
|
|
31
31
|
BlankCaptchaModal: react0.LazyExoticComponent<typeof BlankCaptchaModal>;
|
|
32
|
-
PricingTable: react0.LazyExoticComponent<(props:
|
|
33
|
-
Checkout: react0.LazyExoticComponent<(props:
|
|
34
|
-
PlanDetails: react0.LazyExoticComponent<(props:
|
|
32
|
+
PricingTable: react0.LazyExoticComponent<(props: _clerk_shared_types151.PricingTableProps) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
33
|
+
Checkout: react0.LazyExoticComponent<(props: _clerk_shared_types151.__internal_CheckoutProps) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
34
|
+
PlanDetails: react0.LazyExoticComponent<(props: _clerk_shared_types151.__internal_PlanDetailsProps) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
35
35
|
APIKeys: react0.LazyExoticComponent<react0.ComponentType<unknown>>;
|
|
36
36
|
OAuthConsent: react0.LazyExoticComponent<(props: unknown) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
37
|
-
SubscriptionDetails: react0.LazyExoticComponent<(props:
|
|
37
|
+
SubscriptionDetails: react0.LazyExoticComponent<(props: _clerk_shared_types151.__internal_SubscriptionDetailsProps) => _emotion_react_jsx_runtime0.JSX.Element>;
|
|
38
38
|
TaskChooseOrganization: react0.LazyExoticComponent<react0.ComponentType<AvailableComponentProps>>;
|
|
39
39
|
TaskResetPassword: react0.LazyExoticComponent<react0.ComponentType<AvailableComponentProps>>;
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","names":[],"sources":["../../src/lazyModules/components.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAuJa;0DA8BZ,
|
|
1
|
+
{"version":3,"file":"components.d.ts","names":[],"sources":["../../src/lazyModules/components.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAuJa;0DA8BZ,sBAAA,CAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEW,kBAAA,gBAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["390"],{1662:function(e,s,t){t.r(s),t.d(s,{SessionTasks:()=>P});var r=t(4518),i=t(5580),n=t(1210),o=t(4525),a=t(5074),l=t(4607),d=t(6088),c=t(3269),u=t(6980),h=t(1616),p=t(4964),m=t(7831),w=t(2265),Y=t(9024),k=t(7959);let f=()=>{let e=(0,n.ho)(),{navigate:s}=(0,p.r)(),{redirectUrlComplete:t}=(0,h.z1)();return(0,a.useEffect)(()=>{let t=setTimeout(()=>{let t=e.session?.currentTask?.key;t&&s(`./${i.tk[t]}`)},500);return()=>clearTimeout(t)},[s,e,t]),(0,r.Y)(l.n.Part,{part:"start",children:(0,r.FD)(d.Z.Root,{children:[(0,r.Y)(d.Z.Content,{children:(0,r.Y)(u.W,{})}),(0,r.Y)(d.Z.Footer,{})]})})};function g(){let e=(0,h.z1)();return(0,r.Y)(l.n.Root,{flow:"tasks",children:(0,r.FD)(m.d,{children:[(0,r.Y)(w.q,{path:i.tk["choose-organization"],children:(0,r.Y)(h.lY.Provider,{value:{componentName:"TaskChooseOrganization",redirectUrlComplete:e.redirectUrlComplete},children:(0,r.Y)(Y.TaskChooseOrganization,{})})}),(0,r.Y)(w.q,{path:i.tk["reset-password"],children:(0,r.Y)(h.pq.Provider,{value:{componentName:"TaskResetPassword",redirectUrlComplete:e.redirectUrlComplete},children:(0,r.Y)(k.TaskResetPassword,{})})}),(0,r.Y)(w.q,{index:!0,children:(0,r.Y)(f,{})})]})})}let P=(0,c.dm)(({redirectUrlComplete:e})=>{let s=(0,n.ho)(),{navigate:t}=(0,p.r)(),i=(0,a.useRef)(null);return((0,a.useEffect)(()=>{let r=s.session?.currentTask;r&&s.session?.status!=="active"?s.telemetry?.record((0,o.we)("SessionTask",{task:r.key})):t(e)},[s,t,e]),s.session?.currentTask)?(0,r.Y)(h.qx.Provider,{value:{redirectUrlComplete:e},children:(0,r.Y)(g,{})}):(0,r.FD)(d.Z.Root,{sx:()=>({minHeight:i?i.current?.offsetHeight:void 0}),children:[(0,r.Y)(d.Z.Content,{sx:()=>({flex:1}),children:(0,r.Y)(u.W,{})}),(0,r.Y)(d.Z.Footer,{})]})})},7959:function(e,s,t){t.r(s),t.d(s,{TaskResetPassword:()=>b});var r=t(4518),i=t(1210),n=t(7697),o=t(9599),a=t(5577),l=t(1616),d=t(78),c=t(2861),u=t(4607),h=t(8272),p=t(8920),m=t(6088),w=t(3269),Y=t(2454),k=t(6153),f=t(620),g=t(8691),P=t(4468),R=t(3990),v=t(8640),y=t(179);let b=(0,a.Z)((0,y.d)((0,w.dm)(()=>{let e=(0,i.ho)(),s=(0,w.f0)(),{userSettings:{passwordSettings:t}}=(0,n.O)(),{t:a,locale:y}=(0,d._)(),{redirectUrlComplete:b}=(0,l.O_)(),{otherSessions:C}=(0,g.z)({user:e.user}),{navigateAfterSignOut:O,navigateAfterMultiSessionSingleSignOutUrl:F}=(0,o.g)(),T=(0,i.Wp)((e,s)=>e.updatePassword(...s)),{navigateOnSetActive:Z}=(0,l.z1)(),z=(0,v.tJ)("newPassword","",{type:"password",label:(0,c.G)("formFieldLabel__newPassword"),isRequired:!0,validatePassword:!0,buildErrorMessage:e=>(0,R.C5)(e,{t:a,locale:y,passwordSettings:t})}),x=(0,v.tJ)("confirmPassword","",{type:"password",label:(0,c.G)("formFieldLabel__confirmPassword"),isRequired:!0}),_=(0,v.tJ)("signOutOfOtherSessions","",{type:"checkbox",label:(0,c.G)("formFieldLabel__signOutOfOtherSessions"),defaultChecked:!0}),{setConfirmPasswordFeedback:D,isPasswordMatch:A}=(0,f.Z)({passwordField:z,confirmPasswordField:x}),S=e.user?.primaryEmailAddress?.emailAddress??e.user?.username;return(0,r.Y)(u.n.Root,{flow:"taskResetPassword",children:(0,r.Y)(u.n.Part,{part:"resetPassword",children:(0,r.FD)(m.Z.Root,{children:[(0,r.FD)(m.Z.Content,{children:[(0,r.FD)(k.Y.Root,{showLogo:!0,children:[(0,r.Y)(k.Y.Title,{localizationKey:(0,c.G)("taskResetPassword.title")}),(0,r.Y)(k.Y.Subtitle,{localizationKey:(0,c.G)("taskResetPassword.subtitle")})]}),(0,r.Y)(m.Z.Alert,{children:s.error}),(0,r.Y)(h.fv,{elementDescriptor:p.$z.main,gap:8,children:(0,r.FD)(Y.l.Root,{onSubmit:()=>{s.runAsync(async()=>{if(A&&e.user){z.clearFeedback(),x.clearFeedback();try{await T(e.user,[{newPassword:z.value,signOutOfOtherSessions:_.checked}]),await e.setActive({session:e.session,navigate:async({session:e})=>{await Z?.({session:e,redirectUrlComplete:b})}})}catch(e){return(0,P.H4)(e,[z,x],s.setError)}}})},onBlur:()=>{z.value&&D(x.value)},gap:8,children:[(0,r.FD)(h.fv,{gap:6,children:[(0,r.Y)("input",{readOnly:!0,"data-testid":"hidden-identifier",id:"identifier-field",name:"identifier",value:e.user?.primaryEmailAddress?.emailAddress||e.user?.username||"",style:{display:"none"}}),(0,r.Y)(Y.l.ControlRow,{elementId:z.id,children:(0,r.Y)(Y.l.PasswordInput,{...z.props,isRequired:!0,minLength:6})}),(0,r.Y)(Y.l.ControlRow,{elementId:x.id,children:(0,r.Y)(Y.l.PasswordInput,{...x.props,onChange:e=>(e.target.value&&D(e.target.value),x.props.onChange(e))})}),(0,r.Y)(Y.l.ControlRow,{elementId:_.id,children:(0,r.Y)(Y.l.Checkbox,{..._.props})})]}),(0,r.Y)(h.fv,{gap:3,children:(0,r.Y)(Y.l.SubmitButton,{isLoading:s.isLoading,isDisabled:!A,localizationKey:(0,c.G)("taskResetPassword.formButtonPrimary")})})]})})]}),(0,r.Y)(m.Z.Footer,{children:(0,r.FD)(m.Z.Action,{elementId:"signOut",gap:2,justify:"center",sx:()=>({width:"100%"}),children:[S&&(0,r.Y)(m.Z.ActionText,{truncate:!0,localizationKey:(0,c.G)("taskResetPassword.signOut.actionText",{identifier:S})}),(0,r.Y)(m.Z.ActionLink,{sx:()=>({flexShrink:0}),onClick:()=>{0===C.length?e?.signOut(O):e?.signOut(F,{sessionId:e.session?.id})},localizationKey:(0,c.G)("taskResetPassword.signOut.actionLink")})]})})]})})})}),"reset-password"))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["10"],{9090:function(e,t,r){r.d(t,{n:()=>o});var n=r(4518),i=r(5170),a=r(2861);let o=e=>{let{onBackLinkClick:t}=e;return(0,n.Y)(i.J,{cardTitle:(0,a.G)("signIn.alternativeMethods.getHelp.title"),cardSubtitle:(0,a.G)("signIn.alternativeMethods.getHelp.content"),onBackLinkClick:t})}},5717:function(e,t,r){let n,i;r.r(t),r.d(t,{SignIn:()=>tv,SignInModal:()=>tY});var a,o=r(4518),s=r(1210),l=r(5074),c=r(5873),d=r(4),u=r(5350),h=r(5577),p=r(4607),f=r(7896),g=r(7607),m=r(4096),I=r(7831),_=r(2265),w=r(4132),S=r(656),v=r(2861),b=r(8272),Y=r(8920),k=r(29),C=r(6088),A=r(3269),F=r(6153),y=r(9236),U=r(4964);let P=(0,l.lazy)(()=>Promise.all([r.e("545"),r.e("666"),r.e("188")]).then(r.bind(r,6464)).then(e=>({default:e.Web3SolanaWalletButtons}))),E=(0,S.RL)((0,S.SY)((0,A.dm)(()=>{let e=(0,s.ho)(),t=(0,A.f0)(),r=(0,U.r)(),n=(0,d.r)();return(0,o.Y)(p.n.Part,{part:"chooseWallet",children:(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.web3Solana.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.web3Solana.subtitle")})]}),(0,o.Y)(C.Z.Alert,{children:t.error}),(0,o.FD)(b.so,{direction:"col",gap:4,children:[(0,o.Y)(l.Suspense,{fallback:(0,o.Y)(b.so,{direction:"row",align:"center",justify:"center",sx:e=>({height:"100%",minHeight:e.sizes.$32}),children:(0,o.Y)(b.y$,{size:"lg",colorScheme:"primary",elementDescriptor:Y.$z.spinner})}),children:(0,o.Y)(P,{web3AuthCallback:({walletName:i})=>e.authenticateWithWeb3({customNavigate:r.navigate,redirectUrl:n.afterSignInUrl||"/",secondFactorUrl:"factor-two",signUpContinueUrl:n.isCombinedFlow?"create/continue":n.signUpContinueUrl,strategy:"web3_solana_signature",walletName:i}).catch(e=>(0,y.f)(e,t.setError))})}),(0,o.Y)(k.E,{boxElementDescriptor:Y.$z.backRow,linkElementDescriptor:Y.$z.backLink,onClick:()=>{r.navigate("../")}})]})]}),(0,o.Y)(C.Z.Footer,{})]})})})));var D=r(4692);let L=()=>Promise.all([r.e("545"),r.e("666"),r.e("472")]).then(r.bind(r,4753)),M=(0,l.lazy)(()=>L().then(e=>({default:e.SignUpVerifyPhone}))),T=(0,l.lazy)(()=>L().then(e=>({default:e.SignUpVerifyEmail}))),G=(0,l.lazy)(()=>L().then(e=>({default:e.SignUpStart}))),R=(0,l.lazy)(()=>L().then(e=>({default:e.SignUpSSOCallback}))),B=(0,l.lazy)(()=>L().then(e=>({default:e.SignUpContinue})));var z=r(2950),O=r(2454),$=r(4468),N=r(3990),Z=r(8640),x=r(6324),K=r(7697),W=r(78),V=r(620),q=r(9426);let H=(0,A.dm)(()=>{let e=(0,x.n)(),t=(0,A.f0)(),{navigate:r}=(0,U.r)(),n=(0,q.p)(),{userSettings:{passwordSettings:i}}=(0,K.O)(),{t:a,locale:s}=(0,W._)(),c="needs_new_password"===e.status&&"reset_password_email_code"!==e.firstFactorVerification.strategy&&"reset_password_phone_code"!==e.firstFactorVerification.strategy;l.useEffect(()=>{c&&t.setError(a((0,v.G)("signIn.resetPassword.requiredMessage")))},[]);let d=(0,Z.tJ)("password","",{type:"password",label:(0,v.G)("formFieldLabel__newPassword"),isRequired:!0,validatePassword:!0,buildErrorMessage:e=>(0,N.C5)(e,{t:a,locale:s,passwordSettings:i})}),u=(0,Z.tJ)("confirmPassword","",{type:"password",label:(0,v.G)("formFieldLabel__confirmPassword"),isRequired:!0}),h=(0,Z.tJ)("signOutOfOtherSessions","",{type:"checkbox",label:(0,v.G)("formFieldLabel__signOutOfOtherSessions"),defaultChecked:!0}),{setConfirmPasswordFeedback:p,isPasswordMatch:f}=(0,V.Z)({passwordField:d,confirmPasswordField:u}),g=async()=>{if(f){d.clearFeedback(),u.clearFeedback();try{let{status:t,createdSessionId:i}=await e.resetPassword({password:d.value,signOutOfOtherSessions:h.checked});switch(t){case"complete":if(i){let e=new URLSearchParams;return e.set("createdSessionId",i),r(`../reset-password-success?${e.toString()}`)}return console.error((0,z.s)(t,n));case"needs_second_factor":return r("../factor-two");default:return console.error((0,z.s)(t,n))}}catch(e){return(0,$.H4)(e,[d,u],t.setError)}}};return(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.Y)(F.Y.Root,{showLogo:!0,children:(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.resetPassword.title")})}),(0,o.Y)(C.Z.Alert,{children:t.error}),(0,o.Y)(b.fv,{elementDescriptor:Y.$z.main,gap:8,children:(0,o.FD)(O.l.Root,{onSubmit:g,onBlur:()=>{d.value&&p(u.value)},gap:8,children:[(0,o.FD)(b.fv,{gap:6,children:[(0,o.Y)("input",{readOnly:!0,"data-testid":"hidden-identifier",id:"identifier-field",name:"identifier",value:e.identifier||"",style:{display:"none"}}),(0,o.Y)(O.l.ControlRow,{elementId:d.id,children:(0,o.Y)(O.l.PasswordInput,{...d.props,isRequired:!0,autoFocus:!0})}),(0,o.Y)(O.l.ControlRow,{elementId:u.id,children:(0,o.Y)(O.l.PasswordInput,{...u.props,onChange:e=>(e.target.value&&p(e.target.value),u.props.onChange(e))})}),!c&&(0,o.Y)(O.l.ControlRow,{elementId:h.id,children:(0,o.Y)(O.l.Checkbox,{...h.props})})]}),(0,o.FD)(b.fv,{gap:3,children:[(0,o.Y)(O.l.SubmitButton,{isDisabled:!f,localizationKey:(0,v.G)("signIn.resetPassword.formButtonPrimary")}),(0,o.Y)(C.Z.Action,{elementId:"alternativeMethods",children:(0,o.Y)(C.Z.ActionLink,{elementDescriptor:Y.$z.backLink,localizationKey:(0,v.G)("backButton"),onClick:()=>r("../")})})]})]})})]}),(0,o.Y)(C.Z.Footer,{})]})});var j=r(9107),J=r(6488);let X=(0,A.dm)(()=>{let e=(0,A.f0)();return(0,j.h)(),(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.Y)(F.Y.Root,{showLogo:!0,children:(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.resetPassword.title")})}),(0,o.Y)(C.Z.Alert,{children:e.error}),(0,o.FD)(b.fv,{elementDescriptor:Y.$z.main,gap:8,children:[(0,o.Y)(b.EY,{localizationKey:(0,v.G)("signIn.resetPassword.successMessage")}),(0,o.Y)(J.s,{direction:"row",center:!0,children:(0,o.Y)(b.y$,{size:"xl",colorScheme:"primary",elementDescriptor:Y.$z.spinner})})]})]}),(0,o.Y)(C.Z.Footer,{})]})});var Q=r(2531),ee=r(750),et=r(9345),er=r(9599),en=r(9366),ei=r(6932),ea=r(1052),eo=r(2540);let es=(0,S.SY)((0,A.dm)(()=>{let e=(0,A.f0)(),{userProfileUrl:t}=(0,K.O)().displayConfig,{afterSignInUrl:r,path:n,signInUrl:i,taskUrl:a}=(0,d.r)(),{navigateAfterSignOut:s}=(0,er.g)(),{handleSignOutAllClicked:l,handleSessionClicked:c,signedInSessions:u,handleAddAccountClicked:h}=(0,eo.u)({taskUrl:a,navigateAfterSignOut:s,afterSwitchSessionUrl:r,userProfileUrl:t,signInUrl:n??i,user:void 0});return(0,o.Y)(p.n.Part,{part:"accountSwitcher",children:(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{sx:e=>({padding:`${e.space.$8} ${e.space.$none} ${e.space.$none}`}),children:[(0,o.FD)(F.Y.Root,{children:[(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.accountSwitcher.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.accountSwitcher.subtitle")})]}),(0,o.Y)(C.Z.Alert,{children:e.error}),(0,o.Y)(b.fv,{elementDescriptor:Y.$z.main,gap:8,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100}),children:(0,o.FD)(Q.En,{role:"menu",children:[u.map(e=>(0,o.Y)(ee.P,{onClick:c(e),sx:e=>({height:e.sizes.$16,justifyContent:"flex-start",borderRadius:0}),icon:en.A,children:(0,o.Y)(et.c,{user:e.user,sx:{width:"100%"}})},e.id)),(0,o.Y)(Q.rc,{elementDescriptor:Y.$z.accountSwitcherActionButton,elementId:Y.$z.accountSwitcherActionButton.setId("addAccount"),iconBoxElementDescriptor:Y.$z.accountSwitcherActionButtonIconBox,iconBoxElementId:Y.$z.accountSwitcherActionButtonIconBox.setId("addAccount"),iconElementDescriptor:Y.$z.accountSwitcherActionButtonIcon,iconElementId:Y.$z.accountSwitcherActionButtonIcon.setId("addAccount"),icon:ei.A,label:(0,v.G)("signIn.accountSwitcher.action__addAccount"),onClick:h,iconSx:e=>({width:e.sizes.$9,height:e.sizes.$6}),iconBoxSx:e=>({minHeight:e.sizes.$9,minWidth:e.sizes.$6,alignItems:"center"}),spinnerSize:"md"})]})})]}),(0,o.Y)(C.Z.Footer,{sx:e=>({">:first-of-type":{padding:`${e.space.$1}`,width:"100%"}}),children:(0,o.Y)(C.Z.Action,{sx:{width:"100%",">:first-of-type":{width:"100%",borderBottomWidth:0}},children:(0,o.Y)(ea.ww,{handleSignOutAllClicked:l,elementDescriptor:Y.$z.accountSwitcherActionButton,elementId:Y.$z.accountSwitcherActionButton.setId("signOutAll"),iconBoxElementDescriptor:Y.$z.accountSwitcherActionButtonIconBox,iconBoxElementId:Y.$z.accountSwitcherActionButtonIconBox.setId("signOutAll"),iconElementDescriptor:Y.$z.accountSwitcherActionButtonIcon,iconElementId:Y.$z.accountSwitcherActionButtonIcon.setId("signOutAll"),label:(0,v.G)("signIn.accountSwitcher.action__signOutAll"),actionSx:e=>({padding:`${e.space.$2} ${e.space.$2}`})})})})]})})}));var el=r(6980),ec=r(8738),ed=r(8289),eu=r(9835),eh=r(9090);let ep=e=>{let[t,r]=l.useState(!1),n=l.useCallback(()=>r(e=>!e),[r]);return t?(0,o.Y)(eh.n,{onBackLinkClick:n}):(0,o.Y)(ef,{onBackLinkClick:e.onBackLinkClick,onFactorSelected:e.onFactorSelected,onHavingTroubleClick:n})},ef=e=>{let{onHavingTroubleClick:t,onFactorSelected:r,onBackLinkClick:n}=e,i=(0,A.f0)(),{supportedSecondFactors:a}=(0,x.n)();return(0,o.Y)(p.n.Part,{part:"alternativeMethods",children:(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.alternativeMethods.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.alternativeMethods.subtitle")})]}),(0,o.Y)(C.Z.Alert,{children:i.error}),(0,o.FD)(b.fv,{elementDescriptor:Y.$z.main,gap:3,children:[(0,o.Y)(b.fv,{gap:2,children:a&&a.sort(ed.Wy).map((e,t)=>(0,o.Y)(ec.X,{textLocalizationKey:function(e){switch(e.strategy){case"phone_code":return(0,v.G)("signIn.alternativeMethods.blockButton__phoneCode",{identifier:(0,eu.u)(e.safeIdentifier)||""});case"totp":return(0,v.G)("signIn.alternativeMethods.blockButton__totp");case"backup_code":return(0,v.G)("signIn.alternativeMethods.blockButton__backupCode");case"email_code":return(0,v.G)("signIn.alternativeMethods.blockButton__emailCode",{identifier:(0,eu.u)(e.safeIdentifier)||""});case"email_link":return(0,v.G)("signIn.alternativeMethods.blockButton__emailLink",{identifier:(0,eu.u)(e.safeIdentifier)||""});default:throw Error("Invalid sign in strategy")}}(e),elementDescriptor:Y.$z.alternativeMethodsBlockButton,textElementDescriptor:Y.$z.alternativeMethodsBlockButtonText,arrowElementDescriptor:Y.$z.alternativeMethodsBlockButtonArrow,isDisabled:i.isLoading,onClick:()=>r(e)},t))}),(0,o.Y)(C.Z.Action,{elementId:"alternativeMethods",children:n&&(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("backButton"),onClick:e.onBackLinkClick})})]})]}),(0,o.Y)(C.Z.Footer,{children:(0,o.FD)(C.Z.Action,{elementId:"havingTrouble",children:[(0,o.Y)(C.Z.ActionText,{localizationKey:(0,v.G)("signIn.alternativeMethods.actionText")}),(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("signIn.alternativeMethods.actionLink"),onClick:t})]})})]})})};var eg=r(3610),em=r(7912),eI=r(5763);let e_=e=>(0,eI.Kw)(e.firstFactorVerification?.strategy)&&e.firstFactorVerification?.status==="verified",ew=e=>{let t=(0,K.O)(),r=(0,x.n)(),n=(0,A.f0)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:c}=(0,s.ho)(),{navigate:u}=(0,U.r)(),h=(0,q.p)(),p=(0,s.ho)(),f=(0,l.useMemo)(()=>{let e=Object.values(t.userSettings.attributes).some(e=>e.used_for_second_factor);return"new"===r.clientTrustState&&!e},[r.clientTrustState,t.userSettings.attributes]);l.useEffect(()=>{e.factorAlreadyPrepared||g?.()},[]);let g=e.prepare?()=>e.prepare?.().then(()=>e.onFactorPrepare()).catch(e=>{if((0,eg._d)(e))return p.__internal_navigateWithError("..",e.errors[0]);(0,$.H4)(e,[],n.setError)}):void 0;return(0,o.Y)(em.j,{cardTitle:e.cardTitle,cardSubtitle:e_(r)?(0,v.G)("signIn.forgotPassword.subtitle"):e.cardSubtitle,cardNotice:e.showClientTrustNotice||f?(0,v.G)("signIn.newDeviceVerificationNotice"):void 0,resendButton:e.resendButton,inputLabel:e.inputLabel,onCodeEntryFinishedAction:(t,n,o)=>{r.attemptSecondFactor({strategy:e.factor.strategy,code:t}).then(async e=>{if(await n(),"complete"!==e.status)return console.error((0,z.s)(e.status,h));if(e_(e)&&e.createdSessionId){let t=new URLSearchParams;return t.set("createdSessionId",e.createdSessionId),u(`../reset-password-success?${t.toString()}`)}return c({session:e.createdSessionId,navigate:async({session:e})=>{await a({session:e,redirectUrl:i})}})}).catch(e=>(0,eg._d)(e)?p.__internal_navigateWithError("..",e.errors[0]):o(e))},onResendCodeClicked:g,safeIdentifier:"safeIdentifier"in e.factor?e.factor.safeIdentifier:void 0,profileImageUrl:r.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,children:e_(r)&&(0,o.Y)(b.EY,{localizationKey:(0,v.G)("signIn.resetPasswordMfa.detailsLabel"),colorScheme:"secondary"})})},eS=e=>{let t=(0,x.n)();return(0,o.Y)(p.n.Part,{part:"emailCode2Fa",children:(0,o.Y)(ew,{...e,cardTitle:(0,v.G)("signIn.emailCodeMfa.title"),cardSubtitle:(0,v.G)("signIn.emailCodeMfa.subtitle"),inputLabel:(0,v.G)("signIn.emailCodeMfa.formTitle"),resendButton:(0,v.G)("signIn.emailCodeMfa.resendButton"),prepare:()=>{let{emailAddressId:r,strategy:n}=e.factor;return t.prepareSecondFactor({emailAddressId:r,strategy:n})}})})};var ev=r(2027),eb=r(4979),eY=r(8051),ek=r(2992);let eC=e=>{let{t}=(0,W._)(),r=(0,A.f0)(),n=(0,x.n)(),i=(0,d.r)(),{signInUrl:a}=i,{afterSignInUrl:c}=(0,d.r)(),{setActive:u}=(0,s.ho)(),{startEmailLinkFlow:h,cancelEmailLinkFlow:f}=(0,ek.u)(n),[g,m]=l.useState(!1),I=(0,s.ho)();l.useEffect(()=>{_()},[]);let _=()=>{h({emailAddressId:e.factor.emailAddressId,redirectUrl:(0,eY.lA)({ctx:i,baseUrl:a,intent:"sign-in"})}).then(e=>w(e)).catch(e=>{if((0,eg._d)(e))return I.__internal_navigateWithError("..",e.errors[0]);(0,$.H4)(e,[],r.setError)})},w=async e=>{let n=e.secondFactorVerification;"expired"===n.status?r.setError(t((0,v.G)("formFieldError__verificationLinkExpired"))):n.verifiedFromTheSameClient()?m(!0):await u({session:e.createdSessionId,redirectUrl:c})};return g?(0,o.Y)(eb.$,{title:(0,v.G)("signIn.emailLink.verifiedSwitchTab.titleNewTab"),subtitle:(0,v.G)("signIn.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,o.Y)(p.n.Part,{part:"emailLink",children:(0,o.Y)(ev._,{cardTitle:(0,v.G)("signIn.emailLinkMfa.title"),cardSubtitle:(0,v.G)("signIn.emailLinkMfa.subtitle"),cardNotice:e.showClientTrustNotice||"new"===n.clientTrustState?(0,v.G)("signIn.newDeviceVerificationNotice"):void 0,formSubtitle:(0,v.G)("signIn.emailLinkMfa.formSubtitle"),resendButton:(0,v.G)("signIn.emailLinkMfa.resendButton"),onResendCodeClicked:()=>{f(),_()},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:n.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked})})},eA=e=>{let t=(0,x.n)();return(0,o.Y)(p.n.Part,{part:"phoneCode2Fa",children:(0,o.Y)(ew,{...e,cardTitle:(0,v.G)("signIn.phoneCodeMfa.title"),cardSubtitle:(0,v.G)("signIn.phoneCodeMfa.subtitle"),inputLabel:(0,v.G)("signIn.phoneCodeMfa.formTitle"),resendButton:(0,v.G)("signIn.phoneCodeMfa.resendButton"),prepare:()=>{let{phoneNumberId:r,strategy:n}=e.factor;return t.prepareSecondFactor({phoneNumberId:r,strategy:n})}})})};var eF=r(2690);let ey=(0,S.RL)((0,S.SY)((0,A.dm)(function(){let e=(0,x.n)(),{currentFactor:t,factorAlreadyPrepared:r,handleFactorPrepare:n,selectFactor:i,showAllStrategies:a,toggleAllStrategies:s}=(0,eF.j)(e.supportedSecondFactors);if(!t)return(0,o.Y)(el.B,{});if(a)return(0,o.Y)(ep,{onBackLinkClick:s,onFactorSelected:i});switch(t?.strategy){case"phone_code":return(0,o.Y)(eA,{showClientTrustNotice:!0,factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});case"email_code":return(0,o.Y)(eS,{showClientTrustNotice:!0,factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});case"email_link":return(0,o.Y)(eC,{showClientTrustNotice:!0,factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});default:return(0,o.Y)(el.B,{})}})));var eU=r(5170),eP=r(3474),eE=r(6505),eD=r(8144),eL=r(4421),eM=r(1051),eT=r(2181),eG=r(743),eR=r(6889),eB=r(2166),ez=r(44),eO=r(3226);let e$=l.memo(e=>{let t=(0,s.ho)(),{navigate:r}=(0,U.r)(),n=(0,A.f0)(),{displayConfig:i}=(0,K.O)(),a=(0,d.r)(),l=(0,x.n)(),c=(0,eY.uP)(a,i.signInUrl),u=a.afterSignInUrl||"/",h="popup"===a.oauthFlow||"auto"===a.oauthFlow&&(0,ez.C)(),{onAlternativePhoneCodeProviderClick:p,...f}=e,g=e=>(0,eg.$R)(e)&&e.errors.find(e=>e.code===eB.c.SESSION_EXISTS)?t.setActive({session:t.client.lastActiveSessionId,navigate:async({session:e})=>{await a.navigateOnSetActive({session:e,redirectUrl:a.afterSignInUrl})}}):(0,$.H4)(e,[],n.setError);return(0,o.Y)(eO.V,{...f,showLastAuthenticationStrategy:!0,idleAfterDelay:!h,oauthCallback:e=>{if(h){let t=window.open("about:blank","","width=600,height=800"),r=setInterval(()=>{(!t||t.closed)&&(clearInterval(r),n.setIdle())},500);return l.authenticateWithPopup({strategy:e,redirectUrl:c,redirectUrlComplete:u,popup:t,oidcPrompt:a.oidcPrompt}).catch(e=>g(e))}return l.authenticateWithRedirect({strategy:e,redirectUrl:c,redirectUrlComplete:u,oidcPrompt:a.oidcPrompt}).catch(e=>g(e))},web3Callback:e=>"web3_solana_signature"===e?r(`choose-wallet?strategy=${e}`):t.authenticateWithWeb3({customNavigate:r,redirectUrl:u,signUpContinueUrl:a.isCombinedFlow?"create/continue":a.signUpContinueUrl,strategy:e,secondFactorUrl:"factor-two"}).catch(e=>(0,y.f)(e,n.setError)),alternativePhoneCodeCallback:e=>{p?.(e)}})});function eN(){let e=(0,x.n)();return e.supportedFirstFactors?.find(({strategy:e})=>(0,eI.Kw)(e))}let eZ=e=>((e,t)=>{let[r,n]=l.useState(!1),i=l.useCallback(()=>n(e=>!e),[n]);return r?(0,o.Y)(eh.n,{onBackLinkClick:i}):(0,o.Y)(e,{...t,onHavingTroubleClick:i})})(ex,{...e}),ex=e=>{let{onBackLinkClick:t,onHavingTroubleClick:r,onFactorSelected:n,mode:i="default"}=e,a=(0,A.f0)(),s=eN(),{supportedFirstFactors:l}=(0,x.n)(),{firstPartyFactors:c,hasAnyStrategy:d}=(0,eP.y)({filterOutFactor:e?.currentFactor,supportedFirstFactors:l}),u=function(e){switch(e){case"forgot":return"forgotPasswordMethods";case"pwned":return"passwordPwnedMethods";case"passwordCompromised":return"passwordCompromisedMethods";default:return"alternativeMethods"}}(i),h=function(e){switch(e){case"forgot":return(0,v.G)("signIn.forgotPasswordAlternativeMethods.title");case"pwned":return(0,v.G)("signIn.passwordPwned.title");case"passwordCompromised":return(0,v.G)("signIn.passwordCompromised.title");default:return(0,v.G)("signIn.alternativeMethods.title")}}(i),f=function(e){switch(e){case"forgot":case"pwned":return!0;default:return!1}}(i);return(0,o.Y)(p.n.Part,{part:u,children:(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(F.Y.Title,{localizationKey:h}),!f&&"passwordCompromised"!==i&&(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.alternativeMethods.subtitle")})]}),(0,o.Y)(C.Z.Alert,{children:a.error}),(0,o.FD)(b.so,{direction:"col",elementDescriptor:Y.$z.main,gap:6,children:[f&&s&&(0,o.Y)(b.$n,{localizationKey:eK(s),elementDescriptor:Y.$z.alternativeMethodsBlockButton,isDisabled:a.isLoading,onClick:()=>{a.setError(void 0),n(s)}}),f&&d&&(0,o.Y)(eE.c,{dividerText:(0,v.G)("signIn.forgotPasswordAlternativeMethods.label__alternativeMethods")}),(0,o.FD)(b.fv,{gap:4,children:[d&&(0,o.FD)(b.so,{elementDescriptor:Y.$z.alternativeMethods,direction:"col",gap:2,children:[(0,o.Y)(e$,{enableWeb3Providers:!0,enableOAuthProviders:!0,enableAlternativePhoneCodeProviders:!1}),c&&c.map((e,t)=>{var r;return(0,o.Y)(ec.X,{leftIcon:(r=e,({email_link:eD.A,email_code:eL.A,phone_code:eM.A,reset_password_email_code:eT.A,reset_password_phone_code:eT.A,password:eG.A,passkey:eR.A})[r.strategy]),textLocalizationKey:eK(e),elementDescriptor:Y.$z.alternativeMethodsBlockButton,textElementDescriptor:Y.$z.alternativeMethodsBlockButtonText,arrowElementDescriptor:Y.$z.alternativeMethodsBlockButtonArrow,textVariant:"buttonLarge",isDisabled:a.isLoading,onClick:()=>{a.setError(void 0),n(e)}},t)})]}),t&&(0,o.Y)(k.E,{boxElementDescriptor:Y.$z.backRow,linkElementDescriptor:Y.$z.backLink,onClick:t})]})]})]}),(0,o.Y)(C.Z.Footer,{children:(0,o.FD)(C.Z.Action,{elementId:"havingTrouble",children:[(0,o.Y)(C.Z.ActionText,{localizationKey:(0,v.G)("signIn.alternativeMethods.actionText")}),(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("signIn.alternativeMethods.actionLink"),onClick:r})]})})]})})};function eK(e){switch(e.strategy){case"email_link":return(0,v.G)("signIn.alternativeMethods.blockButton__emailLink",{identifier:(0,eu.u)(e.safeIdentifier)||""});case"email_code":return(0,v.G)("signIn.alternativeMethods.blockButton__emailCode",{identifier:(0,eu.u)(e.safeIdentifier)||""});case"phone_code":return(0,v.G)("signIn.alternativeMethods.blockButton__phoneCode",{identifier:(0,eu.u)(e.safeIdentifier)||""});case"password":return(0,v.G)("signIn.alternativeMethods.blockButton__password");case"passkey":return(0,v.G)("signIn.alternativeMethods.blockButton__passkey");case"reset_password_email_code":case"reset_password_phone_code":return(0,v.G)("signIn.forgotPasswordAlternativeMethods.blockButton__resetPassword");default:throw Error(`Invalid sign in strategy: "${e.strategy}"`)}}var eW=r(5653);function eV(e){let t=(0,A.f0)(),{setActive:r,__internal_navigateWithError:n}=(0,s.ho)(),i=(0,q.p)(),{afterSignInUrl:a,navigateOnSetActive:o}=(0,d.r)(),{authenticateWithPasskey:c}=(0,x.n)();return(0,l.useEffect)(()=>()=>{eW.sv.abort()},[]),(0,l.useCallback)(async(...s)=>{try{let t=await c(...s);switch(t.status){case"complete":return r({session:t.createdSessionId,navigate:async({session:e})=>{await o({session:e,redirectUrl:a})}});case"needs_second_factor":return e();default:return console.error((0,z.s)(t.status,i))}}catch(r){let{flow:e}=s[0]||{};if((0,eg.Cm)(r)&&("passkey_operation_aborted"===r.code||"autofill"===e&&"passkey_retrieval_cancelled"===r.code))return;if((0,eg._d)(r))return n("..",r.errors[0]);(0,$.H4)(r,[],t.setError)}},[])}function eq(e){return!!e?.length&&e.filter(e=>"enterprise_sso"===e.strategy&&"enterpriseConnectionId"in e&&"enterpriseConnectionName"in e).length>1}var eH=r(1652);let ej=e=>{let t=(0,x.n)(),r=(0,A.f0)(),{navigate:n}=(0,U.r)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:l}=(0,s.ho)(),c=(0,q.p)(),u=(0,s.ho)(),h=e.factor.channel,p="verified"===t.firstFactorVerification.status&&e.factorAlreadyPrepared;return(0,o.Y)(em.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,inputLabel:e.inputLabel,resendButton:e.resendButton,onCodeEntryFinishedAction:(r,o,s)=>{t.attemptFirstFactor({strategy:e.factor.strategy,code:r}).then(async e=>{switch(await o(),e.status){case"complete":return l({session:e.createdSessionId,navigate:async({session:e})=>{await a({session:e,redirectUrl:i})}});case"needs_second_factor":return n("../factor-two");case"needs_new_password":return n("../reset-password");default:return console.error((0,z.s)(e.status,c))}}).catch(e=>(0,eg._d)(e)?u.__internal_navigateWithError("..",e.errors[0]):s(e))},onResendCodeClicked:()=>{p||t.prepareFirstFactor({...e.factor,channel:h}).then(()=>e.onFactorPrepare()).catch(e=>(0,$.H4)(e,[],r.setError))},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:t.userData.imageUrl,alternativeMethodsLabel:(0,v.G)("footerActionLink__alternativePhoneCodeProvider"),onShowAlternativeMethodsClicked:()=>{r.setError(void 0),e.onChangePhoneCodeChannel({...e.factor,channel:void 0})},showAlternativeMethods:!0,onIdentityPreviewEditClicked:()=>n("../"),onBackLinkClicked:e.onBackLinkClicked})},eJ=e=>(0,o.Y)(p.n.Part,{part:"phoneCode",children:(0,o.Y)(ej,{...e,cardTitle:(0,v.G)("signIn.alternativePhoneCodeProvider.title",{provider:(0,eH.y)(e.factor.channel)?.name||""}),cardSubtitle:(0,v.G)("signIn.alternativePhoneCodeProvider.subtitle"),inputLabel:(0,v.G)("signIn.alternativePhoneCodeProvider.formTitle"),resendButton:(0,v.G)("signIn.alternativePhoneCodeProvider.resendButton")})}),eX=e=>{let t=(0,x.n)(),r=(0,A.f0)(),{navigate:n}=(0,U.r)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:c}=(0,s.ho)(),u=(0,q.p)(),h=(0,s.ho)(),p="verified"===t.firstFactorVerification.status&&e.factorAlreadyPrepared,g=(0,l.useMemo)(()=>{let t=e.factor,r=t.strategy;return"emailAddressId"in t&&(r+=`_${t.emailAddressId}`),"phoneNumberId"in t&&(r+=`_${t.phoneNumberId}`),"channel"in t&&t.channel&&(r+=`_${t.channel}`),{name:"signIn.prepareFirstFactor",factorKey:r}},[e.factor.strategy,"emailAddressId"in e.factor?e.factor.emailAddressId:void 0,"phoneNumberId"in e.factor?e.factor.phoneNumberId:void 0,"channel"in e.factor?e.factor.channel:void 0]);return(0,f.s)(p?void 0:()=>t?.prepareFirstFactor(e.factor),g,{staleTime:100,onSuccess:()=>e.onFactorPrepare(),onError:e=>(0,$.H4)(e,[],r.setError)}),(0,o.Y)(em.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,inputLabel:e.inputLabel,resendButton:e.resendButton,onCodeEntryFinishedAction:(r,o,s)=>{t.attemptFirstFactor({strategy:e.factor.strategy,code:r}).then(async e=>{switch(await o(),e.status){case"complete":return c({session:e.createdSessionId,navigate:async({session:e})=>{await a({session:e,redirectUrl:i})}});case"needs_second_factor":return n("../factor-two");case"needs_new_password":return n("../reset-password");default:return console.error((0,z.s)(e.status,u))}}).catch(e=>(0,eg._d)(e)?h.__internal_navigateWithError("..",e.errors[0]):s(e))},onResendCodeClicked:()=>{p||t.prepareFirstFactor(e.factor).then(()=>e.onFactorPrepare()).catch(e=>(0,$.H4)(e,[],r.setError))},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:t.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,showAlternativeMethods:e.showAlternativeMethods,onIdentityPreviewEditClicked:()=>n("../"),onBackLinkClicked:e.onBackLinkClicked})},eQ=e=>(0,o.Y)(p.n.Part,{part:"emailCode",children:(0,o.Y)(eX,{...e,cardTitle:(0,v.G)("signIn.emailCode.title"),cardSubtitle:(0,v.G)("signIn.emailCode.subtitle"),inputLabel:(0,v.G)("signIn.emailCode.formTitle"),resendButton:(0,v.G)("signIn.emailCode.resendButton")})}),e0=e=>{let{t}=(0,W._)(),r=(0,A.f0)(),n=(0,x.n)(),i=(0,d.r)(),{signInUrl:a}=i,{navigate:c}=(0,U.r)(),{afterSignInUrl:u}=(0,d.r)(),{setActive:h}=(0,s.ho)(),{startEmailLinkFlow:f,cancelEmailLinkFlow:g}=(0,ek.u)(n),[m,I]=l.useState(!1),_=(0,s.ho)();l.useEffect(()=>{w()},[]);let w=()=>{f({emailAddressId:e.factor.emailAddressId,redirectUrl:(0,eY.lA)({ctx:i,baseUrl:a,intent:"sign-in"})}).then(e=>S(e)).catch(e=>{if((0,eg._d)(e))return _.__internal_navigateWithError("..",e.errors[0]);(0,$.H4)(e,[],r.setError)})},S=async e=>{let n=e.firstFactorVerification;"expired"===n.status?r.setError(t((0,v.G)("formFieldError__verificationLinkExpired"))):n.verifiedFromTheSameClient()?I(!0):await b(e)},b=async e=>"complete"===e.status?h({session:e.createdSessionId,redirectUrl:u}):"needs_second_factor"===e.status?c("../factor-two"):void 0;return m?(0,o.Y)(eb.$,{title:(0,v.G)("signIn.emailLink.verifiedSwitchTab.titleNewTab"),subtitle:(0,v.G)("signIn.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,o.Y)(p.n.Part,{part:"emailLink",children:(0,o.Y)(ev._,{cardTitle:(0,v.G)("signIn.emailLink.title"),cardSubtitle:(0,v.G)("signIn.emailLink.subtitle"),formTitle:(0,v.G)("signIn.emailLink.formTitle"),formSubtitle:(0,v.G)("signIn.emailLink.formSubtitle"),resendButton:(0,v.G)("signIn.emailLink.resendButton"),onResendCodeClicked:()=>{g(),w()},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:n.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked})})};var e1=r(7420);let e6=(0,A.dm)((n=(a=()=>{let e=(0,d.r)(),{displayConfig:t}=(0,K.O)(),r=(0,s.ho)().client.signIn;if(!eq(r.supportedFirstFactors))return null;let n=r.supportedFirstFactors.map(e=>({id:e.enterpriseConnectionId,name:e.enterpriseConnectionName}));return(0,o.Y)(p.n.Part,{part:"enterpriseConnections",children:(0,o.Y)(e1.l,{title:(0,v.G)("signIn.enterpriseConnections.title"),subtitle:(0,v.G)("signIn.enterpriseConnections.subtitle"),onClick:n=>{let i=(0,eY.uP)(e,t.signInUrl),a=e.afterSignInUrl||"/";return r.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:i,redirectUrlComplete:a,oidcPrompt:e.oidcPrompt,continueSignIn:!0,enterpriseConnectionId:n})},enterpriseConnections:n})})}).displayName||a.name||"Component",a.displayName=n,(i=e=>{let t=(0,x.n)(),r=(0,d.r)();return(0,S.RE)(a,()=>!eq(t.supportedFirstFactors),({clerk:e})=>r.signInUrl||e.buildSignInUrl(),"There are no enterprise connections available to sign-in. Clerk is redirecting to the `signInUrl` instead.")(e)}).displayName=`withEnterpriseConnectionsGuard(${n})`,i)),e4=e=>(0,o.Y)(p.n.Part,{part:"resetPassword",children:(0,o.Y)(eX,{...e,showAlternativeMethods:!1,cardTitle:(0,v.G)("signIn.forgotPassword.title"),inputLabel:(0,v.G)("signIn.forgotPassword.formTitle"),resendButton:(0,v.G)("signIn.forgotPassword.resendButton")})});var e2=r(196);let e5=e=>{let{onShowAlternativeMethodsClick:t}=e,r=(0,A.f0)(),n=(0,x.n)(),{navigate:i}=(0,U.r)(),[a,s]=l.useState(!1),c=l.useCallback(()=>s(e=>!e),[s]),d=eV(()=>i("../factor-two"));return a?(0,o.Y)(eh.n,{onBackLinkClick:c}):(0,o.Y)(p.n.Part,{part:"password",children:(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(b.In,{elementDescriptor:Y.$z.passkeyIcon,icon:eR.A,sx:e=>({color:e.colors.$neutralAlpha500,marginInline:"auto",paddingBottom:e.sizes.$1,width:e.sizes.$12,height:e.sizes.$12})}),(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.passkey.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.passkey.subtitle")}),(0,o.Y)(e2.$,{identifier:n.identifier,avatarUrl:n.userData.imageUrl,onClick:()=>i("../")})]}),(0,o.Y)(C.Z.Alert,{children:r.error}),(0,o.FD)(b.so,{direction:"col",elementDescriptor:Y.$z.main,gap:4,children:[(0,o.Y)(O.l.Root,{onSubmit:e=>(e.preventDefault(),d()),gap:8,children:(0,o.Y)(O.l.SubmitButton,{hasArrow:!0})}),(0,o.Y)(C.Z.Action,{elementId:t?"alternativeMethods":"havingTrouble",children:(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)(t?"footerActionLink__useAnotherMethod":"signIn.alternativeMethods.actionLink"),onClick:t||c})})]})]}),(0,o.Y)(C.Z.Footer,{})]})})},e9=e=>{let{onShowAlternativeMethodsClick:t,onPasswordError:r}=e,n=l.useRef(null),i=(0,A.f0)(),{setActive:a}=(0,s.ho)(),c=(0,x.n)(),{afterSignInUrl:u,navigateOnSetActive:h}=(0,d.r)(),f=(0,q.p)(),g=(e=>{let{onForgotPasswordMethodClick:t,onShowAlternativeMethodsClick:r}=e,n=eN(),i=(0,Z.tJ)("password","",{type:"password",label:(0,v.G)("formFieldLabel__password"),placeholder:(0,v.G)("formFieldInputPlaceholder__password")});return{...i,props:{...i.props,actionLabel:n||r?(0,v.G)("formFieldAction__forgotPassword"):"",onActionClicked:t||r||(()=>null)}}})(e),{navigate:m}=(0,U.r)(),[I,_]=l.useState(!1),w=l.useCallback(()=>_(e=>!e),[_]),S=(0,s.ho)();return I?(0,o.Y)(eh.n,{onBackLinkClick:w}):(0,o.Y)(p.n.Part,{part:"password",children:(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.password.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.password.subtitle")}),(0,o.Y)(e2.$,{identifier:c.identifier,avatarUrl:c.userData.imageUrl,onClick:()=>{m("../")}})]}),(0,o.Y)(C.Z.Alert,{children:i.error}),(0,o.FD)(b.so,{direction:"col",elementDescriptor:Y.$z.main,gap:4,children:[(0,o.FD)(O.l.Root,{onSubmit:e=>{e.preventDefault(),c.attemptFirstFactor({strategy:"password",password:g.value}).then(e=>{switch(e.status){case"complete":return a({session:e.createdSessionId,navigate:({session:e})=>h({session:e,redirectUrl:u})});case"needs_second_factor":return m("../factor-two");case"needs_client_trust":return m("../client-trust");default:return console.error((0,z.s)(e.status,f))}}).catch(e=>{if((0,eg._d)(e))return S.__internal_navigateWithError("..",e.errors[0]);if(r){if((0,eg.Au)(e)){i.setError({...e.errors[0],code:"form_password_pwned__sign_in"}),r("pwned");return}if((0,eg.qY)(e)){i.setError({...e.errors[0],code:"form_password_compromised__sign_in"}),r("compromised");return}}(0,$.H4)(e,[g],i.setError),setTimeout(()=>n.current?.focus(),0)})},gap:8,children:[(0,o.Y)("input",{readOnly:!0,id:"identifier-field",name:"identifier",value:c.identifier||"",style:{display:"none"}}),(0,o.Y)(O.l.ControlRow,{elementId:g.id,children:(0,o.Y)(O.l.PasswordInput,{...g.props,ref:n,autoFocus:!0})}),(0,o.Y)(O.l.SubmitButton,{hasArrow:!0})]}),(0,o.Y)(C.Z.Action,{elementId:t?"alternativeMethods":"havingTrouble",children:(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)(t?"signIn.password.actionLink":"signIn.alternativeMethods.actionLink"),onClick:t||w})})]})]}),(0,o.Y)(C.Z.Footer,{})]})})},e8=e=>(0,o.Y)(p.n.Part,{part:"phoneCode",children:(0,o.Y)(eX,{...e,cardTitle:(0,v.G)("signIn.phoneCode.title"),cardSubtitle:(0,v.G)("signIn.phoneCode.subtitle"),inputLabel:(0,v.G)("signIn.phoneCode.formTitle"),resendButton:(0,v.G)("signIn.phoneCode.resendButton")})}),e3=e=>{if(!e)return"";let t=e.strategy;return"emailAddressId"in e&&(t+=e.emailAddressId),"phoneNumberId"in e&&(t+=e.phoneNumberId),"channel"in e&&(t+=e.channel),t},e7=(0,S.RL)((0,S.SY)((0,A.dm)(function(){let{__internal_setActiveInProgress:e}=(0,s.ho)(),t=(0,x.n)(),{preferredSignInStrategy:r}=(0,K.O)().displayConfig,n=t.supportedFirstFactors,i=(0,U.r)(),a=(0,A.f0)(),{supportedFirstFactors:c,firstFactorVerification:d}=(0,x.n)(),u=l.useRef(""),[{currentFactor:h},p]=l.useState(()=>{let e=(0,eI.xf)(n,t.identifier,r);return e?.strategy==="phone_code"&&d.channel&&"sms"!==d.channel&&(e.channel=d.channel),{currentFactor:e,prevCurrentFactor:void 0}}),{hasAnyStrategy:f}=(0,eP.y)({filterOutFactor:h,supportedFirstFactors:c}),[g,m]=l.useState(()=>!h||!(0,eI.Cm)(h)),I=eN(),[_,w]=l.useState(!1),[S,b]=l.useState(null);if(l.useEffect(()=>{e||("needs_identifier"===t.status||null===t.status)&&i.navigate("../")},[e]),!h)return t.status?(0,o.Y)(eU.J,{cardTitle:(0,v.G)("signIn.noAvailableMethods.title"),cardSubtitle:(0,v.G)("signIn.noAvailableMethods.subtitle"),message:(0,v.G)("signIn.noAvailableMethods.message")}):(0,o.Y)(el.B,{});let Y=f?()=>m(e=>!e):void 0,k=()=>w(e=>!e),C=()=>{u.current=e3(h)},F=e=>{p(t=>({currentFactor:e,prevCurrentFactor:t.currentFactor}))};if(eq(t.supportedFirstFactors))return(0,o.Y)(e6,{});if(g||_){let e=(0,eI.Cm)(h),t=g?Y:k;return(0,o.Y)(eZ,{mode:_?"pwned"===S?"pwned":"compromised"===S?"passwordCompromised":"forgot":"default",onBackLinkClick:e?()=>{a.setError(void 0),b(null),t?.()}:void 0,onFactorSelected:e=>{F(e),t?.()},currentFactor:h})}if(!h)return(0,o.Y)(el.B,{});switch(h?.strategy){case"passkey":return(0,o.Y)(e5,{onFactorPrepare:C,onShowAlternativeMethodsClick:Y});case"password":return(0,o.Y)(e9,{onForgotPasswordMethodClick:I?k:Y,onShowAlternativeMethodsClick:Y,onPasswordError:e=>{b(e),k()}});case"email_code":return(0,o.Y)(eQ,{factorAlreadyPrepared:u.current===e3(h),onFactorPrepare:C,factor:h,onShowAlternativeMethodsClicked:Y});case"phone_code":if(h.channel&&"sms"!==h.channel)return(0,o.Y)(eJ,{factorAlreadyPrepared:u.current===e3(h),onFactorPrepare:C,factor:h,onChangePhoneCodeChannel:F});return(0,o.Y)(e8,{factorAlreadyPrepared:u.current===e3(h),onFactorPrepare:C,factor:h,onShowAlternativeMethodsClicked:Y});case"email_link":return(0,o.Y)(e0,{factorAlreadyPrepared:u.current===e3(h),onFactorPrepare:C,factor:h,onShowAlternativeMethodsClicked:Y});case"reset_password_phone_code":return(0,o.Y)(e4,{factorAlreadyPrepared:u.current===e3(h),onFactorPrepare:C,factor:h,onShowAlternativeMethodsClicked:Y,onBackLinkClicked:()=>{p(e=>({currentFactor:e.prevCurrentFactor,prevCurrentFactor:e.currentFactor})),k()},cardSubtitle:(0,v.G)("signIn.forgotPassword.subtitle_phone")});case"reset_password_email_code":return(0,o.Y)(e4,{factorAlreadyPrepared:u.current===e3(h),onFactorPrepare:C,factor:h,onShowAlternativeMethodsClicked:Y,onBackLinkClicked:()=>{p(e=>({currentFactor:e.prevCurrentFactor,prevCurrentFactor:e.currentFactor})),k()},cardSubtitle:(0,v.G)("signIn.forgotPassword.subtitle_email")});default:return(0,o.Y)(el.B,{})}}))),te=e=>{let{onShowAlternativeMethodsClicked:t}=e,r=(0,x.n)(),{afterSignInUrl:n,navigateOnSetActive:i}=(0,d.r)(),{setActive:a}=(0,s.ho)(),{navigate:l}=(0,U.r)(),c=(0,q.p)(),u=(0,A.f0)(),h=(0,Z.tJ)("code","",{type:"text",label:(0,v.G)("formFieldLabel__backupCode"),isRequired:!0}),p=(0,s.ho)(),f=e=>(0,eI.Kw)(e.firstFactorVerification?.strategy)&&e.firstFactorVerification?.status==="verified";return(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.backupCodeMfa.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:f(r)?(0,v.G)("signIn.forgotPassword.subtitle"):(0,v.G)("signIn.backupCodeMfa.subtitle")})]}),(0,o.Y)(C.Z.Alert,{children:u.error}),(0,o.Y)(b.fv,{elementDescriptor:Y.$z.main,gap:8,children:(0,o.FD)(O.l.Root,{onSubmit:e=>(e.preventDefault(),r.attemptSecondFactor({strategy:"backup_code",code:h.value}).then(e=>{if("complete"!==e.status)return console.error((0,z.s)(e.status,c));if(f(e)&&e.createdSessionId){let t=new URLSearchParams;return t.set("createdSessionId",e.createdSessionId),l(`../reset-password-success?${t.toString()}`)}return a({session:e.createdSessionId,navigate:async({session:e})=>{await i({session:e,redirectUrl:n})}})}).catch(e=>{if((0,eg._d)(e))return p.__internal_navigateWithError("..",e.errors[0]);(0,$.H4)(e,[h],u.setError)})),children:[(0,o.Y)(O.l.ControlRow,{elementId:h.id,children:(0,o.Y)(O.l.PlainInput,{...h.props,autoFocus:!0,onActionClicked:t})}),(0,o.FD)(b.fv,{gap:3,children:[(0,o.Y)(O.l.SubmitButton,{hasArrow:!0}),(0,o.Y)(C.Z.Action,{elementId:"alternativeMethods",children:t&&(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("footerActionLink__useAnotherMethod"),onClick:t})})]})]})})]}),(0,o.Y)(C.Z.Footer,{})]})},tt=e=>(0,o.Y)(p.n.Part,{part:"totp2Fa",children:(0,o.Y)(ew,{...e,cardTitle:(0,v.G)("signIn.totpMfa.title"),cardSubtitle:(0,v.G)("signIn.totpMfa.subtitle"),inputLabel:(0,v.G)("signIn.totpMfa.formTitle")})}),tr=(0,S.RL)((0,S.SY)((0,A.dm)(function(){let e=(0,x.n)(),{currentFactor:t,factorAlreadyPrepared:r,handleFactorPrepare:n,selectFactor:i,showAllStrategies:a,toggleAllStrategies:s}=(0,eF.j)(e.supportedSecondFactors);if(!t)return(0,o.Y)(el.B,{});if(a)return(0,o.Y)(ep,{onBackLinkClick:s,onFactorSelected:i});switch(t?.strategy){case"phone_code":return(0,o.Y)(eA,{factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});case"totp":return(0,o.Y)(tt,{factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});case"backup_code":return(0,o.Y)(te,{onShowAlternativeMethodsClicked:s});case"email_code":return(0,o.Y)(eS,{factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});case"email_link":return(0,o.Y)(eC,{factorAlreadyPrepared:r,onFactorPrepare:n,factor:t,onShowAlternativeMethodsClicked:s});default:return(0,o.Y)(el.B,{})}})));var tn=r(6126);let ti=(0,S.RL)((0,S.SY)(tn.F));var ta=r(4670),to=r(2620),ts=r(6760),tl=r(958),tc=r(1959),td=r(6142),tu=r(4901),th=r(2229),tp=r(2216);let tf=e=>{let{handleSubmit:t,phoneNumberFormState:r,onUseAnotherMethod:n,phoneCodeProvider:i}=e,{providerToDisplayData:a,strategyToDisplayData:s}=(0,tp.k)(),l=i.name,c=i.channel,d=(0,A.f0)();return(0,o.Y)(C.Z.Root,{children:(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,showDivider:!0,children:[(0,o.Y)(b.fv,{center:!0,children:(0,o.Y)(b._V,{src:a[c]?.iconUrl,alt:`${s[c].name} logo`,sx:e=>({width:e.sizes.$7,height:e.sizes.$7,maxWidth:"100%",marginBottom:e.sizes.$6})})}),(0,o.Y)(F.Y.Title,{localizationKey:(0,v.G)("signIn.start.alternativePhoneCodeProvider.title",{provider:l})}),(0,o.Y)(F.Y.Subtitle,{localizationKey:(0,v.G)("signIn.start.alternativePhoneCodeProvider.subtitle",{provider:l})})]}),(0,o.Y)(C.Z.Alert,{children:d.error}),(0,o.Y)(b.so,{direction:"col",elementDescriptor:Y.$z.main,gap:6,children:(0,o.FD)(O.l.Root,{onSubmit:t,gap:8,children:[(0,o.Y)(b.fv,{gap:6,children:(0,o.Y)(O.l.ControlRow,{elementId:"phoneNumber",children:(0,o.Y)(O.l.PhoneInput,{...r.props,label:(0,v.G)("signIn.start.alternativePhoneCodeProvider.label",{provider:l}),isRequired:!0,isOptional:!1,actionLabel:void 0,onActionClicked:void 0})})}),(0,o.FD)(b.fv,{center:!0,children:[(0,o.Y)(td.j,{}),(0,o.Y)(b.fv,{gap:6,sx:{width:"100%"},children:(0,o.Y)(O.l.SubmitButton,{hasArrow:!0,localizationKey:(0,v.G)("formButtonPrimary")})})]}),(0,o.Y)(b.fv,{center:!0,children:(0,o.Y)(b.$n,{variant:"link",colorScheme:"neutral",onClick:n,localizationKey:(0,v.G)("signIn.start.alternativePhoneCodeProvider.actionLink")})})]})})]})})},tg=e=>!!e.supportedFirstFactors?.length&&e.supportedFirstFactors.every(e=>"enterprise_sso"===e.strategy),tm=({field:e})=>{let[t,r]=(0,l.useState)(!1),n=(0,l.useRef)(null),i=!!(t||e?.value);return((0,l.useLayoutEffect)(()=>{let e=setInterval(()=>{if(n?.current){let t="onAutoFillStart"===window.getComputedStyle(n.current,":autofill").animationName||!!n.current?.matches("*:-webkit-autofill");t&&(r(t),clearInterval(e))}},500);return()=>{clearInterval(e)}},[]),(0,l.useEffect)(()=>{e?.value&&""!==e.value&&r(!1)},[e?.value]),e)?(0,o.Y)(O.l.ControlRow,{elementId:e.id,sx:i?void 0:{position:"absolute",opacity:0,height:0,pointerEvents:"none",marginTop:"-1rem"},children:(0,o.Y)(O.l.PasswordInput,{...e.props,ref:n,tabIndex:i?void 0:-1})}):null},tI=(0,S.RL)((0,S.SY)((0,A.dm)(function(){let e=(0,A.f0)(),t=(0,s.ho)(),n=(0,tu.m)(),{displayConfig:i,userSettings:a,authConfig:c}=(0,K.O)(),u=(0,x.n)(),{navigate:h}=(0,U.r)(),f=(0,d.r)(),{afterSignInUrl:g,signUpUrl:m,waitlistUrl:I,isCombinedFlow:_,navigateOnSetActive:w}=f,S=(0,q.p)(),k=(0,th.F)(),y=(0,l.useMemo)(()=>(0,tc.E9)(a.enabledFirstFactorIdentifiers),[a.enabledFirstFactorIdentifiers]),P=a.alternativePhoneCodeChannels,{isWebAuthnAutofillSupported:E}=(()=>{let[e,t]=(0,l.useState)(!1),{navigate:r}=(0,U.r)(),n=eV(()=>r("factor-two")),{userSettings:i}=(0,K.O)(),{passkeySettings:a,attributes:o}=i;return(0,l.useEffect)(()=>{async function e(){let e=await (0,to.nn)();t(e),e&&await n({flow:"autofill"})}a.allow_autofill&&o.passkey?.enabled&&e()},[]),{isWebAuthnAutofillSupported:e}})(),D=eV(()=>h("factor-two")),L=(0,to.Bz)(),M=!!f.initialValues?.phoneNumber&&!(f.initialValues.emailAddress||f.initialValues.username)&&y.includes("phone_number"),[T,G]=(0,l.useState)(M?"phone_number":y[0]||""),[R,B]=(0,l.useState)(!1),N=(0,ta.n)("__clerk_ticket")||"",W=(0,ta.n)("__clerk_status")||"",V=a.enabledFirstFactorIdentifiers,H=a.web3FirstFactors,j=a.authenticatableSocialStrategies,J=a.instanceIsPasswordBased,{currentIdentifier:X,nextIdentifier:Q}=(0,tc.ZN)(y,T),ee=(0,Z.tJ)("password","",{type:"password",label:(0,v.G)("formFieldLabel__password"),placeholder:(0,v.G)("formFieldInputPlaceholder__password")}),[et,er]=(0,l.useState)(null),en=a.alternativePhoneCodeChannels.length>0,ei=f.initialValues||{},ea=(0,l.useMemo)(()=>({email_address:ei.emailAddress,email_address_username:ei.emailAddress||ei.username,username:ei.username,phone_number:ei.phoneNumber}),[f.initialValues]),eo=!!j.length||!!H.length||!!P.length,[es,ec]=(0,l.useState)(!(0,tl.X)()&&!eo),ed=(0,Z.tJ)("identifier",ea[T]||"",{...X,isRequired:!0,transformer:e=>e.trim()}),eu=(0,Z.tJ)("identifier",ea.phone_number||"",{...X,isRequired:!0}),eh="phone_number"===T?eu:ed;(0,l.useLayoutEffect)(()=>{if(eh.value.startsWith("+")&&y.includes("phone_number")&&"phone_number"!==T&&!R){var e;e=eh.value,ed.setValue(ea[T]||""),eu.setValue(e),G("phone_number"),ec(!0),B(!0)}},[eh.value,y]),(0,l.useEffect)(()=>{if(N){if("sign_up"===W){let e=new URLSearchParams;N&&e.set("__clerk_ticket",N),h(_?"create":m,{searchParams:e});return}n.setLoading(),e.setLoading(),u.create({strategy:"ticket",ticket:N}).then(e=>{switch(e.status){case"needs_first_factor":if(!tg(e)||eq(e.supportedFirstFactors))return h("factor-one");return ef();case"needs_second_factor":return h("factor-two");case"needs_client_trust":return h("client-trust");case"complete":return(0,ta.r)("__clerk_ticket"),t.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await w({session:e,redirectUrl:g})}});default:return void console.error((0,z.s)(e.status,S))}}).catch(e=>eg(e)).finally(()=>{tg(u)||(n.setIdle(),e.setIdle())})}},[]),(0,l.useEffect)(()=>{!async function(){let t=u?.firstFactorVerification?.error;if(t){switch(t.code){case eB.c.NOT_ALLOWED_TO_SIGN_UP:case eB.c.OAUTH_ACCESS_DENIED:case eB.c.NOT_ALLOWED_ACCESS:case eB.c.SAML_USER_ATTRIBUTE_MISSING:case eB.c.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:case eB.c.USER_LOCKED:case eB.c.EXTERNAL_ACCOUNT_NOT_FOUND:case eB.c.SIGN_UP_MODE_RESTRICTED:case eB.c.SIGN_UP_MODE_RESTRICTED_WAITLIST:case eB.c.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:case eB.c.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:case eB.c.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:case eB.c.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:case eB.c.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:case eB.c.CAPTCHA_INVALID:case eB.c.FRAUD_DEVICE_BLOCKED:case eB.c.FRAUD_ACTION_BLOCKED:case eB.c.SIGNUP_RATE_LIMIT_EXCEEDED:case eB.c.USER_BANNED:e.setError(t);break;default:e.setError("Unable to complete action at this time. If the problem persists please contact support.")}await u.create({})}}()},[]);let ep=async(...e)=>{let r=et?.channel||(0,eI.oj)(e,c.preferredChannels,"identifier");if(r){let t=()=>{};e.push({id:"strategy",value:"phone_code",clearFeedback:t,setValue:t,onChange:t,setError:t}),e.push({id:"channel",value:r,clearFeedback:t,setValue:t,onChange:t,setError:t})}try{var n;let r,i,o=await (i=u.create(((!(r=(n=e).some(e=>"password"===e.name&&!!e.value))||a.enterpriseSSO.enabled)&&(n=n.filter(e=>"password"!==e.name)),{...(0,Z.mK)(n),...r&&!a.enterpriseSSO.enabled&&{strategy:"password"}})),i.then(t=>{if(!a.enterpriseSSO.enabled)return t;let r=e.find(e=>"password"===e.name)?.value;return!r||t.supportedFirstFactors?.some(e=>"enterprise_sso"===e.strategy)?t:t.attemptFirstFactor({strategy:"password",password:r})}));switch(o.status){case"needs_identifier":o.supportedFirstFactors?.some(e=>"enterprise_sso"===e.strategy)&&await ef();break;case"needs_first_factor":if(!tg(o)||eq(o.supportedFirstFactors))return h("factor-one");return ef();case"needs_second_factor":return h("factor-two");case"needs_client_trust":return h("client-trust");case"complete":return t.setActive({session:o.createdSessionId,navigate:async({session:e})=>{await w({session:e,redirectUrl:g})}});default:return void console.error((0,z.s)(o.status,S))}}catch(e){return eg(e)}},ef=async()=>{let e=(0,eY.uP)(f,i.signInUrl),t=f.afterSignInUrl||"/";return u.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:e,redirectUrlComplete:t,oidcPrompt:f.oidcPrompt,continueSignIn:!0})},eg=async n=>{if(!n.errors)return;let o=n.errors.find(e=>e.code===eB.c.INVALID_STRATEGY_FOR_USER||e.code===eB.c.FORM_PASSWORD_INCORRECT||e.code===eB.c.FORM_PASSWORD_PWNED),s=n.errors.find(e=>e.code===eB.c.SESSION_EXISTS),l=n.errors.find(e=>"identifier_already_signed_in"===e.code),d=n.errors.find(e=>e.code===eB.c.INVITATION_ACCOUNT_NOT_EXISTS||e.code===eB.c.FORM_IDENTIFIER_NOT_FOUND);if(o)await ep(eh);else if(s)await t.setActive({session:t.client.lastActiveSessionId,navigate:async({session:e})=>{await w({session:e,redirectUrl:g})}});else if(l){let e=l.meta.sessionId;await t.setActive({session:e,navigate:async({session:e})=>{await w({session:e,redirectUrl:g})}})}else if(_&&d){let n=(0,eI.UY)(eh);if(a.signUp.mode===eB.f.WAITLIST)return h(t.buildWaitlistUrl("emailAddress"===n?{initialValues:{[n]:eh.value}}:{}));t.client.signUp[n]=eh.value;let o=(0,eY.uP)(f,i.signUpUrl),s=f.afterSignUpUrl||"/";return function({identifierAttribute:e,identifierValue:t,signUpMode:n,navigate:i,organizationTicket:a,afterSignUpUrl:o,clerk:s,handleError:l,redirectUrl:c,redirectUrlComplete:d,passwordEnabled:u,navigateOnSetActive:h,alternativePhoneCodeChannel:p}){var f,g;if(n===eB.f.WAITLIST)return i(s.buildWaitlistUrl("emailAddress"===e?{initialValues:{[e]:t}}:{}));s.client.signUp[e]=t;let m=new URLSearchParams;return(a&&m.set("__clerk_ticket",a),u||(f=s.client.signUp,g=e,f.optionalFields.filter(e=>!(e.startsWith("oauth_")||e.startsWith("web3_"))&&"enterprise_sso"!==e&&"password"!==e&&("phoneNumber"!==g||"phone_number"!==e)).length>0)||"emailAddress"!==e&&"phoneNumber"!==e)?i("create",{searchParams:m}):s.client.signUp.create({[e]:t,...p?{strategy:"phone_code",channel:p}:{}}).then(async e=>(await Promise.all([r.e("545"),r.e("666"),r.e("472")]).then(r.bind(r,8722)).then(e=>e.completeSignUpFlow))({signUp:e,verifyEmailPath:"create/verify-email-address",verifyPhonePath:"create/verify-phone-number",handleComplete:()=>s.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await h({session:e,redirectUrl:o})}}),navigate:i,redirectUrl:c,redirectUrlComplete:d})).catch(e=>l(e))}({afterSignUpUrl:f.afterSignUpUrl||"/",clerk:t,handleError:t=>(0,$.H4)(t,[eh,ee],e.setError),identifierAttribute:n,identifierValue:eh.value,navigate:h,organizationTicket:N,signUpMode:a.signUp.mode,redirectUrl:o,redirectUrlComplete:s,navigateOnSetActive:w,passwordEnabled:a.attributes.password?.required??!1,alternativePhoneCodeChannel:et?.channel||(0,eI.iy)(c.preferredChannels,n,eh.value)})}else(0,$.H4)(n,[eh,ee],e.setError)},em=async e=>(e.preventDefault(),ep(eh,ee)),e_=(0,l.useMemo)(()=>({tel:O.l.PhoneInput,password:O.l.PasswordInput,text:O.l.PlainInput,email:O.l.PlainInput})[eh.type],[eh.type]);if(n.isLoading||"sign_up"===W)return(0,o.Y)(el.B,{});let{action:ew,validLastAuthenticationStrategies:eS,...ev}=eh.props,eb=t.client?.lastAuthenticationStrategy,ek=!!eb&&k>1&&eS?.has(eb);return(0,o.Y)(p.n.Part,{part:"start",children:et?(0,o.Y)(tf,{handleSubmit:em,phoneNumberFormState:eu,onUseAnotherMethod:()=>{er(null)},phoneCodeProvider:et}):(0,o.FD)(C.Z.Root,{children:[(0,o.FD)(C.Z.Content,{children:[(0,o.FD)(F.Y.Root,{showLogo:!0,children:[(0,o.Y)(F.Y.Title,{localizationKey:_?(0,v.G)("signIn.start.titleCombined"):(0,v.G)("signIn.start.title")}),(0,o.Y)(F.Y.Subtitle,{localizationKey:_?(0,v.G)("signIn.start.subtitleCombined"):(0,v.G)("signIn.start.subtitle"),sx:{"&:empty":{display:"none"}}})]}),(0,o.Y)(C.Z.Alert,{children:e.error}),(0,o.FD)(b.fv,{elementDescriptor:Y.$z.main,gap:6,children:[(0,o.FD)(ts.U,{children:[eo&&(0,o.Y)(e$,{enableWeb3Providers:!0,enableOAuthProviders:!0,enableAlternativePhoneCodeProviders:en,onAlternativePhoneCodeProviderClick:e=>{er((0,eH.y)(e)||null)}}),V.length?(0,o.FD)(O.l.Root,{onSubmit:em,gap:8,children:[(0,o.FD)(b.fv,{gap:6,children:[(0,o.Y)(O.l.ControlRow,{elementId:eh.id,children:(0,o.Y)(e_,{actionLabel:Q?.action,onActionClicked:()=>{G(e=>y[(y.indexOf(e)+1)%y.length]),ec(!0),B(!1)},...ev,autoFocus:es,autoComplete:E?"webauthn":void 0,isLastAuthenticationStrategy:ek})}),(0,o.Y)(tm,{field:J?ee:void 0})]}),(0,o.FD)(b.fv,{center:!0,children:[(0,o.Y)(td.j,{}),(0,o.Y)(O.l.SubmitButton,{hasArrow:!0})]})]}):null]}),!V.length&&(0,o.Y)(td.j,{}),a.attributes.passkey?.enabled&&a.passkeySettings.show_sign_in_button&&L&&(0,o.Y)(C.Z.Action,{elementId:"usePasskey",children:(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("signIn.start.actionLink__use_passkey"),onClick:()=>D({flow:"discoverable"})})})]})]}),(0,o.FD)(C.Z.Footer,{children:[a.signUp.mode===eB.f.PUBLIC&&!_&&(0,o.FD)(C.Z.Action,{elementId:"signIn",children:[(0,o.Y)(C.Z.ActionText,{localizationKey:(0,v.G)("signIn.start.actionText")}),(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("signIn.start.actionLink"),to:t.buildUrlWithAuth(m)})]}),a.signUp.mode===eB.f.WAITLIST&&(0,o.FD)(C.Z.Action,{elementId:"signIn",children:[(0,o.Y)(C.Z.ActionText,{localizationKey:(0,v.G)("signIn.start.actionText__join_waitlist")}),(0,o.Y)(C.Z.ActionLink,{localizationKey:(0,v.G)("signIn.start.actionLink__join_waitlist"),to:t.buildUrlWithAuth(I)})]})]})]})})})));function t_(){let e=(0,s.ho)();return l.useEffect(()=>{e.redirectToSignIn()},[]),null}function tw(){let e=(0,d.r)(),t=(0,u.X)();return(0,o.Y)(p.n.Root,{flow:"signIn",children:(0,o.FD)(I.d,{children:[(0,o.Y)(_.q,{path:"factor-one",children:(0,o.Y)(e7,{})}),(0,o.Y)(_.q,{path:"factor-two",children:(0,o.Y)(tr,{})}),(0,o.Y)(_.q,{path:"client-trust",children:(0,o.Y)(ey,{})}),(0,o.Y)(_.q,{path:"reset-password",children:(0,o.Y)(H,{})}),(0,o.Y)(_.q,{path:"reset-password-success",children:(0,o.Y)(X,{})}),(0,o.Y)(_.q,{path:"sso-callback",children:(0,o.Y)(ti,{signUpUrl:e.signUpUrl,signInUrl:e.signInUrl,signInForceRedirectUrl:e.afterSignInUrl,signUpForceRedirectUrl:e.afterSignUpUrl,continueSignUpUrl:e.signUpContinueUrl,transferable:e.transferable,firstFactorUrl:"../factor-one",secondFactorUrl:"../factor-two",resetPasswordUrl:"../reset-password"})}),(0,o.Y)(_.q,{path:"choose",children:(0,o.Y)(es,{})}),(0,o.Y)(_.q,{path:"choose-wallet",children:(0,o.Y)(E,{})}),(0,o.Y)(_.q,{path:"verify",children:(0,o.Y)(c.Y,{redirectUrlComplete:e.afterSignInUrl,redirectUrl:"../factor-two"})}),e.isCombinedFlow&&(0,o.FD)(_.q,{path:"create",children:[(0,o.Y)(_.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,o.Y)(T,{})}),(0,o.Y)(_.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,o.Y)(M,{})}),(0,o.Y)(_.q,{path:"sso-callback",children:(0,o.Y)(R,{signUpUrl:t.signUpUrl,signInUrl:t.signInUrl,signUpForceRedirectUrl:t.afterSignUpUrl,signInForceRedirectUrl:t.afterSignInUrl,secondFactorUrl:t.secondFactorUrl,continueSignUpUrl:"../continue",verifyEmailAddressUrl:"../verify-email-address",verifyPhoneNumberUrl:"../verify-phone-number"})}),(0,o.Y)(_.q,{path:"verify",children:(0,o.Y)(c.M,{redirectUrlComplete:t.afterSignUpUrl,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",continuePath:"../continue"})}),(0,o.FD)(_.q,{path:"continue",children:[(0,o.Y)(_.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,o.Y)(T,{})}),(0,o.Y)(_.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,o.Y)(M,{})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(B,{})})]}),(0,o.Y)(_.q,{path:"tasks",children:(0,o.Y)(m.JJ,{redirectUrlComplete:e.afterSignUpUrl})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(G,{})})]}),(0,o.Y)(_.q,{path:"tasks",children:(0,o.Y)(m.JJ,{redirectUrlComplete:e.afterSignInUrl})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(tI,{})}),(0,o.Y)(_.q,{children:(0,o.Y)(t_,{})})]})})}function tS(){let e=(0,d.r)(),t={componentName:"SignUp",emailLinkRedirectUrl:e.emailLinkRedirectUrl,ssoCallbackUrl:e.ssoCallbackUrl,forceRedirectUrl:e.signUpForceRedirectUrl,fallbackRedirectUrl:e.signUpFallbackRedirectUrl,signInUrl:e.signInUrl,unsafeMetadata:e.unsafeMetadata,...(0,D.C)({routing:e?.routing,path:e?.path})};return((e=!1)=>(0,f.s)(e?L:void 0,"preloadComponent",{staleTime:1/0}))(e.isCombinedFlow),(0,g.Z)(),(0,o.Y)(u.g.Provider,{value:t,children:(0,o.Y)(tw,{})})}tw.displayName="SignIn";let tv=(0,h.Z)(tS),tb=(0,h.Z)(tS),tY=e=>{let t={signUpUrl:`/${w.I}/sign-up`,waitlistUrl:`/${w.I}/waitlist`,...e};return(0,o.Y)(_.q,{path:"sign-in",children:(0,o.Y)(d.Q.Provider,{value:{componentName:"SignIn",...t,routing:"virtual",mode:"modal"},children:(0,o.Y)("div",{children:(0,o.Y)(tb,{...t,routing:"virtual"})})})})}},2690:function(e,t,r){r.d(t,{j:()=>o});var n=r(5074),i=r(5763);let a=e=>{if(!e)return"";let t=e.strategy;return"phoneNumberId"in e&&(t+=e.phoneNumberId),t};function o(e){let t=n.useRef(""),[r,o]=n.useState(()=>(0,i.R5)(e)),[s,l]=n.useState(!r),c=t.current===a(r);return{currentFactor:r,factorAlreadyPrepared:c,handleFactorPrepare:()=>{t.current=a(r)},selectFactor:e=>{o(e),l(!1)},showAllStrategies:s,toggleAllStrategies:()=>l(e=>!e)}}},5763:function(e,t,r){r.d(t,{Cm:()=>u,Kw:()=>f,R5:()=>h,UY:()=>g,iy:()=>I,oj:()=>m,xf:()=>c}),r(1044);var n=r(2620),i=r(7651),a=r(1959),o=r(8289);let s=e=>t=>"safeIdentifier"in t&&t.safeIdentifier===e;function l(e){if((0,n.Bz)()){let t=e.find(({strategy:e})=>"passkey"===e);if(t)return t}return null}function c(e,t,r){return e&&0!==e.length?r===a._o.Password?function(e,t){let r=l(e);if(r)return r;let n=e.sort(o.Kn)[0];return"password"===n.strategy?n:e.find(s(t))||n||null}(e,t):function(e,t){let r=l(e);if(r)return r;let n=e.sort(o.Ih),i=n.find(s(t));if(i)return i;let a=n[0];return"email_link"===a.strategy?a:e.find(s(t))||a||null}(e,t):null}let d=["passkey","email_code","password","phone_code","email_link"];function u(e){return!!e&&d.includes(e.strategy)}function h(e){if(!e||0===e.length)return null;let t=e.find(e=>"totp"===e.strategy);if(t)return t;let r=e.find(e=>"phone_code"===e.strategy);return r||e[0]}let p=["reset_password_phone_code","reset_password_email_code"],f=e=>!!e&&p.includes(e);function g(e){let t;return"tel"===e.type?"phoneNumber":(t=e.value,/^\S+@\S+\.\S+$/.test(t))?"emailAddress":"username"}let m=(e,t,r)=>{if(!t)return null;let n=e.find(e=>"strategy"===e.id)?.value;if(n&&"phone_code"!==n)return null;let a=e.find(e=>e.id===r)?.value;if(!a||!a?.startsWith("+"))return null;let o=(0,i.TV)(a,t);return"sms"===o?null:o},I=(e,t,r)=>{if(!e||!t||"phoneNumber"!==t||!r||!r?.startsWith("+"))return null;let n=(0,i.TV)(r,e);return"sms"===n?null:n}},4:function(e,t,r){r.d(t,{Q:()=>g,r:()=>m});var n=r(2166),i=r(8380),a=r(5580),o=r(4173),s=r(1210),l=r(5993),c=r(5074),d=r(8051),u=r(7697),h=r(2366),p=r(4964),f=r(2117);let g=(0,c.createContext)(null),m=()=>{let e=(0,c.useContext)(g),{navigate:t,basePath:r,startPath:m}=(0,p.r)(),{displayConfig:I,userSettings:_}=(0,u.O)(),{queryParams:w,queryString:S}=(0,p.r)(),v=_.signUp.mode,b=(0,h.II)(),Y=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let k="restricted"!==v&&!!(!b.signUpUrl&&b.signInUrl&&!(0,l.s)(b.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:C,mode:A,...F}=e,y=(0,c.useMemo)(()=>(0,f.tf)(S,n.u),[]),U=new i.n(b,{...F,signInFallbackRedirectUrl:F.signInFallbackRedirectUrl||F.fallbackRedirectUrl,signInForceRedirectUrl:F.signInForceRedirectUrl||F.forceRedirectUrl},w,A);delete F.fallbackRedirectUrl,delete F.forceRedirectUrl;let P=Y.buildUrlWithAuth(U.getAfterSignInUrl()),E=Y.buildUrlWithAuth(U.getAfterSignUpUrl()),D="path"===F.routing&&F.path||b.signInUrl||I.signInUrl,L=k?"path"===F.routing&&F.path||b.signUpUrl||I.signUpUrl:F.signUpUrl||b.signUpUrl||I.signUpUrl,M=F.waitlistUrl||b.waitlistUrl||I.waitlistUrl,T=U.getPreservedSearchParams();D=(0,o.kZ)({base:D,hashSearchParams:[w,T]},{stringify:!0}),L=(0,o.kZ)({base:L,hashSearchParams:[w,T]},{stringify:!0}),M=(0,o.kZ)({base:M,hashSearchParams:[w,T]},{stringify:!0});let G=U.toSearchParams().toString(),R=(0,d.aQ)({routing:F.routing,baseUrl:L,authQueryString:G,path:F.path,endpoint:k?"/create"+d.Vu:d.Vu}),B=(0,d.aQ)({routing:F.routing,baseUrl:L,authQueryString:G,path:F.path,endpoint:k?"/create"+d.aB:d.aB});k&&(L=(0,o.kZ)({base:D,hashPath:"/create",hashSearchParams:[w,T]},{stringify:!0}));let z=(0,o.kZ)({base:L,hashPath:"/continue"},{stringify:!0}),O=async({session:e,redirectUrl:n})=>{let i=e.currentTask;if(!i)return t(n);let o=(0,a.ru)(i);return t(`/${r+m+(k?"/create"+o:o)}`)},$=Y.session?.currentTask?Y.__internal_getOption("taskUrls")?.[Y.session?.currentTask.key]??(0,d.aQ)({routing:F.routing,baseUrl:D,authQueryString:G,path:F.path,endpoint:k?"/create"+(0,a.ru)(Y.session?.currentTask):(0,a.ru)(Y.session?.currentTask)}):null;return{...F,transferable:F.transferable??!0,oauthFlow:F.oauthFlow||"auto",componentName:C,signUpUrl:L,signInUrl:D,waitlistUrl:M,afterSignInUrl:P,afterSignUpUrl:E,emailLinkRedirectUrl:R,ssoCallbackUrl:B,navigateAfterSignIn:()=>t(P),signUpContinueUrl:z,queryParams:w,initialValues:{...F.initialValues,...y},authQueryString:G,isCombinedFlow:k,navigateOnSetActive:O,taskUrl:$}}},9599:function(e,t,r){r.d(t,{g:()=>a});var n=r(1210),i=r(4964);let a=()=>{let{navigate:e}=(0,i.r)(),t=(0,n.ho)();return{navigateAfterSignOut:()=>e(t.buildAfterSignOutUrl()),navigateAfterMultiSessionSingleSignOutUrl:()=>e(t.buildAfterMultiSessionSingleSignOutUrl()),afterSignOutUrl:t.buildAfterSignOutUrl(),afterMultiSessionSingleSignOutUrl:t.buildAfterMultiSessionSingleSignOutUrl()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["472"],{5763:function(e,r,t){t.d(r,{Cm:()=>u,Kw:()=>m,R5:()=>p,UY:()=>f,iy:()=>b,oj:()=>g,xf:()=>d}),t(1044);var i=t(2620),n=t(7651),a=t(1959),l=t(8289);let s=e=>r=>"safeIdentifier"in r&&r.safeIdentifier===e;function o(e){if((0,i.Bz)()){let r=e.find(({strategy:e})=>"passkey"===e);if(r)return r}return null}function d(e,r,t){return e&&0!==e.length?t===a._o.Password?function(e,r){let t=o(e);if(t)return t;let i=e.sort(l.Kn)[0];return"password"===i.strategy?i:e.find(s(r))||i||null}(e,r):function(e,r){let t=o(e);if(t)return t;let i=e.sort(l.Ih),n=i.find(s(r));if(n)return n;let a=i[0];return"email_link"===a.strategy?a:e.find(s(r))||a||null}(e,r):null}let c=["passkey","email_code","password","phone_code","email_link"];function u(e){return!!e&&c.includes(e.strategy)}function p(e){if(!e||0===e.length)return null;let r=e.find(e=>"totp"===e.strategy);if(r)return r;let t=e.find(e=>"phone_code"===e.strategy);return t||e[0]}let h=["reset_password_phone_code","reset_password_email_code"],m=e=>!!e&&h.includes(e);function f(e){let r;return"tel"===e.type?"phoneNumber":(r=e.value,/^\S+@\S+\.\S+$/.test(r))?"emailAddress":"username"}let g=(e,r,t)=>{if(!r)return null;let i=e.find(e=>"strategy"===e.id)?.value;if(i&&"phone_code"!==i)return null;let a=e.find(e=>e.id===t)?.value;if(!a||!a?.startsWith("+"))return null;let l=(0,n.TV)(a,r);return"sms"===l?null:l},b=(e,r,t)=>{if(!e||!r||"phoneNumber"!==r||!t||!t?.startsWith("+"))return null;let i=(0,n.TV)(t,e);return"sms"===i?null:i}},4753:function(e,r,t){t.r(r),t.d(r,{SignUp:()=>eN,SignUpContinue:()=>Q,SignUpModal:()=>eE,SignUpSSOCallback:()=>en,SignUpVerifyEmail:()=>ey,SignUpVerifyPhone:()=>eP,SignUpStart:()=>eb});var i=t(4518),n=t(1210),a=t(5074),l=t(5873),s=t(5350),o=t(5577),d=t(4607),c=t(7607),u=t(4096),p=t(7831),h=t(2265),m=t(4132),f=t(656),g=t(2861),b=t(8272),_=t(8920),U=t(29),v=t(6088),A=t(3269),S=t(6153),k=t(9236),Y=t(4964);let y=(0,a.lazy)(()=>Promise.all([t.e("545"),t.e("666"),t.e("188")]).then(t.bind(t,6464)).then(e=>({default:e.Web3SolanaWalletButtons}))),C=(0,f.p)((0,f.Ai)((0,A.dm)(()=>{let e=(0,n.ho)(),r=(0,A.f0)(),t=(0,Y.r)(),l=(0,s.X)();return(0,i.Y)(d.n.Part,{part:"chooseWallet",children:(0,i.FD)(v.Z.Root,{children:[(0,i.FD)(v.Z.Content,{children:[(0,i.FD)(S.Y.Root,{showLogo:!0,children:[(0,i.Y)(S.Y.Title,{localizationKey:(0,g.G)("signUp.web3Solana.title")}),(0,i.Y)(S.Y.Subtitle,{localizationKey:(0,g.G)("signUp.web3Solana.subtitle")})]}),(0,i.Y)(v.Z.Alert,{children:r.error}),(0,i.FD)(b.so,{direction:"col",gap:4,children:[(0,i.Y)(a.Suspense,{fallback:(0,i.Y)(b.so,{direction:"row",align:"center",justify:"center",sx:e=>({height:"100%",minHeight:e.sizes.$32}),children:(0,i.Y)(b.y$,{size:"lg",colorScheme:"primary",elementDescriptor:_.$z.spinner})}),children:(0,i.Y)(y,{web3AuthCallback:({walletName:i})=>e.authenticateWithWeb3({customNavigate:t.navigate,redirectUrl:l.afterSignUpUrl||"/",signUpContinueUrl:"continue",strategy:"web3_solana_signature",unsafeMetadata:l.unsafeMetadata,walletName:i}).catch(e=>(0,k.f)(e,r.setError))})}),(0,i.Y)(U.E,{boxElementDescriptor:_.$z.backRow,linkElementDescriptor:_.$z.backLink,onClick:()=>{t.navigate("../")}})]})]}),(0,i.Y)(v.Z.Footer,{})]})})})));var P=t(6980),w=t(6760),I=t(4468),N=t(8640),F=t(4557),E=t(7697),R=t(6324),q=t(4),G=t(78),T=t(2454),L=t(3832),D=t(6580),M=t(6142),B=t(7591);let O=e=>{let{handleSubmit:r,fields:t,formState:n,canToggleEmailPhone:a,onlyLegalAcceptedMissing:l=!1,handleEmailPhoneToggle:s}=e,{showOptionalFields:o}=(0,D.K)().parsedOptions,d=e=>("emailAddress"===e||"phoneNumber"===e)&&a?!!t[e]:!!t[e]&&(o||t[e]?.required);return(0,i.FD)(T.l.Root,{onSubmit:r,gap:8,children:[!l&&(0,i.FD)(b.fv,{gap:6,children:[(d("firstName")||d("lastName"))&&(0,i.FD)(T.l.ControlRow,{elementId:"name",sx:{[B.g.sm]:{flexWrap:"wrap"}},children:[d("firstName")&&(0,i.Y)(T.l.PlainInput,{...n.firstName.props,isRequired:t.firstName?.required,isOptional:!t.firstName?.required}),d("lastName")&&(0,i.Y)(T.l.PlainInput,{...n.lastName.props,isRequired:t.lastName?.required,isOptional:!t.lastName?.required})]}),d("username")&&(0,i.Y)(T.l.ControlRow,{elementId:"username",children:(0,i.Y)(T.l.PlainInput,{...n.username.props,isRequired:t.username?.required,isOptional:!t.username?.required})}),d("emailAddress")&&(0,i.Y)(T.l.ControlRow,{elementId:"emailAddress",children:(0,i.Y)(T.l.PlainInput,{...n.emailAddress.props,isRequired:t.emailAddress?.required,isOptional:!t.emailAddress?.required,isDisabled:t.emailAddress?.disabled,actionLabel:a?(0,g.G)("signUp.start.actionLink__use_phone"):void 0,onActionClicked:a?()=>s("phoneNumber"):void 0})}),d("phoneNumber")&&(0,i.Y)(T.l.ControlRow,{elementId:"phoneNumber",children:(0,i.Y)(T.l.PhoneInput,{...n.phoneNumber.props,isRequired:t.phoneNumber?.required,isOptional:!t.phoneNumber?.required,actionLabel:a?(0,g.G)("signUp.start.actionLink__use_email"):void 0,onActionClicked:a?()=>s("emailAddress"):void 0})}),d("password")&&(0,i.Y)(T.l.ControlRow,{elementId:"password",children:(0,i.Y)(T.l.PasswordInput,{...n.password.props,isRequired:t.password?.required,isOptional:!t.password?.required})})]}),(0,i.FD)(b.fv,{center:!0,children:[(0,i.Y)(M.j,{}),(0,i.FD)(b.fv,{gap:6,sx:{width:"100%"},children:[d("legalAccepted")&&(0,i.Y)(T.l.ControlRow,{elementId:"legalAccepted",children:(0,i.Y)(L.d,{...n.legalAccepted.props,isRequired:t.legalAccepted?.required})}),(0,i.Y)(T.l.SubmitButton,{hasArrow:!0,localizationKey:(0,g.G)("formButtonPrimary")})]})]})]})};var Z=t(1044);let x=["emailAddress","phoneNumber","username","firstName","lastName","password","ticket","legalAccepted"];function V(e){return x.reduce((r,t)=>{let i=function(e,r){switch(e){case"emailAddress":return function({attributes:e,hasTicket:r,hasEmail:t,activeCommIdentifierType:i,isProgressiveSignUp:n}){if(n){if(!((!r||r&&t)&&e.email_address?.enabled)||K(e,n)&&"emailAddress"!==i)return;let{emailShouldBeRequired:a}=$(e);return{required:a,disabled:!!r&&!!t}}if((!r||r&&t)&&e.email_address?.enabled&&e.email_address?.used_for_first_factor&&"emailAddress"===i)return{required:!0,disabled:!!r&&!!t}}(r);case"phoneNumber":return function({attributes:e,hasTicket:r,activeCommIdentifierType:t,isProgressiveSignUp:i}){if(i){if(!e.phone_number?.enabled||K(e,i)&&"phoneNumber"!==t)return;let{phoneShouldBeRequired:r}=$(e);return{required:r}}if(!r&&e.phone_number?.enabled&&e.phone_number.used_for_first_factor&&"phoneNumber"===t)return{required:!0}}(r);case"password":var t=r.attributes;if(t.password?.enabled&&t.password.required)return{required:!!t.password?.required};return;case"ticket":var i=r.hasTicket;if(i)return{required:!0};return;case"legalAccepted":var n=r.legalConsentRequired;if(n)return{required:!0};return;case"username":case"firstName":case"lastName":var a=e,l=r.attributes;let s=(0,Z.C8)(a);if(l[s]?.enabled)return{required:l[s]?.required};return;default:return}}(t,e);return i&&(r[t]=i),r},{})}let z=(e,r,t)=>{if(t?.emailAddress)return"emailAddress";if(t?.phoneNumber)return"phoneNumber";if(K(e,r))return"emailAddress";let{email_address:i,phone_number:n}=e;return(i?.enabled&&r?i.required:i?.used_for_first_factor)?"emailAddress":(n?.enabled&&r?n.required:n?.used_for_first_factor)?"phoneNumber":null};function K(e,r){let{email_address:t,phone_number:i}=e;return!!(r?t?.enabled&&i?.enabled&&!t.required&&!i.required:t?.used_for_first_factor&&i?.used_for_first_factor)}let W={mirrorServer:[e=>!e.passwordRequired,e=>e.email.required||e.phone.required||e.username.required&&e.username.firstFactor],none:[e=>!e.email.enabled&&!e.phone.enabled&&!e.username.enabled],email:[e=>e.email.enabled&&!e.phone.enabled&&!e.username.enabled,e=>e.email.enabled&&!e.email.required&&e.phone.enabled&&!e.phone.required,e=>e.username.firstFactor&&!e.username.required&&e.email.enabled&&!e.email.required,e=>e.username.required&&!e.username.firstFactor&&e.email.enabled&&e.phone.enabled],phone:[e=>e.phone.enabled&&!e.email.required&&!e.phone.required,e=>e.username.firstFactor&&!e.username.required&&e.phone.enabled&&!e.phone.required,e=>e.phone.firstFactor&&!e.email.firstFactor&&!e.username.firstFactor,e=>e.username.required&&!e.username.firstFactor&&e.phone.enabled&&e.email.enabled,e=>!e.email.enabled&&e.phone.enabled&&e.username.enabled],username:[e=>e.username.enabled&&e.username.firstFactor&&!e.email.enabled&&!e.phone.enabled,e=>e.username.required&&!e.username.firstFactor&&e.email.enabled&&e.phone.enabled]};function $(e){let r={passwordRequired:!!(e.password?.enabled&&e.password.required),email:{enabled:!!e.email_address?.enabled,required:!!e.email_address?.required,firstFactor:!!e.email_address?.used_for_first_factor},phone:{enabled:!!e.phone_number?.enabled,required:!!e.phone_number?.required,firstFactor:!!e.phone_number?.used_for_first_factor},username:{enabled:!!e.username?.enabled,required:!!e.username?.required,firstFactor:!!e.username?.used_for_first_factor}},t=e=>W[e].some(e=>e(r));if(t("mirrorServer"))return{emailShouldBeRequired:r.email.required,phoneShouldBeRequired:r.phone.required,usernameShouldBeRequired:r.username.required};if(t("none"))return{emailShouldBeRequired:!1,phoneShouldBeRequired:!1,usernameShouldBeRequired:!1};let i=t("email"),n=t("phone"),a=t("username");return!r.passwordRequired||i||n||a?{emailShouldBeRequired:i,phoneShouldBeRequired:n,usernameShouldBeRequired:a}:{emailShouldBeRequired:!0,phoneShouldBeRequired:!1,usernameShouldBeRequired:!1}}var H=t(44),J=t(3226);let X=a.memo(e=>{let r=(0,n.ho)(),{navigate:t}=(0,Y.r)(),a=(0,A.f0)(),l=(0,s.X)(),o=(0,R.B)(),d=l.ssoCallbackUrl,c=l.afterSignUpUrl||"/",u="popup"===l.oauthFlow||"auto"===l.oauthFlow&&(0,H.C)(),{continueSignUp:p=!1,onAlternativePhoneCodeProviderClick:h,...m}=e;return(0,i.Y)(J.V,{...m,showLastAuthenticationStrategy:!1,idleAfterDelay:!u,oauthCallback:r=>{if(u){let t=window.open("about:blank","","width=600,height=800"),i=setInterval(()=>{(!t||t.closed)&&(clearInterval(i),a.setIdle())},500);return o.authenticateWithPopup({strategy:r,redirectUrl:d,redirectUrlComplete:c,popup:t,continueSignUp:p,unsafeMetadata:l.unsafeMetadata,legalAccepted:e.legalAccepted,oidcPrompt:l.oidcPrompt}).catch(e=>(0,I.H4)(e,[],a.setError))}return o.authenticateWithRedirect({continueSignUp:p,redirectUrl:d,redirectUrlComplete:c,strategy:r,unsafeMetadata:l.unsafeMetadata,legalAccepted:e.legalAccepted,oidcPrompt:l.oidcPrompt}).catch(e=>(0,I.H4)(e,[],a.setError))},web3Callback:i=>"web3_solana_signature"===i?t(`choose-wallet?strategy=${i}`):r.authenticateWithWeb3({customNavigate:t,redirectUrl:c,signUpContinueUrl:"continue",unsafeMetadata:l.unsafeMetadata,strategy:i,legalAccepted:e.legalAccepted}).catch(e=>(0,k.f)(e,a.setError)),alternativePhoneCodeCallback:e=>{h?.(e)}})});var j=t(1687);let Q=(0,A.dm)(function(){let e=(0,A.f0)(),r=(0,n.ho)(),{navigate:t}=(0,Y.r)(),{displayConfig:l,userSettings:o}=(0,E.O)(),{attributes:c,usernameSettings:u}=o,{t:p,locale:h}=(0,G._)(),{afterSignUpUrl:m,signInUrl:f,unsafeMetadata:U,initialValues:k={},isCombinedFlow:y,navigateOnSetActive:C}=(0,s.X)(),T=(0,R.B)(),L=!!a.useContext(q.Q),D=!!(y&&L),M=o.signUp.progressive,[B,Z]=a.useState(z(c,o.signUp.progressive)),x=(0,s.X)(),W={firstName:(0,N.tJ)("firstName",k.firstName||"",{type:"text",label:(0,g.G)("formFieldLabel__firstName"),placeholder:(0,g.G)("formFieldInputPlaceholder__firstName")}),lastName:(0,N.tJ)("lastName",k.lastName||"",{type:"text",label:(0,g.G)("formFieldLabel__lastName"),placeholder:(0,g.G)("formFieldInputPlaceholder__lastName")}),emailAddress:(0,N.tJ)("emailAddress",k.emailAddress||T.emailAddress||"",{type:"email",label:(0,g.G)("formFieldLabel__emailAddress"),placeholder:(0,g.G)("formFieldInputPlaceholder__emailAddress")}),username:(0,N.tJ)("username",k.username||"",{type:"text",label:(0,g.G)("formFieldLabel__username"),placeholder:(0,g.G)("formFieldInputPlaceholder__username"),transformer:e=>e.trim(),buildErrorMessage:e=>(0,F.Z)(e,{t:p,locale:h,usernameSettings:u})}),phoneNumber:(0,N.tJ)("phoneNumber",k.phoneNumber||"",{type:"tel",label:(0,g.G)("formFieldLabel__phoneNumber"),placeholder:(0,g.G)("formFieldInputPlaceholder__phoneNumber")}),password:(0,N.tJ)("password","",{type:"password",label:(0,g.G)("formFieldLabel__password"),placeholder:(0,g.G)("formFieldInputPlaceholder__password"),validatePassword:!0}),legalAccepted:(0,N.tJ)("legalAccepted","",{type:"checkbox",label:"",defaultChecked:!1,isRequired:o.signUp.legal_consent_enabled||!1})},$=(0,a.useMemo)(()=>T.missingFields&&1===T.missingFields.length&&"legal_accepted"===T.missingFields[0]&&T.unverifiedFields&&0===T.unverifiedFields.length,[T.missingFields,T.unverifiedFields]);if((0,a.useEffect)(()=>{T.id||!0===r.__internal_setActiveInProgress||t(l.signUpUrl)},[]),!T.id)return(0,i.Y)(P.B,{});let H=!!W.emailAddress.value,J=T.verifications?.externalAccount?.status=="verified",Q=V({attributes:c,hasEmail:H,activeCommIdentifierType:B,signUp:T,isProgressiveSignUp:M,legalConsentRequired:o.signUp.legal_consent_enabled});!function(e,r){if(r){let t=!!r.emailAddress,i=r.verifications?.emailAddress?.status==="verified",n=r.verifications?.phoneNumber?.status==="verified",a=r.verifications?.externalAccount?.status==="verified",l=r.verifications?.web3Wallet?.status==="verified",s=null!==r.legalAcceptedAt;t&&i&&delete e.emailAddress,n&&delete e.phoneNumber,(a||l)&&delete e.password,r.firstName&&delete e.firstName,r.lastName&&delete e.lastName,r.username&&delete e.username,s&&delete e.legalAccepted,Object.entries(e).forEach(([r,t])=>{t&&!t.required&&delete e[r]})}}(Q,T);let ee=o.authenticatableSocialStrategies,er=async i=>{i.preventDefault();let n=Object.entries(Q).reduce((e,[r,t])=>[...e,...t&&W[r]?[W[r]]:[]],[]);U&&n.push({id:"unsafeMetadata",value:U});let a=!!n.find(e=>"emailAddress"===e.id)?.value,l=!!n.find(e=>"phoneNumber"===e.id)?.value;return T.missingFields.includes("email_address")&&T.missingFields.includes("phone_number")&&!a&&!l&&K(c,M)&&(n.push(W.emailAddress),n.push(W.phoneNumber)),e.setLoading(),e.setError(void 0),T.update((0,N.mK)(n)).then(e=>(0,j.A)({signUp:e,verifyEmailPath:"./verify-email-address",verifyPhonePath:"./verify-phone-number",handleComplete:()=>r.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await C({session:e,redirectUrl:m})}}),navigate:t,oidcPrompt:x.oidcPrompt})).catch(r=>(0,I.H4)(r,n,e.setError)).finally(()=>e.setIdle())},et=K(c,M),ei=!J&&ee.length>0,en=$?(0,g.G)("signUp.legalConsent.continue.title"):(0,g.G)("signUp.continue.title"),ea=$?(0,g.G)("signUp.legalConsent.continue.subtitle"):(0,g.G)("signUp.continue.subtitle");return(0,i.Y)(d.n.Part,{part:"complete",children:(0,i.FD)(v.Z.Root,{children:[(0,i.FD)(v.Z.Content,{children:[(0,i.FD)(S.Y.Root,{showLogo:!0,children:[(0,i.Y)(S.Y.Title,{localizationKey:en}),(0,i.Y)(S.Y.Subtitle,{localizationKey:ea})]}),(0,i.Y)(v.Z.Alert,{children:e.error}),(0,i.Y)(b.so,{direction:"col",elementDescriptor:_.$z.main,gap:8,children:(0,i.FD)(w.U,{children:[ei&&!$&&(0,i.Y)(X,{enableOAuthProviders:ei,enableWeb3Providers:!1,enableAlternativePhoneCodeProviders:!1,continueSignUp:!0}),(0,i.Y)(O,{handleSubmit:er,fields:Q,formState:W,onlyLegalAcceptedMissing:$,canToggleEmailPhone:et,handleEmailPhoneToggle:e=>{K(c,M)&&Z(e)}})]})})]}),(0,i.Y)(v.Z.Footer,{children:D?null:(0,i.FD)(v.Z.Action,{elementId:"signUp",children:[(0,i.Y)(v.Z.ActionText,{localizationKey:(0,g.G)("signUp.continue.actionText")}),(0,i.Y)(v.Z.ActionLink,{localizationKey:(0,g.G)("signUp.continue.actionLink"),to:D?"../../":r.buildUrlWithAuth(f)})]})})]})})});var ee=t(7420),er=t(7896);let et=(0,f.Ai)((0,A.dm)(()=>{let e=(0,n.ho)(),r=(0,s.X)(),t=e.client.signUp,{data:a,isLoading:l}=(0,er.s)(t?.__experimental_getEnterpriseConnections,{signUpId:t.id});return l||a?.length?(0,i.Y)(d.n.Part,{part:"enterpriseConnections",children:a?.length?(0,i.Y)(ee.l,{title:(0,g.G)("signUp.enterpriseConnections.title"),subtitle:(0,g.G)("signUp.enterpriseConnections.subtitle"),onClick:e=>{let i=r.ssoCallbackUrl,n=r.afterSignUpUrl||"/";return t.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:i,redirectUrlComplete:n,continueSignUp:!0,enterpriseConnectionId:e})},enterpriseConnections:a}):l?(0,i.Y)(P.B,{}):null}):null}));var ei=t(6126);let en=(0,f.p)((0,f.Ai)(ei.F));var ea=t(1652),el=t(3610),es=t(2166),eo=t(4670),ed=t(3990),ec=t(4901),eu=t(5763),ep=t(9426),eh=t(2782);let em=()=>{let e=(0,n.ho)(),r=(0,A.f0)(),{navigate:t}=(0,Y.r)(),{signInUrl:a,waitlistUrl:l}=(0,s.X)(),o=(0,ep.p)(),{userSettings:d}=(0,E.O)(),{mode:c}=d.signUp,u=async()=>{await t(e.buildUrlWithAuth(l))},p=c===es.f.RESTRICTED?(0,g.G)("signUp.restrictedAccess.subtitle"):(0,g.G)("signUp.restrictedAccess.subtitleWaitlist");return(0,i.FD)(v.Z.Root,{children:[(0,i.FD)(v.Z.Content,{children:[(0,i.FD)(S.Y.Root,{showLogo:!0,children:[(0,i.Y)(b.In,{icon:eh.A,sx:e=>({margin:"auto",width:e.sizes.$10,height:e.sizes.$10})}),(0,i.Y)(S.Y.Title,{localizationKey:(0,g.G)("signUp.restrictedAccess.title")}),(0,i.Y)(S.Y.Subtitle,{localizationKey:p})]}),(0,i.Y)(v.Z.Alert,{children:r.error}),c===es.f.RESTRICTED&&o&&(0,i.Y)(b.so,{direction:"col",gap:4,children:(0,i.Y)(b.$n,{localizationKey:(0,g.G)("signUp.restrictedAccess.blockButton__emailSupport"),onClick:()=>{window.location.href=`mailto:${o}`}})}),c===es.f.WAITLIST&&(0,i.Y)(b.so,{direction:"col",gap:4,children:(0,i.Y)(b.$n,{localizationKey:(0,g.G)("signUp.restrictedAccess.blockButton__joinWaitlist"),onClick:u})})]}),(0,i.Y)(v.Z.Footer,{children:(0,i.FD)(v.Z.Action,{elementId:"signUp",children:[(0,i.Y)(v.Z.ActionText,{localizationKey:(0,g.G)("signUp.restrictedAccess.actionText")}),(0,i.Y)(v.Z.ActionLink,{localizationKey:(0,g.G)("signUp.restrictedAccess.actionLink"),to:e.buildUrlWithAuth(a)})]})})]})};var ef=t(2216);let eg=e=>{let{handleSubmit:r,fields:t,formState:n,onUseAnotherMethod:a,phoneCodeProvider:l}=e,{providerToDisplayData:s,strategyToDisplayData:o}=(0,ef.k)(),d=l.name,c=l.channel,u=(0,A.f0)();return(0,i.Y)(v.Z.Root,{children:(0,i.FD)(v.Z.Content,{children:[(0,i.FD)(S.Y.Root,{showLogo:!0,showDivider:!0,children:[(0,i.Y)(b.fv,{center:!0,children:(0,i.Y)(b._V,{src:s[l.channel]?.iconUrl,alt:`${o[c].name} logo`,sx:e=>({width:e.sizes.$7,height:e.sizes.$7,maxWidth:"100%",marginBottom:e.sizes.$6})})}),(0,i.Y)(S.Y.Title,{localizationKey:(0,g.G)("signUp.start.alternativePhoneCodeProvider.title",{provider:d})}),(0,i.Y)(S.Y.Subtitle,{localizationKey:(0,g.G)("signUp.start.alternativePhoneCodeProvider.subtitle",{provider:d})})]}),(0,i.Y)(v.Z.Alert,{children:u.error}),(0,i.Y)(b.so,{direction:"col",elementDescriptor:_.$z.main,gap:6,children:(0,i.FD)(T.l.Root,{onSubmit:r,gap:8,children:[(0,i.Y)(b.fv,{gap:6,children:(0,i.Y)(T.l.ControlRow,{elementId:"phoneNumber",children:(0,i.Y)(T.l.PhoneInput,{...n.phoneNumber.props,label:(0,g.G)("signUp.start.alternativePhoneCodeProvider.label",{provider:d||""}),isRequired:!0,isOptional:!1,actionLabel:void 0,onActionClicked:void 0})})}),(0,i.FD)(b.fv,{center:!0,children:[(0,i.Y)(M.j,{}),(0,i.FD)(b.fv,{gap:6,sx:{width:"100%"},children:[!!t.legalAccepted&&t.legalAccepted?.required&&(0,i.Y)(T.l.ControlRow,{elementId:"legalAccepted",children:(0,i.Y)(L.d,{...n.legalAccepted.props,isRequired:t.legalAccepted?.required})}),(0,i.Y)(T.l.SubmitButton,{hasArrow:!0,localizationKey:(0,g.G)("formButtonPrimary")})]})]}),(0,i.Y)(b.fv,{center:!0,children:(0,i.Y)(b.$n,{variant:"link",colorScheme:"neutral",onClick:a,localizationKey:(0,g.G)("signUp.start.alternativePhoneCodeProvider.actionLink")})})]})})]})})},eb=(0,f.p)((0,f.Ai)((0,A.dm)(function(){let e=(0,A.f0)(),r=(0,n.ho)(),t=(0,ec.m)(),l=(0,R.B)(),{showOptionalFields:o}=(0,D.K)().parsedOptions,{userSettings:c,authConfig:u}=(0,E.O)(),{navigate:p}=(0,Y.r)(),{attributes:h}=c,{setActive:m}=(0,n.ho)(),f=(0,s.X)(),U=!!a.useContext(q.Q),{afterSignUpUrl:k,signInUrl:y,unsafeMetadata:C,navigateOnSetActive:T}=f,L=!!(f.isCombinedFlow&&U),[B,Z]=a.useState(()=>z(h,c.signUp.progressive,{phoneNumber:f.initialValues?.phoneNumber===null?void 0:f.initialValues?.phoneNumber,emailAddress:f.initialValues?.emailAddress===null?void 0:f.initialValues?.emailAddress,...L?{emailAddress:l.emailAddress,phoneNumber:l.phoneNumber}:{}})),{t:x,locale:W}=(0,G._)(),$=f.initialValues||{},[H,J]=a.useState(null),[Q,ee]=a.useState(!1),{userSettings:{passwordSettings:er,usernameSettings:et}}=(0,E.O)(),{mode:ei}=c.signUp,en={firstName:(0,N.tJ)("firstName",l.firstName||$.firstName||"",{type:"text",label:(0,g.G)("formFieldLabel__firstName"),placeholder:(0,g.G)("formFieldInputPlaceholder__firstName")}),lastName:(0,N.tJ)("lastName",l.lastName||$.lastName||"",{type:"text",label:(0,g.G)("formFieldLabel__lastName"),placeholder:(0,g.G)("formFieldInputPlaceholder__lastName")}),emailAddress:(0,N.tJ)("emailAddress",l.emailAddress||$.emailAddress||"",{type:"email",label:(0,g.G)("formFieldLabel__emailAddress"),placeholder:(0,g.G)("formFieldInputPlaceholder__emailAddress")}),username:(0,N.tJ)("username",l.username||$.username||"",{type:"text",label:(0,g.G)("formFieldLabel__username"),placeholder:(0,g.G)("formFieldInputPlaceholder__username"),transformer:e=>e.trim(),buildErrorMessage:e=>(0,F.Z)(e,{t:x,locale:W,usernameSettings:et})}),phoneNumber:(0,N.tJ)("phoneNumber",l.phoneNumber||$.phoneNumber||"",{type:"tel",label:(0,g.G)("formFieldLabel__phoneNumber"),placeholder:(0,g.G)("formFieldInputPlaceholder__phoneNumber")}),legalAccepted:(0,N.tJ)("legalAccepted","",{type:"checkbox",label:"",defaultChecked:!1,isRequired:c.signUp.legal_consent_enabled||!1}),password:(0,N.tJ)("password","",{type:"password",label:(0,g.G)("formFieldLabel__password"),placeholder:(0,g.G)("formFieldInputPlaceholder__password"),validatePassword:!0,buildErrorMessage:e=>(0,ed.C5)(e,{t:x,locale:W,passwordSettings:er})}),ticket:(0,N.tJ)("ticket",(0,eo.n)("__clerk_ticket")||(0,eo.n)("__clerk_invitation_token")||"")},ep=!!en.ticket.value,eh=!!(l.id&&null!==l.status&&((0,eo.n)("__clerk_ticket")||(0,eo.n)("__clerk_invitation_token"))),ef=!!en.emailAddress.value,eb=c.signUp.progressive,e_=c.signUp.legal_consent_enabled,eU=f.oidcPrompt,ev=V({attributes:h,hasTicket:ep||eh,hasEmail:ef,activeCommIdentifierType:B,isProgressiveSignUp:eb,legalConsentRequired:e_});a.useLayoutEffect(()=>{en.ticket.value&&(t.setLoading(),e.setLoading(),l.create({strategy:"ticket",ticket:en.ticket.value}).then(e=>{en.emailAddress.setValue(e.emailAddress||""),"missing_requirements"===e.status&&ee(!0);let r=f.ssoCallbackUrl,t=f.afterSignUpUrl||"/";return(0,j.A)({signUp:e,redirectUrl:r,redirectUrlComplete:t,verifyEmailPath:"verify-email-address",verifyPhonePath:"verify-phone-number",continuePath:"continue",handleComplete:()=>((0,eo.r)("__clerk_ticket"),(0,eo.r)("__clerk_invitation_token"),m({session:e.createdSessionId,navigate:async({session:e})=>{await T({session:e,redirectUrl:k})}})),navigate:p,oidcPrompt:eU})}).catch(r=>{en.ticket.setValue(""),(0,I.H4)(r,[],e.setError)}).finally(()=>{l.missingFields.some(e=>"enterprise_sso"===e)||(t.setIdle(),e.setIdle())}))},[]),a.useEffect(()=>{!async function(){let r=l.verifications.externalAccount.error;if(r){switch(r.code){case es.c.NOT_ALLOWED_TO_SIGN_UP:case es.c.OAUTH_ACCESS_DENIED:case es.c.NOT_ALLOWED_ACCESS:case es.c.SAML_USER_ATTRIBUTE_MISSING:case es.c.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:case es.c.USER_LOCKED:case es.c.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:case es.c.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:case es.c.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:case es.c.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:case es.c.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:case es.c.CAPTCHA_INVALID:case es.c.FRAUD_DEVICE_BLOCKED:case es.c.FRAUD_ACTION_BLOCKED:case es.c.SIGNUP_RATE_LIMIT_EXCEEDED:case es.c.USER_BANNED:e.setError(r);break;default:e.setError("Unable to complete action at this time. If the problem persists please contact support.")}await l.create({})}}()},[]);let eA=async r=>{r.preventDefault();let t=Object.entries(ev).reduce((e,[r,t])=>(e.push(...t&&en[r]?[en[r]]:[]),e),[]);if(C&&t.push({id:"unsafeMetadata",value:C}),ev.ticket||eh){let e=()=>{};if(t.push({id:"strategy",value:"ticket",clearFeedback:e,setValue:e,onChange:e,setError:e}),!en.ticket.value&&eh){let r=(0,eo.n)("__clerk_ticket")||(0,eo.n)("__clerk_invitation_token");r&&t.push({id:"ticket",value:r,clearFeedback:e,setValue:e,onChange:e,setError:e})}}let i=H?.channel||(0,eu.oj)(t,u.preferredChannels,"phoneNumber");if(i){let e=()=>{};t.push({id:"strategy",value:"phone_code",clearFeedback:e,setValue:e,onChange:e,setError:e}),t.push({id:"channel",value:i,clearFeedback:e,setValue:e,onChange:e,setError:e})}let n=!!t.find(e=>"emailAddress"===e.id)?.value,a=!!t.find(e=>"phoneNumber"===e.id)?.value;!n&&!a&&K(h,eb)&&(t.push(en.emailAddress),t.push(en.phoneNumber)),e.setLoading(),e.setError(void 0);let s=f.ssoCallbackUrl,o=f.afterSignUpUrl||"/";return(ev.ticket||eh?l.upsert((0,N.mK)(t)):l.create((0,N.mK)(t))).then(e=>(0,j.A)({signUp:e,verifyEmailPath:"verify-email-address",verifyPhonePath:"verify-phone-number",handleComplete:()=>m({session:e.createdSessionId,navigate:async({session:e})=>{await T({session:e,redirectUrl:k})}}),navigate:p,redirectUrl:s,redirectUrlComplete:o,oidcPrompt:eU})).catch(r=>(0,el.$R)(r)&&r.errors?.[0]?.code==="enterprise_connection_id_is_required_with_multiple_connections"?p("./enterprise-connections"):(0,I.H4)(r,t,e.setError)).finally(()=>e.setIdle())};if(t.isLoading)return(0,i.Y)(P.B,{});let eS=K(h,eb),ek=Object.entries(ev).filter(([e,r])=>o||r?.required),eY=function(e){let{authenticatableSocialStrategies:r,web3FirstFactors:t}=e;return e.hasValidAuthFactor||!r.length&&!t.length}(c)&&ek.length>0,ey=(!(ep||eh)||Q)&&c.authenticatableSocialStrategies.length>0,eC=!(ep||eh)&&c.web3FirstFactors.length>0,eP=!(ep||eh)&&c.alternativePhoneCodeChannels.length>0;return ei===es.f.PUBLIC||ep||eh?(0,i.Y)(d.n.Part,{part:"start",children:H?(0,i.Y)(eg,{handleSubmit:eA,fields:ev,formState:en,onUseAnotherMethod:()=>{J(null)},phoneCodeProvider:H}):(0,i.FD)(v.Z.Root,{children:[(0,i.FD)(v.Z.Content,{children:[(0,i.FD)(S.Y.Root,{showLogo:!0,children:[(0,i.Y)(S.Y.Title,{localizationKey:L?(0,g.G)("signUp.start.titleCombined"):(0,g.G)("signUp.start.title")}),(0,i.Y)(S.Y.Subtitle,{localizationKey:L?(0,g.G)("signUp.start.subtitleCombined"):(0,g.G)("signUp.start.subtitle")})]}),(0,i.Y)(v.Z.Alert,{children:e.error}),(0,i.FD)(b.so,{direction:"col",elementDescriptor:_.$z.main,gap:6,children:[(0,i.FD)(w.U,{children:[(ey||eC||eP)&&(0,i.Y)(X,{enableOAuthProviders:ey,enableWeb3Providers:eC,enableAlternativePhoneCodeProviders:eP,onAlternativePhoneCodeProviderClick:e=>{J((0,ea.y)(e)||null)},continueSignUp:Q,legalAccepted:!!en.legalAccepted.checked||void 0}),eY&&(0,i.Y)(O,{handleSubmit:eA,fields:ev,formState:en,canToggleEmailPhone:eS,handleEmailPhoneToggle:e=>{K(h,eb)&&Z(e)}})]}),!eY&&(0,i.Y)(M.j,{})]})]}),(0,i.Y)(v.Z.Footer,{children:(0,i.FD)(v.Z.Action,{elementId:"signUp",children:[(0,i.Y)(v.Z.ActionText,{localizationKey:(0,g.G)("signUp.start.actionText")}),(0,i.Y)(v.Z.ActionLink,{localizationKey:(0,g.G)("signUp.start.actionLink"),to:L?"../":r.buildUrlWithAuth(y)})]})})]})}):(0,i.Y)(em,{})})));var e_=t(7912);let eU=e=>{let{afterSignUpUrl:r,navigateOnSetActive:t,isCombinedFlow:l}=(0,s.X)(),{setActive:o}=(0,n.ho)(),{navigate:d}=(0,Y.r)(),c=!!(a.useContext(q.Q)&&l);return(0,i.Y)(e_.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,resendButton:e.resendButton,onCodeEntryFinishedAction:(i,n,a)=>{e.attempt(i).then(async e=>(await n(),(0,j.A)({signUp:e,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",continuePath:"../continue",handleComplete:()=>o({session:e.createdSessionId,navigate:async({session:e})=>{await t({session:e,redirectUrl:r})}}),navigate:d}))).catch(e=>a(e))},onResendCodeClicked:e.prepare,safeIdentifier:e.safeIdentifier,onIdentityPreviewEditClicked:()=>d(c?"../../":"../",{searchParams:(0,eo.t)()}),alternativeMethodsLabel:e.alternativeMethodsLabel,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,showAlternativeMethods:e.showAlternativeMethods})},ev=()=>{let e=(0,R.B)(),r=(0,A.f0)(),t=e.verifications.emailAddress.status,n=!e.status||"verified"===t;return(0,er.s)(n?void 0:()=>e.prepareEmailAddressVerification({strategy:"email_code"}),{name:"prepare",strategy:"email_code",number:e.emailAddress},{staleTime:100,onError:e=>(0,I.H4)(e,[],r.setError)}),(0,i.Y)(d.n.Part,{part:"emailCode",children:(0,i.Y)(eU,{cardTitle:(0,g.G)("signUp.emailCode.title"),cardSubtitle:(0,g.G)("signUp.emailCode.subtitle"),inputLabel:(0,g.G)("signUp.emailCode.formSubtitle"),resendButton:(0,g.G)("signUp.emailCode.resendButton"),prepare:()=>{if(!n)return e.prepareEmailAddressVerification({strategy:"email_code"}).catch(e=>(0,I.H4)(e,[],r.setError))},attempt:r=>e.attemptEmailAddressVerification({code:r}),safeIdentifier:e.emailAddress})})};var eA=t(2027),eS=t(4979),ek=t(2992);let eY=()=>{let{t:e}=(0,G._)(),r=(0,R.B)(),t=(0,s.X)(),{afterSignUpUrl:l,navigateOnSetActive:o}=t,c=(0,A.f0)(),{navigate:u}=(0,Y.r)(),{setActive:p}=(0,n.ho)(),[h,m]=a.useState(!1),{startEmailLinkFlow:f,cancelEmailLinkFlow:b}=(0,ek.u)(r);a.useEffect(()=>{_()},[]);let _=()=>f({redirectUrl:t.emailLinkRedirectUrl}).then(e=>U(e)).catch(e=>{(0,I.H4)(e,[],c.setError)}),U=async r=>{let t=r.verifications.emailAddress;"expired"===t.status?c.setError(e((0,g.G)("formFieldError__verificationLinkExpired"))):t.verifiedFromTheSameClient()?m(!0):await (0,j.A)({signUp:r,continuePath:"../continue",verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",handleComplete:()=>p({session:r.createdSessionId,navigate:async({session:e})=>{await o({session:e,redirectUrl:l})}}),navigate:u})};return h?(0,i.Y)(eS.$,{title:(0,g.G)("signUp.emailLink.verifiedSwitchTab.title"),subtitle:(0,g.G)("signUp.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,i.Y)(d.n.Part,{part:"emailLink",children:(0,i.Y)(eA._,{cardTitle:(0,g.G)("signUp.emailLink.title"),cardSubtitle:(0,g.G)("signUp.emailLink.subtitle"),formTitle:(0,g.G)("signUp.emailLink.formTitle"),formSubtitle:(0,g.G)("signUp.emailLink.formSubtitle"),resendButton:(0,g.G)("signUp.emailLink.resendButton"),onResendCodeClicked:()=>{b(),_()},safeIdentifier:r.emailAddress})})},ey=(0,A.dm)(()=>{let{userSettings:e}=(0,E.O)(),{attributes:r}=e;return r.email_address?.verifications?.includes("email_link")?(0,i.Y)(eY,{}):(0,i.Y)(ev,{})}),eC=(0,A.dm)(()=>{let e=(0,R.B)(),r=(0,A.f0)(),t=e.verifications.phoneNumber.channel,n=e.verifications.phoneNumber.status,a=!e.status||"verified"===n,l=!!t&&"sms"!==t,s=l?t:void 0;(0,er.s)(a||l?void 0:()=>e.preparePhoneNumberVerification({strategy:"phone_code",channel:void 0}),{name:"signUp.preparePhoneNumberVerification",strategy:"phone_code",number:e.phoneNumber},{staleTime:100,onError:e=>(0,I.H4)(e,[],r.setError)});let o=(0,g.G)("signUp.phoneCode.title"),c=(0,g.G)("signUp.phoneCode.subtitle"),u=(0,g.G)("signUp.phoneCode.resendButton");if(l){let e=(0,ea.y)(t)?.name;o=(0,g.G)("signUp.alternativePhoneCodeProvider.title",{provider:e||""}),c=(0,g.G)("signUp.alternativePhoneCodeProvider.subtitle",{provider:e||""}),u=(0,g.G)("signUp.alternativePhoneCodeProvider.resendButton")}return r.isLoading?(0,i.Y)(P.B,{}):(0,i.Y)(d.n.Part,{part:"phoneCode",children:(0,i.Y)(eU,{cardTitle:o,cardSubtitle:c,resendButton:u,prepare:()=>{if(!a)return e.preparePhoneNumberVerification({strategy:"phone_code",channel:s}).catch(e=>(0,I.H4)(e,[],r.setError))},attempt:r=>e.attemptPhoneNumberVerification({code:r}),safeIdentifier:e.phoneNumber,alternativeMethodsLabel:l?(0,g.G)("footerActionLink__alternativePhoneCodeProvider"):void 0,onShowAlternativeMethodsClicked:l?()=>{r.setLoading(),r.setError(void 0),e.preparePhoneNumberVerification({strategy:"phone_code",channel:void 0}).catch(e=>(0,I.H4)(e,[],r.setError)).finally(()=>r.setIdle())}:void 0,showAlternativeMethods:!!l||void 0})})}),eP=()=>(0,i.Y)(eC,{});function ew(){let e=(0,n.ho)();return a.useEffect(()=>{e.redirectToSignUp()},[]),null}function eI(){(0,c.Z)();let e=(0,s.X)();return(0,i.Y)(d.n.Root,{flow:"signUp",children:(0,i.FD)(p.d,{children:[(0,i.Y)(h.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,i.Y)(ey,{})}),(0,i.Y)(h.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,i.Y)(eP,{})}),(0,i.Y)(h.q,{path:"sso-callback",children:(0,i.Y)(en,{signUpUrl:e.signUpUrl,signInUrl:e.signInUrl,signUpForceRedirectUrl:e.afterSignUpUrl,signInForceRedirectUrl:e.afterSignInUrl,secondFactorUrl:e.secondFactorUrl,continueSignUpUrl:"../continue",verifyEmailAddressUrl:"../verify-email-address",verifyPhoneNumberUrl:"../verify-phone-number"})}),(0,i.Y)(h.q,{path:"verify",children:(0,i.Y)(l.M,{redirectUrlComplete:e.afterSignUpUrl,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number"})}),(0,i.FD)(h.q,{path:"continue",children:[(0,i.Y)(h.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,i.Y)(ey,{})}),(0,i.Y)(h.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,i.Y)(eP,{})}),(0,i.Y)(h.q,{index:!0,children:(0,i.Y)(Q,{})})]}),(0,i.Y)(h.q,{path:"tasks",children:(0,i.Y)(u.JJ,{redirectUrlComplete:e.afterSignUpUrl})}),(0,i.Y)(h.q,{path:"enterprise-connections",children:(0,i.Y)(et,{})}),(0,i.Y)(h.q,{path:"choose-wallet",children:(0,i.Y)(C,{})}),(0,i.Y)(h.q,{index:!0,children:(0,i.Y)(eb,{})}),(0,i.Y)(h.q,{children:(0,i.Y)(ew,{})})]})})}eI.displayName="SignUp";let eN=(0,o.Z)(eI),eF=(0,o.Z)(eI),eE=e=>{let r={signInUrl:`/${m.I}/sign-in`,waitlistUrl:`/${m.I}/waitlist`,...e};return(0,i.Y)(h.q,{path:"sign-up",children:(0,i.Y)(s.g.Provider,{value:{componentName:"SignUp",...r,routing:"virtual",mode:"modal"},children:(0,i.Y)("div",{children:(0,i.Y)(eF,{...r,routing:"virtual"})})})})}},8722:function(e,r,t){t.d(r,{completeSignUpFlow:()=>i.A});var i=t(1687)},4:function(e,r,t){t.d(r,{Q:()=>f,r:()=>g});var i=t(2166),n=t(8380),a=t(5580),l=t(4173),s=t(1210),o=t(5993),d=t(5074),c=t(8051),u=t(7697),p=t(2366),h=t(4964),m=t(2117);let f=(0,d.createContext)(null),g=()=>{let e=(0,d.useContext)(f),{navigate:r,basePath:t,startPath:g}=(0,h.r)(),{displayConfig:b,userSettings:_}=(0,u.O)(),{queryParams:U,queryString:v}=(0,h.r)(),A=_.signUp.mode,S=(0,p.II)(),k=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let Y="restricted"!==A&&!!(!S.signUpUrl&&S.signInUrl&&!(0,o.s)(S.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:y,mode:C,...P}=e,w=(0,d.useMemo)(()=>(0,m.tf)(v,i.u),[]),I=new n.n(S,{...P,signInFallbackRedirectUrl:P.signInFallbackRedirectUrl||P.fallbackRedirectUrl,signInForceRedirectUrl:P.signInForceRedirectUrl||P.forceRedirectUrl},U,C);delete P.fallbackRedirectUrl,delete P.forceRedirectUrl;let N=k.buildUrlWithAuth(I.getAfterSignInUrl()),F=k.buildUrlWithAuth(I.getAfterSignUpUrl()),E="path"===P.routing&&P.path||S.signInUrl||b.signInUrl,R=Y?"path"===P.routing&&P.path||S.signUpUrl||b.signUpUrl:P.signUpUrl||S.signUpUrl||b.signUpUrl,q=P.waitlistUrl||S.waitlistUrl||b.waitlistUrl,G=I.getPreservedSearchParams();E=(0,l.kZ)({base:E,hashSearchParams:[U,G]},{stringify:!0}),R=(0,l.kZ)({base:R,hashSearchParams:[U,G]},{stringify:!0}),q=(0,l.kZ)({base:q,hashSearchParams:[U,G]},{stringify:!0});let T=I.toSearchParams().toString(),L=(0,c.aQ)({routing:P.routing,baseUrl:R,authQueryString:T,path:P.path,endpoint:Y?"/create"+c.Vu:c.Vu}),D=(0,c.aQ)({routing:P.routing,baseUrl:R,authQueryString:T,path:P.path,endpoint:Y?"/create"+c.aB:c.aB});Y&&(R=(0,l.kZ)({base:E,hashPath:"/create",hashSearchParams:[U,G]},{stringify:!0}));let M=(0,l.kZ)({base:R,hashPath:"/continue"},{stringify:!0}),B=async({session:e,redirectUrl:i})=>{let n=e.currentTask;if(!n)return r(i);let l=(0,a.ru)(n);return r(`/${t+g+(Y?"/create"+l:l)}`)},O=k.session?.currentTask?k.__internal_getOption("taskUrls")?.[k.session?.currentTask.key]??(0,c.aQ)({routing:P.routing,baseUrl:E,authQueryString:T,path:P.path,endpoint:Y?"/create"+(0,a.ru)(k.session?.currentTask):(0,a.ru)(k.session?.currentTask)}):null;return{...P,transferable:P.transferable??!0,oauthFlow:P.oauthFlow||"auto",componentName:y,signUpUrl:R,signInUrl:E,waitlistUrl:q,afterSignInUrl:N,afterSignUpUrl:F,emailLinkRedirectUrl:L,ssoCallbackUrl:D,navigateAfterSignIn:()=>r(N),signUpContinueUrl:M,queryParams:U,initialValues:{...P.initialValues,...w},authQueryString:T,isCombinedFlow:Y,navigateOnSetActive:B,taskUrl:O}}},5350:function(e,r,t){t.d(r,{X:()=>g,g:()=>f});var i=t(2166),n=t(8380),a=t(5580),l=t(4173),s=t(1210),o=t(5993),d=t(5074),c=t(8051),u=t(7697),p=t(2366),h=t(4964),m=t(2117);let f=(0,d.createContext)(null),g=()=>{let e=(0,d.useContext)(f),{navigate:r,basePath:t,startPath:g}=(0,h.r)(),{displayConfig:b,userSettings:_}=(0,u.O)(),{queryParams:U,queryString:v}=(0,h.r)(),A=_.signUp.mode,S=(0,p.II)(),k=(0,s.ho)(),Y="restricted"!==A&&!!(!S.signUpUrl&&S.signInUrl&&!(0,o.s)(S.signInUrl)&&"public"===A),y=(0,d.useMemo)(()=>(0,m.tf)(v,i.d),[]);if(!e||"SignUp"!==e.componentName)throw Error("Clerk: useSignUpContext called outside of the mounted SignUp component.");let{componentName:C,mode:P,...w}=e,I=new n.n(S,{...w,signUpFallbackRedirectUrl:w.signUpFallbackRedirectUrl||w.fallbackRedirectUrl,signUpForceRedirectUrl:w.signUpForceRedirectUrl||w.forceRedirectUrl},U,P);delete w.fallbackRedirectUrl,delete w.forceRedirectUrl;let N=k.buildUrlWithAuth(I.getAfterSignUpUrl()),F=k.buildUrlWithAuth(I.getAfterSignInUrl()),E="path"===w.routing&&w.path||S.signUpUrl||b.signUpUrl,R=w.signInUrl||S.signInUrl||b.signInUrl,q=w.waitlistUrl||S.waitlistUrl||b.waitlistUrl,G=I.getPreservedSearchParams();R=(0,l.kZ)({base:R,hashSearchParams:[U,G]},{stringify:!0}),E=(0,l.kZ)({base:E,hashSearchParams:[U,G]},{stringify:!0}),q=(0,l.kZ)({base:q,hashSearchParams:[U,G]},{stringify:!0});let T=I.toSearchParams().toString(),L=w.emailLinkRedirectUrl??(0,c.aQ)({routing:w.routing,baseUrl:E,authQueryString:T,path:w.path,endpoint:Y?"/create"+c.Vu:c.Vu}),D=w.ssoCallbackUrl??(0,c.aQ)({routing:w.routing,baseUrl:E,authQueryString:T,path:w.path,endpoint:Y?"/create"+c.aB:c.aB}),M=(0,l.kZ)({base:R,hashPath:"/factor-two"},{stringify:!0}),B=async({session:e,redirectUrl:i})=>{let n=e.currentTask;if(!n)return r(i);let l=(0,a.ru)(n);return r(`/${t+g+l}`)},O=k.session?.currentTask?k.__internal_getOption("taskUrls")?.[k.session?.currentTask.key]??(0,c.aQ)({routing:w.routing,baseUrl:R,authQueryString:T,path:w.path,endpoint:(0,a.ru)(k.session?.currentTask)}):null;return{...w,oauthFlow:w.oauthFlow||"auto",componentName:C,signInUrl:R,signUpUrl:E,waitlistUrl:q,secondFactorUrl:M,afterSignUpUrl:N,afterSignInUrl:F,emailLinkRedirectUrl:L,ssoCallbackUrl:D,navigateAfterSignUp:()=>r(N),queryParams:U,initialValues:{...w.initialValues,...y},authQueryString:T,isCombinedFlow:Y,navigateOnSetActive:B,taskUrl:O}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["723"],{3689:function(e,t,n){n.d(t,{l_:()=>i,mu:()=>a});let a={userMemberships:{infinite:!0},userInvitations:{infinite:!0},userSuggestions:{infinite:!0,status:["pending","accepted"]}},i=(e,t,n)=>{if(void 0===t)return[{data:[e],total_count:1}];let a=t?.[t.length-1]?.total_count||1;return t.map(t=>{if(void 0===t)return t;let i=t.data.map(t=>t.id===e.id?{...e}:t);return{...t,data:i,total_count:"negative"===n?a-1:a}})}},9024:function(e,t,n){n.r(t),n.d(t,{TaskChooseOrganization:()=>M,withOrganizationCreationEnabledGuard:()=>K});var a=n(4518),i=n(1210),r=n(5074),o=n(9599),s=n(5577),l=n(4607),c=n(8272),u=n(8920),g=n(2861),d=n(6088),h=n(3269),p=n(6153),z=n(8691),m=n(2227),k=n(179),C=n(3610),f=n(2223),O=n(72),b=n(3689),_=n(1616),Y=n(78),S=n(2531),U=n(9001),w=n(4468);let $=e=>{let t=(0,h.f0)(),{ref:n,userMemberships:i,userSuggestions:r,userInvitations:o}=(0,m.f)(),s=i?.isLoading||o?.isLoading||r?.isLoading,l=i?.hasNextPage||o?.hasNextPage||r?.hasNextPage,z=o.data?.filter(e=>!!e),k=r.data?.filter(e=>!!e);return(0,a.FD)(a.FK,{children:[(0,a.FD)(p.Y.Root,{showLogo:!0,sx:e=>({padding:`${e.space.$none} ${e.space.$8}`}),children:[(0,a.Y)(p.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.title")}),(0,a.Y)(p.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.subtitle")})]}),(0,a.Y)(d.Z.Alert,{sx:e=>({margin:`${e.space.$none} ${e.space.$8}`}),children:t.error}),(0,a.Y)(c.fv,{elementDescriptor:u.$z.main,children:(0,a.Y)(O.os,{elementDescriptor:u.$z.taskChooseOrganizationPreviewItems,children:(0,a.FD)(S.En,{role:"menu",children:[(i.count||0)>0&&i.data?.map(e=>(0,a.Y)(y,{...e},e.id)),!i.hasNextPage&&z?.map(e=>(0,a.Y)(x,{...e},e.id)),!i.hasNextPage&&!o.hasNextPage&&k?.map(e=>(0,a.Y)(D,{...e},e.id)),(l||s)&&(0,a.Y)(O.JF,{ref:n}),(0,a.Y)(v,{onCreateOrganizationClick:()=>{t.setError(void 0),e.onCreateOrganizationClick()}})]})})})]})},y=e=>{let{user:t}=(0,i.Jd)(),n=(0,h.f0)(),{navigateOnSetActive:r}=(0,_.z1)(),{redirectUrlComplete:o}=(0,_.u3)(),{isLoaded:s,setActive:l}=(0,i.D_)(),{t:c}=(0,Y._)();return s?(0,a.Y)(O.SH,{elementDescriptor:u.$z.taskChooseOrganizationPreviewButton,onClick:()=>{let a;return a=e.organization,n.runAsync(async()=>{try{await l({organization:a,navigate:async({session:e})=>{await r?.({session:e,redirectUrlComplete:o})}})}catch(e){if(!(0,C.$R)(e))return void(0,w.H4)(e,[],n.setError);switch(e.errors?.[0]?.code){case"organization_not_found_or_unauthorized":case"not_a_member_in_organization":t?.createOrganizationEnabled?n.setError(c((0,g.G)("unstable__errors.organization_not_found_or_unauthorized"))):n.setError(c((0,g.G)("unstable__errors.organization_not_found_or_unauthorized_with_create_organization_disabled")));break;default:(0,w.H4)(e,[],n.setError)}}})},children:(0,a.Y)(U.Q,{elementId:"taskChooseOrganization",mainIdentifierSx:O.Vc,organization:e.organization})}):null},x=e=>{let t=(0,h.f0)(),{getOrganization:n}=(0,i.ho)(),[o,s]=(0,r.useState)(null),{userInvitations:l}=(0,i.D_)({userInvitations:b.mu.userInvitations});return o?(0,a.Y)(y,{organization:o}):(0,a.Y)(O.zJ,{organizationData:e.publicOrganizationData,elementId:"taskChooseOrganization",elementDescriptor:u.$z.taskChooseOrganizationPreviewItem,children:(0,a.Y)(O.D3,{isLoading:t.isLoading,onClick:()=>t.runAsync(async()=>[await e.accept(),await n(e.publicOrganizationData.id)]).then(([e,t])=>{l?.setData?.(t=>(0,b.l_)(e,t,"negative")),s(t)}).catch(e=>(0,w.H4)(e,[],t.setError)),localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.action__invitationAccept")})})},D=(0,h.dm)(e=>{let t=(0,h.f0)(),{userSuggestions:n}=(0,i.D_)({userSuggestions:b.mu.userSuggestions});return(0,a.Y)(O.zJ,{organizationData:e.publicOrganizationData,elementId:"taskChooseOrganization",elementDescriptor:u.$z.taskChooseOrganizationPreviewItem,children:"accepted"===e.status?(0,a.Y)(c.EY,{colorScheme:"secondary",localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.suggestionsAcceptedLabel")}):(0,a.Y)(O.D3,{onClick:()=>t.runAsync(e.accept).then(e=>n?.setData?.(t=>(0,b.l_)(e,t))).catch(e=>(0,w.H4)(e,[],t.setError)),isLoading:t.isLoading,localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.action__suggestionsAccept")})})}),v=({onCreateOrganizationClick:e})=>(0,a.Y)(f._,{elementDescriptor:u.$z.taskChooseOrganizationCreateOrganizationActionButton,label:(0,g.G)("taskChooseOrganization.chooseOrganization.action__createOrganization"),onClick:e,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,padding:`${e.space.$5} ${e.space.$5}`}),iconSx:e=>({width:e.sizes.$9,height:e.sizes.$6})});var I=n(7697),A=n(2454),P=n(1475),F=n(3549),R=n(5485),T=n(8640);let G=e=>{let t=(0,h.f0)(),{navigateOnSetActive:n}=(0,_.z1)(),{redirectUrlComplete:r}=(0,_.u3)(),{createOrganization:o,isLoaded:s,setActive:l}=(0,i.D_)({userMemberships:b.mu.userMemberships}),{organizationSettings:c}=(0,I.O)(),u=(0,T.tJ)("name","",{type:"text",label:(0,g.G)("taskChooseOrganization.createOrganization.formFieldLabel__name"),placeholder:(0,g.G)("taskChooseOrganization.createOrganization.formFieldInputPlaceholder__name")}),d=(0,T.tJ)("slug","",{type:"text",label:(0,g.G)("taskChooseOrganization.createOrganization.formFieldLabel__slug"),placeholder:(0,g.G)("taskChooseOrganization.createOrganization.formFieldInputPlaceholder__slug")}),z=!c.slug.disabled,m=async e=>{if(e.preventDefault(),s)try{let e={name:u.value};z&&(e.slug=d.value);let t=await o(e);await l({organization:t,navigate:async({session:e})=>{await n?.({session:e,redirectUrlComplete:r})}})}catch(e){(0,w.H4)(e,[u,d],t.setError)}},k=e=>{d.setValue(e)},C=!u.value||!s;return(0,a.FD)(a.FK,{children:[(0,a.FD)(p.Y.Root,{showLogo:!0,sx:e=>({padding:`${e.space.$none} ${e.space.$8}`}),children:[(0,a.Y)(p.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.title")}),(0,a.Y)(p.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.subtitle")})]}),(0,a.Y)(F.M,{sx:e=>({padding:`${e.space.$none} ${e.space.$10} ${e.space.$8}`}),children:(0,a.FD)(A.l.Root,{onSubmit:m,children:[(0,a.Y)(A.l.ControlRow,{elementId:u.id,children:(0,a.Y)(A.l.PlainInput,{...u.props,onChange:e=>{u.setValue(e.target.value),k((0,R.e)(e.target.value))},isRequired:!0,autoFocus:!0,ignorePasswordManager:!0})}),z&&(0,a.Y)(A.l.ControlRow,{elementId:d.id,children:(0,a.Y)(A.l.PlainInput,{...d.props,onChange:e=>k(e.target.value),isRequired:!0,pattern:"^(?=.*[a-z0-9])[a-z0-9\\-]+$",ignorePasswordManager:!0})}),(0,a.FD)(P.c,{sx:()=>({flexDirection:"column"}),children:[(0,a.Y)(A.l.SubmitButton,{block:!0,isDisabled:C,localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.formButtonSubmit")}),e.onCancel&&(0,a.Y)(A.l.ResetButton,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.formButtonReset"),onClick:e.onCancel})]})]})})]})},E=()=>{let{signOut:e}=(0,i.ho)(),{user:t}=(0,i.Jd)(),{session:n}=(0,i.wV)(),{otherSessions:r}=(0,z.z)({user:t}),{navigateAfterSignOut:s,navigateAfterMultiSessionSingleSignOutUrl:l}=(0,o.g)(),c=t?.primaryEmailAddress?.emailAddress??t?.username;return(0,a.Y)(d.Z.Footer,{children:(0,a.FD)(d.Z.Action,{elementId:"signOut",gap:2,justify:"center",sx:()=>({width:"100%"}),children:[c&&(0,a.Y)(d.Z.ActionText,{truncate:!0,localizationKey:(0,g.G)("taskChooseOrganization.signOut.actionText",{identifier:c})}),(0,a.Y)(d.Z.ActionLink,{sx:()=>({flexShrink:0}),onClick:()=>0===r.length?e(s):e(l,{sessionId:n?.id}),localizationKey:(0,g.G)("taskChooseOrganization.signOut.actionLink")})]})})},L=(0,h.dm)(e=>{let[t,n]=(0,r.useState)(e.initialFlow);return"create"===t?(0,a.Y)(G,{onCancel:"choose"===e.initialFlow?()=>n("choose"):void 0}):(0,a.Y)($,{onCreateOrganizationClick:()=>n("create")})}),K=e=>t=>{let{user:n}=(0,i.Jd)();return n?.createOrganizationEnabled?(0,a.Y)(e,{...t}):(0,a.Y)(Z,{})};function Z(){return(0,a.Y)(l.n.Root,{flow:"taskChooseOrganization",children:(0,a.Y)(l.n.Part,{part:"organizationCreationDisabled",children:(0,a.FD)(d.Z.Root,{children:[(0,a.Y)(d.Z.Content,{children:(0,a.FD)(p.Y.Root,{showLogo:!0,children:[(0,a.Y)(p.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.organizationCreationDisabled.title")}),(0,a.Y)(p.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.organizationCreationDisabled.subtitle")})]})}),(0,a.Y)(E,{})]})})})}let M=(0,s.Z)((0,k.d)((0,h.dm)(K(()=>{let{signOut:e}=(0,i.ho)(),{user:t}=(0,i.Jd)(),{session:n}=(0,i.wV)(),{userMemberships:r,userSuggestions:s,userInvitations:g}=(0,m.f)(),{otherSessions:h}=(0,z.z)({user:t}),{navigateAfterSignOut:p,navigateAfterMultiSessionSingleSignOutUrl:k}=(0,o.g)(),C=r?.isLoading||g?.isLoading||s?.isLoading,f=!!(r?.count||g?.count||s?.count);return t?.primaryEmailAddress?.emailAddress??t?.username,(0,a.Y)(l.n.Root,{flow:"taskChooseOrganization",children:(0,a.Y)(l.n.Part,{part:"chooseOrganization",children:(0,a.FD)(d.Z.Root,{children:[(0,a.Y)(d.Z.Content,{sx:e=>({padding:`${e.space.$8} ${e.space.$none} ${e.space.$none}`,gap:e.space.$7}),children:C?(0,a.Y)(c.so,{direction:"row",align:"center",justify:"center",sx:e=>({height:"100%",minHeight:e.sizes.$100}),children:(0,a.Y)(c.y$,{size:"lg",colorScheme:"primary",elementDescriptor:u.$z.spinner})}):(0,a.Y)(L,{initialFlow:f?"choose":"create"})}),(0,a.Y)(E,{})]})})})})),"choose-organization"))},179:function(e,t,n){n.d(t,{d:()=>o});var a=n(2049),i=n(656),r=n(1616);let o=(e,t)=>{let n=e.displayName||e.name||"Component";e.displayName=n;let o=n=>{let o=(0,r.z1)();return(0,i.RE)(e,e=>!e.session?.currentTask||e.session.currentTask.key!==t&&!e.__internal_setActiveInProgress,({clerk:e})=>e.session?o.redirectUrlComplete??e.buildAfterSignInUrl():e.buildSignInUrl(),a.A.cannotRenderComponentWhenTaskDoesNotExist)(n)};return o.displayName=`withTaskGuard(${n})`,o}},1616:function(e,t,n){n.d(t,{O_:()=>g,lY:()=>l,pq:()=>u,qx:()=>o,u3:()=>c,z1:()=>s});var a=n(5580),i=n(5074),r=n(4964);let o=(0,i.createContext)(null),s=()=>{let e=(0,i.useContext)(o),{navigate:t,basePath:n,startPath:s}=(0,r.r)();if(null===e)throw Error("Clerk: useSessionTasksContext called outside of the mounted SessionTasks component.");let l=async({session:e,redirectUrlComplete:i})=>{let r=e.currentTask;if(!r)return t(i);let o=(0,a.ru)(r);return t(`/${n+s+o}`)};return{...e,navigateOnSetActive:l}},l=(0,i.createContext)(null),c=()=>{let e=(0,i.useContext)(l);if(null===e)throw Error("Clerk: useTaskChooseOrganizationContext called outside of the mounted TaskChooseOrganization component.");return e},u=(0,i.createContext)(null),g=()=>{let e=(0,i.useContext)(u);if(null===e)throw Error("Clerk: useTaskResetPasswordContext called outside of the mounted TaskResetPassword component.");return e}},4:function(e,t,n){n.d(t,{Q:()=>z,r:()=>m});var a=n(2166),i=n(8380),r=n(5580),o=n(4173),s=n(1210),l=n(5993),c=n(5074),u=n(8051),g=n(7697),d=n(2366),h=n(4964),p=n(2117);let z=(0,c.createContext)(null),m=()=>{let e=(0,c.useContext)(z),{navigate:t,basePath:n,startPath:m}=(0,h.r)(),{displayConfig:k,userSettings:C}=(0,g.O)(),{queryParams:f,queryString:O}=(0,h.r)(),b=C.signUp.mode,_=(0,d.II)(),Y=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let S="restricted"!==b&&!!(!_.signUpUrl&&_.signInUrl&&!(0,l.s)(_.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:U,mode:w,...$}=e,y=(0,c.useMemo)(()=>(0,p.tf)(O,a.u),[]),x=new i.n(_,{...$,signInFallbackRedirectUrl:$.signInFallbackRedirectUrl||$.fallbackRedirectUrl,signInForceRedirectUrl:$.signInForceRedirectUrl||$.forceRedirectUrl},f,w);delete $.fallbackRedirectUrl,delete $.forceRedirectUrl;let D=Y.buildUrlWithAuth(x.getAfterSignInUrl()),v=Y.buildUrlWithAuth(x.getAfterSignUpUrl()),I="path"===$.routing&&$.path||_.signInUrl||k.signInUrl,A=S?"path"===$.routing&&$.path||_.signUpUrl||k.signUpUrl:$.signUpUrl||_.signUpUrl||k.signUpUrl,P=$.waitlistUrl||_.waitlistUrl||k.waitlistUrl,F=x.getPreservedSearchParams();I=(0,o.kZ)({base:I,hashSearchParams:[f,F]},{stringify:!0}),A=(0,o.kZ)({base:A,hashSearchParams:[f,F]},{stringify:!0}),P=(0,o.kZ)({base:P,hashSearchParams:[f,F]},{stringify:!0});let R=x.toSearchParams().toString(),T=(0,u.aQ)({routing:$.routing,baseUrl:A,authQueryString:R,path:$.path,endpoint:S?"/create"+u.Vu:u.Vu}),G=(0,u.aQ)({routing:$.routing,baseUrl:A,authQueryString:R,path:$.path,endpoint:S?"/create"+u.aB:u.aB});S&&(A=(0,o.kZ)({base:I,hashPath:"/create",hashSearchParams:[f,F]},{stringify:!0}));let E=(0,o.kZ)({base:A,hashPath:"/continue"},{stringify:!0}),L=async({session:e,redirectUrl:a})=>{let i=e.currentTask;if(!i)return t(a);let o=(0,r.ru)(i);return t(`/${n+m+(S?"/create"+o:o)}`)},K=Y.session?.currentTask?Y.__internal_getOption("taskUrls")?.[Y.session?.currentTask.key]??(0,u.aQ)({routing:$.routing,baseUrl:I,authQueryString:R,path:$.path,endpoint:S?"/create"+(0,r.ru)(Y.session?.currentTask):(0,r.ru)(Y.session?.currentTask)}):null;return{...$,transferable:$.transferable??!0,oauthFlow:$.oauthFlow||"auto",componentName:U,signUpUrl:A,signInUrl:I,waitlistUrl:P,afterSignInUrl:D,afterSignUpUrl:v,emailLinkRedirectUrl:T,ssoCallbackUrl:G,navigateAfterSignIn:()=>t(D),signUpContinueUrl:E,queryParams:f,initialValues:{...$.initialValues,...y},authQueryString:R,isCombinedFlow:S,navigateOnSetActive:L,taskUrl:K}}},9599:function(e,t,n){n.d(t,{g:()=>r});var a=n(1210),i=n(4964);let r=()=>{let{navigate:e}=(0,i.r)(),t=(0,a.ho)();return{navigateAfterSignOut:()=>e(t.buildAfterSignOutUrl()),navigateAfterMultiSessionSingleSignOutUrl:()=>e(t.buildAfterMultiSessionSingleSignOutUrl()),afterSignOutUrl:t.buildAfterSignOutUrl(),afterMultiSessionSingleSignOutUrl:t.buildAfterMultiSessionSingleSignOutUrl()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["67"],{7959:function(e,t,r){r.r(t),r.d(t,{TaskResetPassword:()=>y});var n=r(4518),s=r(1210),i=r(7697),a=r(9599),l=r(5577),o=r(1616),u=r(78),d=r(2861),c=r(4607),g=r(8272),h=r(8920),p=r(6088),f=r(3269),k=r(2454),m=r(6153),w=r(620),U=r(8691),S=r(4468),b=r(3990),C=r(8640),P=r(179);let y=(0,l.Z)((0,P.d)((0,f.dm)(()=>{let e=(0,s.ho)(),t=(0,f.f0)(),{userSettings:{passwordSettings:r}}=(0,i.O)(),{t:l,locale:P}=(0,u._)(),{redirectUrlComplete:y}=(0,o.O_)(),{otherSessions:O}=(0,U.z)({user:e.user}),{navigateAfterSignOut:R,navigateAfterMultiSessionSingleSignOutUrl:I}=(0,a.g)(),A=(0,s.Wp)((e,t)=>e.updatePassword(...t)),{navigateOnSetActive:v}=(0,o.z1)(),T=(0,C.tJ)("newPassword","",{type:"password",label:(0,d.G)("formFieldLabel__newPassword"),isRequired:!0,validatePassword:!0,buildErrorMessage:e=>(0,b.C5)(e,{t:l,locale:P,passwordSettings:r})}),Y=(0,C.tJ)("confirmPassword","",{type:"password",label:(0,d.G)("formFieldLabel__confirmPassword"),isRequired:!0}),x=(0,C.tJ)("signOutOfOtherSessions","",{type:"checkbox",label:(0,d.G)("formFieldLabel__signOutOfOtherSessions"),defaultChecked:!0}),{setConfirmPasswordFeedback:F,isPasswordMatch:_}=(0,w.Z)({passwordField:T,confirmPasswordField:Y}),Z=e.user?.primaryEmailAddress?.emailAddress??e.user?.username;return(0,n.Y)(c.n.Root,{flow:"taskResetPassword",children:(0,n.Y)(c.n.Part,{part:"resetPassword",children:(0,n.FD)(p.Z.Root,{children:[(0,n.FD)(p.Z.Content,{children:[(0,n.FD)(m.Y.Root,{showLogo:!0,children:[(0,n.Y)(m.Y.Title,{localizationKey:(0,d.G)("taskResetPassword.title")}),(0,n.Y)(m.Y.Subtitle,{localizationKey:(0,d.G)("taskResetPassword.subtitle")})]}),(0,n.Y)(p.Z.Alert,{children:t.error}),(0,n.Y)(g.fv,{elementDescriptor:h.$z.main,gap:8,children:(0,n.FD)(k.l.Root,{onSubmit:()=>{t.runAsync(async()=>{if(_&&e.user){T.clearFeedback(),Y.clearFeedback();try{await A(e.user,[{newPassword:T.value,signOutOfOtherSessions:x.checked}]),await e.setActive({session:e.session,navigate:async({session:e})=>{await v?.({session:e,redirectUrlComplete:y})}})}catch(e){return(0,S.H4)(e,[T,Y],t.setError)}}})},onBlur:()=>{T.value&&F(Y.value)},gap:8,children:[(0,n.FD)(g.fv,{gap:6,children:[(0,n.Y)("input",{readOnly:!0,"data-testid":"hidden-identifier",id:"identifier-field",name:"identifier",value:e.user?.primaryEmailAddress?.emailAddress||e.user?.username||"",style:{display:"none"}}),(0,n.Y)(k.l.ControlRow,{elementId:T.id,children:(0,n.Y)(k.l.PasswordInput,{...T.props,isRequired:!0,minLength:6})}),(0,n.Y)(k.l.ControlRow,{elementId:Y.id,children:(0,n.Y)(k.l.PasswordInput,{...Y.props,onChange:e=>(e.target.value&&F(e.target.value),Y.props.onChange(e))})}),(0,n.Y)(k.l.ControlRow,{elementId:x.id,children:(0,n.Y)(k.l.Checkbox,{...x.props})})]}),(0,n.Y)(g.fv,{gap:3,children:(0,n.Y)(k.l.SubmitButton,{isLoading:t.isLoading,isDisabled:!_,localizationKey:(0,d.G)("taskResetPassword.formButtonPrimary")})})]})})]}),(0,n.Y)(p.Z.Footer,{children:(0,n.FD)(p.Z.Action,{elementId:"signOut",gap:2,justify:"center",sx:()=>({width:"100%"}),children:[Z&&(0,n.Y)(p.Z.ActionText,{truncate:!0,localizationKey:(0,d.G)("taskResetPassword.signOut.actionText",{identifier:Z})}),(0,n.Y)(p.Z.ActionLink,{sx:()=>({flexShrink:0}),onClick:()=>{0===O.length?e?.signOut(R):e?.signOut(I,{sessionId:e.session?.id})},localizationKey:(0,d.G)("taskResetPassword.signOut.actionLink")})]})})]})})})}),"reset-password"))},179:function(e,t,r){r.d(t,{d:()=>a});var n=r(2049),s=r(656),i=r(1616);let a=(e,t)=>{let r=e.displayName||e.name||"Component";e.displayName=r;let a=r=>{let a=(0,i.z1)();return(0,s.RE)(e,e=>!e.session?.currentTask||e.session.currentTask.key!==t&&!e.__internal_setActiveInProgress,({clerk:e})=>e.session?a.redirectUrlComplete??e.buildAfterSignInUrl():e.buildSignInUrl(),n.A.cannotRenderComponentWhenTaskDoesNotExist)(r)};return a.displayName=`withTaskGuard(${r})`,a}},1616:function(e,t,r){r.d(t,{O_:()=>c,lY:()=>o,pq:()=>d,qx:()=>a,u3:()=>u,z1:()=>l});var n=r(5580),s=r(5074),i=r(4964);let a=(0,s.createContext)(null),l=()=>{let e=(0,s.useContext)(a),{navigate:t,basePath:r,startPath:l}=(0,i.r)();if(null===e)throw Error("Clerk: useSessionTasksContext called outside of the mounted SessionTasks component.");let o=async({session:e,redirectUrlComplete:s})=>{let i=e.currentTask;if(!i)return t(s);let a=(0,n.ru)(i);return t(`/${r+l+a}`)};return{...e,navigateOnSetActive:o}},o=(0,s.createContext)(null),u=()=>{let e=(0,s.useContext)(o);if(null===e)throw Error("Clerk: useTaskChooseOrganizationContext called outside of the mounted TaskChooseOrganization component.");return e},d=(0,s.createContext)(null),c=()=>{let e=(0,s.useContext)(d);if(null===e)throw Error("Clerk: useTaskResetPasswordContext called outside of the mounted TaskResetPassword component.");return e}},4:function(e,t,r){r.d(t,{Q:()=>f,r:()=>k});var n=r(2166),s=r(8380),i=r(5580),a=r(4173),l=r(1210),o=r(5993),u=r(5074),d=r(8051),c=r(7697),g=r(2366),h=r(4964),p=r(2117);let f=(0,u.createContext)(null),k=()=>{let e=(0,u.useContext)(f),{navigate:t,basePath:r,startPath:k}=(0,h.r)(),{displayConfig:m,userSettings:w}=(0,c.O)(),{queryParams:U,queryString:S}=(0,h.r)(),b=w.signUp.mode,C=(0,g.II)(),P=(0,l.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let y="restricted"!==b&&!!(!C.signUpUrl&&C.signInUrl&&!(0,o.s)(C.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:O,mode:R,...I}=e,A=(0,u.useMemo)(()=>(0,p.tf)(S,n.u),[]),v=new s.n(C,{...I,signInFallbackRedirectUrl:I.signInFallbackRedirectUrl||I.fallbackRedirectUrl,signInForceRedirectUrl:I.signInForceRedirectUrl||I.forceRedirectUrl},U,R);delete I.fallbackRedirectUrl,delete I.forceRedirectUrl;let T=P.buildUrlWithAuth(v.getAfterSignInUrl()),Y=P.buildUrlWithAuth(v.getAfterSignUpUrl()),x="path"===I.routing&&I.path||C.signInUrl||m.signInUrl,F=y?"path"===I.routing&&I.path||C.signUpUrl||m.signUpUrl:I.signUpUrl||C.signUpUrl||m.signUpUrl,_=I.waitlistUrl||C.waitlistUrl||m.waitlistUrl,Z=v.getPreservedSearchParams();x=(0,a.kZ)({base:x,hashSearchParams:[U,Z]},{stringify:!0}),F=(0,a.kZ)({base:F,hashSearchParams:[U,Z]},{stringify:!0}),_=(0,a.kZ)({base:_,hashSearchParams:[U,Z]},{stringify:!0});let z=v.toSearchParams().toString(),E=(0,d.aQ)({routing:I.routing,baseUrl:F,authQueryString:z,path:I.path,endpoint:y?"/create"+d.Vu:d.Vu}),D=(0,d.aQ)({routing:I.routing,baseUrl:F,authQueryString:z,path:I.path,endpoint:y?"/create"+d.aB:d.aB});y&&(F=(0,a.kZ)({base:x,hashPath:"/create",hashSearchParams:[U,Z]},{stringify:!0}));let G=(0,a.kZ)({base:F,hashPath:"/continue"},{stringify:!0}),L=async({session:e,redirectUrl:n})=>{let s=e.currentTask;if(!s)return t(n);let a=(0,i.ru)(s);return t(`/${r+k+(y?"/create"+a:a)}`)},M=P.session?.currentTask?P.__internal_getOption("taskUrls")?.[P.session?.currentTask.key]??(0,d.aQ)({routing:I.routing,baseUrl:x,authQueryString:z,path:I.path,endpoint:y?"/create"+(0,i.ru)(P.session?.currentTask):(0,i.ru)(P.session?.currentTask)}):null;return{...I,transferable:I.transferable??!0,oauthFlow:I.oauthFlow||"auto",componentName:O,signUpUrl:F,signInUrl:x,waitlistUrl:_,afterSignInUrl:T,afterSignUpUrl:Y,emailLinkRedirectUrl:E,ssoCallbackUrl:D,navigateAfterSignIn:()=>t(T),signUpContinueUrl:G,queryParams:U,initialValues:{...I.initialValues,...A},authQueryString:z,isCombinedFlow:y,navigateOnSetActive:L,taskUrl:M}}},9599:function(e,t,r){r.d(t,{g:()=>i});var n=r(1210),s=r(4964);let i=()=>{let{navigate:e}=(0,s.r)(),t=(0,n.ho)();return{navigateAfterSignOut:()=>e(t.buildAfterSignOutUrl()),navigateAfterMultiSessionSingleSignOutUrl:()=>e(t.buildAfterMultiSessionSingleSignOutUrl()),afterSignOutUrl:t.buildAfterSignOutUrl(),afterMultiSessionSingleSignOutUrl:t.buildAfterMultiSessionSingleSignOutUrl()}}}}]);
|
package/dist/themes/shadcn.js
CHANGED
|
@@ -10,13 +10,13 @@ const shadcn = createTheme({
|
|
|
10
10
|
colorForeground: "var(--card-foreground)",
|
|
11
11
|
colorInput: "var(--input)",
|
|
12
12
|
colorInputForeground: "var(--card-foreground)",
|
|
13
|
-
colorModalBackdrop: "var(--color-black)",
|
|
13
|
+
colorModalBackdrop: "color-mix(in srgb, var(--color-black), transparent 50%)",
|
|
14
14
|
colorMuted: "var(--muted)",
|
|
15
15
|
colorMutedForeground: "var(--muted-foreground)",
|
|
16
16
|
colorNeutral: "var(--foreground)",
|
|
17
17
|
colorPrimary: "var(--primary)",
|
|
18
18
|
colorPrimaryForeground: "var(--primary-foreground)",
|
|
19
|
-
colorRing: "var(--ring)",
|
|
19
|
+
colorRing: "color-mix(in srgb, var(--ring), transparent 50%)",
|
|
20
20
|
fontWeight: {
|
|
21
21
|
normal: "var(--font-weight-normal)",
|
|
22
22
|
medium: "var(--font-weight-medium)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadcn.js","names":[],"sources":["../../src/themes/shadcn.ts"],"sourcesContent":["import { createTheme } from './createTheme';\n\nexport const shadcn = createTheme({\n name: 'shadcn',\n cssLayerName: 'components',\n variables: {\n colorBackground: 'var(--card)',\n colorDanger: 'var(--destructive)',\n colorForeground: 'var(--card-foreground)',\n colorInput: 'var(--input)',\n colorInputForeground: 'var(--card-foreground)',\n colorModalBackdrop: 'var(--color-black)',\n colorMuted: 'var(--muted)',\n colorMutedForeground: 'var(--muted-foreground)',\n colorNeutral: 'var(--foreground)',\n colorPrimary: 'var(--primary)',\n colorPrimaryForeground: 'var(--primary-foreground)',\n colorRing: 'var(--ring)',\n fontWeight: {\n normal: 'var(--font-weight-normal)',\n medium: 'var(--font-weight-medium)',\n semibold: 'var(--font-weight-semibold)',\n bold: 'var(--font-weight-semibold)',\n },\n },\n elements: {\n input: 'bg-transparent dark:bg-input/30',\n cardBox: 'shadow-sm border',\n popoverBox: 'shadow-sm border',\n button: {\n '&[data-variant=\"solid\"]::after': {\n display: 'none',\n },\n },\n providerIcon__apple: 'dark:invert',\n providerIcon__github: 'dark:invert',\n providerIcon__okx_wallet: 'dark:invert',\n providerIcon__vercel: 'dark:invert',\n },\n});\n"],"mappings":";;;AAEA,MAAa,SAAS,YAAY;CAChC,MAAM;CACN,cAAc;CACd,WAAW;EACT,iBAAiB;EACjB,aAAa;EACb,iBAAiB;EACjB,YAAY;EACZ,sBAAsB;EACtB,oBAAoB;EACpB,YAAY;EACZ,sBAAsB;EACtB,cAAc;EACd,cAAc;EACd,wBAAwB;EACxB,WAAW;EACX,YAAY;GACV,QAAQ;GACR,QAAQ;GACR,UAAU;GACV,MAAM;GACP;EACF;CACD,UAAU;EACR,OAAO;EACP,SAAS;EACT,YAAY;EACZ,QAAQ,EACN,oCAAkC,EAChC,SAAS,QACV,EACF;EACD,qBAAqB;EACrB,sBAAsB;EACtB,0BAA0B;EAC1B,sBAAsB;EACvB;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"shadcn.js","names":[],"sources":["../../src/themes/shadcn.ts"],"sourcesContent":["import { createTheme } from './createTheme';\n\nexport const shadcn = createTheme({\n name: 'shadcn',\n cssLayerName: 'components',\n variables: {\n colorBackground: 'var(--card)',\n colorDanger: 'var(--destructive)',\n colorForeground: 'var(--card-foreground)',\n colorInput: 'var(--input)',\n colorInputForeground: 'var(--card-foreground)',\n colorModalBackdrop: 'color-mix(in srgb, var(--color-black), transparent 50%)',\n colorMuted: 'var(--muted)',\n colorMutedForeground: 'var(--muted-foreground)',\n colorNeutral: 'var(--foreground)',\n colorPrimary: 'var(--primary)',\n colorPrimaryForeground: 'var(--primary-foreground)',\n colorRing: 'color-mix(in srgb, var(--ring), transparent 50%)',\n fontWeight: {\n normal: 'var(--font-weight-normal)',\n medium: 'var(--font-weight-medium)',\n semibold: 'var(--font-weight-semibold)',\n bold: 'var(--font-weight-semibold)',\n },\n },\n elements: {\n input: 'bg-transparent dark:bg-input/30',\n cardBox: 'shadow-sm border',\n popoverBox: 'shadow-sm border',\n button: {\n '&[data-variant=\"solid\"]::after': {\n display: 'none',\n },\n },\n providerIcon__apple: 'dark:invert',\n providerIcon__github: 'dark:invert',\n providerIcon__okx_wallet: 'dark:invert',\n providerIcon__vercel: 'dark:invert',\n },\n});\n"],"mappings":";;;AAEA,MAAa,SAAS,YAAY;CAChC,MAAM;CACN,cAAc;CACd,WAAW;EACT,iBAAiB;EACjB,aAAa;EACb,iBAAiB;EACjB,YAAY;EACZ,sBAAsB;EACtB,oBAAoB;EACpB,YAAY;EACZ,sBAAsB;EACtB,cAAc;EACd,cAAc;EACd,wBAAwB;EACxB,WAAW;EACX,YAAY;GACV,QAAQ;GACR,QAAQ;GACR,UAAU;GACV,MAAM;GACP;EACF;CACD,UAAU;EACR,OAAO;EACP,SAAS;EACT,YAAY;EACZ,QAAQ,EACN,oCAAkC,EAChC,SAAS,QACV,EACF;EACD,qBAAqB;EACrB,sBAAsB;EACtB,0BAA0B;EAC1B,sBAAsB;EACvB;CACF,CAAC"}
|