import{q as i,c as u}from"./index-B-YXshIJ.js";import{c as s,i as c}from"./reducer-utils-kTG-Dqg7.js";const g="(empty)",B="no-group",f=({start:e,end:t})=>(t?new Date(t):new Date).getTime()-new Date(e).getTime(),l=e=>t=>{const n=e(t);if(!(!n.start||!n.end))return new Date(n.end).getTime()-new Date(n.start).getTime()},m=e=>i(e,u("workCenters"),s(c(t=>t.end?f(t):0))),p=e=>s(c(t=>l(e)(t)||0)),D=e=>s(c(m(e))),T=e=>{const t=p(e),n=D(e);return r=>{const a=t(r);return a===0?0:n(r)*100/a}},b=(e,t)=>n=>r=>{if(t!=null&&t.includes(r.state))return!1;const{start:a,end:o}=e(r);return!a||!n(new Date(a),"start")?!1:o?!n(new Date(o),"end"):!0},d=e=>e.toLowerCase().includes("bug"),w=e=>d(e.name[0]),L=(e,t)=>n=>r=>w(e(r.typeId))?n(new Date(r.created.on)):!!t(r).start&&n(new Date(t(r).start));export{D as a,L as b,l as c,b as d,f as e,T as f,g,d as i,B as n,p as t,m as w};
