1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2303],{23618:(e,t,a)=>{a.d(t,{$:()=>n});var s=a(37816),r=a(80073),l=a(71220),o=a(38067);function n(e){let{onClick:t,isLoading:a=!1,disabled:n=!1,variant:i="outline",size:d="default",className:c,children:m="Tentar novamente",showIcon:x=!0}=e;return(0,s.jsxs)(r.$,{onClick:t,disabled:n||a,variant:i,size:d,className:(0,o.cn)("gap-2",a&&"opacity-50 cursor-not-allowed",c),children:[x&&(0,s.jsx)(l.A,{className:(0,o.cn)("h-4 w-4",a&&"animate-spin")}),m]})}},52303:(e,t,a)=>{a.d(t,{X:()=>v});var s=a(37816),r=a(23796),l=a(80073),o=a(10846),n=a(83307),i=a(25077),d=a(67598),c=a(68211),m=a(64552),x=a(76121),u=a(60824),p=a(58033);function h(e){let{humanizedText:t,originalText:a}=e,[o,d]=(0,r.useState)(!1),{toast:h}=(0,i.dj)(),g=async()=>{try{await navigator.clipboard.writeText(t),d(!0),setTimeout(()=>d(!1),2e3),h({title:"Texto copiado!",description:"O texto humanizado foi copiado para a \xe1rea de transfer\xeancia."})}catch(e){console.error("Failed to copy:",e),h({variant:"destructive",title:"Erro ao copiar",description:"N\xe3o foi poss\xedvel copiar o texto."})}};return(0,s.jsxs)(u.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6 text-left",children:[(0,s.jsxs)(c.Zp,{className:"border-2 border-violet-200 dark:border-violet-800 bg-gradient-to-br from-violet-50/50 to-purple-50/50 dark:from-violet-950/20 dark:to-purple-950/20",children:[(0,s.jsx)(c.aR,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"p-2 bg-violet-500/10 rounded-lg",children:(0,s.jsx)(n.A,{className:"h-6 w-6 text-violet-500"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.ZB,{className:"text-2xl",children:"Texto Humanizado"}),(0,s.jsx)(c.BT,{children:"Seu texto foi processado e humanizado com sucesso"})]})]}),(0,s.jsx)(l.$,{onClick:g,variant:"outline",size:"sm",children:o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.A,{className:"mr-2 h-4 w-4"}),"Copiado!"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.A,{className:"mr-2 h-4 w-4"}),"Copiar"]})})]})}),(0,s.jsxs)(c.Wu,{className:"space-y-4",children:[(0,s.jsx)("div",{className:"p-4 bg-white dark:bg-gray-900 rounded-lg border border-violet-200 dark:border-violet-800",children:(0,s.jsx)("p",{className:"whitespace-pre-wrap leading-relaxed text-foreground",children:t})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"text-center p-3 bg-muted rounded-lg",children:[(0,s.jsx)("div",{className:"text-2xl font-bold",children:a.length}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Caracteres originais"})]}),(0,s.jsxs)("div",{className:"text-center p-3 bg-muted rounded-lg",children:[(0,s.jsx)("div",{className:"text-2xl font-bold",children:t.length}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Caracteres humanizados"})]})]})]})]}),(0,s.jsx)(c.Zp,{children:(0,s.jsx)(c.Wu,{className:"pt-6",children:(0,s.jsxs)(p.nD,{type:"single",collapsible:!0,className:"w-full",children:[(0,s.jsxs)(p.As,{value:"original",children:[(0,s.jsx)(p.$m,{children:(0,s.jsx)("span",{className:"text-sm font-medium",children:"Ver Texto Original"})}),(0,s.jsx)(p.ub,{children:(0,s.jsx)("div",{className:"p-4 bg-muted/50 rounded-lg mt-2",children:(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground leading-relaxed",children:a})})})]}),(0,s.jsxs)(p.As,{value:"tips",children:[(0,s.jsx)(p.$m,{children:(0,s.jsx)("span",{className:"text-sm font-medium",children:"Dicas de Uso"})}),(0,s.jsx)(p.ub,{children:(0,s.jsxs)("div",{className:"space-y-3 mt-2",children:[(0,s.jsx)("div",{className:"p-3 bg-blue-50 dark:bg-blue-900/10 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,s.jsxs)("p",{className:"text-sm text-blue-900 dark:text-blue-100",children:[(0,s.jsx)("strong",{children:"â Revise o texto:"})," Embora o texto tenha sido humanizado, sempre revise o conte\xfado para garantir que mant\xe9m o sentido desejado."]})}),(0,s.jsx)("div",{className:"p-3 bg-green-50 dark:bg-green-900/10 rounded-lg border border-green-200 dark:border-green-800",children:(0,s.jsxs)("p",{className:"text-sm text-green-900 dark:text-green-100",children:[(0,s.jsx)("strong",{children:"â Personalize:"})," Adicione seu toque pessoal ao texto humanizado para torn\xe1-lo ainda mais aut\xeantico."]})}),(0,s.jsx)("div",{className:"p-3 bg-purple-50 dark:bg-purple-900/10 rounded-lg border border-purple-200 dark:border-purple-800",children:(0,s.jsxs)("p",{className:"text-sm text-purple-900 dark:text-purple-100",children:[(0,s.jsx)("strong",{children:"â Detecte novamente:"})," Voc\xea pode usar o Detector de IA novamente para verificar o resultado da humaniza\xe7\xe3o."]})})]})})]})]})})})]})}var g=a(4470),f=a(14041),b=a(82247),j=a(23618);let N={401:"Fa\xe7a login para humanizar textos.",403:"A humaniza\xe7\xe3o de textos \xe9 exclusiva do plano Premium.",409:"Aguarde a humaniza\xe7\xe3o atual terminar antes de iniciar outra.",429:"Muitas solicita\xe7\xf5es. Aguarde um pouco e tente novamente.",502:"O servi\xe7o est\xe1 inst\xe1vel no momento. Tente novamente.",504:"O processamento demorou demais. Tente novamente."};function v(e){let{text:t,isPremium:a,aiProbability:c,onHumanizeComplete:m,disabled:x}=e,[u,p]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),[w,z]=(0,r.useState)(null),[_,A]=(0,r.useState)(!1),{toast:C}=(0,i.dj)(),k=async()=>{p(!0),z(null),y(null),(0,g.R)("humanize_text_clicked",{plan_type:a?"premium":"free",text_length:t.length,ai_probability:c||0});let e=new AbortController,s=setTimeout(()=>e.abort(),115e3);try{var r,l;let a=await fetch("/api/humanizar",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({text:t,mode:"default"}),signal:e.signal}),s=null!=(l=null==(r=a.headers.get("X-Request-ID"))?void 0:r.slice(0,8))?l:null,o=await a.text(),n=null;try{n=o?JSON.parse(o):null}catch(e){n=null}if(!a.ok){let e="string"==typeof(null==n?void 0:n.message)&&n.message||N[a.status]||"Erro ao humanizar o texto. Tente novamente.";throw(0,g.R)("humanize_text_error",{status:a.status,text_length:t.length}),Error(s?"".concat(e," (c\xf3digo de suporte: ").concat(s,")"):e)}if("string"!=typeof(null==n?void 0:n.humanizedText)||!n.humanizedText.trim())throw(0,g.R)("humanize_text_error",{status:200,text_length:t.length}
1),Error(s?"Resposta incompleta do servidor. Tente novamente. (c\xf3digo de suporte: ".concat(s,")"):"Resposta incompleta do servidor. Tente novamente.");y({humanizedText:n.humanizedText}),(0,g.R)("humanize_text_completed",{text_length:t.length,humanized_length:n.humanizedText.length}),C({title:"Texto humanizado!",description:"Seu texto foi humanizado com sucesso."}),m&&m()}catch(s){let e="object"==typeof s&&null!==s&&"AbortError"===s.name,a=e?"O processamento demorou demais e foi cancelado. Tente novamente.":s instanceof Error?s.message:"Erro desconhecido ao humanizar o texto";e&&(0,g.R)("humanize_text_error",{status:0,text_length:t.length}),console.error("Humanization error:",a),z(a),C({variant:"destructive",title:"Erro ao humanizar",description:a})}finally{clearTimeout(s),p(!1)}};return(0,s.jsxs)("div",{className:"space-y-6",children:[!v&&(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(l.$,{onClick:()=>{if(!a){A(!0),(0,g.R)("humanize_upgrade_modal_shown",{text_length:t.length,ai_probability:c||0});return}k()},disabled:u||x,size:"lg",className:"bg-gradient-to-r from-violet-500 to-purple-500 hover:from-violet-600 hover:to-purple-600",children:u?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Humanizando texto..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.A,{className:"mr-2 h-4 w-4"}),"Humanizar Texto"]})})}),w&&(0,s.jsxs)(f.Fc,{variant:"destructive",children:[(0,s.jsx)(b.A,{className:"h-4 w-4"}),(0,s.jsx)(f.XL,{children:"Erro ao Humanizar"}),(0,s.jsxs)(f.TN,{className:"space-y-3",children:[(0,s.jsx)("p",{children:w}),(0,s.jsx)(j.$,{onClick:()=>{z(null),k()},isLoading:u,size:"sm",variant:"outline",className:"border-destructive/30 hover:bg-destructive/10"})]})]}),v&&(0,s.jsx)(h,{humanizedText:v.humanizedText,originalText:t}),(0,s.jsx)(d.q,{isOpen:_,onClose:()=>A(!1),featureName:"Humaniza\xe7\xe3o de Textos"})]})}},58033:(e,t,a)=>{a.d(t,{$m:()=>c,As:()=>d,nD:()=>i,ub:()=>m});var s=a(37816),r=a(23796),l=a(81800),o=a(45806),n=a(38067);let i=l.bL,d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.q7,{ref:t,className:(0,n.cn)("border-b",a),...r})});d.displayName="AccordionItem";let c=r.forwardRef((e,t)=>{let{className:a,children:r,...i}=e;return(0,s.jsx)(l.Y9,{className:"flex",children:(0,s.jsxs)(l.l9,{ref:t,className:(0,n.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...i,children:[r,(0,s.jsx)(o.A,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});c.displayName=l.l9.displayName;let m=r.forwardRef((e,t)=>{let{className:a,children:r,...o}=e;return(0,s.jsx)(l.UC,{ref:t,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:(0,s.jsx)("div",{className:(0,n.cn)("pb-4 pt-0",a),children:r})})});m.displayName=l.UC.displayName},67598:(e,t,a)=>{a.d(t,{q:()=>N});var s=a(37816),r=a(74345),l=a(80073),o=a(36285),n=a(35997),i=a(61419),d=a(72125),c=a(23371),m=a(83307),x=a(78423),u=a(13945),p=a(60824),h=a(69384),g=a.n(h),f=a(4470),b=a(68232);let j=[{icon:o.A,title:"Estatisticas de Erros",description:"Categorias detalhadas dos seus erros",color:"text-amber-500",bgColor:"bg-amber-500/10"},{icon:n.A,title:"Dicas Personalizadas",description:"Feedback especifico para o seu texto",color:"text-purple-500",bgColor:"bg-purple-500/10"},{icon:i.A,title:"Sugestoes de Melhoria",description:"O que, por que e como melhorar",color:"text-blue-500",bgColor:"bg-blue-500/10"},{icon:d.A,title:"Analise de Estilo",description:"Clareza, coesao e fluidez",color:"text-green-500",bgColor:"bg-green-500/10"}];function N(e){let{isOpen:t,onClose:a,featureName:o="Analises Avancadas"}=e;return(0,s.jsx)(r.lG,{open:t,onOpenChange:a,children:(0,s.jsxs)(r.Cf,{className:"sm:max-w-[520px]",children:[(0,s.jsxs)(r.c7,{className:"text-center sm:text-center",children:[(0,s.jsxs)(p.P.div,{className:"mx-auto mb-4 relative",initial:{scale:.8,opacity:0}
1,animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:400,damping:20},children:[(0,s.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-amber-400/20 to-amber-600/20 border border-amber-500/30",children:(0,s.jsx)(c.A,{className:"h-10 w-10 text-amber-500"})}),(0,s.jsx)(p.P.div,{className:"absolute -top-1 -right-1",animate:{rotate:360},transition:{duration:4,repeat:1/0,ease:"linear"},children:(0,s.jsx)(m.A,{className:"h-5 w-5 text-amber-400"})}),(0,s.jsx)(p.P.div,{className:"absolute -bottom-1 -left-1",animate:{rotate:-360},transition:{duration:3,repeat:1/0,ease:"linear"},children:(0,s.jsx)(x.A,{className:"h-4 w-4 text-amber-300"})})]}),(0,s.jsxs)(r.L3,{className:"text-2xl bg-gradient-to-r from-amber-500 to-amber-600 bg-clip-text text-transparent",children:["Desbloqueie ",o]}),(0,s.jsx)(r.rr,{className:"text-base pt-2",children:"Acesse recursos exclusivos que vao transformar a qualidade dos seus textos."})]}),(0,s.jsx)("div",{className:"my-6 grid grid-cols-2 gap-3",children:j.map((e,t)=>(0,s.jsxs)(p.P.div,{className:"flex flex-col items-center gap-2 p-4 rounded-xl border bg-card text-center",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1*t},whileHover:{scale:1.02,y:-2},children:[(0,s.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full ".concat(e.bgColor),children:(0,s.jsx)(e.icon,{className:"h-6 w-6 ".concat(e.color)})}),(0,s.jsx)("h4",{className:"font-semibold text-sm",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground leading-tight",children:e.description})]},t))}),(0,s.jsxs)(p.P.div,{className:"text-center py-4 px-6 rounded-xl bg-gradient-to-r from-primary/5 to-primary/10 border border-primary/20",initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.4},children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Por apenas"}),(0,b.l7)()?(0,s.jsxs)("p",{className:"text-3xl font-bold text-primary",children:[(0,s.jsx)("span",{className:"text-lg line-through text-muted-foreground/70 mr-1",children:"R$ 29,90"}),"R$ ",b.h4.MONTHLY_PRICE.toFixed(2).replace(".",","),(0,s.jsx)("span",{className:"text-base font-normal text-muted-foreground",children:"/mes"})]}):(0,s.jsxs)("p",{className:"text-3xl font-bold text-primary",children:["R$ 29,90",(0,s.jsx)("span",{className:"text-base font-normal text-muted-foreground",children:"/mes"})]}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-2 text-xs text-muted-foreground",children:[(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 text-green-500"}),(0,s.jsx)("span",{children:"Cancele quando quiser"})]})]}),(0,s.jsxs)(r.Es,{className:"flex flex-col gap-2 sm:flex-col pt-2",children:[(0,s.jsx)(l.$,{asChild:!0,className:"w-full bg-gradient-to-r from-amber-500 to-amber-600 hover:from-amber-600 hover:to-amber-700 text-white h-12 text-base font-semibold shadow-lg shadow-amber-500/20",onClick:()=>{(0,f.R)("premium_upsell_modal_upgrade",{feature_name:o,location:"premium_feature_upsell_modal"}),a()},children:(0,s.jsxs)(g(),{href:"/premium",className:"flex items-center justify-center gap-2",children:[(0,s.jsx)(c.A,{className:"h-5 w-5"}),"Assinar Premium Agora"]})}),(0,s.jsx)(l.$,{variant:"ghost",onClick:()=>{(0,f.R)("premium_upsell_modal_dismiss",{feature_name:o}),a()},className:"w-full h-10 text-muted-foreground hover:text-foreground",children:"Talvez Depois"})]})]})})}},74345:(e,t,a)=>{a.d(t,{Cf:()=>m,Es:()=>u,L3:()=>p,c7:()=>x,lG:()=>i,rr:()=>h});var s=a(37816),r=a(23796),l=a(89365),o=a(77700),n=a(38067);let i=l.bL;l.l9;let d=l.ZL;l.bm;let c=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.hJ,{ref:t,className:(0,n.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...r})});c.displayName=l.hJ.displayName;let m=r.forwardRef((e,t)=>{let{className:a,children:r,...i}=e;return(0,s.jsxs)(d,{children:[(0,s.jsx)(c,{}),(0,s.jsxs)(l.UC,{ref:t,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...i,children:[r,(0,s.jsxs)(l.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,s.jsx)(o.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});m.displayName=l.UC.displayName;let x=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};x.displayName="DialogHeader";let u=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};u.displayName="DialogFooter";let p=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.hE,{ref:t,className:(0,n.cn)("text-lg font-semibold leading-none tracking-tight",a),...r})});p.displayName=l.hE.displayName;let h=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.VY,{ref:t,className:(0,n.cn)("text-sm text-muted-foreground",a),...r})});h.displayName=l.VY.displayName}}]);
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.