PageSourceSearch

https://scolab.ai/assets/YoutubeIngestAdmin-Hl5LLyZC.js

js scolab.ai collected 2026-09-24 14:31:53 UTC 19,856 bytes, 1 lines download raw bytes

1import{cN as q,z as l,N as e,kU as J,cw as W,cx as k,eg as Q,cy as X,dM as H,dH as M,kV as G,kW as K,d$ as Z,aQ as Y,cq as _}from"./index-BLWRXzF8.js";import{u as D}from"./useAdminFetch-Cb-4HIPp.js";const re=({isDark:s})=>{var z;const{adminFetch:i}=D(),{toast:a}=q()||{toast:()=>{}},[d,m]=l.useState(null),[y,c]=l.useState([]),[j,A]=l.useState(!0),[b,P]=l.useState(!1),[o,$]=l.useState(null),[x,S]=l.useState(!1),[R,u]=l.useState(!1),[f,C]=l.useState(!1),[g,U]=l.useState([]),[B,O]=l.useState([]);l.useEffect(()=>{(async()=>{try{const t=await i("/admin/yt-ingest/niches");t.ok&&(U(t.data.niches||[]),O(t.data.languages||[]))}catch{}})()},[i]);const N=l.useCallback(async()=>{A(!0);try{const t=await i("/admin/yt-ingest/status");t.ok&&m(t.data)}catch(t){a==null||a({type:"error",message:`Falha ao carregar status: ${t.message}`})}finally{A(!1)}},[i]),F=l.useCallback(async()=>{try{const t=new URLSearchParams;x||t.set("active","true");const h=await i(`/admin/yt-ingest/channels?${t}`);h.ok&&c(h.data.channels||[])}catch(t){a==null||a({type:"error",message:`Falha ao listar canais: ${t.message}`})}},[i,x]);l.useEffect(()=>{N()},[N]),l.useEffect(()=>{F()},[F]);const r=async t=>{var h,T;if(!b&&!(!t&&!window.confirm("Vai rodar o cron de verdade — publicará vídeos novos. Continuar?"))){P(!0),$(null);try{const v=await i("/admin/yt-ingest/run",{method:"POST",body:{dryRun:t}});v.ok?($(v.data.stats),a==null||a({type:"success",message:t?"Dry-run completo":`${((h=v.data.stats)==null?void 0:h.ingested)||0} vídeos ingeridos`}),await N(),await F()):a==null||a({type:"error",message:((T=v.data)==null?void 0:T.error)||`HTTP ${v.status}`})}catch(v){a==null||a({type:"error",message:`Falha no run: ${v.message}`})}finally{P(!1)}}},w=async()=>{if(window.confirm("Reativar todos os canais inativos? (404s permanentes serão re-desativados no próximo run.)"))try{const t=await i("/admin/yt-ingest/reactivate",{method:"POST"});t.ok&&(a==null||a({type:"success",message:`${t.data.reactivated} canais reativados`}),await N(),await F())}catch(t){a==null||a({type:"error",message:`Falha: ${t.message}`})}},L=async(t,h)=>{try{const T=await i(`/admin/yt-ingest/channels/${t}`,{method:"PATCH",body:{active:!h}});T.ok&&c(v=>v.map(E=>E._id===t?T.data.channel:E))}catch(T){a==null||a({type:"error",message:T.message})}},n={panel:s?"bg-slate-800/50 border-slate-700":"bg-white border-gray-200",text:s?"text-gray-100":"text-gray-900",sub:s?"text-slate-400":"text-gray-500",chip:s?"bg-slate-700/60 text-slate-200":"bg-gray-100 text-gray-700"};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:`rounded-2xl border p-4 ${n.panel}`,children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{className:"w-5 h-5 text-red-500"}),e.jsx("h3",{className:`font-semibold ${n.text}`,children:"YouTube Curadoria"}),e.jsx("span",{className:`text-xs ${n.sub}`,children:"cron 04:00 BRT diário · @scolab_curadoria"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:N,disabled:j,className:`px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 ${s?"bg-slate-700 hover:bg-slate-600 text-gray-200":"bg-gray-100 hover:bg-gray-200 text-gray-700"} disabled:opacity-50 cursor-pointer`,children:[e.jsx(W,{className:`w-3.5 h-3.5 ${j?"animate-spin":""}`}),"Atualizar"]}),e.jsxs("button",{onClick:()=>r(!0),disabled:b,className:`px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 ${s?"bg-amber-600/30 hover:bg-amber-600/50 text-amber-200 border border-amber-500/30":"bg-amber-50 hover:bg-amber-100 text-amber-800 border border-amber-200"} disabled:opacity-50 cursor-pointer`,children:[b?e.jsx(k,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Q,{className:"w-3.5 h-3.5"}),"Dry-run"]}),e.jsxs("button",{onClick:()=>r(!1),disabled:b,className:`px-4 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-1.5 ${s?"bg-red-600 hover:bg-red-500 text-white":"bg-red-600 hover:bg-red-700 text-white"} disabled:opacity-50 cursor-pointer`,children:[b?e.jsx(k,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(X,{className:"w-3.5 h-3.5"}),"Forçar digest"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t border-slate-700/30",children:[e.jsxs("button",{onClick:()=>u(!0),className:`px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 ${s?"bg-indigo-600/30 hover:bg-indigo-600/50 text-indigo-200 border border-indigo-500/30":"bg-indigo-50 hover:bg-indigo-100 text-indigo-700 border border-indigo-200"} cursor-pointer`,children:[e.jsx(H,{className:"w-3.5 h-3.5"})," Adicionar canal"]}),e.jsxs("button",{onClick:()=>C(!0),className:`px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 ${s?"bg-purple-600/30 hover:bg-purple-600/50 text-purple-200 border border-purple-500/30":"bg-purple-50 hover:bg-purple-100 text-purple-700 border border-purple-200"} cursor-pointer`,children:[e.jsx(H,{className:"w-3.5 h-3.5"})," Adicionar vídeo/short"]})]})]}),d&&e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(V,{isDark:s,label:"Canais ativos",value:d.channels.active,sub:`${d.channels.inactive} inativos`}),e.jsx(V,{isDark:s,label:"Vídeos publicados",value:d.published.videos,sub:"long"}),e.jsx(V,{isDark:s,label:"Shorts publicados",value:d.published.shorts,sub:"curtos"}),e.jsx(V,{isDark:s,label:"Últimos 7d",value:d.ingestion.last7days,sub:`${d.ingestion.totalLifetime} total`})]}),o&&e.jsxs("div",{className:`rounded-xl border p-3 ${s?"bg-emerald-900/20 border-emerald-700/50":"bg-emerald-50 border-emerald-200"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(M,{className:s?"text-emerald-400":"text-emerald-600"}),e.jsxs("span",{className:`text-sm font-semibold ${s?"text-emerald-200":"text-emerald-800"}`,children:["Run concluído (",(o.elapsedMs/1e3).toFixed(1),"s)"]})]}),e.jsxs("div",{className:`grid grid-cols-3 md:grid-cols-6 gap-2 text-xs ${s?"text-emerald-200":"text-emerald-900"}`,children:[e.jsx(I,{label:"Ingeridos",value:o.ingested}),e.jsx(I,{label:"Long",value:o.ingestedLong}),e.jsx(I,{label:"Short",value:o.ingestedShort}),e.jsx(I,{label:"Curadoria rejeitou",value:o.rejectedByCuration}),e.jsx(I,{label:"Sem transcript",value:o.skippedNoTranscript}),e.jsx(I,{label:"Transcript grande",value:o.skippedTranscriptTooLarge})]})]}),((z=d==null?void 0:d.latestIngested)==null?void 0:z.length)>0&&e.jsxs("div",{className:`rounded-2xl border p-4 ${n.panel}`,children:[e.jsx("h4",{className:`text-sm font-semibold mb-3 ${n.text}`,children:"Últimos ingeridos"}),e.jsx("div",{className:"space-y-2",children:d.latestIngested.map(t=>e.jsxs("div",{className:`flex items-center gap-3 p-2 rounded-lg ${s?"bg-slate-900/40":"bg-gray-50"}`,children:[e.jsx("img",{src:`https://img.youtube.com/vi/${t.videoId}/mqdefault.jpg`,alt:"",className:"w-20 h-12 object-cover rounded flex-shrink-0",loading:"lazy"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:`text-xs font-medium truncate ${n.text}`,children:t.title}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${t.bucket==="short"?"bg-purple-500/20 text-purple-400":"bg-blue-500/20 text-blue-400"}`,children:t.bucket}),e.jsxs("span",{className:`text-[10px] ${n.sub}`,children:["score ",t.score," · ",t.subject]}),e.jsx("span",{className:`text-[10px] truncate ${n.sub}`,children:(t.tags||[]).slice(0,3).join(", ")})]})]})]},t.videoId))})]}),e.jsxs("div",{className:`rounded-2xl border p-4 ${n.panel}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h4",{className:`text-sm font-semibold ${n.text}`,children:["Canais curados (",y.length,")"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("label",{className:`text-xs flex items-center gap-1.5 cursor-pointer ${n.sub}`,children:[e.jsx("input",{type:"checkbox",checked:x,onChange:t=>S(t.target.checked),className:"accent-red-500"}),"Mostrar inativos"]}),e.jsx("button",{onClick:w,className:`px-2.5 py-1 rounded-lg text-xs ${s?"bg-slate-700 hover:bg-slate-600 text-gray-300":"bg-gray-100 hover:bg-gray-200 text-gray-700"} cursor-pointer`,children:"Reativar todos"})]})]}),e.jsx("div",{className:"max-h-96 overflow-y-auto space-y-1",children:y.map(t=>e.jsxs("div",{className:`flex items-center gap-3 p-2 rounded-lg ${t.active?"":"opacity-50"} ${s?"hover:bg-slate-900/40":"hover:bg-gray-50"}`,children:[e.jsx("button",{onClick:()=>L(t._id,t.active),className:"flex-shrink-0 cursor-pointer",title:t.active?"Desativar":"Ativar",children:t.active?e.jsx(G,{className:"w-5 h-5 text-emerald-500"}):e.jsx(K,{className:`w-5 h-5 ${n.sub}`})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:`text-xs font-medium truncate ${n.text}`,children:t.name}),e.jsx("span",{className:`text-[10px] ${n.sub}`,children:t.language})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-1 mt-0.5",children:(t.niches||[]).slice(0,4).map(h=>e.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded ${n.chip}`,children:h},h))})]}),e.jsxs("div",{className:`text-[10px] text-right ${n.sub}`,children:[e.jsxs("div",{children:["peso ",t.weight]}),t.totalIngested>0&&e.jsxs("div",{className:"text-emerald-500",children:[t.totalIngested," ingest"]}),t.consecutiveFailures>0&&e.jsxs("div",{className:"text-red-400 flex items-center gap-0.5",children:[e.jsx(Z,{className:"w-2.5 h-2.5"}),t.consecutiveFailures," falhas"]})]})]},t._id))})]}),R&&e.jsx(ee,{isDark:s,niches:g,languages:B,onClose:()=>u(!1),onCreated:()=>F(),adminFetch:i,toast:a}),f&&e.jsx(se,{isDark:s,onClose:()=>C(!1),onCreated:()=>N(),adminFetch:i,toast:a})]})},ee=({isDark:s,niches:i,languages:a,onClose:d,onCreated:m,adminFetch:y,toast:c})=>{const[j,A]=l.useState(""),[b,P]=l.useState(""),[o,$]=l.useState(""),[x,S]=l.useState([]),[R,u]=l.useState("pt"),[f,C]=l.useState(5),[g,U]=l.useState(""),[B,O]=l.useState(!1);Y(!0,d);const N=r=>{S(w=>w.includes(r)?w.filter(L=>L!==r):[...w,r])},F=async r=>{var w,L;if(r==null||r.preventDefault(),!j.trim()){c==null||c({type:"error",message:"URL, @handle ou channelId obrigatório"});return}if(x.length===0){c==null||c({type:"error",message:"Escolha pelo menos 1 nicho"});return}O(!0);try{const n=await y("/admin/yt-ingest/channels",{method:"POST",body:{input:j.trim(),name:b,handle:o,niches:x,language:R,weight:f,notes:g}});n.ok?(c==null||c({type:"success",message:`Canal "${n.data.channel.name}" adicionado`}),m==null||m(n.data.channel),d()):n.status===409?c==null||c({type:"error",message:`Canal já existe: ${(w=n.data.existing)==null?void 0:w.name}`}):c==null||c({type:"error",message:((L=n.data)==null?void 0:L.error)||`HTTP ${n.status}`})}catch(n){c==null||c({type:"error",message:n.message})}finally{O(!1)}};return e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",onClick:d,children:e.jsxs("div",{onClick:r=>r.stopPropagation(),className:`w-full max-w-lg rounded-2xl p-6 max-h-[90vh] overflow-y-auto ${s?"bg-slate-900 border border-slate-700":"bg-white border border-gray-200"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:`text-lg font-bold ${s?"text-white":"text-gray-900"}`,children:"Adicionar canal"}),e.jsx("p",{className:`text-xs mt-0.5 ${s?"text-slate-400":"text-gray-500"}`,children:"URL completa, @handle ou channelId direto"})]}),e.jsx("button",{onClick:d,className:`p-1.5 rounded-lg cursor-pointer ${s?"hover:bg-slate-800 text-slate-400":"hover:bg-gray-100 text-gray-500"}`,children:e.jsx(_,{className:"w-4 h-4"})})]}),e.jsxs("form",{onSubmit:F,className:"space-y-3",children:[e.jsx(p,{isDark:s,label:"Canal*",hint:"ex: https://youtube.com/@veritasium, @3blue1brown, UCYO_jab_esuFRV4b17AJtAw",children:e.jsx("input",{type:"text",value:j,onChange:r=>A(r.target.value),placeholder:"URL, @handle ou UC...",className:`w-full px-3 py-2 rounded-lg text-sm ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`,required:!0,autoFocus:!0})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(p,{isDark:s,label:"Nome (opcional)",hint:"se vazio usa channelId",children:e.jsx("input",{type:"text",value:b,onChange:r=>P(r.target.value),placeholder:"Veritasium",className:`w-full px-3 py-2 rounded-lg text-sm ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`})}),e.jsx(p,{isDark:s,label:"Handle (opcional)",children:e.jsx("input",{type:"text",value:o,onChange:r=>$(r.target.value),placeholder:"veritasium",className:`w-full px-3 py-2 rounded-lg text-sm ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`})})]}),e.jsx(p,{isDark:s,label:`Nichos* (${x.length} selecionados)`,hint:"conteúdo do canal — escolha pelo menos 1",children:e.jsx("div",{className:`flex flex-wrap gap-1.5 p-2 rounded-lg max-h-32 overflow-y-auto ${s?"bg-slate-800/50 border border-slate-700":"bg-gray-50 border border-gray-200"}`,children:i.map(r=>e.jsx("button",{type:"button",onClick:()=>N(r),className:`px-2 py-1 rounded-md text-[11px] cursor-pointer transition ${x.includes(r)?"bg-indigo-600 text-white":s?"bg-slate-700 text-slate-300 hover:bg-slate-600":"bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,children:r},r))})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(p,{isDark:s,label:"Idioma",children:e.jsx("select",{value:R,onChange:r=>u(r.target.value),className:`w-full px-3 py-2 rounded-lg text-sm cursor-pointer ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`,children:a.map(r=>e.jsx("option",{value:r,children:r},r))})}),e.jsx(p,{isDark:s,label:`Peso (${f})`,hint:"1-10, alto = mais picks",children:e.jsx("input",{type:"range",min:"1",max:"10",value:f,onChange:r=>C(parseInt(r.target.value,10)),className:"w-full cursor-pointer"})})]}),e.jsx(p,{isDark:s,label:"Notas (opcional)",children:e.jsx("textarea",{value:g,onChange:r=>U(r.target.value),rows:2,placeholder:"Por que esse canal foi adicionado...",className:`w-full px-3 py-2 rounded-lg text-sm ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`})}),e.jsxs("button",{type:"submit",disabled:B,className:"w-full py-2.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white rounded-lg font-medium text-sm flex items-center justify-center gap-2 cursor-pointer",children:[B?e.jsx(k,{className:"w-4 h-4 animate-spin"}):e.jsx(H,{className:"w-4 h-4"}
1),B?"Resolvendo canal...":"Adicionar canal"]})]})]})})},se=({isDark:s,onClose:i,onCreated:a,adminFetch:d,toast:m})=>{const[y,c]=l.useState(""),[j,A]=l.useState(""),[b,P]=l.useState(!1),[o,$]=l.useState(!1),[x,S]=l.useState(null);Y(!0,i);const R=async u=>{var f,C;if(u==null||u.preventDefault(),!!y.trim()){$(!0),S(null);try{const g=await d("/admin/yt-ingest/videos",{method:"POST",body:{url:y.trim(),forceBucket:j||null,skipCuration:b}});if(g.ok){S(g.data);const U=g.data.duplicate?"já estava ingerido":"ingerido";m==null||m({type:"success",message:`Vídeo ${U} como ${g.data.bucket}`}),a==null||a(g.data)}else m==null||m({type:"error",message:((f=g.data)==null?void 0:f.error)||`HTTP ${g.status}`}),S({ok:!1,error:((C=g.data)==null?void 0:C.error)||`HTTP ${g.status}`})}catch(g){m==null||m({type:"error",message:g.message})}finally{$(!1)}}};return e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",onClick:i,children:e.jsxs("div",{onClick:u=>u.stopPropagation(),className:`w-full max-w-lg rounded-2xl p-6 ${s?"bg-slate-900 border border-slate-700":"bg-white border border-gray-200"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:`text-lg font-bold ${s?"text-white":"text-gray-900"}`,children:"Adicionar vídeo"}),e.jsx("p",{className:`text-xs mt-0.5 ${s?"text-slate-400":"text-gray-500"}`,children:"URL do YouTube. Pipeline completo: transcript + DeepSeek + embed."})]}),e.jsx("button",{onClick:i,className:`p-1.5 rounded-lg cursor-pointer ${s?"hover:bg-slate-800 text-slate-400":"hover:bg-gray-100 text-gray-500"}`,children:e.jsx(_,{className:"w-4 h-4"})})]}),e.jsxs("form",{onSubmit:R,className:"space-y-3",children:[e.jsx(p,{isDark:s,label:"URL do YouTube*",children:e.jsx("input",{type:"url",value:y,onChange:u=>c(u.target.value),placeholder:"https://youtube.com/watch?v=... ou /shorts/...",className:`w-full px-3 py-2 rounded-lg text-sm ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`,required:!0,autoFocus:!0,disabled:o})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(p,{isDark:s,label:"Forçar tipo",hint:"auto = por duração",children:e.jsxs("select",{value:j,onChange:u=>A(u.target.value),disabled:o,className:`w-full px-3 py-2 rounded-lg text-sm cursor-pointer ${s?"bg-slate-800 border border-slate-700 text-white":"bg-white border border-gray-300 text-gray-900"}`,children:[e.jsx("option",{value:"",children:"Auto (por duração)"}),e.jsx("option",{value:"long",children:"Long (vídeo normal)"}),e.jsx("option",{value:"short",children:"Short (vertical)"})]})}),e.jsx(p,{isDark:s,label:"Curadoria DeepSeek",hint:"bypass usa tags genéricas",children:e.jsxs("label",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm cursor-pointer ${s?"bg-slate-800 border border-slate-700 text-slate-300":"bg-white border border-gray-300 text-gray-700"}`,children:[e.jsx("input",{type:"checkbox",checked:b,onChange:u=>P(u.target.checked),className:"accent-purple-500",disabled:o}),e.jsx("span",{className:"text-xs",children:"Bypass"})]})})]}),(x==null?void 0:x.ok)&&e.jsxs("div",{className:`p-3 rounded-lg text-xs ${s?"bg-emerald-900/30 border border-emerald-700/50 text-emerald-200":"bg-emerald-50 border border-emerald-200 text-emerald-800"}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[e.jsx(M,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"font-semibold",children:x.duplicate?"Já estava ingerido":"Ingerido com sucesso"})]}),x.curation&&e.jsxs("div",{className:"opacity-90",children:["score ",x.curation.score," · ",x.curation.subject," · ",(x.curation.tags||[]).slice(0,5).join(", ")]}),e.jsxs("div",{className:"opacity-70 mt-0.5",children:["bucket: ",x.bucket]})]}),e.jsxs("button",{type:"submit",disabled:o||!y.trim(),className:"w-full py-2.5 bg-purple-600 hover:bg-purple-500 disabled:opacity-50 text-white rounded-lg font-medium text-sm flex items-center justify-center gap-2 cursor-pointer",children:[o?e.jsx(k,{className:"w-4 h-4 animate-spin"}):e.jsx(H,{className:"w-4 h-4"}),o?"Processando (até 90s)...":"Adicionar vídeo"]})]})]})})},p=({isDark:s,label:i,hint:a,children:d})=>e.jsxs("div",{children:[e.jsx("label",{className:`block text-xs font-medium mb-1 ${s?"text-slate-300":"text-gray-700"}`,children:i}),d,a&&e.jsx("p",{className:`text-[10px] mt-1 ${s?"text-slate-500":"text-gray-400"}`,children:a})]}
1),V=({isDark:s,label:i,value:a,sub:d})=>e.jsxs("div",{className:`rounded-xl border p-3 ${s?"bg-slate-800/50 border-slate-700":"bg-white border-gray-200"}`,children:[e.jsx("p",{className:`text-[10px] uppercase tracking-wide ${s?"text-slate-400":"text-gray-500"}`,children:i}),e.jsx("p",{className:`text-2xl font-bold mt-1 ${s?"text-white":"text-gray-900"}`,children:a}),d&&e.jsx("p",{className:`text-[10px] mt-0.5 ${s?"text-slate-500":"text-gray-400"}`,children:d})]}),I=({label:s,value:i})=>e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:i??0}),e.jsx("div",{className:"opacity-70",children:s})]});export{re 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.