1import{r as d,j as e,c as F,i as S,k as _,l as T,B as N,t as M}from"./index-BI34Wull.js";import{u as w}from"./useServerFn-CCokYi5s.js";import{I as k}from"./input-DSEt1Ik3.js";import{L as D}from"./label-B11EJTGs.js";import{D as re,a as ne,b as ie,c as le,d as oe,e as ce}from"./dialog-CchBIL7t.js";import{c as P,a as de,u as me}from"./index-DYIppBmS.js";import{R as ue,I as xe,c as Q}from"./index-tGlTqnVn.js";import{P as pe}from"./index-B4j4u9tl.js";import{P as L}from"./index-Bv6t4qTQ.js";import{u as he}from"./index-6gyUWnCE.js";import{b as be}from"./Combination-BhuTL0bJ.js";import{R as fe}from"./refresh-cw-C4F3Z_YC.js";import{D as ve}from"./download-CzcQaLBo.js";import{S as ge}from"./search-B4HQYTdZ.js";import{L as R}from"./loader-circle-RJ_lzir4.js";import{P as je}from"./pencil--Nmrg4Ms.js";import{R as U,L as Ne,C as q,X as H,Y,T as X,a as ye,B as E}from"./LineChart-DGDJReWG.js";import{B as we}from"./BarChart-s7hGQ4br.js";import{c as Se}from"./createLucideIcon-4AT48GiE.js";import"./index-CneZgM9-.js";import"./x-CYSo_sK4.js";import"./index-Dx9TEr1Q.js";const _e=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Te=Se("key-round",_e);var Ce=Object.defineProperty,C=(a,t)=>Ce(a,"name",{value:t,configurable:!0}),B="Tabs",[ke,vs]=de(B,[Q]),W=Q(),[Le,O]=ke(B),Re=d.forwardRef(C(function(t,i){const{__scopeTabs:x,value:s,onValueChange:u,defaultValue:n,orientation:o="horizontal",dir:m,activationMode:l="automatic",...p}=t,b=he(m),[h,f]=me({prop:s,onChange:u,defaultProp:n??"",caller:B});return e.jsx(Le,{scope:x,baseId:be(),value:h,onValueChange:f,orientation:o,dir:b,activationMode:l,children:e.jsx(L.div,{dir:b,"data-orientation":o,...p,ref:i})})},"Tabs")),Ae="TabsList",Ie=d.forwardRef(C(function(t,i){const{__scopeTabs:x,loop:s=!0,...u}=t,n=O(Ae,x),o=W(x);return e.jsx(ue,{asChild:!0,...o,orientation:n.orientation,dir:n.dir,loop:s,children:e.jsx(L.div,{role:"tablist","aria-orientation":n.orientation,...u,ref:i})})},"TabsList")),De="TabsTrigger",Pe=d.forwardRef(C(function(t,i){const{__scopeTabs:x,value:s,disabled:u=!1,...n}=t,o=O(De,x),m=W(x),l=G(o.baseId,s),p=V(o.baseId,s),b=s===o.value;return e.jsx(xe,{asChild:!0,...m,focusable:!u,active:b,children:e.jsx(L.button,{type:"button",role:"tab","aria-selected":b,"aria-controls":p,"data-state":b?"active":"inactive","data-disabled":u?"":void 0,disabled:u,id:l,...n,ref:i,onMouseDown:P(t.onMouseDown,h=>{!u&&h.button===0&&h.ctrlKey===!1?o.onValueChange(s):h.preventDefault()}),onKeyDown:P(t.onKeyDown,h=>{u||h.target!==h.currentTarget||[" ","Enter"].includes(h.key)&&o.onValueChange(s)}),onFocus:P(t.onFocus,()=>{const h=o.activationMode!=="manual";!b&&!u&&h&&o.onValueChange(s)})})})},"TabsTrigger")),Ee="TabsContent",Me=d.forwardRef(C(function(t,i){const{__scopeTabs:x,value:s,forceMount:u,children:n,...o}=t,m=O(Ee,x),l=G(m.baseId,s),p=V(m.baseId,s),b=s===m.value,h=d.useRef(b);return d.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),e.jsx(pe,{present:u||b,children:({present:f})=>e.jsx(L.div,{"data-state":b?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:p,tabIndex:0,...o,ref:i,style:{...t.style,animationDuration:h.current?"0s":void 0},children:f&&n})})},"TabsContent"));function G(a,t){return`${a}-trigger-${t}`}C(G,"makeTriggerId");function V(a,t){return`${a}-content-${t}`}C(V,"makeContentId");var $e=Re,J=Ie,Z=Pe,ee=Me;const ze=$e,se=d.forwardRef(({className:a,...t},i)=>e.jsx(J,{ref:i,className:F("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...t}));se.displayName=J.displayName;const $=d.forwardRef(({className:a,...t},i)=>e.jsx(Z,{ref:i,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...t}));$.displayName=Z.displayName;const z=d.forwardRef(({className:a,...t},i)=>e.jsx(ee,{ref:i,className:F("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...t}));z.displayName=ee.displayName;const Fe=S({method:"GET"}).middleware([_]).handler(T("992f0b32c020bc6da27291c1c400359854b699e122345955596f052f5bf4cbd0")),Be=S({method:"POST"}).middleware([_]).handler(T("19266518f83f1794608b09ea7fb8d07ae7291d43d5eee3140d9f47bd1e9ab7f2")),Oe=S({method:"POST"}).middleware([_]).handler(T("e380a0fcfb6166caf52b262caa3d32c45d5807c4029bfd03f44a5b438ae00d6c")),Ge=S({method:"POST"}).middleware([_]).handler(T("66f02649c40b7c646db6f5bc9f8d8bc90738a22d960245fc74f6e7d9b158a4fb")),Ve=S({method:"GET"}).middleware([_]).handler(T("0e4fb633d9522547db67adb8d69e4ddacc076af9a01ee0a1bad744a2b8901c86")),Ke=S({method:"GET"}).middleware([_]).handler(T("5d8d790475d753a2137d3a01a35835d63b4b8f352010b3e0ba414563d633b930")),Ue={lead:"bg-muted text-muted-foreground",trial:"bg-chart-2/15 text-chart-2",active:"bg-primary/15 text-primary",past_due:"bg-chart-4/15 text-chart-4",canceled:"bg-destructive/15 text-destructive"},te={lead:"Lead",trial:"Trial",active:"Active",past_due:"Past due",canceled:"Canceled"},qe=[{key:"all",label:"All"},{key:"lead",label:"Leads"},{key:"trial",label:"Trials"},{key:"active",label:"Active"},{key:"past_due",label:"Past due"},{key:"canceled",label:"Canceled"}];function gs(){const[a,t]=d.useState([]),[i,x]=d.useState(!0),[s,u]=d.useState(""),[n,o]=d.useState("all"),[m,l]=d.useState(null),[p,b]=d.useState(null),h=w(Fe),f=w(Ke);async function y(){x(!0);try{const[r,v]=await Promise.all([h(),f()]);t(r.accounts),b(v)}catch(r){M.error(r instanceof Error?r.message:"Failed to load accounts")}finally{x(!1)}}d.useEffect(()=>{y()},[]);const c=d.useMemo(()=>{const r=s.trim().toLowerCase();return a.filter(v=>n!=="all"&&v.status!==n?!1:r?[v.name,v.email,v.company,v.plan].filter(
1Boolean).some(A=>A.toLowerCase().includes(r)):!0)},[a,s,n]);function g(){const r=["name","email","company","status","plan","score_count","best_score","created_at"],v=j=>`"${String(j??"").replace(/"/g,'""')}"`,A=[r.join(","),...c.map(j=>[j.name,j.email,j.company,j.status,j.plan,j.score_count,j.best_score,j.created_at].map(v).join(","))].join(` 2`),ae=new Blob([A],{type:"text/csv"}),K=URL.createObjectURL(ae),I=document.createElement("a");I.href=K,I.download=`bizware-accounts-${new Date().toISOString().slice(0,10)}.csv`,I.click(),URL.revokeObjectURL(K)}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Accounts & Leads"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Every lead, trial, subscriber and cancellation in one place."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(N,{variant:"outline",size:"sm",onClick:()=>{y()},disabled:i,children:[e.jsx(fe,{className:`mr-1.5 h-4 w-4 ${i?"animate-spin":""}`})," Refresh"]}),e.jsxs(N,{variant:"outline",size:"sm",onClick:g,children:[e.jsx(ve,{className:"mr-1.5 h-4 w-4"})," CSV"]})]})]}),e.jsxs(ze,{defaultValue:"accounts",children:[e.jsxs(se,{children:[e.jsx($,{value:"accounts",children:"Accounts"}),e.jsx($,{value:"dashboard",children:"Revenue dashboard"})]}),e.jsxs(z,{value:"accounts",className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:"relative min-w-[220px] flex-1",children:[e.jsx(ge,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(k,{value:s,onChange:r=>u(r.target.value),placeholder:"Search name, email, companyâ¦",className:"pl-9"})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:qe.map(r=>e.jsx(N,{size:"sm",variant:n===r.key?"default":"outline",onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[c.length," of ",a.length]})]}),e.jsx("div",{className:"overflow-x-auto rounded-xl border border-border",children:i?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(R,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):c.length===0?e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:"No accounts found."}):e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-xs uppercase text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left",children:"Person"}),e.jsx("th",{className:"px-3 py-2 text-left",children:"Company"}),e.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),e.jsx("th",{className:"px-3 py-2 text-left",children:"Plan"}),e.jsx("th",{className:"px-3 py-2 text-left",children:"Scores"}),e.jsx("th",{className:"px-3 py-2 text-left",children:"Created"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Manage"})]})}),e.jsx("tbody",{children:c.map(r=>e.jsxs("tr",{className:"border-t border-border",children:[e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("div",{className:"font-medium",children:r.name??r.email}),e.jsx("div",{className:"text-xs text-muted-foreground",children:r.email})]}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:r.company??"â"}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-semibold ${Ue[r.status]}`,children:te[r.status]}),r.cancel_at_period_end&&r.status!=="canceled"?e.jsx("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:"cancels at period end"}):null]}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:r.plan??"â"}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:r.score_count>0?`${r.score_count} · best ${r.best_score??"â"}`:"â"}),e.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:new Date(r.created_at).toLocaleDateString()}),e.jsx("td",{className:"px-3 py-2 text-right",children:e.jsxs(N,{size:"sm",variant:"outline",onClick:()=>l(r),children:[e.jsx(je,{className:"mr-1.5 h-3.5 w-3.5"})," Manage"]})})]},r.key))})]})})]}),e.jsx(z,{value:"dashboard",className:"space-y-4 pt-4",children:e.jsx(He,{metrics:p,loading:i})})]}),e.jsx(Ye,{account:m,onClose:()=>l(null),onSaved:()=>{y()}})]})}function He({metrics:a,loading:t}){if(t||!a)return e.jsx("div",{className:"flex h-40 items-center justify-center rounded-xl border border-border",children:e.jsx(R,{className:"h-5 w-5 animate-spin text-muted-foreground"})});const i=a.totals,x=[{label:"Current MRR",value:`$${(i.mrr??0).toLocaleStr
2ing()}`},{label:"Active subscribers",value:String(i.active??0)},{label:"On trial",value:`${i.trialing??0} ($${(i.trial_mrr??0).toLocaleString()})`},{label:"Canceled",value:String(i.canceled??0)},{label:"Leads",value:String(i.leads??0)},{label:"Total accounts",value:String(i.accounts??0)}];return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",children:x.map(s=>e.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[e.jsx("div",{className:"text-xs uppercase text-muted-foreground",children:s.label}),e.jsx("div",{className:"mt-1 text-2xl font-bold",children:s.value})]},s.label))}),e.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[e.jsx("div",{className:"mb-3 text-sm font-semibold",children:"Monthly recurring revenue (6 months)"}),e.jsx("div",{className:"h-64",children:e.jsx(U,{width:"100%",height:"100%",children:e.jsxs(Ne,{data:a.months,children:[e.jsx(q,{strokeDasharray:"3 3",stroke:"var(--border)"}),e.jsx(H,{dataKey:"label",stroke:"var(--primary-glow)",fontSize:12}),e.jsx(Y,{stroke:"var(--primary-glow)",fontSize:12}),e.jsx(X,{}),e.jsx(ye,{type:"monotone",dataKey:"mrr",stroke:"var(--primary)",strokeWidth:2,dot:!0})]})})})]}),e.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[e.jsx("div",{className:"mb-3 text-sm font-semibold",children:"New accounts, leads & churn"}),e.jsx("div",{className:"h-64",children:e.jsx(U,{width:"100%",height:"100%",children:e.jsxs(we,{data:a.months,children:[e.jsx(q,{strokeDasharray:"3 3",stroke:"var(--border)"}),e.jsx(H,{dataKey:"label",stroke:"var(--primary-glow)",fontSize:12}),e.jsx(Y,{stroke:"var(--primary-glow)",fontSize:12,allowDecimals:!1}),e.jsx(X,{}),e.jsx(E,{dataKey:"new_leads",name:"Leads",fill:"var(--primary-glow)",radius:[4,4,0,0]}),e.jsx(E,{dataKey:"new_subscriptions",name:"New subs",fill:"var(--primary)",radius:[4,4,0,0]}),e.jsx(E,{dataKey:"churned",name:"Churned",fill:"var(--destructive)",radius:[4,4,0,0]})]})})})]})]}),e.jsx("div",{className:"overflow-x-auto rounded-xl border border-border",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-xs uppercase text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left",children:"Month"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"MRR"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"New accounts"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"New leads"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"New subs"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Churned"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Active subs"})]})}),e.jsx("tbody",{children:a.months.map(s=>e.jsxs("tr",{className:"border-t border-border",children:[e.jsx("td",{className:"px-3 py-2 font-medium",children:s.label}),e.jsxs("td",{className:"px-3 py-2 text-right",children:["$",s.mrr.toLocaleString()]}),e.jsx("td",{className:"px-3 py-2 text-right",children:s.new_accounts}),e.jsx("td",{className:"px-3 py-2 text-right",children:s.new_leads}),e.jsx("td",{className:"px-3 py-2 text-right",children:s.new_subscriptions}),e.jsx("td",{className:"px-3 py-2 text-right",children:s.churned}),e.jsx("td",{className:"px-3 py-2 text-right",children:s.active})]},s.month))})]})})]})}function Ye({account:a,onClose:t,onSaved:i}
2){const[x,s]=d.useState(""),[u,n]=d.useState(""),[o,m]=d.useState(""),[l,p]=d.useState(!1),b=w(Be),h=w(Oe),f=w(Ge);if(d.useEffect(()=>{s(a?.name??""),n(a?.email??""),m("")},[a]),!a)return null;async function y(g,r){p(!0);try{await g(),M.success(r),i()}catch(v){M.error(v instanceof Error?v.message:"Action failed")}finally{p(!1)}}const c=a;return e.jsx(re,{open:!0,onOpenChange:g=>!g&&t(),children:e.jsxs(ne,{className:"max-w-lg",children:[e.jsxs(ie,{children:[e.jsx(le,{children:c.name??c.email}),e.jsxs(oe,{children:[te[c.status],c.plan?` · ${c.plan}`:"",c.current_period_end?` · renews ${new Date(c.current_period_end).toLocaleDateString()}`:""]})]}),c.user_id?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(D,{children:"Display name"}),e.jsx(k,{value:x,onChange:g=>s(g.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(D,{children:"Email"}),e.jsx(k,{value:u,onChange:g=>n(g.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(D,{children:"Set new password (optional)"}),e.jsx(k,{type:"text",value:o,onChange:g=>m(g.target.value),placeholder:"Minimum 8 characters"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(N,{disabled:l,onClick:()=>{y(()=>b({data:{userId:c.user_id,email:u!==c.email?u:void 0,displayName:x,...o?{password:o}:{}}}),"Account updated")},children:[l?e.jsx(R,{className:"mr-1.5 h-4 w-4 animate-spin"}):null," Save changes"]}),e.jsxs(N,{variant:"outline",disabled:l,onClick:()=>{y(()=>h({data:{email:c.email,redirectTo:`${window.location.origin}/reset-password`}}),"Password reset email sent")},children:[e.jsx(Te,{className:"mr-1.5 h-4 w-4"})," Send reset email"]})]})]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"This person is a lead â they scored a call but never created an account. No login exists yet."}),c.stripe_subscription_id&&c.environment?e.jsxs("div",{className:"space-y-2 rounded-lg border border-border p-3",children:[e.jsx("div",{className:"text-sm font-semibold",children:"Subscription"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(N,{size:"sm",variant:"outline",disabled:l,onClick:()=>{y(()=>f({data:{subscriptionId:c.stripe_subscription_id,environment:c.environment,action:"cancel"}}),"Set to cancel at period end")},children:"Cancel at period end"}),e.jsx(N,{size:"sm",variant:"outline",disabled:l,onClick:()=>{y(()=>f({data:{subscriptionId:c.stripe_subscription_id,environment:c.environment,action:"resume"}}),"Cancellation removed")},children:"Resume"}),e.jsx(N,{size:"sm",variant:"outline",className:"text-destructive",disabled:l,onClick:()=>{y(()=>f({data:{subscriptionId:c.stripe_subscription_id,environment:c.environment,action:"cancel_now"}}),"Subscription canceled")},children:"Cancel now"})]})]}):null,e.jsx(Xe,{email:c.email}),e.jsx(ce,{children:e.jsx(N,{variant:"ghost",onClick:t,children:"Close"})})]})})}function Xe({email:a}){const[t,i]=d.useState(null),[x,s]=d.useState(null),u=w(Ve);return d.useEffect(()=>{let n=!0;return i(null),u({data:{email:a}}).then(o=>n&&i(o.scores)).catch(()=>n&&i([])),()=>{n=!1}},[a]),t===null?e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border p-3 text-sm text-muted-foreground",children:[e.jsx(R,{className:"h-4 w-4 animate-spin"})," Loading scored callsâ¦"]}):t.length===0?e.jsx("div",{className:"rounded-lg border border-border p-3 text-sm text-muted-foreground",children:"No scored calls yet."}):e.jsxs("div",{className:"space-y-2 rounded-lg border border-border p-3",children:[e.jsxs("div",{className:"text-sm font-semibold",children:["Scored calls (",t.length,")"]}),e.jsx("div",{className:"max-h-80 space-y-2 overflow-y-auto pr-1",children:t.map(n=>{const o=x===n.id,m=n.analysis??{};return e.jsxs("div",{className:"rounded-md border border-border/70",children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-3 px-3 py-2 text-left",onClick:()=>s(o?null:n.id),children:[e.jsxs("span",{className:"text-sm",children:[e.jsxs("span",{className:"font-semibold",children:[n.overall_score??"â","/100"]})," ",e.jsxs("span",{className:"text-muted-foreground",children:["· ",new Date(n.created_at).toLocaleStr
2ing()," · ",Math.round(n.transcript_chars/1e3),"k chars"]})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:o?"Hide":"View"})]}),o?e.jsxs("div",{className:"space-y-3 border-t border-border/70 px-3 py-3 text-sm",children:[n.summary?e.jsx("p",{className:"text-foreground",children:n.summary}):null,m.dimensions?e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(m.dimensions).map(([l,p])=>e.jsxs("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs",children:[l.replace(/_/g," "),": ",e.jsx("span",{className:"font-semibold",children:p})]},l))}):null,m.gaps?.length?e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase text-muted-foreground",children:"Gaps"}),e.jsx("ul",{className:"mt-1 list-disc space-y-0.5 pl-4",children:m.gaps.map((l,p)=>e.jsx("li",{children:l},p))})]}):null,m.strengths?.length?e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase text-muted-foreground",children:"Strengths"}),e.jsx("ul",{className:"mt-1 list-disc space-y-0.5 pl-4",children:m.strengths.map((l,p)=>e.jsx("li",{children:l},p))})]}):null,m.missed_moments?.length?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-xs font-semibold uppercase text-muted-foreground",children:"Missed moments"}),m.missed_moments.map((l,p)=>e.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[e.jsx("div",{className:"text-xs font-semibold",children:l.moment}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["They said: â",l.they_said,"â"]}
2),e.jsxs("div",{className:"mt-1 text-xs",children:["Should have said: â",l.you_should_have_said,"â"]}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:l.why_it_matters})]},p))]}):null,m.next_drill?e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold uppercase text-muted-foreground",children:"Next drill"}),e.jsx("p",{className:"mt-1",children:m.next_drill})]}):null,n.transcript_preview?e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-xs text-muted-foreground",children:"Transcript preview"}),e.jsx("pre",{className:"mt-1 max-h-48 overflow-auto whitespace-pre-wrap rounded bg-muted/40 p-2 text-xs",children:n.transcript_preview})]}):null]}):null]},n.id)})})]})}export{gs 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.