PageSourceSearch

https://www.renault.com.au/2621-15ac6c72b9268f6a86e7.js

js renault.com.au collected 2026-10-05 07:31:41 UTC 12,510 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2621],{42621:function(e,a,o){o.r(a),o.d(a,{FormBookService:function(){return X}});var i=o(63696),t=o(23224),n=o(51149),s=o(21698),r=o(10898),l=o(72407),d=o(22485),m=o(17546),c=o(97074),p=o(2290),u=o(74447),f=o(79124),h=o(51089),T=o(13276),g=o(79511),k=o(8593),D=o(40675),y=o(34995),S=o(52466),C=o(65788),N=o(89941),v=o(90287),I=o(50213),b=o(3974);var O=o(62741),P=o(4740),Y=o(41129),L=o(48136),F=o(37771),U=o(26443),$=o(78887),M=o(98335),w=o(46035),R=o(19951),V=o(32120),x=o(52654),A=o(30913),H=o(20140),q=o(19023),E=o(4575),W=o(68102),K=o(94300),_=o(84741),B=o(83006),j=o(53974),G=o(72418),z=o(97816),J=o(91785);const Q=({siteType:e,formShortName:a,locationNamesIds:o,uniqueId:t,otherInfo:n,handleErrors:s,handleOtherInfoChange:l,datePickerSettings:m,businessHourOnDropOffDate:c,businessHourOnPickUpDate:u,dropOffDate:f,handleDropOffDateChange:h,pickUpDate:T,handlePickUpDateChange:g,dropoffAndPickupTime:k,handleDropoffAndPickupTimeChange:D,isPickUpDateTime:y=!0,showLocations:S=!0})=>{const C=e===p.D.dealer,N=e===p.D.oem,v=d.t.dealerPickerSettings.enabled&&N,I=!!k.dropOffTime&&(k.dropOffTime<c.openTime||k.dropOffTime>c.closeTime),b=!!k.pickUpTime&&(k.pickUpTime<u.openTime||k.pickUpTime>u.closeTime);return(0,J.Y)(i.Fragment,null,C&&S&&(0,J.Y)(i.Fragment,null,o.length>1&&(0,J.Y)("div",{className:"classImFormInputRow",css:$.lp},(0,J.Y)(G.SelectLabelNestedControlled,{idName:`${a}Location-${t}`,isRequired:!0,options:[{value:"",text:"Please Select"}].concat((0,K.A)(o)),selectValueKey:"dealerLocation",selectValue:n.dealerLocation||"",handleChange:l},"Please choose a preferred location")),1===o.length&&(0,J.Y)(E.FormSectionHeading,{formSectionHeadingCustom:B.KI},`Location: ${o[0].text}`)),(0,J.Y)("div",{className:"classImFormInputRow",css:[$.lp,$.bW,""]},(0,J.Y)(j.DatePickerLabelNested,(0,W.A)({isRequired:!0,idName:`${a}DropOffDate-${t}`,selected:f,onChange:e=>h(e),placeholderText:"Drop Off Date",disabled:S&&C&&(0,r.uG)(o)&&!n.dealerLocation},m),"Preferred Drop Off Date"),(0,J.Y)(R.InputLabelNestedControlled,{isRequired:!0,idName:`${a}DropOffTime-${t}`,typeName:"time",inputValue:k.dropOffTime,inputValueKey:"dropOffTime",handleChange:D,min:c.openTime,max:c.closeTime,disabled:!c.openTime||!c.closeTime},"Preferred Drop Off Time")),I&&(0,J.Y)("span",{css:[x.wl,x.EY,""]},`The opening hours on your chosen drop off date are ${(0,_.c)(c.openTime)} - ${(0,_.c)(c.closeTime)}. Please change your drop off time.`),y&&!v&&(0,J.Y)(i.Fragment,null,(0,J.Y)("div",{className:"classImFormInputRow",css:[$.lp,$.bW,""]},(0,J.Y)(j.DatePickerLabelNested,(0,W.A)({isRequired:!0,idName:`${a}PickUpDate-${t}`,selected:T,onChange:e=>g(e),placeholderText:"Pick Up Date",disabled:S&&C&&(0,r.uG)(o)&&!n.dealerLocation},m),"Preferred Pick Up Date"),(0,J.Y)(R.InputLabelNestedControlled,{isRequired:!0,idName:`${a}PickUpTime-${t}`,typeName:"time",inputValue:k.pickUpTime,inputValueKey:"pickUpTime",handleChange:D,min:u.openTime,max:u.closeTime,disabled:!u.openTime||!u.closeTime},"Preferred Pick Up Time")),b&&(0,J.Y)("span",{css:[x.wl,x.EY,""]},`The opening hours on your chosen pick up date are ${(0,_.c)(u.openTime)} -${(0,_.c)(u.closeTime)}. Please change your pick up time.`)),v&&(0,J.Y)(z.FormSectionDealerLocator,{handleErrors:s}
1))},X=({formOnModal:e=!1,formId:a,closeFormModal:o,imFormInputRowCustom:W,specialsReferenceCode:K="",specialTitle:_="",specialSlug:B="",specialId:j="",formHeading:G="",dealerLocatorId:z="",dealerLocatorCode:X="",showLocations:Z=!0})=>{const{i18n:ee}=(0,t.Bd)(),{addressTypes:ae,formBookService:oe,messages:ie}=m.U,te=(0,b.j)(),{siteType:ne}=te,se=ne===p.D.oem,re=ne===p.D.dealer,le=ne===p.D.group,de=d.t.dealerPickerSettings.enabled&&se,me=!e,ce=me?M.Y_:U.v,{locationNamesIds:pe,datePickerSettings:ue,dropOffDate:fe,pickUpDate:he,businessHourOnDropOffDate:Te,businessHourOnPickUpDate:ge,dropoffAndPickupTime:ke,handleLocationChange:De,handleDropOffDateChange:ye,handlePickUpDateChange:Se,handleDropoffAndPickupTimeChange:Ce}=(e=>{const a=(0,I.v)(),o=(0,b.j)(),{serviceBookingDaysInAdvance:t}=o.bookingSettings||{},{openTimeFallback:n,closeTimeFallback:s}=m.U.formBookService||{},l=n||"00:00",d=s||"23:59",{0:c,1:p}=(0,i.useState)(null),{0:u,1:f}=(0,i.useState)(null),{0:h,1:T}=(0,i.useState)(null),{0:g,1:k}=(0,i.useState)({dropOffTime:"",pickUpTime:""}),{0:D,1:y}=(0,i.useState)({openTime:"",closeTime:""}),{0:S,1:O}=(0,i.useState)({openTime:"",closeTime:""}),P=a.find((e=>e.info.isPrimary)),Y=a.filter((e=>e.departments.some((e=>"Service"===e.departmentType)))),L=(0,r.uG)(Y),F=!L&&!!P,U=!L&&!F&&(0,r.uG)(a),$=(0,v.U5)(L?Y:F?[P]:U?a:[]),M=L?$.map((e=>({...e,text:`${e.text} (Service Department)`}))):$,{operatingWeek:w,operatingWeekExceptions:R}=c||{},{isOpenSunday:V,isOpenMonday:x,isOpenTuesday:A,isOpenWednesday:H,isOpenThursday:q,isOpenFriday:E,isOpenSaturday:W,openTimeSunday:K,openTimeMonday:_,openTimeTuesday:B,openTimeWednesday:j,openTimeThursday:G,openTimeFriday:z,openTimeSaturday:J,closeTimeSunday:Q,closeTimeMonday:X,closeTimeTuesday:Z,closeTimeWednesday:ee,closeTimeThursday:ae,closeTimeFriday:oe,closeTimeSaturday:ie}=w||{},te=c?[V,x,A,H,q,E,W].map((e=>!!e)):[],ne=c?[K,_,B,j,G,z,J]:[],se=c?[Q,X,Z,ee,ae,oe,ie]:[],re=e=>null==R?void 0:R.find((a=>new Date(`${a.date}T00:00:00`).getTime()===e.getTime())),le=e=>{if(!e)return void y({openTime:"",closeTime:""});const a=re(e);y(a?{openTime:a.openTime||l,closeTime:a.closeTime||d}:{openTime:ne[e.getDay()]||l,closeTime:se[e.getDay()]||d})},de=e=>{if(!e)return void O({openTime:"",closeTime:""});const a=re(e);O(a?{openTime:a.openTime||l,closeTime:a.closeTime||d}:{openTime:ne[e.getDay()]||l,closeTime:se[e.getDay()]||d})};return{locationNamesIds:M,datePickerSettings:{filterDate:e=>{const a=re(e);if(a)return!!a.isOpen;const o=e.getDay();return(0,r.VP)(te)&&0!==o&&6!==o||te[o]},minDate:(0,N.fi)(new Date,null!=t?t:3),maxDate:(0,N.PS)(new Date,6),showDisabledMonthNavigation:!0,showTimeSelect:!1,dateFormat:(0,C.q)(e)},dropOffDate:u,pickUpDate:h,businessHourOnDropOffDate:D,businessHourOnPickUpDate:S,dropoffAndPickupTime:g,handleLocationChange:e=>{if(L){const a=Y.find((a=>a.info.id===e)),o=null==a?void 0:a.departments.find((e=>"Service"===e.departmentType));p(o)}if(F&&p(P),U){const o=a.find((a=>a.info.id===e));p(o)}},handleDropOffDateChange:e=>{f(e),le(e);const a=e&&(!h||h<e);a&&(T(e),de(e)),k((e=>({...e,dropOffTime:"",pickUpTime:a?"":e.pickUpTime})))},handlePickUpDateChange:e=>{T(e),de(e);const a=e&&(!u||u>e);a&&(f(e),le(e)),k((e=>({...e,dropOffTime:a?"":e.dropOffTime,pickUpTime:""})))},handleDropoffAndPickupTimeChange:e=>{k((a=>({...a,...e})))}}})(ee.language),Ne=B?(0,D.b)(B):"",{0:ve,1:Ie}=(0,i.useState)(""),be=c.ec.FormBookService,{heading:Oe,formShortName:Pe}=be,{handleFormOpen:Ye,handleFormInteracted:Le}=(0,S.Y)(Pe),{0:Fe,1:Ue}=(0,i.useState)({}),{0:$e,1:Me}=(0,i.useState)(!1),{0:we,1:Re}=(0,i.useState)(!1),{isDealerPayload:Ve,preferredDealerPayload:xe}=(0,O.h)(),Ae={...se&&{addressType:ae.private.value},suburb:"",state:"",year:"",make:"",model:"",odometer:"",registration:"",vehicleServiced:!1,comments:"",...oe.isMarketing&&{marketing:oe.isMarketingChecked},...oe.isTerms&&{terms:oe.isTermsChecked},companyName:""},[He,qe]=(0,Y.Mj)(u.fD,{}),{0:Ee,1:We}=(0,i.useState)({...Ae}),Ke=e=>{"string"!=typeof e&&(qe((a=>({...a,...e}))),Le())},_e=e=>{"object"==typeof e&&null!==e&&(We({...Ee,...e}),Le(),"dealerLocation"in e&&"string"==typeof e.dealerLocation&&(De(e.dealerLocation),ye(null),Se(null)))},{0:Be,1:je}=(0,i.useState)(!1),{0:Ge,1:ze}=(0,i.useState)(!1),Je=()=>{je(!1),Re(!1),We({...Ae}),ye(null),Se(null)},Qe=()=>{const e={formId:parseInt(a,10),...z&&{dealerLocatorId:z},...X&&{dealerLocatorCode:X},specialsReferenceCode:K,specialTitle:_,specialUrl:Ne,specialId:j,firstName:null==He?void 0:He.firstName,lastName:null==He?void 0:He.lastName,email:null==He?void 0:He.email,phone:null==He?void 0:He.phone,...Ve&&xe,dropoffDate:(0,k.zU)(fe,ee.language),dropoffTime:(0,k.cj)(ke.dropOffTime),...!de&&oe.isPickupDateTime&&{pickupDate:(0,k.zU)(he,ee.language),pickupTime:(0,k.cj)(ke.pickUpTime)},...Ee};return(0,n.z)(e,r.Po)},{handleSubmitWithReCaptcha:Xe,recaptchaReady:Ze,isLoading:ea}=(0,P.T)({handleSubmit:async()=>{oe.isPickupDateTime&&(null==fe?void 0:fe.toDateString())===(null==he?void 0:he.toDateString())&&ke.dropOffTime>ke.pickUpTime&&!de?alert("Drop off time needs to come earlier than the pick up time."):(await(0,T.M)(He,qe),(0,f.$)("Hard Lead","Service Booking Form"),(0,y.t)({formId:parseInt(a,10),formShort
1Name:Pe}),(0,g.JP)(),me&&je(!0),me||ze(!0))},errors:Fe,setFormErrorStatus:Me,setSubmitted:Re});(0,i.useEffect)((()=>{(0,i.startTransition)((()=>{Ie((0,s.A)()),re&&1===pe.length&&_e({dealerLocation:pe[0].value})}))}),[]);const aa=(0,L.S)((()=>{(0,h.QY)({eventName:l.R.formOpen,eventInfo:{form_name:Pe,form_category:"lead_aftersales",form_type:e?"modal":"embedded",form_step_name:"start",form_step_number:"step-0"}}),Ye()})),oa=[$.lp,W],ia=[$.lp,$.bW];return(0,J.Y)(i.Fragment,null,!Ge&&(0,J.Y)("div",{ref:aa,className:"classStandardComponent classStandardForm",css:ce},(0,J.Y)("div",{css:M.cU},(0,J.Y)("form",{css:M.ao,id:Pe,name:Pe,acceptCharset:"utf-8",onSubmit:Xe},(0,J.Y)(q.h,{formOnPage:me,isSubmitted:we,isFormErrorStatus:$e},G||Oe),(0,J.Y)("div",{css:$.uf},(0,J.Y)("div",{className:"classImFormCol",css:$.hL},(0,J.Y)(A.o,{formShortName:Pe,uniqueId:ve,userInfo:He,handleUserInfoChange:Ke,getFormErrorClassName:e=>$e&&Fe[e]?"classFormError":"",setErrors:Ue,otherInfo:Ee,handleOtherInfoChange:_e,showAddressType:se&&oe.isAddressType,isPostcode:oe.isPostcode})),(0,J.Y)("div",{className:"classImFormCol",css:$.hL},(0,J.Y)(E.FormSectionHeading,null,"Your Vehicle Details"),(0,J.Y)("div",{className:"classImFormInputRow",css:oe.isMake?ia:oa},(0,J.Y)(R.InputLabelNestedControlled,{idName:`${Pe}Year-${ve}`,typeName:"number",placeholder:"Year",inputValueKey:"year",inputValue:Ee.year||"",handleChange:_e},"Year"),oe.isMake&&(0,J.Y)(R.InputLabelNestedControlled,{idName:`${Pe}Make-${ve}`,typeName:"text",placeholder:"Make",inputValueKey:"make",inputValue:Ee.make||"",handleChange:_e},"Make")),(0,J.Y)("div",{className:"classImFormInputRow",css:oe.isModel?ia:oa},oe.isModel&&(0,J.Y)(R.InputLabelNestedControlled,{idName:`${Pe}Model-${ve}`,typeName:"text",placeholder:"Model",inputValueKey:"model",inputValue:Ee.model||"",handleChange:_e},"Model"),(0,J.Y)(R.InputLabelNestedControlled,{isRequired:!0,idName:`${Pe}Registration-${ve}`,typeName:"text",placeholder:"Registration",inputValueKey:"registration",inputValue:Ee.registration||"",handleChange:_e},"Registration")),(0,J.Y)("div",{className:"classImFormInputRow",css:[$.lp,W,""]},(0,J.Y)(R.InputLabelNestedControlled,{idName:`${Pe}Odometer-${ve}`,typeName:"number",placeholder:"Odometer",inputValueKey:"odometer",inputValue:Ee.odometer||"",handleChange:_e},"Odometer")),(0,J.Y)(E.FormSectionHeading,null,"Preferred Booking Details"),(0,J.Y)("div",{css:x.wk},(0,J.Y)("span",{css:[x.wl,x.EY,""]}
1,"Please note, a member of our team will contact you to confirm your booking date and time.")),(0,J.Y)(Q,{siteType:ne,formShortName:Pe,locationNamesIds:pe,uniqueId:ve,otherInfo:Ee,handleErrors:Ue,handleOtherInfoChange:_e,datePickerSettings:ue,businessHourOnDropOffDate:Te,businessHourOnPickUpDate:ge,dropOffDate:fe,handleDropOffDateChange:ye,pickUpDate:he,handlePickUpDateChange:Se,dropoffAndPickupTime:ke,handleDropoffAndPickupTimeChange:Ce,isPickUpDateTime:oe.isPickupDateTime,showLocations:Z}),(0,J.Y)("div",{className:"classImFormInputRow",css:[$.lp,W,""]},(0,J.Y)(w.CheckboxLabelNestedControlled,{idName:`${Pe}VehicleServiced-${ve}`,checkValue:Ee.vehicleServiced,handleChange:_e,checkValueKey:"vehicleServiced"},"Yes, my vehicle has been serviced here previously.")),(0,J.Y)(H.v,{currentForm:be,uniqueId:ve,otherInfo:Ee,handleOtherInfoChange:_e,userInfo:He,handleUserInfoChange:Ke,handleErrors:Ue,isSubmitted:we,isComments:oe.isComments,isLocations:oe.isLocations&&le,isGroupModel:oe.isGroupModel,isFooterLegalHeading:oe.isFooterLegalHeading,isMarketing:oe.isMarketing,isMarketingRequired:oe.isMarketingRequired,isTerms:oe.isTerms,isTermsRequired:oe.isTermsRequired,isAlternativeLegalText:oe.isAlternativeLegalText,isSubmitDisabled:ea||!1===Ze}))))),Be&&(0,J.Y)(F.a,{modalWrapperCustom:U.Du,modalContentCustom:U.pW,modalShowed:Be,closeModal:Je},(0,J.Y)(V.C,{formShortName:Pe,getFormData:Qe,closeMessage:Je,fmSuccessText:ie.successTextCustom}))),Ge&&(0,J.Y)(V.C,{formShortName:Pe,getFormData:Qe,closeMessage:o,fmSuccessText:ie.successTextCustom}))}}}]);

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.