PageSourceSearch

https://energia-limpia.up.railway.app/_next/static/chunks/182-e4c31c3404fb0f60.js

js energia-limpia.up.railway.app collected 2026-10-03 12:12:37 UTC 13,615 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{6595:function(e,t,a){a.d(t,{ZP:function(){return w}});class r{constructor(e=0,t="Network Error"){this.status=e,this.text=t}}let o={origin:"https://api.emailjs.com",blockHeadless:!1,storageProvider:(()=>{if("undefined"!=typeof localStorage)return{get:e=>Promise.resolve(localStorage.getItem(e)),set:(e,t)=>Promise.resolve(localStorage.setItem(e,t)),remove:e=>Promise.resolve(localStorage.removeItem(e))}})()},n=e=>e?"string"==typeof e?{publicKey:e}:"[object Object]"===e.toString()?e:{}:{},s=async(e,t,a={})=>{let n=await fetch(o.origin+e,{method:"POST",headers:a,body:t}),s=await n.text(),i=new r(n.status,s);if(n.ok)return i;throw i},i=(e,t,a)=>{if(!e||"string"!=typeof e)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!t||"string"!=typeof t)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!a||"string"!=typeof a)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates"},l=e=>{if(e&&"[object Object]"!==e.toString())throw"The template params have to be the object. Visit https://www.emailjs.com/docs/sdk/send/"},c=e=>e.webdriver||!e.languages||0===e.languages.length,d=()=>new r(451,"Unavailable For Headless Browser"),u=(e,t)=>
1{if(!Array.isArray(e))throw"The BlockList list has to be an array";if("string"!=typeof t)throw"The BlockList watchVariable has to be a string"},m=e=>!e.list?.length||!e.watchVariable,p=(e,t)=>e instanceof FormData?e.get(t):e[t],b=(e,t)=>{if(m(e))return!1;u(e.list,e.watchVariable);let a=p(t,e.watchVariable);return"string"==typeof a&&e.list.includes(a)},h=()=>new r(403,"Forbidden"),g=(e,t)=>{if("number"!=typeof e||e<0)throw"The LimitRate throttle has to be a positive number";if(t&&"string"!=typeof t)throw"The LimitRate ID has to be a non-empty string"},f=async(e,t,a)=>{let r=Number(await a.get(e)||0);return t-Date.now()+r},x=async(e,t,a)=>{if(!t.throttle||!a)return!1;g(t.throttle,t.id);let r=t.id||e;return await f(r,t.throttle,a)>0||(await a.set(r,Date.now().toString()),!1)},v=()=>new r(429,"Too Many Requests"),_=e=>{if(!e||"FORM"!==e.nodeName)throw"The 3rd parameter is expected to be the HTML form element or the style selector of the form"},y=e=>"string"==typeof e?document.querySelector(e):e;var w={init:(e,t="https://api.emailjs.com")=>{if(!e)return;let a=n(e);o.publicKey=a.publicKey,o.blockHeadless=a.blockHeadless,o.storageProvider=a.storageProvider,o.blockList=a.blockList,o.limitRate=a.limitRate,o.origin=a.origin||t},send:async(e,t,a,r)=>{let u=n(r),m=u.publicKey||o.publicKey,p=u.blockHeadless||o.blockHeadless,g=u.storageProvider||o.storageProvider,f={...o.blockList,...u.blockList},_={...o.limitRate,...u.limitRate};return p&&c(navigator)?Promise.reject(d()):(i(m,e,t),l(a),a&&b(f,a))?Promise.reject(h()):await x(location.pathname,_,g)?Promise.reject(v()):s("/api/v1.0/email/send",JSON.stringify({lib_version:"4.4.1",user_id:m,service_id:e,template_id:t,template_params:a}),{"Content-type":"application/json"})},sendForm:async(e,t,a,r)=>{let l=n(r),u=l.publicKey||o.publicKey,m=l.blockHeadless||o.blockHeadless,p=o.storageProvider||l.storageProvider,g={...o.blockList,...l.blockList},f={...o.limitRate,...l.limitRate};if(m&&c(navigator))return Promise.reject(d());let w=y(a);i(u,e,t),_(w);let k=new FormData(w);return b(g,k)?Promise.reject(h()):await x(location.pathname,f,p)?Promise.reject(v()):(k.append("lib_version","4.4.1"),k.append("service_id",e),k.append("template_id",t),k.append("user_id",u),s("/api/v1.0/email/send-form",k))},EmailJSResponseStatus:r}},47284:function(e,t,a){var r=a(57437);a(2265),t.Z=e=>{let{label:t,name:a,placeholder:o,value:n,onChange:s,isRequired:i=!0,type:l="text"}=e;return(0,r.jsxs)("div",{className:"mb-2 md:mb-8",children:[(0,r.jsxs)("label",{htmlFor:a,className:"mb-1 block text-sm font-medium text-dark dark:text-white md:mb-3",children:[t," ",(0,r.jsx)("span",{className:"text-lg text-red-600",children:"*"})]}),(0,r.jsx)("input",{type:l,name:a,placeholder:o,required:i,className:"dark:focus:shadow-none w-full rounded-md border border-stroke bg-[#f8f8f8] px-6 py-3 text-base text-body-color outline-none focus:border-primary dark:border-transparent dark:bg-[#2C303B] dark:text-body-color-dark dark:shadow-two dark:focus:border-primary",value:n,onChange:s})]})}},5485:function(e,t,a){var r=a(57437);t.Z=e=>{let{title:t,paragraph:a,width:o="570px",center:n,mb:s="100px",classTitle:i="",classParagraph:l=""}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"w-full animate-fade-left animate-delay-500 animate-duration-1000 animate-once animate-ease-out ".concat(n?"mx-auto text-center":""),style:{maxWidth:o,marginBottom:s},children:[(0,r.jsx)("h2",{className:"mb-4 text-3xl font-bold !leading-tight text-black dark:text-white sm:text-4xl md:text-5xl ".concat(""!=i?i:""),children:t}),(0,r.jsx)("p",{className:"!leading-relaxed ".concat(""!=l?l:"text-base text-body-color md:text-lg"),children:a})]})})}},31486:function(e,t,a){var r=a(57437);a(2265),t.Z=e=>{let{label:t,options:a,selectedValue:o,onChange:n,defaultValue:s}=e;return(0,r.jsxs)("div",{className:"mb-2 md:mb-8",children:[(0,r.jsxs)("label",{className:"mb-1 block text-sm font-medium text-dark dark:text-white md:mb-3",children:[t," ",(0,r.jsx)("span",{className:"text-lg text-red-600",children:"*"})]}),(0,r.jsx)("select",{value:o,defaultValue:s,required:""!==o,onChange:e=>n(e.target.value),className:"dark:focus:shadow-none w-full rounded-md border border-stroke bg-[#f8f8f8] px-6 py-3 text-base text-body-color outline-none focus:border-primary dark:border-transparent dark:bg-[#2C303B] dark:text-body-color-dark dark:shadow-two dark:focus:border-primary",children:a.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]})}},32765:function(e,t,a){a.d(t,{Z:function(){return b}});var r=a(57437),o=a(2265),n=a(33933),s=e=>{let{isOpen:t,onClose:a,title:s,children:i}=e,{setFormData:l}=(0,o.useContext)(n.Z);return t?(0,r.jsxs)("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black bg-opacity-40 transition-opacity duration-300 ".concat(t?"opacity-100":"opacity-0"),children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black opacity-50",onClick:()=>{a(),l({user_name:"",user_email:"",message:"",user_phone:"",service_type:""})}}),(0,r.jsx)("dialog",{open:!0,id:"quote_modal_1",className:"modal shadow-lg w-full max-w-lg rounded-md border border-white/80 bg-white dark:border-black/80 dark:bg-black",children:(0,r.jsxs)("div",{className:"modal-box p-5",children:[(0,r.jsxs)("div",{className:"modal-header text-xl font-bold",children:[(0,r.jsx)("h2",{className:"tracking-wider",children:s}),(0,r.jsx)("button",{className:"btn btn-sm btn-circle btn-ghost absolute right-6 top-6",onClick:a,children:"✕"})]}),(0,r.jsx)("div",{className:"modal-body",children:i})]})})]}):null},i=a(47284),l=a(69064),c=a(43057),d=a(31486),u=a(61826),m=a(83125),p=e=>{let{onClose:t}
1=e,{loading:a,setLoading:s,formData:p,setFormData:b,serviceType:h,setServiceType:g,setIsOpenForm:f}=(0,o.useContext)(n.Z),x=()=>!(!p.user_email||!p.message||!p.user_name&&(!p.user_phone.toString().match("/^\\+\\d{1,3}\\d{6,14}$/\n")||0!==p.user_phone.length)),v=async e=>{e.preventDefault();let t=x(),a={user_name:p.user_name,user_email:p.user_email,message:p.message,user_phone:p.user_phone,service_type:h,origin:"Servicios"};if(t){s(!0),await (0,c.Z)(a)?l.ZP.success("Mensaje enviado correctamente"):(0,l.ZP)("Error al enviar el mensaje",{icon:"❌"});let{statusText:e}=await (0,m.o)({name:p.user_name,email:p.user_email,message:p.message,phone:p.user_phone,service_type:h});b({user_email:"",user_name:"",message:"",user_phone:"",service_type:"",origin:""}),"OK"===e&&console.log("data saved"),"Error"===e&&console.log("data not saved"),s(!1),f(!1)}else l.ZP.error("Por favor, complete todos los campos o coloque todos los datos correctamente")};return(0,r.jsxs)("form",{onSubmit:v,className:"mx-5 mt-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-x-4 gap-y-2 md:grid-cols-2",children:[(0,r.jsx)("div",{className:"col-span-2 md:col-span-1",children:(0,r.jsx)(i.Z,{label:"Nombre",name:"name",placeholder:"Ingresa tu Nombre",value:p.user_name,onChange:e=>b({...p,user_name:e.target.value}),type:"text"})}),(0,r.jsx)("div",{className:"col-span-2 md:col-span-1",children:(0,r.jsx)(d.Z,{label:"Seleccione un Servicio",options:u.YM,selectedValue:h,onChange:e=>g(e)})}),(0,r.jsx)("div",{className:"col-span-2 md:col-span-1",children:(0,r.jsx)(i.Z,{label:"Email",name:"email",placeholder:"Ingresa tu Email",value:p.user_email,onChange:e=>b({...p,user_email:e.target.value}),type:"email"})}),(0,r.jsx)("div",{className:"col-span-2 md:col-span-1",children:(0,r.jsx)(i.Z,{label:"Tel\xe9fono",name:"phoneNumber",placeholder:"Ingresa tu Tel\xe9fono",value:p.user_phone,onChange:e=>b({...p,user_phone:e.target.value}),type:"text"})}),(0,r.jsx)("div",{className:"col-span-2 md:col-span-2",children:(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("label",{htmlFor:"description",className:"mb-3 block text-sm font-medium text-dark dark:text-white",children:["Mensaje ",(0,r.jsx)("span",{className:"text-lg text-red-600",children:"*"})]}),(0,r.jsx)("textarea",{name:"description",rows:5,placeholder:"Ingresa tu mensaje",className:"dark:focus:shadow-none w-full resize-none rounded-md border border-stroke bg-[#f8f8f8] px-6 py-3 text-base text-body-color outline-none focus:border-primary dark:border-transparent dark:bg-[#2C303B] dark:text-body-color-dark dark:shadow-two dark:focus:border-primary",value:p.message,onChange:e=>b({...p,message:e.target.value})})]})})]}),(0,r.jsxs)("div",{className:"flex w-full justify-end gap-5 px-4",children:[(0,r.jsx)("button",{type:"button",className:"rounded-md bg-gray-300 px-9 py-4 text-base font-medium text-black shadow-submit hover:bg-gray-400 dark:shadow-submit-dark",onClick:t,children:"Cancelar"}),(0,r.jsx)("button",{type:"submit",className:"rounded-md bg-primary px-9 py-4 text-base font-medium text-white shadow-submit duration-300 hover:bg-primary/90 dark:shadow-submit-dark",children:a?"Enviando ...":"Enviar"})]})]})},b=()=>{let{isOpenForm:e,setIsOpenForm:t}=(0,o.useContext)(n.Z);return(0,r.jsx)(s,{isOpen:e,onClose:()=>t(!1),title:"Solicita tu cotizaci\xf3n",children:(0,r.jsx)(p,{onClose:()=>t(!1)})})}},15896:function(e,t,a){a.d(t,{iU:function(){return l},lO:function(){return i},pR:function(){return s},xb:function(){return n},z0:function(){return o}});var r=a(40257);let o="https://cleanenergybackend.up.railway.app";r.env.NEXT_PUBLIC_BACKEND_LOCAL_URL,r.env.NEXT_PUBLIC_EMAIL_SERVICE_URL;let n="service_n5u0658",s="template_jd223hg",i=r.env.NEXT_PUBLIC_TEMPLATE_ID_CONTACT,l="cfelhcvT-I0Mdr4d2";r.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,r.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,r.env.NEXTCLOUDINARY_API_SECRET_KEY,r.env.NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET,r.env.DEEP_API_KEY,r.env.NEXT_PUBLIC_DEEP_API_DOMAIN},61826:function(e,t,a){a.d(t,{T_:function(){return r},YM:function(){return o},tQ:function(){return n}});let r=[["Planta E\xf3lica","wind_power_plant"],["Planta de energ\xeda solar","solar_power_plant"],["Reciclaje de agua","water_recycling"],["Siembra vertical","vertical_seeding"],["Suelo radiante","radiant_floor"]],o=[{value:"",label:"Seleccione una opci\xf3n"},{value:"solar_power_plant",label:"Planta de Energia Solar"},{value:"wind_power_plant",label:"Planta de Energia E\xf3lica"},{value:"vertical_seeding",label:"Siembra Vertical"},{value:"water_recycling",label:"Reciclaje de Agua"},{value:"radiant_floor",label:"Suelo Radiante"}],n=[{value:"solar_power_plant",label:"Planta de Energia Solar"},{value:"wind_power_plant",label:"Planta de Energia E\xf3lica"},{value:"vertical_seeding",label:"Siembra Vertical"},{value:"water_recycling",label:"Reciclaje de Agua"},{value:"radiant_floor",label:"Suelo Radiante"}]},33933:function(e,t,a){let r=(0,a(2265).createContext)({});t.Z=r}
1,31025:function(e,t,a){a.d(t,{VisibilityProvider:function(){return s},i:function(){return i}});var r=a(57437),o=a(2265);let n=(0,o.createContext)(void 0),s=e=>{let{children:t}=e,[a,s]=(0,o.useState)(null),i=(0,o.useRef)(null);return(0,o.useEffect)(()=>()=>{i.current&&i.current.disconnect()},[]),(0,r.jsx)(n.Provider,{value:{activeSection:a,registerSection:e=>{i.current||(i.current=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?s(e.target.id):e.boundingClientRect.bottom<0&&s(null)})},{root:null,rootMargin:"0px",threshold:.1}));let t=document.getElementById(e);t&&i.current.observe(t)}},children:t})},i=()=>{let e=(0,o.useContext)(n);if(!e)throw Error("useVisibility must be used within a VisibilityProvider");return e}},90968:function(e,t,a){var r=a(61826);t.Z=function(e){if(!e)return"Contacto";let t=r.T_.find(t=>t[1]===e);return t?t[0]:"Contacto"}},43057:function(e,t,a){var r=a(15896),o=a(6595),n=a(90968);let s=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.pR,a=(0,n.Z)(e.service_type),s=!1;return console.log("PK",r.iU),await o.ZP.send(r.xb,t,{user_name:e.user_name,message:e.message,user_email:e.user_email,user_phone:e.user_phone,service_type:a,origin:e.origin},{publicKey:r.iU}).then(e=>(console.log("SUCCESS!",e.status,e.text),s=!0)).catch(e=>(console.error("FAILED...",e),s=!1)),s};t.Z=s},83125:function(e,t,a){a.d(t,{o:function(){return o}});var r=a(93573);let o=async e=>await r.Z.post("/api/email-service/",e)},93573:function(e,t,a){var r=a(83464),o=a(15896);let n=r.Z.create({baseURL:o.z0,headers:{"Content-Type":"application/json"}});n.interceptors.response.use(e=>e,e=>(console.error("HTTP Error:",e),Promise.reject(e))),t.Z=n}}]);

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.