1import{_ as V,a as T}from"./FiZF3q-Y.js";import{_ as C}from"./-2bwaYIy.js";import{_ as S}from"./Dt3zQnvQ.js";import{_ as $}from"./D_WnfevE.js";import{d as w,a as N,E as B,c as H,u as M,H as D,Q as E,o as n,i as l,k as t,r as F,v as I,m as a,s as q,p as k,q as p,x as f,j as m,y as d,R as g,F as z,L as R,t as i,T as U,z as W,A as G,_ as x,g as Q}from"./DxGGWIbl.js";import"./BJW03ctj.js";import"./CK2ExGwn.js";import"./DN80BDhH.js";const Y={class:"projects-view"},J={class:"project-tools"},K={class:"project-actions"},O={key:0,class:"live-status"},X={key:1,class:"project-grid"},Z={class:"thumbnail"},tt=["src"],et={key:1,class:"fas fa-film"},st={key:2},ot={class:"project-info"},at={key:0},nt={key:2,class:"empty-state"},rt={key:3,class:"error"},lt=w({__name:"ProjectList",setup(L){const o=N(),{auth:_}=B(),{requireAuth:y}=H(),u=M(),c=W(""),v=G(()=>{const r=c.value.trim().toLowerCase();return r?o.projects.filter(e=>`${e.filename} ${e.targetLanguage||""} ${e.status}`.toLowerCase().includes(r)):o.projects});D(()=>{const r=async()=>{await o.fetchProjects().catch(()=>{}),o.startHistoryPolling()};_.isAuthenticated()?r():y(r),document.addEventListener("visibilitychange",j)}),E(()=>{document.removeEventListener("visibilitychange",j),o.stopHistoryPolling()});async function j(){if(document.hidden){o.pauseHistoryPolling();return}await o.fetchProjects().catch(()=>{}),o.startHistoryPolling()}function P(r){return u(`/workspace/videos/${r.id}`)}function A(r){return r?new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"}).format(new Date(r)):""}return(r,e)=>{const h=S,b=$;return n(),l("div",Y,[t("div",J,[t("label",null,[e[1]||(e[1]=t("i",{class:"fas fa-magnifying-glass"},null,-1)),F(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>q(c)?c.value=s:null),type:"search",placeholder:"Search video projects"},null,512),[[I,a(c)]])]),t("div",K,[a(o).historyPollTimer?(n(),l("span",O,[t("i",{class:k(a(o).historyRefreshing?"fas fa-arrows-rotate fa-spin":"fas fa-circle")},null,2),e[2]||(e[2]=p(" Auto-refreshing",-1))])):f("",!0),m(h,{to:a(u)("/video-translator?new=1")},{default:d(()=>[...e[3]||(e[3]=[t("i",{class:"fas fa-plus"},null,-1),p(" New translation",-1)])]),_:1},8,["to"])])]),a(o).loading&&!a(o).projects.length?(n(),g(b,{key:0,title:"Loading video projects",message:"Getting your latest translationsâ¦",icon:"fas fa-film"})):a(v).length?(n(),l("div",X,[(n(!0),l(z,null,R(a(v),s=>(n(),g(h,{key:s.id,to:P(s),class:"project-card"},{default:d(()=>[t("div",Z,[s.thumbnail?(n(),l("img",{key:0,src:s.thumbnail,alt:""},null,8,tt)):(n(),l("i",et)),s.duration?(n(),l("span",st,i(Math.floor(s.duration/60))+":"+i(String(Math.floor(s.duration%60)).padStart(2,"0")),1)):f("",!0)]),t("div",ot,[t("strong",null,i(s.filename),1),t("p",null,[p(i(s.sourceLanguage||"Auto detect")+" ",1),e[4]||(e[4]=t("i",{class:"fas fa-arrow-right"},null,-1)),p(" "+i(s.targetLanguage||"â"),1)]),t("small",null,i(A(s.createdAt)),1)]),t("div",{class:k(["project-state",{complete:s.stage==="completed",partial:s.stage==="partial_completed",failed:s.stage==="failed"}])},[t("span",null,i(s.stage==="completed"?"Completed":s.stage==="partial_completed"?"Partially complete":s.stage==="failed"?"Failed":`${s.progress}%`),1),["completed","partial_completed","failed"].includes(s.stage)?f("",!0):(n(),l("div",at,[t("i",{style:U({width:`${s.progress}%`})},null,4)]))],2),e[5]||(e[5]=t("i",{class:"fas fa-chevron-right card-arrow"},null,-1))]),_:2},1032,["to"]))),128))])):(n(),l("div",nt,[e[7]||(e[7]=t("span",null,[t("i",{class:"fas fa-film"})],-1)),t("h2",null,i(a(c)?"No matching projects":"Your video projects will appear here"),1),t("p",null,i(a(c)?"Try a different search term.":"Upload a video to create your first translated version."),1),a(c)?f("",!0):(n(),g(h,{key:0,to:a(u)("/video-translator")},{default:d(()=>[...e[6]||(e[6]=[p("Translate a video",-1)])]),_:1},8,["to"]))])),a(o).error?(n(),l("p",rt,[e[8]||(e[8]=t("i",{class:"fas fa-circle-exclamation"},null,-1)),p(" "+i(a(o).error),1)])):f("",!0)])}}}),it=x(lt,[["__scopeId","data-v-33f06737"]]),ct=w({__name:"index",setup(L){return Q({title:"Video Projects | AI Video Translator",meta:[{name:"robots",content:"noindex, follow"}]}),(o,_)=>{const y=T,u=C,c=V;return n(),g(c,{class:"video-projects-page"},{sidebar:d(()=>[m(y,{"active-key":"video-translator","sign-in-return":"/workspace/vi
1deos"})]),title:d(()=>[..._[0]||(_[0]=[t("div",{class:"header-text"},[t("h1",{class:"header-name"},"Video projects"),t("p",{class:"header-desc"},"Monitor long-running translations and open completed results.")],-1)])]),default:d(()=>[m(u,{"max-width":"62rem"},{default:d(()=>[m(it)]),_:1})]),_:1})}}}),ht=x(ct,[["__scopeId","data-v-3f4ddc0f"]]);export{ht 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.