PageSourceSearch

https://www.supportsages.com/_next/static/chunks/102-b853e39670501bde.js

js supportsages.com collected 2026-10-04 15:10:31 UTC 10,834 bytes, 4 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[102],{9283:(e,t,r)=>{r.d(t,{_$:()=>i,_e:()=>l});var a=r(95155),n=r(12115),o=r(26482);let s=(0,n.createContext)(void 0);function l(){return(0,n.useContext)(s)}function i({children:e}){let[t,r]=(0,n.useState)(void 0),l=(0,n.useCallback)(()=>{(0,o.F)().then(()=>r(()=>o.x)).catch(e=>{console.error("reCAPTCHA preload failed:",e)})},[]),i=(0,n.useCallback)(e=>{let t=e.target.tagName;("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)&&l()},[l]);return(0,a.jsx)("div",{onFocusCapture:i,children:(0,a.jsx)(s.Provider,{value:t,children:e})})}},26482:(e,t,r)=>{r.d(t,{F:()=>d,x:()=>c});let a="google-recaptcha-v3";function n(){return"6LeyLnIqAAAAAHyGmGzMKxf8t9xJf0KRm9tBGWB5"}function o(){let e=window.grecaptcha;return e&&"function"==typeof e.ready&&"function"==typeof e.execute?e:null}function s(e){return"text/plain"===(e.getAttribute("type")||"").toLowerCase()||"true"===e.getAttribute("data-cookieyes-hidden")}let l=null;function i(e,t,r){let n=document.createElement("script");n.id=a,n.src=`https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(e)}`,n.async=!0,n.defer=!0,n.setAttribute("data-cookieyes","necessary"),n.onload=t,n.onerror=r,document.head.appendChild(n)}function d(){if(o())return Promise.resolve();if(l)return l.then(()=>{if(!o())return l=null,d()});let e=n();return e?l=new Promise((t,r)=>{let n=!1,d=!1,c=Date.now(),u=e=>{n||(n=!0,l=null,r(Error(e)))},m=()=>{if(o()){let e;return void((e=o())&&!n&&e.ready(()=>{n||(n=!0,t())}))}let r=document.getElementById(a);if(r&&s(r)&&!d){d=!0,r.remove(),i(e,m,()=>{u("Failed to load reCAPTCHA script")});return}Date.now()-c>=12e3?u("reCAPTCHA failed to load"):window.setTimeout(m,100)},p=document.getElementById(a);if(p&&s(p)){p.remove(),i(e,m,()=>{u("Failed to load reCAPTCHA script")});return}if(p){p.setAttribute("data-cookieyes","necessary"),m();return}i(e,m,()=>{u("Failed to load reCAPTCHA script")})}):Promise.reject(Error("Missing reCAPTCHA site key"))}async function c(e="submit"){let t=n();if(!t)return null;try{await d();let r=o();if(!r)return null;return await new Promise((a,n)=>{r.ready(()=>{r.execute(t,{action:e}).then(a).catch(n)})})}catch(e){return console.error("reCAPTCHA execution error:",e),null}}},29724:(e,t,r)=>{r.d(t,{F:()=>a});function a(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"lead_form_submit",form_name:e})}},80102:(e,t,r)=>{r.d(t,{A:()=>c});var a=r(95155),n=r(12115),o=r(13740),s=r(29724),l=r(26482),i=r(9283);function d({pageName:e="Certifications Page",emailType:t="callback-request",whatsappType:r="callback-request"}
1){let d=(0,i._e)(),[c,u]=(0,n.useState)({name:"",designation:"",email:"",phoneCountryCode:"",phoneNumber:"",requirement:"",subscribe:!1}),[m,p]=(0,n.useState)({}),[g,h]=(0,n.useState)(!0),[b,f]=(0,n.useState)(!1),[x,y]=(0,n.useState)(!1),C=e=>{let{name:t,value:r,type:a,checked:n}=e.target;u({...c,[t]:"checkbox"===a?n:r}),p({...m,[t]:""})},N=()=>{let e={};if(c.name?/^[A-Za-z][A-Za-z\s.'-]*$/.test(c.name)||(e.name="Name can include only letters, spaces, .' -"):e.name="Name is required",c.designation||(e.designation="Designation is required"),c.email){var t,r;(t=c.email,/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t).toLowerCase()))?(r=c.email,["gmail.com","hotmail.com","outlook.com","yahoo.com"].includes(r.split("@")[1]?.toLowerCase())&&(e.email="Please provide an official email address")):e.email="Invalid email address"}else e.email="Email is required";return c.phoneNumber&&(c.phoneCountryCode?/^[+\d\s]+$/.test(c.phoneCountryCode)||(e.phoneCountryCode="Country code can include only digits, spaces, and +"):e.phoneCountryCode="Country code is required if phone number is provided",/^[\d\s]+$/.test(c.phoneNumber)||(e.phoneNumber="Phone number can include only digits and spaces")),c.requirement||(e.requirement="Please describe your requirement"),e};(0,n.useEffect)(()=>{h(!(c.name&&c.designation&&c.email&&c.requirement&&!Object.keys(N()).length))},[c,N]),(0,n.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/geo",{cache:"no-store"});if(!e.ok)return;let t=await e.json();t?.dialCode&&u(e=>({...e,phoneCountryCode:e.phoneCountryCode||t.dialCode}))}catch(e){console.error("Failed to fetch geo info:",e)}})()},[]);let k=async a=>{a.preventDefault();let n=await (d||l.x)("submit");if(!n)return void o.oR.error("reCAPTCHA verification failed. Please try again.");let{name:i,email:m,designation:g,phoneCountryCode:h,phoneNumber:b,requirement:x}=c,C=b&&h?`${h.trim()} ${b.trim()}`:"",k=`The user has requested a consultation (from ${e} page).
2
3Requirement:
4${x}`,w=N();if(Object.keys(w).length>0)p(w);else try{f(!0),await fetch("https://siteapi.supportsages.com/api/leads",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer 3160284273fa5fa8f03d66672786a63b2bf5afccdd84ce03bc1944caaa581f26b3f9238f7b58d7bc6a32705828a83ecaa6dcea1b4d4e39a2793ce50965ec60bca70a70893be30d6a03c2048853d7d3f7b558a5817bd7318e80f770b81775b6ccc4008ba2981258444f977bbe567b250b46f8ab6443bbdb81a29c4c9a713bd242"},body:JSON.stringify({data:{Name:i,Email:m,lead_category:4,Message:k,PageName:e}})});let a={name:i,designation:g,company:"",email:m,message:k,pageName:e,phone:C},[l,d]=await Promise.allSettled([fetch("/api/send-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,data:a,recaptchaToken:n})}),fetch("/api/send-whatsapp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:r,data:a,recaptchaToken:"internal-call"})})]),c=!1;"fulfilled"===l.status&&l.value.ok?(c=!0,console.log("✅ Email sent successfully")):console.warn("⚠️ Email failed:","rejected"===l.status?l.reason:l.value.status);let p=!1;"fulfilled"===d.status&&d.value.ok?(p=!0,console.log("✅ WhatsApp notification sent successfully")):console.warn("⚠️ WhatsApp notification failed:","rejected"===d.status?d.reason:d.value.status),c||p?((0,s.F)(`${String(e).replace(/\s+/g,"_").toLowerCase()}_consultation`),y(!0),f(!1),o.oR.success("We will reach out to you shortly.",{position:"top-center",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),u({name:"",email:"",designation:"",phoneCountryCode:"",phoneNumber:"",requirement:""})):(console.error("Both email and WhatsApp failed"),f(!1),o.oR.error("Failed to send message. Please try again."))}catch(e){console.error("Error submitting form:",e),o.oR.error("Error Submitting Form")}finally{f(!1)}};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"bg-[#1E3A8A] dark:bg-neutral-800 px-4 py-10 lg:py-10 rounded-2xl border border-white/20",children:(0,a.jsxs)("form",{onSubmit:k,className:"mx-4 md:mx-8 lg:mx-10",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"pb-6 md:pb-4",children:[(0,a.jsx)("label",{className:"block text-left text-[#B4EBFF] dark:text-gray-200 pb-2.5 text-xs lg:text-sm tracking-wide",children:"NAME *"}),(0,a.jsx)("input",{type:"text",name:"name",placeholder:"Your Name...",value:c.name,onChange:C,className:`w-full border dark:text-white border-gray-300 dark:bg-slate-500 rounded-lg md:rounded-xl p-3 lg:p-4 focus:outline-none focus:ring-2 ${m.name?"border-red-500":"focus:ring-sky-500"}`}),m.name&&(0,a.jsx)("p",{className:"text-red-500 text-sm",children:m.name})]}),(0,a.jsxs)("div",{className:"pb-6 md:pb-4",children:[(0,a.jsx)("label",{className:"block text-left text-[#B4EBFF] dark:text-gray-200 pb-2.5 text-xs lg:text-sm tracking-wide",children:"DESIGNATION *"}),(0,a.jsx)("input",{type:"text",name:"designation",placeholder:"Your Designation...",value:c.designation,onChange:C,className:`w-full border dark:text-white border-gray-300 dark:bg-slate-500 rounded-lg md:rounded-xl p-3 lg:p-4 focus:outline-none focus:ring-2 ${m.designation?"border-red-500":"focus:ring-sky-500"}`}),m.designation&&(0,a.jsx)("p",{className:"text-red-500 text-sm",children:m.designation})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"pb-6 md:pb-4",children:[(0,a.jsx)("label",{className:"block text-left text-[#B4EBFF] dark:text-gray-200 pb-2.5 text-xs lg:text-sm tracking-wide",children:"OFFICIAL EMAIL ID *"}),(0,a.jsx)("input",{type:"text",name:"email",placeholder:"Your Official Email ID...",value:c.email,onChange:C,className:`w-full border dark:text-white border-gray-300 dark:bg-slate-500 rounded-lg md:rounded-xl p-3 lg:p-4 focus:outline-none focus:ring-2 ${m.email?"border-red-500":"focus:ring-sky-500"}`}),m.email&&(0,a.jsx)("p",{className:"text-red-500 text-sm",children:m.email})]}),(0,a.jsxs)("div",{className:"pb-6 md:pb-4",children:[(0,a.jsx)("label",{className:"block text-left text-[#B4EBFF] dark:text-gray-200 pb-2.5 text-xs lg:text-sm tracking-wide",children:"PHONE NUMBER"}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsxs)("div",{className:"w-16",children:[(0,a.jsx)("input",{type:"tel",name:"phoneCountryCode",placeholder:"+91",value:c.phoneCountryCode,onChange:C,className:`w-full border dark:text-white border-gray-300 dark:bg-slate-500 rounded-lg md:rounded-xl p-3 lg:p-4 focus:outline-none focus:ring-2 ${m.phoneCountryCode?"border-red-500":"focus:ring-sky-500"}`}),m.phoneCountryCode&&(0,a.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.phoneCountryCode})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("input",{type:"tel",name:"phoneNumber",placeholder:"Phone Number (e.g., 9876543210)...",value:c.phoneNumber,onChange:C,className:`w-full border dark:text-white border-gray-300 dark:bg-slate-500 rounded-lg md:rounded-xl p-3 lg:p-4 focus:outline-none focus:ring-2 ${m.phoneNumber?"border-red-500":"focus:ring-sky-500"}`}),m.phoneNumber&&(0,a.jsx)("p",{className:"text-red-500 text-xs mt-1",children:m.phoneNumber})]})]})]})]}),(0,a.jsxs)("div",{className:"pb-6 md:pb-4",children:[(0,a.jsx)("label",{className:"block text-left text-[#B4EBFF] dark:text-gray-200 pb-2.5 text-xs lg:text-sm tracking-wide",children:"DESCRIBE YOUR REQUIREMENT *"}),(0,a.jsx)("textarea",{name:"requirement",placeholder:"Describe your requirement...",value:c.requirement,onChange:C,rows:3,className:`w-full border dark:text-white border-gray-300 dark:bg-slate-500 rounded-lg md:rounded-xl p-3 lg:p-4 focus:outline-none focus:ring-2 ${m.requirement?"border-red-500":"focus:ring-sky-500"}`}),m.requirement&&(0,a.jsx)("p",{className:"text-red-500 text-sm",children:m.requirement})]}
4),(0,a.jsx)("div",{className:"pt-2 lg:pt-2 gap-5 grid justify-start",children:(0,a.jsx)("button",{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-5 px-8 rounded-lg md:rounded-xl text-sm transition-all ease-linear ",children:b?"Loading...":"BOOK A FREE CONSULTATION"})})]})})})}function c(e){return(0,a.jsx)(i._$,{children:(0,a.jsx)(d,{...e})})}}}]);

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.