1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13997],{2840:(e,s,t)=>{t.d(s,{default:()=>r});var l=t(51129),a=t(65133);class r extends a.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,s){}render(){if(this.state.hasError){var e;return this.props.fallback||(0,l.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 text-red-600 mb-2",children:[(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,l.jsx)("h3",{className:"font-semibold",children:"Audio Converter Error"})]}),(0,l.jsx)("p",{className:"text-red-700 text-sm mb-4",children:(null===(e=this.state.error)||void 0===e?void 0:e.message)||"An unexpected error occurred while processing audio files."}),(0,l.jsx)("button",{type:"button",onClick:()=>this.setState({hasError:!1,error:void 0}),className:"px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors text-sm",children:"Try Again"})]})}return this.props.children}constructor(e){super(e),this.state={hasError:!1}}}},13053:(e,s,t)=>{t.d(s,{default:()=>i});var l=t(51129),a=t(21340),r=t(60842);function i(){let{files:e,tasks:s,isProcessing:t,downloadAllFiles:i}=(0,a.o)(),o=(0,r.c3)("common.progressPanel"),n=e.filter(e=>"processing"===e.status),d=e.filter(e=>"completed"===e.status),c=e.filter(e=>"failed"===e.status);return 0===e.length?(0,l.jsxs)("div",{className:"bg-background border rounded-lg p-6",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-4",children:o("title")}),(0,l.jsx)("div",{className:"text-center text-muted-foreground",children:(0,l.jsx)("p",{children:o("noFiles")})})]}):(0,l.jsxs)("div",{className:"bg-background border rounded-lg p-6",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-4",children:o("title")}),(0,l.jsxs)("div",{className:"space-y-4",children:[t&&(0,l.jsxs)("div",{className:"bg-muted/50 rounded-lg p-4",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-sm font-medium",children:o("overallProgress")}),(0,l.jsxs)("span",{className:"text-sm text-muted-foreground",children:[d.length+c.length," / ",e.length]})]}),(0,l.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,l.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:"".concat((d.length+c.length)/e.length*100,"%")}})})]}),(0,l.jsxs)("div",{className:"space-y-3",children:[n.map(e=>(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg gap-3",children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium truncate",children:e.name}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:o("converting")})]}),(0,l.jsxs)("div",{className:"w-24 flex-shrink-0",children:[(0,l.jsx)("div",{className:"w-full bg-muted rounded-full h-2 overflow-hidden",children:(0,l.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300 min-w-0 max-w-full",style:{width:"".concat(Math.min(Math.max(e.progress,0),100),"%")}})}),(0,l.jsxs)("p",{className:"text-xs text-center mt-1",children:[Math.min(Math.max(e.progress,0),100),"%"]})]})]},e.id)),d.map(e=>(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg gap-3",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium",children:e.name}),(0,l.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:o("conversionCompleted")})]}),(0,l.jsx)("div",{className:"flex items-center space-x-2",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]},e.id)),c.map(e=>(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg gap-3",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium",children:e.name}),(0,l.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:e.error||o("conversionFailed")})]}),(0,l.jsx)("div",{className:"flex items-center space-x-2",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-red-600 dark:text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},e.id))]}),(d.length>0||c.length>0)&&!t&&(0,l.jsx)("div",{className:"border-t pt-4",children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"text-sm text-muted-foreground",children:[(0,l.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:[d.length," ",o("completed")]}),c.length>0&&(0,l.jsxs)("span",{children:[","," ",(0,l.jsxs)("span",{className:"text-red-600 dark:text-red-400 font-medium",children:[c.length," ",o("failed")]})]})]}),d.length>0&&(0,l.jsxs)("button",{type:"button",onClick:i,className:"bg-primary text-primary-foreground px-4 py-2 rounded-lg font-medium hover:bg-primary/90 transition-colors flex items-center space-x-2 w-full sm:w-auto justify-center",children:[(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3M
17 13l3 3 7-7"})}),(0,l.jsxs)("span",{children:[o("downloadAll")," (",d.length," ",o("files"),")"]})]})]})})]})]})}},21340:(e,s,t)=>{t.d(s,{o:()=>c});var l=t(20754),a=t(72885),r=t(62848);let i={outputFormat:"mp3",quality:192,sampleRate:"auto",channels:"auto"},o={outputFormat:"mp3",quality:192,sampleRate:"auto",channels:"auto",trimming:{enabled:!1,startTime:0,endTime:0},audioEnhancement:{normalize:!1,fadeIn:0,fadeOut:0,volumeBoost:0},audioTrack:{trackIndex:0}},n=(0,a.v)()((0,r.Zr)((e,s)=>({files:[],selectedFileIds:[],settings:i,tasks:[],isProcessing:!1,videoFiles:[],videoSettings:o,videoProcessingTasks:[],thumbnailGenerationTasks:[],addFiles:t=>{e({files:[...s().files,...t.map(e=>{var s;return{id:(0,l.$)(),file:e,name:e.name,size:e.size,format:(null===(s=e.name.split(".").pop())||void 0===s?void 0:s.toLowerCase())||"unknown",status:"pending",progress:0}})]})},removeFile:t=>{let{files:l,selectedFileIds:a}=s();e({files:l.filter(e=>e.id!==t),selectedFileIds:a.filter(e=>e!==t)})},clearFiles:()=>{e({files:[],selectedFileIds:[]})},updateFileStatus:function(t,l){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;e({files:s().files.map(e=>e.id===t?{...e,status:l,progress:a,error:r}:e)})},setOutputResult:(t,l,a)=>{e({files:s().files.map(e=>e.id===t?{...e,outputBlob:l,outputUrl:a,status:"completed",progress:100}:e)})},updateSettings:t=>{e({settings:{...s().settings,...t}})},addTask:t=>{e({tasks:[...s().tasks,t]})},updateTask:(t,l)=>{e({tasks:s().tasks.map(e=>e.id===t?{...e,...l}:e)})},removeTask:t=>{e({tasks:s().tasks.filter(e=>e.id!==t)})},clearTasks:()=>{e({tasks:[]})},setProcessing:s=>{e({isProcessing:s})},addVideoFiles:async t=>{e({videoFiles:[...s().videoFiles,...t.map(e=>{var s;return{id:(0,l.$)(),file:e,name:e.name,size:e.size,format:(null===(s=e.name.split(".").pop())||void 0===s?void 0:s.toLowerCase())||"unknown",status:"pending",progress:0,duration:0,resolution:"Unknown",videoCodec:"Unknown",audioCodec:"Unknown",frameRate:0}})]})},removeVideoFile:t=>{let{videoFiles:l}=s();e({videoFiles:l.filter(e=>e.id!==t)})},clearVideoFiles:()=>{e({videoFiles:[]})},updateVideoFileStatus:function(t,l){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;e({videoFiles:s().videoFiles.map(e=>e.id===t?{...e,status:l,progress:a,error:r}:e)})},setVideoOutputResult:(t,l,a)=>{e({videoFiles:s().videoFiles.map(e=>e.id===t?{...e,outputBlob:l,outputUrl:a,status:"completed",progress:100}:e)})},updateVideoSettings:t=>{e({videoSettings:{...s().videoSettings,...t}})},generateThumbnail:async e=>Promise.resolve("data:image/jpeg;base64,placeholder"),extractVideoInfo:async e=>Promise.resolve({duration:0,resolution:{width:1920,height:1080},videoCodec:"H.264",audioCodec:"AAC",frameRate:30,bitrate:5e3,audioTracks:[]}),addVideoTask:t=>{e({videoProcessingTasks:[...s().videoProcessingTasks,t]})},updateVideoTask:(t,l)=>{e({videoProcessingTasks:s().videoProcessingTasks.map(e=>e.id===t?{...e,...l}:e)})},removeVideoTask:t=>{e({videoProcessingTasks:s().videoProcessingTasks.filter(e=>e.id!==t)})},clearVideoTasks:()=>{e({videoProcessingTasks:[]})},addThumbnailTask:t=>{e({thumbnailGenerationTasks:[...s().thumbnailGenerationTasks,t]})},updateThumbnailTask:(t,l)=>{e({thumbnailGenerationTasks:s().thumbnailGenerationTasks.map(e=>e.id===t?{...e,...l}:e)})},removeThumbnailTask:t=>{e({thumbnailGenerationTasks:s().thumbnailGenerationTasks.filter(e=>e.id!==t)})}}),{name:"audio-converter-storage",partialize:e=>({settings:e.settings,videoSettings:e.videoSettings})}));var d=t(65133);function c(){let{files:e,settings:s,tasks:a,isProcessing:r,addFiles:i,removeFile:o,clearFiles:c,updateFileStatus:u,setOutputResult:m,updateSettings:p,addTask:b,updateTask:h,removeTask:v,clearTasks:x,setProcessing:f}=n(),g=(0,d.useCallback)(async a=>{let r=a?e.filter(e=>a.includes(e.id)):e.filter(e=>"pending"===e.status);if(0!==r.length){f(!0);try{let a=r.map(e=>({id:(0,l.$)(),fileId:e.id,status:"waiting",progress:0,startTime:Date.now()}));for(let l of(a.forEach(e=>b(e)),a)){let a=e.find(e=>e.id===l.fileId);if(a)try{h(l.id,{status:"processing"}),u(a.id,"processing",0);let{convertAudioFile:e}=await Promise.resolve().then(t.bind(t,95905)),r=await e(a.file,s,e=>{h(l.id,{progress:e}),u(a.id,"processing",e)}),i=URL.createObjectURL(r);h(l.id,{status:"completed",progress:100,endTime:Date.now()}),m(a.id,r,i)}catch(s){let e=s instanceof Error?s.message:"Conversion failed";h(l.id,{status:"failed",error:e,endTime:Date.now()}),u(a.id,"failed",0,e)}}}catch(e){}finally{f(!1)}}},[e,s,b,h,u,f]),k=(0,d.useCallback)(()=>{f(!1)},[f]),j=(0,d.useCallback)(async s=>{e.find(e=>e.id===s)&&(u(s,"pending",0),await g([s]))},[e,g,u]),E=(0,d.useCallback)(async l=>{let a=e.find(e=>e.id===l);if(a&&a.outputBlob)try{let{downloadFile:e,generateOutputFilename:l}=await Promise.all([t.e(17077),t.e(14632),t.e(41709)]).then(t.bind(t,41709)),r=l(a.name,s.outputFormat);e(a.outputBlob,r)}catch(e){}},[e,s.outputFormat]),w=(0,d.useCallback)(async()=>{let l=e.filter(e=>"completed"===e.status&&e.outputBlob);if(0!==l.length)try{let{downloadFilesAsZip:e,generateOutputFilename:a}=await Promise.all([t.e(17077),t.e(14632),t.e(41709)]).then(t.bind(t,41709)),r=l.map(e=>({blob:e.outputBlob,filename:a(e.name,s.outputFormat)})),i=new Date().toISOString().slice(0,10);await e(r,"converted-audio-files-".concat(i,".zip"))}catch(e){}},[e,s.outputFormat]);return{files:e,settings:s,tasks:a,isProcessing:r,addFiles:i,removeFile:o,clearFiles:c,updateSettings:p,startConversion:g,stopConversion:k,retryConversion:j,downloadFile:E,downloadAllFiles:w,clearTasks:x}}},33590:(e,s,t)=>{t.d(s,{default:()=>n});
1var l=t(51129),a=t(21340),r=t(95905),i=t(60842),o=t(65133);function n(){let{files:e,isProcessing:s,startConversion:t,stopConversion:n,clearFiles:d}=(0,a.o)(),c=(0,i.c3)("common.conversionControls"),[u,m]=(0,o.useState)(!1);(0,o.useEffect)(()=>{(async()=>{try{let e=(0,r.S)();await e.initialize(),m(!0)}catch(e){m(!1)}})()},[]);let p=e.filter(e=>"pending"===e.status),b=e.length>0,h=p.length>0&&!s&&u;return(0,l.jsx)("div",{className:"bg-background border rounded-lg p-6",children:(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold",children:c("title")}),(0,l.jsxs)("p",{className:"text-sm text-muted-foreground",children:[p.length," ",c(1===p.length?"filesReady":"filesReadyPlural")]})]}),(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center space-y-2 sm:space-y-0 sm:space-x-3",children:[b&&(0,l.jsx)("button",{type:"button",onClick:d,disabled:s,className:"px-4 py-2 text-sm border rounded-lg hover:bg-muted/50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed w-full sm:w-auto",children:c("clearAll")}),s?(0,l.jsx)("button",{type:"button",onClick:n,className:"px-6 py-2 bg-destructive text-destructive-foreground rounded-lg hover:bg-destructive/90 transition-colors w-full sm:w-auto",children:c("stopConversion")}):(0,l.jsx)("button",{type:"button",onClick:()=>t(),disabled:!h,className:"px-6 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed w-full sm:w-auto",children:c(u?h?"startConversion":"noFilesToConvert":"loadingConverter")})]})]})})}},37512:(e,s,t)=>{t.d(s,{default:()=>o});var l=t(51129),a=t(81902),r=t(21340),i=t(60842);function o(){let{addFiles:e}=(0,r.o)(),s=(0,i.c3)("common.uploadArea");return(0,l.jsx)(a.vM,{category:"audio",onFilesSelected:e,title:s("title"),description:s("description"),buttonText:s("chooseFiles"),supportedFormats:s("supportedFormats")})}},40339:(e,s,t)=>{t.d(s,{default:()=>n});var l=t(51129),a=t(21340),r=t(60842),i=t(65133);let o={mp3:[{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"},{value:320,label:"320 kbps"}],aac:[{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"}],ogg:[{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"}],m4a:[{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"}],opus:[{value:64,label:"64 kbps"},{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"}],vorbis:[{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"}],wma:[{value:32,label:"32 kbps"},{value:48,label:"48 kbps"},{value:64,label:"64 kbps"},{value:96,label:"96 kbps"},{value:128,label:"128 kbps"},{value:160,label:"160 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"}],ac3:[{value:128,label:"128 kbps"},{value:192,label:"192 kbps"},{value:256,label:"256 kbps"},{value:384,label:"384 kbps"},{value:448,label:"448 kbps"}],dts:[{value:768,label:"768 kbps"},{value:1024,label:"1024 kbps"},{value:1536,label:"1536 kbps"}],amr:[{value:12,label:"12.2 kbps"},{value:10,label:"10.2 kbps"},{value:7,label:"7.95 kbps"},{value:6,label:"6.70 kbps"},{value:5,label:"5.90 kbps"}],speex:[{value:8,label:"8 kbps"},{value:16,label:"16 kbps"},{value:32,label:"32 kbps"}],wav:[{value:16,label:"16-bit"},{value:24,label:"24-bit"},{value:32,label:"32-bit"}],flac:[{value:16,label:"16-bit"},{value:24,label:"24-bit"}],alac:[{value:16,label:"16-bit"},{value:24,label:"24-bit"}],ape:[{value:1e3,label:"Fast"},{value:2e3,label:"Normal"},{value:3e3,label:"High"},{value:4e3,label:"Extra High"},{value:5e3,label:"Insane"}],wv:[{value:1,label:"Fast"},{value:2,label:"Normal"},{value:3,label:"High"},{value:4,label:"Very High"}],aiff:[{value:16,label:"16-bit"},{value:24,label:"24-bit"},{value:32,label:"32-bit"}],au:[{value:16,label:"16-bit"},{value:24,label:"24-bit"}],caf:[{value:16,label:"16-bit"},{value:24,label:"24-bit"},{value:32,label:"32-bit"}],rf64:[{value:16,label:"16-bit"},{value:24,label:"24-bit"},{value:32,label:"32-bit"}]};function n(e){let{defaultOutputFormat:s}=e,{settings:t,updateSettings:n}=(0,a.o)(),d=(0,r.c3)("common.settingsPanel");(0,i.useEffect)(()=>
1{if(s&&s!==t.outputFormat){var e,l;n({outputFormat:s,quality:(null===(l=o[s])||void 0===l?void 0:null===(e=l[0])||void 0===e?void 0:e.value)||192})}},[s,t.outputFormat,n]);let c=o[t.outputFormat]||o.mp3;return(0,l.jsxs)("div",{className:"bg-muted/50 rounded-lg p-6",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-4",children:d("title")}),(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"output-format",className:"block text-sm font-medium mb-2",children:d("outputFormat")}),(0,l.jsxs)("select",{id:"output-format",className:"w-full p-2 border rounded-lg bg-background",value:t.outputFormat,onChange:e=>{var s,t;return n({outputFormat:e.target.value,quality:(null===(t=o[e.target.value])||void 0===t?void 0:null===(s=t[0])||void 0===s?void 0:s.value)||192})},children:[(0,l.jsxs)("optgroup",{label:d("formatGroups.popular"),children:[(0,l.jsx)("option",{value:"mp3",children:"MP3"}),(0,l.jsx)("option",{value:"wav",children:"WAV"}),(0,l.jsx)("option",{value:"flac",children:"FLAC"}),(0,l.jsx)("option",{value:"aac",children:"AAC"}),(0,l.jsx)("option",{value:"m4a",children:"M4A"}),(0,l.jsx)("option",{value:"ogg",children:"OGG"})]}),(0,l.jsxs)("optgroup",{label:d("formatGroups.highQuality"),children:[(0,l.jsx)("option",{value:"opus",children:"OPUS"}),(0,l.jsx)("option",{value:"vorbis",children:"VORBIS"}),(0,l.jsx)("option",{value:"alac",children:"ALAC"}),(0,l.jsx)("option",{value:"ape",children:"APE"}),(0,l.jsx)("option",{value:"wv",children:"WavPack"})]}),(0,l.jsxs)("optgroup",{label:d("formatGroups.professional"),children:[(0,l.jsx)("option",{value:"aiff",children:"AIFF"}),(0,l.jsx)("option",{value:"au",children:"AU"}),(0,l.jsx)("option",{value:"caf",children:"CAF"}),(0,l.jsx)("option",{value:"rf64",children:"RF64"})]}),(0,l.jsxs)("optgroup",{label:d("formatGroups.specialized"),children:[(0,l.jsx)("option",{value:"ac3",children:"AC3"}),(0,l.jsx)("option",{value:"dts",children:"DTS"}),(0,l.jsx)("option",{value:"amr",children:"AMR"}),(0,l.jsx)("option",{value:"speex",children:"SPEEX"})]})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"quality",className:"block text-sm font-medium mb-2",children:d("quality")}),(0,l.jsx)("select",{id:"quality",className:"w-full p-2 border rounded-lg bg-background",value:t.quality,onChange:e=>n({quality:Number.parseInt(e.target.value)}),children:c.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,l.jsxs)("details",{className:"group",children:[(0,l.jsx)("summary",{className:"cursor-pointer text-sm font-medium py-2",children:d("advancedSettings")}),(0,l.jsxs)("div",{className:"mt-2 space-y-3 pl-4 border-l-2 border-muted",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"sample-rate",className:"block text-sm font-medium mb-1",children:d("sampleRate")}),(0,l.jsxs)("select",{id:"sample-rate",className:"w-full p-2 border rounded-lg bg-background text-sm",value:t.sampleRate,onChange:e=>n({sampleRate:"auto"===e.target.value?"auto":Number.parseInt(e.target.value)}),children:[(0,l.jsx)("option",{value:"auto",children:d("channelOptions.auto")}),(0,l.jsx)("option",{value:"8000",children:"8 kHz"}),(0,l.jsx)("option",{value:"16000",children:"16 kHz"}),(0,l.jsx)("option",{value:"22050",children:"22.05 kHz"}),(0,l.jsx)("option",{value:"44100",children:"44.1 kHz"}),(0,l.jsx)("option",{value:"48000",children:"48 kHz"}),(0,l.jsx)("option",{value:"96000",children:"96 kHz"}),(0,l.jsx)("option",{value:"192000",children:"192 kHz"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"channels",className:"block text-sm font-medium mb-1",children:d("channels")}),(0,l.jsxs)("select",{id:"channels",className:"w-full p-2 border rounded-lg bg-background text-sm",value:t.channels,onChange:e=>n({channels:e.target.value}),children:[(0,l.jsx)("option",{value:"auto",children:d("channelOptions.auto")}),(0,l.jsx)("option",{value:"mono",children:d("channelOptions.mono")}),(0,l.jsx)("option",{value:"stereo",children:d("channelOptions.stereo")})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"volume",className:"block text-sm font-medium mb-1",children:d("volumeAdjustment")}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("input",{id:"volume",type:"range",min:"-20",max:"20",step:"1",value:t.volume||0,onChange:e=>n({volume:Number.parseInt(e.target.value)}),className:"flex-1"}),(0,l.jsxs)("span",{className:"text-sm w-12 text-center",children:[t.volume||0," dB"]})]})]})]})]})]})]})}},41457:(e,s,t)=>{t.d(s,{default:()=>o});
1var l=t(51129),a=t(95905),r=t(60842),i=t(65133);function o(e){let{onReady:s}=e,[t,o]=(0,i.useState)("loading"),[n,d]=(0,i.useState)(""),c=(0,r.c3)("common.ffmpegStatus");return((0,i.useEffect)(()=>{(async()=>{try{o("loading");let e=(0,a.S)();await e.initialize(),o("ready"),null==s||s()}catch(e){o("fallback"),d(e instanceof Error?e.message:"Failed to initialize FFmpeg"),null==s||s()}})()},[s]),"ready"===t)?(0,l.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-green-600",children:[(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),(0,l.jsx)("span",{children:c("ready")})]}):"fallback"===t?(0,l.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-yellow-600",children:[(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,l.jsx)("span",{children:c("fallback")})]}):"error"===t?(0,l.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-red-600",children:[(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),(0,l.jsxs)("span",{children:[c("error"),": ",n]})]}):(0,l.jsxs)("div",{className:"flex items-center space-x-2 text-sm text-blue-600",children:[(0,l.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-current"}),(0,l.jsx)("span",{children:c("loading")})]})}},45602:(e,s,t)=>{t.d(s,{default:()=>r});var l=t(51129),a=t(60842);function r(e){let{translationKey:s="audio-converter.formats",isAudioFormat:t=!0}=e,r=(0,a.c3)(s),i=s.includes("video-to-audio"),o=s.includes("image")||s.includes("pdf");return(0,l.jsx)("section",{className:"py-12 bg-muted/50",children:(0,l.jsxs)("div",{className:"container mx-auto px-4",children:[(0,l.jsxs)("div",{className:"text-center mb-12",children:[(0,l.jsx)("h2",{className:"text-3xl font-bold mb-4",children:r("title")}),(0,l.jsx)("p",{className:"text-lg text-muted-foreground",children:r("description")})]}),(0,l.jsxs)("div",{className:"grid md:grid-cols-2 gap-8 max-w-4xl mx-auto",children:[(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold mb-2",children:r("inputFormats")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:r("inputDescription")}),(0,l.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:(o?["JPG","JPEG","PNG","WebP","HEIC","HEIF","GIF","AVIF","BMP","TIFF","SVG","ICO"]:t?["MP3","WAV","FLAC","AAC","M4A","OGG","WMA","AIFF","APE","ALAC","TTA","WV","DTS","MP2","AC3","AMR","OPUS","SPEEX","VORBIS","BWF","RF64","CAF","AU","SND","VOC","IFF","WEBM","MKA","MKV","AVI","MOV","MP4","RA","RAM","RMX","GSM","VOX","PCM"]:["MP4","MOV","AVI","MKV","WEBM","WMV","FLV","M4V","MTS","M2TS","TS","VOB","ASF","DIVX","XVID","ProRes","DNxHD","AVCHD","MXF","R3D","BRAW","F4V","SWF","RMVB","RM","3GP","3G2","OGV","HEVC","H264","H265","VP8","VP9","AV1"]).map(e=>(0,l.jsx)("span",{className:"bg-background border rounded-lg px-3 py-2 text-sm font-medium",children:e},e))})]}),(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold mb-2",children:r("outputFormats")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:r("outputDescription")}),(0,l.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:(o?["JPG","PNG","WebP","AVIF","GIF","BMP","TIFF"]:i?["MP3","AAC","WAV","FLAC","M4A","OGG","OPUS","VORBIS","ALAC","APE","WV","AIFF","AU","CAF","RF64","AC3","DTS","AMR","SPEEX"]:["MP3","WAV","FLAC","AAC","M4A","OGG","OPUS","VORBIS","ALAC","APE","WV","AIFF","AU","CAF","RF64","AC3","DTS","AMR","SPEEX"]).map(e=>(0,l.jsx)("span",{className:"bg-primary/10 border border-primary/20 rounded-lg px-3 py-2 text-sm font-medium text-primary",children:e},e))})]})]})]})})}},46966:(e,s,t)=>{t.d(s,{default:()=>u});
1var l=t(51129),a=t(45008),r=t(21340),i=t(14793),o=t(47751),n=t(88220),d=t(74085),c=t(60842);function u(){let{files:e,removeFile:s,downloadFile:t}=(0,r.o)(),u=(0,c.c3)("common.fileList");return(0,l.jsxs)("div",{className:"bg-background border rounded-lg p-6",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-4",children:u("title")}),(0,l.jsx)(a.$c,{files:e,icon:n.A,onRemove:e=>s(e),disableRemoveWhileProcessing:!0,showMetadata:!0,showStatus:!0,showProgress:!0,renderMetadata:e=>(0,l.jsxs)(l.Fragment,{children:[(0,i.v)(e.size)," ⢠",e.format.toUpperCase(),e.duration&&" ⢠".concat((0,o.a)(e.duration,"compact"))]}),customActions:[{label:u("download"),icon:d.A,onClick:e=>t(e.id),show:e=>"completed"===e.status&&!!e.outputBlob,disabled:e=>!e.outputBlob,variant:"primary"}],emptyMessage:u("noFiles"),emptySubtitle:u("uploadPrompt")})]})}},79652:(e,s,t)=>{var l,a;t.d(s,{m:()=>n}),function(e){e.LOAD="LOAD",e.EXEC="EXEC",e.FFPROBE="FFPROBE",e.WRITE_FILE="WRITE_FILE",e.READ_FILE="READ_FILE",e.DELETE_FILE="DELETE_FILE",e.RENAME="RENAME",e.CREATE_DIR="CREATE_DIR",e.LIST_DIR="LIST_DIR",e.DELETE_DIR="DELETE_DIR",e.ERROR="ERROR",e.DOWNLOAD="DOWNLOAD",e.PROGRESS="PROGRESS",e.LOG="LOG",e.MOUNT="MOUNT",e.UNMOUNT="UNMOUNT"}(l||(l={}));let r=(()=>{let e=0;return()=>e++})();Error("unknown message type");let i=Error("ffmpeg is not loaded, call `await ffmpeg.load()` first"),o=Error("called FFmpeg.terminate()");Error("failed to import ffmpeg-core.js");class n{#e=null;#s={};#t={};#l=[];#a=[];loaded=!1;#r=()=>{this.#e&&(this.#e.onmessage=({data:{id:e,type:s,data:t}})=>{switch(s){case l.LOAD:this.loaded=!0,this.#s[e](t);break;case l.MOUNT:case l.UNMOUNT:case l.EXEC:case l.FFPROBE:case l.WRITE_FILE:case l.READ_FILE:case l.DELETE_FILE:case l.RENAME:case l.CREATE_DIR:case l.LIST_DIR:case l.DELETE_DIR:this.#s[e](t);break;case l.LOG:this.#l.forEach(e=>e(t));break;case l.PROGRESS:this.#a.forEach(e=>e(t));break;case l.ERROR:this.#t[e](t)}delete this.#s[e],delete this.#t[e]})};#i=({type:e,data:s},t=[],l)=>this.#e?new Promise((a,i)=>{let o=r();this.#e&&this.#e.postMessage({id:o,type:e,data:s},t),this.#s[o]=a,this.#t[o]=i,l?.addEventListener("abort",()=>{i(new DOMException(`Message # ${o} was aborted`,"AbortError"))},{once:!0})}):Promise.reject(i);on(e,s){"log"===e?this.#l.push(s):"progress"===e&&this.#a.push(s)}off(e,s){"log"===e?this.#l=this.#l.filter(e=>e!==s):"progress"===e&&(this.#a=this.#a.filter(e=>e!==s))}load=({classWorkerURL:e,...s}={},{signal:a}={})=>(this.#e||(this.#e=e?new Worker(new URL(e,"file:///home/runner/work/onlinetools/onlinetools/node_modules/.pnpm/@[email protected]/node_modules/@ffmpeg/ffmpeg/dist/esm/classes.js"),{type:"module"}):new Worker(t.tu(new URL(t.p+t.u(76269),t.b)),{type:void 0}),this.#r()),this.#i({type:l.LOAD,data:s},void 0,a));exec=(e,s=-1,{signal:t}={})=>this.#i({type:l.EXEC,data:{args:e,timeout:s}},void 0,t);ffprobe=(e,s=-1,{signal:t}={})=>this.#i({type:l.FFPROBE,data:{args:e,timeout:s}},void 0,t);terminate=()=>{for(let e of Object.keys(this.#t))this.#t[e](o),delete this.#t[e],delete this.#s[e];this.#e&&(this.#e.terminate(),this.#e=null,this.loaded=!1)};writeFile=(e,s,{signal:t}={})=>{let a=[];return s instanceof Uint8Array&&a.push(s.buffer),this.#i({type:l.WRITE_FILE,data:{path:e,data:s}},a,t)};mount=(e,s,t)=>this.#i({type:l.MOUNT,data:{fsType:e,options:s,mountPoint:t}},[]);unmount=e=>this.#i({type:l.UNMOUNT,data:{mountPoint:e}},[]);readFile=(e,s="binary",{signal:t}={})=>this.#i({type:l.READ_FILE,data:{path:e,encoding:s}},void 0,t);deleteFile=(e,{signal:s}={})=>this.#i({type:l.DELETE_FILE,data:{path:e}},void 0,s);rename=(e,s,{signal:t}={})=>this.#i({type:l.RENAME,data:{oldPath:e,newPath:s}},void 0,t);createDir=(e,{signal:s}={})=>this.#i({type:l.CREATE_DIR,data:{path:e}},void 0,s);listDir=(e,{signal:s}={})=>this.#i({type:l.LIST_DIR,data:{path:e}},void 0,s);deleteDir=(e,{signal:s}={})=>this.#i({type:l.DELETE_DIR,data:{path:e}},void 0,s)}!function(e){e.MEMFS="MEMFS",e.NODEFS="NODEFS",e.NODERAWFS="NODERAWFS",e.IDBFS="IDBFS",e.WORKERFS="WORKERFS",e.PROXYFS="PROXYFS"}(a||(a={}))},98094:(e,s,t)=>{t.d(s,{default:()=>r});
1var l=t(79522),a=t(51129);function r(e){let{locale:s,...t}=e;if(!s)throw Error(void 0);return(0,a.jsx)(l.Dk,{locale:s,...t})}},99188:(e,s,t)=>{t.d(s,{default:()=>i});var l=t(51129),a=t(21340),r=t(65133);function i(e){let{children:s}=e,{clearFiles:t,clearTasks:i}=(0,a.o)();return(0,r.useEffect)(()=>{t(),i()},[t,i]),(0,l.jsx)(l.Fragment,{children:s})}},99331:(e,s,t)=>{t.d(s,{t2:()=>i,KA:()=>n});let l=Error("failed to get response body reader"),a=Error("failed to complete download"),r=e=>new Promise((s,t)=>{let l=new FileReader;l.onload=()=>{let{result:e}=l;e instanceof ArrayBuffer?s(new Uint8Array(e)):s(new Uint8Array)},l.onerror=e=>{t(Error(`File could not be read! Code=${e?.target?.error?.code||-1}`))},l.readAsArrayBuffer(e)}),i=async e=>{let s;if("string"==typeof e)s=/data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(e)?atob(e.split(",")[1]).split("").map(e=>e.charCodeAt(0)):await (await fetch(e)).arrayBuffer();else if(e instanceof URL)s=await (await fetch(e)).arrayBuffer();else{if(!(e instanceof File||e instanceof Blob))return new Uint8Array;s=await r(e)}return new Uint8Array(s)},o=async(e,s)=>{let t;let r=await fetch(e);try{let i=parseInt(r.headers.get("Content-Length")||"-1"),o=r.body?.getReader();if(!o)throw l;let n=[],d=0;for(;;){let{done:t,value:l}=await o.read(),r=l?l.length:0;if(t){if(-1!=i&&i!==d)throw a;s&&s({url:e,total:i,received:d,delta:r,done:t});break}n.push(l),d+=r,s&&s({url:e,total:i,received:d,delta:r,done:t})}let c=new Uint8Array(d),u=0;for(let e of n)c.set(e,u),u+=e.length;t=c.buffer}catch(l){console.log("failed to send download progress event: ",l),t=await r.arrayBuffer(),s&&s({url:e,total:t.byteLength,received:t.byteLength,delta:0,done:!0})}return t},n=async(e,s,t=!1,l)=>{let a=new Blob([t?await o(e,l):await (await fetch(e)).arrayBuffer()],{type:s});return URL.createObjectURL(a)}}}]);
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.