PageSourceSearch

https://prirodni.teacher.bg/assets/TeacherDashboard-DgGZqhC5.js

js teacher.bg collected 2026-10-02 08:10:15 UTC 20,944 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-query-CTD2tXPx.js";import{r as i}from"./vendor-charts-Debegyj1.js";import{L as te}from"./vendor-router-BVlBSwqy.js";import{B as L,b as ae,a as ne,s as A}from"./index-DOCSA3X_.js";import{I as Z}from"./input-DsvowBq8.js";import{N as le}from"./Navbar-oaSoPaU-.js";import{u as re}from"./useAllResources-yWlJhvOx.js";import{I as ce}from"./InviteCodeFlowCard-CE5eYu83.js";import{u as de}from"./useDocumentMeta-DWog-vTx.js";import{S as g}from"./skeleton-DIrJQ-FA.js";import{B as O,a as ie,aw as oe,k as me,ax as xe,P as W,n as X,g as ue,h as he,U as fe,Q as pe,j as ge}from"./vendor-icons-B3WZHYud.js";import"./vendor-radix-khLywtIJ.js";import"./vendor-supabase-CQ9eTX7v.js";import"./allResourcesLoader-B0DBPRQ9.js";const z=12,J="::flashcards",V=c=>c.endsWith(J),je=c=>V(c)?c.slice(0,-J.length):c,Ne=c=>"text-muted-foreground",H=c=>c===null?"bg-muted text-muted-foreground":c>=80?"bg-emerald-100 text-emerald-700":c>=50?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700",be=({results:c,resourceMap:C})=>{const[j,P]=i.useState(""),[h,G]=i.useState("totalAttempts"),[k,B]=i.useState("desc"),[R,$]=i.useState(1),p=i.useMemo(()=>{const s=new Map;return c.forEach(l=>{const r=je(l.resource_id),f=V(l.resource_id);s.has(r)||s.set(r,{quiz:{sum:0,count:0,users:new Set},flash:{sum:0,count:0,users:new Set}});const y=s.get(r),S=l.total_questions>0?l.score/l.total_questions*100:0,I=f?y.flash:y.quiz;I.sum+=S,I.count+=1,I.users.add(l.user_id)}),Array.from(s.entries()).map(([l,r])=>({baseId:l,title:C[l]||l,quizAttempts:r.quiz.count,quizAvg:r.quiz.count>0?Math.round(r.quiz.sum/r.quiz.count):null,quizStudents:r.quiz.users.size,flashAttempts:r.flash.count,flashAvg:r.flash.count>0?Math.round(r.flash.sum/r.flash.count):null,flashStudents:r.flash.users.size,totalAttempts:r.quiz.count+r.flash.count}))},[c,C]),M=i.useMemo(()=>{const s=j.trim().toLowerCase(),l=s?p.filter(f=>f.title.toLowerCase().includes(s)||f.baseId.toLowerCase().includes(s)):p,r=(f,y)=>{const S=k==="asc"?1:-1;switch(h){case"title":return f.title.localeCompare(y.title,"bg")*S;case"quizAvg":return((f.quizAvg??-1)-(y.quizAvg??-1))*S;case"flashAvg":return((f.flashAvg??-1)-(y.flashAvg??-1))*S;case"totalAttempts":default:return(f.totalAttempts-y.totalAttempts)*S}};return[...l].sort(r)},[p,j,h,k]),U=s=>{h===s?B(l=>l==="asc"?"desc":"asc"):(G(s),B(s==="title"?"asc":"desc"))},N=Math.max(1,Math.ceil(M.length/z)),u=Math.min(R,N),b=M.slice((u-1)*z,u*z),[q,v]=i.useState(!1);if(i.useEffect(()=>{v(!0);const s=setTimeout(()=>v(!1),150);return()=>clearTimeout(s)},[u]),i.useEffect(()=>{$(1)},[h,k]),i.useEffect(()=>{R>N&&$(N)},[N,R]),p.length===0)return e.jsxs("div",{className:"bg-card border rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(O,{className:"h-4 w-4 text-primary"}),e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Резултати по ресурси"})]}),e.jsx("p",{className:"text-sm text-muted-foreground italic",children:"Все още няма решени тестове или преминати флаш карти."})]});const F=({k:s,label:l,className:r=""})=>e.jsxs("button",{onClick:()=>U(s),className:`inline-flex items-center gap-1 hover:text-foreground transition ${h===s?"text-foreground font-medium":""} ${r}`,children:[l,e.jsx(xe,{className:"h-3 w-3 opacity-60"})]});return e.jsxs("div",{className:"bg-card border rounded-xl p-5",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"h-4 w-4 text-primary"}),e.jsxs("h3",{className:"text-sm font-semibold text-foreground",children:["Резултати по ресурси"," ",e.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["(",p.length,")"]})]})]}),e.jsxs("div",{className:"relative w-full sm:w-64",children:[e.jsx(ie,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx(Z,{value:j,onChange:s=>P(s.target.value),placeholder:"Търси ресурс...",className:"pl-8 h-8 text-xs"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3 sm:hidden",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground self-center mr-1",children:"Сортирай:"}),[["title","Име"],["quizAvg","📚 %"],["flashAvg","🎴 %"],["totalAttempts","Опити"]].map(([s,l])=>e.jsxs("button",{onClick:()=>U(s),className:`text-[10px] px-2 py-1 rounded border transition ${h===s?"bg-primary/10 border-primary/40 text-primary font-medium":"bg-muted border-transparent text-muted-foreground"}`,children:[l,h===s&&(k==="asc"?" ↑":" ↓")]},s))]}),e.jsxs("div",{className:"space-y-2 sm:hidden",children:[q?Array.from({length:Math.min(b.length||4,z)}).map((s,l)=>e.jsxs("div",{className:"border rounded-lg p-3 bg-background",children:[e.jsx(g,{className:"h-3 w-3/4 mb-1.5"}),e.jsx(g,{className:"h-2 w-1/2 mb-2"}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsx(g,{className:"h-12 rounded"}),e.jsx(g,{className:"h-12 rounded"}),e.jsx(g,{className:"h-12 rounded"})]})]},`sk-m-${l}`)):b.map(s=>e.jsxs("div",{className:"border rounded-lg p-3 bg-background",children:[e.jsx("div",{className:"text-xs font-medium text-foreground mb-0.5 break-words",title:s.title,children:s.title}),e.jsx("div",{className:"text-[10px] text-muted-foreground font-mono mb-2 break-all",children:s.baseId}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-[11px]",children:[e.jsxs("div",{className:"flex flex-col items-center gap-0.5 bg-muted/40 rounded p-1.5",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"📚 Тест"}),s.quizAttempts>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:`font-bold px-1.5 py-0.5 rounded text-[11px] ${H(s.quizAvg)}`,children:[s.quizAvg,"%"]}),e.jsxs("span",{className:"text-[9px] text-muted-foreground",children:[s.quizAttempts,"о · ",s.quizStudents,"уч"]})]}):e.jsx("span",{className:"text-muted-foreground text-xs",children:"—"})]}),e.jsxs("div",{className:"flex flex-col items-center gap-0.5 bg-muted/40 rounded p-1.5",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"🎴 Флаш"}),s.flashAttempts>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:`font-bold px-1.5 py-0.5 rounded text-[11px] ${H(s.flashAvg)}`,children:[s.flashAvg,"%"]}),e.jsxs("span",{className:"text-[9px] text-muted-foreground",children:[s.flashAttempts,"о · ",s.flashStudents,"уч"]})]}):e.jsx("span",{className:"text-muted-foreground text-xs",children:"—"})]}),e.jsxs("div",{className:"flex flex-col items-center gap-0.5 bg-muted/40 rounded p-1.5",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Общо"}),e.jsx("span",{className:"font-bold text-foreground text-sm",children:s.totalAttempts}),e.jsx("span",{className:"text-[9px] text-muted-foreground",children:"опита"})]})]})]},s.baseId)),!q&&b.length===0&&e.jsx("p",{className:"py-6 text-center text-xs text-muted-foreground italic",children:"Няма ресурси, отговарящи на търсенето."})]}),e.jsx("div",{className:"hidden sm:block overflow-x-auto -mx-5 px-5",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-muted-foreground border-b",children:[e.jsx("th",{className:"py-2 pr-3 font-medium",children:e.jsx(F,{k:"title",label:"Ресурс"})}),e.jsx("th",{className:"py-2 px-2 font-medium text-center",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["📚 ",e.jsx(F,{k:"quizAvg",label:"Тест"})]})}),e.jsx("th",{className:"py-2 px-2 font-medium text-center",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["🎴 ",e.jsx(F,{k:"flashAvg",label:"Флаш"})]})}),e.jsx("th",{className:"py-2 pl-2 font-medium text-right",children:e.jsx(F,{k:"totalAttempts",label:"Общо",className:"justify-end"})})]})}),e.jsxs("tbody",{children:[q?Array.from({length:Math.min(b.length||4,z)}).map((s,l)=>e.jsxs("tr",{className:"border-b last:border-0",children:[e.jsxs("td",{className:"py-2 pr-3",children:[e.jsx(g,{className:"h-3 w-3/4 mb-1"}),e.jsx(g,{className:"h-2 w-1/3"})]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(g,{className:"h-5 w-12 mx-auto"})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(g,{className:"h-5 w-12 mx-auto"})}),e.jsx("td",{className:"py-2 pl-2",children:e.jsx(g,{className:"h-4 w-8 ml-auto"})})]},`sk-d-${l}`)):b.map(s=>e.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/40 transition",children:[e.jsxs("td",{className:"py-2 pr-3",children:[e.jsx("div",{className:"text-foreground font-medium truncate max-w-[280px]",title:s.title,children:s.title}),e.jsx("div",{className:"text-[10px] text-muted-foreground font-mono",children:s.baseId})]}),e.jsx("td",{className:"py-2 px-2 text-center",children:s.quizAttempts>0?e.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[e.jsxs("span",{className:`font-bold px-1.5 py-0.5 rounded text-[11px] ${H(s.quizAvg)}`,children:[s.quizAvg,"%"]}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[s.quizAttempts," опит",s.quizAttempts===1?"":"а"," · ",s.quizStudents," уч."]})]}):e.jsx("span",{className:"text-muted-foreground",children:"—"})}),e.jsx("td",{className:"py-2 px-2 text-center",children:s.flashAttempts>0?e.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[e.jsxs("span",{className:`font-bold px-1.5 py-0.5 rounded text-[11px] ${H(s.flashAvg)}`,children:[s.flashAvg,"%"]}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[s.flashAttempts," опит",s.flashAttempts===1?"":"а"," · ",s.flashStudents," уч."]})]}):e.jsx("span",{className:"text-muted-foreground",children:"—"})}),e.jsx("td",{className:`py-2 pl-2 text-right font-semibold ${Ne()} text-foreground`,children:s.totalAttempts})]},s.baseId)),!q&&b.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"py-6 text-center text-muted-foreground italic",children:"Няма ресурси, отговарящи на търсенето."})})]})]})}),M.length>z&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-2 mt-4 pt-3 border-t",children:[e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Показани ",(u-1)*z+1,"–",Math.min(u*z,M.length)," от ",M.length]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(L,{variant:"outline",size:"sm",onClick:()=>$(s=>Math.max(1,s-1)),disabled:u===1,className:"h-7 px-2 text-xs","aria-label":"Предишна страница",children:e.jsx(oe,{className:"h-3.5 w-3.5"})}),e.jsxs("span",{className:"text-xs text-foreground font-medium px-2 min-w-[64px] text-center",children:[u," / ",
1N]}),e.jsx(L,{variant:"outline",size:"sm",onClick:()=>$(s=>Math.min(N,s+1)),disabled:u===N,className:"h-7 px-2 text-xs","aria-label":"Следваща страница",children:e.jsx(me,{className:"h-3.5 w-3.5"})})]})]})]})},Ie=()=>{de({title:"Учителско табло · STEM TEACHER LAB",description:"Управление на класове, ученици и техния прогрес.",noindex:!0});const{user:c,profile:C}=ae(),{toast:j}=ne(),{resources:P}=re(),[h,G]=i.useState([]),[k,B]=i.useState({}),[R,$]=i.useState([]),[p,M]=i.useState({}),[U,N]=i.useState(null),[u,b]=i.useState(""),[q,v]=i.useState(!1),[F,s]=i.useState(null),l=i.useMemo(()=>{const t={};return P.forEach(n=>{t[n.id]=n.title}),t},[P]),r=async()=>{if(c){v(!0);try{const[{data:t,error:n},{data:d}]=await Promise.all([A.from("classes").select("*").eq("teacher_id",c.id).order("created_at",{ascending:!1}),A.from("invite_codes").select("*").eq("created_by",c.id).eq("role","student").order("created_at",{ascending:!1})]);if(G(t??[]),$(d??[]),t&&t.length>0){const a={},o=[];for(const m of t)try{const{data:w}=await A.from("class_students").select("student_id").eq("class_id",m.id);if(w&&w.length>0){const x=w.map(E=>E.student_id);o.push(...x);const{data:_}=await A.from("profiles").select("id, full_name, email").in("id",x);a[m.id]=_??[]}else a[m.id]=[]}catch{a[m.id]=[]}if(B(a),o.length>0){const m=[...new Set(o)],{data:w}=await A.from("quiz_results").select("resource_id, score, total_questions, completed_at, user_id").in("user_id",m).order("completed_at",{ascending:!1}),x={};(w??[]).forEach(_=>{x[_.user_id]||(x[_.user_id]=[]),x[_.user_id].push(_)}),M(x)}}}catch(t){console.error("TeacherDashboard fetchData error:",t)}finally{v(!1)}}};i.useEffect(()=>{r()},[c==null?void 0:c.id]),i.useEffect(()=>{const t=A.channel("teacher-invite-codes").on("postgres_changes",{event:"*",schema:"public",table:"invite_codes"},()=>r()).subscribe();return()=>{A.removeChannel(t)}},[c==null?void 0:c.id]);const f=async t=>{if(t.preventDefault(),!u.trim()||!(C!=null&&C.school_id))return;v(!0);const{error:n}=await A.from("classes").insert({name:u.trim(),school_id:C.school_id,teacher_id:c.id});n?j({title:"Грешка",description:n.message,variant:"destructive"}):(j({title:"Клас създаден!"}),b(""),r()),v(!1)},y=async t=>{v(!0);try{const{data:n,error:d}=await A.functions.invoke("manage-invite-codes",{body:{action:"generate",target_role:"student",class_id:t}});d||n!=null&&n.error?j({title:"Грешка",description:(n==null?void 0:n.error)||(d==null?void 0:d.message),variant:"destructive"}):(j({title:"Код генериран!",description:`Код: ${n.code}`}),await r())}catch{j({title:"Грешка",variant:"destructive"})}v(!1)},S=t=>{navigator.clipboard.writeText(t),s(t),setTimeout(()=>s(null),2e3)},I="::flashcards",D=t=>t.endsWith(I),Y=t=>D(t)?t.slice(0,-I.length):t,T=t=>t.length===0?0:Math.round(t.reduce((n,d)=>n+d.score/d.total_questions*100,0)/t.length),ee=t=>{const n=p[t]??[];if(n.length===0)return null;const d=n.filter(o=>!D(o.resource_id)),a=n.filter(o=>D(o.resource_id));return{count:n.length,avg:T(n),quizCount:d.length,quizAvg:T(d),flashCount:a.length,flashAvg:T(a)}},se=t=>{const n=k[t]??[];if(n.length===0)return null;const d=n.flatMap(m=>p[m.id]??[]);if(d.length===0)return null;const a=d.filter(m=>!D(m.resource_id)),o=d.filter(m=>D(m.resource_id));return{totalTests:d.length,avg:T(d),quizCount:a.length,quizAvg:T(a),flashCount:o.length,flashAvg:T(o)}};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(le,{}),e.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-serif font-bold text-foreground",children:"Панел на учителя"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Управление на класове и ученици"})]}),e.jsx(te,{to:"/library",children:e.jsxs(L,{variant:"outline",children:[e.jsx(O,{className:"h-4 w-4 mr-2"}),"Библиотека"]})})]}),e.jsx("div",{className:"mb-6",children:e.jsx(ce,{highlightRole:"student",showCta:!1})}),e.jsxs("form",{onSubmit:f,className:"flex gap-3 mb-8",children:[e.jsx(Z,{value:u,onChange:t=>b(t.target.value),placeholder:"Име на новия клас (напр. 7а)",className:"flex-1"}),e.jsxs(L,{type:"submit",disabled:q||!u.trim(),children:[e.jsx(W,{className:"h-4 w-4 mr-2"}),"Създай клас"]})]}),e.jsx("div",{className:"mb-8",children:e.jsx(be,{results:Object.values(p).flat(),resourceMap:l})}),e.jsx("div",{className:"space-y-6",children:q&&h.length===0?e.jsx("div",{className:"flex justify-center py-8",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):h.length===0?e.jsx("p",{className:"text-muted-foreground",children:"Все още нямате създадени класове."}):h.map(t=>{const n=R.filter(a=>a.class_id===t.id),d=k[t.id]??[];return e.jsxs("div",{className:"bg-card border rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:t.name}),e.jsxs(L,{size:"sm",onClick:()=>y(t.id),disabled:q,children:[e.jsx(W,{className:"h-4 w-4 mr-1"}),"Код за ученик"]})]}),(()=>{const a=se(t.id);return a?e.jsxs("div",{className:"mb-4 grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-primary/5 rounded-lg px-3 py-2",children:[e.jsx(X,{className:"h-4 w-4 text-primary flex-shrink-0"}),e.jsxs("div",{className:"text-sm text-foreground",children:[e.jsx("span",{className:"font-medium",children:"📚 Тестове:"})," ",a.quizCount>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-bold",children:[a.quizAvg,"%"]})," ",e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",a.quizCount,")"]})]}):e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"няма"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-accent/10 rounded-lg px-3 py-2",children:[e.jsx(X,{className:"h-4 w-4 text-accent flex-shrink-0"}),e.jsxs("div",{className:"text-sm text-foreground",children:[e.jsx("span",{className:"font-medium",children:"🎴 Флаш карти:"})," ",a.flashCount>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-bold",children:[a.flashAvg,"%"]})," ",e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",a.flashCount,")"]})]}):e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"няма"})]})]})]}):null})(),n.length>0&&e.jsxs("div",{className:"mb-4 space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Кодове:"}),n.map(a=>e.jsxs("div",{className:"flex items-center gap-2 bg-muted rounded px-3 py-1.5",children:[e.jsx("code",{className:"font-mono text-xs font-bold flex-1",children:a.code}),a.used_by?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Използван"}):e.jsx(L,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:()=>S(a.code),children:F===a.code?e.jsx(ue,{className:"h-3 w-3 text-accent"}):e.jsx(he,{className:"h-3 w-3"})})]},a.id))]}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1",children:[e.jsx(fe,{className:"h-3 w-3"})," Ученици (",d.length,")"]}),d.length===0?e.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Няма записани ученици."}):e.jsx("div",{className:"space-y-2",children:d.map(a=>{const o=ee(a.id),m=U===a.id,w=p[a.id]??[];return e.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[e.jsxs("button",{onClick:()=>N(m?null:a.id),className:"w-full flex items-center justify-between px-3 py-2 hover:bg-muted/50 transition text-left",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:a.full_name||a.email}),e.jsxs("div",{className:"flex items-center gap-2",children:[o?e.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:["📚 ",o.quizCount>0?`${o.quizAvg}% (${o.quizCount})`:"—"]}),e.jsx("span",{className:"text-border",children:"·"}),e.jsxs("span",{className:"flex items-center gap-1",children:["🎴 ",o.flashCount>0?`${o.flashAvg}% (${o.flashCount})`:"—"]})]}):e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"Няма активност"}),w.length>0&&(m?e.jsx(pe,{className:"h-3.5 w-3.5 text-muted-foreground"}):e.jsx(ge,{className:"h-3.5 w-3.5 text-muted-foreground"}))]})]}),m&&w.length>0&&e.jsx("div",{className:"border-t bg-muted/30 px-3 py-2 space-y-1.5",children:w.map((x,_)=>{const E=Math.round(x.score/x.total_questions*100),K=D(x.resource_id),Q=Y(x.resource_id);return e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx("div",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${E>=80?"bg-emerald-500":E>=50?"bg-amber-500":"bg-red-400"}`}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded flex-shrink-0 ${K?"bg-accent/15 text-accent-foreground":"bg-primary/10 text-primary"}`,title:K?"Флаш карти":"Тест",children:K?"🎴":"📚"}),e.jsx("span",{className:"text-foreground truncate",children:l[Q]||Q})]}),e.jsxs("div",{className:"flex items-center gap-2 ml-2 flex-shrink-0",children:[e.jsxs("span",{className:"text-muted-foreground",children:[x.score,"/",x.total_questions]}),e.jsxs("span",{className:`font-bold px-1.5 py-0.5 rounded text-[10px] ${E>=80?"bg-emerald-100 text-emerald-700":E>=50?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700"}`,children:[E,"%"]}),e.jsx("span",{className:"text-muted-foreground text-[10px]",children:new Date(x.completed_at).toLocaleDateString("bg-BG")})]})]},_)})})]},a.id)})})]})]},t.id)})})]})]})};export{Ie 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.