PageSourceSearch

https://marketmate.ai/assets/Learning-Blo8LFUW.js

js marketmate.ai collected 2026-10-05 12:14:18 UTC 8,337 bytes, 11 lines download raw bytes

1import{e as f,j as e,y as u}from"./index-DICDb-J1.js";import{u as d}from"./useApi-Bf_npvSM.js";import{W as p}from"./Widget-ZeIRvN7V.js";import{C as y}from"./circle-x-D8VbtAMr.js";import{C as j}from"./circle-check-BFpkGdW5.js";/**
2 * @license lucide-react v0.441.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const v=f("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/**
7 * @license lucide-react v0.441.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const b=f("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),h={googleAds:"Google Ads",facebook:"Facebook",linkedin:"LinkedIn",instagram:"Instagram",seo:"SEO",gbp:"Google Business"},c=s=>s==null?"#64748b":s>=60?"#10b981":s>=40?"#f59e0b":"#ef4444";function N({pct:s}){return e.jsx("div",{className:"w-full h-1.5 bg-line rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${s??0}%`,backgroundColor:c(s)}})})}function w({p:s}){const r=h[s.platform]||s.platform;return e.jsxs("div",{className:"bg-bg-2 rounded shadow-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("h3",{className:"font-display font-semibold text-[13px] text-txt",children:r}),e.jsx("span",{className:"font-mono text-[18px] font-bold",style:{color:c(s.accuracy)},children:s.accuracy==null?"—":`${s.accuracy}%`})]}),e.jsx(N,{pct:s.accuracy}),e.jsxs("p",{className:"font-mono text-[9px] uppercase tracking-widest text-txt-3",children:[s.verified," verified prediction",s.verified===1?"":"s"]}),s.pillars.length>0?e.jsx("div",{className:"space-y-1.5 pt-1",children:s.pillars.map(a=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[11px] text-txt-2 flex-1 truncate",title:a.key,children:a.key}),e.jsxs("span",{className:"font-mono text-[10px] text-txt-3",children:[a.samples,"×"]}),e.jsxs("span",{className:"font-mono text-[11px] font-medium w-9 text-right",style:{color:c(Math.round(a.rate*100))},children:[Math.round(a.rate*100),"%"]})]},a.key))}):e.jsx("p",{className:"text-[11px] text-txt-3 italic pt-1",children:"No proven categories yet — needs ≥4 verified outcomes each."})]})}const g={correct:e.jsx(j,{size:13,style:{color:"#10b981"}}),incorrect:e.jsx(y,{size:13,style:{color:"#ef4444"}}),unclear:e.jsx(v,{size:13,style:{color:"#64748b"}})};function R(){var x,m;const{data:s,isLoading:r}=d("learning-overview","/learning/overview"),{data:a}=d("learning-recent","/learning/recent"),{data:l}=d("learning-campaign-feedback","/learning/campaign-feedback"),n=s==null?void 0:s.pipeline,i=s==null?void 0:s.engine;return e.jsxs("div",{className:"p-6 space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-sm flex items-center justify-center",style:{backgroundColor:"rgba(139,92,246,0.12)"},children:e.jsx(u,{size:15,style:{color:"#8b5cf6"}})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display font-bold text-[18px] text-txt leading-none",children:"Learning Model"}),e.jsx("p",{className:"text-[11px] text-txt-3 mt-0.5",children:"How MarketMate scores its own advice — verified accuracy per channel and category. Provider-independent."})]})]}),i&&e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono px-3 py-1.5 rounded-sm border border-line-2 text-txt-2",title:"Active generation backend",children:[e.jsx(b,{size:11,style:{color:"#8b5cf6"}}),"engine: ",i.primary,i.secondary!=="none"?` + ${i.secondary}`:""]})]}),n&&e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-3",children:[{label:"Predictions logged",value:n.totalLogged},{label:"Verified",value:n.verified},{label:"Acted on",value:n.actioned??0},{label:"Pending",value:n.pending},{label:"Due now",value:n.due,warn:n.due>0},{label:"Actions reviewed",value:n.actionsReviewed}].map(t=>e.jsxs("div",{className:"bg-bg-2 rounded shadow-card px-4 py-3",children:[e.jsx("p",{className:"font-mono text-[20px] font-bold leading-none",style:{color:t.warn?"#f59e0b":"#e8e8ea"},children:t.value}),e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-widest text-txt-3 mt-1.5",children:t.label})]},t.label))}),r&&e.jsxs("div",{className:"flex items-center gap-2 py-12 justify-center",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-acc border-t-transparent roun
11ded-full animate-spin"}),e.jsx("span",{className:"text-[12px] text-txt-3",children:"Loading learning model…"})]}),(s==null?void 0:s.platforms)&&e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-widest text-txt-3 mb-2",children:"Verified accuracy by channel"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:s.platforms.map(t=>e.jsx(w,{p:t},t.platform))})]}),l&&l.total>0&&e.jsx(p,{title:"Funnel campaign ratings",subtitle:"How visitors rated the free campaigns the /start funnel generated — now steers future generation",children:e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[{label:"Rated",value:l.total,color:"#e8e8ea"},{label:"Good",value:l.counts.good,color:"#10b981"},{label:"OK",value:l.counts.ok,color:"#f59e0b"},{label:"Bad",value:l.counts.bad,color:"#ef4444"}].map(t=>e.jsxs("div",{className:"bg-bg-3 rounded px-4 py-3",children:[e.jsx("p",{className:"font-mono text-[20px] font-bold leading-none",style:{color:t.color},children:t.value}),e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-widest text-txt-3 mt-1.5",children:t.label})]},t.label))}),((x=l.byGoal)==null?void 0:x.length)>0&&e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-widest text-txt-3 mb-2",children:"Good-rate by goal"}),e.jsx("div",{className:"space-y-1",children:l.byGoal.map(t=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[11px] text-txt-2 flex-1 truncate",title:t.goal,children:t.goal}),e.jsxs("span",{className:"font-mono text-[10px] text-txt-3",children:[t.total,"×"]}),e.jsxs("span",{className:"font-mono text-[11px] font-medium w-9 text-right",style:{color:c(t.goodRate)},children:[t.goodRate,"%"]})]},t.goal))})]}),((m=l.recent)==null?void 0:m.length)>0&&e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-widest text-txt-3 mb-2",children:"Recent ratings"}),e.jsx("div",{className:"divide-y divide-line",children:l.recent.map((t,o)=>e.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[e.jsx("span",{className:"font-mono text-[9px] uppercase w-8 font-bold flex-shrink-0",style:{color:t.rating==="good"?"#10b981":t.rating==="bad"?"#ef4444":"#f59e0b"},children:t.rating}),e.jsx("span",{className:"text-[11px] text-txt-2 flex-1 truncate",title:t.product,children:t.product||"—"}),e.jsx("span",{className:"text-[10px] text-txt-3 truncate max-w-[40%]",title:t.goal,children:t.goal})]},o))})]})]})}),e.jsx(p,{title:"Recently verified predictions",subtitle:"What the AI predicted vs what actually happened",children:e.jsxs("div",{className:"divide-y divide-line",children:[(!a||a.length===0)&&e.jsx("p",{className:"text-[12px] text-txt-3 py-6 text-center",children:"No verified predictions yet."}),a==null?void 0:a.map((t,o)=>e.jsxs("div",{className:"flex items-center gap-3 px-5 py-2.5",children:[e.jsx("div",{className:"flex-shrink-0",children:g[t.outcome]||g.unclear}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[12px] text-txt truncate",children:t.title}),e.jsxs("p",{className:"font-mono text-[10px] text-txt-3",children:[h[t.platform]||t.platform," · ",t.pillar," · predicted ",t.trackingMetric," to ",t.predictedTrend]})]}),e.jsx("span",{className:"font-mono text-[10px] text-txt-3 flex-shrink-0 hidden md:block",children:t.outcomeNotes})]},o))]})})]})}export{R 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.