1import{_ as Ce}from"./f95wnIX0.js";import{u as Te,G as Re,r as u,Y as Me,d as N,e as je,v as Le,c as a,o as n,l as R,g as P,i as o,a as e,L as G,t as c,y as Be,p as Pe,F as Ue,m as De,j as Se,_ as Ee,n as Y}from"./BSJFzukh.js";import{_ as $e}from"./D4SRFmgF.js";import{u as Ie}from"./oRbayznc.js";import{u as Oe}from"./E4Ugchr-.js";import{u as We}from"./CfIwR8s8.js";import{s as Ve}from"./x_rD_Ya3.js";import{_ as ze}from"./DlAUqK2U.js";import"./CxmvfXQT.js";import"./DSh56-kG.js";const He={class:"pt-[20px]"},Ne={key:0,class:"upload-page"},Ge={class:"flex items-center justify-center bg-[#030414] px-4"},Ye={class:"w-full max-w-[1200px]"},qe={class:"rounded-3xl border border-[#393B42] bg-[#0A0A0A]/80 p-8"},Je={class:"mb-[20px] flex w-full flex-col items-start justify-start"},Ke={class:"flex w-full flex-row items-center justify-between gap-2"},Qe={class:"flex items-center gap-4"},Xe={class:"space-y-6"},Ze={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},et={class:"space-y-4 rounded-[16px] bg-[#19191f]"},tt={class:"p-[20px] text-lg font-medium text-white"},st={class:"mx-[20px] rounded-2xl border border-[#393B42] transition-all duration-200 hover:border-[#FF2478]"},ot={class:"flex flex-col items-center"},lt={class:"text-sm text-[#A5A5A5] transition-colors hover:text-white"},rt={key:1,class:"flex h-[148px] flex-col justify-between"},at={class:"flex items-center justify-between p-[16px]"},nt={class:"flex-1"},it={class:"font-medium text-white"},ct={class:"flex items-center gap-2"},ut={key:0,class:"h-4 w-4",fill:"white",viewBox:"0 0 24 24"},dt={key:1,class:"h-4 w-4",fill:"white",viewBox:"0 0 24 24"},vt={class:"p-[20px] pt-[0] text-xs text-[#A5A5A5]"},ft={class:"space-y-4 rounded-[16px] bg-[#19191f]"},mt={class:"p-[20px] text-lg font-medium text-white"},pt={class:"mx-[20px] rounded-2xl border border-[#393B42] transition-all duration-200 hover:border-[#FF2478]"},gt={class:"flex flex-col items-center"},ht={class:"text-sm text-[#A5A5A5] transition-colors hover:text-white"},xt={key:1,class:"flex h-[148px] flex-col justify-between"},_t={class:"flex items-center justify-between p-[16px]"},yt={class:"flex-1"},wt={class:"font-medium text-white"},bt={class:"flex items-center gap-2"},kt={key:0,class:"h-4 w-4",fill:"white",viewBox:"0 0 24 24"},At={key:1,class:"h-4 w-4",fill:"white",viewBox:"0 0 24 24"},Ft={class:"p-[20px] pt-[0] text-xs text-[#A5A5A5]"},Ct={key:1,class:"masteringResults-page"},Tt={class:"flex items-center justify-center px-4"},Rt={class:"h-[500px] w-full max-w-[1200px]"},Mt={class:"h-full rounded-3xl border border-[#393B42] p-8"},jt={class:"flex w-full flex-col items-start justify-start border-b border-[#393B42] pb-0"},Lt={class:"flex w-full flex-row items-center justify-between gap-2"},Bt={class:"text-xl font-semibold text-white"},Pt={class:"mt-[24px] mb-[-1px] w-[50px] border-b-[2px] border-[#FF2478] pb-1 text-[14px] text-[#FF2478]"},Ut={class:"space-y-6"},Dt={class:"space-y-4"},St={key:0,class:"py-12 text-center"},Et={class:"text-[#A5A5A5]"},$t={key:1,class:"py-[20px] text-center"},It={class:"mx-auto flex h-24 w-24 items-center justify-center"},Ot={class:"mb-10 text-[#A5A5A5]"},Wt={key:2,class:"mt-[20px] h-[340px] space-y-3 overflow-y-auto"},Vt={key:0,class:"flex w-full items-center"},zt={class:"flex-1"},Ht={class:"font-medium text-white"},Nt={class:"text-sm text-[#A5A5A5]"},Gt={class:"flex justify-center"},Yt={class:"relative h-12 w-12"},qt={class:"absolute inset-1 flex items-center justify-center rounded-full bg-[#1A1A1A]"},Jt={class:"text-sm font-bold text-white"},Kt=["onClick"],Qt={class:"font-medium text-white"},Xt={class:"text-sm text-[#A5A5A5]"},Zt={class:"flex items-center gap-2"},es=["onClick"],ts={key:2,class:"detail-page"},ss={class:"flexitems-center justify-center bg-[#030414] px-4"},os={class:"w-full max-w-[1200px]"},ls={class:"rounded-3xl border border-[#393B42] bg-[#0A0A0A]/80 p-8"},rs={class:"mb-[20px] flex w-full flex-col items-start justify-start"},as={class:"flex w-full flex-row items-center justify-between gap-2"},ns={class:"flex items-center gap-4"},is={class:"space-y-8"},cs={class:"rounded-[16px] bg-[#19191f]"},us={class:"flex items-center justify-between p-[16px]"},ds={class:"text-lg font-medium text-white"},vs={class:"flex items-center gap-2"},fs={key:0,class:"h-[24px] w-[24px]",fill:"currentColor",viewBox:"0 0 24 24"},ms={key:1,class:"h-[24px] w-[24px]",fill:"currentColor",viewBox:"0 0 24 24"},ps={class:"rounded-b-2xl border border-[#393B42] bg-[#26262d] px-[20px] py-[8px]"},gs={key:0,class:"absolute inset-0 flex items-center justify-center bg-[#26262d]"},hs={class:"rounded-[16px] bg-[#19191f]"},xs={class:"flex items-center justify-between p-[16px]"},_s={class:"text-lg font-medium text-white"},ys={class:"flex items-center gap-2"},ws={key:0,class:"h-[24px] w-[24px]",fill:"currentColor",viewBox:"0 0 24 24"},bs={key:1,class:"h-[24px] w-[24px]",fill:"currentColor",viewBox:"0 0 24 24"},ks={class:"rounded-b-2xl border border-[#393B42] bg-[#26262d] px-[20px] py-[8px]"},As={key:0,class:"absolute inset-0 flex items-center justify-center bg-[#26262d]"},Fs={__name:"ToolsBpmMastering",setup(Cs){const{t:r}=Te(),_=Ie("music-mastering"),{error:F,success:q}=Oe(),{promoteUserConversion:oe}=Re(),m=u({model:"music-mastering",targetFile:null,referenceFile:null});Me(()=>{_.setCurrentModel(m.value.model)});const{instance:U,utils:D}=We(),le=u(0),J=u(null),g=u(2),h=u(null),p=u(null),x=u(null),v=u(null),f=u(null),y=u(null),w=u(null),M=u({isPlaying:!1,
1currentTime:0}),L=u({isPlaying:!1,currentTime:0}),S=u(!1),E=u(!1),re=async()=>{if(y.value){console.log("ç¹å»æé®ï¼å½å isPlaying:",M.value.isPlaying);try{M.value.isPlaying?(console.log("è°ç¨ pause"),y.value.pause()):(console.log("è°ç¨ play"),await y.value.play())}catch(s){console.error("ææ¾/æåæä½å¤±è´¥:",s)}}},ae=async()=>{if(w.value)try{L.value.isPlaying?w.value.pause():await w.value.play()}catch(s){console.error("æ¯å¸¦é³é¢ææ¾/æåæä½å¤±è´¥:",s)}},K=async(s,t)=>{if(s)try{if(s.startsWith("http")){const l=await fetch(s);if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const i=await l.blob(),B=URL.createObjectURL(i),T=document.createElement("a");T.href=B,T.download=t,document.body.appendChild(T),T.click(),document.body.removeChild(T),setTimeout(()=>URL.revokeObjectURL(B),100)}else{const l=document.createElement("a");l.href=s,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l)}}catch(l){console.error("ä¸è½½å¤±è´¥:",l);const i=document.createElement("a");i.href=s,i.download=t,i.target="_blank",document.body.appendChild(i),i.click(),document.body.removeChild(i)}},ne=async()=>{h.value?.input_meta?.attachments?.[0]&&await K(h.value.input_meta.attachments[0],`original-${h.value.task_id}.wav`)},ie=async()=>{h.value?.output_meta?.url&&await K(h.value.output_meta.url,`mastered-${h.value.task_id}.wav`)},j=u(null),$=u(null),I=u(null),O=u(null),W=u(null),V=u(null),Q=u(!0);u(!1);const ce=s=>{const t=s.target.files[0];if(t&&X(t)){const l=URL.createObjectURL(t);p.value={file:t,name:t.name,url:l},m.value.targetFile=t,de(l,t.name)}},ue=s=>{const t=s.target.files[0];if(t&&X(t)){const l=URL.createObjectURL(t);x.value={file:t,name:t.name,url:l},m.value.referenceFile=t,ve(l,t.name)}},X=s=>["audio/mp3","audio/wav","audio/ogg","audio/m4a","audio/aac","audio/flac","audio/x-ms-wma"].includes(s.type)||s.name.match(/\.(mp3|wav|ogg|m4a|aac|flac|wma)$/i),de=async(s,t)=>{if(await Y(),!I.value||!s)return;v.value&&v.value.destroy();const l=D.urlToTrack(s,t);try{v.value=U.create({tracks:[l],containers:[I.value],height:80,waveColors:["#818181"],progressColors:"#FF2478",cursorColors:"#FF2478",onReady:i=>{console.log("Target waveform ready:",i.duration.value),console.log("Target instance:",i)},onPlay:()=>{console.log("Target started playing"),k.value=!0},onPause:()=>{console.log("Target paused"),k.value=!1},onError:i=>{console.error("Target waveform error:",i)}})}catch(i){console.error("Failed to create target waveform:",i)}},ve=async(s,t)=>{if(await Y(),!O.value||!s)return;f.value&&f.value.destroy();const l=D.urlToTrack(s,t);try{f.value=U.create({tracks:[l],containers:[O.value],height:80,waveColors:["#818181"],progressColors:"#FF2478",cursorColors:"#FF2478",onReady:i=>{console.log("Reference waveform ready:",i.duration.value),console.log("Reference instance:",i)},onPlay:()=>{console.log("Reference started playing"),A.value=!0},onPause:()=>{console.log("Reference paused"),A.value=!1},onError:i=>{console.error("Reference waveform error:",i)}})}catch(i){console.error("Failed to create reference waveform:",i)}},fe=async()=>{if(!m.value.targetFile)return F(r("mastering.errors.noTargetFile")),!1;if(_.currentTool.subscriberOnly&&await oe())return!1;const s=[];m.value.targetFile&&s.push(URL.createObjectURL(m.value.targetFile)),m.value.referenceFile&&s.push(URL.createObjectURL(m.value.referenceFile));const t={hasReference:!!m.value.referenceFile,name:m.value.targetFile.name};return await _.submitTask({params:t,inputData:s}),!0},me=async()=>{if(!p.value){F(r("mastering.errors.noTargetMusic"));return}le.value=0,J.value=null;try{if(await fe()){g.value=2,ee(),q(r("mastering.success.taskSubmitted")),await _.fetchRecords({page:1}),await new Promise(l=>setTimeout(l,500));const t=C.value.find(l=>!l.complete_at);if(t)console.log("å¯å¨è¿åº¦è®¡æ¶å¨ï¼ä»»å¡ID:",t.task_id),H(t.task_id);else{console.warn("æªæ¾å°è¿è¡ä¸çä»»å¡ï¼playlisté¿åº¦:",C.value.length),await _.fetchRecords({page:1});const l=C.value.find(i=>!i.complete_at);l&&(console.log("éè¯åæ¾å°ä»»å¡ï¼å¯å¨è¿åº¦è®¡æ¶å¨ï¼ä»»å¡ID:",l.task_id),H(l.task_id))}}else g.value=1}catch(s){console.error("Mastering failed:",s),J.value=s.message,F(s.message||r("mastering.errors.submissionFailed")),g.value=1}},C=N(()=>{const s=_.playlist;return console.log("playlist computed, é¿åº¦:",s.length,"æ°æ®:",s),s}),pe=async()=>{await _.fetchRecords({page:1}),C.value.filter(t=>!t.complete_at).forEach(t=>{H(t.task_id)})};je(async()=>{await pe(),Q.value=!1});const Z=s=>{s==="target"?(p.value?.url&&URL.revokeObjectURL(p.value.url),v.value&&(v.value.destroy(),v.value=null),k.value=!1,p.value=null):s==="reference"&&(x.value?.url&&URL.revokeObjectURL(x.value.url),f.value&&(f.value.destroy(),f.value=null),A.value=!1,x.value=null)},ee=()=>{p.value?.url&&URL.revokeObjectURL(p.value.url),v.value&&(v.value.destroy(),v.value=null),k.value=!1,p.value=null,x.value?.url&&URL.revokeObjectURL(x.value.url),f.value&&(f.value.destroy(),f.value=null),A.value=!1,x.value=null,m.value.targetFile=null,m.value.referenceFile=null},te=s=>{const t=s==="target"?"target-upload":"reference-upload",l=document.getElementById(t);l&&l.click()},k=u(!1),A=u(!1),ge=N(()=>k.value),he=N(()=>A.value),xe=()=>{if(!v.value){console.log("Target audio instance not available");return}k.value?(v.value.pause(),k.value=!1):(v.value.play(),k.value=!0)},_e=()=>{if(!f.value){console.log("Reference audio instance not available");return}A.value?(f.value.pause(),A.value=!1):(f.value.play(),A.value=!0)},b=u({}),z=s=>b.value[s]||0,H=s=>{if(b.value[s]!==void 0)return;console.log("å¼å§è¿åº¦è®¡æ¶å¨ï¼ä»»å¡ID:",s),b.value[s]=0;const t=Ve(()=>{if(b.value[s]>=100){console.log("è¿åº¦è¾¾å°100%ï¼åæ¢è®¡æ¶å¨ï¼ä»»å¡ID:",s),clearInterval(t);return}if(C.value.find(i=>i.task_id===s)?.complete_at){console.log("ä»»å¡å·²å®æï¼åæ¢è®¡æ¶å¨ï¼ä»»å¡ID:",s),b.value[s]=100,clearInterval(t);return}b.value[s]=Math.min(b.value[s]+1,99),console.log("æ´æ°è¿åº¦ï¼ä»»å¡ID:",s,"è¿åº¦:",b.value[s])},1e3)},se=s=>{const t=new Date(s);return t.toLocaleDateString()+" "+t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},ye=s=>{j.value=s,$.value?.openModal()},we=async()=>
1{if(!j.value)return!1;try{return await _.deleteRecord({task_id:j.value.task_id})?(b.value[j.value.task_id]=void 0,j.value=null,q(r("mastering.success.recordDeleted")),$.value&&$.value.closeModal(),!0):(F(r("mastering.errors.deleteFailed")),!1)}catch(s){return console.error("Failed to delete record:",s),s.statusCode===404?F(r("mastering.errors.recordNotFound")):s.statusCode===400?F(r("mastering.errors.invalidRecordId")):F(r("mastering.errors.deleteGenericFailed")),!1}finally{j.value=null}},be=s=>{h.value=s,g.value=3,Y(()=>{ke(s)})},ke=async s=>{if(y.value&&y.value.destroy(),w.value&&w.value.destroy(),s.input_meta?.attachments?.[0]){S.value=!0;const t=D.urlToTrack(s.input_meta.attachments[0],r("mastering.audio.originalAudio"));W.value&&(y.value=U.create({tracks:[t],containers:[W.value],height:80,waveColors:["#818181"],progressColors:"#FF2478",cursorColors:"#FF2478",onReady:()=>{S.value=!1},onPlay:()=>{M.value.isPlaying=!0},onPause:()=>{M.value.isPlaying=!1},onSeek:l=>{M.value.currentTime=l},onError:l=>{console.error("Original waveform error:",l),S.value=!1}}))}if(s.output_meta?.url){E.value=!0;const t=D.urlToTrack(s.output_meta.url,r("mastering.audio.masteredAudio"));V.value&&(w.value=U.create({tracks:[t],containers:[V.value],height:80,waveColors:["#818181"],progressColors:"#FF2478",cursorColors:"#FF2478",onReady:()=>{console.log("Mastered audio loaded"),E.value=!1},onPlay:()=>{L.value.isPlaying=!0},onPause:()=>{L.value.isPlaying=!1},onSeek:l=>{L.value.currentTime=l},onError:l=>{console.error("Mastered waveform error:",l),E.value=!1}}))}},Ae=()=>{const s=document.getElementById("mastering-example");s&&s.scrollIntoView({behavior:"smooth",block:"start"})};return Le(()=>{p.value?.url&&URL.revokeObjectURL(p.value.url),x.value?.url&&URL.revokeObjectURL(x.value.url),v.value&&v.value.destroy(),f.value&&f.value.destroy(),y.value&&y.value.destroy(),w.value&&w.value.destroy()}),(s,t)=>{const l=Ce,i=Be,B=Ee,T=$e;return n(),a("div",He,[o(g)===1?(n(),a("div",Ne,[e("div",Ge,[e("div",Ye,[e("div",qe,[e("div",Je,[e("div",Ke,[e("div",Qe,[e("button",{class:"flex items-center gap-2 text-[#A5A5A5] transition-colors hover:text-white",onClick:t[0]||(t[0]=()=>{ee(),g.value=2})},[t[8]||(t[8]=e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)),G(" "+c(o(r)("mastering.common.return")),1)])])])]),e("div",Xe,[e("div",Ze,[e("div",et,[e("h3",tt,c(o(r)("mastering.upload.targetMusic")),1),e("div",st,[e("input",{id:"target-upload",type:"file",accept:"audio/*",class:"hidden",onChange:ce},null,32),o(p)?(n(),a("div",rt,[e("div",at,[e("div",nt,[e("div",it,c(o(p).name),1)]),e("div",ct,[e("button",{class:"transition-colors hover:opacity-80",onClick:xe},[o(ge)?(n(),a("svg",dt,t[11]||(t[11]=[e("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"},null,-1)]))):(n(),a("svg",ut,t[10]||(t[10]=[e("path",{d:"M8 5v14l11-7z"},null,-1)])))]),e("button",{class:"px-2 text-[#A5A5A5] transition-colors hover:text-red-400",onClick:t[2]||(t[2]=d=>Z("target"))},t[12]||(t[12]=[e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))])]),e("div",{ref_key:"targetWaveformRef",ref:I,class:"h-[100px] overflow-hidden rounded-2xl bg-[#26262d] px-[15px] py-[10px]"},null,512)])):(n(),a("div",{key:0,class:"flex h-[148px] cursor-pointer items-center justify-center text-center transition-colors",onClick:t[1]||(t[1]=d=>te("target"))},[e("div",ot,[t[9]||(t[9]=e("svg",{class:"mb-2 h-8 w-8 text-[#A5A5A5]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})],-1)),e("span",lt,c(o(r)("mastering.upload.clickToUpload")),1)])]))]),e("div",vt,c(o(r)("mastering.upload.supportedFormats")),1)]),e("div",ft,[e("h3",mt,c(o(r)("mastering.upload.referenceMusic")),1),e("div",pt,[e("input",{id:"reference-upload",type:"file",accept:"audio/*",class:"hidden",onChange:ue},null,32),o(x)?(n(),a("div",xt,[e("div",_t,[e("div",yt,[e("div",wt,c(o(x).name),1)]),e("div",bt,[e("button",{class:"transition-colors hover:opacity-80",onClick:_e},[o(he)?(n(),a("svg",At,t[15]||(t[15]=[e("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"},null,-1)]))):(n(),a("svg",kt,t[14]||(t[14]=[e("path",{d:"M8 5v14l11-7z"},null,-1)])))]),e("button",{class:"px-2 text-[#A5A5A5] transition-colors hover:text-red-400",onClick:t[4]||(t[4]=d=>Z("reference"))},t[16]||(t[16]=[e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))])]),e("div",{ref_key:"referenceWaveformRef",ref:O,class:"h-[100px] overflow-hidden rounded-2xl bg-[#26262d] px-[15px] py-[10px]"}
1,null,512)])):(n(),a("div",{key:0,class:"flex h-[148px] cursor-pointer items-center justify-center text-center transition-colors",onClick:t[3]||(t[3]=d=>te("reference"))},[e("div",gt,[t[13]||(t[13]=e("svg",{class:"mb-2 h-8 w-8 text-[#A5A5A5]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})],-1)),e("span",ht,c(o(r)("mastering.upload.clickToUpload")),1)])]))]),e("div",Ft,c(o(r)("mastering.upload.supportedFormats")),1)])]),P(l,{class:"!relative mx-auto mt-[36px] w-[300px] !bg-none !py-0",label:s.$t("mastering.upload.masterButton"),"button-text":s.$t("mastering.upload.masterButton"),loading:o(_).isProcessing,credits:o(_).currentTool?.credits,onSubmit:me},null,8,["label","button-text","loading","credits"])])])])])])):o(g)===2?(n(),a("div",Ct,[e("div",Tt,[e("div",Rt,[e("div",Mt,[e("div",jt,[e("div",Lt,[e("h2",Bt,c(o(r)("mastering.results.heading")),1),e("button",{class:"rounded-lg bg-[#FF2478] px-6 py-3 font-medium text-white transition-colors hover:bg-[#E61E6B]",onClick:t[5]||(t[5]=d=>g.value=1)},c(o(r)("mastering.results.uploadMusic")),1)]),e("div",Pt,c(o(r)("mastering.results.project")),1)]),e("div",Ut,[e("div",Dt,[o(Q)?(n(),a("div",St,[t[17]||(t[17]=e("div",{class:"mb-6"},[e("div",{class:"mx-auto h-12 w-12 animate-spin rounded-full border-4 border-[#393B42] border-t-[#FF2478]"})],-1)),e("p",Et,c(o(r)("mastering.results.loading")),1)])):o(C).length===0?(n(),a("div",$t,[e("button",{class:"mb-8 inline-flex w-full items-center justify-center gap-2 rounded-lg bg-[#1A1A1A] px-8 py-4 text-white transition-colors hover:bg-[#2A2A2A]",onClick:t[6]||(t[6]=d=>g.value=1)},[t[18]||(t[18]=e("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})],-1)),G(" "+c(o(r)("mastering.results.uploadMusic")),1)]),e("div",null,[e("div",It,[P(i,{src:"/images/components/music/musicDancer.png",alt:"Music Dancer",width:"96",height:"96",class:"h-24 w-24"})])]),e("p",Ot,c(o(r)("mastering.results.emptyState")),1),e("a",{href:"#mastering-example",class:"inline-block rounded-lg bg-[#FF2478] px-6 py-3 font-medium text-white transition-colors hover:bg-[#E61E6B]",onClick:Pe(Ae,["prevent"])},c(o(r)("mastering.results.showExample")),1)])):(n(),a("div",Wt,[(n(!0),a(Ue,null,De(o(C),d=>(n(),a("div",{key:d.task_id,class:"flex items-center justify-between rounded-lg bg-[#1A1A1A] p-4 hover:bg-[#2A2A2A]"},[d.complete_at?(n(),a("div",{key:1,class:"-m-2 flex flex-1 cursor-pointer items-center justify-between rounded-lg p-2 transition-colors",onClick:Fe=>be(d)},[e("div",null,[e("div",Qt,c(d.input_meta?.params?.name||d.title||o(r)("mastering.results.masteredAudio")),1),e("div",Xt,c(o(r)("mastering.results.created"))+" "+c(se(d.created_at)),1)])],8,Kt)):(n(),a("div",Vt,[e("div",zt,[e("div",Ht,c(o(r)("mastering.results.processingMusic")),1),e("div",Nt,c(o(r)("mastering.results.started"))+" "+c(se(d.created_at)),1)]),e("div",Gt,[e("div",Yt,[t[19]||(t[19]=e("div",{class:"absolute inset-0 rounded-full border-2 border-[#393B42]"},null,-1)),e("div",{class:"absolute inset-0 rounded-full border-2 border-[#FF2478] transition-all duration-300",style:Se({background:`conic-gradient(#FF2478 ${z(d.task_id)*3.6}deg, transparent ${z(d.task_id)*3.6}deg)`})},null,4),e("div",qt,[e("span",Jt,c(Math.round(z(d.task_id)))+"% ",1)])])]),t[20]||(t[20]=e("div",{class:"flex-1"},null,-1))])),e("div",Zt,[e("button",{class:"p-2 text-[#A5A5A5] transition-colors hover:text-red-400",onClick:Fe=>ye(d)},t[21]||(t[21]=[e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,es)])]))),128))]))])])])])])])):o(g)===3?(n(),a("div",ts,[e("div",ss,[e("div",os,[e("div",ls,[e("div",rs,[e("div",as,[e("div",ns,[e("button",{class:"flex items-center gap-2 text-[#A5A5A5] transition-colors hover:text-white",onClick:t[7]||(t[7]=d=>g.value=2)},[t[22]||(t[22]=e("svg",{class:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)),G(" "+c(o(r)("mastering.common.return")),1)])])])]),e("div",is,[e("div",cs,[e("div",us,[e("h3",ds,c(o(h).input_meta.params.name)+c(o(r)("mastering.detail.originalLabel")),1),e("div",vs,[o(y)?(n(),a("button",{key:0,class:"text-base-content/70 p-2 transition-colors hover:text-white",onClick:re},[o(M).isPlaying?(n(),a("svg",ms,t[24]||(t[24]=[e("rect",{x:"6",y:"5",width:"4",height:"14"},null,-1),e("rect",{x:"14",y:"5",width:"4",height:"14"},null,-1)]))):(n(),a("svg",fs,t[23]||(t[23]=[e("path",{d:"M8 5v14l11-7z"},null,-1)])))])):R("",!0),o(h)?.input_meta?.attachments?.[0]?(n(),a("button",{key:1,class:"p-2 text-[#A5A5A5] transition-colors hover:text-white",onClick:ne},[P(B,{name:"lucide:download",size:"24"})])):R("",!0)])]),e("div",ps,[e("div",{ref_key:"originalWaveformRef",ref:W,class:"relative h-20 overflow-hidden rounded-lg"},[o(S)?(n(),a("div",gs,t[25]||(t[25]=[e("div",{class:"h-6 w-6 animate-spin rounded-full border-2 border-[#FF2478]/30 border-t-[#FF2478]"},null,-1)]))):R("",!0)],512)])]),e("div",hs,[e("div",xs,[e("h3",_s,c(o(h).output_meta.name)+c(o(r)("mastering.detail.masteredLabel")),1),e("div",ys,[o(w)?(n(),a("button",{key:0,class:"text-base-content/70 p-2 transition-colors hover:text-white",onClick:ae},[o(L).isPlaying?(n(),a("svg",bs,t[27]||(t[27]=[e("rect",{x:"6",y:"5",width:"4",height:"14"},null,-1),e("rect",{x:"14",y:"5",width:"4",height:"14"},null,-1)]))):(n(),a("svg",ws,t[26]||(t[26]=[e("path",{d:"M8 5v14l11-7z"},null,-1)])))])):R("",!0),o(h)?.output_meta?.url?(n(),a("button",{key:1,class:"p-2 text-[#A5A5A5] transition-colors hover:text-white",onClick:ie},[P(B,{name:"lucide:download",size:"24"})])):R("",!0)])]),e("div",ks,[e("div",{ref_key:"masteredWaveformRef",ref:V,class:"relative h-20 overflow-hidden rounded-lg"},[o(E)?(n(),a("div",As,t[28]||(t[28]=[e("div",{class:"h-6 w-6 animate-spin rounded-full border-2 border-[#FF2478]/30 border-t-[#FF2478]"},null,-1)]))):R("",!0)],512)])])])])])])])):R("",!0),P(T,{ref_key:"deleteModalRef",ref:$,title:o(r)("mastering.modal.confirmDelete.title"),description:o(r)("mastering.modal.confirmDelete.description"),onSubmit:we},null,8,["title","description"])])}}},Es=ze(Fs,[["__scopeId","data-v-1e6a1f36"]]);export{Es 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.