1import{a as k,r as l,j as e,L as S,I as i}from"./index-B906m9HQ.js";import{W as C}from"./WebAppToolCard-e-dCXaup.js";import{W as w}from"./WelcomeModal-CwfXbp6s.js";import{f as M,a as A,b as R,c as T,d as W,e as L}from"./mbl-feat-f.jpg.asset-DERpZIK1.js";const z=M.url,B=A.url,F=R.url,I=T.url,P=W.url,E=L.url,N="Friday, July 17",D=[{id:"n1",kind:"approval",title:"Stripe â Shopify Bridge",detail:"4 of 6 batches waiting for your approval before sending.",time:"12m ago",icon:"https://storage.googleapis.com/rival-data/function-icons/1776078647361815655_cropped-logo.png",toolId:"stripe-reconciler",primaryLabel:"Review",primaryTo:"/run/stripe-reconciler"},{id:"n2",kind:"failure",title:"Competitor Content Monitor failed",detail:"Last scheduled run failed at 6:02 AM â HTTP 503 from source.",time:"2h ago",icon:"https://storage.googleapis.com/rival-data/agent-icons/1779630689073792563_agent-icon.svg",toolId:"competitor-monitor",primaryLabel:"Retry",primaryTo:"/run/competitor-monitor"},{id:"n3",kind:"connector",title:"Slack connector expired",detail:"Meeting Notes â CRM and 2 other tools depend on this connector.",time:"yesterday",icon:"https://storage.googleapis.com/rival-data/icons/db298074-b87f-452f-8e8c-941fe3667a34/generated-icon.svg",primaryLabel:"Reconnect",primaryTo:"/settings/billing"}],O=[{id:"invoice-extractor",name:"Invoice Extractor",project:"Acme Payables",kind:"Agent",tagline:"Pulls line-items from PDFs into Sheets.",builder:"Acme Ops",lastRun:"12m ago",variant:"project-tool",cover:z},{id:"meeting-notes-crm",name:"Meeting Notes â CRM",project:"Top Rudder Customer Portal",kind:"Agent",tagline:"Turns transcripts into CRM updates.",builder:"Me",createdByMe:!0,lastRun:"1h ago",variant:"published",cover:B},{id:"sql-gen",name:"SQL Generator",project:"Internal Analytics",kind:"Function",tagline:"Text â optimized SQL for your schema.",builder:"Rival Labs",lastRun:"3h ago",variant:"project-tool",cover:F},{id:"deal-research",name:"Deal Research Assistant",project:"Q3 Pipeline",kind:"Agent",tagline:"Deep research on companies & buyers.",builder:"Acme Sales",lastRun:"5h ago",variant:"project-built"},{id:"brief",name:"ContentBrief AI",project:"Blog Sprint",kind:"Workflow",tagline:"Turn a topic into a full brief + outline.",builder:"Me",createdByMe:!0,lastRun:"yesterday",variant:"published",cover:I},{id:"lead-enrichment",name:"Lead Enrichment",project:"Outbound 2025",kind:"Workflow",tagline:"Enrich leads with firmographic data.",builder:"Rival Labs",lastRun:"yesterday",variant:"project-tool",cover:P},{id:"slack-mcp",name:"Slack MCP",project:"Ops Stack",kind:"MCP",tagline:"Read + post to any Slack workspace.",builder:"Rival Labs",lastRun:"2d ago",variant:"project-built"},{id:"notion-mcp",name:"Notion MCP",project:"Wiki Sync",kind:"MCP",tagline:"Read + write to your Notion pages.",builder:"Rival Labs",lastRun:"3d ago",variant:"project-tool",cover:E}],H=[{id:"all",label:"All",icon:e.jsx(i.Grid,{size:14})},{id:"Agent",label:"Agents",icon:e.jsx(i.Agent,{size:14})},{id:"Workflow",label:"Workflows",icon:e.jsx(i.Workflow,{size:14})},{id:"Function",label:"Functions",icon:e.jsx(i.Func,{size:14})},{id:"MCP",label:"MCPs",icon:e.jsx(i.Connectors,{size:14})},{id:"Connector",label:"Connectors",icon:e.jsx(i.Plug,{size:14})},{id:"mine",label:"Created by Me",icon:e.jsx(i.Code,{size:14})},{id:"history",label:"Run History",icon:e.jsx(i.Clock,{size:14})}];function V(){const o=k(),[s,a]=l.useState("all"),[n,u]=l.useState(""),[c,p]=l.useState("all"),[x,r]=l.useState("all"),[g,v]=l.useState("all"),[h,y]=l.useState("newest"),j=l.useMemo(()=>{let t=O;if(s==="mine"?t=t.filter(d=>d.createdByMe):["Agent","Workflow","Function","MCP","Connector"].includes(s)&&(t=t.filter(d=>d.kind===s)),c!=="all"&&(t=t.filter(d=>d.kind===c)),n){const d=n.toLowerCase();t=t.filter(b=>b.name.toLowerCase().includes(d)||b.tagline.toLowerCase().includes(d)||b.project.toLowerCase().includes(d))}return t},[s,c,n]);return e.jsxs("div",{className:"content",children:[e.jsx(w,{}),e.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",padding:"28px 48px 40px",width:"100%",boxSizing:"border-box"},children:[e.jsxs("div",{style:{marginBottom:22},children:[e.jsx("div",{style:{fontSize:12,fontWeight:600,color:"var(--text-3)",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:6},children:N}),e.jsx("h1",{style:{fontSize:40,fontWeight:800,letterSpacing:"-0.03em",margin:0,lineHeight:1.1},children:"Welcome, Anna"})]}),e.jsxs("div",{style:{marginBottom:28},children:[e.jsx(q,{title:"Notifications"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:D.map(t=>e.jsx(Y,{n:t,onPrimary:()=>t.primaryTo&&o({to:t.primaryTo})},t.id))})]}),e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",marginBottom:12},children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,letterSpacing:"-0.015em"},children:"My Tools"}),e.jsx(S,{to:"/webapp/mytools",style:{fontSize:12.5,color:"var(--text-3)",textDecoration:"none",transition:"opacity .12s"},onMouseEnter:t=>{t.currentTarget.style.opacity="0.7"},onMouseLeave:t=>{t.currentTarget.style.opacity="1"},children:"See all â"})]}),e.jsx("div",{style:{display:"flex",alignItems:"center",gap:2,borderBottom:"1px solid var(--border)",marginBottom:16},children:H.map(t=>e.jsx(_,{active:s===t.id,onClick:()=>a(t.id),icon:t.icon,children:t.label},t.id))}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:18,flexWrap:"wrap"},children:[e.jsxs("div",{style:{position:"relative",flex:"1 1 280px",maxWidth:340},children:[e.jsx(i.Search,{size:13,style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:"var(--text-4)"}}),e.jsx("input",{value:n,onChange:t=>u(t.target.value),placeholder:"Search tools, tagsâ¦",style:{width:"100%",padding:"8px 12px 8px 32px",background:"#fff",border:"1px solid var(--border)",borderRadius:999,fontSize:13,color:"var(--text)",outline:"none"}})]}),e.jsx(f,{value:c,onChange:t=>p(t),options:[{value:"all",label:"All Types"},{value:"Agent",label:"Agents"},{value:"Workflow",label:"Workflows"},{value:"Function",label:"Functions"},{value:"MCP",label:"MCPs"},{value:"Connector",label:"Connectors"}]}),e.jsx(f,{value:x,onChange:r,options:[{value:"all",label:"All Status"},{value:"published",label:"Published"},{value:"draft",label:"Draft"},{value:"private",label:"Private"}]}),e.jsx(f,{value:g,onChange:v,options:[{value:"all",label:"All Runtimes"},{value:"cloud",label:"Cloud"},{value:"local",label:"Local"}]}),e.jsx("button",{style:{...m,transition:"background .12s, border-color .12s"},onMouseEnter:t=>{t.currentTarget.style.background="var(--bg-1)",t.currentTarget.style.borderColor="var(--text-4)"},onMouseLeave:t=>{t.currentTarget.style.background="#fff",t.currentTarget.style.borderColor="var(--border)"},children:"+ More"}),e.jsx("div",{style:{flex:1}}),e.jsx(f,{value:h,onChange:y,options:[{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"name",label:"Name AâZ"},{value:"runs",label:"Most used"}],align:"right"})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:18},children:j.map(t=>e.jsx(C,{variant:t.variant??(t.createdByMe?"published":"project-tool"),kind:t.kind,title:t.project,toolName:t.name,toolId:t.id,builder:t.builder,image:t.cover,lastRun:t.lastRun,onClick:()=>o({to:"/run/$toolId",params:{toolId:t.id}})},t.id))})]})]})}const Q={approval:{color:"#b45309",bg:"rgba(180,83,9,0.10)",label:"Approval",icon:e.jsx(i.Bell,{size:13})},failure:{color:"#c4354e",bg:"rgba(196,53,78,0.09)",label:"Failed",icon:e.jsx(i.Bolt,{size:13})},connector:{color:"#7c3aed",bg:"rgba(124,58,237,0.10)",label:"Connector",icon:e.jsx(i.Plug,{size:13})}};function Y({n:o,onPrimary:s}){const a=Q[o.kind],[n,u]=l.useState(!1),[c,p]=l.useState(!1);return e.jsxs("div",{className:"card",onClick:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{padding:"12px 14px",background:"#fff",display:"flex",alignItems:"center",gap:12,cursor:"pointer",transition:"transform .14s ease, box-shadow .14s ease",transform:n?"translateY(-1px)":"translateY(0)",boxShadow:n?"0 4px 12px rgba(10,21,48,0.08)":"0 1px 2px rgba(10,21,48,0.04)"},children:[e.jsx("div",{style:{width:38,height:38,borderRadius:8,background:a.bg,color:a.color,display:"grid",placeItems:"center",flexShrink:0,overflow:"hidden"},children:o.icon&&!c?e.jsx("img",{src:o.icon,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:()=>p(!0)}):a.icon}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:2},children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--text)"},children:o.title}),e.jsx("span",{style:{fontSize:10,fontWeight:700,letterSpacing:"0.05em",textTransform:"uppercase",padding:"2px 6px",borderRadius:4,background:a.bg,color:a.color},children:a.label}),e.jsx("span",{style:{fontSize:11.5,color:"var(--text-4)",marginLeft:"auto"},children:o.time})]}),e.jsx("div",{style:{fontSize:12.5,color:"var(--text-3)",lineHeight:1.45},children:o.detail})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,fontWeight:600,color:"var(--blue)",flexShrink:0,opacity:n?1:.7,transition:"opacity .12s"},children:[e.jsx("span",{children:"Open"}),e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:n?"translateX(2px)":"translateX(0)",transition:"transform .12s ease"},children:[e.jsx("path",{d:"M5 12h14"}),e.jsx("path",{d:"M12 5l7 7-7 7"})]})]})]})}function _({active:o,onClick:s,children:a,icon:n}){return e.jsxs("button",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:7,border:0,background:"transparent",curs
1or:"pointer",padding:"10px 14px",fontSize:13.5,color:o?"var(--blue)":"var(--text-3)",fontWeight:o?600:500,borderBottom:o?"2px solid var(--blue)":"2px solid transparent",marginBottom:-1,fontFamily:"inherit",transition:"color .12s, border-color .12s"},children:[n&&e.jsx("span",{style:{display:"inline-flex",color:o?"var(--blue)":"var(--text-4)"},children:n}),a]})}const m={display:"inline-flex",alignItems:"center",gap:6,padding:"7px 14px",borderRadius:999,border:"1px solid var(--border)",background:"#fff",fontSize:12.5,color:"var(--text-2)",fontWeight:500,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"};function f({value:o,onChange:s,options:a,align:n="left"}){const[u,c]=l.useState(!1),p=l.useRef(null);l.useEffect(()=>{if(!u)return;const r=g=>{p.current&&!p.current.contains(g.target)&&c(!1)};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[u]);const x=a.find(r=>r.value===o)??a[0];return e.jsxs("div",{ref:p,style:{position:"relative"},children:[e.jsxs("button",{style:{...m,transition:"background .12s, border-color .12s, box-shadow .12s"},onMouseEnter:r=>{r.currentTarget.style.background="var(--bg-1)",r.currentTarget.style.borderColor="var(--text-4)"},onMouseLeave:r=>{r.currentTarget.style.background="#fff",r.currentTarget.style.borderColor="var(--border)"},onClick:()=>c(r=>!r),children:[e.jsx("span",{children:x.label}),e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{color:"var(--text-4)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})]}),u&&e.jsx("div",{style:{position:"absolute",top:"calc(100% + 4px)",[n==="right"?"right":"left"]:0,background:"#fff",border:"1px solid var(--border)",borderRadius:10,boxShadow:"0 8px 24px rgba(10,21,48,0.10)",zIndex:20,padding:4,minWidth:160},children:a.map(r=>{const g=r.value===o;return e.jsx("button",{onClick:()=>{s(r.value),c(!1)},style:{display:"block",width:"100%",textAlign:"left",padding:"8px 10px",borderRadius:6,border:0,background:g?"var(--bg-1)":"transparent",color:g?"var(--text)":"var(--text-2)",fontSize:13,fontWeight:g?600:400,cursor:"pointer",fontFamily:"inherit"},children:r.label},r.value)})})]})}const q=({title:o})=>e.jsx("div",{style:{fontSize:15,fontWeight:700,color:"var(--text)",marginBottom:10},children:o});export{V 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.