import{j as e}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b.js";import{s as f,J as j,D as L,p as A,al as y,o as w,z as N,ad as k,aA as h,q as _,G as M,aG as z}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b24.js";import{u as v}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b20.js";import{a2 as I,aK as T,aL as S,k as D,I as K,aN as P,aO as R}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b11.js";import{A as $,U as B}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b143.js";import{S as F}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b144.js";import{W as O}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b19.js";import{R as U}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b145.js";import{I as W}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b106.js";import{g as E}from"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b9.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b7.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b8.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b4.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b3.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b2.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b10.js";import"./v_7_4_2_25_48461181-0d14-4d2a-b9c3-5de50369a90b6.js";const g=({text:t,id:a})=>{const{language:b}=v(),{label:r}=f(),{textAssistente:l,assistente:i,setAssistente:o,reloadText:n}=j(),{open:d}=_(),{activePerfil:c,updateActivePerfil:x}=M();B()(s=>{s.altKey&&s.key==="y"&&i.active&&n(),s.altKey&&s.key==="1"&&o("model","tradutor"),s.altKey&&s.key==="2"&&o("model","corretor_ortografico"),s.altKey&&s.key==="3"&&o("model","otimizador_texto")},[i]);const p=e.jsx("div",{className:"flex items-center gap-1 border border-[var(--terciaria)] border-solid rounded-lg p-1 cursor-pointer pulse w-fit lg:tooltip "+(r.cor_primaria?" hover:bg-[var(--terciaria)]":" hover:bg-[var(--menu-bar-item-background-active)]")+(i.model===a?" !bg-[var(--primaria)] !text-[var(--letra)]":"")+(l.split(`
`).length-1<=1&&a==="tradutor"?" before:!ml-4":"")+(l.split(`
`).length-1<=1&&a!=="tradutor"?" before:!w-28":"")+(l.split(`
`).length-1>1?" lg:tooltip-right":" lg:tooltip-top"),onClick:()=>o("model",a),"data-tip":t,children:e.jsxs("span",{children:[a==="tradutor"&&e.jsx(P,{size:20}),a==="otimizador_texto"&&e.jsx(z,{size:20}),a==="corretor_ortografico"&&e.jsx(E,{size:20})]})});return a==="tradutor"&&i.model==="tradutor"?e.jsxs("div",{className:"flex gap-2",children:[p,e.jsx("div",{className:"text-[var(--panel-header-icon)] border border-solid border-[var(--terciaria)] rounded-xl pulse",style:{zoom:"70%"},onClick:s=>d(e.jsx(F,{onSelect:m=>{x("idioma",m.label),setTimeout(()=>n(),1e3)}}),{placement:"left"},s.currentTarget,0),children:e.jsx(R,{name:"",estado:c.idioma&&c.idioma.length!==0?c.idioma:"English"})})]}):p};function ce(){const{language:t}=v(),{label:a}=f(),{assistente:b,textAssistente:r,reloadText:l,sendAssistenteMenssage:i}=j(),{assinatura:o}=L(),{open:n}=A(),{IA:d}=y(),{user:c}=w(),x=N(C=>C.activeChat?.id?.user),u=async()=>{await h("assistente_chat")||(D(r),K({type:"Success",message:t.mensagemCopiada,position:"top-right"}))},p=async()=>{await h("assistente_chat")||O.Chat("setInputText",{txt:r,id:x})},s=e.jsx("div",{className:"x1f6kntn x1fc57z9 x40yjcy",children:e.jsx("span",{dir:"auto",className:"_ao3e pr-8",children:t.digiteUmaMensagemIniciar})}),m=e.jsxs("div",{className:"x1f6kntn x1fc57z9 x40yjcy flex flex-col  gap-2",children:[e.jsx("span",{dir:"auto",className:"_ao3e font-bold",children:t.AtivarFuncionalidadesAssistenteChat}),e.jsx(I,{name:t.ativarIA,funcao:()=>n(e.jsx(k,{}))})]});return e.jsxs("div",{className:"bg-[var(--rich-text-panel-background)] flex justify-between pt-2",children:[e.jsxs("div",{className:(r.split(`
`).length-1>1?"w-[120px] flex-col":"w-[205px] flex-nowrap")+(a.cor_primaria?" text-[var(--primaria)]":" text-[var(--panel-header-icon)]")+" flex gap-2 m-auto px-[10px]",children:[e.jsx(g,{text:t.tradutor,id:"tradutor"}),e.jsx(g,{text:t.corretorOrtografico,id:"corretor_ortografico"}),e.jsx(g,{text:t.aprimoramentoTexto,id:"otimizador_texto"}),a.ia_wascript.length!==0&&e.jsx("div",{className:"flex items-center gap-1 border border-[var(--terciaria)] border-solid rounded-lg p-1 cursor-pointer pulse w-fit lg:tooltip "+(a.cor_primaria?" hover:bg-[var(--terciaria)]":" hover:bg-[var(--menu-bar-item-background-active)]"),"data-tip":"Agente IA",onClick:()=>window.open(`${a.ia_wascript}${c.estado?"/?clientePremium":""}`,"_blanck"),children:e.jsx("span",{className:"size-5",children:e.jsx(W,{color:"var(--primaria)"})})})]}),e.jsxs("div",{className:(a.cor_primaria?"text-[var(--primaria)]":"text-[var(--panel-header-icon)]")+" w-full flex gap-3 mr-4 items-center",children:[e.jsx("div",{className:"w-full flex justify-center",children:d.activeIA?r.length===0?s:e.jsxs("div",{className:"chat chat-end items-center",children:[e.jsx("div",{className:"chat-bubble text-[var(--primary-strong)]  max-h-[250px] max-w-full bg-[var(--outgoing-background)]",style:{boxShadow:"7px 5px 4px #0000001c"},children:e.jsxs("div",{className:"overflow-y-auto overflow-x-hidden w-full h-full p-[2px] max-h-[140px]",children:[o.active&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:e.jsxs("strong",{className:"italic text-sm",children:[o.name,":"]})}),e.jsx("br",{})]}),e.jsx("span",{className:"text-sm",dangerouslySetInnerHTML:{__html:r.replace(/\*\_(.*?)\_\*/g,'<strong class="italic">$1</strong>').replace(/\_(.*?)\_/g,'<i class="italic">$1</i>').replace(/\*(.*?)\*/g,"<strong>$1</strong>").replace(/\n/g,"<br>")},style:{overflowWrap:"break-word"}})]})}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"cursor-pointer lg:tooltip pulse lg:tooltip-top","data-tip":t.copiarMensagem,onClick:u,children:e.jsx(T,{size:20})}),e.jsx("span",{className:"cursor-pointer lg:tooltip pulse lg:tooltip-top","data-tip":t.inserirMensagemEditor,onClick:p,children:e.jsx(U,{size:23})})]})]}):m}),r.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"cursor-pointer lg:tooltip pulse lg:tooltip-left","data-tip":t.gerarMensagem,onClick:l,children:e.jsx(S,{size:24})}),e.jsx("span",{"data-icon":"send",className:"m-auto pulse cursor-pointer lg:tooltip","data-tip":t.enviar,onClick:i,children:e.jsx("svg",{viewBox:"0 0 24 24",height:"24",width:"24",preserveAspectRatio:"xMidYMid meet",version:"1.1",x:"0px",y:"0px",enableBackground:"new 0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M1.101,21.757L23.8,12.028L1.101,2.3l0.011,7.912l13.623,1.816L1.112,13.845 L1.101,21.757z"})})})]}),e.jsx("span",{className:"!absolute right-1 top-1 lg:tooltip lg:tooltip-left pulse cursor-pointer","data-tip":t.teclasDeAtalho,onClick:()=>n(e.jsx($,{})),children:e.jsx("svg",{viewBox:"0 0 24 24",height:"24",width:"24",preserveAspectRatio:"xMidYMid meet",version:"1.1",children:e.jsx("path",{fill:"currentColor",d:"M 10.851562 12.648438 L 13.148438 12.648438 L 12 9 Z M 20 8.691406 L 20 6 C 20 4.898438 19.101562 4 18 4 L 15.308594 4 L 13.410156 2.101562 C 12.628906 1.320312 11.359375 1.320312 10.582031 2.101562 L 8.691406 4 L 6 4 C 4.898438 4 4 4.898438 4 6 L 4 8.691406 L 2.101562 10.589844 C 1.320312 11.371094 1.320312 12.640625 2.101562 13.421875 L 4 15.320312 L 4 18 C 4 19.101562 4.898438 20 6 20 L 8.691406 20 L 10.589844 21.898438 C 11.371094 22.679688 12.640625 22.679688 13.421875 21.898438 L 15.320312 20 L 18 20 C 19.101562 20 20 19.101562 20 18 L 20 15.308594 L 21.898438 13.410156 C 22.679688 12.628906 22.679688 11.359375 21.898438 10.578125 Z M 14.089844 15.398438 L 13.601562 14 L 10.398438 14 L 9.910156 15.398438 C 9.78125 15.761719 9.449219 16 9.070312 16 C 8.449219 16 8.019531 15.390625 8.230469 14.808594 L 10.671875 7.949219 C 10.871094 7.378906 11.398438 7 12 7 C 12.601562 7 13.128906 7.378906 13.339844 7.941406 L 15.78125 14.800781 C 15.988281 15.378906 15.558594 15.988281 14.941406 15.988281 C 14.550781 16 14.21875 15.761719 14.089844 15.398438 Z M 14.089844 15.398438 "})})})]})]})}export{ce as default};
