1/*! For license information please see 3810.75fefcba.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[3810],{298(e,s,t){t.r(s),t.d(s,{AssignmentsPage:()=>S,default:()=>C});var a=t(5043),l=t(9970),i=t(8729),n=t(4980),c=t(1140),d=t(3390),r=t(5949),o=t(3416),m=t(5598),x=t(9766),u=t(4948),h=t(7819),v=t(2054),p=t(2024),j=t(5347),f=t(8646),b=t(5088),g=t(7104),N=t(1680),y=t(3002),w=t(4669),A=t(797),_=t(614),k=t(6328),D=t(579);const S=()=>{const{user:e}=(0,i.As)(),[s,t]=(0,a.useState)(!0),[S,C]=(0,a.useState)([]),[R,P]=(0,a.useState)([]),[B,E]=(0,a.useState)([]),[M,F]=(0,a.useState)({}),[L,I]=(0,a.useState)(null),[z,U]=(0,a.useState)(""),[Z,q]=(0,a.useState)([]),[W,Y]=(0,a.useState)(!1),[O,V]=(0,a.useState)(!1),[$,T]=(0,a.useState)(null),[G,H]=(0,a.useState)(null),X=async e=>{if(null!==e&&void 0!==e&&e.submission_id){T(e.submission_id);try{const s=await n.ER.downloadMySubmission(e.submission_id),t=new Blob([s.data]),a=window.URL.createObjectURL(t),l=document.createElement("a");l.href=a;let i=e.filename;if(!i){const s=e.attachments&&e.attachments[0];if("string"===typeof s&&s.includes("/")){const t=s.split("/").pop()||"",a=t.includes(".")?t.split(".").pop():"";i=a?"submission_".concat(e.submission_id,".").concat(a):"submission_".concat(e.submission_id,".bin")}else i="submission_".concat(e.submission_id,".bin")}l.download=i,document.body.appendChild(l),l.click(),window.URL.revokeObjectURL(a),document.body.removeChild(l),k.oR.success("File downloaded")}catch(a){var s,t;console.error("Download error:",a),k.oR.error((null===(s=a.response)||void 0===s||null===(t=s.data)||void 0===t?void 0:t.detail)||"Failed to download file")}finally{T(null)}}};(0,a.useEffect)(()=>{J()},[e.user_id]);const J=async()=>{try{const[s,t,a,l]=await Promise.all([n.yl.getUserEnrollments(e.user_id),n.d1.getAll(),n.an.getMy(),n.Xm.getAll()]);E(s.data),P(a.data);const i={};t.data.forEach(e=>{i[e.cohort_id]=e}),F(i),C(l.data)}catch(s){k.oR.error("Failed to load assignments")}finally{t(!1)}},K=e=>R.find(s=>s.assignment_id===e);if(s)return(0,D.jsx)(l.NI,{children:(0,D.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,D.jsxs)("div",{className:"animate-pulse flex flex-col items-center gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 bg-slate-200 rounded-xl"}),(0,D.jsx)("div",{className:"h-4 w-32 bg-slate-200 rounded"})]})})});const Q=S.filter(e=>!K(e.assignment_id)),ee=S.filter(e=>{const s=K(e.assignment_id);return s&&"submitted"===s.status}),se=S.filter(e=>{const s=K(e.assignment_id);return s&&["passed","failed","needs_revision"].includes(s.status)});return(0,D.jsx)(l.NI,{children:(0,D.jsxs)("div",{className:"space-y-8","data-testid":"assignments-page",children:[(0,D.jsxs)("div",{children:[(0,D.jsx)("h1",{className:"text-2xl font-bold text-[#0D1B2A] mb-2",children:"Assignments"}),(0,D.jsx)("p",{className:"text-slate-500",children:"Submit assignments and track your grades"})]}),(0,D.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,D.jsx)(c.Zp,{className:"border-slate-100",children:(0,D.jsx)(c.Wu,{className:"pt-6",children:(0,D.jsxs)("div",{className:"flex items-center gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 bg-amber-100 rounded-xl flex items-center justify-center",children:(0,D.jsx)(b.A,{className:"w-6 h-6 text-amber-600"})}),(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{className:"text-2xl font-bold text-[#0D1B2A]",children:Q.length}),(0,D.jsx)("p",{className:"text-sm text-slate-500",children:"Pending"})]})]})})}),(0,D.jsx)(c.Zp,{className:"border-slate-100",children:(0,D.jsx)(c.Wu,{className:"pt-6",children:(0,D.jsxs)("div",{className:"flex items-center gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 bg-sky-100 rounded-xl flex items-center justify-center",children:(0,D.jsx)(N.A,{className:"w-6 h-6 text-sky-600"})}),(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{className:"text-2xl font-bold text-[#0D1B2A]",children:ee.length}),(0,D.jsx)("p",{className:"text-sm text-slate-500",children:"Awaiting Review"})]})]})})}),(0,D.jsx)(c.Zp,{className:"border-slate-100",children:(0,D.jsx)(c.Wu,{className:"pt-6",children:(0,D.jsxs)("div",{className:"flex items-center gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 bg-emerald-100 rounded-xl flex items-center justify-center",children:(0,D.jsx)(v.A,{className:"w-6 h-6 text-emerald-600"})}),(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{className:"text-2xl font-bold text-[#0D1B2A]",children:se.length}),(0,D.jsx)("p",{className:"text-sm text-slate-500",children:"Graded"})]})]})})})]}),Q.length>0&&(0,D.jsxs)("div",{className:"space-y-4",children:[(0,D.jsxs)("h2",{className:"text-lg font-semibold text-[#0D1B2A] flex items-center gap-2",children:[(0,D.jsx)(h.A,{className:"w-5 h-5 text-amber-500"}),"Pending Submissions"]}),(0,D.jsx)("div",{className:"space-y-4",children:Q.map(e=>{const s=M[e.cohort_id],t=(e=>{const s=new Date,t=new Date(e),a=Math.ceil((t-s)/864e5);return a<0?{label:"Overdue",color:"text-red-600",bg:"bg-red-100"}:0===a?{label:"Due Today",color:"text-amber-600",bg:"bg-amber-100"}:a<=3?{label:"".concat(a," days left"),color:"text-amber-600",bg:"bg-amber-100"}:{label:"".concat(a," days left"),color:"text-slate-600",bg:"bg-slate-100"}})(e.due_date);return(0,D.jsx)(c.Zp,{className:"border-slate-100 hover:shadow-md transition-shadow",children:(0,D.jsx)(c.Wu,{className:"p-6",children:(0,D.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,D.jsxs)("div",{className:"flex items-start gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 bg-[#0D1B2A] rounded-xl flex items-center justify-center flex-shrink-0",children:(0,D.jsx)(N.A,{className:"w-6 h-6 text-[#41EAD4]"})}),(0,D.jsxs)("div",{children:[(0,D.jsx)("h3",{className:"font-semibold text-[#0D1B2A]",children:e.title}),(0,D.jsx)("p",{className:"text-sm text-slate-500 mb-2",children:null===s||void 0===s?void 0:s.name}),(0,D.jsx)("p",{className:"text-sm text-slate-600 line-clamp-2",children:e.description}),(0,D.jsxs)("div",{className:"flex items-center gap-4 mt-3",children:[(0,D.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm ".concat(t.color),children:[(0,D.jsx)(f.A,{className:"w-4 h-4"}),"Due ",(0,x.Yq)(e.due_date)]}),(0,D.jsx)(r.E,{className:"".concat(t.bg," ").concat(t.color),children:t.label}),(0,D.jsxs)("span",{className:"text-sm text-slate-500",children:["Max: ",e.max_score," pts"]})]})]})]}),(0,D.jsxs)(d.$,{onClick:()=>I(e),className:"bg-[#0D1B2A] hover:bg-[#1B3A4B] flex-shrink-0","data-testid":"submit-btn-".concat(e.assignment_id),children:[(0,D.jsx)(A.A,{className:"w-4 h-4 mr-2"}),"Submit"]})]})})},e.assignment_id)})})]}),ee.length>0&&(0,D.jsxs)("div",{className:"space-y-4",children:[(0,D.jsxs)("h2",{className:"text-lg font-semibold text-[#0D1B2A] flex items-center gap-2",children:[(0,D.jsx)(b.A,{className:"w-5 h-5 text-sky-500"}),"Awaiting Review"]}),(0,D.jsx)("div",{className:"space-y-4",children:ee.map(e=>{const s=K(e.assignment_id),t=M[e.cohort_id],a=(null===s||void 0===s?void 0:s.filename)||(null===s||void 0===s?void 0:s.file_path)||(null===s||void 0===s?void 0:s.file_id)||(null===s||void 0===s?void 0:s.attachments)&&s.attachments.length>0;return(0,D.jsx)(c.Zp,{className:"border-slate-100",children:(0,D.jsx)(c.Wu,{className:"p-6",children:(0,D.jsxs)("div",{className:"flex items-start gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 bg-sky-100 rounded-xl flex items-center justify-center flex-shrink-0",children:(0,D.jsx)(N.A,{className:"w-6 h-6 text-sky-600"})}),(0,D.jsxs)("div",{className:"flex-1",children:[(0,D.jsxs)("div",{className:"flex items-center justify-between",children:[(0,D.jsx)("h3",{className:"font-semibold text-[#0D1B2A]",children:e.title}),(0,D.jsx)(r.E,{className:"bg-sky-100 text-sky-700",children:"Pending Review"})]}),(0,D.jsx)("p",{className:"text-sm text-slate-500",children:null===t||void 0===t?void 0:t.name}),(0,D.jsxs)("p",{className:"text-sm text-slate-500 mt-2",children:["Submitted ",(0,x.r6)(null===s||void 0===s?void 0:s.submitted_at)]}),a&&(0,D.jsxs)("div",{className:"mt-3 p-3 bg-slate-50 rounded-lg flex items-center justify-between",children:[(0,D.jsxs)("div",{className:"flex items-center gap-2",children:[(0,D.jsx)(y.A,{className:"w-4 h-4 text-slate-500"}),(0,D.jsx)("span",{className:"text-sm text-slate-600 truncate max-w-[200px]",children:(null===s||void 0===s?void 0:s.filename)||"Submitted file"})]}),(0,D.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>X(s),disabled:$===(null===s||void 0===s?void 0:s.submission_id),"data-testid":"download-my-submission-".concat(null===s||void 0===s?void 0:s.submission_id),children:$===(null===s||void 0===s?void 0:s.submission_id)?(0,D.jsx)(p.A,{className:"w-4 h-4 animate-spin"}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g.A,{className:"w-4 h-4 mr-1"}),"Download"]})})]}),(0,D.jsxs)("div",{className:"mt-3",children:[(0,D.jsxs)("label",{className:"block",children:[(0,D.jsx)(d.$,{variant:"outline",size:"sm",className:"w-full border-sky-200 text-sky-700 hover:bg-sky-50",disabled:G===(null===s||void 0===s?void 0:s.submission_id),"data-testid":"amend-submission-".concat(null===s||void 0===s?void 0:s.submission_id),asChild:!0,children:(0,D.jsx)("span",{children:G===(null===s||void 0===s?void 0:s.submission_id)?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(p.A,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading\u2026"]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(A.A,{className:"w-4 h-4 mr-2"}),a?"Replace file":"Upload file"]})})}),(0,D.jsx)("input",{type:"file",className:"hidden",accept:".pdf,.doc,.docx,.zip,.txt,.jpg,.jpeg,.png",onCh
2ange:e=>{var t;const a=null===(t=e.target.files)||void 0===t?void 0:t[0];e.target.value="",a&&(async(e,s)=>{if(null!==e&&void 0!==e&&e.submission_id&&s){H(e.submission_id);try{await n.ER.resubmitAssignment(e.submission_id,s),k.oR.success("Submission amended. Your mentor will see the new file."),await J()}catch(l){var t,a;k.oR.error((null===(t=l.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.detail)||"Failed to amend submission")}finally{H(null)}}})(s,a)}})]}),(0,D.jsx)("p",{className:"text-xs text-slate-400 mt-1 text-center",children:"You can amend until a mentor grades this submission. Previous file is preserved."})]})]})]})})},e.assignment_id)})})]}),se.length>0&&(0,D.jsxs)("div",{className:"space-y-4",children:[(0,D.jsxs)("h2",{className:"text-lg font-semibold text-[#0D1B2A] flex items-center gap-2",children:[(0,D.jsx)(j.A,{className:"w-5 h-5 text-[#D4AF37]"}),"Graded Assignments"]}),(0,D.jsx)("div",{className:"space-y-4",children:se.map(e=>{var s;const t=K(e.assignment_id),a=M[e.cohort_id],l="passed"===(null===t||void 0===t?void 0:t.status),i=(null===t||void 0===t?void 0:t.filename)||(null===t||void 0===t?void 0:t.file_path)||(null===t||void 0===t?void 0:t.file_id)||(null===t||void 0===t?void 0:t.attachments)&&t.attachments.length>0;return(0,D.jsx)(c.Zp,{className:"border-slate-100",children:(0,D.jsx)(c.Wu,{className:"p-6",children:(0,D.jsxs)("div",{className:"flex items-start gap-4",children:[(0,D.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center flex-shrink-0 ".concat(l?"bg-emerald-100":"needs_revision"===(null===t||void 0===t?void 0:t.status)?"bg-amber-100":"bg-red-100"),children:l?(0,D.jsx)(j.A,{className:"w-6 h-6 text-emerald-600"}):(0,D.jsx)(N.A,{className:"w-6 h-6 ".concat("needs_revision"===(null===t||void 0===t?void 0:t.status)?"text-amber-600":"text-red-600")})}),(0,D.jsxs)("div",{className:"flex-1",children:[(0,D.jsxs)("div",{className:"flex items-center justify-between",children:[(0,D.jsx)("h3",{className:"font-semibold text-[#0D1B2A]",children:e.title}),(0,D.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,D.jsx)("span",{className:"elevate-gold-badge text-xs",children:"CERTIFIED"}),(0,D.jsx)(r.E,{className:(0,x.qY)(null===t||void 0===t?void 0:t.status),children:null===t||void 0===t||null===(s=t.status)||void 0===s?void 0:s.replace("_"," ")})]})]}),(0,D.jsx)("p",{className:"text-sm text-slate-500",children:null===a||void 0===a?void 0:a.name}),(0,D.jsxs)("div",{className:"mt-4 p-4 bg-slate-50 rounded-lg",children:[(0,D.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,D.jsx)("span",{className:"text-sm font-medium text-slate-600",children:"Score"}),(0,D.jsxs)("span",{className:"text-lg font-bold ".concat(l?"text-emerald-600":"text-red-600"),children:[null===t||void 0===t?void 0:t.score,"/",e.max_score]})]}),(null===t||void 0===t?void 0:t.feedback)&&(0,D.jsxs)("div",{className:"mt-3 pt-3 border-t border-slate-200",children:[(0,D.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-600 mb-2",children:[(0,D.jsx)(w.A,{className:"w-4 h-4"}),"Instructor Feedback"]}),(0,D.jsx)("p",{className:"text-sm text-slate-700",children:t.feedback})]}),i&&(0,D.jsxs)("div",{className:"mt-3 pt-3 border-t border-slate-200 flex items-center justify-between",children:[(0,D.jsxs)("div",{className:"flex items-center gap-2",children:[(0,D.jsx)(y.A,{className:"w-4 h-4 text-slate-500"}),(0,D.jsx)("span",{className:"text-sm text-slate-600 truncate max-w-[200px]",children:(null===t||void 0===t?void 0:t.filename)||"Your submission"})]}),(0,D.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>X(t),disabled:$===(null===t||void 0===t?void 0:t.submission_id),children:$===(null===t||void 0===t?void 0:t.submission_id)?(0,D.jsx)(p.A,{className:"w-4 h-4 animate-spin"}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g.A,{className:"w-4 h-4 mr-1"}),"Download"]})})]})]})]})]})})},e.assignment_id)})})]}),0===S.length&&(0,D.jsx)(c.Zp,{className:"border-slate-100",children:(0,D.jsxs)(c.Wu,{className:"py-12 text-center",children:[(0,D.jsx)(N.A,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),(0,D.jsx)("p",{className:"text-slate-500",children:"No assignments available yet."}),(0,D.jsx)("p",{className:"text-slate-400 text-sm mt-2",children:"Enroll in a course to see assignments."})]})}),(0,D.jsx)(m.lG,{open:!!L,onOpenChange:()=>I(null),children:(0,D.jsxs)(m.Cf,{className:"max-w-2xl max-h-[90vh] flex flex-col",children:[(0,D.jsxs)(m.c7,{className:"flex-shrink-0",children:[(0,D.jsx)(m.L3,{children:"Submit Assignment"}),(0,D.jsx)(m.rr,{children:null===L||void 0===L?void 0:L.title})]}),(0,D.jsxs)("div",{className:"flex-1 overflow-y-auto space-y-6 py-4 pr-2",children:[(0,D.jsxs)("div",{className:"p-4 bg-slate-50 rounded-lg",children:[(0,D.jsx)("h4",{className:"font-medium text-[#0D1B2A] mb-2",children:"Instructions"}),(0,D.jsx)("div",{className:"max-h-[150px] overflow-y-auto text-sm text-slate-600 pr-2",children:null===L||void 0===L?void 0:L.description}),(0,D.jsxs)("div",{className:"flex items-center gap-4 mt-3 text-sm text-slate-500 border-t pt-3",children:[(0,D.jsxs)("span",{children:["Due: ",(0,x.Yq)(null===L||void 0===L?void 0:L.due_date)]}),(0,D.jsxs)("span",{children:["Max Score: ",null===L||void 0===L?void 0:L.max_score]}),(0,D.jsxs)("span",{children:["Passing: ",null===L||void 0===L?void 0:L.passing_score]})]})]}),(0,D.jsxs)("div",{children:[(0,D.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Your Submission"}),(0,D.jsx)(o.T,{value:z,onChange:e=>U(e.target.value),placeholder:"Enter your submission content here...",className:"min-h-[120px] max-h-[200px]","data-testid":"submission-content"})]}),(0,D.jsxs)("div",{children:[(0,D.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Attachments"}),(0,D.jsx)(u.uN,{folder:"assignments",onUploadComplete:e=>{q(s=>[...s,{file_id:e.key,filename:e.name,url:e.public_url,size:e.size}]),k.oR.success("File uploaded successfully")},"data-testid":"file-upload-widget"}),Z.length>0&&(0,D.jsx)("div",{className:"mt-3 space-y-2 max-h-[100px] overflow-y-auto",children:Z.map(e=>(0,D.jsxs)("div",{className:"flex items-center justify-between p-2 bg-slate-50 rounded-lg",children:[(0,D.jsxs)("div",{className:"flex items-center gap-2",children:[(0,D.jsx)(y.A,{className:"w-4 h-4 text-slate-500"}),(0,D.jsx)("span",{className:"text-sm truncate max-w-[200px]",children:e.filename})]}),(0,D.jsx)("button",{onClick:()=>
2{return s=e.file_id,void q(e=>e.filter(e=>e.file_id!==s));var s},className:"text-slate-400 hover:text-red-500",children:(0,D.jsx)(_.A,{className:"w-4 h-4"})})]},e.file_id))})]})]}),(0,D.jsxs)(m.Es,{className:"flex-shrink-0 border-t pt-4",children:[(0,D.jsx)(d.$,{variant:"outline",onClick:()=>I(null),children:"Cancel"}),(0,D.jsxs)(d.$,{onClick:async()=>{if(z.trim()){Y(!0);try{await n.an.create({assignment_id:L.assignment_id,content:z,attachments:Z.map(e=>e.file_id)}),k.oR.success("Assignment submitted successfully!"),I(null),U(""),q([]),J()}catch(t){var e,s;k.oR.error((null===(e=t.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail)||"Failed to submit assignment")}finally{Y(!1)}}else k.oR.error("Please add your submission content")},disabled:W,className:"bg-[#0D1B2A] hover:bg-[#1B3A4B]","data-testid":"submit-assignment-btn",children:[W?(0,D.jsx)(p.A,{className:"w-4 h-4 mr-2 animate-spin"}):(0,D.jsx)(A.A,{className:"w-4 h-4 mr-2"}),"Submit Assignment"]})]})]})})]})})},C=S},2054(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},3002(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]])},5088(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},7819(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},7989(e,s,t){t.d(s,{C1:()=>C,bL:()=>S});var a=t(9379),l=t(3986),i=t(5043),n=t(579);const c=["scope","children"];function d(){for(var e=arguments.length,s=new Array(e),t=0;t<e;t++)s[t]=arguments[t];const l=s[0];if(1===s.length)return l;const n=()=>{const e=s.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(s){const t=e.reduce((e,t)=>{let{useScope:l,scopeName:i}=t;const n=l(s)["__scope".concat(i)];return(0,a.A)((0,a.A)({},e),n)},{});return i.useMemo(()=>({["__scope".concat(l.scopeName)]:t}),[t])}};return n.scopeName=l.scopeName,n}t(7950);var r=t(6851);const o=["asChild"];var m=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,s)=>{const t=(0,r.TL)("Primitive.".concat(s)),c=i.forwardRef((e,i)=>{const{asChild:c}=e,d=(0,l.A)(e,o),r=c?t:s;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,n.jsx)(r,(0,a.A)((0,a.A)({},d),{},{ref:i}))});return c.displayName="Primitive.".concat(s),(0,a.A)((0,a.A)({},e),{},{[s]:c})},{});const x=["__scopeProgress","value","max","getValueLabel"],u=["__scopeProgress"];var h="Progress",v=100,[p,j]=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=[];const r=()=>{const s=t.map(e=>i.createContext(e));return function(t){const l=(null===t||void 0===t?void 0:t[e])||s;return i.useMemo(()=>({["__scope".concat(e)]:(0,a.A)((0,a.A)({},t),{},{[e]:l})}),[t,l])}};return r.scopeName=e,[function(s,a){const d=i.createContext(a);d.displayName=s+"Context";const r=t.length;t=[...t,a];const o=s=>{var t;const{scope:a,children:o}=s,m=(0,l.A)(s,c),x=(null===a||void 0===a||null===(t=a[e])||void 0===t?void 0:t[r])||d,u=i.useMemo(()=>m,Object.values(m));return(0,n.jsx)(x.Provider,{value:u,children:o})};return o.displayName=s+"Provider",[o,function(t,l){var n;const c=(null===l||void 0===l||null===(n=l[e])||void 0===n?void 0:n[r])||d,o=i.useContext(c);if(o)return o;if(void 0!==a)return a;throw new Error("`".concat(t,"` must be used within `").concat(s,"`"))}]},d(r,...s)]}(h),[f,b]=p(h),g=i.forwardRef((e,s)=>{const{__scopeProgress:t,value:i=null,max:c,getValueLabel:d=w}=e,r=(0,l.A)(e,x);var o,u;!c&&0!==c||k(c)||console.error((o="".concat(c),u="Progress","Invalid prop `max` of value `".concat(o,"` supplied to `").concat(u,"`. Only numbers greater than 0 are valid max values. Defaulting to `").concat(v,"`.")));const h=k(c)?c:v;null===i||D(i,h)||console.error(function(e,s){return"Invalid prop `value` of value `".concat(e,"` supplied to `").concat(s,"`. The `value` prop must be:\n - a positive number\n - less than the value passed to `max` (or ").concat(v," if no `max` prop is set)\n - `null` or `undefined` if the progress is indeterminate.\n\nDefaulting to `null`.")}("".concat(i),"Progress"));const p=D(i,h)?i:null,j=_(p)?d(p,h):void 0;return(0,n.jsx)(f,{scope:t,value:p,max:h,children:(0,n.jsx)(m.div,(0,a.A)((0,a.A)({"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":_(p)?p:void 0,"aria-valuetext":j,role:"progressbar","data-state":A(p,h),"data-value":null!==p&&void 0!==p?p:void 0,"data-max":h},r),{},{ref:s}))})});g.displayName=h;var N="ProgressIndicator",y=i.forwardRef((e,s)=>{var t;const{__scopeProgress:i}=e,c=(0,l.A)(e,u),d=b(N,i);return(0,n.jsx)(m.div,(0,a.A)((0,a.A)({"data-state":A(d.value,d.max),"data-value":null!==(t=d.value)&&void 0!==t?t:void 0,"data-max":d.max},c),{},{ref:s}))});function w(e,s){return"".concat(Math.round(e/s*100),"%")}function A(e,s){return null==e?"indeterminate":e===s?"complete":"loading"}function _(e){return"number"===typeof e}function k(e){return _(e)&&!isNaN(e)&&e>0}function D(e,s){return _(e)&&!isNaN(e)&&e<=s&&e>=0}y.displayName=N;var S=g,C=y},9829(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]])},9855(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
2],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])}}]); 3//# sourceMappingURL=3810.75fefcba.chunk.js.map
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.