import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{X as t,lt as n}from"./vendor-primevue-DxVRNMbC.js";import"./vendor-firebase-CdLSXhbt.js";import{A as r,Dt as i,F as a,I as o,It as s,O as c,R as l,Vt as u,Z as d,a as f,et as p,gt as m,j as h,k as g,o as _}from"./vendor-vue-core-X6q-rGJs.js";import"./vendor-other-CyG3qq8S.js";import{t as v}from"./types-DW97iHDr.js";import"./useFeatureFlags-CxRWjdi1.js";import{Tt as y}from"./api-DQLKc1Xa.js";import"./vendor-markdown-Cola12Wc.js";import"./colorUtil-Cth7eqhK.js";import{n as b}from"./vendor-i18n-B5g6Drzm.js";import"./i18n-DjV_9lZM.js";import{t as x}from"./telemetry-KciZP3tz.js";import"./vendor-reka-ui-CHPbCe4i.js";import{t as S}from"./Button-C7dWyQyS.js";import{vn as C}from"./dialogService-Cqui0UMO.js";import"./systemStatsStore-D9aNY5gT.js";import"./useErrorHandling-BFB8eSj5.js";import{t as w}from"./_plugin-vue_export-helper-fSAtQzP-.js";import"./dialogStore-CXD5Bcfy.js";import"./useCopyToClipboard-C74olorb.js";import"./vendor-tiptap-BXSIIPYY.js";import"./markdownRendererUtil-Bm7Umh6C.js";import"./useExternalLink-Cc30SNi3.js";import{n as T}from"./networkUtil-Cik4LEQX.js";import"./signInSchema-xdSDWtCH.js";import"./PasswordFields-BcC2Idys.js";import{t as E}from"./SignUpForm-CXmmLMxJ.js";import{t as D}from"./previousFullPath-BdJgskqw.js";var O={class:`flex h-full items-center justify-center p-8`},k={class:`max-w-screen p-2 lg:w-96`},A={class:`mb-8 flex flex-col gap-4`},j={class:`my-0 text-xl leading-normal font-medium`},M={class:`my-0 text-base`},N={class:`text-muted`},P={class:`text-muted`},F={class:`flex flex-col gap-6`},I={class:`mt-5 text-sm text-gray-600`},L={href:`https://www.comfy.org/terms-of-service`,target:`_blank`,class:`cursor-pointer text-blue-400 no-underline`},R={href:`/privacy-policy`,target:`_blank`,class:`cursor-pointer text-blue-400 no-underline`},z={class:`mt-2`},B={href:`https://support.comfy.org`,class:`cursor-pointer text-blue-400 no-underline`,target:`_blank`,rel:`noopener noreferrer`},V=w(l({__name:`CloudSignupView`,setup(e){let{t:l}=b(),w=_(),V=f(),H=C(),U=globalThis.isSecureContext,W=i(``),G=i(!1),K=y(),navigateToLogin=async()=>{await w.push({name:`cloud-login`,query:V.query})},onSuccess=async()=>{K.add({severity:`success`,summary:`Sign up Completed`,life:2e3});let e=D(V.query);if(e){await w.replace(e);return}await w.push({path:`/`,query:V.query})},signInWithGoogle=async()=>{W.value=``,await H.signInWithGoogle()&&await onSuccess()},signInWithGithub=async()=>{W.value=``,await H.signInWithGithub()&&await onSuccess()},signUpWithEmail=async e=>{W.value=``,await H.signUpWithEmail(e.email,e.password)&&await onSuccess()};return d(async()=>{v&&x()?.trackSignupOpened(),G.value=await T()}),(e,i)=>(p(),h(`div`,O,[c(`div`,k,[c(`div`,A,[c(`h1`,j,u(s(l)(`auth.signup.title`)),1),c(`p`,M,[c(`span`,N,u(s(l)(`auth.signup.alreadyHaveAccount`)),1),c(`span`,{class:`ml-1 cursor-pointer text-blue-500`,onClick:navigateToLogin},u(s(l)(`auth.signup.signIn`)),1)])]),s(U)?r(``,!0):(p(),g(s(n),{key:0,severity:`warn`,class:`mb-4`},{default:m(()=>[a(u(s(l)(`auth.login.insecureContextWarning`)),1)]),_:1})),G.value?(p(),g(s(n),{key:1,severity:`warn`,class:`mb-4`},{default:m(()=>[a(u(s(l)(`auth.signup.regionRestrictionChina`)),1)]),_:1})):(p(),g(E,{key:2,"auth-error":W.value,onSubmit:signUpWithEmail},null,8,[`auth-error`])),o(s(t),{align:`center`,layout:`horizontal`,class:`my-8`},{default:m(()=>[c(`span`,P,u(s(l)(`auth.login.orContinueWith`)),1)]),_:1}),c(`div`,F,[o(S,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGoogle},{default:m(()=>[i[0]||=c(`i`,{class:`pi pi-google mr-2`},null,-1),a(` `+u(s(l)(`auth.signup.signUpWithGoogle`)),1)]),_:1}),o(S,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGithub},{default:m(()=>[i[1]||=c(`i`,{class:`pi pi-github mr-2`},null,-1),a(` `+u(s(l)(`auth.signup.signUpWithGithub`)),1)]),_:1})]),c(`div`,I,[a(u(s(l)(`auth.login.termsText`))+` `,1),c(`a`,L,u(s(l)(`auth.login.termsLink`)),1),a(` `+u(s(l)(`auth.login.andText`))+` `,1),c(`a`,R,u(s(l)(`auth.login.privacyLink`)),1),i[3]||=a(`. `),c(`p`,z,[a(u(s(l)(`cloudWaitlist_questionsText`))+` `,1),c(`a`,B,u(s(l)(`cloudWaitlist_contactLink`)),1),i[2]||=a(`. `)])])])]))}}),[[`__scopeId`,`data-v-89909ff5`]]);export{V as default};
//# sourceMappingURL=CloudSignupView-DEvqGobY.js.map