1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7470],{40346:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>C});var i=a(95155),s=a(9675),l=a(25511),n=a(54169);let r=e=>"progressive"===e.displayname.toLowerCase()?{...e,title:"Drivers who save by switching to Progressive save $835 on average."}:e;var o=a(12115),m=a(15576),c=a(4608);let d=new(a(80774)).Kj({baseUrl:"https://qstash.upstash.io",token:"eyJVc2VySUQiOiIyNzljYWQ4OC03MmE2LTRmY2YtOTI3Yy0xMjBjMWNmYmIwNTIiLCJQYXNzd29yZCI6ImY0NWI4OGI5NGI0YTQyMzdiYjUzMWRjYTE5ZWFkNjNhIn0="}),p=async(e,t,a)=>{try{return await d.publishJSON({url:e,body:t,delay:a})}catch(e){throw console.error("Error scheduling via QStash:",e),e}};var u=a(87358);u.env.NEXT_PUBLIC_PREVIEW_SECRET;let x={OFFER_MATCH_SERVER_API_TOKEN:u.env.NEXT_PUBLIC_POSTMARK_OFFER_MATCH_SERVER_API_TOKEN||"f9e9a727-b6b3-4db4-b221-47145f418510",OFFER_MATCH_EMAIL_FROM:u.env.NEXT_PUBLIC_POSTMARK_OFFER_MATCH_EMAIL_FROM||"MoneyGeek <[email protected]>"},h=async e=>{let t={to:e.to,template_alias:"offer-match",template_model:{name:e.name,savedResultsLink:e.savedResultsLink},from:x.OFFER_MATCH_EMAIL_FROM,message_stream:"broadcast",tag:"offer-match",track_opens:!0,track_links:"HtmlAndText"},a="https://www.moneygeek.com/",i=a.endsWith("/")?a:`${a}/`;return p(`${i}api/email/postmark/send-delayed`,t,"3m")},_={utm_source:"SG",utm_medium:"email",utm_content:"offermatchemail",utm_campaign:"offer_match"};var g=a(77802);let f=["progressive","geico","allstate","liberty mutual","usaa","nationwide","farmers"],y=(0,o.memo)(({results:e,state:t,city:a,sendGridPayload:d,translatedContent:p=null,user:u,advertiser:x="QuinStreet"})=>{let[y,C]=(0,o.useState)(!1),[v,w]=(0,o.useState)(!1),k=(0,o.useRef)(!1),E=(0,o.useMemo)(()=>e.map(r),[e]),M=(0,o.useMemo)(()=>E.filter(e=>f.includes(e.displayname.toLowerCase())),[E]),N=(0,o.useMemo)(()=>E.filter(e=>!f.includes(e.displayname.toLowerCase())),[E]),b=(0,o.useMemo)(()=>M.length>0?M:E,[M,E]),j=(0,o.useMemo)(()=>M.length>0?N:[],[M,N]),F=(0,o.useMemo)(()=>j.length>0,[j]),R=(0,o.useCallback)(()=>{w(!0)},[]);(0,o.useEffect)(()=>{!k.current&&d?.email&&d.savedResultsLink&&(k.current=!0,(async()=>{try{let e=window.location.origin,t=new URL(d.savedResultsLink);Object.entries(_).forEach(([e,a])=>{t.searchParams.set(e,a)});let a=`${e}/api/email/track?${new URLSearchParams({target:t.toString(),event_type:"results_page_click",campaign:"offer_match",..._,email:d.email||""}).toString()}`;await h({to:d.email,name:d.first_name?.trim()||"",savedResultsLink:a});let i=c.Dx.OFFER_MATCH_EMAIL;if((0,g.XD)("OfferMatchEmailSend",{email:d.email,first_name:d.first_name,last_name:d.last_name}),i)try{await (0,c.r)(i,{email:d.email,first_name:d.first_name,last_name:d.last_name})}catch(e){console.error("Error adding contact to list:",e)}}catch(e){console.error("Error scheduling offer match email:",e),k.current=!1}})())},[e.length,d?.email,d?.savedResultsLink]);let S=1===e.length;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col mg-palm-end:gap-[30px]",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[4px] items-center justify-center md:max-w-[35em] md:mx-auto",children:[(0,i.jsx)("h2",{className:"text-[32px] font-cabin font-bold text-[#292929] text-center m-0",children:(()=>{let e=u?.firstName||u?.first_name||d?.first_name||"",t=!!e,i=!!a,s=!S;if(t&&i)if(s)return p?.title?.withUserCityPlural||`Congratulations ${e}! We Found You Great Matches in ${a}`;else return p?.title?.withUserCitySingle||`Congratulations ${e}! We Found You A Great Match in ${a}`;if(t&&!i)if(s)return p?.title?.withUserPlural||`Congratulations ${e}! We Found You Great Matches`;else return p?.title?.withUserSingle||`Congratulations ${e}! We Found You A Great Match`;if(!t&&i)if(s)return p?.title?.withCityPlural||`Congratulations! We Found You Great Matches in ${a}`;else return p?.title?.withCitySingle||`Congratulations! We Found You A Great Match in ${a}`;if(!t&&!i)if(s)return p?.title?.plural||"Congratulations! We Found You Great Matches";else return p?.title?.single||"Congratulations! We Found You A Great Match"})()}),(0,i.jsx)("p",{className:"text-center m-0 text-[16px] leading-[140%]",children:p?.description||e.length>1?"Click on multiple offers to compare quotes and maximize savings":"Click on the offer to get started"})]}),(0,i.jsxs)("div",{className:"flex flex-col items-center gap-[8px] md:p-[30px_32px] max-w-[820px]",children:[b.map((e,t)=>{let a=t+1,s=e.imp_pixel?`${e.imp_pixel}${e.imp_pixel.includes("?")?"&":"?"}PR=${a}`:null;return(0,i.jsxs)("div",{className:"contents",children:[s&&(0,i.jsx)("img",{src:s,alt:"",style:{display:"none"},"aria-hidden":!0}),(0,i.jsx)(n.A,{name:e.displayname,image:e.raw_logo,peoplesTopPick:0===t,isBestValue:0===t&&!S,isQSCompany:!0,description:e.title,iconLabel:String(a),link:e.clickurl,quoteText:p?.quotes||S?"CONTINUE":"SEE MY QUOTES",translatedContent:p,score:e.mg_score??0,sendToPosthog:!0,event:{event:"CarrierClick",provider:e.advertiser??x,company_target:e.dis
1playname,company_cpc:+e.cpc,company_rank:+e.rank,company_bid:e.bid,display_position:a,widget:`Car Insurance Hosted-${e.displayname}`,tier:e.tier},enableSelection:!0,handleQuote:R,bigCard:S,wholeClickable:!0})]},e.displayname)}),F&&(0,i.jsx)("div",{className:`flex flex-col gap-[8px] overflow-hidden transition-all duration-300 ease-in-out ${y?"max-h-auto":"max-h-0"}`,children:j.map((e,t)=>{let a=b.length+t+1,s=e.imp_pixel&&y?`${e.imp_pixel}${e.imp_pixel.includes("?")?"&":"?"}PR=${a}`:null;return(0,i.jsxs)("div",{className:"contents",children:[s&&(0,i.jsx)("img",{src:s,alt:"",style:{display:"none"},"aria-hidden":!0}),(0,i.jsx)(n.A,{name:e.displayname,image:e.raw_logo,isBestValue:!1,isQSCompany:!0,description:e.title,iconLabel:String(a),link:e.clickurl,quoteText:p?.quotes||"SEE MY QUOTES",translatedContent:p,score:e.mg_score??0,sendToPosthog:!0,event:{event:"CarrierClick",provider:e.advertiser??x,company_target:e.displayname,company_cpc:+e.cpc,company_rank:+e.rank,company_bid:+e.bid,display_position:a,widget:`Car Insurance Hosted-${e.displayname}`,tier:e.tier},enableSelection:!0,handleQuote:R,wholeClickable:!0})]},e.displayname)})}),F&&(0,i.jsx)(s.$n,{variant:"link",onClick:(0,o.useCallback)(()=>C(!y),[y]),postIcon:y?(0,i.jsx)(m.FiChevronUp,{}):(0,i.jsx)(m.FiChevronDown,{}),children:y?p?.less||"Show less":p?.more||"Show more"})]})]}),(0,i.jsxs)("div",{className:"mt-[60px] flex flex-col md:flex-row md:gap-[16px] px-[24px] rounded-[12px] bg-[#F5F6FF] w-full max-w-[820px] mx-auto",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[8px] md:gap-[16px] p-[20px_20px_20px_0px] md:p-[20px_0px_20px_0px]",children:[(0,i.jsx)("h4",{className:"text-[24px] normal-case font-[700] leading-[120%] text-mgBlue m-0",children:p?.hands||"You are in good hands"}),(0,i.jsx)("div",{className:"flex flex-col md:flex-row gap-[16px] md:gap-[32px] *:flex-[1_0_0]",children:(0,i.jsx)("p",{className:"m-0 text-[18px] leading-[150%] text-[#292929]",children:p?.users||"19 million other users have shopped their insurance with MoneyGeek"})})]}),(0,i.jsx)(l.A,{width:328,height:175,image:"https://res.cloudinary.com/moneygeek/image/upload/v1749154413/assets/components/illustrations/family_image_bqbu6s.png",alt:"social-proof-banner",className:"mx-auto md:mx-0"})]})]})});y.displayName="Results";let C=y},50477:()=>{}}]);
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.