1import{a as Te,A as z,j as e}from"./index-BCp-6lKF.js";import{h as Ie,f as qe,r as i,L as De}from"./vendor-react-CpRvMXaC.js";import"./vendor-pdf-CLXYJc0c.js";import"./vendor-ui-5rZvml82.js";import"./vendor-editor-DoAMYjM7.js";function ae(r){const l=`; ${document.cookie}`.split(`; ${r}=`);return l.length===2?l.pop().split(";").shift():null}const x=Te.create({baseURL:z.BASE_URL,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0});x.interceptors.request.use(r=>{const t=ae("XSRF-TOKEN");return t&&(r.headers["X-XSRF-TOKEN"]=decodeURIComponent(t)),r},r=>Promise.reject(r));async function se(){try{const r=await x.get("/sanctum/csrf-cookie");return r.status===204||r.status===200}catch(r){return console.error("Erro ao obter CSRF cookie:",r),!1}}const Fe="registration_session_invalid";function P(r,t){var u,o;const l=(u=r.response)==null?void 0:u.status,d=((o=r.response)==null?void 0:o.data)||{},m=l===429?"Muitas tentativas em sequência. Aguarde um momento e tente novamente.":d.message||t,c=new Error(m);return c.code=d.code,c}const p={async ensureCsrfCookie(){if(!ae("XSRF-TOKEN")&&!await se())throw new Error("Não foi possÃvel obter o token CSRF");await se()},async validateCpf(r){var t,l;try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/validar-cpf",{cpf:r.replace(/\D/g,"")})).data}catch(d){throw new Error(((l=(t=d.response)==null?void 0:t.data)==null?void 0:l.message)||"Erro ao validar CPF")}},async registerPublicUser(r){var t,l,d;try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/publico",r)).data}catch(m){const c=(t=m.response)==null?void 0:t.status,u=(d=(l=m.response)==null?void 0:l.data)==null?void 0:d.message;throw c===422?new Error("Não foi possÃvel concluir o cadastro. Revise os dados informados e tente novamente."):c===429?new Error("Muitas tentativas em sequência. Aguarde um momento e tente novamente."):!c||c>=500?new Error("Cadastro temporariamente indisponÃvel. Tente novamente em alguns instantes."):new Error(u||"Não foi possÃvel concluir o cadastro. Tente novamente.")}},async getCompleteValidationData(r){try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/dados-validacao-completa",{registration_session:r})).data}catch(t){throw P(t,"Erro ao obter dados de validação")}},async validateAllAnswers(r,t,l){try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/validar-todas-respostas",{registration_session:r,selected_name:t,answers:l})).data}catch(d){throw P(d,"Uma ou mais informações estão incorretas. Verifique os dados e tente novamente.")}},async checkEmail(r){try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/verificar-email",{registration_session:r})).data}catch(t){throw P(t,"Erro ao verificar email")}},async updateEmail(r,t){try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/atualizar-email",{registration_session:r,email:t})).data}catch(l){throw P(l,"Erro ao atualizar email")}},async sendRegistrationToken(r){try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/enviar-token",{registration_session:r})).data}catch(t){throw P(t,"Erro ao enviar link de registro")}},async validateToken(r){var t,l;try{return(await x.get(`/api/registro/validar-token/${r}`)).data}catch(d){throw new Error(((l=(t=d.response)==null?void 0:t.data)==null?void 0:l.message)||"Token inválido ou expirado")}},async completeRegistration(r,t,l){var d,m;try{return await this.ensureCsrfCookie(),(await x.post("/api/registro/completar",{token:r,password:t,password_confirmation:l})).data}catch(c){throw new Error(((m=(d=c.response)==null?void 0:d.data)==null?void 0:m.message)||"Erro ao completar registro")}}};function ze(){const{token:r}=Ie(),t=qe(),[l,d]=i.useState(r?5:1),[m,c]=i.useState(!1),[u,o]=i.useState(""),[R,q]=i.useState(""),[B,re]=i.useState("dados"),[j,X]=i.useState(!1),[N,te]=i.useState(""),[K,G]=i.useState(3),[D,oe]=i.useState(""),[H,ne]=i.useState(""),[y,ie]=i.useState(""),[W,le]=i.useState(""),[b,J]=i.useState("nao"),[F,ce]=i.useState(""),[L,de]=i.useState(""),[$,me]=i.useState(""),[w,ue]=i.useState(""),[_,ge]=i.useState(""),[fe,Q]=i.useState([]),[C,Y]=i.useState(""),[xe,Z]=i.useState([]),[h,V]=i.useState({}),[A,v]=i.useState(""),[Le,U]=i.useState(!1),[pe,O]=i.useState(!1),[T,be]=i.useState(""),[M,he]=i.useState(""),[I,ye]=i.useState(r||""),ve=s=>{const a=s.replace(/\D/g,"");return a.length<=11?a.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):s},je=s=>{const a=s.replace(/\D/g,"").slice(0,11);return a.length<=10?a.replace(/(\d{0,2})(\d{0,4})(\d{0,4})/,(n,g,f,E)=>g?f?E?`(${g}) ${f}-${E}`:`(${g}) ${f}`:`(${g}`:"").trim():a.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3").trim()},Ne=async s=>{s.preventDefault(),o(""),c(!0);try{const a=D.replace(/\D/g,"");if(a.length!==11){o("CPF deve ter 11 dÃgitos"),c(!1);return}const n=await p.validateCpf(a);if(n.success){if(n.public_registration){X(!0),d(2);return}if(q(n.registration_session),re(n.validation_mode),X(!1),O(!1),n.validation_mode==="email"){v(n.masked_email||""),U(!0),d(4);return}d(2),await Ce(n.registration_session)}else o(n.message||"Erro ao validar CPF")}catch(a){o(a.message||"Erro ao validar CPF")}finally{c(!1)}},we=async s=>{var E;s.preventDefault(),o("");const a=H.trim(),n=y.trim(),g=W.replace(/\D/g,""),f=D.replace(/\D/g,"");if(f.length!==11){o("CPF deve ter 11 dÃgitos");return}if(!a||!n||!g||!w||!_){o("Todos os campos são obrigatórios.");return}if(b==="sim"){if(!F.trim()){o("Informe a instituição de ensino.");return}if(!L.trim()){o("Informe o perÃodo.");return}}else if(!$.trim()){o("Informe a profissão.");return}if(g.length<10||g.length>11){o("Informe um telefone válido com DDD.");return}if(w!==_){o("As senhas não coincidem");return}if(w.length<8){o("A senha deve ter no mÃnimo 8 caracteres");return}c(!0);try{const S=await p.registerPublicUser({cpf:f,name:a,email:n,telefone:g,is_student:b==="sim",instituicao_ensino:b==="sim"?F.trim():null,periodo:b==="sim"?L.trim():null,profissao:b!=="sim"?$.trim():null,password:w,password_confirmation:_});if(S.success){te(((E=S.user)==null?void 0:E.email)||y),d(3);return}o(S.message||"Erro ao criar cadastro público")}
1catch(S){o(S.message||"Erro ao criar cadastro público")}finally{c(!1)}},Ce=async s=>{try{const a=await p.getCompleteValidationData(s);if(a.success){Q(a.name_options),Z(a.validation_data);const n={};a.validation_data.forEach(g=>{n[g.field]=""}),V(n)}}catch(a){k(a)}},k=(s,a)=>{(s==null?void 0:s.code)===Fe&&(q(""),Q([]),Z([]),Y(""),V({}),v(""),O(!1),d(1)),o((s==null?void 0:s.message)||a)},ke=async s=>{s.preventDefault(),o(""),c(!0);try{if(!C){o("Uma ou mais informações estão incorretas. Verifique os dados e tente novamente."),c(!1);return}if(!Object.values(h).every(f=>f!=="")){o("Uma ou mais informações estão incorretas. Verifique os dados e tente novamente."),c(!1);return}const n=Object.keys(h).map(f=>({field:f,value:h[f]})),g=await p.validateAllAnswers(R,C,n);g.success?(d(3),await Ee()):o(g.message||"Uma ou mais informações estão incorretas. Verifique os dados e tente novamente.")}catch(a){k(a,"Uma ou mais informações estão incorretas. Verifique os dados e tente novamente.")}finally{c(!1)}},Ee=async()=>{try{const s=await p.checkEmail(R);s.success&&(U(s.has_email),s.has_email&&(v(s.email),d(4)))}catch(s){k(s)}},Se=async s=>{s.preventDefault(),o(""),c(!0);try{const a=await p.updateEmail(R,A);a.success?(U(!0),d(4)):o(a.message||"Erro ao cadastrar email")}catch(a){k(a,"Erro ao cadastrar email")}finally{c(!1)}},Pe=async s=>{s.preventDefault(),o(""),c(!0);try{const a=await p.sendRegistrationToken(R);a.success?(a.email&&v(a.email),O(!0),q("")):o(a.message||"Erro ao enviar link de registro")}catch(a){k(a,"Erro ao enviar link de registro")}finally{c(!1)}},Re=async s=>{var a;if(s.preventDefault(),o(""),T!==M){o("As senhas não coincidem");return}if(T.length<8){o("A senha deve ter no mÃnimo 8 caracteres");return}c(!0);try{const n=await p.completeRegistration(I,T,M);n.success?t("/login",{state:{message:"Conta criada com sucesso! Faça login para continuar.",email:(a=n.user)==null?void 0:a.email}}):o(n.message||"Erro ao criar conta")}catch(n){o(n.message||"Erro ao criar conta")}finally{c(!1)}};i.useEffect(()=>{(async()=>{try{await p.ensureCsrfCookie()}catch(a){console.error("Erro ao obter CSRF cookie:",a)}})()},[]),i.useEffect(()=>{(async()=>{if(r&&l===5&&!I){c(!0);try{const a=await p.validateToken(r);a.success?(ye(r),v(a.email)):o("Token inválido ou expirado")}catch(a){o(a.message||"Token inválido ou expirado")}finally{c(!1)}}})()},[r,l,I]),i.useEffect(()=>{if(!(j&&l===3))return;G(3);const s=setInterval(()=>{G(n=>n>1?n-1:1)},1e3),a=setTimeout(()=>{t("/login",{state:{message:"Cadastro concluÃdo com sucesso! Faça login para continuar.",email:N||y}})},3e3);return()=>{clearInterval(s),clearTimeout(a)}},[j,l,t,N,y]);const _e=()=>{switch(l){case 1:return e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-600 mb-6",children:"Para iniciar o cadastro, informe seu CPF. Verificaremos se você está cadastrado na base de dados."}),e.jsxs("form",{onSubmit:Ne,children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CPF"}),e.jsx("input",{type:"text",value:D,onChange:s=>oe(ve(s.target.value)),placeholder:"000.000.000-00",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",maxLength:14,required:!0})]}),u&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-700",children:u}),e.jsx("button",{type:"submit",disabled:m,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Validando...":"Continuar"})]})]});case 2:return j?e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900",children:"Cadastro Público"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Não localizamos seu CPF na base de profissionais. Complete o cadastro público para criar sua conta."}),e.jsxs("form",{onSubmit:we,children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Nome completo"}),e.jsx("input",{type:"text",value:H,onChange:s=>ne(s.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),e.jsx("input",{type:"email",value:y,onChange:s=>ie(s.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Telefone"}),e.jsx("input",{type:"tel",value:W,onChange:s=>le(je(s.target.value)),placeholder:"(00) 00000-0000",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("p",{className:"block text-sm font-medium text-gray-700 mb-3",children:"à estudante de psicologia?"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"flex items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-gray-300",children:[e.jsx("input",{type:"radio",name:"is_student",value:"sim",checked:b==="sim",onChange:s=>J(s.target.value),className:"mr-3"}),"Sim"]}),e.jsxs("label",{className:"flex items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-gray-300",children:[e.jsx("input",{type:"radio",name:"is_student",value:"nao",checked:b==="nao",onChange:s=>J(s.target.value),className:"mr-3"}),"Não"]})]})]}),b==="sim"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Instituição de Ensino ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:F,onChange:s=>ce(s.target.value),placeholder:"Nome da instituição",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["PerÃodo ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:L,onChange:s=>de(s.target.value),placeholder:"Ex: 5º semestre",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]})]}),b==="nao"&&e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Profissão ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:$,onChange:s=>me(s.target.value),placeholder:"Sua profissão",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Senha"}),e.jsx("input",{type:"password",value:w,onChange:s=>ue(s.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0,minLength:8})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Confirmar Senha"}
1),e.jsx("input",{type:"password",value:_,onChange:s=>ge(s.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0,minLength:8})]}),u&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-700",children:u}),e.jsx("button",{type:"submit",disabled:m,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Criando conta...":"Criar Conta"})]})]}):e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900",children:"Confirmação de Identidade"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Selecione as informações corretas abaixo:"}),e.jsxs("form",{onSubmit:ke,children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:"Nome Completo"}),e.jsx("div",{className:"space-y-2",children:fe.map(s=>e.jsxs("label",{className:`block p-3 border-2 rounded-lg cursor-pointer transition ${C===s.id?"border-teal-500 bg-teal-50":"border-gray-200 hover:border-gray-300"}`,children:[e.jsx("input",{type:"radio",name:"name",value:s.id,checked:C===s.id,onChange:a=>Y(a.target.value),className:"mr-3"}),e.jsx("span",{className:"font-medium",children:s.masked})]},s.id))})]}),e.jsx("div",{className:"mb-6 space-y-6",children:xe.map((s,a)=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:s.label}),e.jsx("div",{className:"space-y-2",children:s.options.map((n,g)=>e.jsxs("label",{className:`block p-3 border-2 rounded-lg cursor-pointer transition ${h[s.field]===n?"border-teal-500 bg-teal-50":"border-gray-200 hover:border-gray-300"}`,children:[e.jsx("input",{type:"radio",name:`field_${s.field}`,value:n,checked:h[s.field]===n,onChange:f=>V({...h,[s.field]:f.target.value}),className:"mr-3"}),n]},g))})]},a))}),u&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-700",children:u}),e.jsx("button",{type:"submit",disabled:m||!C||Object.values(h).some(s=>!s),className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Validando...":"Continuar"})]})]});case 3:return j?e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900",children:"Cadastro ConcluÃdo"}),e.jsxs("div",{className:"mb-4 p-4 bg-green-50 border border-green-200 rounded-md text-green-700",children:[e.jsx("p",{className:"font-medium",children:"Seu cadastro foi concluÃdo com sucesso!"}),e.jsxs("p",{className:"mt-2 text-sm",children:["Você será redirecionado para a tela de login em ",K," segundo",K>1?"s":"","."]}),N&&e.jsxs("p",{className:"mt-2 text-sm",children:["Email cadastrado: ",e.jsx("strong",{children:N})]})]}),e.jsx("p",{className:"text-gray-600 text-sm",children:"Se o redirecionamento não ocorrer automaticamente, use o botão abaixo."}),e.jsx("button",{type:"button",onClick:()=>t("/login",{state:{message:"Cadastro concluÃdo com sucesso! Faça login para continuar.",email:N||y}}),className:"mt-4 w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 transition-colors",children:"Ir para Login Agora"})]}):e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900",children:"Cadastro de Email"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"à necessário cadastrar um email para receber o link de ativação da conta."}),e.jsxs("form",{onSubmit:Se,children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Email"}),e.jsx("input",{type:"email",value:A,onChange:s=>v(s.target.value),placeholder:"[email protected]",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0})]}),u&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-700",children:u}),e.jsx("button",{type:"submit",disabled:m,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent roun
1ded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Cadastrando...":"Continuar"})]})]});case 4:return e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900",children:"Envio de Link de Ativação"}),pe?e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 p-4 bg-green-50 border border-green-200 rounded-md text-green-700",children:[e.jsx("p",{className:"font-medium",children:"Link enviado com sucesso!"}),e.jsxs("p",{className:"mt-2 text-sm",children:["Enviamos um link de ativação para ",e.jsx("strong",{children:A}),". Verifique sua caixa de entrada e clique no link para definir sua senha."]})]}),e.jsx("p",{className:"text-gray-600 text-sm",children:"O link expira em 24 horas. Se não recebeu o email, verifique sua pasta de spam."})]}):e.jsxs("form",{onSubmit:Pe,children:[B==="email"&&e.jsx("p",{className:"text-gray-600 mb-4",children:"Para confirmar sua identidade, enviaremos o link de ativação para o email cadastrado no CRP-PR."}),e.jsxs("p",{className:"text-gray-600 mb-6",children:["Enviaremos um link de ativação para o email: ",e.jsx("strong",{children:A})]}),B==="email"&&e.jsx("p",{className:"text-gray-500 text-sm mb-6",children:"Não reconhece este email ou não tem mais acesso a ele? Entre em contato com o CRP-PR para atualizar seu cadastro."}),u&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-700",children:u}),e.jsx("button",{type:"submit",disabled:m,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Enviando...":"Enviar Link de Ativação"})]})]});case 5:return e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-6 text-gray-900",children:"Definir Senha"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Defina uma senha para sua conta. Ela deve ter no mÃnimo 8 caracteres."}),e.jsxs("form",{onSubmit:Re,children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Senha"}),e.jsx("input",{type:"password",value:T,onChange:s=>be(s.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0,minLength:8})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Confirmar Senha"}),e.jsx("input",{type:"password",value:M,onChange:s=>he(s.target.value),className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-teal-500 focus:border-teal-500 transition-colors text-gray-900 placeholder-gray-400",required:!0,minLength:8})]}),u&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-700",children:u}),e.jsx("button",{type:"submit",disabled:m,className:"w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-teal-600 hover:bg-teal-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Criando conta...":"Criar Conta"})]})]});default:return null}};if(r&&l===5&&!I&&m)return e.jsxs("div",{className:"min-h-screen flex",children:[e.jsx("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden min-h-screen bg-teal-700",children:e.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat bg-teal-700",style:{backgroundImage:`url(${z.BANNER_URL})`},children:e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-teal-900/80 to-teal-700/60"})})}),e.jsx("div",{className:"w-full lg:w-1/2 flex items-center justify-center bg-gradient-to-br from-gray-50 to-gray-100 p-8",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsx("div",{className:"bg-white rounded-2xl shadow-xl p-8 border border-gray-200",children:e.jsx("div",{className:"text-center",children:"Validando token..."})})})})]});const Ae=z.BANNER_URL,ee=j?3:5;return e.jsxs("div",{className:"min-h-screen flex",children:[e.jsxs("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:`url(${Ae})`},children:e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-teal-900/80 to-teal-700/60"})}),e.jsx("div",{className:"relative z-10 flex flex-col justify-center items-center text-white p-12 w-full",children:e.jsx("div",{className:"max-w-md text-center"})})]}),e.jsx("div",{className:"w-full lg:w-1/2 flex items-center justify-center bg-gradient-to-br from-gray-50 to-gray-100 p-8",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsxs("div",{className:"lg:hidden text-center mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Cadastro"}),e.jsx("p",{className:"text-gray-600",children:"Crie sua conta no sistema"})]}),e.jsxs("div",{className:"hidden lg:block text-center mb-6",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Cadastro"}),e.jsx("p",{className:"text-gray-600",children:"Crie sua conta no sistema"})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8 border border-gray-200",children:[e.jsxs("div",{className:"mb-6 text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"flex space-x-2",children:Array.from({length:ee},(s,a)=>a+1).map(s=>e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${s<=l?"bg-teal-600 text-white":"bg-gray-200 text-gray-600"}`,children:s},s))})}),e.jsxs("p",{className:"text-sm text-gray-600",children:["Etapa ",l," de ",ee]})]}),_e()]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs(De,{to:"/login",className:"inline-flex items-center text-sm font-medium text-teal-600 hover:text-teal-700 transition-colors",children:[e.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),"Voltar para login"]})})]})})]})}export{ze as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.