import{bk as $,ap as s,O as u,bx as d,bf as c,by as v,x as t,p as f,P as o,bs as p,bz as x,ai as i,b7 as h,R as y,aY as k}from"./heroicons-BDwnQUYs.js";function N(){const e=r=>{if(r?.type==="dir")return{component:y,colorClass:"text-amber-500"};if(r?.symlink)return{component:k,colorClass:"text-cyan-500"};const m=(r?.name||"").split(".").pop()?.toLowerCase();return n(m)},n=r=>{const m={jpg:[i,"text-pink-500"],jpeg:[i,"text-pink-500"],png:[i,"text-pink-500"],gif:[i,"text-pink-500"],webp:[i,"text-pink-500"],svg:[i,"text-pink-500"],ico:[i,"text-pink-500"],bmp:[i,"text-pink-500"],mp4:[x,"text-purple-500"],webm:[x,"text-purple-500"],ogg:[x,"text-purple-500"],mov:[x,"text-purple-500"],avi:[x,"text-purple-500"],mkv:[x,"text-purple-500"],mp3:[p,"text-emerald-500"],wav:[p,"text-emerald-500"],flac:[p,"text-emerald-500"],aac:[p,"text-emerald-500"],m4a:[p,"text-emerald-500"],zip:[o,"text-amber-600"],tar:[o,"text-amber-600"],gz:[o,"text-amber-600"],tgz:[o,"text-amber-600"],bz2:[o,"text-amber-600"],rar:[o,"text-amber-600"],"7z":[o,"text-amber-600"],php:[t,"text-indigo-500"],js:[t,"text-yellow-500"],mjs:[t,"text-yellow-500"],ts:[t,"text-blue-500"],tsx:[t,"text-blue-500"],jsx:[t,"text-yellow-500"],vue:[t,"text-emerald-500"],css:[t,"text-sky-500"],scss:[t,"text-sky-500"],less:[t,"text-sky-500"],html:[f,"text-orange-500"],htm:[f,"text-orange-500"],json:[t,"text-amber-500"],xml:[t,"text-orange-500"],yml:[t,"text-rose-500"],yaml:[t,"text-rose-500"],py:[t,"text-blue-600"],rb:[t,"text-red-500"],go:[t,"text-cyan-500"],rs:[t,"text-orange-600"],java:[t,"text-red-600"],c:[t,"text-slate-600"],cpp:[t,"text-slate-600"],cs:[t,"text-purple-600"],sh:[t,"text-slate-700"],bash:[t,"text-slate-700"],sql:[t,"text-blue-600"],pdf:[v,"text-red-500"],doc:[s,"text-blue-500"],docx:[s,"text-blue-500"],xls:[c,"text-emerald-600"],xlsx:[c,"text-emerald-600"],csv:[c,"text-emerald-600"],ppt:[d,"text-orange-500"],pptx:[d,"text-orange-500"],txt:[s,"text-slate-500"],md:[s,"text-slate-700"],log:[s,"text-slate-400"],env:[u,"text-amber-600"],htaccess:[u,"text-amber-600"],conf:[s,"text-slate-500"],ini:[s,"text-slate-500"],gitignore:[s,"text-slate-500"]},[g,b]=m[r]||[h,"text-slate-400"];return{component:g,colorClass:b}};return{iconFor:e,iconForExt:n,isImage:r=>/\.(jpe?g|png|gif|webp|svg|bmp|ico)$/i.test(r||""),isVideo:r=>/\.(mp4|webm|ogg|mov|m4v)$/i.test(r||""),isAudio:r=>/\.(mp3|wav|flac|aac|m4a|ogg)$/i.test(r||""),isArchive:r=>/\.(zip|tar|tar\.gz|tgz|tar\.bz2|rar|7z)$/i.test(r||""),isText:r=>{const m=(r||"").split(".").pop()?.toLowerCase();return["txt","md","json","js","mjs","ts","tsx","vue","jsx","php","html","htm","css","scss","less","yml","yaml","xml","sh","bash","conf","ini","log","env","gitignore","htaccess","sql","py","rb","go","rs","java","c","cpp","cs","svg","csv","tsv"].includes(m)},FolderOpenIcon:$}}function D(e){return e==null?"—":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(2)} GB`}function B(e){if(e==null||e===""||e==="Invalid Date")return"—";let n;if(typeof e=="number"&&Number.isFinite(e))n=new Date(e*1e3);else if(typeof e=="string"){const l=Number(e);n=Number.isFinite(l)&&e.trim()!==""&&/^\d+(\.\d+)?$/.test(e.trim())?new Date(l*1e3):new Date(e)}else if(e instanceof Date)n=e;else return"—";return!n||Number.isNaN(n.getTime())?"—":n.toLocaleString("tr-TR",{dateStyle:"short",timeStyle:"short"})}function C(e){if(e==null||e==="")return"—";const n=typeof e=="number"?e:Number(e);if(!Number.isFinite(n))return"—";const l=Date.now()-n*1e3,a=Math.floor(l/(24*3600*1e3));return a<0?"gelecek":a===0?"bugün":a===1?"dün":a<30?`${a} gün önce`:a<365?`${Math.floor(a/30)} ay önce`:`${Math.floor(a/365)} yıl önce`}export{B as a,D as f,C as r,N as u};
