import{fD as o}from"./index-dP1W1_bd.js";var a=(n=>(n.ALL="all",n.DEPLOYED_ONLY="deployed only",n.MY_ONLY="my models only",n))(a||{});const f={"last created":"CREATED:DESC","first created":"CREATION:ASC",version:"VERSION:DESC","name ascending":"NAME:ASC","name descending":"NAME:DESC"},N=n=>{let e=[];return n.forEach(s=>{const t=e.find(r=>r.name===s.name);t?s.version>t.version&&(e=e.map(r=>s.name===r.name?s:r)):e.push(s)}),e},m=(n,e)=>e?n.filter(s=>s.name.toLowerCase().includes(e.toLowerCase())):n,E=(n,e,s,t)=>e===a.MY_ONLY?n.filter(r=>r.userFullName.toLowerCase()===(s==null?void 0:s.username)):e===a.DEPLOYED_ONLY?t?n.filter(r=>!!t.find(i=>r.name===i.modelName)):[]:n,d=(n,e)=>{if(n.status===o.RUNNING){if(e.status!==o.RUNNING)return-1}else if(e.status===o.RUNNING)return 1;return 0},D=n=>+String(n).slice(0,6);export{a as M,m as a,d as b,D as c,N as d,E as f,f as s};
