cc-viewer 1.6.154 → 1.6.155
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-eghzu7Qg.js → App-Bca3efSu.js} +2 -2
- package/dist/assets/{AppHeader-CcZY-1zv.css → AppHeader-TCiaw_VW.css} +1 -1
- package/dist/assets/{AppHeader.module-DvQ_bZ5X.js → AppHeader.module-C4q4gNVN.js} +173 -173
- package/dist/assets/Mobile-BeRTnN6_.css +1 -0
- package/dist/assets/Mobile-T8lK2gEu.js +10 -0
- package/dist/assets/{_baseUniq-Bq5teT7W.js → _baseUniq-B4ehgQsB.js} +1 -1
- package/dist/assets/{arc-mL5kAtnv.js → arc-CRbgupAW.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-CW3t8GCA.js → architectureDiagram-Q4EWVU46-CS0vewX-.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-DHlA69yP.js → blockDiagram-DXYQGD6D-9YCcggTX.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-CWuY62tP.js → c4Diagram-AHTNJAMY-atDVk0gJ.js} +1 -1
- package/dist/assets/channel-BVO7XMkX.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CoeBCn39.js → chunk-4BX2VUAB-GVbV0kin.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-CUJqCV8p.js → chunk-4TB4RGXK-B2ZiCrhf.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-rEtk1rJn.js → chunk-55IACEB6-Bp0O3sN-.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-BXJX6GKI.js → chunk-EDXVE4YY-D46zwHrh.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BDN7m4t5.js → chunk-FMBD7UC4-BbsH77gO.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-DV2tRqJz.js → chunk-OYMX7WX6-CSq8N0vm.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DZLiaz7h.js → chunk-QZHKN3VN-CTKzjsCm.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-DLSet-Rk.js → chunk-YZCP3GAM-D51HvD1s.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-BygMKhm6.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-BygMKhm6.js +1 -0
- package/dist/assets/clone-D_ANuiO7.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-Dp5Z_4Tx.js → cose-bilkent-S5V4N54A-DvlNyX_i.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-BKpVdjiJ.js → dagre-KV5264BT-CVZbWreO.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-a737Lqvn.js → diagram-5BDNPKRD-2_s2BOP0.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-BmXgBfoE.js → diagram-G4DWMVQ6-DekKPXGq.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-Cvedma2P.js → diagram-MMDJMWI5-p7nV29r5.js} +1 -1
- package/dist/assets/{diagram-TYMM5635--yV7P2-g.js → diagram-TYMM5635-ya8KwWip.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-CXLXa45C.js → erDiagram-SMLLAGMA-B31aNe_E.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-BbY5M4WT.js → flowDiagram-DWJPFMVM-9sk7Vrwu.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-DDoe-D8m.js → ganttDiagram-T4ZO3ILL-CFK5rgYZ.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-DOSRGs8Q.js → gitGraphDiagram-UUTBAWPF-_c5CES_Y.js} +1 -1
- package/dist/assets/{graph-D2SdCMci.js → graph-B8smttMX.js} +1 -1
- package/dist/assets/{index-DIyztX-x.js → index-mkHq68aJ.js} +2 -2
- package/dist/assets/{infoDiagram-42DDH7IO-BVNNhbo-.js → infoDiagram-42DDH7IO-KdstFgqr.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-CifXkscV.js → ishikawaDiagram-UXIWVN3A-B6ZYV7KM.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-Bd3_iIpv.js → journeyDiagram-VCZTEJTY-B5GVvPes.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-DH6fPGmv.js → kanban-definition-6JOO6SKY-CbR8_Kkk.js} +1 -1
- package/dist/assets/{layout-iINEIpJS.js → layout-DBRyjICZ.js} +1 -1
- package/dist/assets/{linear-Sl4HD9SP.js → linear-C2aYFkog.js} +1 -1
- package/dist/assets/{mermaid.core-DJxnTHij.js → mermaid.core-Q9xea37m.js} +4 -4
- package/dist/assets/{min-Bwp8hxQ9.js → min-XdluhOea.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-CjQAQvuD.js → mindmap-definition-QFDTVHPH-DyFVERXb.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-Buiwz1ht.js → pieDiagram-DEJITSTG-BUQlNaRT.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-f2f1fbrQ.js → quadrantDiagram-34T5L4WZ-D8H-DdQN.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-CidP1EV3.js → requirementDiagram-MS252O5E-BsltY2Fw.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-Bqx-rYcK.js → sankeyDiagram-XADWPNL6-CdDizU83.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-BPlE4Dum.js → sequenceDiagram-FGHM5R23-BJcLyK3J.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-DH2MYaIg.js → stateDiagram-FHFEXIEX-QDJ-Ppes.js} +1 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-Cwzbns-W.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-DqWL-r1T.js → timeline-definition-GMOUNBTQ-CsKAvtHT.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-MeQcBT36.js → vennDiagram-DHZGUBPP-B29Cjwzv.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-C2jDAkJ3.js → wardley-RL74JXVD-CCafWbnW.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-CXVgRMV7.js → wardleyDiagram-NUSXRM2D-CyoW40UG.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-D8LbH6PY.js → xychartDiagram-5P7HB3ND-EF9K8k-9.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server.js +62 -4
- package/dist/assets/Mobile-BYSHNj-T.js +0 -10
- package/dist/assets/Mobile-BnDkLcBv.css +0 -1
- package/dist/assets/channel-BagtSGft.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DYt_iD0o.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-DYt_iD0o.js +0 -1
- package/dist/assets/clone-BeahnYa4.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-B6E6jqnj.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1ixoa_1{display:flex;flex-direction:column;height:100%;background:var(--bg-base-alt);overflow:hidden}._fileListSection_1ixoa_10{height:300px;flex-shrink:0;display:flex;flex-direction:column;background:var(--bg-container);border-bottom:1px solid var(--border-primary)}._header_1ixoa_19{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--border-primary);flex-shrink:0}._headerTitle_1ixoa_28{font-size:11px;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.5px}._fileCount_1ixoa_36{font-size:10px;color:var(--text-disabled);background:var(--bg-elevated);padding:1px 6px;border-radius:8px}._changesContainer_1ixoa_44{flex:1;overflow:auto;padding:4px 0;-webkit-overflow-scrolling:touch}._changeItem_1ixoa_51{display:flex;align-items:center;height:28px;padding:0 8px;cursor:pointer;color:var(--text-secondary);font-size:13px;white-space:nowrap;transition:background .1s;gap:6px}._changeItem_1ixoa_51:hover{background:var(--bg-elevated)}._changeItemActive_1ixoa_68{background:var(--color-primary-bg-light);color:var(--text-white)}._changeItemActive_1ixoa_68:hover{background:var(--color-primary-bg-light)}._dirItem_1ixoa_77{display:flex;align-items:center;height:26px;padding:0 8px;color:var(--text-tertiary);font-size:13px;white-space:nowrap;gap:6px}._dirArrow_1ixoa_88{width:16px;flex-shrink:0;color:var(--text-muted);display:flex;align-items:center;justify-content:center}._dirName_1ixoa_97{overflow:hidden;text-overflow:ellipsis}._status_1ixoa_102{width:16px;flex-shrink:0;font-size:11px;font-weight:600;text-align:center;margin-left:auto}._icon_1ixoa_111{width:16px;height:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center}._fileName_1ixoa_120{overflow:hidden;text-overflow:ellipsis;flex:1}._diffSection_1ixoa_127{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}._diffHeader_1ixoa_135{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border-primary);background:var(--bg-container);flex-shrink:0}._diffFilePath_1ixoa_145{font-size:12px;color:var(--text-secondary);font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}._diffBadge_1ixoa_155{padding:2px 8px;background:var(--bg-surface);border:1px solid var(--border-light);border-radius:4px;font-size:10px;font-weight:600;color:var(--color-accent-yellow);letter-spacing:.5px;flex-shrink:0}._diffContent_1ixoa_167{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}._diffPlaceholder_1ixoa_173{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--border-secondary);font-size:13px}._statusText_1ixoa_184{color:var(--text-disabled);font-size:12px;padding:16px 12px;text-align:center}._errorText_1ixoa_191{color:var(--color-error-light);font-size:12px;padding:16px 12px;text-align:center}._emptyText_1ixoa_198{color:var(--text-muted);font-size:12px;padding:16px 12px;text-align:center}._warningText_1ixoa_205{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;color:var(--color-accent-yellow);font-size:13px;text-align:center;gap:8px}._fileSizeNote_1ixoa_217{color:var(--text-tertiary);font-size:12px}._statusTextItalic_1ixoa_222{font-style:italic}._imagePreviewWrap_1ixoa_226{display:flex;align-items:center;justify-content:center;padding:16px;min-height:200px}._imagePreview_1ixoa_226{max-width:100%;max-height:60vh;object-fit:contain;border-radius:4px;cursor:zoom-in}._rotated90_1ixoa_242{transform:rotate(90deg)}._repoHeader_1ixoa_247{display:flex;align-items:center;height:36px;padding:0 10px;cursor:pointer;color:var(--text-primary);font-size:13px;white-space:nowrap;gap:6px;background:var(--bg-surface);border-bottom:1px solid var(--border-light);-webkit-user-select:none;user-select:none}._repoHeader_1ixoa_247:hover{background:var(--bg-elevated)}._repoArrow_1ixoa_266{width:14px;flex-shrink:0;color:var(--text-muted);display:flex;align-items:center;justify-content:center;transition:transform .15s;transform:rotate(0)}._repoArrowExpanded_1ixoa_277{transform:rotate(90deg)}._repoName_1ixoa_281{overflow:hidden;text-overflow:ellipsis;flex:1;font-weight:600}._repoBadge_1ixoa_288{font-size:11px;color:var(--text-disabled);background:var(--bg-elevated);padding:2px 8px;border-radius:8px;flex-shrink:0}._container_1bb9n_1{display:flex;flex-direction:column;height:100%;background:var(--bg-base-alt);overflow:hidden}._header_1bb9n_9{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--border-primary);flex-shrink:0}._headerTitle_1bb9n_18{font-size:13px;font-weight:600;color:var(--text-secondary)}._closeBtn_1bb9n_24{background:none;border:none;color:var(--text-tertiary);cursor:pointer;padding:4px;display:flex;align-items:center}._closeBtn_1bb9n_24:active{color:var(--text-white)}._content_1bb9n_38{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:12px}._empty_1bb9n_47{color:var(--text-tertiary);font-size:13px;text-align:center;padding:40px 0}._fixedTable_1bb9n_54{table-layout:fixed}._ellipsisCell_1bb9n_58{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:0}._thLeft_1bb9n_65{text-align:left}._colWide_1bb9n_69{width:50%}._colNarrow_1bb9n_73{width:25%}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var He=Object.defineProperty;var We=(t,a,s)=>a in t?He(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;var R=(t,a,s)=>We(t,typeof a!="symbol"?a+"":a,s);import{r as x,j as e,R as Ue,i as Ge,a as Ze}from"./index-mkHq68aJ.js";import{g as $e,m as qe,a as Pe,r as Le,K as Y,u as H,C as ge,i as Ve,c as z,b as Oe,d as Xe,I as Ke,_ as Ye,f as Je,e as U,t as u,h as Qe,j as et,F as tt,k as st,l as it,n as at,o as ot,q as lt,s as r,v as ae,w as X,A as nt,x as rt,y as ct,z as ve,B as c,D as dt,E as mt,R as ht,G as W,H as ut,J as Ne,L as gt,T as bt,O as xt,M as pt,N as ft,S as jt,P as he,Q as Se,U as vt,V as ye}from"./AppHeader.module-C4q4gNVN.js";const Nt=new Y("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),St=new Y("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),yt=new Y("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ct=new Y("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),wt=new Y("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),_t=new Y("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Tt=t=>{const{componentCls:a,iconCls:s,antCls:i,badgeShadowSize:o,textFontSize:d,textFontSizeSM:n,statusSize:m,dotSize:f,textFontWeight:l,indicatorHeight:p,indicatorHeightSM:h,marginXS:S,calc:y}=t,N=`${i}-scroll-number`,$=Pe(t,(C,{darkColor:g})=>({[`&${a} ${a}-color-${C}`]:{background:g,[`&:not(${a}-count)`]:{color:g},"a:hover &":{background:g}}}));return{[a]:Object.assign(Object.assign(Object.assign(Object.assign({},Le(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${a}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:p,height:p,color:t.badgeTextColor,fontWeight:l,fontSize:d,lineHeight:H(p),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:y(p).div(2).equal(),boxShadow:`0 0 0 ${H(o)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${a}-count-sm`]:{minWidth:h,height:h,fontSize:n,lineHeight:H(h),borderRadius:y(h).div(2).equal()},[`${a}-multiple-words`]:{padding:`0 ${H(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${a}-dot`]:{zIndex:t.indicatorZIndex,width:f,minWidth:f,height:f,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${H(o)} ${t.badgeShadowColor}`},[`${a}-count, ${a}-dot, ${N}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${s}-spin`]:{animationName:_t,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${a}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${a}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:m,height:m,verticalAlign:"middle",borderRadius:"50%"},[`${a}-status-success`]:{backgroundColor:t.colorSuccess},[`${a}-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:Nt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${a}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${a}-status-error`]:{backgroundColor:t.colorError},[`${a}-status-warning`]:{backgroundColor:t.colorWarning},[`${a}-status-text`]:{marginInlineStart:S,color:t.colorText,fontSize:t.fontSize}}}),$),{[`${a}-zoom-appear, ${a}-zoom-enter`]:{animationName:St,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${a}-zoom-leave`]:{animationName:yt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${a}-not-a-wrapper`]:{[`${a}-zoom-appear, ${a}-zoom-enter`]:{animationName:Ct,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${a}-zoom-leave`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${a}-status)`]:{verticalAlign:"middle"},[`${N}-custom-component, ${a}-count`]:{transform:"none"},[`${N}-custom-component, ${N}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[N]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${N}-only`]:{position:"relative",display:"inline-block",height:p,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${N}-only-unit`]:{height:p,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${N}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${a}-count, ${a}-dot, ${N}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Ie=t=>{const{fontHeight:a,lineWidth:s,marginXS:i,colorBorderBg:o}=t,d=a,n=s,m=t.colorTextLightSolid,f=t.colorError,l=t.colorErrorHover;return qe(t,{badgeFontHeight:d,badgeShadowSize:n,badgeTextColor:m,badgeColor:f,badgeColorHover:l,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},ke=t=>{const{fontSize:a,lineHeight:s,fontSizeSM:i,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(a*s)-2*o,indicatorHeightSM:a,dotSize:i/2,textFontSize:i,textFontSizeSM:i,textFontWeight:"normal",statusSize:i/2}},$t=$e("Badge",t=>{const a=Ie(t);return Tt(a)},ke),Pt=t=>{const{antCls:a,badgeFontHeight:s,marginXS:i,badgeRibbonOffset:o,calc:d}=t,n=`${a}-ribbon`,m=`${a}-ribbon-wrapper`,f=Pe(t,(l,{darkColor:p})=>({[`&${n}-color-${l}`]:{background:p,color:p}}));return{[m]:{position:"relative"},[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Le(t)),{position:"absolute",top:i,padding:`0 ${H(t.paddingXS)}`,color:t.colorPrimary,lineHeight:H(s),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:`${H(d(o).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),f),{[`&${n}-placement-end`]:{insetInlineEnd:d(o).mul(-1).equal(),borderEndEndRadius:0,[`${n}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${n}-placement-start`]:{insetInlineStart:d(o).mul(-1).equal(),borderEndStartRadius:0,[`${n}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Lt=$e(["Badge","Ribbon"],t=>{const a=Ie(t);return Pt(a)},ke),Vt=t=>{const{className:a,prefixCls:s,style:i,color:o,children:d,text:n,placement:m="end",rootClassName:f}=t,{getPrefixCls:l,direction:p}=x.useContext(ge),h=l("ribbon",s),S=`${h}-wrapper`,[y,N,$]=Lt(h,S),C=Ve(o,!1),g=z(h,`${h}-placement-${m}`,{[`${h}-rtl`]:p==="rtl",[`${h}-color-${o}`]:C},a),b={},P={};return o&&!C&&(b.background=o,P.color=o),y(x.createElement("div",{className:z(S,f,N,$)},d,x.createElement("div",{className:z(g,N),style:Object.assign(Object.assign({},b),i)},x.createElement("span",{className:`${h}-text`},n),x.createElement("div",{className:`${h}-corner`,style:P}))))},Ce=t=>{const{prefixCls:a,value:s,current:i,offset:o=0}=t;let d;return o&&(d={position:"absolute",top:`${o}00%`,left:0}),x.createElement("span",{style:d,className:z(`${a}-only-unit`,{current:i})},s)};function Ot(t,a,s){let i=t,o=0;for(;(i+10)%10!==a;)i+=s,o+=s;return o}const It=t=>{const{prefixCls:a,count:s,value:i}=t,o=Number(i),d=Math.abs(s),[n,m]=x.useState(o),[f,l]=x.useState(d),p=()=>{m(o),l(d)};x.useEffect(()=>{const y=setTimeout(p,1e3);return()=>clearTimeout(y)},[o]);let h,S;if(n===o||Number.isNaN(o)||Number.isNaN(n))h=[x.createElement(Ce,Object.assign({},t,{key:o,current:!0}))],S={transition:"none"};else{h=[];const y=o+10,N=[];for(let b=o;b<=y;b+=1)N.push(b);const $=f<d?1:-1,C=N.findIndex(b=>b%10===n);h=($<0?N.slice(0,C+1):N.slice(C)).map((b,P)=>{const A=b%10;return x.createElement(Ce,Object.assign({},t,{key:b,value:A,offset:$<0?P-C:P,current:P===C}))}),S={transform:`translateY(${-Ot(n,o,$)}00%)`}}return x.createElement("span",{className:`${a}-only`,style:S,onTransitionEnd:p},h)};var kt=function(t,a){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&a.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)a.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(s[i[o]]=t[i[o]]);return s};const Rt=x.forwardRef((t,a)=>{const{prefixCls:s,count:i,className:o,motionClassName:d,style:n,title:m,show:f,component:l="sup",children:p}=t,h=kt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:S}=x.useContext(ge),y=S("scroll-number",s),N=Object.assign(Object.assign({},h),{"data-show":f,style:n,className:z(y,o,d),title:m});let $=i;if(i&&Number(i)%1===0){const C=String(i).split("");$=x.createElement("bdi",null,C.map((g,b)=>x.createElement(It,{prefixCls:y,count:Number(i),value:g,key:C.length-b})))}return n!=null&&n.borderColor&&(N.style=Object.assign(Object.assign({},n),{boxShadow:`0 0 0 1px ${n.borderColor} inset`})),p?Oe(p,C=>({className:z(`${y}-custom-component`,C==null?void 0:C.className,d)})):x.createElement(l,Object.assign({},N,{ref:a}),$)});var Mt=function(t,a){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&a.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)a.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(s[i[o]]=t[i[o]]);return s};const At=x.forwardRef((t,a)=>{var s,i,o,d,n;const{prefixCls:m,scrollNumberPrefixCls:f,children:l,status:p,text:h,color:S,count:y=null,overflowCount:N=99,dot:$=!1,size:C="default",title:g,offset:b,style:P,className:A,rootClassName:M,classNames:O,styles:I,showZero:E=!1}=t,B=Mt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:w,direction:_,badge:j}=x.useContext(ge),T=w("badge",m),[J,ee,oe]=$t(T),L=y>N?`${N}+`:y,V=L==="0"||L===0||h==="0"||h===0,F=y===null||V&&!E,le=(p!=null||S!=null)&&F,Me=p!=null||!V,Q=$&&!V,G=Q?"":L,Z=x.useMemo(()=>((G==null||G==="")&&(h==null||h==="")||V&&!E)&&!Q,[G,V,E,Q,h]),be=x.useRef(y);Z||(be.current=y);const q=be.current,xe=x.useRef(G);Z||(xe.current=G);const ne=xe.current,pe=x.useRef(Q);Z||(pe.current=Q);const te=x.useMemo(()=>{if(!b)return Object.assign(Object.assign({},j==null?void 0:j.style),P);const D={marginTop:b[1]};return _==="rtl"?D.left=Number.parseInt(b[0],10):D.right=-Number.parseInt(b[0],10),Object.assign(Object.assign(Object.assign({},D),j==null?void 0:j.style),P)},[_,b,P,j==null?void 0:j.style]),Ae=g??(typeof q=="string"||typeof q=="number"?q:void 0),fe=!Z&&(h===0?E:!!h&&h!==!0),De=fe?x.createElement("span",{className:`${T}-status-text`},h):null,Ee=!q||typeof q!="object"?void 0:Oe(q,D=>({style:Object.assign(Object.assign({},te),D.style)})),se=Ve(S,!1),Be=z(O==null?void 0:O.indicator,(s=j==null?void 0:j.classNames)===null||s===void 0?void 0:s.indicator,{[`${T}-status-dot`]:le,[`${T}-status-${p}`]:!!p,[`${T}-color-${S}`]:se}),re={};S&&!se&&(re.color=S,re.background=S);const je=z(T,{[`${T}-status`]:le,[`${T}-not-a-wrapper`]:!l,[`${T}-rtl`]:_==="rtl"},A,M,j==null?void 0:j.className,(i=j==null?void 0:j.classNames)===null||i===void 0?void 0:i.root,O==null?void 0:O.root,ee,oe);if(!l&&le&&(h||Me||!F)){const D=te.color;return J(x.createElement("span",Object.assign({},B,{className:je,style:Object.assign(Object.assign(Object.assign({},I==null?void 0:I.root),(o=j==null?void 0:j.styles)===null||o===void 0?void 0:o.root),te)}),x.createElement("span",{className:Be,style:Object.assign(Object.assign(Object.assign({},I==null?void 0:I.indicator),(d=j==null?void 0:j.styles)===null||d===void 0?void 0:d.indicator),re)}),fe&&x.createElement("span",{style:{color:D},className:`${T}-status-text`},h)))}return J(x.createElement("span",Object.assign({ref:a},B,{className:je,style:Object.assign(Object.assign({},(n=j==null?void 0:j.styles)===null||n===void 0?void 0:n.root),I==null?void 0:I.root)}),l,x.createElement(Xe,{visible:!Z,motionName:`${T}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:D})=>{var ce,de;const ze=w("scroll-number",f),me=pe.current,Fe=z(O==null?void 0:O.indicator,(ce=j==null?void 0:j.classNames)===null||ce===void 0?void 0:ce.indicator,{[`${T}-dot`]:me,[`${T}-count`]:!me,[`${T}-count-sm`]:C==="small",[`${T}-multiple-words`]:!me&&ne&&ne.toString().length>1,[`${T}-status-${p}`]:!!p,[`${T}-color-${S}`]:se});let ie=Object.assign(Object.assign(Object.assign({},I==null?void 0:I.indicator),(de=j==null?void 0:j.styles)===null||de===void 0?void 0:de.indicator),te);return S&&!se&&(ie=ie||{},ie.background=S),x.createElement(Rt,{prefixCls:ze,show:!Z,motionClassName:D,className:Fe,count:ne,title:Ae,style:ie,key:"scrollNumber"},Ee)}),De))}),Re=At;Re.Ribbon=Vt;var Dt={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"},Et=function(a,s){return x.createElement(Ke,Ye({},a,{ref:s,icon:Dt}))},Bt=x.forwardRef(Et);const zt="_container_1ixoa_1",Ft="_fileListSection_1ixoa_10",Ht="_header_1ixoa_19",Wt="_headerTitle_1ixoa_28",Ut="_fileCount_1ixoa_36",Gt="_changesContainer_1ixoa_44",Zt="_changeItem_1ixoa_51",qt="_changeItemActive_1ixoa_68",Xt="_dirItem_1ixoa_77",Kt="_dirArrow_1ixoa_88",Yt="_dirName_1ixoa_97",Jt="_status_1ixoa_102",Qt="_icon_1ixoa_111",es="_fileName_1ixoa_120",ts="_diffSection_1ixoa_127",ss="_diffHeader_1ixoa_135",is="_diffFilePath_1ixoa_145",as="_diffBadge_1ixoa_155",os="_diffContent_1ixoa_167",ls="_diffPlaceholder_1ixoa_173",ns="_statusText_1ixoa_184",rs="_errorText_1ixoa_191",cs="_emptyText_1ixoa_198",ds="_warningText_1ixoa_205",ms="_fileSizeNote_1ixoa_217",hs="_statusTextItalic_1ixoa_222",us="_imagePreviewWrap_1ixoa_226",gs="_imagePreview_1ixoa_226",bs="_rotated90_1ixoa_242",xs="_repoHeader_1ixoa_247",ps="_repoArrow_1ixoa_266",fs="_repoArrowExpanded_1ixoa_277",js="_repoName_1ixoa_281",vs="_repoBadge_1ixoa_288",v={container:zt,fileListSection:Ft,header:Ht,headerTitle:Wt,fileCount:Ut,changesContainer:Gt,changeItem:Zt,changeItemActive:qt,dirItem:Xt,dirArrow:Kt,dirName:Yt,status:Jt,icon:Qt,fileName:es,diffSection:ts,diffHeader:ss,diffFilePath:is,diffBadge:as,diffContent:os,diffPlaceholder:ls,statusText:ns,errorText:rs,emptyText:cs,warningText:ds,fileSizeNote:ms,statusTextItalic:hs,imagePreviewWrap:us,imagePreview:gs,rotated90:bs,repoHeader:xs,repoArrow:ps,repoArrowExpanded:fs,repoName:js,repoBadge:vs},Ns={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},Ss={"??":"U"},ys={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 Cs(t){const a=t.includes(".")?t.split(".").pop().toLowerCase():"",s=ys[a]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s,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 ws(){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 we(t){const a={dirs:{},files:[]};for(const s of t){const i=s.file.split("/");let o=a;for(let d=0;d<i.length-1;d++)o.dirs[i[d]]||(o.dirs[i[d]]={dirs:{},files:[]}),o=o.dirs[i[d]];o.files.push({name:i[i.length-1],status:s.status,fullPath:s.file})}return a}function ue({name:t,node:a,depth:s,selectedFile:i,selectedRepo:o,repoPath:d,onFileClick:n}){const m=Object.keys(a.dirs).sort(),f=[...a.files].sort((l,p)=>l.name.localeCompare(p.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:v.dirItem,style:{paddingLeft:8+s*16},children:[e.jsx("span",{className:v.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:v.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:v.icon,children:ws()}),e.jsx("span",{className:v.dirName,children:t})]}),m.map(l=>e.jsx(ue,{name:l,node:a.dirs[l],depth:t?s+1:s,selectedFile:i,selectedRepo:o,repoPath:d,onFileClick:n},l)),f.map(l=>e.jsxs("div",{className:`${v.changeItem} ${i===l.fullPath&&o===d?v.changeItemActive:""}`,style:{paddingLeft:8+(t?s+1:s)*16},onClick:()=>n&&n(d,l.fullPath),children:[e.jsx("span",{className:v.icon,children:Cs(l.name)}),e.jsx("span",{className:v.fileName,children:l.name}),e.jsx("span",{className:v.status,style:{color:Ns[l.status]||"#888"},children:Ss[l.status]||l.status})]},l.fullPath))]})}function _s({visible:t}){const[a,s]=x.useState(null),[i,o]=x.useState(null),[d,n]=x.useState(!0),[m,f]=x.useState(null),[l,p]=x.useState(null),[h,S]=x.useState(new Set),[y,N]=x.useState(null),[$,C]=x.useState(null),[g,b]=x.useState(!1),[P,A]=x.useState(!1),M=x.useRef(!0);x.useEffect(()=>{if(M.current=!0,!!t)return n(!0),o(null),Je().then(w=>{M.current&&(s(w),n(!1))}).catch(()=>{M.current&&(o("Failed to load git status"),n(!1))}),()=>{M.current=!1}},[t]),x.useEffect(()=>{if(!m||!l){N(null),C(null);return}b(!0),N(null),C(null);const w=l&&l!=="."?`&repo=${encodeURIComponent(l)}`:"";fetch(U(`/api/git-diff?files=${encodeURIComponent(m)}${w}`)).then(_=>{if(!_.ok)throw new Error(`HTTP ${_.status}`);return _.json()}).then(_=>{M.current&&(_.diffs&&_.diffs[0]?N(_.diffs[0]):C("No diff data available"),b(!1))}).catch(_=>{M.current&&(C(`${u("ui.fileLoadError")}: ${_.message}`),b(!1))})},[m,l]);const O=x.useMemo(()=>a?a.reduce((w,_)=>w+_.changes.length,0):0,[a]),I=!a||a.length<=1,E=(w,_)=>{f(_),p(w)},B=m&&l&&l!=="."?`${l}/${m}`:m;return e.jsxs("div",{className:v.container,children:[e.jsxs("div",{className:v.fileListSection,children:[e.jsxs("div",{className:v.header,children:[e.jsx("span",{className:v.headerTitle,children:u("ui.gitChanges")}),e.jsx("span",{className:v.fileCount,children:O})]}),e.jsxs("div",{className:v.changesContainer,children:[d&&e.jsx("div",{className:v.statusText,children:"Loading..."}),i&&e.jsx("div",{className:v.errorText,children:i}),!d&&!i&&(!a||a.length===0)&&e.jsx("div",{className:v.emptyText,children:"No changes"}),!d&&!i&&a&&a.map(w=>{const _=h.has(w.path);return I?e.jsx(ue,{name:"",node:we(w.changes),depth:0,selectedFile:m,selectedRepo:l,repoPath:w.path,onFileClick:E},w.path):e.jsxs(Ue.Fragment,{children:[e.jsxs("div",{className:v.repoHeader,onClick:()=>S(j=>{const T=new Set(j);return _?T.delete(w.path):T.add(w.path),T}),children:[e.jsx("span",{className:`${v.repoArrow} ${_?"":v.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:v.repoName,children:w.name}),e.jsx("span",{className:v.repoBadge,children:w.changes.length})]}),!_&&e.jsx(ue,{name:"",node:we(w.changes),depth:1,selectedFile:m,selectedRepo:l,repoPath:w.path,onFileClick:E})]},w.path)})]})]}),e.jsx("div",{className:v.diffSection,children:m?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:v.diffHeader,children:[e.jsx("span",{className:v.diffFilePath,children:B}),e.jsx("span",{className:v.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:v.diffContent,children:[g&&e.jsx("div",{className:v.statusText,children:u("ui.loading")}),$&&e.jsx("div",{className:v.errorText,children:$}),!g&&!$&&y&&e.jsx(e.Fragment,{children:y.is_large?e.jsxs("div",{className:v.warningText,children:[e.jsx("p",{children:u("ui.largeFileWarning")}),e.jsxs("p",{className:v.fileSizeNote,children:[u("ui.fileSize"),": ",(y.size/(1024*1024)).toFixed(2)," MB"]})]}):Qe(m)&&!y.is_deleted?e.jsxs("div",{className:v.imagePreviewWrap,children:[e.jsx("img",{className:v.imagePreview,src:U(`/api/file-raw?path=${encodeURIComponent(B)}`),alt:m,onClick:()=>A(!0)}),P&&e.jsx(et,{src:U(`/api/file-raw?path=${encodeURIComponent(B)}`),alt:m,onClose:()=>A(!1)})]}):y.is_binary?e.jsx("div",{className:`${v.statusText} ${v.statusTextItalic}`,children:u("ui.binaryFileNotice")}):e.jsx(tt,{file_path:m,old_string:y.old_content,new_string:y.new_content})})]})]}):e.jsxs("div",{className:v.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:u("ui.mobileGitDiffHint")})]})})]})}const Ts="_container_1bb9n_1",$s="_header_1bb9n_9",Ps="_headerTitle_1bb9n_18",Ls="_closeBtn_1bb9n_24",Vs="_content_1bb9n_38",Os="_empty_1bb9n_47",Is="_fixedTable_1bb9n_54",ks="_ellipsisCell_1bb9n_58",Rs="_thLeft_1bb9n_65",Ms="_colWide_1bb9n_69",As="_colNarrow_1bb9n_73",k={container:Ts,header:$s,headerTitle:Ps,closeBtn:Ls,content:Vs,empty:Os,fixedTable:Is,ellipsisCell:ks,thLeft:Rs,colWide:Ms,colNarrow:As},Ds=["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 Es({requests:t=[],visible:a,onClose:s}){const{byModel:i,models:o,toolStats:d,skillStats:n,cacheStats:m,activeReasons:f,totalCount:l,totalCache:p,hasCacheStats:h,subAgentEntries:S,hasSubAgentStats:y,teammateEntries:N,hasTeammateStats:$,isEmpty:C}=x.useMemo(()=>{const g=st(t),b=Object.keys(g),P=it(t),A=at(t),M=ot(t),O=Ds.filter(L=>M[L].count>0),I=O.reduce((L,V)=>L+M[V].count,0),E=O.reduce((L,V)=>L+M[V].cacheCreate,0),B=O.length>0,w={},_={};for(let L=0;L<t.length;L++){const V=lt(t[L],t[L+1]);if(V.type==="SubAgent"){const F=V.subType||"Other";w[F]=(w[F]||0)+1}else if(V.type==="Teammate"){const F=V.subType||"Teammate";_[F]=(_[F]||0)+1}}const j=Object.entries(w).sort((L,V)=>V[1]-L[1]),T=j.length>0,J=Object.entries(_).sort((L,V)=>V[1]-L[1]),ee=J.length>0,oe=b.length===0&&P.length===0&&!B&&!T&&!ee&&A.length===0;return{byModel:g,models:b,toolStats:P,skillStats:A,cacheStats:M,activeReasons:O,totalCount:I,totalCache:E,hasCacheStats:B,subAgentEntries:j,hasSubAgentStats:T,teammateEntries:J,hasTeammateStats:ee,isEmpty:oe}},[t]);return a?e.jsxs("div",{className:k.container,children:[e.jsxs("div",{className:k.header,children:[e.jsx("span",{className:k.headerTitle,children:u("ui.tokenStats")}),e.jsx("button",{className:k.closeBtn,onClick:s,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:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:u("ui.skillUsageStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${k.thLeft}`,children:"Skill"}),e.jsx("td",{className:r.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[n.map(([g,b])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label,children:g}),e.jsx("td",{className:r.td,children:b})]},g)),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((g,b)=>g+b[1],0)})]})]})]})]}),y&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:u("ui.subAgentStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${k.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:r.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[S.map(([g,b])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsxs("td",{className:r.label,children:[g," ",e.jsx(ae,{doc:`SubAgent-${g}`})]}),e.jsx("td",{className:r.td,children:b})]},g)),S.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:S.reduce((g,b)=>g+b[1],0)})]})]})]})]}),$&&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} ${k.thLeft}`,children:"Name"}),e.jsx("td",{className:r.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([g,b])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label,children:g}),e.jsx("td",{className:r.td,children:b})]},g)),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((g,b)=>g+b[1],0)})]})]})]})]}),d.length>0&&e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:u("ui.toolUsageStats")}),e.jsxs("table",{className:r.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${r.th} ${k.thLeft}`,children:"Tool"}),e.jsx("td",{className:r.th,children:u("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[d.map(([g,b])=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsxs("td",{className:r.label,children:[g," ",e.jsx(ae,{doc:`Tool-${g}`})]}),e.jsx("td",{className:r.td,children:b})]},g)),d.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:d.reduce((g,b)=>g+b[1],0)})]})]})]})]}),h&&e.jsxs("div",{className:r.modelCard,children:[e.jsxs("div",{className:r.modelName,children:["MainAgent",e.jsx(ae,{doc:"MainAgent"})," ",u("ui.cacheRebuildStats"),e.jsx(ae,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${r.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:`${r.th} ${k.thLeft}`,children:u("ui.cacheRebuild.reason")}),e.jsx("td",{className:r.th,children:u("ui.cacheRebuild.count")}),e.jsx("td",{className:r.th,children:u("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[f.map(g=>e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:`${r.label} ${k.ellipsisCell}`,title:u(`ui.${_e[g]}`),children:u(`ui.${_e[g]}`)}),e.jsx("td",{className:r.td,children:m[g].count}),e.jsx("td",{className:r.td,children:X(m[g].cacheCreate)})]},g)),f.length>1&&e.jsxs("tr",{className:r.rebuildTotalRow,children:[e.jsx("td",{className:r.label,children:"Total"}),e.jsx("td",{className:r.td,children:l}),e.jsx("td",{className:r.td,children:X(p)})]})]})]})]}),o.map(g=>{const b=i[g],P=b.input+b.cacheCreation+b.cacheRead,A=P>0?(b.cacheRead/P*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.modelCard,children:[e.jsx("div",{className:r.modelName,children:g}),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:X(P)}),e.jsx("td",{className:r.td,children:X(b.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:X(b.cacheCreation)}),e.jsx("td",{className:r.td,children:X(b.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:u("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:r.td,children:[A,"%"]})]})]})})]},g)})]})})]}):null}const K=class K extends nt{constructor(s){super(s);R(this,"handleExportPromptsTxt",s=>{if(!s||s.length===0)return;const i=[];for(const m of s){const f=[],l=m.timestamp?new Date(m.timestamp).toLocaleString():"";l&&f.push(`${l}:
|
|
2
|
+
`);const p=(m.segments||[]).filter(h=>h.type==="text").map(h=>h.content);p.length>0&&f.push(p.join(`
|
|
3
|
+
`)),i.push(f.join(`
|
|
4
|
+
`))}if(i.length===0)return;const o=new Blob([i.join(`
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
`)],{type:"text/plain;charset=utf-8"}),d=URL.createObjectURL(o),n=document.createElement("a");n.href=d,n.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,n.click(),URL.revokeObjectURL(d)});R(this,"handlePendingPermission",s=>{this.setState({globalPermission:s})});R(this,"handlePendingPlanApproval",s=>{this.setState({globalPlanApproval:s})});R(this,"handleAutoApproveChange",s=>{this.setState({autoApproveSeconds:s}),fetch(U("/api/preferences"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoApproveSeconds:s})}).catch(()=>{})});R(this,"_isInternalDrag",s=>s.dataTransfer.types.includes("text/x-preset-reorder"));R(this,"_onDragOver",s=>{if(s.preventDefault(),this._isInternalDrag(s))return;if(s.target.closest&&s.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});R(this,"_onDragLeave",s=>{const i=this._layoutRef.current;i&&!i.contains(s.relatedTarget)&&this.setState({isDragging:!1})});R(this,"_onDrop",s=>{if(s.preventDefault(),this._isInternalDrag(s))return;this.setState({isDragging:!1});const i=Array.from(s.dataTransfer.files);if(!i.length)return;const o=this.state.mobileTerminalVisible;Promise.all(i.map(d=>dt(d).then(n=>({name:d.name,path:n})).catch(n=>(mt.error(`${d.name}: ${n.message}`),null)))).then(d=>{const n=d.filter(Boolean);n.length&&(o?this.setState(m=>({terminalPendingImages:[...m.terminalPendingImages,...n.map(f=>({path:f.path,source:"drop"}))]})):this.setState(m=>({pendingUploadPaths:[...m.pendingUploadPaths||[],...n.map(f=>`"${f.path}"`)]})))})});R(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});R(this,"_handleTerminalFilePath",s=>{this.setState(i=>({terminalPendingImages:[...i.terminalPendingImages,{path:s,source:"terminal"}]}))});R(this,"_handleRemoveTerminalImage",s=>{this.setState(i=>({terminalPendingImages:i.terminalPendingImages.filter((o,d)=>d!==s)}))});R(this,"_handleClearTerminalImages",()=>{this.setState({terminalPendingImages:[]})});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,globalPermission:null,globalPlanApproval:null,autoApproveSeconds:0,hasGit:!0,terminalPendingImages:[]})}componentDidMount(){super.componentDidMount(),fetch(U("/api/git-repos")).then(s=>s.ok?s.json():Promise.reject()).then(s=>{var i;(i=s.repos)!=null&&i.length||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>{fetch(U("/api/git-status")).then(s=>{s.ok||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>this.setState({hasGit:!1,mobileGitDiffVisible:!1}))}),Ge&&!Ze&&window.visualViewport&&(this._onVisualViewportChange=()=>{const s=this._layoutRef.current;if(!s)return;const i=window.visualViewport;s.style.position="fixed",s.style.top=`${i.offsetTop}px`,s.style.height=`${i.height}px`,s.style.width="100%",s.style.left="0"},window.visualViewport.addEventListener("resize",this._onVisualViewportChange),window.visualViewport.addEventListener("scroll",this._onVisualViewportChange),this._onVisualViewportChange())}componentWillUnmount(){this._onVisualViewportChange&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",this._onVisualViewportChange),window.visualViewport.removeEventListener("scroll",this._onVisualViewportChange)),super.componentWillUnmount()}static parseSegments(s){const i=[],o=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let d=0,n;for(;(n=o.exec(s))!==null;){const f=s.slice(d,n.index).trim();f&&i.push({type:"text",content:f});const l=n[1];if(d=n.index+n[0].length,K.COMMAND_TAGS.has(l))continue;const p=new RegExp(`^<${l}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${l}>$`),h=n[0].match(p),S=h?h[1].trim():n[0].trim();i.push({type:"system",content:S,label:l})}const m=s.slice(d).trim();return m&&i.push({type:"text",content:m}),i}static extractUserTexts(s){const i=[],o=[];let d=null;for(const n of s)if(n.role==="user"){if(typeof n.content=="string"){const m=n.content.trim();if(!m)continue;if(!rt(m)){if(/Implement the following plan:/i.test(m))continue;i.push(m),o.push(m)}}else if(Array.isArray(n.content)){const{commands:m,textBlocks:f}=ct(n.content);m.length>0&&(d=m[m.length-1]);const l=[];for(const h of f)/Implement the following plan:/i.test((h.text||"").trim())||l.push(h.text.trim());const p=n.content.filter(h=>{var S;return h.type==="text"&&((S=h.text)==null?void 0:S.trim())}).map(h=>h.text.trim());l.length>0&&(i.push(l.join(`
|
|
9
|
+
`)),o.push(p.join(`
|
|
10
|
+
`)))}}return{userMsgs:i,fullTexts:o,slashCmd:d}}extractUserPrompts(s){var m;const i=[],o=new Set;let d=null;const n=s.filter(f=>ve(f));for(let f=0;f<n.length;f++){const l=n[f],p=((m=l.body)==null?void 0:m.messages)||[],h=l.timestamp||"",{userMsgs:S,fullTexts:y,slashCmd:N}=K.extractUserTexts(p);N&&N!=="/compact"&&N!==d&&i.push({type:"prompt",segments:[{type:"text",content:N}],timestamp:h}),d=N;for(let $=0;$<S.length;$++){const C=S[$];if(o.has(C))continue;o.add(C);const g=y[$]||C;i.push({type:"prompt",segments:K.parseSegments(g),timestamp:h})}}return i}renderOriginalPrompt(s){const i=s.segments.filter(o=>o.type==="text");return i.length===0?null:e.jsx("div",{className:c.mobilePromptCard,children:i.map((o,d)=>e.jsx("pre",{className:c.mobilePromptPreText,children:o.content},d))})}render(){var f;const{filteredRequests:s,fileLoading:i,fileLoadingCount:o,mainAgentSessions:d}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const n=!!this._isLocalLog;let m=null;for(let l=s.length-1;l>=0;l--)if(ve(s[l])&&((f=s[l].body)!=null&&f.model)){m=s[l].body.model;break}return e.jsxs("div",{className:c.mobileCLIRoot,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[this.state.isDragging&&e.jsx("div",{className:c.dragOverlay,children:e.jsxs("div",{className:c.dragOverlayContent,children:[e.jsx(ht,{className:c.dragIcon}),e.jsx("p",{children:u("ui.dragDropHint")})]})}),e.jsxs("div",{className:c.mobileCLIHeader,children:[e.jsxs("div",{className:c.mobileCLIHeaderLeft,children:[e.jsx("button",{className:c.mobileMenuBtn,onClick:()=>this.setState(l=>({mobileMenuVisible:!l.mobileMenuVisible})),"aria-label":u("ui.mobileMenu"),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:"3",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e.jsx(Re,{status:"processing",color:"green"}),e.jsx("span",{className:c.mobileCLIStatusLabel,children:n?u("ui.historyLog",{file:this._localLogFile}):u("ui.liveMonitoring")+(this.state.projectName?`: ${this.state.projectName}`:"")})]}),e.jsxs("div",{className:c.mobileCLIHeaderRight,children:[n?e.jsx(W,{type:"text",size:"small",icon:e.jsx(Bt,{}),onClick:()=>history.back(),className:c.mobileNavBtn,children:u("ui.mobileGoBack")}):this.state.hasGit?e.jsx(W,{type:"text",size:"small",icon:e.jsx(ut,{}),onClick:()=>this.setState(l=>({mobileGitDiffVisible:!l.mobileGitDiffVisible,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileGitDiffVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileGitDiffVisible?u("ui.mobileGitDiffExit"):u("ui.mobileGitDiffBrowse")}):null,!n&&e.jsx(W,{type:"text",size:"small",icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"4 17 10 11 4 5"}),e.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),onClick:()=>this.setState(l=>({mobileTerminalVisible:!l.mobileTerminalVisible,mobileGitDiffVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileTerminalVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileTerminalVisible?u("ui.mobileTerminalExit"):u("ui.mobileTerminalBrowse")})]}),this.state.mobileMenuVisible&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:c.mobileMenuOverlay,onClick:()=>this.setState({mobileMenuVisible:!1})}),e.jsxs("div",{className:c.mobileMenuDropdown,children:[e.jsxs("button",{className:c.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileLogMgmtVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1}),this.handleImportLocalLogs()},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",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"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),u("ui.logManagement")]}),e.jsxs("button",{className:c.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileStatsVisible:!0,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]}),u("ui.tokenStats")]}),e.jsxs("button",{className:c.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileSettingsVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobilePromptVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),u("ui.settings")]}),e.jsxs("button",{className:c.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobilePromptVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",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"}),e.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"12",x2:"9",y2:"15"}),e.jsx("line",{x1:"12",y1:"12",x2:"15",y2:"15"})]}),u("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:c.mobileCLIBody,children:[!n&&e.jsxs(e.Fragment,{children:[i&&e.jsxs("div",{className:c.mobileLoadingOverlay,children:[e.jsx("div",{className:c.mobileLoadingSpinner}),e.jsxs("div",{className:c.mobileLoadingLabel,children:[u("ui.loadingChat"),o>0?` (${o})`:""]})]}),e.jsx(Ne,{theme:this.themeConfig,children:e.jsx("div",{className:c.mobileChatInner,children:e.jsx(gt,{requests:s,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:!1,mobileChatVisible:!0,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:l=>this.loadSession(l),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval,pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed})})})]}),!n&&e.jsx("div",{className:`${c.mobileChatOverlay} ${this.state.mobileTerminalVisible?c.mobileChatOverlayVisible:""}`,children:e.jsx(bt,{modelName:m,onFilePath:this._handleTerminalFilePath,pendingImages:this.state.terminalPendingImages,onRemovePendingImage:this._handleRemoveTerminalImage,onClearPendingImages:this._handleClearTerminalImages})}),e.jsx("div",{className:`${c.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?c.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:c.mobileGitDiffInner,children:e.jsx(_s,{visible:this.state.mobileGitDiffVisible})})}),e.jsx("div",{className:`${c.mobileStatsOverlay} ${this.state.mobileStatsVisible?c.mobileStatsOverlayVisible:""}`,children:e.jsx("div",{className:c.mobileStatsInner,children:e.jsx(Es,{requests:s,visible:this.state.mobileStatsVisible,onClose:()=>this.setState({mobileStatsVisible:!1})})})}),e.jsxs("div",{className:`${c.mobileLogMgmtOverlay} ${this.state.mobileLogMgmtVisible?c.mobileLogMgmtOverlayVisible:""}`,children:[e.jsxs("div",{className:c.mobileLogMgmtHeader,children:[e.jsxs("span",{className:c.mobileLogMgmtTitle,children:[e.jsx(xt,{apiEndpoint:U("/api/open-log-dir"),title:u("ui.openLogDir"),size:14}),u("ui.importLocalLogs")]}),e.jsx("button",{className:c.mobileLogMgmtClose,onClick:()=>this.setState({mobileLogMgmtVisible:!1,selectedLogs:new Set}),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.mobileLogMgmtActions,children:[e.jsx(W,{size:"small",type:this.state.selectedLogs.size>=2?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:this.state.selectedLogs.size<2?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:void 0,children:u("ui.mergeLogs")}),e.jsx(W,{size:"small",icon:e.jsx(pt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,style:this.state.selectedLogs.size===0?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:{color:"var(--color-error-light)",borderColor:"var(--color-error-light)"},children:u("ui.deleteLogs")}),e.jsx(W,{size:"small",icon:e.jsx(ft,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:u("ui.refreshStats")})]}),e.jsx("div",{className:c.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:c.spinCenter,children:e.jsx(jt,{})}):(()=>{const l=this.state.localLogs[this.state.currentProject];return!l||l.length===0?e.jsx("div",{className:c.emptyCenter,children:u("ui.noLogs")}):e.jsx(Ne,{theme:this.themeConfig,children:e.jsx("div",{className:c.logListContainer,children:this.renderLogTable(l,!0)})})})()})]}),e.jsxs("div",{className:`${c.mobileSettingsOverlay} ${this.state.mobileSettingsVisible?c.mobileSettingsOverlayVisible:""}`,children:[e.jsxs("div",{className:c.mobileLogMgmtHeader,children:[e.jsx("span",{className:c.mobileLogMgmtTitle,children:u("ui.settings")}),e.jsx("button",{className:c.mobileLogMgmtClose,onClick:()=>this.setState({mobileSettingsVisible:!1}),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.mobileSettingsBody,children:[e.jsx("div",{className:c.mobileSettingsSectionTitle,children:u("ui.chatDisplaySwitches")}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:u("ui.collapseToolResults")}),e.jsx(he,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:u("ui.expandThinking")}),e.jsx(he,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:u("ui.showFullToolContent")}),e.jsx(he,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),e.jsx("div",{className:c.mobileSettingsSectionTitle,children:u("ui.themeColor")}),e.jsx("div",{className:c.mobileSettingsRow,children:e.jsx(Se,{size:"small",value:this.state.themeColor||"dark",onChange:this.handleThemeColorChange,options:[{label:u("ui.themeColor.dark"),value:"dark"},{label:u("ui.themeColor.light"),value:"light"}],style:{width:140}})}),e.jsx("div",{className:c.mobileSettingsSectionTitle,children:u("ui.permission.autoApprove.setting")}),e.jsx("div",{className:c.mobileSettingsRow,children:e.jsx(Se,{size:"small",value:this.state.autoApproveSeconds||0,onChange:this.handleAutoApproveChange,options:[{label:u("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20},{label:"30s",value:30},{label:"60s",value:60}],style:{width:100}})})]})]}),e.jsxs("div",{className:`${c.mobilePromptOverlay} ${this.state.mobilePromptVisible?c.mobilePromptOverlayVisible:""}`,children:[e.jsxs("div",{className:c.mobileLogMgmtHeader,children:[e.jsx("span",{className:c.mobileLogMgmtTitle,children:u("ui.userPrompt")}),e.jsx("button",{className:c.mobileLogMgmtClose,onClick:()=>this.setState({mobilePromptVisible:!1}),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.jsx("div",{className:c.mobilePromptBody,children:(()=>{const l=this.extractUserPrompts(s);return l.length===0?e.jsx("div",{className:c.mobilePromptEmpty,children:u("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:c.mobilePromptHeader,children:[e.jsxs("span",{className:c.mobilePromptCount,children:[l.length," ",u("ui.promptCountUnit")]}),e.jsx(W,{size:"small",icon:e.jsx(vt,{}),onClick:()=>this.handleExportPromptsTxt(l),children:u("ui.exportPromptsTxt")})]}),e.jsx("div",{className:c.mobilePromptList,children:l.map((p,h)=>e.jsxs("div",{className:c.mobilePromptItem,children:[p.timestamp&&e.jsx("div",{className:c.mobilePromptTimestamp,children:new Date(p.timestamp).toLocaleString()}),this.renderOriginalPrompt(p)]},h))})]})})()})]})]}),this.state.globalPermission&&e.jsx(ye,{toolName:this.state.globalPermission.permission.toolName,toolInput:this.state.globalPermission.permission.input,requestId:this.state.globalPermission.permission.id,onAllow:this.state.globalPermission.handlers.allow,onAllowSession:this.state.globalPermission.handlers.allowSession,onDeny:this.state.globalPermission.handlers.deny,visible:!0,global:!0,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,modelName:this.state.globalPermission.modelName}),this.state.globalPlanApproval&&e.jsx(ye,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:l=>this.state.globalPlanApproval.handlers.reject(l,""),visible:!0,global:!0})]})}};R(K,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Te=K;export{Te as default};
|
|
@@ -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-
|
|
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-Q9xea37m.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-Q9xea37m.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};
|