PageSourceSearch

https://weversity.org/assets/ContactPage-oP9j5uoc.js

js weversity.org collected 2026-09-24 14:27:34 UTC 12,836 bytes, 1 lines download raw bytes

1import{j as e,H as R,m as o,A as _}from"./index-qdmhk9je.js";import{r as a}from"./vendor-react-DXfu0YkJ.js";import{P as W}from"./PhoneInput-BTwLOWOJ.js";import{i as L}from"./validation-WtNg4Brb.js";import{u as V}from"./useRecaptcha-DJgGMUHW.js";import{y as q,S as M,ai as z,e as H,G as v,f as I,i as k}from"./vendor-icons-D7Wh9KcK.js";import"./vendor-pdf-v-sEuCgt.js";import"./vendor-ui--7kLNIgQ.js";import"./vendor-charts-odGm-fv0.js";import"./vendor-supabase-BVvKO2AB.js";const O="https://sync-brevo.weversity.org/api",S="6LchKfQrAAAAAITPzYqH22lHGTyyMfTp4vVs5NGa",B="https://verify-captcha.weversity.org/api",ae=({setPage:D})=>{V(S);const[l,h]=a.useState(""),[g,r]=a.useState(!1),[C,c]=a.useState(!1),[b,i]=a.useState(null);a.useEffect(()=>{setTimeout(()=>{},500)},[]);const A=async f=>{f.preventDefault();const y=f.currentTarget;r(!0),i(null),c(!1);const n=new FormData(y),d=n.get("firstName"),m=n.get("lastName"),s=n.get("email").trim(),w=n.get("message");if(!d||!m||!s||!w){i("Please fill in all required fields."),r(!1);return}if(!L(s)){i("Please enter a valid email address without consecutive dots."),r(!1);return}try{const x=await new Promise((E,F)=>{window.grecaptcha.ready(()=>{window.grecaptcha.execute(S,{action:"contact"}).then(E).catch(F)})});if(!(await(await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:x})})).json()).success)throw new Error("Security check failed. Bots are not allowed.");const P={firstName:d,lastName:m,email:s,phone:l,message:w},{error:j}=await window.supabase.from("form_submissions").insert({form_type:"contact",data:P});if(j)throw j;const T=117;let t=l;t&&(t=t.replace(/[\s-]/g,""),t.startsWith("0")?t="+92"+t.substring(1):t.startsWith("+")||(t="+92"+t));const u={FIRSTNAME:d,LASTNAME:m};t&&/^\+[1-9]\d{9,14}$/.test(t)&&(u.SMS=t),console.log("Syncing with Brevo (Contact):",{email:s,brevoAttributes:u});const p=await fetch(O,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s,attributes:u,listIds:[T]})}),N=await p.json();console.log("Brevo Sync Response (Contact):",N),p.ok||console.error("Brevo Sync failed with status:",p.status,N),c(!0),y.reset(),h("")}catch(x){i(x.message||"Failed to submit form")}finally{r(!1)}};return e.jsxs("div",{className:"min-h-screen bg-[#F8F7FF] py-12 px-4 sm:px-6 lg:px-8 font-sans relative overflow-hidden flex flex-col justify-center",children:[e.jsxs(R,{defer:!1,children:[e.jsx("title",{children:"Contact Us | WeVersity"}),e.jsx("meta",{name:"description",content:"Get in touch with the WeVersity team. We're here to help you with any questions or support you need for your learning or teaching journey."}),e.jsx("meta",{property:"og:title",content:"Contact Us | WeVersity"}),e.jsx("meta",{property:"og:description",content:"Get in touch with the WeVersity team. We're here to help you with any questions or support you need for your learning or teaching journey."}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"ContactPage",name:"Contact WeVersity",url:"https://weversity.org/contact",mainEntity:{"@type":"LocalBusiness",name:"WeVersity",url:"https://weversity.org",logo:"https://res.cloudinary.com/dn93gd6yw/image/upload/f_auto,q_auto/v1762151396/weversity-logo_p9owli.png",contactPoint:{"@type":"ContactPoint",contactType:"customer service",email:"[email protected]",areaServed:"Global",availableLanguage:["English","Urdu"]}}})})]}),e.jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[40%] h-[40%] bg-brand-purple/10 rounded-full blur-[120px] pointer-events-none"}),e.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] bg-indigo-500/10 rounded-full blur-[150px] pointer-events-none"}),e.jsxs("div",{className:"w-full max-w-6xl mx-auto relative z-10 my-8",children:[e.jsxs("button",{onClick:()=>window.history.back(),className:"group flex items-center text-gray-500 hover:text-brand-purple font-bold mb-6 transition-colors bg-white/60 backdrop-blur-md px-5 py-2.5 rounded-full w-fit shadow-sm border border-gray-200",children:[e.jsx(q,{className:"w-4 h-4 mr-2 transform group-hover:-translate-x-1 transition-transform"}),"Back"]}),e.jsxs("div",{className:"bg-white rounded-[2.5rem] shadow-2xl shadow-brand-purple/10 border border-gray-100 overflow-hidden flex flex-col lg:flex-row min-h-[750px]",children:[e.jsxs("div",{className:"lg:w-[45%] bg-brand-purple relative overflow-hidden p-10 lg:p-16 flex flex-col justify-center text-white",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[#0A1D56] to-brand-purple opacity-95"}),e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-white/5 rounded-full blur-3xl -mr-20 -mt-20 pointer-events-none"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-80 h-80 bg-indigo-500/20 rounded-full blur-3xl -ml-20 -mb-20 pointer-events-none"}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs(o.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.6},children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 mb-8 shadow-inner",children:[e.jsx(M,{className:"w-4 h-4 text-orange-400"}),e.jsx("span",{className:"text-xs font-black uppercase tracking-[0.2em] text-white/90",children:"We're Here For You"})]}),e.jsxs("h1",{className:"text-4xl lg:text-5xl font-black mb-6 leading-[1.1] tracking-tight",children:["Let's Build Something ",e.jsx("br",{})," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-orange-300 to-orange-500",children:"Amazing Together"})]}),e.jsx("p",{className:"text-purple-100 text-lg font-medium leading-relaxed max-w-md",children:"Have questions about our courses, need technical support, or want to collaborate? Our dedicated team is ready to help you succeed."})]}),e.jsxs(o.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"mt-16 space-y-8",children:[e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsx("div",{className:"w-14 h-14 bg-white/10 rounded-2xl flex items-center justify-center shrink-0 backdrop-blur-md border border-white/10 shadow-lg",children:e.jsx(z,{className:"w-6 h-6 text-orange-400"})}),e.jsxs("div",{className:"pt-1",children:[e.jsx("h3",{className:"text-xs font-black uppercase tracking-widest text-purple-200 mb-1",children:"Email Support"}),e.jsx("p",{className:"text-lg font-bold text-white tracking-wide",children:"[email protected]"})]})]}),e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsx("div",{className:"w-14 h-14 bg-white/10 rounded-2xl flex items-center justify-center shrink-0 backdrop-blur-md border border-white/10 shadow-lg",children:e.jsx(H,{className:"w-6 h-6 text-orange-400"})}),e.jsxs("div",{className:"pt-1",children:[e.jsx("h3",{className:"text-xs font-black uppercase tracking-widest text-purple-200 mb-1",children:"Response Time"}),e.jsx("p",{className:"text-lg font-bold text-white tracking-wide",children:"Within 24 Hours"})]})]}),e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsx("div",{className:"w-14 h-14 bg-white/10 rounded-2xl flex items-center justify-center shrink-0 backdrop-blur-md border border-white/10 shadow-lg",children:e.jsx(v,{className:"w-6 h-6 text-orange-400"})}),e.jsxs("div",{className:"pt-1",children:[e.jsx("h3",{className:"text-xs font-black uppercase tracking-widest text-purple-200 mb-1",children:"Secure Contact"}),e.jsx("p",{className:"text-sm font-medium text-purple-100/90 leading-relaxed max-w-[280px]",children:"Protected by reCAPTCHA & secured in our database."})]})]})]})]})]}),e.jsx("div",{className:"lg:w-[55%] p-10 lg:p-16 relative bg-white flex flex-col justify-center",children:e.jsx(_,{mode:"wait",children:C?e.jsxs(o.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.4},className:"text-center py-12 flex flex-col items-center justify-center h-full",children:[e.jsx("div",{className:"w-24 h-24 bg-green-50 rounded-full flex items-center justify-center mb-6 shadow-inner",children:e.jsx(I,{className:"w-12 h-12 text-green-500"})}),e.jsx("h3",{className:"text-3xl font-black text-gray-900 mb-4 tracking-tight",children:"Message Sent!"}),e.jsx("p",{className:"text-gray-500 font-medium text-lg leading-relaxed max-w-md mx-auto mb-10",children:"Thank you for reaching out to us. Our team will review your message and get back to you within 1-2 business days."}),e.jsxs("button",{onClick:()=>c(!1),className:"group bg-gray-900 hover:bg-black text-white font-bold py-4 px-8 rounded-xl transition-all shadow-xl hover:shadow-2xl hover:-translate-y-1 active:translate-y-0 flex items-center justify-center gap-2 mx-auto",children:["Send Another Message",e.jsx(k,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]},"success"):e.jsxs(o.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4},className:"w-full max-w-md mx-auto",children:[e.jsxs("div",{className:"mb-10 text-center lg:text-left",children:[e.jsx("h2",{className:"text-3xl font-black text-gray-900 mb-3",children:"Send us a Message"}),e.jsx("p",{className:"text-gray-500 font-medium",children:"Fill out the form below and we'll be in touch."})]}),e.jsxs("form",{className:"space-y-6",onSubmit:A,children:[b&&e.jsxs("div",{className:"p-4 bg-red-50 text-red-700 rounded-xl text-sm font-semibold border border-red-100 flex items-start gap-3",children:[e.jsx(v,{className:"w-5 h-5 shrink-0 text-red-500"}),b]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"firstName",className:"block text-xs font-black uppercase tracking-widest text-gray-500 mb-2",children:["First Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",id:"firstName",name:"firstName",className:"w-full px-5 py-4 bg-gray-50/50 border border-gray-200 rounded-xl text-sm font-medium focus:ring-2 focus:ring-brand-purple/20 focu
1s:border-brand-purple transition-all outline-none",placeholder:"John",required:!0})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"lastName",className:"block text-xs font-black uppercase tracking-widest text-gray-500 mb-2",children:["Last Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",id:"lastName",name:"lastName",className:"w-full px-5 py-4 bg-gray-50/50 border border-gray-200 rounded-xl text-sm font-medium focus:ring-2 focus:ring-brand-purple/20 focus:border-brand-purple transition-all outline-none",placeholder:"Doe",required:!0})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-xs font-black uppercase tracking-widest text-gray-500 mb-2",children:["Email Address ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"email",id:"email",name:"email",pattern:"^[a-zA-Z0-9]+([._-][a-zA-Z0-9]+)*@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",title:"Please enter a valid email address without consecutive dots.",className:"w-full px-5 py-4 bg-gray-50/50 border border-gray-200 rounded-xl text-sm font-medium focus:ring-2 focus:ring-brand-purple/20 focus:border-brand-purple transition-all outline-none",placeholder:"[email protected]",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"phone",className:"block text-xs font-black uppercase tracking-widest text-gray-500 mb-2",children:"Phone Number"}),e.jsx(W,{value:l,onChange:h,defaultCountryCode:"US"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"message",className:"block text-xs font-black uppercase tracking-widest text-gray-500 mb-2",children:["Your Message ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{id:"message",name:"message",rows:4,className:"w-full px-5 py-4 bg-gray-50/50 border border-gray-200 rounded-xl text-sm font-medium focus:ring-2 focus:ring-brand-purple/20 focus:border-brand-purple transition-all outline-none resize-none",placeholder:"How can we help you today?",required:!0})]}),e.jsx("button",{type:"submit",disabled:g,className:"w-full bg-brand-purple hover:bg-brand-purple-dark text-white font-bold py-4 px-6 rounded-xl transition-all shadow-lg hover:shadow-brand-purple/30 disabled:opacity-70 disabled:cursor-not-allowed flex items-center justify-center gap-2 group",children:g?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),e.jsx("span",{children:"Sending..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Send Message"}),e.jsx(k,{className:"w-4 h-4 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})})]})]},"form")})})]})]})]})};export{ae as default};

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.