cc-viewer 1.6.85 → 1.6.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/assets/{App-X_ruh3WE.js → App-CvmmCs3e.js} +2 -2
  2. package/dist/assets/{AppHeader-CM2D7g6-.css → AppHeader-DzzIpqaB.css} +2 -2
  3. package/dist/assets/{AppHeader.module-C1N2FM8x.js → AppHeader.module-DqDRinBU.js} +93 -93
  4. package/dist/assets/{Mobile-ByUAEAvC.js → Mobile-B82qjeYO.js} +1 -1
  5. package/dist/assets/{_basePickBy-BHYjXkab.js → _basePickBy-DdZenSF6.js} +1 -1
  6. package/dist/assets/{_baseUniq-rnaXXt0J.js → _baseUniq-DuDDvwXo.js} +1 -1
  7. package/dist/assets/{arc-DCJW0b-X.js → arc-B7TY0q3f.js} +1 -1
  8. package/dist/assets/{architectureDiagram-2XIMDMQ5-OTsgvQa7.js → architectureDiagram-2XIMDMQ5-C3sdigFB.js} +1 -1
  9. package/dist/assets/{blockDiagram-WCTKOSBZ-D_aXpZ21.js → blockDiagram-WCTKOSBZ-B8IKxebY.js} +1 -1
  10. package/dist/assets/{c4Diagram-IC4MRINW-8EkZ8i0B.js → c4Diagram-IC4MRINW-BM36nXxk.js} +1 -1
  11. package/dist/assets/channel-BjTEg-_Z.js +1 -0
  12. package/dist/assets/{chunk-4BX2VUAB-GjIjHIbv.js → chunk-4BX2VUAB-Bkg7Gy-5.js} +1 -1
  13. package/dist/assets/{chunk-55IACEB6-Cpk-G88w.js → chunk-55IACEB6-Bbveelc8.js} +1 -1
  14. package/dist/assets/{chunk-FMBD7UC4-CNsCCGlD.js → chunk-FMBD7UC4-QnnJNZNr.js} +1 -1
  15. package/dist/assets/{chunk-JSJVCQXG-DEvFz84B.js → chunk-JSJVCQXG-BZN7Cg4U.js} +1 -1
  16. package/dist/assets/{chunk-KX2RTZJC-Cl15f7BP.js → chunk-KX2RTZJC-r2jNKnnA.js} +1 -1
  17. package/dist/assets/{chunk-NQ4KR5QH-D_qVMgzo.js → chunk-NQ4KR5QH-pQPP5ycL.js} +1 -1
  18. package/dist/assets/{chunk-QZHKN3VN-C6zbAyrW.js → chunk-QZHKN3VN-Dq6TJJ4e.js} +1 -1
  19. package/dist/assets/{chunk-WL4C6EOR-BaPmY9wV.js → chunk-WL4C6EOR-BcV66j9f.js} +1 -1
  20. package/dist/assets/classDiagram-VBA2DB6C-B9fo1Rkw.js +1 -0
  21. package/dist/assets/classDiagram-v2-RAHNMMFH-B9fo1Rkw.js +1 -0
  22. package/dist/assets/clone-ktktiVwF.js +1 -0
  23. package/dist/assets/{cose-bilkent-S5V4N54A-CzdzvEXw.js → cose-bilkent-S5V4N54A-B2aAdQZg.js} +1 -1
  24. package/dist/assets/{dagre-KLK3FWXG-CSvGuCuG.js → dagre-KLK3FWXG-BM37hOht.js} +1 -1
  25. package/dist/assets/{diagram-E7M64L7V-BiNjpTZ5.js → diagram-E7M64L7V-vtg_g-7D.js} +1 -1
  26. package/dist/assets/{diagram-IFDJBPK2-DA3rFxRq.js → diagram-IFDJBPK2-dVi17ogP.js} +1 -1
  27. package/dist/assets/{diagram-P4PSJMXO-Cm_6hDUF.js → diagram-P4PSJMXO-SDU8Jx0i.js} +1 -1
  28. package/dist/assets/{erDiagram-INFDFZHY-DFX7lcpY.js → erDiagram-INFDFZHY-C710HWEp.js} +1 -1
  29. package/dist/assets/{flowDiagram-PKNHOUZH-CjHRb1v3.js → flowDiagram-PKNHOUZH-B_Wcy97a.js} +1 -1
  30. package/dist/assets/{ganttDiagram-A5KZAMGK-8mY7q5yM.js → ganttDiagram-A5KZAMGK-C_iK-548.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-K3NZZRJ6-DK37rP3n.js → gitGraphDiagram-K3NZZRJ6-CTQiBR2p.js} +1 -1
  32. package/dist/assets/{graph-CZJp_np3.js → graph-BPeOBWPA.js} +1 -1
  33. package/dist/assets/{index-CqvdlM3G.css → index-BjzRig5H.css} +1 -1
  34. package/dist/assets/{index-Dl94G85d.js → index-D1L8Vg8a.js} +2 -2
  35. package/dist/assets/{infoDiagram-LFFYTUFH-WEdDkmTS.js → infoDiagram-LFFYTUFH-DJfb7A70.js} +1 -1
  36. package/dist/assets/{ishikawaDiagram-PHBUUO56-DPRwepiB.js → ishikawaDiagram-PHBUUO56-FVwBDtdj.js} +1 -1
  37. package/dist/assets/{journeyDiagram-4ABVD52K-D2tcrnVx.js → journeyDiagram-4ABVD52K-D2IRaolg.js} +1 -1
  38. package/dist/assets/{kanban-definition-K7BYSVSG-RfpYwWbR.js → kanban-definition-K7BYSVSG-Cle3vG1V.js} +1 -1
  39. package/dist/assets/{layout-C1CadpFE.js → layout-CKMRitTh.js} +1 -1
  40. package/dist/assets/{linear-CNvVSn_T.js → linear-9mMDURIS.js} +1 -1
  41. package/dist/assets/{mermaid.core-BzPPvM-R.js → mermaid.core-BOcMtFzm.js} +4 -4
  42. package/dist/assets/{mindmap-definition-YRQLILUH-BsfjgZ6b.js → mindmap-definition-YRQLILUH-rnpKyn9D.js} +1 -1
  43. package/dist/assets/{pieDiagram-SKSYHLDU-JnTQyh93.js → pieDiagram-SKSYHLDU-DFJlec2o.js} +1 -1
  44. package/dist/assets/{quadrantDiagram-337W2JSQ-BzO08npW.js → quadrantDiagram-337W2JSQ-BkSp2RhB.js} +1 -1
  45. package/dist/assets/{requirementDiagram-Z7DCOOCP-MQlKSz-i.js → requirementDiagram-Z7DCOOCP-FTnBhaYP.js} +1 -1
  46. package/dist/assets/{sankeyDiagram-WA2Y5GQK-CI12e6YP.js → sankeyDiagram-WA2Y5GQK-CKxtFO0m.js} +1 -1
  47. package/dist/assets/{sequenceDiagram-2WXFIKYE-B8felA2j.js → sequenceDiagram-2WXFIKYE-3UCOSOt3.js} +1 -1
  48. package/dist/assets/{stateDiagram-RAJIS63D-CHLBSTn6.js → stateDiagram-RAJIS63D-57wu1qG0.js} +1 -1
  49. package/dist/assets/stateDiagram-v2-FVOUBMTO-oNcq6FTW.js +1 -0
  50. package/dist/assets/{timeline-definition-YZTLITO2-BX6ml5eY.js → timeline-definition-YZTLITO2-DhgTnFh8.js} +1 -1
  51. package/dist/assets/{treemap-KZPCXAKY-7B8HHCcN.js → treemap-KZPCXAKY-BC-Yj7gq.js} +1 -1
  52. package/dist/assets/{vennDiagram-LZ73GAT5-DZtb0_NQ.js → vennDiagram-LZ73GAT5-Dh-PmlSl.js} +1 -1
  53. package/dist/assets/{xychartDiagram-JWTSCODW-PuOBc0iY.js → xychartDiagram-JWTSCODW-CuFUna5q.js} +1 -1
  54. package/dist/index.html +2 -2
  55. package/package.json +1 -1
  56. package/dist/assets/channel-D-plLImB.js +0 -1
  57. package/dist/assets/classDiagram-VBA2DB6C-CqyWSPxh.js +0 -1
  58. package/dist/assets/classDiagram-v2-RAHNMMFH-CqyWSPxh.js +0 -1
  59. package/dist/assets/clone-CcLFd6ur.js +0 -1
  60. package/dist/assets/stateDiagram-v2-FVOUBMTO-CIpjqwYi.js +0 -1
@@ -1,4 +1,4 @@
1
- var Ms=Object.defineProperty;var Es=(n,s,t)=>s in n?Ms(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var A=(n,s,t)=>Es(n,typeof s!="symbol"?s+"":s,t);import{r as j,R as q,j as e,a as Rs}from"./index-Dl94G85d.js";import{L as Is,M as Ls,_ as ie,c as ne,N as ot,P as Ps,Q as rt,d as jt,U as ye,V as Ct,W as st,X as bt,Y as As,Z as ft,$ as Bs,a0 as Nt,a1 as Os,g as Ds,m as Fs,u as Pe,a2 as $s,a3 as Hs,a4 as zs,a5 as Vs,a6 as Us,a7 as qs,a8 as Ws,a9 as _t,C as xt,I as xe,aa as Ks,ab as qt,ac as Gs,ad as Wt,ae as Js,af as Qs,ag as Ys,e as re,t as p,q as He,v as Xs,w as be,f as Zs,h as ea,j as ta,s as d,o as W,n as he,ah as Kt,ai as De,aj as J,ak as qe,al as Oe,k as sa,am as aa,l as ze,an as na,ao as je,S as Gt,B as F,ap as ia,aq as la,ar as Fe,as as oa,at as fe,au as St,av as Ae,y as ra,J as ca,aw as Jt,H as Be,ax as Ve,E as ct,ay as kt,G as dt,az as da,O as Qt,aA as ha,aB as ua,aC as ma,aD as we,aE as wt,aF as pa,aG as Tt,aH as Yt,aI as Xt,aJ as Te,aK as Me,aL as Zt,aM as at,aN as Mt,aO as Et,aP as Rt,aQ as ga,aR as fa,A as xa,aS as Ue,aT as It,aU as ya,z as va,x as E,D as ja,aV as Ca}from"./AppHeader.module-C1N2FM8x.js";var Lt=j.createContext(null),es=j.createContext({}),ba=["prefixCls","className","containerRef"],Na=function(s){var t=s.prefixCls,a=s.className,c=s.containerRef,i=Is(s,ba),u=j.useContext(es),g=u.panel,l=Ls(g,c);return j.createElement("div",ie({className:ne("".concat(t,"-content"),a),role:"dialog",ref:l},ot(s,{aria:!0}),{"aria-modal":"true"},i))};function Pt(n){return typeof n=="string"&&String(Number(n))===n?(Ps(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(n)):n}var At={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function _a(n,s){var t,a,c,i=n.prefixCls,u=n.open,g=n.placement,l=n.inline,h=n.push,o=n.forceRender,r=n.autoFocus,m=n.keyboard,v=n.classNames,x=n.rootClassName,f=n.rootStyle,y=n.zIndex,C=n.className,S=n.id,N=n.style,b=n.motion,T=n.width,R=n.height,B=n.children,L=n.mask,M=n.maskClosable,I=n.maskMotion,O=n.maskClassName,ee=n.maskStyle,te=n.afterOpenChange,V=n.onClose,K=n.onMouseEnter,ue=n.onMouseOver,k=n.onMouseLeave,z=n.onClick,le=n.onKeyDown,me=n.onKeyUp,G=n.styles,pe=n.drawerRender,oe=j.useRef(),ge=j.useRef(),ve=j.useRef();j.useImperativeHandle(s,function(){return oe.current});var se=function(ce){var Re=ce.keyCode,Ie=ce.shiftKey;switch(Re){case st.TAB:{if(Re===st.TAB){if(!Ie&&document.activeElement===ve.current){var Le;(Le=ge.current)===null||Le===void 0||Le.focus({preventScroll:!0})}else if(Ie&&document.activeElement===ge.current){var tt;(tt=ve.current)===null||tt===void 0||tt.focus({preventScroll:!0})}}break}case st.ESC:{V&&m&&(ce.stopPropagation(),V(ce));break}}};j.useEffect(function(){if(u&&r){var Z;(Z=oe.current)===null||Z===void 0||Z.focus({preventScroll:!0})}},[u]);var Y=j.useState(!1),D=rt(Y,2),X=D[0],ae=D[1],U=j.useContext(Lt),_e;typeof h=="boolean"?_e=h?{}:{distance:0}:_e=h||{};var Ce=(t=(a=(c=_e)===null||c===void 0?void 0:c.distance)!==null&&a!==void 0?a:U==null?void 0:U.pushDistance)!==null&&t!==void 0?t:180,_s=j.useMemo(function(){return{pushDistance:Ce,push:function(){ae(!0)},pull:function(){ae(!1)}}},[Ce]);j.useEffect(function(){if(u){var Z;U==null||(Z=U.push)===null||Z===void 0||Z.call(U)}else{var ce;U==null||(ce=U.pull)===null||ce===void 0||ce.call(U)}},[u]),j.useEffect(function(){return function(){var Z;U==null||(Z=U.pull)===null||Z===void 0||Z.call(U)}},[]);var Ss=j.createElement(jt,ie({key:"mask"},I,{visible:L&&u}),function(Z,ce){var Re=Z.className,Ie=Z.style;return j.createElement("div",{className:ne("".concat(i,"-mask"),Re,v==null?void 0:v.mask,O),style:ye(ye(ye({},Ie),ee),G==null?void 0:G.mask),onClick:M&&u?V:void 0,ref:ce})}),ks=typeof b=="function"?b(g):b,Se={};if(X&&Ce)switch(g){case"top":Se.transform="translateY(".concat(Ce,"px)");break;case"bottom":Se.transform="translateY(".concat(-Ce,"px)");break;case"left":Se.transform="translateX(".concat(Ce,"px)");break;default:Se.transform="translateX(".concat(-Ce,"px)");break}g==="left"||g==="right"?Se.width=Pt(T):Se.height=Pt(R);var ws={onMouseEnter:K,onMouseOver:ue,onMouseLeave:k,onClick:z,onKeyDown:le,onKeyUp:me},Ts=j.createElement(jt,ie({key:"panel"},ks,{visible:u,forceRender:o,onVisibleChanged:function(ce){te==null||te(ce)},removeOnLeave:!1,leavedClassName:"".concat(i,"-content-wrapper-hidden")}),function(Z,ce){var Re=Z.className,Ie=Z.style,Le=j.createElement(Na,ie({id:S,containerRef:ce,prefixCls:i,className:ne(C,v==null?void 0:v.content),style:ye(ye({},N),G==null?void 0:G.content)},ot(n,{aria:!0}),ws),B);return j.createElement("div",ie({className:ne("".concat(i,"-content-wrapper"),v==null?void 0:v.wrapper,Re),style:ye(ye(ye({},Se),Ie),G==null?void 0:G.wrapper)},ot(n,{data:!0})),pe?pe(Le):Le)}),vt=ye({},f);return y&&(vt.zIndex=y),j.createElement(Lt.Provider,{value:_s},j.createElement("div",{className:ne(i,"".concat(i,"-").concat(g),x,Ct(Ct({},"".concat(i,"-open"),u),"".concat(i,"-inline"),l)),style:vt,tabIndex:-1,ref:oe,onKeyDown:se},Ss,j.createElement("div",{tabIndex:0,ref:ge,style:At,"aria-hidden":"true","data-sentinel":"start"}),Ts,j.createElement("div",{tabIndex:0,ref:ve,style:At,"aria-hidden":"true","data-sentinel":"end"})))}var Sa=j.forwardRef(_a),ka=function(s){var t=s.open,a=t===void 0?!1:t,c=s.prefixCls,i=c===void 0?"rc-drawer":c,u=s.placement,g=u===void 0?"right":u,l=s.autoFocus,h=l===void 0?!0:l,o=s.keyboard,r=o===void 0?!0:o,m=s.width,v=m===void 0?378:m,x=s.mask,f=x===void 0?!0:x,y=s.maskClosable,C=y===void 0?!0:y,S=s.getContainer,N=s.forceRender,b=s.afterOpenChange,T=s.destroyOnClose,R=s.onMouseEnter,B=s.onMouseOver,L=s.onMouseLeave,M=s.onClick,I=s.onKeyDown,O=s.onKeyUp,ee=s.panelRef,te=j.useState(!1),V=rt(te,2),K=V[0],ue=V[1],k=j.useState(!1),z=rt(k,2),le=z[0],me=z[1];bt(function(){me(!0)},[]);var G=le?a:!1,pe=j.useRef(),oe=j.useRef();bt(function(){G&&(oe.current=document.activeElement)},[G]);var ge=function(X){var ae;if(ue(X),b==null||b(X),!X&&oe.current&&!((ae=pe.current)!==null&&ae!==void 0&&ae.contains(oe.current))){var U;(U=oe.current)===null||U===void 0||U.focus({preventScroll:!0})}},ve=j.useMemo(function(){return{panel:ee}},[ee]);if(!N&&!K&&!G&&T)return null;var se={onMouseEnter:R,onMouseOver:B,onMouseLeave:L,onClick:M,onKeyDown:I,onKeyUp:O},Y=ye(ye({},s),{},{open:G,prefixCls:i,placement:g,autoFocus:h,keyboard:r,width:v,mask:f,maskClosable:C,inline:S===!1,afterOpenChange:ge,ref:pe},se);return j.createElement(es.Provider,{value:ve},j.createElement(As,{open:G||N||K,autoDestroy:!1,getContainer:S,autoLock:f&&(G||K)},j.createElement(Sa,Y)))};const ts=n=>{var s,t;const{prefixCls:a,ariaId:c,title:i,footer:u,extra:g,closable:l,loading:h,onClose:o,headerStyle:r,bodyStyle:m,footerStyle:v,children:x,classNames:f,styles:y}=n,C=ft("drawer");let S;l===!1?S=void 0:l===void 0||l===!0?S="start":S=(l==null?void 0:l.placement)==="end"?"end":"start";const N=j.useCallback(L=>j.createElement("button",{type:"button",onClick:o,className:ne(`${a}-close`,{[`${a}-close-${S}`]:S==="end"})},L),[o,a,S]),[b,T]=Bs(Nt(n),Nt(C),{closable:!0,closeIconRender:N}),R=()=>{var L,M;return!i&&!b?null:j.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(L=C.styles)===null||L===void 0?void 0:L.header),r),y==null?void 0:y.header),className:ne(`${a}-header`,{[`${a}-header-close-only`]:b&&!i&&!g},(M=C.classNames)===null||M===void 0?void 0:M.header,f==null?void 0:f.header)},j.createElement("div",{className:`${a}-header-title`},S==="start"&&T,i&&j.createElement("div",{className:`${a}-title`,id:c},i)),g&&j.createElement("div",{className:`${a}-extra`},g),S==="end"&&T)},B=()=>{var L,M;if(!u)return null;const I=`${a}-footer`;return j.createElement("div",{className:ne(I,(L=C.classNames)===null||L===void 0?void 0:L.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign(Object.assign({},(M=C.styles)===null||M===void 0?void 0:M.footer),v),y==null?void 0:y.footer)},u)};return j.createElement(j.Fragment,null,R(),j.createElement("div",{className:ne(`${a}-body`,f==null?void 0:f.body,(s=C.classNames)===null||s===void 0?void 0:s.body),style:Object.assign(Object.assign(Object.assign({},(t=C.styles)===null||t===void 0?void 0:t.body),m),y==null?void 0:y.body)},h?j.createElement(Os,{active:!0,title:!1,paragraph:{rows:5},className:`${a}-body-skeleton`}):x),B())},wa=n=>{const s="100%";return{left:`translateX(-${s})`,right:`translateX(${s})`,top:`translateY(-${s})`,bottom:`translateY(${s})`}[n]},ss=(n,s)=>({"&-enter, &-appear":Object.assign(Object.assign({},n),{"&-active":s}),"&-leave":Object.assign(Object.assign({},s),{"&-active":n})}),as=(n,s)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${s}`}}},ss({opacity:n},{opacity:1})),Ta=(n,s)=>[as(.7,s),ss({transform:wa(n)},{transform:"none"})],Ma=n=>{const{componentCls:s,motionDurationSlow:t}=n;return{[s]:{[`${s}-mask-motion`]:as(0,t),[`${s}-panel-motion`]:["left","right","top","bottom"].reduce((a,c)=>Object.assign(Object.assign({},a),{[`&-${c}`]:Ta(c,t)}),{})}}},Ea=n=>{const{borderRadiusSM:s,componentCls:t,zIndexPopup:a,colorBgMask:c,colorBgElevated:i,motionDurationSlow:u,motionDurationMid:g,paddingXS:l,padding:h,paddingLG:o,fontSizeLG:r,lineHeightLG:m,lineWidth:v,lineType:x,colorSplit:f,marginXS:y,colorIcon:C,colorIconHover:S,colorBgTextHover:N,colorBgTextActive:b,colorText:T,fontWeightStrong:R,footerPaddingBlock:B,footerPaddingInline:L,calc:M}=n,I=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:T,"&-pure":{position:"relative",background:i,display:"flex",flexDirection:"column",[`&${t}-left`]:{boxShadow:n.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:n.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:n.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:n.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:a,background:c,pointerEvents:"auto"},[I]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:`all ${u}`,"&-hidden":{display:"none"}},[`&-left > ${I}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:n.boxShadowDrawerLeft},[`&-right > ${I}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:n.boxShadowDrawerRight},[`&-top > ${I}`]:{top:0,insetInline:0,boxShadow:n.boxShadowDrawerUp},[`&-bottom > ${I}`]:{bottom:0,insetInline:0,boxShadow:n.boxShadowDrawerDown},[`${t}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Pe(h)} ${Pe(o)}`,fontSize:r,lineHeight:m,borderBottom:`${Pe(v)} ${x} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:Object.assign({display:"inline-flex",width:M(r).add(l).equal(),height:M(r).add(l).equal(),borderRadius:s,justifyContent:"center",alignItems:"center",color:C,fontWeight:R,fontSize:r,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${g}`,textRendering:"auto",[`&${t}-close-end`]:{marginInlineStart:y},[`&:not(${t}-close-end)`]:{marginInlineEnd:y},"&:hover":{color:S,backgroundColor:N,textDecoration:"none"},"&:active":{backgroundColor:b}},$s(n)),[`${t}-title`]:{flex:1,margin:0,fontWeight:n.fontWeightStrong,fontSize:r,lineHeight:m},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:o,overflow:"auto",[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${t}-footer`]:{flexShrink:0,padding:`${Pe(B)} ${Pe(L)}`,borderTop:`${Pe(v)} ${x} ${f}`},"&-rtl":{direction:"rtl"}}}},Ra=n=>({zIndexPopup:n.zIndexPopupBase,footerPaddingBlock:n.paddingXS,footerPaddingInline:n.padding}),ns=Ds("Drawer",n=>{const s=Fs(n,{});return[Ea(s),Ma(s)]},Ra);var is=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)s.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(t[a[c]]=n[a[c]]);return t};const Ia={distance:180},We=n=>{const{rootClassName:s,width:t,height:a,size:c="default",mask:i=!0,push:u=Ia,open:g,afterOpenChange:l,onClose:h,prefixCls:o,getContainer:r,panelRef:m=null,style:v,className:x,"aria-labelledby":f,visible:y,afterVisibleChange:C,maskStyle:S,drawerStyle:N,contentWrapperStyle:b,destroyOnClose:T,destroyOnHidden:R}=n,B=is(n,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),L=Hs(),M=B.title?L:void 0,{getPopupContainer:I,getPrefixCls:O,direction:ee,className:te,style:V,classNames:K,styles:ue}=ft("drawer"),k=O("drawer",o),[z,le,me]=ns(k),G=r===void 0&&I?()=>I(document.body):r,pe=ne({"no-mask":!i,[`${k}-rtl`]:ee==="rtl"},s,le,me),oe=j.useMemo(()=>t??(c==="large"?736:378),[t,c]),ge=j.useMemo(()=>a??(c==="large"?736:378),[a,c]),ve={motionName:_t(k,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},se=Ce=>({motionName:_t(k,`panel-motion-${Ce}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Y=zs(),D=Vs(m,Y),[X,ae]=Us("Drawer",B.zIndex),{classNames:U={},styles:_e={}}=B;return z(j.createElement(qs,{form:!0,space:!0},j.createElement(Ws.Provider,{value:ae},j.createElement(ka,Object.assign({prefixCls:k,onClose:h,maskMotion:ve,motion:se},B,{classNames:{mask:ne(U.mask,K.mask),content:ne(U.content,K.content),wrapper:ne(U.wrapper,K.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},_e.mask),S),ue.mask),content:Object.assign(Object.assign(Object.assign({},_e.content),N),ue.content),wrapper:Object.assign(Object.assign(Object.assign({},_e.wrapper),b),ue.wrapper)},open:g??y,mask:i,push:u,width:oe,height:ge,style:Object.assign(Object.assign({},V),v),className:ne(te,x),rootClassName:pe,getContainer:G,afterOpenChange:l??C,panelRef:D,zIndex:X,"aria-labelledby":f??M,destroyOnClose:R??T}),j.createElement(ts,Object.assign({prefixCls:k},B,{ariaId:M,onClose:h}))))))},La=n=>{const{prefixCls:s,style:t,className:a,placement:c="right"}=n,i=is(n,["prefixCls","style","className","placement"]),{getPrefixCls:u}=j.useContext(xt),g=u("drawer",s),[l,h,o]=ns(g),r=ne(g,`${g}-pure`,`${g}-${c}`,h,o,a);return l(j.createElement("div",{className:r,style:t},j.createElement(ts,Object.assign({prefixCls:g},i))))};We._InternalPanelDoNotUseOrYouWillBeFired=La;var Pa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},Aa=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Pa}))},Ke=j.forwardRef(Aa),Ba={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Oa=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Ba}))},Bt=j.forwardRef(Oa);function Da(n,s,t){return typeof t=="boolean"?t:n.length?!0:Ks(s).some(c=>c.type===qt)}var ls=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)s.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(t[a[c]]=n[a[c]]);return t};function et({suffixCls:n,tagName:s,displayName:t}){return a=>j.forwardRef((i,u)=>j.createElement(a,Object.assign({ref:u,suffixCls:n,tagName:s},i)))}const yt=j.forwardRef((n,s)=>{const{prefixCls:t,suffixCls:a,className:c,tagName:i}=n,u=ls(n,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:g}=j.useContext(xt),l=g("layout",t),[h,o,r]=Wt(l),m=a?`${l}-${a}`:l;return h(j.createElement(i,Object.assign({className:ne(t||m,c,o,r),ref:s},u)))}),Fa=j.forwardRef((n,s)=>{const{direction:t}=j.useContext(xt),[a,c]=j.useState([]),{prefixCls:i,className:u,rootClassName:g,children:l,hasSider:h,tagName:o,style:r}=n,m=ls(n,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),v=Gs(m,["suffixCls"]),{getPrefixCls:x,className:f,style:y}=ft("layout"),C=x("layout",i),S=Da(a,l,h),[N,b,T]=Wt(C),R=ne(C,{[`${C}-has-sider`]:S,[`${C}-rtl`]:t==="rtl"},f,u,g,b,T),B=j.useMemo(()=>({siderHook:{addSider:L=>{c(M=>[].concat(Js(M),[L]))},removeSider:L=>{c(M=>M.filter(I=>I!==L))}}}),[]);return N(j.createElement(Qs.Provider,{value:B},j.createElement(o,Object.assign({ref:s,className:R,style:Object.assign(Object.assign({},y),r)},v),l)))}),$a=et({tagName:"div",displayName:"Layout"})(Fa),Ha=et({suffixCls:"header",tagName:"header",displayName:"Header"})(yt),za=et({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(yt),Va=et({suffixCls:"content",tagName:"main",displayName:"Content"})(yt),Ne=$a;Ne.Header=Ha;Ne.Footer=za;Ne.Content=Va;Ne.Sider=qt;Ne._InternalSiderContext=Ys;var Ua={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},qa=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Ua}))},Ot=j.forwardRef(qa),Wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},Ka=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Wa}))},Dt=j.forwardRef(Ka),Ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},Ja=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Ga}))},Ft=j.forwardRef(Ja),Qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},Ya=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Qa}))},Ge=j.forwardRef(Ya),Xa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},Za=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Xa}))},nt=j.forwardRef(Za),en={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},tn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:en}))},sn=j.forwardRef(tn),an={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},nn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:an}))},ln=j.forwardRef(nn),on={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},rn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:on}))},$t=j.forwardRef(rn),cn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},dn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:cn}))},Ht=j.forwardRef(dn),hn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},un=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:hn}))},zt=j.forwardRef(un),mn=Object.defineProperty,Je=Object.getOwnPropertySymbols,os=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,Vt=(n,s,t)=>s in n?mn(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,ht=(n,s)=>{for(var t in s||(s={}))os.call(s,t)&&Vt(n,t,s[t]);if(Je)for(var t of Je(s))rs.call(s,t)&&Vt(n,t,s[t]);return n},ut=(n,s)=>{var t={};for(var a in n)os.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Je)for(var a of Je(n))s.indexOf(a)<0&&rs.call(n,a)&&(t[a]=n[a]);return t};/**
1
+ var Ms=Object.defineProperty;var Es=(n,s,t)=>s in n?Ms(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var A=(n,s,t)=>Es(n,typeof s!="symbol"?s+"":s,t);import{r as j,R as q,j as e,a as Rs}from"./index-D1L8Vg8a.js";import{L as Is,M as Ls,_ as ie,c as ne,N as ot,P as Ps,Q as rt,d as jt,U as ye,V as Ct,W as st,X as bt,Y as As,Z as ft,$ as Bs,a0 as Nt,a1 as Os,g as Ds,m as Fs,u as Pe,a2 as $s,a3 as Hs,a4 as zs,a5 as Vs,a6 as Us,a7 as qs,a8 as Ws,a9 as _t,C as xt,I as xe,aa as Ks,ab as qt,ac as Gs,ad as Wt,ae as Js,af as Qs,ag as Ys,e as re,t as p,q as He,v as Xs,w as be,f as Zs,h as ea,j as ta,s as d,o as W,n as he,ah as Kt,ai as De,aj as J,ak as qe,al as Oe,k as sa,am as aa,l as ze,an as na,ao as je,S as Gt,B as F,ap as ia,aq as la,ar as Fe,as as oa,at as fe,au as St,av as Ae,y as ra,J as ca,aw as Jt,H as Be,ax as Ve,E as ct,ay as kt,G as dt,az as da,O as Qt,aA as ha,aB as ua,aC as ma,aD as we,aE as wt,aF as pa,aG as Tt,aH as Yt,aI as Xt,aJ as Te,aK as Me,aL as Zt,aM as at,aN as Mt,aO as Et,aP as Rt,aQ as ga,aR as fa,A as xa,aS as Ue,aT as It,aU as ya,z as va,x as E,D as ja,aV as Ca}from"./AppHeader.module-DqDRinBU.js";var Lt=j.createContext(null),es=j.createContext({}),ba=["prefixCls","className","containerRef"],Na=function(s){var t=s.prefixCls,a=s.className,c=s.containerRef,i=Is(s,ba),u=j.useContext(es),g=u.panel,l=Ls(g,c);return j.createElement("div",ie({className:ne("".concat(t,"-content"),a),role:"dialog",ref:l},ot(s,{aria:!0}),{"aria-modal":"true"},i))};function Pt(n){return typeof n=="string"&&String(Number(n))===n?(Ps(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(n)):n}var At={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function _a(n,s){var t,a,c,i=n.prefixCls,u=n.open,g=n.placement,l=n.inline,h=n.push,o=n.forceRender,r=n.autoFocus,m=n.keyboard,v=n.classNames,x=n.rootClassName,f=n.rootStyle,y=n.zIndex,C=n.className,S=n.id,N=n.style,b=n.motion,T=n.width,R=n.height,B=n.children,L=n.mask,M=n.maskClosable,I=n.maskMotion,O=n.maskClassName,ee=n.maskStyle,te=n.afterOpenChange,V=n.onClose,K=n.onMouseEnter,ue=n.onMouseOver,k=n.onMouseLeave,z=n.onClick,le=n.onKeyDown,me=n.onKeyUp,G=n.styles,pe=n.drawerRender,oe=j.useRef(),ge=j.useRef(),ve=j.useRef();j.useImperativeHandle(s,function(){return oe.current});var se=function(ce){var Re=ce.keyCode,Ie=ce.shiftKey;switch(Re){case st.TAB:{if(Re===st.TAB){if(!Ie&&document.activeElement===ve.current){var Le;(Le=ge.current)===null||Le===void 0||Le.focus({preventScroll:!0})}else if(Ie&&document.activeElement===ge.current){var tt;(tt=ve.current)===null||tt===void 0||tt.focus({preventScroll:!0})}}break}case st.ESC:{V&&m&&(ce.stopPropagation(),V(ce));break}}};j.useEffect(function(){if(u&&r){var Z;(Z=oe.current)===null||Z===void 0||Z.focus({preventScroll:!0})}},[u]);var Y=j.useState(!1),D=rt(Y,2),X=D[0],ae=D[1],U=j.useContext(Lt),_e;typeof h=="boolean"?_e=h?{}:{distance:0}:_e=h||{};var Ce=(t=(a=(c=_e)===null||c===void 0?void 0:c.distance)!==null&&a!==void 0?a:U==null?void 0:U.pushDistance)!==null&&t!==void 0?t:180,_s=j.useMemo(function(){return{pushDistance:Ce,push:function(){ae(!0)},pull:function(){ae(!1)}}},[Ce]);j.useEffect(function(){if(u){var Z;U==null||(Z=U.push)===null||Z===void 0||Z.call(U)}else{var ce;U==null||(ce=U.pull)===null||ce===void 0||ce.call(U)}},[u]),j.useEffect(function(){return function(){var Z;U==null||(Z=U.pull)===null||Z===void 0||Z.call(U)}},[]);var Ss=j.createElement(jt,ie({key:"mask"},I,{visible:L&&u}),function(Z,ce){var Re=Z.className,Ie=Z.style;return j.createElement("div",{className:ne("".concat(i,"-mask"),Re,v==null?void 0:v.mask,O),style:ye(ye(ye({},Ie),ee),G==null?void 0:G.mask),onClick:M&&u?V:void 0,ref:ce})}),ks=typeof b=="function"?b(g):b,Se={};if(X&&Ce)switch(g){case"top":Se.transform="translateY(".concat(Ce,"px)");break;case"bottom":Se.transform="translateY(".concat(-Ce,"px)");break;case"left":Se.transform="translateX(".concat(Ce,"px)");break;default:Se.transform="translateX(".concat(-Ce,"px)");break}g==="left"||g==="right"?Se.width=Pt(T):Se.height=Pt(R);var ws={onMouseEnter:K,onMouseOver:ue,onMouseLeave:k,onClick:z,onKeyDown:le,onKeyUp:me},Ts=j.createElement(jt,ie({key:"panel"},ks,{visible:u,forceRender:o,onVisibleChanged:function(ce){te==null||te(ce)},removeOnLeave:!1,leavedClassName:"".concat(i,"-content-wrapper-hidden")}),function(Z,ce){var Re=Z.className,Ie=Z.style,Le=j.createElement(Na,ie({id:S,containerRef:ce,prefixCls:i,className:ne(C,v==null?void 0:v.content),style:ye(ye({},N),G==null?void 0:G.content)},ot(n,{aria:!0}),ws),B);return j.createElement("div",ie({className:ne("".concat(i,"-content-wrapper"),v==null?void 0:v.wrapper,Re),style:ye(ye(ye({},Se),Ie),G==null?void 0:G.wrapper)},ot(n,{data:!0})),pe?pe(Le):Le)}),vt=ye({},f);return y&&(vt.zIndex=y),j.createElement(Lt.Provider,{value:_s},j.createElement("div",{className:ne(i,"".concat(i,"-").concat(g),x,Ct(Ct({},"".concat(i,"-open"),u),"".concat(i,"-inline"),l)),style:vt,tabIndex:-1,ref:oe,onKeyDown:se},Ss,j.createElement("div",{tabIndex:0,ref:ge,style:At,"aria-hidden":"true","data-sentinel":"start"}),Ts,j.createElement("div",{tabIndex:0,ref:ve,style:At,"aria-hidden":"true","data-sentinel":"end"})))}var Sa=j.forwardRef(_a),ka=function(s){var t=s.open,a=t===void 0?!1:t,c=s.prefixCls,i=c===void 0?"rc-drawer":c,u=s.placement,g=u===void 0?"right":u,l=s.autoFocus,h=l===void 0?!0:l,o=s.keyboard,r=o===void 0?!0:o,m=s.width,v=m===void 0?378:m,x=s.mask,f=x===void 0?!0:x,y=s.maskClosable,C=y===void 0?!0:y,S=s.getContainer,N=s.forceRender,b=s.afterOpenChange,T=s.destroyOnClose,R=s.onMouseEnter,B=s.onMouseOver,L=s.onMouseLeave,M=s.onClick,I=s.onKeyDown,O=s.onKeyUp,ee=s.panelRef,te=j.useState(!1),V=rt(te,2),K=V[0],ue=V[1],k=j.useState(!1),z=rt(k,2),le=z[0],me=z[1];bt(function(){me(!0)},[]);var G=le?a:!1,pe=j.useRef(),oe=j.useRef();bt(function(){G&&(oe.current=document.activeElement)},[G]);var ge=function(X){var ae;if(ue(X),b==null||b(X),!X&&oe.current&&!((ae=pe.current)!==null&&ae!==void 0&&ae.contains(oe.current))){var U;(U=oe.current)===null||U===void 0||U.focus({preventScroll:!0})}},ve=j.useMemo(function(){return{panel:ee}},[ee]);if(!N&&!K&&!G&&T)return null;var se={onMouseEnter:R,onMouseOver:B,onMouseLeave:L,onClick:M,onKeyDown:I,onKeyUp:O},Y=ye(ye({},s),{},{open:G,prefixCls:i,placement:g,autoFocus:h,keyboard:r,width:v,mask:f,maskClosable:C,inline:S===!1,afterOpenChange:ge,ref:pe},se);return j.createElement(es.Provider,{value:ve},j.createElement(As,{open:G||N||K,autoDestroy:!1,getContainer:S,autoLock:f&&(G||K)},j.createElement(Sa,Y)))};const ts=n=>{var s,t;const{prefixCls:a,ariaId:c,title:i,footer:u,extra:g,closable:l,loading:h,onClose:o,headerStyle:r,bodyStyle:m,footerStyle:v,children:x,classNames:f,styles:y}=n,C=ft("drawer");let S;l===!1?S=void 0:l===void 0||l===!0?S="start":S=(l==null?void 0:l.placement)==="end"?"end":"start";const N=j.useCallback(L=>j.createElement("button",{type:"button",onClick:o,className:ne(`${a}-close`,{[`${a}-close-${S}`]:S==="end"})},L),[o,a,S]),[b,T]=Bs(Nt(n),Nt(C),{closable:!0,closeIconRender:N}),R=()=>{var L,M;return!i&&!b?null:j.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(L=C.styles)===null||L===void 0?void 0:L.header),r),y==null?void 0:y.header),className:ne(`${a}-header`,{[`${a}-header-close-only`]:b&&!i&&!g},(M=C.classNames)===null||M===void 0?void 0:M.header,f==null?void 0:f.header)},j.createElement("div",{className:`${a}-header-title`},S==="start"&&T,i&&j.createElement("div",{className:`${a}-title`,id:c},i)),g&&j.createElement("div",{className:`${a}-extra`},g),S==="end"&&T)},B=()=>{var L,M;if(!u)return null;const I=`${a}-footer`;return j.createElement("div",{className:ne(I,(L=C.classNames)===null||L===void 0?void 0:L.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign(Object.assign({},(M=C.styles)===null||M===void 0?void 0:M.footer),v),y==null?void 0:y.footer)},u)};return j.createElement(j.Fragment,null,R(),j.createElement("div",{className:ne(`${a}-body`,f==null?void 0:f.body,(s=C.classNames)===null||s===void 0?void 0:s.body),style:Object.assign(Object.assign(Object.assign({},(t=C.styles)===null||t===void 0?void 0:t.body),m),y==null?void 0:y.body)},h?j.createElement(Os,{active:!0,title:!1,paragraph:{rows:5},className:`${a}-body-skeleton`}):x),B())},wa=n=>{const s="100%";return{left:`translateX(-${s})`,right:`translateX(${s})`,top:`translateY(-${s})`,bottom:`translateY(${s})`}[n]},ss=(n,s)=>({"&-enter, &-appear":Object.assign(Object.assign({},n),{"&-active":s}),"&-leave":Object.assign(Object.assign({},s),{"&-active":n})}),as=(n,s)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${s}`}}},ss({opacity:n},{opacity:1})),Ta=(n,s)=>[as(.7,s),ss({transform:wa(n)},{transform:"none"})],Ma=n=>{const{componentCls:s,motionDurationSlow:t}=n;return{[s]:{[`${s}-mask-motion`]:as(0,t),[`${s}-panel-motion`]:["left","right","top","bottom"].reduce((a,c)=>Object.assign(Object.assign({},a),{[`&-${c}`]:Ta(c,t)}),{})}}},Ea=n=>{const{borderRadiusSM:s,componentCls:t,zIndexPopup:a,colorBgMask:c,colorBgElevated:i,motionDurationSlow:u,motionDurationMid:g,paddingXS:l,padding:h,paddingLG:o,fontSizeLG:r,lineHeightLG:m,lineWidth:v,lineType:x,colorSplit:f,marginXS:y,colorIcon:C,colorIconHover:S,colorBgTextHover:N,colorBgTextActive:b,colorText:T,fontWeightStrong:R,footerPaddingBlock:B,footerPaddingInline:L,calc:M}=n,I=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:T,"&-pure":{position:"relative",background:i,display:"flex",flexDirection:"column",[`&${t}-left`]:{boxShadow:n.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:n.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:n.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:n.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:a,background:c,pointerEvents:"auto"},[I]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:`all ${u}`,"&-hidden":{display:"none"}},[`&-left > ${I}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:n.boxShadowDrawerLeft},[`&-right > ${I}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:n.boxShadowDrawerRight},[`&-top > ${I}`]:{top:0,insetInline:0,boxShadow:n.boxShadowDrawerUp},[`&-bottom > ${I}`]:{bottom:0,insetInline:0,boxShadow:n.boxShadowDrawerDown},[`${t}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Pe(h)} ${Pe(o)}`,fontSize:r,lineHeight:m,borderBottom:`${Pe(v)} ${x} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:Object.assign({display:"inline-flex",width:M(r).add(l).equal(),height:M(r).add(l).equal(),borderRadius:s,justifyContent:"center",alignItems:"center",color:C,fontWeight:R,fontSize:r,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${g}`,textRendering:"auto",[`&${t}-close-end`]:{marginInlineStart:y},[`&:not(${t}-close-end)`]:{marginInlineEnd:y},"&:hover":{color:S,backgroundColor:N,textDecoration:"none"},"&:active":{backgroundColor:b}},$s(n)),[`${t}-title`]:{flex:1,margin:0,fontWeight:n.fontWeightStrong,fontSize:r,lineHeight:m},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:o,overflow:"auto",[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${t}-footer`]:{flexShrink:0,padding:`${Pe(B)} ${Pe(L)}`,borderTop:`${Pe(v)} ${x} ${f}`},"&-rtl":{direction:"rtl"}}}},Ra=n=>({zIndexPopup:n.zIndexPopupBase,footerPaddingBlock:n.paddingXS,footerPaddingInline:n.padding}),ns=Ds("Drawer",n=>{const s=Fs(n,{});return[Ea(s),Ma(s)]},Ra);var is=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)s.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(t[a[c]]=n[a[c]]);return t};const Ia={distance:180},We=n=>{const{rootClassName:s,width:t,height:a,size:c="default",mask:i=!0,push:u=Ia,open:g,afterOpenChange:l,onClose:h,prefixCls:o,getContainer:r,panelRef:m=null,style:v,className:x,"aria-labelledby":f,visible:y,afterVisibleChange:C,maskStyle:S,drawerStyle:N,contentWrapperStyle:b,destroyOnClose:T,destroyOnHidden:R}=n,B=is(n,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),L=Hs(),M=B.title?L:void 0,{getPopupContainer:I,getPrefixCls:O,direction:ee,className:te,style:V,classNames:K,styles:ue}=ft("drawer"),k=O("drawer",o),[z,le,me]=ns(k),G=r===void 0&&I?()=>I(document.body):r,pe=ne({"no-mask":!i,[`${k}-rtl`]:ee==="rtl"},s,le,me),oe=j.useMemo(()=>t??(c==="large"?736:378),[t,c]),ge=j.useMemo(()=>a??(c==="large"?736:378),[a,c]),ve={motionName:_t(k,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},se=Ce=>({motionName:_t(k,`panel-motion-${Ce}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Y=zs(),D=Vs(m,Y),[X,ae]=Us("Drawer",B.zIndex),{classNames:U={},styles:_e={}}=B;return z(j.createElement(qs,{form:!0,space:!0},j.createElement(Ws.Provider,{value:ae},j.createElement(ka,Object.assign({prefixCls:k,onClose:h,maskMotion:ve,motion:se},B,{classNames:{mask:ne(U.mask,K.mask),content:ne(U.content,K.content),wrapper:ne(U.wrapper,K.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},_e.mask),S),ue.mask),content:Object.assign(Object.assign(Object.assign({},_e.content),N),ue.content),wrapper:Object.assign(Object.assign(Object.assign({},_e.wrapper),b),ue.wrapper)},open:g??y,mask:i,push:u,width:oe,height:ge,style:Object.assign(Object.assign({},V),v),className:ne(te,x),rootClassName:pe,getContainer:G,afterOpenChange:l??C,panelRef:D,zIndex:X,"aria-labelledby":f??M,destroyOnClose:R??T}),j.createElement(ts,Object.assign({prefixCls:k},B,{ariaId:M,onClose:h}))))))},La=n=>{const{prefixCls:s,style:t,className:a,placement:c="right"}=n,i=is(n,["prefixCls","style","className","placement"]),{getPrefixCls:u}=j.useContext(xt),g=u("drawer",s),[l,h,o]=ns(g),r=ne(g,`${g}-pure`,`${g}-${c}`,h,o,a);return l(j.createElement("div",{className:r,style:t},j.createElement(ts,Object.assign({prefixCls:g},i))))};We._InternalPanelDoNotUseOrYouWillBeFired=La;var Pa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},Aa=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Pa}))},Ke=j.forwardRef(Aa),Ba={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Oa=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Ba}))},Bt=j.forwardRef(Oa);function Da(n,s,t){return typeof t=="boolean"?t:n.length?!0:Ks(s).some(c=>c.type===qt)}var ls=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)s.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(t[a[c]]=n[a[c]]);return t};function et({suffixCls:n,tagName:s,displayName:t}){return a=>j.forwardRef((i,u)=>j.createElement(a,Object.assign({ref:u,suffixCls:n,tagName:s},i)))}const yt=j.forwardRef((n,s)=>{const{prefixCls:t,suffixCls:a,className:c,tagName:i}=n,u=ls(n,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:g}=j.useContext(xt),l=g("layout",t),[h,o,r]=Wt(l),m=a?`${l}-${a}`:l;return h(j.createElement(i,Object.assign({className:ne(t||m,c,o,r),ref:s},u)))}),Fa=j.forwardRef((n,s)=>{const{direction:t}=j.useContext(xt),[a,c]=j.useState([]),{prefixCls:i,className:u,rootClassName:g,children:l,hasSider:h,tagName:o,style:r}=n,m=ls(n,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),v=Gs(m,["suffixCls"]),{getPrefixCls:x,className:f,style:y}=ft("layout"),C=x("layout",i),S=Da(a,l,h),[N,b,T]=Wt(C),R=ne(C,{[`${C}-has-sider`]:S,[`${C}-rtl`]:t==="rtl"},f,u,g,b,T),B=j.useMemo(()=>({siderHook:{addSider:L=>{c(M=>[].concat(Js(M),[L]))},removeSider:L=>{c(M=>M.filter(I=>I!==L))}}}),[]);return N(j.createElement(Qs.Provider,{value:B},j.createElement(o,Object.assign({ref:s,className:R,style:Object.assign(Object.assign({},y),r)},v),l)))}),$a=et({tagName:"div",displayName:"Layout"})(Fa),Ha=et({suffixCls:"header",tagName:"header",displayName:"Header"})(yt),za=et({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(yt),Va=et({suffixCls:"content",tagName:"main",displayName:"Content"})(yt),Ne=$a;Ne.Header=Ha;Ne.Footer=za;Ne.Content=Va;Ne.Sider=qt;Ne._InternalSiderContext=Ys;var Ua={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},qa=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Ua}))},Ot=j.forwardRef(qa),Wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},Ka=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Wa}))},Dt=j.forwardRef(Ka),Ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},Ja=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Ga}))},Ft=j.forwardRef(Ja),Qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},Ya=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Qa}))},Ge=j.forwardRef(Ya),Xa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},Za=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:Xa}))},nt=j.forwardRef(Za),en={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},tn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:en}))},sn=j.forwardRef(tn),an={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},nn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:an}))},ln=j.forwardRef(nn),on={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},rn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:on}))},$t=j.forwardRef(rn),cn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},dn=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:cn}))},Ht=j.forwardRef(dn),hn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},un=function(s,t){return j.createElement(xe,ie({},s,{ref:t,icon:hn}))},zt=j.forwardRef(un),mn=Object.defineProperty,Je=Object.getOwnPropertySymbols,os=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,Vt=(n,s,t)=>s in n?mn(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,ht=(n,s)=>{for(var t in s||(s={}))os.call(s,t)&&Vt(n,t,s[t]);if(Je)for(var t of Je(s))rs.call(s,t)&&Vt(n,t,s[t]);return n},ut=(n,s)=>{var t={};for(var a in n)os.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Je)for(var a of Je(n))s.indexOf(a)<0&&rs.call(n,a)&&(t[a]=n[a]);return t};/**
2
2
  * @license QR Code generator library (TypeScript)
3
3
  * Copyright (c) Project Nayuki.
4
4
  * SPDX-License-Identifier: MIT
@@ -23,7 +23,7 @@ var Ms=Object.defineProperty;var Es=(n,s,t)=>s in n?Ms(n,s,{enumerable:!0,config
23
23
  `))}return a.join(`
24
24
 
25
25
 
26
- `)}renderProjectStatsContent(){const{projectStats:t,projectStatsLoading:a}=this.state;if(a)return e.jsx("div",{className:d.projectStatsCenter,children:e.jsx(Gt,{})});if(!t)return e.jsx("div",{className:d.projectStatsEmpty,children:p("ui.projectStats.noData")});const{summary:c,models:i,updatedAt:u}=t;i&&Object.entries(i).sort((h,o)=>o[1]-h[1]);const g={};if(t.files){for(const h of Object.values(t.files))if(h.models)for(const[o,r]of Object.entries(h.models))g[o]||(g[o]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),g[o].input+=r.input_tokens||0,g[o].output+=r.output_tokens||0,g[o].cacheRead+=r.cache_read_input_tokens||0,g[o].cacheCreation+=r.cache_creation_input_tokens||0,g[o].count+=r.count||0}const l=Object.entries(g).sort((h,o)=>o[1].count-h[1].count);return e.jsxs("div",{className:d.projectStatsContent,children:[u&&e.jsx("div",{className:d.projectStatsUpdated,children:p("ui.projectStats.updatedAt",{time:new Date(u).toLocaleString()})}),e.jsxs("div",{className:d.projectStatsSummary,children:[e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:(c==null?void 0:c.requestCount)??0}),e.jsx("div",{className:d.projectStatLabel,children:p("ui.projectStats.totalRequests")})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:(c==null?void 0:c.turnCount)??(c==null?void 0:c.sessionCount)??0}),e.jsx("div",{className:d.projectStatLabel,children:p("ui.projectStats.turnCount")})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:(c==null?void 0:c.fileCount)??0}),e.jsx("div",{className:d.projectStatLabel,children:p("ui.projectStats.totalFiles")})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:W(c==null?void 0:c.input_tokens)}),e.jsx("div",{className:d.projectStatLabel,children:"Input Tokens"})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:W(c==null?void 0:c.output_tokens)}),e.jsx("div",{className:d.projectStatLabel,children:"Output Tokens"})]})]}),l.length>0&&e.jsxs("div",{className:d.projectStatsSection,children:[e.jsx("div",{className:d.projectStatsSectionTitle,children:p("ui.projectStats.modelUsage")}),l.map(([h,o])=>{const r=o.input+o.cacheRead+o.cacheCreation,m=r>0?(o.cacheRead/r*100).toFixed(1):"0.0";return e.jsxs("div",{className:d.projectStatsModelCard,children:[e.jsxs("div",{className:d.projectStatsModelHeader,children:[e.jsx("span",{className:d.projectStatsModelName,children:h}),e.jsxs("span",{className:d.projectStatsModelCount,children:[o.count," reqs"]})]}),e.jsx("table",{className:d.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Token"}),e.jsx("td",{className:d.th,children:"input"}),e.jsx("td",{className:d.th,children:"output"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:W(r)}),e.jsx("td",{className:d.td,children:W(o.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Cache"}),e.jsx("td",{className:d.th,children:"create"}),e.jsx("td",{className:d.th,children:"read"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:W(o.cacheCreation)}),e.jsx("td",{className:d.td,children:W(o.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:p("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:d.td,children:[m,"%"]})]})]})})]},h)})]})]})}render(){const{requestCount:t,requests:a=[],viewMode:c,cacheType:i,onToggleViewMode:u,onImportLocalLogs:g,onLangChange:l,isLocalLog:h,localLogFile:o,projectName:r,collapseToolResults:m,onCollapseToolResultsChange:v,expandThinking:x,onExpandThinkingChange:f,expandDiff:y,onExpandDiffChange:C,filterIrrelevant:S,onFilterIrrelevantChange:N,updateInfo:b,onDismissUpdate:T,cliMode:R,terminalVisible:B,onToggleTerminal:L,onReturnToWorkspaces:M,contextWindow:I,serverCachedContent:O,resumeAutoChoice:ee,onResumeAutoChoiceToggle:te,onResumeAutoChoiceChange:V}=this.props,{countdownText:K}=this.state,ue=[{key:"import-local",icon:e.jsx($t,{}),label:p("ui.importLocalLogs"),onClick:g},{key:"export-prompts",icon:e.jsx(sn,{}),label:p("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:e.jsx(Ot,{}),label:p("ui.pluginManagement"),onClick:this.handleShowPlugins},{key:"switch-workspace",icon:e.jsx($t,{className:d.iconMirror}),label:e.jsx("span",{className:d.disabledMenuItem,children:p("ui.switchWorkspace")}),disabled:!0},{key:"process-management",icon:e.jsx(nt,{}),label:p("ui.processManagement"),onClick:this.handleShowProcesses},{key:"proxy-switch",icon:e.jsx(Bt,{}),label:p("ui.proxySwitch"),onClick:()=>this.setState({proxyModalVisible:!0})},{type:"divider"},{key:"project-stats",icon:e.jsx(Dt,{}),label:p("ui.projectStats"),onClick:this.handleShowProjectStats},...c==="raw"?[{key:"global-settings",icon:e.jsx(Ht,{}),label:p("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...c==="chat"?[{key:"display-settings",icon:e.jsx(Ht,{}),label:p("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:e.jsx(ln,{}),label:p("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:e.jsx("div",{className:d.langGrid,children:_n.map(k=>e.jsx(F,{size:"small",type:k.value===la()?"primary":"default",onClick:z=>{z.stopPropagation(),ia(k.value),l&&l()},className:d.langBtn,children:k.label},k.value))})}]}];return e.jsxs("div",{className:d.headerBar,children:[e.jsxs(Fe,{size:"middle",children:[e.jsx(oa,{menu:{items:ue,className:"logo-dropdown-menu"},trigger:["hover"],onOpenChange:k=>this.setState({logoDropdownOpen:k}),align:{offset:[-4,0]},children:e.jsx("span",{className:`${d.logoWrap}${this.state.logoDropdownOpen?` ${d.logoWrapActive}`:""}`,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`${d.logoImage}${this.state.logoDropdownOpen?` ${d.logoImageActive}`:""}`,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(Oe,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px",maxHeight:"80vh",overflowY:"auto"},children:e.jsxs(fe,{className:d.tokenStatsTag,children:[e.jsx(nt,{className:d.tokenStatsIcon}),p("ui.tokenStats")]})}),this.props.activeProxyId&&this.props.activeProxyId!=="max"&&(()=>{const k=(this.props.proxyProfiles||[]).find(z=>z.id===this.props.activeProxyId);return k?e.jsxs(fe,{className:d.proxyProfileTag,onClick:()=>this.setState({proxyModalVisible:!0}),children:[e.jsx(Bt,{className:d.proxySwapIcon}),k.name,k.activeModel?` · ${k.activeModel}`:""]}):null})(),(()=>{var G,pe,oe,ge,ve;let k=0;const z=it.find(se=>se.value===this.state.calibrationModel),le=z==null?void 0:z.tokens;if(!h){if(le&&(I==null?void 0:I.used_percentage)!=null){const se=D=>{var ae,U;const X=(U=(ae=D.response)==null?void 0:ae.body)==null?void 0:U.usage;return((X==null?void 0:X.input_tokens)||0)+((X==null?void 0:X.cache_creation_input_tokens)||0)+((X==null?void 0:X.cache_read_input_tokens)||0)};let Y=0;for(let D=a.length-1;D>=0;D--)if(be(a[D])&&((pe=(G=a[D].response)==null?void 0:G.body)!=null&&pe.usage)){Y=se(a[D]);break}if(Y>0){const D=le*.835;k=Math.min(100,Math.max(0,Math.round(Y/D*100)))}else{const D=I.context_window_size||2e5;k=Math.min(100,Math.max(0,Math.round(I.used_percentage*D/le/83.5*100)))}}else if((I==null?void 0:I.used_percentage)!=null){const se=this.state.settingsModel?St(this.state.settingsModel):0,Y=I.context_window_size||2e5;se&&se!==Y?k=Math.min(100,Math.max(0,Math.round(I.used_percentage*Y/se/83.5*100))):k=Math.min(100,Math.max(0,Math.round(I.used_percentage/83.5*100)))}else if(a.length>0){const se=Y=>{var X,ae;const D=(ae=(X=Y.response)==null?void 0:X.body)==null?void 0:ae.usage;return((D==null?void 0:D.input_tokens)||0)+((D==null?void 0:D.cache_creation_input_tokens)||0)+((D==null?void 0:D.cache_read_input_tokens)||0)};for(let Y=a.length-1;Y>=0;Y--)if(be(a[Y])&&((ge=(oe=a[Y].response)==null?void 0:oe.body)!=null&&ge.usage)){const D=se(a[Y]),ae=(le||(I==null?void 0:I.context_window_size)||St(((ve=a[Y].body)==null?void 0:ve.model)||this.state.settingsModel))*.835;ae>0&&D>0&&(k=Math.min(100,Math.max(0,Math.round(D/ae*100))));break}}}k===0&&this._lastContextPercent>0&&(k=this._lastContextPercent);const me=k>=80?"#ff4d4f":k>=60?"#faad14":"#52c41a";return h?e.jsx(fe,{className:`${d.liveTag} ${d.liveTagHistory}`,children:e.jsx("span",{className:d.liveTagText,children:p("ui.historyLog",{file:o})})}):e.jsx(Oe,{content:this.state._cachePopoverOpen?this.renderCacheContentPopover(k):e.jsx("div",{className:d.cachePopoverPlaceholder}),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},onOpenChange:se=>{this.setState({_cachePopoverOpen:se}),se||(this._cacheScrollInited=!1)},children:e.jsxs("span",{className:d.liveTag,style:{borderColor:me,color:me},children:[e.jsx("span",{className:d.liveTagFill,style:{width:`${k}%`,backgroundColor:me}}),e.jsx("span",{className:d.liveTagContent,children:e.jsxs("span",{className:d.liveTagText,children:[p("ui.liveMonitoring"),r?`:${r}`:""]})})]})})})(),b&&e.jsx(fe,{color:b.type==="completed"?"green":"orange",closable:!0,onClose:()=>T&&T(),children:b.type==="completed"?p("ui.update.completed",{version:b.version}):p("ui.update.majorAvailable",{version:b.version})})]}),e.jsxs(Fe,{size:"middle",children:[K&&e.jsxs(fe,{style:{background:"#2a2a2a",border:"1px solid #3a3a3a",color:K===p("ui.cacheExpired")?"#ff6b6b":"#ccc"},children:[p("ui.cacheCountdown",{type:i?`(${i})`:""}),e.jsx("strong",{className:d.countdownStrong,children:K})]}),c==="chat"&&R&&!h&&this.state.localUrl&&e.jsxs(e.Fragment,{children:[this.state.countryFlag&&e.jsx(Oe,{content:this.state.countryInfo?e.jsxs("div",{className:d.countryInfoPopover,children:[e.jsxs("div",{children:[this.state.countryFlag," ",this.state.countryInfo.country]}),this.state.countryInfo.region&&e.jsx("div",{children:this.state.countryInfo.region}),this.state.countryInfo.city&&e.jsx("div",{children:this.state.countryInfo.city}),this.state.countryInfo.org&&e.jsx("div",{className:d.countryInfoMeta,children:this.state.countryInfo.org}),this.state.countryInfo.ip&&e.jsx("div",{className:d.countryInfoMeta,children:this.state.countryInfo.ip})]}):null,trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 12px"},children:e.jsx(F,{className:d.compactBtnNoBorder,icon:e.jsx("span",{className:d.countryFlagIcon,children:this.state.countryFlag})})}),e.jsx(Oe,{content:e.jsxs("div",{className:d.qrcodePopover,children:[e.jsx("div",{className:d.qrcodeTitle,children:p("ui.scanToCoding")}),e.jsx(ys,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),e.jsx(Ae,{readOnly:!0,value:this.state.localUrl,className:d.qrcodeUrlInput,suffix:e.jsx(De,{className:d.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{J.success(p("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:e.jsx(F,{className:d.compactBtnNoBorder,icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:d.svgIcon,children:[e.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),e.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})})]}),R&&c==="chat"&&!h&&e.jsx(F,{className:d.compactBtn,type:B?"primary":"default",ghost:B,icon:e.jsx(Ge,{}),onClick:L,children:p("ui.terminal")}),e.jsx(F,{className:d.compactBtn,type:c==="raw"?"primary":"default",icon:c==="raw"?e.jsx(ra,{}):e.jsx(Ke,{}),onClick:u,children:c==="raw"?p("ui.chatMode"):p("ui.rawMode")})]}),e.jsxs(je,{title:`${p("ui.userPrompt")} (${this.state.promptData.length}${p("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[e.jsx("div",{className:d.promptExportBar,children:e.jsx(F,{icon:e.jsx(ca,{}),onClick:this.handleExportPromptsTxt,children:p("ui.exportPromptsTxt")})}),e.jsx(Jt,{activeKey:this.state.promptViewMode,onChange:k=>this.setState({promptViewMode:k}),size:"small",items:[{key:"original",label:p("ui.promptModeOriginal")},{key:"context",label:p("ui.promptModeContext")},{key:"text",label:p("ui.promptModeText")}]}),this.state.promptViewMode==="text"?e.jsx("textarea",{readOnly:!0,className:d.promptTextarea,value:this.buildTextModeContent()}):e.jsxs("div",{className:d.promptScrollArea,children:[this.state.promptData.length===0&&e.jsx("div",{className:d.promptEmpty,children:p("ui.noPrompt")}),this.state.promptData.map((k,z)=>{const le=k.timestamp?new Date(k.timestamp).toLocaleString():p("ui.unknownTime");return e.jsxs("div",{children:[e.jsxs("div",{className:d.promptTimestamp,children:[le,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(k):this.renderTextPrompt(k)]},z)})]})]}),e.jsxs(We,{title:p("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[e.jsxs("div",{className:d.settingsGroupBox,children:[e.jsx("div",{className:d.settingsGroupTitle,children:p("ui.chatDisplaySwitches")}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.collapseToolResults")}),e.jsx(Be,{checked:!!m,onChange:k=>v&&v(k)})]}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.expandThinking")}),e.jsx(Be,{checked:!!x,onChange:k=>f&&f(k)})]})]}),e.jsxs("div",{className:d.settingsGroupBox,children:[e.jsx("div",{className:d.settingsGroupTitle,children:p("ui.userPreferences")}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.resumeAutoChoice")}),e.jsx(Be,{checked:!!ee,onChange:k=>te&&te(k)})]}),ee&&e.jsx("div",{className:d.settingsItem,children:e.jsxs(Ve.Group,{value:ee,onChange:k=>V&&V(k.target.value),size:"small",children:[e.jsx(Ve,{value:"continue",children:p("ui.resumeAutoChoice.continue")}),e.jsx(Ve,{value:"new",children:p("ui.resumeAutoChoice.new")})]})})]})]}),e.jsxs(We,{title:p("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.filterIrrelevant")}),e.jsx(Be,{checked:!!S,onChange:k=>N&&N(k)})]}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.expandDiff")}),e.jsx(Be,{checked:!!y,onChange:k=>C&&C(k)})]})]}),e.jsx(We,{title:e.jsxs("span",{children:[e.jsx(Dt,{className:d.titleIcon}),p("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),e.jsxs(je,{title:e.jsxs("span",{children:[e.jsx(Ot,{className:d.titleIcon}),p("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:e.jsxs("div",{className:d.pluginModalFooter,children:[e.jsxs("div",{className:d.pluginModalFooterLeft,children:[e.jsx(F,{icon:e.jsx(kt,{}),onClick:this.handleAddPlugin,children:p("ui.plugins.add")}),e.jsx(F,{icon:e.jsx(Ft,{}),onClick:this.handleShowCdnModal,children:p("ui.plugins.cdnInstall")})]}),e.jsx(F,{icon:e.jsx(dt,{}),onClick:this.handleReloadPlugins,children:p("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&e.jsxs("div",{className:d.pluginDirHint,children:[e.jsxs("span",{className:d.pluginDirLabel,children:[p("ui.plugins.pluginsDir"),":"]})," ",e.jsx("code",{className:d.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{J.success(p("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?e.jsxs("div",{className:d.pluginEmpty,children:[e.jsx("div",{className:d.pluginEmptyTitle,children:p("ui.plugins.empty")}),e.jsx("div",{className:d.pluginEmptyHint,children:p("ui.plugins.emptyHint")})]}):e.jsx("div",{className:d.pluginList,children:this.state.pluginsList.map(k=>e.jsxs("div",{className:d.pluginItem,children:[e.jsxs("div",{className:d.pluginInfo,children:[e.jsx("span",{className:d.pluginName,children:k.name}),e.jsx("span",{className:d.pluginFile,children:k.file}),k.hooks.length>0&&e.jsx("span",{className:d.pluginHooks,children:k.hooks.map(z=>e.jsx("span",{className:d.pluginHookTag,children:z},z))})]}),e.jsxs("div",{className:d.pluginActions,children:[e.jsx(Be,{size:"small",checked:k.enabled,onChange:z=>this.handleTogglePlugin(k.name,z)}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(ct,{}),onClick:()=>this.handleDeletePlugin(k.file,k.name)})]})]},k.file))})]}),e.jsx(je,{title:p("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:e.jsx("p",{children:this.state.deleteTarget?p("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})}),e.jsx(je,{title:e.jsxs("span",{children:[e.jsx(Ft,{className:d.titleIcon}),p("ui.plugins.cdnInstall")]}),open:this.state.cdnModalVisible,onCancel:this.handleCdnCancel,onOk:this.handleCdnInstall,confirmLoading:this.state.cdnLoading,okText:p("ui.plugins.cdnInstallBtn"),cancelText:p("ui.cancel"),width:480,children:e.jsxs("div",{children:[e.jsx("div",{className:d.cdnUrlLabel,children:p("ui.plugins.cdnUrl")}),e.jsx(Ae,{placeholder:p("ui.plugins.cdnUrlPlaceholder"),value:this.state.cdnUrl,onChange:this.handleCdnUrlChange,onPressEnter:this.handleCdnInstall,className:d.cdnInput})]})}),e.jsx(je,{title:e.jsxs("span",{children:[e.jsx(nt,{className:d.titleIcon}),p("ui.processManagement")]}),open:this.state.processModalVisible,onCancel:()=>this.setState({processModalVisible:!1}),footer:e.jsx(F,{icon:e.jsx(dt,{}),onClick:this.fetchProcesses,loading:this.state.processLoading,children:p("ui.processManagement.refresh")}),width:780,children:e.jsx(da,{dataSource:this.state.processList,rowKey:"pid",loading:this.state.processLoading,size:"middle",pagination:!1,columns:[{title:p("ui.processManagement.port"),dataIndex:"port",width:80,render:k=>k?e.jsx("a",{href:`${window.location.protocol}//127.0.0.1:${k}`,target:"_blank",rel:"noopener noreferrer",children:k}):""},{title:"PID",dataIndex:"pid",width:80},{title:p("ui.processManagement.command"),dataIndex:"command",ellipsis:!0},{title:p("ui.processManagement.startTime"),dataIndex:"startTime",width:200},{title:p("ui.processManagement.action"),width:100,render:(k,z)=>z.isCurrent?e.jsx(F,{size:"small",className:d.currentProcessBtn,children:p("ui.processManagement.current")}):e.jsx(F,{size:"small",danger:!0,onClick:()=>this.handleKillProcess(z.pid),children:p("ui.processManagement.kill")})}]})}),e.jsx(je,{title:e.jsxs("span",{children:[e.jsx(Qt,{apiEndpoint:re("/api/open-profile-dir"),title:p("ui.proxy.openConfigDir"),size:16})," ",p("ui.proxySwitch")," ",e.jsx(he,{doc:"ProxySwitch",zIndex:1100})]}),open:this.state.proxyModalVisible,onCancel:()=>this.setState({proxyModalVisible:!1,editingProxy:null}),footer:null,width:520,children:this.renderProxyProfileList()})]})}renderProxyProfileList(){const t=this.props.proxyProfiles||[],a=this.props.activeProxyId||"max",{editingProxy:c,editForm:i}=this.state;return e.jsxs("div",{children:[e.jsxs("div",{className:d.proxyWarning,children:["⚠️ ",p("ui.proxy.maxWarning")]}),e.jsx("div",{className:d.proxyList,children:t.map(u=>{var g;return e.jsxs("div",{className:`${d.proxyItem} ${u.id===a?d.proxyItemActive:""}`,children:[e.jsxs("div",{className:d.proxyItemMain,onClick:()=>{if(u.id!==a){const l={active:u.id,profiles:t};this.props.onProxyProfileChange(l)}},children:[e.jsx(Ve,{checked:u.id===a,style:{marginRight:8}}),e.jsxs("div",{className:d.proxyItemInfo,children:[e.jsxs("div",{className:d.proxyItemNameRow,children:[e.jsx("span",{className:d.proxyItemName,children:u.name}),u.id==="max"&&e.jsx(fe,{className:d.proxyBuiltinTag,children:p("ui.proxy.builtin")})]}),u.id==="max"&&this.props.defaultConfig&&e.jsxs("div",{className:d.proxyItemDetail,children:[(()=>{try{return new URL(this.props.defaultConfig.origin).host}catch{return this.props.defaultConfig.origin}})(),this.props.defaultConfig.authType?` · ${this.props.defaultConfig.authType}`:"",this.props.defaultConfig.apiKey?` · ${this.props.defaultConfig.apiKey}`:"",this.props.defaultConfig.model?` · ${this.props.defaultConfig.model}`:""]}),u.id!=="max"&&u.baseURL&&e.jsxs("div",{className:d.proxyItemDetail,children:[(()=>{try{return new URL(u.baseURL).host}catch{return u.baseURL}})(),u.activeModel?` · ${u.activeModel}`:(g=u.models)!=null&&g.length?` · ${u.models[0]}`:""]})]})]}),u.id!=="max"&&e.jsxs("div",{className:d.proxyItemActions,children:[e.jsx(F,{type:"text",size:"small",icon:e.jsx(ha,{}),onClick:()=>this.setState({editingProxy:u.id,editForm:{name:u.name||"",baseURL:u.baseURL||"",apiKey:u.apiKey||"",models:(u.models||[]).join(", "),activeModel:u.activeModel||""}})}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(ct,{}),onClick:()=>{je.confirm({title:p("ui.proxy.deleteProxy"),content:p("ui.proxy.deleteConfirm",{name:u.name}),okType:"danger",onOk:()=>{const l=t.filter(o=>o.id!==u.id),h=a===u.id?"max":a;this.props.onProxyProfileChange({active:h,profiles:l})}})}})]})]},u.id)})}),c&&e.jsxs("div",{className:d.proxyEditForm,children:[e.jsxs("div",{className:d.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.name")," ",e.jsx("span",{className:d.proxyRequired,children:"*"})]}),e.jsx(Ae,{size:"small",value:i.name,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,name:g}}))}})]}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.baseURL")," ",e.jsx("span",{className:d.proxyRequired,children:"*"})]}),e.jsx(Ae,{size:"small",value:i.baseURL,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,baseURL:g}}))},placeholder:"https://api.example.com"})]}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.apiKey")," ",e.jsx("span",{className:d.proxyRequired,children:"*"})]}),e.jsx(Ae.Password,{size:"small",value:i.apiKey,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,apiKey:g}}))},placeholder:"sk-..."})]}),e.jsx("div",{className:d.proxyEditDivider}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.models")}),e.jsx(Ae,{size:"small",value:i.models,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,models:g}}))},placeholder:"model-1, model-2"})]}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.activeModel")}),e.jsx(qe,{size:"small",className:d.fullWidthSelect,value:i.activeModel||void 0,onChange:u=>this.setState(g=>({editForm:{...g.editForm,activeModel:u}})),placeholder:p("ui.proxy.activeModel"),children:(i.models||"").split(",").map(u=>u.trim()).filter(Boolean).map(u=>e.jsx(qe.Option,{value:u,children:u},u))})]}),e.jsxs("div",{className:d.proxyEditBtns,children:[e.jsx(F,{size:"small",icon:e.jsx(ua,{}),type:"primary",onClick:()=>{var h,o,r;if(!((h=i.name)!=null&&h.trim())||!((o=i.baseURL)!=null&&o.trim())||!((r=i.apiKey)!=null&&r.trim())){J.warning(p("ui.proxy.requiredFields"));return}const u=(i.models||"").split(",").map(m=>m.trim()).filter(Boolean),g={id:c==="__new__"?`proxy_${Date.now()}`:c,name:i.name.trim(),baseURL:i.baseURL.trim(),apiKey:i.apiKey.trim(),models:u,activeModel:i.activeModel||u[0]||""};let l;c==="__new__"?l=[...t,g]:l=t.map(m=>m.id===c?{...m,...g,id:m.id}:m),this.props.onProxyProfileChange({active:a,profiles:l}),this.setState({editingProxy:null})},children:p("ui.proxy.save")}),e.jsx(F,{size:"small",icon:e.jsx(ma,{}),onClick:()=>this.setState({editingProxy:null}),children:p("ui.proxy.cancel")})]})]}),!c&&e.jsx(F,{block:!0,type:"dashed",icon:e.jsx(kt,{}),style:{marginTop:12},onClick:()=>this.setState({editingProxy:"__new__",editForm:{name:"",baseURL:"",apiKey:"",models:"",activeModel:""}}),children:p("ui.proxy.addProxy")})]})}};A(ke,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Qe=ke;const Sn="_centerEmpty_18l8t_1",kn="_scrollContainer_18l8t_8",wn="_listItem_18l8t_15",Tn="_listItemActive_18l8t_27",Mn="_itemContent_18l8t_36",En="_itemHeader_18l8t_41",Rn="_tagNoMargin_18l8t_49",In="_modelName_18l8t_54",Ln="_modelNameMain_18l8t_59",Pn="_time_18l8t_63",An="_detailRow_18l8t_69",Bn="_urlText_18l8t_76",On="_duration_18l8t_85",Dn="_statusOk_18l8t_90",Fn="_statusErr_18l8t_96",$n="_statusDefault_18l8t_101",Hn="_usageBox_18l8t_106",zn="_cacheDot_18l8t_116",Vn="_cacheDotLoss_18l8t_125",Un="_cacheDotNormal_18l8t_130",qn="_tagMainAgent_18l8t_134",Wn="_tagPlan_18l8t_140",Kn="_tagMuted_18l8t_146",Gn="_tooltipPreLine_18l8t_152",H={centerEmpty:Sn,scrollContainer:kn,listItem:wn,listItemActive:Tn,itemContent:Mn,itemHeader:En,tagNoMargin:Rn,modelName:In,modelNameMain:Ln,time:Pn,detailRow:An,urlText:Bn,duration:On,statusOk:Dn,statusErr:Fn,statusDefault:$n,usageBox:Hn,cacheDot:zn,cacheDotLoss:Vn,cacheDotNormal:Un,tagMainAgent:qn,tagPlan:Wn,tagMuted:Kn,tooltipPreLine:Gn};class Jn extends q.Component{constructor(t){super(t);A(this,"handleKeyDown",t=>{if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;const{requests:a,selectedIndex:c,onSelect:i}=this.props;if(!a.length)return;t.preventDefault();const u=c??0,g=t.key==="ArrowUp"?Math.max(0,u-1):Math.min(a.length-1,u+1);g!==u&&i(g)});this.activeItemRef=q.createRef()}componentDidMount(){this.scrollToSelected(!0)}shouldComponentUpdate(t){return t.requests!==this.props.requests||t.selectedIndex!==this.props.selectedIndex||t.scrollCenter!==this.props.scrollCenter||t.cacheLossMap!==this.props.cacheLossMap}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.selectedIndex!==this.props.selectedIndex&&(this.scrollToSelected(!1),this.activeItemRef.current&&this.activeItemRef.current.focus({preventScroll:!0}))}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:a,onSelect:c}=this.props;return t.length===0?e.jsx("div",{className:H.centerEmpty,children:e.jsx(we,{description:p("ui.waitingRequests")})}):e.jsx("div",{className:H.scrollContainer,onKeyDown:this.handleKeyDown,children:e.jsx(wt,{dataSource:t,size:"small",split:!1,renderItem:(i,u)=>{var T,R,B;const g=new Date(i.timestamp).toLocaleTimeString("zh-CN"),l=u===a,h=i.response&&i.response.status<400,o=i.response&&i.response.status>=400,r=pa((T=i.body)==null?void 0:T.model),m=u+1<t.length?t[u+1]:null,{type:v,subType:x}=ze(i,m),f=(B=(R=i.response)==null?void 0:R.body)==null?void 0:B.usage,y=f?(f.input_tokens||0)+(f.cache_read_input_tokens||0)+(f.cache_creation_input_tokens||0):null,C=(f==null?void 0:f.output_tokens)||null,S=(f==null?void 0:f.cache_read_input_tokens)||0,N=(f==null?void 0:f.cache_creation_input_tokens)||0;let b=i.url;try{const L=new URL(i.url);b=L.host+L.pathname}catch{}return e.jsx(wt.Item,{ref:l?this.activeItemRef:void 0,tabIndex:0,onClick:()=>c(u),className:`${H.listItem} ${l?H.listItemActive:""}`,children:e.jsxs("div",{className:H.itemContent,children:[e.jsxs("div",{className:H.itemHeader,children:[v==="MainAgent"?e.jsx(fe,{className:`${H.tagNoMargin} ${H.tagMainAgent}`,children:"MainAgent"}):v==="Plan"?e.jsx(fe,{className:`${H.tagNoMargin} ${H.tagPlan}`,children:Tt(v,x)}):v==="Count"||v==="Preflight"?e.jsx(fe,{className:`${H.tagNoMargin} ${H.tagMuted}`,children:v}):e.jsx(fe,{className:H.tagNoMargin,children:Tt(v,x)}),r&&e.jsx("span",{className:`${H.modelName} ${v==="MainAgent"?H.modelNameMain:""}`,children:r}),e.jsx("span",{className:H.time,children:g})]}),e.jsxs("div",{className:H.detailRow,children:[e.jsx("span",{className:H.urlText,title:i.url,children:b}),i.duration&&e.jsxs("span",{className:H.duration,children:[i.duration,"ms"]}),i.response&&e.jsx("span",{className:h?H.statusOk:o?H.statusErr:H.statusDefault,children:i.response.status})]}),f&&e.jsxs("div",{className:H.usageBox,children:[e.jsxs("div",{children:["token: output:",W(C)||0,", input: ",W(y)||0]}),(S>0||N>0)&&e.jsx("div",{children:(()=>{var O;const L=(O=this.props.cacheLossMap)==null?void 0:O.get(u),M={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let I;if(L){const te=(L.reasons||[L.reason]).map(V=>p(M[V]||M.key_change)).join(`
26
+ `)}renderProjectStatsContent(){const{projectStats:t,projectStatsLoading:a}=this.state;if(a)return e.jsx("div",{className:d.projectStatsCenter,children:e.jsx(Gt,{})});if(!t)return e.jsx("div",{className:d.projectStatsEmpty,children:p("ui.projectStats.noData")});const{summary:c,models:i,updatedAt:u}=t;i&&Object.entries(i).sort((h,o)=>o[1]-h[1]);const g={};if(t.files){for(const h of Object.values(t.files))if(h.models)for(const[o,r]of Object.entries(h.models))g[o]||(g[o]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),g[o].input+=r.input_tokens||0,g[o].output+=r.output_tokens||0,g[o].cacheRead+=r.cache_read_input_tokens||0,g[o].cacheCreation+=r.cache_creation_input_tokens||0,g[o].count+=r.count||0}const l=Object.entries(g).sort((h,o)=>o[1].count-h[1].count);return e.jsxs("div",{className:d.projectStatsContent,children:[u&&e.jsx("div",{className:d.projectStatsUpdated,children:p("ui.projectStats.updatedAt",{time:new Date(u).toLocaleString()})}),e.jsxs("div",{className:d.projectStatsSummary,children:[e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:(c==null?void 0:c.requestCount)??0}),e.jsx("div",{className:d.projectStatLabel,children:p("ui.projectStats.totalRequests")})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:(c==null?void 0:c.turnCount)??(c==null?void 0:c.sessionCount)??0}),e.jsx("div",{className:d.projectStatLabel,children:p("ui.projectStats.turnCount")})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:(c==null?void 0:c.fileCount)??0}),e.jsx("div",{className:d.projectStatLabel,children:p("ui.projectStats.totalFiles")})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:W(c==null?void 0:c.input_tokens)}),e.jsx("div",{className:d.projectStatLabel,children:"Input Tokens"})]}),e.jsxs("div",{className:d.projectStatCard,children:[e.jsx("div",{className:d.projectStatValue,children:W(c==null?void 0:c.output_tokens)}),e.jsx("div",{className:d.projectStatLabel,children:"Output Tokens"})]})]}),l.length>0&&e.jsxs("div",{className:d.projectStatsSection,children:[e.jsx("div",{className:d.projectStatsSectionTitle,children:p("ui.projectStats.modelUsage")}),l.map(([h,o])=>{const r=o.input+o.cacheRead+o.cacheCreation,m=r>0?(o.cacheRead/r*100).toFixed(1):"0.0";return e.jsxs("div",{className:d.projectStatsModelCard,children:[e.jsxs("div",{className:d.projectStatsModelHeader,children:[e.jsx("span",{className:d.projectStatsModelName,children:h}),e.jsxs("span",{className:d.projectStatsModelCount,children:[o.count," reqs"]})]}),e.jsx("table",{className:d.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Token"}),e.jsx("td",{className:d.th,children:"input"}),e.jsx("td",{className:d.th,children:"output"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:W(r)}),e.jsx("td",{className:d.td,children:W(o.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Cache"}),e.jsx("td",{className:d.th,children:"create"}),e.jsx("td",{className:d.th,children:"read"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:W(o.cacheCreation)}),e.jsx("td",{className:d.td,children:W(o.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:p("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:d.td,children:[m,"%"]})]})]})})]},h)})]})]})}render(){const{requestCount:t,requests:a=[],viewMode:c,cacheType:i,onToggleViewMode:u,onImportLocalLogs:g,onLangChange:l,isLocalLog:h,localLogFile:o,projectName:r,collapseToolResults:m,onCollapseToolResultsChange:v,expandThinking:x,onExpandThinkingChange:f,expandDiff:y,onExpandDiffChange:C,filterIrrelevant:S,onFilterIrrelevantChange:N,updateInfo:b,onDismissUpdate:T,cliMode:R,terminalVisible:B,onToggleTerminal:L,onReturnToWorkspaces:M,contextWindow:I,serverCachedContent:O,resumeAutoChoice:ee,onResumeAutoChoiceToggle:te,onResumeAutoChoiceChange:V}=this.props,{countdownText:K}=this.state,ue=[{key:"import-local",icon:e.jsx($t,{}),label:p("ui.importLocalLogs"),onClick:g},{key:"export-prompts",icon:e.jsx(sn,{}),label:p("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:e.jsx(Ot,{}),label:p("ui.pluginManagement"),onClick:this.handleShowPlugins},{key:"switch-workspace",icon:e.jsx($t,{className:d.iconMirror}),label:e.jsx("span",{className:d.disabledMenuItem,children:p("ui.switchWorkspace")}),disabled:!0},{key:"process-management",icon:e.jsx(nt,{}),label:p("ui.processManagement"),onClick:this.handleShowProcesses},{key:"proxy-switch",icon:e.jsx(Bt,{}),label:p("ui.proxySwitch"),onClick:()=>this.setState({proxyModalVisible:!0})},{type:"divider"},{key:"project-stats",icon:e.jsx(Dt,{}),label:p("ui.projectStats"),onClick:this.handleShowProjectStats},...c==="raw"?[{key:"global-settings",icon:e.jsx(Ht,{}),label:p("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...c==="chat"?[{key:"display-settings",icon:e.jsx(Ht,{}),label:p("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:e.jsx(ln,{}),label:p("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:e.jsx("div",{className:d.langGrid,children:_n.map(k=>e.jsx(F,{size:"small",type:k.value===la()?"primary":"default",onClick:z=>{z.stopPropagation(),ia(k.value),l&&l()},className:d.langBtn,children:k.label},k.value))})}]}];return e.jsxs("div",{className:d.headerBar,children:[e.jsxs(Fe,{size:"middle",children:[e.jsx(oa,{menu:{items:ue,className:"logo-dropdown-menu"},trigger:["hover"],onOpenChange:k=>this.setState({logoDropdownOpen:k}),align:{offset:[-4,0]},children:e.jsx("span",{className:`${d.logoWrap}${this.state.logoDropdownOpen?` ${d.logoWrapActive}`:""}`,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`${d.logoImage}${this.state.logoDropdownOpen?` ${d.logoImageActive}`:""}`,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(Oe,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px",maxHeight:"80vh",overflowY:"auto"},children:e.jsxs(fe,{className:d.tokenStatsTag,children:[e.jsx(nt,{className:d.tokenStatsIcon}),p("ui.tokenStats")]})}),this.props.activeProxyId&&this.props.activeProxyId!=="max"&&(()=>{const k=(this.props.proxyProfiles||[]).find(z=>z.id===this.props.activeProxyId);return k?e.jsxs(fe,{className:d.proxyProfileTag,onClick:()=>this.setState({proxyModalVisible:!0}),children:[e.jsx(Bt,{className:d.proxySwapIcon}),k.name,k.activeModel?` · ${k.activeModel}`:""]}):null})(),(()=>{var G,pe,oe,ge,ve;let k=0;const z=it.find(se=>se.value===this.state.calibrationModel),le=z==null?void 0:z.tokens;if(!h){if(le&&(I==null?void 0:I.used_percentage)!=null){const se=D=>{var ae,U;const X=(U=(ae=D.response)==null?void 0:ae.body)==null?void 0:U.usage;return((X==null?void 0:X.input_tokens)||0)+((X==null?void 0:X.cache_creation_input_tokens)||0)+((X==null?void 0:X.cache_read_input_tokens)||0)};let Y=0;for(let D=a.length-1;D>=0;D--)if(be(a[D])&&((pe=(G=a[D].response)==null?void 0:G.body)!=null&&pe.usage)){Y=se(a[D]);break}if(Y>0){const D=le*.835;k=Math.min(100,Math.max(0,Math.round(Y/D*100)))}else{const D=I.context_window_size||2e5;k=Math.min(100,Math.max(0,Math.round(I.used_percentage*D/le/83.5*100)))}}else if((I==null?void 0:I.used_percentage)!=null){const se=this.state.settingsModel?St(this.state.settingsModel):0,Y=I.context_window_size||2e5;se&&se!==Y?k=Math.min(100,Math.max(0,Math.round(I.used_percentage*Y/se/83.5*100))):k=Math.min(100,Math.max(0,Math.round(I.used_percentage/83.5*100)))}else if(a.length>0){const se=Y=>{var X,ae;const D=(ae=(X=Y.response)==null?void 0:X.body)==null?void 0:ae.usage;return((D==null?void 0:D.input_tokens)||0)+((D==null?void 0:D.cache_creation_input_tokens)||0)+((D==null?void 0:D.cache_read_input_tokens)||0)};for(let Y=a.length-1;Y>=0;Y--)if(be(a[Y])&&((ge=(oe=a[Y].response)==null?void 0:oe.body)!=null&&ge.usage)){const D=se(a[Y]),ae=(le||(I==null?void 0:I.context_window_size)||St(((ve=a[Y].body)==null?void 0:ve.model)||this.state.settingsModel))*.835;ae>0&&D>0&&(k=Math.min(100,Math.max(0,Math.round(D/ae*100))));break}}}k===0&&this._lastContextPercent>0&&(k=this._lastContextPercent);const me=k>=80?"#ff4d4f":k>=60?"#faad14":"#52c41a";return h?e.jsx(fe,{className:`${d.liveTag} ${d.liveTagHistory}`,children:e.jsx("span",{className:d.liveTagText,children:p("ui.historyLog",{file:o})})}):e.jsx(Oe,{content:this.state._cachePopoverOpen?this.renderCacheContentPopover(k):e.jsx("div",{className:d.cachePopoverPlaceholder}),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},onOpenChange:se=>{this.setState({_cachePopoverOpen:se}),se||(this._cacheScrollInited=!1)},children:e.jsxs("span",{className:d.liveTag,style:{borderColor:me,color:me},children:[e.jsx("span",{className:d.liveTagFill,style:{width:`${k}%`,backgroundColor:me}}),e.jsx("span",{className:d.liveTagContent,children:e.jsxs("span",{className:d.liveTagText,children:[p("ui.liveMonitoring"),r?`:${r}`:""]})})]})})})(),b&&e.jsx(fe,{color:b.type==="completed"?"green":"orange",closable:!0,onClose:()=>T&&T(),children:b.type==="completed"?p("ui.update.completed",{version:b.version}):p("ui.update.majorAvailable",{version:b.version})})]}),e.jsxs(Fe,{size:"middle",children:[K&&c==="raw"&&e.jsxs(fe,{style:{background:"#2a2a2a",border:"1px solid #3a3a3a",color:K===p("ui.cacheExpired")?"#ff6b6b":"#ccc"},children:[p("ui.cacheCountdown",{type:i?`(${i})`:""}),e.jsx("strong",{className:d.countdownStrong,children:K})]}),c==="chat"&&R&&!h&&this.state.localUrl&&e.jsxs(e.Fragment,{children:[this.state.countryFlag&&e.jsx(Oe,{content:this.state.countryInfo?e.jsxs("div",{className:d.countryInfoPopover,children:[e.jsxs("div",{children:[this.state.countryFlag," ",this.state.countryInfo.country]}),this.state.countryInfo.region&&e.jsx("div",{children:this.state.countryInfo.region}),this.state.countryInfo.city&&e.jsx("div",{children:this.state.countryInfo.city}),this.state.countryInfo.org&&e.jsx("div",{className:d.countryInfoMeta,children:this.state.countryInfo.org}),this.state.countryInfo.ip&&e.jsx("div",{className:d.countryInfoMeta,children:this.state.countryInfo.ip})]}):null,trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 12px"},children:e.jsx(F,{className:d.compactBtnNoBorder,icon:e.jsx("span",{className:d.countryFlagIcon,children:this.state.countryFlag})})}),e.jsx(Oe,{content:e.jsxs("div",{className:d.qrcodePopover,children:[e.jsx("div",{className:d.qrcodeTitle,children:p("ui.scanToCoding")}),e.jsx(ys,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),e.jsx(Ae,{readOnly:!0,value:this.state.localUrl,className:d.qrcodeUrlInput,suffix:e.jsx(De,{className:d.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{J.success(p("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:e.jsx(F,{className:d.compactBtnNoBorder,icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:d.svgIcon,children:[e.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),e.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})})]}),R&&c==="chat"&&!h&&e.jsx(F,{className:d.compactBtn,type:B?"primary":"default",ghost:B,icon:e.jsx(Ge,{}),onClick:L,children:p("ui.terminal")}),e.jsx(F,{className:d.compactBtn,type:c==="raw"?"primary":"default",icon:c==="raw"?e.jsx(ra,{}):e.jsx(Ke,{}),onClick:u,children:c==="raw"?p("ui.chatMode"):p("ui.rawMode")})]}),e.jsxs(je,{title:`${p("ui.userPrompt")} (${this.state.promptData.length}${p("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[e.jsx("div",{className:d.promptExportBar,children:e.jsx(F,{icon:e.jsx(ca,{}),onClick:this.handleExportPromptsTxt,children:p("ui.exportPromptsTxt")})}),e.jsx(Jt,{activeKey:this.state.promptViewMode,onChange:k=>this.setState({promptViewMode:k}),size:"small",items:[{key:"original",label:p("ui.promptModeOriginal")},{key:"context",label:p("ui.promptModeContext")},{key:"text",label:p("ui.promptModeText")}]}),this.state.promptViewMode==="text"?e.jsx("textarea",{readOnly:!0,className:d.promptTextarea,value:this.buildTextModeContent()}):e.jsxs("div",{className:d.promptScrollArea,children:[this.state.promptData.length===0&&e.jsx("div",{className:d.promptEmpty,children:p("ui.noPrompt")}),this.state.promptData.map((k,z)=>{const le=k.timestamp?new Date(k.timestamp).toLocaleString():p("ui.unknownTime");return e.jsxs("div",{children:[e.jsxs("div",{className:d.promptTimestamp,children:[le,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(k):this.renderTextPrompt(k)]},z)})]})]}),e.jsxs(We,{title:p("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[e.jsxs("div",{className:d.settingsGroupBox,children:[e.jsx("div",{className:d.settingsGroupTitle,children:p("ui.chatDisplaySwitches")}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.collapseToolResults")}),e.jsx(Be,{checked:!!m,onChange:k=>v&&v(k)})]}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.expandThinking")}),e.jsx(Be,{checked:!!x,onChange:k=>f&&f(k)})]})]}),e.jsxs("div",{className:d.settingsGroupBox,children:[e.jsx("div",{className:d.settingsGroupTitle,children:p("ui.userPreferences")}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.resumeAutoChoice")}),e.jsx(Be,{checked:!!ee,onChange:k=>te&&te(k)})]}),ee&&e.jsx("div",{className:d.settingsItem,children:e.jsxs(Ve.Group,{value:ee,onChange:k=>V&&V(k.target.value),size:"small",children:[e.jsx(Ve,{value:"continue",children:p("ui.resumeAutoChoice.continue")}),e.jsx(Ve,{value:"new",children:p("ui.resumeAutoChoice.new")})]})})]})]}),e.jsxs(We,{title:p("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.filterIrrelevant")}),e.jsx(Be,{checked:!!S,onChange:k=>N&&N(k)})]}),e.jsxs("div",{className:d.settingsItem,children:[e.jsx("span",{className:d.settingsLabel,children:p("ui.expandDiff")}),e.jsx(Be,{checked:!!y,onChange:k=>C&&C(k)})]})]}),e.jsx(We,{title:e.jsxs("span",{children:[e.jsx(Dt,{className:d.titleIcon}),p("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),e.jsxs(je,{title:e.jsxs("span",{children:[e.jsx(Ot,{className:d.titleIcon}),p("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:e.jsxs("div",{className:d.pluginModalFooter,children:[e.jsxs("div",{className:d.pluginModalFooterLeft,children:[e.jsx(F,{icon:e.jsx(kt,{}),onClick:this.handleAddPlugin,children:p("ui.plugins.add")}),e.jsx(F,{icon:e.jsx(Ft,{}),onClick:this.handleShowCdnModal,children:p("ui.plugins.cdnInstall")})]}),e.jsx(F,{icon:e.jsx(dt,{}),onClick:this.handleReloadPlugins,children:p("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&e.jsxs("div",{className:d.pluginDirHint,children:[e.jsxs("span",{className:d.pluginDirLabel,children:[p("ui.plugins.pluginsDir"),":"]})," ",e.jsx("code",{className:d.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{J.success(p("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?e.jsxs("div",{className:d.pluginEmpty,children:[e.jsx("div",{className:d.pluginEmptyTitle,children:p("ui.plugins.empty")}),e.jsx("div",{className:d.pluginEmptyHint,children:p("ui.plugins.emptyHint")})]}):e.jsx("div",{className:d.pluginList,children:this.state.pluginsList.map(k=>e.jsxs("div",{className:d.pluginItem,children:[e.jsxs("div",{className:d.pluginInfo,children:[e.jsx("span",{className:d.pluginName,children:k.name}),e.jsx("span",{className:d.pluginFile,children:k.file}),k.hooks.length>0&&e.jsx("span",{className:d.pluginHooks,children:k.hooks.map(z=>e.jsx("span",{className:d.pluginHookTag,children:z},z))})]}),e.jsxs("div",{className:d.pluginActions,children:[e.jsx(Be,{size:"small",checked:k.enabled,onChange:z=>this.handleTogglePlugin(k.name,z)}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(ct,{}),onClick:()=>this.handleDeletePlugin(k.file,k.name)})]})]},k.file))})]}),e.jsx(je,{title:p("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:e.jsx("p",{children:this.state.deleteTarget?p("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})}),e.jsx(je,{title:e.jsxs("span",{children:[e.jsx(Ft,{className:d.titleIcon}),p("ui.plugins.cdnInstall")]}),open:this.state.cdnModalVisible,onCancel:this.handleCdnCancel,onOk:this.handleCdnInstall,confirmLoading:this.state.cdnLoading,okText:p("ui.plugins.cdnInstallBtn"),cancelText:p("ui.cancel"),width:480,children:e.jsxs("div",{children:[e.jsx("div",{className:d.cdnUrlLabel,children:p("ui.plugins.cdnUrl")}),e.jsx(Ae,{placeholder:p("ui.plugins.cdnUrlPlaceholder"),value:this.state.cdnUrl,onChange:this.handleCdnUrlChange,onPressEnter:this.handleCdnInstall,className:d.cdnInput})]})}),e.jsx(je,{title:e.jsxs("span",{children:[e.jsx(nt,{className:d.titleIcon}),p("ui.processManagement")]}),open:this.state.processModalVisible,onCancel:()=>this.setState({processModalVisible:!1}),footer:e.jsx(F,{icon:e.jsx(dt,{}),onClick:this.fetchProcesses,loading:this.state.processLoading,children:p("ui.processManagement.refresh")}),width:780,children:e.jsx(da,{dataSource:this.state.processList,rowKey:"pid",loading:this.state.processLoading,size:"middle",pagination:!1,columns:[{title:p("ui.processManagement.port"),dataIndex:"port",width:80,render:k=>k?e.jsx("a",{href:`${window.location.protocol}//127.0.0.1:${k}`,target:"_blank",rel:"noopener noreferrer",children:k}):""},{title:"PID",dataIndex:"pid",width:80},{title:p("ui.processManagement.command"),dataIndex:"command",ellipsis:!0},{title:p("ui.processManagement.startTime"),dataIndex:"startTime",width:200},{title:p("ui.processManagement.action"),width:100,render:(k,z)=>z.isCurrent?e.jsx(F,{size:"small",className:d.currentProcessBtn,children:p("ui.processManagement.current")}):e.jsx(F,{size:"small",danger:!0,onClick:()=>this.handleKillProcess(z.pid),children:p("ui.processManagement.kill")})}]})}),e.jsx(je,{title:e.jsxs("span",{children:[e.jsx(Qt,{apiEndpoint:re("/api/open-profile-dir"),title:p("ui.proxy.openConfigDir"),size:16})," ",p("ui.proxySwitch")," ",e.jsx(he,{doc:"ProxySwitch",zIndex:1100})]}),open:this.state.proxyModalVisible,onCancel:()=>this.setState({proxyModalVisible:!1,editingProxy:null}),footer:null,width:520,children:this.renderProxyProfileList()})]})}renderProxyProfileList(){const t=this.props.proxyProfiles||[],a=this.props.activeProxyId||"max",{editingProxy:c,editForm:i}=this.state;return e.jsxs("div",{children:[e.jsxs("div",{className:d.proxyWarning,children:["⚠️ ",p("ui.proxy.maxWarning")]}),e.jsx("div",{className:d.proxyList,children:t.map(u=>{var g;return e.jsxs("div",{className:`${d.proxyItem} ${u.id===a?d.proxyItemActive:""}`,children:[e.jsxs("div",{className:d.proxyItemMain,onClick:()=>{if(u.id!==a){const l={active:u.id,profiles:t};this.props.onProxyProfileChange(l)}},children:[e.jsx(Ve,{checked:u.id===a,style:{marginRight:8}}),e.jsxs("div",{className:d.proxyItemInfo,children:[e.jsxs("div",{className:d.proxyItemNameRow,children:[e.jsx("span",{className:d.proxyItemName,children:u.name}),u.id==="max"&&e.jsx(fe,{className:d.proxyBuiltinTag,children:p("ui.proxy.builtin")})]}),u.id==="max"&&this.props.defaultConfig&&e.jsxs("div",{className:d.proxyItemDetail,children:[(()=>{try{return new URL(this.props.defaultConfig.origin).host}catch{return this.props.defaultConfig.origin}})(),this.props.defaultConfig.authType?` · ${this.props.defaultConfig.authType}`:"",this.props.defaultConfig.apiKey?` · ${this.props.defaultConfig.apiKey}`:"",this.props.defaultConfig.model?` · ${this.props.defaultConfig.model}`:""]}),u.id!=="max"&&u.baseURL&&e.jsxs("div",{className:d.proxyItemDetail,children:[(()=>{try{return new URL(u.baseURL).host}catch{return u.baseURL}})(),u.activeModel?` · ${u.activeModel}`:(g=u.models)!=null&&g.length?` · ${u.models[0]}`:""]})]})]}),u.id!=="max"&&e.jsxs("div",{className:d.proxyItemActions,children:[e.jsx(F,{type:"text",size:"small",icon:e.jsx(ha,{}),onClick:()=>this.setState({editingProxy:u.id,editForm:{name:u.name||"",baseURL:u.baseURL||"",apiKey:u.apiKey||"",models:(u.models||[]).join(", "),activeModel:u.activeModel||""}})}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(ct,{}),onClick:()=>{je.confirm({title:p("ui.proxy.deleteProxy"),content:p("ui.proxy.deleteConfirm",{name:u.name}),okType:"danger",onOk:()=>{const l=t.filter(o=>o.id!==u.id),h=a===u.id?"max":a;this.props.onProxyProfileChange({active:h,profiles:l})}})}})]})]},u.id)})}),c&&e.jsxs("div",{className:d.proxyEditForm,children:[e.jsxs("div",{className:d.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.name")," ",e.jsx("span",{className:d.proxyRequired,children:"*"})]}),e.jsx(Ae,{size:"small",value:i.name,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,name:g}}))}})]}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.baseURL")," ",e.jsx("span",{className:d.proxyRequired,children:"*"})]}),e.jsx(Ae,{size:"small",value:i.baseURL,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,baseURL:g}}))},placeholder:"https://api.example.com"})]}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.apiKey")," ",e.jsx("span",{className:d.proxyRequired,children:"*"})]}),e.jsx(Ae.Password,{size:"small",value:i.apiKey,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,apiKey:g}}))},placeholder:"sk-..."})]}),e.jsx("div",{className:d.proxyEditDivider}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.models")}),e.jsx(Ae,{size:"small",value:i.models,onChange:u=>{const g=u.target.value;this.setState(l=>({editForm:{...l.editForm,models:g}}))},placeholder:"model-1, model-2"})]}),e.jsxs("div",{className:d.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.activeModel")}),e.jsx(qe,{size:"small",className:d.fullWidthSelect,value:i.activeModel||void 0,onChange:u=>this.setState(g=>({editForm:{...g.editForm,activeModel:u}})),placeholder:p("ui.proxy.activeModel"),children:(i.models||"").split(",").map(u=>u.trim()).filter(Boolean).map(u=>e.jsx(qe.Option,{value:u,children:u},u))})]}),e.jsxs("div",{className:d.proxyEditBtns,children:[e.jsx(F,{size:"small",icon:e.jsx(ua,{}),type:"primary",onClick:()=>{var h,o,r;if(!((h=i.name)!=null&&h.trim())||!((o=i.baseURL)!=null&&o.trim())||!((r=i.apiKey)!=null&&r.trim())){J.warning(p("ui.proxy.requiredFields"));return}const u=(i.models||"").split(",").map(m=>m.trim()).filter(Boolean),g={id:c==="__new__"?`proxy_${Date.now()}`:c,name:i.name.trim(),baseURL:i.baseURL.trim(),apiKey:i.apiKey.trim(),models:u,activeModel:i.activeModel||u[0]||""};let l;c==="__new__"?l=[...t,g]:l=t.map(m=>m.id===c?{...m,...g,id:m.id}:m),this.props.onProxyProfileChange({active:a,profiles:l}),this.setState({editingProxy:null})},children:p("ui.proxy.save")}),e.jsx(F,{size:"small",icon:e.jsx(ma,{}),onClick:()=>this.setState({editingProxy:null}),children:p("ui.proxy.cancel")})]})]}),!c&&e.jsx(F,{block:!0,type:"dashed",icon:e.jsx(kt,{}),style:{marginTop:12},onClick:()=>this.setState({editingProxy:"__new__",editForm:{name:"",baseURL:"",apiKey:"",models:"",activeModel:""}}),children:p("ui.proxy.addProxy")})]})}};A(ke,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Qe=ke;const Sn="_centerEmpty_18l8t_1",kn="_scrollContainer_18l8t_8",wn="_listItem_18l8t_15",Tn="_listItemActive_18l8t_27",Mn="_itemContent_18l8t_36",En="_itemHeader_18l8t_41",Rn="_tagNoMargin_18l8t_49",In="_modelName_18l8t_54",Ln="_modelNameMain_18l8t_59",Pn="_time_18l8t_63",An="_detailRow_18l8t_69",Bn="_urlText_18l8t_76",On="_duration_18l8t_85",Dn="_statusOk_18l8t_90",Fn="_statusErr_18l8t_96",$n="_statusDefault_18l8t_101",Hn="_usageBox_18l8t_106",zn="_cacheDot_18l8t_116",Vn="_cacheDotLoss_18l8t_125",Un="_cacheDotNormal_18l8t_130",qn="_tagMainAgent_18l8t_134",Wn="_tagPlan_18l8t_140",Kn="_tagMuted_18l8t_146",Gn="_tooltipPreLine_18l8t_152",H={centerEmpty:Sn,scrollContainer:kn,listItem:wn,listItemActive:Tn,itemContent:Mn,itemHeader:En,tagNoMargin:Rn,modelName:In,modelNameMain:Ln,time:Pn,detailRow:An,urlText:Bn,duration:On,statusOk:Dn,statusErr:Fn,statusDefault:$n,usageBox:Hn,cacheDot:zn,cacheDotLoss:Vn,cacheDotNormal:Un,tagMainAgent:qn,tagPlan:Wn,tagMuted:Kn,tooltipPreLine:Gn};class Jn extends q.Component{constructor(t){super(t);A(this,"handleKeyDown",t=>{if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;const{requests:a,selectedIndex:c,onSelect:i}=this.props;if(!a.length)return;t.preventDefault();const u=c??0,g=t.key==="ArrowUp"?Math.max(0,u-1):Math.min(a.length-1,u+1);g!==u&&i(g)});this.activeItemRef=q.createRef()}componentDidMount(){this.scrollToSelected(!0)}shouldComponentUpdate(t){return t.requests!==this.props.requests||t.selectedIndex!==this.props.selectedIndex||t.scrollCenter!==this.props.scrollCenter||t.cacheLossMap!==this.props.cacheLossMap}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.selectedIndex!==this.props.selectedIndex&&(this.scrollToSelected(!1),this.activeItemRef.current&&this.activeItemRef.current.focus({preventScroll:!0}))}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:a,onSelect:c}=this.props;return t.length===0?e.jsx("div",{className:H.centerEmpty,children:e.jsx(we,{description:p("ui.waitingRequests")})}):e.jsx("div",{className:H.scrollContainer,onKeyDown:this.handleKeyDown,children:e.jsx(wt,{dataSource:t,size:"small",split:!1,renderItem:(i,u)=>{var T,R,B;const g=new Date(i.timestamp).toLocaleTimeString("zh-CN"),l=u===a,h=i.response&&i.response.status<400,o=i.response&&i.response.status>=400,r=pa((T=i.body)==null?void 0:T.model),m=u+1<t.length?t[u+1]:null,{type:v,subType:x}=ze(i,m),f=(B=(R=i.response)==null?void 0:R.body)==null?void 0:B.usage,y=f?(f.input_tokens||0)+(f.cache_read_input_tokens||0)+(f.cache_creation_input_tokens||0):null,C=(f==null?void 0:f.output_tokens)||null,S=(f==null?void 0:f.cache_read_input_tokens)||0,N=(f==null?void 0:f.cache_creation_input_tokens)||0;let b=i.url;try{const L=new URL(i.url);b=L.host+L.pathname}catch{}return e.jsx(wt.Item,{ref:l?this.activeItemRef:void 0,tabIndex:0,onClick:()=>c(u),className:`${H.listItem} ${l?H.listItemActive:""}`,children:e.jsxs("div",{className:H.itemContent,children:[e.jsxs("div",{className:H.itemHeader,children:[v==="MainAgent"?e.jsx(fe,{className:`${H.tagNoMargin} ${H.tagMainAgent}`,children:"MainAgent"}):v==="Plan"?e.jsx(fe,{className:`${H.tagNoMargin} ${H.tagPlan}`,children:Tt(v,x)}):v==="Count"||v==="Preflight"?e.jsx(fe,{className:`${H.tagNoMargin} ${H.tagMuted}`,children:v}):e.jsx(fe,{className:H.tagNoMargin,children:Tt(v,x)}),r&&e.jsx("span",{className:`${H.modelName} ${v==="MainAgent"?H.modelNameMain:""}`,children:r}),e.jsx("span",{className:H.time,children:g})]}),e.jsxs("div",{className:H.detailRow,children:[e.jsx("span",{className:H.urlText,title:i.url,children:b}),i.duration&&e.jsxs("span",{className:H.duration,children:[i.duration,"ms"]}),i.response&&e.jsx("span",{className:h?H.statusOk:o?H.statusErr:H.statusDefault,children:i.response.status})]}),f&&e.jsxs("div",{className:H.usageBox,children:[e.jsxs("div",{children:["token: output:",W(C)||0,", input: ",W(y)||0]}),(S>0||N>0)&&e.jsx("div",{children:(()=>{var O;const L=(O=this.props.cacheLossMap)==null?void 0:O.get(u),M={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let I;if(L){const te=(L.reasons||[L.reason]).map(V=>p(M[V]||M.key_change)).join(`
27
27
  `);I=e.jsx(Yt,{title:e.jsx("span",{className:H.tooltipPreLine,children:te}),children:e.jsx("span",{className:`${H.cacheDot} ${H.cacheDotLoss}`})})}else I=e.jsx("span",{className:`${H.cacheDot} ${H.cacheDotNormal}`});return e.jsxs(e.Fragment,{children:["cache",I,": ",S>0?`read:${W(S)}`:"",S>0&&N>0?", ":"",N>0?`create:${W(N)}`:""]})})()})]})]})})}})})}}const Qn=n=>typeof n=="boolean"||n instanceof Boolean,Yn=n=>typeof n=="number"||n instanceof Number,Xn=n=>typeof n=="bigint"||n instanceof BigInt,vs=n=>!!n&&n instanceof Date,Zn=n=>typeof n=="string"||n instanceof String,ei=n=>Array.isArray(n),js=n=>typeof n=="object"&&n!==null,Cs=n=>!!n&&n instanceof Object&&typeof n=="function";function Ye(n,s){return s===void 0&&(s=!1),!n||s?`"${n}"`:n}function ti(n,s,t){return t?JSON.stringify(n):s?`"${n}"`:n}function bs(n){let{field:s,value:t,data:a,lastElement:c,openBracket:i,closeBracket:u,level:g,style:l,shouldExpandNode:h,clickToExpandNode:o,outerRef:r,beforeExpandChange:m}=n;const v=j.useRef(!1),[x,f]=j.useState(()=>h(g,t,s)),y=j.useRef(null);j.useEffect(()=>{v.current?f(h(g,t,s)):v.current=!0},[h]);const C=j.useId();if(a.length===0)return si({field:s,openBracket:i,closeBracket:u,lastElement:c,style:l});const S=x?l.collapseIcon:l.expandIcon,N=x?l.ariaLables.collapseJson:l.ariaLables.expandJson,b=g+1,T=a.length-1,R=M=>{x!==M&&(!m||m({level:g,value:t,field:s,newExpandValue:M}))&&f(M)},B=M=>{if(M.key==="ArrowRight"||M.key==="ArrowLeft")M.preventDefault(),R(M.key==="ArrowRight");else if(M.key==="ArrowUp"||M.key==="ArrowDown"){M.preventDefault();const I=M.key==="ArrowUp"?-1:1;if(!r.current)return;const O=r.current.querySelectorAll("[role=button]");let ee=-1;for(let V=0;V<O.length;V++)if(O[V].tabIndex===0){ee=V;break}if(ee<0)return;const te=(ee+I+O.length)%O.length;O[ee].tabIndex=-1,O[te].tabIndex=0,O[te].focus()}},L=()=>{var M;R(!x);const I=y.current;if(!I)return;const O=(M=r.current)===null||M===void 0?void 0:M.querySelector('[role=button][tabindex="0"]');O&&(O.tabIndex=-1),I.tabIndex=0,I.focus()};return j.createElement("div",{className:l.basicChildStyle,role:"treeitem","aria-expanded":x,"aria-selected":void 0},j.createElement("span",{className:S,onClick:L,onKeyDown:B,role:"button","aria-label":N,"aria-expanded":x,"aria-controls":x?C:void 0,ref:y,tabIndex:g===0?0:-1}),(s||s==="")&&(o?j.createElement("span",{className:l.clickableLabel,onClick:L,onKeyDown:B},Ye(s,l.quotesForFieldNames),":"):j.createElement("span",{className:l.label},Ye(s,l.quotesForFieldNames),":")),j.createElement("span",{className:l.punctuation},i),x?j.createElement("ul",{id:C,role:"group",className:l.childFieldsContainer},a.map((M,I)=>j.createElement(mt,{key:M[0]||I,field:M[0],value:M[1],style:l,lastElement:I===T,level:b,shouldExpandNode:h,clickToExpandNode:o,beforeExpandChange:m,outerRef:r}))):j.createElement("span",{className:l.collapsedContent,onClick:L,onKeyDown:B}),j.createElement("span",{className:l.punctuation},u),!c&&j.createElement("span",{className:l.punctuation},","))}function si(n){let{field:s,openBracket:t,closeBracket:a,lastElement:c,style:i}=n;return j.createElement("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(s||s==="")&&j.createElement("span",{className:i.label},Ye(s,i.quotesForFieldNames),":"),j.createElement("span",{className:i.punctuation},t),j.createElement("span",{className:i.punctuation},a),!c&&j.createElement("span",{className:i.punctuation},","))}function ai(n){let{field:s,value:t,style:a,lastElement:c,shouldExpandNode:i,clickToExpandNode:u,level:g,outerRef:l,beforeExpandChange:h}=n;return bs({field:s,value:t,lastElement:c||!1,level:g,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:i,clickToExpandNode:u,data:Object.keys(t).map(o=>[o,t[o]]),outerRef:l,beforeExpandChange:h})}function ni(n){let{field:s,value:t,style:a,lastElement:c,level:i,shouldExpandNode:u,clickToExpandNode:g,outerRef:l,beforeExpandChange:h}=n;return bs({field:s,value:t,lastElement:c||!1,level:i,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:u,clickToExpandNode:g,data:t.map(o=>[void 0,o]),outerRef:l,beforeExpandChange:h})}function ii(n){let{field:s,value:t,style:a,lastElement:c}=n,i,u=a.otherValue;return t===null?(i="null",u=a.nullValue):t===void 0?(i="undefined",u=a.undefinedValue):Zn(t)?(i=ti(t,!a.noQuotesForStringValues,a.stringifyStringValues),u=a.stringValue):Qn(t)?(i=t?"true":"false",u=a.booleanValue):Yn(t)?(i=t.toString(),u=a.numberValue):Xn(t)?(i=`${t.toString()}n`,u=a.numberValue):vs(t)?i=t.toISOString():Cs(t)?i="function() { }":i=t.toString(),j.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(s||s==="")&&j.createElement("span",{className:a.label},Ye(s,a.quotesForFieldNames),":"),j.createElement("span",{className:u},i),!c&&j.createElement("span",{className:a.punctuation},","))}function mt(n){const s=n.value;return ei(s)?j.createElement(ni,Object.assign({},n)):js(s)&&!vs(s)&&!Cs(s)?j.createElement(ai,Object.assign({},n)):j.createElement(ii,Object.assign({},n))}var $={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const Ns={collapseJson:"collapse JSON",expandJson:"expand JSON"},lt={container:$["container-light"],basicChildStyle:$["basic-element-style"],childFieldsContainer:$["child-fields-container"],label:$["label-light"],clickableLabel:$["clickable-label-light"],nullValue:$["value-null-light"],undefinedValue:$["value-undefined-light"],stringValue:$["value-string-light"],booleanValue:$["value-boolean-light"],numberValue:$["value-number-light"],otherValue:$["value-other-light"],punctuation:$["punctuation-light"],collapseIcon:$["collapse-icon-light"],expandIcon:$["expand-icon-light"],collapsedContent:$["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Ns,stringifyStringValues:!1},li={container:$["container-dark"],basicChildStyle:$["basic-element-style"],childFieldsContainer:$["child-fields-container"],label:$["label-dark"],clickableLabel:$["clickable-label-dark"],nullValue:$["value-null-dark"],undefinedValue:$["value-undefined-dark"],stringValue:$["value-string-dark"],booleanValue:$["value-boolean-dark"],numberValue:$["value-number-dark"],otherValue:$["value-other-dark"],punctuation:$["punctuation-dark"],collapseIcon:$["collapse-icon-dark"],expandIcon:$["expand-icon-dark"],collapsedContent:$["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Ns,stringifyStringValues:!1},oi=()=>!0,ri=n=>{let{data:s,style:t=lt,shouldExpandNode:a=oi,clickToExpandNode:c=!1,beforeExpandChange:i,compactTopLevel:u,...g}=n;const l=j.useRef(null);return j.createElement("div",Object.assign({"aria-label":"JSON view"},g,{className:t.container,ref:l,role:"tree"}),u&&js(s)?Object.entries(s).map(h=>{let[o,r]=h;return j.createElement(mt,{key:o,field:o,value:r,style:{...lt,...t},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:c,beforeExpandChange:i,outerRef:l})}):j.createElement(mt,{value:s,style:{...lt,...t},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:c,outerRef:l,beforeExpandChange:i}))},ci="_container_1h2lr_1",di={container:ci},hi={...li,container:"rjv-container"};class Xe extends q.Component{shouldComponentUpdate(s){return s.data!==this.props.data||s.defaultExpand!==this.props.defaultExpand||s.expandNode!==this.props.expandNode}render(){const{data:s,defaultExpand:t,expandNode:a}=this.props;if(s==null)return null;const c=typeof a=="function"?a:t==="all"?()=>!0:t==="root"?i=>i<2:i=>i<1;return e.jsx("div",{className:di.container,children:e.jsx(ri,{data:s,shouldExpandNode:c,style:hi})})}}function ui({currentId:n,visibleIds:s=[],key:t}){if(t!=="ArrowUp"&&t!=="ArrowDown")return null;const a=s.findIndex(i=>i===n),c=t==="ArrowUp"?-1:1;return a>=0?s[a+c]??null:null}const mi="_root_9isis_1",pi="_sidebar_9isis_9",gi="_section_9isis_18",fi="_sectionHeader_9isis_22",xi="_arrow_9isis_48",yi="_sectionTitle_9isis_54",vi="_sectionCount_9isis_62",ji="_sectionBody_9isis_71",Ci="_historyToggle_9isis_76",bi="_historyToggleLabel_9isis_102",Ni="_item_9isis_107",_i="_itemActive_9isis_133",Si="_itemContent_9isis_143",ki="_itemLabel_9isis_149",wi="_itemSublabel_9isis_157",Ti="_itemTime_9isis_166",Mi="_content_9isis_175",Ei="_contentEmpty_9isis_183",Ri="_contentInner_9isis_190",Ii="_emptyWrap_9isis_194",Li="_roleHeader_9isis_202",Pi="_roleBadge_9isis_210",Ai="_role_user_9isis_219",Bi="_role_assistant_9isis_225",Oi="_roleLabel_9isis_231",Di="_contentTime_9isis_238",Fi="_turnDivider_9isis_246",$i="_textBlock_9isis_253",Hi="_textBlockBar_9isis_260",zi="_textBlockBody_9isis_269",Vi="_textBlockCompact_9isis_277",Ui="_textBlockCompactFloat_9isis_284",qi="_thinkingBlock_9isis_291",Wi="_thinkingHeader_9isis_299",Ki="_thinkingPreview_9isis_314",Gi="_thinkingBody_9isis_324",Ji="_toolBlock_9isis_330",Qi="_toolBlockResult_9isis_337",Yi="_toolBlockError_9isis_341",Xi="_toolBlockHeader_9isis_345",Zi="_toolBlockBody_9isis_356",el="_toolName_9isis_361",tl="_toolId_9isis_367",sl="_errorLabel_9isis_374",al="_blockTag_9isis_384",nl="_blockTagText_9isis_397",il="_blockTagThinking_9isis_403",ll="_blockTagResult_9isis_409",ol="_blockTagError_9isis_415",rl="_jsonBlock_9isis_422",cl="_jsonBlockLabel_9isis_429",dl="_blockSeparator_9isis_439",hl="_markdownBody_9isis_446",w={root:mi,sidebar:pi,section:gi,sectionHeader:fi,arrow:xi,sectionTitle:yi,sectionCount:vi,sectionBody:ji,historyToggle:Ci,historyToggleLabel:bi,item:Ni,itemActive:_i,itemContent:Si,itemLabel:ki,itemSublabel:wi,itemTime:Ti,content:Mi,contentEmpty:Ei,contentInner:Ri,emptyWrap:Ii,roleHeader:Li,roleBadge:Pi,role_user:Ai,role_assistant:Bi,roleLabel:Oi,contentTime:Di,turnDivider:Fi,textBlock:$i,textBlockBar:Hi,textBlockBody:zi,textBlockCompact:Vi,textBlockCompactFloat:Ui,thinkingBlock:qi,thinkingHeader:Wi,thinkingPreview:Ki,thinkingBody:Gi,toolBlock:Ji,toolBlockResult:Qi,toolBlockError:Yi,toolBlockHeader:Xi,toolBlockBody:Zi,toolName:el,toolId:tl,errorLabel:sl,blockTag:al,blockTagText:nl,blockTagThinking:il,blockTagResult:ll,blockTagError:ol,jsonBlock:rl,jsonBlockLabel:cl,blockSeparator:dl,markdownBody:hl},{Text:ul}=Xt;function pt(n){if(n==null)return[];if(typeof n=="string"){const s=n.trim();return s?[{type:"markdown",text:s}]:[]}if(Array.isArray(n)){const s=[];for(const t of n)if(t)if(t.type==="text"){const a=(t.text||"").trim();a&&s.push({type:"markdown",text:a})}else if(t.type==="tool_use")s.push({type:"tool_use",name:t.name||"unknown",id:t.id||"",input:t.input??{}});else if(t.type==="tool_result"){const a=ml(t.content);s.push({type:"tool_result",tool_use_id:t.tool_use_id||"",is_error:t.is_error,content:a})}else if(t.type==="thinking"){const a=t.thinking||"";a.trim()&&s.push({type:"thinking",text:a})}else t.type==="image"?s.push({type:"json",label:"image",data:t}):s.push({type:"json",label:t.type||"block",data:t});return s}return[{type:"json",label:"content",data:n}]}function ml(n){if(n==null)return[];if(typeof n=="string"){const s=n.trim();return s?[{type:"markdown",text:s}]:[]}return Array.isArray(n)?n.flatMap(s=>{if(!s)return[];if(s.type==="text"){const t=(s.text||"").trim();return t?[{type:"markdown",text:t}]:[]}return[{type:"json",label:s.type||"block",data:s}]}):[{type:"json",label:"content",data:n}]}function pl(n){if(!n)return null;if(typeof n=="string")return[{type:"markdown",text:n}];if(Array.isArray(n)){const s=[];return n.forEach((t,a)=>{a>0&&s.push({type:"separator"}),t&&(typeof t=="string"?s.push({type:"markdown",text:t}):t.type==="text"?s.push({type:"markdown",text:t.text||""}):s.push({type:"json",label:t.type||"item",data:t}))}),s}return[{type:"json",label:"system",data:n}]}function gl(n){const s=[],t=(n==null?void 0:n.name)||"unknown",a=(n==null?void 0:n.description)||"";let c=`### ${t}
28
28
 
29
29
  `;a&&(c+=`${a}