PageSourceSearch

https://ai.trintaporcento.com.br/assets/home-mZVlO-vy.js

js trintaporcento.com.br collected 2026-10-06 04:44:59 UTC 7,065 bytes, 1 lines download raw bytes

1import{d as k,e as w,r,s as h,j as e,B as R,A as C,L as E}from"./index-CIcepXs3.js";import{C as I}from"./check-LnQV-QYE.js";import{S as T}from"./shield-check-BiY0h1H8.js";import{Z as _}from"./zap-DcCkoyOL.js";const z=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],P=k("arrow-right",z),O=["AC","AL","AM","AP","BA","CE","DF","ES","GO","MA","MG","MS","MT","PA","PB","PE","PI","PR","RJ","RN","RO","RR","RS","SC","SE","SP","TO"];function G(){const{user:a,isAdmin:b,allowedAreas:d}=w(),[n,c]=r.useState(null),[m,N]=r.useState(!0),[x,u]=r.useState(!1),[o,p]=r.useState(""),[i,g]=r.useState(""),[l,f]=r.useState([]);r.useEffect(()=>{a&&h.from("profiles").select("full_name, company, operation_states").eq("id",a.id).single().then(({data:s})=>{s&&(c(s),p(s.full_name??""),g(s.company??""),f(s.operation_states??[])),N(!1)})},[a]);const j=!m&&(!n?.full_name||!n?.company);function y(s){f(t=>t.includes(s)?t.filter(A=>A!==s):[...t,s])}async function v(){!a||!o.trim()||!i.trim()||(u(!0),await h.from("profiles").update({full_name:o.trim(),company:i.trim(),operation_states:l}).eq("id",a.id),c({full_name:o.trim(),company:i.trim(),operation_states:l}),u(!1))}if(m)return e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Carregando…"});if(j)return e.jsx("div",{className:"flex h-full flex-col overflow-y-auto",children:e.jsxs("div",{className:"mx-auto w-full max-w-lg px-6 py-12 lg:py-20",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("img",{src:"/logo-trintai.png",alt:"TRINT.AI",className:"mx-auto mb-6 h-96 w-auto"}),e.jsx("h1",{className:"text-2xl font-bold tracking-tight text-foreground",children:"Bem-vindo ao TRINT.AI!"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Para personalizar suas respostas, preencha algumas informações sobre você e sua empresa."})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:"Seu nome"}),e.jsx("input",{type:"text",value:o,onChange:s=>p(s.target.value),placeholder:"Ex: Gustavo Oliveira",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:"Empresa"}),e.jsx("input",{type:"text",value:i,onChange:s=>g(s.target.value),placeholder:"Ex: Grupo Trinta Contabilidade",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:"Estados onde a empresa opera"}),e.jsx("p",{className:"mb-2 text-xs text-muted-foreground",children:"Selecione os estados para receber respostas contextualizadas à legislação local."}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:O.map(s=>{const t=l.includes(s);return e.jsxs("button",{type:"button",onClick:()=>y(s),className:`inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary/10 text-primary":"border-input bg-background text-muted-foreground hover:border-primary/40"}`,children:[t&&e.jsx(I,{className:"size-3"}),s]},s)})})]}),e.jsx("button",{onClick:v,disabled:!o.trim()||!i.trim()||x,className:"mt-4 w-full rounded-md bg-primary px-4 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:x?"Salvando…":"Começar a usar o TRINT.AI"})]})]})});const S=n?.full_name?.split(" ")[0]??"você";return e.jsx("div",{className:"flex h-full flex-col overflow-y-auto",children:e.jsxs("div",{className:"mx-auto w-full max-w-3xl px-6 py-6 lg:py-10",children:[e.jsxs("div",{className:"mb-10 text-center",children:[e.jsx("img",{src:"/logo-trintai-home.png",alt:"TRINTA AI",className:"mx-auto mb-8 h-[120px] w-auto"}),e.jsxs("h1",{className:"text-2xl font-bold tracking-tight text-foreground lg:text-3xl",children:["Olá, ",S,"!"]}),e.jsx("p",{className:"mt-3 text-base text-muted-foreground lg:text-lg",children:"O TRINT.AI é o seu assistente legislativo inteligente. Faça perguntas sobre contabilidade, tributos e legislação — e receba respostas práticas, baseadas em documentos reais da sua área de atuação."})]}),e.jsxs("div",{className:"mb-12 grid gap-4 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-5 text-center",children:[e.jsx(T,{className:"mx-auto mb-3 size-8 text-primary"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Base confiável"}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Respostas geradas a partir de decretos, leis e normas oficiais carregados na plataforma."})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-5 text-center",children:[e.jsx(_,{className:"mx-auto mb-3 size-8 text-primary"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Respostas rápidas"}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Economize horas de pesquisa. A IA encontra e resume os trechos relevantes para sua dúvida."})]}),e.jsxs("div",{className:"rounded-lg border bg-card p-5 text-center",children:[e.jsx(R,{className:"mx-auto mb-3 size-8 text-primary"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Contexto prático"}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Explicações adaptadas à realidade do seu negócio, com exemplos e referências de artigos."})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"mb-4 text-center text-sm font-semibold uppercase tracking-widest text-muted-foreground",children:"Escolha uma área para começar"}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:C.filter(s=>b||d.length===0||d.includes(s.slug)).map(s=>{const t=s.icon;return e.jsxs(E,{to:"/chat/$area",params:{area:s.slug}
1,className:"group flex items-center gap-4 rounded-lg border bg-card p-4 transition-colors hover:border-primary/40 hover:bg-accent",children:[e.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",children:e.jsx(t,{className:"size-5"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),e.jsx("div",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:s.description})]}),e.jsx(P,{className:"size-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]},s.slug)})})]}),e.jsx("p",{className:"mt-10 text-center text-[11px] text-muted-foreground",children:"Não substitui parecer jurídico ou decisão formal do profissional responsável."})]})})}export{G as component};

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.