PageSourceSearch

https://livox.ai/assets/watchlist-DxQFsmCS.js

js livox.ai collected 2026-10-05 12:20:31 UTC 21,282 bytes, 1 lines download raw bytes

1import{p as C,n as T,X as D,I as i,C as e,W as R}from"./index-B5jB8Kqk.js";import{u as F}from"./useQuery-CDWn7hSO.js";import{u as I}from"./useMutation-CKC0Uk3M.js";import{u as w}from"./useServerFn-DZGYYcqx.js";import{P as A,b as M,I as q,a as $}from"./popover-BXcsxW0-.js";import{A as W}from"./app-shell-coGaPe1e.js";import{S as U}from"./section-info-DXqbBuAS.js";import{s as K,g as Q,P as H,L as G}from"./tickers.functions-8LewIzv0.js";import{r as E}from"./auth-middleware-XVMUbmnQ.js";import{c as V}from"./index-BlMF5scB.js";import{X as _}from"./x-C44TrvjE.js";import"./useBaseQuery-Dqsust_c.js";import"./utils-BORDxPKB.js";const z=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],B=V("search",z),Y=C({method:"GET"}).middleware([E]).handler(T("5b63974a63ceed2be5fc768b535aa73583ae010aff0fee87706da59bb069e2b3")),X=C({method:"POST"}).middleware([E]).handler(T("f1b9fb57c44b1ff9e168151736a547335b076342059c12c44ca60dfc190b1480")),J=C({method:"POST"}).middleware([E]).handler(T("9fe552ee9de6184de7a95b28a3861db97f3886315ed887e0ef97f3696b7d31da")),Z=C({method:"POST"}).middleware([E]).handler(T("7d493feb05eef254b03626b175a95a34e54133c0668c635bb9bd41c295ab9cf6")),ee=C({method:"POST"}).middleware([E]).handler(T("6784757ee7172891a0038eae7967d3e585e49e604317f57860ab07b5cda55c62")),te=C({method:"POST"}).middleware([E]).handler(T("f225415f51bb1ce03805838580fb1bbabd8b8c3587b6cb5357eec71736a21a30")),re=C({method:"POST"}).middleware([E]).handler(T("5d2053f5579760b16de5c307ae67a37f872fc3a880fa11d6712ccc3729590ae3"));function se(a){if(a==null)return"—";const p=Math.abs(a);return p>=1e9?`${(a/1e9).toFixed(2)}B`:p>=1e6?`${(a/1e6).toFixed(2)}M`:p>=1e3?`${(a/1e3).toFixed(1)}K`:a.toFixed(0)}function O(a){return a==null?"—":a.toFixed(2)}function ve(){const a=D(),p=w(Y),k=w(X),f=w(J),N=w(Z),l=F({queryKey:["watchlists"],queryFn:()=>p()}),[h,y]=i.useState(""),[c,b]=i.useState(null),[n,d]=i.useState(!1),[u,x]=i.useState(null),[v,g]=i.useState("lists"),m=()=>a.invalidateQueries({queryKey:["watchlists"]}),s=l.data?.watchlists??[];i.useEffect(()=>{!c&&s.length>0&&b(s.find(o=>o.is_default)?.id??s[0].id),c&&!s.find(o=>o.id===c)&&b(s[0]?.id??null)},[s,c]);const t=s.find(o=>o.id===c)??null,r=I({mutationFn:()=>k({data:{name:h,isDefault:!s.length}}),onSuccess:o=>{y(""),d(!1),b(o.id),m()}}),j=I({mutationFn:o=>f({data:{id:o}}),onSuccess:m}),S=I({mutationFn:o=>N({data:{id:o}}),onSuccess:m});return e.jsx(W,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(U,{storageKey:"watchlist",title:"What is the Watchlist?",intro:"Your personal universe of tickers to monitor outside the Funnel — anything you want a live quote and quick drill-down for.",bullets:["Create multiple lists in the left sidebar; one is marked DEFAULT and powers the dashboard preview.","Add tickers via the search box. Click any row to open the ticker detail page with charts and AI notes.","Quotes refresh on a 60s loop. BID / ASK / VOLUME show PRO until a paid SIP feed (Polygon / Alpaca) is connected in Account → Integrations.","Pre / post-market prices are not included on the free tier."]}),e.jsxs("div",{className:"flex flex-col gap-4 md:h-[calc(100vh-12rem)] md:flex-row",children:[e.jsxs("aside",{className:`${v==="panel"?"hidden md:flex":"flex"} w-full shrink-0 flex-col rounded-lg border border-border bg-card/30 md:w-56`,children:[e.jsx("div",{className:"border-b border-border px-3 py-2 font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"My Lists"}),e.jsx("ul",{className:"max-h-[55vh] flex-1 overflow-y-auto py-1 md:max-h-none",children:s.map(o=>e.jsx("li",{children:e.jsxs("button",{onClick:()=>{b(o.id),g("panel")},className:`flex w-full items-center justify-between gap-2 px-3 py-1.5 font-mono text-xs ${o.id===c?"bg-primary/10 text-primary":"text-foreground hover:bg-muted/40"}`,children:[e.jsx("span",{className:"truncate uppercase",children:o.name}),o.is_default&&e.jsx("span",{className:"text-[9px] text-muted-foreground",children:"DEFAULT"})]})},o.id))}),e.jsx("div",{className:"border-t border-border p-2",children:n?e.jsxs("form",{onSubmit:o=>{o.preventDefault(),h.trim()&&r.mutate()},className:"flex flex-col gap-1.5",children:[e.jsx("input",{autoFocus:!0,value:h,onChange:o=>y(o.target.value),placeholder:"List name",className:"rounded border border-border bg-background px-2 py-1 font-mono text-xs",maxLength:60}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{type:"submit",disabled:r.isPending||!h.trim(),className:"flex-1 rounded bg-primary px-2 py-1 font-mono text-[10px] text-primary-foreground disabled:opacity-50",children:"CREATE"}),e.jsx("button",{type:"button",onClick:()=>{d(!1),y("")},className:"rounded border border-border px-2 py-1 font-mono text-[10px]",children:"×"})]})]}):e.jsx("button",{onClick:()=>d(!0),className:"w-full rounded border border-dashed border-border px-2 py-1.5 font-mono text-[10px] text-muted-foreground hover:bg-muted/40 hover:text-foreground",children:"+ NEW LIST"})})]}),e.jsxs("section",{className:`${v==="lists"?"hidden md:flex":"flex"} flex-1 flex-col overflow-hidden rounded-lg border border-border bg-card/30`,children:[l.isLoading&&e.jsx("div",{className:"p-4 font-mono text-xs text-muted-foreground",children:"LOADING…"}),l.error&&e.jsx("div",{className:"m-4 rounded border border-red-500/40 bg-red-500/10 p-3 font-mono text-xs text-red-400",children:l.error instanceof Error?l.error.message:String(l.error)}),!l.isLoading&&s.length===0&&e.jsx("div",{className:"p-6 font-mono text-xs text-muted-foreground",children:"No watchlists yet. Create one in the sidebar to start tracking tickers."}),s.length>0&&e.jsx(ie,{watchlists:s,onPick:(o,P)=>{b(o),x(P),g("panel"),window.setTimeout(()=>x(L=>L===P?null:L),2500)}}),t&&e.jsx(ae,{w:t,onDelete:()=>{confirm(`Delete watchlist "${t.name}"?`)&&j.mutate(t.id)},onMakeDefault:()=>S.mutate(t.id),onMutate:m,busy:j.isPending||S.isPending,highlightTickerId:u,onMobileBack:()=>g("lists")},t.id)]})]})]})})}function ae({w:a,onDelete:p,onMakeDefault:k,onMutate:f,busy:N,highlightTickerId:l,onMobileBack:h}){const y=w(te),c=w(re),b=w(ee),n=I({mutationFn:t=>
1y({data:{watchlistId:a.id,ticker:t}}),onSuccess:()=>f()}),d=I({mutationFn:t=>c({data:{id:t}}),onSuccess:f}),[u,x]=i.useState(!1),[v,g]=i.useState(a.name),m=I({mutationFn:t=>b({data:{id:a.id,name:t}}),onSuccess:()=>{x(!1),f()}}),s=()=>{const t=v.trim();if(!t||t===a.name){x(!1),g(a.name);return}m.mutate(t)};return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2 border-b border-border px-4 py-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[h&&e.jsx("button",{type:"button",onClick:h,className:"mt-1 rounded border border-border px-2 py-1 font-mono text-[10px] hover:bg-muted md:hidden","aria-label":"Back to lists",children:"← LISTS"}),e.jsxs("div",{children:[u?e.jsxs("form",{onSubmit:t=>{t.preventDefault(),s()},className:"flex items-center gap-1.5",children:[e.jsx("input",{autoFocus:!0,value:v,onChange:t=>g(t.target.value),onKeyDown:t=>{t.key==="Escape"&&(x(!1),g(a.name))},maxLength:60,disabled:m.isPending,className:"rounded border border-border bg-background px-2 py-1 font-mono text-lg font-bold uppercase tracking-wide"}),e.jsx("button",{type:"submit",disabled:m.isPending||!v.trim(),className:"rounded bg-primary px-2 py-1 font-mono text-[10px] text-primary-foreground disabled:opacity-50",children:"SAVE"}),e.jsx("button",{type:"button",onClick:()=>{x(!1),g(a.name)},className:"rounded border border-border px-2 py-1 font-mono text-[10px]",children:"×"})]}):e.jsx("h2",{className:"font-mono text-lg font-bold uppercase tracking-wide",children:a.name}),e.jsxs("p",{className:"mt-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:[a.tickers.length," symbols",a.is_default&&" · default list"]}),m.error&&e.jsx("p",{className:"mt-1 font-mono text-[10px] text-red-400",children:m.error instanceof Error?m.error.message:String(m.error)})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 font-mono text-[10px]",children:[!u&&e.jsx("button",{onClick:()=>{g(a.name),x(!0)},disabled:N,className:"rounded border border-border px-2 py-1 hover:bg-muted disabled:opacity-50",children:"RENAME"}),!a.is_default&&e.jsx("button",{onClick:k,disabled:N,className:"rounded border border-border px-2 py-1 hover:bg-muted disabled:opacity-50",children:"SET DEFAULT"}),e.jsx("button",{onClick:p,disabled:N,className:"rounded border border-red-500/40 px-2 py-1 text-red-400 hover:bg-red-500/10 disabled:opacity-50",children:"DELETE"})]})]}),e.jsxs("div",{className:"border-b border-border px-4 py-2",children:[e.jsx(oe,{onSelect:t=>n.mutate(t),pending:n.isPending}),n.error&&e.jsx("p",{className:"mt-1 font-mono text-[10px] text-red-400",children:n.error instanceof Error?n.error.message:String(n.error)})]}),a.tickers.length>0&&e.jsx(de,{watchlistId:a.id,tickers:a.tickers,onRemove:t=>d.mutate(t),removing:d.isPending,highlightTickerId:l??null})]})}function ne(a,p=350){const[k,f]=i.useState(a);return i.useEffect(()=>{const N=setTimeout(()=>f(a),p);return()=>clearTimeout(N)},[a,p]),k}function oe({onSelect:a,pending:p}){const k=w(K),[f,N]=i.useState(""),[l,h]=i.useState(!1),[y,c]=i.useState(0),b=ne(f.trim(),500),n=i.useRef(null),d=F({queryKey:["ticker-search",b],queryFn:()=>k({data:{query:b}}),enabled:b.length>=1,staleTime:6e4,retry:!1}),u=f.trim(),x=d.data?.results??[],v=u.length>=1&&u!==b,g=d.isLoading||d.isFetching||v;i.useEffect(()=>{c(0)},[b]),i.useEffect(()=>{if(!l)return;const r=j=>{n.current?.contains(j.target)||h(!1)};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[l]);const m=r=>{a(r),N(""),h(!1)},s=r=>{r.key==="ArrowDown"?(r.preventDefault(),h(!0),c(j=>Math.min(j+1,x.length-1))):r.key==="ArrowUp"?(r.preventDefault(),c(j=>Math.max(j-1,0))):r.key==="Enter"?(r.preventDefault(),x[y]?m(x[y].symbol):f.trim()&&m(f.trim().toUpperCase())):r.key==="Escape"&&h(!1)},t=l&&u.length>=1;return e.jsxs("div",{ref:n,className:"relative",children:[e.jsx("input",{value:f,onChange:r=>{N(r.target.value.toUpperCase()),h(!0)},onFocus:()=>h(!0),onKeyDown:s,placeholder:"SEARCH SYMBOL OR COMPANY",className:"w-full rounded border border-border bg-background px-2 py-1 font-mono text-xs uppercase placeholder:normal-case placeholder:text-muted-foreground",maxLength:40,disabled:p,autoComplete:"off"}),t&&e.jsxs("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-80 overflow-y-auto rounded border border-border bg-popover font-mono text-xs shadow-lg",children:[g&&e.jsx("div",{className:"px-3 py-2 text-[10px] uppercase text-muted-foreground",children:"SEARCHING…"}),!g&&d.error&&e.jsx("div",{className:"px-3 py-2 text-[10px] uppercase text-muted-foreground",children:"NO SUGGESTIONS — PRESS ENTER TO ADD"}),!g&&!d.error&&x.length===0&&e.jsx("div",{className:"px-3 py-2 text-[10px] uppercase text-muted-foreground",children:"NO RESULTS"}),x.map((r,j)=>e.jsxs("button",{type:"button",onMouseEnter:()=>c(j),onClick:()=>m(r.symbol),className:`flex w-full flex-col items-start gap-0.5 border-b border-border/40 px-3 py-2 text-left last:border-b-0 ${j===y?"bg-muted/60":"hover:bg-muted/40"}`,children:[e.jsx("span",{className:"text-[10px] uppercase text-muted-foreground",children:r.description}),e.jsxs("span",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-sm font-bold",children:r.symbol}),r.exchange?e.jsx("span",{className:"text-[10px] uppercase text-muted-foreground",children:r.exchange}):r.type?e.jsx("span",{className:"text-[9px] uppercase text-muted-foreground",children:r.type}):null]})]},r.symbol))]})]})}
1function de({watchlistId:a,tickers:p,onRemove:k,removing:f,highlightTickerId:N}){const l=R(),h=w(Q),y=F({queryKey:["watchlist-quotes",a,p.map(s=>s.ticker).join(",")],queryFn:()=>h({data:{watchlistId:a}}),enabled:p.length>0,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:!1}),c=i.useMemo(()=>new Map((y.data?.quotes??[]).map(s=>[s.symbol,s])),[y.data]),b=y.data?.fetchedAt??null,[n,d]=i.useState("symbol"),[u,x]=i.useState("asc"),v=i.useMemo(()=>{const s=p.map(r=>({t:r,q:c.get(r.ticker)})),t=r=>{switch(n){case"symbol":return r.t.ticker;case"price":return r.q?.price??-1/0;case"changePct":return r.q?.changePct??-1/0;case"bid":return r.q?.bid??-1/0;case"ask":return r.q?.ask??-1/0;case"volume":return r.q?.volume??-1/0}};return[...s].sort((r,j)=>{const S=t(r),o=t(j);if(typeof S=="string"&&typeof o=="string")return u==="asc"?S.localeCompare(o):o.localeCompare(S);const P=S-o;return u==="asc"?P:-P})},[p,c,n,u]),g=s=>{n===s?x(t=>t==="asc"?"desc":"asc"):(d(s),x(s==="symbol"?"asc":"desc"))},m=({k:s,label:t,align:r="right"})=>{const j=n===s;return e.jsx("th",{onClick:()=>g(s),className:`cursor-pointer select-none px-3 py-2 text-${r} text-[10px] font-medium uppercase tracking-wider hover:text-foreground ${j?"text-foreground":"text-muted-foreground"}`,children:e.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[t,j&&e.jsx("span",{className:"text-[8px]",children:u==="asc"?"▲":"▼"})]})})};return e.jsxs("div",{className:"flex-1 overflow-auto",children:[e.jsx("div",{className:"flex items-center justify-end border-b border-border/40 px-3 py-1",children:e.jsx(H,{asOf:b})}),e.jsxs("table",{className:"w-full font-mono text-xs",children:[e.jsx("thead",{className:"sticky top-0 border-b border-border bg-card",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left text-[10px] font-medium uppercase tracking-wider",children:e.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[e.jsxs("span",{onClick:()=>g("symbol"),className:`cursor-pointer select-none hover:text-foreground ${n==="symbol"?"text-foreground":"text-muted-foreground"}`,children:["Instrument",n==="symbol"&&e.jsx("span",{className:"ml-0.5 text-[8px]",children:u==="asc"?"▲":"▼"})]}),e.jsxs(A,{children:[e.jsx(M,{onClick:s=>s.stopPropagation(),className:"inline-flex h-4 w-4 items-center justify-center rounded-full text-muted-foreground hover:text-foreground","aria-label":"¿Qué significan los puntos?",children:e.jsx(q,{className:"h-3.5 w-3.5"})}),e.jsxs($,{align:"start",className:"w-72 text-xs font-sans normal-case tracking-normal",onClick:s=>s.stopPropagation(),children:[e.jsx("p",{className:"mb-2 font-semibold text-foreground",children:"Indicadores de tendencia"}),e.jsxs("ul",{className:"space-y-2 text-muted-foreground",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"mt-1 inline-flex shrink-0 gap-0.5",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400"}),e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400"})]}),e.jsxs("span",{children:[e.jsx("span",{className:"text-foreground",children:"Super Trending UP"})," — tendencia alcista confirmada (SuperTrend diario)."]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"mt-1 inline-flex shrink-0 gap-0.5",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-red-400"}),e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-red-400"})]}),e.jsxs("span",{children:[e.jsx("span",{className:"text-foreground",children:"Super Trending DOWN"})," — tendencia bajista confirmada (SuperTrend diario)."]})]}),e.jsx("li",{className:"pt-1 text-[11px]",children:"Sin puntos = sin señal clara o datos insuficientes."})]})]})]})]})}),e.jsx(m,{k:"price",label:"Last"}),e.jsx(m,{k:"changePct",label:"Change %"}),e.jsx(m,{k:"bid",label:"Bid"}),e.jsx(m,{k:"ask",label:"Ask"}),e.jsx(m,{k:"volume",label:"Volume"}),e.jsx("th",{className:"w-8"})]})}),e.jsx("tbody",{children:v.map(({t:s,q:t})=>{const r=t?.changePct??null,j=r==null?"text-muted-foreground":r>0?"text-emerald-400":r<0?"text-red-400":"text-muted-foreground",S=N===s.id;return e.jsxs("tr",{ref:S?o=>o?.scrollIntoView({block:"center",behavior:"smooth"}):void 0,onClick:()=>l({to:"/stock/$ticker",params:{ticker:s.ticker}}),className:`group cursor-pointer border-b border-border/40 transition-colors hover:bg-muted/30 ${S?"bg-primary/15 ring-1 ring-inset ring-primary/40":""}`,children:[e.jsxs("td",{className:"px-3 py-1.5",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"font-bold",children:s.ticker}),s.exchange&&e.jsx("span",{className:"text-[9px] uppercase text-muted-foreground",children:s.exchange}),t?.supertrend==="LONG"&&e.jsx("span",{className:"rounded bg-emerald-500/15 px-1.5 py-0 text-[9px] font-bold text-emerald-400",title:"SuperTrend daily: LONG",children:"LONG"}),t?.supertrend==="SHORT"&&e.jsx("span",{className:"rounded bg-red-500/15 px-1.5 py-0 text-[9px] font-bold text-red-400",title:"SuperTrend daily: SHORT",children:"SHORT"})]}),s.name&&e.jsx("div",{className:"max-w-[280px] truncate text-[10px] text-muted-foreground",children:s.name})]}),e.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums",children:y.isLoading?"…":e.jsxs("span",{className:"inline-flex items-center justify-end gap-1.5",children:[e.jsx(G,{asOf:t?.asOf??b}),O(t?.price)]})}),e.jsx("td",{className:`px-3 py-1.5 text-right tabular-nums ${j}`,children:y.isLoading?"…":r!=null?`${r>=0?"+":""}${r.toFixed(2)}%`:"—"}),e.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-muted-foreground
1/40",title:"Requires paid market data (upgrade in Settings)",children:t?.bid!=null?O(t.bid):"PRO"}),e.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-muted-foreground/40",title:"Requires paid market data (upgrade in Settings)",children:t?.ask!=null?O(t.ask):"PRO"}),e.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-muted-foreground/40",title:"Requires paid market data (upgrade in Settings)",children:t?.volume!=null?se(t.volume):"PRO"}),e.jsx("td",{className:"px-2 py-1.5 text-right",children:e.jsx("button",{onClick:o=>{o.stopPropagation(),k(s.id)},disabled:f,className:"text-muted-foreground opacity-0 hover:text-red-400 group-hover:opacity-100","aria-label":`Remove ${s.ticker}`,children:"×"})})]},s.id)})})]})]})}function ie({watchlists:a,onPick:p}){const[k,f]=i.useState(""),[N,l]=i.useState(!1),h=i.useRef(null);i.useEffect(()=>{if(!N)return;const n=d=>{h.current?.contains(d.target)||l(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[N]);const y=i.useMemo(()=>{const n=new Map;for(const d of a)for(const u of d.tickers){const x=u.ticker.toUpperCase(),v=n.get(x),g={listId:d.id,listName:d.name,rowId:u.id};v?(v.occurrences.push(g),!v.name&&u.name&&(v.name=u.name)):n.set(x,{ticker:x,name:u.name??null,occurrences:[g]})}return Array.from(n.values()).sort((d,u)=>d.ticker.localeCompare(u.ticker))},[a]),c=k.trim().toUpperCase(),b=i.useMemo(()=>c?y.filter(n=>n.ticker.includes(c)||n.name&&n.name.toUpperCase().includes(c)).slice(0,30):[],[y,c]);return e.jsxs("div",{ref:h,className:"relative m-3 rounded-md border border-primary/40 bg-card p-3 shadow-sm",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary"}),e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-primary",children:"Search in your lists"})]}),e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"Only your watchlists"})]}),e.jsxs("div",{className:"flex h-9 items-center gap-2 rounded-md border border-input bg-background px-3 focus-within:ring-2 focus-within:ring-primary/40",children:[e.jsx(B,{size:16,className:"shrink-0 text-primary"}),e.jsx("input",{value:k,onChange:n=>{f(n.target.value),l(!0)},onFocus:()=>l(!0),placeholder:"Find a ticker you already track…",className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoComplete:"off",maxLength:40}),k&&e.jsx("button",{type:"button",onClick:()=>{f(""),l(!1)},className:"shrink-0 rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground","aria-label":"Clear search",children:e.jsx(_,{size:14})})]}),N&&c.length>0&&e.jsxs("div",{className:"absolute left-3 right-3 top-full z-20 mt-1 max-h-80 overflow-y-auto rounded-md border border-border bg-popover font-mono text-xs shadow-lg",children:[b.length===0&&e.jsx("div",{className:"px-3 py-2 text-[10px] uppercase text-muted-foreground",children:"NOT IN ANY OF YOUR LISTS"}),b.map(n=>e.jsxs("div",{className:"border-b border-border/40 px-3 py-2 last:border-b-0",children:[e.jsxs("button",{type:"button",onClick:()=>{const d=n.occurrences[0];p(d.listId,d.rowId),l(!1),f("")},className:"flex w-full items-baseline gap-2 text-left hover:text-primary",children:[e.jsx("span",{className:"text-sm font-bold",children:n.ticker}),n.name&&e.jsx("span",{className:"truncate text-[10px] uppercase text-muted-foreground",children:n.name})]}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:n.occurrences.map(d=>e.jsx("button",{type:"button",onClick:()=>{p(d.listId,d.rowId),l(!1),f("")},className:"rounded border border-border px-1.5 py-0.5 text-[9px] uppercase tracking-wider text-muted-foreground hover:border-primary hover:text-primary",children:d.listName},d.listId+d.rowId))})]},n.ticker))]})]})}export{ve 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.