PageSourceSearch

https://tradeintelx.com/assets/CourseViewModal-C4OfH8LL.js

js tradeintelx.com collected 2026-10-02 01:48:33 UTC 10,302 bytes, 1 lines download raw bytes

1import{o as y}from"./rolldown-runtime-ChpBd9eV.js";import{An as k,Ka as V,Pa as _,Qt as c,St as $,Yn as b,ga as C,rn as g,rt as f,tt as F,yt as z}from"./chat-page-C-flp553.js";import{r as L}from"./education-page-Buqr-MLV.js";var R=y(V(),1),e=_(),w={beginner:{dot:"bg-emerald-400",text:"text-emerald-300",ring:"ring-emerald-500/30",bg:"bg-emerald-500/10"},foundational:{dot:"bg-emerald-400",text:"text-emerald-300",ring:"ring-emerald-500/30",bg:"bg-emerald-500/10"},intermediate:{dot:"bg-amber-400",text:"text-amber-300",ring:"ring-amber-500/30",bg:"bg-amber-500/10"},advanced:{dot:"bg-rose-400",text:"text-rose-300",ring:"ring-rose-500/30",bg:"bg-rose-500/10"}},I=({course:a,isOpen:d,onClose:i,onLessonStart:x,onDocumentOpen:m,user:E})=>{const{t:s}=C(),j=t=>{m&&m(t)};if((0,R.useEffect)(()=>{if(!d)return;const t=r=>{r.key==="Escape"&&i?.()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[d,i]),!d||!a)return null;const u=a.thumbnailUrl||a.coverImage,n=a.lessons||[],p=n.find(t=>t.videoUrl),h=(a.difficulty||"beginner").toLowerCase(),N=s(`courseView.difficulty.${h}`,{defaultValue:a.difficulty||s("courseView.difficulty.beginner")}),o=w[h]||w.beginner;return(0,e.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 sm:p-6 bg-black/80 backdrop-blur-md animate-[fadeIn_0.2s_ease-out]",onClick:i,children:(0,e.jsxs)("div",{className:"relative flex w-full max-w-5xl max-h-[92vh] flex-col overflow-hidden rounded-3xl border border-[#2a3348] bg-[#10141f] shadow-[0_24px_80px_-12px_rgba(0,0,0,0.8)]",onClick:t=>t.stopPropagation(),children:[(0,e.jsxs)("div",{className:"relative flex-shrink-0 overflow-hidden",children:[(0,e.jsxs)("div",{className:"relative h-52 sm:h-64 w-full",children:[u?(0,e.jsx)("img",{src:u,alt:a.title,className:"h-full w-full object-cover"}):(0,e.jsx)("div",{className:"h-full w-full bg-gradient-to-br from-[#1c2536] via-[#161c2a] to-[#10141f]"}),(0,e.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-[#10141f] via-[#10141f]/60 to-transparent"}),(0,e.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-[#10141f]/70 via-transparent to-transparent"}),(0,e.jsx)("button",{onClick:i,"aria-label":s("courseView.closeCourse"),className:"absolute right-4 top-4 flex h-10 w-10 items-center justify-center rounded-full border border-white/15 bg-black/40 text-white/80 backdrop-blur-md transition-all hover:bg-black/60 hover:text-white hover:scale-105",children:(0,e.jsx)(F,{className:"h-5 w-5"})}),p&&(0,e.jsxs)("button",{onClick:()=>x?.(p),"aria-label":s("courseView.playCourse"),className:"group absolute left-6 bottom-6 flex items-center gap-3",children:[(0,e.jsxs)("span",{className:"relative flex h-16 w-16 items-center justify-center",children:[(0,e.jsx)("span",{className:"absolute inset-0 rounded-full bg-blue-500/30 blur-xl transition-all group-hover:bg-blue-500/50"}),(0,e.jsx)("span",{className:"absolute inset-0 rounded-full bg-gradient-to-br from-blue-500 to-blue-600 shadow-lg shadow-blue-500/40 transition-transform group-hover:scale-105"}),(0,e.jsx)("span",{className:"absolute -inset-1 rounded-full border border-white/20 opacity-0 transition-all duration-500 group-hover:opacity-100 group-hover:animate-ping"}),(0,e.jsx)(b,{className:"relative z-10 h-7 w-7 text-white translate-x-0.5"})]}),(0,e.jsxs)("span",{className:"flex flex-col text-left",children:[(0,e.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-[0.18em] text-white/60",children:s("courseView.startWatching")}),(0,e.jsx)("span",{className:"text-[15px] font-semibold text-white",children:s("courseView.playFirstLesson")})]})]})]}),(0,e.jsxs)("div",{className:"px-6 pb-5 pt-4 sm:px-8",children:[(0,e.jsx)("h1",{className:"text-[26px] sm:text-[30px] font-bold leading-tight text-white tracking-tight",children:a.title}),a.description&&(0,e.jsx)("p",{className:"mt-2 max-w-3xl text-[14px] leading-relaxed text-slate-300/90",children:a.description}),(0,e.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2.5",children:[(0,e.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/[0.06] px-3 py-1 text-[12px] font-medium text-slate-200 ring-1 ring-white/10",children:[(0,e.jsx)(k,{className:"h-3.5 w-3.5 text-blue-400"}),s("courseView.lessonCount",{count:n.length})]}),(0,e.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/[0.06] px-3 py-1 text-[12px] font-medium text-slate-200 ring-1 ring-white/10",children:[(0,e.jsx)(g,{className:"h-3.5 w-3.5 text-blue-400"}),s("courseView.hourCount",{count:a.estimatedHours||1})]}),(0,e.jsxs)("span",{className:`inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[12px] font-semibold capitalize ring-1 ${o.bg} ${o.text} ${o.ring}`,children:[(0,e.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${o.dot}`}),N]})]})]})]}),(0,e.jsxs)("div",{className:"flex-1 overflow-y-auto border-t border-[#1e2738] px-6 py-6 sm:px-8",children:[(0,e.jsxs)("section",{className:"mb-8",children:[(0,e.jsxs)("h2",{className:"mb-4 flex items-center gap-2 text-[15px] font-bold uppercase tracking-[0.1em] text-white/80",children:[(0,e.jsx)($,{className:"h-4 w-4 text-blue-400"}),s("courseView.lessons")]}),n.length>0?(0,e.jsx)("div",{className:"space-y-2.5",children:n.map((t,r)=>{const l=!!t.videoUrl;return(0,e.jsxs)("button",{type:"button",onClick:()=>{l&&(L("lesson","Starting lesson video:",t),x(t))},disabled:!l,className:`group flex w-full items-center gap-4 roun
1ded-2xl border border-[#262f44] bg-[#161c2a] p-4 text-left transition-all ${l?"cursor-pointer hover:border-blue-500/50 hover:bg-[#1b2233]":"cursor-default opacity-80"}`,children:[(0,e.jsx)("span",{className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg bg-white/[0.05] text-[13px] font-bold text-slate-300 ring-1 ring-white/10",children:r+1}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h3",{className:"truncate text-[15px] font-semibold text-white transition-colors group-hover:text-blue-300",children:t.title}),t.description&&(0,e.jsx)("p",{className:"mt-0.5 line-clamp-1 text-[13px] text-slate-400",children:t.description}),(0,e.jsxs)("div",{className:"mt-1.5 flex items-center gap-3 text-[11px] text-slate-500",children:[t.duration&&(0,e.jsxs)("span",{className:"flex items-center gap-1",children:[(0,e.jsx)(g,{className:"h-3 w-3"}),t.duration]}),l&&(0,e.jsxs)("span",{className:"flex items-center gap-1 text-blue-400",children:[(0,e.jsx)(f,{className:"h-3 w-3"}),s("courseView.video")]}),t.attachments&&t.attachments.length>0&&(0,e.jsxs)("span",{className:"flex items-center gap-1",children:[(0,e.jsx)(c,{className:"h-3 w-3"}),s("courseView.fileCount",{count:t.attachments.length})]})]})]}),l?(0,e.jsxs)("span",{className:"relative flex h-11 w-11 flex-shrink-0 items-center justify-center",children:[(0,e.jsx)("span",{className:"absolute inset-0 rounded-full bg-blue-500/15 transition-all group-hover:bg-blue-500/30 group-hover:scale-110"}),(0,e.jsx)("span",{className:"absolute inset-0 rounded-full ring-1 ring-blue-500/30 transition-all group-hover:ring-blue-400/60"}),(0,e.jsx)(b,{className:"relative z-10 h-5 w-5 text-blue-400 translate-x-0.5 transition-colors group-hover:text-blue-300"})]}):(0,e.jsx)(c,{className:"h-6 w-6 flex-shrink-0 text-slate-600"})]},t.id||r)})}):(0,e.jsxs)("div",{className:"flex flex-col items-center rounded-2xl border border-[#262f44] bg-[#161c2a] py-12 text-center",children:[(0,e.jsx)(f,{className:"mb-3 h-12 w-12 text-slate-600"}),(0,e.jsx)("p",{className:"text-[14px] text-slate-400",children:s("courseView.noLessons")})]})]}),a.courseFiles&&a.courseFiles.length>0&&(0,e.jsxs)("section",{className:"mb-8",children:[(0,e.jsxs)("h2",{className:"mb-4 flex items-center gap-2 text-[15px] font-bold uppercase tracking-[0.1em] text-white/80",children:[(0,e.jsx)(c,{className:"h-4 w-4 text-cyan-400"}),s("courseView.materials")]}),(0,e.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:a.courseFiles.map((t,r)=>{const l=t.displayName||t.name||`Course Material ${r+1}`,v=t.type?.includes("pdf")||t.type?.includes("word")||t.type?.includes("document");return(0,e.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-[#262f44] bg-[#161c2a] p-4 transition-all hover:border-cyan-500/40",children:[(0,e.jsx)(c,{className:"h-8 w-8 flex-shrink-0 text-cyan-400"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("p",{className:"truncate text-[14px] font-medium text-white",children:l}),(0,e.jsxs)("p",{className:"text-[12px] text-slate-400",children:[t.type&&t.type.split("/")[1]?.toUpperCase()||s("courseView.document")," • ",t.size?`${Math.round(t.size/1024)}KB`:s("courseView.unknownSize")]})]}),(0,e.jsxs)("div",{className:"flex flex-shrink-0 gap-2",children:[v&&(0,e.jsx)("button",{onClick:()=>j(t),className:"rounded-lg bg-emerald-600 px-3 py-1.5 text-[13px] font-medium text-white transition-colors hover:bg-emerald-500",children:s("courseView.view")}),t.url&&(0,e.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"rounded-lg bg-blue-600 px-3 py-1.5 text-[13px] font-medium text-white transition-colors hover:bg-blue-500",children:s("courseView.download")})]})]},r)})})]}),a.quizzes&&a.quizzes.length>0&&(0,e.jsxs)("section",{className:"mb-2",children:[(0,e.jsxs)("h2",{className:"mb-4 flex items-center gap-2 text-[15px] font-bold uppercase tracking-[0.1em] text-white/80",children:[(0,e.jsx)(z,{className:"h-4 w-4 text-emerald-400"}),s("courseView.quizzes")]}),(0,e.jsx)("div",{className:"space-y-2.5",children:a.quizzes.map((t,r)=>(0,e.jsxs)("div",{className:"rounded-2xl border border-[#262f44] bg-[#161c2a] p-4 transition-all hover:border-emerald-500/40",children:[(0,e.jsx)("h3",{className:"mb-1 text-[15px] font-semibold text-white",children:t.title}),(0,e.jsx)("p",{className:"mb-3 text-[13px] text-slate-400",children:t.description}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-[12px] text-slate-500",children:s("courseView.questionCount",{count:t.questions?.length||0})}),(0,e.jsx)("button",{className:"rounded-lg bg-emerald-600 px-3 py-1.5 text-[13px] font-medium text-white transition-colors hover:bg-emerald-500",children:s("courseView.startQuiz")})]})]},t.id||r))})]})]})]})})};export{I 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.