"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9142],{96576:function(e,t,n){var l=n(85893),r=n(67294),a=n(47013),i=n(6004),s=n(44725),o=n(98388);t.Z=e=>{let{show:t,onClose:n,systemRecommendation:c,insideModalChanged:d,setInsideModalChanged:u,children:m,title:f}=e,x=(0,r.useRef)(null),h=(0,r.useRef)(null),g=(0,r.useRef)(null),b=(0,r.useCallback)(()=>{g.current=document.activeElement,h.current&&h.current.focus()},[h]),p=(0,r.useCallback)(e=>{e.preventDefault&&e.preventDefault(),g.current.focus(),n(),document.body.style.overflow="unset",document.body.style.overflowX="hidden"},[n]);return(0,r.useEffect)(()=>{let e=document.getElementById("__next");t?(document.body.style.overflow="hidden",e.style.width="100vw",b()):(document.body.style.overflow="unset",e.style.width="")},[t,b]),(0,r.useEffect)(()=>{if(!t||!x.current)return;let e=Array.from(x.current.querySelectorAll('button, a, input, textarea, select, [tabindex]:not([tabindex="-1"])')),n=e[0],l=e[e.length-1].classList.contains("hidden")?e[e.length-2]:e[e.length-1];function r(e){if("Escape"===e.key){p(e);return}"Tab"!==e.key||(e.shiftKey&&document.activeElement===n?(e.preventDefault(),null==l||l.focus()):e.shiftKey||document.activeElement!==l||(e.preventDefault(),null==n||n.focus()))}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,p,x]),(0,r.useEffect)(()=>{if(t&&d&&x.current&&h.current){let e=document.activeElement;e&&x.current.contains(e)||h.current.focus(),u&&u(!1)}},[t,d,u,x,h]),(0,l.jsxs)("div",{id:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"dialog--title",className:"bottom-0 left-0 right-0 top-1 z-[10000] mx-auto h-full w-screen md:top-0 ".concat(t?"fixed":"hidden"),children:[(0,l.jsxs)(s.E.div,{initial:{y:"100%"},animate:{y:t?"2%":"100%"},transition:{duration:.3,ease:"easeOut"},className:"modal-remove-sb absolute inset-0 bottom-0 left-0 right-0 z-[300] mx-auto h-full max-h-screen w-[22rem] overflow-auto rounded-t-[2.25rem] bg-white md:w-[32.5rem] lg:w-[48rem]",ref:x,tabIndex:-1,children:[(0,l.jsxs)("div",{className:(0,o.dV)("relative mx-4 mb-9 mt-6 md:mb-10 md:mt-10",c?"md:mx-10":"md:mx-12"),children:[(0,l.jsx)("div",{className:"text-left",children:(0,l.jsx)("h3",{className:(0,o.dV)("my-0 w-[12rem] text-base md:w-full md:text-lg lg:text-2xl",c?"!font-Inter font-600":"font-700"),children:f})}),(0,l.jsx)("div",{className:(0,o.dV)("absolute right-0 top-1/2 z-20 h-8 -translate-y-1/2"),children:(0,l.jsx)(a.Z,{disableBase:!0,size:"none",addClass:"text-4xl font-light",primary:!1,onClick:p,buttonRef:h,dataTrackingProps:{position:"body",location:"popup",action:"toggle",type:"close"},children:(0,l.jsx)(i.Z,{width:"32",height:"32"})})})]}),(0,l.jsx)("div",{className:(0,o.dV)("px-6 pb-20 text-left",c?"md:px-10":"md:px-12"),children:m})]}),(0,l.jsx)("div",{className:"fixed bottom-0 left-0 right-0 top-0 z-[250] bg-rich-black/50",onClick:p})]})}},147:function(e,t){t.Z=(e,t)=>{var n;if(!sessionStorage.getItem("systemRecFormData"))return"This person did not fill out the SRT form";let l=sessionStorage.getItem("systemRecFormData")||"",r=t||sessionStorage.getItem("systemRecResultsPageUrl"),a="URL not available";if(r){let t=new URL(r);t.searchParams.set("dealer",e),a=t.toString()}let i=JSON.parse(l),s=Object.entries(i).filter(e=>{let[t]=e;return"homeAddress"!==t&&"contactInfo"!==t}).map(e=>{let[t,n]=e,l=t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()),r=String(n).replace(/,(?=\D)/g,", ");return r=r&&""!==r?r:"N/A","".concat(l,": ").concat(r)}).join(" | "),o=(null==i?void 0:null===(n=i.contactInfo)||void 0===n?void 0:n.callTime)?" | Best call time: ".concat(i.contactInfo.callTime):"";return"".concat(s).concat(o," | Link to recommendation: ").concat(a)}},22943:function(e,t,n){var l=n(85893);t.Z=e=>{let{children:t}=e;return(0,l.jsx)("p",{className:"mb-8 mt-0 text-balance font-Inter text-sm font-500 text-dim-gray lg:mb-10 lg:text-20 lg:leading-6.5","data-testid":"SRTSubtitle",children:t})}},14889:function(e,t,n){n.d(t,{Z:function(){return d}});var l=n(85893),r=n(67294),a=n(93967),i=n.n(a),s=n(52767),o=n(49365),c=e=>{let{className:t,...n}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",className:i()("inline-block h-auto",t),"aria-label":"Arrow Right","data-testid":"SRTIconArrowRightDown",...n,children:(0,l.jsx)("path",{fill:"#fff",d:"m7.618 13.54-3.75-3.75a.723.723 0 0 1 0-1.056.723.723 0 0 1 1.055 0l2.484 2.461V4c0-.398.329-.75.75-.75.399 0 .75.352.75.75v7.195l2.461-2.46a.723.723 0 0 1 1.055 0 .723.723 0 0 1 0 1.054l-3.75 3.75a.723.723 0 0 1-1.055 0Z"})})},d=e=>{let{children:t,className:n="",onClick:a,disabled:d=!1,href:u,position:m="left",variant:f="primary",size:x,type:h,...g}=e,b="primary"===f?"text-white bg-eerie-black hover:bg-charelston-gray focus:bg-charelston-gray focus:text-slick-silver disabled:bg-dim-gray disabled:text-slick-silver text-Inter tracking-normal":"text-eerie-black bg-lighthouse hover:text-arsenic focus:text-dim-gray disabled:text-quick-silver text-Inter tracking-normal",p="primary"===f?"fill-white group-focus:fill-slick-silver group-disabled:fill-slick-silver":"fill-eerie-black group-hover:fill-arsenic group-focus:fill-dim-gray group-disabled:fill-quick-silver",v="sm"===x?"px-2 py-1 rounded-lg text-sm gap-1":"px-6 py-3 rounded-2xl text-base gap-2",w=(0,r.useRef)(null);return(0,l.jsx)(l.Fragment,{children:u?(0,l.jsxs)("a",{href:u,className:i()("group inline-flex items-center rounded-2xl",b,n,v),target:"_blank","data-testid":"SRTSystemButton",...g,children:["left"===m&&(0,l.jsx)(o.D,{className:i()("w-5",p)}),t,"right"===m&&(0,l.jsx)(s.E,{className:i()("w-5",p)}),"right-down"===m&&(0,l.jsx)(c,{className:i()("w-20",p)})]}):(0,l.jsxs)("button",{"data-testid":"SRTSystemButton",type:h,ref:w,onClick:a,className:i()("group inline-flex items-center rounded-2xl px-6 py-3",b,n,v),disabled:d,...g,children:["left"===m&&(0,l.jsx)(o.D,{className:i()("w-5",p)}),t,"right"===m&&(0,l.jsx)(s.E,{className:i()("w-5",p)}),"right-down"===m&&(0,l.jsx)(c,{className:i()("w-20",p)})]})})}},21320:function(e,t,n){var l=n(85893);t.Z=e=>{let{children:t}=e;return(0,l.jsx)("h3",{className:"mb-1 mt-0 text-balance font-Inter text-24 font-bold leading-7.5 lg:text-4xl lg:leading-12","data-testid":"SRTTitle",children:t})}},49365:function(e,t,n){n.d(t,{D:function(){return i}});var l=n(85893),r=n(93967),a=n.n(r),i=e=>{let{className:t,...n}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 12",className:a()("inline-block",t),"aria-label":"Arrow Left","data-testid":"SRTIconArrowLeft",...n,children:(0,l.jsx)("path",{d:"M1.12109 5.14844L5.49609 0.773438C5.82422 0.417969 6.39844 0.417969 6.72656 0.773438C7.08203 1.10156 7.08203 1.67578 6.72656 2.00391L3.85547 4.875H12.25C12.7148 4.875 13.125 5.28516 13.125 5.75C13.125 6.24219 12.7148 6.625 12.25 6.625H3.85547L6.72656 9.52344C7.08203 9.85156 7.08203 10.4258 6.72656 10.7539C6.39844 11.1094 5.82422 11.1094 5.49609 10.7539L1.12109 6.37891C0.765625 6.05078 0.765625 5.47656 1.12109 5.14844Z"})})}},52767:function(e,t,n){n.d(t,{E:function(){return i}});var l=n(85893),r=n(93967),a=n.n(r),i=e=>{let{className:t,...n}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",className:a()("inline-block",t),"aria-label":"Arrow Right","data-testid":"SRTIconArrowRight",...n,children:(0,l.jsx)("path",{d:"M15.8516 10.3789L11.4766 14.7539C11.1484 15.1094 10.5742 15.1094 10.2461 14.7539C9.89062 14.4258 9.89062 13.8516 10.2461 13.5234L13.1172 10.625H4.75C4.25781 10.625 3.875 10.2422 3.875 9.75C3.875 9.28516 4.25781 8.875 4.75 8.875H13.1172L10.2461 6.00391C9.89062 5.67578 9.89062 5.10156 10.2461 4.77344C10.5742 4.41797 11.1484 4.41797 11.4766 4.77344L15.8516 9.14844C16.207 9.47656 16.207 10.0508 15.8516 10.3789Z"})})}},46157:function(e,t,n){n.d(t,{y:function(){return i}});var l=n(85893),r=n(93967),a=n.n(r),i=e=>{let{className:t,...n}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",className:a()("inline-block",t),"aria-label":"Leaf","data-testid":"SRTIconLeaf",...n,children:(0,l.jsx)("path",{d:"M16.75 8.5h4.875a5.163 5.163 0 0 0 4.594-2.766c.187-.28.656-.28.75 0A15.783 15.783 0 0 1 28 11.36C28 18.906 22.984 25 16.797 25h-.047a8.257 8.257 0 0 1-8.016-6.14 7.892 7.892 0 0 0-2.484 5.765v.75A1.11 1.11 0 0 1 5.125 26.5C4.469 26.5 4 26.031 4 25.375v-.75a9.997 9.997 0 0 1 4.5-8.39c.984-.704 2.11-1.172 3.328-1.454.75-.187 1.5-.281 2.297-.281h4.125c.375 0 .75-.328.75-.75 0-.375-.375-.75-.75-.75h-4.125c-1.922 0-3.703.469-5.25 1.266C9.906 10.937 13.047 8.5 16.75 8.5Z"})})}},69496:function(e,t,n){n.d(t,{z:function(){return l}});let l=async e=>{let t=await fetch("/residential/api/system-rec-email/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({error:"Unknown error"}));throw Error("Failed to send system recommendation email: ".concat(e.error))}}},70855:function(e,t,n){n.d(t,{v:function(){return l}});let l=["FL","NC","SC","GA","AZ","TX","VA","TN","KY","AL","MS","LA","AR","MO","IL","IN","OH","WV"]}}]);