1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7340],{8871:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/support/contact-form",function(){return r(45604)}])},19085:function(e,t,r){"use strict";r.d(t,{i:function(){return v}});var i=r(35944),o=r(67294),l=r(53918),n=r(22051);let a=e=>{n.Z.error({label:"MISCONFIGURED_EG_CLOUDINARY_MEDIA_ERROR",message:e})};var s=r(59722);r(48815),r(85232);let c=e=>{let t=e.split(".").pop();switch(null==t?void 0:t.toLowerCase()){case"mp4":case"mpd":case"webm":case"m3u8":return!0;default:return!1}};var u=r(14147),d=r(41074);let m=(0,u.Z)(d.j,{target:"e5a3l9r0"})(e=>e.$imgStyles);var p=r(56863);let _=e=>{if(e&&e.items)return e.items.find(e=>{var t,r;return(null==e?void 0:null===(t=e.media)||void 0===t?void 0:t[0].type)&&c(null==e?void 0:null===(r=e.media)||void 0===r?void 0:r[0].format)})},E=e=>{if(e&&e.items)return e.items.find(e=>null==e?void 0:e.featurePack)},v=o.memo(e=>{var t,r,o,n,c,u;let d=_(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.sourcesCollection),v=E(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.sourcesCollection),T=v&&(0,p.q)(null==v?void 0:v.featurePack),f=null==e?void 0:null===(u=e.data)||void 0===u?void 0:null===(c=u.sourcesCollection)||void 0===c?void 0:null===(n=c.items)||void 0===n?void 0:null===(o=n[0])||void 0===o?void 0:o.auxiliaryData,I=null==f?void 0:f.videoTitle,O=null==f?void 0:f.videoDescription;return(0,i.tZ)(m,{analytics:d?{trackPlay:()=>s.XH.videoPlayPush(d.media[0].public_id)}:null,...e,onBreakpointError:a,customDomain:l.CLOUDINARY_CNAME,cloudName:l.CLOUDINARY_CLOUD_NAME,$imgStyles:null==T?void 0:T.img,playButtonText:null==e?void 0:e.playButtonText,...I&&{videoTitle:I},...O&&{videoDescription:O}})})},79315:function(e,t,r){"use strict";r.d(t,{Y:function(){return o}});var i,o,l=r(35944),n=r(90962);(i=o||(o={})).UP="up",i.DOWN="down",i.LEFT="left",i.RIGHT="right",i.NORTHEAST="northeast",t.Z=e=>{let{className:t,fillColor:r=n.D2.white,direction:i="right"}=e;return(0,l.tZ)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",preserveAspectRatio:"none",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,l.tZ)("path",{d:"M21.24 12.192L12.248 4L11.16 5.312L17.816 11.296H3V13.088H17.784L11.16 19.072L12.248 20.384L21.24 12.192Z",fill:r,style:{transformOrigin:"50% 50%",WebkitTransformOrigin:"50% 50%",transform:"rotate(".concat((e=>{switch(e){case"up":return"-90";case"down":return"90";case"left":return"180";case"northeast":return"-45";default:return"0"}})(i),"deg)")}})})}},11980:function(e,t,r){"use strict";r.d(t,{N:function(){return o}});var i=r(35944);let o=e=>(0,i.BX)("svg",{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 31",...e,children:[(0,i.tZ)("path",{fill:"currentColor",d:"M31.938 14.203C30.128 12.35 20.335 2.329 18.5.883A3.934 3.934 0 0 0 16 0c-1.035 0-1.86.374-2.499.883C11.666 2.329 1.873 12.35.063 14.203c-.148.168-.015.433.208.433l4.263.003c.445 0 .577-.077.857-.375l1.672-1.78c1.77-1.894 6.087-6.075 7.665-7.393.593-.495 1.263-.48 1.273-.48.01 0 .68-.015 1.273.48 1.578 1.32 5.895 5.501 7.665 7.393l1.672 1.78c.28.298.412.375.857.375l4.263-.003c.222.002.354-.265.206-.433ZM.062 16.588c1.81 1.853 11.602 11.874 13.437 13.32.64.509 1.465.883 2.5.883 1.036 0 1.86-.374 2.5-.883 1.835-1.446 11.627-11.467 13.437-13.32.147-.169.014-.434-.209-.434l-4.263-.003c-.445 0-.577.078-.857.376l-1.671 1.78c-1.77 1.893-6.088 6.075-7.666 7.393-.593.495-1.263.479-1.273.479-.01 0-.68.016-1.272-.48-1.578-1.319-5.896-5.5-7.666-7.392l-1.672-1.78c-.28-.298-.411-.376-.856-.376l-4.264.003c-.219 0-.352.265-.205.434Z"}),(0,i.tZ)("path",{fill:"currentColor",d:"M14.817 18.709c-.808-.732-2.23-2.1-2.759-2.714-.241-.271-.226-.61-.226-.61s-.015-.34.226-.61c.53-.614 1.951-1.982 2.759-2.714.33-.306.41-.498.41-.873V7.027c0-.167-.197-.271-.35-.13-1.8 1.653-5.811 5.596-7.155 7.124-.644.676-.584 1.365-.584 1.365s-.058.688.584 1.366c1.346 1.528 5.356 5.47 7.155 7.125.16.139.35.052.35-.145v-4.148c0-.379-.08-.571-.41-.875ZM17.184 18.712c.808-.732 2.23-2.1 2.759-2.714.241-.27.226-.61.226-.61s.015-.339-.226-.61c-.53-.613-1.951-1.982-2.759-2.713-.33-.306-.41-.499-.41-.874V7.043c0-.197.19-.284.35-.145 1.8 1.654 5.811 5.597 7.155 7.125.642.676.584 1.365.584 1.365s.058.688-.584 1.366c-1.346 1.527-5.356 5.47-7.155 7.125-.16.138-.35.052-.35-.146v
1-4.148c.002-.377.08-.567.41-.873Z"})]})},85232:function(e,t,r){"use strict";r.d(t,{lU:function(){return m}});var i=r(86891),o=r(48815),l=r(39514);let n=e=>[...e].map(e=>{if(!e)return"";let t=(null==e?void 0:e.includes("?"))?"&fm=webp":"?fm=webP";return"".concat(e).concat(t)}),a=e=>e?[...e].map(e=>{if(!e)return"";let t=e.includes("?")?"&fm=jpg&fl=progressive":"?fm=jpg&fl=progressive";return"".concat(e).concat(t)}):[],s=e=>{if(!e)return"";let t=[...e];return 2===t.length?t.join(", ").concat(" 2x"):t.join()},c=e=>{if(!e)return!1;let t=null==e?void 0:e.split(",");return(null==t?void 0:t[0].includes(".jpg"))||(null==t?void 0:t[0].includes(".jpeg"))},u=(e,t)=>{let[r,i]=e.split("upload");return[r,"/".concat(t).concat(i)].join("upload")},d=(e,t)=>{var r,n,a,s;let{cloudinaryTransforms:c}=t,[d,m]=e,p=["(min-width: ".concat(i.AV[4],")"),"(min-width: ".concat(i.AV[3],")"),"(min-width: ".concat(i.AV[2],")"),"(max-width: ".concat(i.AV[2],")")],_=[d.raw_transformation,...c?[c]:[]].join(","),E=[d.raw_transformation,...c?[c]:[]].join(","),v=[d.raw_transformation,"w_1400,c_fit",...c?[c]:[]].join(","),T=[d.raw_transformation,"w_2800,c_fit",...c?[c]:[]].join(","),f=[null!==(r=null==m?void 0:m.raw_transformation)&&void 0!==r?r:d.raw_transformation,"w_768,c_fit",...c?[c]:[]].join(","),I=[null!==(n=null==m?void 0:m.raw_transformation)&&void 0!==n?n:d.raw_transformation,"w_1536,c_fit",...c?[c]:[]].join(","),O=u(d.original_secure_url,_),A=u(d.original_secure_url,E),h=u(d.original_secure_url,v),N=u(d.original_secure_url,T),S=u(null!==(a=null==m?void 0:m.original_secure_url)&&void 0!==a?a:d.original_secure_url,f),C=u(null!==(s=null==m?void 0:m.original_secure_url)&&void 0!==s?s:d.original_secure_url,I),y=["".concat(O,", ").concat(A," 2x"),"".concat(h,", ").concat(N," 2x"),"".concat(S,", ").concat(C," 2x"),"".concat(S,", ").concat(C," 2x")];return p.reduce((e,t,r)=>[...e,{srcSet:y[r],media:t,type:"image/webp"},{srcSet:(0,l.$N)(y[r],o.GN.JPG),media:t,type:"image/jpeg"}],[])},m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;let{smallOnly:r,uniqueLandscape:o}=t;if(e.cloudinaryMedia)return d(e.cloudinaryMedia,t);let l=[],u=[];if(!e.mobileImage&&!e.desktopImage)return null;if(!e.desktopImage){var m,p,_;return[{srcSet:s(n([null===(m=e.mobileImage)||void 0===m?void 0:m.url])),type:"image/webp"},{srcSet:(null===(p=e.mobileImage)||void 0===p?void 0:p.url)||"",type:c(null===(_=e.mobileImage)||void 0===_?void 0:_.url)?"image/jpeg":"image/png"}]}return r?(l=["(min-width: ".concat(i.AV[2],")"),"(max-width: ".concat(i.AV[2],")")],u=["".concat(e.desktopImage.sm,", ").concat(e.desktopImage.md),"".concat((null==e?void 0:e.mobileImage)?e.mobileImage.url:e.desktopImage.sm)],o&&(l=["(min-width: ".concat(i.AV[2],")"),"(max-width: ".concat(i.AV[1],") and (orientation: landscape)"),"(max-width: ".concat(i.AV[2],")")],u=["".concat(e.desktopImage.sm,", ").concat(e.desktopImage.md),"".concat(e.desktopImage.sm,", ").concat(e.desktopImage.md),"".concat(e.mobileImage?e.mobileImage.url:e.desktopImage.sm)])):o?(l=["(min-width: ".concat(i.AV[4],")"),"(min-width: ".concat(i.AV[3],")"),"(min-width: ".concat(i.AV[2],")"),"(max-width: ".concat(i.AV[1],") and (orientation: landscape)"),"(max-width: ".concat(i.AV[2],")")],u=["".concat(e.desktopImage.lg),"".concat(e.desktopImage.md,", ").concat(e.desktopImage.lg),"".concat(e.desktopImage.sm,", ").concat(e.desktopImage.md),"".concat(e.desktopImage.sm,", ").concat(e.desktopImage.md),"".concat(e.mobileImage?e.mobileImage.url:e.desktopImage.sm)]):(l=["(min-width: ".concat(i.AV[4],")"),"(min-width: ".concat(i.AV[3],")"),"(min-width: ".concat(i.AV[2],")"),"(max-width: ".concat(i.AV[2],")")],u=["".concat(e.desktopImage.lg),"".concat(e.desktopImage.md,", ").concat(e.desktopImage.lg),"".concat(e.desktopImage.sm,", ").concat(e.desktopImage.md),"".concat(e.mobileImage?e.mobileImage.url:e.desktopImage.sm)]),l.reduce((e,t,r)=>{let i=u[r],o=(null==i?void 0:i.split(","))||[],l=c(i);return[...e,{srcSet:s(n(o)),media:t,type:"image/webp"},{srcSet:l?s(a(o)):i,media:t,type:l?"image/jpeg":"image/png"}]},[])}},51811:function(e,t,r){"use strict";r.d(t,{P:function(){return i}});let i=e=>new URL(window.location.href).searchParams.get(e)},45604:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return ti},default:function(){return to}});
1var i,o,l,n,a,s,c=r(35944),u=r(11163),d=r(67294),m=r(70917),p=r(50259),_=r(61778),E=r(77327),v=r(53918),T=r(62344),f=r(48815),I=r(19188),O=r(59316),A=r(97091),h=r(74505);let N=(0,r(86609).z)();var S=r(59722);(i=n||(n={})).ZipCodeForm="ZipCodeForm",i.AppointmentForm="AppointmentForm",i.ContactInfoForm="ContactInfoForm",i.Confirm="Confirm",i.SupportInquiryReasonCodesForm="SupportInquiryReasonCodesForm",i.SupportInquiryRequiredFieldsForm="SupportInquiryRequiredFieldsForm",(o=a||(a={})).BUY_OR_LEASE_A_VEHICLE="buy-or-lease-a-vehicle",o.GEAR_SHOP_OR_VEHICLE_ORDERS="gear-shop-or-vehicle-orders",o.INTERESTED_IN_A_COMMERCIAL_FLEET="interested-in-a-commercial-fleet",o.VEHICLE_SPECS="vehicle-specs",o.VEHICLE_CARE_AND_MAINTENANCE="vehicle-care-and-maintenance",o.RIVIAN_WALL_CHARGER="rivian-wall-charger",o.REQUEST_SERVICE_OR_GET_A_STATUS_UPDATE="request-service-or-get-a-status-update",o.HOW_VEHICLE_SERVICE_WORKS="how-vehicle-service-works",o.LEGAL_SANCTIONED="legal-sanctioned",o.BOUGHT_FROM_A_THIRD_PARTY="bought-from-a-third-party",o.TRANSFER_OWNERSHIP_TO_A_FAMILY_MEMBER="transfer-ownership-to-a-family-member",o.SELLING_YOUR_VEHICLE="selling-your-vehicle",o.SCHEDULING_A_DEMO_DRIVE="scheduling-a-demo-drive",o.CANCEL_A_DEMO_DRIVE="cancel-a-demo-drive",o.RESCHEDULE_A_DEMO_DRIVE="reschedule-a-demo-drive",o.UPCOMING_EVENTS="upcoming-events",o.DATA="data",o.WARRANTY="warranty",o.GENERAL_CHARGING_QUESTIONS="general-charging-questions",o.PUBLIC_CHARGERS="public-chargers",o.HOME_CHARGING="home-charging",o.ACCOUNT="account",o.WEBSITE="website",o.INFOTAINMENT="infotainment",o.THE_RIVIAN_APP="the-rivian-app",o.ORDERS="orders",o.RETURNS="returns",o.WARRANTY_REPLACEMENTS="warranty-replacements",o.GEAR_SHOP_GENERAL_QUESTIONS="gear-shop-general-questions",o.FINANCING_AND_PAYMENTS="financing-and-payments",o.TRADE_IN="trade-in",o.REGISTRATION="registration",o.INSURANCE="insurance",o.UPCOMING_DELIVERY_APPOINTMENT="upcoming-delivery-appointment",o.OTHER="other";let C=["firstName","lastName","email"],y=[...C,"message","subscribed"],R=[...y,"optionalDocumentUpload"],g={"buy-or-lease-a-vehicle":[...C,"subscribed","salesActivityOptIn","zipCode","phoneNumber","product","inventoryType","year","month"],"gear-shop-or-vehicle-orders":R,"interested-in-a-commercial-fleet":null,"vehicle-specs":[...y,"product"],"vehicle-care-and-maintenance":[...y,"product"],"rivian-wall-charger":y,"request-service-or-get-a-status-update":null,"how-vehicle-service-works":y,"legal-sanctioned":[...C,"subscribed","documentUpload"],"bought-from-a-third-party":[...C,"subscribed","documentUpload"],"transfer-ownership-to-a-family-member":[...C,"subscribed","documentUpload","mutliFactorDriveEnabled"],"selling-your-vehicle":null,"scheduling-a-demo-drive":R,"cancel-a-demo-drive":R,"reschedule-a-demo-drive":R,"upcoming-events":null,data:null,warranty:[...C,"optionalMessage","subscribed","vin"],"general-charging-questions":y,"public-chargers":y,"home-charging":y,account:R,website:R,infotainment:null,"the-rivian-app":R,orders:R,returns:R,"gear-shop-general-questions":R,"warranty-replacements":[...C,"message","subscribed","documentUpload"],"financing-and-payments":R,"trade-in":R,registration:R,insurance:R,"upcoming-delivery-appointment":R,other:y},L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.DEFAULT_LOCALE,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;return{firstName:{required:t.VALIDATOR_FIRST_NAME},lastName:{required:t.VALIDATOR_LAST_NAME},email:{required:t.VALIDATOR_EMAIL,validator:e=>{let{value:r}=e;if(!/\S+@\S+\.\S+/.test(r))throw Error(t.VALIDATOR_VALID_EMAIL)}},phoneNumber:{required:t.VALIDATOR_PHONE_NUMBER,validator:async i=>{let{isValidPhoneNumber:o}=await Promise.all([r.e(1048),r.e(6825)]).then(r.bind(r,16825)),l=i.value,n=e.split("-")[1]||"US";if(l&&l.length&&!o(l,n))throw Error(t.VALIDATOR_VALID_PHONE_NUMBER)}},zipCode:{required:t.VALIDATOR_ZIP,validator:r=>{let{value:i}=r;if(!(v.CA_LOCALES.includes(e)?/^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] +?[0-9][A-Z][0-9]$/:/^\d{5}([-]\d{4})?$/).test(i))throw Error(t.VALIDATOR_VALID_ZIP)}}
1,message:{required:t.VALIDATOR_MESSAGE,validator:e=>{let{value:r}=e;if(r.length<50||r.length>500)throw Error(t.VALIDATOR_VALID_MESSAGE)}},optionalMessage:{validator:e=>{let{value:r}=e;if(r&&(r.length<50||r.length>500))throw Error(t.VALIDATOR_VALID_MESSAGE)}},product:{required:t.VALIDATOR_PRODUCT},inventoryType:{required:t.VALIDATOR_INVENTORY_TYPE},mutliFactorDriveEnabled:{required:t.VALIDATOR_MUTLI_FACTOR_DRIVE_ENABLED,validator:e=>{let{value:r}=e;if(!r)throw Error(t.VALIDATOR_MUTLI_FACTOR_DRIVE_ENABLED)}},subscribed:{},salesActivityOptIn:{},year:{required:t.VALIDATOR_YEAR,validator:(e,r)=>{let{value:i}=e;if(r.month.value&&i){let e=Number(r.month.value),o=Number(i),l=new Date,n=l.getMonth()+1,a=l.getFullYear();Number.isNaN(e)||Number.isNaN(o)||o!==a||!(e<n)||r.month.setErrorMessage(t.VALIDATOR_MONTH)}}},month:{required:t.VALIDATOR_MONTH,validator:(e,r)=>{let{value:i}=e;if(r.year.value&&i){let e=Number(i),o=Number(r.year.value),l=new Date,n=l.getMonth()+1,a=l.getFullYear();if(!Number.isNaN(e)&&!Number.isNaN(o)&&o===a&&e<n)throw Error(t.VALIDATOR_MONTH)}}},vin:{required:t.VALIDATOR_VIN,validator:e=>{let{value:r}=e;if(!/^[A-HJ-NPR-Z0-9]{17}$/.test(r))throw Error(t.VALIDATOR_VALID_VIN)}},optionalDocumentUpload:{validator:e=>{var r,o,l,n;let{value:a}=e;if(!a)return;let s=1048576*(null!==(l=null==i?void 0:null===(r=i.rules)||void 0===r?void 0:r.maxSizeInMB)&&void 0!==l?l:5),c=null!==(n=null==i?void 0:null===(o=i.rules)||void 0===o?void 0:o.documentUploadLimit)&&void 0!==n?n:15;if(a.length>c)throw Error(t.VALIDATOR_DOCUMENTS_LIMIT);if(!a||!Array.isArray(a))throw Error(t.VALIDATOR_DOCUMENTS);a.forEach(e=>{if(!F.includes(e.type)||e.size>s)throw Error(t.VALIDATOR_DOCUMENTS_FILE_TYPE)})}},documentUpload:{required:t.VALIDATOR_DOCUMENTS,validator:e=>{var r,o,l,n;let{value:a}=e,s=1048576*(null!==(l=null==i?void 0:null===(r=i.rules)||void 0===r?void 0:r.maxSizeInMB)&&void 0!==l?l:5),c=null!==(n=null==i?void 0:null===(o=i.rules)||void 0===o?void 0:o.documentUploadLimit)&&void 0!==n?n:15;if(a.length>c)throw Error(t.VALIDATOR_DOCUMENTS_LIMIT);if(!a||!Array.isArray(a))throw Error(t.VALIDATOR_DOCUMENTS);a.forEach(e=>{if(!F.includes(e.type)||e.size>s)throw Error(t.VALIDATOR_DOCUMENTS_FILE_TYPE)})}}}},D={subscribed:!0,salesActivityOptIn:!0},M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.DEFAULT_LOCALE,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=g[e];return{descriptors:(null==o?void 0:o.reduce((e,o)=>{let l=L(t,r,i)[o];if(!l)throw Error('Missing field "'.concat(o,'" from FIELD_VALIDATIONS object.'));return{[o]:l,...e}},{}))||{},initialState:(null==o?void 0:o.reduce((e,t)=>({...Object.keys(D).includes(t)&&{[t]:D[t]},...e}),{}))||{}}};var b=r(22416);let w=(e,t)=>null==e?void 0:e.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-topics-".concat(t)),U=(e,t)=>{var r;let i=null==t?void 0:null===(r=t.stringsCollection)||void 0===r?void 0:r.items.map(e=>null==e?void 0:e.key);return null==i?void 0:i.filter(t=>!w(e,t))},P=(e,t)=>{var r;let i=w(e,t);return null==i?void 0:null===(r=i.stringsCollection)||void 0===r?void 0:r.items.map(e=>({display:null==e?void 0:e.value,value:null==e?void 0:e.key}))},V=(e,t,r)=>{var i;let o=null==e?void 0:null===(i=e.stringsCollection)||void 0===i?void 0:i.items,l="".concat(r,"-").concat(t),n=null==o?void 0:o.find(e=>(null==e?void 0:e.key)===l);return n?n.value:null};(l=s||(s={})).CONTACT_INFO_ONLY="CONTACT_INFO_ONLY",l.CONTACT_INFO_WITH_PRODUCT_INVENTORY_SUPPLEMENT="CONTACT_INFO_WITH_PRODUCT_INVENTORY_SUPPLEMENT",l.MESSAGE="MESSAGE",l.DEFLECTION="DEFLECTION",l.PRODUCT_SELECT_WITH_MESSSAGE="PRODUCT_SELECT_WITH_MESSSAGE",l.DOCUMENT_UPLOAD="DOCUMENT_UPLOAD_ONLY",l.VIN="VIN",l.MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD="MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",l.MESSAGE_WITH_DOCUMENT_UPLOAD="MESSAGE_WITH_DOCUMENT_UPLOAD";let F=["application/pdf","image/jpeg","image/png"],x={[a.BUY_OR_LEASE_A_VEHICLE]:"CONTACT_INFO_WITH_PRODUCT_INVENTORY_SUPPLEMENT",[a.GEAR_SHOP_OR_VEHICLE_ORDERS]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.INTERESTED_IN_A_COMMERCIAL_FLEET]:"DEFLECTION",[a.VEHICLE_SPECS]:"PRODUCT_SELECT_WITH_MESSSAGE",[a.VEHICLE_CARE_AND_MAINTENANCE]:"DEFLECTION",[a.RIVIAN_WALL_CHARGER]:"DEFLECTION",[a.REQUEST_SERVICE_OR_GET_A_STATUS_UPDATE]:"DEFLECTION",[a.HOW_VEHICLE_SERVICE_WORKS]:"MESSAGE",[a.LEGAL_SANCTIONED]:"DOCUMENT_UPLOAD_ONLY",[a.BOUGHT_FROM_A_THIRD_PARTY]:"DOCUMENT_UPLOAD_ONLY",[a.TRANSFER_OWNERSHIP_TO_A_FAMILY_MEMBER]:"DOCUMENT_UPLOAD_ONLY",[a.SELLING_YOUR_VEHICLE]:"DEFLECTION",[a.SCHEDULING_A_DEMO_DRIVE]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.CANCEL_A_DEMO_DRIVE]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.RESCHEDULE_A_DEMO_DRIVE]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.UPCOMING_EVENTS]:"DEFLECTION",[a.DATA]:"DEFLECTION",[a.WARRANTY]:"VIN",[a.GENERAL_CHARGING_QUESTIONS]:"DEFLECTION",[a.PUBLIC_CHARGERS]:"DEFLECTION",[a.HOME_CHARGING]:"DEFLECTION",[a.ACCOUNT]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.WEBSITE]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.INFOTAINMENT]:"DEFLECTION",[a.THE_RIVIAN_APP]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.ORDERS]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.RETURNS]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.GEAR_SHOP_GENERAL_QUESTIONS]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.WARRANTY_REPLACEMENTS]:"MESSAGE_WITH_DOCUMENT_UPLOAD",[a.FINANCING_AND_PAYMENTS]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.TRADE_IN]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.REGISTRATION]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.INSURANCE]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.UPCOMING_DELIVERY_APPOINTMENT]:"MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD",[a.OTHER]:"MESSAGE"},q=e=>x[e]||null,Z=(e,t)=>{var r;return null==e?void 0:null===(r=e.formElements)||void 0===r?void 0:r.items.find(e=>e.key===t)},H=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.DEFAULT_LOCALE,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>
13?arguments[3]:void 0,o=M(e.customerSelectedReason||e.topic||"",t,r,i);return{descriptors:{topic:{required:r.VALIDATOR_TOPIC},customerSelectedReason:{required:r.VALIDATOR_CUSTOMER_SELECTED_REASON},...o.descriptors},initialState:{...o.initialState}}},G=(e,t)=>{var r,i;let o=null==t?void 0:null===(r=t.reasonCodes)||void 0===r?void 0:r.topic,l=null==t?void 0:null===(i=t.reasonCodes)||void 0===i?void 0:i.customerSelectedReason;o&&e.fields.topic.setValue(o),l&&e.fields.customerSelectedReason.setValue(l),!l&&o&&e.fields.customerSelectedReason.setValue(o),"DEFLECTION"!==t.formView&&(null==t?void 0:t.userDetails)&&(e.fields.firstName.setValue(t.userDetails.firstName),e.fields.lastName.setValue(t.userDetails.lastName),e.fields.email.setValue(t.userDetails.email))},B=e=>{let t=(0,b.Kd)(e),{referrer:r}=document,i=window.location.host;r&&-1!==r.indexOf(i)?e.back():e.push("/support",void 0,{locale:t})},k=e=>"other"===e?"other-general-questions":e,Y=(e,t)=>{let r=k(t);return"inquiry-form-".concat(e,"-").concat(r)},W=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.DEFAULT_LOCALE;if(!e)return[];let i=null==e?void 0:e.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-topics"),o=null==i?void 0:null===(t=i.stringsCollection)||void 0===t?void 0:t.items,l=o;return v.CA_LOCALES.includes(r)&&(l=null==o?void 0:o.filter(e=>(null==e?void 0:e.key)!=="gear-shop")),null==l?void 0:l.map(e=>({display:null==e?void 0:e.value,value:null==e?void 0:e.key}))},$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=[],r=new Date().getFullYear(),i=new Intl.DateTimeFormat(e,{year:"numeric"});for(let e=0;e<=10;e+=1){let o=new Date;o.setFullYear(r+e),t.push(i.format(o))}return t},X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",r=[];for(let i=0;i<12;i+=1){let o=new Date(2025,i,1),l=(i+1).toString().padStart(2,"0"),n=new Intl.DateTimeFormat(e,{month:t}).format(o);r.push({number:l,month:n})}return r};var j=r(46670),z=r(14147),Q=r(89385),K=r(90962);let J=(0,z.Z)("div",{target:"e195mmrs0"})("display:flex;width:100%;height:",e=>e.$isFullHeight?"100%;":"auto;"," background-color:",e=>e.$lastStep?K.D2.stone100:K.D2.stone1,";padding-top:0;",Q.w5.largerThanTabletHorizontal,"{",e=>e.$shouldRenderDesktopNavSpacing?"\n padding-top: ".concat(f.Pd,"px;\n padding-bottom: 10rem;\n \n "):"","}");var ee=r(19085),et=r(88184);let er=(0,z.Z)(et.f5,{target:"e1l7w3fe0"})(Q.w5.largerThanTabletHorizontal,"{padding-top:11.2rem;padding-bottom:5rem;}",Q.w5.largerThanDesktop,"{padding-bottom:unset;}"),ei=(0,z.Z)("div",{target:"e1l7w3fe1"})("order:2;grid-column:1 / -1;",Q.w5.largerThanTabletHorizontal,"{order:1;grid-column:1 / -4;",e=>e.$isLastStep&&"\n grid-column: 1 / -1;\n ","}",Q.w5.largerThanDesktop,"{grid-column:3 / 10;",e=>e.$isLastStep&&"\n grid-column: 1 / -1;\n ","}",Q.w5.largerThanDesktopWide,"{grid-column:2 / 9;",e=>e.$isLastStep&&"\n grid-column: 1 / -1;\n ","}"),eo=(0,z.Z)("div",{target:"e1l7w3fe2"})("order:1;grid-column:1 / -1;",e=>e.$isLastStep&&"\n display: none;\n "," ",Q.w5.largerThanTabletHorizontal,"{order:2;grid-column:-4 / -1;align-self:start;position:sticky;top:2rem;}",Q.w5.largerThanDesktop,"{grid-column:11 / -3;}",Q.w5.largerThanDesktopWide,"{grid-column:11 / -2;}"),el=(0,z.Z)("div",{target:"e1l7w3fe3"})("position:relative;display:flex;flex-grow:1;padding:0 1.6rem 5.2rem;justify-content:center;flex-direction:column;@media (min-width:744px){padding:12rem 1.6rem 12rem 8rem;justify-content:start;}",Q.w5.largerThanTabletHorizontal,"{padding:12rem 1.6rem 12rem 12rem;justify-content:start;}"),en=(0,z.Z)("div",{target:"e1l7w3fe4"})(Q.w5.largerThanTabletHorizontal,"{video{border-radius:1.2rem;}padding-right:7.7rem;}",Q.w5.largerThanDesktop,"{padding-right:0;}.video-poster,img[alt='video-poster']{display:none;}.video-js .vjs-tech{position:unset;}img{width:100%;height:auto;}"),ea=e=>{let{lastStep:t,staticData:r,children:i}=e;return r?(0,c.BX)(er,{children:[(0,c.tZ)(ei,{$isLastStep:t,children:i}),(0,c.tZ)(eo,{$isLastStep:t,children:(0,c.tZ)(en,{children:(0,c.tZ)(ee.i,{data:r,isFixedDimension:!0})})})]}):(0,c.tZ)(el,{children:i})},es=(e,t)=>{let[r,i]=(0,d.useState)(t);(0,d.useEffect)(()=>{i(t)},[t]);let o=(0,d.useCallback)(()=>{i(t=>t<e.length-1?t+1:t)},[e]),l=(0,d.useCallback)(()=>{i(e=>e>0?e-1:e)},[]),n=(0,d.useCallback)(t=>e[t],[e]),a=(0,d.useCallback)(()=>e[r],[r,e]);return{step:r,nextStep:o,prevStep:l,getStepLabel:n,getCurrentStepLabel:a,jumpToStep:(0,d.useCallback)(t=>{let r=e.indexOf(t);if(-1===r)throw Error("Step label ".concat(t," not found in steps array"));i(r)},[e]),totalSteps:e.length}},ec=()=>
1{if((0,T.C)()){let e=document.querySelector('[data-c="wizard"] [data-c="sentry"]');null==e||e.scrollIntoView()}},eu=e=>{let{staticData:t,children:r,firstStepIndex:i,shouldRenderDesktopNavSpacing:o=!0,isFullHeight:l=!1}=e,n=f.Pd,a=es(d.Children.map(r,e=>e.props.id),i),s=r[a.step],u=a.step===r.length-1;return(0,d.useEffect)(()=>{ec()},[a.step]),(0,c.BX)(J,{"data-c":"wizard",$shouldRenderDesktopNavSpacing:o,$isFullHeight:l,$lastStep:u,children:[(0,c.tZ)("div",{"data-c":"sentry",style:{position:"absolute",top:-n,left:0,width:1,height:1}}),(0,c.tZ)(ea,{lastStep:u,staticData:t,children:(0,d.cloneElement)(s,{wizardState:a})})]})};var ed=r(3972),em=r(82729),ep=r(75063);function e_(){let e=(0,em._)(["\n mutation SubmitInquiry(\n $locale: String!\n $inquiryPayload: SubmitInquiryInput!\n ) {\n submitInquiry(locale: $locale, inquiryPayload: $inquiryPayload) {\n documentUploadUrls {\n documentLabel\n uploadUrl\n }\n documents {\n contentType\n documentLabel\n documentName\n }\n rivianId\n success\n inquiryId\n isNewUser\n }\n }\n"]);return e_=function(){return e},e}function eE(){let e=(0,em._)(["\n mutation SubmitInquiry(\n $locale: String!\n $inquiryPayload: SubmitInquiryInput!\n ) {\n submitInquiry(locale: $locale, inquiryPayload: $inquiryPayload) {\n rivianId\n success\n inquiryId\n isNewUser\n }\n }\n"]);return eE=function(){return e},e}let ev=(0,ep.Ps)(e_()),eT=(0,ep.Ps)(eE()),ef=e=>{let{firstName:t,lastName:r,email:i,topic:o,customerSelectedReason:l,message:n,optionalMessage:a,product:s,zipCode:c,phoneNumber:u,subscribed:d,salesActivityOptIn:m,vin:p,documentUpload:_,optionalDocumentUpload:E,inventoryType:v,month:T,year:f,mutliFactorDriveEnabled:I}=e,O=k(l),A=Y(o,l),h=_||E;return{firstName:t,lastName:r,email:i,createSource:A,inquiryDetails:{customerSelectedReason:O,...n&&{description:n},...a&&{description:a},...s&&{product:s},...v&&{inventoryType:v},...T&&f&&{purchasingTimeline:"".concat(T,"/").concat(f)},...I&&{isMultiFactorDriveEnabled:I},...d&&{isSubscribed:d},...m&&{isOptedIntoSalesActivity:m},...p&&{vin:p},...(null==h?void 0:h.length)>0&&{documents:h.map(e=>({contentType:e.type,documentLabel:e.name,documentName:e.name}))}},...c&&{mailingAddress:{postalCode:c}},...u&&{phone:u}}},eI=()=>{let e=(0,ed.nf)();return(0,d.useCallback)(async t=>{let{formData:r,executeRecaptcha:i}=t,{customerSelectedReason:o}=r;if(!i)throw N.fire("formSubmitFailure",{customerSelectedReason:o,error:"Recaptcha not initialized"}),Error("Recaptacha not initialized");let l=await i(f.M.SUBMIT_INQUIRY);if(!l)throw N.fire("formSubmitFailure",{customerSelectedReason:o,error:"There was a problem getting a token from executeRecaptcha."}),Error("There was a problem getting a token from executeRecaptcha.");let n=r.documentUpload?ev:eT,a=ef(r),{data:s}=await e.mutate({mutation:n,variables:{inquiryPayload:{...a},locale:r.locale||v.DEFAULT_LOCALE},context:{headers:{"recaptcha-token":l,"client-name":"com.rivian.web.consumer"}}}).catch(e=>{throw N.fire("formSubmitFailure",{customerSelectedReason:o,error:e}),Error(e)});if(s.submitInquiry.documentUploadUrls){let e=s.submitInquiry.documentUploadUrls.map(async(e,t)=>{var i;let l;let n=null===(i=r.documentUpload)||void 0===i?void 0:i[t];if(!n)throw Error("Document at index ".concat(t," is missing"));try{let t=await fetch(e.uploadUrl,{method:"PUT",headers:{"Content-Type":n.type},body:n});if(!t.ok)throw Error("Failed to upload document ".concat(n.name));l=t}catch(e){N.fire("formDocumentUrlFetchFailure",{customerSelectedReason:o,error:(null==e?void 0:e.message)||"Support inquiry document url fetch failure."})}return l});if(!(await Promise.all(e)).some(e=>!e.ok))return{success:!0,isNewUser:s.submitInquiry.isNewUser,rivianId:s.submitInquiry.rivianId};throw Error("One or more document uploads failed")}if(null==s?void 0:s.submitInquiry.success)return null==s?void 0:s.submitInquiry;throw Error("Failed to submit cec inquiry form")},[e])};var eO=r(92901),eA=r(68949),eh=r(59191);(0,j.DT)(!1);class eN{clearError(){var e;null===(e=this.rqSaveForm)||void 0===e||e.clearError()}get saving(){var e;return null===(e=this.rqSaveForm)||void 0===e?void 0:e.loading}get savingError(){var e;return null===(e=this.rqSaveForm)||void 0===e?void 0:e.error}get requiredFieldsForCurrentReasonCode(){return this.requiredFields}constructor(){this.requiredFields=[],this.reasonCodes=null,this.validTopicsWithoutReasons=null,this.formView=null,this.userDetails=null,this.saveForm=async e=>{var t;return null===(t=this._saveForm)||void 0===t?void 0:t.call(this,e)},this.setSaveForm=e=>{this._saveForm=e},this.rqSaveForm=void 0,this.saveLead=async e=>{var t,r;return await (null===(t=this.rqSaveForm)||void 0===t?void 0:t.execCall(e)),null===(r=this.rqSaveForm)||void 0===r?void 0:r.response},this.saveFormView=e=>{let t=q(e);this.formView=t},this.saveReasonCodes=e=>{this.reasonCodes=e},this.saveValidTopicsWithoutReasons=e=>{this.validTopicsWithoutReasons=e},this.saveUserDetails=e=>{this.userDetails=e},(0,eA.makeAutoObservable)(this),this.rqSaveForm=(0,eh.G0)({call:this.saveForm})}}let eS=(0,eO.D)(()=>new eN);var eC=r(53401),ey=r(24274),eR=r(14702),eg=r(19011),eL=r(79315),eD=r(11980),eM=r(52833);let eb=()=>(0,c.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,c.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.14134 3.98841C7.77421 3.35554 8.63256 3 9.52757 3C10.4226 3 11.2809 3.35554 11.9138 3.98841C12.5467 4.62128 12.9022 5.47964 12.9022 6.37465V8.36662H6.15292V6.37465C6.15292 5.47964 6.50847 4.62128 7.14134 3.98841ZM5.15292 8.36662V6.37465C5.15292 5.21442 5.61382 4.10171 6.43423 3.28
113C7.25463 2.4609 8.36734 2 9.52757 2C10.6878 2 11.8005 2.4609 12.6209 3.2813C13.4413 4.10171 13.9022 5.21442 13.9022 6.37465V8.36662H15.3829C16.3068 8.36662 17.0558 9.15064 17.0558 10.1178V16.2468C17.0558 17.2139 16.3068 17.9979 15.3829 17.9979H3.67286C2.74897 17.9979 2 17.2139 2 16.2468V10.1178C2 9.15064 2.74897 8.36662 3.67286 8.36662H5.15292Z",fill:"#292929"})}),ew=()=>(0,c.tZ)("div",{className:"left-[24px] top-[24px] mr-small-s2",children:(0,c.tZ)(eb,{})}),eU=()=>(0,c.tZ)("div",{className:"left-[24px] top-[24px] h-[20px] w-[20px] mr-small-s2",children:(0,c.tZ)(eD.N,{className:"text-brand-rivianYellow"})}),eP=e=>{let{children:t}=e,r=d.Children.toArray(t)[0],i=d.Children.toArray(t).find(e=>d.isValidElement(e)&&"a"===e.type),o=i?i.props.href:"/support",l=i?i.props.children:t,n=/\/privacy\b/.test(o||""),a=Array.isArray(l)&&"string"==typeof l[0]&&l[0].length>37?"body100":"body200";return(0,c.tZ)("a",{href:o,className:"text-text-primary visited:text-text-primary hover:text-text-primary focus:text-text-primary no-underline",target:"_blank",rel:"noreferrer",children:(0,c.BX)("div",{className:"bg-legacy-stone-5 p-small-s3 first:mt-medium-m2 [&:not(:first-child)]:mt-small-s3 rounded-micro",children:[(0,c.BX)("div",{className:"flex justify-between",children:[(0,c.BX)("div",{className:"flex items-center",children:[n?(0,c.tZ)(ew,{}):(0,c.tZ)(eU,{}),(0,c.tZ)(eC.uT,{variant:"body50",className:"m-0",children:r})]}),(0,c.tZ)(eM.dLw,{className:"h-small-s4 w-small-s4 text-brand-black"})]}),(0,c.tZ)(eC.uT,{variant:a,className:"mt-[4px] mb-0",children:l})]})})},eV=e=>{let{stepTitle:t,title:r}=e;return(0,c.BX)(c.HY,{children:[t&&(0,c.tZ)(eC.Dx,{className:"font-normal text-legacy-stone-70",children:t}),r&&(0,c.tZ)(eC.s0,{variant:"h1",className:"mt-[8px] mb-[48px]",children:r})]})},eF=e=>{let{__typename:t,userId:r,email:i,...o}=e||{};return{...o,email:null==i?void 0:i.email,userId:r}};var ex=r(77194);let eq=e=>{let{className:t,size:r="20"}=e;return(0,c.BX)("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,viewBox:"0 0 30 30",fill:"none",className:"animate-spin ".concat(t),children:[(0,c.tZ)("path",{d:"M16.9187 4.77034C18.7178 5.09327 20.3974 5.88319 21.7889 7.0607C23.1804 8.2382 24.2347 9.76181 24.8458 11.4784C25.4568 13.195 25.6032 15.044 25.2701 16.8397C24.9371 18.6354 24.1363 20.3144 22.9483 21.7081L20.9666 20.0311C21.8575 18.9858 22.4581 17.7265 22.7079 16.3798C22.9577 15.033 22.8479 13.6462 22.3896 12.3588C21.9313 11.0714 21.1406 9.92866 20.097 9.04553C19.0534 8.1624 17.7936 7.56996 16.4444 7.32776L16.9187 4.77034Z",fill:"#212121"}),(0,c.tZ)("path",{d:"M23.9746 20.2694C23.0059 21.9338 21.5958 23.2978 19.9002 24.2107C18.2045 25.1236 16.2895 25.5498 14.3667 25.4422C12.444 25.3346 10.5884 24.6973 9.00526 23.6009C7.4221 22.5045 6.173 20.9916 5.39607 19.2295C4.61913 17.4674 4.34464 15.5248 4.60293 13.6164C4.86122 11.7081 5.64223 9.90829 6.85961 8.41613C8.07699 6.92397 9.68332 5.79754 11.501 5.16139C13.3186 4.52523 15.2768 4.40414 17.159 4.81151L16.6068 7.36285C15.1952 7.05733 13.7265 7.14815 12.3633 7.62526C11 8.10237 9.79531 8.9472 8.88227 10.0663C7.96923 11.1854 7.38347 12.5353 7.18976 13.9665C6.99604 15.3978 7.20191 16.8548 7.78461 18.1763C8.36731 19.4979 9.30414 20.6326 10.4915 21.4549C11.6789 22.2772 13.0705 22.7552 14.5126 22.8359C15.9547 22.9166 17.391 22.597 18.6627 21.9123C19.9344 21.2276 20.992 20.2045 21.7185 18.9563L23.9746 20.2694Z",fill:"#CBCBCB"})]})};var eZ=r(51811);let eH=e=>{let{wizardState:t,store:r,strings:i,formData:o,supportInquiryForm:l,formCopy:m}=e,p=(0,u.useRouter)(),_=(0,b.Kd)(p),{form:E,setForm:v}=l,{topic:T,customerSelectedReason:f}=E.fields,I=null==i?void 0:i.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-topics"),O=null==i?void 0:i.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-tips-and-deflections"),A=Z(o,"supportInquiryTopics"),h=Z(o,"supportInquiryCustomerSelectedReasons"),S=Z(o,"upload"),C=W(i,_),y=U(i,I);y&&r.saveValidTopicsWithoutReasons(y);let R=(0,d.useCallback)(()=>{let e={topic:T.value,customerSelectedReason:f.value};if((l.isValidTopicWithoutReason||f.value)&&r.saveFormView(f.value||T.value),l.hasValidTopicAndOrReason&&t){r.saveReasonCodes(e);let i=H(e,_,m,S);v((0,eg.NY)(i)),t.nextStep()}},[T,f,l,_,m,t,S,v,r]),g=async()=>R();(0,d.useEffect)(()=>{"true"===(0,eZ.P)("legalSanctioned")&&(E.fields.customerSelectedReason.setValue(a.LEGAL_SANCTIONED),E.fields.topic.setValue("ownership-transfer"),R())},[R,E]);let L=()=>{f.value&&f.setValue("",{resetInteractedFlag:!0})},D=()=>{r.clearError(),B(p)};return(0,d.useEffect)(()=>{(async()=>{let e=eF(await (0,ex.P)());r.saveUserDetails(e)})()},[r]),(0,d.useEffect)(()=>{N.fire("formViewed",{step:n.SupportInquiryReasonCodesForm,topic:T.value,customerSelectedReason:f.value})},[r,T,f]),(0,c.tZ)(j.Qj,{children:()=>{let e=P(i,T.value),o=V(O,f.value||T.value,"tips"),n=q(f.value||T.value)!==s.DEFLECTION;return(0,c.BX)(c.HY,{children:[(0,c.tZ)(eC.zx,{className:"p-small-s3 min-w-[40px] mx-0 my-10 md:m-10 md:absolute left-0 top-0 self-start",variant:"primary",onClick:D,children:(0,c.tZ)(eL.Z,{className:"w-[16px] h-[16px]",direction:eL.Y.LEFT})}),(0,c.BX)("div",{className:"max-w-[343px] lg:min-w-[432px] lg:max-w-[432px]",children:[t&&(0,c.tZ)(eV,{stepTitle:"".concat(t.step+1,"/").concat(t.totalSteps),title:m.FORM_TITLE}),(0,c.tZ)(eC.s0,{variant:"h5",className:"mb-2",children:m.STEP_ONE_TITLE}),(0,c.tZ)(eC.uT,{variant:"body100",className:"mt-2 mb-6",children:m.STEP_ONE_SUBTITLE}),(0,c.tZ)(ey.Hi,{field:T,label:(null==A?void 0:A.label)||"",items:C,onChange:L,fieldClassName:"mb-small-s3"}),l.hasTopic&&(null==e?void 0:e.length)&&(0,c.tZ)(ey.Hi,{field:f,label:(null==h?void 0:h.label)||"",items:e}),o&&(0,c.tZ)(eR.Z,{options:{forceBlock:!0,overrides:{h1:{component:eC.s0,props:{className:"[&&]:mt-medium-m4",variant:"h5"}},h3:{component:eP},p:{component:eC.uT},a:{props:{className:"[&&]:text-brand-black [&&]:visited:text-brand-black whitespace-nowrap",target:"_blank"}}}},children:o}),n&&(0,c.tZ)(eC.zx,{className:"w-[160px] mt-[48px] px-medium-m1 py-small-s4 text-title200 font-medium",variant:"primary",onClick:g,disabled:!l.hasValidTopicAndOrReason,children:r.saving||E.validating?(0,c.tZ)(eq,{size:"20",className:"ml-small-s3"}):m.COMMON_STRINGS_CONTINUE_BUTTON})]})]})}})};var eG=r(76317);let eB=e=>{let{formFields:t,formData:i,formCopy:o}=e,l=(0,u.useRouter)(),n=(0,b.Kd)(l),a=Z(i,"firstName"),s=Z(i,"lastName"),m=Z(i,"email"),p=Z(i,"zipCodeNoCountry"),_=Z(i,"phoneNumberFull"),E=n.split("-").pop();function v(e){let t=e.replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);return(null==t?void 0:t[1])?"+".concat(t[1]," (").concat(t[2],") ").concat(t[3],"-").concat(t[4]):t?"(".concat(t[2],") ").concat(t[3],"-").concat(t[4]):e}let T=(0,d.useCallback)(async e=>{if(!e.value)return;if(/[^0-9()+-\s]/.test(e.value)){e.setValue(e.value);return}
1let{parsePhoneNumberFromString:t,isValidNumberForRegion:i}=await Promise.all([r.e(1048),r.e(6825)]).then(r.bind(r,16825)),o=t(e.value,E);if(o){let t="US"===o.country&&i(o.nationalNumber,"US"),r="CA"===o.country&&i(o.nationalNumber,"CA");(t||r)&&e.setValue(v((null==o?void 0:o.number)||e.value))}},[E]),f=async e=>{let r=/^\s*\(\d{3,}\)\s\d{3,}-\d{4,}\s*$/.test(e.target.value)?(0,eG.A)(e.target.value):e.target.value,i="US"===E||"CA"===E?v(r):e.target.value;t.phoneNumber.setValue(i)};return(0,d.useEffect)(()=>{let e=document.getElementById("phoneNumber"),r=null==e?void 0:e.matches(":autofill");t.phoneNumber.value&&r&&T(t.phoneNumber)},[t.phoneNumber,t.phoneNumber.value,T]),(0,c.BX)(c.HY,{children:[(null==o?void 0:o.CONTACT_FORM_TITLE)&&(0,c.tZ)(eC.s0,{variant:"h5",className:"mb-2",children:o.CONTACT_FORM_TITLE}),(null==o?void 0:o.CONTACT_FORM_SUBTITLE)&&(0,c.tZ)(eC.uT,{variant:"body100",className:"mt-2 mb-6",children:o.CONTACT_FORM_SUBTITLE}),(0,c.BX)("div",{className:"flex space-x-[12px] justify-between [&_div]:flex-1",children:[(0,c.tZ)(ey.nv,{fieldClassName:"flex-grow",field:t.firstName,label:(null==a?void 0:a.label)||""}),(0,c.tZ)(ey.nv,{fieldClassName:"flex-grow",field:t.lastName,label:(null==s?void 0:s.label)||""})]}),(0,c.tZ)(ey.nv,{field:t.email,label:(null==m?void 0:m.label)||"",fieldClassName:"my-small-s3"}),(0,c.tZ)(ey.nv,{field:t.zipCode,label:(null==p?void 0:p.label)||"",fieldClassName:"my-small-s3"}),(0,c.tZ)(ey.nv,{field:t.phoneNumber,label:(null==_?void 0:_.label)||"",fieldClassName:"my-small-s3",onBeforeValidate:T,onChange:f})]})},ek=e=>{let{customerSelectedReason:t,tipsAndDeflections:r,formCopy:i}=e,o=(0,u.useRouter)(),l=V(r,t,"deflections");return l?(0,c.BX)(c.HY,{children:[(0,c.tZ)(eR.Z,{options:{forceBlock:!0,overrides:{h1:{component:eC.s0,props:{variant:"h5",className:"[&&]:mt-0 [&&]:mb-medium-2"}},h3:{component:eP},p:{component:eC.uT,props:{className:"[&&]:text-legacy-stone-90 [&&]:mt-medium-m2",variant:"body50"}},a:{props:{className:"[&&]:text-legacy-stone-90 [&&]:visited:text-legacy-stone-90 whitespace-nowrap underline-interact",target:"_blank"}}}},children:l}),(0,c.tZ)(eC.zx,{className:"w-[160px] mt-[48px] px-medium-m1 py-small-s4 text-title200 font-medium",variant:"primary",onClick:()=>{B(o)},children:i.DEFLECTIONS_FORM_EXIT_BUTTON})]}):null},eY=()=>(0,c.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,c.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0.203125H16V1.20312H0V0.203125ZM3.60014 7.8323L7.5 3.93243V15.7952H8.5V3.93292L12.3994 7.8323L13.1065 7.12519L9.06042 3.07912C8.47463 2.49334 7.52488 2.49334 6.9391 3.07912L2.89303 7.12519L3.60014 7.8323Z",fill:"#292929"})}),eW=()=>(0,c.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",children:(0,c.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.06718 0C4.48739 0 4.01521 0.472297 4.01521 1.05198V2.48368H0.271484V3.48368H1.59447V14.8836C1.59447 15.5003 2.09444 16.0003 2.71117 16.0003H11.2874C11.9042 16.0003 12.4041 15.5003 12.4041 14.8836V3.48368H13.7266V2.48368H9.98301V1.05198C9.98301 0.472188 9.51072 0 8.93103 0H5.06718ZM11.4041 3.48368H2.59447V14.8836C2.59447 14.948 2.64674 15.0003 2.71117 15.0003H11.2874C11.3519 15.0003 11.4041 14.948 11.4041 14.8836V3.48368ZM8.98301 2.48368H5.01521V1.05198C5.01521 1.03923 5.01997 1.02663 5.0309 1.01569C5.04183 1.00476 5.05443 1 5.06718 1H8.93103C8.94378 1 8.95638 1.00476 8.96732 1.0157C8.97825 1.02663 8.98301 1.03923 8.98301 1.05198V2.48368ZM5.37595 6.05549C5.6521 6.05549 5.87595 6.27935 5.87595 6.55549V11.4909C5.87595 11.767 5.6521 11.9909 5.37595 11.9909C5.09981 11.9909 4.87595 11.767 4.87595 11.4909V6.55549C4.87595 6.27935 5.09981 6.05549 5.37595 6.05549ZM8.62279 6.05549C8.89893 6.05549 9.12279 6.27935 9.12279 6.55549V11.4909C9.12279 11.767 8.89893 11.9909 8.62279 11.9909C8.34665 11.9909 8.12279 11.767 8.12279 11.4909V6.55549C8.12279 6.27935 8.34665 6.05549 8.62279 6.05549Z",fill:"#292929"})}),e$=e=>{let{uploadText:t,field:r,className:i,multiple:o}=e,[l,n]=(0,d.useState)([]),a=(0,d.useRef)(null),s=e=>{n([e]),r.setValue([e])},u=e=>{let t=e.filter(e=>!l.some(t=>t.name===e.name));n([...l,...t]),r.setValue([...l,...t])},m=e=>{let t=[...l],i=t.findIndex(t=>t.name===e.name);-1!==i&&t.splice(i,1),n(t),r.setValue(t)};return(0,c.BX)("div",{className:i,children:[(0,c.tZ)("div",{className:"hidden",children:(0,c.tZ)(eC.II,{ref:a,type:"file",hidden:!0,multiple:o,accept:F.join(", "),onChange:e=>{let{files:t}=e.target;if(!t)return;let r=Array.prototype.slice.call(t);o?u(r):s(r[0]),e.target.value=""}})}),(0,c.BX)("button",{className:"w-full p-small-s4 leading-6 flex items-center bg-semantic-transparent roun
1ded-nano cursor-pointer border-solid border border-stroke-tertiary",type:"button",onClick:e=>{e.preventDefault(),a&&a.current&&a.current.click()},children:[(0,c.tZ)("span",{className:"flex p-4 rounded-[50px] mr-4 bg-legacy-stone-5",children:(0,c.tZ)(eY,{})}),t]}),l.length>0&&(0,c.tZ)("ul",{className:"list-none p-0 mt-6 mb-2",children:l.map((e,t)=>(0,c.BX)("li",{className:"flex items-center my-2 justify-between",children:[(0,c.tZ)(eC.uT,{variant:"body50",className:"mr-2 my-0",children:e.name}),(0,c.tZ)("button",{type:"button",className:"p-0 w-5 h-5 bg-semantic-transparent border-none cursor-pointer",onClick:()=>m(e),children:(0,c.tZ)(eW,{})})]},t))}),r.error&&(0,c.tZ)(eC.uT,{variant:"body50",className:"text-semantic-error my-2",children:r.error})]})},eX={COMMON_STRINGS_REQUIRED_FIELD:"cec-support-inquiry-common-strings-required-field",COMMON_STRINGS_OPTIONAL:"cec-support-inquiry-common-strings-optional",COMMON_STRINGS_OPTIONAL_DESCRIPTION:"cec-support-inquiry-common-strings-optional-description",COMMON_STRINGS_OPTIONAL_DOCUMENT:"cec-support-inquiry-common-strings-optional-document",COMMON_STRINGS_SUBMIT_BUTTON:"cec-support-inquiry-common-strings-submit-button",COMMON_STRINGS_CONTINUE_BUTTON:"cec-support-inquiry-common-strings-continue-button",FORM_TITLE:"cec-support-inquiry-form-title",STEP_ONE_TITLE:"cec-support-inquiry-step-one-title",STEP_ONE_SUBTITLE:"cec-support-inquiry-step-one-subtitle",NEXT_STEPS_TITLE:"cec-support-inquiry-next-steps-title",MESSAGE_FORM_TITLE:"cec-support-inquiry-message-form-title",MESSAGE_FORM_TITLE_HOW_VEHICLE_SERVICE_WORKS:"cec-support-inquiry-message-form-title-how-vehicle-service-works",MESSAGE_FORM_TITLE_WITH_OPTIONAL_DOCUMENT_UPLOAD:"cec-support-inquiry-message-form-title-with-optional-document-upload",MESSAGE_FORM_SUBTITLE_DEMO_DRIVES:"cec-support-inquiry-message-form-subtitle-demo-drives",MESSAGE_FORM_REQUIRED_FIELD:"cec-support-inquiry-message-form-required-field",MESSAGE_FORM_REQUIRED_FIELD_OTHER:"cec-support-inquiry-message-form-required-field-other",YOUR_INFO_TITLE:"cec-support-inquiry-your-info-title",CONTACT_FORM_SUBTITLE:"cec-support-inquiry-contact-form-subtitle",CONTACT_FORM_TITLE:"cec-support-inquiry-contact-form-title",PRODUCT_FORM_TITLE:"cec-support-inquiry-product-form-title",PRODUCT_FORM_REQUIRED_FIELD:"cec-support-inquiry-product-form-required-field",VIN_FORM_TITLE:"cec-support-inquiry-vin-form-title",VIN_FORM_INPUT_TITLE:"cec-support-inquiry-vin-form-vin-input-title",SUBMISSION_ERROR:"cec-support-inquiry-submission-error",SUBSCRIBE_DISCLAIMER:"cec-support-inquiry-subscribe-disclaimer",DOCUMENT_UPLOAD_FORM_TITLE:"cec-support-inquiry-document-upload-form-title",DOCUMENT_UPLOAD_FORM_TITLE_LEGAL_SANCTIONED:"cec-support-inquiry-document-upload-form-title-legal-sanctioned",DOCUMENT_UPLOAD_FORM_BODY_LEGAL_SANCTIONED:"cec-support-inquiry-document-upload-form-body-legal-sanctioned",DOCUMENT_UPLOAD_FORM_TITLE_BOUGHT_FROM_A_THIRD_PARTY:"cec-support-inquiry-document-upload-form-title-bought-from-a-third-party",DOCUMENT_UPLOAD_FORM_BODY_BOUGHT_FROM_A_THIRD_PARTY:"cec-support-inquiry-document-upload-form-body-bought-from-a-third-party",DOCUMENT_UPLOAD_FORM_TITLE_TRANSFER_OWNERSHIP_TO_A_FAMILY_MEMBER:"cec-support-inquiry-document-upload-form-title-transfer-ownership-to-a-family-member",DOCUMENT_UPLOAD_FORM_BODY_TRANSFER_OWNERSHIP_TO_A_FAMILY_MEMBER:"cec-support-inquiry-document-upload-form-body-transfer-ownership-to-a-family-member",DOCUMENT_UPLOAD_FORM_LEGAL_SANCTIONED:"cec-support-inquiry-document-upload-form-legal-sanctioned",DOCUMENT_UPLOAD_FORM_TOOLTIP:"cec-support-inquiry-document-upload-form-tooltip",EMAIL_DISCLAIMER_GEAR_SHOP_OR_VEHICLE_ORDERS:"cec-support-inquiry-email-disclaimer-gear-shop-or-vehicle-orders",EMAIL_DISCLAIMER_CANCEL_A_DEMO_DRIVE:"cec-support-inquiry-email-disclaimer-cancel-a-demo-drive",EMAIL_DISCLAIMER_RESCHEDULE_A_DEMO_DRIVE:"cec-support-inquiry-email-disclaimer-reschedule-a-demo-drive",EMAIL_DISCLAIMER_WARRANTY:"cec-support-inquiry-email-disclaimer-warranty",EMAIL_DISCLAIMER_ACCOUNT:"cec-support-inquiry-email-disclaimer-account",EMAIL_DISCLAIMER_ORDERS:"cec-support-inquiry-email-disclaimer-orders",EMAIL_DISCLAIMER_RETURNS:"cec-support-inquiry-email-disclaimer-returns",EMAIL_DISCLAIMER_GEAR_SHOP_GENERAL_QUESTIONS:"cec-support-inquiry-email-disclaimer-gear-shop-general-questions",EMAIL_DISCLAIMER_BOUGHT_FROM_A_THIRD_PARTY:"cec-support-inquiry-email-disclaimer-bought-from-a-third-party",EMAIL_DISCLAIMER_HOME_CHARGING:"cec-support-inquiry-email-disclaimer-home-charging",EMAIL_DISCLAIMER_PUBLIC_CHARGERS:"cec-support-inquiry-email-disclaimer-public-chargers",DEFLECTIONS_FORM_EXIT_BUTTON:"cec-support-inquiry-deflections-form-exit-button",VALIDATOR_FIRST_NAME:"cec-support-inquiry-vali
1dator-first-name",VALIDATOR_LAST_NAME:"cec-support-inquiry-validator-last-name",VALIDATOR_EMAIL:"cec-support-inquiry-validator-email",VALIDATOR_VALID_EMAIL:"cec-support-inquiry-validator-valid-email",VALIDATOR_PHONE_NUMBER:"cec-support-inquiry-validator-phone-number",VALIDATOR_VALID_PHONE_NUMBER:"cec-support-inquiry-validator-valid-phone-number",VALIDATOR_ZIP:"cec-support-inquiry-validator-zip",VALIDATOR_VALID_ZIP:"cec-support-inquiry-validator-valid-zip",VALIDATOR_MESSAGE:"cec-support-inquiry-validator-message",VALIDATOR_VALID_MESSAGE:"cec-support-inquiry-validator-valid-message",VALIDATOR_PRODUCT:"cec-support-inquiry-validator-product",VALIDATOR_VIN:"cec-support-inquiry-validator-vin",VALIDATOR_VALID_VIN:"cec-support-inquiry-validator-valid-vin",VALIDATOR_DOCUMENTS:"cec-support-inquiry-validator-documents",VALIDATOR_DOCUMENTS_LIMIT:"cec-support-inquiry-validator-documents-limit",VALIDATOR_DOCUMENTS_FILE_TYPE:"cec-support-inquiry-validator-file-type",VALIDATOR_TOPIC:"cec-support-inquiry-validator-topic",VALIDATOR_CUSTOMER_SELECTED_REASON:"cec-support-inquiry-validator-customer-selected-reason",VALIDATOR_INVENTORY_TYPE:"cec-support-inquiry-validator-inventory-type",VALIDATOR_MONTH:"cec-support-inquiry-validator-month",VALIDATOR_YEAR:"cec-support-inquiry-validator-year",VALIDATOR_MUTLI_FACTOR_DRIVE_ENABLED:"cec-support-inquiry-validator-mutli-factor-drive",PURCHASING_TIMELINE_TITLE:"cec-support-inquiry-purchasing-timeline-title",MULTI_FACTOR_DRIVE_DISCLAIMER:"cec-support-inquiry-mutli-factor-drive"},ej=e=>e.split("-").map(e=>e.toUpperCase()).join("_"),ez=e=>{let{children:t}=e;return(0,c.tZ)(eC.uT,{variant:"body25",className:"text-text-secondary mt-2 mb-4",children:t})},eQ=e=>{let{children:t}=e;return(0,c.tZ)(ez,{children:t})},eK=e=>{let{formData:t,formFields:r,formCopy:i,customerSelectedReason:o,formView:l}=e,n="DOCUMENT_UPLOAD_FORM_TITLE_".concat(ej(o)),a="DOCUMENT_UPLOAD_FORM_BODY_".concat(ej(o)),u=i[n]||i.MESSAGE_FORM_TITLE,d=i[a]||i.MESSAGE_FORM_TITLE,m=Z(t,"upload"),p=l!==s.MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD&&l!==s.MESSAGE_WITH_DOCUMENT_UPLOAD;return(0,c.BX)("div",{className:"mb-10",children:[p&&(0,c.BX)(c.HY,{children:[(0,c.BX)(eC.s0,{variant:"h5",children:[u,(0,c.tZ)(eM.Xq,{className:"fill-semantic-current align-middle cursor-pointer ml-small-s2 w-small-s4 h-small-s4","data-tooltip-max-width":"300px","data-tooltip":i.DOCUMENT_UPLOAD_FORM_TOOLTIP})]}),(0,c.tZ)(eC.uT,{variant:"body100",className:"my-6",children:(0,c.tZ)(eR.Z,{children:d})})]}),(0,c.tZ)(e$,{multiple:!0,uploadText:(null==m?void 0:m.label)||"",field:r.documentUpload||r.optionalDocumentUpload}),l===s.MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD&&(0,c.tZ)(eQ,{children:i.COMMON_STRINGS_OPTIONAL_DOCUMENT})]})},eJ=[a.CANCEL_A_DEMO_DRIVE,a.RESCHEDULE_A_DEMO_DRIVE],e0=e=>{let{formFields:t,customerSelectedReason:r,formData:i,formCopy:o,optionalDocumentUpload:l}=e,n=Z(i,"supportInquiryMessage"),s=eJ.includes(r),u=o["MESSAGE_FORM_TITLE_".concat(ej(r))]||(null==o?void 0:o.MESSAGE_FORM_TITLE),d=null==o?void 0:o.MESSAGE_FORM_TITLE_WITH_OPTIONAL_DOCUMENT_UPLOAD,m=r===a.OTHER?o.MESSAGE_FORM_REQUIRED_FIELD_OTHER:o.MESSAGE_FORM_REQUIRED_FIELD;return(0,c.BX)("div",{className:"mb-10",children:[u&&(0,c.tZ)(eC.s0,{variant:"h5",className:"mb-0",children:l?d:u}),s&&(null==o?void 0:o.MESSAGE_FORM_SUBTITLE_DEMO_DRIVES)&&(0,c.tZ)(eR.Z,{options:{forceBlock:!0,overrides:{p:{component:eC.uT,props:{className:"[&&]:text-legacy-stone-90 [&&]:mt-small-s2 [&&]:mb-0",variant:"body100"}},a:{props:{className:"[&&]:text-legacy-stone-90 [&&]:visited:text-legacy-stone-90 whitespace-nowrap",target:"_blank"}}}},children:o.MESSAGE_FORM_SUBTITLE_DEMO_DRIVES}),(0,c.tZ)(ey.N7,{field:t.message,label:(null==n?void 0:n.label)||"",className:"min-h-[172px]",fieldClassName:"mt-medium-m2",characterCount:{max:500}}),(0,c.tZ)(eC.uT,{className:"mt-small-s2 text-legacy-stone-80 text-body25",children:m})]})},e1=e=>{let{formFields:t,formCopy:r,formData:i}=e,o=Z(i,"vin"),l=Z(i,"supportInquiryMessage");return(0,c.BX)("div",{className:"mb-16",children:[(0,c.tZ)(eC.s0,{variant:"h5",children:r.VIN_FORM_TITLE}),(0,c.tZ)(eC.uT,{variant:"body100",children:r.VIN_FORM_INPUT_TITLE}),(0,c.tZ)(ey.nv,{field:t.vin,label:(null==o?void 0:o.label)||""}),(0,c.tZ)(ez,{children:r.COMMON_STRINGS_REQUIRED_FIELD}
1),(0,c.tZ)(ey.N7,{field:t.optionalMessage,label:(null==l?void 0:l.label)||"",className:"min-h-[172px]",characterCount:{max:500}}),(0,c.tZ)(eQ,{children:r.COMMON_STRINGS_OPTIONAL_DESCRIPTION})]})},e2=e=>{var t,r;let{formFields:i,formData:o,productOptions:l,formCopy:n}=e,a=Z(o,"supportInquiryProductSelect"),s=Z(o,"supportInquiryMessage"),u=null==l?void 0:null===(r=l.stringsCollection)||void 0===r?void 0:null===(t=r.items)||void 0===t?void 0:t.map(e=>({display:null==e?void 0:e.value,value:null==e?void 0:e.value}));return(0,c.BX)("div",{className:"mb-10",children:[(0,c.tZ)(eC.s0,{variant:"h5",className:"mb-8",children:n.PRODUCT_FORM_TITLE}),(0,c.tZ)(ey.Hi,{field:i.product,label:(null==a?void 0:a.label)||"",items:u}),(0,c.tZ)(ey.N7,{field:i.message,label:(null==s?void 0:s.label)||"",fieldClassName:"mt-small-s4",className:"min-h-[172px]",characterCount:{max:500}}),(0,c.tZ)(eC.uT,{className:"mt-small-s2 text-legacy-stone-80 text-body25",children:n.PRODUCT_FORM_REQUIRED_FIELD})]})},e5=e=>{var t,r,i,o;let{formFields:l,formData:n,formCopy:a,productOptions:s,inventoryTypeOptions:u,locale:d}=e,m=Z(n,"supportInquiryProductSelect"),p=Z(n,"supportInquiryInventoryType"),_=Z(n,"supportInquiryYearSelect"),E=Z(n,"supportInquiryMonthSelect"),v=$(d),T=X(d),f=null==s?void 0:null===(r=s.stringsCollection)||void 0===r?void 0:null===(t=r.items)||void 0===t?void 0:t.map(e=>({display:null==e?void 0:e.value,value:null==e?void 0:e.value})),I=null==u?void 0:null===(o=u.stringsCollection)||void 0===o?void 0:null===(i=o.items)||void 0===i?void 0:i.map(e=>({display:null==e?void 0:e.value,value:null==e?void 0:e.value})),O=v.map(e=>({display:e,value:e})),A=T.map(e=>({display:e.month,value:e.number}));return(0,c.BX)("div",{className:"mb-10",children:[(0,c.tZ)(ey.Hi,{field:l.product,label:(null==m?void 0:m.label)||"",items:f}),(0,c.tZ)(ey.Hi,{field:l.inventoryType,label:(null==p?void 0:p.label)||"",items:I,fieldClassName:"mt-small-s3"}),(0,c.tZ)(eC.uT,{variant:"body25",className:"text-text-secondary mt-2 mb-0",children:a.PURCHASING_TIMELINE_TITLE}),(0,c.BX)("div",{className:"flex space-x-[12px] justify-between [&_div]:flex-1",children:[(0,c.tZ)(ey.Hi,{field:l.month,label:(null==E?void 0:E.label)||"",items:A,fieldClassName:"mt-small-s3"}),(0,c.tZ)(ey.Hi,{field:l.year,label:(null==_?void 0:_.label)||"",items:O,fieldClassName:"mt-small-s3"})]})]})},e3=e=>{let{view:t,fields:r,strings:i,customerSelectedReason:o,formData:l,formCopy:n,locale:a}=e,u=null==i?void 0:i.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-product-select-options"),d=null==i?void 0:i.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-inventory-type-options"),m=null==i?void 0:i.find(e=>"cec-support-inquiry-tips-and-deflections"===e.slug);switch(t){case s.CONTACT_INFO_ONLY:return(0,c.tZ)(eB,{formFields:r,formCopy:n,formData:l});case s.CONTACT_INFO_WITH_PRODUCT_INVENTORY_SUPPLEMENT:return(0,c.BX)(c.HY,{children:[(0,c.tZ)(eB,{formFields:r,formCopy:n,formData:l}),(0,c.tZ)(e5,{formFields:r,formCopy:n,formData:l,productOptions:u,inventoryTypeOptions:d,locale:a})]});case s.MESSAGE:case s.MESSAGE_WITH_DOCUMENT_UPLOAD:case s.MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD:return(0,c.tZ)(e0,{formFields:r,customerSelectedReason:o,formData:l,formCopy:n,optionalDocumentUpload:t===s.MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD});case s.DEFLECTION:return(0,c.tZ)(ek,{tipsAndDeflections:m,customerSelectedReason:o,formCopy:n});case s.PRODUCT_SELECT_WITH_MESSSAGE:return(0,c.tZ)(e2,{formFields:r,formData:l,productOptions:u,formCopy:n});case s.DOCUMENT_UPLOAD:return(0,c.tZ)(eK,{formData:l,formFields:r,formCopy:n,customerSelectedReason:o});case s.VIN:return(0,c.tZ)(e1,{formFields:r,formCopy:n,formData:l});default:return null}},e4=e=>{let{formFields:t,title:r,formData:i,emailDisclaimer:o,multiFactorDriveDisclaimer:l}=e,n=Z(i,"firstName"),a=Z(i,"lastName"),s=Z(i,"email");return(0,c.BX)(c.HY,{children:[r&&(0,c.tZ)(eC.s0,{variant:"h5",children:r}),(0,c.BX)("div",{className:"flex space-x-[12px] justify-between [&_div]:flex-1",children:[(0,c.tZ)(ey.nv,{field:t.firstName,label:(null==n?void 0:n.label)||""}),(0,c.tZ)(ey.nv,{field:t.lastName,label:(null==a?void 0:a.label)||""})]}),(0,c.tZ)(ey.nv,{field:t.email,label:(null==s?void 0:s.label)||"",fieldClassName:"mt-small-s3 mb-[8px]"}),o&&(0,c.tZ)(eR.Z,{options:{forceBlock:!0,overrides:{p:{component:eC.uT,props:{className:"[&&]:text-legacy-stone-80 [&&]:mt-small-s2",variant:"body25"}},a:{props:{className:"[&&]:text-legacy-stone-80 [&&]:visited:text-legacy-stone-80 whitespace-nowrap",target:"_blank"}}}},children:o}),l&&(0,c.tZ)(ey.ji,{field:t.mutliFactorDriveEnabled,fieldClassName:"mt-medium-m3 text-legacy-stone-80",label:(0,c.tZ)(eR.Z,{options:{forceBlock:!0,overrides:{p:{component:eC.uT,props:{className:"[&&]:mt-0 [&&:last-child]:mb-0",variant:"body50"}},a:{props:{className:"[&&]:text-text-primary [&&]:visited:text-text-primary",target:"_blank"}}}},children:l})})]})},e6=e=>{var t,r;let{wizardState:i,store:o,strings:l,formData:m,supportInquiryForm:_,formCopy:E}=e,v=(0,u.useRouter)(),f=(0,b.Kd)(v),{executeRecaptcha:I}=(0,p.xX)(),{form:O}=_,A=null==o?void 0:null===(t=o.reasonCodes)||void 0===t?void 0:t.topic,h=null==o?void 0:null===(r=o.reasonCodes)||void 0===r?void 0:r.customerSelectedReason,S=()=>{let e="true"===(0,eZ.P)("legalSanctioned");(0,T.C)()&&e&&(0,b.rV)(["legalSanctioned"]),o.clearError(),null==i||i.prevStep()},C=async()=>
1{if(await O.validate(),O.valid){N.fire("formSubmitAttempt",{customerSelectedReason:h});let e=await o.saveLead({formData:{...O.serializedData,locale:f},executeRecaptcha:I});e&&e.success&&(e.isNewUser&&N.fire("formSubmitNewContact",{topic:A,customerSelectedReason:h,userId:e.rivianId}),N.fire("formSubmitSuccess",{topic:A,customerSelectedReason:h}),v.push("/support/contact-form/confirmation",void 0,{locale:f})),o.savingError&&N.fire("formSubmitFailure",{customerSelectedReason:h,error:o.savingError})}else{var e;N.fire("formSubmitAttemptInvalid",{customerSelectedReason:h,errorCount:(null==O?void 0:null===(e=O.summary)||void 0===e?void 0:e.length)||0})}},y=o.formView!==s.DEFLECTION&&o.formView!==s.CONTACT_INFO_ONLY&&o.formView!==s.CONTACT_INFO_WITH_PRODUCT_INVENTORY_SUPPLEMENT,R=o.formView===s.MESSAGE_WITH_OPTIONAL_DOCUMENT_UPLOAD||o.formView===s.MESSAGE_WITH_DOCUMENT_UPLOAD,g=o.formView===s.DEFLECTION,L="EMAIL_DISCLAIMER_".concat(ej(h||A));(0,d.useEffect)(()=>{h&&N.fire("formViewed",{step:n.SupportInquiryRequiredFieldsForm,topic:A,customerSelectedReason:h})},[o,h,A]),(0,d.useEffect)(()=>{G(O,o)},[O,o]);let D=o.formView===s.DOCUMENT_UPLOAD?E.DOCUMENT_UPLOAD_FORM_TITLE:E.FORM_TITLE;return(0,c.tZ)(j.Qj,{children:()=>(0,c.BX)(c.HY,{children:[(0,c.tZ)(eC.zx,{className:"p-small-s3 min-w-[40px] mx-0 my-10 md:m-10 md:absolute left-0 top-0 self-start",variant:"primary",onClick:S,children:(0,c.tZ)(eL.Z,{className:"w-[16px] h-[16px]",direction:eL.Y.LEFT})}),(0,c.BX)("div",{className:"max-w-[343px] lg:min-w-[432px] lg:max-w-[432px]",children:[i&&(0,c.tZ)(eV,{stepTitle:"".concat(i.step+1,"/").concat(i.totalSteps),title:D}),o.formView&&e3({view:o.formView,fields:O.fields,strings:l,customerSelectedReason:h||A||"",formData:m,formCopy:E,locale:f}),R&&(0,c.tZ)(eK,{formData:m,formFields:O.fields,formCopy:E,customerSelectedReason:h||A||"",formView:o.formView}),y&&(0,c.tZ)(c.HY,{children:(0,c.tZ)(e4,{formFields:O.fields,title:E.YOUR_INFO_TITLE,formData:m,emailDisclaimer:E[L],...h===a.TRANSFER_OWNERSHIP_TO_A_FAMILY_MEMBER&&{multiFactorDriveDisclaimer:E.MULTI_FACTOR_DRIVE_DISCLAIMER}})}),!g&&(0,c.BX)(c.HY,{children:[(0,c.tZ)(eC.zx,{className:"w-[160px] mt-[48px] px-medium-m1 py-small-s4 text-title200 font-medium",variant:"primary",onClick:C,disabled:!O.dataIsReady,children:o.saving||O.validating?(0,c.tZ)(eq,{size:"20",className:"ml-small-s3"}):E.COMMON_STRINGS_SUBMIT_BUTTON}),(0,c.tZ)(eR.Z,{options:{forceBlock:!0,overrides:{p:{component:eC.uT,props:{className:"[&&]:text-legacy-stone-70 [&&]:mt-medium-m2",variant:"body50"}},a:{props:{className:"[&&]:text-legacy-stone-70 [&&]:visited:text-legacy-stone-70 underline-interact",target:"_blank"}}}},children:E.SUBSCRIBE_DISCLAIMER})]}),o.savingError&&(0,c.tZ)(eC.uT,{variant:"body50",className:"text-semantic-error",children:E.SUBMISSION_ERROR})]})]})})},e9=e=>{let t={descriptors:{topic:{required:"Please select topic"},customerSelectedReason:{required:"Please select item for more details"}},initialState:{}},[r,i]=(0,d.useState)(()=>(0,eg.NY)(t)),o={requiredFields:e.requiredFields,form:r,setForm:i};return(0,eA.extendObservable)(o,{get valid(){return r.valid},get isValidTopicWithoutReason(){var l;let t=r.fields.topic.value;return null===(l=e.validTopicsWithoutReasons)||void 0===l?void 0:l.includes(t)},get hasValidTopicAndOrReason(){return r.fields.topic.hasValue&&r.fields.customerSelectedReason.hasValue||this.isValidTopicWithoutReason},get hasTopic(){return r.fields.topic.hasValue}}),o},e7=(0,z.Z)("div",{target:"e1b8vt060"})("display:flex;",J,"{background-color:",K.D2.white,";}");var e8=r(90180);let te=e=>{var t;let{data:r}=e,i=eI(),[o]=(0,d.useState)(()=>{let e=eS();return e.setSaveForm(i),e}),l=e9(o),{strings:a,media:s,formSection:u}=r,m=null==a?void 0:null===(t=a.items[0].listsCollection)||void 0===t?void 0:t.items,_=null==m?void 0:m.find(e=>(null==e?void 0:e.slug)==="cec-support-inquiry-form-copy"),E=(0,e8.Lg)(null==_?void 0:_.stringsCollection,eX);return(0,c.tZ)(j.Qj,{children:()=>(0,c.tZ)(p.pm,{reCaptchaKey:v.GOOGLE_RECAPTCHA_GATEWAY_SITE_KEY,useEnterprise:!0,children:(0,c.BX)(e7,{className:"justify-center md:min-h-screen flex-wrap md:flex-nowrap",children:[(0,c.tZ)("div",{className:"w-full h-[302px] max-h-[302px] sm:h-[400px] sm:max-h-[400px] md:max-h-screen md:min-
1h-screen md:w-[40%] relative md:sticky md:top-0",children:(0,c.tZ)(ee.i,{data:s,isFill:!0})}),(0,c.tZ)("div",{className:"md:w-[60%]",children:(0,c.BX)(eu,{firstStepIndex:0,shouldRenderDesktopNavSpacing:!1,children:[(0,c.tZ)(eH,{id:n.SupportInquiryReasonCodesForm,store:o,strings:m,formCopy:E,formData:u,supportInquiryForm:l}),(0,c.tZ)(e6,{id:n.SupportInquiryRequiredFieldsForm,store:o,strings:m,formData:u,supportInquiryForm:l,formCopy:E})]})})]})})})};var tt=r(34379);(0,T.C)()&&(N.on("formViewed",e=>{let{step:t,customerSelectedReason:r,topic:i}=e;h.y.action("supportInquiryFormViewed",{step:t,...r&&{customerSelectedReason:r},...i&&{topic:i}}),S.XH.analyticEventPushByPayload({event:"form_start",form_id:t,form_name:Y(i,r||i),timestamp:new Date().toISOString()})}),N.on("formSubmitSuccess",e=>{let{topic:t,customerSelectedReason:r}=e;h.y.action("supportInquiryFormSubmitSuccess",{customerSelectedReason:r,topic:t}),S.XH.analyticEventPushByPayload({event:"form_submit",form_id:n.SupportInquiryRequiredFieldsForm,form_name:Y(t,r||t),form_destination:"/support/contact-form/confirmation",form_submit_text:"Submit",submission_status:"success",timestamp:new Date().toISOString()})}),N.on("formSubmitFailure",e=>{let{customerSelectedReason:t,error:r}=e;h.y.error(Error(r),{customerSelectedReason:t,msg:"supportInquiryFormSubmitFailure",errorMessage:r})}),N.on("formDocumentUrlFetchFailure",e=>{let{customerSelectedReason:t,error:r}=e;h.y.error(Error(r),{customerSelectedReason:t,msg:"supportInquiryFormDocumentUrlFetchFailure",errorMessage:r})}),N.on("formSubmitAttempt",e=>{let{customerSelectedReason:t}=e;h.y.action("supportInquiryFormSubmitAttempt",{customerSelectedReason:t})}),N.on("formSubmitAttemptInvalid",e=>{let{customerSelectedReason:t,errorCount:r}=e;h.y.action("supportInquiryFormSubmitAttemptInvalid",{customerSelectedReason:t,errorCount:r})}),N.on("formSubmitNewContact",e=>{let{topic:t,customerSelectedReason:r,userId:i}=e;S.XH.analyticEventPushByPayload({event:"LEAD_CAPTURE",createSource:Y(t,r||t),eventId:i})}));let tr=e=>{let{data:t}=e;return(0,c.tZ)(p.pm,{reCaptchaKey:v.GOOGLE_RECAPTCHA_SITE_KEY,useEnterprise:!0,children:(0,c.tZ)(te,{data:t})})};tr.Layout=e=>{let{children:t,pageProps:r}=e,i=(0,u.useRouter)(),{data:o}=r,{egGlobalFooter:l,stringList:n,cloudinaryAssets:a}=o;if(null==l?void 0:l.media){let{mobileImage:e,desktopImage:t}=l.media;l.mediaSources=(0,A.q)(e,t)}return(0,d.useEffect)(()=>{if(!(0,T.C)())return;let e=window.sessionStorage,t=i.asPath,r=t?t.split("?")[0]:"",o=e.getItem(f.jS)||"",l=o.split("?")[0];l&&r!==l&&e.setItem(f.V1,o),e.setItem(f.jS,t)},[i.asPath]),(0,c.BX)(_.eV,{sharingMetadata:{sharingTitle:"Contact Us - Rivian",sharingDescription:null,sharingImage:null},children:[(0,c.tZ)(I.h,{}),(0,c.tZ)(m.xB,{styles:[tt.o]}),(0,c.tZ)(E.v,{}),t,(0,c.tZ)(eC.DY,{}),(0,c.tZ)(O.V,{footerProps:l,stringList:n,cloudinaryAssets:a})]})};var ti=!0,to=tr},76317:function(e,t,r){"use strict";function i(e){let t=e.replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);return t?"(".concat(t[2],") ").concat(t[3],"-").concat(t[4]):e}r.d(t,{A:function(){return o},u:function(){return i}});let o=e=>(e||"").replace(/([^0-9])/g,"")},50259:function(e,t,r){"use strict";r.d(t,{pm:function(){return s},xX:function(){return c}});var i,o=r(67294),l=function(e){var t,r=document.querySelector(".grecaptcha-badge");r&&r.parentNode&&document.body.removeChild(r.parentNode);var i=document.querySelector("#"+e);i&&i.remove(),(t=document.querySelector("script[src^='https://www.gstatic.com/recaptcha/releases']"))&&t.remove()},n=function(e){var t=e.reCaptchaKey,r=e.language,i=e.onLoad,o=e.useRecaptchaNet,l=e.useEnterprise,n=e.scriptProps,a=void 0===n?{}:n,s=a.nonce,c=void 0===s?"":s,u=a.defer,d=a.async,m=a.id,p=a.appendTo,_=(void 0===m?"":m)||"google-recaptcha-v3";if(document.querySelector("#"+_))i();else{var E,v,T,f=(v=(E={useEnterprise:l,useRecaptchaNet:o}).useRecaptchaNet,T=E.useEnterprise,"https://www."+(v&&!T?"recaptcha.net":"google.com")+"/recaptcha/"+(T?"enterprise.js":"api.js")),I=document.createElement("script");I.id=_,I.src=f+"?render="+t+(r?"&hl="+r:""),c&&(I.nonce=c),I.defer=!!(void 0!==u&&u),I.async=!!(void 0!==d&&d),I.onload=i,("body"===(void 0===p?void 0:p)?document.body:document.getElementsByTagName("head")[0]).appendChild(I)}};(i||(i={})).SCRIPT_NOT_AVAILABLE="Recaptcha script is not available";var a=(0,o.createContext)({executeRecaptcha:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called
1inside component wrapped by GoogleRecaptchaProvider")}});function s(e){var t=this,r=e.reCaptchaKey,s=e.useEnterprise,c=void 0!==s&&s,u=e.useRecaptchaNet,d=void 0!==u&&u,m=e.scriptProps,p=e.language,_=e.children,E=(0,o.useState)(null),v=E[0],T=E[1];(0,o.useEffect)(function(){if(r){var e=(null==m?void 0:m.id)||"google-recaptcha-v3";return n({reCaptchaKey:r,useEnterprise:c,useRecaptchaNet:d,scriptProps:m,language:p,onLoad:function(){if(window&&window.grecaptcha){var e=c?window.grecaptcha.enterprise:window.grecaptcha;e.ready(function(){T(e)})}else console.warn("<GoogleRecaptchaProvider /> "+i.SCRIPT_NOT_AVAILABLE)}}),function(){l(e)}}console.warn("<GoogleReCaptchaProvider /> recaptcha key not provided")},[c,d,m,p]);var f=(0,o.useCallback)(function(e){var i,o,l;return i=void 0,o=void 0,l=function(){return function(e,t){var r,i,o,l,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(l){return function(a){return function(l){if(r)throw TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=2&l[0]?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(!(o=(o=n.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){n=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(6===l[0]&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e],i=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,a])}}}(this,function(t){switch(t.label){case 0:if(!v||!v.execute)throw Error("<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded");return[4,v.execute(r,{action:e})];case 1:return[2,t.sent()]}})},new(o||(o=Promise))(function(e,r){function n(e){try{s(l.next(e))}catch(e){r(e)}}function a(e){try{s(l.throw(e))}catch(e){r(e)}}function s(t){var r;t.done?e(t.value):((r=t.value)instanceof o?r:new o(function(e){e(r)})).then(n,a)}s((l=l.apply(t,i||[])).next())})},[v]),I=(0,o.useMemo)(function(){return{executeRecaptcha:v?f:void 0}},[f,v]);return o.createElement(a.Provider,{value:I},_)}a.Consumer;var c=function(){return(0,o.useContext)(a)};function u(e,t){return e(t={exports:{}},t.exports),t.exports}var d="function"==typeof Symbol&&Symbol.for,m=d?Symbol.for("react.element"):60103,p=d?Symbol.for("react.portal"):60106,_=d?Symbol.for("react.fragment"):60107,E=d?Symbol.for("react.strict_mode"):60108,v=d?Symbol.for("react.profiler"):60114,T=d?Symbol.for("react.provider"):60109,f=d?Symbol.for("react.context"):60110,I=d?Symbol.for("react.async_mode"):60111,O=d?Symbol.for("react.concurrent_mode"):60111,A=d?Symbol.for("react.forward_ref"):60112,h=d?Symbol.for("react.suspense"):60113,N=d?Symbol.for("react.suspense_list"):60120,S=d?Symbol.for("react.memo"):60115,C=d?Symbol.for("react.lazy"):60116,y=d?Symbol.for("react.block"):60121,R=d?Symbol.for("react.fundamental"):60117,g=d?Symbol.for("react.responder"):60118,L=d?Symbol.for("react.scope"):60119;function D(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case m:switch(e=e.type){case I:case O:case _:case v:case E:case h:return e;default:switch(e=e&&e.$$typeof){case f:case A:case C:case S:case T:return e;default:return t}}case p:return t}}}function M(e){return D(e)===O}var b={AsyncMode:I,ConcurrentMode:O,ContextConsumer:f,ContextProvider:T,Element:m,ForwardRef:A,Fragment:_,Lazy:C,Memo:S,Portal:p,Profiler:v,StrictMode:E,Suspense:h,isAsyncMode:function(e){return M(e)||D(e)===I},isConcurrentMode:M,isContextConsumer:function(e){return D(e)===f},isContextProvider:function(e){return D(e)===T},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===m},isForwardRef:function(e){return D(e)===A},isFragment:function(e){return D(e)===_},isLazy:function(e){return D(e)===C},isMemo:function(e){return D(e)===S},isPortal:function(e){return D(e)===p},isProfiler:function(e){return D(e)===v},isStrictMode:function(e){return D(e)===E},isSuspense:function(e){return D(e)===h},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===_||e===O||e===v||e===E||e===h||e===N||"object"==typeof e&&null!==e&&(e.$$typeof===C||e.$$typeof===S||e.$$typeof===T||e.$$typeof===f||e.$$typeof===A||e.$$typeof===R||e.$$typeof===g||e.$$typeof===L||e.$$typeof===y)},typeOf:D},w=u(function(e,t){}),U=(w.AsyncMode,w.ConcurrentMode,w.ContextConsumer,w.ContextProvider,w.Element,w.ForwardRef,w.Fragment,w.Lazy,w.Memo,w.Portal,w.Profiler,w.StrictMode,w.Suspense,w.isAsyncMode,w.isConcurrentMode,w.isContextConsumer,w.isContextProvider,w.isElement,w.isForwardRef,w.isFragment,w.isLazy,w.isMemo,w.isPortal,w.isProfiler,w.isStrictMode,w.isSuspense,w.isValidElementType,w.typeOf,u(function(e){e.exports=b})),P={};P[U.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P[U.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0}}},function(e){e.O(0,[7749,2599,378,5010,6863,9774,2888,179],function(){return e(e.s=8871)}),_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.