import{D as _}from"./index-lOezWVmi.js";const y=e=>{var t;return e.server===v||e.type==="virtual-machine"?!0:(t=e.variant)==null?void 0:t.includes("desktop")},O=e=>{if(y(e))return!1;const t=["disk1.img","disk-kvm.img","uefi1.img"];return Object.entries(e.versions??{}).find(s=>Object.entries(s[1].items).find(r=>t.includes(r[1].ftype)))===void 0},v="local-iso",T=e=>({aliases:e.name,arch:"",os:"Custom ISO",pool:e.pool,release:"-",server:v,type:"virtual-machine",variant:"iso",created_at:new Date(e.created_at).getTime(),volume:e}),L="local-image",I=e=>{var r,o,a,i,n,c,l,p,u,d,f;const t=(o=(r=e.properties)==null?void 0:r.description)==null?void 0:o.toLocaleLowerCase().includes("lts"),s=`${((a=e.properties)==null?void 0:a.version)??""}${t?" LTS":""}`;return{aliases:((i=e.update_source)==null?void 0:i.alias)??((c=(n=e.aliases)==null?void 0:n[0])==null?void 0:c.name)??"",fingerprint:e.fingerprint,arch:e.architecture==="x86_64"?"amd64":e.architecture,os:_(((l=e.properties)==null?void 0:l.os)??""),created_at:new Date(e.uploaded_at).getTime(),release:((p=e.properties)==null?void 0:p.release)??"",release_title:s,type:e.type,cached:e.cached,profiles:e.profiles??["default"],server:e.cached?(u=e.update_source)==null?void 0:u.server:L,protocol:(d=e.update_source)==null?void 0:d.protocol,variant:(f=e.properties)==null?void 0:f.variant}},C=(e,t)=>{const s=e.os+e.release_title+e.release+e.type+e.server,r=t.os+t.release_title+t.release+t.type+t.server;return s<r?-1:s>r?1:0};export{v as L,y as a,C as b,L as c,T as d,O as i,I as l};
