module.exports=[70406,(e,t,a)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},88712,(e,t,a)=>{t.exports=e.x("nodemailer",()=>require("nodemailer"))},96294,e=>{"use strict";var t=e.i(26747),a=e.i(90406),i=e.i(44898),o=e.i(62950),r=e.i(88712);async function s(e,t){if("POST"!==e.method)return t.status(405).end();console.log("🔍 EMAIL_USER:",process.env.EMAIL_USER?"CONFIGURADO ✅":"FALTA ❌"),console.log("🔍 EMAIL_PASS:",process.env.EMAIL_PASS?"CONFIGURADO ✅":"FALTA ❌");let{enterpriseName:a,names:i,email:o,phone:s,message:n}=e.body,l=r.default.createTransport({service:"Gmail",auth:{user:process.env.EMAIL_USER,pass:process.env.EMAIL_PASS}});try{let e=await l.sendMail({from:process.env.EMAIL_USER,replyTo:o,to:process.env.EMAIL_USER,subject:`🔔 Nuevo Cliente Potencial - ${a}`,html:`
        <!DOCTYPE html>
        <html>
          <head>
            <meta charset="utf-8">
            <style>
              body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; margin: 0; padding: 0; background-color: #f4f4f4; }
              .container { max-width: 600px; margin: 20px auto; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
              .logo-section { background: white; padding: 20px; text-align: center; border-bottom: 3px solid #575151; }
              .logo-section img { max-width: 150px; height: auto; }
              .header { background: linear-gradient(135deg, #F2F2D0 0%, #F2F2D0 100%); color: #575151; padding: 30px; text-align: center; }
              .header h1 { margin: 0; font-size: 24px; }
              .content { background: #f9f9f9; padding: 30px; }
              .field { background: white; margin: 15px 0; padding: 15px; border-radius: 8px; border-left: 4px solid #575151; }
              .field-label { color: #FF8112; font-weight: bold; font-size: 12px; text-transform: uppercase; margin-bottom: 5px; }
              .field-value { color: #333; font-size: 16px; word-break: break-word; }
              .message-box { background: white; padding: 20px; border-radius: 8px; margin-top: 15px; border: 2px solid #575151; }
              .footer { text-align: center; padding: 20px; background: #333; color: white; }
              .footer a { color: #FAF5E8; text-decoration: none; }
              .badge { display: inline-block; background: #4CAF50; color: white; padding: 5px 15px; border-radius: 20px; font-size: 12px; margin-top: 10px; }
            </style>
          </head>
          <body>
            <div class="container">
              <div class="logo-section">
                <img src="https://www.kataalpaca.com/en/img/logo/logo-kata-alpaca.png" alt="KATA ALPACA Logo">
              </div>
              
              <div class="header">
                <h1>🎉 \xa1Nuevo Cliente Potencial!</h1>
                <div class="badge">FORMULARIO DE CONTACTO</div>
              </div>
              
              <div class="content">
                <div class="field">
                  <div class="field-label">🏢 Empresa</div>
                  <div class="field-value">${a}</div>
                </div>
                
                <div class="field">
                  <div class="field-label">👤 Nombre Completo</div>
                  <div class="field-value">${i}</div>
                </div>
                
                <div class="field">
                  <div class="field-label">📧 Email</div>
                  <div class="field-value"><a href="mailto:${o}" style="color: #575151; text-decoration: none;">${o}</a></div>
                </div>
                
                <div class="field">
                  <div class="field-label">📱 Celular</div>
                  <div class="field-value"><a href="tel:${s}" style="color: #575151; text-decoration: none;">${s}</a></div>
                </div>
                
                <div class="message-box">
                  <div class="field-label">💬 Mensaje</div>
                  <div class="field-value" style="margin-top: 10px; white-space: pre-wrap;">${n}</div>
                </div>
                
                <div style="text-align: center; margin-top: 20px; padding: 15px; background: white; border-radius: 8px;">
                  <p style="color: #666; font-size: 12px; margin: 5px 0;">Recibido el ${new Date().toLocaleString("es-PE",{dateStyle:"full",timeStyle:"short"})}</p>
                </div>
              </div>
              
              <div class="footer">
                <p style="margin: 5px 0;"><strong>KATA ALPACA</strong></p>
                <p style="margin: 5px 0; font-size: 12px;">Este mensaje fue enviado desde el formulario de contacto</p>
                <p style="margin: 5px 0; font-size: 12px;">
                  <a href="mailto:${process.env.EMAIL_USER}">${process.env.EMAIL_USER}</a>
                </p>
              </div>
            </div>
          </body>
        </html>
      `,text:`
        KATA ALPACA - NUEVO CLIENTE POTENCIAL
        
        Empresa: ${a}
        Nombre: ${i}
        Email: ${o}
        Celular: ${s}
        
        Mensaje:
        ${n}
        
        Recibido el ${new Date().toLocaleString("es-PE")}
      `});return console.log("✅ Correo enviado exitosamente:",e.messageId),t.status(200).json({success:!0,messageId:e.messageId,debug:"Correo enviado correctamente"})}catch(e){return console.error("❌ Error al enviar correo:",e),t.status(500).json({error:"Error al enviar el correo",details:{message:e.message,code:e.code,command:e.command,response:e.response,responseCode:e.responseCode}})}}e.s(["default",()=>s],72160);var n=e.i(72160),l=e.i(7031),d=e.i(81927),p=e.i(46432);let c=(0,o.hoist)(n,"default"),u=(0,o.hoist)(n,"config"),v=new i.PagesAPIRouteModule({definition:{kind:a.RouteKind.PAGES_API,page:"/api/contacto",pathname:"/api/contacto",bundlePath:"",filename:""},userland:n,distDir:".next",relativeProjectDir:""});async function g(e,a,i){v.isDev&&(0,p.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let o="/api/contacto";o=o.replace(/\/index$/,"")||"/";let r=await v.prepare(e,a,{srcPage:o});if(!r){a.statusCode=400,a.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve());return}let{query:s,params:n,prerenderManifest:c,routerServerContext:u}=r;try{let t=e.method||"GET",i=(0,l.getTracer)(),r=i.getActiveScopeSpan(),p=v.instrumentationOnRequestError.bind(v),g=async r=>v.render(e,a,{query:{...s,...n},params:n,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:c.preview,propagateError:!1,dev:v.isDev,page:"/api/contacto",internalRevalidate:null==u?void 0:u.revalidate,onError:(...t)=>p(e,...t)}).finally(()=>{if(!r)return;r.setAttributes({"http.status_code":a.statusCode,"next.rsc":!1});let e=i.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=e.get("next.route");if(s){let e=`${t} ${s}`;r.setAttributes({"next.route":s,"http.route":s,"next.span_name":e}),r.updateName(e)}else r.updateName(`${t} ${o}`)});r?await g(r):await i.withPropagatedContext(e.headers,()=>i.trace(d.BaseServerSpan.handleRequest,{spanName:`${t} ${o}`,kind:l.SpanKind.SERVER,attributes:{"http.method":t,"http.target":e.url}},g))}catch(e){if(v.isDev)throw e;(0,t.sendError)(a,500,"Internal Server Error")}finally{null==i.waitUntil||i.waitUntil.call(i,Promise.resolve())}}e.s(["config",0,u,"default",0,c,"handler",()=>g],96294)}];

//# sourceMappingURL=%5Broot-of-the-server%5D__ee6cd1d6._.js.map