1import{d as w,b as j,r as n,f,j as e,e as S,k as L,J as I,O}from"./index-BdcS4le1.js";import{D as _}from"./DashboardLayout-Ce3fjqID.js";import{A as F}from"./ApercuHome-DYk37XH4.js";import{L as M}from"./loader-CbwWm7AF.js";import{X as C}from"./x-DYKZugAp.js";import{G as E}from"./gift-DFTs3RNv.js";import{E as P}from"./external-link-Cv4QZCM3.js";import{L as T}from"./linkedin-P5VrYMk7.js";import"./posthog-events-uUYvPdDh.js";import"./module-BUp-8uxv.js";import"./client-foeVrFck.js";import"./index-hw-LXdGk.js";import"./message-square-DnibHJ2a.js";import"./createLucideIcon-D9aSjwPV.js";import"./users-Bq--4Xwi.js";import"./check-b9Dr4m7J.js";import"./copy-MZY4ZvV3.js";import"./logo-mark-CRXjk27f.js";import"./circle-check-DIPdhXuq.js";import"./stripe-checkout-C-32jMAS.js";import"./clock-00yqIjbq.js";import"./loader-circle-CqlsfFFV.js";import"./lock-NaJAssGx.js";import"./sparkles-UeVkkS1m.js";import"./arrow-right-DJk7Ne3e.js";import"./count-up-CJl-7pUA.js";const z="StzCo1Mhkg4",k="mk_onboarding_video_v1";function R(){const t=w(),{user:l,loading:c}=j(),[a,m]=n.useState(!1);n.useEffect(()=>{if(c||!l)return;try{if(localStorage.getItem(k)==="1")return}catch{}let o=!0;return(async()=>{try{const s=await f("/api/me/onboarding-video"),p=await s.json().catch(()=>({vue:!0}));if(!o)return;if(s.ok&&p?.vue===!1)m(!0);else if(s.ok)try{localStorage.setItem(k,"1")}catch{}}catch{}})(),()=>{o=!1}},[c,l]);const i=()=>{m(!1);try{localStorage.setItem(k,"1")}catch{}f("/api/me/onboarding-video",{method:"POST"}).catch(()=>{})};return n.useEffect(()=>{if(!a)return;const o=s=>{s.key==="Escape"&&i()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[a]),a?e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-scrim/75 p-4",role:"dialog","aria-modal":"true","aria-label":t?"Getting started with Makelead":"Prise en main de Makelead",onClick:i,children:e.jsxs("div",{className:"w-[94vw] max-w-[min(1040px,90vw,calc((84vh-165px)*16/9))] overflow-hidden rounded-[12px] bg-[var(--surface-raised)] shadow-[0_24px_80px_-12px_rgba(0,0,0,0.45)]",onClick:o=>o.stopPropagation(),children:[e.jsx("div",{className:"px-7 pb-4 pt-5 text-center",children:e.jsx("h2",{className:"font-display text-[26px] font-bold leading-tight text-ink md:text-[30px]",children:t?"1m30 to understand Makelead":"1m30 pour comprendre Makelead"})}),e.jsx("div",{className:"relative mx-7 overflow-hidden rounded-[10px] bg-scrim",style:{paddingTop:"56.25%"},children:e.jsx("iframe",{src:`https://www.youtube-nocookie.com/embed/${z}?rel=0&modestbranding=1`,title:t?"1m30 to understand Makelead":"1m30 pour comprendre Makelead",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,className:"absolute inset-0 h-full w-full border-0"})}),e.jsx("div",{className:"flex justify-center px-7 pb-5 pt-5",children:e.jsx("button",{type:"button",onClick:i,className:"btn-primary inline-flex items-center whitespace-nowrap rounded-[10px] px-6 py-3 text-[14px] font-semibold",children:t?"Skip":"Passer"})})]})}):null}const v="mk_usecase_offre_v1";function A(){const t=w(),{user:l,loading:c}=j(),[a,m]=n.useState(!1),[i,o]=n.useState(""),[s,p]=n.useState(!1),[b,d]=n.useState(null),[u,y]=n.useState(!1);n.useEffect(()=>{if(c||!l)return;try{if(localStorage.getItem(v)==="1")return}catch{}let r=!0;return(async()=>{try{const x=await f("/api/me/usecase-offre"),g=await x.json().catch(()=>({montrer:!1}));if(!r)return;x.ok&&g?.montrer===!0&&m(!0)}catch{}})(),()=>{r=!1}},[c,l]);const h=()=>{m(!1);try{localStorage.setItem(v,"1")}catch{}u||f("/api/me/usecase-offre",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"fermer"})}).catch(()=>{})},N=async()=>{const r=i.trim();if(!(!r||s)){p(!0),d(null);try{const x=await f("/api/me/usecase-offre",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({post_url:r})}),g=await x.json().catch(()=>({}));if(!x.ok){d(g?.error??(t?"Could not send. Try again.":"L'envoi n'a pas marché. Réessaie.")),p(!1);return}y(!0);try{localStorage.setItem(v,"1")}catch{}}catch{d(t?"Could not send. Try again.":"L'envoi n'a pas marché. Réessaie.")}p(!1)}};return n.useEffect(()=>{if(!a)return;const r=x=>{x.key==="Escape"&&h()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[a,u]),a?e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-scrim/75 p-4",role:"dialog","aria-modal":"true","aria-label":t?"Free plan for a use case post":"Abonnement offert contre un post",onClick:h,children:e.jsxs("div",{className:"relative w-[94vw] max-w-[520px] overflow-hidden rounded-[12px] bg-[var(--surface-raised)] shadow-[0_24px_80px_-12px_rgba(0,0,0,0.45)]",onClick:r=>r.stopPropagation(),children:[e.jsx("button",{type:"button",onClick:h,"aria-label":t?"Close"
1:"Fermer",className:"absolute right-3 top-3 grid h-8 w-8 place-items-center rounded-[8px] text-ink/45 transition hover:bg-ink/[0.06] hover:text-ink",children:e.jsx(C,{size:17})}),u?e.jsxs("div",{className:"px-7 pb-7 pt-9 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 grid h-11 w-11 place-items-center rounded-full bg-[#FF4419]/10 text-[#FF4419]",children:e.jsx(E,{size:21})}),e.jsx("h2",{className:"font-display text-[23px] font-bold leading-tight text-ink",children:t?"Got it, thanks.":"C'est bien reçu, merci."}),e.jsx("p",{className:"mx-auto mt-2 max-w-[38ch] text-[14.5px] leading-relaxed text-ink/64",children:t?"We read your post and come back to you by email within a few days. If it fits, your plan is offered right after.":"On lit ton post et on revient vers toi par email sous quelques jours. Si ça colle, ton abonnement est offert dans la foulée."}),e.jsx("button",{type:"button",onClick:h,className:"btn-primary mt-6 inline-flex items-center whitespace-nowrap rounded-[10px] px-6 py-3 text-[14px] font-semibold",children:t?"Close":"Fermer"})]}):e.jsxs("div",{className:"px-7 pb-7 pt-9",children:[e.jsx("div",{className:"mb-4 grid h-11 w-11 place-items-center rounded-full bg-[#FF4419]/10 text-[#FF4419]",children:e.jsx(E,{size:21})}),e.jsx("h2",{className:"font-display text-[24px] font-bold leading-tight text-ink",children:t?"Tell people how you use Makelead, we cover your plan":"Raconte comment tu utilises Makelead, on t'offre ton abonnement"}),e.jsx("p",{className:"mt-3 text-[14.5px] leading-relaxed text-ink/64",children:t?"Publish a post about what Makelead changed for you, paste the link below, and we offer you a subscription. Your own words, your own results, nothing to recite.":"Publie un post sur ce que Makelead a changé pour toi, colle le lien ci-dessous, et on t'offre un abonnement. Tes mots, tes résultats, rien à réciter."}),e.jsx("label",{className:"mt-6 block text-[12.5px] font-semibold uppercase tracking-wide text-ink/50",children:t?"Link to your post":"Lien de ton post"}),e.jsx("input",{type:"url",value:i,onChange:r=>{o(r.target.value),d(null)},onKeyDown:r=>{r.key==="Enter"&&N()},placeholder:"https://www.linkedin.com/posts/...",className:"mt-2 w-full rounded-[10px] border border-ink/15 bg-transparent px-3.5 py-2.5 text-[14px] text-ink outline-none transition placeholder:text-ink/30 focus:border-[#FF4419]"}),e.jsx("p",{className:"mt-1.5 text-[12.5px] text-ink/45",children:t?"LinkedIn or X, the post itself and not your profile.":"LinkedIn ou X, le post lui-même et pas ton profil."}),b&&e.jsx("p",{role:"alert",className:"mt-2 text-[13px] font-medium text-red-500",children:b}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[e.jsxs("button",{type:"button",onClick:N,disabled:!i.trim()||s,className:"btn-primary inline-flex items-center gap-2 whitespace-nowrap rounded-[10px] px-5 py-3 text-[14px] font-semibold disabled:opacity-45",children:[e.jsx(P,{size:15}),s?t?"Sendingâ¦":"Envoiâ¦":t?"Send my post":"Envoyer mon post"]}),e.jsx("button",{type:"button",onClick:h,className:"rounded-[10px] px-3 py-3 text-[14px] font-medium text-ink/55 transition hover:text-ink",children:t?"Later":"Plus tard"})]})]})]})}):null}function D(){const t=w(),{user:l,loading:c}=j(),[a,m]=n.useState(!1),[i,o]=n.useState(!1),[s,p]=n.useState(null);n.useEffect(()=>{if(c||!l)return;let d=!0;return(async()=>{try{const u=await f("/api/me/unipile-connect"),y=await u.json().catch(()=>null);d&&u.ok&&y?.reconnexion_requise===!0&&m(!0)}catch{}})(),()=>{d=!1}},[c,l]);const b=async()=>{if(!i){o(!0),p(null);try{const d=await f("/api/me/unipile-connect",{method:"POST"}),u=await d.json().catch(()=>({}));if(d.ok&&u?.url){window.location.href=u.url;return}p(String(u?.error??(t?"Connection failed.":"Connexion impossible.")))}catch{p(t?"Network error.":"Erreur réseau.")}o(!1)}};return a?e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":t?"Reconnect your LinkedIn":"Reconnecte ton LinkedIn",className:"fixed inset-0 z-[95] flex items-center justify-center bg-ink/45 px-4 backdrop-blur-[3px]",children:e.jsxs("div",{className:"relative w-full max-w-[440px] rounded-2xl border border-ink/10 bg-paper p-7 shadow-2xl",children:[e.jsx("button",{type:"button",onClick:()=>
1m(!1),"aria-label":t?"Close":"Fermer",className:"absolute right-3.5 top-3.5 inline-flex h-8 w-8 items-center justify-center rounded-lg text-ink/40 transition hover:bg-ink/5 hover:text-ink/70",children:e.jsx(C,{size:17})}),e.jsx("span",{className:"inline-flex h-11 w-11 items-center justify-center rounded-xl bg-[#0A66C2]/10",children:e.jsx(T,{size:22,className:"text-[#0A66C2]"})}),e.jsx("h2",{className:"mt-4 text-[19px] font-extrabold leading-snug text-ink",children:t?"Reconnect your LinkedIn to reactivate your campaigns":"Connecte ton LinkedIn et réactive tes campagnes"}),e.jsx("p",{className:"mt-2.5 text-[13.5px] leading-relaxed text-ink/64",children:t?"We switched to a more secure LinkedIn connection: you sign in directly on a secure page, and Makelead never sees your password or your session. Your campaigns are paused until your account is reconnected.":"On passe à une connexion LinkedIn plus sûre : tu te connectes directement sur une page sécurisée, et Makelead ne voit jamais ton mot de passe ni ta session. Tes campagnes sont en pause tant que ton compte n'est pas reconnecté."}),e.jsx("p",{className:"mt-2 text-[13.5px] leading-relaxed text-ink/64",children:t?"It takes one minute. Once reconnected, restart your campaigns from the Prospecting page.":"Ãa prend une minute. Une fois reconnecté, relance tes campagnes depuis la page Prospection."}),e.jsx("button",{type:"button",onClick:()=>{b()},disabled:i,className:"mt-5 inline-flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-ink text-[14px] font-bold text-paper transition hover:opacity-90 disabled:opacity-60",children:i?t?"Openingâ¦":"Ouvertureâ¦":t?"Reconnect my LinkedIn":"Connecter mon LinkedIn"}),s&&e.jsx("p",{role:"alert",className:"mt-3 text-center text-[12.5px] font-medium text-red-500",children:s})]})}):null}function pe(){const t=S(),l=L(),[c,a]=n.useState(!1);return n.useEffect(()=>{if(!(typeof window>"u")){if(!I(window.location.hostname)){t({to:"/beta",replace:!0});return}a(!0)}},[t]),c?e.jsxs(_,{children:[e.jsx(R,{}),e.jsx(A,{}),e.jsx(D,{}),l.pathname==="/dashboard"?e.jsx(F,{}):e.jsx(O,{})]}):e.jsx(M,{fullPage:!0})}export{pe as component};
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.