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