@clerk/ui 1.0.0-snapshot.v20251204175016 → 1.0.0-snapshot.v20251211120550

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.
Files changed (153) hide show
  1. package/dist/{207_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → 207_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  2. package/dist/{217_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → 217_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  3. package/dist/{360_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → 360_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  4. package/dist/{444_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → 444_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  5. package/dist/{573_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → 573_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  6. package/dist/970_ui_a492c4_1.0.0-snapshot.v20251211120550.js +1 -0
  7. package/dist/ClerkUi.js +2 -2
  8. package/dist/Components.d.ts.map +1 -1
  9. package/dist/Components.js.map +1 -1
  10. package/dist/{apiKeys_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → apiKeys_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  11. package/dist/checkout_ui_a492c4_1.0.0-snapshot.v20251211120550.js +9 -0
  12. package/dist/components/Checkout/CheckoutComplete.js +1 -1
  13. package/dist/components/Checkout/CheckoutComplete.js.map +1 -1
  14. package/dist/components/Checkout/CheckoutForm.js +3 -3
  15. package/dist/components/Checkout/CheckoutForm.js.map +1 -1
  16. package/dist/components/Checkout/CheckoutPage.js +3 -1
  17. package/dist/components/Checkout/CheckoutPage.js.map +1 -1
  18. package/dist/components/Checkout/parts.js +1 -1
  19. package/dist/components/Checkout/parts.js.map +1 -1
  20. package/dist/components/GoogleOneTap/one-tap-start.js +1 -5
  21. package/dist/components/GoogleOneTap/one-tap-start.js.map +1 -1
  22. package/dist/components/OrganizationProfile/InviteMembersForm.js +2 -2
  23. package/dist/components/OrganizationProfile/InviteMembersForm.js.map +1 -1
  24. package/dist/components/OrganizationProfile/InviteMembersScreen.js +0 -1
  25. package/dist/components/OrganizationProfile/InviteMembersScreen.js.map +1 -1
  26. package/dist/components/OrganizationProfile/MembersSearch.js.map +1 -1
  27. package/dist/components/OrganizationProfile/OrganizationMembers.js.map +1 -1
  28. package/dist/components/PaymentMethods/PaymentMethods.js +1 -2
  29. package/dist/components/PaymentMethods/PaymentMethods.js.map +1 -1
  30. package/dist/components/PricingTable/PricingTableMatrix.js +1 -1
  31. package/dist/components/PricingTable/PricingTableMatrix.js.map +1 -1
  32. package/dist/components/SessionTasks/tasks/TaskResetPassword/index.js +3 -3
  33. package/dist/components/SessionTasks/tasks/TaskResetPassword/index.js.map +1 -1
  34. package/dist/components/SignIn/ResetPassword.js +1 -0
  35. package/dist/components/SignIn/ResetPassword.js.map +1 -1
  36. package/dist/components/SignUp/SignUpForm.js +1 -1
  37. package/dist/components/SignUp/SignUpForm.js.map +1 -1
  38. package/dist/components/SignUp/SignUpStart.js +1 -1
  39. package/dist/components/SignUp/SignUpStart.js.map +1 -1
  40. package/dist/components/UserProfile/PasswordForm.js +1 -0
  41. package/dist/components/UserProfile/PasswordForm.js.map +1 -1
  42. package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js +1 -1
  43. package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js.map +1 -1
  44. package/dist/{createorganization_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → createorganization_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  45. package/dist/customizables/AppearanceContext.js +5 -1
  46. package/dist/customizables/AppearanceContext.js.map +1 -1
  47. package/dist/customizables/parseAppearance.js +6 -6
  48. package/dist/customizables/parseAppearance.js.map +1 -1
  49. package/dist/elements/Animated.js +1 -1
  50. package/dist/elements/Animated.js.map +1 -1
  51. package/dist/elements/ApplicationLogo.js +3 -3
  52. package/dist/elements/ApplicationLogo.js.map +1 -1
  53. package/dist/elements/AvatarUploader.js +14 -4
  54. package/dist/elements/AvatarUploader.js.map +1 -1
  55. package/dist/elements/Card/CardFooter.js +2 -2
  56. package/dist/elements/Card/CardFooter.js.map +1 -1
  57. package/dist/elements/Card/CardRoot.js +1 -1
  58. package/dist/elements/Card/CardRoot.js.map +1 -1
  59. package/dist/elements/Drawer.js +2 -2
  60. package/dist/elements/Drawer.js.map +1 -1
  61. package/dist/elements/FormControl.js +1 -1
  62. package/dist/elements/FormControl.js.map +1 -1
  63. package/dist/elements/Header.js +1 -1
  64. package/dist/elements/Header.js.map +1 -1
  65. package/dist/elements/LegalConsentCheckbox.js +3 -3
  66. package/dist/elements/LegalConsentCheckbox.js.map +1 -1
  67. package/dist/elements/PhoneInput/countryCodeData.js +34 -9
  68. package/dist/elements/PhoneInput/countryCodeData.js.map +1 -1
  69. package/dist/elements/PopoverCard.js +1 -1
  70. package/dist/elements/PopoverCard.js.map +1 -1
  71. package/dist/elements/ReversibleContainer.js +1 -1
  72. package/dist/elements/ReversibleContainer.js.map +1 -1
  73. package/dist/elements/SocialButtons.js +1 -1
  74. package/dist/elements/SocialButtons.js.map +1 -1
  75. package/dist/elements/Tooltip.js +1 -1
  76. package/dist/elements/Tooltip.js.map +1 -1
  77. package/dist/elements/withAvatarShimmer.js +2 -2
  78. package/dist/elements/withAvatarShimmer.js.map +1 -1
  79. package/dist/{enableOrganizationsPrompt_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → enableOrganizationsPrompt_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +4 -4
  80. package/dist/foundations/defaultFoundations.d.ts +153 -153
  81. package/dist/hooks/useDevMode.js +1 -1
  82. package/dist/hooks/useDevMode.js.map +1 -1
  83. package/dist/hooks/useFetchRoles.js.map +1 -1
  84. package/dist/{impersonationfab_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → impersonationfab_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  85. package/dist/index.js +1 -1
  86. package/dist/internal/appearance.d.ts +8 -4
  87. package/dist/internal/appearance.d.ts.map +1 -1
  88. package/dist/internal/index.d.ts +2 -2
  89. package/dist/internal/index.js +2 -2
  90. package/dist/internal/index.js.map +1 -1
  91. package/dist/{keylessPrompt_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → keylessPrompt_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  92. package/dist/lazyModules/components.d.ts +21 -20
  93. package/dist/lazyModules/components.d.ts.map +1 -1
  94. package/dist/lazyModules/components.js +7 -1
  95. package/dist/lazyModules/components.js.map +1 -1
  96. package/dist/{oauthConsent_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → oauthConsent_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  97. package/dist/onetap_ui_a492c4_1.0.0-snapshot.v20251211120550.js +1 -0
  98. package/dist/{op-api-keys-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → op-api-keys-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  99. package/dist/{organizationlist_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → organizationlist_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  100. package/dist/{organizationprofile_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → organizationprofile_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  101. package/dist/{organizationswitcher_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → organizationswitcher_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  102. package/dist/{payment-attempt-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → payment-attempt-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  103. package/dist/{planDetails_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → planDetails_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  104. package/dist/{prefetchorganizationlist_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → prefetchorganizationlist_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  105. package/dist/{pricingTable_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → pricingTable_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  106. package/dist/{revoke-api-key-modal_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → revoke-api-key-modal_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  107. package/dist/sessionTasks_ui_a492c4_1.0.0-snapshot.v20251211120550.js +1 -0
  108. package/dist/signin_ui_a492c4_1.0.0-snapshot.v20251211120550.js +1 -0
  109. package/dist/signup_ui_a492c4_1.0.0-snapshot.v20251211120550.js +1 -0
  110. package/dist/{statement-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → statement-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  111. package/dist/{subscriptionDetails_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → subscriptionDetails_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  112. package/dist/{taskChooseOrganization_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → taskChooseOrganization_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  113. package/dist/taskResetPassword_ui_a492c4_1.0.0-snapshot.v20251211120550.js +1 -0
  114. package/dist/themes/createTheme.d.ts +1 -1
  115. package/dist/themes/dark.d.ts +2 -2
  116. package/dist/themes/experimental.d.ts +1 -2
  117. package/dist/themes/experimental.js +1 -2
  118. package/dist/themes/neobrutalism.d.ts +2 -2
  119. package/dist/themes/shadcn.d.ts +2 -2
  120. package/dist/themes/shadesOfPurple.d.ts +2 -2
  121. package/dist/types.d.ts +2 -2
  122. package/dist/types.d.ts.map +1 -1
  123. package/dist/ui-common_ui_a492c4_1.0.0-snapshot.v20251211120550.js +139 -0
  124. package/dist/ui.browser.js +3 -3
  125. package/dist/{up-api-keys-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → up-api-keys-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  126. package/dist/{useravatar_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → useravatar_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  127. package/dist/{userbutton_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → userbutton_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  128. package/dist/{userprofile_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → userprofile_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +2 -2
  129. package/dist/{userverification_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → userverification_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  130. package/dist/utils/createCustomPages.js.map +1 -1
  131. package/dist/utils/passwordUtils.js +1 -1
  132. package/dist/utils/passwordUtils.js.map +1 -1
  133. package/dist/{waitlist_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → waitlist_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +1 -1
  134. package/package.json +7 -5
  135. package/dist/970_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -1
  136. package/dist/checkout_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -9
  137. package/dist/onetap_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -1
  138. package/dist/sessionTasks_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -1
  139. package/dist/signin_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -1
  140. package/dist/signup_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -1
  141. package/dist/themes/simple.d.ts +0 -19
  142. package/dist/themes/simple.d.ts.map +0 -1
  143. package/dist/themes/simple.js +0 -11
  144. package/dist/themes/simple.js.map +0 -1
  145. package/dist/ui-common_ui_30c3ec_1.0.0-snapshot.v20251204175016.js +0 -139
  146. /package/dist/{blankcaptcha_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → blankcaptcha_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  147. /package/dist/{copy-api-key-modal_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → copy-api-key-modal_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  148. /package/dist/{framework_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → framework_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  149. /package/dist/{op-billing-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → op-billing-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  150. /package/dist/{op-plans-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → op-plans-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  151. /package/dist/{up-billing-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → up-billing-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  152. /package/dist/{up-plans-page_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → up-plans-page_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
  153. /package/dist/{vendors_ui_30c3ec_1.0.0-snapshot.v20251204175016.js → vendors_ui_a492c4_1.0.0-snapshot.v20251211120550.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerk/ui",
3
- "version": "1.0.0-snapshot.v20251204175016",
3
+ "version": "1.0.0-snapshot.v20251211120550",
4
4
  "description": "Internal package that contains the UI components for the Clerk frontend SDKs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,8 +57,8 @@
57
57
  "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0",
58
58
  "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0",
59
59
  "swr": "2.3.4",
60
- "@clerk/localizations": "^4.0.0-snapshot.v20251204175016",
61
- "@clerk/shared": "^4.0.0-snapshot.v20251204175016"
60
+ "@clerk/localizations": "4.0.0-snapshot.v20251211120550",
61
+ "@clerk/shared": "4.0.0-snapshot.v20251211120550"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@floating-ui/react-dom": "^2.1.6",
@@ -88,7 +88,8 @@
88
88
  "bundlewatch:fix": "node bundlewatch-fix.mjs",
89
89
  "clean": "rimraf ./dist",
90
90
  "dev": "tsdown --watch src",
91
- "dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4001}",
91
+ "dev:origin": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:${PORT:-4011}",
92
+ "dev:sandbox": "rspack serve --config rspack.config.js --env devOrigin=http://localhost:4011",
92
93
  "format": "node ../../scripts/format-package.mjs",
93
94
  "format:check": "node ../../scripts/format-package.mjs --check",
94
95
  "lint:attw": "attw --pack . --exclude-entrypoints themes/shadcn.css --profile esm-only",
@@ -97,6 +98,7 @@
97
98
  "showerrors": "tsc",
98
99
  "test:ci": "vitest --maxWorkers=70%",
99
100
  "test:coverage": "vitest --collectCoverage && open coverage/lcov-report/index.html",
100
- "test:disabled": "vitest"
101
+ "test:disabled": "vitest",
102
+ "type-check": "tsc --noEmit"
101
103
  }
102
104
  }
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["970"],{1217:function(e,r,a){a.d(r,{n:()=>_});var i=a(4518),l=a(8909),n=a(5074),t=a(4607),o=a(164),c=a(7288),d=a(8511),s=a(6455),p=a(5424),g=a(7477),m=a(6256),u=a(8272),h=a(8920),b=a(2861),$=a(2405),x=a(9679),f=a(9406),z=a(1464),T=a(3679);function y({plans:e,planPeriod:r,setPlanPeriod:a,onSelect:l,isCompact:n,props:t}){return(0,i.Y)(f.S,{children:(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTable,sx:e=>({"--grid-min-size":n?"11.75rem":"20rem","--grid-max-columns":"infinity","--grid-gap":e.space.$4,"--max-column-width":"100% / var(--grid-max-columns, infinity) - var(--grid-gap)","--column-width":"max(var(--max-column-width), min(var(--grid-min-size, 10rem), 100%))",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(var(--column-width), 1fr))",gridTemplateRows:"auto 1fr",gap:`var(--grid-gap-y, var(--grid-gap, ${e.space.$4})) var(--grid-gap, ${e.space.$4})`,alignItems:"stretch",width:"100%",minWidth:"0"}),"data-variant":n?"compact":"default",children:e?.map(e=>(0,i.Y)(D,{plan:e,planPeriod:r,setPlanPeriod:a,onSelect:l,props:t,isCompact:n},e.id))})})}function D(e){let{plan:r,planPeriod:a,setPlanPeriod:t,onSelect:d,props:$,isCompact:x=!1}=e,f=(0,l.ho)(),{isSignedIn:y}=(0,l.wV)(),{mode:D="mounted",ctaPosition:C}=(0,o.T)(),w=(0,m.XX)(),S=(0,l.Wf)(),v=$.ctaPosition||C||"bottom",M=$.collapseFeatures||!1,{id:P,slug:k}=r,I=(0,g.Fd)(e=>e({permission:"org:sys_billing:manage"})||"user"===w),{buttonPropsForPlan:E,activeOrUpcomingSubscriptionBasedOnPlanPeriod:B}=(0,c.D)(),R=n.useMemo(()=>B(r,a),[r,a,B]),_=r.features.length>0,{shouldShowFooter:G,shouldShowFooterNotice:A}=(e=>{let[r,a]=(e=>{let{subscription:r,plan:a,planPeriod:i,for:l,hasActiveOrganization:n}=e,t=[!0,!0],o=[!0,!1],c=[!1,!1];if(!r)return"organization"!==l||n?o:c;if("upcoming"===r.status)return t;if("active"===r.status){let e=!!r.canceledAt,l=i!==r.planPeriod&&!!a.annualMonthlyFee,n=a.freeTrialEnabled&&r.isFreeTrial;if(e||l)return o;if(n)return t}return c})(e);return{shouldShowFooter:r,shouldShowFooterNotice:a}})({subscription:R,plan:r,planPeriod:a,for:$.for,hasActiveOrganization:!!S?.organization});return(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableCard,elementId:h.$z.pricingTableCard.setId(k),sx:e=>({display:"grid",gap:0,gridTemplateRows:"subgrid",gridRow:"span 5",background:z.s.mutedBackground(e),borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha150,borderRadius:e.radii.$xl,overflow:"hidden",textAlign:"left"}),"data-variant":x?"compact":"default",children:[(0,i.Y)(Y,{plan:r,isCompact:x,planPeriod:a,setPlanPeriod:t,badge:R?(0,i.Y)(T.V,{subscription:R.isFreeTrial?{status:"free_trial"}:R}):void 0}),(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableCardBody,sx:{display:"grid",gridTemplateRows:"subgrid",gridRow:"span 2",gap:0},children:["bottom"===v&&!M||"top"===v&&_?(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableCardFeatures,sx:e=>({display:"flex",flexDirection:"column",flex:"1",padding:x?e.space.$3:e.space.$4,backgroundColor:_?e.colors.$colorBackground:"transparent",borderTopWidth:_?e.borderWidths.$normal:0,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha150}),"data-variant":x?"compact":"default",children:(0,i.Y)(F,{plan:r,isCompact:x,showPlanDetails:e=>{let i=(0,p.J)(D,e);f.__internal_openPlanDetails({plan:r,initialPlanPeriod:a,portalRoot:i})}})}):null,G?(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableCardFooter,sx:e=>({marginTop:"auto",padding:x?e.space.$3:e.space.$4,borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha150,order:"top"===v?-1:void 0}),children:A&&R?(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableCardFooterNotice,variant:x?"buttonSmall":"buttonLarge",localizationKey:r.freeTrialEnabled&&R.isFreeTrial&&R.periodEnd?(0,b.G)("badge__trialEndsAt",{date:R.periodEnd}):(0,b.G)("badge__startsAt",{date:R.periodStart}),colorScheme:"secondary",sx:e=>({paddingBlock:e.space.$1x5,textAlign:"center"})}):(0,i.FD)(s.m_.Root,{children:[(0,i.Y)(s.m_.Trigger,{sx:{width:"100%"},children:(0,i.Y)(u.$n,{elementDescriptor:h.$z.pricingTableCardFooterButton,block:!0,textVariant:x?"buttonSmall":"buttonLarge",...E({plan:r,isCompact:x,selectedPlanPeriod:a}),onClick:e=>{d(r,e)}})}),y&&!I&&(0,i.Y)(s.m_.Content,{text:(0,b.G)("organizationProfile.plansPage.alerts.noPermissionsToManageBilling")})]})}):(0,i.Y)(u.az,{sx:e=>({backgroundColor:_?e.colors.$colorBackground:"transparent"})})]})]},P)}let Y=n.forwardRef((e,r)=>{let{plan:a,isCompact:l,planPeriod:t,setPlanPeriod:o,badge:s}=e,{name:p,annualMonthlyFee:g}=a,m=!!g,$=n.useMemo(()=>m&&"annual"===t?a.annualMonthlyFee:a.fee,[m,t,a.fee,a.annualMonthlyFee]),x=n.useMemo(()=>(0,c.Ij)($.amountFormatted),[$.amountFormatted]);return(0,i.FD)(u.az,{ref:r,elementDescriptor:h.$z.pricingTableCardHeader,sx:e=>({width:"100%",padding:l?e.space.$3:e.space.$4,display:"grid",gap:e.space.$1,gridRow:"span 3",gridTemplateRows:"subgrid"}),"data-variant":l?"compact":"default",children:[(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableCardTitleContainer,children:[(0,i.FD)(u.az,{sx:e=>({display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:e.space.$0x25}),children:[(0,i.Y)(u.DZ,{elementDescriptor:h.$z.pricingTableCardTitle,as:"h2",textVariant:l?"h3":"h2",children:p}),s&&s]}),!l&&a.description?(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableCardDescription,variant:"subtitle",colorScheme:"secondary",sx:{justifySelf:"flex-start"},children:a.description}):null]}),(0,i.FD)(u.so,{elementDescriptor:h.$z.pricingTableCardFeeContainer,"data-variant":l?"compact":"default",align:"center",wrap:"wrap",sx:e=>({columnGap:e.space.$1,marginTop:e.space.$1}),children:[(0,i.FD)(u.EY,{elementDescriptor:h.$z.pricingTableCardFee,variant:l?"h2":"h1",colorScheme:"body",children:[$.currencySymbol,x]}),a.isDefault?null:(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableCardFeePeriod,variant:"caption",colorScheme:"secondary",sx:e=>({textTransform:"lowercase",":before":{content:'"/"',marginInlineEnd:e.space.$0x25}}),localizationKey:(0,b.G)("billing.month")})]}),m&&o?(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableCardPeriodToggle,sx:e=>({marginTop:e.space.$1}),children:(0,i.Y)(d.d,{isChecked:"annual"===t,onChange:e=>o(e?"annual":"month"),label:(0,b.G)("billing.billedAnnually")})}):(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableCardFeePeriodNotice,variant:"caption",colorScheme:"secondary",localizationKey:a.isDefault?(0,b.G)("billing.alwaysFree"):(0,b.G)("billing.billedMonthlyOnly"),sx:e=>({justifySelf:"flex-start",alignSelf:"center",marginTop:e.space.$1})})]})}),F=n.forwardRef((e,r)=>{let{plan:a,isCompact:l,showPlanDetails:n}=e,t=a.features.length,o=l?t>3:t>8;return(0,i.FD)(u.az,{ref:r,elementDescriptor:h.$z.pricingTableCardFeatures,sx:e=>({display:"grid",flex:1,rowGap:l?e.space.$2:e.space.$3}),children:[(0,i.Y)(u.fv,{elementDescriptor:h.$z.pricingTableCardFeaturesList,"data-variant":l?"compact":"default",as:"ul",role:"list",sx:e=>({flex:"1",rowGap:l?e.space.$2:e.space.$3,margin:0,padding:0}),children:a.features.slice(0,o?l?3:8:t).map(e=>(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableCardFeaturesListItem,elementId:h.$z.pricingTableCardFeaturesListItem.setId(e.slug),as:"li",sx:e=>({display:"flex",alignItems:"baseline",gap:e.space.$2,margin:0,padding:0}),children:[(0,i.Y)(u.In,{icon:$.A,colorScheme:"neutral",size:"sm","aria-hidden":!0,sx:e=>({transform:`translateY(${e.space.$0x25})`})}),(0,i.Y)(u.L9,{elementDescriptor:h.$z.pricingTableCardFeaturesListItemContent,children:(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableCardFeaturesListItemTitle,colorScheme:"body",sx:e=>({fontWeight:e.fontWeights.$normal}),children:e.name})})]},e.id))}),o&&(0,i.FD)(u.dF,{onClick:e=>n(e),variant:"link",sx:e=>({marginBlockStart:"auto",paddingBlock:e.space.$1,gap:e.space.$1}),children:[(0,i.Y)(u.In,{icon:x.A,colorScheme:"neutral",size:"md","aria-hidden":!0}),(0,i.Y)(u.L9,{localizationKey:(0,b.G)("billing.seeAllFeatures")})]})]})});var C=a(6195),w=a(6839),S=a(4620),v=a(6580),M=a(78),P=a(359),k=a(9068),I=a(7591);function E({plans:e=[],planPeriod:r,setPlanPeriod:a,onSelect:l,highlightedPlan:t}){let o=(0,P.j)(),{animations:d}=(0,v.K)().parsedLayout,s=!o&&!0===d,p=n.useId(),g=`${p}-segmented-control`,{buttonPropsForPlan:m}=(0,c.D)(),{t:x}=(0,M._)(),T=e=>({transition:s?`grid-template-rows ${e.transitionDuration.$slower} ${e.transitionTiming.$slowBezier}`:"none"}),y=e=>({background:z.s.mergedColorsBackground(S.T.setAlpha(e.colors.$colorBackground,1),e.colors.$neutralAlpha25)}),D=n.useMemo(()=>`repeat(${e.length+1}, minmax(9.375rem,1fr))`,[e.length]),Y=n.useMemo(()=>e.some(e=>!!e.annualMonthlyFee),[e]),F=n.useMemo(()=>{let r=new Set;return e.forEach(({features:e})=>{e.forEach(({name:e})=>r.add(e))}),Array.from(r)},[e]);return e.length?(0,i.Y)(f.S,{children:(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableMatrix,sx:e=>({position:"relative",minWidth:"100%",display:"grid",isolation:"isolate",backgroundColor:e.colors.$colorBackground,[I.g.md]:{overflowX:"auto"}}),children:(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableMatrixTable,role:"table",children:[(0,i.Y)(u.az,{elementDescriptor:[h.$z.pricingTableMatrixRowGroup,h.$z.pricingTableMatrixRowGroupHeader],role:"rowgroup",sx:e=>({position:"sticky",top:0,backgroundColor:e.colors.$colorBackground,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100,zIndex:1}),children:(0,i.FD)(u.az,{elementDescriptor:[h.$z.pricingTableMatrixRow,h.$z.pricingTableMatrixRowHeader],role:"row",sx:{display:"grid",gridTemplateColumns:D},children:[(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableMatrixColumnHeader,role:"columnheader",sx:e=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-end",rowGap:e.space.$3,paddingBlockEnd:e.space.$12,paddingInlineStart:e.space.$3}),children:Y?(0,i.FD)(i.FK,{children:[(0,i.Y)(u.EY,{id:g,colorScheme:"secondary",variant:"caption",localizationKey:(0,b.G)("billing.pricingTable.billingCycle"),children:"Billing cycle"}),(0,i.FD)(w.I.Root,{"aria-labelledby":g,value:r,onChange:e=>a(e),children:[(0,i.Y)(w.I.Button,{value:"month",text:(0,b.G)("billing.monthly")}),(0,i.Y)(w.I.Button,{value:"annual",text:(0,b.G)("billing.annually")})]})]}):null}),e.map(e=>{let a=e.slug===t,n=e.annualMonthlyFee&&"annual"===r?e.annualMonthlyFee:e.fee;return(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableMatrixColumnHeader,role:"columnheader",sx:[e=>({display:"flex",flexDirection:"column",alignItems:"flex-start",flex:1,borderStartStartRadius:e.radii.$xl,borderStartEndRadius:e.radii.$xl}),a&&y],"data-highlighted":a,children:[(0,i.FD)(u.az,{sx:e=>({width:"100%",padding:e.space.$4}),children:[e.avatarUrl||a?(0,i.FD)(u.L9,{sx:e=>({width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBlockEnd:e.space.$3}),children:[e.avatarUrl?(0,i.Y)(C.e,{elementDescriptor:h.$z.pricingTableMatrixAvatar,size:e=>40,title:e.name,initials:e.name[0],rounded:!1,imageUrl:e.avatarUrl}):null,a?(0,i.Y)(u.Ex,{elementDescriptor:h.$z.pricingTableMatrixBadge,colorScheme:"secondary",localizationKey:(0,b.G)("billing.popular")}):null]}):null,(0,i.Y)(u.DZ,{elementDescriptor:h.$z.pricingTableMatrixPlanName,textVariant:"h3",children:e.name}),(0,i.Y)(u.so,{align:"center",wrap:"wrap",sx:e=>({marginTop:e.space.$2,columnGap:e.space.$1x5}),children:e.hasBaseFee?(0,i.FD)(i.FK,{children:[(0,i.FD)(u.EY,{elementDescriptor:h.$z.pricingTableMatrixFee,variant:"h2",colorScheme:"body",children:[n.currencySymbol,n.amountFormatted]}),(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableMatrixFeePeriod,variant:"caption",colorScheme:"secondary",sx:e=>({textTransform:"lowercase",":before":{content:'"/"',marginInlineEnd:e.space.$1}}),localizationKey:(0,b.G)("billing.month")}),e.annualMonthlyFee?(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableMatrixFeePeriodNotice,sx:[e=>({width:"100%",display:"grid",gridTemplateRows:"annual"===r?"1fr":"0fr"}),T],inert:"annual"!==r?"true":void 0,children:(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableMatrixFeePeriodNoticeInner,sx:{overflow:"hidden",minHeight:0},children:(0,i.FD)(u.EY,{elementDescriptor:h.$z.pricingTableMatrixFeePeriodNoticeLabel,variant:"caption",colorScheme:"secondary",sx:e=>({width:"100%",display:"flex",alignItems:"center",columnGap:e.space.$1}),children:[(0,i.Y)(u.In,{icon:k.A,colorScheme:"neutral",size:"sm","aria-hidden":!0})," ",(0,i.Y)(u.L9,{localizationKey:(0,b.G)("billing.billedAnnually")})]})})}):null]}):(0,i.Y)(u.EY,{elementDescriptor:h.$z.pricingTableMatrixFee,variant:"h2",localizationKey:(0,b.G)("billing.free"),colorScheme:"body"})})]}),e.isDefault?null:(0,i.Y)(u.az,{sx:e=>({width:"100%",marginBlockStart:"auto",marginBlockEnd:e.space.$8,paddingBlockStart:e.space.$2,paddingBlockEnd:e.space.$4,paddingInline:e.space.$4}),children:(0,i.Y)(u.$n,{block:!0,textVariant:"buttonSmall",size:"xs",onClick:r=>{l(e,r)},...m({plan:e,selectedPlanPeriod:r}),colorScheme:a?"primary":"secondary"})})]},e.slug)})]})}),(0,i.FD)(u.az,{elementDescriptor:[h.$z.pricingTableMatrixRowGroup,h.$z.pricingTableMatrixRowGroupBody],role:"rowgroup",children:[F.map(r=>(0,i.FD)(u.az,{elementDescriptor:[h.$z.pricingTableMatrixRow,h.$z.pricingTableMatrixRowBody],role:"row",sx:e=>({position:"relative",display:"grid",gridTemplateColumns:D,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100,":after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",backgroundColor:e.colors.$neutralAlpha25,opacity:0},":hover:after":{opacity:1}}),children:[(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableMatrixCell,role:"cell",sx:e=>({padding:e.space.$3}),children:(0,i.Y)(u.EY,{colorScheme:"body",children:r})}),e.map(e=>{let a=e.slug===t,l=e.features.some(e=>e.name===r);return(0,i.Y)(u.az,{elementDescriptor:h.$z.pricingTableMatrixCell,role:"cell",sx:[e=>({display:"grid",placeContent:"center",padding:e.space.$3}),a&&y],"data-highlighted":a,"data-checked":l,children:l&&(0,i.Y)(u.In,{icon:$.A,colorScheme:"neutral",size:"sm","aria-label":x((0,b.G)("billing.pricingTable.included"))})},e.slug)})]},r)),(0,i.FD)(u.az,{elementDescriptor:h.$z.pricingTableMatrixFooter,sx:{display:"grid",gridTemplateColumns:D},children:[(0,i.Y)(u.az,{elementDescriptor:[h.$z.pricingTableMatrixCell,h.$z.pricingTableMatrixCellFooter]}),e.map(e=>{let r=e.slug===t;return(0,i.Y)(u.az,{elementDescriptor:[h.$z.pricingTableMatrixCell,h.$z.pricingTableMatrixCellFooter],sx:[e=>({height:e.space.$10,borderEndStartRadius:e.radii.$xl,borderEndEndRadius:e.radii.$xl}),r&&y],"data-highlighted":r},e.slug)})]})]})]})})}):null}let B=e=>{let r=(0,l.ho)(),{mode:a="mounted",signInMode:d="redirect"}=(0,o.T)(),s="modal"===a,{data:p,subscriptionItems:g}=(0,c.Rs)(),{data:m}=(0,c.A$)(),{handleSelectPlan:u}=(0,c.D)(),h=(0,n.useMemo)(()=>r.isSignedIn?p?m:[]:m,[r.isSignedIn,m,p]),b=(0,n.useMemo)(()=>{if(s){let e=g?.find(e=>"upcoming"===e.status);if(e)return e.planPeriod;let r=g?.find(e=>!e.canceledAt&&"active"===e.status&&!e.plan.isDefault);if(r)return r.planPeriod}return"annual"},[s,g]),[$,x]=(0,n.useState)(b);(0,n.useEffect)(()=>{x(b)},[b]);let f=(i,l)=>{if(!r.isSignedIn)return"modal"===d?r.openSignIn():r.redirectToSignIn();u({mode:a,plan:i,planPeriod:$,event:l,appearance:e.checkoutProps?.appearance,newSubscriptionRedirectUrl:e.newSubscriptionRedirectUrl})};return(0,c.mu)(),(0,i.Y)(t.n.Root,{flow:"pricingTable",isFlowReady:r.isSignedIn?!!p:m.length>0,sx:{width:"100%"},children:"modal"!==a&&"matrix"===e.layout?(0,i.Y)(E,{plans:h,planPeriod:$,setPlanPeriod:x,onSelect:f,highlightedPlan:e.highlightPlan}):(0,i.Y)(y,{plans:h,planPeriod:$,setPlanPeriod:x,onSelect:f,isCompact:s,props:e})})},R=e=>(0,i.Y)("div",{children:(0,i.Y)(B,{...e})}),_=e=>{let{mode:r="mounted"}=(0,o.T)();return"modal"===r?(0,i.Y)(R,{...e}):(0,i.Y)(B,{...e})}},3679:function(e,r,a){a.d(r,{V:()=>c});var i=a(4518),l=a(8272),n=a(2861);let t={active:"badge__activePlan",upcoming:"badge__upcomingPlan",past_due:"badge__pastDuePlan",free_trial:"badge__freeTrial"},o={active:"secondary",upcoming:"primary",past_due:"warning",free_trial:"secondary"},c=({subscription:e,elementDescriptor:r})=>(0,i.Y)(l.Ex,{elementDescriptor:r,colorScheme:o[e.status],localizationKey:(0,n.G)(t[e.status])})},164:function(e,r,a){a.d(r,{T:()=>n,a:()=>l});var i=a(5074);let l=(0,i.createContext)(null),n=()=>{let e=(0,i.useContext)(l);if(!e||"PricingTable"!==e.componentName)throw Error("Clerk: usePricingTableContext called outside PricingTable.");let{componentName:r,...a}=e;return{...a,componentName:r}}}}]);
@@ -1,9 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["256"],{2677:function(e,t,r){r.r(t),r.d(t,{Checkout:()=>ec});var i=r(4518),o=r(8532),n=r(6256),a=r(4173),l=r(8909),c=r(5074),s=r(2366);let d=(0,c.createContext)(null),u=()=>{let e=(0,c.useContext)(d),t=(0,l.ho)(),r=(0,s.II)();if(!e||"Checkout"!==e.componentName)throw Error("Clerk: useCheckoutContext called outside Checkout.");let i=(0,c.useMemo)(()=>{if(e.portalRoot)return;let i=e.newSubscriptionRedirectUrl||t.buildNewSubscriptionRedirectUrl?.();return(0,a.vU)(r?.allowedRedirectOrigins,window.location.origin)(i)?i:void 0},[e.portalRoot,e.newSubscriptionRedirectUrl,t,r?.allowedRedirectOrigins]),{componentName:o,...n}=e;return{...n,componentName:o,newSubscriptionRedirectUrl:i}};var p=r(4607),h=r(2861),m=r(8272),g=r(9436),y=r(137),f=r(8920),$=r(6580),b=r(4091),Y=r(359),D=r(4964);let x=e=>e[0].toUpperCase()+e.slice(1),w=(e,t,r)=>e+(t-e)*r,k=({positionX:e,positionY:t})=>{let r=(0,c.useRef)(null),[o,n]=(0,c.useState)({x:256,y:256}),a="undefined"==typeof window||window.matchMedia("(hover: hover) and (pointer: fine)").matches;(0,c.useEffect)(()=>{if(!a)return;let i=()=>{n(r=>({x:w(r.x,e,.15),y:w(r.y,t,.15)})),r.current=requestAnimationFrame(i)};return r.current=requestAnimationFrame(i),()=>{r.current&&cancelAnimationFrame(r.current)}},[e,t,a]);let l=(0,c.useId)(),s=(0,c.useId)(),d=(0,c.useId)();return(0,i.FD)(m.az,{elementDescriptor:f.$z.checkoutSuccessRings,as:"svg",viewBox:"0 0 512 512",sx:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":!0,children:[(0,i.FD)("defs",{children:[(0,i.FD)("radialGradient",{id:"clerk-checkout-success-gradient",children:[(0,i.Y)("stop",{offset:"0%",style:{stopColor:"var(--ring-highlight)"}}),(0,i.Y)("stop",{offset:"100%",stopOpacity:"0",style:{stopColor:"var(--ring-highlight)"}})]}),(0,i.Y)("filter",{id:"clerk-checkout-success-blur-effect",children:(0,i.Y)("feGaussianBlur",{stdDeviation:"10"})}),[{r:225,maskStart:10,maskEnd:90,id:l},{r:162.5,maskStart:15,maskEnd:85,id:s},{r:100,maskStart:20,maskEnd:80,id:d}].map(({maskStart:e,maskEnd:t,id:r})=>(0,i.FD)("linearGradient",{id:`gradient-${r}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,i.Y)("stop",{offset:`${e+5}%`,stopColor:"white",stopOpacity:"0"}),(0,i.Y)("stop",{offset:`${e+35}%`,stopColor:"white",stopOpacity:"1"}),(0,i.Y)("stop",{offset:`${t-35}%`,stopColor:"white",stopOpacity:"1"}),(0,i.Y)("stop",{offset:`${t-5}%`,stopColor:"white",stopOpacity:"0"})]},r)),(0,i.Y)("mask",{id:"clerk-checkout-success-mask",children:[{r:225,id:l},{r:162.5,id:s},{r:100,id:d}].map(({r:e,id:t})=>(0,i.Y)("circle",{cx:"256",cy:"256",r:e,stroke:`url(#gradient-${t})`,fill:"none",strokeWidth:"1"},t))})]}),(0,i.FD)("g",{mask:"url(#clerk-checkout-success-mask)",children:[(0,i.Y)("rect",{width:"512",height:"512",style:{fill:"var(--ring-fill)"}}),a&&(0,i.Y)("rect",{id:"movingGradientHighlight",width:"256",height:"256",x:o.x-128,y:o.y-128,fill:"url(#clerk-checkout-success-gradient)",filter:"url(#clerk-checkout-success-blur-effect)"})]})]})},v=()=>{let e=(0,D.r)(),{setIsOpen:t}=(0,o.g)(),{newSubscriptionRedirectUrl:r}=u(),{checkout:n}=(0,l.v$)(),{totals:a,paymentMethod:s,planPeriodStart:d,freeTrialEndsAt:p}=n,[w,v]=(0,c.useState)({x:256,y:256}),_=(0,Y.j)(),{animations:F}=(0,$.K)().parsedLayout,S=!_&&!0===F,z=(0,c.useRef)(null),G="undefined"==typeof window||window.matchMedia("(hover: hover) and (pointer: fine)").matches;return a?(0,i.FD)(i.FK,{children:[(0,i.Y)(o.Drawer.Body,{children:(0,i.FD)(m.L9,{elementDescriptor:f.$z.checkoutSuccessRoot,sx:e=>({"--ring-fill":e.colors.$neutralAlpha200,"--ring-highlight":e.colors.$success500,margin:"auto",position:"relative",aspectRatio:"1/1",display:"grid",width:"100%",flexShrink:0,transformOrigin:"bottom center",animationName:"scaleIn",animationDuration:`${b.wz.slowest}ms`,animationTimingFunction:b._8.bezier,animationFillMode:"forwards",opacity:0,overflow:"hidden",backgroundColor:e.colors.$colorBackground,"@keyframes scaleIn":{"0%":{filter:"blur(10px)",transform:"scale(0.85)",opacity:0},"100%":{filter:"blur(0px)",transform:"scale(1)",opacity:1}},...!S&&{animation:"none",opacity:1}}),ref:z,onMouseMove:e=>{if(G&&z.current){let t=z.current.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,o=t.width;o>0?v({x:r/o*512,y:i/o*512}):v({x:256,y:256})}},children:[(0,i.Y)(k,{positionX:w.x,positionY:w.y}),(0,i.FD)(m.az,{elementDescriptor:f.$z.checkoutSuccessBadge,sx:e=>({margin:"auto",gridArea:"1/1",display:"flex",position:"relative",width:e.sizes.$16,height:e.sizes.$16,borderRadius:e.radii.$circle,backgroundImage:"linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.30) 95.31%)",boxShadow:"0px 4px 12px 0px rgba(0, 0, 0, 0.35), 0px 1px 0px 0px rgba(255, 255, 255, 0.05) inset",color:G?e.colors.$success500:e.colors.$colorForeground,":before":{content:'""',position:"absolute",inset:e.space.$1,borderRadius:e.radii.$circle,backgroundColor:e.colors.$colorBackground}}),children:[(0,i.Y)("svg",{fill:"none",viewBox:"0 0 10 10","aria-hidden":"true",style:{position:"relative",margin:"auto",width:"1rem",height:"1rem"},children:(0,i.Y)("path",{d:"m1 6 3 3 5-8",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"1",pathLength:"1",style:{strokeDashoffset:"1",animation:S?`check ${b.wz.drawer}ms ${b._8.bezier} forwards ${b.wz.slow}ms`:"none",...!S&&{strokeDashoffset:"0"}}})}),(0,i.Y)("style",{children:`
2
- @keyframes check {
3
- 0% {
4
- stroke-dashoffset: 1;
5
- }
6
- 100% {
7
- stroke-dashoffset: 0;
8
- }
9
- `})]}),(0,i.FD)(m.L9,{sx:e=>({margin:"auto",gridArea:"1/1",position:"relative",textAlign:"center",transform:`translateY(${e.space.$20})`}),children:[(0,i.Y)(m.DZ,{elementDescriptor:f.$z.checkoutSuccessTitle,as:"h2",textVariant:"h2",localizationKey:p?(0,h.G)("billing.checkout.title__trialSuccess"):a.totalDueNow.amount>0?(0,h.G)("billing.checkout.title__paymentSuccessful"):(0,h.G)("billing.checkout.title__subscriptionSuccessful"),sx:e=>({opacity:0,animationName:"slideUp",animationDuration:`${b.wz.slowest}ms`,animationTimingFunction:b._8.bezier,animationFillMode:"forwards",color:e.colors.$colorForeground,"@keyframes slideUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!S&&{opacity:1,animation:"none"}})}),(0,i.Y)(m.EY,{elementDescriptor:f.$z.checkoutSuccessDescription,colorScheme:"secondary",sx:e=>({textAlign:"center",paddingInline:e.space.$8,marginBlockStart:e.space.$2,opacity:0,animationName:"slideUp",animationDuration:`${1.5*b.wz.slowest}ms`,animationTimingFunction:b._8.bezier,animationFillMode:"forwards","@keyframes slideUp":{"0%":{transform:"translateY(30px)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!S&&{opacity:1,animation:"none"}}),localizationKey:a.totalDueNow.amount>0?(0,h.G)("billing.checkout.description__paymentSuccessful"):(0,h.G)("billing.checkout.description__subscriptionSuccessful")})]})]})}),(0,i.FD)(o.Drawer.Footer,{sx:e=>({rowGap:e.space.$4,animationName:"footerSlideInUp",animationDuration:`${b.wz.drawer}ms`,animationTimingFunction:b._8.bezier,"@keyframes footerSlideInUp":{"0%":{transform:"translateY(100%)",opacity:0},"100%":{transform:"translateY(0)",opacity:1}},...!S&&{animation:"none"}}),children:[(0,i.FD)(g.p.Root,{children:[(0,i.FD)(g.p.Group,{variant:"secondary",children:[(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.checkout.lineItems.title__totalPaid")}),(0,i.Y)(g.p.Description,{text:`${a.totalDueNow.currencySymbol}${a.totalDueNow.amountFormatted}`})]}),p?(0,i.FD)(g.p.Group,{variant:"secondary",children:[(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.checkout.lineItems.title__freeTrialEndsAt")}),(0,i.Y)(g.p.Description,{text:(0,y.Y)(p)})]}):null,(0,i.FD)(g.p.Group,{variant:"secondary",children:[(0,i.Y)(g.p.Title,{title:a.totalDueNow.amount>0||null!==p?(0,h.G)("billing.checkout.lineItems.title__paymentMethod"):(0,h.G)("billing.checkout.lineItems.title__subscriptionBegins")}),(0,i.Y)(g.p.Description,{text:a.totalDueNow.amount>0||null!==p?s?"card"!==s.paymentType?s.paymentType?`${x(s.paymentType)}`:"–":s.cardType?`${x(s.cardType)} ⋯ ${s.last4}`:"–":"–":d?(0,y.Y)(new Date(d)):"–"})]})]}),(0,i.Y)(m.$n,{onClick:()=>{r&&e.navigate(r),t&&t(!1)},localizationKey:(0,h.G)("formButtonPrimary")})]})]}):null};var _=r(6088),F=r(3269),S=r(6839),z=r(1586),G=r(6455),T=r(4468),R=r(625),B=r(7288),M=r(9068),C=r(8023),I=r(3450),A=r(3369),E=r(3679);let L=e=>e[0].toUpperCase()+e.slice(1),P="payment_method_id",N=(0,F.dm)(()=>{let{checkout:e}=(0,l.v$)(),{plan:t,totals:r,isImmediatePlanChange:n,planPeriod:a,freeTrialEndsAt:c}=e;if(!t)return null;let s=!!r.credit?.amount&&r.credit.amount>0,d=!!r.pastDue?.amount&&r.pastDue.amount>0,u="month"===a?t.fee:t.annualMonthlyFee;return(0,i.FD)(o.Drawer.Body,{children:[(0,i.Y)(m.az,{elementDescriptor:f.$z.checkoutFormLineItemsRoot,sx:e=>({padding:e.space.$4,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,i.FD)(g.p.Root,{children:[(0,i.FD)(g.p.Group,{children:[(0,i.Y)(g.p.Title,{title:t.name,description:"annual"===a?(0,h.G)("billing.billedAnnually"):void 0,badge:t.freeTrialEnabled&&c?(0,i.Y)(E.V,{subscription:{status:"free_trial"}}):null}),(0,i.Y)(g.p.Description,{prefix:"annual"===a?"x12":void 0,text:`${u.currencySymbol}${u.amountFormatted}`,suffix:(0,h.G)("billing.checkout.perMonth")})]}),(0,i.FD)(g.p.Group,{borderTop:!0,variant:"tertiary",children:[(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.subtotal")}),(0,i.Y)(g.p.Description,{text:`${r.subtotal.currencySymbol}${r.subtotal.amountFormatted}`})]}),s&&(0,i.FD)(g.p.Group,{variant:"tertiary",children:[(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.creditRemainder")}),(0,i.Y)(g.p.Description,{text:`- ${r.credit?.currencySymbol}${r.credit?.amountFormatted}`})]}),d&&(0,i.FD)(g.p.Group,{variant:"tertiary",children:[(0,i.FD)(G.m_.Root,{children:[(0,i.Y)(G.m_.Trigger,{children:(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.pastDue"),icon:M.A})}),(0,i.Y)(G.m_.Content,{text:(0,h.G)("billing.checkout.pastDueNotice")})]}),(0,i.Y)(g.p.Description,{text:`${r.pastDue?.currencySymbol}${r.pastDue?.amountFormatted}`})]}),!!c&&!!t.freeTrialDays&&r.totalDueAfterFreeTrial&&(0,i.FD)(g.p.Group,{variant:"tertiary",children:[(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.checkout.totalDueAfterTrial",{days:t.freeTrialDays})}),(0,i.Y)(g.p.Description,{text:`${r.totalDueAfterFreeTrial.currencySymbol}${r.totalDueAfterFreeTrial.amountFormatted}`})]}),(0,i.FD)(g.p.Group,{borderTop:!0,children:[(0,i.Y)(g.p.Title,{title:(0,h.G)("billing.totalDueToday")}),(0,i.Y)(g.p.Description,{text:`${r.totalDueNow.currencySymbol}${r.totalDueNow.amountFormatted}`})]})]})}),!n&&(0,i.Y)(m.az,{elementDescriptor:f.$z.checkoutFormLineItemsRoot,sx:e=>({paddingBlockStart:e.space.$4,paddingInline:e.space.$4}),children:(0,i.Y)(m.EY,{localizationKey:(0,h.G)("billing.checkout.downgradeNotice"),variant:"caption",colorScheme:"secondary"})}),(0,i.Y)(U,{})]})}),W=()=>{let{onSubscriptionComplete:e}=u(),{checkout:t}=(0,l.v$)(),r=(0,F.f0)();if("needs_confirmation"!==t.status)throw Error("Checkout not found");let i=async i=>{r.setLoading(),r.setError(void 0);let{error:o}=await t.confirm(i);o?(0,T.H4)(o,[],r.setError):e?.(),r.setIdle()};return{payWithExistingPaymentMethod:e=>(e.preventDefault(),i({paymentMethodId:new FormData(e.currentTarget).get(P)})),addPaymentMethodAndPay:e=>i(e),payWithTestCard:()=>i({gateway:"stripe",useTestCard:!0}),payWithoutPaymentMethod:e=>(e.preventDefault(),i({}))}},U=()=>{let{checkout:e}=(0,l.v$)(),{plan:t}=e,{isLoading:r}=(0,B.mu)();return t?r?(0,i.Y)(m.y$,{sx:{margin:"auto"}}):(0,i.Y)(K,{}):null},K=()=>{let{checkout:e}=(0,l.v$)(),{plan:t,isImmediatePlanChange:r,needsPaymentMethod:o}=e,{data:n}=(0,B.mu)(),[a,s]=(0,c.useState)(()=>n.length>0||__BUILD_DISABLE_RHC__?"existing":"new");return t?(0,i.FD)(m.fv,{elementDescriptor:f.$z.checkoutFormElementsRoot,gap:4,sx:e=>({padding:e.space.$4}),children:[__BUILD_DISABLE_RHC__?null:(0,i.Y)(i.FK,{children:n.length>0&&r&&o&&(0,i.FD)(S.I.Root,{"aria-label":"Payment method source",value:a,onChange:e=>s(e),size:"lg",fullWidth:!0,children:[(0,i.Y)(S.I.Button,{value:"existing",text:(0,h.G)("billing.paymentMethods__label")}),(0,i.Y)(S.I.Button,{value:"new",text:(0,h.G)("billing.addPaymentMethod__label")})]})}),o?"existing"===a?(0,i.Y)(Z,{paymentMethods:n}):!__BUILD_DISABLE_RHC__&&"new"===a&&(0,i.Y)(V,{}):(0,i.Y)(H,{})]}):null},J=()=>{let{isLoading:e}=(0,F.f0)(),{payWithTestCard:t}=W();return(0,i.FD)(m.az,{sx:e=>({background:e.colors.$neutralAlpha50,padding:e.space.$2x5,borderRadius:e.radii.$md,borderWidth:e.borderWidths.$normal,borderStyle:e.borderStyles.$solid,borderColor:e.colors.$borderAlpha100,display:"flex",flexDirection:"column",rowGap:e.space.$2,position:"relative"}),children:[(0,i.Y)(m.az,{sx:e=>({position:"absolute",inset:0,background:`repeating-linear-gradient(-45deg,${e.colors.$warningAlpha100},${e.colors.$warningAlpha100} 6px,${e.colors.$warningAlpha150} 6px,${e.colors.$warningAlpha150} 12px)`,maskImage:"linear-gradient(transparent 20%, black)",pointerEvents:"none"})}),(0,i.FD)(m.so,{sx:e=>({alignItems:"center",justifyContent:"center",flexDirection:"column",rowGap:e.space.$2}),children:[(0,i.Y)(m.EY,{sx:e=>({color:e.colors.$warning500,fontWeight:e.fontWeights.$semibold}),localizationKey:(0,h.G)("billing.paymentMethod.dev.developmentMode")}),(0,i.Y)(m.$n,{type:"button",block:!0,variant:"bordered",localizationKey:(0,h.G)("userProfile.billingPage.paymentMethodsSection.payWithTestCardButton"),colorScheme:"secondary",isLoading:e,onClick:t})]})]})},O=()=>{let{checkout:e}=(0,l.v$)(),{status:t,freeTrialEndsAt:r,totals:i}=e;if("needs_initialization"===t)throw Error("Clerk: Invalid state");return r?(0,h.G)("billing.startFreeTrial"):i.totalDueNow.amount>0?(0,h.G)("billing.pay",{amount:`${i.totalDueNow.currencySymbol}${i.totalDueNow.amountFormatted}`}):(0,h.G)("billing.subscribe")},H=(0,F.dm)(()=>{let{for:e}=u(),{payWithoutPaymentMethod:t}=W(),r=(0,F.f0)();return(0,i.FD)(m.lV,{onSubmit:t,sx:X,children:[(0,i.Y)(_.Z.Alert,{children:r.error}),(0,i.Y)(j,{})]})}),V=(0,F.dm)(()=>{let{addPaymentMethodAndPay:e}=W(),t=O(),{checkout:r}=(0,l.v$)();return(0,i.FD)(I.bL,{onSuccess:e,checkout:r,children:[(0,i.Y)(R.W,{children:(0,i.Y)(J,{})}),(0,i.Y)(I.pr,{text:t})]})}),j=e=>{let t=(0,F.f0)(),r=O();return(0,i.Y)(m.$n,{type:"submit",colorScheme:"primary",size:"sm",textVariant:"buttonLarge",sx:{width:"100%"},isLoading:t.isLoading,localizationKey:r,...e})},X=e=>({display:"flex",flexDirection:"column",rowGap:e.space.$4}),Z=(0,F.dm)(({paymentMethods:e})=>{let{checkout:t}=(0,l.v$)(),{paymentMethod:r,isImmediatePlanChange:o,needsPaymentMethod:n}=t,{payWithExistingPaymentMethod:a}=W(),s=(0,F.f0)(),[d,u]=(0,c.useState)(r||e.find(e=>e.isDefault)),p=(0,c.useMemo)(()=>e.map(e=>{let t="card"!==e.paymentType?e.paymentType?`${L(e.paymentType)}`:"–":e.cardType?`${L(e.cardType)} ⋯ ${e.last4}`:"–";return{value:e.id,label:t}}),[e]);return(0,i.FD)(m.lV,{onSubmit:a,sx:X,children:[o&&n?(0,i.FD)(z.l6,{elementId:"paymentMethod",options:p,value:d?.id||null,onChange:t=>{u(e.find(e=>e.id===t.value))},portal:!0,children:[(0,i.Y)("input",{name:P,type:"hidden",value:d?.id}),(0,i.Y)(z.JC,{icon:C.A,sx:e=>({justifyContent:"space-between",backgroundColor:e.colors.$colorBackground}),children:d&&(0,i.Y)(A.O,{paymentMethod:d})}),(0,i.Y)(z.UL,{sx:e=>({paddingBlock:e.space.$1,color:e.colors.$colorForeground})})]}):(0,i.Y)("input",{name:P,type:"hidden",value:d?.id}),(0,i.Y)(_.Z.Alert,{children:s.error}),(0,i.Y)(j,{})]})}),q=()=>{let{checkout:e}=(0,l.v$)();return(0,c.useEffect)(()=>{e.start()},[]),null},Q=({children:e})=>{let{planId:t,planPeriod:r,for:o}=u();return(0,i.FD)(l.Rx,{for:o,planId:t,planPeriod:r,children:[(0,i.Y)(q,{}),e]})},ee=({children:e,name:t})=>{let{checkout:r}=(0,l.v$)();return r.status!==t?null:e},et=({children:e,status:t})=>{let{errors:r,fetchStatus:i}=(0,l.v$)();return(0,c.useMemo)(()=>{if(r.global){let e=r.global.map(e=>e.code);return e.includes("missing_payer_email")?"missing_payer_email":e.includes("invalid_plan_change")?"invalid_plan_change":"generic_error"}return i},[i])!==t?null:e};var er=r(8036),ei=r(78),eo=r(2336);let en=()=>{let{errors:e}=(0,l.v$)(),{translateError:t}=(0,ei._)(),{t:r}=(0,ei._)();return(0,i.Y)(o.Drawer.Body,{children:(0,i.Y)(m.so,{align:"center",justify:"center",sx:e=>({height:"100%",padding:e.space.$4,fontSize:e.fontSizes.$md}),children:(0,i.Y)(er.F,{variant:"danger",colorScheme:"danger",children:e.global?t(e.global[0]):r((0,h.G)("unstable__errors.form_param_value_invalid"))})})})},ea=()=>{let{planPeriod:e}=u(),{errors:t}=(0,l.v$)(),r=t?.global?.find(e=>"invalid_plan_change"===e.code);if(!r)return null;let{plan:n,isPlanUpgradePossible:a}=r?.meta||{};return(0,i.Y)(o.Drawer.Body,{children:(0,i.FD)(m.so,{gap:4,direction:"col",children:[(0,i.Y)(m.az,{elementDescriptor:f.$z.checkoutFormLineItemsRoot,sx:e=>({padding:e.space.$4,borderBottomWidth:e.borderWidths.$normal,borderBottomStyle:e.borderStyles.$solid,borderBottomColor:e.colors.$borderAlpha100}),children:(0,i.Y)(g.p.Root,{children:(0,i.FD)(g.p.Group,{children:[(0,i.Y)(g.p.Title,{title:n.name,description:"annual"===e?(0,h.G)("billing.billedAnnually"):void 0}),(0,i.Y)(g.p.Description,{prefix:"annual"===e?"x12":void 0,text:`${n.currency_symbol}${"month"===e?n.amount_formatted:n.annual_monthly_amount_formatted}`,suffix:(0,h.G)("billing.checkout.perMonth")})]})})}),(0,i.Y)(m.az,{sx:e=>({padding:e.space.$4}),children:(0,i.Y)(er.F,{variant:"info",colorScheme:"info",title:a?(0,h.G)("billing.cannotSubscribeMonthly"):(0,h.G)("billing.cannotSubscribeUnrecoverable")})})]})})},el=()=>{let{checkout:e}=(0,l.v$)(),{setIsOpen:t}=(0,o.g)();return(0,i.Y)(o.Drawer.Body,{children:(0,i.Y)(m.az,{sx:e=>({padding:e.space.$4}),children:(0,i.Y)(eo.v,{title:(0,h.G)("billing.checkout.emailForm.title"),subtitle:(0,h.G)("billing.checkout.emailForm.subtitle"),onSuccess:()=>void e.start(),onReset:()=>t(!1),disableAutoFocus:!0})})})},ec=e=>(0,i.Y)(p.n.Root,{flow:"checkout",children:(0,i.Y)(p.n.Part,{children:(0,i.Y)(n.m$.Provider,{value:e.for||"user",children:(0,i.Y)(d.Provider,{value:{componentName:"Checkout",...e},children:(0,i.FD)(o.Drawer.Content,{children:[(0,i.Y)(o.Drawer.Header,{title:(0,h.G)("billing.checkout.title")}),(0,i.FD)(Q,{children:[(0,i.FD)(ee,{name:"needs_initialization",children:[(0,i.Y)(et,{status:"fetching",children:(0,i.Y)(m.y$,{sx:{margin:"auto"}})}),(0,i.Y)(et,{status:"invalid_plan_change",children:(0,i.Y)(ea,{})}),(0,i.Y)(et,{status:"missing_payer_email",children:(0,i.Y)(el,{})}),(0,i.Y)(et,{status:"generic_error",children:(0,i.Y)(en,{})})]}),(0,i.Y)(ee,{name:"completed",children:(0,i.Y)(v,{})}),(0,i.Y)(ee,{name:"needs_confirmation",children:(0,i.Y)(N,{})})]})]})})})})})},3450:function(e,t,r){r.d(t,{pr:()=>R,L6:()=>T,Mo:()=>G,bL:()=>S});var i=r(4518),o=r(8909),n=r(5074),a=r(6088),l=r(3269),c=r(2454),s=r(1475),d=r(3549),u=r(8930),p=r(4468),h=r(6256),m=r(6580),g=r(78),y=r(2861),f=r(8272),$=r(8920);let b=e=>(0,i.Y)(f.az,{sx:[e=>({height:e.space.$2,width:"100%",borderRadius:e.radii.$md,background:e.colors.$neutralAlpha100}),e.sx]}),Y=()=>(0,i.Y)(b,{sx:e=>({height:e.space.$10,width:"100%"})}),D=e=>(0,i.Y)(f.so,{direction:"col",gap:2,children:e.children}),x=()=>(0,i.Y)(f.az,{"aria-label":"Loading...",sx:{position:"relative",minHeight:0,flex:1,overflowY:"auto"},children:(0,i.FD)(f.so,{direction:"col",gap:5,children:[(0,i.FD)(D,{children:[(0,i.Y)(b,{sx:e=>({height:e.space.$3,width:e.sizes.$24})}),(0,i.Y)(Y,{})]}),(0,i.FD)(f.xA,{columns:2,gap:4,children:[(0,i.FD)(D,{children:[(0,i.Y)(b,{sx:e=>({height:e.space.$3,width:e.sizes.$20})}),(0,i.Y)(Y,{})]}),(0,i.FD)(D,{children:[(0,i.Y)(b,{sx:e=>({height:e.space.$3,width:e.sizes.$24})}),(0,i.Y)(Y,{})]})]}),(0,i.FD)(D,{children:[(0,i.Y)(b,{sx:e=>({height:e.space.$3,width:e.sizes.$16})}),(0,i.Y)(Y,{})]}),(0,i.FD)(D,{children:[(0,i.Y)(b,{}),(0,i.Y)(b,{}),(0,i.Y)(b,{sx:{width:"66.666667%"}})]})]})}),[w,k]=(0,o.e3)("AddPaymentMethodRoot"),v=({children:e,checkout:t,...r})=>{var a;let l,c=(0,h.XX)(),s=(0,n.useRef)(null),{t:d}=(0,g._)(),[p,f]=(0,n.useState)(void 0),[$,b]=(0,n.useState)(void 0),[Y,D]=(0,n.useState)(void 0),x=(a=s.current,l=(0,m.K)().parsedInternalTheme,(0,n.useMemo)(()=>{if(!a)return;let{colors:e,fontWeights:t,fontSizes:r,radii:i,space:o}=l;return{colorPrimary:(0,u.G3)(a,e.$primary500,e.$colorBackground),colorBackground:(0,u.G3)(a,e.$colorInput,e.$colorBackground),colorText:(0,u.G3)(a,e.$colorForeground,e.$colorBackground),colorTextSecondary:(0,u.G3)(a,e.$colorMutedForeground,e.$colorBackground),colorSuccess:(0,u.G3)(a,e.$success500,e.$colorBackground),colorDanger:(0,u.G3)(a,e.$danger500,e.$colorBackground),colorWarning:(0,u.G3)(a,e.$warning500,e.$colorBackground),fontWeightNormal:(0,u.yJ)(a,"font-weight",t.$normal.toString()),fontWeightMedium:(0,u.yJ)(a,"font-weight",t.$medium.toString()),fontWeightBold:(0,u.yJ)(a,"font-weight",t.$bold.toString()),fontSizeXl:(0,u.yJ)(a,"font-size",r.$xl),fontSizeLg:(0,u.yJ)(a,"font-size",r.$lg),fontSizeSm:(0,u.yJ)(a,"font-size",r.$md),fontSizeXs:(0,u.yJ)(a,"font-size",r.$sm),borderRadius:(0,u.yJ)(a,"border-radius",i.$lg),spacingUnit:(0,u.yJ)(a,"padding",o.$1)}},[l,a]));return(0,i.FD)(w.Provider,{value:{value:{headerTitle:p,headerSubtitle:$,submitLabel:Y,setHeaderTitle:f,setHeaderSubtitle:b,setSubmitLabel:D,checkout:t,...r}},children:[(0,i.Y)("div",{ref:s,style:{display:"none"}}),(0,i.Y)(o.Tn,{checkout:t,for:c,stripeAppearance:x,paymentDescription:d((0,y.G)(t?.planPeriod==="month"?"billing.paymentMethod.applePayDescription.monthly":"billing.paymentMethod.applePayDescription.annual")),children:e})]})},_=e=>{let{isProviderReady:t}=(0,o.Jl)();return t?null:e.children},F=e=>{let{isProviderReady:t}=(0,o.Jl)();return t?(0,i.Y)(i.FK,{children:e.children}):null},S=e=>{let{children:t,...r}=e;return(0,i.FD)(v,{...r,children:[(0,i.Y)(_,{children:(0,i.Y)(f.so,{direction:"row",align:"center",justify:"center",sx:e=>({width:"100%",minHeight:e.sizes.$60}),children:(0,i.Y)(f.y$,{size:"lg",colorScheme:"primary",elementDescriptor:$.$z.spinner})})}),(0,i.Y)(F,{children:(0,i.Y)(B,{children:t})})]})},z=(e,t)=>{(0,n.useRef)(()=>{t(e)}),(0,n.useEffect)(()=>{t(e)},[e,t])},G=({text:e})=>{let{setHeaderTitle:t}=k();return z(e,t),null},T=({text:e})=>{let{setHeaderSubtitle:t}=k();return z(e,t),null},R=({text:e})=>{let{setSubmitLabel:t}=k();return z(e,t),null},B=({children:e})=>{let{headerTitle:t,headerSubtitle:r,submitLabel:n,checkout:u,onSuccess:m,cancelAction:g}=k(),f=(0,l.f0)(),$=(0,h.N7)(),{isFormReady:b,submit:Y,reset:D}=(0,o.Jl)(),w=async e=>{e.preventDefault(),f.setLoading(),f.setError(void 0);let{data:t,error:r}=await Y();if(!r)try{await m(t)}catch(e){(0,p.H4)(e,[],f.setError)}finally{f.setIdle(),D()}};return(0,i.Y)(d.M,{headerTitle:t,headerSubtitle:r,children:(0,i.FD)(c.l.Root,{onSubmit:w,sx:e=>({display:"flex",flexDirection:"column",rowGap:e.space.$3}),children:[e,(0,i.Y)(o.cl,{fallback:(0,i.Y)(x,{})}),(0,i.Y)(a.Z.Alert,{children:f.error}),(0,i.Y)(s.G,{isDisabled:!b,submitLabel:n??(0,y.G)(`${$}.billingPage.paymentMethodsSection.formButtonPrimary__add`),onReset:g,hideReset:!g,sx:{flex:u?1:void 0}})]})})}},3369:function(e,t,r){r.d(t,{O:()=>s});var i=r(4518),o=r(8272),n=r(8920),a=r(2861),l=r(4967),c=r(5203);let s=({paymentMethod:e})=>(0,i.FD)(o.so,{sx:{overflow:"hidden"},gap:2,align:"baseline",elementDescriptor:n.$z.paymentMethodRow,children:[(0,i.Y)(o.In,{icon:"card"===e.paymentType?l.A:c.A,sx:e=>({alignSelf:"center",color:e.colors.$colorMutedForeground}),elementDescriptor:n.$z.paymentMethodRowIcon}),(0,i.Y)(o.EY,{sx:e=>({color:e.colors.$colorForeground,textTransform:"capitalize"}),truncate:!0,elementDescriptor:n.$z.paymentMethodRowType,children:"card"===e.paymentType?e.cardType:e.paymentType}),(0,i.Y)(o.EY,{sx:e=>({color:e.colors.$colorMutedForeground}),variant:"caption",truncate:!0,elementDescriptor:n.$z.paymentMethodRowValue,children:"card"===e.paymentType?`⋯ ${e.last4}`:null}),e.isDefault&&(0,i.Y)(o.Ex,{elementDescriptor:n.$z.paymentMethodRowBadge,elementId:n.$z.paymentMethodRowBadge.setId("default"),localizationKey:(0,a.G)("badge__default")}),"expired"===e.status&&(0,i.Y)(o.Ex,{elementDescriptor:n.$z.paymentMethodRowBadge,elementId:n.$z.paymentMethodRowBadge.setId("expired"),colorScheme:"danger",localizationKey:(0,a.G)("badge__expired")})]})},3679:function(e,t,r){r.d(t,{V:()=>c});var i=r(4518),o=r(8272),n=r(2861);let a={active:"badge__activePlan",upcoming:"badge__upcomingPlan",past_due:"badge__pastDuePlan",free_trial:"badge__freeTrial"},l={active:"secondary",upcoming:"primary",past_due:"warning",free_trial:"secondary"},c=({subscription:e,elementDescriptor:t})=>(0,i.Y)(o.Ex,{elementDescriptor:t,colorScheme:l[e.status],localizationKey:(0,n.G)(a[e.status])})}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["721"],{3109:function(e,t,n){n.r(t),n.d(t,{OneTap:()=>S});var r=n(4518),a=n(5074),i=n(5577),c=n(4607),l=n(2265),o=n(7831),s=n(2950),u=n(8909),h=n(3269),p=n(7697),d=n(7032),g=n(7896),f=n(4964),_=n(1185);let U=(0,h.dm)(function(){let e=(0,u.ho)(),{user:t}=(0,u.Jd)(),n=(0,p.O)(),r=(0,a.useRef)(!1),{navigate:i}=(0,f.r)(),c=(0,d.H)();async function l(t){r.current=!1;try{let n=await e.authenticateWithGoogleOneTap({token:t.credential});await e.handleGoogleOneTapCallback(n,c.generateCallbackUrls(window.location.href),i)}catch(e){console.error(e)}}let o=n.displayConfig.googleOneTapClientId,h=!t?.id&&!!o;async function U(){if(__BUILD_DISABLE_RHC__)return void(0,s.S)("Google Identity Services");let e=await (0,_.u)();return e.accounts.id.initialize({client_id:o,callback:l,itp_support:c.itpSupport,cancel_on_tap_outside:c.cancelOnTapOutside,auto_select:!1,use_fedcm_for_prompt:c.fedCmSupport}),e}let{data:k}=(0,g.s)(h?U:void 0,"google-identity-services-script");return(0,a.useEffect)(()=>{!k||t?.id||r.current||(k.accounts.id.prompt(t=>{"skipped"===t.getMomentType()&&e.closeGoogleOneTap()}),r.current=!0)},[e,k,t?.id]),(0,a.useEffect)(()=>()=>{k&&r.current&&(r.current=!1,k.accounts.id.cancel())},[k]),null});function k(){return(0,r.Y)(l.q,{path:"one-tap",children:(0,r.Y)(c.n.Root,{flow:"oneTap",children:(0,r.Y)(o.d,{children:(0,r.Y)(l.q,{index:!0,children:(0,r.Y)(U,{})})})})})}k.displayName="OneTap";let S=(0,i.Z)(k)},7032:function(e,t,n){n.d(t,{H:()=>u,Q:()=>s});var r=n(8380),a=n(4173),i=n(5074),c=n(2366),l=n(7697),o=n(4964);let s=(0,i.createContext)(null),u=()=>{let e=(0,i.useContext)(s),t=(0,c.II)(),{displayConfig:n}=(0,l.O)(),{queryParams:u}=(0,o.r)();if(!e||"GoogleOneTap"!==e.componentName)throw Error("Clerk: useGoogleOneTapContext called outside GoogleOneTap.");let{componentName:h,...p}=e,d=(0,i.useCallback)(e=>{let i=new r.n(t,{...p,signInFallbackRedirectUrl:e,signUpFallbackRedirectUrl:e},u),c=t.signUpUrl||n.signUpUrl,l=t.signInUrl||n.signInUrl,o=i.getPreservedSearchParams();l=(0,a.kZ)({base:l,hashSearchParams:[u,o]},{stringify:!0}),c=(0,a.kZ)({base:c,hashSearchParams:[u,o]},{stringify:!0});let s=i.getAfterSignInUrl(),h=i.getAfterSignUpUrl(),d=(0,a.kZ)({base:c,hashPath:"/continue",hashSearch:new URLSearchParams({sign_up_force_redirect_url:h}).toString()},{stringify:!0}),g=(0,a.kZ)({base:l,hashPath:"/factor-one",hashSearch:new URLSearchParams({sign_in_force_redirect_url:s}).toString()},{stringify:!0}),f=(0,a.kZ)({base:l,hashPath:"/factor-two",hashSearch:new URLSearchParams({sign_in_force_redirect_url:s}).toString()},{stringify:!0});return{signInUrl:l,signUpUrl:c,firstFactorUrl:g,secondFactorUrl:f,continueSignUpUrl:d,signInForceRedirectUrl:s,signUpForceRedirectUrl:h}},[p,n.signInUrl,n.signUpUrl,t,u]);return{...p,componentName:h,generateCallbackUrls:d}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["390"],{5953:function(e,r,s){s.r(r),s.d(r,{SessionTasks:()=>L});var t=s(4518),i=s(5580),n=s(8909),o=s(4525),a=s(5074),l=s(4607),d=s(6088),c=s(3269),u=s(6980),h=s(1616),p=s(4964),m=s(7831),Y=s(2265),w=s(9024),k=s(7697),f=s(9599),g=s(5577),P=s(78),v=s(2861),y=s(8272),C=s(8920),R=s(2454),O=s(6153),b=s(8282),F=s(8691),T=s(4468),Z=s(3990),x=s(8640),z=s(179);let _=(0,g.Z)((0,z.d)((0,c.dm)(()=>{let e=(0,n.ho)(),r=(0,c.f0)(),{userSettings:{passwordSettings:s}}=(0,k.O)(),{t:i,locale:o}=(0,P._)(),{redirectUrlComplete:a}=(0,h.O_)(),{otherSessions:u}=(0,F.z)({user:e.user}),{navigateAfterSignOut:p,navigateAfterMultiSessionSingleSignOutUrl:m}=(0,f.g)(),Y=(0,n.Wp)((e,r)=>e.updatePassword(...r)),{navigateOnSetActive:w}=(0,h.z1)(),g=(0,x.tJ)("newPassword","",{type:"password",label:(0,v.G)("formFieldLabel__newPassword"),isRequired:!0,validatePassword:!0,buildErrorMessage:e=>(0,Z.C5)(e,{t:i,locale:o,passwordSettings:s})}),z=(0,x.tJ)("confirmPassword","",{type:"password",label:(0,v.G)("formFieldLabel__confirmPassword"),isRequired:!0}),_=(0,x.tJ)("signOutOfOtherSessions","",{type:"checkbox",label:(0,v.G)("formFieldLabel__signOutOfOtherSessions"),defaultChecked:!0}),{setConfirmPasswordFeedback:A,isPasswordMatch:D}=(0,b.Z)({passwordField:g,confirmPasswordField:z}),L=e.user?.primaryEmailAddress?.emailAddress??e.user?.username;return(0,t.Y)(l.n.Root,{flow:"taskResetPassword",children:(0,t.Y)(l.n.Part,{part:"resetPassword",children:(0,t.FD)(d.Z.Root,{children:[(0,t.FD)(d.Z.Content,{children:[(0,t.Y)(O.Y.Root,{showLogo:!0,children:(0,t.Y)(O.Y.Title,{localizationKey:(0,v.G)("taskResetPassword.title")})}),(0,t.Y)(d.Z.Alert,{children:r.error}),(0,t.Y)(y.fv,{elementDescriptor:C.$z.main,gap:8,children:(0,t.FD)(R.l.Root,{onSubmit:()=>{r.runAsync(async()=>{if(e.user){g.clearFeedback(),z.clearFeedback();try{await Y(e.user,[{newPassword:g.value,signOutOfOtherSessions:_.checked}]),await e.setActive({session:e.session,navigate:async({session:e})=>{await w?.({session:e,redirectUrlComplete:a})}})}catch(e){return(0,T.H4)(e,[g,z],r.setError)}}})},onBlur:()=>{g.value&&A(z.value)},gap:8,children:[(0,t.FD)(y.fv,{gap:6,children:[(0,t.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,t.Y)(R.l.ControlRow,{elementId:g.id,children:(0,t.Y)(R.l.PasswordInput,{...g.props,isRequired:!0,minLength:6})}),(0,t.Y)(R.l.ControlRow,{elementId:z.id,children:(0,t.Y)(R.l.PasswordInput,{...z.props,onChange:e=>(e.target.value&&A(e.target.value),z.props.onChange(e))})}),(0,t.Y)(R.l.ControlRow,{elementId:_.id,children:(0,t.Y)(R.l.Checkbox,{..._.props})})]}),(0,t.Y)(y.fv,{gap:3,children:(0,t.Y)(R.l.SubmitButton,{isLoading:r.isLoading,isDisabled:!D,localizationKey:(0,v.G)("taskResetPassword.formButtonPrimary")})})]})})]}),(0,t.Y)(d.Z.Footer,{children:(0,t.FD)(d.Z.Action,{elementId:"signOut",gap:2,justify:"center",sx:()=>({width:"100%"}),children:[L&&(0,t.Y)(d.Z.ActionText,{truncate:!0,localizationKey:(0,v.G)("taskResetPassword.signOut.actionText",{identifier:L})}),(0,t.Y)(d.Z.ActionLink,{sx:()=>({flexShrink:0}),onClick:()=>{0===u.length?e?.signOut(p):e?.signOut(m,{sessionId:e.session?.id})},localizationKey:(0,v.G)("taskResetPassword.signOut.actionLink")})]})})]})})})}),"reset-password")),A=()=>{let e=(0,n.ho)(),{navigate:r}=(0,p.r)(),{redirectUrlComplete:s}=(0,h.z1)();return(0,a.useEffect)(()=>{let s=setTimeout(()=>{let s=e.session?.currentTask?.key;s&&r(`./${i.tk[s]}`)},500);return()=>clearTimeout(s)},[r,e,s]),(0,t.Y)(l.n.Part,{part:"start",children:(0,t.FD)(d.Z.Root,{children:[(0,t.Y)(d.Z.Content,{children:(0,t.Y)(u.W,{})}),(0,t.Y)(d.Z.Footer,{})]})})};function D(){let e=(0,h.z1)();return(0,t.Y)(l.n.Root,{flow:"tasks",children:(0,t.FD)(m.d,{children:[(0,t.Y)(Y.q,{path:i.tk["choose-organization"],children:(0,t.Y)(h.lY.Provider,{value:{componentName:"TaskChooseOrganization",redirectUrlComplete:e.redirectUrlComplete},children:(0,t.Y)(w.TaskChooseOrganization,{})})}),(0,t.Y)(Y.q,{path:i.tk["reset-password"],children:(0,t.Y)(h.pq.Provider,{value:{componentName:"TaskResetPassword",redirectUrlComplete:e.redirectUrlComplete},children:(0,t.Y)(_,{})})}),(0,t.Y)(Y.q,{index:!0,children:(0,t.Y)(A,{})})]})})}let L=(0,c.dm)(({redirectUrlComplete:e})=>{let r=(0,n.ho)(),{navigate:s}=(0,p.r)(),i=(0,a.useRef)(null);return((0,a.useEffect)(()=>{let t=r.session?.currentTask;t&&r.session?.status!=="active"?r.telemetry?.record((0,o.we)("SessionTask",{task:t.key})):s(e)},[r,s,e]),r.session?.currentTask)?(0,t.Y)(h.qx.Provider,{value:{redirectUrlComplete:e},children:(0,t.Y)(D,{})}):(0,t.FD)(d.Z.Root,{sx:()=>({minHeight:i?i.current?.offsetHeight:void 0}),children:[(0,t.Y)(d.Z.Content,{sx:()=>({flex:1}),children:(0,t.Y)(u.W,{})}),(0,t.Y)(d.Z.Footer,{})]})})}}]);
@@ -1 +0,0 @@
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})}},579:function(e,t,r){let n,i;r.r(t),r.d(t,{SignIn:()=>tI,SignInModal:()=>t_});var a,o=r(4518),s=r(8909),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),S=r(4132),v=r(4692);let w=()=>Promise.all([r.e("545"),r.e("666"),r.e("472")]).then(r.bind(r,8480)),b=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpVerifyPhone}))),k=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpVerifyEmail}))),Y=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpStart}))),C=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpSSOCallback}))),A=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpContinue})));var F=r(2950),y=r(6088),U=r(3269),P=r(2454),E=r(6153),D=r(4468),M=r(3990),L=r(8640),T=r(6324),G=r(7697),R=r(78),B=r(2861),z=r(8272),O=r(8920),$=r(8282),N=r(9426),Z=r(4964);let x=(0,U.dm)(()=>{let e=(0,T.n)(),t=(0,U.f0)(),{navigate:r}=(0,Z.r)(),n=(0,N.p)(),{userSettings:{passwordSettings:i}}=(0,G.O)(),{t:a,locale:s}=(0,R._)(),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,B.G)("signIn.resetPassword.requiredMessage")))},[]);let d=(0,L.tJ)("password","",{type:"password",label:(0,B.G)("formFieldLabel__newPassword"),isRequired:!0,validatePassword:!0,buildErrorMessage:e=>(0,M.C5)(e,{t:a,locale:s,passwordSettings:i})}),u=(0,L.tJ)("confirmPassword","",{type:"password",label:(0,B.G)("formFieldLabel__confirmPassword"),isRequired:!0}),h=(0,L.tJ)("signOutOfOtherSessions","",{type:"checkbox",label:(0,B.G)("formFieldLabel__signOutOfOtherSessions"),defaultChecked:!0}),{setConfirmPasswordFeedback:p,isPasswordMatch:f}=(0,$.Z)({passwordField:d,confirmPasswordField:u}),g=async()=>{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,F.s)(t,n));case"needs_second_factor":return r("../factor-two");default:return console.error((0,F.s)(t,n))}}catch(e){return(0,D.H4)(e,[d,u],t.setError)}};return(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.Y)(E.Y.Root,{showLogo:!0,children:(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.resetPassword.title")})}),(0,o.Y)(y.Z.Alert,{children:t.error}),(0,o.Y)(z.fv,{elementDescriptor:O.$z.main,gap:8,children:(0,o.FD)(P.l.Root,{onSubmit:g,onBlur:()=>{d.value&&p(u.value)},gap:8,children:[(0,o.FD)(z.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)(P.l.ControlRow,{elementId:d.id,children:(0,o.Y)(P.l.PasswordInput,{...d.props,isRequired:!0,autoFocus:!0})}),(0,o.Y)(P.l.ControlRow,{elementId:u.id,children:(0,o.Y)(P.l.PasswordInput,{...u.props,onChange:e=>(e.target.value&&p(e.target.value),u.props.onChange(e))})}),!c&&(0,o.Y)(P.l.ControlRow,{elementId:h.id,children:(0,o.Y)(P.l.Checkbox,{...h.props})})]}),(0,o.FD)(z.fv,{gap:3,children:[(0,o.Y)(P.l.SubmitButton,{isDisabled:!f,localizationKey:(0,B.G)("signIn.resetPassword.formButtonPrimary")}),(0,o.Y)(y.Z.Action,{elementId:"alternativeMethods",children:(0,o.Y)(y.Z.ActionLink,{elementDescriptor:O.$z.backLink,localizationKey:(0,B.G)("backButton"),onClick:()=>r("../")})})]})]})})]}),(0,o.Y)(y.Z.Footer,{})]})});var K=r(9107),W=r(6488);let V=(0,U.dm)(()=>{let e=(0,U.f0)();return(0,K.h)(),(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.Y)(E.Y.Root,{showLogo:!0,children:(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.resetPassword.title")})}),(0,o.Y)(y.Z.Alert,{children:e.error}),(0,o.FD)(z.fv,{elementDescriptor:O.$z.main,gap:8,children:[(0,o.Y)(z.EY,{localizationKey:(0,B.G)("signIn.resetPassword.successMessage")}),(0,o.Y)(W.s,{direction:"row",center:!0,children:(0,o.Y)(z.y$,{size:"xl",colorScheme:"primary",elementDescriptor:O.$z.spinner})})]})]}),(0,o.Y)(y.Z.Footer,{})]})});var q=r(2531),H=r(750),J=r(9345),j=r(656),X=r(9599),Q=r(9366),ee=r(6932),et=r(1052),er=r(2540);let en=(0,j.SY)((0,U.dm)(()=>{let e=(0,U.f0)(),{userProfileUrl:t}=(0,G.O)().displayConfig,{afterSignInUrl:r,path:n,signInUrl:i,taskUrl:a}=(0,d.r)(),{navigateAfterSignOut:s}=(0,X.g)(),{handleSignOutAllClicked:l,handleSessionClicked:c,signedInSessions:u,handleAddAccountClicked:h}=(0,er.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)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{sx:e=>({padding:`${e.space.$8} ${e.space.$none} ${e.space.$none}`}),children:[(0,o.FD)(E.Y.Root,{children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.accountSwitcher.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.accountSwitcher.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:e.error}),(0,o.Y)(z.fv,{elementDescriptor:O.$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)(H.P,{onClick:c(e),sx:e=>({height:e.sizes.$16,justifyContent:"flex-start",borderRadius:0}),icon:Q.A,children:(0,o.Y)(J.c,{user:e.user,sx:{width:"100%"}})},e.id)),(0,o.Y)(q.rc,{elementDescriptor:O.$z.accountSwitcherActionButton,elementId:O.$z.accountSwitcherActionButton.setId("addAccount"),iconBoxElementDescriptor:O.$z.accountSwitcherActionButtonIconBox,iconBoxElementId:O.$z.accountSwitcherActionButtonIconBox.setId("addAccount"),iconElementDescriptor:O.$z.accountSwitcherActionButtonIcon,iconElementId:O.$z.accountSwitcherActionButtonIcon.setId("addAccount"),icon:ee.A,label:(0,B.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)(y.Z.Footer,{sx:e=>({">:first-of-type":{padding:`${e.space.$1}`,width:"100%"}}),children:(0,o.Y)(y.Z.Action,{sx:{width:"100%",">:first-of-type":{width:"100%",borderBottomWidth:0}},children:(0,o.Y)(et.ww,{handleSignOutAllClicked:l,elementDescriptor:O.$z.accountSwitcherActionButton,elementId:O.$z.accountSwitcherActionButton.setId("signOutAll"),iconBoxElementDescriptor:O.$z.accountSwitcherActionButtonIconBox,iconBoxElementId:O.$z.accountSwitcherActionButtonIconBox.setId("signOutAll"),iconElementDescriptor:O.$z.accountSwitcherActionButtonIcon,iconElementId:O.$z.accountSwitcherActionButtonIcon.setId("signOutAll"),label:(0,B.G)("signIn.accountSwitcher.action__signOutAll"),actionSx:e=>({padding:`${e.space.$2} ${e.space.$2}`})})})})]})})}));var ei=r(5170),ea=r(6980),eo=r(3474),es=r(8738),el=r(29),ec=r(6505),ed=r(2216),eu=r(8144),eh=r(4421),ep=r(1051),ef=r(2181),eg=r(743),em=r(6889),eI=r(3610),e_=r(2166),eS=r(44),ev=r(9236),ew=r(8051),eb=r(5715);let ek=l.memo(e=>{let t=(0,s.ho)(),{navigate:r}=(0,Z.r)(),n=(0,U.f0)(),{displayConfig:i}=(0,G.O)(),a=(0,d.r)(),l=(0,T.n)(),c=(0,ew.uP)(a,i.signInUrl),u=a.afterSignInUrl||"/",h="popup"===a.oauthFlow||"auto"===a.oauthFlow&&(0,eS.C)(),{onAlternativePhoneCodeProviderClick:p,...f}=e,g=e=>(0,eI.$R)(e)&&e.errors.find(e=>e.code===e_.c.SESSION_EXISTS)?t.setActive({session:t.client.lastActiveSessionId,navigate:async({session:e})=>{await a.navigateOnSetActive({session:e,redirectUrl:a.afterSignInUrl})}}):(0,D.H4)(e,[],n.setError);return(0,o.Y)(eb.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=>t.authenticateWithWeb3({customNavigate:r,redirectUrl:u,signUpContinueUrl:a.isCombinedFlow?"create/continue":a.signUpContinueUrl,strategy:e,secondFactorUrl:"factor-two"}).catch(e=>(0,ev.f)(e,n.setError)),alternativePhoneCodeCallback:e=>{p?.(e)}})});var eY=r(5763);function eC(){let e=(0,T.n)();return e.supportedFirstFactors?.find(({strategy:e})=>(0,eY.Kw)(e))}var eA=r(9090);let eF=e=>((e,t)=>{let[r,n]=l.useState(!1),i=l.useCallback(()=>n(e=>!e),[n]);return r?(0,o.Y)(eA.n,{onBackLinkClick:i}):(0,o.Y)(e,{...t,onHavingTroubleClick:i})})(ey,{...e}),ey=e=>{let{onBackLinkClick:t,onHavingTroubleClick:r,onFactorSelected:n,mode:i="default"}=e,a=(0,U.f0)(),s=eC(),{supportedFirstFactors:l}=(0,T.n)(),{firstPartyFactors:c,hasAnyStrategy:d}=(0,eo.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,B.G)("signIn.forgotPasswordAlternativeMethods.title");case"pwned":return(0,B.G)("signIn.passwordPwned.title");case"passwordCompromised":return(0,B.G)("signIn.passwordCompromised.title");default:return(0,B.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)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:h}),!f&&"passwordCompromised"!==i&&(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.alternativeMethods.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:a.error}),(0,o.FD)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:6,children:[f&&s&&(0,o.Y)(z.$n,{localizationKey:eU(s),elementDescriptor:O.$z.alternativeMethodsBlockButton,isDisabled:a.isLoading,onClick:()=>{a.setError(void 0),n(s)}}),f&&d&&(0,o.Y)(ec.c,{dividerText:(0,B.G)("signIn.forgotPasswordAlternativeMethods.label__alternativeMethods")}),(0,o.FD)(z.fv,{gap:4,children:[d&&(0,o.FD)(z.so,{elementDescriptor:O.$z.alternativeMethods,direction:"col",gap:2,children:[(0,o.Y)(ek,{enableWeb3Providers:!0,enableOAuthProviders:!0,enableAlternativePhoneCodeProviders:!1}),c&&c.map((e,t)=>{var r;return(0,o.Y)(es.X,{leftIcon:(r=e,({email_link:eu.A,email_code:eh.A,phone_code:ep.A,reset_password_email_code:ef.A,reset_password_phone_code:ef.A,password:eg.A,passkey:em.A})[r.strategy]),textLocalizationKey:eU(e),elementDescriptor:O.$z.alternativeMethodsBlockButton,textElementDescriptor:O.$z.alternativeMethodsBlockButtonText,arrowElementDescriptor:O.$z.alternativeMethodsBlockButtonArrow,textVariant:"buttonLarge",isDisabled:a.isLoading,onClick:()=>{a.setError(void 0),n(e)}},t)})]}),t&&(0,o.Y)(el.E,{boxElementDescriptor:O.$z.backRow,linkElementDescriptor:O.$z.backLink,onClick:t})]})]})]}),(0,o.Y)(y.Z.Footer,{children:(0,o.FD)(y.Z.Action,{elementId:"havingTrouble",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionText")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionLink"),onClick:r})]})})]})})};function eU(e){switch(e.strategy){case"email_link":return(0,B.G)("signIn.alternativeMethods.blockButton__emailLink",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"email_code":return(0,B.G)("signIn.alternativeMethods.blockButton__emailCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"phone_code":return(0,B.G)("signIn.alternativeMethods.blockButton__phoneCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"password":return(0,B.G)("signIn.alternativeMethods.blockButton__password");case"passkey":return(0,B.G)("signIn.alternativeMethods.blockButton__passkey");case"reset_password_email_code":case"reset_password_phone_code":return(0,B.G)("signIn.forgotPasswordAlternativeMethods.blockButton__resetPassword");default:throw Error(`Invalid sign in strategy: "${e.strategy}"`)}}var eP=r(5653);function eE(e){let t=(0,U.f0)(),{setActive:r,__internal_navigateWithError:n}=(0,s.ho)(),i=(0,N.p)(),{afterSignInUrl:a,navigateOnSetActive:o}=(0,d.r)(),{authenticateWithPasskey:c}=(0,T.n)();return(0,l.useEffect)(()=>()=>{eP.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,F.s)(t.status,i))}}catch(r){let{flow:e}=s[0]||{};if((0,eI.Cm)(r)&&("passkey_operation_aborted"===r.code||"autofill"===e&&"passkey_retrieval_cancelled"===r.code))return;if((0,eI._d)(r))return n("..",r.errors[0]);(0,D.H4)(r,[],t.setError)}},[])}function eD(e){return!!e?.length&&e.filter(e=>"enterprise_sso"===e.strategy&&"enterpriseConnectionId"in e&&"enterpriseConnectionName"in e).length>1}var eM=r(1652),eL=r(7912);let eT=e=>{let t=(0,T.n)(),r=(0,U.f0)(),{navigate:n}=(0,Z.r)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:l}=(0,s.ho)(),c=(0,N.p)(),u=(0,s.ho)(),h=e.factor.channel,p="verified"===t.firstFactorVerification.status&&e.factorAlreadyPrepared;return(0,o.Y)(eL.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,F.s)(e.status,c))}}).catch(e=>(0,eI._d)(e)?u.__internal_navigateWithError("..",e.errors[0]):s(e))},onResendCodeClicked:()=>{p||t.prepareFirstFactor({...e.factor,channel:h}).then(()=>e.onFactorPrepare()).catch(e=>(0,D.H4)(e,[],r.setError))},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:t.userData.imageUrl,alternativeMethodsLabel:(0,B.G)("footerActionLink__alternativePhoneCodeProvider"),onShowAlternativeMethodsClicked:()=>{r.setError(void 0),e.onChangePhoneCodeChannel({...e.factor,channel:void 0})},showAlternativeMethods:!0,onIdentityPreviewEditClicked:()=>n("../"),onBackLinkClicked:e.onBackLinkClicked})},eG=e=>(0,o.Y)(p.n.Part,{part:"phoneCode",children:(0,o.Y)(eT,{...e,cardTitle:(0,B.G)("signIn.alternativePhoneCodeProvider.title",{provider:(0,eM.y)(e.factor.channel)?.name||""}),cardSubtitle:(0,B.G)("signIn.alternativePhoneCodeProvider.subtitle"),inputLabel:(0,B.G)("signIn.alternativePhoneCodeProvider.formTitle"),resendButton:(0,B.G)("signIn.alternativePhoneCodeProvider.resendButton")})}),eR=e=>{let t=(0,T.n)(),r=(0,U.f0)(),{navigate:n}=(0,Z.r)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:c}=(0,s.ho)(),u=(0,N.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,D.H4)(e,[],r.setError)}),(0,o.Y)(eL.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,F.s)(e.status,u))}}).catch(e=>(0,eI._d)(e)?h.__internal_navigateWithError("..",e.errors[0]):s(e))},onResendCodeClicked:()=>{p||t.prepareFirstFactor(e.factor).then(()=>e.onFactorPrepare()).catch(e=>(0,D.H4)(e,[],r.setError))},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:t.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,showAlternativeMethods:e.showAlternativeMethods,onIdentityPreviewEditClicked:()=>n("../"),onBackLinkClicked:e.onBackLinkClicked})},eB=e=>(0,o.Y)(p.n.Part,{part:"emailCode",children:(0,o.Y)(eR,{...e,cardTitle:(0,B.G)("signIn.emailCode.title"),cardSubtitle:(0,B.G)("signIn.emailCode.subtitle"),inputLabel:(0,B.G)("signIn.emailCode.formTitle"),resendButton:(0,B.G)("signIn.emailCode.resendButton")})});var ez=r(2027),eO=r(4979),e$=r(2992);let eN=e=>{let{t}=(0,R._)(),r=(0,U.f0)(),n=(0,T.n)(),i=(0,d.r)(),{signInUrl:a}=i,{navigate:c}=(0,Z.r)(),{afterSignInUrl:u}=(0,d.r)(),{setActive:h}=(0,s.ho)(),{startEmailLinkFlow:f,cancelEmailLinkFlow:g}=(0,e$.u)(n),[m,I]=l.useState(!1),_=(0,s.ho)();l.useEffect(()=>{S()},[]);let S=()=>{f({emailAddressId:e.factor.emailAddressId,redirectUrl:(0,ew.lA)({ctx:i,baseUrl:a,intent:"sign-in"})}).then(e=>v(e)).catch(e=>{if((0,eI._d)(e))return _.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[],r.setError)})},v=async e=>{let n=e.firstFactorVerification;"expired"===n.status?r.setError(t((0,B.G)("formFieldError__verificationLinkExpired"))):n.verifiedFromTheSameClient()?I(!0):await w(e)},w=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)(eO.$,{title:(0,B.G)("signIn.emailLink.verifiedSwitchTab.titleNewTab"),subtitle:(0,B.G)("signIn.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,o.Y)(p.n.Part,{part:"emailLink",children:(0,o.Y)(ez._,{cardTitle:(0,B.G)("signIn.emailLink.title"),cardSubtitle:(0,B.G)("signIn.emailLink.subtitle"),formTitle:(0,B.G)("signIn.emailLink.formTitle"),formSubtitle:(0,B.G)("signIn.emailLink.formSubtitle"),resendButton:(0,B.G)("signIn.emailLink.resendButton"),onResendCodeClicked:()=>{g(),S()},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:n.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked})})};var eZ=r(7420);let ex=(0,U.dm)((n=(a=()=>{let e=(0,d.r)(),{displayConfig:t}=(0,G.O)(),r=(0,s.ho)().client.signIn;if(!eD(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)(eZ.l,{title:(0,B.G)("signIn.enterpriseConnections.title"),subtitle:(0,B.G)("signIn.enterpriseConnections.subtitle"),onClick:n=>{let i=(0,ew.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,T.n)(),r=(0,d.r)();return(0,j.RE)(a,()=>!eD(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)),eK=e=>(0,o.Y)(p.n.Part,{part:"resetPassword",children:(0,o.Y)(eR,{...e,showAlternativeMethods:!1,cardTitle:(0,B.G)("signIn.forgotPassword.title"),inputLabel:(0,B.G)("signIn.forgotPassword.formTitle"),resendButton:(0,B.G)("signIn.forgotPassword.resendButton")})});var eW=r(196);let eV=e=>{let{onShowAlternativeMethodsClick:t}=e,r=(0,U.f0)(),n=(0,T.n)(),{navigate:i}=(0,Z.r)(),[a,s]=l.useState(!1),c=l.useCallback(()=>s(e=>!e),[s]),d=eE(()=>i("../factor-two"));return a?(0,o.Y)(eA.n,{onBackLinkClick:c}):(0,o.Y)(p.n.Part,{part:"password",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(z.In,{elementDescriptor:O.$z.passkeyIcon,icon:em.A,sx:e=>({color:e.colors.$neutralAlpha500,marginInline:"auto",paddingBottom:e.sizes.$1,width:e.sizes.$12,height:e.sizes.$12})}),(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.passkey.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.passkey.subtitle")}),(0,o.Y)(eW.$,{identifier:n.identifier,avatarUrl:n.userData.imageUrl,onClick:()=>i("../")})]}),(0,o.Y)(y.Z.Alert,{children:r.error}),(0,o.FD)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:4,children:[(0,o.Y)(P.l.Root,{onSubmit:e=>(e.preventDefault(),d()),gap:8,children:(0,o.Y)(P.l.SubmitButton,{hasArrow:!0})}),(0,o.Y)(y.Z.Action,{elementId:t?"alternativeMethods":"havingTrouble",children:(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)(t?"footerActionLink__useAnotherMethod":"signIn.alternativeMethods.actionLink"),onClick:t||c})})]})]}),(0,o.Y)(y.Z.Footer,{})]})})},eq=e=>{let{onShowAlternativeMethodsClick:t,onPasswordError:r}=e,n=l.useRef(null),i=(0,U.f0)(),{setActive:a}=(0,s.ho)(),c=(0,T.n)(),{afterSignInUrl:u,navigateOnSetActive:h}=(0,d.r)(),f=(0,N.p)(),g=(e=>{let{onForgotPasswordMethodClick:t,onShowAlternativeMethodsClick:r}=e,n=eC(),i=(0,L.tJ)("password","",{type:"password",label:(0,B.G)("formFieldLabel__password"),placeholder:(0,B.G)("formFieldInputPlaceholder__password")});return{...i,props:{...i.props,actionLabel:n||r?(0,B.G)("formFieldAction__forgotPassword"):"",onActionClicked:t||r||(()=>null)}}})(e),{navigate:m}=(0,Z.r)(),[I,_]=l.useState(!1),S=l.useCallback(()=>_(e=>!e),[_]),v=(0,s.ho)();return I?(0,o.Y)(eA.n,{onBackLinkClick:S}):(0,o.Y)(p.n.Part,{part:"password",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.password.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.password.subtitle")}),(0,o.Y)(eW.$,{identifier:c.identifier,avatarUrl:c.userData.imageUrl,onClick:()=>{m("../")}})]}),(0,o.Y)(y.Z.Alert,{children:i.error}),(0,o.FD)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:4,children:[(0,o.FD)(P.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");default:return console.error((0,F.s)(e.status,f))}}).catch(e=>{if((0,eI._d)(e))return v.__internal_navigateWithError("..",e.errors[0]);if(r){if((0,eI.Au)(e)){i.setError({...e.errors[0],code:"form_password_pwned__sign_in"}),r("pwned");return}if((0,eI.qY)(e)){i.setError({...e.errors[0],code:"form_password_compromised__sign_in"}),r("compromised");return}}(0,D.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)(P.l.ControlRow,{elementId:g.id,children:(0,o.Y)(P.l.PasswordInput,{...g.props,ref:n,autoFocus:!0})}),(0,o.Y)(P.l.SubmitButton,{hasArrow:!0})]}),(0,o.Y)(y.Z.Action,{elementId:t?"alternativeMethods":"havingTrouble",children:(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)(t?"signIn.password.actionLink":"signIn.alternativeMethods.actionLink"),onClick:t||S})})]})]}),(0,o.Y)(y.Z.Footer,{})]})})},eH=e=>(0,o.Y)(p.n.Part,{part:"phoneCode",children:(0,o.Y)(eR,{...e,cardTitle:(0,B.G)("signIn.phoneCode.title"),cardSubtitle:(0,B.G)("signIn.phoneCode.subtitle"),inputLabel:(0,B.G)("signIn.phoneCode.formTitle"),resendButton:(0,B.G)("signIn.phoneCode.resendButton")})}),eJ=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},ej=(0,j.RL)((0,j.SY)((0,U.dm)(function(){let{__internal_setActiveInProgress:e}=(0,s.ho)(),t=(0,T.n)(),{preferredSignInStrategy:r}=(0,G.O)().displayConfig,n=t.supportedFirstFactors,i=(0,Z.r)(),a=(0,U.f0)(),{supportedFirstFactors:c,firstFactorVerification:d}=(0,T.n)(),u=l.useRef(""),[{currentFactor:h},p]=l.useState(()=>{let e=(0,eY.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,eo.y)({filterOutFactor:h,supportedFirstFactors:c}),[g,m]=l.useState(()=>!h||!(0,eY.Cm)(h)),I=eC(),[_,S]=l.useState(!1),[v,w]=l.useState(null);if(l.useEffect(()=>{e||("needs_identifier"===t.status||null===t.status)&&i.navigate("../")},[e]),!h)return t.status?(0,o.Y)(ei.J,{cardTitle:(0,B.G)("signIn.noAvailableMethods.title"),cardSubtitle:(0,B.G)("signIn.noAvailableMethods.subtitle"),message:(0,B.G)("signIn.noAvailableMethods.message")}):(0,o.Y)(ea.B,{});let b=f?()=>m(e=>!e):void 0,k=()=>S(e=>!e),Y=()=>{u.current=eJ(h)},C=e=>{p(t=>({currentFactor:e,prevCurrentFactor:t.currentFactor}))};if(eD(t.supportedFirstFactors))return(0,o.Y)(ex,{});if(g||_){let e=(0,eY.Cm)(h),t=g?b:k;return(0,o.Y)(eF,{mode:_?"pwned"===v?"pwned":"compromised"===v?"passwordCompromised":"forgot":"default",onBackLinkClick:e?()=>{a.setError(void 0),w(null),t?.()}:void 0,onFactorSelected:e=>{C(e),t?.()},currentFactor:h})}if(!h)return(0,o.Y)(ea.B,{});switch(h?.strategy){case"passkey":return(0,o.Y)(eV,{onFactorPrepare:Y,onShowAlternativeMethodsClick:b});case"password":return(0,o.Y)(eq,{onForgotPasswordMethodClick:I?k:b,onShowAlternativeMethodsClick:b,onPasswordError:e=>{w(e),k()}});case"email_code":return(0,o.Y)(eB,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b});case"phone_code":if(h.channel&&"sms"!==h.channel)return(0,o.Y)(eG,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onChangePhoneCodeChannel:C});return(0,o.Y)(eH,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b});case"email_link":return(0,o.Y)(eN,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b});case"reset_password_phone_code":return(0,o.Y)(eK,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b,onBackLinkClicked:()=>{p(e=>({currentFactor:e.prevCurrentFactor,prevCurrentFactor:e.currentFactor})),k()},cardSubtitle:(0,B.G)("signIn.forgotPassword.subtitle_phone")});case"reset_password_email_code":return(0,o.Y)(eK,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b,onBackLinkClicked:()=>{p(e=>({currentFactor:e.prevCurrentFactor,prevCurrentFactor:e.currentFactor})),k()},cardSubtitle:(0,B.G)("signIn.forgotPassword.subtitle_email")});default:return(0,o.Y)(ea.B,{})}})));var eX=r(8289);let eQ=e=>{let[t,r]=l.useState(!1),n=l.useCallback(()=>r(e=>!e),[r]);return t?(0,o.Y)(eA.n,{onBackLinkClick:n}):(0,o.Y)(e0,{onBackLinkClick:e.onBackLinkClick,onFactorSelected:e.onFactorSelected,onHavingTroubleClick:n})},e0=e=>{let{onHavingTroubleClick:t,onFactorSelected:r,onBackLinkClick:n}=e,i=(0,U.f0)(),{supportedSecondFactors:a}=(0,T.n)();return(0,o.Y)(p.n.Part,{part:"alternativeMethods",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.alternativeMethods.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.alternativeMethods.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:i.error}),(0,o.FD)(z.fv,{elementDescriptor:O.$z.main,gap:3,children:[(0,o.Y)(z.fv,{gap:2,children:a&&a.sort(eX.Wy).map((e,t)=>(0,o.Y)(es.X,{textLocalizationKey:function(e){switch(e.strategy){case"phone_code":return(0,B.G)("signIn.alternativeMethods.blockButton__phoneCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"totp":return(0,B.G)("signIn.alternativeMethods.blockButton__totp");case"backup_code":return(0,B.G)("signIn.alternativeMethods.blockButton__backupCode");case"email_code":return(0,B.G)("signIn.alternativeMethods.blockButton__emailCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"email_link":return(0,B.G)("signIn.alternativeMethods.blockButton__emailLink",{identifier:(0,ed.u)(e.safeIdentifier)||""});default:throw Error(`Invalid sign in strategy: "${e.strategy}"`)}}(e),elementDescriptor:O.$z.alternativeMethodsBlockButton,textElementDescriptor:O.$z.alternativeMethodsBlockButtonText,arrowElementDescriptor:O.$z.alternativeMethodsBlockButtonArrow,isDisabled:i.isLoading,onClick:()=>r(e)},t))}),(0,o.Y)(y.Z.Action,{elementId:"alternativeMethods",children:n&&(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("backButton"),onClick:e.onBackLinkClick})})]})]}),(0,o.Y)(y.Z.Footer,{children:(0,o.FD)(y.Z.Action,{elementId:"havingTrouble",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionText")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionLink"),onClick:t})]})})]})})},e1=e=>{let{onShowAlternativeMethodsClicked:t}=e,r=(0,T.n)(),{afterSignInUrl:n,navigateOnSetActive:i}=(0,d.r)(),{setActive:a}=(0,s.ho)(),{navigate:l}=(0,Z.r)(),c=(0,N.p)(),u=(0,U.f0)(),h=(0,L.tJ)("code","",{type:"text",label:(0,B.G)("formFieldLabel__backupCode"),isRequired:!0}),p=(0,s.ho)(),f=e=>(0,eY.Kw)(e.firstFactorVerification?.strategy)&&e.firstFactorVerification?.status==="verified";return(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.backupCodeMfa.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:f(r)?(0,B.G)("signIn.forgotPassword.subtitle"):(0,B.G)("signIn.backupCodeMfa.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:u.error}),(0,o.Y)(z.fv,{elementDescriptor:O.$z.main,gap:8,children:(0,o.FD)(P.l.Root,{onSubmit:e=>(e.preventDefault(),r.attemptSecondFactor({strategy:"backup_code",code:h.value}).then(e=>{if("complete"!==e.status)return console.error((0,F.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,eI._d)(e))return p.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[h],u.setError)})),children:[(0,o.Y)(P.l.ControlRow,{elementId:h.id,children:(0,o.Y)(P.l.PlainInput,{...h.props,autoFocus:!0,onActionClicked:t})}),(0,o.FD)(z.fv,{gap:3,children:[(0,o.Y)(P.l.SubmitButton,{hasArrow:!0}),(0,o.Y)(y.Z.Action,{elementId:"alternativeMethods",children:t&&(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("footerActionLink__useAnotherMethod"),onClick:t})})]})]})})]}),(0,o.Y)(y.Z.Footer,{})]})},e6=e=>(0,eY.Kw)(e.firstFactorVerification?.strategy)&&e.firstFactorVerification?.status==="verified",e4=e=>{let t=(0,G.O)(),r=(0,T.n)(),n=(0,U.f0)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:c}=(0,s.ho)(),{navigate:u}=(0,Z.r)(),h=(0,N.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,eI._d)(e))return p.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[],n.setError)}):void 0;return(0,o.Y)(eL.j,{cardTitle:e.cardTitle,cardSubtitle:e6(r)?(0,B.G)("signIn.forgotPassword.subtitle"):e.cardSubtitle,cardNotice:f?(0,B.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,F.s)(e.status,h));if(e6(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,eI._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:e6(r)&&(0,o.Y)(z.EY,{localizationKey:(0,B.G)("signIn.resetPasswordMfa.detailsLabel"),colorScheme:"secondary"})})},e2=e=>{let t=(0,T.n)();return(0,o.Y)(p.n.Part,{part:"emailCode2Fa",children:(0,o.Y)(e4,{...e,cardTitle:(0,B.G)("signIn.emailCodeMfa.title"),cardSubtitle:(0,B.G)("signIn.emailCodeMfa.subtitle"),inputLabel:(0,B.G)("signIn.emailCodeMfa.formTitle"),resendButton:(0,B.G)("signIn.emailCodeMfa.resendButton"),prepare:()=>{let{emailAddressId:r,strategy:n}=e.factor;return t.prepareSecondFactor({emailAddressId:r,strategy:n})}})})},e9=e=>{let{t}=(0,R._)(),r=(0,U.f0)(),n=(0,T.n)(),i=(0,d.r)(),{signInUrl:a}=i,{afterSignInUrl:c}=(0,d.r)(),{setActive:u}=(0,s.ho)(),{startEmailLinkFlow:h,cancelEmailLinkFlow:f}=(0,e$.u)(n),[g,m]=l.useState(!1),I=(0,s.ho)();l.useEffect(()=>{_()},[]);let _=()=>{h({emailAddressId:e.factor.emailAddressId,redirectUrl:(0,ew.lA)({ctx:i,baseUrl:a,intent:"sign-in"})}).then(e=>S(e)).catch(e=>{if((0,eI._d)(e))return I.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[],r.setError)})},S=async e=>{let n=e.secondFactorVerification;"expired"===n.status?r.setError(t((0,B.G)("formFieldError__verificationLinkExpired"))):n.verifiedFromTheSameClient()?m(!0):await u({session:e.createdSessionId,redirectUrl:c})};return g?(0,o.Y)(eO.$,{title:(0,B.G)("signIn.emailLink.verifiedSwitchTab.titleNewTab"),subtitle:(0,B.G)("signIn.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,o.Y)(p.n.Part,{part:"emailLink",children:(0,o.Y)(ez._,{cardTitle:(0,B.G)("signIn.emailLinkMfa.title"),cardSubtitle:(0,B.G)("signIn.emailLinkMfa.subtitle"),cardNotice:"new"===n.clientTrustState?(0,B.G)("signIn.newDeviceVerificationNotice"):void 0,formSubtitle:(0,B.G)("signIn.emailLinkMfa.formSubtitle"),resendButton:(0,B.G)("signIn.emailLinkMfa.resendButton"),onResendCodeClicked:()=>{f(),_()},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:n.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked})})},e5=e=>{let t=(0,T.n)();return(0,o.Y)(p.n.Part,{part:"phoneCode2Fa",children:(0,o.Y)(e4,{...e,cardTitle:(0,B.G)("signIn.phoneCodeMfa.title"),cardSubtitle:(0,B.G)("signIn.phoneCodeMfa.subtitle"),inputLabel:(0,B.G)("signIn.phoneCodeMfa.formTitle"),resendButton:(0,B.G)("signIn.phoneCodeMfa.resendButton"),prepare:()=>{let{phoneNumberId:r,strategy:n}=e.factor;return t.prepareSecondFactor({phoneNumberId:r,strategy:n})}})})},e8=e=>(0,o.Y)(p.n.Part,{part:"totp2Fa",children:(0,o.Y)(e4,{...e,cardTitle:(0,B.G)("signIn.totpMfa.title"),cardSubtitle:(0,B.G)("signIn.totpMfa.subtitle"),inputLabel:(0,B.G)("signIn.totpMfa.formTitle")})}),e7=e=>{if(!e)return"";let t=e.strategy;return"phoneNumberId"in e&&(t+=e.phoneNumberId),t},e3=(0,j.RL)((0,j.SY)((0,U.dm)(function(){let e=(0,T.n)().supportedSecondFactors,t=l.useRef(""),[r,n]=l.useState(()=>(0,eY.R5)(e)),[i,a]=l.useState(!r),s=()=>a(e=>!e),c=()=>{t.current=e7(r)};if(!r)return(0,o.Y)(ea.B,{});if(i)return(0,o.Y)(eQ,{onBackLinkClick:s,onFactorSelected:e=>{n(e),s()}});let d=t.current===e7(r);switch(r?.strategy){case"phone_code":return(0,o.Y)(e5,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});case"totp":return(0,o.Y)(e8,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});case"backup_code":return(0,o.Y)(e1,{onShowAlternativeMethodsClicked:s});case"email_code":return(0,o.Y)(e2,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});case"email_link":return(0,o.Y)(e9,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});default:return(0,o.Y)(ea.B,{})}})));var te=r(6126);let tt=(0,j.RL)((0,j.SY)(te.F));var tr=r(4670),tn=r(2620),ti=r(6760),ta=r(958),to=r(1959),ts=r(6142),tl=r(4901),tc=r(2229),td=r(9835);let tu=e=>{let{handleSubmit:t,phoneNumberFormState:r,onUseAnotherMethod:n,phoneCodeProvider:i}=e,{providerToDisplayData:a,strategyToDisplayData:s}=(0,td.k)(),l=i.name,c=i.channel,d=(0,U.f0)();return(0,o.Y)(y.Z.Root,{children:(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,showDivider:!0,children:[(0,o.Y)(z.fv,{center:!0,children:(0,o.Y)(z._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)(E.Y.Title,{localizationKey:(0,B.G)("signIn.start.alternativePhoneCodeProvider.title",{provider:l})}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.start.alternativePhoneCodeProvider.subtitle",{provider:l})})]}),(0,o.Y)(y.Z.Alert,{children:d.error}),(0,o.Y)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:6,children:(0,o.FD)(P.l.Root,{onSubmit:t,gap:8,children:[(0,o.Y)(z.fv,{gap:6,children:(0,o.Y)(P.l.ControlRow,{elementId:"phoneNumber",children:(0,o.Y)(P.l.PhoneInput,{...r.props,label:(0,B.G)("signIn.start.alternativePhoneCodeProvider.label",{provider:l}),isRequired:!0,isOptional:!1,actionLabel:void 0,onActionClicked:void 0})})}),(0,o.FD)(z.fv,{center:!0,children:[(0,o.Y)(ts.j,{}),(0,o.Y)(z.fv,{gap:6,sx:{width:"100%"},children:(0,o.Y)(P.l.SubmitButton,{hasArrow:!0,localizationKey:(0,B.G)("formButtonPrimary")})})]}),(0,o.Y)(z.fv,{center:!0,children:(0,o.Y)(z.$n,{variant:"link",colorScheme:"neutral",onClick:n,localizationKey:(0,B.G)("signIn.start.alternativePhoneCodeProvider.actionLink")})})]})})]})})},th=e=>!!e.supportedFirstFactors?.length&&e.supportedFirstFactors.every(e=>"enterprise_sso"===e.strategy),tp=({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)(P.l.ControlRow,{elementId:e.id,sx:i?void 0:{position:"absolute",opacity:0,height:0,pointerEvents:"none",marginTop:"-1rem"},children:(0,o.Y)(P.l.PasswordInput,{...e.props,ref:n,tabIndex:i?void 0:-1})}):null},tf=(0,j.RL)((0,j.SY)((0,U.dm)(function(){let e=(0,U.f0)(),t=(0,s.ho)(),n=(0,tl.m)(),{displayConfig:i,userSettings:a,authConfig:c}=(0,G.O)(),u=(0,T.n)(),{navigate:h}=(0,Z.r)(),f=(0,d.r)(),{afterSignInUrl:g,signUpUrl:m,waitlistUrl:I,isCombinedFlow:_,navigateOnSetActive:S}=f,v=(0,N.p)(),w=(0,tc.F)(),b=(0,l.useMemo)(()=>(0,to.E9)(a.enabledFirstFactorIdentifiers),[a.enabledFirstFactorIdentifiers]),k=a.alternativePhoneCodeChannels,{isWebAuthnAutofillSupported:Y}=(()=>{let[e,t]=(0,l.useState)(!1),{navigate:r}=(0,Z.r)(),n=eE(()=>r("factor-two")),{userSettings:i}=(0,G.O)(),{passkeySettings:a,attributes:o}=i;return(0,l.useEffect)(()=>{async function e(){let e=await (0,tn.nn)();t(e),e&&await n({flow:"autofill"})}a.allow_autofill&&o.passkey?.enabled&&e()},[]),{isWebAuthnAutofillSupported:e}})(),C=eE(()=>h("factor-two")),A=(0,tn.Bz)(),M=!!f.initialValues?.phoneNumber&&!(f.initialValues.emailAddress||f.initialValues.username)&&b.includes("phone_number"),[R,$]=(0,l.useState)(M?"phone_number":b[0]||""),[x,K]=(0,l.useState)(!1),W=(0,tr.n)("__clerk_ticket")||"",V=(0,tr.n)("__clerk_status")||"",q=a.enabledFirstFactorIdentifiers,H=a.web3FirstFactors,J=a.authenticatableSocialStrategies,j=a.instanceIsPasswordBased,{currentIdentifier:X,nextIdentifier:Q}=(0,to.ZN)(b,R),ee=(0,L.tJ)("password","",{type:"password",label:(0,B.G)("formFieldLabel__password"),placeholder:(0,B.G)("formFieldInputPlaceholder__password")}),[et,er]=(0,l.useState)(null),en=a.alternativePhoneCodeChannels.length>0,ei=f.initialValues||{},eo=(0,l.useMemo)(()=>({email_address:ei.emailAddress,email_address_username:ei.emailAddress||ei.username,username:ei.username,phone_number:ei.phoneNumber}),[f.initialValues]),es=!!J.length||!!H.length||!!k.length,[el,ec]=(0,l.useState)(!(0,ta.X)()&&!es),ed=(0,L.tJ)("identifier",eo[R]||"",{...X,isRequired:!0,transformer:e=>e.trim()}),eu=(0,L.tJ)("identifier",eo.phone_number||"",{...X,isRequired:!0}),eh="phone_number"===R?eu:ed;(0,l.useLayoutEffect)(()=>{if(eh.value.startsWith("+")&&b.includes("phone_number")&&"phone_number"!==R&&!x){var e;e=eh.value,ed.setValue(eo[R]||""),eu.setValue(e),$("phone_number"),ec(!0),K(!0)}},[eh.value,b]),(0,l.useEffect)(()=>{if(W){if("sign_up"===V){let e=new URLSearchParams;W&&e.set("__clerk_ticket",W),h(_?"create":m,{searchParams:e});return}n.setLoading(),e.setLoading(),u.create({strategy:"ticket",ticket:W}).then(e=>{switch(e.status){case"needs_first_factor":if(!th(e)||eD(e.supportedFirstFactors))return h("factor-one");return ef();case"needs_second_factor":return h("factor-two");case"complete":return(0,tr.r)("__clerk_ticket"),t.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}});default:return void console.error((0,F.s)(e.status,v))}}).catch(e=>eg(e)).finally(()=>{th(u)||(n.setIdle(),e.setIdle())})}},[]),(0,l.useEffect)(()=>{!async function(){let t=u?.firstFactorVerification?.error;if(t){switch(t.code){case e_.c.NOT_ALLOWED_TO_SIGN_UP:case e_.c.OAUTH_ACCESS_DENIED:case e_.c.NOT_ALLOWED_ACCESS:case e_.c.SAML_USER_ATTRIBUTE_MISSING:case e_.c.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:case e_.c.USER_LOCKED:case e_.c.EXTERNAL_ACCOUNT_NOT_FOUND:case e_.c.SIGN_UP_MODE_RESTRICTED:case e_.c.SIGN_UP_MODE_RESTRICTED_WAITLIST:case e_.c.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:case e_.c.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:case e_.c.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:case e_.c.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:case e_.c.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:case e_.c.CAPTCHA_INVALID:case e_.c.FRAUD_DEVICE_BLOCKED:case e_.c.FRAUD_ACTION_BLOCKED:case e_.c.SIGNUP_RATE_LIMIT_EXCEEDED:case e_.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,eY.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,L.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(!th(o)||eD(o.supportedFirstFactors))return h("factor-one");return ef();case"needs_second_factor":return h("factor-two");case"complete":return t.setActive({session:o.createdSessionId,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}});default:return void console.error((0,F.s)(o.status,v))}}catch(e){return eg(e)}},ef=async()=>{let e=(0,ew.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===e_.c.INVALID_STRATEGY_FOR_USER||e.code===e_.c.FORM_PASSWORD_INCORRECT||e.code===e_.c.FORM_PASSWORD_PWNED),s=n.errors.find(e=>e.code===e_.c.SESSION_EXISTS),l=n.errors.find(e=>"identifier_already_signed_in"===e.code),d=n.errors.find(e=>e.code===e_.c.INVITATION_ACCOUNT_NOT_EXISTS||e.code===e_.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 S({session:e,redirectUrl:g})}});else if(l){let e=l.meta.sessionId;await t.setActive({session:e,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}})}else if(_&&d){let n=(0,eY.UY)(eh);if(a.signUp.mode===e_.f.WAITLIST)return h(t.buildWaitlistUrl("emailAddress"===n?{initialValues:{[n]:eh.value}}:{}));t.client.signUp[n]=eh.value;let o=(0,ew.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===e_.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,D.H4)(t,[eh,ee],e.setError),identifierAttribute:n,identifierValue:eh.value,navigate:h,organizationTicket:W,signUpMode:a.signUp.mode,redirectUrl:o,redirectUrlComplete:s,navigateOnSetActive:S,passwordEnabled:a.attributes.password?.required??!1,alternativePhoneCodeChannel:et?.channel||(0,eY.iy)(c.preferredChannels,n,eh.value)})}else(0,D.H4)(n,[eh,ee],e.setError)},em=async e=>(e.preventDefault(),ep(eh,ee)),eI=(0,l.useMemo)(()=>({tel:P.l.PhoneInput,password:P.l.PasswordInput,text:P.l.PlainInput,email:P.l.PlainInput})[eh.type],[eh.type]);if(n.isLoading||"sign_up"===V)return(0,o.Y)(ea.B,{});let{action:eS,validLastAuthenticationStrategies:ev,...eb}=eh.props,eC=t.client?.lastAuthenticationStrategy,eA=!!eC&&w>1&&ev?.has(eC);return(0,o.Y)(p.n.Part,{part:"start",children:et?(0,o.Y)(tu,{handleSubmit:em,phoneNumberFormState:eu,onUseAnotherMethod:()=>{er(null)},phoneCodeProvider:et}):(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:_?(0,B.G)("signIn.start.titleCombined"):(0,B.G)("signIn.start.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:_?(0,B.G)("signIn.start.subtitleCombined"):(0,B.G)("signIn.start.subtitle"),sx:{"&:empty":{display:"none"}}})]}),(0,o.Y)(y.Z.Alert,{children:e.error}),(0,o.FD)(z.fv,{elementDescriptor:O.$z.main,gap:6,children:[(0,o.FD)(ti.U,{children:[es&&(0,o.Y)(ek,{enableWeb3Providers:!0,enableOAuthProviders:!0,enableAlternativePhoneCodeProviders:en,onAlternativePhoneCodeProviderClick:e=>{er((0,eM.y)(e)||null)}}),q.length?(0,o.FD)(P.l.Root,{onSubmit:em,gap:8,children:[(0,o.FD)(z.fv,{gap:6,children:[(0,o.Y)(P.l.ControlRow,{elementId:eh.id,children:(0,o.Y)(eI,{actionLabel:Q?.action,onActionClicked:()=>{$(e=>b[(b.indexOf(e)+1)%b.length]),ec(!0),K(!1)},...eb,autoFocus:el,autoComplete:Y?"webauthn":void 0,isLastAuthenticationStrategy:eA})}),(0,o.Y)(tp,{field:j?ee:void 0})]}),(0,o.FD)(z.fv,{center:!0,children:[(0,o.Y)(ts.j,{}),(0,o.Y)(P.l.SubmitButton,{hasArrow:!0})]})]}):null]}),!q.length&&(0,o.Y)(ts.j,{}),a.attributes.passkey?.enabled&&a.passkeySettings.show_sign_in_button&&A&&(0,o.Y)(y.Z.Action,{elementId:"usePasskey",children:(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.start.actionLink__use_passkey"),onClick:()=>C({flow:"discoverable"})})})]})]}),(0,o.FD)(y.Z.Footer,{children:[a.signUp.mode===e_.f.PUBLIC&&!_&&(0,o.FD)(y.Z.Action,{elementId:"signIn",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.start.actionText")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.start.actionLink"),to:t.buildUrlWithAuth(m)})]}),a.signUp.mode===e_.f.WAITLIST&&(0,o.FD)(y.Z.Action,{elementId:"signIn",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.start.actionText__join_waitlist")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.start.actionLink__join_waitlist"),to:t.buildUrlWithAuth(I)})]})]})]})})})));function tg(){let e=(0,s.ho)();return l.useEffect(()=>{e.redirectToSignIn()},[]),null}function tm(){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)(ej,{})}),(0,o.Y)(_.q,{path:"factor-two",children:(0,o.Y)(e3,{})}),(0,o.Y)(_.q,{path:"reset-password",children:(0,o.Y)(x,{})}),(0,o.Y)(_.q,{path:"reset-password-success",children:(0,o.Y)(V,{})}),(0,o.Y)(_.q,{path:"sso-callback",children:(0,o.Y)(tt,{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)(en,{})}),(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)(k,{})}),(0,o.Y)(_.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,o.Y)(b,{})}),(0,o.Y)(_.q,{path:"sso-callback",children:(0,o.Y)(C,{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)(k,{})}),(0,o.Y)(_.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,o.Y)(b,{})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(A,{})})]}),(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)(Y,{})})]}),(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)(tf,{})}),(0,o.Y)(_.q,{children:(0,o.Y)(tg,{})})]})})}tm.displayName="SignIn";let tI=(0,h.Z)(function(){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,v.C)({routing:e?.routing,path:e?.path})};return((e=!1)=>(0,f.s)(e?w:void 0,"preloadComponent",{staleTime:1/0}))(e.isCombinedFlow),(0,g.Z)(),(0,o.Y)(u.g.Provider,{value:t,children:(0,o.Y)(tm,{})})}),t_=e=>{let t={signUpUrl:`/${S.I}/sign-up`,waitlistUrl:`/${S.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)(tI,{...t,routing:"virtual"})})})})}},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(8909),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:S,queryString:v}=(0,p.r)(),w=_.signUp.mode,b=(0,h.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"!==w&&!!(!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)(v,n.u),[]),U=new i.n(b,{...F,signInFallbackRedirectUrl:F.signInFallbackRedirectUrl||F.fallbackRedirectUrl,signInForceRedirectUrl:F.signInForceRedirectUrl||F.forceRedirectUrl},S,A);delete F.fallbackRedirectUrl,delete F.forceRedirectUrl;let P=k.buildUrlWithAuth(U.getAfterSignInUrl()),E=k.buildUrlWithAuth(U.getAfterSignUpUrl()),D="path"===F.routing&&F.path||b.signInUrl||I.signInUrl,M=Y?"path"===F.routing&&F.path||b.signUpUrl||I.signUpUrl:F.signUpUrl||b.signUpUrl||I.signUpUrl,L=F.waitlistUrl||b.waitlistUrl||I.waitlistUrl,T=U.getPreservedSearchParams();D=(0,o.kZ)({base:D,hashSearchParams:[S,T]},{stringify:!0}),M=(0,o.kZ)({base:M,hashSearchParams:[S,T]},{stringify:!0}),L=(0,o.kZ)({base:L,hashSearchParams:[S,T]},{stringify:!0});let G=U.toSearchParams().toString(),R=(0,d.aQ)({routing:F.routing,baseUrl:M,authQueryString:G,path:F.path,endpoint:Y?"/create"+d.Vu:d.Vu}),B=(0,d.aQ)({routing:F.routing,baseUrl:M,authQueryString:G,path:F.path,endpoint:Y?"/create"+d.aB:d.aB});Y&&(M=(0,o.kZ)({base:D,hashPath:"/create",hashSearchParams:[S,T]},{stringify:!0}));let z=(0,o.kZ)({base:M,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+(Y?"/create"+o:o)}`)},$=k.session?.currentTask?k.__internal_getOption("taskUrls")?.[k.session?.currentTask.key]??(0,d.aQ)({routing:F.routing,baseUrl:D,authQueryString:G,path:F.path,endpoint:Y?"/create"+(0,a.ru)(k.session?.currentTask):(0,a.ru)(k.session?.currentTask)}):null;return{...F,transferable:F.transferable??!0,oauthFlow:F.oauthFlow||"auto",componentName:C,signUpUrl:M,signInUrl:D,waitlistUrl:L,afterSignInUrl:P,afterSignUpUrl:E,emailLinkRedirectUrl:R,ssoCallbackUrl:B,navigateAfterSignIn:()=>t(P),signUpContinueUrl:z,queryParams:S,initialValues:{...F.initialValues,...y},authQueryString:G,isCombinedFlow:Y,navigateOnSetActive:O,taskUrl:$}}},9599:function(e,t,r){r.d(t,{g:()=>a});var n=r(8909),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()}}}}]);
@@ -1 +0,0 @@
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}},8480:function(e,r,t){t.r(r),t.d(r,{SignUp:()=>eI,SignUpContinue:()=>H,SignUpModal:()=>eY,SignUpSSOCallback:()=>er,SignUpVerifyEmail:()=>eS,SignUpVerifyPhone:()=>ey,SignUpStart:()=>em});var i=t(4518),n=t(8909),a=t(5074),l=t(7607),s=t(5873),o=t(5350),d=t(5577),c=t(4607),u=t(4096),p=t(7831),h=t(2265),m=t(4132),f=t(6088),g=t(3269),b=t(6153),_=t(6980),U=t(6760),v=t(4468),A=t(8640),S=t(4557),k=t(7697),y=t(6324),C=t(4),P=t(78),I=t(2861),Y=t(8272),N=t(8920),w=t(4964),F=t(2454),E=t(2689),q=t(6580),R=t(6142),G=t(7591);let L=e=>{let{handleSubmit:r,fields:t,formState:n,canToggleEmailPhone:a,onlyLegalAcceptedMissing:l=!1,handleEmailPhoneToggle:s}=e,{showOptionalFields:o}=(0,q.K)().parsedLayout,d=e=>("emailAddress"===e||"phoneNumber"===e)&&a?!!t[e]:!!t[e]&&(o||t[e]?.required);return(0,i.FD)(F.l.Root,{onSubmit:r,gap:8,children:[!l&&(0,i.FD)(Y.fv,{gap:6,children:[(d("firstName")||d("lastName"))&&(0,i.FD)(F.l.ControlRow,{elementId:"name",sx:{[G.g.sm]:{flexWrap:"wrap"}},children:[d("firstName")&&(0,i.Y)(F.l.PlainInput,{...n.firstName.props,isRequired:t.firstName?.required,isOptional:!t.firstName?.required}),d("lastName")&&(0,i.Y)(F.l.PlainInput,{...n.lastName.props,isRequired:t.lastName?.required,isOptional:!t.lastName?.required})]}),d("username")&&(0,i.Y)(F.l.ControlRow,{elementId:"username",children:(0,i.Y)(F.l.PlainInput,{...n.username.props,isRequired:t.username?.required,isOptional:!t.username?.required})}),d("emailAddress")&&(0,i.Y)(F.l.ControlRow,{elementId:"emailAddress",children:(0,i.Y)(F.l.PlainInput,{...n.emailAddress.props,isRequired:t.emailAddress?.required,isOptional:!t.emailAddress?.required,isDisabled:t.emailAddress?.disabled,actionLabel:a?(0,I.G)("signUp.start.actionLink__use_phone"):void 0,onActionClicked:a?()=>s("phoneNumber"):void 0})}),d("phoneNumber")&&(0,i.Y)(F.l.ControlRow,{elementId:"phoneNumber",children:(0,i.Y)(F.l.PhoneInput,{...n.phoneNumber.props,isRequired:t.phoneNumber?.required,isOptional:!t.phoneNumber?.required,actionLabel:a?(0,I.G)("signUp.start.actionLink__use_email"):void 0,onActionClicked:a?()=>s("emailAddress"):void 0})}),d("password")&&(0,i.Y)(F.l.ControlRow,{elementId:"password",children:(0,i.Y)(F.l.PasswordInput,{...n.password.props,isRequired:t.password?.required,isOptional:!t.password?.required})})]}),(0,i.FD)(Y.fv,{center:!0,children:[(0,i.Y)(R.j,{}),(0,i.FD)(Y.fv,{gap:6,sx:{width:"100%"},children:[d("legalAccepted")&&(0,i.Y)(F.l.ControlRow,{elementId:"legalAccepted",children:(0,i.Y)(E.d,{...n.legalAccepted.props,isRequired:t.legalAccepted?.required})}),(0,i.Y)(F.l.SubmitButton,{hasArrow:!0,localizationKey:(0,I.G)("formButtonPrimary")})]})]})]})};var T=t(1044);let D=["emailAddress","phoneNumber","username","firstName","lastName","password","ticket","legalAccepted"];function B(e){return D.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)||O(e,n)&&"emailAddress"!==i)return;let{emailShouldBeRequired:a}=Z(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||O(e,i)&&"phoneNumber"!==t)return;let{phoneShouldBeRequired:r}=Z(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,T.C8)(a);if(l[s]?.enabled)return{required:l[s]?.required};return;default:return}}(t,e);return i&&(r[t]=i),r},{})}let M=(e,r,t)=>{if(t?.emailAddress)return"emailAddress";if(t?.phoneNumber)return"phoneNumber";if(O(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 O(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 x={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 Z(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=>x[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 V=t(44),K=t(9236),z=t(5715);let W=a.memo(e=>{let r=(0,n.ho)(),{navigate:t}=(0,w.r)(),a=(0,g.f0)(),l=(0,o.X)(),s=(0,y.B)(),d=l.ssoCallbackUrl,c=l.afterSignUpUrl||"/",u="popup"===l.oauthFlow||"auto"===l.oauthFlow&&(0,V.C)(),{continueSignUp:p=!1,onAlternativePhoneCodeProviderClick:h,...m}=e;return(0,i.Y)(z.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 s.authenticateWithPopup({strategy:r,redirectUrl:d,redirectUrlComplete:c,popup:t,continueSignUp:p,unsafeMetadata:l.unsafeMetadata,legalAccepted:e.legalAccepted,oidcPrompt:l.oidcPrompt}).catch(e=>(0,v.H4)(e,[],a.setError))}return s.authenticateWithRedirect({continueSignUp:p,redirectUrl:d,redirectUrlComplete:c,strategy:r,unsafeMetadata:l.unsafeMetadata,legalAccepted:e.legalAccepted,oidcPrompt:l.oidcPrompt}).catch(e=>(0,v.H4)(e,[],a.setError))},web3Callback: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 $=t(1687);let H=(0,g.dm)(function(){let e=(0,g.f0)(),r=(0,n.ho)(),{navigate:t}=(0,w.r)(),{displayConfig:l,userSettings:s}=(0,k.O)(),{attributes:d,usernameSettings:u}=s,{t:p,locale:h}=(0,P._)(),{afterSignUpUrl:m,signInUrl:F,unsafeMetadata:E,initialValues:q={},isCombinedFlow:R,navigateOnSetActive:G}=(0,o.X)(),T=(0,y.B)(),D=!!a.useContext(C.Q),x=!!(R&&D),Z=s.signUp.progressive,[V,K]=a.useState(M(d,s.signUp.progressive)),z=(0,o.X)(),H={firstName:(0,A.tJ)("firstName",q.firstName||"",{type:"text",label:(0,I.G)("formFieldLabel__firstName"),placeholder:(0,I.G)("formFieldInputPlaceholder__firstName")}),lastName:(0,A.tJ)("lastName",q.lastName||"",{type:"text",label:(0,I.G)("formFieldLabel__lastName"),placeholder:(0,I.G)("formFieldInputPlaceholder__lastName")}),emailAddress:(0,A.tJ)("emailAddress",q.emailAddress||T.emailAddress||"",{type:"email",label:(0,I.G)("formFieldLabel__emailAddress"),placeholder:(0,I.G)("formFieldInputPlaceholder__emailAddress")}),username:(0,A.tJ)("username",q.username||"",{type:"text",label:(0,I.G)("formFieldLabel__username"),placeholder:(0,I.G)("formFieldInputPlaceholder__username"),transformer:e=>e.trim(),buildErrorMessage:e=>(0,S.Z)(e,{t:p,locale:h,usernameSettings:u})}),phoneNumber:(0,A.tJ)("phoneNumber",q.phoneNumber||"",{type:"tel",label:(0,I.G)("formFieldLabel__phoneNumber"),placeholder:(0,I.G)("formFieldInputPlaceholder__phoneNumber")}),password:(0,A.tJ)("password","",{type:"password",label:(0,I.G)("formFieldLabel__password"),placeholder:(0,I.G)("formFieldInputPlaceholder__password"),validatePassword:!0}),legalAccepted:(0,A.tJ)("legalAccepted","",{type:"checkbox",label:"",defaultChecked:!1,isRequired:s.signUp.legal_consent_enabled||!1})},J=(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)(_.B,{});let X=!!H.emailAddress.value,j=T.verifications?.externalAccount?.status=="verified",Q=B({attributes:d,hasEmail:X,activeCommIdentifierType:V,signUp:T,isProgressiveSignUp:Z,legalConsentRequired:s.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=s.authenticatableSocialStrategies,er=async i=>{i.preventDefault();let n=Object.entries(Q).reduce((e,[r,t])=>[...e,...t&&H[r]?[H[r]]:[]],[]);E&&n.push({id:"unsafeMetadata",value:E});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&&O(d,Z)&&(n.push(H.emailAddress),n.push(H.phoneNumber)),e.setLoading(),e.setError(void 0),T.update((0,A.mK)(n)).then(e=>(0,$.A)({signUp:e,verifyEmailPath:"./verify-email-address",verifyPhonePath:"./verify-phone-number",handleComplete:()=>r.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await G({session:e,redirectUrl:m})}}),navigate:t,oidcPrompt:z.oidcPrompt})).catch(r=>(0,v.H4)(r,n,e.setError)).finally(()=>e.setIdle())},et=O(d,Z),ei=!j&&ee.length>0,en=J?(0,I.G)("signUp.legalConsent.continue.title"):(0,I.G)("signUp.continue.title"),ea=J?(0,I.G)("signUp.legalConsent.continue.subtitle"):(0,I.G)("signUp.continue.subtitle");return(0,i.Y)(c.n.Part,{part:"complete",children:(0,i.FD)(f.Z.Root,{children:[(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,children:[(0,i.Y)(b.Y.Title,{localizationKey:en}),(0,i.Y)(b.Y.Subtitle,{localizationKey:ea})]}),(0,i.Y)(f.Z.Alert,{children:e.error}),(0,i.Y)(Y.so,{direction:"col",elementDescriptor:N.$z.main,gap:8,children:(0,i.FD)(U.U,{children:[ei&&!J&&(0,i.Y)(W,{enableOAuthProviders:ei,enableWeb3Providers:!1,enableAlternativePhoneCodeProviders:!1,continueSignUp:!0}),(0,i.Y)(L,{handleSubmit:er,fields:Q,formState:H,onlyLegalAcceptedMissing:J,canToggleEmailPhone:et,handleEmailPhoneToggle:e=>{O(d,Z)&&K(e)}})]})})]}),(0,i.Y)(f.Z.Footer,{children:x?null:(0,i.FD)(f.Z.Action,{elementId:"signUp",children:[(0,i.Y)(f.Z.ActionText,{localizationKey:(0,I.G)("signUp.continue.actionText")}),(0,i.Y)(f.Z.ActionLink,{localizationKey:(0,I.G)("signUp.continue.actionLink"),to:x?"../../":r.buildUrlWithAuth(F)})]})})]})})});var J=t(656),X=t(7420),j=t(7896);let Q=(0,J.Ai)((0,g.dm)(()=>{let e=(0,n.ho)(),r=(0,o.X)(),t=e.client.signUp,{data:a,isLoading:l}=(0,j.s)(t?.__experimental_getEnterpriseConnections,{signUpId:t.id});return l||a?.length?(0,i.Y)(c.n.Part,{part:"enterpriseConnections",children:a?.length?(0,i.Y)(X.l,{title:(0,I.G)("signUp.enterpriseConnections.title"),subtitle:(0,I.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)(_.B,{}):null}):null}));var ee=t(6126);let er=(0,J.p)((0,J.Ai)(ee.F));var et=t(1652),ei=t(3610),en=t(2166),ea=t(4670),el=t(3990),es=t(4901),eo=t(5763),ed=t(9426),ec=t(2782);let eu=()=>{let e=(0,n.ho)(),r=(0,g.f0)(),{navigate:t}=(0,w.r)(),{signInUrl:a,waitlistUrl:l}=(0,o.X)(),s=(0,ed.p)(),{userSettings:d}=(0,k.O)(),{mode:c}=d.signUp,u=async()=>{await t(e.buildUrlWithAuth(l))},p=c===en.f.RESTRICTED?(0,I.G)("signUp.restrictedAccess.subtitle"):(0,I.G)("signUp.restrictedAccess.subtitleWaitlist");return(0,i.FD)(f.Z.Root,{children:[(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,children:[(0,i.Y)(Y.In,{icon:ec.A,sx:e=>({margin:"auto",width:e.sizes.$10,height:e.sizes.$10})}),(0,i.Y)(b.Y.Title,{localizationKey:(0,I.G)("signUp.restrictedAccess.title")}),(0,i.Y)(b.Y.Subtitle,{localizationKey:p})]}),(0,i.Y)(f.Z.Alert,{children:r.error}),c===en.f.RESTRICTED&&s&&(0,i.Y)(Y.so,{direction:"col",gap:4,children:(0,i.Y)(Y.$n,{localizationKey:(0,I.G)("signUp.restrictedAccess.blockButton__emailSupport"),onClick:()=>{window.location.href=`mailto:${s}`}})}),c===en.f.WAITLIST&&(0,i.Y)(Y.so,{direction:"col",gap:4,children:(0,i.Y)(Y.$n,{localizationKey:(0,I.G)("signUp.restrictedAccess.blockButton__joinWaitlist"),onClick:u})})]}),(0,i.Y)(f.Z.Footer,{children:(0,i.FD)(f.Z.Action,{elementId:"signUp",children:[(0,i.Y)(f.Z.ActionText,{localizationKey:(0,I.G)("signUp.restrictedAccess.actionText")}),(0,i.Y)(f.Z.ActionLink,{localizationKey:(0,I.G)("signUp.restrictedAccess.actionLink"),to:e.buildUrlWithAuth(a)})]})})]})};var ep=t(9835);let eh=e=>{let{handleSubmit:r,fields:t,formState:n,onUseAnotherMethod:a,phoneCodeProvider:l}=e,{providerToDisplayData:s,strategyToDisplayData:o}=(0,ep.k)(),d=l.name,c=l.channel,u=(0,g.f0)();return(0,i.Y)(f.Z.Root,{children:(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,showDivider:!0,children:[(0,i.Y)(Y.fv,{center:!0,children:(0,i.Y)(Y._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)(b.Y.Title,{localizationKey:(0,I.G)("signUp.start.alternativePhoneCodeProvider.title",{provider:d})}),(0,i.Y)(b.Y.Subtitle,{localizationKey:(0,I.G)("signUp.start.alternativePhoneCodeProvider.subtitle",{provider:d})})]}),(0,i.Y)(f.Z.Alert,{children:u.error}),(0,i.Y)(Y.so,{direction:"col",elementDescriptor:N.$z.main,gap:6,children:(0,i.FD)(F.l.Root,{onSubmit:r,gap:8,children:[(0,i.Y)(Y.fv,{gap:6,children:(0,i.Y)(F.l.ControlRow,{elementId:"phoneNumber",children:(0,i.Y)(F.l.PhoneInput,{...n.phoneNumber.props,label:(0,I.G)("signUp.start.alternativePhoneCodeProvider.label",{provider:d||""}),isRequired:!0,isOptional:!1,actionLabel:void 0,onActionClicked:void 0})})}),(0,i.FD)(Y.fv,{center:!0,children:[(0,i.Y)(R.j,{}),(0,i.FD)(Y.fv,{gap:6,sx:{width:"100%"},children:[!!t.legalAccepted&&t.legalAccepted?.required&&(0,i.Y)(F.l.ControlRow,{elementId:"legalAccepted",children:(0,i.Y)(E.d,{...n.legalAccepted.props,isRequired:t.legalAccepted?.required})}),(0,i.Y)(F.l.SubmitButton,{hasArrow:!0,localizationKey:(0,I.G)("formButtonPrimary")})]})]}),(0,i.Y)(Y.fv,{center:!0,children:(0,i.Y)(Y.$n,{variant:"link",colorScheme:"neutral",onClick:a,localizationKey:(0,I.G)("signUp.start.alternativePhoneCodeProvider.actionLink")})})]})})]})})},em=(0,J.p)((0,J.Ai)((0,g.dm)(function(){let e=(0,g.f0)(),r=(0,n.ho)(),t=(0,es.m)(),l=(0,y.B)(),{showOptionalFields:s}=(0,q.K)().parsedLayout,{userSettings:d,authConfig:u}=(0,k.O)(),{navigate:p}=(0,w.r)(),{attributes:h}=d,{setActive:m}=(0,n.ho)(),F=(0,o.X)(),E=!!a.useContext(C.Q),{afterSignUpUrl:G,signInUrl:T,unsafeMetadata:D,navigateOnSetActive:x}=F,Z=!!(F.isCombinedFlow&&E),[V,K]=a.useState(()=>M(h,d.signUp.progressive,{phoneNumber:F.initialValues?.phoneNumber===null?void 0:F.initialValues?.phoneNumber,emailAddress:F.initialValues?.emailAddress===null?void 0:F.initialValues?.emailAddress,...Z?{emailAddress:l.emailAddress,phoneNumber:l.phoneNumber}:{}})),{t:z,locale:H}=(0,P._)(),J=F.initialValues||{},[X,j]=a.useState(null),[Q,ee]=a.useState(!1),{userSettings:{passwordSettings:er,usernameSettings:ed}}=(0,k.O)(),{mode:ec}=d.signUp,ep={firstName:(0,A.tJ)("firstName",l.firstName||J.firstName||"",{type:"text",label:(0,I.G)("formFieldLabel__firstName"),placeholder:(0,I.G)("formFieldInputPlaceholder__firstName")}),lastName:(0,A.tJ)("lastName",l.lastName||J.lastName||"",{type:"text",label:(0,I.G)("formFieldLabel__lastName"),placeholder:(0,I.G)("formFieldInputPlaceholder__lastName")}),emailAddress:(0,A.tJ)("emailAddress",l.emailAddress||J.emailAddress||"",{type:"email",label:(0,I.G)("formFieldLabel__emailAddress"),placeholder:(0,I.G)("formFieldInputPlaceholder__emailAddress")}),username:(0,A.tJ)("username",l.username||J.username||"",{type:"text",label:(0,I.G)("formFieldLabel__username"),placeholder:(0,I.G)("formFieldInputPlaceholder__username"),transformer:e=>e.trim(),buildErrorMessage:e=>(0,S.Z)(e,{t:z,locale:H,usernameSettings:ed})}),phoneNumber:(0,A.tJ)("phoneNumber",l.phoneNumber||J.phoneNumber||"",{type:"tel",label:(0,I.G)("formFieldLabel__phoneNumber"),placeholder:(0,I.G)("formFieldInputPlaceholder__phoneNumber")}),legalAccepted:(0,A.tJ)("legalAccepted","",{type:"checkbox",label:"",defaultChecked:!1,isRequired:d.signUp.legal_consent_enabled||!1}),password:(0,A.tJ)("password","",{type:"password",label:(0,I.G)("formFieldLabel__password"),placeholder:(0,I.G)("formFieldInputPlaceholder__password"),validatePassword:!0,buildErrorMessage:e=>(0,el.C5)(e,{t:z,locale:H,passwordSettings:er})}),ticket:(0,A.tJ)("ticket",(0,ea.n)("__clerk_ticket")||(0,ea.n)("__clerk_invitation_token")||"")},em=!!ep.ticket.value,ef=!!(l.id&&null!==l.status&&((0,ea.n)("__clerk_ticket")||(0,ea.n)("__clerk_invitation_token"))),eg=!!ep.emailAddress.value,eb=d.signUp.progressive,e_=d.signUp.legal_consent_enabled,eU=F.oidcPrompt,ev=B({attributes:h,hasTicket:em||ef,hasEmail:eg,activeCommIdentifierType:V,isProgressiveSignUp:eb,legalConsentRequired:e_});a.useLayoutEffect(()=>{ep.ticket.value&&(t.setLoading(),e.setLoading(),l.create({strategy:"ticket",ticket:ep.ticket.value}).then(e=>{ep.emailAddress.setValue(e.emailAddress||""),"missing_requirements"===e.status&&ee(!0);let r=F.ssoCallbackUrl,t=F.afterSignUpUrl||"/";return(0,$.A)({signUp:e,redirectUrl:r,redirectUrlComplete:t,verifyEmailPath:"verify-email-address",verifyPhonePath:"verify-phone-number",continuePath:"continue",handleComplete:()=>((0,ea.r)("__clerk_ticket"),(0,ea.r)("__clerk_invitation_token"),m({session:e.createdSessionId,navigate:async({session:e})=>{await x({session:e,redirectUrl:G})}})),navigate:p,oidcPrompt:eU})}).catch(r=>{ep.ticket.setValue(""),(0,v.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 en.c.NOT_ALLOWED_TO_SIGN_UP:case en.c.OAUTH_ACCESS_DENIED:case en.c.NOT_ALLOWED_ACCESS:case en.c.SAML_USER_ATTRIBUTE_MISSING:case en.c.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:case en.c.USER_LOCKED:case en.c.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:case en.c.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:case en.c.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:case en.c.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:case en.c.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:case en.c.CAPTCHA_INVALID:case en.c.FRAUD_DEVICE_BLOCKED:case en.c.FRAUD_ACTION_BLOCKED:case en.c.SIGNUP_RATE_LIMIT_EXCEEDED:case en.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&&ep[r]?[ep[r]]:[]),e),[]);if(D&&t.push({id:"unsafeMetadata",value:D}),ev.ticket||ef){let e=()=>{};if(t.push({id:"strategy",value:"ticket",clearFeedback:e,setValue:e,onChange:e,setError:e}),!ep.ticket.value&&ef){let r=(0,ea.n)("__clerk_ticket")||(0,ea.n)("__clerk_invitation_token");r&&t.push({id:"ticket",value:r,clearFeedback:e,setValue:e,onChange:e,setError:e})}}let i=X?.channel||(0,eo.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&&O(h,eb)&&(t.push(ep.emailAddress),t.push(ep.phoneNumber)),e.setLoading(),e.setError(void 0);let s=F.ssoCallbackUrl,o=F.afterSignUpUrl||"/";return(ev.ticket||ef?l.upsert((0,A.mK)(t)):l.create((0,A.mK)(t))).then(e=>(0,$.A)({signUp:e,verifyEmailPath:"verify-email-address",verifyPhonePath:"verify-phone-number",handleComplete:()=>m({session:e.createdSessionId,navigate:async({session:e})=>{await x({session:e,redirectUrl:G})}}),navigate:p,redirectUrl:s,redirectUrlComplete:o,oidcPrompt:eU})).catch(r=>(0,ei.$R)(r)&&r.errors?.[0]?.code==="enterprise_connection_id_is_required_with_multiple_connections"?p("./enterprise-connections"):(0,v.H4)(r,t,e.setError)).finally(()=>e.setIdle())};if(t.isLoading)return(0,i.Y)(_.B,{});let eS=O(h,eb),ek=Object.entries(ev).filter(([e,r])=>s||r?.required),ey=function(e){let{authenticatableSocialStrategies:r,web3FirstFactors:t}=e;return e.hasValidAuthFactor||!r.length&&!t.length}(d)&&ek.length>0,eC=(!(em||ef)||Q)&&d.authenticatableSocialStrategies.length>0,eP=!(em||ef)&&d.web3FirstFactors.length>0,eI=!(em||ef)&&d.alternativePhoneCodeChannels.length>0;return ec===en.f.PUBLIC||em||ef?(0,i.Y)(c.n.Part,{part:"start",children:X?(0,i.Y)(eh,{handleSubmit:eA,fields:ev,formState:ep,onUseAnotherMethod:()=>{j(null)},phoneCodeProvider:X}):(0,i.FD)(f.Z.Root,{children:[(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,children:[(0,i.Y)(b.Y.Title,{localizationKey:Z?(0,I.G)("signUp.start.titleCombined"):(0,I.G)("signUp.start.title")}),(0,i.Y)(b.Y.Subtitle,{localizationKey:Z?(0,I.G)("signUp.start.subtitleCombined"):(0,I.G)("signUp.start.subtitle")})]}),(0,i.Y)(f.Z.Alert,{children:e.error}),(0,i.FD)(Y.so,{direction:"col",elementDescriptor:N.$z.main,gap:6,children:[(0,i.FD)(U.U,{children:[(eC||eP||eI)&&(0,i.Y)(W,{enableOAuthProviders:eC,enableWeb3Providers:eP,enableAlternativePhoneCodeProviders:eI,onAlternativePhoneCodeProviderClick:e=>{j((0,et.y)(e)||null)},continueSignUp:Q,legalAccepted:!!ep.legalAccepted.checked||void 0}),ey&&(0,i.Y)(L,{handleSubmit:eA,fields:ev,formState:ep,canToggleEmailPhone:eS,handleEmailPhoneToggle:e=>{O(h,eb)&&K(e)}})]}),!ey&&(0,i.Y)(R.j,{})]})]}),(0,i.Y)(f.Z.Footer,{children:(0,i.FD)(f.Z.Action,{elementId:"signUp",children:[(0,i.Y)(f.Z.ActionText,{localizationKey:(0,I.G)("signUp.start.actionText")}),(0,i.Y)(f.Z.ActionLink,{localizationKey:(0,I.G)("signUp.start.actionLink"),to:Z?"../":r.buildUrlWithAuth(T)})]})})]})}):(0,i.Y)(eu,{})})));var ef=t(7912);let eg=e=>{let{afterSignUpUrl:r,navigateOnSetActive:t,isCombinedFlow:l}=(0,o.X)(),{setActive:s}=(0,n.ho)(),{navigate:d}=(0,w.r)(),c=!!(a.useContext(C.Q)&&l);return(0,i.Y)(ef.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,resendButton:e.resendButton,onCodeEntryFinishedAction:(i,n,a)=>{e.attempt(i).then(async e=>(await n(),(0,$.A)({signUp:e,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",continuePath:"../continue",handleComplete:()=>s({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,ea.t)()}),alternativeMethodsLabel:e.alternativeMethodsLabel,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,showAlternativeMethods:e.showAlternativeMethods})},eb=()=>{let e=(0,y.B)(),r=(0,g.f0)(),t=e.verifications.emailAddress.status,n=!e.status||"verified"===t;return(0,j.s)(n?void 0:()=>e.prepareEmailAddressVerification({strategy:"email_code"}),{name:"prepare",strategy:"email_code",number:e.emailAddress},{staleTime:100,onError:e=>(0,v.H4)(e,[],r.setError)}),(0,i.Y)(c.n.Part,{part:"emailCode",children:(0,i.Y)(eg,{cardTitle:(0,I.G)("signUp.emailCode.title"),cardSubtitle:(0,I.G)("signUp.emailCode.subtitle"),inputLabel:(0,I.G)("signUp.emailCode.formSubtitle"),resendButton:(0,I.G)("signUp.emailCode.resendButton"),prepare:()=>{if(!n)return e.prepareEmailAddressVerification({strategy:"email_code"}).catch(e=>(0,v.H4)(e,[],r.setError))},attempt:r=>e.attemptEmailAddressVerification({code:r}),safeIdentifier:e.emailAddress})})};var e_=t(2027),eU=t(4979),ev=t(2992);let eA=()=>{let{t:e}=(0,P._)(),r=(0,y.B)(),t=(0,o.X)(),{afterSignUpUrl:l,navigateOnSetActive:s}=t,d=(0,g.f0)(),{navigate:u}=(0,w.r)(),{setActive:p}=(0,n.ho)(),[h,m]=a.useState(!1),{startEmailLinkFlow:f,cancelEmailLinkFlow:b}=(0,ev.u)(r);a.useEffect(()=>{_()},[]);let _=()=>f({redirectUrl:t.emailLinkRedirectUrl}).then(e=>U(e)).catch(e=>{(0,v.H4)(e,[],d.setError)}),U=async r=>{let t=r.verifications.emailAddress;"expired"===t.status?d.setError(e((0,I.G)("formFieldError__verificationLinkExpired"))):t.verifiedFromTheSameClient()?m(!0):await (0,$.A)({signUp:r,continuePath:"../continue",verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",handleComplete:()=>p({session:r.createdSessionId,navigate:async({session:e})=>{await s({session:e,redirectUrl:l})}}),navigate:u})};return h?(0,i.Y)(eU.$,{title:(0,I.G)("signUp.emailLink.verifiedSwitchTab.title"),subtitle:(0,I.G)("signUp.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,i.Y)(c.n.Part,{part:"emailLink",children:(0,i.Y)(e_._,{cardTitle:(0,I.G)("signUp.emailLink.title"),cardSubtitle:(0,I.G)("signUp.emailLink.subtitle"),formTitle:(0,I.G)("signUp.emailLink.formTitle"),formSubtitle:(0,I.G)("signUp.emailLink.formSubtitle"),resendButton:(0,I.G)("signUp.emailLink.resendButton"),onResendCodeClicked:()=>{b(),_()},safeIdentifier:r.emailAddress})})},eS=(0,g.dm)(()=>{let{userSettings:e}=(0,k.O)(),{attributes:r}=e;return r.email_address?.verifications?.includes("email_link")?(0,i.Y)(eA,{}):(0,i.Y)(eb,{})}),ek=(0,g.dm)(()=>{let e=(0,y.B)(),r=(0,g.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,j.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,v.H4)(e,[],r.setError)});let o=(0,I.G)("signUp.phoneCode.title"),d=(0,I.G)("signUp.phoneCode.subtitle"),u=(0,I.G)("signUp.phoneCode.resendButton");if(l){let e=(0,et.y)(t)?.name;o=(0,I.G)("signUp.alternativePhoneCodeProvider.title",{provider:e||""}),d=(0,I.G)("signUp.alternativePhoneCodeProvider.subtitle",{provider:e||""}),u=(0,I.G)("signUp.alternativePhoneCodeProvider.resendButton")}return r.isLoading?(0,i.Y)(_.B,{}):(0,i.Y)(c.n.Part,{part:"phoneCode",children:(0,i.Y)(eg,{cardTitle:o,cardSubtitle:d,resendButton:u,prepare:()=>{if(!a)return e.preparePhoneNumberVerification({strategy:"phone_code",channel:s}).catch(e=>(0,v.H4)(e,[],r.setError))},attempt:r=>e.attemptPhoneNumberVerification({code:r}),safeIdentifier:e.phoneNumber,alternativeMethodsLabel:l?(0,I.G)("footerActionLink__alternativePhoneCodeProvider"):void 0,onShowAlternativeMethodsClicked:l?()=>{r.setLoading(),r.setError(void 0),e.preparePhoneNumberVerification({strategy:"phone_code",channel:void 0}).catch(e=>(0,v.H4)(e,[],r.setError)).finally(()=>r.setIdle())}:void 0,showAlternativeMethods:!!l||void 0})})}),ey=()=>(0,i.Y)(ek,{});function eC(){let e=(0,n.ho)();return a.useEffect(()=>{e.redirectToSignUp()},[]),null}function eP(){(0,l.Z)();let e=(0,o.X)();return(0,i.Y)(c.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)(eS,{})}),(0,i.Y)(h.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,i.Y)(ey,{})}),(0,i.Y)(h.q,{path:"sso-callback",children:(0,i.Y)(er,{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)(s.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)(eS,{})}),(0,i.Y)(h.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,i.Y)(ey,{})}),(0,i.Y)(h.q,{index:!0,children:(0,i.Y)(H,{})})]}),(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)(Q,{})}),(0,i.Y)(h.q,{index:!0,children:(0,i.Y)(em,{})}),(0,i.Y)(h.q,{children:(0,i.Y)(eC,{})})]})})}eP.displayName="SignUp";let eI=(0,d.Z)(eP),eY=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)(o.g.Provider,{value:{componentName:"SignUp",...r,routing:"virtual",mode:"modal"},children:(0,i.Y)("div",{children:(0,i.Y)(eI,{...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(8909),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:C,mode:P,...I}=e,Y=(0,d.useMemo)(()=>(0,m.tf)(v,i.u),[]),N=new n.n(S,{...I,signInFallbackRedirectUrl:I.signInFallbackRedirectUrl||I.fallbackRedirectUrl,signInForceRedirectUrl:I.signInForceRedirectUrl||I.forceRedirectUrl},U,P);delete I.fallbackRedirectUrl,delete I.forceRedirectUrl;let w=k.buildUrlWithAuth(N.getAfterSignInUrl()),F=k.buildUrlWithAuth(N.getAfterSignUpUrl()),E="path"===I.routing&&I.path||S.signInUrl||b.signInUrl,q=y?"path"===I.routing&&I.path||S.signUpUrl||b.signUpUrl:I.signUpUrl||S.signUpUrl||b.signUpUrl,R=I.waitlistUrl||S.waitlistUrl||b.waitlistUrl,G=N.getPreservedSearchParams();E=(0,l.kZ)({base:E,hashSearchParams:[U,G]},{stringify:!0}),q=(0,l.kZ)({base:q,hashSearchParams:[U,G]},{stringify:!0}),R=(0,l.kZ)({base:R,hashSearchParams:[U,G]},{stringify:!0});let L=N.toSearchParams().toString(),T=(0,c.aQ)({routing:I.routing,baseUrl:q,authQueryString:L,path:I.path,endpoint:y?"/create"+c.Vu:c.Vu}),D=(0,c.aQ)({routing:I.routing,baseUrl:q,authQueryString:L,path:I.path,endpoint:y?"/create"+c.aB:c.aB});y&&(q=(0,l.kZ)({base:E,hashPath:"/create",hashSearchParams:[U,G]},{stringify:!0}));let B=(0,l.kZ)({base:q,hashPath:"/continue"},{stringify:!0}),M=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:I.routing,baseUrl:E,authQueryString:L,path:I.path,endpoint:y?"/create"+(0,a.ru)(k.session?.currentTask):(0,a.ru)(k.session?.currentTask)}):null;return{...I,transferable:I.transferable??!0,oauthFlow:I.oauthFlow||"auto",componentName:C,signUpUrl:q,signInUrl:E,waitlistUrl:R,afterSignInUrl:w,afterSignUpUrl:F,emailLinkRedirectUrl:T,ssoCallbackUrl:D,navigateAfterSignIn:()=>r(w),signUpContinueUrl:B,queryParams:U,initialValues:{...I.initialValues,...Y},authQueryString:L,isCombinedFlow:y,navigateOnSetActive:M,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(8909),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),C=(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:P,mode:I,...Y}=e,N=new n.n(S,{...Y,signUpFallbackRedirectUrl:Y.signUpFallbackRedirectUrl||Y.fallbackRedirectUrl,signUpForceRedirectUrl:Y.signUpForceRedirectUrl||Y.forceRedirectUrl},U,I);delete Y.fallbackRedirectUrl,delete Y.forceRedirectUrl;let w=k.buildUrlWithAuth(N.getAfterSignUpUrl()),F=k.buildUrlWithAuth(N.getAfterSignInUrl()),E="path"===Y.routing&&Y.path||S.signUpUrl||b.signUpUrl,q=Y.signInUrl||S.signInUrl||b.signInUrl,R=Y.waitlistUrl||S.waitlistUrl||b.waitlistUrl,G=N.getPreservedSearchParams();q=(0,l.kZ)({base:q,hashSearchParams:[U,G]},{stringify:!0}),E=(0,l.kZ)({base:E,hashSearchParams:[U,G]},{stringify:!0}),R=(0,l.kZ)({base:R,hashSearchParams:[U,G]},{stringify:!0});let L=N.toSearchParams().toString(),T=Y.emailLinkRedirectUrl??(0,c.aQ)({routing:Y.routing,baseUrl:E,authQueryString:L,path:Y.path,endpoint:y?"/create"+c.Vu:c.Vu}),D=Y.ssoCallbackUrl??(0,c.aQ)({routing:Y.routing,baseUrl:E,authQueryString:L,path:Y.path,endpoint:y?"/create"+c.aB:c.aB}),B=(0,l.kZ)({base:q,hashPath:"/factor-two"},{stringify:!0}),M=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:Y.routing,baseUrl:q,authQueryString:L,path:Y.path,endpoint:(0,a.ru)(k.session?.currentTask)}):null;return{...Y,oauthFlow:Y.oauthFlow||"auto",componentName:P,signInUrl:q,signUpUrl:E,waitlistUrl:R,secondFactorUrl:B,afterSignUpUrl:w,afterSignInUrl:F,emailLinkRedirectUrl:T,ssoCallbackUrl:D,navigateAfterSignUp:()=>r(w),queryParams:U,initialValues:{...Y.initialValues,...C},authQueryString:L,isCombinedFlow:y,navigateOnSetActive:M,taskUrl:O}}}}]);
@@ -1,19 +0,0 @@
1
- import { BaseTheme, CaptchaAppearanceOptions, Elements, Layout, Variables } from "../internal/appearance.js";
2
- import { InternalTheme } from "../foundations/defaultFoundations.js";
3
-
4
- //#region src/themes/simple.d.ts
5
- declare const simple: {
6
- __type: "prebuilt_appearance";
7
- name?: string;
8
- elements?: Elements | ((params: {
9
- theme: InternalTheme;
10
- }) => Elements);
11
- theme?: (BaseTheme | BaseTheme[]) | undefined;
12
- layout?: Layout | undefined;
13
- variables?: Variables | undefined;
14
- captcha?: CaptchaAppearanceOptions | undefined;
15
- cssLayerName?: string | undefined;
16
- };
17
- //#endregion
18
- export { simple };
19
- //# sourceMappingURL=simple.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simple.d.ts","names":[],"sources":["../../src/themes/simple.ts"],"sourcesContent":[],"mappings":";;;;cAEa;;;aAIX,QAAA;IAJW,KAIX,eAAA;EAAA,CAAA,EAAA,WAAA,CAAA"}
@@ -1,11 +0,0 @@
1
- import { createTheme } from "./createTheme.js";
2
-
3
- //#region src/themes/simple.ts
4
- const simple = createTheme({
5
- name: "simple",
6
- simpleStyles: true
7
- });
8
-
9
- //#endregion
10
- export { simple };
11
- //# sourceMappingURL=simple.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simple.js","names":[],"sources":["../../src/themes/simple.ts"],"sourcesContent":["import { createTheme } from './createTheme';\n\nexport const simple = createTheme({\n name: 'simple',\n //@ts-expect-error not public api\n simpleStyles: true,\n});\n"],"mappings":";;;AAEA,MAAa,SAAS,YAAY;CAChC,MAAM;CAEN,cAAc;CACf,CAAC"}