PageSourceSearch

https://www.platinumprospects.ai/assets/ReturningVisitorSlidein-DCM_Y-Ak.js

js platinumprospects.ai collected 2026-10-05 13:45:56 UTC 6,578 bytes, 32 lines download raw bytes

1import{j as t}from"./index-YT5R0r3z.js";import{r as n,u as E,c as S}from"./react-vendor-CFCPMz2Y.js";import{X as C,A as F}from"./icons-CPYYdok_.js";function z(){const[i,d]=n.useState(!1),[r,_]=n.useState(!1),l=n.useRef(null),h=n.useRef(null),c=n.useRef(!1),p=n.useRef(0),m=n.useRef(0),g=E(),f=S();n.useEffect(()=>{localStorage.getItem("pp_slidein_seen")&&localStorage.setItem("pp_returning_visitor","true")},[]);const x=()=>localStorage.getItem("pp_returning_visitor")==="true"||localStorage.getItem("pp_slidein_seen")==="true",b=()=>localStorage.getItem("pp_returning_converted")==="true",w=()=>{const e=g.pathname;return!!(["/lead-generation","/industries","/about","/contact","/resources"].includes(e)||e.startsWith("/resources/")||e.includes("/book-a-call")||e.includes("/proposal"))};n.useEffect(()=>{if(!w()||!x()||b()||c.current)return;const e=()=>{_(window.innerWidth<1024)};e(),window.addEventListener("resize",e);const o=window.innerWidth<1024?55:45,a=()=>{const u=document.documentElement.scrollHeight-window.innerHeight;window.scrollY/u*100>=o&&!c.current&&(d(!0),c.current=!0,window.removeEventListener("scroll",a))};return window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",e)}},[g.pathname]),n.useEffect(()=>{const e=o=>{o.key==="Escape"&&i&&s()};return i&&(document.addEventListener("keydown",e),setTimeout(()=>{var o;return(o=h.current)==null?void 0:o.focus()},100)),()=>document.removeEventListener("keydown",e)},[i]);const s=()=>{d(!1)},I=e=>{l.current&&!l.current.contains(e.target)&&s()},k=e=>{p.current=e.touches[0].clientY},j=e=>{m.current=e.touches[0].clientY},N=()=>{p.current-m.current<-50&&s()},v=async e=>{localStorage.setItem("pp_returning_converted","true");try{const o=new URLSearchParams(window.location.search),a="https://sstwgvmbbtuhfweubdkb.supabase.co/functions/v1/slidein-submit",u={email:"[email protected]",source:"returning_slidein",page_url:window.location.href,user_agent:navigator.userAgent,referrer:document.referrer,utm_source:o.get("utm_source")||void 0,utm_campaign:o.get("utm_campaign")||void 0,pp_returning_visitor:localStorage.getItem("pp_returning_visitor")==="true",pp_returning_converted:!1,name:e==="proposal"?"Request Proposal CTA":"Book Call CTA"};fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNzdHdndm1iYnR1aGZ3ZXViZGtiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjM1NDIyMzgsImV4cCI6MjA3OTExODIzOH0.0N_akLJVY2VxOdTT3dzM8c6S9VIUBWuwNzGNEsoG9bI"},body:JSON.stringify(u)}).catch(y=>{console.error("Error tracking CTA click:",y)})}catch(o){console.error("Error tracking CTA click:",o)}s(),f("/contact")};return!i||!w()||!x()||b()?null:t.jsxs("div",{className:"fixed inset-0 z-50",onClick:I,role:"dialogue","aria-modal":"true","aria-labelledby":"returning-visitor-heading",style:{animation:"fadeIn 300ms ease-out"},children:[t.jsxs("div",{ref:l,className:`absolute bg-gradient-to-b from-[#001F33] via-black to-black ${r?"bottom-0 left-0 right-0 h-[45%] max-h-[550px] rounded-t-xl shadow-[0_-8px_40px_rgba(0,191,249,0.25)]":"right-0 top-0 h-full w-[38%] max-w-[500px] min-w-[380px] rounded-l-xl shadow-[-8px_0_40px_rgba(0,191,249,0.25)]"}`,style:{animation:r?"slideUpFromBottom 320ms ease-out":"slideInFromRight 280ms ease-out",borderTop:r?"2px solid rgba(0,191,249,0.4)":"none",borderLeft:r?"none":"2px solid rgba(0,191,249,0.4)"},onTouchStart:k,onTouchMove:j,onTouchEnd:N,children:[t.jsx("button",{ref:h,onClick:s,className:`absolute ${r?"top-4 right-4":"top-6 right-6"} w-10 h-10 flex items-center justify-center rounded-full bg-white/5 hover:bg-white/10 transition-all duration-200 group z-10`,"aria-label":"Close proposal offer",children:t.jsx(C,{className:"w-5 h-5 text-gray-400 group-hover:text-white transition-colors"})}),t.jsxs("div",{className:`h-full flex flex-col justify-center overflow-y-auto ${r?"px-6 py-8":"px-10 py-12"}`,children:[t.jsxs("div",{className:r?"mb-6":"mb-8",children:[t.jsxs("div",{className:"inline-flex items-center gap-2 bg-[#00BFF9]/10 px-3 py-1.5 rounded-full mb-4 border border-[#00BFF9]/30",children:[t.jsx("div",{className:"w-2 h-2 bg-[#00BFF9] rounded-full animate-pulse"}),t.jsx("span",{className:"text-xs font-bold text-[#00BFF9] uppercase tracking-wider",children:"Welcome Back"})]}),t.jsxs("h2",{id:"returning-visitor-heading",className:`font-bold text-white leading-tight mb-4 ${r?"text-2xl":"text-3xl"}`,children:["Ready to Level Up Your",r?" ":t.jsx("br",{}),t.jsx("span",{className:"text-[#00BFF9] drop-shadow-[0_0_20px_rgba(0,191,249,0.5)]",children:"Lead Generation?"})]}),t.jsx("p",{className:`text-gray-300 leading-relaxed mb-4 ${r?"text-sm":"text-base"}`,children:"You've been exploring our site — which usually means you're evaluating your next step. If you're considering upgrading your financial lead generation, we can help you map out the right approach for your firm."})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("button",{onClick:()=>v("proposal"),className:`w-full bg-[#00BFF9] text-white font-bold rounded-lg hover:shadow-[0_0_30px_rgba(0,191,249,0.5)] hover:bg-[#00A8D8] transition-all duration-300 flex items-center justify-center gap-2 group ${r?"py-3 text-base":"py-4"}`,children:["Request a Proposal",t.jsx(F,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]}),t.jsx("button",{onClick:()=>v("call"),className:`w-full bg-white/5 text-white font-semibold rounded-lg border-2 border-white/20 hover:border-[#00BFF9] hover:bg-white/10 transition-all duration-300 flex items-center justify-center gap-2 ${r?"py-3 text-base":"py-4"}`,children:"Book a Discovery Call"}),t.jsx("p",{className:"text-xs text-gray-500 text-center mt-4",children:"No pressure, no hard sell — just a clear view of what's possible."})]})]})]}),t.jsx("style",{children:`
2        @keyframes fadeIn {
3          from {
4            background-colour: rgba(0, 0, 0, 0);
5          }
6          to {
7            background-colour: rgba(0, 0, 0, 0.4);
8          }
9        }
10
11        @keyframes slideInFromRight {
12          from {
13            transform: translateX(100%);
14            opacity: 0;
15          }
16          to {
17            transform: translateX(0);
18            opacity: 1;
19          }
20        }
21
22        @keyframes slideUpFromBottom {
23          from {
24            transform: translateY(100%);
25            opacity: 0;
26          }
27          to {
28            transform: translateY(0);
29            opacity: 1;
30          }
31        }
32      `})]})}
32export{z as ReturningVisitorSlidein};

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.