p-backlog 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +9 -1
  3. package/README.ru.md +10 -1
  4. package/dist/cli.js +670 -322
  5. package/dist/web/assets/{CodeTab-BU7UU1i4.js → CodeTab-D3I5lIJJ.js} +1 -1
  6. package/dist/web/assets/CostTab-8f2AC5ER.js +1 -0
  7. package/dist/web/assets/EffectTab-1jObLK9a.js +1 -0
  8. package/dist/web/assets/Figure-BHBCd7Dt.js +1 -0
  9. package/dist/web/assets/OverviewTab-DjNyxzJq.js +1 -0
  10. package/dist/web/assets/QualityTab-W2NdYBhI.js +1 -0
  11. package/dist/web/assets/StatsPage-rJH3k8Ye.js +1 -0
  12. package/dist/web/assets/StatsTabState-BoimPoKm.js +1 -0
  13. package/dist/web/assets/{StatsTable-C0coWtNM.js → StatsTable-B0tbx68M.js} +1 -1
  14. package/dist/web/assets/{UnavailableRepos-DDHmBHg0.js → UnavailableRepos-SpC6Dzwu.js} +1 -1
  15. package/dist/web/assets/cx-DDl6tKXq.js +58 -0
  16. package/dist/web/assets/{index-DN4lSwOL.js → index-C8xqRmo-.js} +2 -2
  17. package/dist/web/assets/start-YlC0KTe5.js +38 -0
  18. package/dist/web/assets/use-grain-series-Bx70IZvb.js +55 -0
  19. package/dist/web/assets/value-dot-B7BsbWBD.js +1 -0
  20. package/dist/web/index.html +1 -1
  21. package/package.json +1 -1
  22. package/dist/web/assets/ChartTooltip-b-yZtIRd.js +0 -55
  23. package/dist/web/assets/CostTab-Be8xR9DU.js +0 -1
  24. package/dist/web/assets/EffectTab-D0kaZiSl.js +0 -1
  25. package/dist/web/assets/Figure-B6Ry1zXo.js +0 -1
  26. package/dist/web/assets/OverviewTab-DqU7o9Ug.js +0 -1
  27. package/dist/web/assets/QualityTab-DtnTgxXj.js +0 -1
  28. package/dist/web/assets/StatsPage-BLZKtSL6.js +0 -1
  29. package/dist/web/assets/StatsTabState-CYkDWYp7.js +0 -1
  30. package/dist/web/assets/cx-Cfec8QGz.js +0 -58
  31. package/dist/web/assets/rolldown-runtime-hePW80VL.js +0 -1
  32. package/dist/web/assets/start-sbZVqXmP.js +0 -38
  33. package/dist/web/assets/value-dot-CfFRNT_m.js +0 -1
  34. /package/dist/web/assets/{ChartTooltip-tQC8-pw2.css → use-grain-series-tQC8-pw2.css} +0 -0
@@ -1 +1 @@
1
- import{E as e,a as t,gn as n,xt as r}from"./cx-Cfec8QGz.js";import{i,n as a,r as o}from"./StatsTabState-CYkDWYp7.js";import{t as s}from"./StatsPage.module-D8dvB8Va.js";import{t as c}from"./UnavailableRepos-DDHmBHg0.js";var l={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},u=n();function d({churn:t}){let{stats:n}=e(),r=t[0]?.score??1;return(0,u.jsxs)(i,{title:n.churnTitle,children:[(0,u.jsx)(`p`,{className:o.muted,children:n.churnHint}),t.length===0?(0,u.jsx)(`p`,{className:o.muted,children:n.churnEmpty}):(0,u.jsx)(`ul`,{className:o.rows,children:t.map(e=>(0,u.jsxs)(`li`,{className:l.churnRow,children:[(0,u.jsx)(`code`,{className:o.rowLabel,children:e.label}),(0,u.jsx)(`span`,{className:o.rowValue,children:n.commits(e.commits)}),(0,u.jsx)(`span`,{className:o.rowValue,children:n.churnTasks(e.tasks,e.weight)}),(0,u.jsx)(`span`,{className:o.track,"aria-hidden":`true`,children:(0,u.jsx)(`span`,{className:o.fill,style:{transform:`scaleX(${e.score/r})`}})})]},e.label))})]})}function f({density:t}){let{stats:n}=e();return(0,u.jsx)(i,{title:n.densityTitle,children:t.projects.length===0?(0,u.jsx)(`p`,{className:o.muted,children:n.noCodeData}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(p,{rows:t.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),t.folders.length>0&&(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`h3`,{className:o.subTitle,children:n.folders}),(0,u.jsx)(p,{rows:t.folders.map(e=>({key:e.label,label:(0,u.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function p({rows:t}){let{stats:n,core:r}=e();return(0,u.jsx)(`ul`,{className:o.rows,children:t.map(({key:e,label:t,row:i})=>(0,u.jsxs)(`li`,{className:l.densityRow,children:[(0,u.jsx)(`span`,{className:o.rowLabel,children:t}),(0,u.jsx)(`span`,{className:o.rowValue,children:r.count(i.lines,`line`)}),(0,u.jsx)(`span`,{className:o.rowValue,children:r.count(i.open,`task`)}),(0,u.jsx)(`span`,{className:o.rowValue,children:i.perKloc===null?`—`:n.perKloc(i.perKloc)})]},e))})}function m(){let{projectId:e}=r(),n=t(e);return(0,u.jsx)(a,{query:n,children:e=>(0,u.jsx)(h,{report:e})})}function h({report:t}){let{stats:n}=e();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c,{repos:t.unavailableRepos}),(0,u.jsxs)(`div`,{className:s.blocks,children:[(0,u.jsx)(`div`,{className:o.wide,children:(0,u.jsx)(d,{churn:t.churn})}),(0,u.jsx)(f,{density:t.density})]}),(0,u.jsx)(`p`,{className:s.note,children:n.codeNote})]})}export{m as CodeTab};
1
+ import{Ct as e,E as t,a as n,vn as r}from"./cx-DDl6tKXq.js";import{i,n as a,r as o}from"./StatsTabState-BoimPoKm.js";import{t as s}from"./StatsPage.module-D8dvB8Va.js";import{t as c}from"./UnavailableRepos-SpC6Dzwu.js";var l={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},u=r();function d({churn:e}){let{stats:n}=t(),r=e[0]?.score??1;return(0,u.jsxs)(i,{title:n.churnTitle,children:[(0,u.jsx)(`p`,{className:o.muted,children:n.churnHint}),e.length===0?(0,u.jsx)(`p`,{className:o.muted,children:n.churnEmpty}):(0,u.jsx)(`ul`,{className:o.rows,children:e.map(e=>(0,u.jsxs)(`li`,{className:l.churnRow,children:[(0,u.jsx)(`code`,{className:o.rowLabel,children:e.label}),(0,u.jsx)(`span`,{className:o.rowValue,children:n.commits(e.commits)}),(0,u.jsx)(`span`,{className:o.rowValue,children:n.churnTasks(e.tasks,e.weight)}),(0,u.jsx)(`span`,{className:o.track,"aria-hidden":`true`,children:(0,u.jsx)(`span`,{className:o.fill,style:{transform:`scaleX(${e.score/r})`}})})]},e.label))})]})}function f({density:e}){let{stats:n}=t();return(0,u.jsx)(i,{title:n.densityTitle,children:e.projects.length===0?(0,u.jsx)(`p`,{className:o.muted,children:n.noCodeData}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(p,{rows:e.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),e.folders.length>0&&(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`h3`,{className:o.subTitle,children:n.folders}),(0,u.jsx)(p,{rows:e.folders.map(e=>({key:e.label,label:(0,u.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function p({rows:e}){let{stats:n,core:r}=t();return(0,u.jsx)(`ul`,{className:o.rows,children:e.map(({key:e,label:t,row:i})=>(0,u.jsxs)(`li`,{className:l.densityRow,children:[(0,u.jsx)(`span`,{className:o.rowLabel,children:t}),(0,u.jsx)(`span`,{className:o.rowValue,children:r.count(i.lines,`line`)}),(0,u.jsx)(`span`,{className:o.rowValue,children:r.count(i.open,`task`)}),(0,u.jsx)(`span`,{className:o.rowValue,children:i.perKloc===null?`—`:n.perKloc(i.perKloc)})]},e))})}function m(){let{projectId:t}=e(),r=n(t);return(0,u.jsx)(a,{query:r,children:e=>(0,u.jsx)(h,{report:e})})}function h({report:e}){let{stats:n}=t();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c,{repos:e.unavailableRepos}),(0,u.jsxs)(`div`,{className:s.blocks,children:[(0,u.jsx)(`div`,{className:o.wide,children:(0,u.jsx)(d,{churn:e.churn})}),(0,u.jsx)(f,{density:e.density})]}),(0,u.jsx)(`p`,{className:s.note,children:n.codeNote})]})}export{m as CodeTab};
@@ -0,0 +1 @@
1
+ import{Cn as e,Ct as t,E as n,En as r,O as i,P as a,Sn as o,T as s,Tn as c,bn as l,kn as u,o as d,st as f,u as p,vn as m,wn as h,xn as g,yn as _}from"./cx-DDl6tKXq.js";import{i as v,r as y,t as b}from"./StatsTabState-BoimPoKm.js";import{t as x}from"./StatsPage.module-D8dvB8Va.js";import{t as S}from"./Figure-BHBCd7Dt.js";import{t as C}from"./StatsTable-B0tbx68M.js";import{$ as w,A as ee,At as te,B as ne,Ct as re,D as ie,E as ae,Et as oe,F as se,H as ce,I as le,J as ue,K as de,L as fe,M as pe,N as me,O as he,Ot as ge,P as _e,Q as ve,R as ye,S as be,St as T,Tt as E,U as xe,V as Se,W as Ce,X as we,Y as Te,Z as Ee,_ as De,a as Oe,at as ke,b as D,bt as Ae,c as je,ct as Me,d as Ne,dt as O,f as Pe,ft as Fe,g as k,gt as Ie,h as Le,ht as Re,i as A,it as ze,j as Be,k as Ve,l as He,lt as Ue,m as We,mt as j,n as Ge,nt as Ke,o as qe,ot as Je,p as Ye,pt as M,q as Xe,r as N,rt as P,s as Ze,st as Qe,t as $e,tt as F,u as et,ut as tt,v as nt,vt as I,w as rt,x as it,xt as at,y as L,yt as ot,z as st}from"./use-grain-series-Bx70IZvb.js";import{a as ct,i as lt,n as ut,o as dt,r as ft,t as pt}from"./value-dot-B7BsbWBD.js";var mt=h({input:e(),cacheWrite5m:e(),cacheWrite1h:e(),cacheRead:e(),output:e()}),R=l([`cli`,`skill`]);h({slot:r(),cwd:r(),model:r(),kind:l([`hook`,...R.options]),tokens:mt,hookTurns:e()}),h({hookOpen:o(),lastModel:r().nullable(),lastMessageId:r().nullable(),lastMessageTokens:mt.nullable().optional(),pending:c(r(),R),pendingEstimates:g(h({kind:R,chars:e(),slot:r(),cwd:r()}))});function z(e,t){return t===null?`—`:`≈ ${f(e,t)}`}var B=m();function ht({totals:e,days:t}){let{stats:r}=n(),o=s(),c=t.slice(-7),l=a(c.map(e=>e.hookTokens)),u=a(c.map(e=>e.cliTokens)),d=e=>i(o,e);return(0,B.jsxs)(`div`,{className:x.totals,children:[(0,B.jsx)(S,{label:r.backlogTokens,value:d(e.tokens),note:r.backlogTokensNote(d(l),d(u))}),(0,B.jsx)(S,{label:r.apiPrice,value:z(o,e.cost),note:e.hasUnpricedTokens?r.unpricedNote:``}),(0,B.jsx)(S,{label:r.hookTurns,value:d(e.hookTurns),note:r.hookRunsNote(d(e.hookRuns))}),(0,B.jsx)(S,{label:r.cliCalls,value:d(e.cliRuns),note:``})]})}function gt({models:e}){let{stats:t}=n(),r=s();return(0,B.jsx)(v,{title:t.byModel,children:e.length===0?(0,B.jsx)(`p`,{className:y.muted,children:t.noModels}):(0,B.jsx)(C,{label:t.byModel,head:t.modelsHead,rows:e.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?t.fastModel(e.model):e.model,i(r,e.tokens),f(r,e.cost)]}))})})}function _t({commands:e}){let{stats:t}=n(),r=s();return(0,B.jsx)(v,{title:t.commandsTitle,children:e.length===0?(0,B.jsx)(`p`,{className:y.muted,children:t.noCommands}):(0,B.jsx)(C,{label:t.commandsTitle,head:t.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,i(r,e.runs),t.milliseconds(e.avgMs),t.megabytes(e.avgRssMb),t.megabytes(e.maxRssMb)]}))})})}var vt=(e,t,n)=>de(e,`xAxis`,L(e,t),n),yt=(e,t,n)=>ue(e,`xAxis`,L(e,t),n),bt=(e,t,n)=>de(e,`yAxis`,D(e,t),n),xt=(e,t,n)=>ue(e,`yAxis`,D(e,t),n),St=j([P,vt,bt,yt,xt],(e,t,n,r,i)=>Fe(e,`xAxis`)?Qe(t,r,!1):Qe(n,i,!1)),V=j([Te,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),Ct=e=>{var t=P(e);return Fe(t,`xAxis`)?`yAxis`:`xAxis`},wt=(e,t)=>Ct(e)===`yAxis`?D(e,t):L(e,t),Tt=(e,t,n)=>Xe(e,Ct(e),wt(e,t),n),Et=j([V,Tt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=we(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),Dt=j([V,Tt],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(Ae)}}),Ot=j([P,vt,bt,yt,xt,Et,w,St,V,ve,Dt],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return rn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),H=u(_()),kt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],At=[`id`,`baseLine`];function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}function jt(e,t){if(e==null)return{};var n,r,i=Mt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Nt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!M(a)||!M(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return T(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),T(c)?H.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function Pt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!M(a)||!M(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return T(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),T(c)?H.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function Ft(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?H.createElement(Pt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):H.createElement(Nt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function It(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=jt(e,kt),f=s===`vertical`?`vertical`:`horizontal`,p=u??!1,m=Ve(),h=d.id,g=d.baseLine,_=jt(d,At),v=ge(_),y=H.createElement(F,U({},d,{id:h,baseLine:g,connectNulls:p,stroke:`none`,className:`recharts-area-area`,layout:f})),b=l!==`none`&&H.createElement(F,U({},v,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:d.points})),x=l!==`none`&&c&&Array.isArray(g)&&H.createElement(F,U({},v,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:g}));return o&&(i||n<1)?H.createElement(E,null,H.createElement(`defs`,null,H.createElement(`clipPath`,{id:m},H.createElement(Ft,{alpha:n,points:d.points??[],baseLine:g,layout:f,strokeWidth:d.strokeWidth}))),H.createElement(E,{clipPath:`url(#${m})`},y,b,x)):H.createElement(H.Fragment,null,y,b,x)}var Lt=[`id`],Rt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function zt(e,t){if(e==null)return{};var n,r,i=Bt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Vt(Object(n),!0).forEach(function(t){Ht(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ht(e,t,n){return(t=Ut(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ut(e){var t=Wt(e,`string`);return typeof t==`symbol`?t:t+``}function Wt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Gt={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:_e,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[G(G({},e.next),{},{x:I(e.prev.x,e.next.x,t),y:I(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:It,xAxisId:0,yAxisId:0,zIndex:Ee.area};function K(e,t){return e&&e!==`none`?e:t}var Kt=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:K(r,i),value:tt(n,t),payload:e}]},qt=H.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:re,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:tt(o,t),hide:s,type:u,color:K(r,a),unit:c,formatter:l,graphicalItemId:d}};return H.createElement(le,{tooltipEntrySettings:f})});function Jt(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=ge(r);return H.createElement(dt,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Yt(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return G(G({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return H.createElement(st,{value:t?r:void 0},n)}function Xt(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=a.layout,u=a.type,d=a.stroke,f=a.connectNulls,p=a.isRange,m=a.shape,h=a.id,g=zt(a,Lt),_=G(G({},oe(g)),{},{id:h,points:t,connectNulls:f,type:u,baseLine:n,layout:l,stroke:d,isRange:p,animationElapsedTime:o,isAnimating:s,isEntrance:c});return H.createElement(H.Fragment,null,t?.length>1&&H.createElement(E,{clipPath:r?`url(#clipPath-${i})`:void 0},H.createElement(fe,{option:m,DefaultShape:Gt.shape,shapeProps:_})),H.createElement(Jt,{points:t,props:g,clipPathId:i}))}function Zt(e,t,n){if(T(e)){var r=T(t)?t:void 0;return I(r,e,n)}if(at(e)||ot(e)){var i=T(t)?t:void 0;return I(i,0,n)}return e}function Qt(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationMatchBy,p=r.animationInterpolateFn,m=(0,H.useMemo)(()=>({points:o,baseLine:s}),[o,s]),h=pe(m,a),g=ze(),_=Be(r.onAnimationStart,r.onAnimationEnd),v=_.isAnimating,y=_.handleAnimationStart,b=_.handleAnimationEnd,x=h.startValue;if(g==null)return null;var S=Array.isArray(s)&&Array.isArray(x)?me(x,s,f):Array.isArray(s)?me(null,s,f):null;return H.createElement(ee,{animationInput:m,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:y,onAnimationEnd:b,animationInterpolateFn:p,animationMatchBy:f,layout:g},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?p(S,i,g):a?s:Zt(s,x,i);return h.syncStepValue(c,i),H.createElement(Yt,{showLabels:!v,points:o},r.children,H.createElement(Xt,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:v||i<1,isEntrance:a}),H.createElement(ne,{label:r.label}))})}function $t(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,H.useRef)(null),a=(0,H.useRef)();return H.createElement(Qt,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var en=class extends H.PureComponent{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.needClip,c=e.xAxisId,l=e.yAxisId,u=e.width,d=e.height,f=e.id,p=e.baseLine,m=e.zIndex;if(t)return null;var h=te(`recharts-area`,i),g=f,_=lt(n),v=_.r,y=_.strokeWidth,b=ye(n),x=v*2+y,S=s?`url(#clipPath-${b?``:`dots-`}${g})`:void 0;return H.createElement(xe,{zIndex:m},H.createElement(E,{className:h},s&&H.createElement(`defs`,null,H.createElement(it,{clipPathId:g,xAxisId:c,yAxisId:l}),!b&&H.createElement(`clipPath`,{id:`clipPath-dots-${g}`},H.createElement(`rect`,{x:o-x/2,y:a-x/2,width:u+x,height:d+x}))),H.createElement($t,{needClip:s,clipPathId:g,props:this.props})),H.createElement(ct,{points:r,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}),this.props.isRange&&Array.isArray(p)&&H.createElement(ct,{points:p,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}))}};function tn(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=zt(e,Rt),g=ke(),_=Ce(),v=be(p,m).needClip,y=Je(),b=Re(t=>Ot(t,e.id,y))??{},x=b.points,S=b.isRange,C=b.baseLine,w=ae();if(g!==`horizontal`&&g!==`vertical`||w==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var ee=w.height,te=w.width,ne=w.x,re=w.y;return!x||!x.length?null:H.createElement(en,W({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:C,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:ee,hide:l,layout:g,isAnimationActive:u,isRange:S,legendType:d,needClip:v,points:x,stroke:f,width:te,left:ne,top:re,xAxisId:p,yAxisId:m}))}var nn=(e,t,n,r,i)=>{var a=n??t;if(T(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function rn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=nn(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=O(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=O(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>O(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:Me({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:Me({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function an(e){var t=Ie(e,Gt),n=Je();return H.createElement(he,{id:t.id,type:`area`},e=>H.createElement(H.Fragment,null,H.createElement(se,{legendPayload:Kt(t)}),H.createElement(qt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),H.createElement(ie,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Ue(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),H.createElement(tn,W({},t,{id:e}))))}var q=H.memo(an,Ke);q.displayName=`Area`;var on=[`axis`],sn=(0,H.forwardRef)((e,t)=>H.createElement(Le,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:on,tooltipPayloadSearcher:ce,categoricalChartProps:e,ref:t})),J=`var(--chart-line-bright)`,Y=`var(--chart-line-blue)`;function cn(e,t){return N(n=>({title:Ye(t,n.at),rows:[{label:e.processMemory,value:e.megabytes(n.rssMb),shape:`line`,color:J},{label:e.jsHeap,value:e.megabytes(n.heapUsedMb),shape:`dashed`,color:Y}]}))}function ln(){let{stats:e}=n(),t=s(),r=(0,H.useMemo)(()=>cn(e,t),[e,t]),i=[{label:e.processMemory,shape:`line`,color:J},{label:e.jsHeap,shape:`dashed`,color:Y}],a=p().data?.samples??[],o=a.at(-1)?.rssMb??null,c=a.length===0?null:Math.max(...a.map(e=>e.rssMb));return(0,B.jsxs)(v,{title:e.serverMemory,children:[(0,B.jsx)(`p`,{className:y.muted,children:e.memoryRestartNote}),(0,B.jsx)(We,{summary:e.memorySummary(e.megabytes(o),e.megabytes(c)),legend:i,children:(0,B.jsxs)(sn,{data:a,margin:qe,"aria-label":e.chartLabel(e.serverMemory,`sample`),children:[(0,B.jsx)(rt,{vertical:!1}),(0,B.jsx)(De,{dataKey:`at`,tickFormatter:e=>et(t,e),...Ze}),(0,B.jsx)(k,{tickFormatter:t=>e.megabytes(t),width:60,...A}),(0,B.jsx)(Se,{content:r,...je,cursor:{stroke:`var(--line-strong)`}}),(0,B.jsx)(q,{dataKey:`rssMb`,stroke:J,strokeWidth:3,fill:J,fillOpacity:.12,dot:!1,isAnimationActive:!1}),(0,B.jsx)(q,{dataKey:`heapUsedMb`,stroke:Y,strokeWidth:2,strokeDasharray:`5 4`,fill:`none`,dot:!1,isAnimationActive:!1})]})})]})}var X=`var(--chart-bar-warm)`,Z=`var(--chart-bar-neutral)`,Q=`var(--chart-line-green)`,$=`var(--chart-line-yellow)`;function un(e,t,n){return N(r=>({title:e.periodOf(n,Pe(t,r.start)),rows:[{label:e.hookTurnsTooltip,value:e.tokens(r.hookTokens),shape:`bar`,color:X},{label:e.cliOutput,value:e.tokens(r.cliTokens),shape:`bar`,color:Z},{label:e.apiPriceTooltip,value:r.hasUnpricedTokens&&r.cost!==null?`${z(t,r.cost)} (${e.unpricedNote})`:z(t,r.cost)},{label:e.hookRuns,value:i(t,r.hookRuns),shape:`line`,color:Q},{label:e.otherCommands,value:i(t,r.cliRuns),shape:`dashed`,color:$}]}))}function dn({day:e,...t}){return{start:e,...t}}function fn({weeks:e,days:t}){let{stats:r}=n(),i=s(),a=(0,H.useMemo)(()=>t.map(dn),[t]),{grain:o,periods:c,setGrain:l}=$e(`spend`,`day`,{week:e,day:a}),u=(0,H.useMemo)(()=>un(r,i,o),[r,i,o]),d=r.spendBy[o],f=[{label:r.hookTurnTokens,shape:`bar`,color:X},{label:r.cliOutputTokens,shape:`bar`,color:Z},{label:r.hookRuns,shape:`line`,color:Q},{label:r.otherCommands,shape:`dashed`,color:$}],p=e=>Ne(i,e);return(0,B.jsx)(v,{title:d,aside:(0,B.jsx)(Ge,{chart:`spend`,grain:o,onChange:l}),children:(0,B.jsx)(We,{summary:pn(r,i,o,c),legend:f,children:(0,B.jsxs)(ut,{data:c,margin:qe,"aria-label":r.chartLabel(d,o),children:[(0,B.jsx)(rt,{vertical:!1}),(0,B.jsx)(De,{dataKey:`start`,tickFormatter:e=>He(i,e),...Ze}),(0,B.jsx)(k,{yAxisId:`tokens`,tickFormatter:p,width:60,...A}),(0,B.jsx)(k,{yAxisId:`runs`,orientation:`right`,allowDecimals:!1,tickFormatter:p,width:60,...A}),(0,B.jsx)(Se,{content:u,...je}),(0,B.jsx)(nt,{yAxisId:`tokens`,dataKey:`hookTokens`,stackId:`tokens`,fill:X,isAnimationActive:!1}),(0,B.jsx)(nt,{yAxisId:`tokens`,dataKey:`cliTokens`,stackId:`tokens`,fill:Z,radius:Oe,isAnimationActive:!1}),(0,B.jsx)(ft,{yAxisId:`runs`,dataKey:`hookRuns`,stroke:Q,strokeWidth:3,dot:pt(Q),isAnimationActive:!1}),(0,B.jsx)(ft,{yAxisId:`runs`,dataKey:`cliRuns`,stroke:$,strokeWidth:2,strokeDasharray:`5 4`,dot:pt($),isAnimationActive:!1})]})})})}function pn(e,t,n,r){let o=e=>a(r.map(e)),s=e=>i(t,e);return e.spendSummary({grain:n,periodCount:r.length,hookTokens:o(e=>e.hookTokens),cliTokens:s(o(e=>e.cliTokens)),money:f(t,mn(r)),hookRuns:s(o(e=>e.hookRuns)),cliRuns:s(o(e=>e.cliRuns))})}function mn(e){return e.every(e=>e.cost===null)?null:a(e.map(e=>e.cost??0))}function hn(){let{projectId:e}=t(),r=d(e),{stats:i}=n();return(0,B.jsx)(b,{query:r,children:e=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(gn,{scan:e.scan}),(0,B.jsx)(vn,{report:e}),(0,B.jsx)(`p`,{className:x.note,children:i.costNote})]})})}function gn({scan:e}){let{stats:t}=n(),r=_n(t,e);return(0,B.jsx)(`p`,{className:r===null?`visually-hidden`:x.warning,role:`status`,children:r})}function _n(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function vn({report:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ht,{totals:e.totals,days:e.days}),(0,B.jsxs)(`div`,{className:x.blocks,children:[(0,B.jsx)(`div`,{className:y.wide,children:(0,B.jsx)(fn,{weeks:e.weeks,days:e.days})}),(0,B.jsx)(gt,{models:e.models}),(0,B.jsx)(ln,{}),(0,B.jsx)(`div`,{className:y.wide,children:(0,B.jsx)(_t,{commands:e.commands})})]})]})}export{hn as CostTab};
@@ -0,0 +1 @@
1
+ import{A as e,Ct as t,D as n,E as r,O as i,T as a,c as o,k as s,kn as c,vn as l,yn as u}from"./cx-DDl6tKXq.js";import{i as d,n as f,r as p}from"./StatsTabState-BoimPoKm.js";import{t as m}from"./StatsPage.module-D8dvB8Va.js";import{t as h}from"./UnavailableRepos-SpC6Dzwu.js";import{t as g}from"./Figure-BHBCd7Dt.js";import{t as _}from"./StatsTable-B0tbx68M.js";import{H as ee,V as v,_ as y,a as b,c as x,d as S,f as C,g as w,h as T,i as E,l as D,m as O,n as k,o as A,r as j,s as M,t as N,v as P,w as F}from"./use-grain-series-Bx70IZvb.js";var I=c(u()),L=[`axis`,`item`],R=(0,I.forwardRef)((e,t)=>I.createElement(T,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:L,tooltipPayloadSearcher:ee,categoricalChartProps:e,ref:t})),z={steps:`_steps_advmo_1`,now:`_now_advmo_13`},B=l();function V({totals:e}){let{stats:t}=r(),n=a();return(0,B.jsx)(d,{title:t.explainerTitle,children:(0,B.jsxs)(`ol`,{className:z.steps,children:[(0,B.jsx)(`li`,{children:t.explainerTask}),(0,B.jsxs)(`li`,{children:[t.explainerFixed,(0,B.jsx)(H,{children:t.fixedNow(e.fixedTasks,e.fixedLines)})]}),(0,B.jsxs)(`li`,{children:[t.explainerPending,(0,B.jsx)(H,{children:U(t,e)})]}),(0,B.jsxs)(`li`,{children:[t.explainerTests,(0,B.jsx)(H,{children:t.codeAndTests(e)})]}),(0,B.jsxs)(`li`,{children:[t.explainerNoise,(0,B.jsx)(H,{children:W(t,n,e)})]})]})})}function H({children:e}){let{stats:t}=r();return(0,B.jsxs)(`span`,{className:z.now,children:[t.now,` `,e]})}function U(e,t){return t.openTasks===0?e.noPending:t.estimatedLines===null?e.pendingWithoutEstimate(t.openTasks):e.pendingEstimated(t.openTasks,t.estimatedLines,t.estimatedLines/t.openTasks)}function W(t,r,a){if(a.estimatedLines===null&&a.openTasks>0)return t.estimateLater;if(a.noiseShare===null)return t.noCommitsSinceAdoption;let o=a.estimatedLines??0,c=e(a.estimatedLines);return`${n(r,a.deferredLines,c)} ÷ (${i(r,a.realLines)} + ${n(r,o,c)}) ${s(a.noiseShare)}`}var G=`var(--chart-bar-neutral)`,K=`var(--accent-ink)`;function q(e,t,r,i){let a=e=>n(r,e,Math.round(e)>0);return j(n=>({title:e.periodOf(i,C(r,n.start)),rows:[{label:e.inPullRequests,value:t.count(Math.round(n.onTopicLines),`line`),shape:`bar`,color:G},{label:e.deferredSeries,value:a(n.deferredLines),shape:`hatch`,color:K},{label:e.codeLines,value:a(n.deferredLines-n.deferredTestLines)},{label:e.testLines,value:a(n.deferredTestLines)},{label:e.deferredTasks,value:String(n.deferredTasks)}]}))}function J({periods:t,totals:n,grain:i}){let{stats:o,core:c}=r(),l=a(),u=(0,I.useMemo)(()=>q(o,c,l,i),[o,c,l,i]),d=(0,I.useId)(),f=[{label:o.inPullRequests,shape:`bar`,color:G},{label:o.deferredSeries,shape:`hatch`,color:K}],p=o.linesText(n.deferredLines,e(n.estimatedLines)),m=o.effectSummary(n.realLines,p,s(n.noiseShare));return(0,B.jsx)(O,{summary:m,legend:f,children:(0,B.jsxs)(R,{data:t,margin:A,"aria-label":o.chartLabel(o.effectTitle,i),children:[(0,B.jsx)(`defs`,{children:(0,B.jsxs)(`pattern`,{id:d,width:`6`,height:`6`,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:[(0,B.jsx)(`rect`,{width:`6`,height:`6`,fill:`var(--surface-raised)`}),(0,B.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`6`,stroke:K,strokeWidth:`3`})]})}),(0,B.jsx)(F,{vertical:!1}),(0,B.jsx)(y,{dataKey:`start`,tickFormatter:e=>D(l,e),...M}),(0,B.jsx)(w,{tickFormatter:e=>S(l,e),width:60,...E}),(0,B.jsx)(v,{content:u,...x}),(0,B.jsx)(P,{dataKey:`onTopicLines`,stackId:`lines`,fill:G,isAnimationActive:!1}),(0,B.jsx)(P,{dataKey:`deferredLines`,stackId:`lines`,fill:`url(#${d})`,radius:b,isAnimationActive:!1})]})})}function Y({totals:e}){let{stats:t}=r(),n=a();return(0,B.jsxs)(`div`,{className:m.totals,children:[(0,B.jsx)(g,{label:t.keptOut,value:X(t,e),note:`${Z(t,n,e)} · ${t.codeAndTests(e)}`}),(0,B.jsx)(g,{label:t.noiseWithoutBacklog,value:s(e.noiseShare),note:t.noiseNote}),(0,B.jsx)(g,{label:t.deferredToBacklog,value:String(e.fixedTasks+e.openTasks),note:t.deferredNote(e.fixedTasks,e.openTasks)}),(0,B.jsx)(g,{label:t.pullRequestLines,value:i(n,e.realLines),note:t.sinceAdoption})]})}function X(t,n){return n.estimatedLines===null?t.linesText(n.fixedLines,!1):t.linesText(n.deferredLines,e(n.estimatedLines))}function Z(t,r,a){let o=i(r,a.fixedLines);return a.estimatedLines===null?t.keptOutPending(o):t.keptOutEstimated(o,n(r,a.estimatedLines,e(a.estimatedLines)))}function Q({weeks:e,days:t,totals:n}){let{stats:i}=r(),{grain:a,periods:o,setGrain:s}=N(`effect`,`week`,{week:e,day:t});return(0,B.jsx)(d,{title:i.effectTitle,aside:(0,B.jsx)(k,{chart:`effect`,grain:a,onChange:s}),children:(0,B.jsx)(J,{periods:o,totals:n,grain:a})})}function $({projects:t}){let{stats:o}=r(),c=a();return(0,B.jsx)(d,{title:o.byProject,children:t.length===0?(0,B.jsx)(`p`,{className:p.muted,children:o.noCodeData}):(0,B.jsx)(_,{label:o.byProject,head:o.projectsHead,rows:t.map(t=>({key:t.projectId,cells:[t.name,t.deferredTasks,i(c,t.fixedLines),t.estimatedLines===null?`—`:n(c,t.estimatedLines,e(t.estimatedLines)),i(c,t.realLines),s(t.noiseShare)]}))})})}function te(){let{projectId:e}=t(),n=o(e);return(0,B.jsx)(f,{query:n,children:e=>(0,B.jsx)(ne,{report:e})})}function ne({report:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(h,{repos:e.unavailableRepos}),(0,B.jsx)(Y,{totals:e.totals}),(0,B.jsxs)(`div`,{className:m.blocks,children:[(0,B.jsx)(`div`,{className:p.wide,children:(0,B.jsx)(Q,{weeks:e.weeks,days:e.days,totals:e.totals})}),(0,B.jsx)(`div`,{className:p.wide,children:(0,B.jsx)($,{projects:e.projects})}),(0,B.jsx)(`div`,{className:p.wide,children:(0,B.jsx)(V,{totals:e.totals})})]})]})}export{te as EffectTab};
@@ -0,0 +1 @@
1
+ import{kn as e,t,vn as n,yn as r}from"./cx-DDl6tKXq.js";import{t as i}from"./StatsPage.module-D8dvB8Va.js";var a=e(r(),1),o=n();function s({label:e,value:n,note:r,tone:s,trend:c}){let l=(0,a.useId)();return(0,o.jsxs)(`div`,{className:i.figure,role:`group`,"aria-labelledby":l,children:[(0,o.jsx)(`span`,{id:l,className:i.figureLabel,children:e}),(0,o.jsx)(`span`,{className:t(i.figureValue,s===`growth`&&i.growth,s===`decline`&&i.decline),children:n}),c!==void 0&&(0,o.jsxs)(`span`,{className:t(i.figureTrend,c.better?i.decline:i.growth),children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,children:c.text}),(0,o.jsx)(`span`,{className:`visually-hidden`,children:c.speech})]}),(0,o.jsx)(`span`,{className:i.figureNote,children:r})]})}export{s as t};
@@ -0,0 +1 @@
1
+ import{Ct as e,E as t,I as n,M as r,P as i,T as a,_ as o,j as s,kn as c,t as l,vn as u,yn as d}from"./cx-DDl6tKXq.js";import{l as f,s as p}from"./start-YlC0KTe5.js";import{i as m,n as h,r as g}from"./StatsTabState-BoimPoKm.js";import{t as _}from"./StatsPage.module-D8dvB8Va.js";import{t as v}from"./Figure-BHBCd7Dt.js";import{V as y,_ as b,a as x,c as S,d as C,f as w,g as T,i as E,l as D,m as O,n as k,o as A,r as j,s as M,t as N,v as P,w as F}from"./use-grain-series-Bx70IZvb.js";import{n as I,r as L,t as R}from"./value-dot-B7BsbWBD.js";var z={columns:`_columns_1m2da_1`,countList:`_countList_1m2da_7`,ageRows:`_ageRows_1m2da_11`,ageRow:`_ageRow_1m2da_11`,ageLabel:`_ageLabel_1m2da_25`,ageTrack:`_ageTrack_1m2da_29`,ageSegment:`_ageSegment_1m2da_37`,legend:`_legend_1m2da_41`,legendItem:`_legendItem_1m2da_50`,share:`_share_1m2da_61`,critical:`_critical_1m2da_65`,high:`_high_1m2da_69`,medium:`_medium_1m2da_73`,low:`_low_1m2da_77`,done:`_done_1m2da_81`,fixed:`_fixed_1m2da_85`,obsolete:`_obsolete_1m2da_89`,duplicate:`_duplicate_1m2da_93`,cancelled:`_cancelled_1m2da_97`,unknown:`_unknown_1m2da_101`,shareBar:`_shareBar_1m2da_105`,alarm:`_alarm_1m2da_117`,alarmOn:`_alarmOn_1m2da_123`},B=u();function ee(e,t){let r=[...n].reverse().filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return r.length===0?``:` (${r.join(`, `)})`}function V({age:e}){let{stats:r,core:a}=t(),o=e.buckets.map(({bucket:e,byPriority:t})=>({bucket:e,total:i(n.map(e=>t[e])),byPriority:t})),s=Math.max(1,...o.map(({total:e})=>e)),c=o.map(({bucket:e,total:t,byPriority:n})=>`${r.ageBuckets[e]}: ${t}${ee(r,n)}`).join(`; `);return(0,B.jsxs)(m,{title:r.openAge,children:[(0,B.jsx)(`div`,{role:`img`,"aria-label":c,className:z.ageRows,children:o.map(({bucket:e,total:t,byPriority:i})=>(0,B.jsxs)(`div`,{className:z.ageRow,"aria-hidden":`true`,children:[(0,B.jsx)(`span`,{className:z.ageLabel,children:r.ageBuckets[e]}),(0,B.jsx)(`span`,{className:z.ageTrack,children:n.map(e=>(0,B.jsx)(`span`,{className:l(z.ageSegment,z[e]),style:{width:`${i[e]/s*100}%`}},e))}),(0,B.jsx)(`span`,{className:g.rowValue,children:t})]},e))}),(0,B.jsx)(`p`,{className:z.legend,children:[...n].reverse().map(e=>(0,B.jsx)(`span`,{className:l(z.legendItem,z[e]),children:a.priorityLabel(e)},e))}),(0,B.jsx)(`p`,{className:l(z.alarm,e.urgentStale>0&&z.alarmOn),children:r.urgentStale(e.urgentStale)})]})}var H=[`done`,`fixed`,`obsolete`,`duplicate`,`cancelled`,`unknown`];function U(e,{stats:t,core:n}){return e===`done`||e===`cancelled`||e===`unknown`?t.closingReasons[e]:n.resolutionLabel(e)}function te({closing:e}){let n=t(),{stats:r}=n,a=i(H.map(t=>e.byReason[t])),o=H.map(t=>`${U(t,n)}: ${e.byReason[t]}`).join(`; `);return(0,B.jsxs)(m,{title:r.closing,children:[(0,B.jsx)(`div`,{role:`img`,"aria-label":o,className:z.shareBar,children:H.map(t=>(0,B.jsx)(`span`,{className:l(z.share,z[t]),style:{width:a===0?0:`${e.byReason[t]/a*100}%`}},t))}),(0,B.jsx)(`ul`,{className:g.rows,children:H.map(t=>(0,B.jsxs)(`li`,{className:g.row,children:[(0,B.jsx)(`span`,{className:l(z.legendItem,z[t]),children:U(t,n)}),(0,B.jsx)(`span`,{className:g.rowValue,children:e.byReason[t]})]},t))}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h3`,{className:g.subTitle,children:r.noiseAndReopens}),(0,B.jsxs)(`ul`,{className:g.rows,children:[(0,B.jsx)(W,{label:r.duplicatesAmongClosed,value:s(e.duplicateShare)}),(0,B.jsx)(W,{label:r.noSourceAmongCreated,value:s(e.withoutSourceShare)}),(0,B.jsx)(W,{label:r.reopened,value:e.reopened})]})]})]})}function W({label:e,value:t}){return(0,B.jsxs)(`li`,{className:g.row,children:[(0,B.jsx)(`span`,{className:g.rowLabel,children:e}),(0,B.jsx)(`span`,{className:g.rowValue,children:t})]})}var ne=`↓`,re=`↑`;function G(e,t,n,r){if(t===null||n===null)return;let i=t-n;if(i===0)return;let a=i<0,o=r(Math.abs(i));return{text:e.weekTrend(a?ne:re,o),speech:e.weekTrendSpeech(o,a),better:a}}function K({hotspots:e,listPath:n}){let{stats:r}=t();return(0,B.jsx)(m,{title:r.hotspots,children:(0,B.jsxs)(`div`,{className:z.columns,children:[(0,B.jsx)(q,{title:r.folders,empty:r.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,B.jsx)(`code`,{children:e}),count:t}))}),(0,B.jsx)(q,{title:r.tags,empty:r.noTags,items:e.tags.map(({tag:e,count:t})=>({key:e,label:(0,B.jsxs)(f,{to:{pathname:n,search:`tag=${encodeURIComponent(e)}`},children:[`#`,e]}),count:t}))})]})})}function q({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,B.jsxs)(`div`,{className:z.countList,children:[(0,B.jsx)(`h3`,{className:g.subTitle,children:e}),n.length===0?(0,B.jsx)(`p`,{className:g.muted,children:t}):(0,B.jsx)(`ul`,{className:g.rows,children:n.map(e=>(0,B.jsxs)(`li`,{className:g.countRow,children:[(0,B.jsx)(`span`,{className:g.rowLabel,children:e.label}),(0,B.jsx)(`span`,{className:g.rowValue,children:e.count}),(0,B.jsx)(`span`,{className:g.track,"aria-hidden":`true`,children:(0,B.jsx)(`span`,{className:g.fill,style:{transform:`scaleX(${e.count/r})`}})})]},e.key))})]})}var J=c(d(),1),Y=`var(--chart-bar-neutral)`,X=`var(--chart-bar-green)`,Z=`var(--chart-line-bright)`;function ie(e,t,n){return j(r=>({title:e.periodOf(n,w(t,r.start)),rows:[{label:e.flowCreated,value:String(r.created),shape:`bar`,color:Y},{label:e.flowClosed,value:String(r.closed),shape:`bar`,color:X},{label:e.flowOpen,value:String(r.openAtEnd),shape:`line`,color:Z}]}))}function ae({weeks:e,days:n}){let{stats:r}=t(),o=a(),{grain:s,periods:c,setGrain:l}=N(`flow`,`week`,{week:e,day:n}),u=(0,J.useMemo)(()=>ie(r,o,s),[r,o,s]),d=[{label:r.flowCreated,shape:`bar`,color:Y},{label:r.flowClosed,shape:`bar`,color:X},{label:r.flowOpenAtEnd[s],shape:`line`,color:Z}],f=r.debtBy[s],p=r.flowSummary({grain:s,periodCount:c.length,created:i(c.map(e=>e.created)),closed:i(c.map(e=>e.closed)),openNow:c.at(-1)?.openAtEnd??0}),h=e=>C(o,e);return(0,B.jsx)(m,{title:f,aside:(0,B.jsx)(k,{chart:`flow`,grain:s,onChange:l}),children:(0,B.jsx)(O,{summary:p,legend:d,children:(0,B.jsxs)(I,{data:c,margin:A,"aria-label":r.chartLabel(f,s),children:[(0,B.jsx)(F,{vertical:!1}),(0,B.jsx)(b,{dataKey:`start`,tickFormatter:e=>D(o,e),...M}),(0,B.jsx)(T,{yAxisId:`flow`,allowDecimals:!1,tickFormatter:h,width:60,...E}),(0,B.jsx)(T,{yAxisId:`open`,orientation:`right`,allowDecimals:!1,tickFormatter:h,width:60,...E}),(0,B.jsx)(y,{content:u,...S}),(0,B.jsx)(P,{yAxisId:`flow`,dataKey:`created`,fill:Y,radius:x,isAnimationActive:!1}),(0,B.jsx)(P,{yAxisId:`flow`,dataKey:`closed`,fill:X,radius:x,isAnimationActive:!1}),(0,B.jsx)(L,{yAxisId:`open`,dataKey:`openAtEnd`,stroke:Z,strokeWidth:3,dot:R(Z),isAnimationActive:!1})]})})})}var Q=`var(--chart-bar-warm)`;function $(e,t,n,r){return j(i=>({title:e.periodOf(r,w(n,i.start)),rows:[{label:e.flowCreated,value:t.count(i.created,`task`),shape:`bar`,color:Q}]}))}function oe({weeks:e,days:n}){let{stats:r,core:o}=t(),s=a(),{grain:c,periods:l,setGrain:u}=N(`intake`,`day`,{week:e,day:n}),d=(0,J.useMemo)(()=>$(r,o,s,c),[r,o,s,c]),f=[{label:r.createdTasks,shape:`bar`,color:Q}],p=r.createdBy[c];return(0,B.jsx)(m,{title:p,aside:(0,B.jsx)(k,{chart:`intake`,grain:c,onChange:u}),children:(0,B.jsx)(O,{summary:r.intakeSummary(c,l.length,i(l.map(e=>e.created))),legend:f,children:(0,B.jsxs)(I,{data:l,margin:A,"aria-label":r.chartLabel(p,c),children:[(0,B.jsx)(F,{vertical:!1}),(0,B.jsx)(b,{dataKey:`start`,tickFormatter:e=>D(s,e),...M}),(0,B.jsx)(T,{allowDecimals:!1,tickFormatter:e=>C(s,e),width:60,...E}),(0,B.jsx)(y,{content:d,...S}),(0,B.jsx)(P,{dataKey:`created`,fill:Q,radius:x,isAnimationActive:!1})]})})})}function se(){let{projectId:t}=e(),n=o(t);return(0,B.jsx)(h,{query:n,children:e=>(0,B.jsx)(ce,{report:e,listPath:p(t)})})}function ce({report:e,listPath:t}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(le,{totals:e.totals}),(0,B.jsxs)(`div`,{className:_.blocks,children:[(0,B.jsx)(ae,{weeks:e.weeks,days:e.days}),(0,B.jsx)(oe,{weeks:e.weeks,days:e.days}),(0,B.jsx)(K,{hotspots:e.hotspots,listPath:t}),(0,B.jsx)(V,{age:e.age}),(0,B.jsx)(te,{closing:e.closing})]})]})}function le({totals:e}){let{stats:n}=t(),i=e.createdLastWeek-e.closedLastWeek,a=e.previous;return(0,B.jsxs)(`div`,{className:l(_.totals,_.totalsPair),children:[(0,B.jsx)(v,{label:n.tasksToday,value:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`span`,{className:e.createdToday>0?_.growth:void 0,children:[`+`,e.createdToday]}),` `,(0,B.jsxs)(`span`,{className:e.closedToday>0?_.decline:void 0,children:[`−`,e.closedToday]})]}),note:n.createdAndClosed}),(0,B.jsx)(v,{label:n.thisWeek,value:r(i),tone:ue(i),note:n.weekNote(e.createdLastWeek,e.closedLastWeek),trend:G(n,i,a?.net??null,String)})]})}function ue(e){if(e>0)return`growth`;if(e<0)return`decline`}export{se as OverviewTab};
@@ -0,0 +1 @@
1
+ import{Ct as e,E as t,P as n,T as r,f as i,j as a,kn as o,vn as s,yn as c}from"./cx-DDl6tKXq.js";import{i as l,n as u,r as d}from"./StatsTabState-BoimPoKm.js";import{t as f}from"./StatsPage.module-D8dvB8Va.js";import{t as p}from"./StatsTable-B0tbx68M.js";import{V as m,_ as h,a as g,c as _,f as v,g as y,i as b,l as x,m as S,n as C,o as w,r as T,s as E,t as D,v as O,w as k}from"./use-grain-series-Bx70IZvb.js";import{n as A,r as j,t as M}from"./value-dot-B7BsbWBD.js";var N=o(c(),1),P=s(),F=`var(--chart-bar-neutral)`,I=`var(--chart-line-green)`;function L(e,t,n){return T(r=>({title:e.periodOf(n,v(t,r.start)),rows:[{label:e.decidedCandidates,value:String(r.decided),shape:`bar`,color:F},{label:e.precision,value:a(r.precision),shape:`line`,color:I}]}))}function R({periods:e,grain:i}){let{stats:o}=t(),s=r(),c=(0,N.useMemo)(()=>L(o,s,i),[o,s,i]),l=[{label:o.decidedCandidates,shape:`bar`,color:F},{label:o.precision,shape:`line`,color:I}],u=n(e.map(e=>e.decided)),d=e.filter(e=>e.precision!==null).at(-1),f=o.accuracySummary({grain:i,periodCount:e.length,decided:u,latestPrecision:d===void 0?null:a(d.precision)});return(0,P.jsx)(S,{summary:f,legend:l,children:(0,P.jsxs)(A,{data:e,margin:w,"aria-label":o.chartLabel(o.accuracyTitle,i),children:[(0,P.jsx)(k,{vertical:!1}),(0,P.jsx)(h,{dataKey:`start`,tickFormatter:e=>x(s,e),...E}),(0,P.jsx)(y,{yAxisId:`decided`,width:60,...b}),(0,P.jsx)(y,{yAxisId:`precision`,orientation:`right`,domain:[0,1],tickFormatter:e=>`${Math.round(e*100)}%`,width:60,...b}),(0,P.jsx)(m,{content:c,..._}),(0,P.jsx)(O,{yAxisId:`decided`,dataKey:`decided`,fill:F,radius:g,isAnimationActive:!1}),(0,P.jsx)(j,{yAxisId:`precision`,type:`monotone`,dataKey:`precision`,stroke:I,strokeWidth:2,connectNulls:!0,dot:M(I),isAnimationActive:!1})]})})}function z({rows:e,weeks:n,days:r,methodRows:i,matchRows:o}){let{stats:s,core:c}=t(),{grain:u,periods:f,setGrain:m}=D(`accuracy`,`week`,{week:n,day:r}),h=e=>e===`source-changed`?i.map(e=>B(s,e,e.by===`unknown`?s.beforeMethodRecorded:s.checkedBy(c.checkMethodLabel(e.by)))):e===`duplicate`?o.map(e=>B(s,e,e.by===`unknown`?s.beforeMatchRecorded:s.matchedBy(c.duplicateMatchLabel(e.by)))):[];return(0,P.jsx)(l,{title:s.accuracyTitle,aside:e.length===0?void 0:(0,P.jsx)(C,{chart:`accuracy`,grain:u,onChange:m}),children:e.length===0?(0,P.jsx)(`p`,{className:d.muted,children:s.noCandidates}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{className:d.muted,children:s.accuracyHint}),(0,P.jsx)(R,{periods:f,grain:u}),(0,P.jsx)(p,{label:s.accuracyTable,head:s.accuracyHead,rows:e.flatMap(e=>[{key:e.evidence,tone:e.evidence===`total`?`total`:void 0,cells:[c.evidenceLabel(e.evidence),e.candidates,e.closed,e.verified,e.open,a(e.precision)]},...h(e.evidence).map(t=>({...t,key:`${e.evidence}-${t.key}`}))])})]})})}function B(e,t,n){return{key:t.by,tone:`child`,cells:[e.splitRow(n),t.candidates,t.closed,t.verified,t.open,a(t.precision)]}}function V({graph:e}){let{stats:n,core:r}=t(),{projects:i,filter:a}=e;return a.filtered===0&&i.every(e=>e.state===`none`)?(0,P.jsx)(l,{title:n.graphTitle,children:(0,P.jsx)(`p`,{className:d.muted,children:n.graphMissing(e=>(0,P.jsx)(`code`,{children:e},e))})}):(0,P.jsxs)(l,{title:n.graphTitle,children:[(0,P.jsx)(`p`,{className:d.muted,children:n.graphHint}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:n.filteredTitle}),a.filtered===0?(0,P.jsx)(`p`,{className:d.muted,children:n.nothingFiltered}):(0,P.jsx)(p,{label:n.filteredTable,head:n.filteredHead,rows:[{key:`filtered`,cells:[n.filteredByGraph,a.filtered]},{key:`caught`,cells:[n.filteredCaught,a.caught]},{key:`missed`,cells:[n.filteredMissed,a.missed]},{key:`quiet`,cells:[n.filteredQuiet,a.quiet]}]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:n.projects}),(0,P.jsx)(p,{label:n.graphByProject,head:n.graphHead,rows:i.map(e=>({key:e.projectId,cells:[e.name,r.graphStateLabel(e.state),e.pinned,H(e)]}))})]})]})}function H({state:e,pinned:t,resolved:n}){return e===`none`||e===`unreadable`?`—`:`${n} (${a(t===0?null:n/t)})`}function U({rows:e}){let{stats:n,core:r}=t(),i=e=>e.category===`unknown`?n.categoryUnknown:r.categoryLabel(e.category??void 0);return(0,P.jsx)(l,{title:n.categoriesTitle,children:e.length===0?(0,P.jsx)(`p`,{className:d.muted,children:n.categoriesEmpty}):(0,P.jsx)(p,{label:n.categoriesTitle,head:n.categoriesHead,rows:e.map(e=>({key:e.category??`none`,cells:[i(e),e.open,e.weight,e.created,e.closed]}))})})}function W({found:e,branches:n}){let{stats:r}=t(),i=e=>e.found===null?r.foundNotRecorded:e.found===`unknown`?r.foundUnknown:r.foundLabels[e.found];return(0,P.jsxs)(l,{title:r.originTitle,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:r.foundTitle}),(0,P.jsx)(p,{label:r.foundTitle,head:r.foundHead,rows:e.map(e=>({key:e.found??`not-recorded`,cells:[i(e),e.created,e.open,e.fixed]}))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:d.subTitle,children:r.branchesTitle}),n.length===0?(0,P.jsx)(`p`,{className:d.muted,children:r.branchesEmpty}):(0,P.jsx)(p,{label:r.branchesTitle,head:r.branchesHead,rows:n.map(e=>({key:e.label,cells:[(0,P.jsx)(`code`,{children:e.label}),e.created,e.open]}))})]})]})}function G(){let{projectId:t}=e(),n=i(t);return(0,P.jsx)(u,{query:n,children:e=>(0,P.jsx)(K,{report:e})})}function K({report:e}){return(0,P.jsxs)(`div`,{className:f.blocks,children:[(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(z,{rows:e.accuracy,weeks:e.accuracyWeeks,days:e.accuracyDays,methodRows:e.methodAccuracy,matchRows:e.matchAccuracy})}),(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(V,{graph:e.graph})}),(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(U,{rows:e.categories})}),(0,P.jsx)(`div`,{className:d.wide,children:(0,P.jsx)(W,{found:e.found,branches:e.branches})})]})}export{G as QualityTab};
@@ -0,0 +1 @@
1
+ import{Ct as e,E as t,Kt as n,_t as r,bt as i,d as a,g as o,kn as s,t as c,vn as l,yn as u}from"./cx-DDl6tKXq.js";import{a as d,c as f,l as p,o as m,t as h,u as g}from"./start-YlC0KTe5.js";import{t as _}from"./StatsPage.module-D8dvB8Va.js";var v=s(u(),1),y=l();function b(){let{projectId:s}=e(),{pathname:l}=r(),u=a(),b=o(s),{app:x,core:S,stats:C}=t(),w=s===void 0?C.projects:d(u.data,s),T=C.heading(w),E=f(s),D=e=>e===``?E:`${E}/${e}`,O=(e,t)=>n({path:D(e),end:!0},t)!==null,k=h.find(e=>e.segment!==``&&O(e.segment,l))??h[0],A=i().location?.pathname,j=(0,v.useRef)(null),M=A===void 0?void 0:h.find(e=>O(e.segment,A)),N=C.docTitle(k.segment===``?T:`${C.tabs[k.key]} · ${T}`);return(0,v.useEffect)(()=>{document.title=N},[N]),(0,y.jsxs)(`main`,{id:`content`,tabIndex:-1,className:_.page,"aria-busy":M!==void 0||void 0,children:[(0,y.jsx)(`h1`,{ref:j,tabIndex:-1,className:_.heading,children:T}),s===void 0&&u.data!==void 0&&(0,y.jsx)(`p`,{className:_.scopeNote,children:m(u.data,x)}),(b.data?.signals.length??0)>0&&(0,y.jsxs)(`div`,{className:_.signals,role:`status`,"aria-labelledby":`stats-signals-heading`,children:[(0,y.jsx)(`strong`,{id:`stats-signals-heading`,className:_.signalsTitle,children:C.alerts}),(0,y.jsx)(`ul`,{children:b.data?.signals.map(e=>(0,y.jsx)(`li`,{children:S.signal(e)},e.kind))})]}),(0,y.jsx)(`nav`,{className:_.tabs,"aria-label":C.tabsLabel,children:h.map(e=>(0,y.jsx)(p,{to:D(e.segment),className:c(_.tab,e===k&&_.tabActive,e===M&&_.tabPending),"aria-current":e===k?`page`:void 0,children:C.tabs[e.key]},e.key))}),(0,y.jsx)(g,{context:{heading:j}})]})}export{b as StatsPage};
@@ -0,0 +1 @@
1
+ import{E as e,S as t,St as n,T as r,it as i,kn as a,t as o,vn as s,yn as c}from"./cx-DDl6tKXq.js";import{i as l,r as u}from"./start-YlC0KTe5.js";import{t as d}from"./StatsPage.module-D8dvB8Va.js";var f=a(c(),1),p={panel:`_panel_1ke0e_1`,head:`_head_1ke0e_14`,title:`_title_1ke0e_21`},m=s();function h({title:e,aside:t,children:n}){let r=(0,f.useId)();return(0,m.jsxs)(`section`,{className:p.panel,"aria-labelledby":r,children:[(0,m.jsxs)(`div`,{className:p.head,children:[(0,m.jsx)(`h2`,{id:r,className:p.title,children:e}),t]}),n]})}var g={muted:`_muted_14ll2_1`,subTitle:`_subTitle_14ll2_7`,rows:`_rows_14ll2_14`,countRow:`_countRow_14ll2_28`,row:`_row_14ll2_14`,rowLabel:`_rowLabel_14ll2_41`,rowValue:`_rowValue_14ll2_58`,wide:`_wide_14ll2_64`,track:`_track_14ll2_68`,fill:`_fill_14ll2_75`,grain:`_grain_14ll2_82`};function _({query:r,emptyMessage:i=null,children:a}){let{stats:s}=e(),{error:c,data:f,isFetching:p}=r,h=f!==void 0,g=c instanceof t&&c.status===404,_=g?null:c,v=c===null&&!h,b=y(s,c,g,h,i),{status:x,keepFocus:S}=u(b===null&&_===null,n()?.heading);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{ref:x,tabIndex:-1,role:`status`,"aria-live":`polite`,className:b===null&&_===null?`visually-hidden`:o(d.hint,v&&d.hintLoading),children:[b!==null&&(0,m.jsx)(`p`,{children:b}),_!==null&&(0,m.jsx)(l,{error:_,fetching:p,onRetry:()=>{S(),r.refetch()}})]}),!g&&f!==void 0&&i===null&&(0,m.jsx)(`div`,{className:d.content,children:a(f)})]})}function v({query:t,children:n}){let{stats:i}=e(),a=r(),o=t.data?.invalidJournalLines??0,s=t.data?.unknownJournalLines??0,c=t.data?.unparsedTasks??0,l=[o>0?i.invalidJournalLines(o):null,s>0?i.unknownJournalLines(s):null,c>0?i.unparsedTasks(c):null].filter(e=>e!==null);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`p`,{className:l.length>0?d.warning:`visually-hidden`,role:`status`,children:l.join(` `)}),(0,m.jsx)(_,{query:t,emptyMessage:t.data?.taskCount===0?i.noTasks:null,children:e=>(0,m.jsxs)(m.Fragment,{children:[n(e),(0,m.jsx)(`p`,{className:d.note,children:b(i,a,e.journalSince)})]})})]})}function y(e,t,n,r,i){return n?e.projectNotFound:t===null?r?i:e.loading:null}function b(e,t,n){return n===null?e.journalEmpty:e.journalSince(i(t,n))}export{h as i,v as n,g as r,_ as t};
@@ -1 +1 @@
1
- import{E as e,gn as t}from"./cx-Cfec8QGz.js";var n={scroll:`_scroll_14ae0_1`,table:`_table_14ae0_14`,child:`_child_14ae0_45`,total:`_total_14ae0_49`},r=t();function i({label:t,head:i,rows:a}){let{stats:o}=e();return(0,r.jsx)(`div`,{className:n.scroll,tabIndex:0,role:`region`,"aria-label":o.tableLabel(t),children:(0,r.jsxs)(`table`,{className:n.table,children:[(0,r.jsx)(`thead`,{children:(0,r.jsx)(`tr`,{children:i.map(e=>(0,r.jsx)(`th`,{scope:`col`,children:e},e))})}),(0,r.jsx)(`tbody`,{children:a.map(e=>(0,r.jsx)(`tr`,{className:e.tone&&n[e.tone],children:e.cells.map((e,t)=>t===0?(0,r.jsx)(`th`,{scope:`row`,children:e},i[t]):(0,r.jsx)(`td`,{children:e},i[t]))},e.key))})]})})}export{i as t};
1
+ import{E as e,vn as t}from"./cx-DDl6tKXq.js";var n={scroll:`_scroll_14ae0_1`,table:`_table_14ae0_14`,child:`_child_14ae0_45`,total:`_total_14ae0_49`},r=t();function i({label:t,head:i,rows:a}){let{stats:o}=e();return(0,r.jsx)(`div`,{className:n.scroll,tabIndex:0,role:`region`,"aria-label":o.tableLabel(t),children:(0,r.jsxs)(`table`,{className:n.table,children:[(0,r.jsx)(`thead`,{children:(0,r.jsx)(`tr`,{children:i.map(e=>(0,r.jsx)(`th`,{scope:`col`,children:e},e))})}),(0,r.jsx)(`tbody`,{children:a.map(e=>(0,r.jsx)(`tr`,{className:e.tone&&n[e.tone],children:e.cells.map((e,t)=>t===0?(0,r.jsx)(`th`,{scope:`row`,children:e},i[t]):(0,r.jsx)(`td`,{children:e},i[t]))},e.key))})]})})}export{i as t};
@@ -1 +1 @@
1
- import{E as e,gn as t}from"./cx-Cfec8QGz.js";import{t as n}from"./StatsPage.module-D8dvB8Va.js";var r=t();function i({repos:t}){let{stats:i}=e();return t.map(e=>(0,r.jsx)(`p`,{className:n.warning,role:`status`,children:i.unavailableRepo(e)},e))}export{i as t};
1
+ import{E as e,vn as t}from"./cx-DDl6tKXq.js";import{t as n}from"./StatsPage.module-D8dvB8Va.js";var r=t();function i({repos:t}){let{stats:i}=e();return t.map(e=>(0,r.jsx)(`p`,{className:n.warning,role:`status`,children:i.unavailableRepo(e)},e))}export{i as t};