1import { r as reactExports, t as trpc, j as jsxRuntimeExports, X, L as LoaderCircle, v as Send, S as Shield } from './index-CNT5CkK7.js'; 2import { C as ChevronDown } from './chevron-down-DFKrqu4j.js'; 3import { M as MessageCircle } from './message-circle-DqDT8bSb.js'; 4import { A as ArrowLeft } from './arrow-left-BTjDVb-D.js'; 5 6function getOrCreateToken() { 7 const key = "eps_chat_token"; 8 let token = sessionStorage.getItem(key); 9 if (!token) { 10 token = Array.from(crypto.getRandomValues(new Uint8Array(24))).map((b) => b.toString(16).padStart(2, "0")).join(""); 11 sessionStorage.setItem(key, token); 12 } 13 return token; 14} 15function ProspectChatWidget({ agentId, agentName }) { 16 const [open, setOpen] = reactExports.useState(false); 17 const [token] = reactExports.useState(() => getOrCreateToken()); 18 const [input, setInput] = reactExports.useState(""); 19 const [messages, setMessages] = reactExports.useState([]); 20 const [loading, setLoading] = reactExports.useState(false); 21 const [hasUnread, setHasUnread] = reactExports.useState(false); 22 const bottomRef = reactExports.useRef(null); 23 const inputRef = reactExports.useRef(null); 24 const { data: historyData } = trpc.prospectChat.getHistory.useQuery( 25 { token }, 26 { enabled: !!token, refetchOnWindowFocus: false } 27 ); 28 reactExports.useEffect(() => { 29 if (historyData?.messages && historyData.messages.length > 0) { 30 setMessages( 31 historyData.messages.map((m) => ({ role: m.role, content: m.content })) 32 ); 33 } else if (historyData?.messages?.length === 0) { 34 const welcome = agentName ? `Hi there! ð I'm here to help you with your insurance info. 35 36If anything is confusing or you have a question, just ask me! I'll explain it in simple words. 37 38Your agent is ${agentName} â they'll reach out to you soon.` : "Hi there! ð I'm here to help you with your insurance info.\n\nIf anything is confusing or you have a question, just ask me! I'll explain it in simple words."; 39 setMessages([{ role: "assistant", content: welcome }]); 40 } 41 }, [historyData, agentName]); 42 const saveContactMutation = trpc.prospectChat.saveContactInfo.useMutation(); 43 const tryParseContact = (text) => { 44 const emailMatch = text.match(/[\w.+-]+@[\w-]+\.[\w.]+/); 45 const nameMatch = text.match(/(?:my name is|i(?:'m| am))\s+([A-Z][a-z]+(?:\s+[A-Z][a-z]+)?)/i); 46 return { 47 prospectEmail: emailMatch?.[0], 48 prospectName: nameMatch?.[1] 49 }; 50 }; 51 const sendMutation = trpc.prospectChat.sendMessage.useMutation({ 52 onSuccess: (data) => { 53 setMessages((prev) => [...prev, { role: "assistant", content: data.reply }]); 54 setLoading(false); 55 if (!open) setHasUnread(true); 56 }, 57 onError: () => { 58 setMessages((prev) => [...prev, { 59 role: "assistant", 60 content: "Oops! Something went wrong. Please try again." 61 }]); 62 setLoading(false); 63 } 64 }); 65 reactExports.useEffect(() => { 66 if (open) { 67 setHasUnread(false); 68 setTimeout(() => inputRef.current?.focus(), 100); 69 } 70 }, [open]); 71 reactExports.useEffect(() => { 72 bottomRef.current?.scrollIntoView({ behavior: "smooth" }); 73 }, [messages, open]); 74 const handleSend = () => { 75 const text = input.trim(); 76 if (!text || loading) return; 77 setInput(""); 78 setMessages((prev) => [...prev, { role: "user", content: text }]); 79 setLoading(true); 80 const { prospectName, prospectEmail } = tryParseContact(text); 81 if (prospectName || prospectEmail) { 82 saveContactMutation.mutate({ token, prospectName, prospectEmail }); 83 } 84 sendMutation.mutate({ token, message: text, agentId }); 85 }; 86 const handleKeyDown = (e) => { 87 if (e.key === "Enter" && !e.shiftKey) { 88 e.preventDefault(); 89 handleSend(); 90 } 91 }; 92 const SUGGESTED = [ 93 "What info do I need?", 94 "What is a VIN number?", 95 "Why do you need my SSN?", 96 "How long does this take?" 97 ]; 98 const showSuggested = messages.length <= 1 && !loading; 99 return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ 100 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "fixed", bottom: 24, right: 24, zIndex: 9999 }, children: [
101 hasUnread && !open && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { 102 position: "absolute", 103 top: -4, 104 right: -4, 105 width: 16, 106 height: 16, 107 borderRadius: "50%", 108 background: "#ef4444", 109 border: "2px solid #3C3B6E" 110 } }), 111 /* @__PURE__ */ jsxRuntimeExports.jsx( 112 "button", 113 { 114 onClick: () => setOpen((v) => !v), 115 "aria-label": open ? "Close chat" : "Open help chat", 116 style: { 117 width: 56, 118 height: 56, 119 borderRadius: "50%", 120 background: open ? "#3C3B6E" : "#B22234", 121 border: "none", 122 cursor: "pointer", 123 display: "flex", 124 alignItems: "center", 125 justifyContent: "center", 126 boxShadow: "0 4px 20px rgba(0,0,0,0.4)", 127 transition: "background 0.2s, transform 0.15s" 128 }, 129 onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.08)", 130 onMouseLeave: (e) => e.currentTarget.style.transform = "scale(1)", 131 children: open ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { size: 24, color: "#B22234" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { size: 26, color: "#3C3B6E" }) 132 } 133 ), 134 open && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { 135 position: "absolute", 136 bottom: 68, 137 right: 0, 138 width: 340, 139 maxHeight: 520, 140 background: "#2d2c5a", 141 border: "1px solid rgba(201,168,76,0.35)", 142 borderRadius: 18, 143 boxShadow: "0 8px 40px rgba(0,0,0,0.6)", 144 display: "flex", 145 flexDirection: "column", 146 overflow: "hidden" 147 }, children: [
148 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { 149 background: "#3C3B6E", 150 borderBottom: "1px solid rgba(201,168,76,0.25)", 151 padding: "14px 16px", 152 display: "flex", 153 alignItems: "center", 154 gap: 10 155 }, children: [ 156 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { 157 width: 36, 158 height: 36, 159 borderRadius: "50%", 160 background: "#B22234", 161 display: "flex", 162 alignItems: "center", 163 justifyContent: "center", 164 flexShrink: 0 165 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { size: 18, color: "white" }) }), 166 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flex: 1 }, children: [ 167 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#fff", fontWeight: 700, fontSize: 14, lineHeight: 1.2 }, children: "Need Help?" }), 168 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#B22234", fontSize: 11 }, children: "Ask me anything â I'll explain it simply!" }) 169 ] }),
170 /* @__PURE__ */ jsxRuntimeExports.jsx( 171 "button", 172 { 173 onClick: () => setOpen(false), 174 style: { background: "none", border: "none", cursor: "pointer", padding: 4 }, 175 "aria-label": "Close", 176 children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 18, color: "#64748b" }) 177 } 178 ) 179 ] }), 180 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { 181 flex: 1, 182 overflowY: "auto", 183 padding: "12px 14px", 184 display: "flex", 185 flexDirection: "column", 186 gap: 10, 187 minHeight: 200, 188 maxHeight: 340 189 }, children: [ 190 messages.map((msg, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { 191 display: "flex", 192 justifyContent: msg.role === "user" ? "flex-end" : "flex-start" 193 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { 194 maxWidth: "82%", 195 background: msg.role === "user" ? "#B22234" : "#3C3B6E", 196 color: msg.role === "user" ? "white" : "#e2e8f0", 197 borderRadius: msg.role === "user" ? "14px 14px 4px 14px" : "14px 14px 14px 4px", 198 padding: "9px 13px", 199 fontSize: 13, 200 lineHeight: 1.5, 201 fontWeight: msg.role === "user" ? 700 : 400, 202 whiteSpace: "pre-wrap", 203 wordBreak: "break-word" 204 }, children: msg.content }) }, i)), 205 loading && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { 206 background: "#3C3B6E", 207 borderRadius: "14px 14px 14px 4px", 208 padding: "9px 13px", 209 display: "flex", 210 gap: 4, 211 alignItems: "center" 212 }, children: [
213 /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { size: 14, color: "#B22234", style: { animation: "spin 1s linear infinite" } }), 214 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#94a3b8", fontSize: 12 }, children: "Thinkingâ¦" }) 215 ] }) }), 216 showSuggested && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 6, marginTop: 4 }, children: SUGGESTED.map((s) => /* @__PURE__ */ jsxRuntimeExports.jsx( 217 "button", 218 { 219 onClick: () => { 220 setInput(s); 221 setTimeout(() => inputRef.current?.focus(), 50); 222 }, 223 style: { 224 background: "rgba(201,168,76,0.12)", 225 border: "1px solid rgba(201,168,76,0.35)", 226 borderRadius: 20, 227 padding: "5px 11px", 228 color: "#B22234", 229 fontSize: 11, 230 cursor: "pointer", 231 fontWeight: 500 232 }, 233 children: s 234 }, 235 s 236 )) }),
237 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: bottomRef }) 238 ] }), 239 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { 240 borderTop: "1px solid rgba(201,168,76,0.2)", 241 padding: "10px 12px", 242 display: "flex", 243 gap: 8, 244 alignItems: "flex-end", 245 background: "#3C3B6E" 246 }, children: [ 247 /* @__PURE__ */ jsxRuntimeExports.jsx( 248 "textarea", 249 { 250 ref: inputRef, 251 value: input, 252 onChange: (e) => setInput(e.target.value), 253 onKeyDown: handleKeyDown, 254 placeholder: "Type your question hereâ¦", 255 rows: 1, 256 style: { 257 flex: 1, 258 background: "#3C3B6E", 259 border: "1px solid rgba(201,168,76,0.25)", 260 borderRadius: 10, 261 padding: "8px 12px", 262 color: "#e2e8f0", 263 fontSize: 13, 264 resize: "none", 265 outline: "none", 266 fontFamily: "inherit", 267 lineHeight: 1.4, 268 maxHeight: 80, 269 overflowY: "auto" 270 }, 271 onInput: (e) => { 272 const t = e.currentTarget; 273 t.style.height = "auto"; 274 t.style.height = Math.min(t.scrollHeight, 80) + "px"; 275 } 276 } 277 ),
278 /* @__PURE__ */ jsxRuntimeExports.jsx( 279 "button", 280 { 281 onClick: handleSend, 282 disabled: !input.trim() || loading, 283 style: { 284 width: 38, 285 height: 38, 286 borderRadius: "50%", 287 background: input.trim() && !loading ? "#B22234" : "#3C3B6E", 288 border: "none", 289 cursor: input.trim() && !loading ? "pointer" : "not-allowed", 290 display: "flex", 291 alignItems: "center", 292 justifyContent: "center", 293 flexShrink: 0, 294 transition: "background 0.15s" 295 }, 296 children: /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { size: 16, color: input.trim() && !loading ? "white" : "#475569" }) 297 } 298 ) 299 ] }) 300 ] }) 301 ] }), 302 /* @__PURE__ */ jsxRuntimeExports.jsx("style", { children: `@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }` }) 303 ] }); 304} 305 306const AGENTS = [ 307 { id: "greg-fay", name: "Greg Fay", initials: "GF", color: "#1e40af", canopy: "https://app.usecanopy.com/c/greg-fay-insurance" }, 308 { id: "charlie-drain", name: "Charlie Drain", initials: "CD", color: "#065f46", canopy: "https://app.usecanopy.com/c/charlie-drain-insurance" }, 309 { id: "josh-hinkle", name: "Josh Hinkle", initials: "JH", color: "#6b21a8", canopy: "https://app.usecanopy.com/c/hinkle-insurance-josh" }, 310 { id: "michael-jividen", name: "Michael Jividen", initials: "MJ", color: "#9f1239", canopy: "https://app.usecanopy.com/c/jividen-insurance" }, 311 { id: "jon-bucher", name: "Jon Bucher", initials: "JB", color: "#92400e", canopy: "https://app.usecanopy.com/c/bucher-insurance" }, 312 { id: "emily-bucher", name: "Emily Bucher", initials: "EB", color: "#b45309", canopy: "https://app.usecanopy.com/c/bucher-insurance" }, 313 { id: "zach-hinkle", name: "Zach Hinkle", initials: "ZH", color: "#134e4a", canopy: "https://app.usecanopy.com/c/hinkle-insurance-zach" }, 314 { id: "stacey-hinkle", name: "Stacey Hinkle", initials: "SH", color: "#831843", canopy: "https://app.usecanopy.com/c/greg-fay-insurance" }, 315 { id: "angie-hinkle", name: "Angie Hinkle", initials: "AH", color: "#3C3B6E", canopy: "https://app.usecanopy.com/c/hinkle-insurance-angie" }, 316 { id: "adam-kaufman", name: "Adam Kaufman", initials: "AK", color: "#1a4731", canopy: "https://app.usecanopy.com/c/greg-fay-insurance" }, 317 { id: "lesley-wiegand", name: "Lesley Wiegand", initials: "LW", color: "#0d9488", canopy: "https://app.usecanopy.com/c/expert-protection-services-lesley-wiegand" } 318]; 319const AGENTINSURE_URL = "https://www.agentinsure.com/compare/auto-insurance-home-insurance/expertpro/quote.aspx"; 320const LESLEY_LOGO_URL = "https://d2xsxph8kpxj0f.cloudfront.net/310519663604930982/ms8UWKEcRWG3YzbxUBnVFM/producer-logos/lesley-wiegand-20261001-c3cba19d.jpg"; 321function ProspectStart() { 322 const [step, setStep] = reactExports.useState("pick-agent"); 323 const [agentId, setAgentId] = reactExports.useState(null); 324 const [answer, setAnswer] = reactExports.useState(null); 325 const [preFilledAgent, setPreFilledAgent] = reactExports.useState(false); 326 const [faqOpen, setFaqOpen] = reactExports.useState(false); 327 const { data: headshots } = trpc.agents.getHeadshots.useQuery(); 328 const getHeadshot = (id) => headshots?.find((h) => h.agentId === id)?.headshotUrl ?? null; 329 const recordClickMutation = trpc.onboarding.recordLinkClick.useMutation(); 330 reactExports.useEffect(() => { 331 const params = new URLSearchParams(window.location.search); 332 const paramAgentId = params.get("agent"); 333 if (paramAgentId && AGENTS.some((a) => a.id === paramAgentId)) { 334 setAgentId(paramAgentId); 335 setStep("has-login"); 336 setPreFilledAgent(true); 337 recordClickMutation.mutate({ 338 agentId: paramAgentId, 339 referrer: document.referrer || void 0,
340 userAgent: navigator.userAgent.slice(0, 512) 341 }); 342 } 343 }, []); 344 const agent = AGENTS.find((a) => a.id === agentId); 345 const handleChangeAgent = () => { 346 setStep("pick-agent"); 347 setAgentId(null); 348 setPreFilledAgent(false); 349 const url = new URL(window.location.href); 350 url.searchParams.delete("agent"); 351 window.history.replaceState({}, "", url.toString()); 352 }; 353 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { minHeight: "100vh", background: "#3C3B6E", display: "flex", flexDirection: "column" }, children: [ 354 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { background: "#2d2c5a", borderBottom: "1px solid rgba(201,168,76,0.3)", padding: "16px 24px", display: "flex", alignItems: "center", gap: 12 }, children: [ 355 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: 40, height: 40, borderRadius: 10, background: "#B22234", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Shield, { size: 22, color: "#3C3B6E" }) }),
356 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 357 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#fff", fontWeight: 700, fontSize: 17, lineHeight: 1.2 }, children: "Expert Protection Services" }), 358 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#B22234", fontSize: 12 }, children: "Free insurance quotes â no sign-in needed" }) 359 ] }) 360 ] }), 361 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: 1, display: "flex", alignItems: "center", justifyContent: "center", padding: "24px 16px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: "100%", maxWidth: 480 }, children: [ 362 step === "pick-agent" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 363 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { textAlign: "center", marginBottom: 28 }, children: [ 364 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#fff", fontSize: 26, fontWeight: 800, lineHeight: 1.3, marginBottom: 8 }, children: "Who is your agent?" }),
365 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#94a3b8", fontSize: 16 }, children: "Tap their name below." }) 366 ] }), 367 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 12 }, children: AGENTS.map((a) => /* @__PURE__ */ jsxRuntimeExports.jsxs( 368 "button", 369 { 370 onClick: () => { 371 setAgentId(a.id); 372 setStep("has-login"); 373 }, 374 style: { 375 background: "#2d2c5a", 376 border: "2px solid #3C3B6E", 377 borderRadius: 16, 378 padding: "20px 12px", 379 display: "flex", 380 flexDirection: "column", 381 alignItems: "center", 382 gap: 10, 383 cursor: "pointer", 384 transition: "border-color 0.15s" 385 }, 386 onMouseEnter: (e) => e.currentTarget.style.borderColor = "#B22234", 387 onMouseLeave: (e) => e.currentTarget.style.borderColor = "#3C3B6E", 388 children: [
389 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { 390 width: 56, 391 height: 56, 392 borderRadius: "50%", 393 background: getHeadshot(a.id) ? "transparent" : a.color, 394 display: "flex", 395 alignItems: "center", 396 justifyContent: "center", 397 color: "#fff", 398 fontWeight: 700, 399 fontSize: 18, 400 overflow: "hidden" 401 }, children: getHeadshot(a.id) ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: getHeadshot(a.id), alt: a.name, style: { width: "100%", height: "100%", objectFit: "cover" } }) : a.initials }), 402 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#fff", fontWeight: 600, fontSize: 14, textAlign: "center", lineHeight: 1.3 }, children: a.name }) 403 ] 404 }, 405 a.id 406 )) }), 407 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { textAlign: "center", marginTop: 24, color: "#64748b", fontSize: 13 }, children: "No sign-in. No spam. 100% free." }) 408 ] }), 409 step === "confirm" && agent && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { textAlign: "center" }, children: [ 410 answer === "yes" && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
411 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { fontSize: 56, marginBottom: 16 }, children: "ð" }), 412 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#fff", fontSize: 26, fontWeight: 800, marginBottom: 10 }, children: "You're all set!" }), 413 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: "#94a3b8", fontSize: 15, marginBottom: 28, lineHeight: 1.6 }, children: [ 414 agent.name, 415 " will follow up with you within 24 hours.", 416 /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}), 417 "Youâll log in to your insurance companyâs website so ", 418 agent.name, 419 " can see your current coverage." 420 ] }) 421 ] }), 422 answer === "no" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginBottom: 28 } }), 423 /* @__PURE__ */ jsxRuntimeExports.jsx( 424 "a", 425 { 426 href: answer === "yes" && agent.canopy ? agent.canopy : AGENTINSURE_URL, 427 target: "_blank", 428 rel: "noopener noreferrer", 429 onClick: () => setTimeout(() => setStep("referral"), 1500), 430 style: { 431 display: "inline-flex", 432 alignItems: "center", 433 gap: 10, 434 background: "var(--eps-gold, #B22234)", 435 borderRadius: 14, 436 padding: "16px 32px", 437 color: "#2d2c5a", 438 fontWeight: 800, 439 fontSize: 18, 440 textDecoration: "none", 441 boxShadow: "0 4px 20px rgba(201,168,76,0.4)" 442 }, 443 children: answer === "yes" ? "ð Connect My Policy â" : "Continue to Quote Portal â" 444 } 445 ), 446 answer === "yes" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: "#64748b", fontSize: 13, marginTop: 12, lineHeight: 1.5 }, children: [ 447 "Youâll log in to your insurance companyâs website",
448 /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}), 449 "so ", 450 agent.name, 451 " can see your current coverage." 452 ] }), 453 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx( 454 "button", 455 { 456 onClick: () => setStep("has-login"), 457 style: { background: "none", border: "none", color: "#64748b", fontSize: 13, cursor: "pointer", textDecoration: "underline" }, 458 children: "â Go back" 459 } 460 ) }) 461 ] }), 462 step === "referral" && agent && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { textAlign: "center" }, children: [ 463 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { fontSize: 48, marginBottom: 12 }, children: "ð" }), 464 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#fff", fontSize: 22, fontWeight: 800, marginBottom: 8 }, children: "Know someone who could save on insurance?" }), 465 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: "#94a3b8", fontSize: 14, marginBottom: 24, lineHeight: 1.6 }, children: [ 466 "Share ", 467 agent.name, 468 "'s link with a friend or family member.",
469 /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}), 470 "It takes 2 minutes and there's no sign-in required." 471 ] }), 472 /* @__PURE__ */ jsxRuntimeExports.jsx( 473 "a", 474 { 475 href: `sms:?&body=${encodeURIComponent(`Hey! I just used this to get a free insurance quote in 2 minutes â no sign-in needed. Check it out: ${window.location.origin}/start?agent=${agent.id}`)}`, 476 style: { 477 display: "inline-flex", 478 alignItems: "center", 479 gap: 10, 480 background: "#3C3B6E", 481 border: "2px solid var(--eps-gold, #B22234)", 482 borderRadius: 14, 483 padding: "14px 28px", 484 color: "#fff", 485 fontWeight: 700, 486 fontSize: 16, 487 textDecoration: "none", 488 marginBottom: 12 489 }, 490 children: "ð± Text a Friend" 491 } 492 ), 493 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx( 494 "button", 495 { 496 onClick: () => { 497 setStep("pick-agent"); 498 setAgentId(null); 499 setAnswer(null); 500 setPreFilledAgent(false); 501 }, 502 style: { background: "none", border: "none", color: "#64748b", fontSize: 13, cursor: "pointer", textDecoration: "underline" }, 503 children: "No thanks, I'm done" 504 } 505 ) }) 506 ] }), 507 step === "has-login" && agent && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 508 agent.id === "lesley-wiegand" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { background: "#fff", borderRadius: 14, padding: "12px 18px", marginBottom: 16, textAlign: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: LESLEY_LOGO_URL, alt: "Lesley Wiegand Insurance â Protect What Matters", style: { display: "block", width: "100%", maxWidth: 390, height: "auto", margin: "0 auto" } }) }),
509 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, background: "#2d2c5a", border: "1px solid #3C3B6E", borderRadius: 12, padding: "12px 16px", marginBottom: 28 }, children: [ 510 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: 40, height: 40, borderRadius: "50%", background: getHeadshot(agent.id) ? "transparent" : agent.color, display: "flex", alignItems: "center", justifyContent: "center", color: "#fff", fontWeight: 700, fontSize: 15, flexShrink: 0, overflow: "hidden" }, children: getHeadshot(agent.id) ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: getHeadshot(agent.id), alt: agent.name, style: { width: "100%", height: "100%", objectFit: "cover" } }) : agent.initials }), 511 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flex: 1 }, children: [ 512 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#94a3b8", fontSize: 11 }, children: "Your agent" }), 513 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#fff", fontWeight: 600, fontSize: 15 }, children: agent.name }) 514 ] }),
515 /* @__PURE__ */ jsxRuntimeExports.jsx( 516 "button", 517 { 518 onClick: handleChangeAgent, 519 style: { background: "none", border: "none", color: "#B22234", fontSize: 13, cursor: "pointer", textDecoration: "underline" }, 520 children: "Change" 521 } 522 ) 523 ] }), 524 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { textAlign: "center", marginBottom: 28 }, children: [ 525 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: "#fff", fontSize: 24, fontWeight: 800, lineHeight: 1.3, marginBottom: 10 }, children: [ 526 "Can you log in to your", 527 /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}), 528 "current insurance website?" 529 ] }), 530 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { color: "#94a3b8", fontSize: 15 }, children: [ 531 "Like Nationwide.com, Progressive.com,", 532 /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}), 533 "or your insurance company's app." 534 ] }) 535 ] }),
536 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 14 }, children: [ 537 !agent.canopy && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { role: "status", style: { color: "#fef3c7", background: "#78350f", borderRadius: 12, padding: "12px 16px", fontSize: 14 }, children: [ 538 agent.name, 539 "'s Canopy Connect link is being set up. Please contact your agent to connect an existing policy; the quote portal below remains available." 540 ] }), 541 /* @__PURE__ */ jsxRuntimeExports.jsxs( 542 "button", 543 { 544 onClick: () => { 545 if (!agent?.canopy) return; 546 window.open(agent.canopy, "_blank", "noopener,noreferrer"); 547 setAnswer("yes"); 548 setStep("referral"); 549 }, 550 disabled: !agent.canopy, 551 style: { 552 display: "flex", 553 alignItems: "center", 554 justifyContent: "center", 555 gap: 12, 556 background: "#16a34a", 557 borderRadius: 18, 558 padding: "22px 24px", 559 color: "#fff", 560 fontWeight: 800, 561 fontSize: 22, 562 border: "none", 563 cursor: "pointer", 564 boxShadow: "0 4px 24px rgba(22,163,74,0.35)", 565 opacity: agent.canopy ? 1 : 0.55 566 }, 567 children: [
568 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: 28 }, children: "â " }), 569 " Yes, I can log in" 570 ] 571 } 572 ), 573 /* @__PURE__ */ jsxRuntimeExports.jsxs( 574 "button", 575 { 576 onClick: () => { 577 setAnswer("no"); 578 setStep("confirm"); 579 }, 580 style: { 581 display: "flex", 582 alignItems: "center", 583 justifyContent: "center", 584 gap: 12, 585 background: "#3C3B6E", 586 border: "2px solid #334d6e", 587 borderRadius: 18, 588 padding: "22px 24px", 589 color: "#fff", 590 fontWeight: 800, 591 fontSize: 22, 592 cursor: "pointer" 593 }, 594 children: [ 595 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: 28 }, children: "â" }), 596 " No, I can't" 597 ] 598 } 599 ) 600 ] }),
601 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { marginTop: 20, borderRadius: 12, border: "1px solid #3C3B6E", overflow: "hidden" }, children: [ 602 /* @__PURE__ */ jsxRuntimeExports.jsxs( 603 "button", 604 { 605 onClick: () => setFaqOpen((o) => !o), 606 style: { 607 width: "100%", 608 display: "flex", 609 alignItems: "center", 610 justifyContent: "space-between", 611 background: "#2d2c5a", 612 border: "none", 613 padding: "12px 16px", 614 color: "#94a3b8", 615 fontSize: 13, 616 cursor: "pointer" 617 }, 618 children: [ 619 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "What is Canopy Connect?" }), 620 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: 18, lineHeight: 1 }, children: faqOpen ? "â" : "+" }) 621 ] 622 } 623 ), 624 faqOpen && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { background: "#3C3B6E", padding: "14px 16px", color: "#94a3b8", fontSize: 13, lineHeight: 1.7 }, children: [
625 /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { style: { margin: "0 0 8px" }, children: [ 626 /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { style: { color: "#fff" }, children: "Canopy Connect" }), 627 " is a safe tool that lets you log in to your current insurance companyâs website (like Nationwide or Progressive) so your agent can see your current policy details." 628 ] }), 629 /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { style: { margin: 0 }, children: [ 630 "Your agent uses this to find you better rates. ", 631 /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { style: { color: "#fff" }, children: "They cannot make any changes" }), 632 " to your current policy â they can only view it." 633 ] }) 634 ] }) 635 ] }), 636 /* @__PURE__ */ jsxRuntimeExports.jsxs( 637 "button", 638 { 639 onClick: handleChangeAgent, 640 style: { display: "flex", alignItems: "center", gap: 6, background: "none", border: "none", color: "#64748b", fontSize: 14, cursor: "pointer", margin: "24px auto 0", padding: 0 }, 641 children: [
642 /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { size: 15 }), 643 " ", 644 preFilledAgent ? "Not your agent? Go back" : "Go back" 645 ] 646 } 647 ) 648 ] }) 649 ] }) }), 650 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { background: "#2d2c5a", borderTop: "1px solid #3C3B6E", padding: "14px 24px", textAlign: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { color: "#475569", fontSize: 12 }, children: "© Expert Protection Services · Licensed Insurance Agency · Ohio" }) }), 651 /* @__PURE__ */ jsxRuntimeExports.jsx( 652 ProspectChatWidget, 653 { 654 agentId: agentId ?? void 0, 655 agentName: agent?.name 656 } 657 ) 658 ] }); 659} 660 661export { ProspectStart as default };
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.