PageSourceSearch

https://www.eqiqs.com/assets/LeadMagnetSticky-Bd7yEJW0.js

js eqiqs.com collected 2026-10-02 00:20:05 UTC 3,767 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui-x7D0iLe8.js";import{u as k,r as s}from"./vendor-react-aMKJrssV.js";import{b as I,X as _,C as L,S as D,B as T,u as C}from"./index-CgmaCIwJ.js";import{I as M}from"./input-DqgkKQ22.js";import{s as R}from"./lead-capture-DwV1ZfAz.js";import{M as F}from"./mail-Du-dpIAW.js";import"./vendor-data-LOeL2b27.js";const x="eqiqs_lead_magnet_dismissed_v1",p="eqiqs_lead_magnet_subscribed_v1",H=.4,q=25e3,B=["/auth","/login","/signup","/onboarding","/dashboard","/app","/admin","/checkout","/account","/settings","/pricing"],Q=()=>{const{user:f,loading:h}=I(),l=k(),[g,d]=s.useState(!1),[o,b]=s.useState(""),[i,c]=s.useState(!1),[y,v]=s.useState(!1),w=B.some(t=>l.pathname.toLowerCase().startsWith(t)),S=typeof window<"u"&&(localStorage.getItem(x)==="1"||localStorage.getItem(p)==="1"),r=!h&&!f&&!w&&!S;s.useEffect(()=>{if(!r)return;let t=!1;const n=()=>{t||(t=!0,d(!0))},m=()=>{const a=document.documentElement;(a.scrollTop+window.innerHeight)/a.scrollHeight>=H&&n()},u=a=>{a.clientY<=0&&n()},N=window.setTimeout(n,q);return window.addEventListener("scroll",m,{passive:!0}),document.addEventListener("mouseleave",u),()=>{window.clearTimeout(N),window.removeEventListener("scroll",m),document.removeEventListener("mouseleave",u)}},[r,l.pathname]);const j=()=>{localStorage.setItem(x,"1"),d(!1)},E=async t=>{if(t.preventDefault(),!(!o||i)){c(!0);try{await R({email:o,source:"lead_magnet_sticky"})}catch{}c(!1),localStorage.setItem(p,"1"),v(!0),C.success("Trial started — check your inbox for your sign-in link.")}};return!g||!r?null:e.jsx("div",{className:"hidden sm:block fixed bottom-4 right-4 z-[60] w-[calc(100vw-2rem)] max-w-sm animate-in slide-in-from-bottom-4 fade-in duration-300",role:"dialog","aria-label":"Free compatibility report",children:e.jsxs("div",{className:"rounded-xl border border-border bg-card shadow-2xl p-5 relative",children:[e.jsx("button",{onClick:j,"aria-label":"Dismiss",className:"absolute top-2 right-2 p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition",children:e.jsx(_,{className:"h-4 w-4"})}),y?e.jsxs("div",{className:"flex items-start gap-3 py-2",children:[e.jsx("div",{className:"rounded-full bg-primary/10 p-2 shrink-0",children:e.jsx(L,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-body font-semibold text-sm",children:"Your 14-day trial is live."}),e.jsx("p",{className:"text-xs text-muted-foreground font-body mt-1",children:"We emailed a one-click sign-in link to open your Individual Toolkit dashboard."})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(D,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"text-xs font-body font-semibold uppercase tracking-wide text-primary",children:"Free 14-day trial"})]}),e.jsx("h3",{className:"font-display text-base font-bold leading-snug",children:"Start your free 14-day Individual Toolkit trial"}),e.jsx("p",{className:"text-xs text-muted-foreground font-body mt-1.5 mb-3",children:"Full 21-framework profile, compatibility scoring, and AI coach. No credit card. No password — we'll email you a one-click sign-in link."}),e.jsxs("form",{onSubmit:E,className:"space-y-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(M,{"aria-label":"Email address",type:"email",required:!0,placeholder:"[email protected]",value:o,onChange:t=>b(t.target.value),className:"flex-1 h-9 text-sm",autoFocus:!0}),e.jsxs(T,{type:"submit",size:"sm",disabled:i,className:"h-9",children:[e.jsx(F,{className:"h-3.5 w-3.5 mr-1"}),i?"...":"Start trial"]})]}),e.jsx("p",{className:"text-xs text-muted-foreground font-body",children:"Includes EQIQs Weekly newsletter. Unsubscribe in one click."})]})]})]})})};export{Q 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.