cc-viewer 1.6.166 → 1.6.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/cli.js +46 -44
  2. package/dist/assets/{App-PpGy-sJs.js → App-RoyFuh5Q.js} +2 -2
  3. package/dist/assets/{AppHeader.module-bGH1aU5U.js → AppHeader.module-BImQ_54s.js} +3 -3
  4. package/dist/assets/{Mobile-zn02GYjF.js → Mobile-vWVxR99L.js} +1 -1
  5. package/dist/assets/{_baseUniq-SzXNYYuQ.js → _baseUniq-B6ltZppX.js} +1 -1
  6. package/dist/assets/{arc-Dqr10Z9u.js → arc-Vbp4ofmN.js} +1 -1
  7. package/dist/assets/{architectureDiagram-Q4EWVU46-DQxpwKhc.js → architectureDiagram-Q4EWVU46-Omfxat_t.js} +1 -1
  8. package/dist/assets/{blockDiagram-DXYQGD6D-MCyTBnu_.js → blockDiagram-DXYQGD6D-Cf3-qloX.js} +1 -1
  9. package/dist/assets/{c4Diagram-AHTNJAMY-DPkVF8_o.js → c4Diagram-AHTNJAMY-DYwRFXfv.js} +1 -1
  10. package/dist/assets/channel-Cra_2uB5.js +1 -0
  11. package/dist/assets/{chunk-4BX2VUAB-yRZYwUe7.js → chunk-4BX2VUAB-CIDGvU3W.js} +1 -1
  12. package/dist/assets/{chunk-4TB4RGXK-g58lYn1_.js → chunk-4TB4RGXK-BQLP4sEU.js} +1 -1
  13. package/dist/assets/{chunk-55IACEB6-B8XtXWjG.js → chunk-55IACEB6-BKCJCwXl.js} +1 -1
  14. package/dist/assets/{chunk-EDXVE4YY-CoBq7Op_.js → chunk-EDXVE4YY-CP0l4ZvR.js} +1 -1
  15. package/dist/assets/{chunk-FMBD7UC4-Bz2SyMmT.js → chunk-FMBD7UC4-BXuR0bLg.js} +1 -1
  16. package/dist/assets/{chunk-OYMX7WX6-BMiP8sxO.js → chunk-OYMX7WX6-CQAT-kvP.js} +1 -1
  17. package/dist/assets/{chunk-QZHKN3VN-vWdQywor.js → chunk-QZHKN3VN-Q98nSi6M.js} +1 -1
  18. package/dist/assets/{chunk-YZCP3GAM-H2Qald1u.js → chunk-YZCP3GAM-DVI8PJQD.js} +1 -1
  19. package/dist/assets/classDiagram-6PBFFD2Q-DZO1YSrB.js +1 -0
  20. package/dist/assets/classDiagram-v2-HSJHXN6E-DZO1YSrB.js +1 -0
  21. package/dist/assets/clone-ClSvKPUH.js +1 -0
  22. package/dist/assets/{cose-bilkent-S5V4N54A-CUzm88pg.js → cose-bilkent-S5V4N54A-xIPitAMf.js} +1 -1
  23. package/dist/assets/{dagre-KV5264BT-Bjp_08X3.js → dagre-KV5264BT-BbSCasJv.js} +1 -1
  24. package/dist/assets/{diagram-5BDNPKRD-CNzCAGIk.js → diagram-5BDNPKRD-BHoJ1el8.js} +1 -1
  25. package/dist/assets/{diagram-G4DWMVQ6-CnzimH43.js → diagram-G4DWMVQ6-Bq5eXRdC.js} +1 -1
  26. package/dist/assets/{diagram-MMDJMWI5-udkDyv3T.js → diagram-MMDJMWI5-7p56RIQO.js} +1 -1
  27. package/dist/assets/{diagram-TYMM5635-zuBhNjoF.js → diagram-TYMM5635-CbVE-avc.js} +1 -1
  28. package/dist/assets/{erDiagram-SMLLAGMA-DbM1wV5n.js → erDiagram-SMLLAGMA-rfaQ57n7.js} +1 -1
  29. package/dist/assets/{flowDiagram-DWJPFMVM-CSadLSn0.js → flowDiagram-DWJPFMVM-CRocX4iG.js} +1 -1
  30. package/dist/assets/{ganttDiagram-T4ZO3ILL-cZ1lliPg.js → ganttDiagram-T4ZO3ILL-DeIZmyFR.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-UUTBAWPF-rUkFTHfi.js → gitGraphDiagram-UUTBAWPF-Cr74Jxgd.js} +1 -1
  32. package/dist/assets/{graph-CznzHW7x.js → graph-CNQvwryq.js} +1 -1
  33. package/dist/assets/{index-D3gYkJSV.js → index-DFWhTJN9.js} +2 -2
  34. package/dist/assets/{infoDiagram-42DDH7IO-CSqT25Uw.js → infoDiagram-42DDH7IO-BFA0Fouc.js} +1 -1
  35. package/dist/assets/{ishikawaDiagram-UXIWVN3A-BPCH1qQq.js → ishikawaDiagram-UXIWVN3A-DjpdHSVJ.js} +1 -1
  36. package/dist/assets/{journeyDiagram-VCZTEJTY-ByO7oj2l.js → journeyDiagram-VCZTEJTY-BXp82IFg.js} +1 -1
  37. package/dist/assets/{kanban-definition-6JOO6SKY-DNslkxdi.js → kanban-definition-6JOO6SKY-B9SYmCv8.js} +1 -1
  38. package/dist/assets/{layout-BYAgrXJg.js → layout-0tZdmu24.js} +1 -1
  39. package/dist/assets/{linear-C2I5E4u0.js → linear-B8hOkc_x.js} +1 -1
  40. package/dist/assets/{mermaid.core-_9SzLMc7.js → mermaid.core-BSWRD8yE.js} +4 -4
  41. package/dist/assets/{min-kspNbmEc.js → min-1aSd-oa0.js} +1 -1
  42. package/dist/assets/{mindmap-definition-QFDTVHPH-CxEfeJjC.js → mindmap-definition-QFDTVHPH-CMEc5FcZ.js} +1 -1
  43. package/dist/assets/{pieDiagram-DEJITSTG-BVJX_voI.js → pieDiagram-DEJITSTG-D42vvWaR.js} +1 -1
  44. package/dist/assets/{quadrantDiagram-34T5L4WZ-BYRCzXcP.js → quadrantDiagram-34T5L4WZ-BB9FFGmx.js} +1 -1
  45. package/dist/assets/{requirementDiagram-MS252O5E-BddlUcLu.js → requirementDiagram-MS252O5E-BaHoyqhI.js} +1 -1
  46. package/dist/assets/{sankeyDiagram-XADWPNL6-VWu6V7Q2.js → sankeyDiagram-XADWPNL6-DnOPT0zB.js} +1 -1
  47. package/dist/assets/{sequenceDiagram-FGHM5R23-CvFX9xbv.js → sequenceDiagram-FGHM5R23-iLAT7VEf.js} +1 -1
  48. package/dist/assets/{stateDiagram-FHFEXIEX-DL8ySOL8.js → stateDiagram-FHFEXIEX-C4Qd5gTI.js} +1 -1
  49. package/dist/assets/stateDiagram-v2-QKLJ7IA2-C7ZVbjTe.js +1 -0
  50. package/dist/assets/{timeline-definition-GMOUNBTQ-C-xBjS7Z.js → timeline-definition-GMOUNBTQ-KtoXhsrQ.js} +1 -1
  51. package/dist/assets/{vennDiagram-DHZGUBPP-CqMVzLOB.js → vennDiagram-DHZGUBPP-872kuRjQ.js} +1 -1
  52. package/dist/assets/{wardley-RL74JXVD-CpDKsknO.js → wardley-RL74JXVD-Dt_qgD8L.js} +1 -1
  53. package/dist/assets/{wardleyDiagram-NUSXRM2D-DQ8j8svN.js → wardleyDiagram-NUSXRM2D-BPeR96Ai.js} +1 -1
  54. package/dist/assets/{xychartDiagram-5P7HB3ND-CCiCFHTq.js → xychartDiagram-5P7HB3ND-DSp30xYo.js} +1 -1
  55. package/dist/index.html +1 -1
  56. package/findcc.js +12 -0
  57. package/i18n.js +60 -0
  58. package/package.json +1 -1
  59. package/dist/assets/channel-DFZhlznB.js +0 -1
  60. package/dist/assets/classDiagram-6PBFFD2Q-CKIX6sZV.js +0 -1
  61. package/dist/assets/classDiagram-v2-HSJHXN6E-CKIX6sZV.js +0 -1
  62. package/dist/assets/clone-DfHiApAi.js +0 -1
  63. package/dist/assets/stateDiagram-v2-QKLJ7IA2-DTNx_PIJ.js +0 -1
@@ -1,4 +1,4 @@
1
- var Ge=Object.defineProperty;var Ze=(s,o,t)=>o in s?Ge(s,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[o]=t;var R=(s,o,t)=>Ze(s,typeof o!="symbol"?o+"":o,t);import{r as b,j as e,R as Xe,i as Ye,a as ue,s as Ke}from"./index-D3gYkJSV.js";import{g as Pe,m as Je,a as Ve,r as ke,K as Q,u as U,C as fe,i as Ie,c as F,b as Me,d as Qe,I as et,_ as tt,f as st,e as z,t as g,h as Oe,j as it,F as lt,k as ot,l as nt,n as at,o as rt,q as ct,s as dt,v as ht,w as r,x as oe,y as K,A as mt,M as ut,z as gt,B as bt,D as ge,E as c,G as xt,H as ft,R as pt,J as jt,L as G,N as vt,O as Se,P as Nt,T as yt,Q as St,S as Ct,U as _t,V as wt,W as be,X as Ce,Y as Tt,Z as _e}from"./AppHeader.module-bGH1aU5U.js";const $t=new Q("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Lt=new Q("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Pt=new Q("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Vt=new Q("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),kt=new Q("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),It=new Q("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Mt=s=>{const{componentCls:o,iconCls:t,antCls:i,badgeShadowSize:l,textFontSize:h,textFontSizeSM:n,statusSize:f,dotSize:x,textFontWeight:a,indicatorHeight:m,indicatorHeightSM:d,marginXS:N,calc:y}=s,v=`${i}-scroll-number`,w=Ve(s,(_,{darkColor:u})=>({[`&${o} ${o}-color-${_}`]:{background:u,[`&:not(${o}-count)`]:{color:u},"a:hover &":{background:u}}}));return{[o]:Object.assign(Object.assign(Object.assign(Object.assign({},ke(s)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:s.indicatorZIndex,minWidth:m,height:m,color:s.badgeTextColor,fontWeight:a,fontSize:h,lineHeight:U(m),whiteSpace:"nowrap",textAlign:"center",background:s.badgeColor,borderRadius:y(m).div(2).equal(),boxShadow:`0 0 0 ${U(l)} ${s.badgeShadowColor}`,transition:`background ${s.motionDurationMid}`,a:{color:s.badgeTextColor},"a:hover":{color:s.badgeTextColor},"a:hover &":{background:s.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:n,lineHeight:U(d),borderRadius:y(d).div(2).equal()},[`${o}-multiple-words`]:{padding:`0 ${U(s.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${o}-dot`]:{zIndex:s.indicatorZIndex,width:x,minWidth:x,height:x,background:s.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${U(l)} ${s.badgeShadowColor}`},[`${o}-count, ${o}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${t}-spin`]:{animationName:It,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:f,height:f,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:s.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:s.colorInfo,backgroundColor:s.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:l,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:$t,animationDuration:s.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:s.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:s.colorError},[`${o}-status-warning`]:{backgroundColor:s.colorWarning},[`${o}-status-text`]:{marginInlineStart:N,color:s.colorText,fontSize:s.fontSize}}}),w),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Lt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Vt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:kt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${o}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${s.motionDurationMid} ${s.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:m,transition:`all ${s.motionDurationSlow} ${s.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:m,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Ee=s=>{const{fontHeight:o,lineWidth:t,marginXS:i,colorBorderBg:l}=s,h=o,n=t,f=s.colorTextLightSolid,x=s.colorError,a=s.colorErrorHover;return Je(s,{badgeFontHeight:h,badgeShadowSize:n,badgeTextColor:f,badgeColor:x,badgeColorHover:a,badgeShadowColor:l,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Re=s=>{const{fontSize:o,lineHeight:t,fontSizeSM:i,lineWidth:l}=s;return{indicatorZIndex:"auto",indicatorHeight:Math.round(o*t)-2*l,indicatorHeightSM:o,dotSize:i/2,textFontSize:i,textFontSizeSM:i,textFontWeight:"normal",statusSize:i/2}},Ot=Pe("Badge",s=>{const o=Ee(s);return Mt(o)},Re),Et=s=>{const{antCls:o,badgeFontHeight:t,marginXS:i,badgeRibbonOffset:l,calc:h}=s,n=`${o}-ribbon`,f=`${o}-ribbon-wrapper`,x=Ve(s,(a,{darkColor:m})=>({[`&${n}-color-${a}`]:{background:m,color:m}}));return{[f]:{position:"relative"},[n]:Object.assign(Object.assign(Object.assign(Object.assign({},ke(s)),{position:"absolute",top:i,padding:`0 ${U(s.paddingXS)}`,color:s.colorPrimary,lineHeight:U(t),whiteSpace:"nowrap",backgroundColor:s.colorPrimary,borderRadius:s.borderRadiusSM,[`${n}-text`]:{color:s.badgeTextColor},[`${n}-corner`]:{position:"absolute",top:"100%",width:l,height:l,color:"currentcolor",border:`${U(h(l).div(2).equal())} solid`,transform:s.badgeRibbonCornerTransform,transformOrigin:"top",filter:s.badgeRibbonCornerFilter}}),x),{[`&${n}-placement-end`]:{insetInlineEnd:h(l).mul(-1).equal(),borderEndEndRadius:0,[`${n}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${n}-placement-start`]:{insetInlineStart:h(l).mul(-1).equal(),borderEndStartRadius:0,[`${n}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Rt=Pe(["Badge","Ribbon"],s=>{const o=Ee(s);return Et(o)},Re),Dt=s=>{const{className:o,prefixCls:t,style:i,color:l,children:h,text:n,placement:f="end",rootClassName:x}=s,{getPrefixCls:a,direction:m}=b.useContext(fe),d=a("ribbon",t),N=`${d}-wrapper`,[y,v,w]=Rt(d,N),_=Ie(l,!1),u=F(d,`${d}-placement-${f}`,{[`${d}-rtl`]:m==="rtl",[`${d}-color-${l}`]:_},o),j={},S={};return l&&!_&&(j.background=l,S.color=l),y(b.createElement("div",{className:F(N,x,v,w)},h,b.createElement("div",{className:F(u,v),style:Object.assign(Object.assign({},j),i)},b.createElement("span",{className:`${d}-text`},n),b.createElement("div",{className:`${d}-corner`,style:S}))))},we=s=>{const{prefixCls:o,value:t,current:i,offset:l=0}=s;let h;return l&&(h={position:"absolute",top:`${l}00%`,left:0}),b.createElement("span",{style:h,className:F(`${o}-only-unit`,{current:i})},t)};function At(s,o,t){let i=s,l=0;for(;(i+10)%10!==o;)i+=t,l+=t;return l}const Bt=s=>{const{prefixCls:o,count:t,value:i}=s,l=Number(i),h=Math.abs(t),[n,f]=b.useState(l),[x,a]=b.useState(h),m=()=>{f(l),a(h)};b.useEffect(()=>{const y=setTimeout(m,1e3);return()=>clearTimeout(y)},[l]);let d,N;if(n===l||Number.isNaN(l)||Number.isNaN(n))d=[b.createElement(we,Object.assign({},s,{key:l,current:!0}))],N={transition:"none"};else{d=[];const y=l+10,v=[];for(let j=l;j<=y;j+=1)v.push(j);const w=x<h?1:-1,_=v.findIndex(j=>j%10===n);d=(w<0?v.slice(0,_+1):v.slice(_)).map((j,S)=>{const E=j%10;return b.createElement(we,Object.assign({},s,{key:j,value:E,offset:w<0?S-_:S,current:S===_}))}),N={transform:`translateY(${-At(n,l,w)}00%)`}}return b.createElement("span",{className:`${o}-only`,style:N,onTransitionEnd:m},d)};var zt=function(s,o){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(s);l<i.length;l++)o.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(s,i[l])&&(t[i[l]]=s[i[l]]);return t};const Ft=b.forwardRef((s,o)=>{const{prefixCls:t,count:i,className:l,motionClassName:h,style:n,title:f,show:x,component:a="sup",children:m}=s,d=zt(s,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:N}=b.useContext(fe),y=N("scroll-number",t),v=Object.assign(Object.assign({},d),{"data-show":x,style:n,className:F(y,l,h),title:f});let w=i;if(i&&Number(i)%1===0){const _=String(i).split("");w=b.createElement("bdi",null,_.map((u,j)=>b.createElement(Bt,{prefixCls:y,count:Number(i),value:u,key:_.length-j})))}return n!=null&&n.borderColor&&(v.style=Object.assign(Object.assign({},n),{boxShadow:`0 0 0 1px ${n.borderColor} inset`})),m?Me(m,_=>({className:F(`${y}-custom-component`,_==null?void 0:_.className,h)})):b.createElement(a,Object.assign({},v,{ref:o}),w)});var Wt=function(s,o){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(s);l<i.length;l++)o.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(s,i[l])&&(t[i[l]]=s[i[l]]);return t};const Ht=b.forwardRef((s,o)=>{var t,i,l,h,n;const{prefixCls:f,scrollNumberPrefixCls:x,children:a,status:m,text:d,color:N,count:y=null,overflowCount:v=99,dot:w=!1,size:_="default",title:u,offset:j,style:S,className:E,rootClassName:I,classNames:L,styles:M,showZero:W=!1}=s,H=Wt(s,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:D,direction:T,badge:p}=b.useContext(fe),$=D("badge",f),[B,te,ne]=Ot($),V=y>v?`${v}+`:y,k=V==="0"||V===0||d==="0"||d===0,q=y===null||k&&!W,ae=(m!=null||N!=null)&&q,Be=m!=null||!k,ee=w&&!k,Z=ee?"":V,X=b.useMemo(()=>((Z==null||Z==="")&&(d==null||d==="")||k&&!W)&&!ee,[Z,k,W,ee,d]),pe=b.useRef(y);X||(pe.current=y);const Y=pe.current,je=b.useRef(Z);X||(je.current=Z);const re=je.current,ve=b.useRef(ee);X||(ve.current=ee);const se=b.useMemo(()=>{if(!j)return Object.assign(Object.assign({},p==null?void 0:p.style),S);const A={marginTop:j[1]};return T==="rtl"?A.left=Number.parseInt(j[0],10):A.right=-Number.parseInt(j[0],10),Object.assign(Object.assign(Object.assign({},A),p==null?void 0:p.style),S)},[T,j,S,p==null?void 0:p.style]),ze=u??(typeof Y=="string"||typeof Y=="number"?Y:void 0),Ne=!X&&(d===0?W:!!d&&d!==!0),Fe=Ne?b.createElement("span",{className:`${$}-status-text`},d):null,We=!Y||typeof Y!="object"?void 0:Me(Y,A=>({style:Object.assign(Object.assign({},se),A.style)})),ie=Ie(N,!1),He=F(L==null?void 0:L.indicator,(t=p==null?void 0:p.classNames)===null||t===void 0?void 0:t.indicator,{[`${$}-status-dot`]:ae,[`${$}-status-${m}`]:!!m,[`${$}-color-${N}`]:ie}),ce={};N&&!ie&&(ce.color=N,ce.background=N);const ye=F($,{[`${$}-status`]:ae,[`${$}-not-a-wrapper`]:!a,[`${$}-rtl`]:T==="rtl"},E,I,p==null?void 0:p.className,(i=p==null?void 0:p.classNames)===null||i===void 0?void 0:i.root,L==null?void 0:L.root,te,ne);if(!a&&ae&&(d||Be||!q)){const A=se.color;return B(b.createElement("span",Object.assign({},H,{className:ye,style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.root),(l=p==null?void 0:p.styles)===null||l===void 0?void 0:l.root),se)}),b.createElement("span",{className:He,style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.indicator),(h=p==null?void 0:p.styles)===null||h===void 0?void 0:h.indicator),ce)}),Ne&&b.createElement("span",{style:{color:A},className:`${$}-status-text`},d)))}return B(b.createElement("span",Object.assign({ref:o},H,{className:ye,style:Object.assign(Object.assign({},(n=p==null?void 0:p.styles)===null||n===void 0?void 0:n.root),M==null?void 0:M.root)}),a,b.createElement(Qe,{visible:!X,motionName:`${$}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:A})=>{var de,he;const qe=D("scroll-number",x),me=ve.current,Ue=F(L==null?void 0:L.indicator,(de=p==null?void 0:p.classNames)===null||de===void 0?void 0:de.indicator,{[`${$}-dot`]:me,[`${$}-count`]:!me,[`${$}-count-sm`]:_==="small",[`${$}-multiple-words`]:!me&&re&&re.toString().length>1,[`${$}-status-${m}`]:!!m,[`${$}-color-${N}`]:ie});let le=Object.assign(Object.assign(Object.assign({},M==null?void 0:M.indicator),(he=p==null?void 0:p.styles)===null||he===void 0?void 0:he.indicator),se);return N&&!ie&&(le=le||{},le.background=N),b.createElement(Ft,{prefixCls:qe,show:!X,motionClassName:A,className:Ue,count:re,title:ze,style:le,key:"scrollNumber"},We)}),Fe))}),De=Ht;De.Ribbon=Dt;var qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},Ut=function(o,t){return b.createElement(et,tt({},o,{ref:t,icon:qt}))},Gt=b.forwardRef(Ut);const Zt="_container_tjqxo_1",Xt="_fileListSection_tjqxo_10",Yt="_header_tjqxo_19",Kt="_headerLeft_tjqxo_28",Jt="_headerTitle_tjqxo_34",Qt="_fileCount_tjqxo_42",es="_closeBtn_tjqxo_50",ts="_changesContainer_tjqxo_66",ss="_changeItem_tjqxo_73",is="_changeItemActive_tjqxo_90",ls="_dirItem_tjqxo_99",os="_dirArrow_tjqxo_110",ns="_dirName_tjqxo_119",as="_status_tjqxo_124",rs="_icon_tjqxo_133",cs="_fileName_tjqxo_142",ds="_diffSection_tjqxo_149",hs="_diffHeader_tjqxo_157",ms="_diffFilePath_tjqxo_167",us="_diffBadge_tjqxo_177",gs="_diffContent_tjqxo_189",bs="_diffPlaceholder_tjqxo_195",xs="_statusText_tjqxo_206",fs="_errorText_tjqxo_213",ps="_emptyText_tjqxo_220",js="_warningText_tjqxo_227",vs="_fileSizeNote_tjqxo_239",Ns="_statusTextItalic_tjqxo_244",ys="_imagePreviewWrap_tjqxo_248",Ss="_imagePreview_tjqxo_248",Cs="_rotated90_tjqxo_264",_s="_repoHeader_tjqxo_269",ws="_repoArrow_tjqxo_288",Ts="_repoArrowExpanded_tjqxo_299",$s="_repoName_tjqxo_303",Ls="_repoBadge_tjqxo_310",C={container:Zt,fileListSection:Xt,header:Yt,headerLeft:Kt,headerTitle:Jt,fileCount:Qt,closeBtn:es,changesContainer:ts,changeItem:ss,changeItemActive:is,dirItem:ls,dirArrow:os,dirName:ns,status:as,icon:rs,fileName:cs,diffSection:ds,diffHeader:hs,diffFilePath:ms,diffBadge:us,diffContent:gs,diffPlaceholder:bs,statusText:xs,errorText:fs,emptyText:ps,warningText:js,fileSizeNote:vs,statusTextItalic:Ns,imagePreviewWrap:ys,imagePreview:Ss,rotated90:Cs,repoHeader:_s,repoArrow:ws,repoArrowExpanded:Ts,repoName:$s,repoBadge:Ls},Ps={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},Vs={"??":"U"},ks={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function Is(s){const o=s.includes(".")?s.split(".").pop().toLowerCase():"",t=ks[o]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function Ms(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function Te(s){const o={dirs:{},files:[]};for(const t of s){const i=t.file.split("/");let l=o;for(let h=0;h<i.length-1;h++)l.dirs[i[h]]||(l.dirs[i[h]]={dirs:{},files:[]}),l=l.dirs[i[h]];l.files.push({name:i[i.length-1],status:t.status,fullPath:t.file})}return o}function xe({name:s,node:o,depth:t,selectedFile:i,selectedRepo:l,repoPath:h,onFileClick:n}){const f=Object.keys(o.dirs).sort(),x=[...o.files].sort((a,m)=>a.name.localeCompare(m.name));return e.jsxs(e.Fragment,{children:[s&&e.jsxs("div",{className:C.dirItem,style:{paddingLeft:8+t*16},children:[e.jsx("span",{className:C.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:C.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:C.icon,children:Ms()}),e.jsx("span",{className:C.dirName,children:s})]}),f.map(a=>e.jsx(xe,{name:a,node:o.dirs[a],depth:s?t+1:t,selectedFile:i,selectedRepo:l,repoPath:h,onFileClick:n},a)),x.map(a=>e.jsxs("div",{className:`${C.changeItem} ${i===a.fullPath&&l===h?C.changeItemActive:""}`,style:{paddingLeft:8+(s?t+1:t)*16},onClick:()=>n&&n(h,a.fullPath),children:[e.jsx("span",{className:C.icon,children:Is(a.name)}),e.jsx("span",{className:C.fileName,children:a.name}),e.jsx("span",{className:C.status,style:{color:Ps[a.status]||"#888"},children:Vs[a.status]||a.status})]},a.fullPath))]})}function Os({visible:s,onClose:o}){const[t,i]=b.useState(null),[l,h]=b.useState(null),[n,f]=b.useState(!0),[x,a]=b.useState(null),[m,d]=b.useState(null),[N,y]=b.useState(new Set),[v,w]=b.useState(null),[_,u]=b.useState(null),[j,S]=b.useState(!1),[E,I]=b.useState(!1),L=b.useRef(!0);b.useEffect(()=>{if(L.current=!0,!!s)return f(!0),h(null),st().then(T=>{L.current&&(i(T),f(!1))}).catch(()=>{L.current&&(h("Failed to load git status"),f(!1))}),()=>{L.current=!1}},[s]),b.useEffect(()=>{if(!x||!m){w(null),u(null);return}S(!0),w(null),u(null);const T=m&&m!=="."?`&repo=${encodeURIComponent(m)}`:"";fetch(z(`/api/git-diff?files=${encodeURIComponent(x)}${T}`)).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{L.current&&(p.diffs&&p.diffs[0]?w(p.diffs[0]):u("No diff data available"),S(!1))}).catch(p=>{L.current&&(u(`${g("ui.fileLoadError")}: ${p.message}`),S(!1))})},[x,m]);const M=b.useMemo(()=>t?t.reduce((T,p)=>T+p.changes.length,0):0,[t]),W=!t||t.length<=1,H=(T,p)=>{a(p),d(T)},D=x&&m&&m!=="."?`${m}/${x}`:x;return e.jsxs("div",{className:C.container,children:[e.jsxs("div",{className:C.fileListSection,children:[e.jsxs("div",{className:C.header,children:[e.jsxs("div",{className:C.headerLeft,children:[e.jsx("span",{className:C.headerTitle,children:g("ui.gitChanges")}),e.jsx("span",{className:C.fileCount,children:M})]}),o&&e.jsx("button",{className:C.closeBtn,onClick:o,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:C.changesContainer,children:[n&&e.jsx("div",{className:C.statusText,children:"Loading..."}),l&&e.jsx("div",{className:C.errorText,children:l}),!n&&!l&&(!t||t.length===0)&&e.jsx("div",{className:C.emptyText,children:"No changes"}),!n&&!l&&t&&t.map(T=>{const p=N.has(T.path);return W?e.jsx(xe,{name:"",node:Te(T.changes),depth:0,selectedFile:x,selectedRepo:m,repoPath:T.path,onFileClick:H},T.path):e.jsxs(Xe.Fragment,{children:[e.jsxs("div",{className:C.repoHeader,onClick:()=>y($=>{const B=new Set($);return p?B.delete(T.path):B.add(T.path),B}),children:[e.jsx("span",{className:`${C.repoArrow} ${p?"":C.repoArrowExpanded}`,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{className:C.repoName,children:T.name}),e.jsx("span",{className:C.repoBadge,children:T.changes.length})]}),!p&&e.jsx(xe,{name:"",node:Te(T.changes),depth:1,selectedFile:x,selectedRepo:m,repoPath:T.path,onFileClick:H})]},T.path)})]})]}),e.jsx("div",{className:C.diffSection,children:x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:C.diffHeader,children:[e.jsx("span",{className:C.diffFilePath,children:D}),e.jsx("span",{className:C.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:C.diffContent,children:[j&&e.jsx("div",{className:C.statusText,children:g("ui.loading")}),_&&e.jsx("div",{className:C.errorText,children:_}),!j&&!_&&v&&e.jsx(e.Fragment,{children:v.is_large?e.jsxs("div",{className:C.warningText,children:[e.jsx("p",{children:g("ui.largeFileWarning")}),e.jsxs("p",{className:C.fileSizeNote,children:[g("ui.fileSize"),": ",(v.size/(1024*1024)).toFixed(2)," MB"]})]}):Oe(x)&&!v.is_deleted?e.jsxs("div",{className:C.imagePreviewWrap,children:[e.jsx("img",{className:C.imagePreview,src:z(`/api/file-raw?path=${encodeURIComponent(D)}`),alt:x,onClick:()=>I(!0)}),E&&e.jsx(it,{src:z(`/api/file-raw?path=${encodeURIComponent(D)}`),alt:x,onClose:()=>I(!1)})]}):v.is_binary?e.jsx("div",{className:`${C.statusText} ${C.statusTextItalic}`,children:g("ui.binaryFileNotice")}):e.jsx(lt,{file_path:x,old_string:v.old_content,new_string:v.new_content})})]})]}):e.jsxs("div",{className:C.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:g("ui.mobileGitDiffHint")})]})})]})}const Es="_container_1hzyt_1",Rs="_fileListSection_1hzyt_10",Ds="_header_1hzyt_19",As="_headerLeft_1hzyt_28",Bs="_headerTitle_1hzyt_34",zs="_fileCount_1hzyt_42",Fs="_closeBtn_1hzyt_50",Ws="_treeContainer_1hzyt_66",Hs="_treeItem_1hzyt_73",qs="_treeItemActive_1hzyt_90",Us="_treeItemIgnored_1hzyt_99",Gs="_arrow_1hzyt_103",Zs="_arrowExpanded_1hzyt_113",Xs="_icon_1hzyt_117",Ys="_fileName_1hzyt_126",Ks="_contentSection_1hzyt_133",Js="_contentPlaceholder_1hzyt_141",Qs="_statusText_1hzyt_152",ei="_errorText_1hzyt_159",ti="_emptyText_1hzyt_166",P={container:Es,fileListSection:Rs,header:Ds,headerLeft:As,headerTitle:Bs,fileCount:zs,closeBtn:Fs,treeContainer:Ws,treeItem:Hs,treeItemActive:qs,treeItemIgnored:Us,arrow:Gs,arrowExpanded:Zs,icon:Xs,fileName:Ys,contentSection:Ks,contentPlaceholder:Js,statusText:Qs,errorText:ei,emptyText:ti},si={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function ii(s){const o=s.includes(".")?s.split(".").pop().toLowerCase():"",t=si[o]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function li(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function Ae({item:s,path:o,depth:t,expandedPaths:i,onToggleExpand:l,currentFile:h,onFileClick:n}){const[f,x]=b.useState(null),[a,m]=b.useState(!1),d=o?`${o}/${s.name}`:s.name,N=i.has(d),y=s.type==="directory",v=!y&&h===d,w=s.gitIgnored||!1;b.useEffect(()=>{y&&N&&f===null&&!a&&(m(!0),fetch(z(`/api/files?path=${encodeURIComponent(d)}`)).then(u=>u.ok?u.json():Promise.reject()).then(u=>{x(u),m(!1)}).catch(()=>{m(!1)}))},[N]);const _=b.useCallback(()=>{y?l(d):n(d)},[y,d,l,n]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`${P.treeItem} ${v?P.treeItemActive:""} ${w?P.treeItemIgnored:""}`,style:{paddingLeft:8+t*16},onClick:_,children:[y?e.jsx("span",{className:`${P.arrow} ${N?P.arrowExpanded:""}`,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}):e.jsx("span",{style:{width:16,flexShrink:0}}),e.jsx("span",{className:P.icon,children:y?li():ii(s.name)}),e.jsx("span",{className:P.fileName,children:s.name}),a&&e.jsx("span",{style:{fontSize:10,color:"var(--text-disabled)"},children:"..."})]}),y&&N&&f&&f.map(u=>e.jsx(Ae,{item:u,path:d,depth:t+1,expandedPaths:i,onToggleExpand:l,currentFile:h,onFileClick:n},u.name))]})}function oi({visible:s,onClose:o,targetFile:t}){const[i,l]=b.useState(null),[h,n]=b.useState(!0),[f,x]=b.useState(null),[a,m]=b.useState(new Set),[d,N]=b.useState(null),y=b.useRef(!0),v=b.useRef(null);b.useEffect(()=>{if(y.current=!0,!s){N(null),m(new Set),v.current=null;return}return n(!0),x(null),fetch(z("/api/files?path=")).then(S=>S.ok?S.json():Promise.reject()).then(S=>{y.current&&(l(S),n(!1))}).catch(()=>{y.current&&(x(g("ui.fileLoadError")),n(!1))}),()=>{y.current=!1}},[s]),b.useEffect(()=>{!t||!s||v.current!==t.file&&(v.current=t.file,N(t.file),t.ancestors&&t.ancestors.length>0&&m(S=>{const E=new Set(S);return t.ancestors.forEach(I=>E.add(I)),E}))},[t,s]);const w=b.useCallback(S=>{m(E=>{const I=new Set(E);return I.has(S)?I.delete(S):I.add(S),I})},[]),_=b.useCallback(S=>{N(S)},[]),u=b.useCallback(()=>{N(null)},[]),j=i?i.length:0;return e.jsxs("div",{className:P.container,children:[e.jsxs("div",{className:P.fileListSection,children:[e.jsxs("div",{className:P.header,children:[e.jsxs("div",{className:P.headerLeft,children:[e.jsx("span",{className:P.headerTitle,children:g("ui.projectFolder")}),e.jsx("span",{className:P.fileCount,children:j})]}),o&&e.jsx("button",{className:P.closeBtn,onClick:o,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:P.treeContainer,children:[h&&e.jsx("div",{className:P.statusText,children:g("ui.loading")}),f&&e.jsx("div",{className:P.errorText,children:g("ui.fileLoadError")}),!h&&!f&&(!i||i.length===0)&&e.jsx("div",{className:P.emptyText,children:g("ui.mobileFileExplorerHint")}),!h&&!f&&i&&i.map(S=>e.jsx(Ae,{item:S,path:"",depth:0,expandedPaths:a,onToggleExpand:w,currentFile:d,onFileClick:_},S.name))]})]}),e.jsx("div",{className:P.contentSection,children:d?Oe(d)?e.jsx(ot,{filePath:d,onClose:u}):e.jsx(nt,{filePath:d,onClose:u}):e.jsxs("div",{className:P.contentPlaceholder,children:[e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})}),e.jsx("span",{children:g("ui.mobileFileExplorerHint")})]})})]})}const ni="_container_1bb9n_1",ai="_header_1bb9n_9",ri="_headerTitle_1bb9n_18",ci="_closeBtn_1bb9n_24",di="_content_1bb9n_38",hi="_empty_1bb9n_47",mi="_fixedTable_1bb9n_54",ui="_ellipsisCell_1bb9n_58",gi="_thLeft_1bb9n_65",bi="_colWide_1bb9n_69",xi="_colNarrow_1bb9n_73",O={container:ni,header:ai,headerTitle:ri,closeBtn:ci,content:di,empty:hi,fixedTable:mi,ellipsisCell:ui,thLeft:gi,colWide:bi,colNarrow:xi},fi=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],$e={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"};function pi({requests:s=[],visible:o,onClose:t}){const{byModel:i,models:l,toolStats:h,skillStats:n,cacheStats:f,activeReasons:x,totalCount:a,totalCache:m,hasCacheStats:d,subAgentEntries:N,hasSubAgentStats:y,teammateEntries:v,hasTeammateStats:w,isEmpty:_}=b.useMemo(()=>{const u=at(s),j=Object.keys(u),S=rt(s),E=ct(s),I=dt(s),L=fi.filter(V=>I[V].count>0),M=L.reduce((V,k)=>V+I[k].count,0),W=L.reduce((V,k)=>V+I[k].cacheCreate,0),H=L.length>0,D={},T={};for(let V=0;V<s.length;V++){const k=ht(s[V],s[V+1]);if(k.type==="SubAgent"){const q=k.subType||"Other";D[q]=(D[q]||0)+1}else if(k.type==="Teammate"){const q=k.subType||"Teammate";T[q]=(T[q]||0)+1}}const p=Object.entries(D).sort((V,k)=>k[1]-V[1]),$=p.length>0,B=Object.entries(T).sort((V,k)=>k[1]-V[1]),te=B.length>0,ne=j.length===0&&S.length===0&&!H&&!$&&!te&&E.length===0;return{byModel:u,models:j,toolStats:S,skillStats:E,cacheStats:I,activeReasons:L,totalCount:M,totalCache:W,hasCacheStats:H,subAgentEntries:p,hasSubAgentStats:$,teammateEntries:B,hasTeammateStats:te,isEmpty:ne}},[s]);return o?e.jsxs("div",{className:O.container,children:[e.jsxs("div",{className:O.header,children:[e.jsx("span",{className:O.headerTitle,children:g("ui.tokenStats")}),e.jsx("button",{className:O.closeBtn,onClick:t,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:O.content,children:_?e.jsx("div",{className:O.empty,children:"—"}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g("ui.skillUsageStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"Skill"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[n.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label,children:u}),e.jsx("td",{className:r.td,children:j})]},u)),n.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:n.reduce((u,j)=>u+j[1],0)})]})]})]})]}),y&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g("ui.subAgentStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsxs("td",{className:r.label,children:[u," ",e.jsx(oe,{doc:`SubAgent-${u}`})]}),e.jsx("td",{className:r.td,children:j})]},u)),N.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:N.reduce((u,j)=>u+j[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:"Teammate"}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"Name"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label,children:u}),e.jsx("td",{className:r.td,children:j})]},u)),v.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:v.reduce((u,j)=>u+j[1],0)})]})]})]})]}),h.length>0&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g("ui.toolUsageStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"Tool"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[h.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsxs("td",{className:r.label,children:[u," ",e.jsx(oe,{doc:`Tool-${u}`})]}),e.jsx("td",{className:r.td,children:j})]},u)),h.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:h.reduce((u,j)=>u+j[1],0)})]})]})]})]}),d&&e.jsxs("div",{className:r.modelCard,children:[e.jsxs("div",{className:r.modelName,children:["MainAgent",e.jsx(oe,{doc:"MainAgent"})," ",g("ui.cacheRebuildStats"),e.jsx(oe,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${r.statsTable} ${O.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:O.colWide}),e.jsx("col",{className:O.colNarrow}),e.jsx("col",{className:O.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:g("ui.cacheRebuild.reason")}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[x.map(u=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:`${r.label} ${O.ellipsisCell}`,title:g(`ui.${$e[u]}`),children:g(`ui.${$e[u]}`)}),e.jsx("td",{className:r.td,children:f[u].count}),e.jsx("td",{className:r.td,children:K(f[u].cacheCreate)})]},u)),x.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:a}),e.jsx("td",{className:r.td,children:K(m)})]})]})]})]}),l.map(u=>{const j=i[u],S=j.input+j.cacheCreation+j.cacheRead,E=S>0?(j.cacheRead/S*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:u}),e.jsx("table",{className:r.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Token"}),e.jsx("td",{className:r.th,children:"input"}),e.jsx("td",{className:r.th,children:"output"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:K(S)}),e.jsx("td",{className:r.td,children:K(j.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Cache"}),e.jsx("td",{className:r.th,children:"create"}),e.jsx("td",{className:r.th,children:"read"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:K(j.cacheCreation)}),e.jsx("td",{className:r.td,children:K(j.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:g("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:r.td,children:[E,"%"]})]})]})})]},u)})]})})]}):null}const J=class J extends mt{constructor(t){super(t);R(this,"_handleMobileOpenFile",(t,i)=>{this.state.localLogFile||this.setState({mobileFileExplorerVisible:!0,mobileFileExplorerTarget:{file:t,ancestors:i||[]},mobileGitDiffVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileChatVisible:!1})});R(this,"handleExportPromptsTxt",t=>{if(!t||t.length===0)return;const i=[];for(const f of t){const x=[],a=f.timestamp?new Date(f.timestamp).toLocaleString():"";a&&x.push(`${a}:
1
+ var Ge=Object.defineProperty;var Ze=(s,o,t)=>o in s?Ge(s,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[o]=t;var R=(s,o,t)=>Ze(s,typeof o!="symbol"?o+"":o,t);import{r as b,j as e,R as Xe,i as Ye,a as ue,s as Ke}from"./index-DFWhTJN9.js";import{g as Pe,m as Je,a as Ve,r as ke,K as Q,u as U,C as fe,i as Ie,c as F,b as Me,d as Qe,I as et,_ as tt,f as st,e as z,t as g,h as Oe,j as it,F as lt,k as ot,l as nt,n as at,o as rt,q as ct,s as dt,v as ht,w as r,x as oe,y as K,A as mt,M as ut,z as gt,B as bt,D as ge,E as c,G as xt,H as ft,R as pt,J as jt,L as G,N as vt,O as Se,P as Nt,T as yt,Q as St,S as Ct,U as _t,V as wt,W as be,X as Ce,Y as Tt,Z as _e}from"./AppHeader.module-BImQ_54s.js";const $t=new Q("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Lt=new Q("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Pt=new Q("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Vt=new Q("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),kt=new Q("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),It=new Q("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Mt=s=>{const{componentCls:o,iconCls:t,antCls:i,badgeShadowSize:l,textFontSize:h,textFontSizeSM:n,statusSize:f,dotSize:x,textFontWeight:a,indicatorHeight:m,indicatorHeightSM:d,marginXS:N,calc:y}=s,v=`${i}-scroll-number`,w=Ve(s,(_,{darkColor:u})=>({[`&${o} ${o}-color-${_}`]:{background:u,[`&:not(${o}-count)`]:{color:u},"a:hover &":{background:u}}}));return{[o]:Object.assign(Object.assign(Object.assign(Object.assign({},ke(s)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:s.indicatorZIndex,minWidth:m,height:m,color:s.badgeTextColor,fontWeight:a,fontSize:h,lineHeight:U(m),whiteSpace:"nowrap",textAlign:"center",background:s.badgeColor,borderRadius:y(m).div(2).equal(),boxShadow:`0 0 0 ${U(l)} ${s.badgeShadowColor}`,transition:`background ${s.motionDurationMid}`,a:{color:s.badgeTextColor},"a:hover":{color:s.badgeTextColor},"a:hover &":{background:s.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:n,lineHeight:U(d),borderRadius:y(d).div(2).equal()},[`${o}-multiple-words`]:{padding:`0 ${U(s.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${o}-dot`]:{zIndex:s.indicatorZIndex,width:x,minWidth:x,height:x,background:s.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${U(l)} ${s.badgeShadowColor}`},[`${o}-count, ${o}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${t}-spin`]:{animationName:It,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:f,height:f,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:s.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:s.colorInfo,backgroundColor:s.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:l,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:$t,animationDuration:s.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:s.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:s.colorError},[`${o}-status-warning`]:{backgroundColor:s.colorWarning},[`${o}-status-text`]:{marginInlineStart:N,color:s.colorText,fontSize:s.fontSize}}}),w),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Lt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Vt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:kt,animationDuration:s.motionDurationSlow,animationTimingFunction:s.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${o}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${s.motionDurationMid} ${s.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:m,transition:`all ${s.motionDurationSlow} ${s.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:m,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Ee=s=>{const{fontHeight:o,lineWidth:t,marginXS:i,colorBorderBg:l}=s,h=o,n=t,f=s.colorTextLightSolid,x=s.colorError,a=s.colorErrorHover;return Je(s,{badgeFontHeight:h,badgeShadowSize:n,badgeTextColor:f,badgeColor:x,badgeColorHover:a,badgeShadowColor:l,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Re=s=>{const{fontSize:o,lineHeight:t,fontSizeSM:i,lineWidth:l}=s;return{indicatorZIndex:"auto",indicatorHeight:Math.round(o*t)-2*l,indicatorHeightSM:o,dotSize:i/2,textFontSize:i,textFontSizeSM:i,textFontWeight:"normal",statusSize:i/2}},Ot=Pe("Badge",s=>{const o=Ee(s);return Mt(o)},Re),Et=s=>{const{antCls:o,badgeFontHeight:t,marginXS:i,badgeRibbonOffset:l,calc:h}=s,n=`${o}-ribbon`,f=`${o}-ribbon-wrapper`,x=Ve(s,(a,{darkColor:m})=>({[`&${n}-color-${a}`]:{background:m,color:m}}));return{[f]:{position:"relative"},[n]:Object.assign(Object.assign(Object.assign(Object.assign({},ke(s)),{position:"absolute",top:i,padding:`0 ${U(s.paddingXS)}`,color:s.colorPrimary,lineHeight:U(t),whiteSpace:"nowrap",backgroundColor:s.colorPrimary,borderRadius:s.borderRadiusSM,[`${n}-text`]:{color:s.badgeTextColor},[`${n}-corner`]:{position:"absolute",top:"100%",width:l,height:l,color:"currentcolor",border:`${U(h(l).div(2).equal())} solid`,transform:s.badgeRibbonCornerTransform,transformOrigin:"top",filter:s.badgeRibbonCornerFilter}}),x),{[`&${n}-placement-end`]:{insetInlineEnd:h(l).mul(-1).equal(),borderEndEndRadius:0,[`${n}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${n}-placement-start`]:{insetInlineStart:h(l).mul(-1).equal(),borderEndStartRadius:0,[`${n}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Rt=Pe(["Badge","Ribbon"],s=>{const o=Ee(s);return Et(o)},Re),Dt=s=>{const{className:o,prefixCls:t,style:i,color:l,children:h,text:n,placement:f="end",rootClassName:x}=s,{getPrefixCls:a,direction:m}=b.useContext(fe),d=a("ribbon",t),N=`${d}-wrapper`,[y,v,w]=Rt(d,N),_=Ie(l,!1),u=F(d,`${d}-placement-${f}`,{[`${d}-rtl`]:m==="rtl",[`${d}-color-${l}`]:_},o),j={},S={};return l&&!_&&(j.background=l,S.color=l),y(b.createElement("div",{className:F(N,x,v,w)},h,b.createElement("div",{className:F(u,v),style:Object.assign(Object.assign({},j),i)},b.createElement("span",{className:`${d}-text`},n),b.createElement("div",{className:`${d}-corner`,style:S}))))},we=s=>{const{prefixCls:o,value:t,current:i,offset:l=0}=s;let h;return l&&(h={position:"absolute",top:`${l}00%`,left:0}),b.createElement("span",{style:h,className:F(`${o}-only-unit`,{current:i})},t)};function At(s,o,t){let i=s,l=0;for(;(i+10)%10!==o;)i+=t,l+=t;return l}const Bt=s=>{const{prefixCls:o,count:t,value:i}=s,l=Number(i),h=Math.abs(t),[n,f]=b.useState(l),[x,a]=b.useState(h),m=()=>{f(l),a(h)};b.useEffect(()=>{const y=setTimeout(m,1e3);return()=>clearTimeout(y)},[l]);let d,N;if(n===l||Number.isNaN(l)||Number.isNaN(n))d=[b.createElement(we,Object.assign({},s,{key:l,current:!0}))],N={transition:"none"};else{d=[];const y=l+10,v=[];for(let j=l;j<=y;j+=1)v.push(j);const w=x<h?1:-1,_=v.findIndex(j=>j%10===n);d=(w<0?v.slice(0,_+1):v.slice(_)).map((j,S)=>{const E=j%10;return b.createElement(we,Object.assign({},s,{key:j,value:E,offset:w<0?S-_:S,current:S===_}))}),N={transform:`translateY(${-At(n,l,w)}00%)`}}return b.createElement("span",{className:`${o}-only`,style:N,onTransitionEnd:m},d)};var zt=function(s,o){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(s);l<i.length;l++)o.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(s,i[l])&&(t[i[l]]=s[i[l]]);return t};const Ft=b.forwardRef((s,o)=>{const{prefixCls:t,count:i,className:l,motionClassName:h,style:n,title:f,show:x,component:a="sup",children:m}=s,d=zt(s,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:N}=b.useContext(fe),y=N("scroll-number",t),v=Object.assign(Object.assign({},d),{"data-show":x,style:n,className:F(y,l,h),title:f});let w=i;if(i&&Number(i)%1===0){const _=String(i).split("");w=b.createElement("bdi",null,_.map((u,j)=>b.createElement(Bt,{prefixCls:y,count:Number(i),value:u,key:_.length-j})))}return n!=null&&n.borderColor&&(v.style=Object.assign(Object.assign({},n),{boxShadow:`0 0 0 1px ${n.borderColor} inset`})),m?Me(m,_=>({className:F(`${y}-custom-component`,_==null?void 0:_.className,h)})):b.createElement(a,Object.assign({},v,{ref:o}),w)});var Wt=function(s,o){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(s);l<i.length;l++)o.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(s,i[l])&&(t[i[l]]=s[i[l]]);return t};const Ht=b.forwardRef((s,o)=>{var t,i,l,h,n;const{prefixCls:f,scrollNumberPrefixCls:x,children:a,status:m,text:d,color:N,count:y=null,overflowCount:v=99,dot:w=!1,size:_="default",title:u,offset:j,style:S,className:E,rootClassName:I,classNames:L,styles:M,showZero:W=!1}=s,H=Wt(s,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:D,direction:T,badge:p}=b.useContext(fe),$=D("badge",f),[B,te,ne]=Ot($),V=y>v?`${v}+`:y,k=V==="0"||V===0||d==="0"||d===0,q=y===null||k&&!W,ae=(m!=null||N!=null)&&q,Be=m!=null||!k,ee=w&&!k,Z=ee?"":V,X=b.useMemo(()=>((Z==null||Z==="")&&(d==null||d==="")||k&&!W)&&!ee,[Z,k,W,ee,d]),pe=b.useRef(y);X||(pe.current=y);const Y=pe.current,je=b.useRef(Z);X||(je.current=Z);const re=je.current,ve=b.useRef(ee);X||(ve.current=ee);const se=b.useMemo(()=>{if(!j)return Object.assign(Object.assign({},p==null?void 0:p.style),S);const A={marginTop:j[1]};return T==="rtl"?A.left=Number.parseInt(j[0],10):A.right=-Number.parseInt(j[0],10),Object.assign(Object.assign(Object.assign({},A),p==null?void 0:p.style),S)},[T,j,S,p==null?void 0:p.style]),ze=u??(typeof Y=="string"||typeof Y=="number"?Y:void 0),Ne=!X&&(d===0?W:!!d&&d!==!0),Fe=Ne?b.createElement("span",{className:`${$}-status-text`},d):null,We=!Y||typeof Y!="object"?void 0:Me(Y,A=>({style:Object.assign(Object.assign({},se),A.style)})),ie=Ie(N,!1),He=F(L==null?void 0:L.indicator,(t=p==null?void 0:p.classNames)===null||t===void 0?void 0:t.indicator,{[`${$}-status-dot`]:ae,[`${$}-status-${m}`]:!!m,[`${$}-color-${N}`]:ie}),ce={};N&&!ie&&(ce.color=N,ce.background=N);const ye=F($,{[`${$}-status`]:ae,[`${$}-not-a-wrapper`]:!a,[`${$}-rtl`]:T==="rtl"},E,I,p==null?void 0:p.className,(i=p==null?void 0:p.classNames)===null||i===void 0?void 0:i.root,L==null?void 0:L.root,te,ne);if(!a&&ae&&(d||Be||!q)){const A=se.color;return B(b.createElement("span",Object.assign({},H,{className:ye,style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.root),(l=p==null?void 0:p.styles)===null||l===void 0?void 0:l.root),se)}),b.createElement("span",{className:He,style:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.indicator),(h=p==null?void 0:p.styles)===null||h===void 0?void 0:h.indicator),ce)}),Ne&&b.createElement("span",{style:{color:A},className:`${$}-status-text`},d)))}return B(b.createElement("span",Object.assign({ref:o},H,{className:ye,style:Object.assign(Object.assign({},(n=p==null?void 0:p.styles)===null||n===void 0?void 0:n.root),M==null?void 0:M.root)}),a,b.createElement(Qe,{visible:!X,motionName:`${$}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:A})=>{var de,he;const qe=D("scroll-number",x),me=ve.current,Ue=F(L==null?void 0:L.indicator,(de=p==null?void 0:p.classNames)===null||de===void 0?void 0:de.indicator,{[`${$}-dot`]:me,[`${$}-count`]:!me,[`${$}-count-sm`]:_==="small",[`${$}-multiple-words`]:!me&&re&&re.toString().length>1,[`${$}-status-${m}`]:!!m,[`${$}-color-${N}`]:ie});let le=Object.assign(Object.assign(Object.assign({},M==null?void 0:M.indicator),(he=p==null?void 0:p.styles)===null||he===void 0?void 0:he.indicator),se);return N&&!ie&&(le=le||{},le.background=N),b.createElement(Ft,{prefixCls:qe,show:!X,motionClassName:A,className:Ue,count:re,title:ze,style:le,key:"scrollNumber"},We)}),Fe))}),De=Ht;De.Ribbon=Dt;var qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},Ut=function(o,t){return b.createElement(et,tt({},o,{ref:t,icon:qt}))},Gt=b.forwardRef(Ut);const Zt="_container_tjqxo_1",Xt="_fileListSection_tjqxo_10",Yt="_header_tjqxo_19",Kt="_headerLeft_tjqxo_28",Jt="_headerTitle_tjqxo_34",Qt="_fileCount_tjqxo_42",es="_closeBtn_tjqxo_50",ts="_changesContainer_tjqxo_66",ss="_changeItem_tjqxo_73",is="_changeItemActive_tjqxo_90",ls="_dirItem_tjqxo_99",os="_dirArrow_tjqxo_110",ns="_dirName_tjqxo_119",as="_status_tjqxo_124",rs="_icon_tjqxo_133",cs="_fileName_tjqxo_142",ds="_diffSection_tjqxo_149",hs="_diffHeader_tjqxo_157",ms="_diffFilePath_tjqxo_167",us="_diffBadge_tjqxo_177",gs="_diffContent_tjqxo_189",bs="_diffPlaceholder_tjqxo_195",xs="_statusText_tjqxo_206",fs="_errorText_tjqxo_213",ps="_emptyText_tjqxo_220",js="_warningText_tjqxo_227",vs="_fileSizeNote_tjqxo_239",Ns="_statusTextItalic_tjqxo_244",ys="_imagePreviewWrap_tjqxo_248",Ss="_imagePreview_tjqxo_248",Cs="_rotated90_tjqxo_264",_s="_repoHeader_tjqxo_269",ws="_repoArrow_tjqxo_288",Ts="_repoArrowExpanded_tjqxo_299",$s="_repoName_tjqxo_303",Ls="_repoBadge_tjqxo_310",C={container:Zt,fileListSection:Xt,header:Yt,headerLeft:Kt,headerTitle:Jt,fileCount:Qt,closeBtn:es,changesContainer:ts,changeItem:ss,changeItemActive:is,dirItem:ls,dirArrow:os,dirName:ns,status:as,icon:rs,fileName:cs,diffSection:ds,diffHeader:hs,diffFilePath:ms,diffBadge:us,diffContent:gs,diffPlaceholder:bs,statusText:xs,errorText:fs,emptyText:ps,warningText:js,fileSizeNote:vs,statusTextItalic:Ns,imagePreviewWrap:ys,imagePreview:Ss,rotated90:Cs,repoHeader:_s,repoArrow:ws,repoArrowExpanded:Ts,repoName:$s,repoBadge:Ls},Ps={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},Vs={"??":"U"},ks={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function Is(s){const o=s.includes(".")?s.split(".").pop().toLowerCase():"",t=ks[o]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function Ms(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function Te(s){const o={dirs:{},files:[]};for(const t of s){const i=t.file.split("/");let l=o;for(let h=0;h<i.length-1;h++)l.dirs[i[h]]||(l.dirs[i[h]]={dirs:{},files:[]}),l=l.dirs[i[h]];l.files.push({name:i[i.length-1],status:t.status,fullPath:t.file})}return o}function xe({name:s,node:o,depth:t,selectedFile:i,selectedRepo:l,repoPath:h,onFileClick:n}){const f=Object.keys(o.dirs).sort(),x=[...o.files].sort((a,m)=>a.name.localeCompare(m.name));return e.jsxs(e.Fragment,{children:[s&&e.jsxs("div",{className:C.dirItem,style:{paddingLeft:8+t*16},children:[e.jsx("span",{className:C.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:C.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:C.icon,children:Ms()}),e.jsx("span",{className:C.dirName,children:s})]}),f.map(a=>e.jsx(xe,{name:a,node:o.dirs[a],depth:s?t+1:t,selectedFile:i,selectedRepo:l,repoPath:h,onFileClick:n},a)),x.map(a=>e.jsxs("div",{className:`${C.changeItem} ${i===a.fullPath&&l===h?C.changeItemActive:""}`,style:{paddingLeft:8+(s?t+1:t)*16},onClick:()=>n&&n(h,a.fullPath),children:[e.jsx("span",{className:C.icon,children:Is(a.name)}),e.jsx("span",{className:C.fileName,children:a.name}),e.jsx("span",{className:C.status,style:{color:Ps[a.status]||"#888"},children:Vs[a.status]||a.status})]},a.fullPath))]})}function Os({visible:s,onClose:o}){const[t,i]=b.useState(null),[l,h]=b.useState(null),[n,f]=b.useState(!0),[x,a]=b.useState(null),[m,d]=b.useState(null),[N,y]=b.useState(new Set),[v,w]=b.useState(null),[_,u]=b.useState(null),[j,S]=b.useState(!1),[E,I]=b.useState(!1),L=b.useRef(!0);b.useEffect(()=>{if(L.current=!0,!!s)return f(!0),h(null),st().then(T=>{L.current&&(i(T),f(!1))}).catch(()=>{L.current&&(h("Failed to load git status"),f(!1))}),()=>{L.current=!1}},[s]),b.useEffect(()=>{if(!x||!m){w(null),u(null);return}S(!0),w(null),u(null);const T=m&&m!=="."?`&repo=${encodeURIComponent(m)}`:"";fetch(z(`/api/git-diff?files=${encodeURIComponent(x)}${T}`)).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.json()}).then(p=>{L.current&&(p.diffs&&p.diffs[0]?w(p.diffs[0]):u("No diff data available"),S(!1))}).catch(p=>{L.current&&(u(`${g("ui.fileLoadError")}: ${p.message}`),S(!1))})},[x,m]);const M=b.useMemo(()=>t?t.reduce((T,p)=>T+p.changes.length,0):0,[t]),W=!t||t.length<=1,H=(T,p)=>{a(p),d(T)},D=x&&m&&m!=="."?`${m}/${x}`:x;return e.jsxs("div",{className:C.container,children:[e.jsxs("div",{className:C.fileListSection,children:[e.jsxs("div",{className:C.header,children:[e.jsxs("div",{className:C.headerLeft,children:[e.jsx("span",{className:C.headerTitle,children:g("ui.gitChanges")}),e.jsx("span",{className:C.fileCount,children:M})]}),o&&e.jsx("button",{className:C.closeBtn,onClick:o,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:C.changesContainer,children:[n&&e.jsx("div",{className:C.statusText,children:"Loading..."}),l&&e.jsx("div",{className:C.errorText,children:l}),!n&&!l&&(!t||t.length===0)&&e.jsx("div",{className:C.emptyText,children:"No changes"}),!n&&!l&&t&&t.map(T=>{const p=N.has(T.path);return W?e.jsx(xe,{name:"",node:Te(T.changes),depth:0,selectedFile:x,selectedRepo:m,repoPath:T.path,onFileClick:H},T.path):e.jsxs(Xe.Fragment,{children:[e.jsxs("div",{className:C.repoHeader,onClick:()=>y($=>{const B=new Set($);return p?B.delete(T.path):B.add(T.path),B}),children:[e.jsx("span",{className:`${C.repoArrow} ${p?"":C.repoArrowExpanded}`,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{className:C.repoName,children:T.name}),e.jsx("span",{className:C.repoBadge,children:T.changes.length})]}),!p&&e.jsx(xe,{name:"",node:Te(T.changes),depth:1,selectedFile:x,selectedRepo:m,repoPath:T.path,onFileClick:H})]},T.path)})]})]}),e.jsx("div",{className:C.diffSection,children:x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:C.diffHeader,children:[e.jsx("span",{className:C.diffFilePath,children:D}),e.jsx("span",{className:C.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:C.diffContent,children:[j&&e.jsx("div",{className:C.statusText,children:g("ui.loading")}),_&&e.jsx("div",{className:C.errorText,children:_}),!j&&!_&&v&&e.jsx(e.Fragment,{children:v.is_large?e.jsxs("div",{className:C.warningText,children:[e.jsx("p",{children:g("ui.largeFileWarning")}),e.jsxs("p",{className:C.fileSizeNote,children:[g("ui.fileSize"),": ",(v.size/(1024*1024)).toFixed(2)," MB"]})]}):Oe(x)&&!v.is_deleted?e.jsxs("div",{className:C.imagePreviewWrap,children:[e.jsx("img",{className:C.imagePreview,src:z(`/api/file-raw?path=${encodeURIComponent(D)}`),alt:x,onClick:()=>I(!0)}),E&&e.jsx(it,{src:z(`/api/file-raw?path=${encodeURIComponent(D)}`),alt:x,onClose:()=>I(!1)})]}):v.is_binary?e.jsx("div",{className:`${C.statusText} ${C.statusTextItalic}`,children:g("ui.binaryFileNotice")}):e.jsx(lt,{file_path:x,old_string:v.old_content,new_string:v.new_content})})]})]}):e.jsxs("div",{className:C.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:g("ui.mobileGitDiffHint")})]})})]})}const Es="_container_1hzyt_1",Rs="_fileListSection_1hzyt_10",Ds="_header_1hzyt_19",As="_headerLeft_1hzyt_28",Bs="_headerTitle_1hzyt_34",zs="_fileCount_1hzyt_42",Fs="_closeBtn_1hzyt_50",Ws="_treeContainer_1hzyt_66",Hs="_treeItem_1hzyt_73",qs="_treeItemActive_1hzyt_90",Us="_treeItemIgnored_1hzyt_99",Gs="_arrow_1hzyt_103",Zs="_arrowExpanded_1hzyt_113",Xs="_icon_1hzyt_117",Ys="_fileName_1hzyt_126",Ks="_contentSection_1hzyt_133",Js="_contentPlaceholder_1hzyt_141",Qs="_statusText_1hzyt_152",ei="_errorText_1hzyt_159",ti="_emptyText_1hzyt_166",P={container:Es,fileListSection:Rs,header:Ds,headerLeft:As,headerTitle:Bs,fileCount:zs,closeBtn:Fs,treeContainer:Ws,treeItem:Hs,treeItemActive:qs,treeItemIgnored:Us,arrow:Gs,arrowExpanded:Zs,icon:Xs,fileName:Ys,contentSection:Ks,contentPlaceholder:Js,statusText:Qs,errorText:ei,emptyText:ti},si={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function ii(s){const o=s.includes(".")?s.split(".").pop().toLowerCase():"",t=si[o]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function li(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function Ae({item:s,path:o,depth:t,expandedPaths:i,onToggleExpand:l,currentFile:h,onFileClick:n}){const[f,x]=b.useState(null),[a,m]=b.useState(!1),d=o?`${o}/${s.name}`:s.name,N=i.has(d),y=s.type==="directory",v=!y&&h===d,w=s.gitIgnored||!1;b.useEffect(()=>{y&&N&&f===null&&!a&&(m(!0),fetch(z(`/api/files?path=${encodeURIComponent(d)}`)).then(u=>u.ok?u.json():Promise.reject()).then(u=>{x(u),m(!1)}).catch(()=>{m(!1)}))},[N]);const _=b.useCallback(()=>{y?l(d):n(d)},[y,d,l,n]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`${P.treeItem} ${v?P.treeItemActive:""} ${w?P.treeItemIgnored:""}`,style:{paddingLeft:8+t*16},onClick:_,children:[y?e.jsx("span",{className:`${P.arrow} ${N?P.arrowExpanded:""}`,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}):e.jsx("span",{style:{width:16,flexShrink:0}}),e.jsx("span",{className:P.icon,children:y?li():ii(s.name)}),e.jsx("span",{className:P.fileName,children:s.name}),a&&e.jsx("span",{style:{fontSize:10,color:"var(--text-disabled)"},children:"..."})]}),y&&N&&f&&f.map(u=>e.jsx(Ae,{item:u,path:d,depth:t+1,expandedPaths:i,onToggleExpand:l,currentFile:h,onFileClick:n},u.name))]})}function oi({visible:s,onClose:o,targetFile:t}){const[i,l]=b.useState(null),[h,n]=b.useState(!0),[f,x]=b.useState(null),[a,m]=b.useState(new Set),[d,N]=b.useState(null),y=b.useRef(!0),v=b.useRef(null);b.useEffect(()=>{if(y.current=!0,!s){N(null),m(new Set),v.current=null;return}return n(!0),x(null),fetch(z("/api/files?path=")).then(S=>S.ok?S.json():Promise.reject()).then(S=>{y.current&&(l(S),n(!1))}).catch(()=>{y.current&&(x(g("ui.fileLoadError")),n(!1))}),()=>{y.current=!1}},[s]),b.useEffect(()=>{!t||!s||v.current!==t.file&&(v.current=t.file,N(t.file),t.ancestors&&t.ancestors.length>0&&m(S=>{const E=new Set(S);return t.ancestors.forEach(I=>E.add(I)),E}))},[t,s]);const w=b.useCallback(S=>{m(E=>{const I=new Set(E);return I.has(S)?I.delete(S):I.add(S),I})},[]),_=b.useCallback(S=>{N(S)},[]),u=b.useCallback(()=>{N(null)},[]),j=i?i.length:0;return e.jsxs("div",{className:P.container,children:[e.jsxs("div",{className:P.fileListSection,children:[e.jsxs("div",{className:P.header,children:[e.jsxs("div",{className:P.headerLeft,children:[e.jsx("span",{className:P.headerTitle,children:g("ui.projectFolder")}),e.jsx("span",{className:P.fileCount,children:j})]}),o&&e.jsx("button",{className:P.closeBtn,onClick:o,children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:P.treeContainer,children:[h&&e.jsx("div",{className:P.statusText,children:g("ui.loading")}),f&&e.jsx("div",{className:P.errorText,children:g("ui.fileLoadError")}),!h&&!f&&(!i||i.length===0)&&e.jsx("div",{className:P.emptyText,children:g("ui.mobileFileExplorerHint")}),!h&&!f&&i&&i.map(S=>e.jsx(Ae,{item:S,path:"",depth:0,expandedPaths:a,onToggleExpand:w,currentFile:d,onFileClick:_},S.name))]})]}),e.jsx("div",{className:P.contentSection,children:d?Oe(d)?e.jsx(ot,{filePath:d,onClose:u}):e.jsx(nt,{filePath:d,onClose:u}):e.jsxs("div",{className:P.contentPlaceholder,children:[e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})}),e.jsx("span",{children:g("ui.mobileFileExplorerHint")})]})})]})}const ni="_container_1bb9n_1",ai="_header_1bb9n_9",ri="_headerTitle_1bb9n_18",ci="_closeBtn_1bb9n_24",di="_content_1bb9n_38",hi="_empty_1bb9n_47",mi="_fixedTable_1bb9n_54",ui="_ellipsisCell_1bb9n_58",gi="_thLeft_1bb9n_65",bi="_colWide_1bb9n_69",xi="_colNarrow_1bb9n_73",O={container:ni,header:ai,headerTitle:ri,closeBtn:ci,content:di,empty:hi,fixedTable:mi,ellipsisCell:ui,thLeft:gi,colWide:bi,colNarrow:xi},fi=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],$e={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"};function pi({requests:s=[],visible:o,onClose:t}){const{byModel:i,models:l,toolStats:h,skillStats:n,cacheStats:f,activeReasons:x,totalCount:a,totalCache:m,hasCacheStats:d,subAgentEntries:N,hasSubAgentStats:y,teammateEntries:v,hasTeammateStats:w,isEmpty:_}=b.useMemo(()=>{const u=at(s),j=Object.keys(u),S=rt(s),E=ct(s),I=dt(s),L=fi.filter(V=>I[V].count>0),M=L.reduce((V,k)=>V+I[k].count,0),W=L.reduce((V,k)=>V+I[k].cacheCreate,0),H=L.length>0,D={},T={};for(let V=0;V<s.length;V++){const k=ht(s[V],s[V+1]);if(k.type==="SubAgent"){const q=k.subType||"Other";D[q]=(D[q]||0)+1}else if(k.type==="Teammate"){const q=k.subType||"Teammate";T[q]=(T[q]||0)+1}}const p=Object.entries(D).sort((V,k)=>k[1]-V[1]),$=p.length>0,B=Object.entries(T).sort((V,k)=>k[1]-V[1]),te=B.length>0,ne=j.length===0&&S.length===0&&!H&&!$&&!te&&E.length===0;return{byModel:u,models:j,toolStats:S,skillStats:E,cacheStats:I,activeReasons:L,totalCount:M,totalCache:W,hasCacheStats:H,subAgentEntries:p,hasSubAgentStats:$,teammateEntries:B,hasTeammateStats:te,isEmpty:ne}},[s]);return o?e.jsxs("div",{className:O.container,children:[e.jsxs("div",{className:O.header,children:[e.jsx("span",{className:O.headerTitle,children:g("ui.tokenStats")}),e.jsx("button",{className:O.closeBtn,onClick:t,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:O.content,children:_?e.jsx("div",{className:O.empty,children:"—"}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g("ui.skillUsageStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"Skill"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[n.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label,children:u}),e.jsx("td",{className:r.td,children:j})]},u)),n.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:n.reduce((u,j)=>u+j[1],0)})]})]})]})]}),y&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g("ui.subAgentStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsxs("td",{className:r.label,children:[u," ",e.jsx(oe,{doc:`SubAgent-${u}`})]}),e.jsx("td",{className:r.td,children:j})]},u)),N.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:N.reduce((u,j)=>u+j[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:"Teammate"}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"Name"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label,children:u}),e.jsx("td",{className:r.td,children:j})]},u)),v.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:v.reduce((u,j)=>u+j[1],0)})]})]})]})]}),h.length>0&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g("ui.toolUsageStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:"Tool"}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[h.map(([u,j])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsxs("td",{className:r.label,children:[u," ",e.jsx(oe,{doc:`Tool-${u}`})]}),e.jsx("td",{className:r.td,children:j})]},u)),h.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:h.reduce((u,j)=>u+j[1],0)})]})]})]})]}),d&&e.jsxs("div",{className:r.modelCard,children:[e.jsxs("div",{className:r.modelName,children:["MainAgent",e.jsx(oe,{doc:"MainAgent"})," ",g("ui.cacheRebuildStats"),e.jsx(oe,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${r.statsTable} ${O.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:O.colWide}),e.jsx("col",{className:O.colNarrow}),e.jsx("col",{className:O.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${O.thLeft}`,children:g("ui.cacheRebuild.reason")}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.count")}),e.jsx("td",{className:r.th,children:g("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[x.map(u=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:`${r.label} ${O.ellipsisCell}`,title:g(`ui.${$e[u]}`),children:g(`ui.${$e[u]}`)}),e.jsx("td",{className:r.td,children:f[u].count}),e.jsx("td",{className:r.td,children:K(f[u].cacheCreate)})]},u)),x.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:a}),e.jsx("td",{className:r.td,children:K(m)})]})]})]})]}),l.map(u=>{const j=i[u],S=j.input+j.cacheCreation+j.cacheRead,E=S>0?(j.cacheRead/S*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:u}),e.jsx("table",{className:r.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Token"}),e.jsx("td",{className:r.th,children:"input"}),e.jsx("td",{className:r.th,children:"output"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:K(S)}),e.jsx("td",{className:r.td,children:K(j.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Cache"}),e.jsx("td",{className:r.th,children:"create"}),e.jsx("td",{className:r.th,children:"read"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:K(j.cacheCreation)}),e.jsx("td",{className:r.td,children:K(j.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:g("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:r.td,children:[E,"%"]})]})]})})]},u)})]})})]}):null}const J=class J extends mt{constructor(t){super(t);R(this,"_handleMobileOpenFile",(t,i)=>{this.state.localLogFile||this.setState({mobileFileExplorerVisible:!0,mobileFileExplorerTarget:{file:t,ancestors:i||[]},mobileGitDiffVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileChatVisible:!1})});R(this,"handleExportPromptsTxt",t=>{if(!t||t.length===0)return;const i=[];for(const f of t){const x=[],a=f.timestamp?new Date(f.timestamp).toLocaleString():"";a&&x.push(`${a}:
2
2
  `);const m=(f.segments||[]).filter(d=>d.type==="text").map(d=>d.content);m.length>0&&x.push(m.join(`
3
3
  `)),i.push(x.join(`
4
4
  `))}if(i.length===0)return;const l=new Blob([i.join(`
@@ -1 +1 @@
1
- import{aW as L,bk as ln,aG as A,aU as P,aF as W,bl as gn,bm as dn,bn as hn,bo as z,bp as pn,bq as An,br as m,aX as N,b0 as U,b3 as T,bs as _n,a_ as on,bt as wn,bu as On,aH as V,bv as vn,bw as I}from"./mermaid.core-_9SzLMc7.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var B=P?P.prototype:void 0,H=B?B.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Un(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Bn(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Bn;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Xn="__lodash_hash_undefined__";function Yn(n){return this.__data__.set(n,Xn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Yn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",X=P?P.prototype:void 0,S=X?X.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var D=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(D===void 0?O===v||f(O,v,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,Y="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==Y?c:a,h=h==Y?c:h;var g=a==c,l=h==c,d=a==h;if(d&&U(n)){if(!U(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Sr=2;function Lr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Rr(e,n):F(r,i,Ir|Sr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&vn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Xr(n,r,e){var i=A(n)?Un:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Ur=I&&1/C(new I([,-0]))[1]==Nr?function(n){return new I(n)}:yn,Br=200;function Yr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Yr as l,Zr as m,qr as n,cn as o,Gr as p,Cr as q,Xr as r,Bn as s,Tr as t,j as u,R as v,nn as w,Rr as x,Dn as y};
1
+ import{aW as L,bk as ln,aG as A,aU as P,aF as W,bl as gn,bm as dn,bn as hn,bo as z,bp as pn,bq as An,br as m,aX as N,b0 as U,b3 as T,bs as _n,a_ as on,bt as wn,bu as On,aH as V,bv as vn,bw as I}from"./mermaid.core-BSWRD8yE.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var B=P?P.prototype:void 0,H=B?B.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Un(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Bn(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Bn;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Xn="__lodash_hash_undefined__";function Yn(n){return this.__data__.set(n,Xn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Yn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",X=P?P.prototype:void 0,S=X?X.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var D=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(D===void 0?O===v||f(O,v,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,Y="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==Y?c:a,h=h==Y?c:h;var g=a==c,l=h==c,d=a==h;if(d&&U(n)){if(!U(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Sr=2;function Lr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Rr(e,n):F(r,i,Ir|Sr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&vn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Xr(n,r,e){var i=A(n)?Un:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Ur=I&&1/C(new I([,-0]))[1]==Nr?function(n){return new I(n)}:yn,Br=200;function Yr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Yr as l,Zr as m,qr as n,cn as o,Gr as p,Cr as q,Xr as r,Bn as s,Tr as t,j as u,R as v,nn as w,Rr as x,Dn as y};
@@ -1 +1 @@
1
- import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-_9SzLMc7.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-BSWRD8yE.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};