1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="09ffe5c9-5f00-4893-9f33-8cc1d233fc9a",e._sentryDebugIdIdentifier="sentry-dbid-09ffe5c9-5f00-4893-9f33-8cc1d233fc9a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9683],{39683:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var s=r(95155),o=r(12115),n=r(6296),a=r(94514),l=r(55243),d=r(41313),i=r(9199),c=r(86831),u=r(73321),m=r(71916),x=r(86038),f=r(39975),b=r(9339);let h=(0,b.createServerReference)("002e508281b19df8640271550670c2c00ae119ac86",b.callServer,void 0,b.findSourceMapURL,"deleteAccount"),p=(0,b.createServerReference)("00141622f8fb476ab89fd85745a580714fd9ed5e09",b.callServer,void 0,b.findSourceMapURL,"restartOnboardingForTesting");function g(){let e=(0,u.useRouter)(),[t,r]=(0,o.useState)(!0),[b,g]=(0,o.useState)(!1),[j,y]=(0,o.useState)(!1),[v,w]=(0,o.useState)(null),[N,k]=(0,o.useState)(!1),[S,E]=(0,o.useState)(!1),[C,_]=(0,o.useState)(!1),[A,D]=(0,o.useState)(!1),[R,z]=(0,o.useState)({full_name:"",phone:"",email:""}),F=(0,o.useCallback)(async()=>{try{var e,t,s,o;let r=await (0,x.E)();if(r.error)throw Error(r.error);z({full_name:(null==(e=r.user)?void 0:e.full_name)||"",phone:(null==(t=r.user)?void 0:t.phone)||"",email:(null==(s=r.user)?void 0:s.email)||""}),_((null==(o=r.user)?void 0:o.can_restart_onboarding)??!1)}catch{w("Failed to load account data")}finally{r(!1)}},[]);function L(e,t){z(r=>({...r,[e]:t})),y(!1)}async function T(){g(!0),w(null),y(!1);try{let e=await (0,f.r)({full_name:R.full_name,phone:R.phone||void 0});if(e.error)throw Error(e.error);y(!0),setTimeout(()=>y(!1),3e3)}catch(e){w(e instanceof Error?e.message:"Failed to save")}finally{g(!1)}}async function I(){await c.yK.signOut(),e.push("/login")}async function U(){E(!0),w(null);try{let t=await h();if(t.error)throw Error(t.error);await c.yK.signOut(),e.push("/")}catch(e){w(e instanceof Error?e.message:"Failed to delete account")}finally{E(!1),k(!1)}}async function P(){if(window.confirm("Restart onboarding now? Your credit balance will reset to 15. Existing resumes, jobs, and your subscription will be kept.")){D(!0),w(null);try{let t=await p();if(t.error)throw Error(t.error);e.push("/onboarding"),e.refresh()}catch(e){w(e instanceof Error?e.message:"Failed to restart onboarding"),D(!1)}}}return((0,o.useEffect)(()=>{F()},[F]),t)?(0,s.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,s.jsx)(n.A,{className:"w-6 h-6 text-muted-foreground animate-spin"})}):(0,s.jsxs)("div",{className:"space-y-5 mx-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-foreground",children:"Account"}),(0,s.jsxs)("button",{onClick:T,disabled:b,className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-500 hover:bg-blue-600 disabled:opacity-50 text-white text-sm font-medium rounded-lg transition-colors",children:[b?(0,s.jsx)(n.A,{className:"w-4 h-4 animate-spin"}):j?(0,s.jsx)(a.A,{className:"w-4 h-4"}):(0,s.jsx)(l.A,{className:"w-4 h-4"}),b?"Saving...":j?"Saved":"Save"]})]}),v&&(0,s.jsx)("div",{className:"text-sm text-red-600 bg-red-50 border border-red-200 rounded-lg px-3 py-2",children:v}),(0,s.jsxs)("div",{className:"bg-white border border-border rounded-xl p-5 space-y-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Personal information"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium text-zinc-700 block mb-1.5",children:"Full name"}),(0,s.jsx)("input",{type:"text",value:R.full_name,onChange:e=>L("full_name",e.target.value),placeholder:"Your name",className:"w-full px-3 py-2 border border-border rounded-lg text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium text-zinc-700 block mb-1.5",children:"Email"}),(0,s.jsx)("input",{type:"text",value:R.email,disabled:!0,className:"w-full px-3 py-2 border border-border rounded-lg text-sm text-muted-foreground bg-zinc-50 cursor-not-allowed"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium text-zinc-700 block mb-1.5",children:"Phone"}),(0,s.jsx)("input",{type:"text",value:R.phone,onChange:e=>L("phone",e.target.value),placeholder:"+1 234 567 890",className:"w-full px-3 py-2 border border-border rounded-lg text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent"})]})]}),(0,s.jsxs)("div",{className:"bg-white border border-border rounded-xl p-5 space-y-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Session"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-foreground",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Sign out of your account on this device."})]}),(0,s.jsxs)("button",{onClick:I,className:"inline-flex items-center gap-2 px-4 py-2 border border-border rounded-lg text-sm font-medium text-zinc-700 hover:bg-zinc-50 transition-colors",children:[(0,s.jsx)(d.A,{className:"w-4 h-4"})," Sign out"]})]})]}),C&&(0,s.jsxs)("div",{className:"rounded-xl border border-amber-200 bg-amber-50/50 p-5 space-y-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-amber-700",children:"Testing tools"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-foreground",children:"Restart onboarding"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Reo
1pens the wizard and restores 15 Starter credits. Your resumes, jobs, and subscription are kept."})]}),(0,s.jsxs)("button",{type:"button",onClick:P,disabled:A,className:"inline-flex items-center justify-center gap-2 rounded-lg border border-amber-300 bg-white px-4 py-2 text-sm font-medium text-amber-700 transition-colors hover:bg-amber-100 disabled:opacity-50",children:[A?(0,s.jsx)(n.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(i.A,{className:"h-4 w-4"}),A?"Restarting...":"Restart onboarding"]})]})]}),(0,s.jsxs)("div",{className:"bg-white border border-red-200 rounded-xl p-5 space-y-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-red-600",children:"Danger zone"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-foreground",children:"Delete account"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Permanently delete your account and all associated data."})]}),(0,s.jsx)("button",{type:"button",onClick:()=>k(!0),className:"px-4 py-2 border border-red-200 rounded-lg text-sm font-medium text-red-600 hover:bg-red-50 transition-colors",children:"Delete account"})]})]}),(0,s.jsx)(m.u,{open:N,onClose:()=>k(!1),title:"Delete account",description:"This action is irreversible. All your data will be permanently deleted.",confirmWord:"DELETE",confirmLabel:"Delete my account",onConfirm:U,loading:S,loadingLabel:"Deleting...",variant:"danger"})]})}},71916:(e,t,r)=>{r.d(t,{u:()=>i});var s=r(95155),o=r(12115),n=r(47650),a=r(41585),l=r(33210),d=r(6296);function i(e){let{open:t,onClose:r,title:i,description:c,confirmWord:u,confirmLabel:m="Confirm",onConfirm:x,loading:f=!1,loadingLabel:b="Chargement...",variant:h="danger"}=e,[p,g]=(0,o.useState)(""),j=p.trim().toUpperCase()===u.trim().toUpperCase();async function y(){j&&!f&&await x()}if((0,o.useEffect)(()=>{t||g("")},[t]),(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return t&&document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,r]),!t||"u"<typeof document)return null;let v="danger"===h;return(0,n.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/45 backdrop-blur-sm",onClick:r}),(0,s.jsxs)("div",{className:"relative w-full max-w-sm rounded-xl bg-surface border border-border shadow-xl overflow-hidden",children:[(0,s.jsx)("div",{className:"px-6 pt-6 pb-0",children:(0,s.jsxs)("div",{className:"flex items-start gap-3.5",children:[(0,s.jsx)("div",{className:`shrink-0 w-10 h-10 rounded-xl flex items-center justify-center ${v?"bg-red-100 text-red-500":"bg-blue-50 text-blue-500"}`,children:(0,s.jsx)(a.A,{className:"w-5 h-5",strokeWidth:1.5})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0 pt-0.5",children:[(0,s.jsx)("h2",{className:"text-[15px] font-semibold text-foreground leading-snug",children:i}),c&&(0,s.jsx)("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:c})]}),(0,s.jsx)("button",{type:"button",onClick:r,className:"shrink-0 -mt-0.5 -mr-1 p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"Fermer",children:(0,s.jsx)(l.A,{className:"w-4 h-4",strokeWidth:2})})]})}),(0,s.jsxs)("div",{className:"px-6 pt-5 pb-6",children:[(0,s.jsxs)("label",{htmlFor:"confirm-input",className:"block text-[13px] font-medium text-muted-foreground mb-2",children:["Tapez"," ",(0,s.jsx)("code",{className:"font-mono font-bold text-foreground bg-muted px-1.5 py-0.5 rounded text-xs",children:u})," ","pour confirmer"]}),(0,s.jsx)("input",{id:"confirm-input",type:"text",value:p,onChange:e=>g(e.target.value),placeholder:u,className:"w-full px-3.5 py-2.5 border border-border rounded-lg text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-blue-500/40 focus:border-blue-500 font-mono tracking-wide transition-shadow bg-surface",autoComplete:"off",autoFocus:!0})]}),(0,s.jsxs)("div",{className:"px-6 py-4 bg-surface-subtle border-t border-border flex items-center justify-end gap-2.5",children:[(0,s.jsx)("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm font-medium text-muted-foreground bg-surface border border-border hover:bg-muted rounded-lg transition-colors shadow-sm",children:"Annuler"}),(0,s.jsxs)("button",{type:"button",onClick:y,disabled:!j||f,className:`inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg transition-all shadow-sm 2 disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none 3 ${v?"bg-red-600 hover:bg-red-700 text-white shadow-red-600/20":"bg-blue-500 hover:bg-blue-600 text-white shadow-blue-500/20"}`,children:[f&&(0,s.jsx)(d.A,{className:"w-3.5 h-3.5 animate-spin"}),f?b:m]})]})]})]}),document.body)}},86831:(e,t,r)=>{r.d(t,{Ht:()=>c,Jv:()=>a,yK:()=>n});var s=r(20823),o=r(83615);let n=(0,s.M)({baseURL:"https://futurole.com",plugins:[(0,o.N)()]}),{signIn:a,signUp:l,signOut:d,useSession:i,getSession:c}=n}}]);
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.