cc-viewer 1.6.111 → 1.6.113
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-BmoKS8L0.css +1 -0
- package/dist/assets/App-CR528DXO.js +39 -0
- package/dist/assets/AppHeader-FUNo9dWq.css +41 -0
- package/dist/assets/{AppHeader.module-zbtZZg51.js → AppHeader.module-BqQkBOwo.js} +166 -166
- package/dist/assets/{Mobile-vD3XwHn_.js → Mobile-BUJRDFat.js} +6 -6
- package/dist/assets/Mobile-DIWEZO_b.css +1 -0
- package/dist/assets/{_basePickBy-kHRKW_ia.js → _basePickBy-BcgG4dyW.js} +1 -1
- package/dist/assets/{_baseUniq-CZtpLTjY.js → _baseUniq-CEs2oCRB.js} +1 -1
- package/dist/assets/{arc-B1sIzp3S.js → arc-RVKTVLT_.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-C322Gfsu.js → architectureDiagram-2XIMDMQ5-CQ8yREZm.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-Bf6NBSvo.js → blockDiagram-WCTKOSBZ-kW5nxu9S.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-BHPd3tVB.js → c4Diagram-IC4MRINW-DuoWNXf4.js} +1 -1
- package/dist/assets/channel-DAabzuUb.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CerUDwW9.js → chunk-4BX2VUAB-Y5JDDmx9.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-C_9tp0lP.js → chunk-55IACEB6-CyA8VUBD.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Dh0v7Dxj.js → chunk-FMBD7UC4-9EzbmBfR.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-DO60GDxy.js → chunk-JSJVCQXG-CEYOQEEq.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-BzZ56j6D.js → chunk-KX2RTZJC-BFBgKma_.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-Z1YbcTY6.js → chunk-NQ4KR5QH-CRQkYUr2.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CuBk1Chi.js → chunk-QZHKN3VN-B5OrLH5q.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-DpZj3kMS.js → chunk-WL4C6EOR-BNVIXyVJ.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-B9iOFUv5.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-B9iOFUv5.js +1 -0
- package/dist/assets/clone-D7O9lu2c.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CFmF5iEE.js → cose-bilkent-S5V4N54A-Bw_hIlQh.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-DTMLnAFi.js → dagre-KLK3FWXG-BEVcrFbJ.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-nUXdkNON.js → diagram-E7M64L7V-geOh8xLP.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-DuwmQxkJ.js → diagram-IFDJBPK2-D_UJkQwp.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-CG__K8qV.js → diagram-P4PSJMXO-D6fJnuqo.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-CTT7WKZ8.js → erDiagram-INFDFZHY-BRBIIIG3.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-Cs-kRY6i.js → flowDiagram-PKNHOUZH-N1595vOT.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-DMd_slG-.js → ganttDiagram-A5KZAMGK-CypTNGn_.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-DrgXJtpQ.js → gitGraphDiagram-K3NZZRJ6-W089Z4eN.js} +1 -1
- package/dist/assets/{graph-BRAHQB6t.js → graph-C2swi0En.js} +1 -1
- package/dist/assets/{index-eZLBpS5Q.js → index-Bsr4EPez.js} +2 -2
- package/dist/assets/index-D85Mqmwa.css +1 -0
- package/dist/assets/{infoDiagram-LFFYTUFH-CFuv5yL0.js → infoDiagram-LFFYTUFH-BZQNBX7Q.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-B4nlxSVF.js → ishikawaDiagram-PHBUUO56-DUWkPJz_.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-B4pk2wie.js → journeyDiagram-4ABVD52K-DSg5fDdX.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-lFn5zeL3.js → kanban-definition-K7BYSVSG-CX62t5PG.js} +1 -1
- package/dist/assets/{layout-DppdPVXQ.js → layout-DCARvKN5.js} +1 -1
- package/dist/assets/{linear-BxkbV0Jk.js → linear-B3JJRt1L.js} +1 -1
- package/dist/assets/{mermaid.core-WhunGzrd.js → mermaid.core-Tmv8ZzzJ.js} +4 -4
- package/dist/assets/{mindmap-definition-YRQLILUH-BLJGmIPC.js → mindmap-definition-YRQLILUH-DEtRP_RV.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-B6TM75Du.js → pieDiagram-SKSYHLDU-DPc_B3Hk.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ--6JA_Hju.js → quadrantDiagram-337W2JSQ-B4PdXPi6.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-RcCPgwi-.js → requirementDiagram-Z7DCOOCP-AvSvl4Ys.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-Cn6DKEha.js → sankeyDiagram-WA2Y5GQK-BO04KLhm.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-CRtLUamR.js → sequenceDiagram-2WXFIKYE-f9sbc48K.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-B6l0pc1i.js → stateDiagram-RAJIS63D-Dbv-rShV.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-CKVUCjtl.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-DLqW0db0.js → timeline-definition-YZTLITO2-kNLV_mtp.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-BoikHBag.js → treemap-KZPCXAKY-Bdi8hX33.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-DpFQZm50.js → vennDiagram-LZ73GAT5-BYfoBeem.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-CE9xVvV3.js → xychartDiagram-JWTSCODW-snuBm0IP.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/App-CIrOLEUO.css +0 -1
- package/dist/assets/App-DKJ0luSs.js +0 -39
- package/dist/assets/AppHeader--7uK2lHm.css +0 -41
- package/dist/assets/Mobile-Dwt-3xln.css +0 -1
- package/dist/assets/channel-B46M3p6L.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-BXztp_Io.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-BXztp_Io.js +0 -1
- package/dist/assets/clone-CGtxvVK5.js +0 -1
- package/dist/assets/index-BvpDoPlI.css +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-Bchc-2CX.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var ze=Object.defineProperty;var De=(t,i,o)=>i in t?ze(t,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[i]=o;var J=(t,i,o)=>De(t,typeof i!="symbol"?i+"":i,o);import{r as g,j as e,i as Fe}from"./index-eZLBpS5Q.js";import{g as Se,m as He,a as we,r as Te,K as q,u as E,C as ue,i as _e,c as M,b as $e,d as We,I as Ue,_ as Ge,e as he,t as h,F as Ze,f as qe,h as Xe,j as Ke,k as Ye,l as Je,s as a,n as ie,o as G,A as Qe,q as et,v as tt,w as st,x as c,B as A,R as it,y as je,z as lt,T as ot,O as nt,D as at,E as rt,S as ct,G as me,H as dt,J as mt,L as ve}from"./AppHeader.module-zbtZZg51.js";const ht=new q("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),ut=new q("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),bt=new q("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),gt=new q("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),ft=new q("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),xt=new q("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),pt=t=>{const{componentCls:i,iconCls:o,antCls:s,badgeShadowSize:l,textFontSize:d,textFontSizeSM:r,statusSize:n,dotSize:x,textFontWeight:p,indicatorHeight:f,indicatorHeightSM:m,marginXS:v,calc:w}=t,N=`${s}-scroll-number`,S=we(t,(j,{darkColor:u})=>({[`&${i} ${i}-color-${j}`]:{background:u,[`&:not(${i}-count)`]:{color:u},"a:hover &":{background:u}}}));return{[i]:Object.assign(Object.assign(Object.assign(Object.assign({},Te(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${i}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:f,height:f,color:t.badgeTextColor,fontWeight:p,fontSize:d,lineHeight:E(f),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:w(f).div(2).equal(),boxShadow:`0 0 0 ${E(l)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${i}-count-sm`]:{minWidth:m,height:m,fontSize:r,lineHeight:E(m),borderRadius:w(m).div(2).equal()},[`${i}-multiple-words`]:{padding:`0 ${E(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${i}-dot`]:{zIndex:t.indicatorZIndex,width:x,minWidth:x,height:x,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${E(l)} ${t.badgeShadowColor}`},[`${i}-count, ${i}-dot, ${N}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${o}-spin`]:{animationName:xt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${i}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${i}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:n,height:n,verticalAlign:"middle",borderRadius:"50%"},[`${i}-status-success`]:{backgroundColor:t.colorSuccess},[`${i}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:l,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:ht,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${i}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${i}-status-error`]:{backgroundColor:t.colorError},[`${i}-status-warning`]:{backgroundColor:t.colorWarning},[`${i}-status-text`]:{marginInlineStart:v,color:t.colorText,fontSize:t.fontSize}}}),S),{[`${i}-zoom-appear, ${i}-zoom-enter`]:{animationName:ut,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${i}-zoom-leave`]:{animationName:bt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${i}-not-a-wrapper`]:{[`${i}-zoom-appear, ${i}-zoom-enter`]:{animationName:gt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${i}-zoom-leave`]:{animationName:ft,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${i}-status)`]:{verticalAlign:"middle"},[`${N}-custom-component, ${i}-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:f,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${N}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${N}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${i}-count, ${i}-dot, ${N}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Le=t=>{const{fontHeight:i,lineWidth:o,marginXS:s,colorBorderBg:l}=t,d=i,r=o,n=t.colorTextLightSolid,x=t.colorError,p=t.colorErrorHover;return He(t,{badgeFontHeight:d,badgeShadowSize:r,badgeTextColor:n,badgeColor:x,badgeColorHover:p,badgeShadowColor:l,badgeProcessingDuration:"1.2s",badgeRibbonOffset:s,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Ve=t=>{const{fontSize:i,lineHeight:o,fontSizeSM:s,lineWidth:l}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(i*o)-2*l,indicatorHeightSM:i,dotSize:s/2,textFontSize:s,textFontSizeSM:s,textFontWeight:"normal",statusSize:s/2}},jt=Se("Badge",t=>{const i=Le(t);return pt(i)},Ve),vt=t=>{const{antCls:i,badgeFontHeight:o,marginXS:s,badgeRibbonOffset:l,calc:d}=t,r=`${i}-ribbon`,n=`${i}-ribbon-wrapper`,x=we(t,(p,{darkColor:f})=>({[`&${r}-color-${p}`]:{background:f,color:f}}));return{[n]:{position:"relative"},[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Te(t)),{position:"absolute",top:s,padding:`0 ${E(t.paddingXS)}`,color:t.colorPrimary,lineHeight:E(o),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${r}-text`]:{color:t.badgeTextColor},[`${r}-corner`]:{position:"absolute",top:"100%",width:l,height:l,color:"currentcolor",border:`${E(d(l).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),x),{[`&${r}-placement-end`]:{insetInlineEnd:d(l).mul(-1).equal(),borderEndEndRadius:0,[`${r}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${r}-placement-start`]:{insetInlineStart:d(l).mul(-1).equal(),borderEndStartRadius:0,[`${r}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Nt=Se(["Badge","Ribbon"],t=>{const i=Le(t);return vt(i)},Ve),yt=t=>{const{className:i,prefixCls:o,style:s,color:l,children:d,text:r,placement:n="end",rootClassName:x}=t,{getPrefixCls:p,direction:f}=g.useContext(ue),m=p("ribbon",o),v=`${m}-wrapper`,[w,N,S]=Nt(m,v),j=_e(l,!1),u=M(m,`${m}-placement-${n}`,{[`${m}-rtl`]:f==="rtl",[`${m}-color-${l}`]:j},i),b={},L={};return l&&!j&&(b.background=l,L.color=l),w(g.createElement("div",{className:M(v,x,N,S)},d,g.createElement("div",{className:M(u,N),style:Object.assign(Object.assign({},b),s)},g.createElement("span",{className:`${m}-text`},r),g.createElement("div",{className:`${m}-corner`,style:L}))))},Ne=t=>{const{prefixCls:i,value:o,current:s,offset:l=0}=t;let d;return l&&(d={position:"absolute",top:`${l}00%`,left:0}),g.createElement("span",{style:d,className:M(`${i}-only-unit`,{current:s})},o)};function Ct(t,i,o){let s=t,l=0;for(;(s+10)%10!==i;)s+=o,l+=o;return l}const St=t=>{const{prefixCls:i,count:o,value:s}=t,l=Number(s),d=Math.abs(o),[r,n]=g.useState(l),[x,p]=g.useState(d),f=()=>{n(l),p(d)};g.useEffect(()=>{const w=setTimeout(f,1e3);return()=>clearTimeout(w)},[l]);let m,v;if(r===l||Number.isNaN(l)||Number.isNaN(r))m=[g.createElement(Ne,Object.assign({},t,{key:l,current:!0}))],v={transition:"none"};else{m=[];const w=l+10,N=[];for(let b=l;b<=w;b+=1)N.push(b);const S=x<d?1:-1,j=N.findIndex(b=>b%10===r);m=(S<0?N.slice(0,j+1):N.slice(j)).map((b,L)=>{const R=b%10;return g.createElement(Ne,Object.assign({},t,{key:b,value:R,offset:S<0?L-j:L,current:L===j}))}),v={transform:`translateY(${-Ct(r,l,S)}00%)`}}return g.createElement("span",{className:`${i}-only`,style:v,onTransitionEnd:f},m)};var wt=function(t,i){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(o[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(t);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(t,s[l])&&(o[s[l]]=t[s[l]]);return o};const Tt=g.forwardRef((t,i)=>{const{prefixCls:o,count:s,className:l,motionClassName:d,style:r,title:n,show:x,component:p="sup",children:f}=t,m=wt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:v}=g.useContext(ue),w=v("scroll-number",o),N=Object.assign(Object.assign({},m),{"data-show":x,style:r,className:M(w,l,d),title:n});let S=s;if(s&&Number(s)%1===0){const j=String(s).split("");S=g.createElement("bdi",null,j.map((u,b)=>g.createElement(St,{prefixCls:w,count:Number(s),value:u,key:j.length-b})))}return r!=null&&r.borderColor&&(N.style=Object.assign(Object.assign({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`})),f?$e(f,j=>({className:M(`${w}-custom-component`,j==null?void 0:j.className,d)})):g.createElement(p,Object.assign({},N,{ref:i}),S)});var _t=function(t,i){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(o[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(t);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(t,s[l])&&(o[s[l]]=t[s[l]]);return o};const $t=g.forwardRef((t,i)=>{var o,s,l,d,r;const{prefixCls:n,scrollNumberPrefixCls:x,children:p,status:f,text:m,color:v,count:w=null,overflowCount:N=99,dot:S=!1,size:j="default",title:u,offset:b,style:L,className:R,rootClassName:z,classNames:P,styles:O,showZero:D=!1}=t,X=_t(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:F,direction:B,badge:y}=g.useContext(ue),T=F("badge",n),[K,Q,le]=jt(T),_=w>N?`${N}+`:w,$=_==="0"||_===0||m==="0"||m===0,I=w===null||$&&!D,oe=(f!=null||v!=null)&&I,ke=f!=null||!$,Y=S&&!$,H=Y?"":_,W=g.useMemo(()=>((H==null||H==="")&&(m==null||m==="")||$&&!D)&&!Y,[H,$,D,Y,m]),be=g.useRef(w);W||(be.current=w);const U=be.current,ge=g.useRef(H);W||(ge.current=H);const ne=ge.current,fe=g.useRef(Y);W||(fe.current=Y);const ee=g.useMemo(()=>{if(!b)return Object.assign(Object.assign({},y==null?void 0:y.style),L);const k={marginTop:b[1]};return B==="rtl"?k.left=Number.parseInt(b[0],10):k.right=-Number.parseInt(b[0],10),Object.assign(Object.assign(Object.assign({},k),y==null?void 0:y.style),L)},[B,b,L,y==null?void 0:y.style]),Me=u??(typeof U=="string"||typeof U=="number"?U:void 0),xe=!W&&(m===0?D:!!m&&m!==!0),Re=xe?g.createElement("span",{className:`${T}-status-text`},m):null,Ie=!U||typeof U!="object"?void 0:$e(U,k=>({style:Object.assign(Object.assign({},ee),k.style)})),te=_e(v,!1),Ee=M(P==null?void 0:P.indicator,(o=y==null?void 0:y.classNames)===null||o===void 0?void 0:o.indicator,{[`${T}-status-dot`]:oe,[`${T}-status-${f}`]:!!f,[`${T}-color-${v}`]:te}),ae={};v&&!te&&(ae.color=v,ae.background=v);const pe=M(T,{[`${T}-status`]:oe,[`${T}-not-a-wrapper`]:!p,[`${T}-rtl`]:B==="rtl"},R,z,y==null?void 0:y.className,(s=y==null?void 0:y.classNames)===null||s===void 0?void 0:s.root,P==null?void 0:P.root,Q,le);if(!p&&oe&&(m||ke||!I)){const k=ee.color;return K(g.createElement("span",Object.assign({},X,{className:pe,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.root),(l=y==null?void 0:y.styles)===null||l===void 0?void 0:l.root),ee)}),g.createElement("span",{className:Ee,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(d=y==null?void 0:y.styles)===null||d===void 0?void 0:d.indicator),ae)}),xe&&g.createElement("span",{style:{color:k},className:`${T}-status-text`},m)))}return K(g.createElement("span",Object.assign({ref:i},X,{className:pe,style:Object.assign(Object.assign({},(r=y==null?void 0:y.styles)===null||r===void 0?void 0:r.root),O==null?void 0:O.root)}),p,g.createElement(We,{visible:!W,motionName:`${T}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:k})=>{var re,ce;const Be=F("scroll-number",x),de=fe.current,Ae=M(P==null?void 0:P.indicator,(re=y==null?void 0:y.classNames)===null||re===void 0?void 0:re.indicator,{[`${T}-dot`]:de,[`${T}-count`]:!de,[`${T}-count-sm`]:j==="small",[`${T}-multiple-words`]:!de&&ne&&ne.toString().length>1,[`${T}-status-${f}`]:!!f,[`${T}-color-${v}`]:te});let se=Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(ce=y==null?void 0:y.styles)===null||ce===void 0?void 0:ce.indicator),ee);return v&&!te&&(se=se||{},se.background=v),g.createElement(Tt,{prefixCls:Be,show:!W,motionClassName:k,className:Ae,count:ne,title:Me,style:se,key:"scrollNumber"},Ie)}),Re))}),Pe=$t;Pe.Ribbon=yt;var Lt={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(i,o){return g.createElement(Ue,Ge({},i,{ref:o,icon:Lt}))},Pt=g.forwardRef(Vt);const Ot="_container_md63t_1",kt="_fileListSection_md63t_10",Mt="_header_md63t_19",Rt="_headerTitle_md63t_28",It="_fileCount_md63t_36",Et="_changesContainer_md63t_44",Bt="_changeItem_md63t_51",At="_changeItemActive_md63t_68",zt="_dirItem_md63t_77",Dt="_dirArrow_md63t_88",Ft="_dirName_md63t_97",Ht="_status_md63t_102",Wt="_icon_md63t_111",Ut="_fileName_md63t_120",Gt="_diffSection_md63t_127",Zt="_diffHeader_md63t_135",qt="_diffFilePath_md63t_145",Xt="_diffBadge_md63t_155",Kt="_diffContent_md63t_167",Yt="_diffPlaceholder_md63t_173",Jt="_statusText_md63t_184",Qt="_errorText_md63t_191",es="_emptyText_md63t_198",ts="_warningText_md63t_205",ss="_fileSizeNote_md63t_217",is="_statusTextItalic_md63t_222",ls="_rotated90_md63t_226",C={container:Ot,fileListSection:kt,header:Mt,headerTitle:Rt,fileCount:It,changesContainer:Et,changeItem:Bt,changeItemActive:At,dirItem:zt,dirArrow:Dt,dirName:Ft,status:Ht,icon:Wt,fileName:Ut,diffSection:Gt,diffHeader:Zt,diffFilePath:qt,diffBadge:Xt,diffContent:Kt,diffPlaceholder:Yt,statusText:Jt,errorText:Qt,emptyText:es,warningText:ts,fileSizeNote:ss,statusTextItalic:is,rotated90:ls},os={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},ns={"??":"U"},as={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 rs(t){const i=t.includes(".")?t.split(".").pop().toLowerCase():"",o=as[i]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:o,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 cs(){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 ds(t){const i={dirs:{},files:[]};for(const o of t){const s=o.file.split("/");let l=i;for(let d=0;d<s.length-1;d++)l.dirs[s[d]]||(l.dirs[s[d]]={dirs:{},files:[]}),l=l.dirs[s[d]];l.files.push({name:s[s.length-1],status:o.status,fullPath:o.file})}return i}function Oe({name:t,node:i,depth:o,selectedFile:s,onFileClick:l}){const d=Object.keys(i.dirs).sort(),r=[...i.files].sort((n,x)=>n.name.localeCompare(x.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:C.dirItem,style:{paddingLeft:8+o*16},children:[e.jsx("span",{className:C.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:C.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:C.icon,children:cs()}),e.jsx("span",{className:C.dirName,children:t})]}),d.map(n=>e.jsx(Oe,{name:n,node:i.dirs[n],depth:t?o+1:o,selectedFile:s,onFileClick:l},n)),r.map(n=>e.jsxs("div",{className:`${C.changeItem} ${s===n.fullPath?C.changeItemActive:""}`,style:{paddingLeft:8+(t?o+1:o)*16},onClick:()=>l&&l(n.fullPath),children:[e.jsx("span",{className:C.icon,children:rs(n.name)}),e.jsx("span",{className:C.fileName,children:n.name}),e.jsx("span",{className:C.status,style:{color:os[n.status]||"#888"},children:ns[n.status]||n.status})]},n.fullPath))]})}function ms({visible:t}){const[i,o]=g.useState(null),[s,l]=g.useState(null),[d,r]=g.useState(!0),[n,x]=g.useState(null),[p,f]=g.useState(null),[m,v]=g.useState(null),[w,N]=g.useState(!1),S=g.useRef(!0);return g.useEffect(()=>{if(S.current=!0,!!t)return r(!0),l(null),fetch(he("/api/git-status")).then(j=>j.ok?j.json():Promise.reject()).then(j=>{S.current&&(o(j.changes||[]),r(!1))}).catch(()=>{S.current&&(l("Failed to load git status"),r(!1))}),()=>{S.current=!1}},[t]),g.useEffect(()=>{if(!n){f(null),v(null);return}N(!0),f(null),v(null),fetch(he(`/api/git-diff?files=${encodeURIComponent(n)}`)).then(j=>{if(!j.ok)throw new Error(`HTTP ${j.status}`);return j.json()}).then(j=>{S.current&&(j.diffs&&j.diffs[0]?f(j.diffs[0]):v("No diff data available"),N(!1))}).catch(j=>{S.current&&(v(`${h("ui.fileLoadError")}: ${j.message}`),N(!1))})},[n]),e.jsxs("div",{className:C.container,children:[e.jsxs("div",{className:C.fileListSection,children:[e.jsxs("div",{className:C.header,children:[e.jsx("span",{className:C.headerTitle,children:h("ui.gitChanges")}),e.jsx("span",{className:C.fileCount,children:i?i.length:0})]}),e.jsxs("div",{className:C.changesContainer,children:[d&&e.jsx("div",{className:C.statusText,children:"Loading..."}),s&&e.jsx("div",{className:C.errorText,children:s}),!d&&!s&&i&&i.length===0&&e.jsx("div",{className:C.emptyText,children:"No changes"}),!d&&!s&&i&&i.length>0&&e.jsx(Oe,{name:"",node:ds(i),depth:0,selectedFile:n,onFileClick:x})]})]}),e.jsx("div",{className:C.diffSection,children:n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:C.diffHeader,children:[e.jsx("span",{className:C.diffFilePath,children:n}),e.jsx("span",{className:C.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:C.diffContent,children:[w&&e.jsx("div",{className:C.statusText,children:h("ui.loading")}),m&&e.jsx("div",{className:C.errorText,children:m}),!w&&!m&&p&&e.jsx(e.Fragment,{children:p.is_large?e.jsxs("div",{className:C.warningText,children:[e.jsx("p",{children:h("ui.largeFileWarning")}),e.jsxs("p",{className:C.fileSizeNote,children:[h("ui.fileSize"),": ",(p.size/(1024*1024)).toFixed(2)," MB"]})]}):p.is_binary?e.jsx("div",{className:`${C.statusText} ${C.statusTextItalic}`,children:h("ui.binaryFileNotice")}):e.jsx(Ze,{file_path:n,old_string:p.old_content,new_string:p.new_content})})]})]}):e.jsxs("div",{className:C.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:h("ui.mobileGitDiffHint")})]})})]})}const hs="_container_16ddt_1",us="_header_16ddt_9",bs="_headerTitle_16ddt_18",gs="_closeBtn_16ddt_24",fs="_content_16ddt_38",xs="_empty_16ddt_47",ps="_fixedTable_16ddt_54",js="_ellipsisCell_16ddt_58",vs="_thLeft_16ddt_65",Ns="_colWide_16ddt_69",ys="_colNarrow_16ddt_73",V={container:hs,header:us,headerTitle:bs,closeBtn:gs,content:fs,empty:xs,fixedTable:ps,ellipsisCell:js,thLeft:vs,colWide:Ns,colNarrow:ys},Cs=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],ye={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 Ss({requests:t=[],visible:i,onClose:o}){const{byModel:s,models:l,toolStats:d,skillStats:r,cacheStats:n,activeReasons:x,totalCount:p,totalCache:f,hasCacheStats:m,subAgentEntries:v,hasSubAgentStats:w,teammateEntries:N,hasTeammateStats:S,isEmpty:j}=g.useMemo(()=>{const u=qe(t),b=Object.keys(u),L=Xe(t),R=Ke(t),z=Ye(t),P=Cs.filter(_=>z[_].count>0),O=P.reduce((_,$)=>_+z[$].count,0),D=P.reduce((_,$)=>_+z[$].cacheCreate,0),X=P.length>0,F={},B={};for(let _=0;_<t.length;_++){const $=Je(t[_],t[_+1]);if($.type==="SubAgent"){const I=$.subType||"Other";F[I]=(F[I]||0)+1}else if($.type==="Teammate"){const I=$.subType||"Teammate";B[I]=(B[I]||0)+1}}const y=Object.entries(F).sort((_,$)=>$[1]-_[1]),T=y.length>0,K=Object.entries(B).sort((_,$)=>$[1]-_[1]),Q=K.length>0,le=b.length===0&&L.length===0&&!X&&!T&&!Q&&R.length===0;return{byModel:u,models:b,toolStats:L,skillStats:R,cacheStats:z,activeReasons:P,totalCount:O,totalCache:D,hasCacheStats:X,subAgentEntries:y,hasSubAgentStats:T,teammateEntries:K,hasTeammateStats:Q,isEmpty:le}},[t]);return i?e.jsxs("div",{className:V.container,children:[e.jsxs("div",{className:V.header,children:[e.jsx("span",{className:V.headerTitle,children:h("ui.tokenStats")}),e.jsx("button",{className:V.closeBtn,onClick:o,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:V.content,children:j?e.jsx("div",{className:V.empty,children:"—"}):e.jsxs(e.Fragment,{children:[r.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:h("ui.skillUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:"Skill"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[r.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:u}),e.jsx("td",{className:a.td,children:b})]},u)),r.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:r.reduce((u,b)=>u+b[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:h("ui.subAgentStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[u," ",e.jsx(ie,{doc:`SubAgent-${u}`})]}),e.jsx("td",{className:a.td,children:b})]},u)),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((u,b)=>u+b[1],0)})]})]})]})]}),S&&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} ${V.thLeft}`,children:"Name"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:u}),e.jsx("td",{className:a.td,children:b})]},u)),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((u,b)=>u+b[1],0)})]})]})]})]}),d.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:h("ui.toolUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:"Tool"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[d.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[u," ",e.jsx(ie,{doc:`Tool-${u}`})]}),e.jsx("td",{className:a.td,children:b})]},u)),d.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.reduce((u,b)=>u+b[1],0)})]})]})]})]}),m&&e.jsxs("div",{className:a.modelCard,children:[e.jsxs("div",{className:a.modelName,children:["MainAgent",e.jsx(ie,{doc:"MainAgent"})," ",h("ui.cacheRebuildStats"),e.jsx(ie,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${a.statsTable} ${V.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:V.colWide}),e.jsx("col",{className:V.colNarrow}),e.jsx("col",{className:V.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:h("ui.cacheRebuild.reason")}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[x.map(u=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:`${a.label} ${V.ellipsisCell}`,title:h(`ui.${ye[u]}`),children:h(`ui.${ye[u]}`)}),e.jsx("td",{className:a.td,children:n[u].count}),e.jsx("td",{className:a.td,children:G(n[u].cacheCreate)})]},u)),x.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:p}),e.jsx("td",{className:a.td,children:G(f)})]})]})]})]}),l.map(u=>{const b=s[u],L=b.input+b.cacheCreation+b.cacheRead,R=L>0?(b.cacheRead/L*100).toFixed(1):"0.0";return e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:u}),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:G(L)}),e.jsx("td",{className:a.td,children:G(b.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:G(b.cacheCreation)}),e.jsx("td",{className:a.td,children:G(b.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:h("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:a.td,children:[R,"%"]})]})]})})]},u)})]})})]}):null}const Z=class Z extends Qe{constructor(o){super(o);J(this,"handleExportPromptsTxt",o=>{if(!o||o.length===0)return;const s=[];for(const n of o){const x=[],p=n.timestamp?new Date(n.timestamp).toLocaleString():"";p&&x.push(`${p}:
|
|
2
|
-
`);const
|
|
3
|
-
`)),s.push(
|
|
1
|
+
var ze=Object.defineProperty;var De=(t,i,o)=>i in t?ze(t,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[i]=o;var J=(t,i,o)=>De(t,typeof i!="symbol"?i+"":i,o);import{r as g,j as e,i as Fe}from"./index-Bsr4EPez.js";import{g as Se,m as He,a as we,r as Te,K as q,u as E,C as ue,i as _e,c as M,b as $e,d as We,I as Ue,_ as Ge,e as he,t as h,F as Ze,f as qe,h as Xe,j as Ke,k as Ye,l as Je,s as a,n as ie,o as G,A as Qe,q as et,v as tt,w as st,x as c,B as A,R as it,y as je,z as lt,T as ot,O as nt,D as at,E as rt,S as ct,G as me,H as dt,J as mt,L as ve}from"./AppHeader.module-BqQkBOwo.js";const ht=new q("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),ut=new q("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),bt=new q("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),gt=new q("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),xt=new q("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),ft=new q("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),pt=t=>{const{componentCls:i,iconCls:o,antCls:s,badgeShadowSize:l,textFontSize:d,textFontSizeSM:r,statusSize:n,dotSize:f,textFontWeight:p,indicatorHeight:x,indicatorHeightSM:m,marginXS:v,calc:w}=t,N=`${s}-scroll-number`,S=we(t,(j,{darkColor:u})=>({[`&${i} ${i}-color-${j}`]:{background:u,[`&:not(${i}-count)`]:{color:u},"a:hover &":{background:u}}}));return{[i]:Object.assign(Object.assign(Object.assign(Object.assign({},Te(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${i}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:x,height:x,color:t.badgeTextColor,fontWeight:p,fontSize:d,lineHeight:E(x),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:w(x).div(2).equal(),boxShadow:`0 0 0 ${E(l)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${i}-count-sm`]:{minWidth:m,height:m,fontSize:r,lineHeight:E(m),borderRadius:w(m).div(2).equal()},[`${i}-multiple-words`]:{padding:`0 ${E(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${i}-dot`]:{zIndex:t.indicatorZIndex,width:f,minWidth:f,height:f,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${E(l)} ${t.badgeShadowColor}`},[`${i}-count, ${i}-dot, ${N}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${o}-spin`]:{animationName:ft,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${i}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${i}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:n,height:n,verticalAlign:"middle",borderRadius:"50%"},[`${i}-status-success`]:{backgroundColor:t.colorSuccess},[`${i}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:l,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:ht,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${i}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${i}-status-error`]:{backgroundColor:t.colorError},[`${i}-status-warning`]:{backgroundColor:t.colorWarning},[`${i}-status-text`]:{marginInlineStart:v,color:t.colorText,fontSize:t.fontSize}}}),S),{[`${i}-zoom-appear, ${i}-zoom-enter`]:{animationName:ut,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${i}-zoom-leave`]:{animationName:bt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${i}-not-a-wrapper`]:{[`${i}-zoom-appear, ${i}-zoom-enter`]:{animationName:gt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${i}-zoom-leave`]:{animationName:xt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${i}-status)`]:{verticalAlign:"middle"},[`${N}-custom-component, ${i}-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:x,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${N}-only-unit`]:{height:x,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${N}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${i}-count, ${i}-dot, ${N}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Le=t=>{const{fontHeight:i,lineWidth:o,marginXS:s,colorBorderBg:l}=t,d=i,r=o,n=t.colorTextLightSolid,f=t.colorError,p=t.colorErrorHover;return He(t,{badgeFontHeight:d,badgeShadowSize:r,badgeTextColor:n,badgeColor:f,badgeColorHover:p,badgeShadowColor:l,badgeProcessingDuration:"1.2s",badgeRibbonOffset:s,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Ve=t=>{const{fontSize:i,lineHeight:o,fontSizeSM:s,lineWidth:l}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(i*o)-2*l,indicatorHeightSM:i,dotSize:s/2,textFontSize:s,textFontSizeSM:s,textFontWeight:"normal",statusSize:s/2}},jt=Se("Badge",t=>{const i=Le(t);return pt(i)},Ve),vt=t=>{const{antCls:i,badgeFontHeight:o,marginXS:s,badgeRibbonOffset:l,calc:d}=t,r=`${i}-ribbon`,n=`${i}-ribbon-wrapper`,f=we(t,(p,{darkColor:x})=>({[`&${r}-color-${p}`]:{background:x,color:x}}));return{[n]:{position:"relative"},[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Te(t)),{position:"absolute",top:s,padding:`0 ${E(t.paddingXS)}`,color:t.colorPrimary,lineHeight:E(o),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${r}-text`]:{color:t.badgeTextColor},[`${r}-corner`]:{position:"absolute",top:"100%",width:l,height:l,color:"currentcolor",border:`${E(d(l).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),f),{[`&${r}-placement-end`]:{insetInlineEnd:d(l).mul(-1).equal(),borderEndEndRadius:0,[`${r}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${r}-placement-start`]:{insetInlineStart:d(l).mul(-1).equal(),borderEndStartRadius:0,[`${r}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Nt=Se(["Badge","Ribbon"],t=>{const i=Le(t);return vt(i)},Ve),yt=t=>{const{className:i,prefixCls:o,style:s,color:l,children:d,text:r,placement:n="end",rootClassName:f}=t,{getPrefixCls:p,direction:x}=g.useContext(ue),m=p("ribbon",o),v=`${m}-wrapper`,[w,N,S]=Nt(m,v),j=_e(l,!1),u=M(m,`${m}-placement-${n}`,{[`${m}-rtl`]:x==="rtl",[`${m}-color-${l}`]:j},i),b={},L={};return l&&!j&&(b.background=l,L.color=l),w(g.createElement("div",{className:M(v,f,N,S)},d,g.createElement("div",{className:M(u,N),style:Object.assign(Object.assign({},b),s)},g.createElement("span",{className:`${m}-text`},r),g.createElement("div",{className:`${m}-corner`,style:L}))))},Ne=t=>{const{prefixCls:i,value:o,current:s,offset:l=0}=t;let d;return l&&(d={position:"absolute",top:`${l}00%`,left:0}),g.createElement("span",{style:d,className:M(`${i}-only-unit`,{current:s})},o)};function Ct(t,i,o){let s=t,l=0;for(;(s+10)%10!==i;)s+=o,l+=o;return l}const St=t=>{const{prefixCls:i,count:o,value:s}=t,l=Number(s),d=Math.abs(o),[r,n]=g.useState(l),[f,p]=g.useState(d),x=()=>{n(l),p(d)};g.useEffect(()=>{const w=setTimeout(x,1e3);return()=>clearTimeout(w)},[l]);let m,v;if(r===l||Number.isNaN(l)||Number.isNaN(r))m=[g.createElement(Ne,Object.assign({},t,{key:l,current:!0}))],v={transition:"none"};else{m=[];const w=l+10,N=[];for(let b=l;b<=w;b+=1)N.push(b);const S=f<d?1:-1,j=N.findIndex(b=>b%10===r);m=(S<0?N.slice(0,j+1):N.slice(j)).map((b,L)=>{const R=b%10;return g.createElement(Ne,Object.assign({},t,{key:b,value:R,offset:S<0?L-j:L,current:L===j}))}),v={transform:`translateY(${-Ct(r,l,S)}00%)`}}return g.createElement("span",{className:`${i}-only`,style:v,onTransitionEnd:x},m)};var wt=function(t,i){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(o[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(t);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(t,s[l])&&(o[s[l]]=t[s[l]]);return o};const Tt=g.forwardRef((t,i)=>{const{prefixCls:o,count:s,className:l,motionClassName:d,style:r,title:n,show:f,component:p="sup",children:x}=t,m=wt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:v}=g.useContext(ue),w=v("scroll-number",o),N=Object.assign(Object.assign({},m),{"data-show":f,style:r,className:M(w,l,d),title:n});let S=s;if(s&&Number(s)%1===0){const j=String(s).split("");S=g.createElement("bdi",null,j.map((u,b)=>g.createElement(St,{prefixCls:w,count:Number(s),value:u,key:j.length-b})))}return r!=null&&r.borderColor&&(N.style=Object.assign(Object.assign({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`})),x?$e(x,j=>({className:M(`${w}-custom-component`,j==null?void 0:j.className,d)})):g.createElement(p,Object.assign({},N,{ref:i}),S)});var _t=function(t,i){var o={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(o[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(t);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(t,s[l])&&(o[s[l]]=t[s[l]]);return o};const $t=g.forwardRef((t,i)=>{var o,s,l,d,r;const{prefixCls:n,scrollNumberPrefixCls:f,children:p,status:x,text:m,color:v,count:w=null,overflowCount:N=99,dot:S=!1,size:j="default",title:u,offset:b,style:L,className:R,rootClassName:z,classNames:P,styles:O,showZero:D=!1}=t,X=_t(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:F,direction:B,badge:y}=g.useContext(ue),T=F("badge",n),[K,Q,le]=jt(T),_=w>N?`${N}+`:w,$=_==="0"||_===0||m==="0"||m===0,I=w===null||$&&!D,oe=(x!=null||v!=null)&&I,ke=x!=null||!$,Y=S&&!$,H=Y?"":_,W=g.useMemo(()=>((H==null||H==="")&&(m==null||m==="")||$&&!D)&&!Y,[H,$,D,Y,m]),be=g.useRef(w);W||(be.current=w);const U=be.current,ge=g.useRef(H);W||(ge.current=H);const ne=ge.current,xe=g.useRef(Y);W||(xe.current=Y);const ee=g.useMemo(()=>{if(!b)return Object.assign(Object.assign({},y==null?void 0:y.style),L);const k={marginTop:b[1]};return B==="rtl"?k.left=Number.parseInt(b[0],10):k.right=-Number.parseInt(b[0],10),Object.assign(Object.assign(Object.assign({},k),y==null?void 0:y.style),L)},[B,b,L,y==null?void 0:y.style]),Me=u??(typeof U=="string"||typeof U=="number"?U:void 0),fe=!W&&(m===0?D:!!m&&m!==!0),Re=fe?g.createElement("span",{className:`${T}-status-text`},m):null,Ie=!U||typeof U!="object"?void 0:$e(U,k=>({style:Object.assign(Object.assign({},ee),k.style)})),te=_e(v,!1),Ee=M(P==null?void 0:P.indicator,(o=y==null?void 0:y.classNames)===null||o===void 0?void 0:o.indicator,{[`${T}-status-dot`]:oe,[`${T}-status-${x}`]:!!x,[`${T}-color-${v}`]:te}),ae={};v&&!te&&(ae.color=v,ae.background=v);const pe=M(T,{[`${T}-status`]:oe,[`${T}-not-a-wrapper`]:!p,[`${T}-rtl`]:B==="rtl"},R,z,y==null?void 0:y.className,(s=y==null?void 0:y.classNames)===null||s===void 0?void 0:s.root,P==null?void 0:P.root,Q,le);if(!p&&oe&&(m||ke||!I)){const k=ee.color;return K(g.createElement("span",Object.assign({},X,{className:pe,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.root),(l=y==null?void 0:y.styles)===null||l===void 0?void 0:l.root),ee)}),g.createElement("span",{className:Ee,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(d=y==null?void 0:y.styles)===null||d===void 0?void 0:d.indicator),ae)}),fe&&g.createElement("span",{style:{color:k},className:`${T}-status-text`},m)))}return K(g.createElement("span",Object.assign({ref:i},X,{className:pe,style:Object.assign(Object.assign({},(r=y==null?void 0:y.styles)===null||r===void 0?void 0:r.root),O==null?void 0:O.root)}),p,g.createElement(We,{visible:!W,motionName:`${T}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:k})=>{var re,ce;const Be=F("scroll-number",f),de=xe.current,Ae=M(P==null?void 0:P.indicator,(re=y==null?void 0:y.classNames)===null||re===void 0?void 0:re.indicator,{[`${T}-dot`]:de,[`${T}-count`]:!de,[`${T}-count-sm`]:j==="small",[`${T}-multiple-words`]:!de&&ne&&ne.toString().length>1,[`${T}-status-${x}`]:!!x,[`${T}-color-${v}`]:te});let se=Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(ce=y==null?void 0:y.styles)===null||ce===void 0?void 0:ce.indicator),ee);return v&&!te&&(se=se||{},se.background=v),g.createElement(Tt,{prefixCls:Be,show:!W,motionClassName:k,className:Ae,count:ne,title:Me,style:se,key:"scrollNumber"},Ie)}),Re))}),Pe=$t;Pe.Ribbon=yt;var Lt={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(i,o){return g.createElement(Ue,Ge({},i,{ref:o,icon:Lt}))},Pt=g.forwardRef(Vt);const Ot="_container_31ewy_1",kt="_fileListSection_31ewy_10",Mt="_header_31ewy_19",Rt="_headerTitle_31ewy_28",It="_fileCount_31ewy_36",Et="_changesContainer_31ewy_44",Bt="_changeItem_31ewy_51",At="_changeItemActive_31ewy_68",zt="_dirItem_31ewy_77",Dt="_dirArrow_31ewy_88",Ft="_dirName_31ewy_97",Ht="_status_31ewy_102",Wt="_icon_31ewy_111",Ut="_fileName_31ewy_120",Gt="_diffSection_31ewy_127",Zt="_diffHeader_31ewy_135",qt="_diffFilePath_31ewy_145",Xt="_diffBadge_31ewy_155",Kt="_diffContent_31ewy_167",Yt="_diffPlaceholder_31ewy_173",Jt="_statusText_31ewy_184",Qt="_errorText_31ewy_191",es="_emptyText_31ewy_198",ts="_warningText_31ewy_205",ss="_fileSizeNote_31ewy_217",is="_statusTextItalic_31ewy_222",ls="_rotated90_31ewy_226",C={container:Ot,fileListSection:kt,header:Mt,headerTitle:Rt,fileCount:It,changesContainer:Et,changeItem:Bt,changeItemActive:At,dirItem:zt,dirArrow:Dt,dirName:Ft,status:Ht,icon:Wt,fileName:Ut,diffSection:Gt,diffHeader:Zt,diffFilePath:qt,diffBadge:Xt,diffContent:Kt,diffPlaceholder:Yt,statusText:Jt,errorText:Qt,emptyText:es,warningText:ts,fileSizeNote:ss,statusTextItalic:is,rotated90:ls},os={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},ns={"??":"U"},as={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 rs(t){const i=t.includes(".")?t.split(".").pop().toLowerCase():"",o=as[i]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:o,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 cs(){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 ds(t){const i={dirs:{},files:[]};for(const o of t){const s=o.file.split("/");let l=i;for(let d=0;d<s.length-1;d++)l.dirs[s[d]]||(l.dirs[s[d]]={dirs:{},files:[]}),l=l.dirs[s[d]];l.files.push({name:s[s.length-1],status:o.status,fullPath:o.file})}return i}function Oe({name:t,node:i,depth:o,selectedFile:s,onFileClick:l}){const d=Object.keys(i.dirs).sort(),r=[...i.files].sort((n,f)=>n.name.localeCompare(f.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:C.dirItem,style:{paddingLeft:8+o*16},children:[e.jsx("span",{className:C.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:C.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:C.icon,children:cs()}),e.jsx("span",{className:C.dirName,children:t})]}),d.map(n=>e.jsx(Oe,{name:n,node:i.dirs[n],depth:t?o+1:o,selectedFile:s,onFileClick:l},n)),r.map(n=>e.jsxs("div",{className:`${C.changeItem} ${s===n.fullPath?C.changeItemActive:""}`,style:{paddingLeft:8+(t?o+1:o)*16},onClick:()=>l&&l(n.fullPath),children:[e.jsx("span",{className:C.icon,children:rs(n.name)}),e.jsx("span",{className:C.fileName,children:n.name}),e.jsx("span",{className:C.status,style:{color:os[n.status]||"#888"},children:ns[n.status]||n.status})]},n.fullPath))]})}function ms({visible:t}){const[i,o]=g.useState(null),[s,l]=g.useState(null),[d,r]=g.useState(!0),[n,f]=g.useState(null),[p,x]=g.useState(null),[m,v]=g.useState(null),[w,N]=g.useState(!1),S=g.useRef(!0);return g.useEffect(()=>{if(S.current=!0,!!t)return r(!0),l(null),fetch(he("/api/git-status")).then(j=>j.ok?j.json():Promise.reject()).then(j=>{S.current&&(o(j.changes||[]),r(!1))}).catch(()=>{S.current&&(l("Failed to load git status"),r(!1))}),()=>{S.current=!1}},[t]),g.useEffect(()=>{if(!n){x(null),v(null);return}N(!0),x(null),v(null),fetch(he(`/api/git-diff?files=${encodeURIComponent(n)}`)).then(j=>{if(!j.ok)throw new Error(`HTTP ${j.status}`);return j.json()}).then(j=>{S.current&&(j.diffs&&j.diffs[0]?x(j.diffs[0]):v("No diff data available"),N(!1))}).catch(j=>{S.current&&(v(`${h("ui.fileLoadError")}: ${j.message}`),N(!1))})},[n]),e.jsxs("div",{className:C.container,children:[e.jsxs("div",{className:C.fileListSection,children:[e.jsxs("div",{className:C.header,children:[e.jsx("span",{className:C.headerTitle,children:h("ui.gitChanges")}),e.jsx("span",{className:C.fileCount,children:i?i.length:0})]}),e.jsxs("div",{className:C.changesContainer,children:[d&&e.jsx("div",{className:C.statusText,children:"Loading..."}),s&&e.jsx("div",{className:C.errorText,children:s}),!d&&!s&&i&&i.length===0&&e.jsx("div",{className:C.emptyText,children:"No changes"}),!d&&!s&&i&&i.length>0&&e.jsx(Oe,{name:"",node:ds(i),depth:0,selectedFile:n,onFileClick:f})]})]}),e.jsx("div",{className:C.diffSection,children:n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:C.diffHeader,children:[e.jsx("span",{className:C.diffFilePath,children:n}),e.jsx("span",{className:C.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:C.diffContent,children:[w&&e.jsx("div",{className:C.statusText,children:h("ui.loading")}),m&&e.jsx("div",{className:C.errorText,children:m}),!w&&!m&&p&&e.jsx(e.Fragment,{children:p.is_large?e.jsxs("div",{className:C.warningText,children:[e.jsx("p",{children:h("ui.largeFileWarning")}),e.jsxs("p",{className:C.fileSizeNote,children:[h("ui.fileSize"),": ",(p.size/(1024*1024)).toFixed(2)," MB"]})]}):p.is_binary?e.jsx("div",{className:`${C.statusText} ${C.statusTextItalic}`,children:h("ui.binaryFileNotice")}):e.jsx(Ze,{file_path:n,old_string:p.old_content,new_string:p.new_content})})]})]}):e.jsxs("div",{className:C.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:h("ui.mobileGitDiffHint")})]})})]})}const hs="_container_1bb9n_1",us="_header_1bb9n_9",bs="_headerTitle_1bb9n_18",gs="_closeBtn_1bb9n_24",xs="_content_1bb9n_38",fs="_empty_1bb9n_47",ps="_fixedTable_1bb9n_54",js="_ellipsisCell_1bb9n_58",vs="_thLeft_1bb9n_65",Ns="_colWide_1bb9n_69",ys="_colNarrow_1bb9n_73",V={container:hs,header:us,headerTitle:bs,closeBtn:gs,content:xs,empty:fs,fixedTable:ps,ellipsisCell:js,thLeft:vs,colWide:Ns,colNarrow:ys},Cs=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],ye={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 Ss({requests:t=[],visible:i,onClose:o}){const{byModel:s,models:l,toolStats:d,skillStats:r,cacheStats:n,activeReasons:f,totalCount:p,totalCache:x,hasCacheStats:m,subAgentEntries:v,hasSubAgentStats:w,teammateEntries:N,hasTeammateStats:S,isEmpty:j}=g.useMemo(()=>{const u=qe(t),b=Object.keys(u),L=Xe(t),R=Ke(t),z=Ye(t),P=Cs.filter(_=>z[_].count>0),O=P.reduce((_,$)=>_+z[$].count,0),D=P.reduce((_,$)=>_+z[$].cacheCreate,0),X=P.length>0,F={},B={};for(let _=0;_<t.length;_++){const $=Je(t[_],t[_+1]);if($.type==="SubAgent"){const I=$.subType||"Other";F[I]=(F[I]||0)+1}else if($.type==="Teammate"){const I=$.subType||"Teammate";B[I]=(B[I]||0)+1}}const y=Object.entries(F).sort((_,$)=>$[1]-_[1]),T=y.length>0,K=Object.entries(B).sort((_,$)=>$[1]-_[1]),Q=K.length>0,le=b.length===0&&L.length===0&&!X&&!T&&!Q&&R.length===0;return{byModel:u,models:b,toolStats:L,skillStats:R,cacheStats:z,activeReasons:P,totalCount:O,totalCache:D,hasCacheStats:X,subAgentEntries:y,hasSubAgentStats:T,teammateEntries:K,hasTeammateStats:Q,isEmpty:le}},[t]);return i?e.jsxs("div",{className:V.container,children:[e.jsxs("div",{className:V.header,children:[e.jsx("span",{className:V.headerTitle,children:h("ui.tokenStats")}),e.jsx("button",{className:V.closeBtn,onClick:o,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:V.content,children:j?e.jsx("div",{className:V.empty,children:"—"}):e.jsxs(e.Fragment,{children:[r.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:h("ui.skillUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:"Skill"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[r.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:u}),e.jsx("td",{className:a.td,children:b})]},u)),r.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:r.reduce((u,b)=>u+b[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:h("ui.subAgentStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[u," ",e.jsx(ie,{doc:`SubAgent-${u}`})]}),e.jsx("td",{className:a.td,children:b})]},u)),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((u,b)=>u+b[1],0)})]})]})]})]}),S&&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} ${V.thLeft}`,children:"Name"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[N.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:a.label,children:u}),e.jsx("td",{className:a.td,children:b})]},u)),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((u,b)=>u+b[1],0)})]})]})]})]}),d.length>0&&e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:h("ui.toolUsageStats")}),e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:"Tool"}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[d.map(([u,b])=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsxs("td",{className:a.label,children:[u," ",e.jsx(ie,{doc:`Tool-${u}`})]}),e.jsx("td",{className:a.td,children:b})]},u)),d.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.reduce((u,b)=>u+b[1],0)})]})]})]})]}),m&&e.jsxs("div",{className:a.modelCard,children:[e.jsxs("div",{className:a.modelName,children:["MainAgent",e.jsx(ie,{doc:"MainAgent"})," ",h("ui.cacheRebuildStats"),e.jsx(ie,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${a.statsTable} ${V.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:V.colWide}),e.jsx("col",{className:V.colNarrow}),e.jsx("col",{className:V.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${a.th} ${V.thLeft}`,children:h("ui.cacheRebuild.reason")}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.count")}),e.jsx("td",{className:a.th,children:h("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[f.map(u=>e.jsxs("tr",{className:a.rowBorder,children:[e.jsx("td",{className:`${a.label} ${V.ellipsisCell}`,title:h(`ui.${ye[u]}`),children:h(`ui.${ye[u]}`)}),e.jsx("td",{className:a.td,children:n[u].count}),e.jsx("td",{className:a.td,children:G(n[u].cacheCreate)})]},u)),f.length>1&&e.jsxs("tr",{className:a.rebuildTotalRow,children:[e.jsx("td",{className:a.label,children:"Total"}),e.jsx("td",{className:a.td,children:p}),e.jsx("td",{className:a.td,children:G(x)})]})]})]})]}),l.map(u=>{const b=s[u],L=b.input+b.cacheCreation+b.cacheRead,R=L>0?(b.cacheRead/L*100).toFixed(1):"0.0";return e.jsxs("div",{className:a.modelCard,children:[e.jsx("div",{className:a.modelName,children:u}),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:G(L)}),e.jsx("td",{className:a.td,children:G(b.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:G(b.cacheCreation)}),e.jsx("td",{className:a.td,children:G(b.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:a.label,children:h("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:a.td,children:[R,"%"]})]})]})})]},u)})]})})]}):null}const Z=class Z extends Qe{constructor(o){super(o);J(this,"handleExportPromptsTxt",o=>{if(!o||o.length===0)return;const s=[];for(const n of o){const f=[],p=n.timestamp?new Date(n.timestamp).toLocaleString():"";p&&f.push(`${p}:
|
|
2
|
+
`);const x=(n.segments||[]).filter(m=>m.type==="text").map(m=>m.content);x.length>0&&f.push(x.join(`
|
|
3
|
+
`)),s.push(f.join(`
|
|
4
4
|
`))}if(s.length===0)return;const l=new Blob([s.join(`
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
`)],{type:"text/plain;charset=utf-8"}),d=URL.createObjectURL(l),r=document.createElement("a");r.href=d,r.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,r.click(),URL.revokeObjectURL(d)});J(this,"handlePendingPermission",o=>{this.setState({globalPermission:o})});J(this,"handlePendingPlanApproval",o=>{this.setState({globalPlanApproval:o})});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,globalPermission:null,globalPlanApproval:null})}componentDidMount(){super.componentDidMount(),Fe&&window.visualViewport&&(this._onVisualViewportChange=()=>{const o=this._layoutRef.current;if(!o)return;const s=window.visualViewport;o.style.position="fixed",o.style.top=`${s.offsetTop}px`,o.style.height=`${s.height}px`,o.style.width="100%",o.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(o){const s=[],l=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let d=0,r;for(;(r=l.exec(o))!==null;){const
|
|
9
|
-
`)),l.push(
|
|
10
|
-
`)))}}return{userMsgs:s,fullTexts:l,slashCmd:d}}extractUserPrompts(o){var n;const s=[],l=new Set;let d=null;const r=o.filter(x=>st(x));for(let x=0;x<r.length;x++){const p=r[x],f=((n=p.body)==null?void 0:n.messages)||[],m=p.timestamp||"",{userMsgs:v,fullTexts:w,slashCmd:N}=Z.extractUserTexts(f);N&&N!=="/compact"&&N!==d&&s.push({type:"prompt",segments:[{type:"text",content:N}],timestamp:m}),d=N;for(let S=0;S<v.length;S++){const j=v[S];if(l.has(j))continue;l.add(j);const u=w[S]||j;s.push({type:"prompt",segments:Z.parseSegments(u),timestamp:m})}}return s}renderOriginalPrompt(o){const s=o.segments.filter(l=>l.type==="text");return s.length===0?null:e.jsx("div",{className:c.mobilePromptCard,children:s.map((l,d)=>e.jsx("pre",{className:c.mobilePromptPreText,children:l.content},d))})}render(){const{filteredRequests:o,fileLoading:s,fileLoadingCount:l,mainAgentSessions:d}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const r=!!this._isLocalLog;return e.jsxs("div",{className:c.mobileCLIRoot,ref:this._layoutRef,children:[e.jsxs("div",{className:c.mobileCLIHeader,children:[e.jsxs("div",{className:c.mobileCLIHeaderLeft,children:[e.jsx("button",{className:c.mobileMenuBtn,onClick:()=>this.setState(n=>({mobileMenuVisible:!n.mobileMenuVisible})),"aria-label":h("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(Pe,{status:"processing",color:"green"}),e.jsx("span",{className:c.mobileCLIStatusLabel,children:r?h("ui.historyLog",{file:this._localLogFile}):h("ui.liveMonitoring")+(this.state.projectName?`: ${this.state.projectName}`:"")})]}),e.jsxs("div",{className:c.mobileCLIHeaderRight,children:[r?e.jsx(A,{type:"text",size:"small",icon:e.jsx(Pt,{}),onClick:()=>history.back(),className:c.mobileNavBtn,children:h("ui.mobileGoBack")}):e.jsx(A,{type:"text",size:"small",icon:e.jsx(it,{}),onClick:()=>this.setState(n=>({mobileGitDiffVisible:!n.mobileGitDiffVisible,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileGitDiffVisible?"#fff":"#888",fontSize:12},children:this.state.mobileGitDiffVisible?h("ui.mobileGitDiffExit"):h("ui.mobileGitDiffBrowse")}),!r&&e.jsx(A,{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(n=>({mobileTerminalVisible:!n.mobileTerminalVisible,mobileGitDiffVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileTerminalVisible?"#fff":"#888",fontSize:12},children:this.state.mobileTerminalVisible?h("ui.mobileTerminalExit"):h("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"})]}),h("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"})]}),h("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"})]}),h("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"})]}),h("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:c.mobileCLIBody,children:[!r&&e.jsxs(e.Fragment,{children:[s&&e.jsxs("div",{className:c.mobileLoadingOverlay,children:[e.jsx("div",{className:c.mobileLoadingSpinner}),e.jsxs("div",{className:c.mobileLoadingLabel,children:[h("ui.loadingChat"),l>0?` (${l})`:""]})]}),e.jsx(je,{theme:this.darkThemeConfig,children:e.jsx("div",{className:c.mobileChatInner,children:e.jsx(lt,{requests:o,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:n=>this.loadSession(n),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval})})})]}),!r&&e.jsx("div",{className:`${c.mobileChatOverlay} ${this.state.mobileTerminalVisible?c.mobileChatOverlayVisible:""}`,children:e.jsx(ot,{})}),e.jsx("div",{className:`${c.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?c.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:c.mobileGitDiffInner,children:e.jsx(ms,{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(Ss,{requests:o,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(nt,{apiEndpoint:he("/api/open-log-dir"),title:h("ui.openLogDir"),size:14}),h("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(A,{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:"#666",borderColor:"#333"}:void 0,children:h("ui.mergeLogs")}),e.jsx(A,{size:"small",icon:e.jsx(at,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,style:this.state.selectedLogs.size===0?{color:"#666",borderColor:"#333"}:{color:"#ff4d4f",borderColor:"#ff4d4f"},children:h("ui.deleteLogs")}),e.jsx(A,{size:"small",icon:e.jsx(rt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:h("ui.refreshStats")})]}),e.jsx("div",{className:c.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:c.spinCenter,children:e.jsx(ct,{})}):(()=>{const n=this.state.localLogs[this.state.currentProject];return!n||n.length===0?e.jsx("div",{className:c.emptyCenter,children:h("ui.noLogs")}):e.jsx(je,{theme:this.darkThemeConfig,children:e.jsx("div",{className:c.logListContainer,children:this.renderLogTable(n,!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:h("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:h("ui.chatDisplaySwitches")}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:h("ui.collapseToolResults")}),e.jsx(me,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:h("ui.expandThinking")}),e.jsx(me,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:h("ui.showFullToolContent")}),e.jsx(me,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),e.jsx("div",{className:c.mobileSettingsSectionTitle,children:h("ui.themeColor")}),e.jsx("div",{className:c.mobileSettingsRow,children:e.jsx(dt,{size:"small",value:this.state.themeColor||"dark",onChange:this.handleThemeColorChange,options:[{label:h("ui.themeColor.dark"),value:"dark"},{label:h("ui.themeColor.light"),value:"light"}],style:{width:140}})})]})]}),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:h("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 n=this.extractUserPrompts(o);return n.length===0?e.jsx("div",{className:c.mobilePromptEmpty,children:h("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:c.mobilePromptHeader,children:[e.jsxs("span",{className:c.mobilePromptCount,children:[n.length," ",h("ui.promptCountUnit")]}),e.jsx(A,{size:"small",icon:e.jsx(mt,{}),onClick:()=>this.handleExportPromptsTxt(n),children:h("ui.exportPromptsTxt")})]}),e.jsx("div",{className:c.mobilePromptList,children:n.map((x,p)=>e.jsxs("div",{className:c.mobilePromptItem,children:[x.timestamp&&e.jsx("div",{className:c.mobilePromptTimestamp,children:new Date(x.timestamp).toLocaleString()}),this.renderOriginalPrompt(x)]},p))})]})})()})]})]}),this.state.globalPermission&&e.jsx(ve,{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}),this.state.globalPlanApproval&&e.jsx(ve,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:n=>this.state.globalPlanApproval.handlers.reject(n,""),visible:!0,global:!0})]})}};J(Z,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Ce=Z;export{Ce as default};
|
|
8
|
+
`)],{type:"text/plain;charset=utf-8"}),d=URL.createObjectURL(l),r=document.createElement("a");r.href=d,r.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,r.click(),URL.revokeObjectURL(d)});J(this,"handlePendingPermission",o=>{this.setState({globalPermission:o})});J(this,"handlePendingPlanApproval",o=>{this.setState({globalPlanApproval:o})});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,globalPermission:null,globalPlanApproval:null})}componentDidMount(){super.componentDidMount(),Fe&&window.visualViewport&&(this._onVisualViewportChange=()=>{const o=this._layoutRef.current;if(!o)return;const s=window.visualViewport;o.style.position="fixed",o.style.top=`${s.offsetTop}px`,o.style.height=`${s.height}px`,o.style.width="100%",o.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(o){const s=[],l=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let d=0,r;for(;(r=l.exec(o))!==null;){const f=o.slice(d,r.index).trim();f&&s.push({type:"text",content:f});const p=r[1];if(d=r.index+r[0].length,Z.COMMAND_TAGS.has(p))continue;const x=new RegExp(`^<${p}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${p}>$`),m=r[0].match(x),v=m?m[1].trim():r[0].trim();s.push({type:"system",content:v,label:p})}const n=o.slice(d).trim();return n&&s.push({type:"text",content:n}),s}static extractUserTexts(o){const s=[],l=[];let d=null;for(const r of o)if(r.role==="user"){if(typeof r.content=="string"){const n=r.content.trim();if(!n)continue;if(!et(n)){if(/Implement the following plan:/i.test(n))continue;s.push(n),l.push(n)}}else if(Array.isArray(r.content)){const{commands:n,textBlocks:f}=tt(r.content);n.length>0&&(d=n[n.length-1]);const p=[];for(const m of f)/Implement the following plan:/i.test((m.text||"").trim())||p.push(m.text.trim());const x=r.content.filter(m=>{var v;return m.type==="text"&&((v=m.text)==null?void 0:v.trim())}).map(m=>m.text.trim());p.length>0&&(s.push(p.join(`
|
|
9
|
+
`)),l.push(x.join(`
|
|
10
|
+
`)))}}return{userMsgs:s,fullTexts:l,slashCmd:d}}extractUserPrompts(o){var n;const s=[],l=new Set;let d=null;const r=o.filter(f=>st(f));for(let f=0;f<r.length;f++){const p=r[f],x=((n=p.body)==null?void 0:n.messages)||[],m=p.timestamp||"",{userMsgs:v,fullTexts:w,slashCmd:N}=Z.extractUserTexts(x);N&&N!=="/compact"&&N!==d&&s.push({type:"prompt",segments:[{type:"text",content:N}],timestamp:m}),d=N;for(let S=0;S<v.length;S++){const j=v[S];if(l.has(j))continue;l.add(j);const u=w[S]||j;s.push({type:"prompt",segments:Z.parseSegments(u),timestamp:m})}}return s}renderOriginalPrompt(o){const s=o.segments.filter(l=>l.type==="text");return s.length===0?null:e.jsx("div",{className:c.mobilePromptCard,children:s.map((l,d)=>e.jsx("pre",{className:c.mobilePromptPreText,children:l.content},d))})}render(){const{filteredRequests:o,fileLoading:s,fileLoadingCount:l,mainAgentSessions:d}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const r=!!this._isLocalLog;return e.jsxs("div",{className:c.mobileCLIRoot,ref:this._layoutRef,children:[e.jsxs("div",{className:c.mobileCLIHeader,children:[e.jsxs("div",{className:c.mobileCLIHeaderLeft,children:[e.jsx("button",{className:c.mobileMenuBtn,onClick:()=>this.setState(n=>({mobileMenuVisible:!n.mobileMenuVisible})),"aria-label":h("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(Pe,{status:"processing",color:"green"}),e.jsx("span",{className:c.mobileCLIStatusLabel,children:r?h("ui.historyLog",{file:this._localLogFile}):h("ui.liveMonitoring")+(this.state.projectName?`: ${this.state.projectName}`:"")})]}),e.jsxs("div",{className:c.mobileCLIHeaderRight,children:[r?e.jsx(A,{type:"text",size:"small",icon:e.jsx(Pt,{}),onClick:()=>history.back(),className:c.mobileNavBtn,children:h("ui.mobileGoBack")}):e.jsx(A,{type:"text",size:"small",icon:e.jsx(it,{}),onClick:()=>this.setState(n=>({mobileGitDiffVisible:!n.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?h("ui.mobileGitDiffExit"):h("ui.mobileGitDiffBrowse")}),!r&&e.jsx(A,{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(n=>({mobileTerminalVisible:!n.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?h("ui.mobileTerminalExit"):h("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"})]}),h("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"})]}),h("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"})]}),h("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"})]}),h("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:c.mobileCLIBody,children:[!r&&e.jsxs(e.Fragment,{children:[s&&e.jsxs("div",{className:c.mobileLoadingOverlay,children:[e.jsx("div",{className:c.mobileLoadingSpinner}),e.jsxs("div",{className:c.mobileLoadingLabel,children:[h("ui.loadingChat"),l>0?` (${l})`:""]})]}),e.jsx(je,{theme:this.themeConfig,children:e.jsx("div",{className:c.mobileChatInner,children:e.jsx(lt,{requests:o,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:n=>this.loadSession(n),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval})})})]}),!r&&e.jsx("div",{className:`${c.mobileChatOverlay} ${this.state.mobileTerminalVisible?c.mobileChatOverlayVisible:""}`,children:e.jsx(ot,{})}),e.jsx("div",{className:`${c.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?c.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:c.mobileGitDiffInner,children:e.jsx(ms,{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(Ss,{requests:o,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(nt,{apiEndpoint:he("/api/open-log-dir"),title:h("ui.openLogDir"),size:14}),h("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(A,{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:h("ui.mergeLogs")}),e.jsx(A,{size:"small",icon:e.jsx(at,{}),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:h("ui.deleteLogs")}),e.jsx(A,{size:"small",icon:e.jsx(rt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:h("ui.refreshStats")})]}),e.jsx("div",{className:c.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:c.spinCenter,children:e.jsx(ct,{})}):(()=>{const n=this.state.localLogs[this.state.currentProject];return!n||n.length===0?e.jsx("div",{className:c.emptyCenter,children:h("ui.noLogs")}):e.jsx(je,{theme:this.themeConfig,children:e.jsx("div",{className:c.logListContainer,children:this.renderLogTable(n,!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:h("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:h("ui.chatDisplaySwitches")}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:h("ui.collapseToolResults")}),e.jsx(me,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:h("ui.expandThinking")}),e.jsx(me,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:c.mobileSettingsRow,children:[e.jsx("span",{className:c.mobileSettingsLabel,children:h("ui.showFullToolContent")}),e.jsx(me,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),e.jsx("div",{className:c.mobileSettingsSectionTitle,children:h("ui.themeColor")}),e.jsx("div",{className:c.mobileSettingsRow,children:e.jsx(dt,{size:"small",value:this.state.themeColor||"dark",onChange:this.handleThemeColorChange,options:[{label:h("ui.themeColor.dark"),value:"dark"},{label:h("ui.themeColor.light"),value:"light"}],style:{width:140}})})]})]}),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:h("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 n=this.extractUserPrompts(o);return n.length===0?e.jsx("div",{className:c.mobilePromptEmpty,children:h("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:c.mobilePromptHeader,children:[e.jsxs("span",{className:c.mobilePromptCount,children:[n.length," ",h("ui.promptCountUnit")]}),e.jsx(A,{size:"small",icon:e.jsx(mt,{}),onClick:()=>this.handleExportPromptsTxt(n),children:h("ui.exportPromptsTxt")})]}),e.jsx("div",{className:c.mobilePromptList,children:n.map((f,p)=>e.jsxs("div",{className:c.mobilePromptItem,children:[f.timestamp&&e.jsx("div",{className:c.mobilePromptTimestamp,children:new Date(f.timestamp).toLocaleString()}),this.renderOriginalPrompt(f)]},p))})]})})()})]})]}),this.state.globalPermission&&e.jsx(ve,{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}),this.state.globalPlanApproval&&e.jsx(ve,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:n=>this.state.globalPlanApproval.handlers.reject(n,""),visible:!0,global:!0})]})}};J(Z,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Ce=Z;export{Ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_31ewy_1{display:flex;flex-direction:column;height:100%;background:var(--bg-base-alt);overflow:hidden}._fileListSection_31ewy_10{height:300px;flex-shrink:0;display:flex;flex-direction:column;background:var(--bg-container);border-bottom:1px solid var(--border-primary)}._header_31ewy_19{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--border-primary);flex-shrink:0}._headerTitle_31ewy_28{font-size:11px;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.5px}._fileCount_31ewy_36{font-size:10px;color:var(--text-disabled);background:var(--bg-elevated);padding:1px 6px;border-radius:8px}._changesContainer_31ewy_44{flex:1;overflow:auto;padding:4px 0;-webkit-overflow-scrolling:touch}._changeItem_31ewy_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_31ewy_51:hover{background:var(--bg-elevated)}._changeItemActive_31ewy_68{background:var(--color-primary-bg-light);color:var(--text-white)}._changeItemActive_31ewy_68:hover{background:var(--color-primary-bg-light)}._dirItem_31ewy_77{display:flex;align-items:center;height:26px;padding:0 8px;color:var(--text-tertiary);font-size:13px;white-space:nowrap;gap:6px}._dirArrow_31ewy_88{width:16px;flex-shrink:0;color:var(--text-muted);display:flex;align-items:center;justify-content:center}._dirName_31ewy_97{overflow:hidden;text-overflow:ellipsis}._status_31ewy_102{width:16px;flex-shrink:0;font-size:11px;font-weight:600;text-align:center;margin-left:auto}._icon_31ewy_111{width:16px;height:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center}._fileName_31ewy_120{overflow:hidden;text-overflow:ellipsis;flex:1}._diffSection_31ewy_127{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}._diffHeader_31ewy_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_31ewy_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_31ewy_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_31ewy_167{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}._diffPlaceholder_31ewy_173{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--border-secondary);font-size:13px}._statusText_31ewy_184{color:var(--text-disabled);font-size:12px;padding:16px 12px;text-align:center}._errorText_31ewy_191{color:var(--color-error-light);font-size:12px;padding:16px 12px;text-align:center}._emptyText_31ewy_198{color:var(--text-muted);font-size:12px;padding:16px 12px;text-align:center}._warningText_31ewy_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_31ewy_217{color:var(--text-tertiary);font-size:12px}._statusTextItalic_31ewy_222{font-style:italic}._rotated90_31ewy_226{transform:rotate(90deg)}._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%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as x,c as O,g as m,k as P,h as p,j as w,l as c,m as A,n as I,t as N,o as _}from"./_baseUniq-
|
|
1
|
+
import{e as x,c as O,g as m,k as P,h as p,j as w,l as c,m as A,n as I,t as N,o as _}from"./_baseUniq-CEs2oCRB.js";import{aS as g,as as E,aT as F,aU as M,aV as T,aW as l,aX as $,aY as B,aZ as S,a_ as y}from"./mermaid.core-Tmv8ZzzJ.js";var G=/\s/;function H(n){for(var r=n.length;r--&&G.test(n.charAt(r)););return r}var L=/^\s+/;function R(n){return n&&n.slice(0,H(n)+1).replace(L,"")}var o=NaN,W=/^[-+]0x[0-9a-f]+$/i,X=/^0b[01]+$/i,Y=/^0o[0-7]+$/i,q=parseInt;function z(n){if(typeof n=="number")return n;if(x(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=R(n);var t=X.test(n);return t||Y.test(n)?q(n.slice(2),t?2:8):W.test(n)?o:+n}var v=1/0,C=17976931348623157e292;function K(n){if(!n)return n===0?n:0;if(n=z(n),n===v||n===-v){var r=n<0?-1:1;return r*C}return n===n?n:0}function U(n){var r=K(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?O(n):[]}var b=Object.prototype,Z=b.hasOwnProperty,dn=E(function(n,r){n=Object(n);var t=-1,i=r.length,a=i>2?r[2]:void 0;for(a&&F(r[0],r[1],a)&&(i=1);++t<i;)for(var f=r[t],e=M(f),s=-1,d=e.length;++s<d;){var u=e[s],h=n[u];(h===void 0||T(h,b[u])&&!Z.call(n,u))&&(n[u]=f[u])}return n});function un(n){var r=n==null?0:n.length;return r?n[r-1]:void 0}function D(n){return function(r,t,i){var a=Object(r);if(!l(r)){var f=m(t);r=P(r),t=function(s){return f(a[s],s,a)}}var e=n(r,t,i);return e>-1?a[f?r[e]:e]:void 0}}var J=Math.max;function Q(n,r,t){var i=n==null?0:n.length;if(!i)return-1;var a=t==null?0:U(t);return a<0&&(a=J(i+a,0)),p(n,m(r),a)}var hn=D(Q);function V(n,r){var t=-1,i=l(n)?Array(n.length):[];return w(n,function(a,f,e){i[++t]=r(a,f,e)}),i}function gn(n,r){var t=$(n)?c:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&A(n,r,nn)}function rn(n,r){return n<r}function tn(n,r,t){for(var i=-1,a=n.length;++i<a;){var f=n[i],e=r(f);if(e!=null&&(s===void 0?e===e&&!x(e):t(e,s)))var s=e,d=f}return d}function on(n){return n&&n.length?tn(n,B,rn):void 0}function an(n,r,t,i){if(!g(n))return n;r=I(r,n);for(var a=-1,f=r.length,e=f-1,s=n;s!=null&&++a<f;){var d=N(r[a]),u=t;if(d==="__proto__"||d==="constructor"||d==="prototype")return n;if(a!=e){var h=s[d];u=void 0,u===void 0&&(u=g(h)?h:S(r[a+1])?[]:{})}y(s,d,u),s=s[d]}return n}function vn(n,r,t){for(var i=-1,a=r.length,f={};++i<a;){var e=r[i],s=_(n,e);t(s,e)&&an(f,I(e,n),s)}return f}export{rn as a,tn as b,V as c,vn as d,on as e,fn as f,hn as g,mn as h,dn as i,U as j,un as l,gn as m,K as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bf as S,bg as Rn,aX as T,bh as w,aW as sn,bi as xn,bj as mn,bk as Mn,bl as un,bm as x,aU as U,bn as Cn,bo as on,bp as Fn,bq as E,bd as gn,br as R,aS as ln,bs as Dn,bt as D,bu as Gn,bv as Un,bw as $,a_ as Bn,bx as Nn,aV as Kn,by as X,bz as jn,bA as Hn,aZ as qn,aY as cn,bb as Yn,bB as M}from"./mermaid.core-WhunGzrd.js";var Zn="[object Symbol]";function B(n){return typeof n=="symbol"||S(n)&&Rn(n)==Zn}function bn(n,r){for(var e=-1,t=n==null?0:n.length,f=Array(t);++e<t;)f[e]=r(n[e],e,n);return f}var J=w?w.prototype:void 0,Q=J?J.toString:void 0;function dn(n){if(typeof n=="string")return n;if(T(n))return bn(n,dn)+"";if(B(n))return Q?Q.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Xn(){}function pn(n,r){for(var e=-1,t=n==null?0:n.length;++e<t&&r(n[e],e,n)!==!1;);return n}function Jn(n,r,e,t){for(var f=n.length,i=e+-1;++i<f;)if(r(n[i],i,n))return i;return-1}function Qn(n){return n!==n}function Wn(n,r,e){for(var t=e-1,f=n.length;++t<f;)if(n[t]===r)return t;return-1}function zn(n,r,e){return r===r?Wn(n,r,e):Jn(n,Qn,e)}function Vn(n,r){var e=n==null?0:n.length;return!!e&&zn(n,r,0)>-1}function _(n){return sn(n)?xn(n):mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=Mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function m(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&e<t;)n=n[m(r[e++])];return e&&e==t?n:void 0}function sr(n,r,e){var t=n==null?void 0:yn(n,r);return t===void 0?e:t}function K(n,r){for(var e=-1,t=r.length,f=n.length;++e<t;)n[f+e]=r[e];return n}var W=w?w.isConcatSpreadable:void 0;function ur(n){return T(n)||un(n)||!!(W&&n&&n[W])}function Ot(n,r,e,t,f){var i=-1,a=n.length;for(e||(e=ur),f||(f=[]);++i<a;){var s=n[i];e(s)?K(f,s):t||(f[f.length]=s)}return f}function or(n,r,e,t){var f=-1,i=n==null?0:n.length;for(t&&i&&(e=n[++f]);++f<i;)e=r(e,n[f],f,n);return e}function gr(n,r){return n&&x(r,_(r),n)}function lr(n,r){return n&&x(r,U(r),n)}function Tn(n,r){for(var e=-1,t=n==null?0:n.length,f=0,i=[];++e<t;){var a=n[e];r(a,e,n)&&(i[f++]=a)}return i}function hn(){return[]}var cr=Object.prototype,br=cr.propertyIsEnumerable,z=Object.getOwnPropertySymbols,j=z?function(n){return n==null?[]:(n=Object(n),Tn(z(n),function(r){return br.call(n,r)}))}:hn;function dr(n,r){return x(n,j(n),r)}var pr=Object.getOwnPropertySymbols,wn=pr?function(n){for(var r=[];n;)K(r,j(n)),n=Cn(n);return r}:hn;function Ar(n,r){return x(n,wn(n),r)}function On(n,r,e){var t=r(n);return T(n)?t:K(t,e(n))}function G(n){return On(n,_,j)}function yr(n){return On(n,U,wn)}var Tr=Object.prototype,hr=Tr.hasOwnProperty;function wr(n){var r=n.length,e=new n.constructor(r);return r&&typeof n[0]=="string"&&hr.call(n,"index")&&(e.index=n.index,e.input=n.input),e}function Or(n,r){var e=r?on(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var _r=/\w*$/;function $r(n){var r=new n.constructor(n.source,_r.exec(n));return r.lastIndex=n.lastIndex,r}var V=w?w.prototype:void 0,k=V?V.valueOf:void 0;function Sr(n){return k?Object(k.call(n)):{}}var Er="[object Boolean]",Ir="[object Date]",Pr="[object Map]",vr="[object Number]",Lr="[object RegExp]",Rr="[object Set]",xr="[object String]",mr="[object Symbol]",Mr="[object ArrayBuffer]",Cr="[object DataView]",Fr="[object Float32Array]",Dr="[object Float64Array]",Gr="[object Int8Array]",Ur="[object Int16Array]",Br="[object Int32Array]",Nr="[object Uint8Array]",Kr="[object Uint8ClampedArray]",jr="[object Uint16Array]",Hr="[object Uint32Array]";function qr(n,r,e){var t=n.constructor;switch(r){case Mr:return on(n);case Er:case Ir:return new t(+n);case Cr:return Or(n,e);case Fr:case Dr:case Gr:case Ur:case Br:case Nr:case Kr:case jr:case Hr:return Fn(n,e);case Pr:return new t;case vr:case xr:return new t(n);case Lr:return $r(n);case Rr:return new t;case mr:return Sr(n)}}var Yr="[object Map]";function Zr(n){return S(n)&&E(n)==Yr}var nn=R&&R.isMap,Xr=nn?gn(nn):Zr,Jr="[object Set]";function Qr(n){return S(n)&&E(n)==Jr}var rn=R&&R.isSet,Wr=rn?gn(rn):Qr,zr=1,Vr=2,kr=4,_n="[object Arguments]",ne="[object Array]",re="[object Boolean]",ee="[object Date]",te="[object Error]",$n="[object Function]",ie="[object GeneratorFunction]",fe="[object Map]",ae="[object Number]",Sn="[object Object]",se="[object RegExp]",ue="[object Set]",oe="[object String]",ge="[object Symbol]",le="[object WeakMap]",ce="[object ArrayBuffer]",be="[object DataView]",de="[object Float32Array]",pe="[object Float64Array]",Ae="[object Int8Array]",ye="[object Int16Array]",Te="[object Int32Array]",he="[object Uint8Array]",we="[object Uint8ClampedArray]",Oe="[object Uint16Array]",_e="[object Uint32Array]",g={};g[_n]=g[ne]=g[ce]=g[be]=g[re]=g[ee]=g[de]=g[pe]=g[Ae]=g[ye]=g[Te]=g[fe]=g[ae]=g[Sn]=g[se]=g[ue]=g[oe]=g[ge]=g[he]=g[we]=g[Oe]=g[_e]=!0;g[te]=g[$n]=g[le]=!1;function C(n,r,e,t,f,i){var a,s=r&zr,u=r&Vr,b=r&kr;if(a!==void 0)return a;if(!ln(n))return n;var l=T(n);if(l){if(a=wr(n),!s)return Dn(n,a)}else{var o=E(n),c=o==$n||o==ie;if(D(n))return Gn(n,s);if(o==Sn||o==_n||c&&!f){if(a=u||c?{}:Un(n),!s)return u?Ar(n,lr(a,n)):dr(n,gr(a,n))}else{if(!g[o])return f?n:{};a=qr(n,o,s)}}i||(i=new $);var h=i.get(n);if(h)return h;i.set(n,a),Wr(n)?n.forEach(function(d){a.add(C(d,r,e,d,n,i))}):Xr(n)&&n.forEach(function(d,p){a.set(p,C(d,r,e,p,n,i))});var A=b?u?yr:G:u?U:_,y=l?void 0:A(n);return pn(y||n,function(d,p){y&&(p=d,d=n[p]),Bn(a,p,C(d,r,e,p,n,i))}),a}var $e="__lodash_hash_undefined__";function Se(n){return this.__data__.set(n,$e),this}function Ee(n){return this.__data__.has(n)}function I(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new Nn;++r<e;)this.add(n[r])}I.prototype.add=I.prototype.push=Se;I.prototype.has=Ee;function Ie(n,r){for(var e=-1,t=n==null?0:n.length;++e<t;)if(r(n[e],e,n))return!0;return!1}function En(n,r){return n.has(r)}var Pe=1,ve=2;function In(n,r,e,t,f,i){var a=e&Pe,s=n.length,u=r.length;if(s!=u&&!(a&&u>s))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new I:void 0;for(i.set(n,r),i.set(r,n);++o<s;){var A=n[o],y=r[o];if(t)var d=a?t(y,A,o,r,n,i):t(A,y,o,n,r,i);if(d!==void 0){if(d)continue;c=!1;break}if(h){if(!Ie(r,function(p,O){if(!En(h,O)&&(A===p||f(A,p,e,t,i)))return h.push(O)})){c=!1;break}}else if(!(A===y||f(A,y,e,t,i))){c=!1;break}}return i.delete(n),i.delete(r),c}function Le(n){var r=-1,e=Array(n.size);return n.forEach(function(t,f){e[++r]=[f,t]}),e}function H(n){var r=-1,e=Array(n.size);return n.forEach(function(t){e[++r]=t}),e}var Re=1,xe=2,me="[object Boolean]",Me="[object Date]",Ce="[object Error]",Fe="[object Map]",De="[object Number]",Ge="[object RegExp]",Ue="[object Set]",Be="[object String]",Ne="[object Symbol]",Ke="[object ArrayBuffer]",je="[object DataView]",en=w?w.prototype:void 0,F=en?en.valueOf:void 0;function He(n,r,e,t,f,i,a){switch(e){case je:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case Ke:return!(n.byteLength!=r.byteLength||!i(new X(n),new X(r)));case me:case Me:case De:return Kn(+n,+r);case Ce:return n.name==r.name&&n.message==r.message;case Ge:case Be:return n==r+"";case Fe:var s=Le;case Ue:var u=tℜif(s||(s=H),n.size!=r.size&&!u)return!1;var b=a.get(n);if(b)return b==r;t|=xe,a.set(n,r);var l=In(s(n),s(r),t,f,i,a);return a.delete(n),l;case Ne:if(F)return F.call(n)==F.call(r)}return!1}var qe=1,Ye=Object.prototype,Ze=Ye.hasOwnProperty;function Xe(n,r,e,t,f,i){var a=e&qe,s=G(n),u=s.length,b=G(r),l=b.length;if(u!=l&&!a)return!1;for(var o=u;o--;){var c=s[o];if(!(a?c in r:Ze.call(r,c)))return!1}var h=i.get(n),A=i.get(r);if(h&&A)return h==r&&A==n;var y=!0;i.set(n,r),i.set(r,n);for(var d=a;++o<u;){c=s[o];var p=n[c],O=r[c];if(t)var Z=a?t(O,p,c,r,n,i):t(p,O,c,n,r,i);if(!(Z===void 0?p===O||f(p,O,e,t,i):Z)){y=!1;break}d||(d=c=="constructor")}if(y&&!d){var P=n.constructor,v=r.constructor;P!=v&&"constructor"in n&&"constructor"in r&&!(typeof P=="function"&&P instanceof P&&typeof v=="function"&&v instanceof v)&&(y=!1)}return i.delete(n),i.delete(r),y}var Je=1,tn="[object Arguments]",fn="[object Array]",L="[object Object]",Qe=Object.prototype,an=Qe.hasOwnProperty;function We(n,r,e,t,f,i){var a=T(n),s=T(r),u=a?fn:E(n),b=s?fn:E(r);u=u==tn?L:u,b=b==tn?L:b;var l=u==L,o=b==L,c=u==b;if(c&&D(n)){if(!D(r))return!1;a=!0,l=!1}if(c&&!l)return i||(i=new $),a||jn(n)?In(n,r,e,t,f,i):He(n,r,u,e,t,f,i);if(!(e&Je)){var h=l&&an.call(n,"__wrapped__"),A=o&&an.call(r,"__wrapped__");if(h||A){var y=h?n.value():n,d=A?r.value():r;return i||(i=new $),f(y,d,e,t,i)}}return c?(i||(i=new $),Xe(n,r,e,t,f,i)):!1}function q(n,r,e,t,f){return n===r?!0:n==null||r==null||!S(n)&&!S(r)?n!==n&&r!==r:We(n,r,e,t,q,f)}var ze=1,Ve=2;function ke(n,r,e,t){var f=e.length,i=f;if(n==null)return!i;for(n=Object(n);f--;){var a=e[f];if(a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++f<i;){a=e[f];var s=a[0],u=n[s],b=a[1];if(a[2]){if(u===void 0&&!(s in n))return!1}else{var l=new $,o;if(!(o===void 0?q(b,u,ze|Ve,t,l):o))return!1}}return!0}function Pn(n){return n===n&&!ln(n)}function nt(n){for(var r=_(n),e=r.length;e--;){var t=r[e],f=n[t];r[e]=[t,f,Pn(f)]}return r}function vn(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function rt(n){var r=nt(n);return r.length==1&&r[0][2]?vn(r[0][0],r[0][1]):function(e){return e===n||ke(e,n,r)}}function et(n,r){return n!=null&&r in Object(n)}function tt(n,r,e){r=An(r,n);for(var t=-1,f=r.length,i=!1;++t<f;){var a=m(r[t]);if(!(i=n!=null&&e(n,a)))break;n=n[a]}return i||++t!=f?i:(f=n==null?0:n.length,!!f&&Hn(f)&&qn(a,f)&&(T(n)||un(n)))}function it(n,r){return n!=null&&tt(n,r,et)}var ft=1,at=2;function st(n,r){return N(n)&&Pn(r)?vn(m(n),r):function(e){var t=sr(e,n);return t===void 0&&t===r?it(e,n):q(r,t,ft|at)}}function ut(n){return function(r){return r==null?void 0:r[n]}}function ot(n){return function(r){return yn(r,n)}}function gt(n){return N(n)?ut(m(n)):ot(n)}function Ln(n){return typeof n=="function"?n:n==null?cn:typeof n=="object"?T(n)?st(n[0],n[1]):rt(n):gt(n)}function lt(n,r){return n&&Yn(n,r,_)}function ct(n,r){return function(e,t){if(e==null)return e;if(!sn(e))return n(e,t);for(var f=e.length,i=-1,a=Object(e);++i<f&&t(a[i],i,a)!==!1;);return e}}var Y=ct(lt);function bt(n){return typeof n=="function"?n:cn}function _t(n,r){var e=T(n)?pn:Y;return e(n,bt(r))}function dt(n,r){var e=[];return Y(n,function(t,f,i){r(t,f,i)&&e.push(t)}),e}function $t(n,r){var e=T(n)?Tn:dt;return e(n,Ln(r))}function pt(n,r){return bn(r,function(e){return n[e]})}function St(n){return n==null?[]:pt(n,_(n))}function Et(n){return n===void 0}function At(n,r,e,t,f){return f(n,function(i,a,s){e=t?(t=!1,i):r(e,i,a,s)}),e}function It(n,r,e){var t=T(n)?or:At,f=arguments.length<3;return t(n,Ln(r),e,f,Y)}var yt=1/0,Tt=M&&1/H(new M([,-0]))[1]==yt?function(n){return new M(n)}:Xn,ht=200;function Pt(n,r,e){var t=-1,f=Vn,i=n.length,a=!0,s=[],u=s;if(i>=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new I}else u=r?[]:s;n:for(;++t<i;){var l=n[t],o=r?r(l):l;if(l=l!==0?l:0,a&&o===o){for(var c=u.length;c--;)if(u[c]===o)continue n;r&&u.push(o),s.push(l)}else f(u,o,e)||(u!==s&&u.push(o),s.push(l))}return s}export{Tn as A,dt as B,Ie as C,Xn as D,I as S,Pt as a,C as b,Ot as c,_t as d,B as e,$t as f,Ln as g,Jn as h,Et as i,Y as j,_ as k,bn as l,tt as m,An as n,yn as o,bt as p,lt as q,It as r,it as s,m as t,ar as u,St as v,Vn as w,En as x,zn as y,yr as z};
|
|
1
|
+
import{bf as S,bg as Rn,aX as T,bh as w,aW as sn,bi as xn,bj as mn,bk as Mn,bl as un,bm as x,aU as U,bn as Cn,bo as on,bp as Fn,bq as E,bd as gn,br as R,aS as ln,bs as Dn,bt as D,bu as Gn,bv as Un,bw as $,a_ as Bn,bx as Nn,aV as Kn,by as X,bz as jn,bA as Hn,aZ as qn,aY as cn,bb as Yn,bB as M}from"./mermaid.core-Tmv8ZzzJ.js";var Zn="[object Symbol]";function B(n){return typeof n=="symbol"||S(n)&&Rn(n)==Zn}function bn(n,r){for(var e=-1,t=n==null?0:n.length,f=Array(t);++e<t;)f[e]=r(n[e],e,n);return f}var J=w?w.prototype:void 0,Q=J?J.toString:void 0;function dn(n){if(typeof n=="string")return n;if(T(n))return bn(n,dn)+"";if(B(n))return Q?Q.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Xn(){}function pn(n,r){for(var e=-1,t=n==null?0:n.length;++e<t&&r(n[e],e,n)!==!1;);return n}function Jn(n,r,e,t){for(var f=n.length,i=e+-1;++i<f;)if(r(n[i],i,n))return i;return-1}function Qn(n){return n!==n}function Wn(n,r,e){for(var t=e-1,f=n.length;++t<f;)if(n[t]===r)return t;return-1}function zn(n,r,e){return r===r?Wn(n,r,e):Jn(n,Qn,e)}function Vn(n,r){var e=n==null?0:n.length;return!!e&&zn(n,r,0)>-1}function _(n){return sn(n)?xn(n):mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=Mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function m(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&e<t;)n=n[m(r[e++])];return e&&e==t?n:void 0}function sr(n,r,e){var t=n==null?void 0:yn(n,r);return t===void 0?e:t}function K(n,r){for(var e=-1,t=r.length,f=n.length;++e<t;)n[f+e]=r[e];return n}var W=w?w.isConcatSpreadable:void 0;function ur(n){return T(n)||un(n)||!!(W&&n&&n[W])}function Ot(n,r,e,t,f){var i=-1,a=n.length;for(e||(e=ur),f||(f=[]);++i<a;){var s=n[i];e(s)?K(f,s):t||(f[f.length]=s)}return f}function or(n,r,e,t){var f=-1,i=n==null?0:n.length;for(t&&i&&(e=n[++f]);++f<i;)e=r(e,n[f],f,n);return e}function gr(n,r){return n&&x(r,_(r),n)}function lr(n,r){return n&&x(r,U(r),n)}function Tn(n,r){for(var e=-1,t=n==null?0:n.length,f=0,i=[];++e<t;){var a=n[e];r(a,e,n)&&(i[f++]=a)}return i}function hn(){return[]}var cr=Object.prototype,br=cr.propertyIsEnumerable,z=Object.getOwnPropertySymbols,j=z?function(n){return n==null?[]:(n=Object(n),Tn(z(n),function(r){return br.call(n,r)}))}:hn;function dr(n,r){return x(n,j(n),r)}var pr=Object.getOwnPropertySymbols,wn=pr?function(n){for(var r=[];n;)K(r,j(n)),n=Cn(n);return r}:hn;function Ar(n,r){return x(n,wn(n),r)}function On(n,r,e){var t=r(n);return T(n)?t:K(t,e(n))}function G(n){return On(n,_,j)}function yr(n){return On(n,U,wn)}var Tr=Object.prototype,hr=Tr.hasOwnProperty;function wr(n){var r=n.length,e=new n.constructor(r);return r&&typeof n[0]=="string"&&hr.call(n,"index")&&(e.index=n.index,e.input=n.input),e}function Or(n,r){var e=r?on(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var _r=/\w*$/;function $r(n){var r=new n.constructor(n.source,_r.exec(n));return r.lastIndex=n.lastIndex,r}var V=w?w.prototype:void 0,k=V?V.valueOf:void 0;function Sr(n){return k?Object(k.call(n)):{}}var Er="[object Boolean]",Ir="[object Date]",Pr="[object Map]",vr="[object Number]",Lr="[object RegExp]",Rr="[object Set]",xr="[object String]",mr="[object Symbol]",Mr="[object ArrayBuffer]",Cr="[object DataView]",Fr="[object Float32Array]",Dr="[object Float64Array]",Gr="[object Int8Array]",Ur="[object Int16Array]",Br="[object Int32Array]",Nr="[object Uint8Array]",Kr="[object Uint8ClampedArray]",jr="[object Uint16Array]",Hr="[object Uint32Array]";function qr(n,r,e){var t=n.constructor;switch(r){case Mr:return on(n);case Er:case Ir:return new t(+n);case Cr:return Or(n,e);case Fr:case Dr:case Gr:case Ur:case Br:case Nr:case Kr:case jr:case Hr:return Fn(n,e);case Pr:return new t;case vr:case xr:return new t(n);case Lr:return $r(n);case Rr:return new t;case mr:return Sr(n)}}var Yr="[object Map]";function Zr(n){return S(n)&&E(n)==Yr}var nn=R&&R.isMap,Xr=nn?gn(nn):Zr,Jr="[object Set]";function Qr(n){return S(n)&&E(n)==Jr}var rn=R&&R.isSet,Wr=rn?gn(rn):Qr,zr=1,Vr=2,kr=4,_n="[object Arguments]",ne="[object Array]",re="[object Boolean]",ee="[object Date]",te="[object Error]",$n="[object Function]",ie="[object GeneratorFunction]",fe="[object Map]",ae="[object Number]",Sn="[object Object]",se="[object RegExp]",ue="[object Set]",oe="[object String]",ge="[object Symbol]",le="[object WeakMap]",ce="[object ArrayBuffer]",be="[object DataView]",de="[object Float32Array]",pe="[object Float64Array]",Ae="[object Int8Array]",ye="[object Int16Array]",Te="[object Int32Array]",he="[object Uint8Array]",we="[object Uint8ClampedArray]",Oe="[object Uint16Array]",_e="[object Uint32Array]",g={};g[_n]=g[ne]=g[ce]=g[be]=g[re]=g[ee]=g[de]=g[pe]=g[Ae]=g[ye]=g[Te]=g[fe]=g[ae]=g[Sn]=g[se]=g[ue]=g[oe]=g[ge]=g[he]=g[we]=g[Oe]=g[_e]=!0;g[te]=g[$n]=g[le]=!1;function C(n,r,e,t,f,i){var a,s=r&zr,u=r&Vr,b=r&kr;if(a!==void 0)return a;if(!ln(n))return n;var l=T(n);if(l){if(a=wr(n),!s)return Dn(n,a)}else{var o=E(n),c=o==$n||o==ie;if(D(n))return Gn(n,s);if(o==Sn||o==_n||c&&!f){if(a=u||c?{}:Un(n),!s)return u?Ar(n,lr(a,n)):dr(n,gr(a,n))}else{if(!g[o])return f?n:{};a=qr(n,o,s)}}i||(i=new $);var h=i.get(n);if(h)return h;i.set(n,a),Wr(n)?n.forEach(function(d){a.add(C(d,r,e,d,n,i))}):Xr(n)&&n.forEach(function(d,p){a.set(p,C(d,r,e,p,n,i))});var A=b?u?yr:G:u?U:_,y=l?void 0:A(n);return pn(y||n,function(d,p){y&&(p=d,d=n[p]),Bn(a,p,C(d,r,e,p,n,i))}),a}var $e="__lodash_hash_undefined__";function Se(n){return this.__data__.set(n,$e),this}function Ee(n){return this.__data__.has(n)}function I(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new Nn;++r<e;)this.add(n[r])}I.prototype.add=I.prototype.push=Se;I.prototype.has=Ee;function Ie(n,r){for(var e=-1,t=n==null?0:n.length;++e<t;)if(r(n[e],e,n))return!0;return!1}function En(n,r){return n.has(r)}var Pe=1,ve=2;function In(n,r,e,t,f,i){var a=e&Pe,s=n.length,u=r.length;if(s!=u&&!(a&&u>s))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new I:void 0;for(i.set(n,r),i.set(r,n);++o<s;){var A=n[o],y=r[o];if(t)var d=a?t(y,A,o,r,n,i):t(A,y,o,n,r,i);if(d!==void 0){if(d)continue;c=!1;break}if(h){if(!Ie(r,function(p,O){if(!En(h,O)&&(A===p||f(A,p,e,t,i)))return h.push(O)})){c=!1;break}}else if(!(A===y||f(A,y,e,t,i))){c=!1;break}}return i.delete(n),i.delete(r),c}function Le(n){var r=-1,e=Array(n.size);return n.forEach(function(t,f){e[++r]=[f,t]}),e}function H(n){var r=-1,e=Array(n.size);return n.forEach(function(t){e[++r]=t}),e}var Re=1,xe=2,me="[object Boolean]",Me="[object Date]",Ce="[object Error]",Fe="[object Map]",De="[object Number]",Ge="[object RegExp]",Ue="[object Set]",Be="[object String]",Ne="[object Symbol]",Ke="[object ArrayBuffer]",je="[object DataView]",en=w?w.prototype:void 0,F=en?en.valueOf:void 0;function He(n,r,e,t,f,i,a){switch(e){case je:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case Ke:return!(n.byteLength!=r.byteLength||!i(new X(n),new X(r)));case me:case Me:case De:return Kn(+n,+r);case Ce:return n.name==r.name&&n.message==r.message;case Ge:case Be:return n==r+"";case Fe:var s=Le;case Ue:var u=tℜif(s||(s=H),n.size!=r.size&&!u)return!1;var b=a.get(n);if(b)return b==r;t|=xe,a.set(n,r);var l=In(s(n),s(r),t,f,i,a);return a.delete(n),l;case Ne:if(F)return F.call(n)==F.call(r)}return!1}var qe=1,Ye=Object.prototype,Ze=Ye.hasOwnProperty;function Xe(n,r,e,t,f,i){var a=e&qe,s=G(n),u=s.length,b=G(r),l=b.length;if(u!=l&&!a)return!1;for(var o=u;o--;){var c=s[o];if(!(a?c in r:Ze.call(r,c)))return!1}var h=i.get(n),A=i.get(r);if(h&&A)return h==r&&A==n;var y=!0;i.set(n,r),i.set(r,n);for(var d=a;++o<u;){c=s[o];var p=n[c],O=r[c];if(t)var Z=a?t(O,p,c,r,n,i):t(p,O,c,n,r,i);if(!(Z===void 0?p===O||f(p,O,e,t,i):Z)){y=!1;break}d||(d=c=="constructor")}if(y&&!d){var P=n.constructor,v=r.constructor;P!=v&&"constructor"in n&&"constructor"in r&&!(typeof P=="function"&&P instanceof P&&typeof v=="function"&&v instanceof v)&&(y=!1)}return i.delete(n),i.delete(r),y}var Je=1,tn="[object Arguments]",fn="[object Array]",L="[object Object]",Qe=Object.prototype,an=Qe.hasOwnProperty;function We(n,r,e,t,f,i){var a=T(n),s=T(r),u=a?fn:E(n),b=s?fn:E(r);u=u==tn?L:u,b=b==tn?L:b;var l=u==L,o=b==L,c=u==b;if(c&&D(n)){if(!D(r))return!1;a=!0,l=!1}if(c&&!l)return i||(i=new $),a||jn(n)?In(n,r,e,t,f,i):He(n,r,u,e,t,f,i);if(!(e&Je)){var h=l&&an.call(n,"__wrapped__"),A=o&&an.call(r,"__wrapped__");if(h||A){var y=h?n.value():n,d=A?r.value():r;return i||(i=new $),f(y,d,e,t,i)}}return c?(i||(i=new $),Xe(n,r,e,t,f,i)):!1}function q(n,r,e,t,f){return n===r?!0:n==null||r==null||!S(n)&&!S(r)?n!==n&&r!==r:We(n,r,e,t,q,f)}var ze=1,Ve=2;function ke(n,r,e,t){var f=e.length,i=f;if(n==null)return!i;for(n=Object(n);f--;){var a=e[f];if(a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++f<i;){a=e[f];var s=a[0],u=n[s],b=a[1];if(a[2]){if(u===void 0&&!(s in n))return!1}else{var l=new $,o;if(!(o===void 0?q(b,u,ze|Ve,t,l):o))return!1}}return!0}function Pn(n){return n===n&&!ln(n)}function nt(n){for(var r=_(n),e=r.length;e--;){var t=r[e],f=n[t];r[e]=[t,f,Pn(f)]}return r}function vn(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function rt(n){var r=nt(n);return r.length==1&&r[0][2]?vn(r[0][0],r[0][1]):function(e){return e===n||ke(e,n,r)}}function et(n,r){return n!=null&&r in Object(n)}function tt(n,r,e){r=An(r,n);for(var t=-1,f=r.length,i=!1;++t<f;){var a=m(r[t]);if(!(i=n!=null&&e(n,a)))break;n=n[a]}return i||++t!=f?i:(f=n==null?0:n.length,!!f&&Hn(f)&&qn(a,f)&&(T(n)||un(n)))}function it(n,r){return n!=null&&tt(n,r,et)}var ft=1,at=2;function st(n,r){return N(n)&&Pn(r)?vn(m(n),r):function(e){var t=sr(e,n);return t===void 0&&t===r?it(e,n):q(r,t,ft|at)}}function ut(n){return function(r){return r==null?void 0:r[n]}}function ot(n){return function(r){return yn(r,n)}}function gt(n){return N(n)?ut(m(n)):ot(n)}function Ln(n){return typeof n=="function"?n:n==null?cn:typeof n=="object"?T(n)?st(n[0],n[1]):rt(n):gt(n)}function lt(n,r){return n&&Yn(n,r,_)}function ct(n,r){return function(e,t){if(e==null)return e;if(!sn(e))return n(e,t);for(var f=e.length,i=-1,a=Object(e);++i<f&&t(a[i],i,a)!==!1;);return e}}var Y=ct(lt);function bt(n){return typeof n=="function"?n:cn}function _t(n,r){var e=T(n)?pn:Y;return e(n,bt(r))}function dt(n,r){var e=[];return Y(n,function(t,f,i){r(t,f,i)&&e.push(t)}),e}function $t(n,r){var e=T(n)?Tn:dt;return e(n,Ln(r))}function pt(n,r){return bn(r,function(e){return n[e]})}function St(n){return n==null?[]:pt(n,_(n))}function Et(n){return n===void 0}function At(n,r,e,t,f){return f(n,function(i,a,s){e=t?(t=!1,i):r(e,i,a,s)}),e}function It(n,r,e){var t=T(n)?or:At,f=arguments.length<3;return t(n,Ln(r),e,f,Y)}var yt=1/0,Tt=M&&1/H(new M([,-0]))[1]==yt?function(n){return new M(n)}:Xn,ht=200;function Pt(n,r,e){var t=-1,f=Vn,i=n.length,a=!0,s=[],u=s;if(i>=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new I}else u=r?[]:s;n:for(;++t<i;){var l=n[t],o=r?r(l):l;if(l=l!==0?l:0,a&&o===o){for(var c=u.length;c--;)if(u[c]===o)continue n;r&&u.push(o),s.push(l)}else f(u,o,e)||(u!==s&&u.push(o),s.push(l))}return s}export{Tn as A,dt as B,Ie as C,Xn as D,I as S,Pt as a,C as b,Ot as c,_t as d,B as e,$t as f,Ln as g,Jn as h,Et as i,Y as j,_ as k,bn as l,tt as m,An as n,yn as o,bt as p,lt as q,It as r,it as s,m as t,ar as u,St as v,Vn as w,En as x,zn as y,yr as z};
|
|
@@ -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-Tmv8ZzzJ.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};
|