@customize-agent/server 4.0.48 → 4.0.50

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 (59) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +21 -21
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/chunks/1936.js +3 -3
  5. package/.next/server/chunks/6697.js +17 -17
  6. package/.next/server/chunks/8204.js +1 -1
  7. package/.next/server/chunks/9301.js +3 -3
  8. package/.next/server/middleware-build-manifest.js +1 -1
  9. package/.next/server/pages/404.html +1 -1
  10. package/.next/server/pages/500.html +1 -1
  11. package/.next/server/pages/_error.js +1 -1
  12. package/.next/server/pages/api/assets/generated/preview.js +1 -1
  13. package/.next/server/pages/api/assets/generated.js +1 -1
  14. package/.next/server/pages/api/documents/export.js +2 -2
  15. package/.next/server/pages/api/documents/generate.js +1 -1
  16. package/.next/server/pages/api/documents/generated/[id].js +1 -1
  17. package/.next/server/pages/api/documents/generated.js +1 -1
  18. package/.next/server/pages/api/kb/upload.js +1 -1
  19. package/.next/server/pages/asset-library.html +1 -1
  20. package/.next/server/pages/context/long-term.html +1 -1
  21. package/.next/server/pages/context/short-term.html +1 -1
  22. package/.next/server/pages/document-roles.html +1 -1
  23. package/.next/server/pages/documents.html +1 -1
  24. package/.next/server/pages/guide.html +1 -1
  25. package/.next/server/pages/index.html +1 -1
  26. package/.next/server/pages/knowledge/file-detail.html +1 -1
  27. package/.next/server/pages/knowledge/files.html +1 -1
  28. package/.next/server/pages/knowledge/manage.html +1 -1
  29. package/.next/server/pages/knowledge/search.html +1 -1
  30. package/.next/server/pages/knowledge.html +1 -1
  31. package/.next/server/pages/models.html +1 -1
  32. package/.next/server/pages/overview.html +1 -1
  33. package/.next/server/pages/prompt.html +1 -1
  34. package/.next/server/pages/settings.html +1 -1
  35. package/.next/server/pages/system/logs.html +1 -1
  36. package/.next/server/pages-manifest.json +26 -26
  37. package/.next/static/{djXZQoX_COYKiw94g6pwX → CJlmeaK1PDR-c4sfDG8EN}/_buildManifest.js +1 -1
  38. package/.next/static/chunks/{150-8039a46df62c9b21.js → 150-134099bf526e9292.js} +2 -2
  39. package/.next/static/chunks/412-b9c854c6a76db67d.js +1 -0
  40. package/.next/static/chunks/496-4fb9a063790e65ff.js +1 -0
  41. package/.next/static/chunks/694-2d545cfbb9779f2c.js +1 -0
  42. package/.next/static/chunks/788-7f7359a830e3f4fd.js +1 -0
  43. package/.next/static/chunks/795-d8fb7a0420512701.js +1 -0
  44. package/.next/static/chunks/pages/{_app-fb7ca29c210d0293.js → _app-62cd5d1172d08036.js} +1 -1
  45. package/.next/static/chunks/pages/document-roles-fd02980db151650c.js +1 -0
  46. package/.next/static/chunks/pages/documents-9967f1fdf3fb6d03.js +1 -0
  47. package/.next/static/chunks/pages/guide-cba4ca0b28bb9b64.js +1 -0
  48. package/.next/static/chunks/pages/knowledge/files-9d30d5f23d78f46b.js +1 -0
  49. package/package.json +3 -3
  50. package/.next/static/chunks/412-03a4cc00655c0ec0.js +0 -1
  51. package/.next/static/chunks/496-ceb2d8197d6335cf.js +0 -1
  52. package/.next/static/chunks/694-b6ab4967c35bbcee.js +0 -1
  53. package/.next/static/chunks/788-db05269178a28c20.js +0 -1
  54. package/.next/static/chunks/795-262a7ef599d655f4.js +0 -1
  55. package/.next/static/chunks/pages/document-roles-00219c0a0871daec.js +0 -1
  56. package/.next/static/chunks/pages/documents-1cf22adda76f8a10.js +0 -1
  57. package/.next/static/chunks/pages/guide-c85dee51bd3de3e3.js +0 -1
  58. package/.next/static/chunks/pages/knowledge/files-75a33100a1b3b5b5.js +0 -1
  59. /package/.next/static/{djXZQoX_COYKiw94g6pwX → CJlmeaK1PDR-c4sfDG8EN}/_ssgManifest.js +0 -0
@@ -7,7 +7,7 @@
7
7
  `]:{...n(o),animationPlayState:"paused"},[`${a}${e}-leave`]:{...n(o),animationPlayState:"paused"},[`
8
8
  ${a}${e}-enter${e}-enter-active,
9
9
  ${a}${e}-appear${e}-appear-active
10
- `]:{animationName:t,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}}},5741:(e,t,r)=>{"use strict";function n(e,t){return{motionName:t??`${e}-fade`}}function o(e){let t,r=new Promise(r=>{t=e(()=>{r(!0)})}),n=()=>{t?.()};return n.then=(e,t)=>r.then(e,t),n.promise=r,n}r.d(t,{E:()=>o,V:()=>n})},6551:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>n})},6578:(e,t,r)=>{"use strict";r.d(t,{Af:()=>X,Bh:()=>ef,CU:()=>g,Dl:()=>P,E:()=>eu,FC:()=>eo,FV:()=>A,Gi:()=>V,H1:()=>x,H7:()=>h,HC:()=>c,HT:()=>a,II:()=>Z,JU:()=>_,NR:()=>M,OX:()=>I,PH:()=>ec,QG:()=>B,Qx:()=>p,SJ:()=>y,SM:()=>T,UE:()=>K,VW:()=>w,W2:()=>E,X8:()=>$,Z3:()=>G,_m:()=>U,a6:()=>F,aP:()=>J,ax:()=>m,bV:()=>z,bZ:()=>er,c1:()=>d,cQ:()=>D,dd:()=>ee,dg:()=>k,dw:()=>R,dx:()=>C,f$:()=>H,h0:()=>N,h1:()=>Y,hH:()=>ea,hc:()=>i,hn:()=>el,l2:()=>O,le:()=>en,lv:()=>S,nU:()=>l,oH:()=>ei,oS:()=>q,p:()=>es,r:()=>L,tZ:()=>v,tn:()=>u,u6:()=>et,uc:()=>W,v7:()=>j,xC:()=>s,xq:()=>b,xw:()=>ed,zA:()=>f,zo:()=>ep,zr:()=>Q});var n=r(23727);async function o(e,t){let r=await fetch(e,t);if(!r.ok){let e=await r.text(),t=e||"HTTP ".concat(r.status);try{let r=JSON.parse(e);t=r.error||r.message||t}catch(e){}throw Error(t)}return r.json()}async function i(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/kb/stats".concat(t))}async function a(e){var t,r;let n=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&n.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&n.set("category",e.category),(null==e?void 0:e.page)&&n.set("page",String(null!=(t=e.page)?t:1)),(null==e?void 0:e.limit)&&n.set("limit",String(null!=(r=e.limit)?r:50)),o("/api/kb/files?".concat(n))}async function l(e){let t=new URLSearchParams;return(null==e?void 0:e.query)&&t.set("q",e.query),(null==e?void 0:e.projectRoot)&&t.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&t.set("category",e.category),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.includeContent)===!1&&t.set("includeContent","0"),o("/api/kb/files/search?".concat(t))}async function s(e,t){let r=new URLSearchParams({relativePath:e});return t&&r.set("projectRoot",t),o("/api/kb/files/detail?".concat(r))}async function c(e,t){return o("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function u(e,t,r){return o("/api/kb/files/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,target:t,projectRoot:r})})}async function d(e,t,r,i){var a;let l=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_FILES||1e3),s=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_BYTES||0x40000000),c=[],u=[],d=0;for(let t of e)u.length>0&&(u.length>=l||d+t.size>s)&&(c.push(u),u=[],d=0),u.push(t),d+=t.size;u.length>0&&c.push(u);let p=[],f=0;for(let n=0;n<c.length;n++){let a=c[n],l=await o("/api/kb/upload",{method:"POST",body:function(e,t){let r=new FormData;for(let n of(t.projectRoot&&r.append("projectRoot",t.projectRoot),t.uploadId&&r.append("uploadId",t.uploadId),r.append("batchIndex",String(t.batchIndex)),r.append("totalBatches",String(t.totalBatches)),r.append("fileOffset",String(t.fileOffset)),r.append("startIndex",t.startIndex?"1":"0"),r.append("uploadComplete",t.batchIndex===t.totalBatches-1?"1":"0"),e))r.append("files",n,n.name),r.append("relativePaths",n.webkitRelativePath||n.name);return r}(a,{projectRoot:t,uploadId:r,batchIndex:n,totalBatches:c.length,fileOffset:f,startIndex:0===n})});p.push(l),f+=a.length,null==i||i({uploadedFiles:f,totalFiles:e.length,batchIndex:n,totalBatches:c.length})}return null!=(a=p[p.length-1])?a:{success:!0}}async function p(e){let t=new URLSearchParams({limit:"50"});return e&&t.set("projectRoot",e),o("/api/kb/operations?".concat(t))}async function f(e){var t;let r=new URLSearchParams({limit:String(null!=(t=null==e?void 0:e.limit)?t:50)});return(null==e?void 0:e.projectRoot)&&r.set("projectRoot",e.projectRoot),(null==e?void 0:e.active)&&r.set("active","1"),o("/api/jobs?".concat(r))}async function m(e,t){let r=new URLSearchParams;return t&&r.set("projectRoot",t),o("/api/jobs/".concat(encodeURIComponent(e),"?").concat(r))}async function h(e){let t=new URLSearchParams;return e&&t.set("projectRoot",e),o("/api/kb/operations?".concat(t),{method:"DELETE"})}async function g(e,t){let r=new URLSearchParams({id:e});return t&&r.set("projectRoot",t),o("/api/kb/operations?".concat(r),{method:"DELETE"})}async function b(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function y(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,projectRoot:t})})}async function v(e,t,r){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,folderPaths:t,projectRoot:r})})}async function $(e){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,projectRoot:e})})}async function x(e){return o("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function w(){return o("/api/kb/features")}async function E(e,t){var r,n,i,a,l;let s=new URLSearchParams({q:e});return(null==t?void 0:t.projectRoot)&&s.set("projectRoot",t.projectRoot),(null==t?void 0:t.category)&&s.set("category",t.category),(null==t?void 0:t.limit)&&s.set("limit",String(null!=(l=t.limit)?l:20)),(null==t||null==(r=t.weights)?void 0:r.keyword)!=null&&s.set("keywordWeight",String(t.weights.keyword)),(null==t||null==(n=t.weights)?void 0:n.vector)!=null&&s.set("vectorWeight",String(t.weights.vector)),(null==t||null==(i=t.weights)?void 0:i.rewrite)!=null&&s.set("rewriteWeight",String(t.weights.rewrite)),(null==t||null==(a=t.weights)?void 0:a.hybridBonus)!=null&&s.set("hybridBonus",String(t.weights.hybridBonus)),o("/api/kb/search?".concat(s))}async function C(){return o("/api/prompt")}async function S(e){return o("/api/documents/roles".concat(e?"?type=".concat(e):""))}async function k(e){return o("/api/documents/roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function A(e,t){return o("/api/documents/roles?type=".concat(e,"&id=").concat(encodeURIComponent(t)),{method:"DELETE"})}async function M(e){return o("/api/documents/roles?mode=config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function R(e){return o("/api/documents/roles?mode=config&id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function P(){return o("/api/documents/templates")}async function T(e){return o("/api/documents/templates?validate=".concat(encodeURIComponent(e)))}async function O(e){return o("/api/documents/templates",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function N(e){return o("/api/documents/templates?templateId=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function z(e){return o("/api/documents/templates",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:e})})}async function I(e){return o("/api/documents/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function D(){return o("/api/documents/generated")}async function j(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(t?"?lite=1":""))}async function F(e,t){return o("/api/documents/generated/".concat(encodeURIComponent(e)),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function B(e){return o("/api/documents/generated/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function L(e){return o("/api/documents/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"abort",documentId:e})})}async function H(){return o("/api/assets/generated")}async function _(e){return o("/api/assets/generated?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function W(e){return o("/api/assets/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:"index"})})}async function q(e,t){return o("/api/assets/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:"open",target:t})})}async function V(e){return o("/api/documents/refine",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function X(e,t){return o("/api/documents/drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e,id:t})})}async function K(e){let t=await fetch("/api/documents/export",{method:"POST",headers:{"Content-Type":"application/json",Accept:"pdf"===e.format?"application/pdf":"*/*"},body:JSON.stringify(e)}),r=t.headers.get("content-type")||"",n=async()=>{let e=await t.text(),r=e||"导出失败";try{var n;let t=JSON.parse(e),o=null==(n=t.issues)?void 0:n.map(e=>e.message).filter(Boolean).slice(0,3).join(";");r=o?"".concat(t.error||"导出失败",":").concat(o):t.message||t.error||r}catch(e){}throw Error(r.length>300?"".concat(r.slice(0,300),"..."):r)};return t.ok||await n(),"pdf"!==e.format||r.includes("application/pdf")||await n(),"docx"!==e.format||r.includes("officedocument.wordprocessingml.document")||await n(),t.blob()}async function G(){return o("/api/config/providers")}async function U(e,t){return o("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...t})})}async function Y(e){return o("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function Q(){return o("/api/config/models")}async function J(e){return o("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function Z(){return o("/api/config/embedding")}async function ee(e){return o("/api/config/embedding",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function et(){return o("/api/config/embedding/healthCheck",{method:"POST"})}async function er(e){return o("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function en(){return o("/api/health")}async function eo(){return o("/api/system/stats")}async function ei(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return o("/api/system/logs?limit=".concat(e))}async function ea(){return o("/api/system/logs",{method:"DELETE"})}async function el(e,t){let r=t?"?type=".concat(e,"&search=").concat(encodeURIComponent(t)):"?type=".concat(e);return o("/api/context".concat(r))}async function es(e){return o("/api/context?type=".concat(e,"&stats=1"))}async function ec(e){return o("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"compress",type:e})})}async function eu(e){return o("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear",type:e})})}async function ed(e){return o("/api/context?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function ep(e,t){return o("/api/context",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...t})})}async function ef(e){return o("/api/config/providers/".concat(encodeURIComponent(e)))}},6831:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,X:()=>i});var n=r(97109);let o=n.createContext(!1),i=({children:e,disabled:t})=>{let r=n.useContext(o);return n.createElement(o.Provider,{value:t??r},e)},a=o},7709:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>m,Is:()=>u});var n=r(97109),o=r(15561),i=r(74567),a=r(12754),l=r(18625),s=r(9311),c=r(44444);let u={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},d={motionBase:!0,motionUnit:!0},p={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},f=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:o,...i}=t,a={...n,override:o};return a=(0,c.A)(a),i&&Object.entries(i).forEach(([e,t])=>{let{theme:r,...n}=t,o=n;r&&(o=f({...a,...n},{override:n},r)),a[e]=o}),a};function m(){let{token:e,hashed:t,theme:r,override:c,cssVar:m,zeroRuntime:h}=n.useContext(a.vG),{csp:g,getPrefixCls:b}=n.useContext(i.QO),y={prefix:m?.prefix??b(),key:m?.key??"css-var-root"},v=`6.5.0-${t||""}`,$=r||l.A,[x,w,E]=(0,o.hV)($,[s.A,e],{salt:v,override:c,getComputedToken:f,cssVar:{...y,unitless:u,ignore:d,preserve:p},nonce:g?.nonce});return[$,E,t?w:"",x,y,!!h]}},7961:(e,t,r)=>{"use strict";r.d(t,{K8:()=>u,L9:()=>o,Nk:()=>a,Y1:()=>m,av:()=>d,dF:()=>i,jk:()=>c,jz:()=>f,t6:()=>s,vj:()=>p});var n=r(15561);let o={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},i=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),a=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),l=new n.Mo("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),s=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),c=(e,t)=>({outline:`${(0,n.zA)(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(e=>`${e} 0s`).join(", ")}),u=(e,t)=>({"&:focus-visible":c(e,t)}),d=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...u(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),p=(e,t,r,n)=>{let o=`[class^="${t}"], [class*=" ${t}"]`,i=r?`.${r}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},l={};return!1!==n&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...l,...a,[o]:a}}},f=e=>({[`.${e}`]:{...a(),[`.${e} .${e}-icon`]:{display:"block"}},[`.${e}-spin`]:{animationName:l,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),m=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...u(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}})},8572:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(90892);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||(0,n.A)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},8627:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(13911),o=r(26047);let i={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},a={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},l=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function s(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:s,offset:c,borderRadius:u,visibleFirst:d}=e,p=t/2,f={},m=(0,n.Ke)({contentRadius:u,limitVerticalRadius:!0});return Object.keys(i).forEach(e=>{let n={...s&&a[e]||i[e],offset:[0,0],dynamicInset:!0};switch(f[e]=n,l.has(e)&&(n.autoArrow=!1),e){case"top":case"topLeft":case"topRight":n.offset[1]=-p-c;break;case"bottom":case"bottomLeft":case"bottomRight":n.offset[1]=p+c;break;case"left":case"leftTop":case"leftBottom":n.offset[0]=-p-c;break;case"right":case"rightTop":case"rightBottom":n.offset[0]=p+c}if(s)switch(e){case"topLeft":case"bottomLeft":n.offset[0]=-m.arrowOffsetHorizontal-p;break;case"topRight":case"bottomRight":n.offset[0]=m.arrowOffsetHorizontal+p;break;case"leftTop":case"rightTop":n.offset[1]=-(2*m.arrowOffsetHorizontal)+p;break;case"leftBottom":case"rightBottom":n.offset[1]=2*m.arrowOffsetHorizontal-p}n.overflow=function(e,t,r,n){if(!1===n)return{adjustX:!1,adjustY:!1};let i=(0,o.Qd)(n)?n:{},a={};switch(e){case"top":case"bottom":a.shiftX=2*t.arrowOffsetHorizontal+r,a.shiftY=!0,a.adjustY=!0;break;case"left":case"right":a.shiftY=2*t.arrowOffsetVertical+r,a.shiftX=!0,a.adjustX=!0}let l={...a,...i};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}(e,m,t,r),d&&(n.htmlRegion="visibleFirst")}),f}},9290:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r(97109),o=r(42644),i=r(3638),a=r(92162),l=r(26047),s=r(38862),c=r(74567),u=r(6831),d=r(27273),p=r(49644),f=r(7709);let m=n.createContext(void 0);var h=r(86099),g=r(83914),b=r(67189);let y=(0,n.forwardRef)((e,t)=>{let{className:r,style:o,children:a,prefixCls:l}=e,s=(0,i.$)(`${l}-icon`,r);return n.createElement("span",{ref:t,className:s,style:o},a)}),v=(0,n.forwardRef)((e,t)=>{let{prefixCls:r,className:o,style:a,iconClassName:l}=e,s=(0,i.$)(`${r}-loading-icon`,o);return n.createElement(y,{prefixCls:r,className:s,style:a,ref:t},n.createElement(g.A,{className:l}))}),$=()=>({width:0,opacity:0,transform:"scale(0)"}),x=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),w=e=>{let{prefixCls:t,loading:r,existIcon:o,className:a,style:l,mount:s}=e;return o?n.createElement(v,{prefixCls:t,className:a,style:l}):n.createElement(b.Ay,{visible:!!r,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:$,onAppearActive:x,onEnterStart:$,onEnterActive:x,onLeaveStart:x,onLeaveActive:$},({className:e,style:r},o)=>{let s={...l,...r};return n.createElement(v,{prefixCls:t,className:(0,i.$)(a,e),style:s,ref:o})})};var E=r(15561),C=r(7961),S=r(16666),k=r(28403),A=r(10540);let M=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var R=r(38697),P=r(32154),T=r(78012),O=r(44539),N=r(32279);let z=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return(0,k.oX)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},I=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??(0,O.k)(t),i=e.contentLineHeightSM??(0,O.k)(r),a=e.contentLineHeightLG??(0,O.k)(n),l=(0,P.z)(new R.kf(e.colorBgSolid),"#fff")?"#000":"#fff",s=T.s.reduce((t,r)=>({...t,[`${r}ShadowColor`]:`0 ${(0,E.zA)(e.controlOutlineWidth)} 0 ${(0,N.A)(e[`${r}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...s,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:l,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*a)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},D=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:s,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:n,padding:`${(0,E.zA)(s)} ${(0,E.zA)(a)}`,borderRadius:i,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:{minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},j=(0,A.OF)("Button",e=>{let t=z(e);return[(e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:l,calc:s}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...(0,S.V)(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:(0,C.Nk)(),"> a":{color:"currentColor"},"&:not(:disabled)":(0,C.K8)(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(e=>`${e} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(l).mul(-1).equal()}}}}}})(t),(e=>D((0,k.oX)(e,{fontSize:e.contentFontSize}),e.componentCls))(t),(e=>D((0,k.oX)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`))(t),(e=>D((0,k.oX)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`))(t),(e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}})(t),(e=>{let{componentCls:t,antCls:r,lineWidth:n}=e,[o,i]=(0,A.PN)(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:i("border-color"),[o("border-color-active")]:i("border-color"),[o("border-color-disabled")]:i("border-color"),[o("border-style")]:"solid",[o("text-color")]:"#000",[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color"),[o("text-color-disabled")]:i("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:i("bg-color"),[o("bg-color-active")]:i("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[i("border-width"),i("border-style"),i("border-color")].join(" "),color:i("text-color"),backgroundColor:i("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[i("border-width"),i("border-style"),i("border-color-hover")].join(" "),color:i("text-color-hover"),backgroundColor:i("bg-color-hover")},"&:active":{border:[i("border-width"),i("border-style"),i("border-color-active")].join(" "),color:i("text-color-active"),backgroundColor:i("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:i("color-base"),[o("solid-bg-color-hover")]:i("color-hover"),[o("solid-bg-color-active")]:i("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:i("solid-bg-color"),[o("bg-color-hover")]:i("solid-bg-color-hover"),[o("bg-color-active")]:i("solid-bg-color-active"),boxShadow:i("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:i("color-base"),[o("border-color-hover")]:i("color-hover"),[o("border-color-active")]:i("color-active"),[o("bg-color")]:i("bg-color-container"),[o("text-color")]:i("color-base"),[o("text-color-hover")]:i("color-hover"),[o("text-color-active")]:i("color-active"),boxShadow:i("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:i("color-base"),[o("bg-color")]:i("color-light"),[o("bg-color-hover")]:i("color-light-hover"),[o("bg-color-active")]:i("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:i("color-base"),[o("text-color-hover")]:i("color-hover"),[o("text-color-active")]:i("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:i("color-light"),[o("bg-color-active")]:i("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},T.s.map(r=>{let n=e[`${r}6`],i=e[`${r}1`],a=e[`${r}Hover`],l=e[`${r}2`],s=e[`${r}3`],c=e[`${r}Active`],u=e[`${r}ShadowColor`];return{[`&${t}-color-${r}`]:{[o("color-base")]:n,[o("color-hover")]:a,[o("color-active")]:c,[o("color-light")]:i,[o("color-light-hover")]:l,[o("color-light-active")]:s,[o("shadow")]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:i("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}})(t),(e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},M(`${t}-primary`,o),M(`${t}-danger`,i)]}})(t)]},I,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});var F=r(77032);let B=(0,A.bf)(["Button","compact"],e=>{let t=z(e);return[(0,F.G)(t),function(e){var t,r;let n=`${e.componentCls}-compact-vertical`;return{[n]:{...(t=e.componentCls,{[`&-item:not(${n}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${t}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}),...(r=e.componentCls,{[`&-item:not(${n}-first-item):not(${n}-last-item)`]:{borderRadius:0},[`&-item${n}-first-item:not(${n}-last-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${n}-last-item:not(${n}-first-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}})}}}(t),(e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:o,colorBgContainer:i}=e,a=`${r}-variant-solid:not([disabled])`,l=o(n).mul(-1).equal(),[s,c]=(0,A.PN)(t,"btn"),u=e=>({[`${r}-compact${e?"-vertical":""}-item`]:{[s("compact-connect-border-color")]:c("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},e?{top:l,insetInline:l,height:n}:{insetBlock:l,insetInlineStart:l,width:n}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${a}${r}-color-default`]:{[s("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]})(t)]},I),L={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},H=n.forwardRef((e,t)=>{let r,{_skipSemantic:f,loading:g=!1,prefixCls:b,color:v,variant:$,type:x,danger:E=!1,shape:C,size:S,disabled:k,className:A,rootClassName:M,children:R,icon:P,iconPosition:T,iconPlacement:O,ghost:N=!1,block:z=!1,htmlType:I="button",classNames:D,styles:F,style:H,autoInsertSpace:_,autoFocus:W,...q}=e,V=(0,o.$r)(R),X=x||"default",{getPrefixCls:K,direction:G,autoInsertSpace:U,className:Y,style:Q,classNames:J,styles:Z,loadingIcon:ee,shape:et,color:er,variant:en}=(0,c.TP)("button"),eo=C||et||"default",[ei,ea]=(0,n.useMemo)(()=>{if(v&&$)return[v,$];if(x||E){let e=L[X]||[];return E?["danger",e[1]]:e}return"solid"===$?["primary",$]:er&&en?[er,en]:"solid"===en?["primary",en]:["default","outlined"]},[v,$,x,E,er,en,X]),[el,es]=(0,n.useMemo)(()=>N&&"solid"===ea?[ei,"outlined"]:[ei,ea],[ei,ea,N]),ec="danger"===el,eu=ec?"dangerous":el,ed=_??U??!0,ep=K("btn",b),[ef,em]=j(ep),eh=(0,n.useContext)(u.A),eg=k??eh,eb=(0,n.useContext)(m),ey=(0,n.useMemo)(()=>(function(e){if((0,l.Qd)(e)){let t=e?.delay;return{loading:(t=(0,l.Et)(t)?t:0)<=0,delay:t}}return{loading:!!e,delay:0}})(g),[g]),[ev,e$]=(0,n.useState)(ey.loading),[ex,ew]=(0,n.useState)(!1),eE=(0,n.useRef)(null),eC=(0,o.xK)(t,eE),eS=1===V.length&&!P&&!(0,h.u1)(es),ek=(0,n.useRef)(!0);n.useEffect(()=>(ek.current=!1,()=>{ek.current=!0}),[]),(0,o.Nf)(()=>{let e=null;return ey.delay>0?e=setTimeout(()=>{e=null,e$(!0)},ey.delay):e$(ey.loading),function(){e&&(clearTimeout(e),e=null)}},[ey.delay,ey.loading]),(0,n.useEffect)(()=>{if(!eE.current||!ed)return;let e=eE.current.textContent||"";eS&&(0,h.Ap)(e)?ex||ew(!0):ex&&ew(!1)}),(0,n.useEffect)(()=>{W&&eE.current&&eE.current.focus()},[]);let eA=n.useCallback(t=>{if(ev||eg)return void t.preventDefault();e.onClick?.(("href"in e,t))},[e.onClick,ev,eg]),{compactSize:eM,compactItemClassnames:eR}=(0,p.RQ)(ep,G),eP=(0,d.A)(e=>S??eM??eb??e),eT=ev?"loading":P,eO=O??T??"start",eN=(0,o.cJ)(q,["navigate"]),ez={...e,type:X,color:el,variant:es,danger:ec,shape:eo,size:eP,disabled:eg,loading:ev,iconPlacement:eO},eI=(0,a.XT)(Q),eD=(0,a.XT)(H),[ej,eF]=(0,a.AV)([f?void 0:J,D],[f?void 0:Z,eI,F,eD],{props:ez}),eB=(0,i.$)(ep,ef,em,{[`${ep}-${eo}`]:"default"!==eo&&"square"!==eo&&eo,[`${ep}-${X}`]:X,[`${ep}-dangerous`]:E,[`${ep}-color-${eu}`]:eu,[`${ep}-variant-${es}`]:es,[`${ep}-lg`]:"large"===eP,[`${ep}-sm`]:"small"===eP,[`${ep}-icon-only`]:!R&&0!==R&&!!eT,[`${ep}-background-ghost`]:N&&!(0,h.u1)(es),[`${ep}-loading`]:ev,[`${ep}-two-chinese-chars`]:ex&&ed&&!ev,[`${ep}-block`]:z,[`${ep}-rtl`]:"rtl"===G,[`${ep}-icon-end`]:"end"===eO},eR,A,M,Y,ej.root),eL={className:ej.icon,style:eF.icon},eH=e=>n.createElement(y,{prefixCls:ep,...eL},e),e_=n.createElement(w,{existIcon:!!P,prefixCls:ep,loading:ev,mount:ek.current,...eL}),eW=(0,l.Qd)(g)&&g.icon||ee;r=P&&!ev?eH(P):g&&eW?eH(eW):e_;let eq=(0,l.AZ)(R)?(0,h.uR)(R,eS&&ed,eF.content,ej.content):null;if(void 0!==eN.href)return n.createElement("a",{...eN,className:(0,i.$)(eB,{[`${ep}-disabled`]:eg}),href:eg?void 0:eN.href,style:eF.root,onClick:eA,ref:eC,tabIndex:eg?-1:0,"aria-disabled":eg},r,eq);let eV=n.createElement("button",{...q,type:I,className:eB,style:eF.root,onClick:eA,disabled:eg,ref:eC},r,eq,eR&&n.createElement(B,{prefixCls:ep}));return(0,h.u1)(es)||(eV=n.createElement(s.A,{component:"Button",disabled:ev},eV)),eV});H.Group=e=>{let{getPrefixCls:t,direction:r}=n.useContext(c.QO),{prefixCls:o,size:a,className:l,...s}=e,u=t("btn-group",o),[,,d]=(0,f.Ay)(),p=n.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),h=(0,i.$)(u,{[`${u}-${p}`]:p,[`${u}-rtl`]:"rtl"===r},l,d);return n.createElement(m.Provider,{value:a},n.createElement("div",{...s,className:h}))},H.__ANT_BUTTON=!0;let _=H},9311:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,r:()=>n});let n={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o={...n,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
10
+ `]:{animationName:t,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}}},5741:(e,t,r)=>{"use strict";function n(e,t){return{motionName:t??`${e}-fade`}}function o(e){let t,r=new Promise(r=>{t=e(()=>{r(!0)})}),n=()=>{t?.()};return n.then=(e,t)=>r.then(e,t),n.promise=r,n}r.d(t,{E:()=>o,V:()=>n})},6551:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>n})},6578:(e,t,r)=>{"use strict";r.d(t,{Af:()=>X,Bh:()=>ef,CU:()=>g,Dl:()=>P,E:()=>eu,FC:()=>eo,FV:()=>A,Gi:()=>V,H1:()=>x,H7:()=>h,HC:()=>c,HT:()=>a,II:()=>Z,JU:()=>_,NR:()=>M,OX:()=>I,PH:()=>ec,QG:()=>B,Qx:()=>p,SJ:()=>y,SM:()=>T,UE:()=>K,VW:()=>w,W2:()=>E,X8:()=>$,Z3:()=>G,_m:()=>U,a6:()=>F,aP:()=>J,ax:()=>m,bV:()=>z,bZ:()=>er,c1:()=>d,cQ:()=>D,dd:()=>ee,dg:()=>k,dw:()=>R,dx:()=>C,f$:()=>H,h0:()=>N,h1:()=>Y,hH:()=>ea,hc:()=>i,hn:()=>el,l2:()=>O,le:()=>en,lv:()=>S,nU:()=>l,oH:()=>ei,oS:()=>q,p:()=>es,r:()=>L,tZ:()=>v,tn:()=>u,u6:()=>et,uc:()=>W,v7:()=>j,xC:()=>s,xq:()=>b,xw:()=>ed,zA:()=>f,zo:()=>ep,zr:()=>Q});var n=r(23727);async function o(e,t){let r=await fetch(e,t);if(!r.ok){let e=await r.text(),t=e||"HTTP ".concat(r.status);try{let r=JSON.parse(e);t=r.error||r.message||t}catch(e){}throw Error(t)}return r.json()}async function i(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/kb/stats".concat(t))}async function a(e){var t,r;let n=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&n.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&n.set("category",e.category),(null==e?void 0:e.page)&&n.set("page",String(null!=(t=e.page)?t:1)),(null==e?void 0:e.limit)&&n.set("limit",String(null!=(r=e.limit)?r:50)),o("/api/kb/files?".concat(n))}async function l(e){let t=new URLSearchParams;return(null==e?void 0:e.query)&&t.set("q",e.query),(null==e?void 0:e.projectRoot)&&t.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&t.set("category",e.category),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.includeContent)===!1&&t.set("includeContent","0"),o("/api/kb/files/search?".concat(t))}async function s(e,t){let r=new URLSearchParams({relativePath:e});return t&&r.set("projectRoot",t),o("/api/kb/files/detail?".concat(r))}async function c(e,t){return o("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function u(e,t,r){return o("/api/kb/files/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,target:t,projectRoot:r})})}async function d(e,t,r,i){var a;let l=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_FILES||500),s=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_BYTES||0x8000000),c=[],u=[],d=0;for(let t of e)u.length>0&&(u.length>=l||d+t.size>s)&&(c.push(u),u=[],d=0),u.push(t),d+=t.size;u.length>0&&c.push(u);let p=[],f=0;for(let n=0;n<c.length;n++){let a=c[n],l=new URLSearchParams({batchIndex:String(n),totalBatches:String(c.length)});r&&l.set("uploadId",r);let s=await o("/api/kb/upload?".concat(l),{method:"POST",body:function(e,t){let r=new FormData;for(let n of(t.projectRoot&&r.append("projectRoot",t.projectRoot),t.uploadId&&r.append("uploadId",t.uploadId),r.append("batchIndex",String(t.batchIndex)),r.append("totalBatches",String(t.totalBatches)),r.append("fileOffset",String(t.fileOffset)),r.append("startIndex",t.startIndex?"1":"0"),r.append("uploadComplete",t.batchIndex===t.totalBatches-1?"1":"0"),e))r.append("files",n,n.name),r.append("relativePaths",n.webkitRelativePath||n.name);return r}(a,{projectRoot:t,uploadId:r,batchIndex:n,totalBatches:c.length,fileOffset:f,startIndex:0===n})});p.push(s),f+=a.length,null==i||i({uploadedFiles:f,totalFiles:e.length,batchIndex:n,totalBatches:c.length})}return null!=(a=p[p.length-1])?a:{success:!0}}async function p(e){let t=new URLSearchParams({limit:"50"});return e&&t.set("projectRoot",e),o("/api/kb/operations?".concat(t))}async function f(e){var t;let r=new URLSearchParams({limit:String(null!=(t=null==e?void 0:e.limit)?t:50)});return(null==e?void 0:e.projectRoot)&&r.set("projectRoot",e.projectRoot),(null==e?void 0:e.active)&&r.set("active","1"),o("/api/jobs?".concat(r))}async function m(e,t){let r=new URLSearchParams;return t&&r.set("projectRoot",t),o("/api/jobs/".concat(encodeURIComponent(e),"?").concat(r))}async function h(e){let t=new URLSearchParams;return e&&t.set("projectRoot",e),o("/api/kb/operations?".concat(t),{method:"DELETE"})}async function g(e,t){let r=new URLSearchParams({id:e});return t&&r.set("projectRoot",t),o("/api/kb/operations?".concat(r),{method:"DELETE"})}async function b(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function y(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,projectRoot:t})})}async function v(e,t,r){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,folderPaths:t,projectRoot:r})})}async function $(e){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,projectRoot:e})})}async function x(e){return o("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function w(){return o("/api/kb/features")}async function E(e,t){var r,n,i,a,l;let s=new URLSearchParams({q:e});return(null==t?void 0:t.projectRoot)&&s.set("projectRoot",t.projectRoot),(null==t?void 0:t.category)&&s.set("category",t.category),(null==t?void 0:t.limit)&&s.set("limit",String(null!=(l=t.limit)?l:20)),(null==t||null==(r=t.weights)?void 0:r.keyword)!=null&&s.set("keywordWeight",String(t.weights.keyword)),(null==t||null==(n=t.weights)?void 0:n.vector)!=null&&s.set("vectorWeight",String(t.weights.vector)),(null==t||null==(i=t.weights)?void 0:i.rewrite)!=null&&s.set("rewriteWeight",String(t.weights.rewrite)),(null==t||null==(a=t.weights)?void 0:a.hybridBonus)!=null&&s.set("hybridBonus",String(t.weights.hybridBonus)),o("/api/kb/search?".concat(s))}async function C(){return o("/api/prompt")}async function S(e){return o("/api/documents/roles".concat(e?"?type=".concat(e):""))}async function k(e){return o("/api/documents/roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function A(e,t){return o("/api/documents/roles?type=".concat(e,"&id=").concat(encodeURIComponent(t)),{method:"DELETE"})}async function M(e){return o("/api/documents/roles?mode=config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function R(e){return o("/api/documents/roles?mode=config&id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function P(){return o("/api/documents/templates")}async function T(e){return o("/api/documents/templates?validate=".concat(encodeURIComponent(e)))}async function O(e){return o("/api/documents/templates",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function N(e){return o("/api/documents/templates?templateId=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function z(e){return o("/api/documents/templates",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:e})})}async function I(e){return o("/api/documents/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function D(){return o("/api/documents/generated")}async function j(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(t?"?lite=1":""))}async function F(e,t){return o("/api/documents/generated/".concat(encodeURIComponent(e)),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function B(e){return o("/api/documents/generated/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function L(e){return o("/api/documents/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"abort",documentId:e})})}async function H(){return o("/api/assets/generated")}async function _(e){return o("/api/assets/generated?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function W(e){return o("/api/assets/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:"index"})})}async function q(e,t){return o("/api/assets/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:"open",target:t})})}async function V(e){return o("/api/documents/refine",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function X(e,t){return o("/api/documents/drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e,id:t})})}async function K(e){let t=await fetch("/api/documents/export",{method:"POST",headers:{"Content-Type":"application/json",Accept:"pdf"===e.format?"application/pdf":"*/*"},body:JSON.stringify(e)}),r=t.headers.get("content-type")||"",n=async()=>{let e=await t.text(),r=e||"导出失败";try{var n;let t=JSON.parse(e),o=null==(n=t.issues)?void 0:n.map(e=>e.message).filter(Boolean).slice(0,3).join(";");r=o?"".concat(t.error||"导出失败",":").concat(o):t.message||t.error||r}catch(e){}throw Error(r.length>300?"".concat(r.slice(0,300),"..."):r)};return t.ok||await n(),"pdf"!==e.format||r.includes("application/pdf")||await n(),"docx"!==e.format||r.includes("officedocument.wordprocessingml.document")||await n(),t.blob()}async function G(){return o("/api/config/providers")}async function U(e,t){return o("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...t})})}async function Y(e){return o("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function Q(){return o("/api/config/models")}async function J(e){return o("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function Z(){return o("/api/config/embedding")}async function ee(e){return o("/api/config/embedding",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function et(){return o("/api/config/embedding/healthCheck",{method:"POST"})}async function er(e){return o("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function en(){return o("/api/health")}async function eo(){return o("/api/system/stats")}async function ei(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return o("/api/system/logs?limit=".concat(e))}async function ea(){return o("/api/system/logs",{method:"DELETE"})}async function el(e,t){let r=t?"?type=".concat(e,"&search=").concat(encodeURIComponent(t)):"?type=".concat(e);return o("/api/context".concat(r))}async function es(e){return o("/api/context?type=".concat(e,"&stats=1"))}async function ec(e){return o("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"compress",type:e})})}async function eu(e){return o("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear",type:e})})}async function ed(e){return o("/api/context?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function ep(e,t){return o("/api/context",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...t})})}async function ef(e){return o("/api/config/providers/".concat(encodeURIComponent(e)))}},6831:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,X:()=>i});var n=r(97109);let o=n.createContext(!1),i=({children:e,disabled:t})=>{let r=n.useContext(o);return n.createElement(o.Provider,{value:t??r},e)},a=o},7709:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>m,Is:()=>u});var n=r(97109),o=r(15561),i=r(74567),a=r(12754),l=r(18625),s=r(9311),c=r(44444);let u={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},d={motionBase:!0,motionUnit:!0},p={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},f=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:o,...i}=t,a={...n,override:o};return a=(0,c.A)(a),i&&Object.entries(i).forEach(([e,t])=>{let{theme:r,...n}=t,o=n;r&&(o=f({...a,...n},{override:n},r)),a[e]=o}),a};function m(){let{token:e,hashed:t,theme:r,override:c,cssVar:m,zeroRuntime:h}=n.useContext(a.vG),{csp:g,getPrefixCls:b}=n.useContext(i.QO),y={prefix:m?.prefix??b(),key:m?.key??"css-var-root"},v=`6.5.0-${t||""}`,$=r||l.A,[x,w,E]=(0,o.hV)($,[s.A,e],{salt:v,override:c,getComputedToken:f,cssVar:{...y,unitless:u,ignore:d,preserve:p},nonce:g?.nonce});return[$,E,t?w:"",x,y,!!h]}},7961:(e,t,r)=>{"use strict";r.d(t,{K8:()=>u,L9:()=>o,Nk:()=>a,Y1:()=>m,av:()=>d,dF:()=>i,jk:()=>c,jz:()=>f,t6:()=>s,vj:()=>p});var n=r(15561);let o={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},i=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),a=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),l=new n.Mo("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),s=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),c=(e,t)=>({outline:`${(0,n.zA)(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(e=>`${e} 0s`).join(", ")}),u=(e,t)=>({"&:focus-visible":c(e,t)}),d=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...u(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),p=(e,t,r,n)=>{let o=`[class^="${t}"], [class*=" ${t}"]`,i=r?`.${r}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},l={};return!1!==n&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...l,...a,[o]:a}}},f=e=>({[`.${e}`]:{...a(),[`.${e} .${e}-icon`]:{display:"block"}},[`.${e}-spin`]:{animationName:l,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),m=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...u(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}})},8572:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(90892);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||(0,n.A)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},8627:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(13911),o=r(26047);let i={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},a={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},l=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function s(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:s,offset:c,borderRadius:u,visibleFirst:d}=e,p=t/2,f={},m=(0,n.Ke)({contentRadius:u,limitVerticalRadius:!0});return Object.keys(i).forEach(e=>{let n={...s&&a[e]||i[e],offset:[0,0],dynamicInset:!0};switch(f[e]=n,l.has(e)&&(n.autoArrow=!1),e){case"top":case"topLeft":case"topRight":n.offset[1]=-p-c;break;case"bottom":case"bottomLeft":case"bottomRight":n.offset[1]=p+c;break;case"left":case"leftTop":case"leftBottom":n.offset[0]=-p-c;break;case"right":case"rightTop":case"rightBottom":n.offset[0]=p+c}if(s)switch(e){case"topLeft":case"bottomLeft":n.offset[0]=-m.arrowOffsetHorizontal-p;break;case"topRight":case"bottomRight":n.offset[0]=m.arrowOffsetHorizontal+p;break;case"leftTop":case"rightTop":n.offset[1]=-(2*m.arrowOffsetHorizontal)+p;break;case"leftBottom":case"rightBottom":n.offset[1]=2*m.arrowOffsetHorizontal-p}n.overflow=function(e,t,r,n){if(!1===n)return{adjustX:!1,adjustY:!1};let i=(0,o.Qd)(n)?n:{},a={};switch(e){case"top":case"bottom":a.shiftX=2*t.arrowOffsetHorizontal+r,a.shiftY=!0,a.adjustY=!0;break;case"left":case"right":a.shiftY=2*t.arrowOffsetVertical+r,a.shiftX=!0,a.adjustX=!0}let l={...a,...i};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}(e,m,t,r),d&&(n.htmlRegion="visibleFirst")}),f}},9290:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=r(97109),o=r(42644),i=r(3638),a=r(92162),l=r(26047),s=r(38862),c=r(74567),u=r(6831),d=r(27273),p=r(49644),f=r(7709);let m=n.createContext(void 0);var h=r(86099),g=r(83914),b=r(67189);let y=(0,n.forwardRef)((e,t)=>{let{className:r,style:o,children:a,prefixCls:l}=e,s=(0,i.$)(`${l}-icon`,r);return n.createElement("span",{ref:t,className:s,style:o},a)}),v=(0,n.forwardRef)((e,t)=>{let{prefixCls:r,className:o,style:a,iconClassName:l}=e,s=(0,i.$)(`${r}-loading-icon`,o);return n.createElement(y,{prefixCls:r,className:s,style:a,ref:t},n.createElement(g.A,{className:l}))}),$=()=>({width:0,opacity:0,transform:"scale(0)"}),x=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),w=e=>{let{prefixCls:t,loading:r,existIcon:o,className:a,style:l,mount:s}=e;return o?n.createElement(v,{prefixCls:t,className:a,style:l}):n.createElement(b.Ay,{visible:!!r,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:$,onAppearActive:x,onEnterStart:$,onEnterActive:x,onLeaveStart:x,onLeaveActive:$},({className:e,style:r},o)=>{let s={...l,...r};return n.createElement(v,{prefixCls:t,className:(0,i.$)(a,e),style:s,ref:o})})};var E=r(15561),C=r(7961),S=r(16666),k=r(28403),A=r(10540);let M=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var R=r(38697),P=r(32154),T=r(78012),O=r(44539),N=r(32279);let z=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return(0,k.oX)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},I=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??(0,O.k)(t),i=e.contentLineHeightSM??(0,O.k)(r),a=e.contentLineHeightLG??(0,O.k)(n),l=(0,P.z)(new R.kf(e.colorBgSolid),"#fff")?"#000":"#fff",s=T.s.reduce((t,r)=>({...t,[`${r}ShadowColor`]:`0 ${(0,E.zA)(e.controlOutlineWidth)} 0 ${(0,N.A)(e[`${r}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...s,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:l,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*a)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},D=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:s,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:n,padding:`${(0,E.zA)(s)} ${(0,E.zA)(a)}`,borderRadius:i,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:{minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},j=(0,A.OF)("Button",e=>{let t=z(e);return[(e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:l,calc:s}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...(0,S.V)(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:(0,C.Nk)(),"> a":{color:"currentColor"},"&:not(:disabled)":(0,C.K8)(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(e=>`${e} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(l).mul(-1).equal()}}}}}})(t),(e=>D((0,k.oX)(e,{fontSize:e.contentFontSize}),e.componentCls))(t),(e=>D((0,k.oX)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`))(t),(e=>D((0,k.oX)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`))(t),(e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}})(t),(e=>{let{componentCls:t,antCls:r,lineWidth:n}=e,[o,i]=(0,A.PN)(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:i("border-color"),[o("border-color-active")]:i("border-color"),[o("border-color-disabled")]:i("border-color"),[o("border-style")]:"solid",[o("text-color")]:"#000",[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color"),[o("text-color-disabled")]:i("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:i("bg-color"),[o("bg-color-active")]:i("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[i("border-width"),i("border-style"),i("border-color")].join(" "),color:i("text-color"),backgroundColor:i("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[i("border-width"),i("border-style"),i("border-color-hover")].join(" "),color:i("text-color-hover"),backgroundColor:i("bg-color-hover")},"&:active":{border:[i("border-width"),i("border-style"),i("border-color-active")].join(" "),color:i("text-color-active"),backgroundColor:i("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:i("color-base"),[o("solid-bg-color-hover")]:i("color-hover"),[o("solid-bg-color-active")]:i("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:i("solid-bg-color"),[o("bg-color-hover")]:i("solid-bg-color-hover"),[o("bg-color-active")]:i("solid-bg-color-active"),boxShadow:i("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:i("color-base"),[o("border-color-hover")]:i("color-hover"),[o("border-color-active")]:i("color-active"),[o("bg-color")]:i("bg-color-container"),[o("text-color")]:i("color-base"),[o("text-color-hover")]:i("color-hover"),[o("text-color-active")]:i("color-active"),boxShadow:i("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:i("color-base"),[o("bg-color")]:i("color-light"),[o("bg-color-hover")]:i("color-light-hover"),[o("bg-color-active")]:i("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:i("color-base"),[o("text-color-hover")]:i("color-hover"),[o("text-color-active")]:i("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:i("color-light"),[o("bg-color-active")]:i("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:i("text-color"),[o("text-color-active")]:i("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},T.s.map(r=>{let n=e[`${r}6`],i=e[`${r}1`],a=e[`${r}Hover`],l=e[`${r}2`],s=e[`${r}3`],c=e[`${r}Active`],u=e[`${r}ShadowColor`];return{[`&${t}-color-${r}`]:{[o("color-base")]:n,[o("color-hover")]:a,[o("color-active")]:c,[o("color-light")]:i,[o("color-light-hover")]:l,[o("color-light-active")]:s,[o("shadow")]:u}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:i("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}})(t),(e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},M(`${t}-primary`,o),M(`${t}-danger`,i)]}})(t)]},I,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});var F=r(77032);let B=(0,A.bf)(["Button","compact"],e=>{let t=z(e);return[(0,F.G)(t),function(e){var t,r;let n=`${e.componentCls}-compact-vertical`;return{[n]:{...(t=e.componentCls,{[`&-item:not(${n}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${t}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}),...(r=e.componentCls,{[`&-item:not(${n}-first-item):not(${n}-last-item)`]:{borderRadius:0},[`&-item${n}-first-item:not(${n}-last-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${n}-last-item:not(${n}-first-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}})}}}(t),(e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:o,colorBgContainer:i}=e,a=`${r}-variant-solid:not([disabled])`,l=o(n).mul(-1).equal(),[s,c]=(0,A.PN)(t,"btn"),u=e=>({[`${r}-compact${e?"-vertical":""}-item`]:{[s("compact-connect-border-color")]:c("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},e?{top:l,insetInline:l,height:n}:{insetBlock:l,insetInlineStart:l,width:n}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${a}${r}-color-default`]:{[s("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]})(t)]},I),L={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},H=n.forwardRef((e,t)=>{let r,{_skipSemantic:f,loading:g=!1,prefixCls:b,color:v,variant:$,type:x,danger:E=!1,shape:C,size:S,disabled:k,className:A,rootClassName:M,children:R,icon:P,iconPosition:T,iconPlacement:O,ghost:N=!1,block:z=!1,htmlType:I="button",classNames:D,styles:F,style:H,autoInsertSpace:_,autoFocus:W,...q}=e,V=(0,o.$r)(R),X=x||"default",{getPrefixCls:K,direction:G,autoInsertSpace:U,className:Y,style:Q,classNames:J,styles:Z,loadingIcon:ee,shape:et,color:er,variant:en}=(0,c.TP)("button"),eo=C||et||"default",[ei,ea]=(0,n.useMemo)(()=>{if(v&&$)return[v,$];if(x||E){let e=L[X]||[];return E?["danger",e[1]]:e}return"solid"===$?["primary",$]:er&&en?[er,en]:"solid"===en?["primary",en]:["default","outlined"]},[v,$,x,E,er,en,X]),[el,es]=(0,n.useMemo)(()=>N&&"solid"===ea?[ei,"outlined"]:[ei,ea],[ei,ea,N]),ec="danger"===el,eu=ec?"dangerous":el,ed=_??U??!0,ep=K("btn",b),[ef,em]=j(ep),eh=(0,n.useContext)(u.A),eg=k??eh,eb=(0,n.useContext)(m),ey=(0,n.useMemo)(()=>(function(e){if((0,l.Qd)(e)){let t=e?.delay;return{loading:(t=(0,l.Et)(t)?t:0)<=0,delay:t}}return{loading:!!e,delay:0}})(g),[g]),[ev,e$]=(0,n.useState)(ey.loading),[ex,ew]=(0,n.useState)(!1),eE=(0,n.useRef)(null),eC=(0,o.xK)(t,eE),eS=1===V.length&&!P&&!(0,h.u1)(es),ek=(0,n.useRef)(!0);n.useEffect(()=>(ek.current=!1,()=>{ek.current=!0}),[]),(0,o.Nf)(()=>{let e=null;return ey.delay>0?e=setTimeout(()=>{e=null,e$(!0)},ey.delay):e$(ey.loading),function(){e&&(clearTimeout(e),e=null)}},[ey.delay,ey.loading]),(0,n.useEffect)(()=>{if(!eE.current||!ed)return;let e=eE.current.textContent||"";eS&&(0,h.Ap)(e)?ex||ew(!0):ex&&ew(!1)}),(0,n.useEffect)(()=>{W&&eE.current&&eE.current.focus()},[]);let eA=n.useCallback(t=>{if(ev||eg)return void t.preventDefault();e.onClick?.(("href"in e,t))},[e.onClick,ev,eg]),{compactSize:eM,compactItemClassnames:eR}=(0,p.RQ)(ep,G),eP=(0,d.A)(e=>S??eM??eb??e),eT=ev?"loading":P,eO=O??T??"start",eN=(0,o.cJ)(q,["navigate"]),ez={...e,type:X,color:el,variant:es,danger:ec,shape:eo,size:eP,disabled:eg,loading:ev,iconPlacement:eO},eI=(0,a.XT)(Q),eD=(0,a.XT)(H),[ej,eF]=(0,a.AV)([f?void 0:J,D],[f?void 0:Z,eI,F,eD],{props:ez}),eB=(0,i.$)(ep,ef,em,{[`${ep}-${eo}`]:"default"!==eo&&"square"!==eo&&eo,[`${ep}-${X}`]:X,[`${ep}-dangerous`]:E,[`${ep}-color-${eu}`]:eu,[`${ep}-variant-${es}`]:es,[`${ep}-lg`]:"large"===eP,[`${ep}-sm`]:"small"===eP,[`${ep}-icon-only`]:!R&&0!==R&&!!eT,[`${ep}-background-ghost`]:N&&!(0,h.u1)(es),[`${ep}-loading`]:ev,[`${ep}-two-chinese-chars`]:ex&&ed&&!ev,[`${ep}-block`]:z,[`${ep}-rtl`]:"rtl"===G,[`${ep}-icon-end`]:"end"===eO},eR,A,M,Y,ej.root),eL={className:ej.icon,style:eF.icon},eH=e=>n.createElement(y,{prefixCls:ep,...eL},e),e_=n.createElement(w,{existIcon:!!P,prefixCls:ep,loading:ev,mount:ek.current,...eL}),eW=(0,l.Qd)(g)&&g.icon||ee;r=P&&!ev?eH(P):g&&eW?eH(eW):e_;let eq=(0,l.AZ)(R)?(0,h.uR)(R,eS&&ed,eF.content,ej.content):null;if(void 0!==eN.href)return n.createElement("a",{...eN,className:(0,i.$)(eB,{[`${ep}-disabled`]:eg}),href:eg?void 0:eN.href,style:eF.root,onClick:eA,ref:eC,tabIndex:eg?-1:0,"aria-disabled":eg},r,eq);let eV=n.createElement("button",{...q,type:I,className:eB,style:eF.root,onClick:eA,disabled:eg,ref:eC},r,eq,eR&&n.createElement(B,{prefixCls:ep}));return(0,h.u1)(es)||(eV=n.createElement(s.A,{component:"Button",disabled:ev},eV)),eV});H.Group=e=>{let{getPrefixCls:t,direction:r}=n.useContext(c.QO),{prefixCls:o,size:a,className:l,...s}=e,u=t("btn-group",o),[,,d]=(0,f.Ay)(),p=n.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),h=(0,i.$)(u,{[`${u}-${p}`]:p,[`${u}-rtl`]:"rtl"===r},l,d);return n.createElement(m.Provider,{value:a},n.createElement("div",{...s,className:h}))},H.__ANT_BUTTON=!0;let _=H},9311:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,r:()=>n});let n={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o={...n,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
11
11
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
12
12
  'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}},9750:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(88797),o=r(90892);function i(e){return function(e){if(Array.isArray(e))return(0,n.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.A)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},10090:()=>{},10252:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,B:()=>o});var n=r(97109);let o=n.createContext({}),i=n.createContext({message:{},notification:{},modal:{}})},10540:(e,t,r)=>{"use strict";r.d(t,{OF:()=>s,Or:()=>c,PN:()=>d,bf:()=>u});var n=r(97109),o=r(28403),i=r(74567),a=r(7961),l=r(7709);let{genStyleHooks:s,genComponentStyleHook:c,genSubStyleComponent:u}=(0,o.L_)({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,n.useContext)(i.QO);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,n,o,i]=(0,l.Ay)();return{theme:e,realToken:t,hashId:r,token:n,cssVar:o,zeroRuntime:i}},useCSP:()=>{let{csp:e}=(0,n.useContext)(i.QO);return e??{}},getResetStyles:(e,t)=>{let r=(0,a.av)(e);return[r,{"&":r},(0,a.jz)(t?.prefix.iconPrefixCls??i.pM)]},getCommonStyle:a.vj,getCompUnitless:()=>l.Is}),d=(e,t)=>{let r=`--${e.replace(/\./g,"")}-${t}-`;return[e=>`${r}${e}`,(e,t)=>t?`var(${r}${e}, ${t})`:`var(${r}${e})`]}},10709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"}},10740:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(44539);let o=e=>{let t=(0,n.A)(e),r=t.map(e=>e.size),o=t.map(e=>e.lineHeight),i=r[1],a=r[0],l=r[2],s=o[1],c=o[0],u=o[2];return{fontSizeSM:a,fontSize:i,fontSizeLG:l,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:u,lineHeightSM:c,fontHeight:Math.round(s*i),fontHeightLG:Math.round(u*l),fontHeightSM:Math.round(c*a),lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}}},11567:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"}},11702:(e,t,r)=>{"use strict";r.d(t,{A:()=>N});var n=r(97109),o=r(42644),i=r(3638),a=r(77960),l=r(92162),s=r(26047),c=r(52690),u=r(38862),d=r(74567),p=r(6831),f=r(15561),m=r(47252),h=r(38697),g=r(32154),b=r(7961),y=r(28403),v=r(10540);let $=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,o=e.fontSizeSM;return(0,y.oX)(e,{tagFontSize:o,tagLineHeight:(0,f.zA)(n(e.lineHeightSM).mul(o).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},x=e=>{let t=(0,g.z)(new h.kf(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new m.Y(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},w=(0,v.OF)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:o,calc:i}=e,a=i(n).sub(r).equal(),l=i(t).sub(r).equal();return{[o]:{...(0,b.dF)(e),display:"inline-block",height:"auto",paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${(0,f.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${o}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${o}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${o}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${o}-default`]:{color:e.solidTextColor}},[`${o}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${o}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${o}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${o}-solid, &${o}-filled`]:{color:e.colorTextDisabled,[`${o}-close-icon`]:{color:e.colorTextDisabled}},[`${o}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}})($(e)),x),E=n.forwardRef((e,t)=>{let{prefixCls:r,style:o,className:a,checked:l,children:s,icon:c,onChange:u,onClick:f,onKeyDown:m,disabled:h,...g}=e,{getPrefixCls:b,tag:y}=n.useContext(d.QO),v=n.useContext(p.A),$=h??v,x=b("tag",r),[E,C]=w(x),S=(0,i.$)(x,`${x}-checkable`,{[`${x}-checkable-checked`]:l,[`${x}-checkable-disabled`]:$},y?.className,a,E,C);return n.createElement("span",{...g,ref:t,role:"checkbox","aria-checked":l,"aria-disabled":$||void 0,tabIndex:$?-1:0,style:{...o,...y?.style},className:S,onClick:e=>{$||(u?.(!l),f?.(e))},onKeyDown:e=>{m?.(e),e.defaultPrevented||$||" "===e.key&&(e.preventDefault(),u?.(!l))}},c,n.createElement("span",null,s))});var C=r(9750),S=r(632);let k=n.forwardRef((e,t)=>{let{id:r,prefixCls:a,rootClassName:c,className:u,style:p,classNames:f,styles:m,disabled:h,options:g,value:b,defaultValue:y,onChange:v,multiple:$,...x}=e,{getPrefixCls:k,direction:A,className:M,style:R,classNames:P,styles:T}=(0,d.TP)("tag"),O=k("tag",a),N=`${O}-checkable-group`,z=(0,S.A)(O),[I,D]=w(O,z),j=(0,l.XT)(R),F=(0,l.XT)(p),[B,L]=(0,l.AV)([P,f],[T,j,m,F],{props:e}),H=(0,n.useMemo)(()=>Array.isArray(g)?g.map(e=>(0,s.Qd)(e)?e:{value:e,label:e}):[],[g]),[_,W]=(0,o.PW)(y,b),q=n.useRef(null);(0,n.useImperativeHandle)(t,()=>({nativeElement:q.current}));let V=(0,o.KE)(x,{aria:!0,data:!0});return n.createElement("div",{...V,className:(0,i.$)(N,M,c,{[`${N}-disabled`]:h,[`${N}-rtl`]:"rtl"===A},I,D,u,B.root),style:L.root,id:r,ref:q},H.map(e=>n.createElement(E,{key:e.value,className:(0,i.$)(`${N}-item`,B.item,e.className),style:{...L.item,...e.style},checked:$?(_||[]).includes(e.value):_===e.value,onChange:t=>((e,t)=>{let r=null;if($){let n=_||[];r=e?[].concat((0,C.A)(n),[t.value]):n.filter(e=>e!==t.value)}else r=e?t.value:null;W(r),v?.(r)})(t,e),disabled:h},e.label)))});var A=r(95347),M=r(16924);let R=(0,v.bf)(["Tag","preset"],e=>(e=>(0,M.A)(e,(t,{textColor:r,lightBorderColor:n,lightColor:o,darkColor:i})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:o,borderColor:n,color:r},[`&${e.componentCls}-solid`]:{backgroundColor:i,borderColor:i,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:o,color:r}}})))($(e)),x),P=(e,t,r)=>{let n=function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}(r);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${n}Bg`],borderColor:e[`color${n}Border`],color:e[`color${r}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${r}`],borderColor:e[`color${r}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${n}Bg`],color:e[`color${r}`]}}}},T=(0,v.bf)(["Tag","status"],e=>{let t=$(e);return[P(t,"success","Success"),P(t,"processing","Info"),P(t,"error","Error"),P(t,"warning","Warning")]},x),O=n.forwardRef((e,t)=>{let{prefixCls:r,className:f,rootClassName:h,style:g,children:b,icon:y,color:v,variant:$,onClose:x,bordered:E,disabled:C,href:S,target:k,styles:M,classNames:P,...O}=e,{getPrefixCls:N,direction:z,className:I,variant:D,style:j,classNames:F,styles:B}=(0,d.TP)("tag"),[L,H,_,W,q]=function(e,t){let{color:r,variant:o,bordered:i}=e;return n.useMemo(()=>{let e,n=r?.endsWith("-inverse");e=o||(n?"solid":!1===i?"filled":t||"filled");let a=n?r?.replace("-inverse",""):r;void 0===a&&"solid"===e&&(a="default");let l=(0,A.nP)(a),s=(0,A.ZZ)(a),c={};if(!l&&!s&&a)if("solid"===e)c.backgroundColor=r;else{let t=new m.Y(a).toHsl();t.l=.95,c.backgroundColor=new m.Y(t).toHexString(),c.color=r,"outlined"===e&&(c.borderColor=r)}return[e,a,l,s,c]},[r,o,i,t])}(e,D),V=_||W,X=n.useContext(p.A),K=C??X,{tag:G}=n.useContext(d.QO),[U,Y]=n.useState(!0),Q=(0,o.cJ)(O,["closeIcon","closable"]),J={...e,color:H,variant:L,disabled:K},[Z,ee]=(0,l.AV)([F,P],[B,M],{props:J}),et=n.useMemo(()=>{let e={...ee.root,...j,...g};return K||(e={...q,...e}),e},[ee.root,j,g,q,K]),er=N("tag",r),[en,eo]=w(er),ei=(0,i.$)(er,I,Z.root,`${er}-${L}`,{[`${er}-${H}`]:V,[`${er}-hidden`]:!U,[`${er}-rtl`]:"rtl"===z,[`${er}-disabled`]:K},f,h,en,eo),ea=e=>{!K&&(e.stopPropagation(),x?.(e),e.defaultPrevented||Y(!1))},el=e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.currentTarget.click())},[,es]=(0,a.$Z)((0,a.dG)(e),(0,a.dG)(G),{closable:!1,closeIconRender:e=>{let t=n.createElement("span",{role:"button",tabIndex:K?-1:0,"aria-disabled":K||void 0,className:(0,i.$)(`${er}-close-icon`,Z.close),onClick:ea,onKeyDown:el,style:ee.close},e);return(0,c.fx)(e,t,e=>({onClick:t=>{e?.onClick?.(t),ea(t)},onKeyDown:t=>{e?.onKeyDown?.(t),t.defaultPrevented||el(t)},role:"button",tabIndex:K?-1:0,"aria-disabled":K||void 0,className:(0,i.$)(e?.className,`${er}-close-icon`,Z.close),style:{...ee.close,...e?.style}}))}}),ec=(0,s.Tn)(O.onClick)||b&&"a"===b.type,eu=(0,c.Ob)(y,{className:(0,i.$)(n.isValidElement(y)?y.props?.className:void 0,Z.icon),style:ee.icon}),ed=eu?n.createElement(n.Fragment,null,eu,b&&n.createElement("span",{className:Z.content,style:ee.content},b)):b,ep=n.createElement(S?"a":"span",{...Q,ref:t,className:ei,style:et,href:K?void 0:S,target:k,onClick:K?void 0:Q.onClick,...S&&K?{"aria-disabled":!0}:{}},ed,es,_&&n.createElement(R,{key:"preset",prefixCls:er}),W&&n.createElement(T,{key:"status",prefixCls:er}));return ec?n.createElement(u.A,{component:"Tag"},ep):ep});O.CheckableTag=E,O.CheckableTagGroup=k;let N=O},12754:(e,t,r)=>{"use strict";r.d(t,{sb:()=>i,vG:()=>a});var n=r(97109),o=r(9311);let i={token:o.A,override:{override:o.A},hashed:!0},a=n.createContext(i)},13018:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"}},13076:(e,t,r)=>{"use strict";function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n=function(){return!!e})()}r.d(t,{A:()=>n})},13500:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},13865:(e,t,r)=>{"use strict";r.d(t,{z:()=>i,A:()=>f});var n=r(3638),o=r(97109);let i=e=>{let{children:t,prefixCls:r,id:i,classNames:a,styles:l,className:s,style:c}=e;return o.createElement("div",{id:i,className:(0,n.$)(`${r}-container`,a?.container,s),style:{...l?.container,...c},role:"tooltip"},"function"==typeof t?t():t)};var a=r(82865),l=r(2819);let s={shiftX:64,adjustY:1},c={adjustX:1,shiftY:!0},u=[0,0],d={left:{points:["cr","cl"],overflow:c,offset:[-4,0],targetOffset:u},right:{points:["cl","cr"],overflow:c,offset:[4,0],targetOffset:u},top:{points:["bc","tc"],overflow:s,offset:[0,-4],targetOffset:u},bottom:{points:["tc","bc"],overflow:s,offset:[0,4],targetOffset:u},topLeft:{points:["bl","tl"],overflow:s,offset:[0,-4],targetOffset:u},leftTop:{points:["tr","tl"],overflow:c,offset:[-4,0],targetOffset:u},topRight:{points:["br","tr"],overflow:s,offset:[0,-4],targetOffset:u},rightTop:{points:["tl","tr"],overflow:c,offset:[4,0],targetOffset:u},bottomRight:{points:["tr","br"],overflow:s,offset:[0,4],targetOffset:u},rightBottom:{points:["bl","br"],overflow:c,offset:[4,0],targetOffset:u},bottomLeft:{points:["tl","bl"],overflow:s,offset:[0,4],targetOffset:u},leftBottom:{points:["br","bl"],overflow:c,offset:[-4,0],targetOffset:u}};function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let f=o.forwardRef((e,t)=>{let{trigger:r=["hover"],mouseEnterDelay:s=0,mouseLeaveDelay:c=.1,prefixCls:u="rc-tooltip",children:f,onVisibleChange:m,afterVisibleChange:h,motion:g,placement:b="right",align:y={},destroyOnHidden:v=!1,defaultVisible:$,getTooltipContainer:x,arrowContent:w,overlay:E,id:C,showArrow:S=!0,classNames:k,styles:A,...M}=e,R=(0,l.Ay)(C),P=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,()=>P.current);let T={...M};"visible"in e&&(T.popupVisible=e.visible);let O=o.useMemo(()=>{if(!S)return!1;let e=!0===S?{}:S;return{...e,className:(0,n.$)(e.className,k?.arrow),style:{...e.style,...A?.arrow},content:e.content??w}},[S,k?.arrow,A?.arrow,w]);return o.createElement(a.Ay,p({popupClassName:k?.root,prefixCls:u,popup:o.createElement(i,{key:"content",prefixCls:u,id:R,classNames:k,styles:A},E),action:r,builtinPlacements:d,popupPlacement:b,ref:P,popupAlign:y,getPopupContainer:x,onOpenChange:m,afterOpenChange:h,popupMotion:g,defaultPopupVisible:$,autoDestroy:v,mouseLeaveDelay:c,popupStyle:A?.root,mouseEnterDelay:s,arrow:O,uniqueContainerClassName:k?.uniqueContainer,uniqueContainerStyle:A?.uniqueContainer},T),({open:e})=>{let t=o.Children.only(f);return o.cloneElement(t,{"aria-describedby":E&&e?R:void 0})})})},13911:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s,Ke:()=>l,Zs:()=>a});var n=r(15561),o=r(10540),i=r(21701);let a=8;function l(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?a:n}}let s=(e,t,r)=>{let{componentCls:a,boxShadowPopoverArrow:l,arrowOffsetVertical:s,arrowOffsetHorizontal:c,antCls:u}=e,[d]=(0,o.PN)(u,"tooltip"),{arrowDistance:p=0,arrowShadow:f=!0}=r||{};return{[a]:{[`${a}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...(0,i.j)(e,t,!!f&&l),"&:before":{background:t}}],[`&-placement-top > ${a}-arrow,&-placement-topLeft > ${a}-arrow,&-placement-topRight > ${a}-arrow`]:{bottom:p,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${a}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[d("arrow-offset-x")]:c,[`> ${a}-arrow`]:{left:{_skip_check_:!0,value:c}}},"&-placement-topRight":{[d("arrow-offset-x")]:`calc(100% - ${(0,n.zA)(c)})`,[`> ${a}-arrow`]:{right:{_skip_check_:!0,value:c}}},[`&-placement-bottom > ${a}-arrow,&-placement-bottomLeft > ${a}-arrow,&-placement-bottomRight > ${a}-arrow`]:{top:p,transform:"translateY(-100%)"},[`&-placement-bottom > ${a}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[d("arrow-offset-x")]:c,[`> ${a}-arrow`]:{left:{_skip_check_:!0,value:c}}},"&-placement-bottomRight":{[d("arrow-offset-x")]:`calc(100% - ${(0,n.zA)(c)})`,[`> ${a}-arrow`]:{right:{_skip_check_:!0,value:c}}},[`&-placement-left > ${a}-arrow,&-placement-leftTop > ${a}-arrow,&-placement-leftBottom > ${a}-arrow`]:{right:{_skip_check_:!0,value:p},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${a}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${a}-arrow`]:{top:s},[`&-placement-leftBottom > ${a}-arrow`]:{bottom:s},[`&-placement-right > ${a}-arrow,&-placement-rightTop > ${a}-arrow,&-placement-rightBottom > ${a}-arrow`]:{left:{_skip_check_:!0,value:p},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${a}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${a}-arrow`]:{top:s},[`&-placement-rightBottom > ${a}-arrow`]:{bottom:s}}}}},14450:(e,t,r)=>{"use strict";function n(){return!!("undefined"!=typeof window&&window.document&&window.document.createElement)}r.d(t,{A:()=>n})},14489:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(97109),o=r(26047);let i=(e,t)=>n.useMemo(()=>{let r=e??t;return!!r&&{...(0,o.Qd)(t)?t:{},...(0,o.Qd)(r)?r:{}}},[e,t])},14932:(e,t,r)=>{"use strict";r.d(t,{A:()=>j});var n=r(97109),o=r(13865),i=r(42644),a=r(3638),l=r(44137),s=r(36319),c=r(92162),u=r(26047),d=r(84649),p=r(8627),f=r(52690),m=r(29633),h=r(58860),g=r(74567),b=r(632),y=r(60367),v=r(7709),$=r(21207),x=r(15561),w=r(7961),E=r(72668),C=r(49345),S=r(13911),k=r(21701),A=r(16924),M=r(28403),R=r(10540);let P=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...(0,S.Ke)({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...(0,k.n)((0,M.oX)(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),T=(e,t,r=!0)=>(0,R.OF)("Tooltip",e=>{let{borderRadius:t,colorTextLightSolid:r,colorBgSpotlight:n,maxWidth:o}=e;return[(e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:l,controlHeight:s,dropShadowPopover:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:p,sizePopupArrow:f,antCls:m}=e,[h,g]=(0,R.PN)(m,"tooltip"),b=t(a).add(f).add(p).equal(),y={minWidth:t(a).mul(2).add(f).equal(),minHeight:s,padding:`${(0,x.zA)(e.calc(u).div(2).equal())} ${(0,x.zA)(d)}`,color:g("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxSizing:"border-box"},v={[h("valid-offset-x")]:g("arrow-offset-x","var(--arrow-x)"),transformOrigin:[g("valid-offset-x","50%"),"var(--arrow-y, 50%)"].join(" ")};return[{[r]:{...(0,w.dF)(e),position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:c,...v,"&-hidden":{display:"none"},[h("arrow-background-color")]:i,[`${r}-container`]:[y,(0,E.p9)(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent"}},"&-placement-topLeft,&-placement-topRight,&-placement-bottomLeft,&-placement-bottomRight":{minWidth:b},"&-placement-left,&-placement-leftTop,&-placement-leftBottom,&-placement-right,&-placement-rightTop,&-placement-rightBottom":{[`${r}-inner`]:{borderRadius:e.min(a,S.Zs)}},[`${r}-content`]:{position:"relative"},...(0,A.A)(e,(e,{darkColor:t})=>({[`&${r}-${e}`]:{[`${r}-container`]:{backgroundColor:t},[`${r}-arrow`]:{[h("arrow-background-color")]:t}}})),"&-rtl":{direction:"rtl"}}},(0,S.Ay)(e,g("arrow-background-color"),{arrowShadow:!1}),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...y,...v,position:"absolute",zIndex:t(l).sub(1).equal(),filter:c,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]})((0,M.oX)(e,{tooltipMaxWidth:o,tooltipColor:r,tooltipBorderRadius:t,tooltipBg:n})),(0,C.aB)(e,"zoom-big-fast")]},P,{resetStyle:!1,injectStyle:r})(e,t);var O=r(95347);r(58018);var N=r(38697);let z=(e,t,r)=>{let n=(0,O.nP)(r),[o]=(0,R.PN)(e,"tooltip"),i=(0,a.$)({[`${t}-${r}`]:r&&n}),l={},s={},c=(e=>e instanceof N.kf?e:new N.kf(e))(r).toRgb(),u=(.299*c.r+.587*c.g+.114*c.b)/255;return r&&!n&&(l.background=r,l[o("overlay-color")]=u<.5?"#FFF":"#000",s[o("arrow-background-color")]=r),{className:i,overlayStyle:l,arrowStyle:s}};var I=r(47188);let D=n.forwardRef((e,t)=>{let{prefixCls:r,openClassName:x,getTooltipContainer:w,color:E,children:C,afterOpenChange:S,arrow:k,destroyTooltipOnHide:A,destroyOnHidden:M,title:R,overlay:P,trigger:O,builtinPlacements:N,autoAdjustOverflow:I=!0,motion:D,getPopupContainer:j,placement:F="top",mouseEnterDelay:B=.1,mouseLeaveDelay:L=.1,rootClassName:H,styles:_,classNames:W,onOpenChange:q,overlayInnerStyle:V,overlayStyle:X,overlayClassName:K,...G}=e,[,U]=(0,v.Ay)(),Y=e["data-popover-inject"],{getPopupContainer:Q,getPrefixCls:J,direction:Z,...ee}=(0,g.TP)("tooltip"),{className:et,style:er,classNames:en,styles:eo,arrow:ei,trigger:ea}=Y?{}:ee,el=(0,$.A)(k,ei),es=el.show,ec=O||ea||"hover",eu=j||Q,ed=M??!!A,ep=n.useContext(y.A);(0,m.rJ)("Tooltip");let ef=n.useRef(null),em=()=>{ef.current?.forceAlign()};n.useImperativeHandle(t,()=>({forceAlign:em,nativeElement:ef.current?.nativeElement,popupElement:ef.current?.popupElement}));let[eh,eg]=(0,i.PW)(e.defaultOpen??!1,e.open),eb=!R&&!P&&0!==R,ey=n.useMemo(()=>N||(0,p.A)({arrowPointAtCenter:el?.pointAtCenter??!1,autoAdjustOverflow:I,arrowWidth:es?U.sizePopupArrow:0,borderRadius:U.borderRadius,offset:U.marginXXS,visibleFirst:!0}),[el,N,U,es,I]),ev=n.useMemo(()=>0===R?R:P||R||"",[P,R]),e$=n.createElement(l.A,{space:!0,form:!0},(0,u.Tn)(ev)?ev():ev),ex={...e,trigger:ec,builtinPlacements:ey,getPopupContainer:eu,destroyOnHidden:ed},[ew,eE]=(0,c.AV)([en,W],[eo,_],{props:ex}),eC=J("tooltip",r),eS=J(),ek=eh;("open"in e||!eb)&&!ep||(ek=!1);let eA=n.isValidElement(C)&&!(0,f.zv)(C)?C:n.createElement("span",null,C),eM=eA.props,eR=eM.className&&"string"!=typeof eM.className?eM.className:(0,a.$)(eM.className,x||`${eC}-open`),eP=(0,b.A)(eC),[eT,eO]=T(eC,eP,!Y),eN=z(eS,eC,E),ez=eN.arrowStyle,eI=(0,a.$)(eP,eT,eO),eD=(0,a.$)(K,{[`${eC}-rtl`]:"rtl"===Z},eN.className,H,eI,et,ew.root),[ej,eF]=(0,s.YK)("Tooltip",G.zIndex),eB={...eE.container,...V,...eN.overlayStyle},eL=n.createElement(o.A,{unique:!0,...G,zIndex:ej,showArrow:es,placement:F,mouseEnterDelay:B,mouseLeaveDelay:L,prefixCls:eC,classNames:{root:eD,container:ew.container,arrow:ew.arrow,uniqueContainer:(0,a.$)(eI,ew.container)},styles:{root:{...ez,...eE.root,...er,...X},container:eB,uniqueContainer:eB,arrow:eE.arrow},ref:ef,overlay:e$,visible:ek,onVisibleChange:e=>{eg(!eb&&e),!eb&&q&&q(e)},afterVisibleChange:S,arrowContent:n.createElement("span",{className:`${eC}-arrow-content`}),motion:{motionName:(0,d.b)(eS,"zoom-big-fast","string"==typeof D?.motionName?D?.motionName:void 0),motionDeadline:1e3},trigger:ec,builtinPlacements:ey,getTooltipContainer:eu,destroyOnHidden:ed},ek?(0,f.Ob)(eA,{className:eR}):eA);return n.createElement(h.A.Provider,{value:eF},eL)});D._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,className:r,placement:i="top",title:l,color:s,overlayInnerStyle:u,classNames:d,styles:p}=e,{getPrefixCls:f}=n.useContext(g.QO),m=f("tooltip",t),h=f(),y=(0,b.A)(m),[v,$]=T(m,y),x=z(h,m,s),w=x.arrowStyle,E=n.useMemo(()=>({container:{...u,...x.overlayStyle}}),[u,x.overlayStyle]),C={...e,placement:i},[S,k]=(0,c.AV)([d],[E,p],{props:C}),A=(0,a.$)(y,v,$,m,`${m}-pure`,`${m}-placement-${i}`,r,x.className);return n.createElement("div",{className:A,style:w},n.createElement("div",{className:`${m}-arrow`}),n.createElement(o.z,{...e,className:v,prefixCls:m,classNames:S,styles:k},l))},D.UniqueProvider=I.A;let j=D},15033:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(97109).createContext)({})},15472:(e,t,r)=>{"use strict";function n(e,t){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}r.d(t,{A:()=>o})},15561:(e,t,r)=>{"use strict";let n;r.d(t,{Mo:()=>eO,J:()=>f,an:()=>$,lO:()=>I,Ki:()=>R,zA:()=>k,RC:()=>eP,hV:()=>D,IV:()=>eR});let o=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*0x5bd1e995+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*0x5bd1e995+((t>>>16)*59797<<16)^(65535&r)*0x5bd1e995+((r>>>16)*59797<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*0x5bd1e995+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*0x5bd1e995+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)};var i=r(63255),a=r(97109);function l(e){return e.join("%")}r(87248),r(25846);let s=0;class c{instanceId;constructor(e){this.instanceId=e}cache=new Map;updateTimes=new Map;extracted=new Set;get(e){return this.opGet(l(e))}opGet(e){return this.cache.get(e)||null}update(e,t){return this.opUpdate(l(e),t)}opUpdate(e,t){let r=t(this.cache.get(e));null===r?(this.cache.delete(e),this.updateTimes.delete(e)):(this.cache.set(e,r),this.updateTimes.set(e,s),s+=1)}}let u="data-token-hash",d="data-css-hash",p="__cssinjs_instance__",f=a.createContext({hashPriority:"low",cache:function(){let e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${d}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(t=>{t[p]||=e,t[p]===e&&document.head.insertBefore(t,r)});let n={};Array.from(document.querySelectorAll(`style[${d}]`)).forEach(t=>{let r=t.getAttribute(d);n[r]?t[p]===e&&t.parentNode?.removeChild(t):n[r]=!0})}return new c(e)}(),defaultCache:!0,autoPrefix:!1});var m=r(14450);class h{static MAX_CACHE_SIZE=20;static MAX_CACHE_OFFSET=5;cache;keys;cacheCallTimes;constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(e,t=!1){let r={map:this.cache};return e.forEach(e=>{r=r?r?.map?.get(e):void 0}),r?.value&&t&&(r.value[1]=this.cacheCallTimes++),r?.value}get(e){return this.internalGet(e,!0)?.[0]}has(e){return!!this.internalGet(e)}set(e,t){if(!this.has(e)){if(this.size()+1>h.MAX_CACHE_SIZE+h.MAX_CACHE_OFFSET){let[e]=this.keys.reduce((e,t)=>{let[,r]=e;return this.internalGet(t)[1]<r?[t,this.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]);this.delete(e)}this.keys.push(e)}let r=this.cache;e.forEach((n,o)=>{if(o===e.length-1)r.set(n,{value:[t,this.cacheCallTimes++]});else{let e=r.get(n);e?e.map||(e.map=new Map):r.set(n,{map:new Map}),r=r.get(n).map}})}deleteByPath(e,t){let r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),r.value?.[0];let n=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),n}delete(e){if(this.has(e))return this.keys=this.keys.filter(t=>!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(t,e)),this.deleteByPath(this.cache,e)}}var g=r(96546);let b=0;class y{derivatives;id;constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=b,0===e.length&&(0,g.$e)(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),b+=1}getDerivativeToken(e){return this.derivatives.reduce((t,r)=>r(e,t),void 0)}}let v=new h;function $(e){let t=Array.isArray(e)?e:[e];return v.has(t)||v.set(t,new y(t)),v.get(t)}let x=new WeakMap,w={},E=new WeakMap;function C(e){let t=E.get(e)||"";return t||(Object.keys(e).forEach(r=>{let n=e[r];t+=r,n instanceof y?t+=n.id:n&&"object"==typeof n?t+=C(n):t+=n}),t=o(t),E.set(e,t)),t}`random-${Date.now()}-${Math.random()}`.replace(/\./g,"");let S=(0,m.A)();function k(e){return"number"==typeof e?`${e}px`:e}function A(e){let{hashCls:t,hashPriority:r="low"}=e||{};if(!t)return"";let n=`.${t}`;return"low"===r?`:where(${n})`:n}function M(e,t){let r="function"==typeof t?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}let R=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),P=(e,t,r)=>{let{hashCls:n,hashPriority:o="low",prefix:i,unitless:a,ignore:l,preserve:s}=r||{},c={},u={};return Object.entries(e).forEach(([e,t])=>{if(s?.[e])u[e]=t;else if(("string"==typeof t||"number"==typeof t)&&!l?.[e]){let r=R(e,i);c[r]="number"!=typeof t||a?.[e]?String(t):`${t}px`,u[e]=`var(${r})`}}),[u,((e,t,r)=>{let{hashCls:n,hashPriority:o="low",scope:i}=r||{};if(!Object.keys(e).length)return"";let a=`${A({hashCls:n,hashPriority:o})}.${t}`,l=[i].flat().filter(Boolean),s=l.length?l.map(e=>`${a}.${e}`).join(", "):a;return`${s}{${Object.entries(e).map(([e,t])=>`${e}:${t};`).join("")}}`})(c,t,{scope:r?.scope,hashCls:n,hashPriority:o})]},T=new Map;function O(e,t,r,n,o){let{cache:i}=a.useContext(f),s=l([e,...t]),c=e=>{i.opUpdate(s,t=>{let[n=0,o]=t||[void 0,void 0],i=[n,o||r()];return e?e(i):i})};a.useMemo(()=>{c()},[s]);let u=i.opGet(s)[1];return(0,a.useInsertionEffect)(()=>(c(([e,t])=>[e+1,t]),T.has(s)||(o?.(u),T.set(s,!0),Promise.resolve().then(()=>{T.delete(s)})),()=>{i.opUpdate(s,e=>{let[t=0,r]=e||[];return 0==t-1?(n?.(r,!1),T.delete(s),null):[t-1,r]})}),[s]),u}let N={},z=new Map,I=(e,t,r,n)=>{let o={...r.getDerivativeToken(e),...t};return n&&(o=n(o)),o};function D(e,t,r){let{cache:{instanceId:n},container:l,hashPriority:s}=(0,a.useContext)(f),{salt:c="",override:m=N,formatToken:h,getComputedToken:g,cssVar:b,nonce:y}=r,v=function(e,t){let r=x;for(let e=0;e<t.length;e+=1){let n=t[e];r.has(n)||r.set(n,new WeakMap),r=r.get(n)}return r.has(w)||r.set(w,e()),r.get(w)}(()=>Object.assign({},...t),t),$=C(v),E=C(m),S=C(b);return O("token",[c,e.id,$,E,S],()=>{var t;let r=g?g(v,m,e):I(v,m,e,h),n={...r},i=`${c}_${b.prefix}`,a=o(i),l=`css-${a}`;n._tokenKey=o(`${i}_${C(n)}`);let[u,d]=P(r,b.key,{prefix:b.prefix,ignore:b.ignore,unitless:b.unitless,preserve:b.preserve,hashPriority:s,hashCls:b.hashed?l:void 0});return u._hashId=a,t=b.key,z.set(t,(z.get(t)||0)+1),[u,l,n,d,b.key]},([,,,,e])=>{z.set(e,(z.get(e)||0)-1);let t=new Set;z.forEach((e,r)=>{e<=0&&t.add(r)}),z.size-t.size>-1&&t.forEach(e=>{"undefined"!=typeof document&&document.querySelectorAll(`style[${u}="${e}"]`).forEach(e=>{e[p]===n&&e.parentNode?.removeChild(e)}),z.delete(e)})},([,,,e,t])=>{if(!e)return;let r={mark:d,prepend:"queue",attachTo:l,priority:-999};r=M(r,y);let a=(0,i.BD)(e,o(`css-var-${t}`),r);a[p]=n,a.setAttribute(u,t)})}let j={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var F="-ms-",B="-moz-",L="-webkit-",H="comm",_="rule",W="decl",q="@keyframes",V=Math.abs,X=String.fromCharCode,K=Object.assign;function G(e,t){return(e=t.exec(e))?e[0]:e}function U(e,t,r){return e.replace(t,r)}function Y(e,t){return e.indexOf(t)}function Q(e,t){return 0|e.charCodeAt(t)}function J(e,t,r){return e.slice(t,r)}function Z(e){return e.length}function ee(e,t){return t.push(e),e}function et(e,t){return e.filter(function(e){return!G(e,t)})}function er(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function en(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case W:return e.return=e.return||e.value;case H:return"";case q:return e.return=e.value+"{"+er(e.children,n)+"}";case _:if(!Z(e.value=e.props.join(",")))return""}return Z(r=er(e.children,n))?e.return=e.value+"{"+r+"}":""}var eo=1,ei=1,ea=0,el=0,es=0,ec="";function eu(e,t,r,n,o,i,a,l){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:eo,column:ei,length:a,return:"",siblings:l}}function ed(e,t){return K(eu("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ep(e){for(;e.root;)e=ed(e.root,{children:[e]});ee(e,e.siblings)}function ef(){return es=el<ea?Q(ec,el++):0,ei++,10===es&&(ei=1,eo++),es}function em(){return Q(ec,el)}function eh(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eg(e){var t,r;return(t=el-1,r=function e(t){for(;ef();)switch(es){case t:return el;case 34:case 39:34!==t&&39!==t&&e(es);break;case 40:41===t&&e(t);break;case 92:ef()}return el}(91===e?e+2:40===e?e+1:e),J(ec,t,r)).trim()}function eb(e){var t,r;return r=function e(t,r,n,o,i,a,l,s,c){for(var u,d,p,f,m=0,h=0,g=l,b=0,y=0,v=0,$=1,x=1,w=1,E=0,C=0,S="",k=i,A=a,M=o,R=S;x;)switch(v=C,C=ef()){case 40:108!=v&&58==Q(R,g-1)?(E++,R+="("):R+=eg(C);break;case 41:E--,R+=")";break;case 34:case 39:case 91:R+=eg(C);break;case 9:case 10:case 13:case 32:if(E>0){R+=X(C);break}R+=function(e){for(;es=em();)if(es<33)ef();else break;return eh(e)>2||eh(es)>3?"":" "}(v);break;case 92:R+=function(e,t){for(var r;--t&&ef()&&!(es<48)&&!(es>102)&&(!(es>57)||!(es<65))&&(!(es>70)||!(es<97)););return r=el+(t<6&&32==em()&&32==ef()),J(ec,e,r)}(el-1,7);continue;case 47:switch(em()){case 42:case 47:ee((u=function(e,t){for(;ef();)if(e+es===57)break;else if(e+es===84&&47===em())break;return"/*"+J(ec,t,el-1)+"*"+X(47===e?e:ef())}(ef(),el),d=r,p=n,f=c,eu(u,d,p,H,X(es),J(u,2,-2),0,f)),c),(5==eh(v||1)||5==eh(em()||1))&&Z(R)&&" "!==J(R,-1,void 0)&&(R+=" ");break;default:R+="/"}break;case 123*$:s[m++]=Z(R)*w;case 125*$:case 59:case 0:if(E>0&&C){R+=X(C);break}switch(C){case 0:case 125:x=0;case 59+h:-1==w&&(R=U(R,/\f/g,"")),y>0&&(Z(R)-g||0===$)&&ee(y>32?ev(R+";",o,n,g-1,c):ev(U(R," ","")+";",o,n,g-2,c),c);break;case 59:R+=";";default:if(ee(M=ey(R,r,n,m,h,i,s,S,k=[],A=[],g,a),a),123===C)if(0===h)e(R,r,M,M,k,a,g,s,A);else{switch(b){case 99:if(110===Q(R,3))break;case 108:if(97===Q(R,2))break;default:h=0;case 100:case 109:case 115:}h?e(t,M,M,o&&ee(ey(t,M,M,0,0,i,s,S,i,k=[],g,A),A),i,A,g,s,o?k:A):e(R,M,M,M,[""],A,0,s,A)}}m=h=y=0,$=w=1,S=R="",g=l;break;case 58:g=1+Z(R),y=v;default:if($<1){if(123==C)--$;else if(125==C&&0==$++&&125==(es=el>0?Q(ec,--el):0,ei--,10===es&&(ei=1,eo--),es))continue}switch(R+=X(C),C*$){case 38:w=h>0?1:(R+="\f",-1);break;case 44:if(E>0)break;s[m++]=(Z(R)-1)*w,w=1;break;case 64:45===em()&&(R+=eg(ef())),b=em(),h=g=Z(S=R+=function(e){for(;!eh(em());)ef();return J(ec,e,el)}(el)),C++;break;case 45:45===v&&2==Z(R)&&($=0)}}return a}("",null,null,null,[""],(t=e,eo=ei=1,ea=Z(ec=t),el=0,e=[]),0,[0],e),ec="",r}function ey(e,t,r,n,o,i,a,l,s,c,u,d){for(var p=o-1,f=0===o?i:[""],m=f.length,h=0,g=0,b=0;h<n;++h)for(var y=0,v=J(e,p+1,p=V(g=a[h])),$=e;y<m;++y)($=(g>0?f[y]+" "+v:U(v,/&\f/g,f[y])).trim())&&(s[b++]=$);return eu(e,t,r,0===o?_:l,s,c,u,d)}function ev(e,t,r,n,o){return eu(e,t,r,W,J(e,0,n),J(e,n+1,-1),n,o)}function e$(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=function e(t,r,n){var o;switch(o=r,45^Q(t,0)?(((o<<2^Q(t,0))<<2^Q(t,1))<<2^Q(t,2))<<2^Q(t,3):0){case 5103:return L+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return L+t+t;case 4855:return L+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return B+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return L+t+B+t+F+t+t;case 5936:switch(Q(t,r+11)){case 114:return L+t+F+U(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return L+t+F+U(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return L+t+F+U(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return L+t+F+t+t;case 6165:return L+t+F+"flex-"+t+t;case 5187:return L+t+U(t,/(\w+).+(:[^]+)/,L+"box-$1$2"+F+"flex-$1$2")+t;case 5443:return L+t+F+"flex-item-"+U(t,/flex-|-self/g,"")+(G(t,/flex-|baseline/)?"":F+"grid-row-"+U(t,/flex-|-self/g,""))+t;case 4675:return L+t+F+"flex-line-pack"+U(t,/align-content|flex-|-self/g,"")+t;case 5548:return L+t+F+U(t,"shrink","negative")+t;case 5292:return L+t+F+U(t,"basis","preferred-size")+t;case 6060:return L+"box-"+U(t,"-grow","")+L+t+F+U(t,"grow","positive")+t;case 4554:return L+U(t,/([^-])(transform)/g,"$1"+L+"$2")+t;case 6187:return U(U(U(t,/(zoom-|grab)/,L+"$1"),/(image-set)/,L+"$1"),t,"")+t;case 5495:case 3959:return U(t,/(image-set\([^]*)/,L+"$1$`$1");case 4968:return U(U(t,/(.+:)(flex-)?(.*)/,L+"box-pack:$3"+F+"flex-pack:$3"),/space-between/,"justify")+L+t+t;case 4200:if(!G(t,/flex-|baseline/))return F+"grid-column-align"+J(t,r)+t;break;case 2592:case 3360:return F+U(t,"template-","")+t;case 4384:case 3616:if(n&&n.some(function(e,t){return r=t,G(e.props,/grid-\w+-end/)}))return~Y(t+(n=n[r].value),"span")?t:F+U(t,"-start","")+t+F+"grid-row-span:"+(~Y(n,"span")?G(n,/\d+/):G(n,/\d+/)-G(t,/\d+/))+";";return F+U(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(e){return G(e.props,/grid-\w+-start/)})?t:F+U(U(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return U(t,/(.+)-inline(.+)/,L+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Z(t)-1-r>6)switch(Q(t,r+1)){case 109:if(45!==Q(t,r+4))break;case 102:return U(t,/(.+:)(.+)-([^]+)/,"$1"+L+"$2-$3$1"+B+(108==Q(t,r+3)?"$3":"$2-$3"))+t;case 115:return~Y(t,"stretch")?e(U(t,"stretch","fill-available"),r,n)+t:t}break;case 5152:case 5920:return U(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,r,n,o,i,a,l){return F+r+":"+n+l+(o?F+r+"-span:"+(i?a:a-n)+l:"")+t});case 4949:if(121===Q(t,r+6))return U(t,":",":"+L)+t;break;case 6444:switch(Q(t,45===Q(t,14)?18:11)){case 120:return U(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+L+(45===Q(t,14)?"inline-":"")+"box$3$1"+L+"$2$3$1"+F+"$2box$3")+t;case 100:return U(t,":",":"+F)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return U(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,r);return;case q:return er([ed(e,{value:U(e.value,"@","@"+L)})],n);case _:if(e.length){var o,i;return o=r=e.props,i=function(t){switch(G(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ep(ed(e,{props:[U(t,/:(read-\w+)/,":"+B+"$1")]})),ep(ed(e,{props:[t]})),K(e,{props:et(r,n)});break;case"::placeholder":ep(ed(e,{props:[U(t,/:(plac\w+)/,":"+L+"input-$1")]})),ep(ed(e,{props:[U(t,/:(plac\w+)/,":"+B+"$1")]})),ep(ed(e,{props:[U(t,/:(plac\w+)/,F+"input-$1")]})),ep(ed(e,{props:[t]})),K(e,{props:et(r,n)})}return""},o.map(i).join("")}}}let ex="data-ant-cssinjs-cache-path",ew="_FILE_STYLE__",eE=!0,eC="_multi_value_";function eS(e,t){var r,n;return(t?er(eb(e),(n=(r=[e$,en]).length,function(e,t,o,i){for(var a="",l=0;l<n;l++)a+=r[l](e,t,o,i)||"";return a})):er(eb(e),en)).replace(/\{%%%\:[^;];}/g,";")}function ek(e,t,r="high"){if(!t)return e;let n=A({hashCls:t,hashPriority:r});return e.split(",").map(e=>{let t=e.trim().split(/\s+/),r=t[0]||"",o=r.match(/^\w+/)?.[0]||"";return[r=`${o}${n}${r.slice(o.length)}`,...t.slice(1)].join(" ")}).join(",")}let eA=(e,t={},{root:r,injectHash:n,parentSelectors:o}={root:!0,parentSelectors:[]})=>{let{hashId:i,layer:a,path:l,hashPriority:s,transformers:c=[],linters:u=[]}=t,d="",p={};function f(e){let r=e.getName(i);if(!p[r]){let[n]=eA(e.style,t,{root:!1,parentSelectors:o});p[r]=`@keyframes ${e.getName(i)}${n}`}}return(function e(t,r=[]){return t.forEach(t=>{Array.isArray(t)?e(t,r):t&&r.push(t)}),r})(Array.isArray(e)?e:[e]).forEach(e=>{let a="string"!=typeof e||r?e:{};if("string"==typeof a)d+=`${a}
13
13
  `;else if(a._keyframe)f(a);else{let e=c.reduce((e,t)=>t?.visit?.(e)||e,a);Object.keys(e).forEach(a=>{let l=e[a];if("object"==typeof l&&l&&("animationName"!==a||!l._keyframe)&&!function(e){return"object"==typeof e&&e&&("_skip_check_"in e||eC in e)}(l)){let e=!1,c=a.trim(),u=!1;(r||n)&&i?c.startsWith("@")?e=!0:c="&"===c?ek("",i,s):ek(a,i,s):r&&!i&&("&"===c||""===c)&&(c="",u=!0);let[f,m]=eA(l,t,{root:u,injectHash:e,parentSelectors:[...o,c]});p={...p,...m},d+=`${c}${f}`}else{function c(e,t){let r=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),n=t;j[e]||"number"!=typeof n||0===n||(n=`${n}px`),"animationName"===e&&t?._keyframe&&(f(t),n=t.getName(i)),d+=`${r}:${n};`}let e=l?.value??l;"object"==typeof l&&l?.[eC]&&Array.isArray(e)?e.forEach(e=>{c(a,e)}):null!=e&&c(a,e)}})}}),r?a&&(d&&(d=`@layer ${a.name} {${d}}`),a.dependencies&&(p[`@layer ${a.name}`]=a.dependencies.map(e=>`@layer ${e}, ${a.name};`).join("\n"))):d=`{${d}}`,[d,p]};function eM(e,t){return o(`${e.join("%")}${t}`)}function eR(e,t){let{path:r,hashId:o,layer:l,nonce:s,clientOnly:c,order:u=0}=e,{mock:h,hashPriority:g,container:b,transformers:y,linters:v,cache:$,layer:x,autoPrefix:w}=a.useContext(f),E=[o||""];x&&E.push("layer"),E.push(...r),O("style",E,()=>{let e=E.join("|");if(function(e){if(!n&&(n={},(0,m.A)())){let e=document.createElement("div");e.className=ex,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach(e=>{let[t,r]=e.split(":");n[t]=r});let r=document.querySelector(`style[${ex}]`);r&&(eE=!1,r.parentNode?.removeChild(r)),document.body.removeChild(e)}return!!n[e]}(e)){let[t,r]=function(e){let t=n[e],r=null;if(t&&(0,m.A)())if(eE)r=ew;else{let t=document.querySelector(`style[${d}="${n[e]}"]`);t?r=t.innerHTML:delete n[e]}return[r,t]}(e);if(t)return[t,r,{},c,u]}let[i,a]=eA(t(),{hashId:o,hashPriority:g,layer:x?l:void 0,path:r.join("-"),transformers:y,linters:v}),s=eS(i,w||!1),p=eM(E,s);return[s,p,a,c,u]},(e,t)=>{let[,r]=e;t&&S&&(0,i.m6)(r,{mark:d,attachTo:b})},e=>{let[t,r,n,,o]=e;if(S&&t!==ew){let e={mark:d,prepend:!x&&"queue",attachTo:b,priority:o};e=M(e,s);let a=[],l=[];Object.keys(n).forEach(e=>{e.startsWith("@layer")?a.push(e):l.push(e)}),a.forEach(t=>{(0,i.BD)(eS(n[t],w||!1),`_layer-${t}`,{...e,prepend:!0})}),(0,i.BD)(t,r,e)[p]=$.instanceId,l.forEach(t=>{(0,i.BD)(eS(n[t],w||!1),`_effect-${t}`,e)})}})}let eP=(e,t)=>{let{key:r,prefix:n,unitless:o,ignore:l,token:s,hashId:c,scope:m,nonce:h}=e,{cache:{instanceId:g},container:b,hashPriority:y}=(0,a.useContext)(f),{_tokenKey:v}=s,$=Array.isArray(m)?m.join("@@"):m,x=[...e.path,r,$,v];return O("cssVar",x,()=>{let[e,i]=P(t(),r,{prefix:n,unitless:o,ignore:l,scope:m,hashPriority:y,hashCls:c}),a=eM(x,i);return[e,i,a,r]},([,,e])=>{S&&(0,i.m6)(e,{mark:d,attachTo:b})},([,e,t])=>{if(!e)return;let n={mark:d,prepend:"queue",attachTo:b,priority:-999};n=M(n,h);let o=(0,i.BD)(e,t,n);o[p]=g,o.setAttribute(u,r)})};class eT{name;style;constructor(e,t){this.name=e,this.style=t}getName(e=""){return e?`${e}-${this.name}`:this.name}_keyframe=!0}let eO=eT;function eN(e){return e.notSplit=!0,e}eN(["borderTop","borderBottom"]),eN(["borderTop"]),eN(["borderBottom"]),eN(["borderLeft","borderRight"]),eN(["borderLeft"]),eN(["borderRight"])},15648:(e,t,r)=>{"use strict";r.d(t,{A:()=>function e(t,r={}){let i=[];return o.Children.forEach(t,t=>{(null!=t||r.keepEmpty)&&(Array.isArray(t)?i=i.concat(e(t)):(0,n.A)(t)&&t.props?i=i.concat(e(t.props.children,r)):i.push(t))}),i}});var n=r(5406),o=r(97109)},16666:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});let n=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}})},16924:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(78012);function o(e,t){return n.s.reduce((r,n)=>{let o=e[`${n}1`],i=e[`${n}3`],a=e[`${n}6`],l=e[`${n}7`];return{...r,...t(n,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:l})}},{})}},17597:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});let n=`accept acceptCharset accessKey action allowFullScreen allowTransparency
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[623],{23507:(e,l,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/document-roles",function(){return r(59889)}])},59889:(e,l,r)=>{"use strict";r.r(l),r.d(l,{default:()=>Y});var i=r(65321),n=r(97109),t=r(35292),s=r(17807),o=r(63455),a=r(11702),c=r(84253),d=r(68787),p=r(85114),x=r(26171),m=r(33442),h=r(57271),u=r(85493),f=r(34052),y=r(7576),g=r(2256),j=r(38770),A=r(58569),v=r(25345),b=r(43979),w=r(80042),I=r(75548),S=r(26631),z=r(84662),T=r(30486),R=r(99650),k=r(8263),C=r(84742),_=r(43094),B=r(8579),F=r(81668),N=r(58209),O=r(96091),W=r(54746),E=r(96651),D=r(60470),H=r(6578),P=r(79059);let{Paragraph:L}=t.A,U={rule:(0,i.jsx)(v.A,{}),project_fact:(0,i.jsx)(b.A,{}),table:(0,i.jsx)(w.A,{}),drawing:(0,i.jsx)(I.A,{}),specification:(0,i.jsx)(S.A,{}),reference:(0,i.jsx)(z.A,{})},q={fact_extraction:(0,i.jsx)(T.A,{}),chapter_generation:(0,i.jsx)(R.A,{}),llm_review:(0,i.jsx)(k.A,{}),validation:(0,i.jsx)(C.A,{}),formatting:(0,i.jsx)(_.A,{}),reference:(0,i.jsx)(z.A,{})},V={rule:"#fa8c16",project_fact:"#1677ff",table:"#52c41a",drawing:"#722ed1",specification:"#eb2f96",reference:"#13c2c2"},G={fact_extraction:"#fa8c16",chapter_generation:"#1677ff",llm_review:"#722ed1",validation:"#52c41a",formatting:"#eb2f96",reference:"#13c2c2"},Q={rule:"roles.ruleFile",project_fact:"roles.projectFactFile",table:"roles.tableFile",drawing:"roles.drawingFile",specification:"roles.specificationFile",reference:"roles.reference"},J={fact_extraction:"roles.factExtraction",chapter_generation:"roles.chapterGeneration",llm_review:"roles.llmReview",validation:"roles.validation",formatting:"roles.formatting",reference:"roles.reference"};function M(e,l){let r=new Blob([JSON.stringify(l,null,2)],{type:"application/json;charset=utf-8"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.download=e,n.click(),URL.revokeObjectURL(i)}function X(e){return e.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled"}function K(e,l){return{type:"customize-agent.documentRoles",version:1,exportedAt:new Date().toISOString(),roles:e,configs:l}}function Y(){let e,l,r=(0,P.Vr)(),{message:t}=s.A.useApp(),[v]=o.A.useForm(),[b]=o.A.useForm(),[w,I]=(0,n.useState)([]),[z,T]=(0,n.useState)([]),[k,C]=(0,n.useState)([]),[_,Y]=(0,n.useState)(!1),[Z,$]=(0,n.useState)(!1),[ee,el]=(0,n.useState)(!1),[er,ei]=(0,n.useState)("file"),[en,et]=(0,n.useState)("custom"),[es,eo]=(0,n.useState)(!1),ea=(0,n.useRef)(null),ec=async()=>{let[e,l]=await Promise.all([(0,H.lv)(),(0,H.dx)()]);I(e.roles),T(e.configs),C(l)};(0,n.useEffect)(()=>{ec().catch(()=>t.error(r("common.error")))},[t,r]);let ed=()=>"all"===en||"custom"===en,ep=w.filter(ed),ex=z.filter(ed),em=ep.filter(e=>"file"===e.type),eh=ep.filter(e=>"prompt"===e.type),eu=w.filter(e=>"file"===e.type),ef=w.filter(e=>"prompt"===e.type),ey=async()=>{try{let e=await v.validateFields(),l="file"===e.type?{...e,resourceId:void 0,resourceIds:[]}:e,i=await (0,H.dg)(l);I(i.roles),T(i.configs),Y(!1),t.success(r("common.success"))}catch(e){t.error(r("common.error"))}},eg=async()=>{try{let e=await b.validateFields(),l=e=>(null!=e?e:[]).map((e,l)=>{var r;return{roleId:e.roleId,order:Number(null!=(r=e.order)?r:l)}}),i=await (0,H.NR)({...e,fileRoles:l(e.fileRoles),promptRoles:l(e.promptRoles)});I(i.roles),T(i.configs),$(!1),t.success(r("common.success"))}catch(e){t.error(r("common.error"))}},ej=async e=>{let l=await (0,H.FV)(e.type,e.id);I(l.roles),T(l.configs)},eA=async e=>{let l=await (0,H.dw)(e);I(l.roles),T(l.configs)},ev=async e=>{if(e){eo(!0);try{let l=JSON.parse(await e.text()),r=await fetch("/api/documents/roles?mode=import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!r.ok)throw Error(await r.text());let i=await r.json();I(i.roles),T(i.configs),t.success("已导入 ".concat(i.importedRoles," 个角色、").concat(i.importedConfigs," 个配置"))}catch(e){t.error("导入失败,请确认 JSON 文件格式正确")}finally{eo(!1),ea.current&&(ea.current.value="")}}},eb=function(e){var l;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file";v.setFieldsValue(e?{...e,resourceIds:(null==(l=e.resourceIds)?void 0:l.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]}:{id:"role-".concat(Date.now()),name:"",description:"",type:r,resourceIds:[],executionType:"prompt"===r?"reference":void 0,processingType:"file"===r?"reference":void 0}),Y(!0)},ew=e=>{b.setFieldsValue(null!=e?e:{id:"config-".concat(Date.now()),name:"",description:"",fileRoles:[],promptRoles:[],builtIn:!1}),$(!0)},eI=e=>w.find(l=>l.id===e),eS=e=>{var l;return(null==e?void 0:e.type)==="prompt"?(null==(l=e.resourceIds)?void 0:l.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]:[]},ez=e=>{var l;return(null==(l=k.find(l=>l.id===e))?void 0:l.projectName)||e},eT=e=>(0,i.jsx)(a.A,{closable:e.closable,onClose:e.onClose,color:"purple",title:e.value,style:{margin:"1px 2px",fontSize:11,lineHeight:"18px"},children:ez(e.value)}),eR=(e,l)=>{let n="file"===l?"blue":"purple",t="file"===l?Q:J,s=[...e].sort((e,l)=>{var r,i;return Number(null!=(r=e.order)?r:0)-Number(null!=(i=l.order)?i:0)}).map(e=>eI(e.roleId)).filter(e=>!!e);return 0===s.length?(0,i.jsx)(c.A,{image:c.A.PRESENTED_IMAGE_SIMPLE,description:"file"===l?"暂未选择文件角色":"暂未选择提示词角色"}):(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:s.map((e,l)=>{var s,o;let c=eS(e),d="file"===e.type?null!=(s=e.processingType)?s:"":null!=(o=e.executionType)?o:"";return(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderRadius:8,background:"var(--colorBgContainer)",border:"1px solid var(--colorBorderSecondary)"},children:[(0,i.jsxs)(a.A,{color:n,style:{margin:0},children:["#",l+1]}),(0,i.jsx)("span",{style:{fontWeight:600,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,i.jsx)(a.A,{style:{margin:0},children:r(t[d]||"roles.reference")}),"prompt"===e.type&&(0,i.jsxs)("span",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:["绑定 ",c.length," 个提示词"]})]},e.id)})})},ek=e=>{if(!e)return null;let l=eS(e);return(0,i.jsxs)("div",{style:{marginTop:8,padding:8,borderRadius:8,background:"var(--colorFillQuaternary)",fontSize:12,color:"var(--colorTextSecondary)"},children:[e.description&&(0,i.jsx)("div",{style:{marginBottom:4*("prompt"===e.type)},children:e.description}),"prompt"===e.type&&(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[l.slice(0,4).map(e=>(0,i.jsx)(a.A,{title:e,style:{margin:0,fontSize:10,lineHeight:"16px",maxWidth:180,overflow:"hidden",textOverflow:"ellipsis"},children:ez(e)},e)),l.length>4&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",l.length-4]}),0===l.length&&(0,i.jsx)("span",{children:"未绑定提示词"})]})]})};return(0,i.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"pageTitle",children:r("roles.title")}),(0,i.jsx)("p",{className:"pageDesc",children:r("roles.description")})]}),(0,i.jsxs)(m.A,{children:[(0,i.jsx)(h.A,{value:en,onChange:et,style:{width:170},options:[{label:"我的配置 (".concat(w.length+z.length,")"),value:"custom"},{label:"全部来源 (".concat(w.length+z.length,")"),value:"all"}]}),(0,i.jsx)("input",{ref:ea,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:e=>{var l;ev(null==(l=e.target.files)?void 0:l[0])}}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(O.A,{}),loading:es,onClick:()=>{var e;return null==(e=ea.current)?void 0:e.click()},children:"导入"}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(F.A,{}),disabled:w.length+z.length===0,onClick:()=>{M("customize-document-roles-".concat(new Date().toISOString().slice(0,10),".json"),K(w,z)),t.success("已导出 ".concat(w.length," 个角色、").concat(z.length," 个配置"))},children:"导出全部"}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>eb(void 0,"file"),children:r("roles.newFileRole")}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>eb(void 0,"prompt"),children:r("roles.newPromptRole")}),(0,i.jsx)(p.Ay,{type:"primary",icon:(0,i.jsx)(W.A,{}),onClick:()=>ew(),children:r("roles.newConfig")})]})]}),(0,i.jsx)(u.A,{type:"info",showIcon:!0,message:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)("span",{children:r("roles.plainGuideTitle")}),(0,i.jsx)(p.Ay,{type:"link",size:"small",icon:ee?(0,i.jsx)(E.A,{}):(0,i.jsx)(D.A,{}),onClick:()=>el(!ee),style:{padding:"0 4px"},children:ee?"收起说明":"展开说明"})]}),description:ee?r("roles.plainGuideDesc"):void 0}),(0,i.jsx)(d.A,{size:"small",tabList:[{key:"file",label:"文件角色 (".concat(em.length,")")},{key:"prompt",label:"提示词角色 (".concat(eh.length,")")},{key:"configs",label:"项目角色配置 (".concat(ex.length,")")}],activeTabKey:er,onTabChange:ei,children:"configs"===er?0===ex.length?(0,i.jsx)(c.A,{description:r("common.noData")}):(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:ex.map(e=>{let l=e.fileRoles.map(e=>({...e,role:eI(e.roleId)})).filter(e=>e.role),n=e.promptRoles.map(e=>({...e,role:eI(e.roleId)})).filter(e=>e.role);return(0,i.jsxs)(d.A,{size:"small",hoverable:!0,style:{minWidth:0},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginBottom:6},children:[(0,i.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:e.name}),(0,i.jsx)(a.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的配置"}),(0,i.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(R.A,{}),onClick:()=>ew(e),children:"编辑"}),!e.builtIn&&(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(F.A,{}),onClick:()=>(e=>{let l=new Set([...e.fileRoles.map(e=>e.roleId),...e.promptRoles.map(e=>e.roleId)]);M("customize-role-config-".concat(X(e.name),"-").concat(new Date().toISOString().slice(0,10),".json"),K(w.filter(e=>l.has(e.id)&&!e.builtIn),[e])),t.success("已导出 1 个配置")})(e),children:"导出"}),(0,i.jsx)(x.A,{title:r("common.confirm"),onConfirm:()=>{eA(e.id)},children:(0,i.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,i.jsx)(N.A,{})})})]})]}),e.description&&(0,i.jsx)(L,{ellipsis:{rows:2},style:{fontSize:12,color:"var(--colorTextSecondary)",marginBottom:8},children:e.description}),(0,i.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:[(0,i.jsxs)("div",{style:{marginBottom:4},children:[(0,i.jsxs)("span",{children:["文件角色 (",e.fileRoles.length,"): "]}),l.length>0?(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:[l.slice(0,4).map(e=>(0,i.jsx)(a.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:e.role.name},e.roleId)),l.length>4&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",l.length-4]})]}):(0,i.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"无"})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("span",{children:["提示词角色 (",e.promptRoles.length,"): "]}),n.length>0?(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:[n.slice(0,4).map(e=>(0,i.jsx)(a.A,{color:"purple",style:{margin:0,fontSize:10,lineHeight:"16px"},children:e.role.name},e.roleId)),n.length>4&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",n.length-4]})]}):(0,i.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"无"})]})]})]},e.id)})}):(e="file"===er?em:eh,l=r,0===e.length?(0,i.jsx)(c.A,{description:r("common.noData")}):(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(270px, 1fr))",gap:12},children:e.map(e=>{var n,s,o,c,m,h,u,f,y;let g="prompt"===e.type?(null==(n=e.resourceIds)?void 0:n.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]:[],j=g.slice(0,3),A=g.length-j.length,v="file"===e.type?null!=(o=U[null!=(s=e.processingType)?s:""])?o:(0,i.jsx)(S.A,{}):null!=(m=q[null!=(c=e.executionType)?c:""])?m:(0,i.jsx)(B.A,{}),b="file"===e.type?null!=(u=V[null!=(h=e.processingType)?h:""])?u:"var(--colorAccent)":null!=(y=G[null!=(f=e.executionType)?f:""])?y:"var(--colorWarning)";return(0,i.jsxs)(d.A,{size:"small",hoverable:!0,style:{minWidth:0},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginBottom:8},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0,flex:1},children:[(0,i.jsx)("span",{style:{color:b,fontSize:16,flexShrink:0,lineHeight:1},children:v}),(0,i.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:"20px"},children:e.name})]}),(0,i.jsx)("div",{style:{display:"flex",gap:4,flexShrink:0},children:(0,i.jsx)(a.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的角色"})})]}),e.description&&(0,i.jsx)(L,{ellipsis:{rows:2},style:{fontSize:12,color:"var(--colorTextSecondary)",marginBottom:8},children:e.description}),(0,i.jsxs)("div",{style:{marginBottom:8,display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,i.jsx)(a.A,{color:"file"===e.type?"blue":"purple",style:{margin:0},children:function(e,l){var r,i,n;let t="file"===e.type?Q[null!=(r=e.processingType)?r:""]:J[null!=(i=e.executionType)?i:""];return t?l(t):null!=(n="file"===e.type?e.processingType:e.executionType)?n:""}(e,l)}),g.length>0&&(0,i.jsxs)("span",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:["绑定 ",g.length," 个提示词"]})]}),j.length>0&&(0,i.jsx)("div",{style:{marginBottom:10},children:(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[j.map(e=>(0,i.jsx)(a.A,{color:"purple",title:e,style:{margin:0,fontSize:10,lineHeight:"16px",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:ez(e)},e)),A>0&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",A]})]})}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:6,paddingTop:4,borderTop:"1px solid var(--colorBorderSecondary)"},children:[(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(R.A,{}),onClick:()=>eb(e),children:"编辑"}),!e.builtIn&&(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(F.A,{}),onClick:()=>{M("customize-role-".concat(X(e.name),"-").concat(new Date().toISOString().slice(0,10),".json"),K([e],[])),t.success("已导出 1 个角色")},children:"导出"}),(0,i.jsx)(x.A,{title:r("common.confirm"),onConfirm:()=>{ej(e)},children:(0,i.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,i.jsx)(N.A,{})})})]})]},e.id)})}))}),(0,i.jsx)(f.A,{title:r("roles.roleEditor"),open:_,onClose:()=>Y(!1),width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,i.jsx)(p.Ay,{type:"primary",onClick:()=>{ey()},children:r("common.save")}),children:(0,i.jsxs)(o.A,{form:v,layout:"vertical",children:[(0,i.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,i.jsx)(y.A,{})}),(0,i.jsxs)(g.A,{gutter:16,children:[(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"type",label:r("roles.roleType"),rules:[{required:!0}],children:(0,i.jsx)(h.A,{options:[{label:r("roles.fileRole"),value:"file"},{label:r("roles.promptRole"),value:"prompt"}]})})}),(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"name",label:r("roles.roleName"),rules:[{required:!0}],children:(0,i.jsx)(y.A,{})})})]}),(0,i.jsx)(o.A.Item,{name:"description",label:r("roles.roleDescription"),children:(0,i.jsx)(y.A.TextArea,{rows:2})}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.type!==l.type,children:e=>{let{getFieldValue:l}=e,n="prompt"===l("type");return(0,i.jsx)(d.A,{size:"small",title:n?"提示词角色配置":"文件角色配置",style:{border:"1px solid var(--colorBorderSecondary)"},children:n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A.Item,{name:"executionType",label:r("roles.executionType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,i.jsx)(h.A,{options:[{label:r("roles.factExtraction"),value:"fact_extraction"},{label:r("roles.chapterGeneration"),value:"chapter_generation"},{label:r("roles.validation"),value:"validation"},{label:r("roles.formatting"),value:"formatting"},{label:r("roles.reference"),value:"reference"}]})}),(0,i.jsx)(o.A.Item,{name:"resourceIds",label:r("roles.bindPrompt"),style:{marginBottom:0},help:(0,i.jsx)("span",{style:{fontSize:11,color:"var(--colorTextSecondary)"},children:r("roles.multiBindPromptHelp")}),children:(0,i.jsx)(h.A,{mode:"multiple",showSearch:!0,tagRender:eT,placeholder:"选择提示词",options:k.filter(e=>e.hasFile).map(e=>({label:e.projectName,value:e.id}))})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A.Item,{name:"processingType",label:r("roles.processingType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,i.jsx)(h.A,{options:[{label:r("roles.ruleFile"),value:"rule"},{label:r("roles.projectFactFile"),value:"project_fact"},{label:r("roles.tableFile"),value:"table"},{label:r("roles.drawingFile"),value:"drawing"},{label:r("roles.specificationFile"),value:"specification"},{label:r("roles.reference"),value:"reference"}]})}),(0,i.jsx)(u.A,{type:"info",showIcon:!0,message:"文件角色只定义处理类型",description:"具体项目文件由生成流程自动识别,或在模板的高级固定绑定资料中手动覆盖;这里不再绑定知识库文件,避免角色复用时混入其他项目资料。"})]})})}})]})}),(0,i.jsx)(f.A,{title:r("roles.configEditor"),open:Z,onClose:()=>$(!1),width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,i.jsx)(p.Ay,{type:"primary",onClick:()=>{eg()},children:r("common.save")}),children:(0,i.jsxs)(o.A,{form:b,layout:"vertical",children:[(0,i.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,i.jsx)(y.A,{})}),(0,i.jsxs)(g.A,{gutter:16,children:[(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"name",label:r("roles.configName"),rules:[{required:!0}],children:(0,i.jsx)(y.A,{})})}),(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"description",label:r("roles.configDescription"),children:(0,i.jsx)(y.A,{})})})]}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.fileRoles!==l.fileRoles||e.promptRoles!==l.promptRoles,children:e=>{let{getFieldValue:l}=e,n=l("fileRoles")||[],t=l("promptRoles")||[];return(0,i.jsx)(A.A,{destroyInactiveTabPane:!1,items:[{key:"file",label:"文件角色 (".concat(n.length,"/").concat(eu.length,")"),children:(0,i.jsx)(o.A.List,{name:"fileRoles",children:(e,l)=>{let{add:t,remove:s}=l;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,i.jsx)(d.A,{size:"small",title:"已选文件角色",style:{background:"var(--colorFillQuaternary)"},children:eR(n,"file")}),0===e.length&&(0,i.jsx)(c.A,{description:"暂未添加文件角色"}),e.map((e,l)=>(0,i.jsxs)(d.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,i.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#1677ff",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,i.jsx)(p.Ay,{danger:!0,size:"small",icon:(0,i.jsx)(N.A,{}),onClick:()=>s(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,i.jsxs)(g.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,i.jsxs)(j.A,{flex:"auto",children:[(0,i.jsx)(o.A.Item,{name:[e.name,"roleId"],label:"文件角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,i.jsx)(h.A,{placeholder:"选择文件角色",size:"small",options:eu.map(e=>{var l;return{label:"".concat(e.name," (").concat(r(Q[null!=(l=e.processingType)?l:""]||"roles.reference"),")"),value:e.id}})})}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:!0,children:l=>{let{getFieldValue:r}=l;return ek(eI(r(["fileRoles",e.name,"roleId"])))}})]}),(0,i.jsx)(j.A,{style:{width:90},children:(0,i.jsx)(o.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,i.jsx)(y.A,{type:"number",size:"small"})})})]})]},e.key)),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>t({order:e.length}),children:r("roles.addRole")})]})}})},{key:"prompt",label:"提示词角色 (".concat(t.length,"/").concat(ef.length,")"),children:(0,i.jsx)(o.A.List,{name:"promptRoles",children:(e,l)=>{let{add:n,remove:s}=l;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,i.jsx)(d.A,{size:"small",title:"已选提示词角色",style:{background:"var(--colorFillQuaternary)"},children:eR(t,"prompt")}),0===e.length&&(0,i.jsx)(c.A,{description:"暂未添加提示词角色"}),e.map((e,l)=>(0,i.jsxs)(d.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,i.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#722ed1",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,i.jsx)(p.Ay,{danger:!0,size:"small",icon:(0,i.jsx)(N.A,{}),onClick:()=>s(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,i.jsxs)(g.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,i.jsxs)(j.A,{flex:"auto",children:[(0,i.jsx)(o.A.Item,{name:[e.name,"roleId"],label:"提示词角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,i.jsx)(h.A,{placeholder:"选择提示词角色",size:"small",options:ef.map(e=>{var l;return{label:"".concat(e.name," (").concat(r(J[null!=(l=e.executionType)?l:""]||"roles.reference"),")"),value:e.id}})})}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:!0,children:l=>{let{getFieldValue:r}=l;return ek(eI(r(["promptRoles",e.name,"roleId"])))}})]}),(0,i.jsx)(j.A,{style:{width:90},children:(0,i.jsx)(o.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,i.jsx)(y.A,{type:"number",size:"small"})})})]})]},e.key)),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>n({order:e.length}),children:r("roles.addRole")})]})}})}]})}})]})})]})}}},e=>{e.O(0,[433,787,576,195,455,496,636,593,792],()=>e(e.s=23507)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ei});var s=r(65321),l=r(97109),n=r(7576),i=r(35292),a=r(17807),o=r(63455),c=r(11702),d=r(88762),u=r(85114),m=r(68787),p=r(84253),x=r(38332),h=r(26171),g=r(33442),f=r(85493),j=r(34052),v=r(9730),y=r(42700),w=r(58569),A=r(76506),S=r(2256),k=r(38770),b=r(57271),I=r(23216),C=r(16285),z=r(26619),_=r(8263),T=r(8579),B=r(75548),D=r(7851),E=r(84742),M=r(29071),P=r(63552),R=r(26631),F=r(83914),G=r(58209),W=r(54746),L=r(71330),N=r(64068),O=r(93051),H=r(38762),q=r(64629),K=r(67547),U=r(76830),V=r(1310),X=r(6578),Q=r(79059);let{TextArea:J}=n.A,{Text:Y}=i.A,Z=null;function $(){null==Z||Z.listeners.forEach(e=>e())}let ee={role_binding:(0,s.jsx)(I.A,{}),context_recall:(0,s.jsx)(C.A,{}),knowledge_retrieval:(0,s.jsx)(z.A,{}),file_understanding:(0,s.jsx)(_.A,{}),fact_extraction:(0,s.jsx)(C.A,{}),chapter_generation:(0,s.jsx)(T.A,{}),asset_generation:(0,s.jsx)(B.A,{}),validation:(0,s.jsx)(D.A,{}),formatting:(0,s.jsx)(E.A,{}),llm_review:(0,s.jsx)(M.A,{}),export_ready:(0,s.jsx)(P.A,{}),reference:(0,s.jsx)(B.A,{})},et={施工组织设计:(0,s.jsx)(D.A,{}),投标文件:(0,s.jsx)(P.A,{}),技术方案:(0,s.jsx)(C.A,{}),报告:(0,s.jsx)(R.A,{}),自定义:(0,s.jsx)(T.A,{})};function er(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function es(e){return e?e.split(/[\\/]/u).pop()||e:""}let el={role_binding:"角色配置绑定",context_recall:"上下文召回",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},en={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ei(){let e=(0,Q.Vr)(),{message:t}=a.A.useApp(),[r]=o.A.useForm(),i=(0,l.useRef)(null),[B,ei]=(0,l.useState)([]),[ea,eo]=(0,l.useState)("construction-organization-design"),[ec,ed]=(0,l.useState)([]),[eu,em]=(0,l.useState)([]),[ep,ex]=(0,l.useState)([]),[eh,eg]=(0,l.useState)([]),[ef,ej]=(0,l.useState)(!1),[ev,ey]=(0,l.useState)(!0),[ew,eA]=(0,l.useState)(!1),[eS,ek]=(0,l.useState)(null),[eb,eI]=(0,l.useState)(""),[eC,ez]=(0,l.useState)([]),[e_,eT]=(0,l.useState)(null),[eB,eD]=(0,l.useState)(null),[eE,eM]=(0,l.useState)(""),[eP,eR]=(0,l.useState)(!1),[eF,eG]=(0,l.useState)([]),[eW,eL]=(0,l.useState)(!1),[eN,eO]=(0,l.useState)(!1),[eH,eq]=(0,l.useState)({}),eK=ec.filter(e=>"file"===e.type).map(e=>({label:e.name,value:e.id})),eU=er(Object.values(r.getFieldValue("fileBindingGroups")||{}).flat()),eV=er([...eU,...eh.map(e=>e.relativePath)]).map(e=>{let t=eh.find(t=>t.relativePath===e);return{label:(0,s.jsxs)("div",{title:e,style:{display:"flex",justifyContent:"space-between",gap:8},children:[(0,s.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:es(e)}),t&&(0,s.jsx)(c.A,{style:{margin:0},children:t.status})]}),value:e}}),[eX,eQ]=(0,l.useState)([]),[eJ,eY]=(0,l.useState)(null),[eZ,e$]=(0,l.useState)("templates"),[e0,e1]=(0,l.useState)(!1),[e2,e6]=(0,l.useState)("workflow"),e8=(0,l.useRef)(null),e3=(0,l.useRef)(0),e5=async()=>{try{ez((await (0,X.cQ)()).documents)}catch(e){ez([])}};(0,l.useEffect)(()=>{let e=()=>{Z&&(eQ(Z.flowSteps),eY(Z.activeFlowKey),eA(Z.loading),Z.documentId&&eT(Z.documentId),Z.draft&&ek(Z.draft),void 0!==Z.content&&eI(Z.content))},t=Z;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{ey(!0),Promise.all([(0,X.Dl)().then(e=>{var t,r;ei(e.templates),eo(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,X.lv)().then(e=>{ed(e.roles),em(e.configs)}),(0,X.dx)().then(e=>ex(e)),e5()]).catch(()=>t.error(e("common.error"))).finally(()=>ey(!1))},[t,e]),(0,l.useEffect)(()=>{if(0===eC.length)return;let e=localStorage.getItem("activeGenDocId");if(!e)return;if(!eC.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem("activeGenDocId");let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,X.v7)(e);await e5(),"generating"!==r.status&&(localStorage.removeItem("activeGenDocId"),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eC]);let e7=(0,l.useMemo)(()=>B.find(e=>e.id===ea),[B,ea]),e4=eu.map(e=>({label:e.name,value:e.id})),e9=Math.max(0,eX.findIndex(e=>e.key===eJ)),te=e=>{var t;return e?(null==(t=ec.find(t=>t.id===e))?void 0:t.name)||en[e]||"未知角色":""},tt=e=>e.subtitle||e.roleName||te(e.roleId)||el[e.type]||e.type,tr=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=ep.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=ec.find(e=>e.id===t))?void 0:s.name)||en[t]||"未知提示词":"")},ts=e=>(0,s.jsx)(c.A,{closable:e.closable,onClose:e.onClose,color:"blue",title:e.value,style:{margin:"1px 2px",fontSize:11,lineHeight:"18px",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis"},children:es(e.value)}),tl=()=>{e3.current+=1,eM(""),eG([]),eL(!1),eR(!1)},tn=e=>{eo(e),eT(null),ek(null),eI(""),tl(),e6("workflow"),e1(!0),e$("drafts")},ti=async r=>{eT(r.id),eo(r.templateId);let s=ta(r.status);if(s||"failed"===r.status){tw.current=!0,tl(),ek(null),eI(""),eA(s),e6("workflow"),e1(!0);try{let{document:e}=await (0,X.v7)(r.id);td(e),ta(e.status)?tu(e.id):await e5()}catch(e){td(r)}return}e6("editor"),eQ([]),eY(null),tl();try{let{document:e}=await (0,X.v7)(r.id);ek(e.draft||null),eI(e.editedMarkdown||e.markdown)}catch(r){t.error(e("common.error"))}e1(!0)},ta=e=>"completed"!==e&&"warning"!==e&&"failed"!==e,to=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ew;(null==Z?void 0:Z.loading)&&(Z.flowSteps=e,Z.activeFlowKey=t,Z.loading=r,$())},tc=e=>{var t,r,l,n,i;let a=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(a.length>0){let t=a.map((e,t)=>{var r;let l,n="failed"===(l=e.status)?"error":"fallback"===l?"warning":"finish";return{key:"".concat(e.type,"-").concat(t),title:e.title||el[e.type]||e.type,subtitle:tt(e),description:e.message||"",status:n,icon:"role_binding"===(r=e.type)?(0,s.jsx)(I.A,{}):"knowledge_retrieval"===r?(0,s.jsx)(z.A,{}):"context_recall"===r?(0,s.jsx)(C.A,{}):"file_understanding"===r?(0,s.jsx)(_.A,{}):"fact_extraction"===r?(0,s.jsx)(C.A,{}):"chapter_generation"===r?(0,s.jsx)(T.A,{}):"llm_review"===r?(0,s.jsx)(M.A,{}):"validation"===r?(0,s.jsx)(D.A,{}):"formatting"===r?(0,s.jsx)(E.A,{}):"export_ready"===r?(0,s.jsx)(P.A,{}):(0,s.jsx)(R.A,{}),subSteps:[{key:"stage-".concat(t),title:tr(e)?"提示词:".concat(tr(e)):tt(e),status:n}]}});"generating"===e.status&&t.length>0&&(null==(r=t.at(-1))?void 0:r.status)==="finish"&&(t[t.length-1]={...t[t.length-1],status:"process"});let o="generating"===e.status?(null==(l=t.at(-1))?void 0:l.key)||"prepare":"failed"===e.status?(null==(n=t.find(e=>"error"===e.status))?void 0:n.key)||(null==(i=t.at(-1))?void 0:i.key)||"prepare":"done";return{steps:t,activeKey:o}}return{steps:[],activeKey:null}},td=e=>{let{steps:t,activeKey:r}=tc(e);eQ(t),eY(r),eA(ta(e.status)),to(t,r,ta(e.status)),"failed"===e.status&&e6("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(ek(e.draft),eI(e.editedMarkdown||e.markdown),e6("editor"),eQ([]),eY(null))},tu=e=>{e8.current&&clearInterval(e8.current),e8.current=setInterval(()=>{(async()=>{try{let{document:t}=await (0,X.v7)(e,!0);td(t),await e5(),ta(t.status)||(e8.current&&clearInterval(e8.current),e8.current=null,localStorage.removeItem("activeGenDocId"))}catch(e){}})()},2e3)};(0,l.useEffect)(()=>{if(!ew||!eJ)return;let e=window.setInterval(()=>eQ(e=>{let t=e.map(e=>{if(e.key!==eJ||"process"!==e.status)return e;let t=e.subSteps.findIndex(e=>"process"===e.status),r=t<0?0:Math.min(t+1,e.subSteps.length-1);return{...e,subSteps:e.subSteps.map((e,t)=>t<r?{...e,status:"finish"}:t===r?{...e,status:"process"}:{...e,status:"wait"})}});return to(t,eJ),t}),1400);return()=>window.clearInterval(e)},[eJ,ew]);let tm=async e=>{ej(!0);try{let t=await (0,X.nU)({query:e,limit:120,includeContent:!!e.trim()});eg(t.files)}catch(e){t.error("知识库文件检索失败")}finally{ej(!1)}},tp=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],fileBindings:[]};r.resetFields(),r.setFieldsValue({...t,fileBindingGroups:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>(t.roleId&&t.filePath&&(e[t.roleId]=er([...e[t.roleId]||[],t.filePath])),e),{})}(t.fileBindings)}),tm(""),eO(!0)},tx=async()=>{try{let s=await r.validateFields(),l=s.fileBindingGroups||{},n=Object.entries(l).flatMap(e=>{let[t,r]=e;return er(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:i,...a}=s,o={...a,chapters:[],fileBindings:n},c=await (0,X.l2)(o);ei(c.templates),eo(c.template.id),eO(!1),await e5(),t.success(e("common.success"))}catch(e){e instanceof Error&&t.error(e.message)}},th=async r=>{try{let s=await (0,X.bV)(r);ei(s.templates),eo(s.template.id),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tg=async r=>{try{var s,l;let n=await (0,X.h0)(r);ei(n.templates),eo(null!=(l=null==(s=n.templates[0])?void 0:s.id)?l:""),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tf=async e=>{try{let{validation:r}=await (0,X.SM)(e);eq(t=>({...t,[e]:r}));let s=r.issues.filter(e=>"error"===e.level);if(eo(e),s.length>0)return void t.warning("模板运行前检查未通过,请先处理阻断项");if(r.issues.length>0)return void t.warning("模板存在警告,可在检查面板确认后继续运行");tn(e)}catch(e){t.error(e instanceof Error?e.message:"模板运行前检查失败")}},tj=async r=>{try{await (0,X.QG)(r),e_===r&&(eT(null),ek(null),eI("")),await e5(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tv=async e=>{for(;;){let{document:t}=await (0,X.v7)(e,!0);if(td(t),("completed"===t.status||"warning"===t.status)&&t.draft)return t;if("failed"===t.status)throw Error(t.error||"生成失败");await new Promise(e=>window.setTimeout(e,1500))}},ty=async()=>{if(!ea)return;if(null==Z?void 0:Z.loading){eQ(Z.flowSteps),eY(Z.activeFlowKey),eA(!0);return}eA(!0);let r=(0,X.OX)({templateId:ea});Z={id:Date.now(),templateId:ea,loading:!0,flowSteps:[],activeFlowKey:null,promise:r,listeners:new Set},eQ([]),eY(null);let s=[];try{let l=await r;l.documentId&&(localStorage.setItem("activeGenDocId",l.documentId),eT(l.documentId),(null==Z?void 0:Z.promise)===r&&(Z.documentId=l.documentId)),await e5();let n=l.documentId?await tv(l.documentId):void 0,a=l.draft||(null==n?void 0:n.draft);if(!a)throw Error("生成结果为空");(l.documentId||(null==n?void 0:n.id))&&eT(l.documentId||n.id),s.forEach(e=>window.clearTimeout(e)),ek(a),eI((null==n?void 0:n.editedMarkdown)||(null==n?void 0:n.markdown)||a.markdown),(null==Z?void 0:Z.promise)===r&&(Z.draft=a,Z.content=(null==n?void 0:n.editedMarkdown)||(null==n?void 0:n.markdown)||a.markdown);let o=n||{id:l.documentId||"draft-".concat(Date.now()),templateId:ea,title:a.title,requirement:a.requirement,markdown:a.markdown,status:a.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!a.exportGate.passed?"warning":"completed",draft:a,executionStages:a.executionStages,assets:a.assets||[],createdAt:a.generatedAt,updatedAt:Date.now()},{steps:c}=tc(o);eQ(c),to(c,"done",!1),eY("done"),(null==Z?void 0:Z.promise)===r&&(Z.activeFlowKey="done",Z.loading=!1,$()),localStorage.removeItem("activeGenDocId"),await e5(),t.success(e("common.success")),window.setTimeout(()=>{var e;return null==(e=i.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(l){localStorage.removeItem("activeGenDocId");let s=l instanceof Error?l.message:e("common.error");eQ(e=>{let t=e.map(e=>"process"===e.status?{...e,status:"error",description:s,subSteps:((e,t)=>{if("wait"===t)return e.subSteps.map(e=>({...e,status:"wait"}));if("finish"===t)return e.subSteps.map(e=>({...e,status:"finish"}));if("error"===t)return e.subSteps.map((e,t)=>({...e,status:0===t?"error":e.status}));let r=e.subSteps.findIndex(e=>"wait"===e.status);return e.subSteps.map((e,t)=>t<r||-1===r?{...e,status:"finish"}:t===r?{...e,status:"process"}:e)})(e,"error")}:e);return to(t,eJ,!1),t}),(null==Z?void 0:Z.promise)===r&&(Z.loading=!1,Z.error=s,$()),t.error(s)}finally{s.forEach(e=>window.clearTimeout(e)),eA(!1),(null==Z?void 0:Z.promise)===r&&(Z.loading=!1,$())}},tw=(0,l.useRef)(!1),tA=async r=>{(null==Z?void 0:Z.loading)&&(Z.loading=!1,Z.error="用户中止",$(),Z=null,eA(!1)),localStorage.removeItem("activeGenDocId"),e8.current&&(clearInterval(e8.current),e8.current=null);try{await (0,X.r)(r.id),await e5(),e_===r.id&&(eT(null),ek(null),eI("")),t.success("已中止生成任务")}catch(r){t.error(e("common.error"))}};(0,l.useEffect)(()=>{e0&&"workflow"===e2&&!tw.current&&!(null==Z?void 0:Z.loading)&&(null==e7?void 0:e7.projectRoleConfigId)&&(tw.current=!0,window.setTimeout(()=>{ty()},300)),e0||(tw.current=!1)},[e0,e2]);let tS=async r=>{if(eS){eD(r);try{let e={documentId:e_||void 0,title:eS.title,markdown:eb,format:r,enforceGate:!0,exportGate:eS.exportGate,useClientMarkdown:!0},t=await (0,X.UE)(e);((e,t,r)=>{let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),n=document.createElement("a");n.href=l,n.download=t,n.target="_self",n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),n.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),1e3)})(t,"".concat(eS.title,".").concat("markdown"===r?"md":r),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[r])}catch(r){t.error(r instanceof Error?r.message:e("common.error"))}finally{eD(null)}}},tk=async()=>{if(eS)try{if(e_)await (0,X.a6)(e_,{editedMarkdown:eb,markdown:eb});else{let e=await (0,X.Af)({...eS,markdown:eb});ek(e.draft)}await e5(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tb=(e,t)=>{eG(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},tI=async()=>{let r=eE.trim();if(!eS||!r||eP)return;let s=e3.current+1;e3.current=s,eR(!0);try{var l,n;let e=await (0,X.Gi)({title:eS.title,markdown:eb,instruction:r,facts:null==(l=eS.structuredFacts)?void 0:l.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==(n=eS.chapters)?void 0:n.map(e=>e.title)});if(e3.current!==s||e_!=e_)return;tb(eb,r),eI(e.markdown),eM(""),t.success("已按提示完成精准修改")}catch(r){e3.current===s&&t.error(r instanceof Error?r.message:e("common.error"))}finally{e3.current===s&&eR(!1)}};if(ev)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(d.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(d.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(d.A,{active:!0,paragraph:{rows:8}})]});let tC="workflow"===e2?"工作流:".concat((null==e7?void 0:e7.name)||"选择模板"):"编辑:".concat((null==eS?void 0:eS.title)||(null==e7?void 0:e7.outputTitle)||"文档");return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"pageTitle",children:e("documents.title")}),(0,s.jsx)("p",{className:"pageDesc",children:e("documents.description")})]}),(0,s.jsx)(u.Ay,{type:"primary",icon:(0,s.jsx)(W.A,{}),onClick:()=>tp(),children:e("documents.newTemplate")})]}),(0,s.jsx)(m.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(B.length,")")},{key:"drafts",label:"生成记录 (".concat(eC.length,")")}],activeTabKey:eZ,onTabChange:e$,children:"templates"===eZ?0===B.length?(0,s.jsx)(p.A,{description:e("common.noData")}):(0,s.jsx)(x.A,{dataSource:B,renderItem:t=>(0,s.jsx)(x.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,s.jsx)(u.Ay,{size:"small",icon:(0,s.jsx)(L.A,{}),onClick:e=>{e.stopPropagation(),tp(t)},children:"配置"},"cfg"),(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:(0,s.jsx)(N.A,{}),onClick:e=>{e.stopPropagation(),tf(t.id)},children:"运行"},"run"),(0,s.jsx)(u.Ay,{size:"small",icon:(0,s.jsx)(O.A,{}),onClick:e=>{e.stopPropagation(),th(t.id)}},"copy"),(0,s.jsx)(h.A,{title:e("documents.deleteTemplateConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),tg(t.id)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(G.A,{}),onClick:e=>e.stopPropagation()})},"del")],onClick:()=>eo(t.id),children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let r=et[e]||(0,s.jsx)(R.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(t.category,ea===t.id),(0,s.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,s.jsx)("span",{style:{fontWeight:ea===t.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),ea===t.id&&(0,s.jsx)(c.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,s.jsx)(c.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:t.category}),eH[t.id]&&(0,s.jsxs)(c.A,{color:eH[t.id].issues.some(e=>"error"===e.level)?"error":eH[t.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",eH[t.id].fileDiagnostics.length," 文件 / ",eH[t.id].promptDiagnostics.length," 提示词"]})]}),t.description&&(0,s.jsx)(Y,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:t.description}),eH[t.id]&&(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(eH[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":eH[t.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:eH[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":eH[t.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,s.jsxs)(g.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,s.jsxs)(g.A,{wrap:!0,children:[(0,s.jsx)(Y,{strong:!0,children:eH[t.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":eH[t.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,s.jsxs)(c.A,{color:"blue",children:["文件角色 ",eH[t.id].fileDiagnostics.length]}),(0,s.jsxs)(c.A,{color:"purple",children:["提示词角色 ",eH[t.id].promptDiagnostics.length]})]}),eH[t.id].issues.length>0?eH[t.id].issues.map(e=>(0,s.jsx)(f.A,{type:"error"===e.level?"error":"warning",message:e.message,showIcon:!0},e.message)):(0,s.jsx)(f.A,{type:"success",message:"文件角色、提示词角色和后台自动规范检查通过,可以运行。",showIcon:!0}),!eH[t.id].issues.some(e=>"error"===e.level)&&eH[t.id].issues.length>0&&(0,s.jsx)("div",{children:(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:(0,s.jsx)(N.A,{}),onClick:()=>tn(t.id),children:"忽略警告并继续运行"})})]})})]})]})})}):0===eC.length?(0,s.jsx)(p.A,{description:e("common.noData")}):(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eC.slice(0,15).map((e,t)=>{var r,l,n;let i,a;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:e_===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{ti(e)},children:["completed"===e.status?(0,s.jsx)(E.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status?(0,s.jsx)(H.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,s.jsx)(D.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,s.jsx)(q.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,s.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,s.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,s.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,s.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),s=t%60;if(r<60)return s?"".concat(r," 分 ").concat(s," 秒"):"".concat(r," 分");let l=Math.floor(r/60),n=r%60;return n?"".concat(l," 小时 ").concat(n," 分"):"".concat(l," 小时")})(e)]})]}),("warning"===e.status||"failed"===e.status)&&(0,s.jsx)("div",{style:{marginTop:3,color:"failed"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==(r=e.warningIssues)?void 0:r[0])||(null==(n=e.draft)||null==(l=n.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:l.message)||"需复核"})]}),(0,s.jsxs)(g.A,{size:4,align:"center",children:[(0,s.jsx)(c.A,{color:"completed"===(i=e.status)?"success":"warning"===i?"warning":"failed"===i?"error":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(a=e.status)?"已完成":"warning"===a?"需复核":"failed"===a?"失败":"生成中"}),(0,s.jsxs)(c.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,s.jsx)(h.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),tj(e.id)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(G.A,{}),onClick:e=>e.stopPropagation()})}),ta(e.status)&&(0,s.jsx)(h.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tA(e)},children:(0,s.jsx)(u.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),(0,s.jsx)(u.Ay,{size:"small",type:"primary",icon:ta(e.status)?(0,s.jsx)(q.A,{spin:!0}):(0,s.jsx)(N.A,{}),onClick:t=>{t.stopPropagation(),ti(e)},children:"打开"})]})]},e.id)})})}),(0,s.jsx)(j.A,{title:tC,open:e0,onClose:()=>{e1(!1),e8.current&&(clearInterval(e8.current),e8.current=null)},width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eS?(0,s.jsxs)(g.A,{wrap:!0,children:[(0,s.jsx)(u.Ay,{icon:(0,s.jsx)(K.A,{}),disabled:eP,onClick:()=>{tk()},children:e("documents.saveDraft")}),(0,s.jsx)(u.Ay,{icon:(0,s.jsx)(U.A,{}),disabled:eP,loading:"markdown"===eB,onClick:()=>{tS("markdown")},children:"MD"}),(0,s.jsx)(u.Ay,{disabled:eP,loading:"html"===eB,onClick:()=>{tS("html")},children:"HTML"}),(0,s.jsx)(u.Ay,{disabled:eP,loading:"docx"===eB,onClick:()=>{tS("docx")},children:"DOCX"}),(0,s.jsx)(u.Ay,{type:"primary",disabled:eP,loading:"pdf"===eB,onClick:()=>{tS("pdf")},children:"PDF"})]}):ew&&"workflow"===e2?(0,s.jsx)(u.Ay,{danger:!0,onClick:()=>{(async()=>{e_&&await (0,X.r)(e_).catch(()=>void 0),Z&&(Z.loading=!1,Z.error="用户中止",$(),Z=null),localStorage.removeItem("activeGenDocId"),e8.current&&(clearInterval(e8.current),e8.current=null),eA(!1),eQ([]),eY(null),e1(!1),await e5(),t.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,s.jsxs)(g.A,{direction:"vertical",style:{width:"100%"},size:"middle",children:["workflow"===e2&&eX.length>0&&(0,s.jsx)(v.A,{direction:"vertical",size:"small",current:e9,items:eX.map(e=>{let t;return{title:e.title,description:(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(c.A,{children:e.subtitle})}),(0,s.jsx)("div",{children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,s.jsx)(F.A,{}):"finish"===t?(0,s.jsx)(E.A,{}):"warning"===t?(0,s.jsx)(D.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(G.A,{}):(0,s.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,s.jsx)("span",{children:e.title})]},e.key)})})]}),status:"warning"===(t=e.status)?"finish":t,icon:"process"===e.status?(0,s.jsx)(F.A,{}):"warning"===e.status?(0,s.jsx)(D.A,{style:{color:"var(--colorWarning)"}}):e.icon}})}),"workflow"===e2&&ew&&0===eX.length&&(0,s.jsx)("div",{style:{textAlign:"center",padding:40},children:(0,s.jsx)(y.A,{tip:"正在准备生成…"})}),eS&&(0,s.jsx)("div",{ref:i,children:(0,s.jsx)(w.A,{items:[{key:"edit",label:e("documents.edit"),children:(0,s.jsxs)(g.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,s.jsx)(J,{rows:28,value:eb,disabled:eP,onChange:e=>eI(e.target.value)}),(0,s.jsx)(m.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,s.jsxs)(g.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,s.jsxs)(g.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(g.A,{size:6,children:[(0,s.jsx)(M.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(Y,{strong:!0,children:"精准修改"}),(0,s.jsx)(c.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(u.Ay,{size:"small",icon:(0,s.jsx)(V.A,{}),onClick:()=>eL(e=>!e),disabled:0===eF.length,children:["历史版本 ",eF.length>0?eF.length:""]})]}),(0,s.jsx)(J,{rows:4,value:eE,disabled:eP,onChange:e=>eM(e.target.value),placeholder:"例如:把第三章语气改得更专业,补充工期风险应对;或压缩全文到 3000 字以内,并保留关键事实。"}),(0,s.jsxs)(g.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(g.A,{wrap:!0,children:["更专业","更简洁","强化细节","优化结构"].map(e=>(0,s.jsx)(u.Ay,{size:"small",disabled:eP,onClick:()=>eM(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(u.Ay,{type:"primary",icon:(0,s.jsx)(M.A,{}),loading:eP,disabled:!eE.trim(),onClick:()=>{tI()},children:"应用修改"})]}),eW&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(x.A,{size:"small",dataSource:eF,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(x.A.Item,{actions:[(0,s.jsx)(u.Ay,{size:"small",disabled:eP,onClick:()=>{tb(eb,"恢复前版本"),eI(e.content),t.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(x.A.Item.Meta,{title:(0,s.jsxs)(g.A,{children:[(0,s.jsx)(Y,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(c.A,{children:e.prompt})]}),description:(0,s.jsx)(Y,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eS.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eS.chapters.length,")"]}),(0,s.jsx)(x.A,{size:"small",dataSource:eS.chapters,renderItem:e=>(0,s.jsx)(x.A.Item,{children:(0,s.jsx)(x.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eS.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eS.structuredFacts.length,")"]}),(0,s.jsx)(A.A,{size:"small",column:1,bordered:!0,children:eS.structuredFacts.map((e,t)=>(0,s.jsxs)(A.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(c.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(Y,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eS.sources.length,")"]}),0===eS.sources.length?(0,s.jsx)(p.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eS.sources.map(e=>(0,s.jsxs)(c.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eS.missingItems.length,")"]}),0===eS.missingItems.length?(0,s.jsx)(p.A,{description:"无缺失"}):(0,s.jsx)(x.A,{size:"small",dataSource:eS.missingItems,renderItem:e=>(0,s.jsx)(x.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eS.validationIssues.length,")"),children:0===eS.validationIssues.length?(0,s.jsx)(p.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eS.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(c.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,s.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,s.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eS.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(x.A,{size:"small",dataSource:eS.exportGate.checklist,renderItem:e=>(0,s.jsxs)(x.A.Item,{children:[(0,s.jsx)(Y,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(c.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eS.executionStages.length,")"),children:(0,s.jsx)(x.A,{size:"small",dataSource:eS.executionStages,renderItem:e=>(0,s.jsxs)(x.A.Item,{children:[(0,s.jsx)(x.A.Item.Meta,{avatar:ee[e.type]||(0,s.jsx)(R.A,{}),title:(0,s.jsx)(Y,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(el[e.type]||e.type," \xb7 ").concat(e.roleName||te(e.roleId))}),description:(0,s.jsx)(Y,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(c.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,s.jsx)(j.A,{title:e("documents.templateEditor"),open:eN,onClose:()=>eO(!1),width:860,maskClosable:!1,styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(g.A,{children:[(0,s.jsx)(u.Ay,{onClick:()=>eO(!1),children:e("common.cancel")}),(0,s.jsx)(u.Ay,{type:"primary",onClick:()=>{tx()},children:e("common.save")})]}),children:(0,s.jsxs)(o.A,{form:r,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(S.A,{gutter:12,children:[(0,s.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"name",label:e("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"category",label:e("documents.templateCategory"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:8,children:(0,s.jsx)(o.A.Item,{name:"outputTitle",label:e("documents.outputTitle"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(k.A,{xs:24,md:12,children:(0,s.jsx)(o.A.Item,{name:"description",label:e("documents.templateDescription"),children:(0,s.jsx)(n.A,{})})})]}),(0,s.jsx)(o.A.Item,{name:"projectRoleConfigId",label:e("documents.projectRoleConfig"),rules:[{required:!0,message:e("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(b.A,{showSearch:!0,placeholder:e("documents.projectRoleConfigRequired"),options:e4})}),(0,s.jsxs)("div",{style:{marginBottom:16},children:[(0,s.jsxs)(g.A,{style:{width:"100%",justifyContent:"space-between",marginBottom:8},children:[(0,s.jsx)(Y,{strong:!0,children:"项目文件绑定"}),(0,s.jsx)(c.A,{color:"blue",children:"按文件角色多选"})]}),(0,s.jsx)(f.A,{type:"info",showIcon:!0,style:{marginBottom:12},message:"每个文件角色下多选对应的知识库文件。用户换项目时,只需要在这里重新选择对应项目资料。"}),0===eK.length?(0,s.jsx)(p.A,{image:p.A.PRESENTED_IMAGE_SIMPLE,description:"暂无可用文件角色"}):eK.map(e=>(0,s.jsx)(m.A,{size:"small",style:{marginBottom:12},title:(0,s.jsx)(g.A,{children:(0,s.jsx)(Y,{children:e.label})}),children:(0,s.jsx)(o.A.Item,{name:["fileBindingGroups",e.value],children:(0,s.jsx)(b.A,{mode:"multiple",showSearch:!0,filterOption:!1,loading:ef,onSearch:e=>{tm(e)},onFocus:()=>{tm("")},tagRender:ts,placeholder:"输入关键词搜索知识库文件",options:eV})})},e.value))]}),(0,s.jsx)(f.A,{type:"info",showIcon:!0,message:"文档规范由后台根据模板、提示词和角色绑定自动生成,无需手动维护规范包。"})]})})]})}}},e=>{e.O(0,[433,787,576,195,455,506,412,304,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{2548:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>b});var i=l(65321),r=l(35292),c=l(68787),n=l(2256),d=l(38770),t=l(11702),x=l(9730),h=l(13399),j=l(55122),a=l(15622),o=l(71330),g=l(8579),m=l(66926),A=l(7851),p=l(84742),u=l(79059);let{Paragraph:k,Title:z,Text:N}=r.A,y=[{icon:(0,i.jsx)(o.A,{}),title:"准备阶段",color:"blue",items:["配置模型","上传知识库资料","创建提示词"]},{icon:(0,i.jsx)(g.A,{}),title:"编排阶段",color:"purple",items:["创建文件角色","创建提示词角色","创建项目角色配置并排序"]},{icon:(0,i.jsx)(m.A,{}),title:"生成阶段",color:"geekblue",items:["创建模板","上下文召回","知识库证据增强","动态执行状态"]},{icon:(0,i.jsx)(A.A,{}),title:"交付阶段",color:"green",items:["审查事实和来源","检查导出门禁","导出正式文件"]}],w=[{title:"第一步:配置模型",goal:"让系统具备 LLM JSON 事实抽取、章节生成和校验能力。",path:"左侧菜单 → 模型配置",steps:["点击新增供应商,选择 OpenAI、DeepSeek、OpenRouter、Ollama 或其他兼容 OpenAI 协议的服务。","填写 Base URL、API Key、供应商名称并保存。","添加模型名称,建议至少准备一个用于生成和推理的模型。","把模型设置为当前启用模型。","执行健康检查,确认模型可调用。"],checks:["模型健康检查通过","至少有一个启用模型","API Key 和 Base URL 正确"],tips:"如果模型不可用,系统会回退到本地确定性抽取,但事实抽取质量会下降。"},{title:"第二步:上传知识库资料",goal:"把项目资料放入系统,让后续文件角色可以绑定。",path:"左侧菜单 → 知识库 → 文件管理 / 管理",steps:["上传招标文件、工程概况、合同条件、技术要求等项目事实资料。","上传工程量清单、劳动力计划、机械设备计划、材料计划等表格资料。","上传图纸目录、图纸说明、设计说明等图纸类资料。","上传规范、规程、企业标准、评分办法、编制要求等规则类资料。","等待索引完成,并在知识库文件列表中确认文件可见。"],checks:["文件上传成功","索引完成","文件能在文件角色绑定下拉框中看到"],tips:"表格资料最好有清晰表头;图纸资料最好附带目录或文字说明。"},{title:"第三步:创建提示词",goal:"定义每个执行阶段的模型行为。",path:"左侧菜单 → 提示词管理",steps:["创建事实抽取提示词:要求只抽取资料中明确出现的事实,返回结构化 JSON,不允许编造。","创建章节生成提示词:定义文档类型、专业语气、章节风格、引用事实和禁止事项。","创建校验提示词:检查工程名称、工期、质量目标、数字、表格引用、章节完整性。","创建格式化提示词:定义封面、目录、编号、表格、分页和正式输出样式。","保存后确认提示词能在提示词角色绑定下拉框中看到。"],checks:["事实抽取提示词已创建","章节生成提示词已创建","校验或格式化提示词已创建"],tips:"提示词越明确,生成结果越稳定。建议明确写上“没有来源的数据不要写”。"},{title:"第四步:创建文件角色",goal:"告诉系统每个文件在生成流程中的用途。",path:"左侧菜单 → 角色配置 → 新建文件角色",steps:["填写角色名称,例如“招标文件事实源”“工程量清单表格”“图纸说明文件”。","选择处理类型:规则文件、项目事实文件、表格数据、图纸文件、规范文件或参考资料。","绑定对应知识库文件。","保存角色。","按文件用途创建多个文件角色,不建议把不同用途资料混在一个角色里。"],checks:["文件角色有名称","已选择处理类型","具体项目文件由生成流程自动识别"],tips:"处理类型很重要:系统会根据它决定是否进行表格解析、事实抽取、规则引用或来源追踪。"},{title:"第五步:创建提示词角色",goal:"告诉系统每条提示词在哪个执行阶段使用。",path:"左侧菜单 → 角色配置 → 新建提示词角色",steps:["填写角色名称,例如“施工组织设计事实抽取”“章节生成规则”“导出前校验规则”。","选择执行类型:事实抽取、章节生成、校验、格式化或参考。","绑定对应提示词。","保存角色。","一个执行阶段可以有多个提示词角色,后续在项目角色配置中排序。"],checks:["提示词角色有名称","已选择执行类型","已绑定提示词"],tips:"角色名称可以完全自定义,但执行类型必须选对。系统依赖执行类型驱动多阶段流程。"},{title:"第六步:创建项目角色配置并排序",goal:"把文件角色和提示词角色组合成一个可复用的项目生成方案。",path:"左侧菜单 → 角色配置 → 新建项目配置",steps:["填写配置名称,例如“某项目施工组织设计配置”。","添加文件角色,并设置顺序。推荐:规则文件 → 项目事实文件 → 表格数据 → 图纸文件 → 规范文件 → 参考资料。","添加提示词角色,并设置顺序。推荐:事实抽取 → 章节生成 → 校验 → 格式化 → 参考。","保存项目角色配置。","后续模板只绑定项目角色配置,不再重复绑定文件和提示词。"],checks:["至少包含一个文件角色","至少包含一个提示词角色","顺序符合业务流程"],tips:"排序决定系统读取资料和应用提示词的优先级,是生产级生成稳定性的关键。"},{title:"第七步:创建模板并绑定项目配置",goal:"定义要生成哪种文档,以及使用哪套项目角色配置。",path:"左侧菜单 → 生成编辑 → 新建模板",steps:["填写模板 ID。ID 由系统生成或保持唯一,不建议手动频繁修改。","填写模板名称,例如“施工组织设计”“技术标文件”“专项施工方案”。","填写分类、输出标题和模板说明。","选择第六步创建的项目角色配置。","为章节填写查询词和必需事实;系统会自动按章节检索知识库证据。","高级优先证据通常无需填写;只有必须指定某份官方资料、图纸或表格时才使用。","保存模板。"],checks:["模板名称清晰","输出标题正确","已绑定项目角色配置"],tips:"模板负责文档入口;项目角色配置负责资料、提示词和顺序。两者分离后更容易复用。"},{title:"第八步:执行生成并查看状态",goal:"让用户明确知道生成流程进行到哪一步。",path:"左侧菜单 → 生成编辑 → 选择模板 → 点击生成",steps:["点击生成按钮后,页面会出现“执行状态”卡片。","系统会先绑定文件角色和提示词角色,再按当前项目召回短期/长期上下文;上下文只作为偏好和历史纠偏参考,不覆盖知识库事实。","系统会按章节自动检索知识库证据;只有在必须指定官方资料、图纸或表格时,才需要使用高级优先证据。","执行状态会根据当前模板、后台自动规范、文件角色、提示词角色、上下文召回、证据增强和章节自动生成,不是固定工程流程。","当前执行节点会高亮显示,子状态会展示正在处理的章节、事实字段、文件角色、增强贡献或门禁规则。","生成任务在后台运行,页面通过 documentId 轮询;切换页面后回到生成编辑仍可恢复状态。","生成完成后,系统会用后端真实 executionStages 回填最终状态。","如果导出门禁未通过,生成完成节点会提示需要检查校验结果。"],checks:["执行状态 Card 出现","当前节点有高亮","生成完成后有执行阶段结果"],tips:"如果长时间停留在某一步,优先检查模型配置、知识库索引和文件角色绑定。"},{title:"第九步:审查结果并导出",goal:"确保文档可追溯、可校验、可交付,同时能区分阻断问题和可复核 warning。",path:"生成编辑 → 编辑器下方 Tabs → 导出按钮 / 草稿历史",steps:["查看“结构化事实”,确认事实字段是否按后台自动规范动态 schema 抽取,并检查冲突提示。","查看“来源”,确认事实来自后台自动规范要求的文件角色和绑定资料。","查看“缺失项”,补齐缺失资料或调整角色配置。","查看“校验”,优先处理 error;warning 表示可导出但建议复核。","查看“导出门禁”,真实 blockingIssues 会阻断 PDF/DOCX 导出,普通 warning 不阻断。","在草稿历史中确认生成状态、warning 原因、整体生成耗时,并可删除不需要的记录。","可以先导出 HTML 预览排版,再导出 DOCX/PDF。"],checks:["无真实阻断问题","关键事实有来源","章节有证据","warning 原因已复核","导出文件可打开"],tips:"导出不是简单放行:真实阻断仍会拦截;生成完成但存在可复核问题时显示 warning,用户可以继续导出并按原因优化资料。"}];function b(){let e=(0,u.Vr)();return(0,i.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,i.jsxs)(c.A,{className:"cardGlass",styles:{body:{padding:24}},children:[(0,i.jsx)(z,{level:2,className:"mb-2",children:e("guide.title")}),(0,i.jsx)(k,{className:"pageDesc mb-0",children:e("guide.description")})]}),(0,i.jsx)(n.A,{gutter:[16,16],children:y.map(e=>(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{className:"h-full",title:(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[e.icon,e.title]}),children:(0,i.jsx)("div",{className:"space-y-2",children:e.items.map(s=>(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{color:e.color,children:s})},s))})})},e.title))}),(0,i.jsx)(c.A,{title:e("guide.fullFlow"),children:(0,i.jsx)(x.A,{direction:"vertical",items:w.map(e=>({title:e.title,description:"".concat(e.goal,"(入口:").concat(e.path,")")}))})}),(0,i.jsx)(c.A,{title:"详细步骤说明:照着做即可跑通",children:(0,i.jsx)(h.A,{mode:"left",items:w.map(e=>({dot:(0,i.jsx)(p.A,{}),children:(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(z,{level:4,className:"mb-0",children:e.title}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"目标:"}),e.goal]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"入口:"}),e.path]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{strong:!0,children:"操作步骤:"}),(0,i.jsx)("ol",{className:"list-decimal pl-6 mt-2 space-y-1",children:e.steps.map(e=>(0,i.jsx)("li",{children:e},e))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{strong:!0,children:"完成检查:"}),(0,i.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.checks.map(e=>(0,i.jsx)(t.A,{color:"success",children:e},e))})]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"提示:"}),e.tips]}),(0,i.jsx)(j.A,{})]})}))})}),(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{title:e("guide.roleDesign"),children:[(0,i.jsx)(k,{children:e("guide.roleDesignDesc")}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"blue",children:"file"}),(0,i.jsx)(N,{strong:!0,children:e("guide.fileRole")}),(0,i.jsx)(k,{children:e("guide.fileRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"purple",children:"prompt"}),(0,i.jsx)(N,{strong:!0,children:e("guide.promptRole")}),(0,i.jsx)(k,{children:e("guide.promptRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"geekblue",children:"config"}),(0,i.jsx)(N,{strong:!0,children:e("guide.projectConfig")}),(0,i.jsx)(k,{children:e("guide.projectConfigDesc")})]})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{title:e("guide.generationEngine"),children:[(0,i.jsx)(k,{children:e("guide.generationEngineDesc")}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(t.A,{children:e("roles.factExtraction")}),(0,i.jsx)(t.A,{children:e("roles.chapterGeneration")}),(0,i.jsx)(t.A,{children:e("roles.validation")}),(0,i.jsx)(t.A,{children:e("roles.formatting")}),(0,i.jsx)(t.A,{children:e("documents.exportGate")})]})]})})]}),(0,i.jsx)(c.A,{title:"文件角色和提示词角色案例:它们在模板生成中到底起什么作用",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 A:创建文件角色“招标文件事实源”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"类型选择 file,处理类型选择“项目事实文件”,绑定招标文件、合同摘要或项目概况。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会从这个角色绑定的文件里抽取工程名称、建设地点、工期、质量目标、范围边界等事实,并把来源带入结构化事实和章节证据。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"模型不再凭空补项目事实;章节生成和导出校验都会追踪“这句话来自哪个文件角色、哪个文件”。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 B:创建文件角色“工程量清单表格”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"类型选择 file,处理类型选择“表格数据”,绑定 Excel、CSV、清单表或计划表。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会读取 Sheet、表头、行列和来源范围,把表格数据转换成可引用的结构化资源证据。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"章节中涉及数量、清单、计划、资源配置时,优先引用表格来源,减少数字编造和漏项。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 C:创建提示词角色“章节生成规则”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"先在提示词管理中写好生成规则,例如“必须引用来源、不要写无来源数据、输出正式报告语气”;再创建 prompt 角色,执行类型选择“章节生成”。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统生成每个章节时会把这个提示词加入 LLM 上下文,用它约束语气、结构、引用方式和禁止事项。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"同一套资料可以生成更稳定的文档风格;不同模板只需替换提示词角色,就能调整写法而不改知识库文件。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 D:创建提示词角色“导出前校验规则”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"提示词内容写清楚必须检查的交付要求,例如“不能出现资料未提供、图片引用必须可访问、关键事实必须有来源”;prompt 角色执行类型选择“校验”或“格式化”。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"生成完成后,系统会结合后台自动规范、证据来源和导出门禁检查文档是否可交付。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"把人工审稿经验前置到生成流程,降低导出后才发现缺来源、缺图片、格式不合格的概率。"]})]})})]})}),(0,i.jsx)(c.A,{title:"我的数据和门禁规则说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"使用自己的数据",children:(0,i.jsx)(k,{children:"文件、提示词、角色配置和规范包都来自用户自己创建或上传的内容,生成流程会按当前项目配置读取并参与校验。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"自定义门禁类型会执行",children:(0,i.jsx)(k,{children:"门禁规则由后台根据模板、提示词和角色绑定自动形成,并与系统门禁一起参与生成校验,不需要用户手动维护规范包。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"上传后关注索引状态",children:(0,i.jsx)(k,{children:"文件上传完成后,知识库索引会继续在后台写入。请在文件管理页查看状态,如果失败,页面会展示原因,方便重新配置模型或重试。"})})})]})}),(0,i.jsx)(c.A,{title:"上下文、知识库证据和增强贡献说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"上下文召回不是事实来源",children:(0,i.jsx)(k,{children:"生成前会按当前项目召回短期/长期上下文,但它只用于用户偏好、历史纠偏和连续性参考。如果上下文与知识库证据冲突,系统提示词会要求以知识库证据、模板要求和规范包为准。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"自动检索为主",children:(0,i.jsx)(k,{children:"模板章节的查询词、章节目的和必需事实会驱动系统自动检索知识库证据。高级优先证据只是兜底能力,用于必须指定官方资料、图纸或表格的场景,不是日常必填项。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"增强贡献可追踪",children:(0,i.jsx)(k,{children:"生成流程会展示知识库证据、人工确认/固定证据、项目上下文和自动检索证据的数量,帮助判断本次增强是否真的参与生成,而不是增加用户维护成本。"})})})]})}),(0,i.jsx)(c.A,{title:"动态 schema、证据和执行状态说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"动态事实 schema",children:(0,i.jsx)(k,{children:"系统不会写死工程字段。后台自动规范会结合模板章节 requiredFacts、角色绑定和提示词形成抽取 schema,并驱动事实抽取、冲突检测和导出门禁。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"结构化资源证据",children:(0,i.jsx)(k,{children:"文本、PDF/Word、Excel/CSV、图片、地图图纸和其他附件都会被整理成资源证据,包含文件角色、处理类型、正文用途、关联事实和证据片段,模型据此理解资料关系。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"动态执行状态",children:(0,i.jsx)(k,{children:"生成编辑页的执行节点会随模板、规范包、文件角色、提示词角色、章节和门禁规则变化;用户生成不同项目文件时看到的是对应项目的流程,而不是固定示例流程。"})})})]})}),(0,i.jsx)(c.A,{title:"生成记录、warning 和导出门禁怎么理解",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"草稿历史记录",children:[(0,i.jsxs)(k,{children:["每次后台生成都会写入全局项目目录 ",(0,i.jsxs)(N,{code:!0,children:["~/.customize-agent/projects/","{projectId}","/generatedDocuments"]}),"。记录会保存标题、模板、状态、创建时间、完成时间、生成耗时、正文、结构化结果和资源引用。"]}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"completed:生成完成且无需要关注的问题。"}),(0,i.jsx)("li",{children:"warning:生成完成,但存在可复核问题。"}),(0,i.jsx)("li",{children:"failed:生成失败,需要查看错误原因。"}),(0,i.jsx)("li",{children:"generating:后台任务仍在执行,可轮询恢复。"})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"warning 不是失败",children:[(0,i.jsx)(k,{children:"warning 用于提醒用户“文档已经生成,但建议复核”。例如必需事实没有在最佳来源角色中抽到、部分来源需要人工确认、格式或内容有优化建议。warning 会显示在草稿历史和校验详情中,并保留导出能力。"}),(0,i.jsx)(k,{children:"如果是明确阻断问题,例如正文包含临时图片生成 URL、出现“资料未提供”占位、真实 blockingIssues 未解决,则导出门禁仍会阻断 DOCX/PDF。"})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"导出门禁规则",children:[(0,i.jsx)(k,{children:"门禁分为“真实阻断”和“复核建议”。系统不会因为普通 warning 简单禁止导出,但会在出现阻断级问题时保护交付质量。"}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"Markdown/HTML 更适合快速预览和人工调整。"}),(0,i.jsx)("li",{children:"DOCX/PDF 会启用真实门禁检查。"}),(0,i.jsx)("li",{children:"草稿历史可保留多个版本,便于对比和再次导出。"})]})]})})]})}),(0,i.jsx)(c.A,{title:"生成资源和知识库的关系",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(c.A,{size:"small",title:"生成资源自动回流知识库",children:[(0,i.jsx)(k,{children:"模型生成的图片、封面或后处理资源会登记到生成资源管理页,并自动回流到 knowledgeBase/生成资源 下完成索引。"}),(0,i.jsx)(k,{children:"后续文档可以继续检索和复用这些已生成资源,资源管理页也会展示入库状态。"})]})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(c.A,{size:"small",title:"资源预览和坏图处理",children:[(0,i.jsx)(k,{children:"资源预览会从全局 generatedDocuments 目录解析文件,不依赖当前页面临时路径。图片下载会识别“image is generating”等占位响应,并校验 PNG/JPEG/WebP 字节,避免把占位文本当成图片保存。"}),(0,i.jsx)(k,{children:"如果预览失败,优先查看资源管理页中的文件路径、资源状态和原始生成记录。"})]})})]})}),(0,i.jsx)(c.A,{title:"文件角色处理类型大白话说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"规则文件",children:(0,i.jsx)(k,{children:"用来告诉系统“必须怎么写、不能怎么写、按什么标准判断”。适合放评分办法、甲方编制要求、攻略写作要求、输出格式要求。生成时会优先作为约束使用。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"项目事实文件",children:(0,i.jsx)(k,{children:"用来告诉系统“真实情况是什么”。适合放项目概况、合同摘要、招标文件关键信息、游戏角色资料、产品资料。事实字段通常从这里抽取。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"表格数据",children:(0,i.jsx)(k,{children:"用来解析结构化数据。适合放 Excel、CSV、清单、计划表、评分表、推荐指数表。系统会读取 Sheet、表头、行列和来源范围。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"图纸文件",children:(0,i.jsx)(k,{children:"用来表达空间关系、路线、结构、站位或设计说明。可以是图纸目录、设计说明、路线示意、阵型图说明。没有 CAD 时也可以用文字图纸说明。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"规范文件",children:(0,i.jsx)(k,{children:"用来作为专业依据。适合放国家规范、行业标准、企业标准、攻略结构规范、质量标准。校验和生成时会把它当成依据。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"参考资料",children:(0,i.jsx)(k,{children:"只作为辅助阅读材料,不建议放关键事实。适合放图片来源、公开网页链接、背景资料、案例资料。系统可以参考,但不应把它当成强事实。"})})})]})}),(0,i.jsx)(c.A,{title:"推荐资料清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"必备资料",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"项目事实文件"}),(0,i.jsx)("li",{children:"招标或编制规则"}),(0,i.jsx)("li",{children:"章节生成提示词"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"强烈建议",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"表格数据"}),(0,i.jsx)("li",{children:"图纸说明"}),(0,i.jsx)("li",{children:"规范或企业标准"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"导出前确认",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"无 error 校验"}),(0,i.jsx)("li",{children:"事实有来源"}),(0,i.jsx)("li",{children:"导出门禁通过"})]})})})]})}),(0,i.jsx)(c.A,{title:"生产级生成前检查清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"资料完整性",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"事实源、规则源、表格源、图片/图纸源分开绑定。"}),(0,i.jsx)("li",{children:"关键事实在知识库检索中可以搜索到。"}),(0,i.jsx)("li",{children:"表格有清晰表头,图片和图纸有说明文字。"}),(0,i.jsx)("li",{children:"只有必须指定资料时才维护高级优先证据。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"角色配置",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"文件角色处理类型选对。"}),(0,i.jsx)("li",{children:"提示词角色执行类型选对。"}),(0,i.jsx)("li",{children:"项目角色配置排序符合生成流程。"}),(0,i.jsx)("li",{children:"生成后查看增强贡献,确认上下文和证据是否真实参与。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"规范包",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"required fact 不要过度配置。"}),(0,i.jsx)("li",{children:"sourceRoleIds 只绑定真正应该提供该事实的角色。"}),(0,i.jsx)("li",{children:"gateRules 区分 error 和 warning。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"交付检查",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"草稿历史记录状态合理。"}),(0,i.jsx)("li",{children:"warning 原因已经阅读。"}),(0,i.jsx)("li",{children:"导出文件打开正常,图片和表格可读。"})]})})})]})}),(0,i.jsx)(c.A,{title:"常见问题和处理建议",children:(0,i.jsx)(a.A,{items:[{key:"warning-export",label:"为什么生成完成后显示 warning,但仍然可以导出?",children:(0,i.jsx)(k,{children:"warning 表示文档已生成,但存在建议复核的问题,例如来源角色不完全匹配、某些事实需要人工确认或格式可优化。它不是失败,也不是导出阻断。只有真实 blockingIssues 或 error 级门禁问题才会阻断 DOCX/PDF 导出。"})},{key:"missing-facts",label:"为什么提示必需事实缺失?",children:(0,i.jsx)(k,{children:"优先检查后台自动规范生成的事实字段、模板章节 requiredFacts 和文件角色绑定。很多情况下不是模型失败,而是资料没有被绑定到正确角色,或字段要求比资料实际内容更严格。"})},{key:"draft-duration",label:"草稿历史里的耗时怎么计算?",children:(0,i.jsx)(k,{children:"耗时使用生成记录的 createdAt 到 completedAt 计算;旧记录或未完成记录会使用 updatedAt 兜底。它用于判断本次生成链路整体成本,包括知识库检索、事实抽取、章节生成、资源处理、校验和格式化。"})},{key:"asset-index",label:"生成资源会如何进入知识库?",children:(0,i.jsx)(k,{children:"生成资源完成后会自动回流到 knowledgeBase/生成资源 并建立索引,便于后续模板继续复用。资源管理页会展示入库状态,错误资源可以删除后重新生成。"})},{key:"context-accuracy",label:"上下文召回会不会影响准确度?",children:(0,i.jsx)(k,{children:"上下文只作为当前项目的偏好、历史纠偏和连续性参考,不作为事实来源。生成和审查提示词都要求:如果上下文与知识库证据、模板要求或后台自动规范冲突,以知识库证据和后台自动规范为准。"})},{key:"priority-evidence",label:"什么时候需要维护高级优先证据?",children:(0,i.jsx)(k,{children:"日常不需要维护。只有当某章必须引用指定官方资料、图纸、表格,或自动检索结果不稳定时,才从知识库搜索页复制文件路径并填入章节高级优先证据。"})}]})}),(0,i.jsx)(a.A,{items:[{key:"prepare",label:e("guide.prepareTitle"),children:(0,i.jsx)(k,{children:e("guide.prepareContent")})},{key:"roles",label:e("guide.rolesTitle"),children:(0,i.jsx)(k,{children:e("guide.rolesContent")})},{key:"template",label:e("guide.templateTitle"),children:(0,i.jsx)(k,{children:e("guide.templateContent")})},{key:"generate",label:e("guide.generateTitle"),children:(0,i.jsx)(k,{children:e("guide.generateContent")})},{key:"qa",label:e("guide.qaTitle"),children:(0,i.jsx)(k,{children:e("guide.qaContent")})}]})]})}},34899:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/guide",function(){return l(2548)}])}},e=>{e.O(0,[433,787,412,20,636,593,792],()=>e(e.s=34899)),_N_E=e.O()}]);