PageSourceSearch

https://tymortech.com/_next/static/chunks/app/(Pages)/contact-us/page-9288eee4e2924a7b.js

js tymortech.com collected 2026-10-07 16:47:29 UTC 8,415 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1159],{8971:function(e,s,r){Promise.resolve().then(r.t.bind(r,2972,23)),Promise.resolve().then(r.bind(r,1313))},5523:function(e,s,r){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"RouterContext",{enumerable:!0,get:function(){return t}});let t=r(7043)._(r(2265)).default.createContext(null)},1313:function(e,s,r){"use strict";r.d(s,{default:function(){return d}});var t=r(7437),a=r(2265),l=r(9501);let n=e=>"string"!=typeof e?"":e.trim().replace(/[<>]/g,""),m=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),o=["Managed IT Services","Cloud / DevOps","Cybersecurity","Custom Software","Consulting","Holobox Technology","Other"],i=["Google","Referral","LinkedIn","Event / Conference","Other"];function d(){let{register:e,handleSubmit:s,reset:r,formState:{errors:d,isSubmitting:c}}=(0,l.cI)({defaultValues:{leadSource:"Website Contact Form"}}),[u,x]=(0,a.useState)(null),h=async e=>{try{x(null);let s={...e,companyName:n(e.companyName),firstName:n(e.firstName),lastName:n(e.lastName),email:n(e.email),phone:n(e.phone),message:n(e.message),service:n(e.service),referral:n(e.referral),leadSource:n(e.leadSource)};if(!m(s.email)){x("error");return}let t=await fetch("/api/dynamics-crm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),a=await t.json();t.ok&&a.success?(x("success"),r(),setTimeout(()=>{x(null)},5e3)):(x("error"),console.error("Error submitting form - Status:",t.status),console.error("Error details:",a),setTimeout(()=>{x(null)},8e3))}catch(e){x("error"),console.error("Error submitting form - Exception:",e),console.error("Error message:",e.message),setTimeout(()=>{x(null)},8e3)}};return(0,t.jsxs)("form",{onSubmit:s(h),className:"grid gap-4 sm:gap-5 lg:gap-6",children:[(0,t.jsx)("input",{type:"hidden",...e("leadSource")}),"success"===u&&(0,t.jsxs)("div",{className:"alert alert-success shadow-lg rounded-lg",children:[(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("span",{children:"Thank you! Your message has been submitted successfully. We'll be in touch soon!"})]}),"error"===u&&(0,t.jsxs)("div",{className:"alert alert-error shadow-lg rounded-lg",children:[(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("span",{children:"Oops! Something went wrong. Please try again or contact us directly."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Company Name"}),(0,t.jsx)("input",{type:"text",placeholder:"Company Name",className:"input input-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.companyName?"input-error":""),...e("companyName",{required:"Company name is required",minLength:{value:2,message:"Too short"}})}),d.companyName&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.companyName.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Company Address"}),(0,t.jsx)("input",{type:"text",placeholder:"Company Address",className:"input input-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.companyAddress?"input-error":""),...e("companyAddress",{required:"Address is required"})}),d.companyAddress&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.companyAddress.message})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"First Name"}),(0,t.jsx)("input",{type:"text",placeholder:"First Name",className:"input input-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.firstName?"input-error":""),...e("firstName",{required:"First name is required",minLength:{value:2,message:"Too short"}})}),d.firstName&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.firstName.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Last Name"}),(0,t.jsx)("input",{type:"text",placeholder:"Last Name",className:"input input-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.lastName?"input-error":""),...e("lastName",{required:"Last name is required",minLength:{value:2,message:"Too short"}})}),d.lastName&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.lastName.message})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Email Address"}),(0,t.jsx)("input",{type:"email",placeholder:"Email Address",className:"input input-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.email?"input-error":""),suppressHydrationWarning:!0,...e("email",{required:"Email is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}})}),d.email&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.email.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Phone Number"}),(0,t.jsx)("input",{type:"tel",placeholder:"Phone Number",className:"input input-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.phone?"input-error":""),...e("phone",{required:"Phone number is required",pattern:{value:/^[\+]?[1-9][\d]{0,15}$/,message:"Invalid phone number"}})}),d.phone&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.phone.message})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Services Interested In"}),(0,t.jsxs)("select",{className:"select select-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.service?"select-error":""),...e("service",{required:"Please select a service"}),children:[(0,t.jsx)("option",{value:"",children:"Select a service"}),o.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),d.service&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.service.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"How did you hear about us?"}),(0,t.jsxs)("select",{className:"select select-bordered w-full rounded-lg text-sm sm:text-base h-10 sm:h-12 ".concat(d.referral?"select-error":""),...e("referral",{required:"Please select how you heard about us"}),children:[(0,t.jsx)("option",{value:"",children:"Select an option"}),i.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),d.referral&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.referral.message})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm sm:text-base font-medium mb-2",children:"Message"}),(0,t.jsx)("textarea",{placeholder:"Tell us about your project or requirements...",rows:4,className:"textarea textarea-bordered w-full rounded-lg text-sm sm:text-base ".concat(d.message?"textarea-error":""),...e("message",{required:"Message is required",minLength:{value:10,message:"Message is too short"}})}),d.message&&(0,t.jsx)("p",{className:"mt-1 text-xs text-error",children:d.message.message})]}
1),(0,t.jsx)("button",{type:"submit",disabled:c,className:"btn btn-primary w-full h-10 sm:h-12 lg:h-14 rounded-lg text-sm sm:text-base lg:text-lg font-semibold mt-2 sm:mt-4 hover:scale-105 transition-all duration-300",children:c?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"loading loading-spinner loading-sm"}),"Submitting..."]}):"SUBMIT"})]})}}},function(e){e.O(0,[2972,9501,2971,2117,1744],function(){return e(e.s=8971)}),_N_E=e.O()}]);

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.