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