PageSourceSearch

https://app.gmb-club.com/assets/ProspectAnalysisPublic-DVvIPYTp.js

js gmb-club.com collected 2026-10-01 10:39:47 UTC 9,672 bytes, 1 lines download raw bytes

1import{aZ as N,g as k,u as C,r as l,f as M,j as e}from"./vendor-CTnW4jj_.js";import{ck as P,b4 as I,J as L,b6 as S,s as _}from"./index-57dGsqaK.js";import{T,F as B}from"./Footer-BWdU1qVC.js";import{P as F}from"./PageHeader-kQeA3zsf.js";import{n as z,C as W,M as E}from"./ConversationMessages-DnK027qo.js";import"./ConsentLink-ugeu5WMn.js";import"./HelpDocLink-CQDDyHl6.js";import"./QuotaIndicator-gihh9YU3.js";import"./ImageWithFallback-kzSuD5Wc.js";function A(){return e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:e.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})})}function O(){return e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:e.jsx("path",{d:"M12 5v14M5 12h14"})})}function $(){return e.jsx("svg",{width:18,height:18,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 19V5M6 11l6-6 6 6"})})}function D(){return e.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[e.jsx("rect",{x:"9",y:"2",width:"6",height:"12",rx:"3"}),e.jsx("path",{d:"M5 10a7 7 0 0 0 14 0M12 17v4M8 21h8"})]})}function R(){return e.jsxs("div",{className:"flex flex-col gap-4 select-none pointer-events-none",style:{filter:"blur(4px)",opacity:.55},"aria-hidden":"true",children:[e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-5",children:[e.jsx("div",{className:"h-3.5 w-40 rounded bg-gray-200 mb-4"}),e.jsx("div",{className:"grid grid-cols-3 gap-4",children:[0,1,2].map(a=>e.jsxs("div",{children:[e.jsx("div",{className:"h-7 w-16 rounded bg-gray-300 mb-2"}),e.jsx("div",{className:"h-2.5 w-20 rounded bg-gray-200"})]},a))})]}),[0,1].map(a=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("div",{className:"h-3 w-full rounded bg-gray-200"}),e.jsx("div",{className:"h-3 w-11/12 rounded bg-gray-200"}),e.jsx("div",{className:"h-3 w-4/5 rounded bg-gray-200"})]},a)),e.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-5",children:[e.jsx("div",{className:"h-3.5 w-56 rounded bg-gray-200 mb-4"}),[0,1,2].map(a=>e.jsx("div",{className:"h-3 rounded bg-gray-200 mb-2",style:{width:`${90-a*12}%`}},a))]})]})}function X(){const{token:a}=N(),h=k(),{t,i18n:d}=C(),[n,b]=l.useState(null),[i,c]=l.useState("loading"),[u,x]=l.useState(!1);l.useEffect(()=>{const s=document.createElement("meta");return s.name="robots",s.content="noindex, nofollow",document.head.appendChild(s),()=>{document.head.removeChild(s)}},[]),l.useEffect(()=>{if(!a){c("notfound");return}let s=!1;return M.get(`https://app.gmb-club.com/api/public/prospect/${encodeURIComponent(a)}`).then(o=>{var g,p,f;if(s)return;b(o.data),c("ready"),(g=o.data)!=null&&g.business_name&&(document.title=P(t("pageTitles.prospectAnalysisNamed",{business:o.data.business_name})));const m=(((p=o.data)==null?void 0:p.language)||"fr").split("-")[0];m&&((f=d.language)==null?void 0:f.split("-")[0])!==m&&d.changeLanguage(m)}).catch(()=>{s||c("notfound")}),()=>{s=!0}},[a,d]);const j=l.useMemo(()=>((n==null?void 0:n.messages)||[]).map(s=>({id:z(),role:s.role,content:s.content,widgets:s.widgets?s.widgets.map(o=>({name:o.name,data:o.data})):void 0})),[n]),r=()=>{a&&_(a),h(`/login?prospect=${encodeURIComponent(a||"")}`)},v=l.useMemo(()=>n?[{id:a||"prospect",title:n.title,updated_at:new Date().toISOString()}]:[],[n,a]),w=e.jsx("div",{className:"flex-shrink-0 bg-white",children:e.jsxs("form",{onSubmit:s=>{s.preventDefault(),r()},className:"mx-auto w-full max-w-3xl px-4 pt-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))]",children:[e.jsxs("div",{onClick:r,className:"flex cursor-text items-end gap-2 rounded-2xl border border-gray-200 bg-white pl-4 pr-2 py-1.5 shadow-sm focus-within:border-brand-400 focus-within:ring-2 focus-within:ring-brand-100 transition",children:[e.jsx(I,{value:"",onChange:()=>{},onFocus:r,readOnly:!0,maxLength:4e3,placeholder:t("agentIa.composerPlaceholder"),className:"min-w-0 flex-1 max-h-40 bg-transparent py-1.5 text-[15px] outline-none"}),e.jsx("button",{type:"button",onClick:r,"aria-label":t("agentIa.dictate"),className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600",children:e.jsx(D,{})}),e.jsx("button",{type:"submit","aria-label":t("agentIa.send"),className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full bg-brand-500 text-white transition-colors hover:bg-brand-600 opacity-40",children:e.jsx($,{})})]}),e.jsx("p",{className:"mt-2 text-center text-[11px] text-gray-400",children:t("agentIa.footerHint")})]})}),y=n&&e.jsxs("div",{className:"relative",children:[e.jsx(R,{}),e.jsx("div",{className:"absolute inset-0 flex items-start justify-center pt-4",children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-gray-200 bg-white p-7 text-center shadow-xl",children:[e.jsx("h2",{className:"font-heading text-xl font-bold leading-snug text-gray-900",children:t("prospectPublic.gate.title",{business:n.business_name})}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-gray-500",children:n.gated_message_count>0?t("prospectPublic.gate.bodyGated"):t("prospectPublic.gate.body")}),e.jsx("div",{className:"mt-5",children:e.jsx("button",{onClick:r,className:"w-full rounded-xl bg-orange-500 px-4 py-3 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-orange-600",children:t("prospectPublic.cta")})}),e.jsxs("div",{className:"mt-4 flex items-center justify-center gap-1.5",children:[e.jsx("span",{className:"inline-flex items-center gap-0.5",children:[1,2,3,4,5].map(s=>e.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5","aria-hidden":"true",children:e.jsx("path",{d:"M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 18.9 6.1 21l1.2-6.5L2.5 9.9l6.6-.9z",fill:"#F97316"})},s))}),e.jsxs("span",{className:"text-xs font-medium text-gray-600",children:[t("prospectPublic.socialProof.rating"),n.social_proof_count?t("prospectPublic.socialProof.total",{total:L(n.social_proof_count)}
1):""]})]}),e.jsx("p",{className:"mt-2 text-xs text-gray-400",children:t("prospectPublic.socialProof.noCard")})]})})]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-white",children:[e.jsx(T,{}),e.jsxs("main",{className:"page-enter stagger-rise relative z-10 mx-auto flex min-h-0 w-full max-w-7xl flex-1 flex-col px-0 sm:px-4 sm:py-3 lg:px-6",children:[e.jsx("div",{className:"flex-shrink-0 px-4 pt-3 sm:px-0 sm:pt-0",children:e.jsx(F,{icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:e.jsx("path",{d:"M4 10v4M8 7.5v9M12 5v14M16 7.5v9M20 10v4"})}),title:t("agentIa.title")})}),e.jsxs("div",{className:"relative flex min-h-0 flex-1 overflow-hidden bg-white sm:rounded-2xl sm:border sm:border-gray-200 sm:shadow-sm",children:[e.jsx("aside",{className:"absolute inset-y-0 left-0 z-20 w-[82%] max-w-xs transform transition-transform duration-200 lg:static lg:z-auto lg:w-72 lg:translate-x-0 lg:border-r lg:border-gray-100 "+(u?"translate-x-0 shadow-xl":"-translate-x-full lg:shadow-none"),children:e.jsx(W,{conversations:v,activeId:a||null,loading:i==="loading",quota:null,onNew:r,onSelect:()=>x(!1),onDelete:r})}),u&&e.jsx("div",{className:"absolute inset-0 z-10 bg-black/30 lg:hidden",onClick:()=>x(!1),"aria-hidden":!0}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col bg-white",children:[e.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-gray-100 px-3 py-2 lg:hidden",children:[e.jsx("button",{onClick:()=>x(!0),"aria-label":t("agentIa.historyAria"),className:"rounded-lg p-1.5 text-gray-500 hover:bg-gray-100",children:e.jsx(A,{})}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-gray-800",children:(n==null?void 0:n.title)||t("agentIa.title")}),e.jsx("button",{onClick:r,"aria-label":t("agentIa.sidebar.newConversation"),className:"rounded-lg p-1.5 text-gray-500 hover:bg-gray-100",children:e.jsx(O,{})})]}),i==="loading"&&e.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:e.jsxs("svg",{className:"w-6 h-6 animate-spin text-brand-500",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.4 0 0 5.4 0 12h4z"})]})}),i==="notfound"&&e.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center overflow-y-auto px-4 py-10",children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-gray-200 bg-white p-8 text-center shadow-sm",children:[e.jsx("h1",{className:"font-heading text-xl font-bold text-gray-900",children:t("prospectPublic.notFound.title")}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-gray-500",children:t("prospectPublic.notFound.body")}),e.jsx("div",{className:"mt-6",children:e.jsx("button",{onClick:()=>h("/login"),className:"rounded-xl bg-orange-500 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-orange-600",children:t("prospectPublic.cta")})})]})}),i==="ready"&&e.jsxs(S,{className:"flex-1 min-h-0",contentClassName:"mx-auto w-full max-w-3xl gap-6 px-4 py-8",resetKey:a??"prospect",startAt:"top",children:[j.map(s=>e.jsx(E,{m:s},s.id)),y]}),i==="ready"&&w]})]})]})]}),e.jsx(B,{})]})}export{X 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.