1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2931],{7922:(e,r,i)=>{"use strict";i.r(r),i.d(r,{__N_SSP:()=>W,default:()=>L});var t=i(37876),n=i(14232),a=i(43395),s=i(37539),l=i(59985),o=i(6108),d=i(34235),p=i(85609),c=i(42417),m=i(81136),u=i(37124),h=i(50202),f=i(91408),x=i(74023),A=i.n(x),j=i(40123),S=i.n(j),N=i(10841),y=i.n(N),g=i(94085);i(8994);var v=i(86935),q=i(46297),b=i(27661),P=i(58190),T=i(80333),F=i(73408),w=i(47258),C=i(6370),_=i(33164),I=i(55153),Y=i(89099),B=i.n(Y),z=i(78246),E=i(72301),O=i(36905),k=i(14500),D=i(48313),V=i(24746),M=i(567);let R=(0,k.t)();var W=!0;let L=e=>{let{customerInfo:r,location:i}=e,{executeRecaptcha:x}=(0,O._Y)(),{hideLoading:j,showLoading:N}=(0,_.n)(),Y=(0,f.Ik)({email:(0,f.Yj)().email("Email Address is invalid.").required("Email is required."),firstName:(0,f.Yj)().required("First Name is required."),lastName:(0,f.Yj)().required("Last Name is required."),preferredDay:(0,f.p6)().required("Preferred Day is required.").max(y()().add(3,"months").format("MM/DD/yyyy")),petSpecies:(0,f.Yj)().required("Pet's Species is required."),petBreed:(0,f.Yj)().when("petSpecies",(e,r)=>"Other"!==e[0]?r.required("Pet's Breed is required."):r),petName:(0,f.Yj)().required("Pet's First Name is required.").matches(/^[A-Za-z\u00C0-\u1EF9]*$/,"Pet's name should only contain alphabetic characters.").test("petName","Pet's name must be between 2 and 100 characters.",e=>e&&e.length>=2&&e.length<=100),preferredTime:(0,f.Yj)().required("Preferred Time is required."),phoneNumber:(0,f.Yj)().phone().required("Phone number is required.").test("phone","Phone number is invalid.",e=>(0,M.Q7)(e)),locationId:(0,f.ai)().required("Clinic is required."),petSpecificSpecies:(0,f.Yj)().when("petSpecies",(e,r)=>"Other"===e[0]?r.required("Pet's Specific Species is required."):r).matches(/^[aA-zZ\s]+$/,"Only alphabets are allowed for this field ")}),k=(0,v.j)(),[W,L]=(0,n.useState)(""),[Z,$]=(0,n.useState)(!1),H=(0,v.G)(e=>e.breedsSlice.data),J=(0,v.G)(e=>e.siteLocationSlice.locations),U=(0,V.st)(r),{setAlert:X}=(0,I.Z)();return(0,n.useEffect)(()=>{(async()=>{k((0,C.X)())})()},[k]),(0,n.useEffect)(()=>{(async()=>{L(await (0,V.Me)(i))})()},[i]),(0,t.jsx)(a.A,{children:(0,t.jsx)(u.A,{component:"section",mb:5,pt:2,children:(0,t.jsx)(s.A,{container:!0,spacing:4,justifyContent:"center",children:(0,t.jsxs)(s.A,{size:{xs:12,md:6},children:[(0,t.jsx)(l.A,{variant:"h1",mb:2,textAlign:"left",children:"Request An Appointment"}),(0,t.jsx)(l.A,{variant:"paragraph-lg",textAlign:"left",children:Z?"Thank you for requesting your appointment. Someone from our office will contact you shortly to confirm a date and time for your appointment.":"If you would like to request an appointment, please fill out and submit the form below. Please note that this is only a request, someone from our office will contact you shortly to confirm a date and time for your appointment."}),!Z&&(0,t.jsx)(l.A,{variant:"paragraph-lg",textAlign:"left",children:"Please Note: For all Emergency or Urgent Care related needs, please call or visit your clinic directly."}),(0,t.jsx)(h.l1,{initialValues:{email:r.email||"",firstName:r.firstName||"",lastName:r.lastName||"",reasonVisit:"",preferredDay:y()().toISOString(),marketingId:i.marketingId,phoneNumber:(0,M.ii)(U?.value),petSpecies:"Dog",petBreed:"",preferredTime:"",petName:"",petSpecificSpecies:"",locationId:i.id},enableReinitialize:!0,validationSchema:Y,onSubmit:async(e,r)=>{let{setSubmitting:i}=r;i(!0);try{if(N(),!x)return;if(N(),!await (0,D._)(e.email))return void X("This email is invalid. Please enter a valid email.","error");let r=await x("requestAppointment"),i=(0,V.I_)(J,e.locationId),t=i?.vanityName,n={...e,marketingId:i?.marketingId,phoneNumber:e.phoneNumber.replace("+1",""),clinicName:t,petSpecies:"Other"===e.petSpecies?e.petSpecificSpecies:e.petSpecies,token:r};(await fetch("/api/customers/request-appointment",{method:"POST",body:JSON.stringify(A()(n,"Other"===e.petSpecies?["petSpecificSpecies","petBreed"]:["petSpecificSpecies"]))})).ok?($(!0),Z&&window.scrollTo({top:0})):X("Oops something went wrong!","error")}catch(e){R.error(`Failed to POST Request Appointment: ${JSON.stringify(e)}`);return}finally{j()}},children:e=>{let{values:r,errors:n,touched:a,handleChange:l,handleSubmit:f,setFieldValue:x,handleBlur:A,isValid:j,dirty:N,isSubmitting:v}=e;return(0,t.jsx)(u.A,{component:h.lV,onSubmit:f,mt:4,children:(0,t.jsx)(E.A,{children:(0,t.jsxs)(s.A,{container:!0,columnSpacing:5,rowSpacing:3,children:[!Z&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"locationId",children:"Location *"}),(0,t.jsx)(T.A,{fullWidth:!0,required:!0,id:"locationId",name:"locationId",onChange:e=>{l(e);let r=(0,V.I_)(J,e.target.value);B().push({pathname:"/request-appointment",query:{locationId:r?.marketingId}},void 0,{shallow:!0})},onBlur:A,value:r.locationId,defaultText:"Make A Selection",displayEmpty:!0,error:a.locationId&&!!n.locationId,readOnly:!S()(i)})]}),(0,t.jsxs)(s.A,{size:{md:6,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"name",children:"First Name *"}),(0,t.jsx)(o.A,{required:!0,placeholder:"First Name",variant:"outlined",id:"firstName",name:"firstName",value:r.firstName,onChange:l,onBlur:A,error:a.firstName&&!!n.firstName,helperText:a.firstName&&n.firstName})]}),(0,t.jsxs)(s.A,{size:{md:6,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"name",children:"Last Name *"}),(0,t.jsx)(o.A,{required:!0,placeholder:"Last Name",variant:"outlined",id:"lastName",name:"lastName",value:r.lastName,onChange:l,onBlur:A,error:a.lastName&&!!n.lastName,helperText:a.lastName&&n.lastName})]}),(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"email",children:"Email *"}),(0,t.jsx)(o.A,{required:!0,placeholder:"Enter Email Address",variant:"outlined",id:"email",name:"email",value:r.email,onChange:l,onBlur:A,error:a.email&&!!n.email,helperText:a.email&&n.email})]}),(0,t.jsx)(s.A,{size:{md:12,xs:12},children:(0,t.jsx)(w.A,{id:"phoneNumber",label:"Phone *",value:r.phoneNumber,onBlur:A,onCh
1ange:e=>x("phoneNumber",e,!0),error:a.phoneNumber&&!!n.phoneNumber,placeholder:"(123) 456-7890",helperText:a.phoneNumber&&n.phoneNumber})}),(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"petName",children:"Pet's First Name *"}),(0,t.jsx)(o.A,{required:!0,placeholder:"Enter Pet's First Name",variant:"outlined",id:"petName",name:"petName",value:r.petName,onChange:l,onBlur:A,error:a.petName&&!!n.petName,helperText:a.petName&&n.petName})]}),(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"petSpecies",children:"Pet's Species *"}),(0,t.jsx)(d.A,{fullWidth:!0,displayEmpty:!0,required:!0,id:"petSpecies",name:"petSpecies",inputProps:{"aria-label":"Without label"},onChange:e=>{l(e),x("petBreed","")},onBlur:A,value:r.petSpecies,error:a.petSpecies&&!!n.petSpecies,children:[...q.H6,"Other"].map(e=>(0,t.jsx)(p.A,{value:e,children:e},e))})]}),"Other"===r.petSpecies?(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"petSpecificSpecies",children:"Please Specify Your Petâs Species *"}),(0,t.jsx)(o.A,{required:!0,placeholder:"Eg: Horse, Bird, Cow, Snake, etc.",variant:"outlined",id:"petSpecificSpecies",name:"petSpecificSpecies",value:r.petSpecificSpecies,onChange:l,onBlur:A,error:a.petSpecificSpecies&&!!n.petSpecificSpecies,helperText:a.petSpecificSpecies&&n.petSpecificSpecies})]}):(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"petBreed",children:"Pet's Breed *"}),(0,t.jsx)(b.A,{id:"petBreed",value:(0,V.ht)(H,r.petBreed)||null,onChange:(e,r)=>{x("petBreed",r?.breedName)},options:(0,V.MN)(H,"Dog"===r.petSpecies?1:2)||[],variant:"breed"},r.petSpecies)]}),(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"preferredTime",children:"Preferred Time *"}),(0,t.jsxs)(d.A,{fullWidth:!0,displayEmpty:!0,required:!0,id:"preferredTime",name:"preferredTime",inputProps:{"aria-label":"Without label"},onChange:l,onBlur:A,value:r.preferredTime,error:a.preferredTime&&!!n.preferredTime,children:[(0,t.jsx)(p.A,{value:"",disabled:!0,children:"Make A Selection"}),q.Wn.map(e=>(0,t.jsx)(p.A,{value:e,children:e},e))]})]}),(0,t.jsxs)(s.A,{size:{md:12,xs:12},children:[(0,t.jsx)(P.A,{htmlFor:"preferredDay",children:"Preferred Day *"}),(0,t.jsx)(F.A,{id:"preferredDay",value:r.preferredDay,required:!0,autoFocus:!0,onChange:e=>x("preferredDay",y()(e.target.value).toISOString()),inputProps:{min:y()().format("YYYY-MM-DD"),max:y()().add(3,"months").format("YYYY-MM-DD")}})]}),(0,t.jsxs)(s.A,{textAlign:"start",size:12,children:[(0,t.jsx)(P.A,{htmlFor:"reasonVisit",children:"What's The Reason For Your Visit?"}),(0,t.jsx)(u.A,{children:(0,t.jsx)(o.A,{multiline:!0,minRows:4,placeholder:"Please provide any additional information regarding your visit.",id:"reasonVisit",name:"reasonVisit",value:r.reasonVisit,onChange:l,error:a.reasonVisit&&!!n.reasonVisit,helperText:a.reasonVisit&&n.reasonVisit})})]}),(0,t.jsx)(s.A,{textAlign:"start",size:12,children:(0,t.jsx)(P.A,{required:!0,htmlFor:"require",color:z.A.palette.grey[600],children:"*Required Field"})})]}),g.Fr&&!Z&&(0,t.jsx)(s.A,{size:6,children:(0,t.jsx)(u.A,{display:"flex",justifyContent:"center",children:(0,t.jsx)(c.A,{id:"Sect1_CTA2",variant:"text",children:(0,t.jsx)(m.A,{href:W||"/",underline:"none",children:"Cancel"})})})}
1),(0,t.jsx)(s.A,{size:{xs:Z?12:6,md:12},children:(0,t.jsx)(u.A,{display:"flex",justifyContent:"center",children:(0,t.jsx)(c.A,{disabled:!(j&&(Z||N))||v,variant:Z?"outlined":"primary",type:Z?"button":"submit",fullWidth:!Z,id:"RequestAppointment_CTA",children:Z?(0,t.jsx)(m.A,{href:"/",underline:"none",children:"Return To Homepage"}):g.Fr?"Continue":"Request Appointment"})})})]})})})}})]})})})})}},8994:(e,r,i)=>{"use strict";var t=i(37224);function n(e,r){var i=Array.prototype.slice.call(r);return i.push(t.A),e.apply(this,i)}var a=i(91730),s=i(77468),l=i(91408),o="phone",d=function(e){return"string"==typeof e&&function(){return n(a.J_,arguments)}(e)};l.Zg(l.Yj,o,function(e,r){void 0===e&&(e="US");var i=("string"==typeof e?[e]:[].concat(e)).filter(d);i.length||(i=["US"]);var t="string"==typeof r&&r?r:"${path} must be a valid phone number for region"+(i.length>1?"s":"")+" "+i.join(", ");return this.test(o,t,function(e){try{if(void 0===e||""===e)return!0;return i.reduce(function(r,i){var t=function(){return n(s.A,arguments)}(e,i);return r||t},!1)}catch(e){return!1}})})},79169:(e,r,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/request-appointment",function(){return i(7922)}])}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=79169)),_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.