!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}System.register(["./index-legacy-DF2p3puw.js","./index-legacy-DQ2fUQyK.js","./helpers-legacy-DT_Egowv.js","./work-item-utils-legacy-Chiyq_j7.js"],(function(e,n){"use strict";var r,o,i,a,c,l,u,d,s,v,f;return{setters:[function(t){r=t.B,o=t.c,i=t.p,a=t.d,c=t.n,l=t.aq,u=t.e},function(t){d=t.d,s=t.c},function(t){v=t.t},function(t){f=t.e}],execute:function(){e("e",(function(t,e,n,r){return"\n  <b>".concat(t,"</b><br />\n  Successful deployments: <b>").concat(c(e),"</b><br />\n  Total deployments: <b>").concat(c(n),"</b><br />\n  ").concat(void 0===r?"":"Total pipelines: <b>".concat(c(r),"</b>"),"\n")}));var n=function(t){return'\n  <div class="'.concat(2===t.width?"col-span-2":"",'">\n    ').concat(t.label,'\n    <div class="font-semibold">').concat(t.value,"</div>\n    ").concat(void 0!==t.graphValue&&t.graphValue<=1?'\n    <div class="rounded-md bg-gray-500 mt-1 h-1.5 w-full">\n      <div class="bg-gray-300 h-1.5 rounded-md" style="width: '.concat(100*t.graphValue,'%"></div>\n    </div>'):"","\n  </div>\n")},m=function(t,e,n){return[n?{label:e.groupLabel||"Group",value:n}:void 0,t.priority?{label:"Priority",value:"\n        <span\n          class='inline-block w-2 h-2 mr-1'\n          style='background: ".concat(l(t.priority),"'\n        ></span>\n        ").concat(t.priority,"\n      ")}:void 0,t.severity?{label:"Severity",value:t.severity}:void 0,t.rca.length?{label:"RCA",value:t.rca.join(" / "),width:2}:void 0]},g=function(t){return'\n  <div class="grid grid-cols-2 gap-4 my-3">\n    '.concat(t.filter(u).map(n).join(""),"\n  </div>\n")},p=function(t,e){return'\n  <img src="'.concat(e.icon,'" width="14" height="14" class="inline -mt-1" />\n  <strong>#').concat(t.id,": ").concat(t.title,"</strong>\n")},y=function(t,e){return v(t)(e).filter((function(t){return t.start})).map((function(t){var e;return{label:t.label,timeDiff:f({start:t.start.toISOString(),end:null===(e=t.end)||void 0===e?void 0:e.toISOString()})}}))};e("c",(function(e){var n=e.workItemType,c=e.cycleTime,l=e.workCenterTime,u=e.workItemTimes,v=e.workItemGroup;return function(e){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],b=u(e),h=c(e),w=Math.round(l(e)/h*100),I=n(e.typeId),D=e.groupId?v(e.groupId):void 0,T=b.devComplete?new Date(b.end).getTime()-new Date(b.devComplete).getTime():void 0,S=r(y(I,b).sort(d(s(o("timeDiff"))))),k=[].concat(t(m(e,I,null==D?void 0:D.name)),[{label:"Cycle time",value:i(h)},T?{label:"Change lead time",value:i(T),graphValue:a(T,h).getOr(void 0)}:void 0,S?{label:"Longest time",value:"".concat(S.label," (").concat(i(S.timeDiff),")"),graphValue:a(S.timeDiff,h).getOr(void 0)}:void 0,{label:"Efficiency",value:"".concat(w,"%"),graphValue:w/100}],t(f));return'\n    <div class="w-72 pt-2">\n      '.concat(p(e,I),"\n      ").concat(g(k),"\n    </div>\n  ").trim()}})),e("a",(function(e){var n=e.workItemType,c=e.workItemTimes,l=e.workItemGroup;return function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],v=r(y(n(e.typeId),c(e)).sort(d(s(o("timeDiff"))))),f=e.groupId?l(e.groupId):void 0,b=[].concat(t(m(e,n(e.typeId),null==f?void 0:f.name)),[{label:"Current status",value:e.state},{label:"Age",value:i(Date.now()-new Date(e.created.on).getTime())},v?{label:"Longest time so far",value:"".concat(v.label," (").concat(i(v.timeDiff),")"),graphValue:a(v.timeDiff,Date.now()-new Date(e.created.on).getTime()).getOr(void 0)}:void 0],t(u));return'\n  <div class="w-72 pt-2">\n    '.concat(p(e,n(e.typeId)),"\n    ").concat(g(b),"\n  </div>\n").trim()}}))}}}))}();
