p-backlog 0.8.0 → 0.9.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.
- package/CHANGELOG.md +55 -0
- package/README.md +13 -7
- package/README.ru.md +13 -6
- package/dist/cli.js +1887 -1634
- package/dist/web/assets/CodeTab-DvFAuZ83.js +1 -0
- package/dist/web/assets/CostTab-1Rdp5nwz.js +1 -0
- package/dist/web/assets/EffectTab-8aARbrne.js +1 -0
- package/dist/web/assets/Figure-CCcsLfB5.js +1 -0
- package/dist/web/assets/OverviewTab-DvBBhF85.js +1 -0
- package/dist/web/assets/QualityTab-TBeOxc7b.js +1 -0
- package/dist/web/assets/ShareBar-C_mQiINj.js +1 -0
- package/dist/web/assets/StatsPage-B5K4_4Wb.css +1 -0
- package/dist/web/assets/StatsPage-DtpkiP-4.js +1 -0
- package/dist/web/assets/StatsPage.module-DrfzjXrP.js +1 -0
- package/dist/web/assets/StatsTabState-BmkJh8eP.js +1 -0
- package/dist/web/assets/StatsTable-B9Rm04sJ.css +1 -0
- package/dist/web/assets/{StatsTable-Cgps5a7q.js → StatsTable-C5qAHApf.js} +1 -1
- package/dist/web/assets/UnavailableRepos-ctosBCJf.js +1 -0
- package/dist/web/assets/cx-DvgIdypj.js +55 -0
- package/dist/web/assets/index-NfqY6Vxd.js +2 -0
- package/dist/web/assets/start-BG-1CZwx.css +1 -0
- package/dist/web/assets/start-jnWYnN9h.js +41 -0
- package/dist/web/assets/{use-grain-panel-BGlDN-LS.js → use-grain-panel-DRZkQL7T.js} +3 -3
- package/dist/web/assets/{value-dot-CtJcBhqS.js → value-dot-BJdkleLN.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +5 -3
- package/skill/backlog/SKILL.md +20 -14
- package/skill/backlog-en/SKILL.md +22 -15
- package/dist/web/assets/CodeTab-Bxau23jK.js +0 -1
- package/dist/web/assets/CostTab-DAg9JKi5.js +0 -1
- package/dist/web/assets/EffectTab-DOyEtT1Y.js +0 -1
- package/dist/web/assets/Figure-C7wdv_hC.js +0 -1
- package/dist/web/assets/OverviewTab-O4vRhy4D.js +0 -1
- package/dist/web/assets/QualityTab-BwxhR0Ug.js +0 -1
- package/dist/web/assets/ShareBar-r80rkujo.js +0 -1
- package/dist/web/assets/StatsPage-CHUVlZXv.css +0 -1
- package/dist/web/assets/StatsPage-DxV4wLv5.js +0 -1
- package/dist/web/assets/StatsPage.module-DxtnhZOJ.js +0 -1
- package/dist/web/assets/StatsTabState-UUAoUbji.js +0 -1
- package/dist/web/assets/StatsTable-Z9x-Xaha.css +0 -1
- package/dist/web/assets/UnavailableRepos-Dzu7etxJ.js +0 -1
- package/dist/web/assets/cx-D_DWAtWj.js +0 -55
- package/dist/web/assets/index-B94Cizd8.js +0 -2
- package/dist/web/assets/start-B1ddmC3G.js +0 -41
- package/dist/web/assets/start-C3ACBbJw.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ln as t,un as n}from"./cx-D_DWAtWj.js";import{$ as r,A as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,L as h,N as g,Ot as _,P as v,R as y,S as b,St as x,T as S,Tt as C,V as w,W as T,X as E,_t as D,at as ee,b as te,bt as O,dt as ne,et as re,gt as k,ht as A,it as ie,k as ae,kt as j,lt as oe,m as se,mt as ce,nt as le,ot as ue,pt as M,q as N,st as P,tt as de,ut as F,w as fe,wt as I,x as pe,xt as L,z as me}from"./use-grain-panel-BGlDN-LS.js";var R=e(n());function z(){return z=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},z.apply(null,arguments)}var B=e=>{var t=e.cx,n=e.cy,r=e.r,i=e.className,a=j(`recharts-dot`,i);return L(t)&&L(n)&&L(r)?R.createElement(`circle`,z({},s(e),k(e),{className:a,cx:t,cy:n,r})):null},he=[`points`];function V(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 H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?V(Object(n),!0).forEach(function(t){ge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ge(e,t,n){return(t=_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e){var t=ve(e,`string`);return typeof t==`symbol`?t:t+``}function ve(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)}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 ye(e,t){if(e==null)return{};var n,r,i=be(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 be(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 xe(e){var t=e.option,n=e.dotProps,r=e.className;if((0,R.isValidElement)(t))return(0,R.cloneElement)(t,n);if(typeof t==`function`)return t(n);var i=j(r,typeof t==`boolean`?``:t.className),a=n??{};a.points;var o=ye(a,he);return R.createElement(B,U({},o,{className:i}))}function Se(e,t){return e==null?!1:t?!0:e.length===1}function W(e){var t=e.points,n=e.dot,r=e.className,i=e.dotClassName,a=e.dataKey,o=e.baseProps,s=e.needClip,c=e.clipPathId,u=e.zIndex,d=u===void 0?E.scatter:u;if(!Se(t,n))return null;var p=h(n),m=l(n),g=t.map((e,r)=>{var s=H(H(H({r:3},o),m),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return R.createElement(xe,{key:`dot-${r}`,option:n,dotProps:s,className:i})}),_={};return s&&c!=null&&(_.clipPath=`url(#clipPath-${p?``:`dots-`}${c})`),R.createElement(f,{zIndex:d},R.createElement(I,U({className:r},_),g))}function G(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 K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?G(Object(n),!0).forEach(function(t){Ce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ce(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){var t=Te(e,`string`);return typeof t==`symbol`?t:t+``}function Te(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 Ee=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,a=e.dataKey,o=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var s=K(K(K({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),_(i)),k(i)),c=(0,R.isValidElement)(i)?(0,R.cloneElement)(i,s):typeof i==`function`?i(s):R.createElement(B,s);return R.createElement(I,{className:`recharts-active-dot`,clipPath:o},c)};function q(e){var t=e.points,n=e.mainColor,r=e.activeDot,i=e.itemDataKey,a=e.clipPath,o=e.zIndex,s=o===void 0?E.activeDot:o,c=ce(T),l=fe();if(t==null||l==null)return null;var u=t.find(e=>l.includes(e.payload));return O(u)?null:R.createElement(f,{zIndex:s},R.createElement(Ee,{point:u,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var De=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function J(){return J=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},J.apply(null,arguments)}function Oe(e,t){if(e==null)return{};var n,r,i=ke(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 ke(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 Ae(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Y(e,t){return`${t}px ${e}px`}function je(e){return e.length%2==0?e:[...e,...e]}function Me(e,t){for(var n=[],r=0;r<t;++r)n.push(...e);return n}function Ne(e,t,n){var r=je(n),i=r.reduce((e,t)=>e+t,0);if(!i)return Y(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;c<r.length;l+=(u=r[c])??0,++c){var u,d=r[c];if(d!=null&&l+d>o){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...Me(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function Pe(e,t,n){return e?Ne(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):Y(t,n)}function Fe(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=Oe(e,De),a=r??!1,o;if(t!=null){var s=i.pathRef;o=Pe(n,Ae(s?.current??null),t)}else n!=null&&(o=String(n));return R.createElement(re,J({},i,{connectNulls:a,strokeDasharray:o}))}function Ie(e){var t=(0,R.useRef)(0),n=(0,R.useRef)(0),r=(0,R.useRef)(!1),i=(0,R.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,R.useCallback)((e,i)=>{if(r.current)return null;var o=Math.min(a(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,o),o>=i)?(r.current=!0,null):o},[])}var Le=(e,t,n,r)=>d(e,`xAxis`,t,r),Re=(e,t,n,r)=>N(e,`xAxis`,t,r),ze=(e,t,n,r)=>d(e,`yAxis`,n,r),Be=(e,t,n,r)=>N(e,`yAxis`,n,r),Ve=M([le,Le,ze,Re,Be],(e,t,n,r,i)=>ne(e,`xAxis`)?ue(t,r,!1):ue(n,i,!1)),He=(e,t,n,r,i)=>i;function Ue(e){return e.type===`line`}var We=M([m,He],(e,t)=>e.filter(Ue).find(e=>e.id===t)),Ge=M([le,Le,ze,Re,Be,We,Ve,r],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return pt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}});function Ke(e){var t=_(e),n=3,r=2;if(t!=null){var i=t.r,a=t.strokeWidth,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}var qe=[`id`],Je=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],Ye=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function X(){return X=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},X.apply(null,arguments)}function Z(e,t){if(e==null)return{};var n,r,i=Xe(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 Xe(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 Ze(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 Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ze(Object(n),!0).forEach(function(t){Qe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qe(e,t,n){return(t=$e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e){var t=et(e,`string`);return typeof t==`symbol`?t:t+``}function et(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)}function tt(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function nt(e){var t=0,n=0;for(var r of e)r.status===`matched`&&r.prev.x!=null&&r.next.x!=null&&(t+=r.next.x-r.prev.x,n++);return n>0?t/n:0}var $={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=nt(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Q(Q({},i.next),{},{x:D(i.prev.x,i.next.x,t),y:D(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Q(Q({},i.next),{},{x:D(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Q(Q({},i.prev),{},{x:D(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:g,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:Fe,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:E.line,type:`linear`},rt=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:oe(n,t),payload:e}]},it=R.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,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:x,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:oe(o,t),hide:s,type:d,color:r,unit:c,formatter:l,graphicalItemId:f}};return R.createElement(u,{tooltipEntrySettings:p})});function at(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var c=Z(r,qe),l=s(c);return R.createElement(W,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:l,needClip:o,clipPathId:t})}function ot(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,R.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Q(Q({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return R.createElement(y,{value:t?i:void 0},n)}function st(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,u=i.layout,d=i.connectNulls,f=i.needClip,m=i.shape,h=i.strokeDasharray,g=Z(i,Je),_=Q(Q({},C(g)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:f?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:u,connectNulls:d,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return R.createElement(R.Fragment,null,r?.length>1&&R.createElement(p,{option:m,DefaultShape:$.shape,shapeProps:_}),R.createElement(at,{points:r,clipPathId:t,props:i}))}function ct(e){var t=e.clipPathId,n=e.props,r=e.pathRef,a=e.previousPointsRef,o=n.points,s=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,u=n.animationEasing,d=n.animationMatchBy,f=n.animationInterpolateFn,p=n.layout,m=tt(r.current),h=i(n.onAnimationStart,n.onAnimationEnd),g=h.isAnimating,_=h.handleAnimationStart,v=h.handleAnimationEnd,y=!g,b=Ie(o),x=(0,R.useCallback)(e=>e>0&&m>0,[m]);return R.createElement(ot,{points:o,showLabels:y},n.children,R.createElement(ae,{animationInput:o,animationIdPrefix:`recharts-line-`,items:o,previousItemsRef:a,isAnimationActive:s,animationBegin:c,animationDuration:l,animationEasing:u,onAnimationStart:_,onAnimationEnd:v,animationInterpolateFn:f,animationMatchBy:d,shouldUpdatePreviousRef:x,layout:p},(e,i,a)=>{var o=g||i<1,s=o?b(i,m):null;return R.createElement(st,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),R.createElement(me,{label:n.label}))}function lt(e){var t=e.clipPathId,n=e.props,r=(0,R.useRef)(null),i=(0,R.useRef)(null);return R.createElement(ct,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var ut=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:F(e.payload,t)}),dt=class extends R.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.top,c=e.left,l=e.width,u=e.height,d=e.id,p=e.needClip,m=e.zIndex;if(t)return null;var g=j(`recharts-line`,i),_=d,v=Ke(n),y=v.r,x=v.strokeWidth,S=h(n),C=y*2+x,w=p?`url(#clipPath-${S?``:`dots-`}${_})`:void 0;return R.createElement(f,{zIndex:m},R.createElement(I,{className:g},p&&R.createElement(`defs`,null,R.createElement(te,{clipPathId:_,xAxisId:a,yAxisId:o}),!S&&R.createElement(`clipPath`,{id:`clipPath-dots-${_}`},R.createElement(`rect`,{x:c-C/2,y:s-C/2,width:l+C,height:u+C}))),R.createElement(b,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:ut,errorBarOffset:0},R.createElement(lt,{props:this.props,clipPathId:_}))),R.createElement(q,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:w}))}};function ft(e){var t=A(e,$),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,h=t.id,g=Z(t,Ye),_=pe(p,m).needClip,v=S(),y=ie(),b=ee(),x=ce(e=>Ge(e,p,m,b,h));if(y!==`horizontal`&&y!==`vertical`||x==null||v==null)return null;var C=v.height,w=v.width,T=v.x,E=v.y;return R.createElement(dt,X({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:x,layout:y,height:C,width:w,left:T,top:E,needClip:_}))}function pt(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=F(e,o);if(t===`horizontal`)return{x:P({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(O(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=O(l)?null:n.scale.map(l),d=P({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function mt(e){var t=A(e,$),n=ee();return R.createElement(o,{id:t.id,type:`line`},e=>R.createElement(R.Fragment,null,R.createElement(v,{legendPayload:rt(t)}),R.createElement(it,{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}),R.createElement(c,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),R.createElement(ft,X({},t,{id:e}))))}var ht=R.memo(mt,de);ht.displayName=`Line`;var gt=[`axis`],_t=(0,R.forwardRef)((e,t)=>R.createElement(se,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:gt,tooltipPayloadSearcher:w,categoricalChartProps:e,ref:t})),vt=t(),yt=3.5,bt=1.5;function xt(e){return function({cx:t,cy:n,value:r,index:i}){return typeof r!=`number`||r===0||t===void 0||n===void 0?(0,vt.jsx)(`g`,{},i):(0,vt.jsx)(`circle`,{cx:t,cy:n,r:yt,fill:e,stroke:`var(--surface-raised)`,strokeWidth:bt},i)}}export{q as a,Ke as i,_t as n,W as o,ht as r,xt as t};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{on as t,sn as n}from"./cx-DvgIdypj.js";import{$ as r,A as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,L as h,N as g,Ot as _,P as v,R as y,S as b,St as x,T as S,Tt as C,V as w,W as T,X as E,_t as D,at as ee,b as te,bt as O,dt as ne,et as re,gt as k,ht as A,it as ie,k as ae,kt as j,lt as oe,m as se,mt as ce,nt as le,ot as ue,pt as M,q as N,st as P,tt as de,ut as F,w as fe,wt as I,x as pe,xt as L,z as me}from"./use-grain-panel-DRZkQL7T.js";var R=e(n());function z(){return z=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},z.apply(null,arguments)}var B=e=>{var t=e.cx,n=e.cy,r=e.r,i=e.className,a=j(`recharts-dot`,i);return L(t)&&L(n)&&L(r)?R.createElement(`circle`,z({},s(e),k(e),{className:a,cx:t,cy:n,r})):null},he=[`points`];function V(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 H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?V(Object(n),!0).forEach(function(t){ge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ge(e,t,n){return(t=_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e){var t=ve(e,`string`);return typeof t==`symbol`?t:t+``}function ve(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)}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 ye(e,t){if(e==null)return{};var n,r,i=be(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 be(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 xe(e){var t=e.option,n=e.dotProps,r=e.className;if((0,R.isValidElement)(t))return(0,R.cloneElement)(t,n);if(typeof t==`function`)return t(n);var i=j(r,typeof t==`boolean`?``:t.className),a=n??{};a.points;var o=ye(a,he);return R.createElement(B,U({},o,{className:i}))}function Se(e,t){return e==null?!1:t?!0:e.length===1}function W(e){var t=e.points,n=e.dot,r=e.className,i=e.dotClassName,a=e.dataKey,o=e.baseProps,s=e.needClip,c=e.clipPathId,u=e.zIndex,d=u===void 0?E.scatter:u;if(!Se(t,n))return null;var p=h(n),m=l(n),g=t.map((e,r)=>{var s=H(H(H({r:3},o),m),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return R.createElement(xe,{key:`dot-${r}`,option:n,dotProps:s,className:i})}),_={};return s&&c!=null&&(_.clipPath=`url(#clipPath-${p?``:`dots-`}${c})`),R.createElement(f,{zIndex:d},R.createElement(I,U({className:r},_),g))}function G(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 K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?G(Object(n),!0).forEach(function(t){Ce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ce(e,t,n){return(t=we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){var t=Te(e,`string`);return typeof t==`symbol`?t:t+``}function Te(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 Ee=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,a=e.dataKey,o=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var s=K(K(K({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),_(i)),k(i)),c=(0,R.isValidElement)(i)?(0,R.cloneElement)(i,s):typeof i==`function`?i(s):R.createElement(B,s);return R.createElement(I,{className:`recharts-active-dot`,clipPath:o},c)};function q(e){var t=e.points,n=e.mainColor,r=e.activeDot,i=e.itemDataKey,a=e.clipPath,o=e.zIndex,s=o===void 0?E.activeDot:o,c=ce(T),l=fe();if(t==null||l==null)return null;var u=t.find(e=>l.includes(e.payload));return O(u)?null:R.createElement(f,{zIndex:s},R.createElement(Ee,{point:u,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var De=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function J(){return J=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},J.apply(null,arguments)}function Oe(e,t){if(e==null)return{};var n,r,i=ke(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 ke(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 Ae(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Y(e,t){return`${t}px ${e}px`}function je(e){return e.length%2==0?e:[...e,...e]}function Me(e,t){for(var n=[],r=0;r<t;++r)n.push(...e);return n}function Ne(e,t,n){var r=je(n),i=r.reduce((e,t)=>e+t,0);if(!i)return Y(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;c<r.length;l+=(u=r[c])??0,++c){var u,d=r[c];if(d!=null&&l+d>o){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...Me(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function Pe(e,t,n){return e?Ne(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):Y(t,n)}function Fe(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=Oe(e,De),a=r??!1,o;if(t!=null){var s=i.pathRef;o=Pe(n,Ae(s?.current??null),t)}else n!=null&&(o=String(n));return R.createElement(re,J({},i,{connectNulls:a,strokeDasharray:o}))}function Ie(e){var t=(0,R.useRef)(0),n=(0,R.useRef)(0),r=(0,R.useRef)(!1),i=(0,R.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,R.useCallback)((e,i)=>{if(r.current)return null;var o=Math.min(a(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,o),o>=i)?(r.current=!0,null):o},[])}var Le=(e,t,n,r)=>d(e,`xAxis`,t,r),Re=(e,t,n,r)=>N(e,`xAxis`,t,r),ze=(e,t,n,r)=>d(e,`yAxis`,n,r),Be=(e,t,n,r)=>N(e,`yAxis`,n,r),Ve=M([le,Le,ze,Re,Be],(e,t,n,r,i)=>ne(e,`xAxis`)?ue(t,r,!1):ue(n,i,!1)),He=(e,t,n,r,i)=>i;function Ue(e){return e.type===`line`}var We=M([m,He],(e,t)=>e.filter(Ue).find(e=>e.id===t)),Ge=M([le,Le,ze,Re,Be,We,Ve,r],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return pt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}});function Ke(e){var t=_(e),n=3,r=2;if(t!=null){var i=t.r,a=t.strokeWidth,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}var qe=[`id`],Je=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],Ye=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function X(){return X=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},X.apply(null,arguments)}function Z(e,t){if(e==null)return{};var n,r,i=Xe(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 Xe(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 Ze(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 Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ze(Object(n),!0).forEach(function(t){Qe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qe(e,t,n){return(t=$e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e){var t=et(e,`string`);return typeof t==`symbol`?t:t+``}function et(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)}function tt(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function nt(e){var t=0,n=0;for(var r of e)r.status===`matched`&&r.prev.x!=null&&r.next.x!=null&&(t+=r.next.x-r.prev.x,n++);return n>0?t/n:0}var $={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=nt(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Q(Q({},i.next),{},{x:D(i.prev.x,i.next.x,t),y:D(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Q(Q({},i.next),{},{x:D(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Q(Q({},i.prev),{},{x:D(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:g,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:Fe,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:E.line,type:`linear`},rt=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:oe(n,t),payload:e}]},it=R.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,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:x,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:oe(o,t),hide:s,type:d,color:r,unit:c,formatter:l,graphicalItemId:f}};return R.createElement(u,{tooltipEntrySettings:p})});function at(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var c=Z(r,qe),l=s(c);return R.createElement(W,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:l,needClip:o,clipPathId:t})}function ot(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,R.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Q(Q({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return R.createElement(y,{value:t?i:void 0},n)}function st(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,u=i.layout,d=i.connectNulls,f=i.needClip,m=i.shape,h=i.strokeDasharray,g=Z(i,Je),_=Q(Q({},C(g)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:f?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:u,connectNulls:d,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return R.createElement(R.Fragment,null,r?.length>1&&R.createElement(p,{option:m,DefaultShape:$.shape,shapeProps:_}),R.createElement(at,{points:r,clipPathId:t,props:i}))}function ct(e){var t=e.clipPathId,n=e.props,r=e.pathRef,a=e.previousPointsRef,o=n.points,s=n.isAnimationActive,c=n.animationBegin,l=n.animationDuration,u=n.animationEasing,d=n.animationMatchBy,f=n.animationInterpolateFn,p=n.layout,m=tt(r.current),h=i(n.onAnimationStart,n.onAnimationEnd),g=h.isAnimating,_=h.handleAnimationStart,v=h.handleAnimationEnd,y=!g,b=Ie(o),x=(0,R.useCallback)(e=>e>0&&m>0,[m]);return R.createElement(ot,{points:o,showLabels:y},n.children,R.createElement(ae,{animationInput:o,animationIdPrefix:`recharts-line-`,items:o,previousItemsRef:a,isAnimationActive:s,animationBegin:c,animationDuration:l,animationEasing:u,onAnimationStart:_,onAnimationEnd:v,animationInterpolateFn:f,animationMatchBy:d,shouldUpdatePreviousRef:x,layout:p},(e,i,a)=>{var o=g||i<1,s=o?b(i,m):null;return R.createElement(st,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),R.createElement(me,{label:n.label}))}function lt(e){var t=e.clipPathId,n=e.props,r=(0,R.useRef)(null),i=(0,R.useRef)(null);return R.createElement(ct,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var ut=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:F(e.payload,t)}),dt=class extends R.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.top,c=e.left,l=e.width,u=e.height,d=e.id,p=e.needClip,m=e.zIndex;if(t)return null;var g=j(`recharts-line`,i),_=d,v=Ke(n),y=v.r,x=v.strokeWidth,S=h(n),C=y*2+x,w=p?`url(#clipPath-${S?``:`dots-`}${_})`:void 0;return R.createElement(f,{zIndex:m},R.createElement(I,{className:g},p&&R.createElement(`defs`,null,R.createElement(te,{clipPathId:_,xAxisId:a,yAxisId:o}),!S&&R.createElement(`clipPath`,{id:`clipPath-dots-${_}`},R.createElement(`rect`,{x:c-C/2,y:s-C/2,width:l+C,height:u+C}))),R.createElement(b,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:ut,errorBarOffset:0},R.createElement(lt,{props:this.props,clipPathId:_}))),R.createElement(q,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:w}))}};function ft(e){var t=A(e,$),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,h=t.id,g=Z(t,Ye),_=pe(p,m).needClip,v=S(),y=ie(),b=ee(),x=ce(e=>Ge(e,p,m,b,h));if(y!==`horizontal`&&y!==`vertical`||x==null||v==null)return null;var C=v.height,w=v.width,T=v.x,E=v.y;return R.createElement(dt,X({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:x,layout:y,height:C,width:w,left:T,top:E,needClip:_}))}function pt(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=F(e,o);if(t===`horizontal`)return{x:P({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(O(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=O(l)?null:n.scale.map(l),d=P({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function mt(e){var t=A(e,$),n=ee();return R.createElement(o,{id:t.id,type:`line`},e=>R.createElement(R.Fragment,null,R.createElement(v,{legendPayload:rt(t)}),R.createElement(it,{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}),R.createElement(c,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),R.createElement(ft,X({},t,{id:e}))))}var ht=R.memo(mt,de);ht.displayName=`Line`;var gt=[`axis`],_t=(0,R.forwardRef)((e,t)=>R.createElement(se,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:gt,tooltipPayloadSearcher:w,categoricalChartProps:e,ref:t})),vt=t(),yt=3.5,bt=1.5;function xt(e){return Ct(e,e=>e!==0)}function St(e){return Ct(e,()=>!0)}function Ct(e,t){return function({cx:n,cy:r,value:i,index:a}){return typeof i!=`number`||!t(i)||n===void 0||r===void 0?(0,vt.jsx)(`g`,{},a):(0,vt.jsx)(`circle`,{cx:n,cy:r,r:yt,fill:e,stroke:`var(--surface-raised)`,strokeWidth:bt},a)}}export{Ke as a,ht as i,St as n,q as o,_t as r,W as s,xt as t};
|
package/dist/web/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>Backlog</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-NfqY6Vxd.js"></script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "p-backlog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Keep pull requests clean and audit findings safe: a local, autonomous backlog for Claude Code. The agent files out-of-scope issues as Markdown tasks with context and re-checks them as code changes. Optional web UI with metrics.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
44
44
|
"test": "vitest run",
|
|
45
|
-
"lint": "eslint . && knip && node scripts/check-cyrillic.mjs",
|
|
45
|
+
"lint": "eslint . && prettier --check . && knip && node scripts/check-cyrillic.mjs",
|
|
46
46
|
"typecheck": "tsc -p tsconfig.json",
|
|
47
47
|
"build": "vite build && node scripts/build-node.mjs",
|
|
48
48
|
"install-skill": "node dist/cli.js setup",
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
"test:package": "vitest run --config vitest.package.config.ts",
|
|
55
55
|
"prepare": "npm run build",
|
|
56
56
|
"test:coverage": "vitest run --coverage",
|
|
57
|
-
"knip": "knip"
|
|
57
|
+
"knip": "knip",
|
|
58
|
+
"format": "prettier --write ."
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
61
|
"@hono/node-server": "^2.1.1",
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"globals": "^17.12.0",
|
|
83
84
|
"jsdom": "^30.1.0",
|
|
84
85
|
"knip": "^6.37.0",
|
|
86
|
+
"prettier": "3.9.9",
|
|
85
87
|
"react": "^19.3.0",
|
|
86
88
|
"react-dom": "^19.3.0",
|
|
87
89
|
"react-is": "^19.3.0",
|
package/skill/backlog/SKILL.md
CHANGED
|
@@ -56,9 +56,10 @@ description: Use when, while working on code, you notice a problem outside the c
|
|
|
56
56
|
- `--category` — обязательно. Запах кода — его категория из каталога code-smells: `bloaters`,
|
|
57
57
|
`change-preventers`, `couplers`, `data-dealers`, `dispensables`, `functional-abusers`,
|
|
58
58
|
`lexical-abusers`, `oo-abusers`, `obfuscators`. Неправильное поведение — `bug`.
|
|
59
|
-
- `--found` — как
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
- `--found` — как найдена; передавай всегда: без флага задача запишется как `manual` и не попадёт в «Эффект».
|
|
60
|
+
`incidental` — ты сам заметил проблему по ходу работы и вынес её, чтобы не раздувать текущую правку;
|
|
61
|
+
`review` — находка аудита или ревью по просьбе пользователя; `manual` — пользователь попросил завести
|
|
62
|
+
задачу. Только `incidental` считается выигрышем в статистике «Эффект».
|
|
62
63
|
- Работаешь над задачей из беклога — добавь `--related <её ID>`.
|
|
63
64
|
- Чеклист — проверяемые шаги: по нему считается прогресс.
|
|
64
65
|
- Код выхода 3 и «Похоже на SPA-12 — …» — такая задача уже открыта: новую не создавай, упомяни
|
|
@@ -91,7 +92,7 @@ description: Use when, while working on code, you notice a problem outside the c
|
|
|
91
92
|
| Код | Что случилось | Что делать |
|
|
92
93
|
|---|---|---|
|
|
93
94
|
| 0 | Статус стал `in-progress`, выведены путь, связи и текст задачи | Работать |
|
|
94
|
-
| 1 | Это
|
|
95
|
+
| 1 | Это эпик, либо запись не прошла: файл задачи менялся во время записи или задача не прошла проверку | Эпик — показать пользователю задачи эпика из вывода и спросить, какую взять. Иначе прочитать сообщение: просит повторить команду — повторить, иначе сообщить пользователю |
|
|
95
96
|
| 2 | Задача или проект не найдены, открытых задач нет | Сообщить пользователю |
|
|
96
97
|
| 3 | Открытые блокеры или задача уже закрыта; при `--next` и `--path` — все подходящие задачи заблокированы | Перечислить блокеры и остановиться. `take <ID> --force` — только по прямой просьбе пользователя |
|
|
97
98
|
|
|
@@ -99,13 +100,18 @@ description: Use when, while working on code, you notice a problem outside the c
|
|
|
99
100
|
2. Делай работу. Выполнил пункт чеклиста — сразу отметь его в файле задачи (`- [ ]` → `- [x]`, путь есть
|
|
100
101
|
в выводе `take`). Появились новые шаги — допиши их в чеклист. Frontmatter руками не меняй.
|
|
101
102
|
3. Посторонние проблемы, найденные по ходу, — через «Записать задачу» с `--related <ID>`.
|
|
102
|
-
4.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
4. Закрывай только проверенное: тесты, линт и типы проекта прошли, а если правку ещё будут ревьюить —
|
|
104
|
+
ревью пройдено и замечания по задаче исправлены. Задача, закрытая раньше и возвращённая в работу
|
|
105
|
+
(`backlog status <ID> in-progress`), считается переоткрытой; закрывая её снова, начни `--reason` с
|
|
106
|
+
прежних коммитов — CLI их назовёт.
|
|
107
|
+
5. Закоммить правку и сразу закрой: `backlog close <ID> --as fixed --reason "Исправлено в <sha>: <что
|
|
108
|
+
именно>"` — хеш есть в выводе `git commit`, по нему статистика узнаёт, кто и чем исправил; исправление
|
|
109
|
+
в нескольких коммитах — перечисли все, основной первым: статистика считает только первый. Коммит
|
|
110
|
+
сделает позже пользователь или его не будет вовсе → `backlog status <ID> done`; появится коммит — тот
|
|
111
|
+
же `backlog close <ID> --as fixed …` привяжет его, не открывая задачу. Если CLI предупредил о
|
|
112
|
+
неотмеченных пунктах — отметь сделанные; если что-то не сделано, задача не закончена.
|
|
113
|
+
6. Сделано не всё или правка ждёт ревью → статус оставь `in-progress`, допиши в конец файла задачи раздел
|
|
114
|
+
и скажи пользователю, что осталось:
|
|
109
115
|
```markdown
|
|
110
116
|
## Заметки
|
|
111
117
|
- <сегодняшняя дата>: сделано …; осталось …, потому что …
|
|
@@ -120,9 +126,9 @@ description: Use when, while working on code, you notice a problem outside the c
|
|
|
120
126
|
завершённые эпики и сдвинутые `source` он уже исправил сам — это поле `fixed`, список `{ kind, taskId, … }`:
|
|
121
127
|
`references-removed` — убраны ссылки на несуществующие задачи `ids`; `epic-closed` — эпик закрыт, все его
|
|
122
128
|
задачи `childIds` закрыты; `epic-reopened` — автоматически закрытый эпик снова открыт, его задачи
|
|
123
|
-
`childIds` снова открыты; `source-moved` — `source` сдвинулся
|
|
124
|
-
одной строкой. Код выхода 5 — не сбой: есть кандидаты или
|
|
125
|
-
разбирать нечего.
|
|
129
|
+
`childIds` снова открыты; `source-moved` — `source` сдвинулся или файл задачи переименован, а её строки
|
|
130
|
+
целы: `from` → `to`. Перескажи его пользователю одной строкой. Код выхода 5 — не сбой: есть кандидаты или
|
|
131
|
+
проблемы задач, которые надо разобрать; 0 — разбирать нечего.
|
|
126
132
|
2. У кандидата `source-changed` в JSON уже есть `problem` — первый абзац описания задачи, `snippet` —
|
|
127
133
|
текущий код вокруг `source` с номерами строк — и `diff` — изменения файла с последней проверки (у
|
|
128
134
|
обрезанного `diffOmittedLines` — сколько строк не показано). Обычно этого хватает: реши по ним, не вызывая
|
|
@@ -62,10 +62,10 @@ this same task.
|
|
|
62
62
|
- `--category` — required. For a code smell, use its category from the code-smells catalog: `bloaters`,
|
|
63
63
|
`change-preventers`, `couplers`, `data-dealers`, `dispensables`, `functional-abusers`,
|
|
64
64
|
`lexical-abusers`, `oo-abusers`, `obfuscators`. For incorrect behavior, use `bug`.
|
|
65
|
-
- `--found` — how it was found
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
statistics.
|
|
65
|
+
- `--found` — how it was found; always pass it: without the flag the task is recorded as `manual` and does
|
|
66
|
+
not count in Effect. `incidental` — you noticed the problem yourself while working and moved it out so the
|
|
67
|
+
current change stays small; `review` — a finding from an audit or review the user asked for; `manual` — the
|
|
68
|
+
user asked you to record the task. Only `incidental` counts as a gain in the Effect statistics.
|
|
69
69
|
- If you're working on a task from the backlog — add `--related <its ID>`.
|
|
70
70
|
- The checklist holds verifiable steps: progress is counted from it.
|
|
71
71
|
- Exit code 3 and "Looks like SPA-12 — …" mean such a task is already open: don't create a new one,
|
|
@@ -99,7 +99,7 @@ array) — fix them together, closing each one.
|
|
|
99
99
|
| Code | What happened | What to do |
|
|
100
100
|
|---|---|---|
|
|
101
101
|
| 0 | Status became `in-progress`, the path, links, and task text were printed | Work on it |
|
|
102
|
-
| 1 | It's an epic |
|
|
102
|
+
| 1 | It's an epic, or the write failed: the task file changed during the write or the task failed validation | Epic — show the user the epic's tasks from the output and ask which one to take. Otherwise read the message: if it asks to retry the command, retry; otherwise tell the user |
|
|
103
103
|
| 2 | Task or project not found, no open tasks | Tell the user |
|
|
104
104
|
| 3 | Open blockers, or the task is already closed; with `--next` and `--path` — every matching task is blocked | List the blockers and stop. `take <ID> --force` — only on the user's direct request |
|
|
105
105
|
|
|
@@ -108,13 +108,19 @@ array) — fix them together, closing each one.
|
|
|
108
108
|
path is in the `take` output). New steps came up — add them to the checklist. Don't edit the
|
|
109
109
|
frontmatter by hand.
|
|
110
110
|
3. Unrelated problems found along the way — through "Log a task" with `--related <ID>`.
|
|
111
|
-
4.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
4. Close only verified work: the project's tests, lint, and types pass, and if the change is still going
|
|
112
|
+
to be reviewed — the review is done and its findings on the task are fixed. A task closed earlier and
|
|
113
|
+
put back to work (`backlog status <ID> in-progress`) counts as reopened; when closing it again, start
|
|
114
|
+
`--reason` with the earlier commits — the CLI names them.
|
|
115
|
+
5. Commit the change and close right away: `backlog close <ID> --as fixed --reason "Fixed in <sha>: <what
|
|
116
|
+
exactly>"` — the hash is in the `git commit` output, and it lets stats know who fixed it and with what;
|
|
117
|
+
a fix spread over several commits — list them all, the main one first: stats count only the first. The
|
|
118
|
+
user will commit later, or there will be no commit at all → `backlog status <ID> done`; once the
|
|
119
|
+
commit exists, the same `backlog close <ID> --as fixed …` attaches it without reopening the task. If
|
|
120
|
+
the CLI warned about unchecked items — check off the ones that are done; if something isn't done, the
|
|
121
|
+
task isn't finished.
|
|
122
|
+
6. Not everything is done, or the change awaits review → leave the status `in-progress`, append a section
|
|
123
|
+
to the end of the task file and tell the user what's left:
|
|
118
124
|
```markdown
|
|
119
125
|
## Notes
|
|
120
126
|
- <today's date>: done …; left …, because …
|
|
@@ -129,9 +135,10 @@ message), a request to "check the backlog", or "clean up the backlog".
|
|
|
129
135
|
Dangling references, completed epics, and shifted `source` — it already fixed those itself; that's the
|
|
130
136
|
`fixed` field, a list of `{ kind, taskId, … }`: `references-removed` — references to missing tasks `ids`
|
|
131
137
|
removed; `epic-closed` — the epic closed, all its tasks `childIds` are closed; `epic-reopened` — the
|
|
132
|
-
auto-closed epic reopened, its tasks `childIds` are open again; `source-moved` — `source`
|
|
133
|
-
|
|
134
|
-
task problems to work through; 0 means there is nothing to work
|
|
138
|
+
auto-closed epic reopened, its tasks `childIds` are open again; `source-moved` — `source` moved, or the
|
|
139
|
+
task's file was renamed with its lines intact: `from` → `to`. Relay it to the user in one line. Exit code 5
|
|
140
|
+
is not a failure: there are candidates or task problems to work through; 0 means there is nothing to work
|
|
141
|
+
through.
|
|
135
142
|
2. A `source-changed` candidate already has `problem` in the JSON — the task description's first
|
|
136
143
|
paragraph — `snippet` — the current code around `source` with line numbers — and `diff` — the file's
|
|
137
144
|
changes since the last check (when cut short, `diffOmittedLines` says how many lines are not shown).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,k as t,ln as n,pt as r}from"./cx-D_DWAtWj.js";import{a as i,i as a,n as o,r as s}from"./StatsTabState-UUAoUbji.js";import{t as c}from"./ShareBar-r80rkujo.js";import{t as l}from"./StatsPage.module-DxtnhZOJ.js";import{t as u}from"./UnavailableRepos-Dzu7etxJ.js";var d={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},f=n();function p({churn:e,period:n}){let{stats:r}=t(),o=a(),l=e[0]?.score??1;return(0,f.jsxs)(i,{title:r.churnTitle,period:o.of(`churn`,n),children:[(0,f.jsx)(`p`,{className:s.muted,children:r.churnHint}),e.length===0?(0,f.jsx)(`p`,{className:s.muted,children:r.churnEmpty}):(0,f.jsx)(`ul`,{className:s.rows,children:e.map(e=>(0,f.jsxs)(`li`,{className:d.churnRow,children:[(0,f.jsx)(`code`,{className:s.rowLabel,children:e.label}),(0,f.jsx)(`span`,{className:s.rowValue,children:r.commits(e.commits)}),(0,f.jsx)(`span`,{className:s.rowValue,children:r.churnTasks(e.tasks,e.weight)}),(0,f.jsx)(c,{share:e.score/l})]},e.label))})]})}function m({density:e}){let{stats:n}=t();return(0,f.jsx)(i,{title:n.densityTitle,period:n.periodNow,children:e.projects.length===0?(0,f.jsx)(`p`,{className:s.muted,children:n.noCodeData}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h,{rows:e.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),e.folders.length>0&&(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h3`,{className:s.subTitle,children:n.folders}),(0,f.jsx)(h,{rows:e.folders.map(e=>({key:e.label,label:(0,f.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function h({rows:e}){let{stats:n,core:r}=t();return(0,f.jsx)(`ul`,{className:s.rows,children:e.map(({key:e,label:t,row:i})=>(0,f.jsxs)(`li`,{className:d.densityRow,children:[(0,f.jsx)(`span`,{className:s.rowLabel,children:t}),(0,f.jsx)(`span`,{className:s.rowValue,children:r.count(i.lines,`line`)}),(0,f.jsx)(`span`,{className:s.rowValue,children:r.count(i.open,`task`)}),(0,f.jsx)(`span`,{className:s.rowValue,children:i.perKloc===null?`—`:n.perKloc(i.perKloc)})]},e))})}function g(){let{projectId:t}=r(),n=e(t);return(0,f.jsx)(o,{query:n,children:e=>(0,f.jsx)(_,{report:e})})}function _({report:e}){let{stats:n}=t();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u,{repos:e.unavailableRepos}),(0,f.jsxs)(`div`,{className:l.blocks,children:[(0,f.jsx)(`div`,{className:s.wide,children:(0,f.jsx)(p,{churn:e.churn,period:e.periods.churn})}),(0,f.jsx)(m,{density:e.density})]}),(0,f.jsx)(`p`,{className:l.note,children:n.codeNote})]})}export{g as CodeTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,F as n,I as r,O as i,a,c as o,k as s,ln as c,pt as l,un as u}from"./cx-D_DWAtWj.js";import{_ as d,d as f,h as p}from"./index-B94Cizd8.js";import{a as m,i as h,r as g,t as _}from"./StatsTabState-UUAoUbji.js";import{t as v}from"./StatsPage.module-DxtnhZOJ.js";import{n as y,t as b}from"./Figure-C7wdv_hC.js";import{t as x}from"./StatsTable-Cgps5a7q.js";import{A as S,B as C,C as w,D as ee,Dt as T,E as te,F as ne,G as re,H as ie,I as ae,J as oe,K as se,L as ce,M as le,N as ue,O as de,P as fe,Q as pe,R as me,St as he,T as ge,Tt as _e,U as ve,V as ye,X as be,Y as xe,Z as Se,_ as Ce,_t as E,a as we,at as Te,b as Ee,bt as De,c as Oe,ct as ke,d as Ae,dt as je,et as D,f as Me,ft as O,g as Ne,h as k,ht as Pe,i as A,it as Fe,j as Ie,k as Le,kt as Re,l as ze,lt as Be,m as Ve,mt as He,n as Ue,nt as j,o as We,ot as Ge,p as Ke,pt as M,q as qe,r as Je,rt as Ye,s as Xe,st as Ze,t as Qe,tt as $e,u as et,ut as N,v as P,vt as tt,wt as F,x as nt,xt as I,y as L,yt as rt,z as it}from"./use-grain-panel-BGlDN-LS.js";import{a as at,i as ot,n as st,o as ct,r as lt,t as R}from"./value-dot-CtJcBhqS.js";function z(e,t){return t===null?`—`:n(p(e,t))}var B=c();function ut({totals:e,period:t}){let{stats:n}=s(),a=i(),o=h(),c=e=>r(a,e);return(0,B.jsxs)(y,{period:o.of(`lastWeek`,t),children:[(0,B.jsx)(b,{label:n.backlogTokens,value:c(e.tokens),note:n.backlogTokensNote(c(e.hookTokens),c(e.cliTokens))}),(0,B.jsx)(b,{label:n.apiPrice,value:z(a,e.cost),note:e.hasUnpricedTokens?n.unpricedNote:void 0}),(0,B.jsx)(b,{label:n.hookTurns,value:c(e.hookTurns),note:n.hookRunsNote(c(e.hookRuns))}),(0,B.jsx)(b,{label:n.cliCalls,value:c(e.cliRuns)})]})}function dt({models:e,period:t}){let{stats:n}=s(),a=i(),o=h();return(0,B.jsx)(m,{title:n.byModel,period:o.of(`costDays`,t),children:e.length===0?(0,B.jsx)(`p`,{className:g.muted,children:n.noModels}):(0,B.jsx)(x,{label:n.byModel,head:n.modelsHead,rows:e.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?n.fastModel(e.model):e.model,r(a,e.tokens),p(a,e.cost)]}))})})}function ft({commands:e,period:t}){let{stats:n}=s(),a=i(),o=h();return(0,B.jsx)(m,{title:n.commandsTitle,period:o.of(`costDays`,t),children:e.length===0?(0,B.jsx)(`p`,{className:g.muted,children:n.noCommands}):(0,B.jsx)(x,{label:n.commandsTitle,head:n.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,r(a,e.runs),n.milliseconds(e.avgMs),n.megabytes(e.avgRssMb),n.megabytes(e.maxRssMb)]}))})})}var pt=(e,t,n)=>re(e,`xAxis`,P(e,t),n),mt=(e,t,n)=>qe(e,`xAxis`,P(e,t),n),ht=(e,t,n)=>re(e,`yAxis`,L(e,t),n),gt=(e,t,n)=>qe(e,`yAxis`,L(e,t),n),_t=M([j,pt,ht,mt,gt],(e,t,n,r,i)=>je(e,`xAxis`)?Ge(t,r,!1):Ge(n,i,!1)),V=M([oe,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),vt=e=>{var t=j(e);return je(t,`xAxis`)?`yAxis`:`xAxis`},yt=(e,t)=>vt(e)===`yAxis`?L(e,t):P(e,t),bt=(e,t,n)=>se(e,vt(e),yt(e,t),n),xt=M([V,bt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=xe(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]])}}}),St=M([V,bt],(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(rt)}}),Ct=M([j,pt,ht,mt,gt,xt,pe,_t,V,Se,St],(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 Qt({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=e(u()),wt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],Tt=[`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 Et(e,t){if(e==null)return{};var n,r,i=Dt(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 Dt(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 Ot(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(!O(a)||!O(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return I(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),I(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 kt(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(!O(a)||!O(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return I(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),I(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 At(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?H.createElement(kt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):H.createElement(Ot,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function jt(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=Et(e,wt),f=s===`vertical`?`vertical`:`horizontal`,p=u??!1,m=de(),h=d.id,g=d.baseLine,_=Et(d,Tt),v=T(_),y=H.createElement(D,U({},d,{id:h,baseLine:g,connectNulls:p,stroke:`none`,className:`recharts-area-area`,layout:f})),b=l!==`none`&&H.createElement(D,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(D,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(F,null,H.createElement(`defs`,null,H.createElement(`clipPath`,{id:m},H.createElement(At,{alpha:n,points:d.points??[],baseLine:g,layout:f,strokeWidth:d.strokeWidth}))),H.createElement(F,{clipPath:`url(#${m})`},y,b,x)):H.createElement(H.Fragment,null,y,b,x)}var Mt=[`id`],Nt=[`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 Pt(e,t){if(e==null)return{};var n,r,i=Ft(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 Ft(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 It(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?It(Object(n),!0).forEach(function(t){Lt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lt(e,t,n){return(t=Rt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e){var t=zt(e,`string`);return typeof t==`symbol`?t:t+``}function zt(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 Bt={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:ue,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:E(e.prev.x,e.next.x,t),y:E(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:jt,xAxisId:0,yAxisId:0,zIndex:be.area};function K(e,t){return e&&e!==`none`?e:t}var Vt=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:Be(n,t),payload:e}]},Ht=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:he,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Be(o,t),hide:s,type:u,color:K(r,a),unit:c,formatter:l,graphicalItemId:d}};return H.createElement(ne,{tooltipEntrySettings:f})});function Ut(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=T(r);return H.createElement(ct,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Wt(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(me,{value:t?r:void 0},n)}function Gt(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=Pt(a,Mt),_=G(G({},_e(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(F,{clipPath:r?`url(#clipPath-${i})`:void 0},H.createElement(ae,{option:m,DefaultShape:Bt.shape,shapeProps:_})),H.createElement(Ut,{points:t,props:g,clipPathId:i}))}function Kt(e,t,n){if(I(e)){var r=I(t)?t:void 0;return E(r,e,n)}if(De(e)||tt(e)){var i=I(t)?t:void 0;return E(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=Ie(m,a),g=Ye(),_=S(r.onAnimationStart,r.onAnimationEnd),v=_.isAnimating,y=_.handleAnimationStart,b=_.handleAnimationEnd,x=h.startValue;if(g==null)return null;var C=Array.isArray(s)&&Array.isArray(x)?le(x,s,f):Array.isArray(s)?le(null,s,f):null;return H.createElement(Le,{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(C,i,g):a?s:Kt(s,x,i);return h.syncStepValue(c,i),H.createElement(Wt,{showLabels:!v,points:o},r.children,H.createElement(Gt,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:v||i<1,isEntrance:a}),H.createElement(it,{label:r.label}))})}function Jt(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 Yt=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=Re(`recharts-area`,i),g=f,_=ot(n),v=_.r,y=_.strokeWidth,b=ce(n),x=v*2+y,S=s?`url(#clipPath-${b?``:`dots-`}${g})`:void 0;return H.createElement(ie,{zIndex:m},H.createElement(F,{className:h},s&&H.createElement(`defs`,null,H.createElement(Ee,{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(Jt,{needClip:s,clipPathId:g,props:this.props})),H.createElement(at,{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(at,{points:p,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}))}};function Xt(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=Pt(e,Nt),g=Fe(),_=ve(),v=nt(p,m).needClip,y=Te(),b=He(t=>Ct(t,e.id,y))??{},x=b.points,S=b.isRange,C=b.baseLine,w=ge();if(g!==`horizontal`&&g!==`vertical`||w==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var ee=w.height,T=w.width,te=w.x,ne=w.y;return!x||!x.length?null:H.createElement(Yt,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:T,left:te,top:ne,xAxisId:p,yAxisId:m}))}var Zt=(e,t,n,r,i)=>{var a=n??t;if(I(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 Qt(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,_=Zt(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=N(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=N(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>N(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:Ze({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:Ze({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 $t(e){var t=Pe(e,Bt),n=Te();return H.createElement(ee,{id:t.id,type:`area`},e=>H.createElement(H.Fragment,null,H.createElement(fe,{legendPayload:Vt(t)}),H.createElement(Ht,{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(te,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:ke(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),H.createElement(Xt,W({},t,{id:e}))))}var q=H.memo($t,$e);q.displayName=`Area`;var en=[`axis`],tn=(0,H.forwardRef)((e,t)=>H.createElement(Ve,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:en,tooltipPayloadSearcher:ye,categoricalChartProps:e,ref:t})),J=`var(--chart-line-bright)`,Y=`var(--chart-line-blue)`;function nn(e,t){return Ue(n=>({title:Me(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 rn(){let{stats:e}=s(),t=i(),n=(0,H.useMemo)(()=>nn(e,t),[e,t]),r=[{label:e.processMemory,shape:`line`,color:J},{label:e.jsHeap,shape:`dashed`,color:Y}],a=o().data?.samples??[],c=a.at(-1)?.rssMb??null,l=a.length===0?null:Math.max(...a.map(e=>e.rssMb));return(0,B.jsxs)(m,{title:e.serverMemory,children:[(0,B.jsx)(`p`,{className:g.muted,children:e.memoryRestartNote}),(0,B.jsx)(Ke,{summary:e.memorySummary(e.megabytes(c),e.megabytes(l)),legend:r,children:(0,B.jsxs)(tn,{data:a,margin:We,"aria-label":e.chartLabel(e.serverMemory,`sample`),children:[(0,B.jsx)(w,{vertical:!1}),(0,B.jsx)(Ne,{dataKey:`at`,tickFormatter:e=>et(t,e),...Xe}),(0,B.jsx)(k,{tickFormatter:t=>e.megabytes(t),width:60,...A}),(0,B.jsx)(C,{content:n,...Oe,cursor:{stroke:`var(--line-strong)`}}),(0,B.jsx)(q,{dataKey:`rssMb`,stroke:J,strokeWidth:3,fill:J,fillOpacity:Je,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 an(e,t,n){return Ue(i=>({title:e.periodOf(n,f(t,i.start)),rows:[{label:e.hookTurnsTooltip,value:e.tokens(i.hookTokens),shape:`bar`,color:X},{label:e.cliOutput,value:e.tokens(i.cliTokens),shape:`bar`,color:Z},{label:e.apiPriceTooltip,value:i.hasUnpricedTokens&&i.cost!==null?`${z(t,i.cost)} (${e.unpricedNote})`:z(t,i.cost)},{label:e.hookRuns,value:r(t,i.hookRuns),shape:`line`,color:Q},{label:e.otherCommands,value:r(t,i.cliRuns),shape:`dashed`,color:$}]}))}function on({day:e,...t}){return{start:e,...t}}function sn({weeks:e,days:t,windows:n}){let{stats:r}=s(),a=i(),o=(0,H.useMemo)(()=>t.map(on),[t]),{grain:c,periods:l,period:u,toggle:d}=Qe(`spend`,`day`,{week:e,day:o},n),f=(0,H.useMemo)(()=>an(r,a,c),[r,a,c]),p=r.spendBy[c],h=[{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:$}],g=e=>Ae(a,e);return(0,B.jsx)(m,{title:p,period:u,aside:d,children:(0,B.jsx)(Ke,{summary:cn(r,a,c,l),legend:h,children:(0,B.jsxs)(st,{data:l,margin:We,"aria-label":r.chartLabel(p,c),children:[(0,B.jsx)(w,{vertical:!1}),(0,B.jsx)(Ne,{dataKey:`start`,tickFormatter:e=>ze(a,e),...Xe}),(0,B.jsx)(k,{yAxisId:`tokens`,tickFormatter:g,width:60,...A}),(0,B.jsx)(k,{yAxisId:`runs`,orientation:`right`,allowDecimals:!1,tickFormatter:g,width:60,...A}),(0,B.jsx)(C,{content:f,...Oe}),(0,B.jsx)(Ce,{yAxisId:`tokens`,dataKey:`hookTokens`,stackId:`tokens`,fill:X,isAnimationActive:!1}),(0,B.jsx)(Ce,{yAxisId:`tokens`,dataKey:`cliTokens`,stackId:`tokens`,fill:Z,radius:we,isAnimationActive:!1}),(0,B.jsx)(lt,{yAxisId:`runs`,dataKey:`hookRuns`,stroke:Q,strokeWidth:3,dot:R(Q),isAnimationActive:!1}),(0,B.jsx)(lt,{yAxisId:`runs`,dataKey:`cliRuns`,stroke:$,strokeWidth:2,strokeDasharray:`5 4`,dot:R($),isAnimationActive:!1})]})})})}function cn(e,n,i,a){let o=e=>t(a.map(e)),s=e=>r(n,e);return e.spendSummary({grain:i,periodCount:a.length,hookTokens:o(e=>e.hookTokens),cliTokens:s(o(e=>e.cliTokens)),money:p(n,ln(a)),hookRuns:s(o(e=>e.hookRuns)),cliRuns:s(o(e=>e.cliRuns))})}function ln(e){return e.every(e=>e.cost===null)?null:t(e.map(e=>e.cost??0))}function un(){let{projectId:e}=l(),t=a(e),{stats:n}=s();return(0,B.jsx)(_,{query:t,children:e=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(dn,{scan:e.scan}),(0,B.jsx)(pn,{report:e}),(0,B.jsx)(`p`,{className:v.note,children:n.costNote})]})})}function dn({scan:e}){let{stats:t}=s(),n=fn(t,e);return(0,B.jsx)(`p`,{className:n===null?`visually-hidden`:v.warning,role:`status`,children:n})}function fn(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function pn({report:e}){let{stats:t}=s(),n=i(),r=mn(e);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ut,{totals:e.totals,period:e.periods.totals}),r!==null&&(0,B.jsx)(`p`,{className:v.note,children:t.costSince(f(n,r))}),(0,B.jsxs)(`div`,{className:v.blocks,children:[(0,B.jsx)(`div`,{className:g.wide,children:(0,B.jsx)(sn,{weeks:e.weeks,days:e.days,windows:e.periods})}),(0,B.jsx)(dt,{models:e.models,period:e.periods.days}),(0,B.jsx)(rn,{}),(0,B.jsx)(`div`,{className:g.wide,children:(0,B.jsx)(ft,{commands:e.commands,period:e.periods.days})})]})]})}function mn({since:e,periods:t}){return e!==null&&d(e)>d(t.weeks.from)?e:null}export{un as CostTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,B as n,I as r,M as i,O as a,j as o,k as s,ln as c,pt as l,s as u,un as d}from"./cx-D_DWAtWj.js";import{d as f}from"./index-B94Cizd8.js";import{a as p,i as m,n as h,r as g}from"./StatsTabState-UUAoUbji.js";import{t as _}from"./StatsPage.module-DxtnhZOJ.js";import{t as v}from"./UnavailableRepos-Dzu7etxJ.js";import{n as y,t as b}from"./Figure-C7wdv_hC.js";import{t as x}from"./StatsTable-Cgps5a7q.js";import{B as S,C,V as w,_ as T,a as E,c as D,d as O,g as k,h as A,i as j,l as M,m as N,n as P,o as F,p as I,s as L,t as R}from"./use-grain-panel-BGlDN-LS.js";var z=e(d()),ee=[`axis`,`item`],B=(0,z.forwardRef)((e,t)=>z.createElement(N,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:ee,tooltipPayloadSearcher:w,categoricalChartProps:e,ref:t})),V={steps:`_steps_advmo_1`,now:`_now_advmo_13`},H=c();function U({totals:e}){let{stats:t}=s(),n=a();return(0,H.jsx)(p,{title:t.explainerTitle,children:(0,H.jsxs)(`ol`,{className:V.steps,children:[(0,H.jsx)(`li`,{children:t.explainerTask}),(0,H.jsxs)(`li`,{children:[t.explainerFixed,(0,H.jsx)(W,{children:t.fixedNow(e.fixedTasks,e.fixedLines)})]}),(0,H.jsxs)(`li`,{children:[t.explainerPending,(0,H.jsx)(W,{children:G(t,e)})]}),(0,H.jsxs)(`li`,{children:[t.explainerTests,(0,H.jsx)(W,{children:t.codeAndTests(e)})]}),(0,H.jsxs)(`li`,{children:[t.explainerNoise,(0,H.jsx)(W,{children:K(t,n,e)})]})]})})}function W({children:e}){let{stats:t}=s();return(0,H.jsxs)(`span`,{className:V.now,children:[t.now,` `,e]})}function G(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 K(e,n,a){if(a.estimatedLines===null&&a.openTasks>0)return e.estimateLater;if(a.noiseShare===null)return e.noCommitsSinceAdoption;let s=a.estimatedLines??0,c=i(a.estimatedLines);return e.noiseFormula(t(n,a.deferredLines,c),r(n,a.realLines),t(n,s,c),o(a.noiseShare))}var q=`var(--chart-bar-neutral)`,J=`var(--accent-ink)`,Y=6,X=3;function Z(e,n,r,i){let a=e=>t(r,e,Math.round(e)>0);return P(t=>({title:e.periodOf(i,f(r,t.start)),rows:[{label:e.onTopicSeries,value:n.count(Math.round(t.onTopicLines),`line`),shape:`bar`,color:q},{label:e.deferredSeries,value:a(t.deferredLines),shape:`hatch`,color:J},{label:e.codeLines,value:a(t.deferredLines-t.deferredTestLines)},{label:e.testLines,value:a(t.deferredTestLines)},{label:e.deferredTasks,value:String(t.deferredTasks)}]}))}function Q({periods:e,totals:t,grain:n}){let{stats:r,core:i}=s(),o=a(),c=(0,z.useMemo)(()=>Z(r,i,o,n),[r,i,o,n]),l=(0,z.useId)(),u=[{label:r.onTopicSeries,shape:`bar`,color:q},{label:r.deferredSeries,shape:`hatch`,color:J}];return(0,H.jsx)(I,{summary:$(r,n,e,t),legend:u,children:(0,H.jsxs)(B,{data:e,margin:F,"aria-label":r.chartLabel(r.effectTitle,n),children:[(0,H.jsx)(`defs`,{children:(0,H.jsxs)(`pattern`,{id:l,width:Y,height:Y,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:[(0,H.jsx)(`rect`,{width:Y,height:Y,fill:`var(--surface-raised)`}),(0,H.jsx)(`line`,{x1:0,y1:0,x2:0,y2:Y,stroke:J,strokeWidth:X})]})}),(0,H.jsx)(C,{vertical:!1}),(0,H.jsx)(k,{dataKey:`start`,tickFormatter:e=>M(o,e),...L}),(0,H.jsx)(A,{tickFormatter:e=>O(o,e),width:60,...j}),(0,H.jsx)(S,{content:c,...D}),(0,H.jsx)(T,{dataKey:`onTopicLines`,stackId:`lines`,fill:q,isAnimationActive:!1}),(0,H.jsx)(T,{dataKey:`deferredLines`,stackId:`lines`,fill:`url(#${l})`,radius:E,isAnimationActive:!1})]})})}function $(e,t,r,a){let s=i(a.estimatedLines);if(t===`week`)return e.effectSummary(a.realLines,e.linesText(a.deferredLines,s),o(a.noiseShare));let c=Math.round(n(r.map(e=>e.onTopicLines)));return e.effectDaysSummary(r.length,c,e.linesText(n(r.map(e=>e.deferredLines)),s))}function te({totals:e,period:t}){let{stats:n}=s(),i=a(),c=m();return(0,H.jsxs)(y,{period:c.labelled(n.effectWindow,t),children:[(0,H.jsx)(b,{label:n.keptOut,value:ne(n,e),note:`${re(n,i,e)} · ${n.codeAndTests(e)}`}),(0,H.jsx)(b,{label:n.noiseWithoutBacklog,value:o(e.noiseShare),note:n.noiseNote}),(0,H.jsx)(b,{label:n.deferredToBacklog,value:String(e.fixedTasks+e.openTasks),note:n.deferredNote(e.fixedTasks,e.openTasks)}),(0,H.jsx)(b,{label:n.pullRequestLines,value:r(i,e.realLines)})]})}function ne(e,t){return t.estimatedLines===null?e.linesText(t.fixedLines,!1):e.linesText(t.deferredLines,i(t.estimatedLines))}function re(e,n,a){let o=r(n,a.fixedLines);return a.estimatedLines===null?e.keptOutPending(o):e.keptOutEstimated(o,t(n,a.estimatedLines,i(a.estimatedLines)))}function ie({weeks:e,days:t,windows:n,totals:r}){let{stats:i}=s(),{grain:a,periods:o,period:c,toggle:l}=R(`effect`,`week`,{week:e,day:t},n);return(0,H.jsx)(p,{title:i.effectTitle,period:c,aside:l,children:(0,H.jsx)(Q,{periods:o,totals:r,grain:a})})}function ae({projects:e,period:n}){let{stats:c}=s(),l=a(),u=m();return(0,H.jsx)(p,{title:c.byProject,period:u.labelled(c.effectWindow,n),children:e.length===0?(0,H.jsx)(`p`,{className:g.muted,children:c.noCodeData}):(0,H.jsx)(x,{label:c.byProject,head:c.projectsHead,rows:e.map(e=>({key:e.projectId,cells:[e.name,e.deferredTasks,r(l,e.fixedLines),e.estimatedLines===null?`—`:t(l,e.estimatedLines,i(e.estimatedLines)),r(l,e.realLines),o(e.noiseShare)]}))})})}function oe(){let{projectId:e}=l(),t=u(e);return(0,H.jsx)(h,{query:t,children:e=>(0,H.jsx)(se,{report:e})})}function se({report:e}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v,{repos:e.unavailableRepos}),(0,H.jsx)(te,{totals:e.totals,period:e.periods.weeks}),(0,H.jsxs)(`div`,{className:_.blocks,children:[(0,H.jsx)(`div`,{className:g.wide,children:(0,H.jsx)(ie,{weeks:e.weeks,days:e.days,windows:e.periods,totals:e.totals})}),(0,H.jsx)(`div`,{className:g.wide,children:(0,H.jsx)(ae,{projects:e.projects,period:e.periods.weeks})}),(0,H.jsx)(`div`,{className:g.wide,children:(0,H.jsx)(U,{totals:e.totals})})]})]})}export{oe as EffectTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ln as t,t as n,un as r}from"./cx-D_DWAtWj.js";import{t as i}from"./StatsPage.module-DxtnhZOJ.js";var a=e(r(),1),o=t(),s={growth:i.growth,decline:i.decline};function c({label:e,value:t,note:r,tone:c,trend:l}){let u=(0,a.useId)();return(0,o.jsxs)(`div`,{className:i.figure,role:`group`,"aria-labelledby":u,children:[(0,o.jsx)(`span`,{id:u,className:i.figureLabel,children:e}),(0,o.jsx)(`span`,{className:n(i.figureValue,c!==void 0&&s[c]),children:t}),l!==void 0&&(0,o.jsxs)(`span`,{className:n(i.figureTrend,s[l.tone]),children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,children:l.text}),(0,o.jsx)(`span`,{className:`visually-hidden`,children:l.speech})]}),r!==void 0&&(0,o.jsx)(`span`,{className:i.figureNote,children:r})]})}function l({period:e,children:t}){let n=(0,a.useId)();return(0,o.jsxs)(`div`,{role:`group`,"aria-labelledby":n,className:i.figureGroup,children:[(0,o.jsx)(`p`,{id:n,className:i.note,children:e}),(0,o.jsx)(`div`,{className:i.totals,children:t})]})}export{l as n,c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,L as n,O as r,R as i,V as a,h as o,k as s,ln as c,pt as l,t as u,un as d}from"./cx-D_DWAtWj.js";import{d as f}from"./index-B94Cizd8.js";import{c as p,u as m}from"./start-B1ddmC3G.js";import{a as h,i as g,n as _,r as v}from"./StatsTabState-UUAoUbji.js";import{t as ee}from"./ShareBar-r80rkujo.js";import{t as y}from"./StatsPage.module-DxtnhZOJ.js";import{t as b}from"./Figure-C7wdv_hC.js";import{B as x,C as S,_ as C,a as w,c as T,d as E,g as D,h as O,i as k,l as A,n as j,o as M,p as N,s as P,t as F}from"./use-grain-panel-BGlDN-LS.js";import{n as I,r as L,t as te}from"./value-dot-CtJcBhqS.js";var R={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`},z=c();function ne(e,t){let n=[...a].reverse().filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return n.length===0?``:` (${n.join(`, `)})`}function B({age:e}){let{stats:n,core:r}=s(),i=e.buckets.map(({bucket:e,byPriority:n})=>({bucket:e,total:t(a.map(e=>n[e])),byPriority:n})),o=Math.max(1,...i.map(({total:e})=>e)),c=i.map(({bucket:e,total:t,byPriority:r})=>`${n.ageBuckets[e]}: ${t}${ne(n,r)}`).join(`; `);return(0,z.jsxs)(h,{title:n.openAge,period:n.periodNow,children:[(0,z.jsx)(`div`,{role:`img`,"aria-label":c,className:R.ageRows,children:i.map(({bucket:e,total:t,byPriority:r})=>(0,z.jsxs)(`div`,{className:R.ageRow,"aria-hidden":`true`,children:[(0,z.jsx)(`span`,{className:R.ageLabel,children:n.ageBuckets[e]}),(0,z.jsx)(`span`,{className:R.ageTrack,children:a.map(e=>(0,z.jsx)(`span`,{className:u(R.ageSegment,R[e]),style:{width:`${r[e]/o*100}%`}},e))}),(0,z.jsx)(`span`,{className:v.rowValue,children:t})]},e))}),(0,z.jsx)(`p`,{className:R.legend,children:[...a].reverse().map(e=>(0,z.jsx)(`span`,{className:u(R.legendItem,R[e]),children:r.priorityLabel(e)},e))}),(0,z.jsx)(`p`,{className:u(R.alarm,e.urgentStale>0&&R.alarmOn),children:n.urgentStale(e.urgentStale)})]})}var V=[`done`,`fixed`,`obsolete`,`duplicate`,`cancelled`,`unknown`];function H(e,{stats:t,core:n}){return e===`done`||e===`cancelled`||e===`unknown`?t.closingReasons[e]:n.resolutionLabel(e)}function re({closing:e,period:r}){let i=s(),a=g(),{stats:o}=i,c=t(V.map(t=>e.byReason[t])),l=V.map(t=>`${H(t,i)}: ${e.byReason[t]}`).join(`; `);return(0,z.jsxs)(h,{title:o.closing,period:a.of(`weeks`,r),children:[(0,z.jsx)(`div`,{role:`img`,"aria-label":l,className:R.shareBar,children:V.map(t=>(0,z.jsx)(`span`,{className:u(R.share,R[t]),style:{width:c===0?0:`${e.byReason[t]/c*100}%`}},t))}),(0,z.jsx)(`ul`,{className:v.rows,children:V.map(t=>(0,z.jsxs)(`li`,{className:v.row,children:[(0,z.jsx)(`span`,{className:u(R.legendItem,R[t]),children:H(t,i)}),(0,z.jsx)(`span`,{className:v.rowValue,children:e.byReason[t]})]},t))}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:v.subTitle,children:o.noiseAndReopens}),(0,z.jsxs)(`ul`,{className:v.rows,children:[(0,z.jsx)(U,{label:o.duplicatesAmongClosed,value:n(e.duplicateShare)}),(0,z.jsx)(U,{label:o.noSourceAmongCreated,value:n(e.withoutSourceShare)}),(0,z.jsx)(U,{label:o.reopened,value:e.reopened})]})]})]})}function U({label:e,value:t}){return(0,z.jsxs)(`li`,{className:v.row,children:[(0,z.jsx)(`span`,{className:v.rowLabel,children:e}),(0,z.jsx)(`span`,{className:v.rowValue,children:t})]})}var ie=`↓`,W=`↑`;function G(e,t,n){if(t===null||n===null)return;let r=t-n;if(r===0)return;let i=r<0,a=String(Math.abs(r));return{text:e.weekTrend(i?ie:W,a),speech:e.weekTrendSpeech(a,i),tone:i?`decline`:`growth`}}function K({hotspots:e,listPath:t}){let{stats:n}=s();return(0,z.jsx)(h,{title:n.hotspots,period:n.periodNow,children:(0,z.jsxs)(`div`,{className:R.columns,children:[(0,z.jsx)(q,{title:n.folders,empty:n.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,z.jsx)(`code`,{children:e}),count:t}))}),(0,z.jsx)(q,{title:n.tags,empty:n.noTags,items:e.tags.map(({tag:e,count:n})=>({key:e,label:(0,z.jsxs)(m,{to:{pathname:t,search:`tag=${encodeURIComponent(e)}`},children:[`#`,e]}),count:n}))})]})})}function q({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,z.jsxs)(`div`,{className:R.countList,children:[(0,z.jsx)(`h3`,{className:v.subTitle,children:e}),n.length===0?(0,z.jsx)(`p`,{className:v.muted,children:t}):(0,z.jsx)(`ul`,{className:v.rows,children:n.map(e=>(0,z.jsxs)(`li`,{className:v.countRow,children:[(0,z.jsx)(`span`,{className:v.rowLabel,children:e.label}),(0,z.jsx)(`span`,{className:v.rowValue,children:e.count}),(0,z.jsx)(ee,{share:e.count/r})]},e.key))})]})}var J=e(d(),1),Y=`var(--chart-bar-neutral)`,X=`var(--chart-bar-green)`,Z=`var(--chart-line-bright)`;function ae(e,t,n){return j(r=>({title:e.periodOf(n,f(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 oe({weeks:e,days:n,windows:i}){let{stats:a}=s(),o=r(),{grain:c,periods:l,period:u,toggle:d}=F(`flow`,`week`,{week:e,day:n},i),f=(0,J.useMemo)(()=>ae(a,o,c),[a,o,c]),p=[{label:a.flowCreated,shape:`bar`,color:Y},{label:a.flowClosed,shape:`bar`,color:X},{label:a.flowOpenAtEnd[c],shape:`line`,color:Z}],m=a.debtBy[c],g=a.flowSummary({grain:c,periodCount:l.length,created:t(l.map(e=>e.created)),closed:t(l.map(e=>e.closed)),openNow:l.at(-1)?.openAtEnd??0}),_=e=>E(o,e);return(0,z.jsx)(h,{title:m,period:u,aside:d,children:(0,z.jsx)(N,{summary:g,legend:p,children:(0,z.jsxs)(I,{data:l,margin:M,"aria-label":a.chartLabel(m,c),children:[(0,z.jsx)(S,{vertical:!1}),(0,z.jsx)(D,{dataKey:`start`,tickFormatter:e=>A(o,e),...P}),(0,z.jsx)(O,{yAxisId:`flow`,allowDecimals:!1,tickFormatter:_,width:60,...k}),(0,z.jsx)(O,{yAxisId:`open`,orientation:`right`,allowDecimals:!1,tickFormatter:_,width:60,...k}),(0,z.jsx)(x,{content:f,...T}),(0,z.jsx)(C,{yAxisId:`flow`,dataKey:`created`,fill:Y,radius:w,isAnimationActive:!1}),(0,z.jsx)(C,{yAxisId:`flow`,dataKey:`closed`,fill:X,radius:w,isAnimationActive:!1}),(0,z.jsx)(L,{yAxisId:`open`,dataKey:`openAtEnd`,stroke:Z,strokeWidth:3,dot:te(Z),isAnimationActive:!1})]})})})}var Q=`var(--chart-bar-warm)`;function se(e,t,n,r){return j(i=>({title:e.periodOf(r,f(n,i.start)),rows:[{label:e.flowCreated,value:t.count(i.created,`task`),shape:`bar`,color:Q}]}))}function $({weeks:e,days:n,windows:i}){let{stats:a,core:o}=s(),c=r(),{grain:l,periods:u,period:d,toggle:f}=F(`intake`,`day`,{week:e,day:n},i),p=(0,J.useMemo)(()=>se(a,o,c,l),[a,o,c,l]),m=[{label:a.createdTasks,shape:`bar`,color:Q}],g=a.createdBy[l];return(0,z.jsx)(h,{title:g,period:d,aside:f,children:(0,z.jsx)(N,{summary:a.intakeSummary(l,u.length,t(u.map(e=>e.created))),legend:m,children:(0,z.jsxs)(I,{data:u,margin:M,"aria-label":a.chartLabel(g,l),children:[(0,z.jsx)(S,{vertical:!1}),(0,z.jsx)(D,{dataKey:`start`,tickFormatter:e=>A(c,e),...P}),(0,z.jsx)(O,{allowDecimals:!1,tickFormatter:e=>E(c,e),width:60,...k}),(0,z.jsx)(x,{content:p,...T}),(0,z.jsx)(C,{dataKey:`created`,fill:Q,radius:w,isAnimationActive:!1})]})})})}function ce(){let{projectId:e}=l(),t=o(e);return(0,z.jsx)(_,{query:t,children:t=>(0,z.jsx)(le,{report:t,taskListPath:p(e)})})}function le({report:e,taskListPath:t}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ue,{totals:e.totals}),(0,z.jsxs)(`div`,{className:y.blocks,children:[(0,z.jsx)(oe,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,z.jsx)($,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,z.jsx)(K,{hotspots:e.hotspots,listPath:t}),(0,z.jsx)(B,{age:e.age}),(0,z.jsx)(re,{closing:e.closing,period:e.periods.weeks})]})]})}function ue({totals:e}){let{stats:t}=s(),n=e.createdLastWeek-e.closedLastWeek,r=e.previous;return(0,z.jsxs)(`div`,{className:u(y.totals,y.totalsPair),children:[(0,z.jsx)(b,{label:t.tasksToday,value:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:e.createdToday>0?y.growth:void 0,children:[`+`,e.createdToday]}),` `,(0,z.jsxs)(`span`,{className:e.closedToday>0?y.decline:void 0,children:[`−`,e.closedToday]})]}),note:t.createdAndClosed}),(0,z.jsx)(b,{label:t.thisWeek,value:i(n),tone:de(n),note:t.weekNote(e.createdLastWeek,e.closedLastWeek),trend:G(t,n,r?.net??null)})]})}function de(e){if(e>0)return`growth`;if(e<0)return`decline`}export{ce as OverviewTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,L as n,O as r,k as i,ln as a,pt as o,u as s,un as c}from"./cx-D_DWAtWj.js";import{d as l}from"./index-B94Cizd8.js";import{a as u,i as d,n as f,r as p}from"./StatsTabState-UUAoUbji.js";import{t as m}from"./StatsPage.module-DxtnhZOJ.js";import{t as h}from"./StatsTable-Cgps5a7q.js";import{B as g,C as _,_ as v,a as y,c as b,g as x,h as S,i as C,l as w,n as T,o as E,p as D,s as O,t as k}from"./use-grain-panel-BGlDN-LS.js";import{n as A,r as j,t as M}from"./value-dot-CtJcBhqS.js";var N=e(c(),1),P=a(),F=`var(--chart-bar-neutral)`,I=`var(--chart-line-green)`;function L(e,t,r){return T(i=>({title:e.periodOf(r,l(t,i.start)),rows:[{label:e.decidedCandidates,value:String(i.decided),shape:`bar`,color:F},{label:e.precision,value:n(i.precision),shape:`line`,color:I}]}))}function R({periods:e,grain:a}){let{stats:o}=i(),s=r(),c=(0,N.useMemo)(()=>L(o,s,a),[o,s,a]),l=[{label:o.decidedCandidates,shape:`bar`,color:F},{label:o.precision,shape:`line`,color:I}],u=t(e.map(e=>e.decided)),d=e.filter(e=>e.precision!==null).at(-1),f=o.accuracySummary({grain:a,periodCount:e.length,decided:u,latestPrecision:d===void 0?null:n(d.precision)});return(0,P.jsx)(D,{summary:f,legend:l,children:(0,P.jsxs)(A,{data:e,margin:E,"aria-label":o.chartLabel(o.accuracyTitle,a),children:[(0,P.jsx)(_,{vertical:!1}),(0,P.jsx)(x,{dataKey:`start`,tickFormatter:e=>w(s,e),...O}),(0,P.jsx)(S,{yAxisId:`decided`,allowDecimals:!1,width:60,...C}),(0,P.jsx)(S,{yAxisId:`precision`,orientation:`right`,domain:[0,1],tickFormatter:n,width:60,...C}),(0,P.jsx)(g,{content:c,...b}),(0,P.jsx)(v,{yAxisId:`decided`,dataKey:`decided`,fill:F,radius:y,isAnimationActive:!1}),(0,P.jsx)(j,{yAxisId:`precision`,type:`monotone`,dataKey:`precision`,stroke:I,strokeWidth:3,connectNulls:!0,dot:M(I),isAnimationActive:!1})]})})}function z({rows:e,weeks:t,days:r,windows:a,methodRows:o,matchRows:s}){let{stats:c,core:l}=i(),f=d(),{grain:m,periods:g,period:_,toggle:v}=k(`accuracy`,`week`,{week:t,day:r},a),y=f.of(`weeks`,a.weeks),b=e=>e===`source-changed`?o.map(e=>B(c,e,e.by===`unknown`?c.beforeMethodRecorded:c.checkedBy(l.checkMethodLabel(e.by)))):e===`duplicate`?s.map(e=>B(c,e,e.by===`unknown`?c.beforeMatchRecorded:c.matchedBy(l.duplicateMatchLabel(e.by)))):[];return(0,P.jsx)(u,{title:c.accuracyTitle,period:_,aside:e.length===0?void 0:v,children:e.length===0?(0,P.jsx)(`p`,{className:p.muted,children:c.noCandidates}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{className:p.muted,children:c.accuracyHint}),(0,P.jsx)(R,{periods:g,grain:m}),(0,P.jsx)(`p`,{className:p.muted,children:y}),(0,P.jsx)(h,{label:c.accuracyTable(y),head:c.accuracyHead,rows:e.flatMap(e=>[{key:e.evidence,tone:e.evidence===`total`?`total`:void 0,cells:[l.evidenceLabel(e.evidence),e.candidates,e.closed,e.verified,e.open,n(e.precision)]},...b(e.evidence).map(t=>({...t,key:`${e.evidence}-${t.key}`}))])})]})})}function B(e,t,r){return{key:t.by,tone:`child`,cells:[e.splitRow(r),t.candidates,t.closed,t.verified,t.open,n(t.precision)]}}function V({graph:e,period:t}){let{stats:n,core:r}=i(),a=d(),{projects:o,filter:s}=e;return s.filtered===0&&o.every(e=>e.state===`none`)?(0,P.jsx)(u,{title:n.graphTitle,children:(0,P.jsx)(`p`,{className:p.muted,children:n.graphMissing(e=>(0,P.jsx)(`code`,{children:e},e))})}):(0,P.jsxs)(u,{title:n.graphTitle,children:[(0,P.jsx)(`p`,{className:p.muted,children:n.graphHint}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:a.labelled(n.filteredTitle,t)}),s.filtered===0?(0,P.jsx)(`p`,{className:p.muted,children:n.nothingFiltered}):(0,P.jsx)(h,{label:n.filteredTable,head:n.filteredHead,rows:[{key:`filtered`,cells:[n.filteredByGraph,s.filtered]},{key:`caught`,cells:[n.filteredCaught,s.caught]},{key:`missed`,cells:[n.filteredMissed,s.missed]},{key:`quiet`,cells:[n.filteredQuiet,s.quiet]}]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:n.periodCaption(n.projects,n.periodNow)}),(0,P.jsx)(h,{label:n.graphByProject,head:n.graphHead,rows:o.map(e=>({key:e.projectId,cells:[e.name,r.graphStateLabel(e.state),e.pinned,H(e)]}))})]})]})}function H({state:e,pinned:t,resolved:r}){return e===`none`||e===`unreadable`?`—`:`${r} (${n(t===0?null:r/t)})`}function U({rows:e,period:t}){let{stats:n,core:r}=i(),a=d(),o=e=>e.category===`unknown`?n.categoryUnknown:r.categoryLabel(e.category??void 0);return(0,P.jsx)(u,{title:n.categoriesTitle,period:a.of(`weeks`,t),children:e.length===0?(0,P.jsx)(`p`,{className:p.muted,children:n.categoriesEmpty}):(0,P.jsx)(h,{label:n.categoriesTitle,head:n.categoriesHead,rows:e.map(e=>({key:e.category??`none`,cells:[o(e),e.open,e.weight,e.created,e.closed]}))})})}function W({found:e,branches:t,period:n}){let{stats:r}=i(),a=d(),o=e=>e.found===null?r.foundNotRecorded:e.found===`unknown`?r.foundUnknown:r.foundLabels[e.found];return(0,P.jsxs)(u,{title:r.originTitle,period:a.of(`weeks`,n),children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:r.foundTitle}),(0,P.jsx)(h,{label:r.foundTitle,head:r.foundHead,rows:e.map(e=>({key:e.found??`not-recorded`,cells:[o(e),e.created,e.open,e.fixed]}))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:r.branchesTitle}),t.length===0?(0,P.jsx)(`p`,{className:p.muted,children:r.branchesEmpty}):(0,P.jsx)(h,{label:r.branchesTitle,head:r.branchesHead,rows:t.map(e=>({key:e.label,cells:[(0,P.jsx)(`code`,{children:e.label}),e.created,e.open]}))})]})]})}function G(){let{projectId:e}=o(),t=s(e);return(0,P.jsx)(f,{query:t,children:e=>(0,P.jsx)(K,{report:e})})}function K({report:e}){return(0,P.jsxs)(`div`,{className:m.blocks,children:[(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(z,{rows:e.accuracy,weeks:e.accuracyWeeks,days:e.accuracyDays,windows:e.periods,methodRows:e.methodAccuracy,matchRows:e.matchAccuracy})}),(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(V,{graph:e.graph,period:e.periods.weeks})}),(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(U,{rows:e.categories,period:e.periods.weeks})}),(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(W,{found:e.found,branches:e.branches,period:e.periods.weeks})})]})}export{G as QualityTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ln as e}from"./cx-D_DWAtWj.js";import{r as t}from"./StatsTabState-UUAoUbji.js";var n=e();function r({share:e}){return(0,n.jsx)(`span`,{className:t.track,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:t.fill,style:{transform:`scaleX(${e})`}})})}export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_10yeb_1{min-width:0;overflow-y:var(--main-overflow,auto);container-type:inline-size}._heading_10yeb_7{padding:var(--space-4) var(--space-5) 0;font-size:var(--text-lg);text-wrap:balance;margin:0;font-weight:600}._scopeNote_10yeb_15{margin:var(--space-1) var(--space-5) 0;color:var(--ink-subtle);font-size:var(--text-sm)}._signals_10yeb_21{margin:var(--space-3) var(--space-5) 0;padding:var(--space-2) var(--space-4);border:1px solid var(--warn);border-radius:var(--radius-control);background:var(--warn-soft);color:var(--ink)}._signalsTitle_10yeb_30{margin-bottom:var(--space-1);display:block}._signals_10yeb_21 ul{margin:0;padding-inline-start:var(--space-4)}._tabs_10yeb_40{gap:var(--space-1);padding:var(--space-3) var(--space-5) 0;border-bottom:1px solid var(--line);flex-wrap:wrap;display:flex}._tab_10yeb_40{padding:var(--space-2) var(--space-3);color:var(--ink-muted);white-space:nowrap;transition:color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out);border-bottom:2px solid #0000;text-decoration:none}._tab_10yeb_40:hover{color:var(--ink)}._tabActive_10yeb_61{border-bottom-color:var(--ink);color:var(--ink)}._tabPending_10yeb_66{border-bottom-color:var(--line-strong);cursor:progress}._content_10yeb_71{gap:var(--space-4);padding:var(--space-4) var(--space-5) var(--space-6);flex-direction:column;display:flex}._hint_10yeb_78{max-width:60ch;margin:var(--space-6) var(--space-5);color:var(--ink-muted)}._hintLoading_10yeb_84{color:var(--ink-subtle)}._hint_10yeb_78 p{margin:0 0 var(--space-3);text-wrap:pretty}._warning_10yeb_93{padding:var(--space-3) var(--space-4);border:1px solid var(--warn);border-radius:var(--radius-control);background:var(--warn-soft);color:var(--ink);text-wrap:pretty;margin:0}._totals_10yeb_103{gap:var(--space-3);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}._totalsPair_10yeb_109{grid-template-columns:repeat(2,minmax(0,1fr))}._figureGroup_10yeb_113{gap:var(--space-2);flex-direction:column;display:flex}._figure_10yeb_113{gap:var(--space-1);padding:var(--space-3);border-radius:var(--radius-control);background:var(--surface-raised);box-shadow:0 0 0 1px var(--line);border:none;flex-direction:column;display:flex}._figureLabel_10yeb_130,._figureNote_10yeb_131{color:var(--ink-subtle);font-size:var(--text-sm)}._figureTrend_10yeb_136{font-size:var(--text-sm);font-variant-numeric:tabular-nums}._figureValue_10yeb_141{font-size:var(--text-xl);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-weight:600}._growth_10yeb_148{color:var(--accent-ink)}._decline_10yeb_152{color:var(--ok)}._blocks_10yeb_156{gap:var(--space-3);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}._note_10yeb_162{max-width:70ch;color:var(--ink-subtle);font-size:var(--text-sm);text-wrap:pretty;margin:0}@container (width<=900px){._totals_10yeb_103{grid-template-columns:repeat(2,minmax(0,1fr))}._blocks_10yeb_156{grid-template-columns:minmax(0,1fr)}}@container (width<=480px){._totals_10yeb_103{grid-template-columns:minmax(0,1fr)}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{It as t,k as n,l as r,ln as i,m as a,pt as o,st as s,t as c,un as l,ut as u}from"./cx-D_DWAtWj.js";import{a as d,d as f,i as p,l as m,o as h,t as g,u as _}from"./start-B1ddmC3G.js";import{t as v}from"./StatsPage.module-DxtnhZOJ.js";var y=e(l(),1),b=i();function x(){let{projectId:e}=o(),{pathname:i}=s(),l=r(),x=a(e),{app:S,core:C,stats:w}=n(),T=e===void 0?w.projects:d(l.data,e),E=w.heading(T),D=m(e),O=e=>e===``?D:`${D}/${e}`,k=(e,n)=>t({path:O(e),end:!0},n)!==null,A=g.find(e=>e.segment!==``&&k(e.segment,i))??g[0],j=u().location?.pathname,M=(0,y.useRef)(null),N=j===void 0?void 0:g.find(e=>k(e.segment,j)),P=w.docTitle(A.segment===``?E:`${w.tabs[A.key]} · ${E}`);return p(P),(0,b.jsxs)(`main`,{id:`content`,tabIndex:-1,className:v.page,"aria-busy":N!==void 0||void 0,children:[(0,b.jsx)(`h1`,{ref:M,tabIndex:-1,className:v.heading,children:E}),e===void 0&&l.data!==void 0&&(0,b.jsx)(`p`,{className:v.scopeNote,children:h(l.data,S)}),(x.data?.signals.length??0)>0&&(0,b.jsxs)(`div`,{className:v.signals,role:`status`,"aria-labelledby":`stats-signals-heading`,children:[(0,b.jsx)(`strong`,{id:`stats-signals-heading`,className:v.signalsTitle,children:w.alerts}),(0,b.jsx)(`ul`,{children:x.data?.signals.map(e=>(0,b.jsx)(`li`,{children:C.signal(e)},e.kind))})]}),(0,b.jsx)(`nav`,{className:v.tabs,"aria-label":w.tabsLabel,children:g.map(e=>(0,b.jsx)(_,{to:O(e.segment),className:c(v.tab,e===A&&v.tabActive,e===N&&v.tabPending),"aria-current":e===A?`page`:void 0,children:w.tabs[e.key]},e.key))}),(0,b.jsx)(f,{context:{heading:M}})]})}export{x as StatsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={page:`_page_10yeb_1`,heading:`_heading_10yeb_7`,scopeNote:`_scopeNote_10yeb_15`,signals:`_signals_10yeb_21`,signalsTitle:`_signalsTitle_10yeb_30`,tabs:`_tabs_10yeb_40`,tab:`_tab_10yeb_40`,tabActive:`_tabActive_10yeb_61`,tabPending:`_tabPending_10yeb_66`,content:`_content_10yeb_71`,hint:`_hint_10yeb_78`,hintLoading:`_hintLoading_10yeb_84`,warning:`_warning_10yeb_93`,totals:`_totals_10yeb_103`,totalsPair:`_totalsPair_10yeb_109`,figureGroup:`_figureGroup_10yeb_113`,figure:`_figure_10yeb_113`,figureLabel:`_figureLabel_10yeb_130`,figureNote:`_figureNote_10yeb_131`,figureTrend:`_figureTrend_10yeb_136`,figureValue:`_figureValue_10yeb_141`,growth:`_growth_10yeb_148`,decline:`_decline_10yeb_152`,blocks:`_blocks_10yeb_156`,note:`_note_10yeb_162`};export{e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{O as t,T as n,ft as r,k as i,ln as a,t as o,un as s}from"./cx-D_DWAtWj.js";import{l as c,p as l}from"./index-B94Cizd8.js";import{r as u,s as d}from"./start-B1ddmC3G.js";import{t as f}from"./StatsPage.module-DxtnhZOJ.js";var p=e(s(),1),m={panel:`_panel_1n3ez_1`,head:`_head_1n3ez_14`,heading:`_heading_1n3ez_22`,period:`_period_1n3ez_29`,title:`_title_1n3ez_35`},h=a();function g({title:e,period:t,aside:n,children:r}){let i=(0,p.useId)(),a=(0,p.useId)();return(0,h.jsxs)(`section`,{className:m.panel,"aria-labelledby":i,"aria-describedby":t===void 0?void 0:a,children:[(0,h.jsxs)(`div`,{className:m.head,children:[(0,h.jsxs)(`div`,{className:m.heading,children:[(0,h.jsx)(`h2`,{id:i,className:m.title,children:e}),t!==void 0&&(0,h.jsx)(`p`,{id:a,className:m.period,children:t})]}),n]}),r]})}function _(){let{stats:e}=i(),n=t(),r=(t,r)=>e.periodCaption(t,l(n,r.from,r.to)),a=(t,n)=>r(e.periodWindows[t],n);return{of:a,ofGrain:(e,t)=>e===`week`?a(`weeks`,t.weeks):a(`days`,t.days),labelled:r}}var v={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 y({query:e,empty:t,children:a}){let{stats:s}=i(),{error:c,data:l,isFetching:p}=e,m=l!==void 0,g=c instanceof n&&c.status===404,_=g?null:c,v=c===null&&!m,y=l!==void 0&&t!==void 0&&t.isEmpty(l),b=x(s,c,g,m,y?t.message:null),{status:S,keepFocus:C}=u(b===null&&_===null,r()?.heading);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{ref:S,tabIndex:-1,role:`status`,"aria-live":`polite`,className:b===null&&_===null?`visually-hidden`:o(f.hint,v&&f.hintLoading),children:[b!==null&&(0,h.jsx)(`p`,{children:b}),_!==null&&(0,h.jsx)(d,{error:_,fetching:p,onRetry:()=>{C(),e.refetch()}})]}),!g&&l!==void 0&&!y&&(0,h.jsx)(`div`,{className:f.content,children:a(l)})]})}function b({query:e,children:n}){let{stats:r}=i(),a=t(),o=e.data?.invalidJournalLines??0,s=e.data?.unknownJournalLines??0,c=e.data?.unparsedTasks??0,l=[o>0?r.invalidJournalLines(o):null,s>0?r.unknownJournalLines(s):null,c>0?r.unparsedTasks(c):null].filter(e=>e!==null);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:l.length>0?f.warning:`visually-hidden`,role:`status`,children:l.join(` `)}),(0,h.jsx)(y,{query:e,empty:{isEmpty:e=>e.taskCount===0,message:r.noTasks},children:e=>(0,h.jsxs)(h.Fragment,{children:[n(e),(0,h.jsx)(`p`,{className:f.note,children:S(r,a,e.journalSince)})]})})]})}function x(e,t,n,r,i){return n?e.projectNotFound:t===null?r?i:e.loading:null}function S(e,t,n){return n===null?e.journalEmpty:e.journalSince(c(t,n))}export{g as a,_ as i,b as n,v as r,y as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._scroll_14ae0_1{background:linear-gradient(to right, var(--surface-raised) 30%, transparent) left / 24px 100% no-repeat local, linear-gradient(to left, var(--surface-raised) 30%, transparent) right / 24px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, color-mix(in oklch, var(--ink) 35%, transparent), transparent) left / 10px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, color-mix(in oklch, var(--ink) 35%, transparent), transparent) right / 10px 100% no-repeat scroll;overflow-x:auto}._scroll_14ae0_1:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}._table_14ae0_14{border-collapse:collapse;width:100%;font-size:var(--text-sm);font-variant-numeric:tabular-nums}._table_14ae0_14 th,._table_14ae0_14 td{padding:var(--space-1) var(--space-2);border-bottom:1px solid var(--line);text-align:end;white-space:nowrap}._table_14ae0_14 th:first-child,._table_14ae0_14 td:first-child{text-align:start;padding-inline-start:0}._table_14ae0_14 thead th{color:var(--ink-subtle);font-weight:500}._table_14ae0_14 tbody th{color:var(--ink);font-weight:400}._table_14ae0_14 tbody ._child_14ae0_45>*{color:var(--ink-subtle)}._table_14ae0_14 tbody ._total_14ae0_49>*{font-weight:600}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as e,ln as t}from"./cx-D_DWAtWj.js";import{t as n}from"./StatsPage.module-DxtnhZOJ.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};
|