cc-viewer 1.6.145 → 1.6.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{App-BPCacQDX.js → App-Bg1ykw9N.js} +2 -2
- package/dist/assets/{AppHeader.module-QcskUPdE.js → AppHeader.module-DhcOuZms.js} +167 -167
- package/dist/assets/{Mobile-DThGtdjg.js → Mobile-BjRsnayd.js} +1 -1
- package/dist/assets/_baseUniq-BiHiW46-.js +1 -0
- package/dist/assets/{arc-CsAXcIuy.js → arc-AIJRwdpf.js} +1 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-DZn-XLQV.js +36 -0
- package/dist/assets/{blockDiagram-WCTKOSBZ-C2F9kq9K.js → blockDiagram-DXYQGD6D-Dy3byd3t.js} +6 -6
- package/dist/assets/c4Diagram-AHTNJAMY-G40SkaxF.js +10 -0
- package/dist/assets/channel-BRg2_FRk.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-sJCFl3Gt.js → chunk-4BX2VUAB-Bk4vL9wC.js} +1 -1
- package/dist/assets/chunk-4TB4RGXK-B2D4JHi6.js +206 -0
- package/dist/assets/{chunk-55IACEB6-ZZ26iUgb.js → chunk-55IACEB6-B0-Hl4vJ.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-DcwKWdB5.js → chunk-EDXVE4YY-6ATgq6Wq.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-IF1GrXIm.js → chunk-FMBD7UC4-DfTtc0R0.js} +1 -1
- package/dist/assets/chunk-OYMX7WX6-jaqxbY2l.js +231 -0
- package/dist/assets/{chunk-QZHKN3VN-DnXCfqe9.js → chunk-QZHKN3VN-CPafBHbx.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-DHvLzKGB.js → chunk-YZCP3GAM-DLHyHlLG.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-Qq_hSpx1.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-Qq_hSpx1.js +1 -0
- package/dist/assets/clone-BhABW5fY.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DWzGLG1h.js → cose-bilkent-S5V4N54A-ZT0ZeYB-.js} +1 -1
- package/dist/assets/{cytoscape.esm-BQaXIfA_.js → cytoscape.esm-DxGcaOPV.js} +4 -4
- package/dist/assets/dagre-KV5264BT-CwDQ9l6b.js +4 -0
- package/dist/assets/diagram-5BDNPKRD-CSCXklZU.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-CjjGYG0E.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-Cftn-Qdy.js +43 -0
- package/dist/assets/diagram-TYMM5635-BeezZrTd.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-ByJh9pMp.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-DrcBxT9C.js +162 -0
- package/dist/assets/{ganttDiagram-A5KZAMGK-D5GYC6WT.js → ganttDiagram-T4ZO3ILL-mN4NOW1U.js} +4 -4
- package/dist/assets/gitGraphDiagram-UUTBAWPF-DAo6LzCC.js +106 -0
- package/dist/assets/graph-CXqohRNR.js +1 -0
- package/dist/assets/{index-LbnIqHk5.js → index-DSND3yxX.js} +2 -2
- package/dist/assets/infoDiagram-42DDH7IO-DIpCJx1X.js +2 -0
- package/dist/assets/{ishikawaDiagram-PHBUUO56-DnbLMhAb.js → ishikawaDiagram-UXIWVN3A-DZbNsvGT.js} +2 -2
- package/dist/assets/journeyDiagram-VCZTEJTY-DTxQPxwN.js +139 -0
- package/dist/assets/{kanban-definition-K7BYSVSG-gEGqSR0y.js → kanban-definition-6JOO6SKY-fryTe3NV.js} +6 -6
- package/dist/assets/{katex-f0vruDP5.js → katex-DkKDou_j.js} +17 -25
- package/dist/assets/layout-C1gHGo0J.js +1 -0
- package/dist/assets/{linear-ReYEEL1R.js → linear-HLMb6250.js} +1 -1
- package/dist/assets/mermaid.core-CMhqtu8w.js +308 -0
- package/dist/assets/min-BpC86Zva.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-D5KUUhQn.js +96 -0
- package/dist/assets/pieDiagram-DEJITSTG-D5qj26lg.js +30 -0
- package/dist/assets/{quadrantDiagram-337W2JSQ-A3lokKWj.js → quadrantDiagram-34T5L4WZ-BUkrkdNG.js} +1 -1
- package/dist/assets/requirementDiagram-MS252O5E-6SO8vXf5.js +84 -0
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-C5wFSz8a.js → sankeyDiagram-XADWPNL6-Bu3WwTPe.js} +2 -2
- package/dist/assets/sequenceDiagram-FGHM5R23-DSJN8bds.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-Cn4Rn5T-.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-CEMHmyFQ.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-v8yp7Wsn.js +120 -0
- package/dist/assets/{vennDiagram-LZ73GAT5-BlPc8f4w.js → vennDiagram-DHZGUBPP-CRF3cJL1.js} +5 -5
- package/dist/assets/wardley-RL74JXVD-lc9SJ1ni.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-Dsk2SPYg.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-D7oIwksS.js +7 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_basePickBy-C3yxr0y6.js +0 -1
- package/dist/assets/_baseUniq-CVcJ-lr1.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-m5ndCHP6.js +0 -36
- package/dist/assets/c4Diagram-IC4MRINW-DQnqFzCk.js +0 -10
- package/dist/assets/channel-BIWi3RbV.js +0 -1
- package/dist/assets/chunk-NQ4KR5QH-DwJkLVO2.js +0 -220
- package/dist/assets/chunk-WL4C6EOR-BxjnYZJN.js +0 -189
- package/dist/assets/classDiagram-VBA2DB6C-BSWVMGXL.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-BSWVMGXL.js +0 -1
- package/dist/assets/clone-_-3fMJgy.js +0 -1
- package/dist/assets/dagre-KLK3FWXG-Dy5DHz5U.js +0 -4
- package/dist/assets/diagram-E7M64L7V-DNHsmwnC.js +0 -24
- package/dist/assets/diagram-IFDJBPK2-hUH_ncvk.js +0 -43
- package/dist/assets/diagram-P4PSJMXO-BuQdbXJo.js +0 -24
- package/dist/assets/erDiagram-INFDFZHY-DhpzAH03.js +0 -70
- package/dist/assets/flowDiagram-PKNHOUZH-B9iPD7X6.js +0 -162
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-CmpKPRI3.js +0 -65
- package/dist/assets/graph-iD9rZR0_.js +0 -1
- package/dist/assets/infoDiagram-LFFYTUFH-C7KlvwiT.js +0 -2
- package/dist/assets/journeyDiagram-4ABVD52K-CE5FVoRM.js +0 -139
- package/dist/assets/layout-Bel_oeSz.js +0 -1
- package/dist/assets/mermaid.core-ImsNGbuM.js +0 -254
- package/dist/assets/mindmap-definition-YRQLILUH-BiOwVfEW.js +0 -68
- package/dist/assets/pieDiagram-SKSYHLDU-DPcNaxZY.js +0 -30
- package/dist/assets/requirementDiagram-Z7DCOOCP-C2ccrp69.js +0 -73
- package/dist/assets/sequenceDiagram-2WXFIKYE-B4632Pnl.js +0 -145
- package/dist/assets/stateDiagram-RAJIS63D-BjasCgMJ.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-B30g1mLW.js +0 -1
- package/dist/assets/timeline-definition-YZTLITO2-DU6d0QTq.js +0 -61
- package/dist/assets/treemap-KZPCXAKY-CC8iLif5.js +0 -162
- package/dist/assets/xychartDiagram-JWTSCODW-C1egzVx-.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Fe=Object.defineProperty;var He=(t,l,i)=>l in t?Fe(t,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[l]=i;var G=(t,l,i)=>He(t,typeof l!="symbol"?l+"":l,i);import{r as f,j as e,i as We}from"./index-LbnIqHk5.js";import{g as _e,m as Ue,a as Te,r as $e,K,u as A,C as ue,i as Le,c as M,b as ke,d as Ge,I as Ze,_ as qe,e as q,t as g,f as Xe,h as Ke,F as Ye,j as Je,k as Qe,l as et,n as tt,o as st,s as a,q as le,v as Z,A as it,w as lt,x as ot,y as je,z as c,B,R as at,D as ve,E as nt,T as rt,O as ct,G as dt,H as mt,S as ht,J as he,L as Ne,M as ut,N as ye}from"./AppHeader.module-QcskUPdE.js";const bt=new K("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),gt=new K("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),xt=new K("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),ft=new K("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),pt=new K("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),jt=new K("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),vt=t=>{const{componentCls:l,iconCls:i,antCls:s,badgeShadowSize:o,textFontSize:u,textFontSizeSM:n,statusSize:r,dotSize:p,textFontWeight:d,indicatorHeight:x,indicatorHeightSM:h,marginXS:j,calc:S}=t,v=`${s}-scroll-number`,w=Te(t,(C,{darkColor:b})=>({[`&${l} ${l}-color-${C}`]:{background:b,[`&:not(${l}-count)`]:{color:b},"a:hover &":{background:b}}}));return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${l}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:x,height:x,color:t.badgeTextColor,fontWeight:d,fontSize:u,lineHeight:A(x),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:S(x).div(2).equal(),boxShadow:`0 0 0 ${A(o)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${l}-count-sm`]:{minWidth:h,height:h,fontSize:n,lineHeight:A(h),borderRadius:S(h).div(2).equal()},[`${l}-multiple-words`]:{padding:`0 ${A(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${l}-dot`]:{zIndex:t.indicatorZIndex,width:p,minWidth:p,height:p,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${A(o)} ${t.badgeShadowColor}`},[`${l}-count, ${l}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${i}-spin`]:{animationName:jt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${l}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${l}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:r,height:r,verticalAlign:"middle",borderRadius:"50%"},[`${l}-status-success`]:{backgroundColor:t.colorSuccess},[`${l}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:bt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${l}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${l}-status-error`]:{backgroundColor:t.colorError},[`${l}-status-warning`]:{backgroundColor:t.colorWarning},[`${l}-status-text`]:{marginInlineStart:j,color:t.colorText,fontSize:t.fontSize}}}),w),{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:gt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${l}-zoom-leave`]:{animationName:xt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${l}-not-a-wrapper`]:{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:ft,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${l}-zoom-leave`]:{animationName:pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${l}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${l}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:x,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:x,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${l}-count, ${l}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Pe=t=>{const{fontHeight:l,lineWidth:i,marginXS:s,colorBorderBg:o}=t,u=l,n=i,r=t.colorTextLightSolid,p=t.colorError,d=t.colorErrorHover;return Ue(t,{badgeFontHeight:u,badgeShadowSize:n,badgeTextColor:r,badgeColor:p,badgeColorHover:d,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:s,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Ve=t=>{const{fontSize:l,lineHeight:i,fontSizeSM:s,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(l*i)-2*o,indicatorHeightSM:l,dotSize:s/2,textFontSize:s,textFontSizeSM:s,textFontWeight:"normal",statusSize:s/2}},Nt=_e("Badge",t=>{const l=Pe(t);return vt(l)},Ve),yt=t=>{const{antCls:l,badgeFontHeight:i,marginXS:s,badgeRibbonOffset:o,calc:u}=t,n=`${l}-ribbon`,r=`${l}-ribbon-wrapper`,p=Te(t,(d,{darkColor:x})=>({[`&${n}-color-${d}`]:{background:x,color:x}}));return{[r]:{position:"relative"},[n]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"absolute",top:s,padding:`0 ${A(t.paddingXS)}`,color:t.colorPrimary,lineHeight:A(i),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${n}-text`]:{color:t.badgeTextColor},[`${n}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${A(u(o).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),p),{[`&${n}-placement-end`]:{insetInlineEnd:u(o).mul(-1).equal(),borderEndEndRadius:0,[`${n}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${n}-placement-start`]:{insetInlineStart:u(o).mul(-1).equal(),borderEndStartRadius:0,[`${n}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Ct=_e(["Badge","Ribbon"],t=>{const l=Pe(t);return yt(l)},Ve),St=t=>{const{className:l,prefixCls:i,style:s,color:o,children:u,text:n,placement:r="end",rootClassName:p}=t,{getPrefixCls:d,direction:x}=f.useContext(ue),h=d("ribbon",i),j=`${h}-wrapper`,[S,v,w]=Ct(h,j),C=Le(o,!1),b=M(h,`${h}-placement-${r}`,{[`${h}-rtl`]:x==="rtl",[`${h}-color-${o}`]:C},l),m={},L={};return o&&!C&&(m.background=o,L.color=o),S(f.createElement("div",{className:M(j,p,v,w)},u,f.createElement("div",{className:M(b,v),style:Object.assign(Object.assign({},m),s)},f.createElement("span",{className:`${h}-text`},n),f.createElement("div",{className:`${h}-corner`,style:L}))))},Ce=t=>{const{prefixCls:l,value:i,current:s,offset:o=0}=t;let u;return o&&(u={position:"absolute",top:`${o}00%`,left:0}),f.createElement("span",{style:u,className:M(`${l}-only-unit`,{current:s})},i)};function wt(t,l,i){let s=t,o=0;for(;(s+10)%10!==l;)s+=i,o+=i;return o}const _t=t=>{const{prefixCls:l,count:i,value:s}=t,o=Number(s),u=Math.abs(i),[n,r]=f.useState(o),[p,d]=f.useState(u),x=()=>{r(o),d(u)};f.useEffect(()=>{const S=setTimeout(x,1e3);return()=>clearTimeout(S)},[o]);let h,j;if(n===o||Number.isNaN(o)||Number.isNaN(n))h=[f.createElement(Ce,Object.assign({},t,{key:o,current:!0}))],j={transition:"none"};else{h=[];const S=o+10,v=[];for(let m=o;m<=S;m+=1)v.push(m);const w=p<u?1:-1,C=v.findIndex(m=>m%10===n);h=(w<0?v.slice(0,C+1):v.slice(C)).map((m,L)=>{const R=m%10;return f.createElement(Ce,Object.assign({},t,{key:m,value:R,offset:w<0?L-C:L,current:L===C}))}),j={transform:`translateY(${-wt(n,o,w)}00%)`}}return f.createElement("span",{className:`${l}-only`,style:j,onTransitionEnd:x},h)};var Tt=function(t,l){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)l.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i};const $t=f.forwardRef((t,l)=>{const{prefixCls:i,count:s,className:o,motionClassName:u,style:n,title:r,show:p,component:d="sup",children:x}=t,h=Tt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:j}=f.useContext(ue),S=j("scroll-number",i),v=Object.assign(Object.assign({},h),{"data-show":p,style:n,className:M(S,o,u),title:r});let w=s;if(s&&Number(s)%1===0){const C=String(s).split("");w=f.createElement("bdi",null,C.map((b,m)=>f.createElement(_t,{prefixCls:S,count:Number(s),value:b,key:C.length-m})))}return n!=null&&n.borderColor&&(v.style=Object.assign(Object.assign({},n),{boxShadow:`0 0 0 1px ${n.borderColor} inset`})),x?ke(x,C=>({className:M(`${S}-custom-component`,C==null?void 0:C.className,u)})):f.createElement(d,Object.assign({},v,{ref:l}),w)});var Lt=function(t,l){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)l.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i};const kt=f.forwardRef((t,l)=>{var i,s,o,u,n;const{prefixCls:r,scrollNumberPrefixCls:p,children:d,status:x,text:h,color:j,count:S=null,overflowCount:v=99,dot:w=!1,size:C="default",title:b,offset:m,style:L,className:R,rootClassName:z,classNames:P,styles:V,showZero:D=!1}=t,Y=Lt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:F,direction:E,badge:N}=f.useContext(ue),_=F("badge",r),[J,ee,oe]=Nt(_),T=S>v?`${v}+`:S,$=T==="0"||T===0||h==="0"||h===0,I=S===null||$&&!D,ae=(x!=null||j!=null)&&I,Re=x!=null||!$,Q=w&&!$,H=Q?"":T,W=f.useMemo(()=>((H==null||H==="")&&(h==null||h==="")||$&&!D)&&!Q,[H,$,D,Q,h]),be=f.useRef(S);W||(be.current=S);const U=be.current,ge=f.useRef(H);W||(ge.current=H);const ne=ge.current,xe=f.useRef(Q);W||(xe.current=Q);const te=f.useMemo(()=>{if(!m)return Object.assign(Object.assign({},N==null?void 0:N.style),L);const O={marginTop:m[1]};return E==="rtl"?O.left=Number.parseInt(m[0],10):O.right=-Number.parseInt(m[0],10),Object.assign(Object.assign(Object.assign({},O),N==null?void 0:N.style),L)},[E,m,L,N==null?void 0:N.style]),Ie=b??(typeof U=="string"||typeof U=="number"?U:void 0),fe=!W&&(h===0?D:!!h&&h!==!0),Ae=fe?f.createElement("span",{className:`${_}-status-text`},h):null,Ee=!U||typeof U!="object"?void 0:ke(U,O=>({style:Object.assign(Object.assign({},te),O.style)})),se=Le(j,!1),Be=M(P==null?void 0:P.indicator,(i=N==null?void 0:N.classNames)===null||i===void 0?void 0:i.indicator,{[`${_}-status-dot`]:ae,[`${_}-status-${x}`]:!!x,[`${_}-color-${j}`]:se}),re={};j&&!se&&(re.color=j,re.background=j);const pe=M(_,{[`${_}-status`]:ae,[`${_}-not-a-wrapper`]:!d,[`${_}-rtl`]:E==="rtl"},R,z,N==null?void 0:N.className,(s=N==null?void 0:N.classNames)===null||s===void 0?void 0:s.root,P==null?void 0:P.root,ee,oe);if(!d&&ae&&(h||Re||!I)){const O=te.color;return J(f.createElement("span",Object.assign({},Y,{className:pe,style:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.root),(o=N==null?void 0:N.styles)===null||o===void 0?void 0:o.root),te)}),f.createElement("span",{className:Be,style:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.indicator),(u=N==null?void 0:N.styles)===null||u===void 0?void 0:u.indicator),re)}),fe&&f.createElement("span",{style:{color:O},className:`${_}-status-text`},h)))}return J(f.createElement("span",Object.assign({ref:l},Y,{className:pe,style:Object.assign(Object.assign({},(n=N==null?void 0:N.styles)===null||n===void 0?void 0:n.root),V==null?void 0:V.root)}),d,f.createElement(Ge,{visible:!W,motionName:`${_}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:O})=>{var ce,de;const ze=F("scroll-number",p),me=xe.current,De=M(P==null?void 0:P.indicator,(ce=N==null?void 0:N.classNames)===null||ce===void 0?void 0:ce.indicator,{[`${_}-dot`]:me,[`${_}-count`]:!me,[`${_}-count-sm`]:C==="small",[`${_}-multiple-words`]:!me&&ne&&ne.toString().length>1,[`${_}-status-${x}`]:!!x,[`${_}-color-${j}`]:se});let ie=Object.assign(Object.assign(Object.assign({},V==null?void 0:V.indicator),(de=N==null?void 0:N.styles)===null||de===void 0?void 0:de.indicator),te);return j&&!se&&(ie=ie||{},ie.background=j),f.createElement($t,{prefixCls:ze,show:!W,motionClassName:O,className:De,count:ne,title:Ie,style:ie,key:"scrollNumber"},Ee)}),Ae))}),Oe=kt;Oe.Ribbon=St;var Pt={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"},Vt=function(l,i){return f.createElement(Ze,qe({},l,{ref:i,icon:Pt}))},Ot=f.forwardRef(Vt);const Mt="_container_1k4mc_1",Rt="_fileListSection_1k4mc_10",It="_header_1k4mc_19",At="_headerTitle_1k4mc_28",Et="_fileCount_1k4mc_36",Bt="_changesContainer_1k4mc_44",zt="_changeItem_1k4mc_51",Dt="_changeItemActive_1k4mc_68",Ft="_dirItem_1k4mc_77",Ht="_dirArrow_1k4mc_88",Wt="_dirName_1k4mc_97",Ut="_status_1k4mc_102",Gt="_icon_1k4mc_111",Zt="_fileName_1k4mc_120",qt="_diffSection_1k4mc_127",Xt="_diffHeader_1k4mc_135",Kt="_diffFilePath_1k4mc_145",Yt="_diffBadge_1k4mc_155",Jt="_diffContent_1k4mc_167",Qt="_diffPlaceholder_1k4mc_173",es="_statusText_1k4mc_184",ts="_errorText_1k4mc_191",ss="_emptyText_1k4mc_198",is="_warningText_1k4mc_205",ls="_fileSizeNote_1k4mc_217",os="_statusTextItalic_1k4mc_222",as="_imagePreviewWrap_1k4mc_226",ns="_imagePreview_1k4mc_226",rs="_rotated90_1k4mc_242",y={container:Mt,fileListSection:Rt,header:It,headerTitle:At,fileCount:Et,changesContainer:Bt,changeItem:zt,changeItemActive:Dt,dirItem:Ft,dirArrow:Ht,dirName:Wt,status:Ut,icon:Gt,fileName:Zt,diffSection:qt,diffHeader:Xt,diffFilePath:Kt,diffBadge:Yt,diffContent:Jt,diffPlaceholder:Qt,statusText:es,errorText:ts,emptyText:ss,warningText:is,fileSizeNote:ls,statusTextItalic:os,imagePreviewWrap:as,imagePreview:ns,rotated90:rs},cs={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},ds={"??":"U"},ms={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 hs(t){const l=t.includes(".")?t.split(".").pop().toLowerCase():"",i=ms[l]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:i,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 us(){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 bs(t){const l={dirs:{},files:[]};for(const i of t){const s=i.file.split("/");let o=l;for(let u=0;u<s.length-1;u++)o.dirs[s[u]]||(o.dirs[s[u]]={dirs:{},files:[]}),o=o.dirs[s[u]];o.files.push({name:s[s.length-1],status:i.status,fullPath:i.file})}return l}function Me({name:t,node:l,depth:i,selectedFile:s,onFileClick:o}){const u=Object.keys(l.dirs).sort(),n=[...l.files].sort((r,p)=>r.name.localeCompare(p.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:y.dirItem,style:{paddingLeft:8+i*16},children:[e.jsx("span",{className:y.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:y.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:y.icon,children:us()}),e.jsx("span",{className:y.dirName,children:t})]}),u.map(r=>e.jsx(Me,{name:r,node:l.dirs[r],depth:t?i+1:i,selectedFile:s,onFileClick:o},r)),n.map(r=>e.jsxs("div",{className:`${y.changeItem} ${s===r.fullPath?y.changeItemActive:""}`,style:{paddingLeft:8+(t?i+1:i)*16},onClick:()=>o&&o(r.fullPath),children:[e.jsx("span",{className:y.icon,children:hs(r.name)}),e.jsx("span",{className:y.fileName,children:r.name}),e.jsx("span",{className:y.status,style:{color:cs[r.status]||"#888"},children:ds[r.status]||r.status})]},r.fullPath))]})}function gs({visible:t}){const[l,i]=f.useState(null),[s,o]=f.useState(null),[u,n]=f.useState(!0),[r,p]=f.useState(null),[d,x]=f.useState(null),[h,j]=f.useState(null),[S,v]=f.useState(!1),[w,C]=f.useState(!1),b=f.useRef(!0);return f.useEffect(()=>{if(b.current=!0,!!t)return n(!0),o(null),fetch(q("/api/git-status")).then(m=>m.ok?m.json():Promise.reject()).then(m=>{b.current&&(i(m.changes||[]),n(!1))}).catch(()=>{b.current&&(o("Failed to load git status"),n(!1))}),()=>{b.current=!1}},[t]),f.useEffect(()=>{if(!r){x(null),j(null);return}v(!0),x(null),j(null),fetch(q(`/api/git-diff?files=${encodeURIComponent(r)}`)).then(m=>{if(!m.ok)throw new Error(`HTTP ${m.status}`);return m.json()}).then(m=>{b.current&&(m.diffs&&m.diffs[0]?x(m.diffs[0]):j("No diff data available"),v(!1))}).catch(m=>{b.current&&(j(`${g("ui.fileLoadError")}: ${m.message}`),v(!1))})},[r]),e.jsxs("div",{className:y.container,children:[e.jsxs("div",{className:y.fileListSection,children:[e.jsxs("div",{className:y.header,children:[e.jsx("span",{className:y.headerTitle,children:g("ui.gitChanges")}),e.jsx("span",{className:y.fileCount,children:l?l.length:0})]}),e.jsxs("div",{className:y.changesContainer,children:[u&&e.jsx("div",{className:y.statusText,children:"Loading..."}),s&&e.jsx("div",{className:y.errorText,children:s}),!u&&!s&&l&&l.length===0&&e.jsx("div",{className:y.emptyText,children:"No changes"}),!u&&!s&&l&&l.length>0&&e.jsx(Me,{name:"",node:bs(l),depth:0,selectedFile:r,onFileClick:p})]})]}),e.jsx("div",{className:y.diffSection,children:r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:y.diffHeader,children:[e.jsx("span",{className:y.diffFilePath,children:r}),e.jsx("span",{className:y.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:y.diffContent,children:[S&&e.jsx("div",{className:y.statusText,children:g("ui.loading")}),h&&e.jsx("div",{className:y.errorText,children:h}),!S&&!h&&d&&e.jsx(e.Fragment,{children:d.is_large?e.jsxs("div",{className:y.warningText,children:[e.jsx("p",{children:g("ui.largeFileWarning")}),e.jsxs("p",{className:y.fileSizeNote,children:[g("ui.fileSize"),": ",(d.size/(1024*1024)).toFixed(2)," MB"]})]}):Xe(r)&&!d.is_deleted?e.jsxs("div",{className:y.imagePreviewWrap,children:[e.jsx("img",{className:y.imagePreview,src:q(`/api/file-raw?path=${encodeURIComponent(r)}`),alt:r,onClick:()=>C(!0)}),w&&e.jsx(Ke,{src:q(`/api/file-raw?path=${encodeURIComponent(r)}`),alt:r,onClose:()=>C(!1)})]}):d.is_binary?e.jsx("div",{className:`${y.statusText} ${y.statusTextItalic}`,children:g("ui.binaryFileNotice")}):e.jsx(Ye,{file_path:r,old_string:d.old_content,new_string:d.new_content})})]})]}):e.jsxs("div",{className:y.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 xs="_container_1bb9n_1",fs="_header_1bb9n_9",ps="_headerTitle_1bb9n_18",js="_closeBtn_1bb9n_24",vs="_content_1bb9n_38",Ns="_empty_1bb9n_47",ys="_fixedTable_1bb9n_54",Cs="_ellipsisCell_1bb9n_58",Ss="_thLeft_1bb9n_65",ws="_colWide_1bb9n_69",_s="_colNarrow_1bb9n_73",k={container:xs,header:fs,headerTitle:ps,closeBtn:js,content:vs,empty:Ns,fixedTable:ys,ellipsisCell:Cs,thLeft:Ss,colWide:ws,colNarrow:_s},Ts=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],Se={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 $s({requests:t=[],visible:l,onClose:i}){const{byModel:s,models:o,toolStats:u,skillStats:n,cacheStats:r,activeReasons:p,totalCount:d,totalCache:x,hasCacheStats:h,subAgentEntries:j,hasSubAgentStats:S,teammateEntries:v,hasTeammateStats:w,isEmpty:C}=f.useMemo(()=>{const b=Je(t),m=Object.keys(b),L=Qe(t),R=et(t),z=tt(t),P=Ts.filter(T=>z[T].count>0),V=P.reduce((T,$)=>T+z[$].count,0),D=P.reduce((T,$)=>T+z[$].cacheCreate,0),Y=P.length>0,F={},E={};for(let T=0;T<t.length;T++){const $=st(t[T],t[T+1]);if($.type==="SubAgent"){const I=$.subType||"Other";F[I]=(F[I]||0)+1}else if($.type==="Teammate"){const I=$.subType||"Teammate";E[I]=(E[I]||0)+1}}const N=Object.entries(F).sort((T,$)=>$[1]-T[1]),_=N.length>0,J=Object.entries(E).sort((T,$)=>$[1]-T[1]),ee=J.length>0,oe=m.length===0&&L.length===0&&!Y&&!_&&!ee&&R.length===0;return{byModel:b,models:m,toolStats:L,skillStats:R,cacheStats:z,activeReasons:P,totalCount:V,totalCache:D,hasCacheStats:Y,subAgentEntries:N,hasSubAgentStats:_,teammateEntries:J,hasTeammateStats:ee,isEmpty:oe}},[t]);return l?e.jsxs("div",{className:k.container,children:[e.jsxs("div",{className:k.header,children:[e.jsx("span",{className:k.headerTitle,children:g("ui.tokenStats")}),e.jsx("button",{className:k.closeBtn,onClick:i,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:k.content,children:C?e.jsx("div",{className:k.empty,children:"—"}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:g("ui.skillUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"Skill"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[n.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:b}),e.jsx("td",{className:a.td,children:m})]},b)),n.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:n.reduce((b,m)=>b+m[1],0)})]})]})]})]}),S&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:g("ui.subAgentStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[j.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[b," ",e.jsx(le,{doc:`SubAgent-${b}`})]}),e.jsx("td",{className:a.td,children:m})]},b)),j.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:j.reduce((b,m)=>b+m[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:"Teammate"}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"Name"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:b}),e.jsx("td",{className:a.td,children:m})]},b)),v.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:v.reduce((b,m)=>b+m[1],0)})]})]})]})]}),u.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:g("ui.toolUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"Tool"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[u.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[b," ",e.jsx(le,{doc:`Tool-${b}`})]}),e.jsx("td",{className:a.td,children:m})]},b)),u.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:u.reduce((b,m)=>b+m[1],0)})]})]})]})]}),h&&e.jsxs("div",{className:a.modelCard,children:[e.jsxs("div",{className:a.modelName,children:["MainAgent",e.jsx(le,{doc:"MainAgent"})," ",g("ui.cacheRebuildStats"),e.jsx(le,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${a.statsTable} ${k.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:k.colWide}),e.jsx("col",{className:k.colNarrow}),e.jsx("col",{className:k.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:g("ui.cacheRebuild.reason")}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[p.map(b=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:`${a.label} ${k.ellipsisCell}`,title:g(`ui.${Se[b]}`),children:g(`ui.${Se[b]}`)}),e.jsx("td",{className:a.td,children:r[b].count}),e.jsx("td",{className:a.td,children:Z(r[b].cacheCreate)})]},b)),p.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:d}),e.jsx("td",{className:a.td,children:Z(x)})]})]})]})]}),o.map(b=>{const m=s[b],L=m.input+m.cacheCreation+m.cacheRead,R=L>0?(m.cacheRead/L*100).toFixed(1):"0.0";return e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:b}),e.jsx("table",{className:a.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:"Token"}),e.jsx("td",{className:a.th,children:"input"}),e.jsx("td",{className:a.th,children:"output"})]}),e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label}),e.jsx("td",{className:a.td,children:Z(L)}),e.jsx("td",{className:a.td,children:Z(m.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:"Cache"}),e.jsx("td",{className:a.th,children:"create"}),e.jsx("td",{className:a.th,children:"read"})]}),e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label}),e.jsx("td",{className:a.td,children:Z(m.cacheCreation)}),e.jsx("td",{className:a.td,children:Z(m.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:g("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:a.td,children:[R,"%"]})]})]})})]},b)})]})})]}):null}const X=class X extends it{constructor(i){super(i);G(this,"handleExportPromptsTxt",i=>{if(!i||i.length===0)return;const s=[];for(const r of i){const p=[],d=r.timestamp?new Date(r.timestamp).toLocaleString():"";d&&p.push(`${d}:
|
|
1
|
+
var Fe=Object.defineProperty;var He=(t,l,i)=>l in t?Fe(t,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[l]=i;var G=(t,l,i)=>He(t,typeof l!="symbol"?l+"":l,i);import{r as f,j as e,i as We}from"./index-DSND3yxX.js";import{g as _e,m as Ue,a as Te,r as $e,K,u as A,C as ue,i as Le,c as M,b as ke,d as Ge,I as Ze,_ as qe,e as q,t as g,f as Xe,h as Ke,F as Ye,j as Je,k as Qe,l as et,n as tt,o as st,s as a,q as le,v as Z,A as it,w as lt,x as ot,y as je,z as c,B,R as at,D as ve,E as nt,T as rt,O as ct,G as dt,H as mt,S as ht,J as he,L as Ne,M as ut,N as ye}from"./AppHeader.module-DhcOuZms.js";const bt=new K("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),gt=new K("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),xt=new K("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),ft=new K("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),pt=new K("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),jt=new K("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),vt=t=>{const{componentCls:l,iconCls:i,antCls:s,badgeShadowSize:o,textFontSize:u,textFontSizeSM:n,statusSize:r,dotSize:p,textFontWeight:d,indicatorHeight:x,indicatorHeightSM:h,marginXS:j,calc:S}=t,v=`${s}-scroll-number`,w=Te(t,(C,{darkColor:b})=>({[`&${l} ${l}-color-${C}`]:{background:b,[`&:not(${l}-count)`]:{color:b},"a:hover &":{background:b}}}));return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${l}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:x,height:x,color:t.badgeTextColor,fontWeight:d,fontSize:u,lineHeight:A(x),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:S(x).div(2).equal(),boxShadow:`0 0 0 ${A(o)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${l}-count-sm`]:{minWidth:h,height:h,fontSize:n,lineHeight:A(h),borderRadius:S(h).div(2).equal()},[`${l}-multiple-words`]:{padding:`0 ${A(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${l}-dot`]:{zIndex:t.indicatorZIndex,width:p,minWidth:p,height:p,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${A(o)} ${t.badgeShadowColor}`},[`${l}-count, ${l}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${i}-spin`]:{animationName:jt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${l}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${l}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:r,height:r,verticalAlign:"middle",borderRadius:"50%"},[`${l}-status-success`]:{backgroundColor:t.colorSuccess},[`${l}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:bt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${l}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${l}-status-error`]:{backgroundColor:t.colorError},[`${l}-status-warning`]:{backgroundColor:t.colorWarning},[`${l}-status-text`]:{marginInlineStart:j,color:t.colorText,fontSize:t.fontSize}}}),w),{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:gt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${l}-zoom-leave`]:{animationName:xt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${l}-not-a-wrapper`]:{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:ft,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${l}-zoom-leave`]:{animationName:pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${l}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${l}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:x,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:x,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${l}-count, ${l}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Pe=t=>{const{fontHeight:l,lineWidth:i,marginXS:s,colorBorderBg:o}=t,u=l,n=i,r=t.colorTextLightSolid,p=t.colorError,d=t.colorErrorHover;return Ue(t,{badgeFontHeight:u,badgeShadowSize:n,badgeTextColor:r,badgeColor:p,badgeColorHover:d,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:s,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Ve=t=>{const{fontSize:l,lineHeight:i,fontSizeSM:s,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(l*i)-2*o,indicatorHeightSM:l,dotSize:s/2,textFontSize:s,textFontSizeSM:s,textFontWeight:"normal",statusSize:s/2}},Nt=_e("Badge",t=>{const l=Pe(t);return vt(l)},Ve),yt=t=>{const{antCls:l,badgeFontHeight:i,marginXS:s,badgeRibbonOffset:o,calc:u}=t,n=`${l}-ribbon`,r=`${l}-ribbon-wrapper`,p=Te(t,(d,{darkColor:x})=>({[`&${n}-color-${d}`]:{background:x,color:x}}));return{[r]:{position:"relative"},[n]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"absolute",top:s,padding:`0 ${A(t.paddingXS)}`,color:t.colorPrimary,lineHeight:A(i),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${n}-text`]:{color:t.badgeTextColor},[`${n}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${A(u(o).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),p),{[`&${n}-placement-end`]:{insetInlineEnd:u(o).mul(-1).equal(),borderEndEndRadius:0,[`${n}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${n}-placement-start`]:{insetInlineStart:u(o).mul(-1).equal(),borderEndStartRadius:0,[`${n}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Ct=_e(["Badge","Ribbon"],t=>{const l=Pe(t);return yt(l)},Ve),St=t=>{const{className:l,prefixCls:i,style:s,color:o,children:u,text:n,placement:r="end",rootClassName:p}=t,{getPrefixCls:d,direction:x}=f.useContext(ue),h=d("ribbon",i),j=`${h}-wrapper`,[S,v,w]=Ct(h,j),C=Le(o,!1),b=M(h,`${h}-placement-${r}`,{[`${h}-rtl`]:x==="rtl",[`${h}-color-${o}`]:C},l),m={},L={};return o&&!C&&(m.background=o,L.color=o),S(f.createElement("div",{className:M(j,p,v,w)},u,f.createElement("div",{className:M(b,v),style:Object.assign(Object.assign({},m),s)},f.createElement("span",{className:`${h}-text`},n),f.createElement("div",{className:`${h}-corner`,style:L}))))},Ce=t=>{const{prefixCls:l,value:i,current:s,offset:o=0}=t;let u;return o&&(u={position:"absolute",top:`${o}00%`,left:0}),f.createElement("span",{style:u,className:M(`${l}-only-unit`,{current:s})},i)};function wt(t,l,i){let s=t,o=0;for(;(s+10)%10!==l;)s+=i,o+=i;return o}const _t=t=>{const{prefixCls:l,count:i,value:s}=t,o=Number(s),u=Math.abs(i),[n,r]=f.useState(o),[p,d]=f.useState(u),x=()=>{r(o),d(u)};f.useEffect(()=>{const S=setTimeout(x,1e3);return()=>clearTimeout(S)},[o]);let h,j;if(n===o||Number.isNaN(o)||Number.isNaN(n))h=[f.createElement(Ce,Object.assign({},t,{key:o,current:!0}))],j={transition:"none"};else{h=[];const S=o+10,v=[];for(let m=o;m<=S;m+=1)v.push(m);const w=p<u?1:-1,C=v.findIndex(m=>m%10===n);h=(w<0?v.slice(0,C+1):v.slice(C)).map((m,L)=>{const R=m%10;return f.createElement(Ce,Object.assign({},t,{key:m,value:R,offset:w<0?L-C:L,current:L===C}))}),j={transform:`translateY(${-wt(n,o,w)}00%)`}}return f.createElement("span",{className:`${l}-only`,style:j,onTransitionEnd:x},h)};var Tt=function(t,l){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)l.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i};const $t=f.forwardRef((t,l)=>{const{prefixCls:i,count:s,className:o,motionClassName:u,style:n,title:r,show:p,component:d="sup",children:x}=t,h=Tt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:j}=f.useContext(ue),S=j("scroll-number",i),v=Object.assign(Object.assign({},h),{"data-show":p,style:n,className:M(S,o,u),title:r});let w=s;if(s&&Number(s)%1===0){const C=String(s).split("");w=f.createElement("bdi",null,C.map((b,m)=>f.createElement(_t,{prefixCls:S,count:Number(s),value:b,key:C.length-m})))}return n!=null&&n.borderColor&&(v.style=Object.assign(Object.assign({},n),{boxShadow:`0 0 0 1px ${n.borderColor} inset`})),x?ke(x,C=>({className:M(`${S}-custom-component`,C==null?void 0:C.className,u)})):f.createElement(d,Object.assign({},v,{ref:l}),w)});var Lt=function(t,l){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)l.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i};const kt=f.forwardRef((t,l)=>{var i,s,o,u,n;const{prefixCls:r,scrollNumberPrefixCls:p,children:d,status:x,text:h,color:j,count:S=null,overflowCount:v=99,dot:w=!1,size:C="default",title:b,offset:m,style:L,className:R,rootClassName:z,classNames:P,styles:V,showZero:D=!1}=t,Y=Lt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:F,direction:E,badge:N}=f.useContext(ue),_=F("badge",r),[J,ee,oe]=Nt(_),T=S>v?`${v}+`:S,$=T==="0"||T===0||h==="0"||h===0,I=S===null||$&&!D,ae=(x!=null||j!=null)&&I,Re=x!=null||!$,Q=w&&!$,H=Q?"":T,W=f.useMemo(()=>((H==null||H==="")&&(h==null||h==="")||$&&!D)&&!Q,[H,$,D,Q,h]),be=f.useRef(S);W||(be.current=S);const U=be.current,ge=f.useRef(H);W||(ge.current=H);const ne=ge.current,xe=f.useRef(Q);W||(xe.current=Q);const te=f.useMemo(()=>{if(!m)return Object.assign(Object.assign({},N==null?void 0:N.style),L);const O={marginTop:m[1]};return E==="rtl"?O.left=Number.parseInt(m[0],10):O.right=-Number.parseInt(m[0],10),Object.assign(Object.assign(Object.assign({},O),N==null?void 0:N.style),L)},[E,m,L,N==null?void 0:N.style]),Ie=b??(typeof U=="string"||typeof U=="number"?U:void 0),fe=!W&&(h===0?D:!!h&&h!==!0),Ae=fe?f.createElement("span",{className:`${_}-status-text`},h):null,Ee=!U||typeof U!="object"?void 0:ke(U,O=>({style:Object.assign(Object.assign({},te),O.style)})),se=Le(j,!1),Be=M(P==null?void 0:P.indicator,(i=N==null?void 0:N.classNames)===null||i===void 0?void 0:i.indicator,{[`${_}-status-dot`]:ae,[`${_}-status-${x}`]:!!x,[`${_}-color-${j}`]:se}),re={};j&&!se&&(re.color=j,re.background=j);const pe=M(_,{[`${_}-status`]:ae,[`${_}-not-a-wrapper`]:!d,[`${_}-rtl`]:E==="rtl"},R,z,N==null?void 0:N.className,(s=N==null?void 0:N.classNames)===null||s===void 0?void 0:s.root,P==null?void 0:P.root,ee,oe);if(!d&&ae&&(h||Re||!I)){const O=te.color;return J(f.createElement("span",Object.assign({},Y,{className:pe,style:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.root),(o=N==null?void 0:N.styles)===null||o===void 0?void 0:o.root),te)}),f.createElement("span",{className:Be,style:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.indicator),(u=N==null?void 0:N.styles)===null||u===void 0?void 0:u.indicator),re)}),fe&&f.createElement("span",{style:{color:O},className:`${_}-status-text`},h)))}return J(f.createElement("span",Object.assign({ref:l},Y,{className:pe,style:Object.assign(Object.assign({},(n=N==null?void 0:N.styles)===null||n===void 0?void 0:n.root),V==null?void 0:V.root)}),d,f.createElement(Ge,{visible:!W,motionName:`${_}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:O})=>{var ce,de;const ze=F("scroll-number",p),me=xe.current,De=M(P==null?void 0:P.indicator,(ce=N==null?void 0:N.classNames)===null||ce===void 0?void 0:ce.indicator,{[`${_}-dot`]:me,[`${_}-count`]:!me,[`${_}-count-sm`]:C==="small",[`${_}-multiple-words`]:!me&&ne&&ne.toString().length>1,[`${_}-status-${x}`]:!!x,[`${_}-color-${j}`]:se});let ie=Object.assign(Object.assign(Object.assign({},V==null?void 0:V.indicator),(de=N==null?void 0:N.styles)===null||de===void 0?void 0:de.indicator),te);return j&&!se&&(ie=ie||{},ie.background=j),f.createElement($t,{prefixCls:ze,show:!W,motionClassName:O,className:De,count:ne,title:Ie,style:ie,key:"scrollNumber"},Ee)}),Ae))}),Oe=kt;Oe.Ribbon=St;var Pt={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"},Vt=function(l,i){return f.createElement(Ze,qe({},l,{ref:i,icon:Pt}))},Ot=f.forwardRef(Vt);const Mt="_container_1k4mc_1",Rt="_fileListSection_1k4mc_10",It="_header_1k4mc_19",At="_headerTitle_1k4mc_28",Et="_fileCount_1k4mc_36",Bt="_changesContainer_1k4mc_44",zt="_changeItem_1k4mc_51",Dt="_changeItemActive_1k4mc_68",Ft="_dirItem_1k4mc_77",Ht="_dirArrow_1k4mc_88",Wt="_dirName_1k4mc_97",Ut="_status_1k4mc_102",Gt="_icon_1k4mc_111",Zt="_fileName_1k4mc_120",qt="_diffSection_1k4mc_127",Xt="_diffHeader_1k4mc_135",Kt="_diffFilePath_1k4mc_145",Yt="_diffBadge_1k4mc_155",Jt="_diffContent_1k4mc_167",Qt="_diffPlaceholder_1k4mc_173",es="_statusText_1k4mc_184",ts="_errorText_1k4mc_191",ss="_emptyText_1k4mc_198",is="_warningText_1k4mc_205",ls="_fileSizeNote_1k4mc_217",os="_statusTextItalic_1k4mc_222",as="_imagePreviewWrap_1k4mc_226",ns="_imagePreview_1k4mc_226",rs="_rotated90_1k4mc_242",y={container:Mt,fileListSection:Rt,header:It,headerTitle:At,fileCount:Et,changesContainer:Bt,changeItem:zt,changeItemActive:Dt,dirItem:Ft,dirArrow:Ht,dirName:Wt,status:Ut,icon:Gt,fileName:Zt,diffSection:qt,diffHeader:Xt,diffFilePath:Kt,diffBadge:Yt,diffContent:Jt,diffPlaceholder:Qt,statusText:es,errorText:ts,emptyText:ss,warningText:is,fileSizeNote:ls,statusTextItalic:os,imagePreviewWrap:as,imagePreview:ns,rotated90:rs},cs={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},ds={"??":"U"},ms={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 hs(t){const l=t.includes(".")?t.split(".").pop().toLowerCase():"",i=ms[l]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:i,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 us(){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 bs(t){const l={dirs:{},files:[]};for(const i of t){const s=i.file.split("/");let o=l;for(let u=0;u<s.length-1;u++)o.dirs[s[u]]||(o.dirs[s[u]]={dirs:{},files:[]}),o=o.dirs[s[u]];o.files.push({name:s[s.length-1],status:i.status,fullPath:i.file})}return l}function Me({name:t,node:l,depth:i,selectedFile:s,onFileClick:o}){const u=Object.keys(l.dirs).sort(),n=[...l.files].sort((r,p)=>r.name.localeCompare(p.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:y.dirItem,style:{paddingLeft:8+i*16},children:[e.jsx("span",{className:y.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:y.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:y.icon,children:us()}),e.jsx("span",{className:y.dirName,children:t})]}),u.map(r=>e.jsx(Me,{name:r,node:l.dirs[r],depth:t?i+1:i,selectedFile:s,onFileClick:o},r)),n.map(r=>e.jsxs("div",{className:`${y.changeItem} ${s===r.fullPath?y.changeItemActive:""}`,style:{paddingLeft:8+(t?i+1:i)*16},onClick:()=>o&&o(r.fullPath),children:[e.jsx("span",{className:y.icon,children:hs(r.name)}),e.jsx("span",{className:y.fileName,children:r.name}),e.jsx("span",{className:y.status,style:{color:cs[r.status]||"#888"},children:ds[r.status]||r.status})]},r.fullPath))]})}function gs({visible:t}){const[l,i]=f.useState(null),[s,o]=f.useState(null),[u,n]=f.useState(!0),[r,p]=f.useState(null),[d,x]=f.useState(null),[h,j]=f.useState(null),[S,v]=f.useState(!1),[w,C]=f.useState(!1),b=f.useRef(!0);return f.useEffect(()=>{if(b.current=!0,!!t)return n(!0),o(null),fetch(q("/api/git-status")).then(m=>m.ok?m.json():Promise.reject()).then(m=>{b.current&&(i(m.changes||[]),n(!1))}).catch(()=>{b.current&&(o("Failed to load git status"),n(!1))}),()=>{b.current=!1}},[t]),f.useEffect(()=>{if(!r){x(null),j(null);return}v(!0),x(null),j(null),fetch(q(`/api/git-diff?files=${encodeURIComponent(r)}`)).then(m=>{if(!m.ok)throw new Error(`HTTP ${m.status}`);return m.json()}).then(m=>{b.current&&(m.diffs&&m.diffs[0]?x(m.diffs[0]):j("No diff data available"),v(!1))}).catch(m=>{b.current&&(j(`${g("ui.fileLoadError")}: ${m.message}`),v(!1))})},[r]),e.jsxs("div",{className:y.container,children:[e.jsxs("div",{className:y.fileListSection,children:[e.jsxs("div",{className:y.header,children:[e.jsx("span",{className:y.headerTitle,children:g("ui.gitChanges")}),e.jsx("span",{className:y.fileCount,children:l?l.length:0})]}),e.jsxs("div",{className:y.changesContainer,children:[u&&e.jsx("div",{className:y.statusText,children:"Loading..."}),s&&e.jsx("div",{className:y.errorText,children:s}),!u&&!s&&l&&l.length===0&&e.jsx("div",{className:y.emptyText,children:"No changes"}),!u&&!s&&l&&l.length>0&&e.jsx(Me,{name:"",node:bs(l),depth:0,selectedFile:r,onFileClick:p})]})]}),e.jsx("div",{className:y.diffSection,children:r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:y.diffHeader,children:[e.jsx("span",{className:y.diffFilePath,children:r}),e.jsx("span",{className:y.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:y.diffContent,children:[S&&e.jsx("div",{className:y.statusText,children:g("ui.loading")}),h&&e.jsx("div",{className:y.errorText,children:h}),!S&&!h&&d&&e.jsx(e.Fragment,{children:d.is_large?e.jsxs("div",{className:y.warningText,children:[e.jsx("p",{children:g("ui.largeFileWarning")}),e.jsxs("p",{className:y.fileSizeNote,children:[g("ui.fileSize"),": ",(d.size/(1024*1024)).toFixed(2)," MB"]})]}):Xe(r)&&!d.is_deleted?e.jsxs("div",{className:y.imagePreviewWrap,children:[e.jsx("img",{className:y.imagePreview,src:q(`/api/file-raw?path=${encodeURIComponent(r)}`),alt:r,onClick:()=>C(!0)}),w&&e.jsx(Ke,{src:q(`/api/file-raw?path=${encodeURIComponent(r)}`),alt:r,onClose:()=>C(!1)})]}):d.is_binary?e.jsx("div",{className:`${y.statusText} ${y.statusTextItalic}`,children:g("ui.binaryFileNotice")}):e.jsx(Ye,{file_path:r,old_string:d.old_content,new_string:d.new_content})})]})]}):e.jsxs("div",{className:y.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 xs="_container_1bb9n_1",fs="_header_1bb9n_9",ps="_headerTitle_1bb9n_18",js="_closeBtn_1bb9n_24",vs="_content_1bb9n_38",Ns="_empty_1bb9n_47",ys="_fixedTable_1bb9n_54",Cs="_ellipsisCell_1bb9n_58",Ss="_thLeft_1bb9n_65",ws="_colWide_1bb9n_69",_s="_colNarrow_1bb9n_73",k={container:xs,header:fs,headerTitle:ps,closeBtn:js,content:vs,empty:Ns,fixedTable:ys,ellipsisCell:Cs,thLeft:Ss,colWide:ws,colNarrow:_s},Ts=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],Se={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 $s({requests:t=[],visible:l,onClose:i}){const{byModel:s,models:o,toolStats:u,skillStats:n,cacheStats:r,activeReasons:p,totalCount:d,totalCache:x,hasCacheStats:h,subAgentEntries:j,hasSubAgentStats:S,teammateEntries:v,hasTeammateStats:w,isEmpty:C}=f.useMemo(()=>{const b=Je(t),m=Object.keys(b),L=Qe(t),R=et(t),z=tt(t),P=Ts.filter(T=>z[T].count>0),V=P.reduce((T,$)=>T+z[$].count,0),D=P.reduce((T,$)=>T+z[$].cacheCreate,0),Y=P.length>0,F={},E={};for(let T=0;T<t.length;T++){const $=st(t[T],t[T+1]);if($.type==="SubAgent"){const I=$.subType||"Other";F[I]=(F[I]||0)+1}else if($.type==="Teammate"){const I=$.subType||"Teammate";E[I]=(E[I]||0)+1}}const N=Object.entries(F).sort((T,$)=>$[1]-T[1]),_=N.length>0,J=Object.entries(E).sort((T,$)=>$[1]-T[1]),ee=J.length>0,oe=m.length===0&&L.length===0&&!Y&&!_&&!ee&&R.length===0;return{byModel:b,models:m,toolStats:L,skillStats:R,cacheStats:z,activeReasons:P,totalCount:V,totalCache:D,hasCacheStats:Y,subAgentEntries:N,hasSubAgentStats:_,teammateEntries:J,hasTeammateStats:ee,isEmpty:oe}},[t]);return l?e.jsxs("div",{className:k.container,children:[e.jsxs("div",{className:k.header,children:[e.jsx("span",{className:k.headerTitle,children:g("ui.tokenStats")}),e.jsx("button",{className:k.closeBtn,onClick:i,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:k.content,children:C?e.jsx("div",{className:k.empty,children:"—"}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:g("ui.skillUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"Skill"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[n.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:b}),e.jsx("td",{className:a.td,children:m})]},b)),n.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:n.reduce((b,m)=>b+m[1],0)})]})]})]})]}),S&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:g("ui.subAgentStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[j.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[b," ",e.jsx(le,{doc:`SubAgent-${b}`})]}),e.jsx("td",{className:a.td,children:m})]},b)),j.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:j.reduce((b,m)=>b+m[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:"Teammate"}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"Name"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:b}),e.jsx("td",{className:a.td,children:m})]},b)),v.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:v.reduce((b,m)=>b+m[1],0)})]})]})]})]}),u.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:g("ui.toolUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:"Tool"}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[u.map(([b,m])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[b," ",e.jsx(le,{doc:`Tool-${b}`})]}),e.jsx("td",{className:a.td,children:m})]},b)),u.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:u.reduce((b,m)=>b+m[1],0)})]})]})]})]}),h&&e.jsxs("div",{className:a.modelCard,children:[e.jsxs("div",{className:a.modelName,children:["MainAgent",e.jsx(le,{doc:"MainAgent"})," ",g("ui.cacheRebuildStats"),e.jsx(le,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${a.statsTable} ${k.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:k.colWide}),e.jsx("col",{className:k.colNarrow}),e.jsx("col",{className:k.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${k.thLeft}`,children:g("ui.cacheRebuild.reason")}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.count")}),e.jsx("td",{className:a.th,children:g("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[p.map(b=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:`${a.label} ${k.ellipsisCell}`,title:g(`ui.${Se[b]}`),children:g(`ui.${Se[b]}`)}),e.jsx("td",{className:a.td,children:r[b].count}),e.jsx("td",{className:a.td,children:Z(r[b].cacheCreate)})]},b)),p.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:d}),e.jsx("td",{className:a.td,children:Z(x)})]})]})]})]}),o.map(b=>{const m=s[b],L=m.input+m.cacheCreation+m.cacheRead,R=L>0?(m.cacheRead/L*100).toFixed(1):"0.0";return e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:b}),e.jsx("table",{className:a.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:"Token"}),e.jsx("td",{className:a.th,children:"input"}),e.jsx("td",{className:a.th,children:"output"})]}),e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label}),e.jsx("td",{className:a.td,children:Z(L)}),e.jsx("td",{className:a.td,children:Z(m.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:"Cache"}),e.jsx("td",{className:a.th,children:"create"}),e.jsx("td",{className:a.th,children:"read"})]}),e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label}),e.jsx("td",{className:a.td,children:Z(m.cacheCreation)}),e.jsx("td",{className:a.td,children:Z(m.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:g("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:a.td,children:[R,"%"]})]})]})})]},b)})]})})]}):null}const X=class X extends it{constructor(i){super(i);G(this,"handleExportPromptsTxt",i=>{if(!i||i.length===0)return;const s=[];for(const r of i){const p=[],d=r.timestamp?new Date(r.timestamp).toLocaleString():"";d&&p.push(`${d}:
|
|
2
2
|
`);const x=(r.segments||[]).filter(h=>h.type==="text").map(h=>h.content);x.length>0&&p.push(x.join(`
|
|
3
3
|
`)),s.push(p.join(`
|
|
4
4
|
`))}if(s.length===0)return;const o=new Blob([s.join(`
|
|
@@ -0,0 +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-CMhqtu8w.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-
|
|
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-CMhqtu8w.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};
|