PageSourceSearch

https://buyplm.com/_next/static/chunks/24777-bd5838e89ff45761.js

js buyplm.com collected 2026-10-07 15:13:33 UTC 8,418 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[24777],{24777:(e,a,s)=>{s.d(a,{A:()=>p});var t=s(95155),r=s(12115),n=s(97003),l=s(33789),i=s(67001),c=s(90235),d=s(21873),o=s(23664),m=s(69141),u=s(65229),h=s(89559);function p(e){let{onClose:a,formType:s="contact",title:p}=e,[x,f]=(0,r.useState)(""),[v,g]=(0,r.useState)(!1),[b,y]=(0,r.useState)({name:"",company:"",email:"",message:"",captchaInput:""}),[j,N]=(0,r.useState)({name:"",company:"",email:"",captcha:""});(0,r.useEffect)(()=>{w()},[]);let w=()=>{let e="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s<6;s++)e+=a.charAt(Math.floor(Math.random()*a.length));f(e)},C=e=>{let{id:a,value:s}=e.target;y(e=>({...e,[a]:s}))},A=async()=>{if((()=>{let e={name:"",company:"",email:"",captcha:""},a=!0;return b.name||(e.name="Name is required",a=!1),b.company||(e.company="Company name is required",a=!1),b.email?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b.email)||(e.email="Please enter a valid email address",a=!1):(e.email="Email is required",a=!1),b.captchaInput!==x&&(e.captcha="CAPTCHA does not match",a=!1),N(e),a})()){g(!0);try{var e;let t=(null==(e=document.cookie.split("; ").find(e=>e.startsWith("vid=")))?void 0:e.split("=")[1])||"",r=await fetch("/api/forms/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b.name,company:b.company,email:b.email,message:b.message,formType:s,vId:t,userAgent:navigator.userAgent,referrer:document.referrer,landingPage:window.location.href})}),n=await r.json();n.success?(alert(n.message),y({name:"",company:"",email:"",message:"",captchaInput:""}),a()):alert(n.error||"There was an error submitting your form. Please try again.")}catch(e){console.error("Error submitting form:",e),alert("An error occurred. Please try again later.")}finally{g(!1)}}};return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,t.jsx)("div",{className:"bg-background rounded-lg shadow-lg w-full overflow-hidden ".concat("contact"===s?"max-w-4xl":"max-w-2xl"),children:(0,t.jsxs)("div",{className:"grid md:grid-cols-2 gap-0",children:["contact"===s&&(0,t.jsxs)("div",{className:"p-6 md:p-8 bg-muted",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold mb-6",children:"CONTACT US"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(d.A,{className:"w-5 h-5 mr-3 mt-1 text-primary"}),(0,t.jsx)("p",{children:"HX3 Solutions, Inc. PO Box 4040, Westford, MA 01886, USA"})]}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(o.A,{className:"w-5 h-5 mr-3 text-primary"}),(0,t.jsx)("a",{href:"mailto:[email protected]",className:"hover:underline",children:"[email protected]"})]}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(m.A,{className:"w-5 h-5 mr-3 text-primary"}),(0,t.jsx)("a",{href:"tel:+1 (720) 862-3001",className:"hover:underline",children:"+1 (720) 862-3001"})]})]})]}),(0,t.jsxs)("div",{className:"p-6 md:p-8 relative ".concat("contact"===s?"":"md:col-span-2"),children:[(0,t.jsx)("button",{onClick:a,className:"absolute top-4 right-4 p-1 rounded-full hover:bg-muted","aria-label":"Close",children:(0,t.jsx)(u.A,{className:"w-5 h-5"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold mb-6",children:(()=>{if(p)return p;switch(s){case"demo":return"Book A Demo";case"quote":return"Get A Quote";default:return"Contact Us"}})()}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.J,{htmlFor:"name",children:["Name",(0,t.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,t.jsx)(l.p,{id:"name",value:b.name,onChange:C,placeholder:"John Smith",className:j.name?"border-destructive":""}),j.name&&(0,t.jsx)("p",{className:"text-destructive text-sm mt-1",children:j.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.J,{htmlFor:"company",children:["Company Name",(0,t.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,t.jsx)(l.p,{id:"company",value:b.company,onChange:C,placeholder:"Company Inc",className:j.company?"border-destructive":""}),j.company&&(0,t.jsx)("p",{className:"text-destructive text-sm mt-1",children:j.company})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.J,{htmlFor:"email",children:["Email Address",(0,t.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,t.jsx)(l.p,{id:"email",type:"email",value:b.email,onChange:C,placeholder:"[email protected]",className:j.email?"border-destructive":""}),j.email&&(0,t.jsx)("p",{className:"text-destructive text-sm mt-1",children:j.email})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.J,{htmlFor:"message",children:"Message"}),(0,t.jsx)(i.T,{id:"message",value:b.message,onChange:C,placeholder:"Enter a brief description.",rows:4})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 bg-muted p-2 rounded",children:[(0,t.jsx)("div",{className:"font-mono text-lg",children:x}),(0,t.jsx)("button",{onClick:w,className:"p-1 rounded hover:bg-muted-foreground
1/10","aria-label":"Refresh CAPTCHA",type:"button",children:(0,t.jsx)(h.A,{className:"w-4 h-4"})})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(l.p,{id:"captchaInput",value:b.captchaInput,onChange:C,placeholder:"Enter CAPTCHA",className:j.captcha?"border-destructive":""}),j.captcha&&(0,t.jsx)("p",{className:"text-destructive text-sm mt-1",children:j.captcha})]})]}),(0,t.jsx)(n.$,{onClick:A,className:"w-full",disabled:v,children:v?"Sending...":"Send"})]})]})]})})})}},25016:(e,a,s)=>{s.d(a,{cn:()=>n});var t=s(2821),r=s(75889);function n(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s];return(0,r.QP)((0,t.$)(a))}},33789:(e,a,s)=>{s.d(a,{p:()=>l});var t=s(95155),r=s(12115),n=s(25016);let l=r.forwardRef((e,a)=>{let{className:s,type:r,...l}=e;return(0,t.jsx)("input",{type:r,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",s),ref:a,...l})});l.displayName="Input"},67001:(e,a,s)=>{s.d(a,{T:()=>l});var t=s(95155),r=s(12115),n=s(25016);let l=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)("textarea",{className:(0,n.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",s),ref:a,...r})});l.displayName="Textarea"},90235:(e,a,s)=>{s.d(a,{J:()=>d});var t=s(95155),r=s(12115),n=s(32894),l=s(83101),i=s(25016);let c=(0,l.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)(n.b,{ref:a,className:(0,i.cn)(c(),s),...r})});d.displayName=n.b.displayName},97003:(e,a,s)=>{s.d(a,{$:()=>d});var t=s(95155),r=s(12115),n=s(46673),l=s(83101),i=s(25016);let c=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,a)=>{let{className:s,variant:r,size:l,asChild:d=!1,...o}=e,m=d?n.DX:"button";return(0,t.jsx)(m,{className:(0,i.cn)(c({variant:r,size:l,className:s})),ref:a,...o})});d.displayName="Button"}}]);

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.