PageSourceSearch

https://santaritadoeste.sp.gov.br/assets/index-Cv8_lbZ2.js

js santaritadoeste.sp.gov.br collected 2026-10-02 18:38:34 UTC 15,024 bytes, 7 lines download raw bytes

1import{j as e,g as v,r as b,L as z}from"./react-core-SJCqmpBs.js";import{b0 as u,j as k}from"./index-Bafhn_VG.js";import{bj as w,ap as C,a as P,m as S,V as F,am as T,a5 as A,bn as p,bV as h,bo as f,z as E,f as R,cl as O,a4 as $,cm as M,k as B,ay as I}from"./icons-C_OAd-F2.js";import{m as d,A as y}from"./animation-9S7D5_Pu.js";import{D as L}from"./DotMap-FRRRJN9x.js";import"./radix-D7sbV9Zm.js";import"./supabase-Dr7v01qy.js";import"./dates-CW3_KQM6.js";import"./dnd-C8Pn-FyI.js";const j=[{number:1,name:"Conta"},{number:2,name:"Perfil"}],D=()=>{const{currentStep:a}=u();return e.jsx("div",{className:"flex justify-center mb-8 relative",children:e.jsx("div",{className:"flex items-center w-full max-w-xs",children:j.map((t,r)=>e.jsxs(v.Fragment,{children:[e.jsxs("div",{className:"relative flex flex-col items-center",children:[e.jsx("div",{className:`flex items-center justify-center size-9 rounded-full transition duration-300 ${t.number===a?"bg-gradient-to-r from-primary-600 to-blue-600 text-white shadow-md":t.number<a?"bg-gradient-to-r from-primary-200 to-blue-300 text-primary-700 dark:text-primary-200":"bg-zinc-200 dark:bg-muted text-zinc-500 dark:text-muted-foreground"}`,children:t.number<a?e.jsx(w,{className:"size-5"}):e.jsx("span",{className:"text-sm font-medium",children:t.number})}),e.jsx("span",{className:"absolute -bottom-6 text-xs font-medium text-zinc-500 dark:text-muted-foreground",children:t.name})]}),r<j.length-1&&e.jsx("div",{className:`flex-1 h-1 mx-2 rounded-full transition duration-300 ${t.number<a?"bg-gradient-to-r from-primary-500 to-blue-500":"bg-zinc-200 dark:bg-muted"}`})]},t.number))})})},J=({isLoading:a})=>{const{currentStep:t,totalSteps:r,goToNextStep:i,goToPreviousStep:n}=u(),o=t===r,l=t===1,s="flex items-center gap-2 rounded-lg transition duration-200 font-medium text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed",x=`${s} px-4 py-2.5 text-zinc-600 dark:text-zinc-300 hover:text-zinc-900 dark:hover:text-white hover:bg-zinc-100 dark:hover:bg-zinc-800 focus-visible:ring-zinc-400 dark:focus-visible:ring-zinc-500`,c=`${s} px-6 py-2.5 text-white shadow-lg shadow-blue-500/20 hover:shadow-blue-500/30 focus-visible:ring-blue-500 bg-gradient-to-r from-blue-600 to-violet-600 hover:from-blue-700 hover:to-violet-700 active:scale-[0.98]`;return e.jsxs("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-zinc-200 dark:border-zinc-800",role:"group","aria-label":"Navegação do formulário",children:[e.jsx("div",{className:"w-32",children:!l&&e.jsxs("button",{type:"button",onClick:n,disabled:a,className:x,"aria-label":"Voltar para a etapa anterior",children:[e.jsx(C,{className:"size-4 transition-transform group-hover:-translate-x-1"}),e.jsx("span",{children:"Voltar"})]})}),e.jsx("div",{className:"w-32 flex justify-end",children:o?e.jsx("button",{type:"submit",disabled:a,className:c,"aria-busy":a,"aria-label":a?"Processando cadastro":"Finalizar cadastro",children:a?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"size-4 animate-spin"}),e.jsx("span",{children:"Processando…"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Cadastrar"}),e.jsx(F,{className:"size-4"})]})}):e.jsxs("button",{type:"button",onClick:i,disabled:a,className:c,"aria-label":"Ir para a próxima etapa",children:[e.jsx("span",{children:"Próximo"}),e.jsx(P,{className:"size-4"})]})})]})},m=({id:a,label:t,value:r,onChange:i,icon:n,type:o="text",placeholder:l,error:s,required:x,maxLength:c,disabled:N})=>e.jsxs("div",{className:"mb-6",children:[e.jsxs("label",{htmlFor:a,className:"block text-sm font-medium text-zinc-700 dark:text-muted-foreground mb-1",children:[t,x&&e.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),e.jsxs("div",{className:"relative",children:[n&&e.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:n}),e.jsx("input",{type:o,id:a,value:r,onChange:i,maxLength:c,className:`w-full ${n?"pl-10":"pl-4"} pr-4 py-3 rounded-lg border ${s?"border-red-500":"border-zinc-300 dark:border-zinc-600"} 
2            focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:border-transparent transition-colors 
3            bg-white dark:bg-muted text-zinc-900 dark:text-white autofill:bg-transparent dark:autofill:bg-zinc-700
4            hover:border-primary-400 dark:hover:border-primary-700`,placeholder:l,required:x,disabled:N})]}),s&&e.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:s})]}),U=()=>{const{formState:a,handleInputChange:t,errors:r,isLoading:i}=u(),[n,o]=b.useState(!1),[l,s]=b.useState(!1);return e.jsxs(d.div,{initial:{opacity:0,x:20}
4,animate:{opacity:1,x:0},transition:{duration:.3},className:"space-y-4",children:[e.jsx(m,{id:"fullName",label:"Nome Completo",value:a.fullName,onChange:t,icon:e.jsx(T,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"Como deseja ser chamado?",error:r.fullName,required:!0,disabled:i}),e.jsx(m,{id:"email",type:"email",label:"Email",value:a.email,onChange:t,icon:e.jsx(A,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"[email protected]",error:r.email,required:!0,disabled:i}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(m,{id:"password",type:n?"text":"password",label:"Senha",value:a.password,onChange:t,icon:e.jsx(p,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"••••••••",error:r.password,required:!0,disabled:i}),e.jsx("button",{type:"button","aria-label":n?"Ocultar senha":"Exibir senha",className:"absolute right-3 top-[38px] text-zinc-400 hover:text-zinc-600 transition-colors",onClick:()=>o(!n),tabIndex:-1,children:n?e.jsx(h,{size:20}):e.jsx(f,{size:20})})]}),e.jsxs("div",{className:"relative",children:[e.jsx(m,{id:"confirmPassword",type:l?"text":"password",label:"Confirmar Senha",value:a.confirmPassword,onChange:t,icon:e.jsx(p,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"••••••••",error:r.confirmPassword,required:!0,disabled:i}),e.jsx("button",{type:"button","aria-label":l?"Ocultar confirmação de senha":"Exibir confirmação de senha",className:"absolute right-3 top-[38px] text-zinc-400 hover:text-zinc-600 transition-colors",onClick:()=>s(!l),tabIndex:-1,children:l?e.jsx(h,{size:20}):e.jsx(f,{size:20})})]})]}),e.jsx("p",{className:"text-xs text-zinc-500 dark:text-muted-foreground bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-100 dark:border-blue-800/30",children:"A senha deve ter pelo menos 8 caracteres, incluindo uma letra maiúscula, uma minúscula e um número."})]})},V=({id:a,label:t,value:r,onChange:i,icon:n,options:o,error:l,required:s,disabled:x})=>e.jsxs("div",{className:"mb-6",children:[e.jsxs("label",{htmlFor:a,className:"block text-sm font-medium text-zinc-700 dark:text-muted-foreground mb-1",children:[t,s&&e.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),e.jsxs("div",{className:"relative",children:[n&&e.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:n}),e.jsx("select",{id:a,value:r,onChange:i,className:`w-full ${n?"pl-10":"pl-4"} pr-4 py-3 rounded-lg border ${l?"border-red-500":"border-zinc-300 dark:border-zinc-600"} 
5            focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:border-transparent transition-colors 
6            bg-white dark:bg-muted text-zinc-900 dark:text-white
7            hover:border-primary-400 dark:hover:border-primary-700 appearance-none disabled:opacity-50 disabled:cursor-not-allowed`,required:s,disabled:x,children:o.map(c=>e.jsx("option",{value:c.value,children:c.label},c.value))}),e.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",children:e.jsx("svg",{className:"size-5 text-zinc-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})})]}),l&&e.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:l})]}),_=["AC","AL","AP","AM","BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB","PR","PE","PI","RJ","RN","RS","RO","RR","SC","SP","SE","TO"],q=[{value:"",label:"UF"},..._.map(a=>({value:a,label:a}))],G=()=>{const{formState:a,handleInputChange:t,handleCpfChange:r,handleCnpjChange:i,handlePhoneChange:n,handleAccountTypeSelect:o,errors:l,isLoading:s}=u();return e.jsxs(d.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3},className:"space-y-6",children:[e.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/10 p-4 rounded-xl border border-blue-100 dark:border-blue-800/30 text-center mb-6",children:[e.jsx("p",{className:"text-sm font-medium text-blue-800 dark:text-blue-300",children:"Sua conta foi criada com sucesso! 🎉"}),e.jsx("p",{className:"text-xs text-blue-600/80 dark:text-blue-400/80 mt-1",children:"Complete os dados abaixo para personalizar sua experiência (Opcional)."})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-sm font-medium text-zinc-700 dark:text-muted-foreground mb-3 text-center",children:"Tipo de Perfil"}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(g,{type:"PF",icon:e.jsx(E,{}),title:"Pessoa Física",isSelected:a.accountType==="PF",onSelect:o,disabled:s}),e.jsx(g,{type:"PJ",icon:e.jsx(R,{}),title:"Empresarial",isSelected:a.accountType==="PJ",onSelect:o,disabled:s})]}),l.accountType&&e.jsx("p",{className:"mt-2 text-sm text-red-500 text-center",children:l.accountType})]}),e.jsx(y,{mode:"wait",children:e.jsxs(d.div,{initial:{opacity:0,y:10}
7,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"space-y-4",children:[a.accountType&&e.jsx(m,{id:a.accountType==="PF"?"cpf":"cnpj",label:a.accountType==="PF"?"CPF":"CNPJ",value:a.accountType==="PF"?a.cpf:a.cnpj,onChange:a.accountType==="PF"?r:i,icon:e.jsx(O,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:a.accountType==="PF"?"000.000.000-00":"00.000.000/0000-00",error:a.accountType==="PF"?l.cpf:l.cnpj,maxLength:a.accountType==="PF"?14:18,disabled:s}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsx(m,{id:"phone",label:"Telefone WhatsApp",value:a.phone,onChange:n,icon:e.jsx($,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"(00) 00000-0000",error:l.phone,maxLength:15,disabled:s}),e.jsx(m,{id:"city",label:"Cidade",value:a.city,onChange:t,icon:e.jsx(M,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"Sua cidade",disabled:s})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx("div",{className:"md:col-span-2",children:e.jsx(m,{id:"address",autoComplete:"street-address",label:"Endereço",value:a.address,onChange:t,icon:e.jsx(B,{className:"size-5 text-zinc-400 dark:text-zinc-500"}),placeholder:"Rua, número, bairro",disabled:s})}),e.jsx(V,{id:"state",label:"UF",value:a.state,onChange:t,options:q,disabled:s})]})]},a.accountType)})]})},g=({type:a,icon:t,title:r,isSelected:i,onSelect:n,disabled:o})=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>n(a),className:`flex flex-col items-center justify-center p-4 rounded-xl border-2 transition duration-300 ${i?"border-blue-500 bg-blue-50/50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300":"border-zinc-100 dark:border-zinc-800 bg-white dark:bg-card text-zinc-400 hover:border-zinc-200 dark:hover:border-zinc-700"} ${o?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[e.jsx("div",{className:`p-2 rounded-full mb-2 ${i?"bg-blue-500 text-white":"bg-zinc-100 dark:bg-muted text-zinc-500 dark:text-muted-foreground"}`,children:v.cloneElement(t,{size:20})}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider",children:r})]}),W=({currentStep:a})=>{switch(a){case 1:return e.jsx(U,{});case 2:return e.jsx(G,{});default:return null}};function se(){const{currentStep:a,isLoading:t,handleSubmit:r}=u(),{siteConfig:i}=k();return e.jsx("div",{className:"min-h-screen w-full flex items-center pt-20 justify-center bg-gradient-to-br from-blue-50 to-violet-100 dark:from-zinc-950 dark:to-zinc-900 p-4",children:e.jsxs(d.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},className:"w-full max-w-6xl overflow-hidden rounded-2xl flex bg-white dark:bg-background shadow-xl",children:[e.jsxs("div",{className:"hidden lg:block w-5/12 relative overflow-hidden bg-gradient-to-br from-blue-50 to-violet-100 dark:from-zinc-900 dark:to-zinc-900 border-r border-zinc-100 dark:border-zinc-800",children:[e.jsx("div",{className:"absolute inset-0 opacity-80 dark:opacity-40",children:e.jsx(L,{})}),e.jsxs("div",{className:"relative h-full flex flex-col items-center justify-center p-12 z-10",children:[e.jsx(d.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:.3,duration:.6},className:"mb-8",children:e.jsx("div",{className:"size-16 rounded-full bg-gradient-to-br from-blue-500 to-violet-600 flex items-center justify-center shadow-lg shadow-blue-200 dark:shadow-blue-900/30",children:e.jsx(I,{className:"text-white size-8"})})}),e.jsxs("div",{className:"text-center space-y-4",children:[e.jsx(d.h2,{initial:{opacity:0}
7,animate:{opacity:1},transition:{delay:.5},className:"text-3xl font-semibold mb-2 text-center text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-violet-600 dark:from-blue-400 dark:to-violet-400 uppercase",children:i.site_name}),e.jsx(d.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.8},className:"text-sm text-center text-zinc-600 dark:text-muted-foreground max-w-xs uppercase",children:i.site_subtitle})]})]})]}),e.jsx("div",{className:"w-full lg:w-7/12 p-8 md:p-10 flex flex-col justify-center bg-white dark:bg-background overflow-y-auto max-h-[850px] scrollbar-hide",children:e.jsxs(d.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.2},children:[e.jsx("div",{className:"flex items-center justify-between mb-8",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-semibold mb-1 text-zinc-800 dark:text-white",children:"Crie sua conta"}),e.jsx("p",{className:"text-zinc-500 dark:text-muted-foreground",children:"Siga os passos para acessar o portal"})]})}),e.jsx("div",{className:"mb-12",children:e.jsx(D,{})}),e.jsxs("form",{onSubmit:r,className:"space-y-6",noValidate:!0,children:[e.jsx(y,{mode:"wait",children:e.jsx(W,{currentStep:a})}),e.jsx(J,{isLoading:t})]}),e.jsx("div",{className:"mt-10 pt-8 border-t border-zinc-100 dark:border-zinc-800/50 text-center",children:e.jsxs("p",{className:"text-zinc-500 dark:text-zinc-400 font-medium",children:["Já possui acesso?"," ",e.jsx(z,{to:"/login",className:"text-blue-600 dark:text-blue-400 font-bold hover:underline underline-offset-4 decoration-2 transition",children:"Faça login agora"})]})})]})})]})})}export{se as Register};

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.