@customize-agent/server 4.0.66 → 4.0.68

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 (47) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +20 -20
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/chunks/6697.js +5 -5
  5. package/.next/server/middleware-build-manifest.js +1 -1
  6. package/.next/server/pages/404.html +1 -1
  7. package/.next/server/pages/500.html +1 -1
  8. package/.next/server/pages/asset-library.html +1 -1
  9. package/.next/server/pages/context/long-term.html +1 -1
  10. package/.next/server/pages/context/short-term.html +1 -1
  11. package/.next/server/pages/document-roles.html +1 -1
  12. package/.next/server/pages/documents.html +1 -1
  13. package/.next/server/pages/guide.html +1 -1
  14. package/.next/server/pages/index.html +1 -1
  15. package/.next/server/pages/knowledge/file-detail.html +1 -1
  16. package/.next/server/pages/knowledge/files.html +1 -1
  17. package/.next/server/pages/knowledge/manage.html +1 -1
  18. package/.next/server/pages/knowledge/search.html +1 -1
  19. package/.next/server/pages/knowledge.html +1 -1
  20. package/.next/server/pages/models.html +1 -1
  21. package/.next/server/pages/overview.html +1 -1
  22. package/.next/server/pages/prompt.html +1 -1
  23. package/.next/server/pages/settings.html +1 -1
  24. package/.next/server/pages/system/logs.html +1 -1
  25. package/.next/server/pages-manifest.json +28 -28
  26. package/.next/static/chunks/{317-0cc5d3d1f0f660e8.js → 317-18aac52df5551e76.js} +1 -1
  27. package/.next/static/chunks/375-4a1c73eb22d653d2.js +1 -0
  28. package/.next/static/chunks/496-4fb9a063790e65ff.js +1 -0
  29. package/.next/static/chunks/694-2d545cfbb9779f2c.js +1 -0
  30. package/.next/static/chunks/788-7f7359a830e3f4fd.js +1 -0
  31. package/.next/static/chunks/795-d8fb7a0420512701.js +1 -0
  32. package/.next/static/chunks/940-7cb66111eee2f9fb.js +1 -0
  33. package/.next/static/chunks/pages/document-roles-fd02980db151650c.js +1 -0
  34. package/.next/static/chunks/pages/documents-141b9ab2dba47ae7.js +1 -0
  35. package/.next/static/chunks/pages/guide-295174493709ecbb.js +1 -0
  36. package/.next/static/{fCR6WWHLEWk1IcNN2WRCv → ubuSYahPe0ZJo6zT6KdSg}/_buildManifest.js +1 -1
  37. package/package.json +4 -4
  38. package/.next/static/chunks/375-f731e5ec66ab942c.js +0 -1
  39. package/.next/static/chunks/496-ceb2d8197d6335cf.js +0 -1
  40. package/.next/static/chunks/694-b6ab4967c35bbcee.js +0 -1
  41. package/.next/static/chunks/788-db05269178a28c20.js +0 -1
  42. package/.next/static/chunks/795-262a7ef599d655f4.js +0 -1
  43. package/.next/static/chunks/940-364bc292676ba191.js +0 -1
  44. package/.next/static/chunks/pages/document-roles-00219c0a0871daec.js +0 -1
  45. package/.next/static/chunks/pages/documents-59a9675554042dd5.js +0 -1
  46. package/.next/static/chunks/pages/guide-e51e5f0109a3642c.js +0 -1
  47. /package/.next/static/{fCR6WWHLEWk1IcNN2WRCv → ubuSYahPe0ZJo6zT6KdSg}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[496],{2256:(e,t,n)=>{n.d(t,{A:()=>r});let r=n(25341).A},10218:(e,t,n)=>{n.d(t,{A:()=>v,H:()=>p});var r=n(97109),o=n(4932),l=n(42644);let a=e=>"object"==typeof e&&null!=e&&1===e.nodeType,i=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,c=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return i(n.overflowY,t)||i(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},s=(e,t,n,r,o,l,a,i)=>l<e&&a>t||l>e&&a<t?0:l<=e&&i<=n||a>=t&&i>=n?l-e-r:a>t&&i<n||l<e&&i>n?a-t+o:0,d=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},f=(e,t)=>{var n,r,o,l;if("undefined"==typeof document)return[];let{scrollMode:i,block:f,inline:h,boundary:u,skipOverflowHiddenElements:p}=t,m="function"==typeof u?u:e=>e!==u;if(!a(e))throw TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,g=[],b=e;for(;a(b)&&m(b);){if((b=d(b))===v){g.push(b);break}null!=b&&b===document.body&&c(b)&&!c(document.documentElement)||null!=b&&c(b,p)&&g.push(b)}let y=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,w=null!=(l=null==(o=window.visualViewport)?void 0:o.height)?l:innerHeight,{scrollX:A,scrollY:$}=window,{height:H,width:z,top:E,right:M,bottom:O,left:j}=e.getBoundingClientRect(),{top:V,right:x,bottom:I,left:L}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),R="start"===f||"nearest"===f?E-V:"end"===f?O+I:E+H/2-V+I,C="center"===h?j+z/2-L+x:"end"===h?M+x:j-L,N=[];for(let e=0;e<g.length;e++){let t=g[e],{height:n,width:r,top:o,right:l,bottom:a,left:d}=t.getBoundingClientRect();if("if-needed"===i&&E>=0&&j>=0&&O<=w&&M<=y&&(t===v&&!c(t)||E>=o&&O<=a&&j>=d&&M<=l))break;let u=getComputedStyle(t),p=parseInt(u.borderLeftWidth,10),m=parseInt(u.borderTopWidth,10),b=parseInt(u.borderRightWidth,10),V=parseInt(u.borderBottomWidth,10),x=0,I=0,L="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-b:0,k="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-V:0,B="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,S="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(v===t)x="start"===f?R:"end"===f?R-w:"nearest"===f?s($,$+w,w,m,V,$+R,$+R+H,H):R-w/2,I="start"===h?C:"center"===h?C-y/2:"end"===h?C-y:s(A,A+y,y,p,b,A+C,A+C+z,z),x=Math.max(0,x+$),I=Math.max(0,I+A);else{x="start"===f?R-o-m:"end"===f?R-a+V+k:"nearest"===f?s(o,a,n,m,V+k,R,R+H,H):R-(o+n/2)+k/2,I="start"===h?C-d-p:"center"===h?C-(d+r/2)+L/2:"end"===h?C-l+b+L:s(d,l,r,p,b+L,C,C+z,z);let{scrollLeft:e,scrollTop:i}=t;x=0===S?0:Math.max(0,Math.min(i+x/S,t.scrollHeight-n/S+k)),I=0===B?0:Math.max(0,Math.min(e+I/B,t.scrollWidth-r/B+L)),R+=i-x,C+=e-I}N.push({el:t,top:x,left:I})}return N};var h=n(26047),u=n(44624);function p(e){return(0,u.$r)(e).join("_")}function m(e,t){let n=t.getFieldInstance(e),r=(0,l.rb)(n);if(r)return r;let o=(0,u.kV)((0,u.$r)(e),t.__INTERNAL__.name);if(o)return document.getElementById(o)}function v(e){let[t]=(0,o.mN)(),n=r.useRef({}),l=r.useMemo(()=>e??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=p(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...r}=t,o=m(e,l);o&&(!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(f(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:o,top:l,left:a}of f(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=l-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(o,{scrollMode:"if-needed",block:"nearest",...r}),n&&l.focusField(e))},focusField:e=>{let t=l.getFieldInstance(e);(0,h.Tn)(t?.focus)?t.focus():m(e,l)?.focus?.()},getFieldInstance:e=>{let t=p(e);return n.current[t]}},[e,t]);return[l]}},12887:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},15437:(e,t,n)=>{n.d(t,{A:()=>r});let r=e=>{let{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:o}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(e=>`${e} ${r} ${o}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(e=>`${e} ${r} ${o}`).join(", ")} !important`}}}}},20966:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"}},25345:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(99729),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},26631:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(12887),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},30960:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(95008),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},38770:(e,t,n)=>{n.d(t,{A:()=>r});let r=n(51916).A},43094:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(72870),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},43979:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(59291),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},44624:(e,t,n)=>{n.d(t,{$r:()=>o,BS:()=>a,kV:()=>l});let r=["parentNode"];function o(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function l(e,t){if(!e.length)return;let n=e.join("_");return t?`${t}_${n}`:r.includes(n)?`form_item_${n}`:n}function a(e,t,n,r,o,l){let a=r;return void 0!==l?a=l:n.validating?a="validating":e.length?a="error":t.length?a="warning":(n.touched||o&&n.validated)&&(a="success"),a}},44858:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"}}]},name:"table",theme:"outlined"}},53707:(e,t)=>{t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"}},59291:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"profile",theme:"outlined"}},66284:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"}},72870:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"}},75548:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(66284),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},80042:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(44858),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},81668:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(96724),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},84662:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(20966),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},85493:(e,t,n)=>{n.d(t,{A:()=>x});var r=n(97109),o=n(59188),l=n(4216),a=n(45042),i=n(97137),c=n(62188),s=n(67189),d=n(42644),f=n(3638),h=n(92162),u=n(26047),p=n(74567),m=n(15561),v=n(7961),g=n(10540);let b=(e,t,n)=>({background:e,[`${n}-icon`]:{color:t}}),y=(0,g.OF)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:o,fontSize:l,fontSizeLG:a,lineHeight:i,borderRadiusLG:c,motionEaseInOutCirc:s,withDescriptionIconSize:d,colorText:f,colorTextHeading:h,withDescriptionPadding:u,defaultPadding:p,lineWidth:g,lineType:b,colorSuccessBorder:y,colorWarningBorder:w,colorErrorBorder:A,colorInfoBorder:$}=e;return{[t]:{...(0,v.dF)(e),position:"relative",display:"flex",alignItems:"center",padding:p,wordWrap:"break-word",borderRadius:c,borderWidth:(0,m.zA)(g),borderStyle:b,[`&${t}-success`]:{borderColor:y},[`&${t}-info`]:{borderColor:$},[`&${t}-warning`]:{borderColor:w},[`&${t}-error`]:{borderColor:A},[`&${t}-filled`]:{borderColor:"transparent"},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:l,lineHeight:i},"&-title":{color:h},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(e=>`${e} ${n} ${s}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:"flex-start",padding:u,[`${t}-icon`]:{marginInlineEnd:o,fontSize:d,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:r,color:h,fontSize:a},[`${t}-description`]:{display:"block",color:f}},[`&${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}})(e),(e=>{let{componentCls:t,colorSuccess:n,colorSuccessBg:r,colorWarning:o,colorWarningBg:l,colorError:a,colorErrorBg:i,colorInfo:c,colorInfoBg:s}=e;return{[t]:{"&-success":b(r,n,t),"&-info":b(s,c,t),"&-warning":b(l,o,t),"&-error":{...b(i,a,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}})(e),(e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:o,fontSizeIcon:l,colorIcon:a,colorIconHover:i}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:o},[`${t}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:l,lineHeight:(0,m.zA)(l),backgroundColor:"transparent",border:"none",cursor:"pointer",...(0,v.K8)(e),[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:i}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:i}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),w=e=>{let{icon:t,type:n,className:a,style:s,successIcon:d,infoIcon:f,warningIcon:h,errorIcon:u}=e,p={success:d??r.createElement(o.A,null),info:f??r.createElement(c.A,null),error:u??r.createElement(l.A,null),warning:h??r.createElement(i.A,null)};return r.createElement("span",{className:a,style:s},t??p[n])},A=e=>{let{isClosable:t,prefixCls:n,closeIcon:o,handleClose:l,ariaProps:i,className:c,style:s}=e,d=!0===o||void 0===o?r.createElement(a.A,null):o;return t?r.createElement("button",{type:"button",onClick:l,className:(0,f.$)(`${n}-close-icon`,c),tabIndex:0,style:s,...i},d):null},$=r.forwardRef((e,t)=>{let{description:n,prefixCls:o,message:l,title:a,banner:i,className:c,rootClassName:m,style:v,onMouseEnter:g,onMouseLeave:b,onClick:$,afterClose:H,showIcon:z,closable:E,closeText:M,closeIcon:O,action:j,id:V,styles:x,classNames:I,...L}=e,R=a??l,[C,N]=r.useState(!1),k=r.useRef(null);r.useImperativeHandle(t,()=>({nativeElement:k.current}));let{getPrefixCls:B,direction:S,variant:W,closable:_,closeIcon:F,className:P,style:T,classNames:D,styles:Q,successIcon:X,infoIcon:K,warningIcon:G,errorIcon:Y}=(0,p.TP)("alert"),q=B("alert",o),[J,U]=y(q),{onClose:Z,afterClose:ee}=(0,u.Qd)(E)?E:{},et=t=>{N(!0),(Z??e.onClose)?.(t)},en=r.useMemo(()=>void 0!==e.type?e.type:i?"warning":"info",[e.type,i]),er=e.variant??W??"outlined",eo=r.useMemo(()=>!!(0,u.Qd)(E)&&!!E.closeIcon||!!M||("boolean"==typeof E?E:!!(!1!==O&&(0,u.R)(O))||!!_),[M,O,E,_]),el=!!i&&void 0===z||z,ea={...e,prefixCls:q,variant:er,type:en,showIcon:el,closable:eo},ei=(0,h.XT)(T),ec=(0,h.XT)(v),[es,ed]=(0,h.AV)([D,I],[Q,ei,x,ec],{props:ea}),ef=(0,f.$)(q,`${q}-${en}`,`${q}-${er}`,{[`${q}-with-description`]:!!n,[`${q}-no-icon`]:!el,[`${q}-banner`]:!!i,[`${q}-rtl`]:"rtl"===S},P,c,m,es.root,U,J),eh=(0,d.KE)(L,{aria:!0,data:!0}),eu=r.useMemo(()=>(0,u.Qd)(E)&&E.closeIcon?E.closeIcon:M||(void 0!==O?O:(0,u.Qd)(_)&&_.closeIcon?_.closeIcon:F),[O,E,_,M,F]),ep=r.useMemo(()=>{let e=E??_;return(0,u.Qd)(e)?(0,d.KE)(e,{data:!0,aria:!0}):{}},[E,_]);return r.createElement(s.Ay,{visible:!C,motionName:`${q}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:ee??H},({className:t,style:o},l)=>r.createElement("div",{id:V,ref:(0,d.K4)(k,l),"data-show":!C,className:(0,f.$)(ef,t),style:{...ed.root,...o},onMouseEnter:g,onMouseLeave:b,onClick:$,role:"alert",...eh},el?r.createElement(w,{className:(0,f.$)(`${q}-icon`,es.icon),style:ed.icon,description:n,icon:e.icon,prefixCls:q,type:en,successIcon:X,infoIcon:K,warningIcon:G,errorIcon:Y}):null,r.createElement("div",{className:(0,f.$)(`${q}-section`,es.section),style:ed.section},R?r.createElement("div",{className:(0,f.$)(`${q}-title`,es.title),style:ed.title},R):null,n?r.createElement("div",{className:(0,f.$)(`${q}-description`,es.description),style:ed.description},n):null),j?r.createElement("div",{className:(0,f.$)(`${q}-actions`,es.actions),style:ed.actions},j):null,r.createElement(A,{className:es.close,style:ed.close,isClosable:eo,prefixCls:q,closeIcon:eu,handleClose:et,ariaProps:ep})))});var H=n(41113),z=n(49939),E=n(90218),M=n(13076),O=n(83784),j=n(15472);let V=function(e){function t(){var e,n,r;return(0,H.A)(this,t),n=t,r=arguments,n=(0,E.A)(n),(e=(0,O.A)(this,(0,M.A)()?Reflect.construct(n,r||[],(0,E.A)(this).constructor):n.apply(this,r))).state={error:void 0,info:{}},e}return(0,j.A)(t,e),(0,z.A)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,title:t,description:n,id:o,children:l}=this.props,{error:a,info:i}=this.state,c=t??e,s=i?.componentStack||null,d=(0,u.R)(c)?c:a?.toString(),f=(0,u.R)(n)?n:s;return a?r.createElement($,{id:o,type:"error",title:d,description:r.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},f)}):l}}])}(r.PureComponent);$.ErrorBoundary=V;let x=$},92123:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"}},95008:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"}},96091:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(53707),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},96651:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97109),o=n(92123),l=n(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let i=r.forwardRef((e,t)=>r.createElement(l.A,a({},e,{ref:t,icon:o.A})))},96724:(e,t)=>{t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"}},99729:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694],{520:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(18200),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},2256:(e,t,a)=>{a.d(t,{A:()=>r});let r=a(25341).A},5450:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"}},12887:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},13114:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(5450),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},18200:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"}},24810:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(31738),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},26631:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(12887),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},29071:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(78847),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},30960:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(95008),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},31738:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"}},32632:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(68552),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},38770:(e,t,a)=>{a.d(t,{A:()=>r});let r=a(51916).A},53234:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54849:(e,t,a)=>{a.d(t,{A:()=>y});var r=a(97109),n=a(42644),c=a(52690),l=a(3638),o=a(92162),s=a(26047),i=a(74567),f=a(88762);let v=e=>{let t,{value:a,formatter:n,precision:c,decimalSeparator:l,groupSeparator:o="",prefixCls:i,className:f,style:v}=e;if((0,s.Tn)(n))t=n(a);else{let e=String(a),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){let e=n[1],a=n[2]||"0",f=n[4]||"";a=a.replace(/\B(?=(\d{3})+(?!\d))/g,o),(0,s.Et)(c)&&(f=f.padEnd(c,"0").slice(0,c>0?c:0)),f&&(f=`${l}${f}`),t=[r.createElement("span",{key:"int",className:`${i}-content-value-int`},e,a),f&&r.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},f)]}else t=e}return r.createElement("span",{className:f,style:v},t)};var d=a(7961),u=a(10540),h=a(28403);let p=(0,u.OF)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:a,padding:r,colorTextDescription:n,titleFontSize:c,colorTextHeading:l,contentFontSize:o,fontFamily:s}=e;return{[t]:{...(0,d.dF)(e),[`${t}-header`]:{paddingBottom:a,[`${t}-title`]:{color:n,fontSize:c}},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:l,fontSize:o,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:a},[`${t}-content-suffix`]:{marginInlineStart:a}}}}})((0,h.oX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:a}=e;return{titleFontSize:a,contentFontSize:t}}),m=r.forwardRef((e,t)=>{let{prefixCls:a,className:c,rootClassName:d,style:u,valueStyle:h,value:m=0,title:g,valueRender:b,prefix:A,suffix:w,loading:y=!1,formatter:z,precision:O,decimalSeparator:E=".",groupSeparator:M=",",onMouseEnter:H,onMouseLeave:j,styles:$,classNames:x,...V}=e,{getPrefixCls:L,direction:N,className:S,style:R,classNames:B,styles:P}=(0,i.TP)("statistic"),k=L("statistic",a),[T,C]=p(k),I={...e,decimalSeparator:E,groupSeparator:M,loading:y,value:m},D=(0,o.XT)(R),_=(0,o.XT)(u),[F,X]=(0,o.AV)([B,x],[P,D,$,_],{props:I}),q=(0,l.$)(k,{[`${k}-rtl`]:"rtl"===N},S,c,d,F.root,T,C),K=(0,l.$)(`${k}-header`,F.header),Y=(0,l.$)(`${k}-title`,F.title),G=(0,l.$)(`${k}-content`,F.content),J=(0,l.$)(`${k}-content-value`,F.value),Q=(0,l.$)(`${k}-content-prefix`,F.prefix),U=(0,l.$)(`${k}-content-suffix`,F.suffix),W=r.createElement(v,{decimalSeparator:E,groupSeparator:M,prefixCls:k,formatter:z,precision:O,value:m,className:J,style:X.value}),Z=r.useRef(null);r.useImperativeHandle(t,()=>({nativeElement:Z.current}));let ee=(0,n.KE)(V,{aria:!0,data:!0});return r.createElement("div",{...ee,className:q,style:X.root,ref:Z,onMouseEnter:H,onMouseLeave:j},g&&r.createElement("div",{className:K,style:X.header},r.createElement("div",{className:Y,style:X.title},g)),r.createElement(f.A,{paragraph:!1,loading:y,className:`${k}-skeleton`,active:!0},r.createElement("div",{className:G,style:{...h,...X.content}},A&&r.createElement("span",{className:Q,style:X.prefix},A),(0,s.Tn)(b)?b(W):W,w&&r.createElement("span",{className:U,style:X.suffix},w))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],b=1e3/60,A=e=>{let{value:t,format:a="HH:mm:ss",onChange:l,onFinish:o,type:s,...i}=e,f="countdown"===s,[v,d]=r.useState(null),u=(0,n._q)(()=>{let e=Date.now(),a=new Date(t).getTime();d({});let r=f?a-e:e-a;return l?.(r),!f||!(a<e)||(o?.(),!1)});return r.useEffect(()=>{let e;return e=window.setInterval(()=>{u()||window.clearInterval(e)},b),()=>{window.clearInterval(e)}},[t,f]),r.useEffect(()=>{d({})},[]),r.createElement(m,{...i,value:t,valueRender:e=>(0,c.Ob)(e,{title:void 0}),formatter:(e,t)=>v?function(e,t,a){let{format:r=""}=t,n=new Date(e).getTime(),c=Date.now();return function(e,t){let a=e,r=/\[[^\]]*]/g,n=(t.match(r)||[]).map(e=>e.slice(1,-1)),c=t.replace(r,"[]"),l=g.reduce((e,[t,r])=>{if(e.includes(t)){let n=Math.floor(a/r);return a-=n*r,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return n.toString().padStart(t,"0")})}return e},c),o=0;return l.replace(r,()=>{let e=n[o];return o+=1,e})}(a?Math.max(n-c,0):Math.max(c-n,0),r)}(e,{...t,format:a},f):"-"})},w=r.memo(e=>r.createElement(A,{...e,type:"countdown"}));m.Timer=A,m.Countdown=w;let y=m},68552:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z"}}]},name:"layout",theme:"outlined"}},75710:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M843.5 737.4c-12.4-75.2-79.2-129.1-155.3-125.4S550.9 676 546 752c-153.5-4.8-208-40.7-199.1-113.7 3.3-27.3 19.8-41.9 50.1-49 18.4-4.3 38.8-4.9 57.3-3.2 1.7.2 3.5.3 5.2.5 11.3 2.7 22.8 5 34.3 6.8 34.1 5.6 68.8 8.4 101.8 6.6 92.8-5 156-45.9 159.2-132.7 3.1-84.1-54.7-143.7-147.9-183.6-29.9-12.8-61.6-22.7-93.3-30.2-14.3-3.4-26.3-5.7-35.2-7.2-7.9-75.9-71.5-133.8-147.8-134.4-76.3-.6-140.9 56.1-150.1 131.9s40 146.3 114.2 163.9c74.2 17.6 149.9-23.3 175.7-95.1 9.4 1.7 18.7 3.6 28 5.8 28.2 6.6 56.4 15.4 82.4 26.6 70.7 30.2 109.3 70.1 107.5 119.9-1.6 44.6-33.6 65.2-96.2 68.6-27.5 1.5-57.6-.9-87.3-5.8-8.3-1.4-15.9-2.8-22.6-4.3-3.9-.8-6.6-1.5-7.8-1.8l-3.1-.6c-2.2-.3-5.9-.8-10.7-1.3-25-2.3-52.1-1.5-78.5 4.6-55.2 12.9-93.9 47.2-101.1 105.8-15.7 126.2 78.6 184.7 276 188.9 29.1 70.4 106.4 107.9 179.6 87 73.3-20.9 119.3-93.4 106.9-168.6zM329.1 345.2a83.3 83.3 0 11.01-166.61 83.3 83.3 0 01-.01 166.61zM695.6 845a83.3 83.3 0 11.01-166.61A83.3 83.3 0 01695.6 845z"}}]},name:"node-index",theme:"outlined"}},78847:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"}},93314:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(53234),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},95008:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"}},95118:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(75710),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},99811:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(14995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[788],{1611:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"}},2256:(e,t,a)=>{a.d(t,{A:()=>n});let n=a(25341).A},8579:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"}},11100:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]},name:"scissor",theme:"outlined"}},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},21247:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"}}]},name:"merge-cells",theme:"outlined"}},23216:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(29664),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},23830:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},26619:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(1611),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},29606:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(23830),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},29664:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"}},35459:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(98995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},38770:(e,t,a)=>{a.d(t,{A:()=>n});let n=a(51916).A},49484:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(11100),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},53234:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54849:(e,t,a)=>{a.d(t,{A:()=>w});var n=a(97109),r=a(42644),c=a(52690),l=a(3638),s=a(92162),o=a(26047),i=a(74567),f=a(88762);let v=e=>{let t,{value:a,formatter:r,precision:c,decimalSeparator:l,groupSeparator:s="",prefixCls:i,className:f,style:v}=e;if((0,o.Tn)(r))t=r(a);else{let e=String(a),r=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(r&&"-"!==e){let e=r[1],a=r[2]||"0",f=r[4]||"";a=a.replace(/\B(?=(\d{3})+(?!\d))/g,s),(0,o.Et)(c)&&(f=f.padEnd(c,"0").slice(0,c>0?c:0)),f&&(f=`${l}${f}`),t=[n.createElement("span",{key:"int",className:`${i}-content-value-int`},e,a),f&&n.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},f)]}else t=e}return n.createElement("span",{className:f,style:v},t)};var h=a(7961),d=a(10540),u=a(28403);let m=(0,d.OF)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:a,padding:n,colorTextDescription:r,titleFontSize:c,colorTextHeading:l,contentFontSize:s,fontFamily:o}=e;return{[t]:{...(0,h.dF)(e),[`${t}-header`]:{paddingBottom:a,[`${t}-title`]:{color:r,fontSize:c}},[`${t}-skeleton`]:{paddingTop:n},[`${t}-content`]:{color:l,fontSize:s,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:a},[`${t}-content-suffix`]:{marginInlineStart:a}}}}})((0,u.oX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:a}=e;return{titleFontSize:a,contentFontSize:t}}),p=n.forwardRef((e,t)=>{let{prefixCls:a,className:c,rootClassName:h,style:d,valueStyle:u,value:p=0,title:g,valueRender:b,prefix:A,suffix:H,loading:w=!1,formatter:y,precision:O,decimalSeparator:z=".",groupSeparator:V=",",onMouseEnter:E,onMouseLeave:$,styles:j,classNames:x,...M}=e,{getPrefixCls:N,direction:R,className:S,style:k,classNames:B,styles:P}=(0,i.TP)("statistic"),T=N("statistic",a),[C,I]=m(T),L={...e,decimalSeparator:z,groupSeparator:V,loading:w,value:p},D=(0,s.XT)(k),_=(0,s.XT)(d),[F,X]=(0,s.AV)([B,x],[P,D,j,_],{props:L}),q=(0,l.$)(T,{[`${T}-rtl`]:"rtl"===R},S,c,h,F.root,C,I),K=(0,l.$)(`${T}-header`,F.header),Y=(0,l.$)(`${T}-title`,F.title),G=(0,l.$)(`${T}-content`,F.content),J=(0,l.$)(`${T}-content-value`,F.value),Q=(0,l.$)(`${T}-content-prefix`,F.prefix),U=(0,l.$)(`${T}-content-suffix`,F.suffix),W=n.createElement(v,{decimalSeparator:z,groupSeparator:V,prefixCls:T,formatter:y,precision:O,value:p,className:J,style:X.value}),Z=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:Z.current}));let ee=(0,r.KE)(M,{aria:!0,data:!0});return n.createElement("div",{...ee,className:q,style:X.root,ref:Z,onMouseEnter:E,onMouseLeave:$},g&&n.createElement("div",{className:K,style:X.header},n.createElement("div",{className:Y,style:X.title},g)),n.createElement(f.A,{paragraph:!1,loading:w,className:`${T}-skeleton`,active:!0},n.createElement("div",{className:G,style:{...u,...X.content}},A&&n.createElement("span",{className:Q,style:X.prefix},A),(0,o.Tn)(b)?b(W):W,H&&n.createElement("span",{className:U,style:X.suffix},H))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],b=1e3/60,A=e=>{let{value:t,format:a="HH:mm:ss",onChange:l,onFinish:s,type:o,...i}=e,f="countdown"===o,[v,h]=n.useState(null),d=(0,r._q)(()=>{let e=Date.now(),a=new Date(t).getTime();h({});let n=f?a-e:e-a;return l?.(n),!f||!(a<e)||(s?.(),!1)});return n.useEffect(()=>{let e;return e=window.setInterval(()=>{d()||window.clearInterval(e)},b),()=>{window.clearInterval(e)}},[t,f]),n.useEffect(()=>{h({})},[]),n.createElement(p,{...i,value:t,valueRender:e=>(0,c.Ob)(e,{title:void 0}),formatter:(e,t)=>v?function(e,t,a){let{format:n=""}=t,r=new Date(e).getTime(),c=Date.now();return function(e,t){let a=e,n=/\[[^\]]*]/g,r=(t.match(n)||[]).map(e=>e.slice(1,-1)),c=t.replace(n,"[]"),l=g.reduce((e,[t,n])=>{if(e.includes(t)){let r=Math.floor(a/n);return a-=r*n,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return r.toString().padStart(t,"0")})}return e},c),s=0;return l.replace(n,()=>{let e=r[s];return s+=1,e})}(a?Math.max(r-c,0):Math.max(c-r,0),n)}(e,{...t,format:a},f):"-"})},H=n.memo(e=>n.createElement(A,{...e,type:"countdown"}));p.Timer=A,p.Countdown=H;let w=p},56768:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(8579),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},63663:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(21247),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},93314:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(53234),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},98995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"}},99811:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(14995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[795],{27795:(e,l,s)=>{s.r(l),s.d(l,{default:()=>N});var t=s(65321),r=s(97109),i=s(79059),o=s(33442),n=s(85114),c=s(2256),a=s(38770),d=s(68787),x=s(99605),v=s(54849),u=s(11702),h=s(99811),m=s(520),j=s(93314),A=s(13114),y=s(29071),p=s(26631),g=s(84742),f=s(38762),k=s(30960),S=s(32632),w=s(95118),z=s(24810),T=s(6578);function N(){var e,l,s,N,b,C,P,D,M,O,F,I,B,E,_,W,U,L;let R=(0,i.Vr)(),[V,Z]=(0,r.useState)(null),[q,G]=(0,r.useState)(!0),[H,J]=(0,r.useState)(0),[K,Q]=(0,r.useState)(0),[X,Y]=(0,r.useState)(0),[$,ee]=(0,r.useState)(0),[el,es]=(0,r.useState)(null),et=(0,r.useCallback)(async()=>{G(!0);try{let[e,l,s,t,r]=await Promise.all([(0,T.FC)(),(0,T.Z3)().catch(()=>[]),(0,T.lv)().catch(()=>({roles:[],configs:[]})),(0,T.Dl)().catch(()=>({templates:[]})),(0,T.II)().catch(()=>null)]);Z(e),J(Array.isArray(l)?l.length:0);let i=Array.isArray(s.roles)?s.roles:[];Q(i.filter(e=>"file"===e.type).length),Y(i.filter(e=>"prompt"===e.type).length),ee(Array.isArray(t.templates)?t.templates.length:0),es(r)}catch(e){}finally{G(!1)}},[]);(0,r.useEffect)(()=>{et();let e=setInterval(()=>{et()},1e4);return()=>clearInterval(e)},[et]);let er=(null!=(l=null==V?void 0:V.cpu.usagePercent)?l:0)>80?"var(--colorDanger)":(null!=(s=null==V?void 0:V.cpu.usagePercent)?s:0)>50?"var(--colorWarning)":"var(--colorOk)",ei=(null!=(N=null==V?void 0:V.memory.usagePercent)?N:0)>80?"var(--colorDanger)":(null!=(b=null==V?void 0:V.memory.usagePercent)?b:0)>50?"var(--colorWarning)":"var(--colorOk)",eo=(null==V?void 0:V.tasks.total)?Math.round(V.tasks.success/V.tasks.total*100):0,en=null==V||null==(e=V.models)?void 0:e[0],ec=(null==V?void 0:V.logs.latestAt)?new Date(V.logs.latestAt).toLocaleString():"暂无日志";return(0,t.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"pageTitle",children:R("overview.title")}),(0,t.jsx)("p",{className:"pageDesc",children:R("overview.description")})]}),(0,t.jsxs)(o.A,{children:[(0,t.jsxs)("span",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["统计更新:",ec]}),(0,t.jsx)(n.Ay,{icon:(0,t.jsx)(h.A,{spin:q}),loading:q,onClick:()=>{et()},children:R("common.retry")})]})]}),(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.A,{})," CPU"]}),children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)(x.A,{type:"circle",percent:null!=(C=null==V?void 0:V.cpu.usagePercent)?C:0,size:120,strokeColor:er,format:e=>"".concat(null==e?void 0:e.toFixed(1),"%")}),(0,t.jsxs)("div",{className:"text-xs mt-2",style:{color:"var(--colorTextSecondary)"},children:[null!=(P=null==V?void 0:V.cpu.cores)?P:0," ",R("overview.cores")]})]})})}),(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.A,{})," ",R("overview.memory")]}),children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)(x.A,{type:"circle",percent:null!=(D=null==V?void 0:V.memory.usagePercent)?D:0,size:120,strokeColor:ei,format:e=>"".concat(e,"%")}),(0,t.jsxs)("div",{className:"text-xs mt-2",style:{color:"var(--colorTextSecondary)"},children:[null!=(M=null==V?void 0:V.memory.processMB)?M:0," MB / ",null!=(O=null==V?void 0:V.memory.totalMB)?O:0," MB"]})]})})})]}),(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsx)(d.A,{size:"small",children:(0,t.jsx)(v.A,{title:"运行时间",value:V?Math.floor(V.uptime/3600):0,suffix:"小时",prefix:(0,t.jsx)(A.A,{})})})}),(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsxs)(d.A,{size:"small",children:[(0,t.jsx)(v.A,{title:R("overview.tokensUsed"),value:null!=(F=null==V?void 0:V.tokens.total)?F:0,prefix:(0,t.jsx)(y.A,{})}),(0,t.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["Prompt ",null!=(I=null==V?void 0:V.tokens.prompt)?I:0," / Completion ",null!=(B=null==V?void 0:V.tokens.completion)?B:0]})]})}),(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsxs)(d.A,{size:"small",children:[(0,t.jsx)(v.A,{title:R("overview.tasksTotal"),value:null!=(E=null==V?void 0:V.tasks.total)?E:0,prefix:(0,t.jsx)(p.A,{})}),(0,t.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["成功 ",null!=(_=null==V?void 0:V.tasks.success)?_:0," / 失败 ",null!=(W=null==V?void 0:V.tasks.failed)?W:0," / 运行中 ",null!=(U=null==V?void 0:V.tasks.running)?U:0]})]})}),(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsx)(d.A,{size:"small",children:(0,t.jsx)(v.A,{title:R("overview.successRate"),value:eo,suffix:"%",prefix:eo>80?(0,t.jsx)(g.A,{style:{color:"var(--colorOk)"}}):(0,t.jsx)(f.A,{style:{color:"var(--colorDanger)"}})})})})]}),(0,t.jsx)(d.A,{size:"small",title:"资源概览",children:(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"文件角色",value:K,prefix:(0,t.jsx)(p.A,{style:{color:"var(--colorAccent)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"提示词角色",value:X,prefix:(0,t.jsx)(k.A,{style:{color:"var(--colorWarning)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"模板",value:$,prefix:(0,t.jsx)(S.A,{style:{color:"var(--colorDanger)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsxs)(d.A,{size:"small",style:{height:"100%",overflow:"hidden"},children:[(0,t.jsx)(v.A,{title:"语义模型",value:(null==el?void 0:el.provider)==="openai-compatible"?"外部 Embedding":el?"本地语义模型":"—",prefix:(0,t.jsx)(w.A,{style:{color:"var(--colorAccent)"}}),valueStyle:{fontSize:18,whiteSpace:"nowrap"}}),(null==el?void 0:el.model)&&(0,t.jsxs)("div",{className:"text-xs mt-1",style:{color:"var(--colorTextSecondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:"".concat(el.model).concat(el.dimensions?" \xb7 ".concat(el.dimensions,"维"):""),children:[el.model,el.dimensions?" \xb7 ".concat(el.dimensions,"维"):""]})]})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"模型供应商",value:H,prefix:(0,t.jsx)(z.A,{style:{color:"var(--colorAccent)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"审计日志",value:null!=(L=null==V?void 0:V.logs.events)?L:0,suffix:"条",prefix:(0,t.jsx)(A.A,{style:{color:"var(--colorOk)"}})})})})]})}),(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:R("overview.topModel"),style:{height:"100%"},children:en?(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(A.A,{style:{fontSize:24,color:"var(--colorAccent)"}}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-semibold",children:en.model}),(0,t.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["@",en.provider," — ",en.count," ",R("overview.calls")]})]})]}):(0,t.jsx)("span",{style:{color:"var(--colorTextSecondary)"},children:"暂无真实模型调用日志"})})}),(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:R("overview.taskTypes"),style:{height:"100%"},children:(null==V?void 0:V.tasks.types)&&Object.keys(V.tasks.types).length>0?(0,t.jsx)(o.A,{wrap:!0,children:Object.entries(V.tasks.types).sort((e,l)=>l[1]-e[1]).map(e=>{let[l,s]=e;return(0,t.jsxs)(u.A,{children:[l.slice(0,30),": ",s]},l)})}):(0,t.jsx)("span",{style:{color:"var(--colorTextSecondary)"},children:R("common.noData")})})})]})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[940],{2256:(e,t,i)=>{i.d(t,{A:()=>o});let o=i(25341).A},7851:(e,t,i)=>{i.d(t,{A:()=>a});var o=i(97109),r=i(12059),n=i(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}let a=o.forwardRef((e,t)=>o.createElement(n.A,l({},e,{ref:t,icon:r.A})))},9730:(e,t,i)=>{i.d(t,{A:()=>P});var o=i(97109),r=i(84190),n=i(45042),l=i(99981),a=i(3638),c=i(92162),s=i(26047),m=i(38862),d=i(35622),p=i(74567),$=i(27273),h=i(59609),u=i(10540),g=i(14932),b=i(17564);let v=e=>{let{prefixCls:t}=e;return o.createElement("svg",{className:`${t}-panel-arrow`,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none"},o.createElement("title",null,"Arrow"),o.createElement("path",{d:"M 0 0 L 100 50 L 0 100"}))},f=e=>{let{prefixCls:t,rootPrefixCls:i,children:r,percent:n}=e,l=`${t}-item-progress-icon`,c=`${l}-circle`,[,s]=(0,u.PN)(i,"cmp-steps"),m=`calc(${s("progress-radius")} * 2 * ${Math.PI*n/100}) 9999`;return o.createElement(o.Fragment,null,o.createElement("svg",{className:`${l}-svg`,viewBox:"0 0 100 100",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":n},o.createElement("title",null,"Progress"),o.createElement("circle",{className:(0,a.$)(c,`${c}-rail`)}),o.createElement("circle",{className:(0,a.$)(c,`${c}-ptg`),strokeDasharray:m,transform:"rotate(-90 50 50)"})),r)};var x=i(7961),z=i(28403);let w=(e,t,i)=>{let{calc:o,componentCls:r,descriptionMaxWidth:n,antCls:l}=e,a=`${r}-item`,[,c]=(0,u.PN)(l,"cmp-steps");return{[`@container style(${(n||"--ant-not-exist").replace(/var\((.*)\)/,"$1")})`]:[{[`${a}-icon`]:{marginInlineStart:o(n).sub(c("icon-size")).div(2).equal()},[`${a}-rail`]:{width:"auto",insetInlineStart:o(n).add(c("icon-size")).div(2).add(t).equal(),insetInlineEnd:o(n).sub(c("icon-size")).div(2).sub(t).mul(-1).equal()}},i]}};var y=i(15561);let S="wait",I="process",k="finish",A="error",E=(0,u.OF)("Steps",e=>{let t=(0,z.oX)(e,{inlineDotSize:6});return[(e=>{let{componentCls:t,antCls:i}=e,o=`${t}-item`,[r,n]=(0,u.PN)(i,"cmp-steps");return{[t]:{[r("title-font-size")]:e.fontSizeLG,[r("title-line-height")]:e.lineHeightLG,[r("subtitle-font-size")]:e.fontSize,[r("subtitle-line-height")]:e.lineHeight,[r("item-wrapper-padding-top")]:"0px",[r("rail-size")]:e.lineWidth,[r("rail-line-style")]:e.lineType,...(0,x.dF)(e),display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[o]:{flex:"none",position:"relative"},[`${o}-wrapper`]:{display:"flex",flexWrap:"nowrap",paddingTop:n("item-wrapper-padding-top")},[`${o}-header`]:{display:"flex",flexWrap:"nowrap",alignItems:"center"},[`${o}-title`]:{color:e.colorText,fontSize:n("title-font-size"),lineHeight:n("title-line-height"),wordBreak:"break-word"},[`${o}-subtitle`]:{color:e.colorTextDescription,fontWeight:"normal",fontSize:n("subtitle-font-size"),lineHeight:n("subtitle-line-height"),marginInlineStart:e.marginXS,wordBreak:"break-word"},[`${o}-content`]:{color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word"},[`${o}-rail`]:{borderStyle:n("rail-line-style"),borderWidth:0},[`${o}-title, ${o}-subtitle, ${o}-content, ${o}-rail`]:{transition:`all ${e.motionDurationSlow}`},[`&${t}-ellipsis`]:{[`${o}-title, ${o}-subtitle, ${o}-content`]:x.L9},[`${o}[role='button']:not(${o}-active):hover`]:{cursor:"pointer"}}}})(t),(e=>{let{componentCls:t,customIconFontSize:i,motionDurationSlow:o,iconSize:r,lineWidth:n,lineType:l,antCls:a}=e,c=`${t}-item`,[s,m]=(0,u.PN)(a,"cmp-steps");return{[t]:{[s("icon-size")]:r,[s("icon-border-width")]:n,[`${c}-icon`]:{width:m("icon-size"),height:m("icon-size"),margin:0,flex:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:m("icon-size"),textAlign:"center",borderRadius:m("icon-size"),border:`${m("icon-border-width")} ${l} transparent`,transition:["background-color","border","color","inset","transform"].map(e=>`${e} ${o}`).join(", "),zIndex:1},[`${c}-custom ${c}-icon`]:{background:"none",border:0,fontSize:i}}}})(t),(e=>{let{componentCls:t,marginXXS:i,paddingSM:o,controlHeight:r,antCls:n,calc:l}=e,a=`${t}-item`,[c,s]=(0,u.PN)(n,"cmp-steps");return{[`${t}-vertical`]:{[c("vertical-rail-margin")]:l(i).mul(1.5).equal(),flexDirection:"column",alignItems:"stretch",[`> ${a}`]:{minHeight:l(r).mul(1.5).equal(),paddingBottom:o,"&:last-child":{paddingBottom:0},[`${a}-icon`]:{marginInlineStart:`calc((${s("icon-size-max")} - ${s("icon-size")}) / 2)`},[`${a}-rail`]:{[c("rail-offset")]:l(s("heading-height")).sub(s("icon-size")).div(2).equal(),borderInlineStartWidth:s("rail-size"),position:"absolute",top:l(s("icon-size")).add(s("item-wrapper-padding-top")).add(s("rail-offset")).add(s("vertical-rail-margin")).equal(),insetInlineStart:l(s("icon-size-max")).div(2).equal(),bottom:l(s("vertical-rail-margin")).sub(s("rail-offset")).equal(),marginInlineStart:`calc(${s("rail-size")} / -2)`}}}}})(t),(e=>{let{componentCls:t,antCls:i}=e,o=`${t}-item`,[r,n]=(0,u.PN)(i,"cmp-steps");return{[`${t}-horizontal`]:{[`> ${o}`]:{flex:"1 1 auto",minWidth:e.iconSize,[`${o}-rail`]:{[r("horizontal-rail-margin")]:`calc(${n("icon-size-max")} / 2 - ${n("rail-size")} / 2 + ${n("item-wrapper-padding-top")})`,position:"static",marginTop:n("horizontal-rail-margin"),width:"auto",borderBlockStartWidth:n("rail-size"),flex:1,minWidth:0,alignSelf:"flex-start"}}}}})(t),(e=>{let{componentCls:t,descriptionMaxWidth:i,marginXS:o,fontHeightLG:r,margin:n,paddingSM:l,marginXXS:a,antCls:c,calc:s}=e,m=`${t}-item`,[d,p]=(0,u.PN)(c,"cmp-steps");return{[t]:{[d("icon-size-max")]:`max(${p("icon-size")}, ${p("icon-size-active",p("icon-size"))})`,[`${m}-icon`]:{marginBlockStart:`calc((${p("heading-height")} - ${p("icon-size")}) / 2)`}},[`${t}-title-horizontal`]:{[d("title-horizontal-item-margin")]:n,[d("title-horizontal-rail-margin")]:n,[d("title-horizontal-title-height")]:r,[d("heading-height")]:`max(${p("icon-size")}, ${p("title-horizontal-title-height")})`,[`&${t}-horizontal, &${t}-horizontal-alternate`]:{[`${m}:not(:first-child)`]:{marginInlineStart:p("title-horizontal-item-margin")},[`${m}:last-child`]:{flex:"0 1 auto"},[`${m}-wrapper`]:{columnGap:e.marginXS}},[`&${t}-vertical`]:{[`${m}-wrapper`]:{columnGap:e.margin},[`${m}-empty-header`]:{[`${m}-header`]:{minHeight:"auto"},[`${m}-content`]:{marginTop:s(p("heading-height")).sub(e.fontHeight).div(2).equal()}}},[`${m}-section`]:{flex:1,minWidth:0},[`${m}-header`]:{minHeight:p("heading-height")},[`${m}-title`]:{flex:"0 1 auto"},[`${m}-content`]:{maxWidth:i},[`${m}-subtitle`]:{flex:"0 9999 auto"},[`&${t}-horizontal ${m}-rail`]:{[d("item-wrapper-padding-top")]:"0px",flex:"1 1 0%",marginInlineStart:p("title-horizontal-rail-margin")}},[`${t}-title-vertical`]:{[d("title-vertical-row-gap")]:l,[d("title-horizontal-rail-gap")]:a,[d("heading-height")]:p("icon-size-max"),[`> ${m}`]:{flex:"1 1 0%",[`${m}-wrapper`]:{flexDirection:"column",rowGap:p("title-vertical-row-gap"),alignItems:"center"},[`${m}-section`]:{alignSelf:"stretch"},[`${m}-header`]:{flexDirection:"column",alignItems:"center"},[`${m}-title, ${m}-subtitle, ${m}-content`]:{textAlign:"center",maxWidth:"100%"},[`${m}-subtitle`]:{margin:0},[`${m}-rail`]:{position:"absolute",top:0,width:`calc(100% - ${p("icon-size")} - ${p("title-horizontal-rail-gap")} * 2)`,insetInlineStart:`calc(50% + ${p("icon-size")} / 2 + ${p("title-horizontal-rail-gap")})`}},...w(e,o,{[`${m}:last-child`]:{flex:"none"},[`${m}-icon`]:{alignSelf:"flex-start"},[`${m}-section`]:{width:i}})}}})(t),(e=>{let{componentCls:t,iconSizeSM:i,fontSize:o,lineHeight:r,marginXS:n,fontHeight:l,marginSM:a,paddingXS:c,antCls:s}=e,[m]=(0,u.PN)(s,"cmp-steps");return{[`${t}${t}-small`]:{[m("icon-size")]:i,[m("title-horizontal-item-margin")]:a,[m("title-vertical-row-gap")]:c,[m("title-font-size")]:o,[m("title-line-height")]:r,[m("title-horizontal-rail-margin")]:n,[m("title-horizontal-title-height")]:l,[`&${t}-horizontal${t}-title-vertical`]:w(e,n)}}})(t),(e=>{let{componentCls:t,iconSize:i,dotSize:o,dotCurrentSize:r,marginXXS:n,lineWidthBold:l,fontSizeSM:a,antCls:c}=e,s=`${t}-item`,[m,d]=(0,u.PN)(c,"cmp-steps");return{[`${t}${t}-dot`]:{[m("icon-size-active")]:r,[m("icon-size")]:o,[m("dot-icon-size")]:o,[m("dot-icon-border-width")]:l,[m("rail-size")]:l,[m("icon-border-width")]:l,[`${s}-custom ${s}-icon`]:{fontSize:a},[`${s}-icon`]:{position:"relative","&:after":{content:'""',width:i,height:i,display:"block",position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"}},[`${s}-active ${s}-icon`]:{[m("icon-size")]:d("icon-size-active")},[`&${t}-horizontal`]:{[`&, &${t}-small`]:w(e,n)}}}})(t),(e=>{let{componentCls:t,colorTextDisabled:i,colorTextLightSolid:o,colorPrimary:r,colorTextLabel:n,colorError:l,colorErrorHover:a,colorErrorBgFilledHover:c,colorFillTertiary:s,colorErrorBg:m,colorPrimaryBgHover:d,colorPrimaryBg:p,colorText:$,colorTextDescription:h,colorBgContainer:g,colorPrimaryHover:b,lineType:v,antCls:f}=e,x=`${t}-item`,[z,w]=(0,u.PN)(f,"cmp-steps");return{[t]:[{[x]:{[z("item-solid-line-color")]:"#000",[z("item-title-color")]:"#000",[z("item-content-color")]:"#000",[z("item-subtitle-color")]:w("item-content-color"),[z("item-icon-custom-color")]:"#000",[z("item-icon-bg-color")]:"#000",[z("item-icon-border-color")]:"#000",[z("item-icon-text-color")]:"#fff",[z("item-icon-dot-color")]:"#000",[z("item-icon-dot-bg-color")]:w("item-icon-dot-color"),[z("item-icon-dot-border-color")]:w("item-icon-dot-color"),[z("item-text-hover-color")]:"#000",[z("item-icon-bg-hover-color")]:w("item-icon-bg-color"),[z("item-icon-border-hover-color")]:w("item-icon-border-color"),[z("item-icon-text-hover-color")]:w("item-icon-text-color"),[z("item-content-active-color")]:w("item-content-color"),[z("item-icon-active-bg-color")]:w("item-icon-bg-color"),[z("item-icon-active-border-color")]:w("item-icon-border-color"),[z("item-icon-active-text-color")]:w("item-icon-text-color"),[z("item-process-rail-line-style")]:v},[`${x}-rail`]:{borderColor:w("item-solid-line-color")},[`${x}-custom ${x}-icon`]:{color:w("item-icon-custom-color")},[`${x}-title`]:{color:w("item-title-color")},[`${x}-subtitle`]:{color:w("item-subtitle-color")},[`${x}-content`]:{color:w("item-content-color")},[`${x}-active ${x}-icon`]:{},[`${x}-active ${x}-content`]:{color:w("item-content-active-color")},[`${x}[role='button']:not(${x}-active):hover`]:{[`${x}-title, ${x}-content`]:{color:w("item-text-hover-color")}},[`&:not(${t}-dot)`]:{[`${x}:not(${x}-custom)`]:{[`${x}-icon`]:{background:w("item-icon-bg-color"),borderColor:w("item-icon-border-color"),color:w("item-icon-text-color")},[`&[role='button']:not(${x}-active):hover`]:{[`${x}-icon`]:{background:w("item-icon-bg-hover-color"),borderColor:w("item-icon-border-hover-color"),color:w("item-icon-text-hover-color")}},[`&${x}-active`]:{[`${x}-icon`]:{background:w("item-icon-active-bg-color"),borderColor:w("item-icon-active-border-color"),color:w("item-icon-active-text-color")}}}},[`&${t}-dot`]:{[`${x}-icon`]:{background:w("item-icon-dot-bg-color"),borderColor:w("item-icon-dot-border-color"),color:w("item-icon-dot-color"),[`&${x}-icon-dot-custom`]:{background:"transparent",border:"none"}}}},{[`${x}-${S}`]:{[z("item-icon-custom-color")]:i,[z("item-title-color")]:h,[z("item-content-color")]:h,[z("item-content-active-color")]:$,[z("item-text-hover-color")]:b},[`${x}-rail-${S}`]:{[z("item-solid-line-color")]:i},[`${x}-${I}`]:{[z("item-icon-custom-color")]:r,[z("item-title-color")]:$,[z("item-content-color")]:h,[z("item-content-active-color")]:$,[z("item-text-hover-color")]:b},[`${x}-rail-${I}`]:{[z("item-solid-line-color")]:r,[z("rail-line-style")]:w("item-process-rail-line-style")},[`${x}-${k}`]:{[z("item-icon-custom-color")]:r,[z("item-title-color")]:$,[z("item-content-color")]:h,[z("item-content-active-color")]:$,[z("item-text-hover-color")]:b},[`${x}-rail-${k}`]:{[z("item-solid-line-color")]:r},[`${x}-${A}`]:{[z("item-icon-custom-color")]:l,[z("item-title-color")]:l,[z("item-content-color")]:l,[z("item-content-active-color")]:l,[z("item-text-hover-color")]:a},[`${x}-rail-${A}`]:{[z("item-solid-line-color")]:l}},{[`&${t}-filled`]:{[x]:{[z("item-icon-dot-border-color")]:"transparent"},[`${x}-${S}`]:{[z("item-icon-bg-color")]:s,[z("item-icon-border-color")]:"transparent",[z("item-icon-text-color")]:n,[z("item-icon-dot-bg-color")]:i,[z("item-icon-bg-hover-color")]:d,[z("item-icon-border-hover-color")]:"transparent",[z("item-icon-text-hover-color")]:r,[z("item-icon-active-bg-color")]:r,[z("item-icon-active-border-color")]:"transparent",[z("item-icon-active-text-color")]:o},[`${x}-${I}, ${x}-${k}`]:{[z("item-icon-bg-color")]:p,[z("item-icon-border-color")]:"transparent",[z("item-icon-text-color")]:r,[z("item-icon-dot-bg-color")]:r,[z("item-icon-bg-hover-color")]:d,[z("item-icon-border-hover-color")]:"transparent",[z("item-icon-text-hover-color")]:r,[z("item-icon-active-bg-color")]:r,[z("item-icon-active-border-color")]:"transparent",[z("item-icon-active-text-color")]:o},[`${x}-${A}`]:{[z("item-icon-bg-color")]:m,[z("item-icon-border-color")]:"transparent",[z("item-icon-text-color")]:l,[z("item-icon-dot-bg-color")]:l,[z("item-icon-bg-hover-color")]:c,[z("item-icon-border-hover-color")]:"transparent",[z("item-icon-text-hover-color")]:l,[z("item-icon-active-bg-color")]:l,[z("item-icon-active-border-color")]:"transparent",[z("item-icon-active-text-color")]:o}}},{[`&${t}-outlined`]:{[x]:{[z("item-icon-dot-bg-color")]:"transparent"},[`${x}-${S}`]:{[z("item-icon-bg-color")]:g,[z("item-icon-border-color")]:i,[z("item-icon-text-color")]:i,[z("item-icon-dot-color")]:i,[z("item-icon-bg-hover-color")]:"transparent",[z("item-icon-border-hover-color")]:b,[z("item-icon-text-hover-color")]:b,[z("item-icon-active-bg-color")]:s},[`${x}-${I}, ${x}-${k}`]:{[z("item-icon-bg-color")]:g,[z("item-icon-border-color")]:r,[z("item-icon-text-color")]:r,[z("item-icon-dot-color")]:r,[z("item-icon-bg-hover-color")]:"transparent",[z("item-icon-border-hover-color")]:b,[z("item-icon-text-hover-color")]:b,[z("item-icon-active-bg-color")]:p},[`${x}-${A}`]:{[z("item-icon-bg-color")]:g,[z("item-icon-border-color")]:l,[z("item-icon-text-color")]:l,[z("item-icon-dot-color")]:l,[z("item-icon-bg-hover-color")]:"transparent",[z("item-icon-border-hover-color")]:a,[z("item-icon-text-hover-color")]:a,[z("item-icon-active-bg-color")]:m}}}]}})(t),(e=>{let{componentCls:t,fontSizeIcon:i,navContentMaxWidth:o,navArrowColor:r,colorPrimary:n,motionDurationSlow:l,antCls:a,calc:c}=e,s=`${t}-item`,[m,d]=(0,u.PN)(a,"cmp-steps");return{[`${t}${t}-navigation`]:{[s.repeat(4)]:{display:"flex",justifyContent:"center",position:"relative",flex:1,marginInlineStart:0,[`${s}-wrapper`]:{paddingBlock:e.paddingSM},[`${s}-section`]:{maxWidth:o},[`${s}-rail`]:{display:"none"},"&:before":{position:"absolute",display:"block",backgroundColor:n,transition:`all ${l}`,transitionTimingFunction:"ease-out",content:'""'},"&:not(:last-child):after":{position:"absolute",display:"block",borderTop:`${(0,y.zA)(e.lineWidth)} ${e.lineType} ${r}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,y.zA)(e.lineWidth)} ${e.lineType} ${r}`,content:'""'},[`&${s}-active`]:{[m("item-content-active-color")]:d("item-content-color"),[m("item-icon-active-bg-color")]:d("item-icon-bg-color"),[m("item-icon-active-border-color")]:d("item-icon-border-color"),[m("item-icon-active-text-color")]:d("item-icon-text-color")}},[`&${t}-horizontal`]:{[s]:{"&:before":{bottom:0,insetInlineStart:"50%",width:0,height:e.lineWidthBold},[`&${s}-active:before`]:{insetInlineStart:0,width:"100%"},"&:not(:last-child):after":{top:"50%",insetInlineStart:c(i).div(2).mul(-1).add("100%").equal(),width:i,height:i,transform:"translateY(-50%) rotate(45deg)"}}},[`&${t}-vertical`]:{[s.repeat(4)]:{[`${s}-content`]:{padding:0},"&:before":{insetInlineEnd:0,top:"50%",width:e.lineWidthBold,height:0},[`&${s}-active::before`]:{top:0,height:"100%"},"&:not(:last-child):after":{left:{_skip_check_:!0,value:"50%"},top:"100%",width:c(i).div(3).mul(2).equal(),height:c(i).div(3).mul(2).equal(),transform:"translateY(-50%) translateX(-50%) rotate(135deg)"}}}}}})(t),(e=>{let{componentCls:t,lineWidthBold:i,borderRadius:o,borderRadiusSM:r,motionDurationMid:n,paddingXS:l,lineType:a,paddingSM:c,antCls:s,calc:m}=e,d=`${t}-item`,[p,$]=(0,u.PN)(s,"cmp-steps"),h=`${(0,y.zA)(i)} ${a} ${$("panel-border-color")}`;return{[`${t}${t}-panel`]:[{[`${d}-rail`]:{display:"none"},[`&${t}-horizontal`]:{alignItems:"stretch",[d]:{flex:1,margin:0}}},{"&":{[p("panel-padding")]:c,[p("item-border-radius")]:o,[d]:{[p("panel-bg-color")]:$("item-icon-bg-color"),[p("panel-border-color")]:$("item-icon-border-color"),[p("panel-active-bg-color")]:$("item-icon-active-bg-color"),[p("panel-active-border-color")]:$("item-icon-active-border-color"),[p("panel-title-height")]:`calc(${$("title-font-size")} * ${$("title-line-height")})`,[p("item-base-height")]:m($("panel-padding")).mul(2).add($("icon-size")).add($("panel-title-height")).equal(),[p("item-base-width")]:`calc(${$("item-base-height")} * 0.7071)`,transition:`background-color ${n}`}},[`${d}-icon`]:{display:"none"},[`${d}-header`]:{minHeight:"auto"},[`${t}-panel-arrow`]:{position:"absolute",top:m(i).mul(-1).equal(),insetInlineStart:"100%",zIndex:1,height:m(i).mul(2).add("100%").equal(),width:$("item-base-width"),overflow:"visible",strokeLinecap:"round",path:{fill:$("panel-bg-color"),stroke:$("panel-border-color"),strokeWidth:i,vectorEffect:"non-scaling-stroke",transition:`fill ${n}`}},[`${d}:last-child ${t}-panel-arrow`]:{display:"none"},[d]:{padding:$("panel-padding"),background:$("panel-bg-color"),position:"relative",borderBlock:h,"&:not(:first-child)":{paddingInlineStart:`calc(${$("panel-padding")} + ${$("item-base-width")})`},"&:first-child":{borderInlineStart:h,borderStartStartRadius:$("item-border-radius"),borderEndStartRadius:$("item-border-radius")},"&:last-child":{borderInlineEnd:h,borderStartEndRadius:$("item-border-radius"),borderEndEndRadius:$("item-border-radius")},"&-active":{background:$("panel-active-bg-color"),borderColor:$("panel-active-border-color"),[`${t}-panel-arrow`]:{path:{fill:$("panel-active-bg-color"),stroke:$("panel-active-border-color")}},[`${d}-title, ${d}-subtitle, ${d}-content`]:{color:$("item-icon-active-text-color")}}}},{[`&${t}-small`]:{[p("panel-padding")]:l,[p("item-border-radius")]:r}},{[`&${t}-filled`]:{[d]:{"&:not(:first-child)":{clipPath:`polygon(${(0,y.zA)(i)} 0,calc(100% + ${$("item-base-width")}) 0,calc(100% + ${$("item-base-width")}) 100%,${(0,y.zA)(i)} 100%,calc(${$("item-base-width")} + ${(0,y.zA)(i)}) 50%)`}}}},{[`&${t}-outlined`]:{[`${t}-panel-arrow`]:{top:m(i).div(2).mul(-1).equal(),height:m(i).add("100%").equal()}}}]}})(t),(e=>{let{componentCls:t,inlineDotSize:i,paddingXS:o,lineWidth:r,antCls:n,calc:l}=e,a=l(o).add(r).equal(),c=`${t}-item`,[s,m]=(0,u.PN)(n,"cmp-steps");return{[`${t}-inline`]:{[s("items-offset")]:"0",[s("item-wrapper-padding-top")]:a,display:"inline-flex","&:before":{content:'""',flex:m("items-offset")},[c]:{[s("title-vertical-row-gap")]:o,[s("icon-size")]:i,[s("icon-size-active")]:i,[s("title-font-size")]:e.fontSizeSM,[s("title-line-height")]:e.lineHeightSM,[s("item-title-color")]:e.colorTextSecondary,[s("subtitle-font-size")]:e.fontSizeSM,[s("subtitle-line-height")]:e.lineHeightSM,[s("item-subtitle-color")]:e.colorTextQuaternary,[s("rail-size")]:e.lineWidth,[s("title-horizontal-rail-gap")]:"0px",flex:1,"&-wrapper":{paddingInline:e.paddingXXS,marginInline:e.calc(e.marginXXS).div(2).equal(),borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover}},"&-icon":{[`${c}-icon-dot`]:{"&:after":{display:"none"}}},"&-title":{fontWeight:"normal",whiteSpace:"nowrap"},"&-content":{display:"none"}}}}})(t),(e=>{let{componentCls:t}=e,i=`${t}-item`;return{[`${t}-max-count`]:{[`${i}-ellipsis`]:{[`${i}-title, ${i}-subtitle, ${i}-content`]:{color:e.colorTextDescription}}}}})(t),(e=>{let{calc:t,antCls:i,componentCls:o,lineWidthBold:r,motionDurationSlow:n}=e,l=`${o}-item`,[a,c]=(0,u.PN)(i,"cmp-steps"),s=t(r).add(r).equal();return{[`${o}${o}-with-progress`]:{[a("item-wrapper-padding-top")]:s,[`${l}${l}-process`]:{[`${l}-icon`]:{position:"relative"}},[`${l}-progress-icon`]:{"&-svg":{[a("svg-size")]:t(s).mul(2).add(c("icon-size")).equal(),[a("icon-size-ptg-unitless")]:`calc(100 / tan(atan2(${c("svg-size")}, 1px)))`,fontSize:c("svg-size"),lineHeight:c("icon-size-ptg-unitless"),position:"absolute",inset:t(s).mul(-1).equal(),width:"auto",height:"auto"},"&-circle":{lineHeight:c("icon-size-ptg-unitless"),strokeWidth:t(c("icon-size-ptg-unitless")).mul(r).equal(),[a("progress-radius")]:t(c("svg-size")).sub(r).mul(c("icon-size-ptg-unitless")).div(2).equal(),r:c("progress-radius"),fill:"none",cx:50,cy:50,transition:`all ${n} ease-in-out`,"&-rail":{stroke:e.colorSplit},"&-ptg":{stroke:e.colorPrimary}}}}}})(t),(e=>{let{componentCls:t,lineWidthBold:i,antCls:o}=e,r=`${t}-item`,[,n]=(0,u.PN)(o,"cmp-steps");return{[`${t}${t}-rtl`]:{direction:"rtl",[`&${t}-navigation${t}-horizontal`]:{[`${r}:after`]:{transform:"translateY(-50%) rotate(-45deg)"}},[`&${t}-panel`]:{[`${t}-panel-arrow`]:{transform:"scaleX(-1)"},[`&${t}-filled`]:{[r]:{"&:not(:first-child)":{clipPath:`polygon(calc(0px - ${n("item-base-width")}) 0px,calc(100% - ${(0,y.zA)(i)}) 0px,calc(100% - ${n("item-base-width")} - ${(0,y.zA)(i)}) 50%,calc(100% - ${(0,y.zA)(i)}) 100%,calc(0px - ${n("item-base-width")}) 100%)`}}}}}}})(t)]},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:void 0,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}));var C=i(20241);let N={itemIcon:d.D},P=e=>{let t,i,{size:d,className:x,rootClassName:z,style:w,variant:y="filled",type:S,classNames:I,styles:k,direction:A,orientation:P,responsive:M=!0,progressDot:H,labelPlacement:B,titlePlacement:W,ellipsis:O,maxCount:T,offset:q=0,items:j,percent:R,current:L=0,initial:D=0,onChange:F,iconRender:_,...X}=e,G=o.useContext(b.j),V=(0,p.TP)("steps"),{getPrefixCls:Y,direction:Q,className:K,style:J}=V,U={};G?U={root:G.rootComponent,item:G.itemComponent}:{classNames:t,styles:i}=V;let Z=Y(),ee=Y("steps",e.prefixCls),et=`${ee}-item-icon`,[ei,eo]=E(ee),[er]=(0,u.PN)(Z,"cmp-steps"),en=(0,$.A)(d),el=o.useMemo(()=>(j||[]).filter(Boolean),[j]),{xs:ea}=(0,h.A)(M),ec=o.useMemo(()=>S&&"default"!==S?S:H?"dot":S,[H,S]),es="inline"===ec,em="dot"===ec||"inline"===ec,ed=o.useMemo(()=>"dot"===ec&&(0,s.Tn)(H)?H:void 0,[ec,H]),ep=o.useMemo(()=>{let e=P||A;return"panel"===ec?"horizontal":M&&ea||"vertical"===e?"vertical":"horizontal"},[P,A,ec,M,ea]),e$=o.useMemo(()=>em||"vertical"===ep?"vertical"===ep?"horizontal":"vertical":"navigation"===S?"horizontal":W||B||"horizontal",[em,B,ep,W,S]),eh=es?void 0:R,{canApplyMaxCount:eu,displaySteps:eg,mappedDisplayCurrent:eb,displayItems:ev}=function(e,t,i,r,n){let l=void 0!==r&&r>=3&&e.length>r,a=t-i,c=o.useMemo(()=>{if(!l)return e.map((e,t)=>({item:e,originIndex:t}));let t=function(e,t,i){let o=Math.min(Math.max(t,0),e-1),r=Math.min(i,e),n=new Set([0,o,e-1]);for(let t=1;n.size<r&&t<e;t+=1)for(let i of[o-t,o+t,t,e-1-t]){if(n.size>=r)break;i>=0&&i<e&&n.add(i)}return Array.from(n).sort((e,t)=>e-t).flatMap((e,t,i)=>t>0&&e-i[t-1]>1?[null,e]:[e])}(e.length,a,r);return t.map((i,r)=>{var l;return null===i?function(e,t,i,r,n){let l=e[i].key??i,a=e[r].key??r,c=e.slice(i+1,r).some(e=>"error"===e.status)?"error":r-1<t?"finish":"wait";return{item:{key:`ellipsis-${l}-${a}`,title:"",icon:o.createElement(C.A),status:c,disabled:!0,className:`${n}-item-ellipsis`},originIndex:-1}}(e,a,t[r-1],t[r+1],n):(l=e[i],{item:{...l,key:l.key??i},originIndex:i})})},[l,a,e,r,n]),s=c.findIndex(e=>e.originIndex===a);return{canApplyMaxCount:l,displaySteps:c,mappedDisplayCurrent:s>=0?s:a,displayItems:c.map(e=>e.item)}}(el,L,D,T,ee),ef={...e,variant:y,size:en,type:ec,orientation:ep,titlePlacement:e$,current:L,initial:D,percent:eh,responsive:M,offset:q,ellipsis:O,maxCount:T},[ex,ez]=(0,c.AV)([N,t,I],[i,k],{props:ef}),ew="panel"===ec?e=>o.createElement(o.Fragment,null,e,o.createElement(v,{prefixCls:ee})):void 0,ey={[er("items-offset")]:`${q}`,...J,...w},eS=(0,a.$)(K,`${ee}-${y}`,{[`${ee}-${ec}`]:"dot"!==ec&&ec,[`${ee}-rtl`]:"rtl"===Q,[`${ee}-dot`]:em,[`${ee}-ellipsis`]:O,[`${ee}-max-count`]:eu,[`${ee}-with-progress`]:void 0!==eh,[`${ee}-small`]:"small"===en},x,z,ei,eo);return o.createElement(l.Ay,{...X,prefixCls:ee,className:eS,style:ey,classNames:ex,styles:ez,orientation:ep,titlePlacement:e$,components:U,initial:0,current:eb,items:ev,onChange:F?e=>{let t=eg[e];F&&t&&t.originIndex>=0&&F(D+t.originIndex)}:void 0,iconRender:(e,t)=>{let{item:i,index:l,active:a,components:{Icon:c}}=t,m=eg[l]?.originIndex,d=void 0!==m&&m>=0?D+m:l,{status:p,icon:$}=i,h=null;if(em||$)h=$;else switch(p){case"finish":h=o.createElement(r.A,{className:`${et}-finish`});break;case"error":h=o.createElement(n.A,{className:`${et}-error`});break;default:{let e=o.createElement("span",{className:`${et}-number`},d+1);"process"===p&&void 0!==eh&&(e=o.createElement(f,{prefixCls:ee,rootPrefixCls:Z,percent:eh},e)),h=e}}let u=o.createElement(c,null,h);return _?u=_(u,{index:d,active:a,item:i,components:{Icon:c}}):(0,s.Tn)(ed)&&(u=ed(u,{index:d,...i})),u},itemRender:(e,t)=>{let i=e;return es&&t.item.content&&(i=o.createElement(g.A,{destroyOnHidden:!0,title:t.item.content},e)),o.createElement(m.A,{component:"Steps",disabled:t.item.disabled||!F,colorSource:"filled"===y?"color":null},i)},itemWrapperRender:ew})}},12059:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"}},17564:(e,t,i)=>{i.d(t,{j:()=>o});let o=i(97109).createContext(null)},30960:(e,t,i)=>{i.d(t,{A:()=>a});var o=i(97109),r=i(95008),n=i(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}let a=o.forwardRef((e,t)=>o.createElement(n.A,l({},e,{ref:t,icon:r.A})))},38770:(e,t,i)=>{i.d(t,{A:()=>o});let o=i(51916).A},68498:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"}},71330:(e,t,i)=>{i.d(t,{A:()=>a});var o=i(97109),r=i(68498),n=i(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}let a=o.forwardRef((e,t)=>o.createElement(n.A,l({},e,{ref:t,icon:r.A})))},95008:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"}},99981:(e,t,i)=>{i.d(t,{QB:()=>a,Ay:()=>b});var o=i(3638),r=i(97109),n=i(99452);function l(e){let{prefixCls:t,className:i,style:n,status:l}=e,a=`${t}-rail`;return r.createElement("div",{className:(0,o.$)(a,`${a}-${l}`,i),style:n})}let a=r.createContext({}),c=r.createContext(null);var s=i(17597);function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}let d=r.createContext({}),p=r.forwardRef((e,t)=>{let{className:i,style:n,children:l,...a}=e,{prefixCls:p,classNames:$,styles:h}=r.useContext(c),{className:u,style:g}=r.useContext(d),b=`${p}-item`;return r.createElement("div",m({},(0,s.A)(a,!1),{ref:t,className:(0,o.$)(`${b}-icon`,$.itemIcon,u,i),style:{...h.itemIcon,...g,...n}}),l)});function $(){return($=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}function h(e){let{prefixCls:t,classNames:i,styles:s,data:m,last:h,nextStatus:u,active:g,index:b,itemRender:v,iconRender:f,itemWrapperRender:x,onClick:z}=e,w=`${t}-item`,{railFollowPrevStatus:y}=r.useContext(a),{ItemComponent:S}=r.useContext(c),{onClick:I,title:k,subTitle:A,content:E,description:C,disabled:N,icon:P,status:M,className:H,style:B,classNames:W={},styles:O={},...T}=m,q=E??C,j={item:{...m,content:q},index:b,active:g},R={};(z||I)&&!N&&(R.role="button",R.tabIndex=0,R.onClick=e=>{I?.(e),z(b)},R.onKeyDown=e=>{let{which:t}=e;(t===n.A.ENTER||t===n.A.SPACE)&&z(b)});let L=M||"wait",D=null!=k,F=null!=A,_=(0,o.$)(w,`${w}-${L}`,{[`${w}-custom`]:P,[`${w}-active`]:g,[`${w}-disabled`]:!0===N,[`${w}-empty-header`]:!D&&!F},H,i.item,W.root),X=r.createElement(p,null);f&&(X=f(X,{...j,components:{Icon:p}}));let G=r.createElement("div",{className:(0,o.$)(`${w}-wrapper`,i.itemWrapper,W.wrapper),style:{...s.itemWrapper,...O.wrapper}},r.createElement(d.Provider,{value:{className:W.icon,style:O.icon}},X),r.createElement("div",{className:(0,o.$)(`${w}-section`,i.itemSection,W.section),style:{...s.itemSection,...O.section}},r.createElement("div",{className:(0,o.$)(`${w}-header`,i.itemHeader,W.header),style:{...s.itemHeader,...O.header}},D&&r.createElement("div",{className:(0,o.$)(`${w}-title`,i.itemTitle,W.title),style:{...s.itemTitle,...O.title}},k),F&&r.createElement("div",{title:"string"==typeof A?A:void 0,className:(0,o.$)(`${w}-subtitle`,i.itemSubtitle,W.subtitle),style:{...s.itemSubtitle,...O.subtitle}},A),!h&&r.createElement(l,{prefixCls:w,className:(0,o.$)(i.itemRail,W.rail),style:{...s.itemRail,...O.rail},status:y?M:u})),null!=q&&r.createElement("div",{className:(0,o.$)(`${w}-content`,i.itemContent,W.content),style:{...s.itemContent,...O.content}},q))),V=r.createElement(S,$({},T,R,{className:_,style:{...s.item,...O.root,...B}}),x?x(G):G);return v&&(V=v(V,j)||null),V}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}let g={},b=function(e){let{prefixCls:t="rc-steps",style:i,className:n,classNames:l=g,styles:a=g,rootClassName:s,orientation:m,titlePlacement:d,components:p,status:$="process",current:b=0,initial:v=0,onChange:f,items:x,iconRender:z,itemRender:w,itemWrapperRender:y,...S}=e,I="vertical"===m,k=(0,o.$)(t,`${t}-${I?"vertical":"horizontal"}`,`${t}-title-${I||"vertical"!==d?"horizontal":"vertical"}`,s,n,l.root),A=r.useMemo(()=>(x||[]).filter(Boolean),[x]),E=r.useMemo(()=>A.map(({status:e},t)=>{let i=v+t;return e?e:i===b?$:i<b?"finish":"wait"}),[A,$,b,v]),C=e=>{f&&b!==e&&f(e)},{root:N="div",item:P="div"}=p||{},M=r.useMemo(()=>({prefixCls:t,classNames:l,styles:a,ItemComponent:P}),[t,l,a,P]);return r.createElement(N,u({className:k,style:{...i,...a?.root}},S),r.createElement(c.Provider,{value:M},A.map((e,i)=>{let o=v+i,n=E[i],c=E[i+1],s={...e,status:n};return r.createElement(h,{key:o,prefixCls:t,classNames:l,styles:a,data:s,nextStatus:c,active:o===b,index:o,last:A.length-1===i,iconRender:z,itemRender:w,itemWrapperRender:y,onClick:f&&C})})))}}}]);
@@ -1 +0,0 @@
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(30960),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()}]);
@@ -1 +0,0 @@
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:()=>ec});var l=r(65321),n=r(97109),s=r(7576),i=r(35292),o=r(33442),a=r(11702),c=r(17807),d=r(63455),u=r(88762),p=r(85114),m=r(68787),h=r(84253),x=r(38332),g=r(26171),f=r(85493),j=r(34052),y=r(9730),v=r(42700),w=r(58569),A=r(2256),S=r(38770),k=r(76506),b=r(57271),I=r(49604),C=r(23216),z=r(16285),T=r(26619),E=r(8263),B=r(30960),_=r(75548),R=r(7851),D=r(84742),M=r(29071),F=r(63552),P=r(26631),G=r(29606),L=r(83914),W=r(58209),N=r(54746),O=r(71330),H=r(64068),K=r(93051),q=r(38762),V=r(64629),U=r(67547),X=r(76830),Q=r(1310),J=r(6578),Y=r(79059);let{TextArea:Z}=s.A,{Text:$}=i.A,ee=null;function et(){null==ee||ee.listeners.forEach(e=>e())}let er={role_binding:(0,l.jsx)(C.A,{}),context_recall:(0,l.jsx)(z.A,{}),knowledge_retrieval:(0,l.jsx)(T.A,{}),file_understanding:(0,l.jsx)(E.A,{}),fact_extraction:(0,l.jsx)(z.A,{}),chapter_generation:(0,l.jsx)(B.A,{}),asset_generation:(0,l.jsx)(_.A,{}),validation:(0,l.jsx)(R.A,{}),formatting:(0,l.jsx)(D.A,{}),llm_review:(0,l.jsx)(M.A,{}),export_ready:(0,l.jsx)(F.A,{}),reference:(0,l.jsx)(_.A,{})},el={施工组织设计:(0,l.jsx)(R.A,{}),投标文件:(0,l.jsx)(F.A,{}),技术方案:(0,l.jsx)(z.A,{}),报告:(0,l.jsx)(P.A,{}),自定义:(0,l.jsx)(B.A,{})};function en(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function es(e){return e?e.split(/[\\/]/u).pop()||e:""}function ei(e){let t=[],r=e=>{for(let l of e)l.isFolder?l.children&&r(l.children):t.push(l.key)};return r(e),t}let eo={role_binding:"角色配置绑定",context_recall:"上下文召回",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},ea={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ec(){let e=(0,Y.Vr)(),{message:t}=c.A.useApp(),[r]=d.A.useForm(),i=(0,n.useRef)(null),[_,ec]=(0,n.useState)([]),[ed,eu]=(0,n.useState)("construction-organization-design"),[ep,em]=(0,n.useState)([]),[eh,ex]=(0,n.useState)([]),[eg,ef]=(0,n.useState)([]),[ej,ey]=(0,n.useState)([]),[ev,ew]=(0,n.useState)(!1),[eA,eS]=(0,n.useState)(""),[ek,eb]=(0,n.useState)([]),[eI,eC]=(0,n.useState)(!0),[ez,eT]=(0,n.useState)(!1),[eE,eB]=(0,n.useState)(null),[e_,eR]=(0,n.useState)(""),[eD,eM]=(0,n.useState)([]),[eF,eP]=(0,n.useState)(null),[eG,eL]=(0,n.useState)(null),[eW,eN]=(0,n.useState)(""),[eO,eH]=(0,n.useState)(!1),[eK,eq]=(0,n.useState)("idle"),[eV,eU]=(0,n.useState)(null),[eX,eQ]=(0,n.useState)(null),[eJ,eY]=(0,n.useState)({start:0,end:0}),[eZ,e$]=(0,n.useState)([]),[e0,e1]=(0,n.useState)(!1),[e2,e6]=(0,n.useState)(!1),[e8,e3]=(0,n.useState)({}),e4=ep.filter(e=>"file"===e.type).map(e=>({label:e.name,value:e.id})),e5=d.A.useWatch("fileBindingGroups",r)||{},e7=(0,n.useMemo)(()=>(function(e){let t={};for(let n of[...e].sort((e,t)=>e.relativePath.localeCompare(t.relativePath,"zh-CN"))){let e=n.relativePath.split("/").filter(Boolean),s="";for(let i=0;i<e.length;i++){let a=e[i],c=s;s=s?"".concat(s,"/").concat(a):a;let d=i===e.length-1;if(!t[s]){var r;t[s]={key:s,rawTitle:a,title:d?(0,l.jsx)("span",{title:n.relativePath,children:a}):(0,l.jsxs)(o.A,{size:4,children:[(0,l.jsx)(G.A,{style:{color:"#faad14"}}),(0,l.jsx)("span",{children:a})]}),isFolder:!d,fileCount:+!!d,...d?{}:{children:[]}},c&&(null==(r=t[c])?void 0:r.children)&&t[c].children.push(t[s])}d&&(t[s].fileCount=1)}}let n=e=>{for(let r of e){var t;(null==(t=r.children)?void 0:t.length)&&(n(r.children),r.fileCount=r.children.reduce((e,t)=>e+t.fileCount,0),r.title=(0,l.jsxs)(o.A,{size:4,children:[(0,l.jsx)(G.A,{style:{color:"#faad14"}}),(0,l.jsx)("span",{children:r.rawTitle}),(0,l.jsx)(a.A,{style:{margin:0},children:r.fileCount})]}))}},s=Object.values(t).filter(e=>!e.key.includes("/"));return n(s),s.filter(e=>!e.isFolder||e.fileCount>0)})(ej),[ej]),e9=(0,n.useMemo)(()=>(function e(t,r){let l=r.trim().toLowerCase();return l?t.flatMap(t=>{let r=t.children?e(t.children,l):void 0;return t.key.toLowerCase().includes(l)||t.rawTitle.toLowerCase().includes(l)||(null==r?void 0:r.length)?[{...t,children:r}]:[]}):t})(e7,eA),[e7,eA]),te=(0,n.useMemo)(()=>ei(e7),[e7]),tt=(0,n.useMemo)(()=>{var e,t,r;return(null==(e=eg.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=eg.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=eg[0])?void 0:r.projectRoot)||""},[eg]),tr=(0,n.useMemo)(()=>{let e=[],t=r=>{for(let l of r)e.push(l.key),l.children&&t(l.children)};return t(e7),e},[e7]),[tl,tn]=(0,n.useState)([]),[ts,ti]=(0,n.useState)(null),[to,ta]=(0,n.useState)("templates"),[tc,td]=(0,n.useState)(!1),[tu,tp]=(0,n.useState)("workflow"),tm=(0,n.useRef)(null),th=(0,n.useRef)(0),tx=async()=>{try{eM((await (0,J.cQ)(tt||void 0)).documents)}catch(e){eM([])}};(0,n.useEffect)(()=>{let e=()=>{ee&&(tn(ee.flowSteps),ti(ee.activeFlowKey),eT(ee.loading),ee.documentId&&eP(ee.documentId),ee.draft&&eB(ee.draft),void 0!==ee.content&&eR(ee.content))},t=ee;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,n.useEffect)(()=>{eC(!0),Promise.all([(0,J.Dl)().then(e=>{var t,r;ec(e.templates),eu(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,J.lv)().then(e=>{em(e.roles),ex(e.configs)}),(0,J.dx)().then(e=>ef(e))]).catch(()=>t.error(e("common.error"))).finally(()=>eC(!1))},[t,e]),(0,n.useEffect)(()=>{tt&&tx()},[tt]),(0,n.useEffect)(()=>{if(0===eD.length)return;let e=localStorage.getItem("activeGenDocId");if(!e)return;if(!eD.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem("activeGenDocId");let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,J.v7)(e,!1,tt||void 0);await tx(),"generating"!==r.status&&(localStorage.removeItem("activeGenDocId"),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eD]);let tg=(0,n.useMemo)(()=>_.find(e=>e.id===ed),[_,ed]),tf=eh.map(e=>({label:e.name,value:e.id})),tj=Math.max(0,tl.findIndex(e=>e.key===ts)),ty=e=>{var t;return e?(null==(t=ep.find(t=>t.id===e))?void 0:t.name)||ea[e]||"未知角色":""},tv=e=>e.subtitle||e.roleName||ty(e.roleId)||eo[e.type]||e.type,tw=e=>{var t,r,l;return e.promptName||((t=e.promptId)?(null==(r=eg.find(e=>e.id===t))?void 0:r.projectName)||(null==(l=ep.find(e=>e.id===t))?void 0:l.name)||ea[t]||"未知提示词":"")},tA=()=>{th.current+=1,eN(""),eU(null),eQ(null),e$([]),e1(!1),eH(!1),eq("idle")},tS=e=>{eu(e),eP(null),eB(null),eR(""),tA(),tp("workflow"),td(!0),ta("drafts")},tk=async r=>{eP(r.id),eu(r.templateId);let l=tb(r.status);if(l||"failed"===r.status||"aborted"===r.status){tA(),eB(null),eR(""),eT(l),tp("workflow"),td(!0);try{let{document:e}=await (0,J.v7)(r.id,!1,r.projectRoot||tt||void 0);tz(e),tb(e.status)?tT(e.id,e.projectRoot||r.projectRoot||tt||void 0):await tx()}catch(e){tz(r)}return}tp("editor"),tn([]),ti(null),tA();try{let{document:e}=await (0,J.v7)(r.id,!1,r.projectRoot||tt||void 0);eB(e.draft||null),eR(e.editedMarkdown||e.markdown)}catch(r){t.error(e("common.error"))}td(!0)},tb=e=>"completed"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tI=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ez;(null==ee?void 0:ee.loading)&&(ee.flowSteps=e,ee.activeFlowKey=t,ee.loading=r,et())},tC=e=>{var t,r,n,s,i;let o=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(o.length>0){let t=o.map((t,r)=>{var n;let s,i=("failed"===e.status||"aborted"===e.status)&&"running"===t.status||"failed"===(s=t.status)?"error":"running"===s?"process":"fallback"===s?"warning":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||eo[t.type]||t.type,subtitle:tv(t),description:t.message||"",status:i,icon:"role_binding"===(n=t.type)?(0,l.jsx)(C.A,{}):"knowledge_retrieval"===n?(0,l.jsx)(T.A,{}):"context_recall"===n?(0,l.jsx)(z.A,{}):"file_understanding"===n?(0,l.jsx)(E.A,{}):"fact_extraction"===n?(0,l.jsx)(z.A,{}):"chapter_generation"===n?(0,l.jsx)(B.A,{}):"llm_review"===n?(0,l.jsx)(M.A,{}):"validation"===n?(0,l.jsx)(R.A,{}):"formatting"===n?(0,l.jsx)(D.A,{}):"export_ready"===n?(0,l.jsx)(F.A,{}):(0,l.jsx)(P.A,{}),subSteps:[{key:"stage-".concat(r),title:tw(t)?"提示词:".concat(tw(t)):tv(t),status:i}]}});"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 a="generating"===e.status?(null==(n=t.at(-1))?void 0:n.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(s=t.find(e=>"error"===e.status))?void 0:s.key)||(null==(i=t.at(-1))?void 0:i.key)||"prepare":"done";return{steps:t,activeKey:a}}return{steps:[],activeKey:null}},tz=e=>{let{steps:t,activeKey:r}=tC(e);tn(t),ti(r),eT(tb(e.status)),tI(t,r,tb(e.status)),("failed"===e.status||"aborted"===e.status)&&tp("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(eB(e.draft),eR(e.editedMarkdown||e.markdown),tp("editor"),tn([]),ti(null))},tT=(e,t)=>{tm.current&&clearInterval(tm.current),tm.current=setInterval(()=>{(async()=>{try{let{document:r}=await (0,J.v7)(e,!0,t||tt||void 0);tz(r),await tx(),tb(r.status)||(tm.current&&clearInterval(tm.current),tm.current=null,localStorage.removeItem("activeGenDocId"))}catch(e){}})()},2e3)};(0,n.useEffect)(()=>{if(!ez||!ts)return;let e=window.setInterval(()=>tn(e=>{let t=e.map(e=>{if(e.key!==ts||"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 tI(t,ts),t}),1400);return()=>window.clearInterval(e)},[ts,ez]);let tE=async()=>{ew(!0);try{let e=await (0,J.HT)({limit:5e3,projectRoot:tt||void 0});ey(e.files)}catch(e){t.error("知识库文件加载失败")}finally{ew(!1)}},tB=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]=en([...e[t.roleId]||[],t.filePath])),e),{})}(t.fileBindings)}),eS(""),tE(),e6(!0)},t_=(e,t)=>{let l=r.getFieldValue("fileBindingGroups")||{};r.setFieldValue("fileBindingGroups",{...l,[e]:en(t)})},tR=async()=>{try{await r.validateFields();let l=r.getFieldsValue(!0),n=l.fileBindingGroups||{},s=Object.entries(n).flatMap(e=>{let[t,r]=e;return en(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:i,...o}=l,a={...o,chapters:[],fileBindings:s},c=await (0,J.l2)(a);ec(c.templates),eu(c.template.id),e6(!1),await tx(),t.success(e("common.success"))}catch(e){e instanceof Error&&t.error(e.message)}},tD=async r=>{try{let l=await (0,J.bV)(r);ec(l.templates),eu(l.template.id),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tM=async r=>{try{var l,n;let s=await (0,J.h0)(r);ec(s.templates),eu(null!=(n=null==(l=s.templates[0])?void 0:l.id)?n:""),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tF=async e=>{try{let{validation:r}=await (0,J.SM)(e,tt||void 0);e3(t=>({...t,[e]:r}));let l=r.issues.filter(e=>"error"===e.level);if(eu(e),l.length>0)return void t.warning("模板运行前检查未通过,请先处理阻断项");if(r.issues.length>0)return void t.warning("模板存在警告,可在检查面板确认后继续运行");tS(e)}catch(e){t.error(e instanceof Error?e.message:"模板运行前检查失败")}},tP=async r=>{try{await (0,J.QG)(r.id,r.projectRoot||tt||void 0),eF===r.id&&(eP(null),eB(null),eR("")),await tx(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tG=async e=>{for(;;){let{document:t}=await (0,J.v7)(e,!0,tt||void 0);if(tz(t),("completed"===t.status||"warning"===t.status)&&t.draft)return t;if("failed"===t.status||"aborted"===t.status)throw Error(t.error||("aborted"===t.status?"生成已中止":"生成失败"));await new Promise(e=>window.setTimeout(e,1500))}},tL=async()=>{if(!ed)return;if(null==ee?void 0:ee.loading){tn(ee.flowSteps),ti(ee.activeFlowKey),eT(!0);return}if(!tt)return void t.error("未识别当前项目,请先选择或打开项目后再生成文件");eT(!0);let r=(0,J.OX)({templateId:ed,projectRoot:tt});ee={id:Date.now(),templateId:ed,loading:!0,flowSteps:[],activeFlowKey:null,promise:r,listeners:new Set},tn([]),ti(null);let l=[];try{let n=await r;n.documentId&&(localStorage.setItem("activeGenDocId",n.documentId),eP(n.documentId),(null==ee?void 0:ee.promise)===r&&(ee.documentId=n.documentId)),await tx();let s=n.documentId?await tG(n.documentId):void 0,o=n.draft||(null==s?void 0:s.draft);if(!o)throw Error("生成结果为空");(n.documentId||(null==s?void 0:s.id))&&eP(n.documentId||s.id),l.forEach(e=>window.clearTimeout(e)),eB(o),eR((null==s?void 0:s.editedMarkdown)||(null==s?void 0:s.markdown)||o.markdown),(null==ee?void 0:ee.promise)===r&&(ee.draft=o,ee.content=(null==s?void 0:s.editedMarkdown)||(null==s?void 0:s.markdown)||o.markdown);let a=s||{id:n.documentId||"draft-".concat(Date.now()),templateId:ed,title:o.title,requirement:o.requirement,projectRoot:o.projectRoot||tt,projectId:o.projectId,markdown:o.markdown,status:o.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!o.exportGate.passed?"warning":"completed",draft:o,executionStages:o.executionStages,assets:o.assets||[],createdAt:o.generatedAt,updatedAt:Date.now()},{steps:c}=tC(a);tn(c),tI(c,"done",!1),ti("done"),(null==ee?void 0:ee.promise)===r&&(ee.activeFlowKey="done",ee.loading=!1,et()),localStorage.removeItem("activeGenDocId"),await tx(),t.success(e("common.success")),window.setTimeout(()=>{var e;return null==(e=i.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(n){localStorage.removeItem("activeGenDocId");let l=n instanceof Error?n.message:e("common.error");tn(e=>{let t=e.map(e=>"process"===e.status?{...e,status:"error",description:l,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 tI(t,ts,!1),t}),(null==ee?void 0:ee.promise)===r&&(ee.loading=!1,ee.error=l,et(),ee=null),await tx().catch(()=>void 0),t.error(l)}finally{l.forEach(e=>window.clearTimeout(e)),eT(!1),(null==ee?void 0:ee.promise)===r&&(ee.loading=!1,et())}},tW=(0,n.useRef)(!1);(0,n.useEffect)(()=>{tc&&"workflow"===tu&&!tW.current&&!(null==ee?void 0:ee.loading)&&(null==tg?void 0:tg.projectRoleConfigId)&&(tW.current=!0,window.setTimeout(()=>{tL()},300)),tc||(tW.current=!1)},[tc,tu]);let tN=async e=>{(null==ee?void 0:ee.loading)&&(ee.loading=!1,ee.error="用户中止",et(),ee=null,eT(!1)),localStorage.removeItem("activeGenDocId"),tm.current&&(clearInterval(tm.current),tm.current=null);try{await (0,J.r)(e.id,e.projectRoot||tt||void 0),t.success("已中止生成任务")}catch(e){t.info("任务已不在运行,已刷新状态")}finally{await tx(),eF===e.id&&(eP(null),eB(null),eR(""))}},tO=async r=>{if(eE){eL(r);try{eE.exportGate.passed||t.warning("导出门禁存在风险项,已允许导出,请下载后人工复核。");let e={documentId:eF||void 0,title:eE.title,markdown:e_,format:r,enforceGate:!1,exportGate:eE.exportGate,useClientMarkdown:!0},l=await (0,J.UE)(e);((e,t,r)=>{let l=new Blob([e],{type:r}),n=URL.createObjectURL(l),s=document.createElement("a");s.href=n,s.download=t,s.target="_self",s.rel="noopener",s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),s.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)})(l,"".concat(eE.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{eL(null)}}},tH=async()=>{if(eE)try{if(eF)await (0,J.a6)(eF,{editedMarkdown:e_,markdown:e_},eE.projectRoot||tt||void 0);else{let e=await (0,J.Af)({...eE,markdown:e_});eB(e.draft)}await tx(),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},tK=(e,t)=>{e$(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},tq=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eN(""),eU(null),eQ(null),eY({start:0,end:0})},tV=(e,t)=>{var r,l;return{title:(null==eE?void 0:eE.title)||"未命名文档",markdown:t,instruction:e,facts:null==eE||null==(r=eE.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==eE||null==(l=eE.chapters)?void 0:l.map(e=>e.title),...(()=>{let e=eJ.start,t=eJ.end;return t>e?{selection:{start:e,end:t,text:e_.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},tU=async()=>{let r=eW.trim();if(!eE||!r||eO)return;let l=th.current+1;th.current=l,eH(!0),eq("planning"),eQ(null);try{let e=await (0,J.Gi)({mode:"plan",...tV(r,e_)});if(th.current!==l||eF!=eF)return;if(!e.plan)throw Error("AI 未返回修改计划");eU(e.plan)}catch(r){th.current===l&&t.error(r instanceof Error?r.message:e("common.error"))}finally{th.current===l&&(eH(!1),eq("idle"))}},tX=async r=>{let l=eW.trim();if(!eE||!l||eO)return;let n=th.current+1;th.current=n,eH(!0),eq("applying");try{let e=await (0,J.Gi)({mode:"apply",...tV(l,e_),plan:r});if(th.current!==n||eF!=eF)return;if(!e.markdown)throw Error("AI 未返回修改结果");eQ({plan:e.plan||r,markdown:e.markdown,beforeSnippet:e.beforeSnippet,afterSnippet:e.afterSnippet,summary:e.summary,changedChars:e.changedChars,prompt:l,before:e_})}catch(r){th.current===n&&t.error(r instanceof Error?r.message:e("common.error"))}finally{th.current===n&&(eH(!1),eq("idle"))}};if(eI)return(0,l.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,l.jsx)(u.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,l.jsx)(u.A,{active:!0,paragraph:{rows:2}}),(0,l.jsx)(u.A,{active:!0,paragraph:{rows:8}})]});let tQ="workflow"===tu?"工作流:".concat((null==tg?void 0:tg.name)||"选择模板"):"编辑:".concat((null==eE?void 0:eE.title)||(null==tg?void 0:tg.outputTitle)||"文档");return(0,l.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"pageTitle",children:e("documents.title")}),(0,l.jsx)("p",{className:"pageDesc",children:e("documents.description")})]}),(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(N.A,{}),onClick:()=>tB(),children:e("documents.newTemplate")})]}),(0,l.jsx)(m.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(_.length,")")},{key:"drafts",label:"生成记录 (".concat(eD.length,")")}],activeTabKey:to,onTabChange:ta,children:"templates"===to?0===_.length?(0,l.jsx)(h.A,{description:e("common.noData")}):(0,l.jsx)(x.A,{dataSource:_,renderItem:t=>(0,l.jsx)(x.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,l.jsx)(p.Ay,{size:"small",icon:(0,l.jsx)(O.A,{}),onClick:e=>{e.stopPropagation(),tB(t)},children:"配置"},"cfg"),(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:(0,l.jsx)(H.A,{}),onClick:e=>{e.stopPropagation(),tF(t.id)},children:"运行"},"run"),(0,l.jsx)(p.Ay,{size:"small",icon:(0,l.jsx)(K.A,{}),onClick:e=>{e.stopPropagation(),tD(t.id)}},"copy"),(0,l.jsx)(g.A,{title:e("documents.deleteTemplateConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),tM(t.id)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,l.jsx)(W.A,{}),onClick:e=>e.stopPropagation()})},"del")],onClick:()=>eu(t.id),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let r=el[e]||(0,l.jsx)(P.A,{});return(0,l.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(t.category,ed===t.id),(0,l.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,l.jsx)("span",{style:{fontWeight:ed===t.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),ed===t.id&&(0,l.jsx)(a.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,l.jsx)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:t.category}),e8[t.id]&&(0,l.jsxs)(a.A,{color:e8[t.id].issues.some(e=>"error"===e.level)?"error":e8[t.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",e8[t.id].fileDiagnostics.length," 文件 / ",e8[t.id].promptDiagnostics.length," 提示词"]})]}),t.description&&(0,l.jsx)($,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:t.description}),e8[t.id]&&(0,l.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(e8[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":e8[t.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:e8[t.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":e8[t.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,l.jsxs)(o.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)($,{strong:!0,children:e8[t.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":e8[t.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,l.jsxs)(a.A,{color:"blue",children:["文件角色 ",e8[t.id].fileDiagnostics.length]}),(0,l.jsxs)(a.A,{color:"purple",children:["提示词角色 ",e8[t.id].promptDiagnostics.length]})]}),e8[t.id].issues.length>0?e8[t.id].issues.map(e=>(0,l.jsx)(f.A,{type:"error"===e.level?"error":"warning",message:e.message,showIcon:!0},e.message)):(0,l.jsx)(f.A,{type:"success",message:"文件角色、提示词角色和后台自动规范检查通过,可以运行。",showIcon:!0}),!e8[t.id].issues.some(e=>"error"===e.level)&&e8[t.id].issues.length>0&&(0,l.jsx)("div",{children:(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:(0,l.jsx)(H.A,{}),onClick:()=>tS(t.id),children:"忽略警告并继续运行"})})]})})]})]})})}):0===eD.length?(0,l.jsx)(h.A,{description:e("common.noData")}):(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eD.slice(0,15).map((e,t)=>{var r,n,s;let i,c;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:eF===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{tk(e)},children:["completed"===e.status?(0,l.jsx)(D.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status||"aborted"===e.status?(0,l.jsx)(q.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,l.jsx)(R.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,l.jsx)(V.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,l.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,l.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,l.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,l.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,l.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),l=t%60;if(r<60)return l?"".concat(r," 分 ").concat(l," 秒"):"".concat(r," 分");let n=Math.floor(r/60),s=r%60;return s?"".concat(n," 小时 ").concat(s," 分"):"".concat(n," 小时")})(e)]})]}),("warning"===e.status||"failed"===e.status||"aborted"===e.status)&&(0,l.jsx)("div",{style:{marginTop:3,color:"failed"===e.status||"aborted"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.error||(null==(r=e.warningIssues)?void 0:r[0])||(null==(s=e.draft)||null==(n=s.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:n.message)||"需复核"})]}),(0,l.jsxs)(o.A,{size:4,align:"center",children:[(0,l.jsx)(a.A,{color:"completed"===(i=e.status)?"success":"warning"===i?"warning":"failed"===i?"error":"aborted"===i?"default":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(c=e.status)?"已完成":"warning"===c?"需复核":"failed"===c?"失败":"aborted"===c?"已中止":"生成中"}),(0,l.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,l.jsx)(g.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),tP(e)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,l.jsx)(W.A,{}),onClick:e=>e.stopPropagation()})}),tb(e.status)&&(0,l.jsx)(g.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tN(e)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:tb(e.status)?(0,l.jsx)(V.A,{spin:!0}):(0,l.jsx)(H.A,{}),onClick:t=>{t.stopPropagation(),tk(e)},children:"打开"})]})]},e.id)})})}),(0,l.jsx)(j.A,{title:tQ,open:tc,onClose:()=>{td(!1),tm.current&&(clearInterval(tm.current),tm.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:eE?(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(p.Ay,{icon:(0,l.jsx)(U.A,{}),disabled:eO,onClick:()=>{tH()},children:e("documents.saveDraft")}),(0,l.jsx)(p.Ay,{icon:(0,l.jsx)(X.A,{}),disabled:eO,loading:"markdown"===eG,onClick:()=>{tO("markdown")},children:"MD"}),(0,l.jsx)(p.Ay,{disabled:eO,loading:"html"===eG,onClick:()=>{tO("html")},children:"HTML"}),(0,l.jsx)(p.Ay,{disabled:eO,loading:"docx"===eG,onClick:()=>{tO("docx")},children:"DOCX"}),(0,l.jsx)(p.Ay,{type:"primary",disabled:eO,loading:"pdf"===eG,onClick:()=>{tO("pdf")},children:"PDF"})]}):ez&&"workflow"===tu?(0,l.jsx)(p.Ay,{danger:!0,onClick:()=>{(async()=>{eF&&await (0,J.r)(eF,tt||void 0).catch(()=>void 0),ee&&(ee.loading=!1,ee.error="用户中止",et(),ee=null),localStorage.removeItem("activeGenDocId"),tm.current&&(clearInterval(tm.current),tm.current=null),eT(!1),tn([]),ti(null),td(!1),await tx(),t.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,l.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},size:"middle",children:["workflow"===tu&&tl.length>0&&(0,l.jsx)(y.A,{direction:"vertical",size:"small",current:tj,items:tl.map(e=>{let t;return{title:e.title,description:(0,l.jsxs)("div",{children:[e.subtitle&&(0,l.jsx)("div",{style:{marginBottom:4},children:(0,l.jsx)(a.A,{children:e.subtitle})}),(0,l.jsx)("div",{children:e.description}),(0,l.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,l.jsx)(L.A,{}):"finish"===t?(0,l.jsx)(D.A,{}):"warning"===t?(0,l.jsx)(R.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,l.jsx)(W.A,{}):(0,l.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,l.jsx)("span",{children:e.title})]},e.key)})})]}),status:"warning"===(t=e.status)?"finish":t,icon:"process"===e.status?(0,l.jsx)(L.A,{}):"warning"===e.status?(0,l.jsx)(R.A,{style:{color:"var(--colorWarning)"}}):e.icon}})}),"workflow"===tu&&ez&&0===tl.length&&(0,l.jsx)("div",{style:{textAlign:"center",padding:40},children:(0,l.jsx)(v.A,{tip:"正在准备生成…"})}),eE&&(0,l.jsx)("div",{ref:i,children:(0,l.jsx)(w.A,{items:[{key:"edit",label:e("documents.edit"),children:(0,l.jsxs)(o.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,l.jsx)(Z,{rows:28,value:e_,disabled:eO,onSelect:e=>{var t,r,l;return eY({start:null!=(t=e.currentTarget.selectionStart)?t:0,end:null!=(l=null!=(r=e.currentTarget.selectionEnd)?r:e.currentTarget.selectionStart)?l:0})},onChange:e=>{var t,r,l;eR(e.target.value),eU(null),eQ(null),eY({start:null!=(t=e.target.selectionStart)?t:0,end:null!=(l=null!=(r=e.target.selectionEnd)?r:e.target.selectionStart)?l:0})}}),(0,l.jsx)(m.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,l.jsxs)(o.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,l.jsxs)(o.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(o.A,{size:6,children:[(0,l.jsx)(M.A,{style:{color:"var(--colorAccent)"}}),(0,l.jsx)($,{strong:!0,children:"精准修改"}),(0,l.jsx)(a.A,{color:"blue",children:"AI 辅助"})]}),(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,l.jsxs)(p.Ay,{size:"small",icon:(0,l.jsx)(Q.A,{}),onClick:()=>e1(e=>!e),disabled:0===eZ.length,children:["历史版本 ",eZ.length>0?eZ.length:""]})]}),(0,l.jsx)(f.A,{type:"info",showIcon:!0,message:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,l.jsx)(Z,{rows:4,value:eW,disabled:eO,onChange:e=>{eN(e.target.value),eU(null),eQ(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,l.jsxs)(o.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,l.jsx)(o.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,l.jsx)(p.Ay,{size:"small",disabled:eO,onClick:()=>eN(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(M.A,{}),loading:eO&&"planning"===eK,disabled:!eW.trim()||eO,onClick:()=>{tU()},children:"识别修改范围"})]}),eV&&!eX&&(0,l.jsx)(m.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,l.jsxs)(o.A,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(a.A,{color:"purple",children:eV.scope}),(0,l.jsx)(a.A,{color:"blue",children:eV.action}),(0,l.jsxs)(a.A,{color:eV.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*eV.confidence),"%"]}),eV.targetTitle&&(0,l.jsx)($,{strong:!0,children:eV.targetTitle})]}),(0,l.jsx)($,{children:eV.summary}),(0,l.jsx)($,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,l.jsxs)(o.A,{children:[(0,l.jsx)(p.Ay,{type:"primary",loading:eO&&"applying"===eK,onClick:()=>{tX(eV)},children:"执行并预览"}),(0,l.jsx)(p.Ay,{disabled:eO,onClick:()=>eU(null),children:"取消"})]})]})}),eX&&(0,l.jsx)(m.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,l.jsxs)(o.A,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(a.A,{color:"green",children:"修改预览"}),(0,l.jsx)($,{children:eX.summary||eX.plan.summary}),(0,l.jsxs)(a.A,{children:[eX.changedChars&&eX.changedChars>0?"+".concat(eX.changedChars):eX.changedChars," 字符"]})]}),(0,l.jsxs)(A.A,{gutter:12,children:[(0,l.jsxs)(S.A,{span:12,children:[(0,l.jsx)($,{strong:!0,children:"修改前"}),(0,l.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:eX.beforeSnippet||"无片段预览"})]}),(0,l.jsxs)(S.A,{span:12,children:[(0,l.jsx)($,{strong:!0,children:"修改后"}),(0,l.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:eX.afterSnippet||"无片段预览"})]})]}),(0,l.jsxs)(o.A,{children:[(0,l.jsx)(p.Ay,{type:"primary",onClick:()=>{eX&&(tK(eX.before,eX.prompt),eR(eX.markdown),tq(!0),t.success("已应用精准修改"))},children:"应用到文档"}),(0,l.jsx)(p.Ay,{onClick:()=>eQ(null),children:"返回计划"}),(0,l.jsx)(p.Ay,{danger:!0,onClick:()=>{eU(null),eQ(null)},children:"放弃"})]})]})}),e0&&(0,l.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,l.jsx)(x.A,{size:"small",dataSource:eZ,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,l.jsx)(x.A.Item,{actions:[(0,l.jsx)(p.Ay,{size:"small",disabled:eO,onClick:()=>{tK(e_,"恢复前版本"),eR(e.content),tq(!0),t.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,l.jsx)(x.A.Item.Meta,{title:(0,l.jsxs)(o.A,{children:[(0,l.jsx)($,{children:new Date(e.createdAt).toLocaleString()}),(0,l.jsx)(a.A,{children:e.prompt})]}),description:(0,l.jsx)($,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eE.chapters.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eE.chapters.length,")"]}),(0,l.jsx)(x.A,{size:"small",dataSource:eE.chapters,renderItem:e=>(0,l.jsx)(x.A.Item,{children:(0,l.jsx)(x.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eE.structuredFacts.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eE.structuredFacts.length,")"]}),(0,l.jsx)(k.A,{size:"small",column:1,bordered:!0,children:eE.structuredFacts.map((e,t)=>(0,l.jsxs)(k.A.Item,{label:e.key,children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)(a.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,l.jsx)($,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eE.sources.length,")"]}),0===eE.sources.length?(0,l.jsx)(h.A,{description:"暂无"}):(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eE.sources.map(e=>(0,l.jsxs)(a.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eE.missingItems.length,")"]}),0===eE.missingItems.length?(0,l.jsx)(h.A,{description:"无缺失"}):(0,l.jsx)(x.A,{size:"small",dataSource:eE.missingItems,renderItem:e=>(0,l.jsx)(x.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eE.validationIssues.length,")"),children:0===eE.validationIssues.length?(0,l.jsx)(h.A,{description:"校验通过"}):(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eE.validationIssues.map(e=>(0,l.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,l.jsx)(a.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,l.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,l.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))),eE.exportGate.checklist.length>0&&(0,l.jsxs)("div",{style:{marginTop:8},children:[(0,l.jsx)($,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,l.jsx)(x.A,{size:"small",dataSource:eE.exportGate.checklist,renderItem:e=>(0,l.jsxs)(x.A.Item,{children:[(0,l.jsx)($,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,l.jsx)(a.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eE.executionStages.length,")"),children:(0,l.jsx)(x.A,{size:"small",dataSource:eE.executionStages,renderItem:e=>(0,l.jsxs)(x.A.Item,{children:[(0,l.jsx)(x.A.Item.Meta,{avatar:er[e.type]||(0,l.jsx)(P.A,{}),title:(0,l.jsx)($,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(eo[e.type]||e.type," \xb7 ").concat(e.roleName||ty(e.roleId))}),description:(0,l.jsx)($,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,l.jsx)(a.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,l.jsx)(j.A,{title:e("documents.templateEditor"),open:e2,onClose:()=>e6(!1),width:860,maskClosable:!1,styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(p.Ay,{onClick:()=>e6(!1),children:e("common.cancel")}),(0,l.jsx)(p.Ay,{type:"primary",onClick:()=>{tR()},children:e("common.save")})]}),children:(0,l.jsxs)(d.A,{form:r,layout:"vertical",requiredMark:"optional",children:[(0,l.jsxs)(A.A,{gutter:12,children:[(0,l.jsx)(d.A.Item,{name:"id",hidden:!0,children:(0,l.jsx)(s.A,{})}),(0,l.jsx)(S.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"name",label:e("documents.templateName"),rules:[{required:!0}],children:(0,l.jsx)(s.A,{})})}),(0,l.jsx)(S.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"category",label:e("documents.templateCategory"),children:(0,l.jsx)(s.A,{})})}),(0,l.jsx)(S.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"outputTitle",label:e("documents.outputTitle"),children:(0,l.jsx)(s.A,{})})}),(0,l.jsx)(S.A,{xs:24,md:12,children:(0,l.jsx)(d.A.Item,{name:"description",label:e("documents.templateDescription"),children:(0,l.jsx)(s.A,{})})})]}),(0,l.jsx)(d.A.Item,{name:"projectRoleConfigId",label:e("documents.projectRoleConfig"),rules:[{required:!0,message:e("documents.projectRoleConfigRequired")}],children:(0,l.jsx)(b.A,{showSearch:!0,placeholder:e("documents.projectRoleConfigRequired"),options:tf})}),(0,l.jsxs)("div",{style:{marginBottom:16},children:[(0,l.jsxs)(o.A,{style:{width:"100%",justifyContent:"space-between",marginBottom:8},children:[(0,l.jsx)($,{strong:!0,children:"项目文件绑定"}),(0,l.jsx)(a.A,{color:"blue",children:"按文件角色多选"})]}),(0,l.jsx)(f.A,{type:"info",showIcon:!0,style:{marginBottom:12},message:"每个文件角色可直接勾选文件或文件夹;勾选文件夹会自动绑定该文件夹下所有文件。保存时仍按具体文件路径绑定,兼容现有模板和生成流程。"}),(0,l.jsx)(s.A.Search,{allowClear:!0,placeholder:"搜索文件或文件夹",value:eA,onChange:e=>eS(e.target.value),style:{marginBottom:12}}),ev?(0,l.jsx)("div",{style:{textAlign:"center",padding:24},children:(0,l.jsx)(v.A,{tip:"正在加载知识库文件…"})}):0===e4.length?(0,l.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:"暂无可用文件角色"}):0===e7.length?(0,l.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):e4.map(e=>{let t=en(e5[e.value]||[]).filter(e=>te.includes(e)),r=new Set(ei(e9));return(0,l.jsxs)(m.A,{size:"small",style:{marginBottom:12},title:(0,l.jsxs)(o.A,{children:[(0,l.jsx)($,{children:e.label}),(0,l.jsxs)(a.A,{color:"blue",children:["已选 ",t.length]})]}),extra:(0,l.jsx)(p.Ay,{size:"small",disabled:0===t.length,onClick:()=>t_(e.value,[]),children:"清空"}),children:[(0,l.jsx)(d.A.Item,{name:["fileBindingGroups",e.value],hidden:!0,children:(0,l.jsx)(s.A,{})}),(0,l.jsx)("div",{style:{marginBottom:8,color:"var(--colorTextSecondary)",fontSize:12},children:t.length>0?t.slice(0,3).map(es).join("、")+(t.length>3?" 等 ".concat(t.length," 个文件"):""):"未选择文件"}),(0,l.jsx)(I.A,{checkable:!0,blockNode:!0,height:320,treeData:e9,checkedKeys:t,expandedKeys:eA.trim()?tr:ek,onExpand:e=>eb(e),onCheck:(l,n)=>{let s=new Set(t.filter(e=>!r.has(e)));for(let e of n.checkedNodes)e.isFolder?ei([e]).forEach(e=>s.add(e)):s.add(e.key);t_(e.value,Array.from(s))}})]},e.value)})]}),(0,l.jsx)(f.A,{type:"info",showIcon:!0,message:"文档规范由后台根据模板、提示词和角色绑定自动生成,无需手动维护规范包。"})]})})]})}}},e=>{e.O(0,[433,787,576,195,375,455,506,940,499,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{2548:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>w});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(30960),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:["审查事实和来源","检查导出门禁","导出正式文件"]}],b=[{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 会作为风险提示保留,但不阻断用户导出。","在草稿历史中确认生成状态、warning 原因、整体生成耗时,并可删除不需要的记录。","可以先导出 HTML 预览排版,再导出 DOCX/PDF。"],checks:["无真实阻断问题","关键事实有来源","章节有证据","warning 原因已复核","导出文件可打开"],tips:"导出不是简单放行:真实阻断仍会拦截;生成完成但存在可复核问题时显示 warning,用户可以继续导出并按原因优化资料。"}];function w(){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:b.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:b.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:"门禁分为“高风险提示”和“复核建议”。系统不会禁止导出,但会在出现高风险问题时提醒用户复核交付质量。"}),(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 级门禁问题会作为高风险提示展示,导出后请人工复核。"})},{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,940,20,636,593,792],()=>e(e.s=34899)),_N_E=e.O()}]);