@customize-agent/server 4.3.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +4 -4
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/chunks/1936.js +5 -5
- package/.next/server/chunks/208.js +9 -6
- package/.next/server/chunks/4680.js +30 -9
- package/.next/server/chunks/5284.js +32 -26
- package/.next/server/chunks/8661.js +1 -1
- package/.next/server/chunks/9227.js +1 -1
- package/.next/server/chunks/9301.js +3 -3
- package/.next/server/chunks/9319.js +97 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_error.js +1 -1
- package/.next/server/pages/api/assets/generated/preview.js +1 -1
- package/.next/server/pages/api/assets/generated/preview.js.nft.json +1 -1
- package/.next/server/pages/api/assets/generated.js +1 -1
- package/.next/server/pages/api/assets/generated.js.nft.json +1 -1
- package/.next/server/pages/api/documents/chapter/regenerate.js +1 -1
- package/.next/server/pages/api/documents/chapter/regenerate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/export.js +1 -1
- package/.next/server/pages/api/documents/export.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generate.js +2 -2
- package/.next/server/pages/api/documents/generate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id].js +1 -1
- package/.next/server/pages/api/documents/generated/[id].js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated.js +1 -1
- package/.next/server/pages/api/documents/generated.js.nft.json +1 -1
- package/.next/server/pages/api/documents/templates.js +1 -1
- package/.next/server/pages/api/documents/templates.js.nft.json +1 -1
- package/.next/server/pages/asset-library.html +1 -1
- package/.next/server/pages/document-roles.html +1 -1
- package/.next/server/pages/documents.html +1 -1
- package/.next/server/pages/guide.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/knowledge/file-detail.html +1 -1
- package/.next/server/pages/knowledge/files.html +1 -1
- package/.next/server/pages/knowledge/manage.html +1 -1
- package/.next/server/pages/knowledge.html +1 -1
- package/.next/server/pages/models.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/prompt.html +1 -1
- package/.next/server/pages/settings.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages/template-references.html +1 -1
- package/.next/server/pages-manifest.json +32 -32
- package/.next/static/{GPl90ynzDbphTj0bL93Jl → Jme1VRbTicd-R8k-L2PE_}/_buildManifest.js +1 -1
- package/.next/static/chunks/pages/{documents-676b6c8d14dd5fac.js → documents-9deacb6df546eb6d.js} +1 -1
- package/.next/static/css/364ec83c2b73efae.css +1 -0
- package/package.json +10 -11
- package/.next/package.json +0 -1
- package/.next/server/chunks/2274.js +0 -93
- package/.next/static/css/71d287d5aa97349c.css +0 -1
- /package/.next/static/{GPl90ynzDbphTj0bL93Jl → Jme1VRbTicd-R8k-L2PE_}/_ssgManifest.js +0 -0
package/.next/static/chunks/pages/{documents-676b6c8d14dd5fac.js → documents-9deacb6df546eb6d.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eh});var s=r(65321),l=r(97109),a=r(26171),n=r(7576),o=r(35292),i=r(33442),c=r(17807),d=r(63455),u=r(11702),p=r(85114),x=r(88762),m=r(58569),h=r(84253),g=r(34052),v=r(68787),j=r(55122),f=r(99605),y=r(42700),w=r(2256),b=r(38770),A=r(38332),S=r(76506),k=r(50883),N=r(23718),C=r(23216),I=r(26619),T=r(8263),z=r(16285),R=r(8579),M=r(75548),E=r(7851),F=r(84742),B=r(29071),_=r(63552),D=r(26631),P=r(7225),L=r(83914),W=r(58209),G=r(38762),q=r(8470),H=r(92783),O=r(54746),K=r(93051),U=r(82930),V=r(64068),Q=r(64629),X=r(1310),J=r(67547),Y=r(76830),Z=r(14568),$=r(37799),ee=r(6578),et=r(47085);let{TextArea:er}=n.A,{Text:es}=o.A,el=a.A;function ea(e){let{type:t="info",title:r,children:l,style:a}=e,n="error"===t?"var(--colorError)":"warning"===t?"var(--colorWarning)":"success"===t?"var(--colorSuccess)":"var(--colorInfo)";return(0,s.jsxs)("div",{style:{border:"1px solid ".concat(n),background:"error"===t?"var(--colorErrorBg)":"warning"===t?"var(--colorWarningBg)":"success"===t?"var(--colorSuccessBg)":"var(--colorInfoBg)",borderRadius:8,padding:"9px 12px",...a},children:[(0,s.jsx)(es,{strong:!0,style:{color:n},children:r}),l&&(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:l})]})}function en(e){let{children:t,gap:r=12,style:l}=e;return(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:r,...l},children:t})}let eo=null;function ei(){null==eo||eo.listeners.forEach(e=>e())}let ec={role_binding:(0,s.jsx)(C.A,{}),knowledge_retrieval:(0,s.jsx)(I.A,{}),file_understanding:(0,s.jsx)(T.A,{}),fact_extraction:(0,s.jsx)(z.A,{}),chapter_generation:(0,s.jsx)(R.A,{}),asset_generation:(0,s.jsx)(M.A,{}),validation:(0,s.jsx)(E.A,{}),formatting:(0,s.jsx)(F.A,{}),llm_review:(0,s.jsx)(B.A,{}),export_ready:(0,s.jsx)(_.A,{}),reference:(0,s.jsx)(M.A,{})},ed={施工组织设计:(0,s.jsx)(E.A,{}),投标文件:(0,s.jsx)(_.A,{}),技术方案:(0,s.jsx)(z.A,{}),报告:(0,s.jsx)(D.A,{}),自定义:(0,s.jsx)(R.A,{})};function eu(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function ep(e){return e.map(e=>({key:e.key,value:e.key,rawTitle:e.title,title:e.isFolder?(0,s.jsxs)("div",{className:"flex items-center justify-between w-full pr-4",children:[(0,s.jsxs)(i.A,{size:4,children:[(0,s.jsx)(P.A,{style:{color:"#faad14"}}),(0,s.jsx)("span",{children:e.title})]}),(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:[e.fileCount||0," 项"]})]}):(0,s.jsx)("span",{title:e.key,children:e.title}),isFolder:e.isFolder,fileCount:e.fileCount||+!e.isFolder,isLeaf:e.isLeaf}))}let ex={role_binding:"角色配置绑定",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},em={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function eh(){var e,t,r,a,o,M,P,eh,eg,ev,ej;let ef=(0,et.Vr)(),{message:ey}=c.A.useApp(),[ew]=d.A.useForm(),eb=(0,l.useRef)(null),[eA,eS]=(0,l.useState)([]),[ek,eN]=(0,l.useState)("construction-organization-design"),[eC,eI]=(0,l.useState)([]),[eT,ez]=(0,l.useState)([]),[eR,eM]=(0,l.useState)([]),[eE,eF]=(0,l.useState)([]),[eB,e_]=(0,l.useState)(!1),[eD,eP]=(0,l.useState)(!0),[eL,eW]=(0,l.useState)(!1),[eG,eq]=(0,l.useState)(null),[eH,eO]=(0,l.useState)(""),[eK,eU]=(0,l.useState)([]),[eV,eQ]=(0,l.useState)(null),[eX,eJ]=(0,l.useState)(null),[eY,eZ]=(0,l.useState)(""),[e$,e0]=(0,l.useState)(!1),[e1,e2]=(0,l.useState)("idle"),[e6,e5]=(0,l.useState)(null),[e4,e8]=(0,l.useState)(null),[e3,e7]=(0,l.useState)({start:0,end:0}),[e9,te]=(0,l.useState)([]),[tt,tr]=(0,l.useState)(!1),[ts,tl]=(0,l.useState)(!1),[ta,tn]=(0,l.useState)({}),[to,ti]=(0,l.useState)(null),tc=(0,l.useRef)({}),td=(0,l.useRef)(new Map),[tu,tp]=(0,l.useState)(0),[tx,tm]=(0,l.useState)([]),th=(0,l.useMemo)(()=>{var e,t,r;return(null==(e=eR.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=eR.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=eR[0])?void 0:r.projectRoot)||""},[eR]),[tg,tv]=(0,l.useState)([]),[tj,tf]=(0,l.useState)(null),[ty,tw]=(0,l.useState)(null),[tb,tA]=(0,l.useState)("templates"),[tS,tk]=(0,l.useState)(!1),[tN,tC]=(0,l.useState)("workflow"),[tI,tT]=(0,l.useState)(new Set),[tz,tR]=(0,l.useState)(!1),[tM,tE]=(0,l.useState)(!1),[tF,tB]=(0,l.useState)(null),t_=(0,l.useRef)(new Map),tD=(0,l.useRef)(""),tP=(0,l.useRef)(null),tL=(0,l.useRef)(0),tW=(0,l.useMemo)(()=>"activeGenDocId:".concat(th||"default"),[th]),tG=async()=>{try{eU((await (0,ee.cQ)(th||void 0)).documents)}catch(e){eU([])}};(0,l.useEffect)(()=>{let e=()=>{eo&&(tv(eo.flowSteps),tf(eo.activeFlowKey),eW(eo.loading),eo.documentId&&eQ(eo.documentId),eo.draft&&eq(eo.draft),void 0!==eo.content&&eO(eo.content))},t=eo;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{eP(!0),Promise.all([(0,ee.Dl)().then(e=>{var t,r;eS(e.templates),eN(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,ee.lv)().then(e=>{eI(e.roles),ez(e.configs)}),(0,ee.dx)().then(e=>eM(e))]).catch(()=>ey.error(ef("common.error"))).finally(()=>eP(!1))},[ey,ef]),(0,l.useEffect)(()=>{if(0===eA.length||!th)return;let e=!1;return(async()=>{let t=await Promise.all(eA.map(async e=>{try{let{validation:t}=await (0,ee.SM)(e.id,th);return[e.id,t]}catch(e){return null}}));if(e)return;let r={};for(let e of t)e&&(r[e[0]]=e[1]);tn(r)})(),()=>{e=!0}},[eA,th]),(0,l.useEffect)(()=>{th&&(localStorage.removeItem("activeGenDocId"),tG())},[th]),(0,l.useEffect)(()=>{if(0===eK.length)return;let e=localStorage.getItem(tW);if(!e)return;if(!eK.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem(tW);let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,ee.v7)(e,!1,th||void 0);if(!r)return;await tG(),"generating"!==r.status&&(localStorage.removeItem(tW),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eK]);let tq=(0,l.useMemo)(()=>eA.find(e=>e.id===ek),[eA,ek]),tH=eT.map(e=>({label:e.name,value:e.id})),tO=Math.max(0,tg.findIndex(e=>e.key===tj)),tK=e=>{var t;return e?(null==(t=eC.find(t=>t.id===e))?void 0:t.name)||em[e]||"未知角色":""},tU=e=>e.subtitle||e.roleName||tK(e.roleId)||ex[e.type]||e.type,tV=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=eR.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=eC.find(e=>e.id===t))?void 0:s.name)||em[t]||"未知提示词":"")},tQ=()=>{tL.current+=1,eZ(""),e5(null),e8(null),te([]),tr(!1),e0(!1),e2("idle")},tX=async e=>{eQ(e.id),eN(e.templateId);let t=tJ(e.status);if(t||"failed"===e.status||"aborted"===e.status){tQ(),tw(e),eq(null),eO(""),eW(t),tC("workflow"),tk(!0);try{let{document:t}=await (0,ee.v7)(e.id,!1,e.projectRoot||th||void 0);if(!t)throw Error("文档记录不存在");t0(t),tJ(t.status)?t4(t.id,t.projectRoot||e.projectRoot||th||void 0):await tG()}catch(t){t0(e)}return}tC("editor"),tv([]),tf(null),tQ();try{let{document:t}=await (0,ee.v7)(e.id,!1,e.projectRoot||th||void 0);if(!t)throw Error("文档记录不存在");eq(t.draft||null),eO(t.editedMarkdown||t.markdown),tm(t.exportReports||[])}catch(e){ey.error(ef("common.error"))}tk(!0)},tJ=e=>"completed"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tY=e=>{var t,r,s,l,a,n;return!!e&&("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(t=e.checkpointChapters)?void 0:t.length)&&/继续生成|重新生成|中断|卡住|未完成|门禁|阻断/u.test(e.error||(null==(r=e.warningIssues)?void 0:r.join(";"))||(null==(a=e.draft)||null==(l=a.exportGate)||null==(s=l.blockingIssues)?void 0:s.map(e=>e.message).join(";"))||"")||!!((null==(n=e.draft)?void 0:n.exportGate)&&!1===e.draft.exportGate.passed))},tZ=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eL;(null==eo?void 0:eo.loading)&&(eo.flowSteps=e,eo.activeFlowKey=t,eo.loading=r,ei())},t$=e=>{var t,r,l,a,n;let o=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(o.length>0){let t=o.map((t,r)=>{var l;let a,n=("failed"===e.status||"aborted"===e.status)&&"running"===t.status||"failed"===(a=t.status)?"error":"running"===a?"process":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||ex[t.type]||t.type,subtitle:tU(t),description:t.message||"",status:n,icon:"role_binding"===(l=t.type)?(0,s.jsx)(C.A,{}):"knowledge_retrieval"===l?(0,s.jsx)(I.A,{}):"file_understanding"===l?(0,s.jsx)(T.A,{}):"fact_extraction"===l?(0,s.jsx)(z.A,{}):"chapter_generation"===l?(0,s.jsx)(R.A,{}):"llm_review"===l?(0,s.jsx)(B.A,{}):"validation"===l?(0,s.jsx)(E.A,{}):"formatting"===l?(0,s.jsx)(F.A,{}):"export_ready"===l?(0,s.jsx)(_.A,{}):(0,s.jsx)(D.A,{}),subSteps:((e,t,r)=>{let s=Array.isArray(e.details)?e.details.filter(Boolean):[],l=e.progress?"".concat(e.progress.label||"进度",":").concat(e.progress.current,"/").concat(e.progress.total):"",a=[...l?[l]:[],...s];return 0===a.length?[{key:"stage-".concat(r),title:tV(e)?"提示词:".concat(tV(e)):tU(e),status:t}]:a.map((e,s)=>({key:"stage-".concat(r,"-").concat(s),title:e,status:"process"===t&&0===s?"process":"error"===t&&0===s?"error":"warning"===t?"warning":"process"===t?"finish":t}))})(t,n,r)}});"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 i="generating"===e.status?(null==(l=t.at(-1))?void 0:l.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(a=t.find(e=>"error"===e.status))?void 0:a.key)||(null==(n=t.at(-1))?void 0:n.key)||"prepare":"done";return{steps:t,activeKey:i}}return{steps:[],activeKey:null}},t0=e=>{let t=e.executionStages||[],r="".concat(e.id,"|").concat(e.updatedAt,"|").concat(e.status,"|").concat(e.error||"","|").concat(t.length,"|").concat(t.map(e=>{var t,r,s,l;return"".concat(e.status,":").concat(null!=(s=null==(t=e.progress)?void 0:t.current)?s:0,"/").concat(null!=(l=null==(r=e.progress)?void 0:r.total)?l:0)}).join(","));if(tD.current===r)return;tD.current=r,tw(e);let{steps:s,activeKey:l}=t$(e);t1(s),tv(s),tf(l),eW(tJ(e.status)),tZ(s,l,tJ(e.status)),("failed"===e.status||"aborted"===e.status)&&tC("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(eq(e.draft),eO(e.editedMarkdown||e.markdown),tC("editor"),tv([]),tf(null),tm(e.exportReports||[]))},t1=e=>{let t=Date.now();for(let r of e){let e=td.current.get(r.key);"process"!==r.status||e?("finish"===r.status||"error"===r.status||"warning"===r.status)&&e&&!e.endedAt&&td.current.set(r.key,{...e,endedAt:t}):td.current.set(r.key,{startedAt:t})}},t2=e=>{let t=Math.max(0,Math.round(e/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60);return r<60?"".concat(r," 分 ").concat(t%60," 秒"):"".concat(Math.floor(r/60)," 小时 ").concat(r%60," 分")},t6=(e,t)=>"percent"===t?"".concat((100*e).toFixed(1),"%"):"perKChars"===t?"".concat(e.toFixed(1),"/千字"):String(Math.round(e)),t5=e=>{let t=t_.current.get(e);t&&(clearInterval(t),t_.current.delete(e))},t4=(e,t)=>{t5(e);let r=setInterval(()=>{(async()=>{try{let{document:r}=await (0,ee.v7)(e,!0,t||th||void 0);if(!r)return;t0(r),await tG(),tJ(r.status)||(t5(e),localStorage.removeItem(tW))}catch(e){}})()},2e3);t_.current.set(e,r)};(0,l.useEffect)(()=>()=>{for(let e of t_.current.values())clearInterval(e);t_.current.clear(),tP.current&&(clearTimeout(tP.current),tP.current=null)},[]),(0,l.useEffect)(()=>{if(!eL||!tj)return;let e=window.setInterval(()=>tv(e=>{let t=e.map(e=>{if(e.key!==tj||"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 tZ(t,tj),t}),1400);return()=>window.clearInterval(e)},[tj,eL]),(0,l.useEffect)(()=>{if(!eL)return;let e=window.setInterval(()=>tp(e=>e+1),1e3);return()=>window.clearInterval(e)},[eL]);let t8=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e_(!0);try{let t=await (0,ee.Fi)(e,th||void 0);eF(ep(t.nodes))}catch(e){ey.error("知识库文件加载失败")}finally{e_(!1)}},t3=async e=>{var t;let r=String(null!=(t=e.key)?t:"");if(r)try{let e=await (0,ee.Fi)(r,th||void 0),t=ep(e.nodes),s=e=>e.map(e=>e.key===r?{...e,children:t}:e.children?{...e,children:s(e.children)}:e);eF(e=>s(e))}catch(e){ey.error("加载子文件夹失败")}},t7=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],projectBindings:[]};ew.resetFields(),ew.setFieldsValue({...t,projectMaterialRoots:eu((t.projectBindings||[]).map(e=>e.materialRootPath).filter(Boolean))}),t8(),tl(!0)},t9=async()=>{try{await ew.validateFields();let e=ew.getFieldsValue(!0),t=eu(e.projectMaterialRoots||[]).map(e=>({materialRootPath:e})),{projectMaterialRoots:r,...s}=e,l={...s,chapters:[],projectBindings:t},a=await (0,ee.l2)(l);eS(a.templates),eN(a.template.id),tl(!1),await tG(),ey.success(ef("common.success"))}catch(e){e instanceof Error&&ey.error(e.message)}},re=async e=>{try{let t=await (0,ee.bV)(e);eS(t.templates),eN(t.template.id),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rt=async e=>{try{var t,r;let s=await (0,ee.h0)(e);eS(s.templates),eN(null!=(r=null==(t=s.templates[0])?void 0:t.id)?r:""),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rr=async e=>{tB(e),eN(e),eQ(null),eq(null),eO(""),tQ(),tC("workflow"),tk(!0),tA("drafts"),eW(!0),tf("prepare"),tv([{key:"prepare",title:"正在准备运行模板",description:"正在校验模板绑定的项目资料包、提示词配置和资料索引,校验通过后会自动开始生成。",status:"process",icon:(0,s.jsx)(L.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"process"},{key:"start",title:"准备生成任务",status:"wait"}]}]);try{let{validation:t}=await (0,ee.SM)(e,th||void 0);tn(r=>({...r,[e]:t}));let r=t.issues.filter(e=>"error"===e.level);if(r.length>0){ro.current=!0,eW(!1),tf("prepare"),tv([{key:"prepare",title:"模板运行前检查未通过",description:r.map(e=>e.message).join("\n"),status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ey.warning("模板运行前检查未通过,请先处理阻断项");return}t.issues.length>0&&ey.warning("模板存在非阻断警告,已继续运行"),tv([{key:"prepare",title:"模板检查通过,正在创建生成任务",description:"已确认模板绑定资源可用,正在启动后台生成任务。",status:"process",icon:(0,s.jsx)(L.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"finish"},{key:"start",title:"准备生成任务",status:"process"}]}]),await rn(e)}catch(t){ro.current=!0;let e=t instanceof Error?t.message:"模板运行前检查失败";eW(!1),tv([{key:"prepare",title:"模板运行准备失败",description:e,status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ey.error(e)}finally{tB(t=>t===e?null:t)}},rs=async e=>{try{await (0,ee.QG)(e.id,e.projectRoot||th||void 0),eV===e.id&&(eQ(null),eq(null),eO("")),await tG(),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rl=async(e,t)=>{try{let r=new Set(e.chapters.map(e=>e.title.trim())),s=t.missingHeadings.filter(e=>!r.has(e.title.trim()));if(0===s.length)return void ey.info("建议章节已全部存在");let l=[...e.chapters,...s.map(t=>({id:"ch-ref-".concat(Date.now(),"-").concat(e.chapters.length),title:t.title,purpose:"",queries:[],requiredFacts:[]}))],a=await (0,ee.l2)({...e,chapters:l});eS(a.templates),tn(t=>{let r={...t};return delete r[e.id],r}),ey.success(ef("common.success"))}catch(e){e instanceof Error&&ey.error(e.message)}},ra=async(e,t)=>{let r=Date.now(),s=0,l=Date.now(),a=0;for(;;){let n;if(null==t?void 0:t.aborted)throw Error("用户中止");let o=new AbortController;t&&(t.pollController=o);try{({document:n}=await (0,ee.v7)(e,!0,th||void 0,o.signal,s||void 0)),a=0}catch(e){if((null==t?void 0:t.aborted)||e instanceof DOMException&&"AbortError"===e.name)throw Error("用户中止",{cause:e});if((a+=1)>=3)throw e instanceof Error?e:Error("生成进度获取失败");await new Promise(e=>window.setTimeout(e,2e3*a));continue}finally{(null==t?void 0:t.pollController)===o&&(t.pollController=void 0)}if(!n){if(Date.now()-r>75e5||Date.now()-l>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500));continue}if(t0(n),n.updatedAt!==s&&(s=n.updatedAt,l=Date.now()),("completed"===n.status||"warning"===n.status)&&n.draft)return n;if("failed"===n.status||"aborted"===n.status)throw Error(n.error||("aborted"===n.status?"生成已中止":"生成失败"));if(Date.now()-r>75e5||Date.now()-l>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500))}},rn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ek;if(!e)return;if((null==eo?void 0:eo.aborted)&&(eo=null),null==eo?void 0:eo.loading){tv(eo.flowSteps),tf(eo.activeFlowKey),eW(!0);return}if(!th)return void ey.error("未识别当前项目,请先选择或打开项目后再生成文件");eW(!0);let t=tg.length>0?tg:[{key:"prepare",title:"正在创建生成任务",description:"系统正在创建后台生成任务,请稍候。",status:"process",icon:(0,s.jsx)(L.A,{}),subSteps:[{key:"start",title:"准备生成任务",status:"process"}]}],r=tj||"prepare";tv(t),tf(r);let l=(0,ee.OX)({templateId:e,projectRoot:th});eo={id:Date.now(),templateId:e,loading:!0,flowSteps:t,activeFlowKey:r,promise:l,listeners:new Set};let a=[];try{let e=await l;e.documentId&&(localStorage.setItem(tW,e.documentId),eQ(e.documentId),(null==eo?void 0:eo.promise)===l&&(eo.documentId=e.documentId)),await tG();let t=e.documentId?await ra(e.documentId,(null==eo?void 0:eo.promise)===l?eo:void 0):void 0,r=e.draft||(null==t?void 0:t.draft);if(!r)throw Error("生成结果为空");(e.documentId||(null==t?void 0:t.id))&&eQ(e.documentId||t.id),a.forEach(e=>window.clearTimeout(e)),eq(r),eO((null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown),(null==eo?void 0:eo.promise)===l&&(eo.draft=r,eo.content=(null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown);let s=t||{id:e.documentId||"draft-".concat(Date.now()),templateId:ek,title:r.title,requirement:r.requirement,projectRoot:r.projectRoot||th,projectId:r.projectId,markdown:r.markdown,status:r.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!r.exportGate.passed?"warning":"completed",draft:r,executionStages:r.executionStages,assets:r.assets||[],createdAt:r.generatedAt,updatedAt:Date.now()},{steps:n}=t$(s);tv(n),tZ(n,"done",!1),tf("done"),(null==eo?void 0:eo.promise)===l&&(eo.activeFlowKey="done",eo.loading=!1,ei(),eo=null),localStorage.removeItem(tW),await tG(),ey.success(ef("common.success")),window.setTimeout(()=>{var e;return null==(e=eb.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(r){localStorage.removeItem(tW);let e=r instanceof Error?r.message:ef("common.error"),t=/用户中止|abort|aborted/i.test(e);t||tv(t=>{let r=t.map(t=>"process"===t.status?{...t,status:"error",description:e,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)})(t,"error")}:t);return tZ(r,tj,!1),r}),(null==eo?void 0:eo.promise)===l&&(eo.loading=!1,eo.error=e,ei(),eo=null),await tG().catch(()=>void 0),t||ey.error(e)}finally{a.forEach(e=>window.clearTimeout(e)),eW(!1),(null==eo?void 0:eo.promise)===l&&(eo.loading=!1,ei())}},ro=(0,l.useRef)(!1);(0,l.useEffect)(()=>(tP.current&&(clearTimeout(tP.current),tP.current=null),!tS||"workflow"!==tN||tF||eV||ro.current||(null==eo?void 0:eo.loading)||null==tq||!tq.projectRoleConfigId||(ro.current=!0,tP.current=setTimeout(()=>{tP.current=null,tS&&"workflow"===tN&&!eV&&ek==ek&&rn()},300)),tS||(ro.current=!1),()=>{tP.current&&(clearTimeout(tP.current),tP.current=null)}),[tS,tN,tF,eV,tq,ek]);let ri=async e=>{try{eQ(e.id),eN(e.templateId),tC("workflow"),tk(!0),eW(!0);let t=await (0,ee.UQ)(e.id,e.projectRoot||th||void 0);localStorage.setItem(tW,t.documentId),await tG();let r=await ra(t.documentId);r.draft&&(eq(r.draft),eO(r.editedMarkdown||r.markdown||r.draft.markdown),tC("editor")),localStorage.removeItem(tW),await tG(),ey.success("已继续生成并完成")}catch(e){ey.error(e instanceof Error?e.message:"继续生成失败")}finally{eW(!1)}},rc=async e=>{if((null==eo?void 0:eo.loading)&&eo.documentId===e.id){var t;eo.aborted=!0,null==(t=eo.pollController)||t.abort(),eo.loading=!1,eo.error="用户中止",ei(),eo=null,eW(!1)}localStorage.removeItem(tW),t5(e.id);try{await (0,ee.r)(e.id,e.projectRoot||th||void 0),ey.success("已中止生成任务")}catch(e){ey.info("任务已不在运行,已刷新状态")}finally{await tG(),eV===e.id&&(eQ(null),tw(null),eq(null),eO(""))}},rd=async e=>{if(eG){eJ(e);try{eG.exportGate.passed||ey.warning("导出门禁存在风险项,已允许导出,请下载后人工复核。");let t={documentId:eV||void 0,title:eG.title,markdown:eH,format:e,enforceGate:!1,exportGate:eG.exportGate,useClientMarkdown:!0,projectRoot:eG.projectRoot||th||void 0},r=await (0,ee.UE)(t);if(((e,t,r)=>{let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),a=document.createElement("a");a.href=l,a.download=t,a.target="_self",a.rel="noopener",a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),a.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),1e3)})(r,"".concat(eG.title,".").concat("markdown"===e?"md":e),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[e]),eV)try{let{document:e}=await (0,ee.v7)(eV,!1,eG.projectRoot||th||void 0);e&&tm(e.exportReports||[])}catch(e){}}catch(e){ey.error(e instanceof Error?e.message:ef("common.error"))}finally{eJ(null)}}},ru=async()=>{if(eG)try{if(eV)await (0,ee.a6)(eV,{editedMarkdown:eH,markdown:eH},eG.projectRoot||th||void 0);else{let e=await (0,ee.Af)({...eG,markdown:eH});eq(e.draft)}await tG(),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rp=(e,t)=>{te(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},rx=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eZ(""),e5(null),e8(null),e7({start:0,end:0})},rm=(e,t)=>{var r,s;return{title:(null==eG?void 0:eG.title)||"未命名文档",markdown:t,instruction:e,facts:null==eG||null==(r=eG.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==eG||null==(s=eG.chapters)?void 0:s.map(e=>e.title),...(()=>{let e=e3.start,t=e3.end;return t>e?{selection:{start:e,end:t,text:eH.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},rh=async()=>{let e=eY.trim();if(!eG||!e||e$)return;let t=tL.current+1;tL.current=t,e0(!0),e2("planning"),e8(null);try{let r=await (0,ee.Gi)({mode:"plan",...rm(e,eH)});if(tL.current!==t||eV!=eV)return;if(!r.plan)throw Error("AI 未返回修改计划");e5(r.plan)}catch(e){tL.current===t&&ey.error(e instanceof Error?e.message:ef("common.error"))}finally{tL.current===t&&(e0(!1),e2("idle"))}},rg=async e=>{let t=eY.trim();if(!eG||!t||e$)return;let r=tL.current+1;tL.current=r,e0(!0),e2("applying");try{let s=await (0,ee.Gi)({mode:"apply",...rm(t,eH),plan:e});if(tL.current!==r||eV!=eV)return;if(!s.markdown)throw Error("AI 未返回修改结果");e8({plan:s.plan||e,markdown:s.markdown,beforeSnippet:s.beforeSnippet,afterSnippet:s.afterSnippet,summary:s.summary,changedChars:s.changedChars,prompt:t,before:eH})}catch(e){tL.current===r&&ey.error(e instanceof Error?e.message:ef("common.error"))}finally{tL.current===r&&(e0(!1),e2("idle"))}};if(eD)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(x.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(x.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(x.A,{active:!0,paragraph:{rows:8}})]});let rv="workflow"===tN?"工作流:".concat((null==tq?void 0:tq.name)||"选择模板"):"编辑:".concat((null==eG?void 0:eG.title)||(null==tq?void 0:tq.outputTitle)||"文档");return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 mb-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2.5 flex items-center gap-2",children:[(0,s.jsx)(C.A,{className:"text-[var(--colorAccent)]"}),ef("documents.title")]}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:ef("documents.description")})]}),(0,s.jsx)(p.Ay,{type:"primary",icon:(0,s.jsx)(O.A,{}),onClick:()=>t7(),className:"shadow-none rounded-lg",children:ef("documents.newTemplate")})]}),(0,s.jsxs)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl shadow-sm overflow-hidden",children:[(0,s.jsx)(m.A,{items:[{key:"templates",label:(0,s.jsxs)("span",{className:"px-4",children:["模板库 ",(0,s.jsx)(u.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eA.length})]})},{key:"drafts",label:(0,s.jsxs)("span",{className:"px-4",children:["生成记录 ",(0,s.jsx)(u.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eK.length})]})}],activeKey:tb,onChange:tA,className:"documents-tabs",size:"large",tabBarStyle:{margin:0,padding:"0 16px",background:"var(--colorBgHover)",borderBottom:"1px solid var(--borderColor)"}}),(0,s.jsx)("div",{className:"p-4 bg-[var(--colorFillAlter)] min-h-[500px]",children:"templates"===tb?0===eA.length?(0,s.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgContainer)]",children:(0,s.jsx)(h.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ef("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eA.map(e=>(0,s.jsxs)("div",{ref:t=>{tc.current[e.id]=t},className:"group flex items-center p-4 rounded-2xl transition-all cursor-pointer ".concat(ek===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>eN(e.id),children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0 pr-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2 min-w-0",children:[function(e,t){let r=ed[e]||(0,s.jsx)(D.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(e.category,ek===e.id),(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.name}),ek===e.id&&(0,s.jsx)(u.A,{color:"blue",className:"border-0 m-0 shrink-0",children:"当前选中"}),(0,s.jsx)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:e.category})]}),e.description&&(0,s.jsx)("div",{className:"text-sm text-[var(--colorTextSecondary)] line-clamp-2 leading-relaxed mb-3",children:e.description}),(e=>{let t=ta[e.id];if(!t)return null;let r=t.issues.filter(e=>"error"===e.level),l=t.issues.filter(e=>"warning"===e.level),a=to===e.id,n=t.roleDiagnostics||[],o=new Map;for(let e of t.promptDiagnostics){let t=o.get(e.roleId)||[];t.push(e),o.set(e.roleId,t)}let i=t.strategyPreview,c=(null==i?void 0:i.mode)==="strict"?"error":(null==i?void 0:i.mode)==="fast"?"blue":(null==i?void 0:i.mode)==="longform"?"purple":"green";return(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"flex flex-col items-start gap-2 w-full",children:[(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat(r.length?"border-red-200 bg-red-50/50":l.length?"border-yellow-200 bg-yellow-50/50":"border-green-200 bg-green-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:r.length?"检查未通过(".concat(r.length," 项阻断)"):l.length?"存在警告(".concat(l.length," 项)"):"检查通过"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["项目资料 ",t.fileDiagnostics.length]}),(0,s.jsxs)("span",{children:["提示词 ",t.promptDiagnostics.length]}),(0,s.jsxs)("span",{children:["角色链路 ",n.length]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)(u.A,{color:c,className:"border-0 m-0",children:[i.mode," 策略预估"]})]}),!r.length&&l.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsx)("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:()=>{rr(e.id)},children:"忽略警告并运行"})]}),(0,s.jsxs)("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:()=>ti(a?null:e.id),children:[a?(0,s.jsx)(q.A,{}):(0,s.jsx)(H.A,{}),a?"收起体检":"体检报告"]})]}),a&&(0,s.jsxs)("div",{className:"w-full flex flex-col gap-3 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-3",children:[r.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorError)]",children:["阻断项(",r.length,")— 必须修复后才能运行"]}),r.map(t=>{var r;let l=(r=t.message,/资料包|项目资料|知识库|索引/u.test(r)?{label:"配置模板",onClick:()=>t7(e)}:/提示词|绑定/u.test(r)?{label:"提示词库",href:"/prompt"}:/项目角色配置/u.test(r)?{label:"角色配置",href:"/document-roles"}:void 0);return(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2 rounded-lg border border-red-200 bg-red-50/40 px-2.5 py-1.5 text-xs",children:[(0,s.jsx)("span",{className:"text-[var(--colorText)]",children:t.message}),l&&(l.href?(0,s.jsxs)("a",{className:"shrink-0 text-red-500 hover:underline",href:l.href,children:[l.label," ›"]}):(0,s.jsxs)("span",{className:"shrink-0 text-red-500 cursor-pointer hover:underline",onClick:l.onClick,children:[l.label," ›"]}))]},t.message)})]}),l.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorWarning)]",children:["警告项(",l.length,")— 可忽略并继续运行"]}),l.map(e=>(0,s.jsx)("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50/40 px-2.5 py-1.5 text-xs text-[var(--colorTextSecondary)]",children:e.message},e.message))]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorText)]",children:["绑定链路(",t.configName||"未绑定角色配置",")"]}),0===n.length?(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:"未配置提示词角色链路"}):(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:n.map(r=>{let l=o.get(r.roleId)||[];return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs flex-wrap rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-2 py-1",children:[(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:e.name}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:t.configName||"角色配置"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),(0,s.jsx)("span",{className:"ok"===r.status?"text-[var(--colorText)]":"text-[var(--colorError)] font-medium",children:r.roleName||r.roleId}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),0===l.length?(0,s.jsx)(u.A,{color:"error",className:"border-0 m-0",children:"missing_resource"===r.status?"角色未绑定资源":"role_missing"===r.status?"角色不存在":"未绑定提示词"}):(0,s.jsx)("span",{className:"flex items-center gap-1 flex-wrap",children:l.map(e=>(0,s.jsx)(u.A,{color:e.exists&&e.contentLength>0?"success":e.exists?"warning":"error",className:"border-0 m-0",title:e.contentPreview||e.promptId,children:e.exists?"".concat(e.promptTitle||e.promptId," ").concat(e.contentLength,"字符"):"".concat(e.promptId," 已删除")},e.promptId))})]},r.roleId)})})]}),i&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-blue-200 bg-blue-50/40 px-2.5 py-2 text-xs",children:[(0,s.jsx)("span",{className:"font-bold text-[var(--colorText)]",children:"生成策略预估(生成前体检)"}),(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["约 ",i.chapterCount," 章 / 目标 ",i.targetWords>=1e4?"".concat((i.targetWords/1e4).toFixed(1)," 万字"):"".concat(i.targetWords," 字"),";章节并发 ",i.chapterConcurrency,";审查流水线 ",i.reviewConcurrency," 路;每章证据预算 ",Math.round(i.evidenceFloorChars/1e3),"k-",Math.round(i.evidenceCeilingChars/1e3),"k 字符;修复轮次预算 ",i.repairRoundBudget," 轮",i.globalReviewSamplingRate<1?";全局审查抽检 ".concat(Math.round(100*i.globalReviewSamplingRate),"%"):""]}),i.triggers.map(e=>(0,s.jsxs)("span",{className:"text-[var(--colorTextTertiary)]",children:["\xb7 ",e]},e))]}),(()=>{let r=t.referenceStructureSuggestion;return r&&0!==r.missingHeadings.length?(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-lg border border-purple-200 bg-purple-50/40 px-2.5 py-2 text-xs",children:[(0,s.jsxs)("span",{className:"font-bold text-[var(--colorText)]",children:["参考库大纲建议(",r.projectType," \xb7 ",r.sourceCount," 份同类工程画像)"]}),(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:"以下章节出现于半数以上同类工程但当前模板缺失,仅建议、不影响运行:"}),(0,s.jsx)("span",{className:"flex items-center gap-1 flex-wrap",children:r.missingHeadings.map(e=>(0,s.jsxs)(u.A,{className:"border-0 m-0 bg-white",children:[e.title," \xb7 ",Math.round(100*e.ratio),"% 样本"]},e.title))}),(0,s.jsx)("span",{children:(0,s.jsx)(p.Ay,{size:"small",type:"primary",ghost:!0,icon:(0,s.jsx)(O.A,{}),onClick:()=>void rl(e,r),className:"rounded-md",children:"一键添加到模板"})})]}):null})()]})]})})(e)]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(ek===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(p.Ay,{size:"small",onClick:t=>{t.stopPropagation(),t7(e)},className:"rounded-md",children:"配置"}),(0,s.jsx)(p.Ay,{size:"small",icon:(0,s.jsx)(K.A,{}),onClick:t=>{t.stopPropagation(),re(e.id)},className:"rounded-md"}),(0,s.jsx)(el,{title:ef("documents.deleteTemplateConfirm"),onConfirm:t=>{null==t||t.stopPropagation(),rt(e.id)},children:(0,s.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(W.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})}),(()=>{var t;let r=ta[e.id],l=null!=(t=null==r?void 0:r.issues.filter(e=>"error"===e.level).length)?t:0;return l>0?(0,s.jsxs)(p.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(U.A,{}),disabled:!!tF&&tF!==e.id,onClick:t=>{var r;t.stopPropagation(),eN(r=e.id),ti(r),window.setTimeout(()=>{var e;return null==(e=tc.current[r])?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})},50)},className:"min-w-[108px] rounded-md justify-center",children:["先修复 ",l," 个问题"]}):(0,s.jsx)(p.Ay,{size:"small",type:"primary",icon:tF===e.id?(0,s.jsx)(L.A,{}):(0,s.jsx)(V.A,{}),loading:tF===e.id,disabled:!!tF&&tF!==e.id,onClick:t=>{t.stopPropagation(),rr(e.id)},className:"min-w-[72px] rounded-md justify-center",children:tF===e.id?"准备中":"运行"})})()]})]},e.id))}):0===eK.length?(0,s.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgContainer)]",children:(0,s.jsx)(h.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ef("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eK.slice(0,15).map((e,t)=>{var r,l,a,n,o,i,c,d,x,m;let h,g;return(0,s.jsxs)("div",{className:"group flex items-center gap-4 p-4 rounded-2xl transition-all cursor-pointer ".concat(eV===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>{tX(e)},children:[(0,s.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,s.jsx)(F.A,{className:"text-xl text-[var(--colorOk)]"}):"failed"===e.status||"aborted"===e.status?(0,s.jsx)(G.A,{className:"text-xl text-[var(--colorDanger)]"}):"warning"===e.status?(0,s.jsx)(E.A,{className:"text-xl text-[var(--colorWarning)]"}):(0,s.jsx)(Q.A,{spin:!0,className:"text-xl text-blue-500"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0 pr-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.title}),(0,s.jsxs)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:["#",t+1]}),(0,s.jsx)(u.A,{color:"completed"===(h=e.status)?"success":"warning"===h?"warning":"failed"===h?"error":"aborted"===h?"default":"processing",className:"border-0 m-0 shrink-0",children:"completed"===(g=e.status)?"已完成":"warning"===g?"需复核":"failed"===g?"失败":"aborted"===g?"已中止":"生成中"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-xs text-[var(--colorTextSecondary)] mb-3",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(X.A,{})," ",new Date(e.updatedAt).toLocaleString()]}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),s=t%60;if(r<60)return s?"".concat(r," 分 ").concat(s," 秒"):"".concat(r," 分");let l=Math.floor(r/60),a=r%60;return a?"".concat(l," 小时 ").concat(a," 分"):"".concat(l," 小时")})(e)]}),e.partialChapters&&e.partialChapters.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["进度 ",e.partialChapters.filter(e=>"completed"===e.status).length,"/",e.partialChapters.length," 章"]}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["共 ",e.partialChapters.reduce((e,t)=>e+t.chars,0).toLocaleString()," 字"]})]})]}),("warning"===e.status||"failed"===e.status||"aborted"===e.status)&&(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat("failed"===e.status||"aborted"===e.status?"border-red-200 bg-red-50/50":"border-yellow-200 bg-yellow-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:"failed"===e.status?(null==(l=e.draft)||null==(r=l.exportGate)?void 0:r.passed)===!1?"门禁未通过":"生成失败":"aborted"===e.status?"已中止":"需复核"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsx)("span",{className:"truncate max-w-[400px]",children:e.error||(null==(a=e.warningIssues)?void 0:a[0])||(null==(o=e.draft)||null==(n=o.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:n.message)||(null==(d=e.draft)||null==(c=d.exportGate)||null==(i=c.checklist.find(e=>!e.passed))?void 0:i.label)||"需复核"})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(eV===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(p.Ay,{size:"small",type:"primary",icon:tJ(e.status)?(0,s.jsx)(Q.A,{spin:!0}):(0,s.jsx)(V.A,{}),onClick:t=>{t.stopPropagation(),tX(e)},className:"min-w-[72px] rounded-md justify-center",children:"打开"}),tJ(e.status)&&(0,s.jsx)(el,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),rc(e)},children:(0,s.jsx)(p.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),className:"rounded-md",children:"中止"})}),("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(x=e.checkpointChapters)?void 0:x.length)&&/继续生成|重新生成|中断|卡住|未完成/u.test(e.error||(null==(m=e.warningIssues)?void 0:m.join(";"))||""))&&(0,s.jsx)(p.Ay,{size:"small",onClick:t=>{t.stopPropagation(),ri(e)},className:"rounded-md",children:"继续"}),(0,s.jsx)(el,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),rs(e)},children:(0,s.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(W.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})})]})]},e.id)})})})]}),(0,s.jsx)(g.A,{title:rv,open:tS,onClose:()=>{for(let e of(tk(!1),t_.current.values()))clearInterval(e);t_.current.clear()},size:"large",mask:{closable:!1},style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eG?(0,s.jsxs)(i.A,{wrap:!0,children:[tY(ty)&&(0,s.jsx)(p.Ay,{icon:(0,s.jsx)(V.A,{}),disabled:e$||eL,onClick:()=>{ty&&ri(ty)},children:"继续生成"}),(0,s.jsx)(p.Ay,{icon:(0,s.jsx)(J.A,{}),disabled:e$,onClick:()=>{ru()},children:ef("documents.saveDraft")}),(0,s.jsx)(p.Ay,{icon:(0,s.jsx)(Y.A,{}),disabled:e$,loading:"markdown"===eX,onClick:()=>{rd("markdown")},children:"MD"}),(0,s.jsx)(p.Ay,{disabled:e$,loading:"html"===eX,onClick:()=>{rd("html")},children:"HTML"}),(0,s.jsx)(p.Ay,{disabled:e$,loading:"docx"===eX,onClick:()=>{rd("docx")},children:"DOCX"}),(0,s.jsx)(p.Ay,{type:"primary",disabled:e$,loading:"pdf"===eX,onClick:()=>{rd("pdf")},children:"PDF"})]}):tY(ty)?(0,s.jsx)(p.Ay,{type:"primary",icon:(0,s.jsx)(V.A,{}),loading:eL,onClick:()=>{ty&&ri(ty)},children:"继续生成"}):eL&&"workflow"===tN?(0,s.jsx)(p.Ay,{danger:!0,onClick:()=>{(async()=>{if(eV&&await (0,ee.r)(eV,th||void 0).catch(()=>void 0),eo){var e;eo.aborted=!0,null==(e=eo.pollController)||e.abort(),eo.loading=!1,eo.error="用户中止",ei(),eo=null}for(let e of(localStorage.removeItem(tW),t_.current.values()))clearInterval(e);t_.current.clear(),eW(!1),tv([]),tf(null),tk(!1),await tG(),ey.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,s.jsxs)(en,{style:{width:"100%"},gap:16,children:["workflow"===tN&&tg.length>0&&(0,s.jsx)(en,{gap:10,children:tg.map((e,t)=>{let r,l=tI.has(e.key),a=e.subSteps.length>8||e.description.length>240;return(0,s.jsxs)("div",{style:{display:"flex",gap:10,padding:10,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:t===tO?"var(--colorFillAlter)":"var(--colorBgContainer)"},children:[(0,s.jsx)("span",{children:"process"===e.status?(0,s.jsx)(L.A,{}):"warning"===e.status?(0,s.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):e.icon}),(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(es,{strong:!0,children:e.title}),(0,s.jsx)(u.A,{color:"finish"===e.status?"success":"error"===e.status?"error":"warning"===e.status?"warning":"process"===e.status?"processing":"default",children:"warning"===(r=e.status)?"finish":r}),(e=>{var t;let r=td.current.get(e.key);if(!r)return null;let l=t2((null!=(t=r.endedAt)?t:Date.now())-r.startedAt);return(0,s.jsx)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:r.endedAt?l:"".concat(l,"(运行中)")})})(e)]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12,whiteSpace:"pre-wrap"},children:((e,t)=>{let r=e.description.length>240,l=t?e.subSteps:e.subSteps.slice(0,8);return(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(u.A,{children:e.subtitle})}),(0,s.jsx)("div",{style:!t&&r?{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0,children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:l.map(e=>{var t;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"process"===e.status?"var(--colorPrimary)":"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,s.jsx)(L.A,{}):"finish"===t?(0,s.jsx)(F.A,{}):"warning"===t?(0,s.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(W.A,{}):(0,s.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,s.jsx)("span",{children:e.title})]},e.key)})})]})})(e,l)}),a&&(0,s.jsx)(p.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",marginTop:6},onClick:()=>{var t;return t=e.key,void tT(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},children:l?"收起":e.subSteps.length>8?"更多(".concat(e.subSteps.length," 条详情)"):"更多"})]})]},e.key)})}),"workflow"===tN&&(null==ty?void 0:ty.partialChapters)&&ty.partialChapters.length>0&&(0,s.jsx)(v.A,{size:"small",title:"章节进度",extra:(0,s.jsxs)(u.A,{color:"blue",children:[ty.partialChapters.filter(e=>"completed"===e.status).length,"/",ty.partialChapters.length]}),children:(0,s.jsx)(en,{gap:6,style:{width:"100%"},children:ty.partialChapters.map(e=>(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,fontSize:12},children:[(0,s.jsx)(es,{ellipsis:!0,style:{maxWidth:480},children:e.title}),(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(u.A,{color:"failed"===e.status?"error":"success",children:"failed"===e.status?"失败":"完成"}),(0,s.jsxs)(es,{type:"secondary",children:[e.chars.toLocaleString()," 字"]})]})]},e.id))})}),"workflow"===tN&&(null==ty||null==(t=ty.draft)||null==(e=t.exportGate)?void 0:e.passed)===!1&&(()=>{var e;let t=(null==(e=ty.draft.exportGate.blockingIssues)?void 0:e.map(e=>e.message))||ty.draft.exportGate.checklist.filter(e=>!e.passed).map(e=>e.label)||["存在阻断级校验错误"],r=tz?t:t.slice(0,6);return(0,s.jsx)(ea,{type:"error",title:"生成已完成,但导出门禁未通过",children:(0,s.jsxs)(i.A,{direction:"vertical",size:8,style:{width:"100%"},children:[(0,s.jsx)("span",{children:"阻断项:".concat(r.join(";")).concat(t.length>6&&!tz?"…(共 ".concat(t.length," 项)"):"","。可点击继续生成触发自动修复,或在“校验”页查看完整问题。")}),t.length>6&&(0,s.jsx)(p.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",alignSelf:"flex-start"},onClick:()=>tR(e=>!e),children:tz?"收起":"查看全部 ".concat(t.length," 项")}),tY(ty)&&(0,s.jsx)(p.Ay,{type:"primary",size:"small",icon:(0,s.jsx)(V.A,{}),loading:eL,onClick:()=>{ri(ty)},children:"继续生成 / 自动修复"})]})})})(),"workflow"===tN&&(null==ty||null==(r=ty.reviewMetadata)?void 0:r.diagnostics)&&(0,s.jsx)(ea,{type:"info",title:"后台自动优化",children:"策略:".concat(ty.reviewMetadata.diagnostics.strategy.mode,";LLM 调用 ").concat(ty.reviewMetadata.diagnostics.llm.calls," 次;噪声过滤 ").concat((null==(a=ty.reviewMetadata.diagnostics.evidence)?void 0:a.filteredNoise)||0," 条;质量门禁 阻断").concat((null==(o=ty.reviewMetadata.diagnostics.quality)?void 0:o.blockingCount)||0,"/重要").concat((null==(M=ty.reviewMetadata.diagnostics.quality)?void 0:M.importantCount)||0,"/轻微").concat((null==(P=ty.reviewMetadata.diagnostics.quality)?void 0:P.minorCount)||0,";自动限流调整 ").concat(ty.reviewMetadata.diagnostics.llm.limitAdjustments," 次。审查与诊断信息仅用于系统修复,不会写入正文或导出文件。")}),"workflow"===tN&&(null==ty||null==(eh=ty.draft)?void 0:eh.promptRules)&&(()=>{let e=ty.draft.promptRules,t=e.executionSummary||[],r=Object.entries(e.ruleSources||{}).filter(e=>{let[,t]=e;return t.length>0}),l=r.length>0,a=tM?r:r.slice(0,3);return(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(E.A,{style:{color:"var(--colorAccent)"}}),"提示词规则生效报告",t.length>0&&(0,s.jsxs)(u.A,{style:{margin:0},children:[t.length," 条"]})]}),styles:{body:{padding:12}},children:(0,s.jsxs)(en,{gap:6,children:[t.length>0&&t.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",gap:6,fontSize:12,color:"var(--colorText)",lineHeight:1.6},children:[(0,s.jsx)(F.A,{style:{color:"var(--colorSuccess)",marginTop:4}}),(0,s.jsx)("span",{children:e})]},t)),l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.A,{style:{margin:"4px 0"}}),(0,s.jsx)(es,{type:"secondary",style:{fontSize:12},children:"规则溯源(自动从以下提示词中抽取):"}),a.map(e=>{let[t,r]=e;return(0,s.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)",lineHeight:1.6},children:[(0,s.jsx)(es,{strong:!0,style:{fontSize:12},children:t}),":",r.map(e=>"".concat(e.roleId,"「").concat(e.matchedText.length>24?"".concat(e.matchedText.slice(0,24),"…"):e.matchedText,"」")).join("、")]},t)}),r.length>3&&(0,s.jsx)(p.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",alignSelf:"flex-start"},onClick:()=>tE(e=>!e),children:tM?"收起溯源":"查看全部溯源(".concat(r.length," 类)")})]}),!l&&0===t.length&&(0,s.jsx)(es,{type:"secondary",style:{fontSize:12},children:"未从提示词中识别到额外硬规则,使用系统默认质量规则。"})]})})})(),"workflow"===tN&&(null==ty||null==(ev=ty.draft)||null==(eg=ev.reviewMetadata)?void 0:eg.qualityBenchmark)&&(()=>{let e=ty.draft.reviewMetadata.qualityBenchmark;return(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(Z.A,{style:{color:"#faad14"}}),"质量对标",(0,s.jsxs)(u.A,{color:"gold",style:{margin:0},children:[e.projectType,"参考"]})]}),extra:(0,s.jsxs)(es,{strong:!0,style:{fontSize:15,color:e.overallScore>=80?"var(--colorSuccess)":"var(--colorWarning)"},children:[e.overallScore," 分"]}),styles:{body:{padding:12}},children:(0,s.jsxs)(en,{gap:8,children:[(0,s.jsxs)(es,{type:"secondary",style:{fontSize:12},children:["与模板参考库 ",e.referenceSourceCount," 份同类入围文件的质量画像对比:"]}),e.items.map(e=>(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,s.jsx)("div",{style:{width:86,fontSize:12,color:"var(--colorTextSecondary)",flexShrink:0},children:e.label}),(0,s.jsx)(f.A,{percent:Math.min(100,e.score),size:"small",status:e.passed?"normal":"exception",style:{flex:1,margin:0},showInfo:!1}),(0,s.jsxs)("div",{style:{width:96,fontSize:12,textAlign:"right",flexShrink:0,color:e.passed?"var(--colorSuccess)":"var(--colorWarning)"},children:[e.passed?(0,s.jsx)(F.A,{style:{marginRight:4}}):(0,s.jsx)($.A,{style:{marginRight:4}}),t6(e.generated,e.unit)]})]},e.key)),(0,s.jsxs)(es,{type:"secondary",style:{fontSize:12},children:["基准参考值:",e.items.map(e=>"".concat(e.label," ").concat(t6(e.reference,e.unit))).join(";")]})]})})})(),"workflow"===tN&&eL&&0===tg.length&&(0,s.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在准备生成…"})]}),"editor"===tN&&(null==eG||null==(ej=eG.reviewMetadata)?void 0:ej.qualityBenchmark)&&(()=>{var e;let t=eG.reviewMetadata.qualityBenchmark,r=null==(e=eG.reviewMetadata.diagnostics)?void 0:e.quality,l=(eG.executionStages||[]).filter(e=>"llm_review"===e.type||"quality-repair"===e.roleId).flatMap(e=>(e.details||[]).filter(e=>/修复|补写|补齐|改进|调整/u.test(e))).slice(0,8);return(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(Z.A,{style:{color:"#faad14"}}),"运行质量报告",(0,s.jsxs)(u.A,{color:"gold",className:"border-0 m-0",children:[t.projectType,"对标"]})]}),extra:(0,s.jsxs)(es,{strong:!0,style:{fontSize:15,color:t.overallScore>=80?"var(--colorSuccess)":"var(--colorWarning)"},children:[t.overallScore," 分"]}),styles:{body:{padding:12}},children:(0,s.jsxs)(en,{gap:8,children:[(0,s.jsxs)(i.A,{wrap:!0,size:6,children:[(0,s.jsxs)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:["对标库 ",t.referenceSourceCount," 份同类文件"]}),r&&(0,s.jsxs)(u.A,{color:r.blockingCount>0?"error":"success",className:"border-0 m-0",children:["审查修复 ",r.repairedCount," 项 / 问题 ",r.blockingCount+r.importantCount+r.minorCount," 项"]}),(0,s.jsxs)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:[t.items.filter(e=>e.passed).length,"/",t.items.length," 指标达标"]})]}),l.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-[var(--colorText)]",children:"修复记录(审查阶段自动修复的内容)"}),l.map((e,t)=>(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:["\xb7 ",e]},t))]}),(0,s.jsxs)(es,{type:"secondary",style:{fontSize:12},children:["基准参考值:",t.items.map(e=>"".concat(e.label," ").concat(t6(e.reference,e.unit))).join(";")]})]})})})(),"editor"===tN&&tx.length>0&&(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(Y.A,{}),"导出闭环报告",(0,s.jsx)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:tx.length})]}),styles:{body:{padding:12}},children:(0,s.jsx)(en,{gap:6,children:[...tx].reverse().map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2 text-xs",children:[(0,s.jsx)(es,{strong:!0,children:e.format.toUpperCase()}),(0,s.jsx)(u.A,{color:"blue",className:"border-0 m-0",children:new Date(e.exportedAt).toLocaleString()}),void 0!==e.durationMs&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["总用时 ",t2(e.durationMs)]}),void 0!==e.benchmarkScore&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["质量对标 ",e.benchmarkScore," 分"]}),void 0!==e.repairedCount&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["修复 ",e.repairedCount," 项",void 0!==e.blockingCount?"(阻断 ".concat(e.blockingCount,")"):""]}),e.ruleSummary&&e.ruleSummary.length>0&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["规则 ",e.ruleSummary.length," 条"]}),!1===e.gatePassed&&(0,s.jsx)(u.A,{color:"error",className:"border-0 m-0",children:"门禁未过"})]},"".concat(e.exportedAt,"-").concat(t)))})}),eG&&(0,s.jsx)("div",{ref:eb,children:(0,s.jsx)(m.A,{items:[{key:"edit",label:ef("documents.edit"),children:(0,s.jsxs)(en,{gap:16,style:{width:"100%"},children:[(0,s.jsx)(er,{rows:28,value:eH,disabled:e$,onSelect:e=>{var t,r,s;return e7({start:null!=(t=e.currentTarget.selectionStart)?t:0,end:null!=(s=null!=(r=e.currentTarget.selectionEnd)?r:e.currentTarget.selectionStart)?s:0})},onChange:e=>{var t,r,s;eO(e.target.value),e5(null),e8(null),e7({start:null!=(t=e.target.selectionStart)?t:0,end:null!=(s=null!=(r=e.target.selectionEnd)?r:e.target.selectionStart)?s:0})}}),(0,s.jsx)(v.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,s.jsxs)(en,{gap:16,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(B.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(es,{strong:!0,children:"精准修改"}),(0,s.jsx)(u.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(p.Ay,{size:"small",icon:(0,s.jsx)(X.A,{}),onClick:()=>tr(e=>!e),disabled:0===e9.length,children:["历史版本 ",e9.length>0?e9.length:""]})]}),(0,s.jsx)(ea,{type:"info",title:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,s.jsx)(er,{rows:4,value:eY,disabled:e$,onChange:e=>{eZ(e.target.value),e5(null),e8(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,s.jsxs)(i.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(i.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,s.jsx)(p.Ay,{size:"small",disabled:e$,onClick:()=>eZ(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(p.Ay,{type:"primary",icon:(0,s.jsx)(B.A,{}),loading:e$&&"planning"===e1,disabled:!eY.trim()||e$,onClick:()=>{rh()},children:"识别修改范围"})]}),e6&&!e4&&(0,s.jsx)(v.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,s.jsxs)(en,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(u.A,{color:"purple",children:e6.scope}),(0,s.jsx)(u.A,{color:"blue",children:e6.action}),(0,s.jsxs)(u.A,{color:e6.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*e6.confidence),"%"]}),e6.targetTitle&&(0,s.jsx)(es,{strong:!0,children:e6.targetTitle})]}),(0,s.jsx)(es,{children:e6.summary}),(0,s.jsx)(es,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,s.jsxs)(i.A,{children:[(0,s.jsx)(p.Ay,{type:"primary",loading:e$&&"applying"===e1,onClick:()=>{rg(e6)},children:"执行并预览"}),(0,s.jsx)(p.Ay,{disabled:e$,onClick:()=>e5(null),children:"取消"})]})]})}),e4&&(0,s.jsx)(v.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,s.jsxs)(en,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(u.A,{color:"green",children:"修改预览"}),(0,s.jsx)(es,{children:e4.summary||e4.plan.summary}),(0,s.jsxs)(u.A,{children:[e4.changedChars&&e4.changedChars>0?"+".concat(e4.changedChars):e4.changedChars," 字符"]})]}),(0,s.jsxs)(w.A,{gutter:12,children:[(0,s.jsxs)(b.A,{span:12,children:[(0,s.jsx)(es,{strong:!0,children:"修改前"}),(0,s.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e4.beforeSnippet||"无片段预览"})]}),(0,s.jsxs)(b.A,{span:12,children:[(0,s.jsx)(es,{strong:!0,children:"修改后"}),(0,s.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e4.afterSnippet||"无片段预览"})]})]}),(0,s.jsxs)(i.A,{children:[(0,s.jsx)(p.Ay,{type:"primary",onClick:()=>{e4&&(rp(e4.before,e4.prompt),eO(e4.markdown),rx(!0),ey.success("已应用精准修改"))},children:"应用到文档"}),(0,s.jsx)(p.Ay,{onClick:()=>e8(null),children:"返回计划"}),(0,s.jsx)(p.Ay,{danger:!0,onClick:()=>{e5(null),e8(null)},children:"放弃"})]})]})}),tt&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(A.A,{size:"small",dataSource:e9,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(A.A.Item,{actions:[(0,s.jsx)(p.Ay,{size:"small",disabled:e$,onClick:()=>{rp(eH,"恢复前版本"),eO(e.content),rx(!0),ey.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(A.A.Item.Meta,{title:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(es,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(u.A,{children:e.prompt})]}),description:(0,s.jsx)(es,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eG.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eG.chapters.length,")"]}),(0,s.jsx)(A.A,{size:"small",dataSource:eG.chapters,renderItem:e=>(0,s.jsx)(A.A.Item,{children:(0,s.jsx)(A.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eG.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eG.structuredFacts.length,")"]}),(0,s.jsx)(S.A,{size:"small",column:1,bordered:!0,children:eG.structuredFacts.map((e,t)=>(0,s.jsxs)(S.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(u.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(es,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eG.sources.length,")"]}),0===eG.sources.length?(0,s.jsx)(h.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eG.sources.map(e=>(0,s.jsxs)(u.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eG.missingItems.length,")"]}),0===eG.missingItems.length?(0,s.jsx)(h.A,{description:"无缺失"}):(0,s.jsx)(A.A,{size:"small",dataSource:eG.missingItems,renderItem:e=>(0,s.jsx)(A.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eG.validationIssues.length,")"),children:0===eG.validationIssues.length?(0,s.jsx)(h.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eG.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(u.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,s.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,s.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eG.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(A.A,{size:"small",dataSource:eG.exportGate.checklist,renderItem:e=>(0,s.jsxs)(A.A.Item,{children:[(0,s.jsx)(es,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(u.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eG.executionStages.length,")"),children:(0,s.jsx)(A.A,{size:"small",dataSource:eG.executionStages,renderItem:e=>(0,s.jsxs)(A.A.Item,{children:[(0,s.jsx)(A.A.Item.Meta,{avatar:ec[e.type]||(0,s.jsx)(D.A,{}),title:(0,s.jsx)(es,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(ex[e.type]||e.type," \xb7 ").concat(e.roleName||tK(e.roleId))}),description:(0,s.jsx)(es,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(u.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,s.jsx)(g.A,{title:ef("documents.templateEditor"),open:ts,onClose:()=>tl(!1),size:"large",mask:{closable:!1},styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(p.Ay,{onClick:()=>tl(!1),children:ef("common.cancel")}),(0,s.jsx)(p.Ay,{type:"primary",onClick:()=>{t9()},children:ef("common.save")})]}),children:(0,s.jsxs)(d.A,{form:ew,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(w.A,{gutter:12,children:[(0,s.jsx)(d.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"name",label:ef("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"category",label:ef("documents.templateCategory"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"outputTitle",label:ef("documents.outputTitle"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:12,children:(0,s.jsx)(d.A.Item,{name:"description",label:ef("documents.templateDescription"),children:(0,s.jsx)(n.A,{})})})]}),(0,s.jsx)(d.A.Item,{name:"projectRoleConfigId",label:ef("documents.projectRoleConfig"),rules:[{required:!0,message:ef("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(k.A,{showSearch:!0,placeholder:ef("documents.projectRoleConfigRequired"),options:tH})}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(es,{strong:!0,className:"text-base text-[var(--colorText)] block mb-1",children:"项目资料包绑定"}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:"直接选择整个项目文件夹,系统会自动识别招标正文、清单、图纸、补疑等资料类型。"})]}),(0,s.jsx)(u.A,{color:"blue",className:"border-0",children:"按项目资料包"})]}),eB?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("div",{className:"mt-3 text-[var(--colorTextSecondary)] text-xs",children:"正在加载知识库文件…"})]}):0===eE.length?(0,s.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):(0,s.jsx)(d.A.Item,{name:"projectMaterialRoots",rules:[{required:!0,message:"请选择项目资料包"}],children:(0,s.jsx)(N.A,{treeData:eE,loadData:t3,fieldNames:{label:"rawTitle",value:"value",children:"children"},onChange:e=>{var t;return t=e.map(e=>String(e)),void ew.setFieldValue("projectMaterialRoots",eu(t))},treeCheckable:!0,showCheckedStrategy:N.A.SHOW_PARENT,placeholder:"点击这里选择项目文件夹...",style:{width:"100%"},listHeight:360,showSearch:!0,maxTagCount:"responsive",size:"large"})})]})]})})]})}}},e=>{e.O(0,[717,883,69,700,44,224,787,195,455,506,930,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
|
|
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:()=>eh});var s=r(65321),l=r(97109),a=r(26171),n=r(7576),o=r(35292),i=r(33442),c=r(17807),d=r(63455),u=r(11702),p=r(85114),x=r(88762),m=r(58569),h=r(84253),g=r(34052),v=r(68787),j=r(55122),f=r(99605),y=r(42700),w=r(2256),b=r(38770),A=r(38332),S=r(76506),k=r(50883),N=r(23718),C=r(23216),I=r(26619),T=r(8263),z=r(16285),R=r(8579),M=r(75548),E=r(7851),F=r(84742),B=r(29071),_=r(63552),D=r(26631),P=r(7225),L=r(83914),W=r(58209),G=r(38762),q=r(8470),H=r(92783),O=r(54746),K=r(93051),U=r(82930),V=r(64068),Q=r(64629),X=r(1310),J=r(67547),Y=r(76830),Z=r(14568),$=r(37799),ee=r(6578),et=r(47085);let{TextArea:er}=n.A,{Text:es}=o.A,el=a.A;function ea(e){let{type:t="info",title:r,children:l,style:a}=e,n="error"===t?"var(--colorError)":"warning"===t?"var(--colorWarning)":"success"===t?"var(--colorSuccess)":"var(--colorInfo)";return(0,s.jsxs)("div",{style:{border:"1px solid ".concat(n),background:"error"===t?"var(--colorErrorBg)":"warning"===t?"var(--colorWarningBg)":"success"===t?"var(--colorSuccessBg)":"var(--colorInfoBg)",borderRadius:8,padding:"9px 12px",...a},children:[(0,s.jsx)(es,{strong:!0,style:{color:n},children:r}),l&&(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:l})]})}function en(e){let{children:t,gap:r=12,style:l}=e;return(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:r,...l},children:t})}let eo=null;function ei(){null==eo||eo.listeners.forEach(e=>e())}let ec={role_binding:(0,s.jsx)(C.A,{}),knowledge_retrieval:(0,s.jsx)(I.A,{}),file_understanding:(0,s.jsx)(T.A,{}),fact_extraction:(0,s.jsx)(z.A,{}),chapter_generation:(0,s.jsx)(R.A,{}),asset_generation:(0,s.jsx)(M.A,{}),validation:(0,s.jsx)(E.A,{}),formatting:(0,s.jsx)(F.A,{}),llm_review:(0,s.jsx)(B.A,{}),export_ready:(0,s.jsx)(_.A,{}),reference:(0,s.jsx)(M.A,{})},ed={施工组织设计:(0,s.jsx)(E.A,{}),投标文件:(0,s.jsx)(_.A,{}),技术方案:(0,s.jsx)(z.A,{}),报告:(0,s.jsx)(D.A,{}),自定义:(0,s.jsx)(R.A,{})};function eu(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function ep(e){return e.map(e=>({key:e.key,value:e.key,rawTitle:e.title,title:e.isFolder?(0,s.jsxs)("div",{className:"flex items-center justify-between w-full pr-4",children:[(0,s.jsxs)(i.A,{size:4,children:[(0,s.jsx)(P.A,{style:{color:"#faad14"}}),(0,s.jsx)("span",{children:e.title})]}),(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:[e.fileCount||0," 项"]})]}):(0,s.jsx)("span",{title:e.key,children:e.title}),isFolder:e.isFolder,fileCount:e.fileCount||+!e.isFolder,isLeaf:e.isLeaf}))}let ex={role_binding:"角色配置绑定",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},em={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function eh(){var e,t,r,a,o,M,P,eh,eg,ev,ej;let ef=(0,et.Vr)(),{message:ey}=c.A.useApp(),[ew]=d.A.useForm(),eb=(0,l.useRef)(null),[eA,eS]=(0,l.useState)([]),[ek,eN]=(0,l.useState)("construction-organization-design"),[eC,eI]=(0,l.useState)([]),[eT,ez]=(0,l.useState)([]),[eR,eM]=(0,l.useState)([]),[eE,eF]=(0,l.useState)([]),[eB,e_]=(0,l.useState)(!1),[eD,eP]=(0,l.useState)(!0),[eL,eW]=(0,l.useState)(!1),[eG,eq]=(0,l.useState)(null),[eH,eO]=(0,l.useState)(""),[eK,eU]=(0,l.useState)([]),[eV,eQ]=(0,l.useState)(null),[eX,eJ]=(0,l.useState)(null),[eY,eZ]=(0,l.useState)(""),[e$,e0]=(0,l.useState)(!1),[e1,e2]=(0,l.useState)("idle"),[e6,e5]=(0,l.useState)(null),[e4,e8]=(0,l.useState)(null),[e3,e7]=(0,l.useState)({start:0,end:0}),[e9,te]=(0,l.useState)([]),[tt,tr]=(0,l.useState)(!1),[ts,tl]=(0,l.useState)(!1),[ta,tn]=(0,l.useState)({}),[to,ti]=(0,l.useState)(null),tc=(0,l.useRef)({}),td=(0,l.useRef)(new Map),[tu,tp]=(0,l.useState)(0),[tx,tm]=(0,l.useState)([]),th=(0,l.useMemo)(()=>{var e,t,r;return(null==(e=eR.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=eR.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=eR[0])?void 0:r.projectRoot)||""},[eR]),[tg,tv]=(0,l.useState)([]),[tj,tf]=(0,l.useState)(null),[ty,tw]=(0,l.useState)(null),[tb,tA]=(0,l.useState)("templates"),[tS,tk]=(0,l.useState)(!1),[tN,tC]=(0,l.useState)("workflow"),[tI,tT]=(0,l.useState)(new Set),[tz,tR]=(0,l.useState)(!1),[tM,tE]=(0,l.useState)(!1),[tF,tB]=(0,l.useState)(null),t_=(0,l.useRef)(new Map),tD=(0,l.useRef)(""),tP=(0,l.useRef)(null),tL=(0,l.useRef)(0),tW=(0,l.useMemo)(()=>"activeGenDocId:".concat(th||"default"),[th]),tG=async()=>{try{eU((await (0,ee.cQ)(th||void 0)).documents)}catch(e){eU([])}};(0,l.useEffect)(()=>{let e=()=>{eo&&(tv(eo.flowSteps),tf(eo.activeFlowKey),eW(eo.loading),eo.documentId&&eQ(eo.documentId),eo.draft&&eq(eo.draft),void 0!==eo.content&&eO(eo.content))},t=eo;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{eP(!0),Promise.all([(0,ee.Dl)().then(e=>{var t,r;eS(e.templates),eN(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,ee.lv)().then(e=>{eI(e.roles),ez(e.configs)}),(0,ee.dx)().then(e=>eM(e))]).catch(()=>ey.error(ef("common.error"))).finally(()=>eP(!1))},[ey,ef]),(0,l.useEffect)(()=>{if(0===eA.length||!th)return;let e=!1;return(async()=>{let t=await Promise.all(eA.map(async e=>{try{let{validation:t}=await (0,ee.SM)(e.id,th);return[e.id,t]}catch(e){return null}}));if(e)return;let r={};for(let e of t)e&&(r[e[0]]=e[1]);tn(r)})(),()=>{e=!0}},[eA,th]),(0,l.useEffect)(()=>{th&&(localStorage.removeItem("activeGenDocId"),tG())},[th]),(0,l.useEffect)(()=>{if(0===eK.length)return;let e=localStorage.getItem(tW);if(!e)return;if(!eK.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem(tW);let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,ee.v7)(e,!1,th||void 0);if(!r)return;await tG(),"generating"!==r.status&&(localStorage.removeItem(tW),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eK]);let tq=(0,l.useMemo)(()=>eA.find(e=>e.id===ek),[eA,ek]),tH=eT.map(e=>({label:e.name,value:e.id})),tO=Math.max(0,tg.findIndex(e=>e.key===tj)),tK=e=>{var t;return e?(null==(t=eC.find(t=>t.id===e))?void 0:t.name)||em[e]||"未知角色":""},tU=e=>e.subtitle||e.roleName||tK(e.roleId)||ex[e.type]||e.type,tV=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=eR.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=eC.find(e=>e.id===t))?void 0:s.name)||em[t]||"未知提示词":"")},tQ=()=>{tL.current+=1,eZ(""),e5(null),e8(null),te([]),tr(!1),e0(!1),e2("idle")},tX=async e=>{eQ(e.id),eN(e.templateId);let t=tJ(e.status);if(t||"failed"===e.status||"aborted"===e.status){tQ(),tw(e),eq(null),eO(""),eW(t),tC("workflow"),tk(!0);try{let{document:t}=await (0,ee.v7)(e.id,!1,e.projectRoot||th||void 0);if(!t)throw Error("文档记录不存在");t0(t),tJ(t.status)?t4(t.id,t.projectRoot||e.projectRoot||th||void 0):await tG()}catch(t){t0(e)}return}tC("editor"),tv([]),tf(null),tQ();try{let{document:t}=await (0,ee.v7)(e.id,!1,e.projectRoot||th||void 0);if(!t)throw Error("文档记录不存在");eq(t.draft||null),eO(t.editedMarkdown||t.markdown),tm(t.exportReports||[])}catch(e){ey.error(ef("common.error"))}tk(!0)},tJ=e=>"completed"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tY=e=>{var t,r,s,l,a,n;return!!e&&("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(t=e.checkpointChapters)?void 0:t.length)&&/继续生成|重新生成|中断|卡住|未完成|门禁|阻断/u.test(e.error||(null==(r=e.warningIssues)?void 0:r.join(";"))||(null==(a=e.draft)||null==(l=a.exportGate)||null==(s=l.blockingIssues)?void 0:s.map(e=>e.message).join(";"))||"")||!!((null==(n=e.draft)?void 0:n.exportGate)&&!1===e.draft.exportGate.passed))},tZ=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eL;(null==eo?void 0:eo.loading)&&(eo.flowSteps=e,eo.activeFlowKey=t,eo.loading=r,ei())},t$=e=>{var t,r,l,a,n;let o=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(o.length>0){let t=o.map((t,r)=>{var l;let a,n=("failed"===e.status||"aborted"===e.status)&&"running"===t.status||"failed"===(a=t.status)?"error":"running"===a?"process":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||ex[t.type]||t.type,subtitle:tU(t),description:t.message||"",status:n,icon:"role_binding"===(l=t.type)?(0,s.jsx)(C.A,{}):"knowledge_retrieval"===l?(0,s.jsx)(I.A,{}):"file_understanding"===l?(0,s.jsx)(T.A,{}):"fact_extraction"===l?(0,s.jsx)(z.A,{}):"chapter_generation"===l?(0,s.jsx)(R.A,{}):"llm_review"===l?(0,s.jsx)(B.A,{}):"validation"===l?(0,s.jsx)(E.A,{}):"formatting"===l?(0,s.jsx)(F.A,{}):"export_ready"===l?(0,s.jsx)(_.A,{}):(0,s.jsx)(D.A,{}),subSteps:((e,t,r)=>{let s=Array.isArray(e.details)?e.details.filter(Boolean):[],l=e.progress?"".concat(e.progress.label||"进度",":").concat(e.progress.current,"/").concat(e.progress.total):"",a=[...l?[l]:[],...s];return 0===a.length?[{key:"stage-".concat(r),title:tV(e)?"提示词:".concat(tV(e)):tU(e),status:t}]:a.map((e,s)=>({key:"stage-".concat(r,"-").concat(s),title:e,status:"process"===t&&0===s?"process":"error"===t&&0===s?"error":"warning"===t?"warning":"process"===t?"finish":t}))})(t,n,r)}});"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 i="generating"===e.status?(null==(l=t.at(-1))?void 0:l.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(a=t.find(e=>"error"===e.status))?void 0:a.key)||(null==(n=t.at(-1))?void 0:n.key)||"prepare":"done";return{steps:t,activeKey:i}}return{steps:[],activeKey:null}},t0=e=>{let t=e.executionStages||[],r="".concat(e.id,"|").concat(e.updatedAt,"|").concat(e.status,"|").concat(e.error||"","|").concat(t.length,"|").concat(t.map(e=>{var t,r,s,l;return"".concat(e.status,":").concat(null!=(s=null==(t=e.progress)?void 0:t.current)?s:0,"/").concat(null!=(l=null==(r=e.progress)?void 0:r.total)?l:0)}).join(","));if(tD.current===r)return;tD.current=r,tw(e);let{steps:s,activeKey:l}=t$(e);t1(s),tv(s),tf(l),eW(tJ(e.status)),tZ(s,l,tJ(e.status)),("failed"===e.status||"aborted"===e.status)&&tC("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(eq(e.draft),eO(e.editedMarkdown||e.markdown),tC("editor"),tv([]),tf(null),tm(e.exportReports||[]))},t1=e=>{let t=Date.now();for(let r of e){let e=td.current.get(r.key);"process"!==r.status||e?("finish"===r.status||"error"===r.status||"warning"===r.status)&&e&&!e.endedAt&&td.current.set(r.key,{...e,endedAt:t}):td.current.set(r.key,{startedAt:t})}},t2=e=>{let t=Math.max(0,Math.round(e/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60);return r<60?"".concat(r," 分 ").concat(t%60," 秒"):"".concat(Math.floor(r/60)," 小时 ").concat(r%60," 分")},t6=(e,t)=>"percent"===t?"".concat((100*e).toFixed(1),"%"):"perKChars"===t?"".concat(e.toFixed(1),"/千字"):String(Math.round(e)),t5=e=>{let t=t_.current.get(e);t&&(clearInterval(t),t_.current.delete(e))},t4=(e,t)=>{t5(e);let r=setInterval(()=>{(async()=>{try{let{document:r}=await (0,ee.v7)(e,!0,t||th||void 0);if(!r)return;t0(r),await tG(),tJ(r.status)||(t5(e),localStorage.removeItem(tW))}catch(e){}})()},2e3);t_.current.set(e,r)};(0,l.useEffect)(()=>()=>{for(let e of t_.current.values())clearInterval(e);t_.current.clear(),tP.current&&(clearTimeout(tP.current),tP.current=null)},[]),(0,l.useEffect)(()=>{if(!eL||!tj)return;let e=window.setInterval(()=>tv(e=>{let t=e.map(e=>{if(e.key!==tj||"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 tZ(t,tj),t}),1400);return()=>window.clearInterval(e)},[tj,eL]),(0,l.useEffect)(()=>{if(!eL)return;let e=window.setInterval(()=>tp(e=>e+1),1e3);return()=>window.clearInterval(e)},[eL]);let t8=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e_(!0);try{let t=await (0,ee.Fi)(e,th||void 0);eF(ep(t.nodes))}catch(e){ey.error("知识库文件加载失败")}finally{e_(!1)}},t3=async e=>{var t;let r=String(null!=(t=e.key)?t:"");if(r)try{let e=await (0,ee.Fi)(r,th||void 0),t=ep(e.nodes),s=e=>e.map(e=>e.key===r?{...e,children:t}:e.children?{...e,children:s(e.children)}:e);eF(e=>s(e))}catch(e){ey.error("加载子文件夹失败")}},t7=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],projectBindings:[]};ew.resetFields(),ew.setFieldsValue({...t,projectMaterialRoots:eu((t.projectBindings||[]).map(e=>e.materialRootPath).filter(Boolean))}),t8(),tl(!0)},t9=async()=>{try{await ew.validateFields();let e=ew.getFieldsValue(!0),t=eu(e.projectMaterialRoots||[]).map(e=>({materialRootPath:e})),{projectMaterialRoots:r,...s}=e,l={...s,chapters:[],projectBindings:t},a=await (0,ee.l2)(l);eS(a.templates),eN(a.template.id),tl(!1),await tG(),ey.success(ef("common.success"))}catch(e){e instanceof Error&&ey.error(e.message)}},re=async e=>{try{let t=await (0,ee.bV)(e);eS(t.templates),eN(t.template.id),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rt=async e=>{try{var t,r;let s=await (0,ee.h0)(e);eS(s.templates),eN(null!=(r=null==(t=s.templates[0])?void 0:t.id)?r:""),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rr=async e=>{tB(e),eN(e),eQ(null),eq(null),eO(""),tQ(),tC("workflow"),tk(!0),tA("drafts"),eW(!0),tf("prepare"),tv([{key:"prepare",title:"正在准备运行模板",description:"正在校验模板绑定的项目资料包、提示词配置和资料索引,校验通过后会自动开始生成。",status:"process",icon:(0,s.jsx)(L.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"process"},{key:"start",title:"准备生成任务",status:"wait"}]}]);try{let{validation:t}=await (0,ee.SM)(e,th||void 0);tn(r=>({...r,[e]:t}));let r=t.issues.filter(e=>"error"===e.level);if(r.length>0){ro.current=!0,eW(!1),tf("prepare"),tv([{key:"prepare",title:"模板运行前检查未通过",description:r.map(e=>e.message).join("\n"),status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ey.warning("模板运行前检查未通过,请先处理阻断项");return}t.issues.length>0&&ey.warning("模板存在非阻断警告,已继续运行"),tv([{key:"prepare",title:"模板检查通过,正在创建生成任务",description:"已确认模板绑定资源可用,正在启动后台生成任务。",status:"process",icon:(0,s.jsx)(L.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"finish"},{key:"start",title:"准备生成任务",status:"process"}]}]),await rn(e)}catch(t){ro.current=!0;let e=t instanceof Error?t.message:"模板运行前检查失败";eW(!1),tv([{key:"prepare",title:"模板运行准备失败",description:e,status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ey.error(e)}finally{tB(t=>t===e?null:t)}},rs=async e=>{try{await (0,ee.QG)(e.id,e.projectRoot||th||void 0),eV===e.id&&(eQ(null),eq(null),eO("")),await tG(),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rl=async(e,t)=>{try{let r=new Set(e.chapters.map(e=>e.title.trim())),s=t.missingHeadings.filter(e=>!r.has(e.title.trim()));if(0===s.length)return void ey.info("建议章节已全部存在");let l=[...e.chapters,...s.map(t=>({id:"ch-ref-".concat(Date.now(),"-").concat(e.chapters.length),title:t.title,purpose:"",queries:[],requiredFacts:[]}))],a=await (0,ee.l2)({...e,chapters:l});eS(a.templates),tn(t=>{let r={...t};return delete r[e.id],r}),ey.success(ef("common.success"))}catch(e){e instanceof Error&&ey.error(e.message)}},ra=async(e,t)=>{let r=Date.now(),s=0,l=Date.now(),a=0;for(;;){let n;if(null==t?void 0:t.aborted)throw Error("用户中止");let o=new AbortController;t&&(t.pollController=o);try{({document:n}=await (0,ee.v7)(e,!0,th||void 0,o.signal,s||void 0)),a=0}catch(e){if((null==t?void 0:t.aborted)||e instanceof DOMException&&"AbortError"===e.name)throw Error("用户中止",{cause:e});if((a+=1)>=3)throw e instanceof Error?e:Error("生成进度获取失败");await new Promise(e=>window.setTimeout(e,2e3*a));continue}finally{(null==t?void 0:t.pollController)===o&&(t.pollController=void 0)}if(!n){if(Date.now()-r>75e5||Date.now()-l>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500));continue}if(t0(n),n.updatedAt!==s&&(s=n.updatedAt,l=Date.now()),("completed"===n.status||"warning"===n.status)&&n.draft)return n;if("failed"===n.status||"aborted"===n.status)throw Error(n.error||("aborted"===n.status?"生成已中止":"生成失败"));if(Date.now()-r>75e5||Date.now()-l>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500))}},rn=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ek;if(!e)return;if((null==eo?void 0:eo.aborted)&&(eo=null),null==eo?void 0:eo.loading){tv(eo.flowSteps),tf(eo.activeFlowKey),eW(!0);return}if(!th)return void ey.error("未识别当前项目,请先选择或打开项目后再生成文件");eW(!0);let t=tg.length>0?tg:[{key:"prepare",title:"正在创建生成任务",description:"系统正在创建后台生成任务,请稍候。",status:"process",icon:(0,s.jsx)(L.A,{}),subSteps:[{key:"start",title:"准备生成任务",status:"process"}]}],r=tj||"prepare";tv(t),tf(r);let l=(0,ee.OX)({templateId:e,projectRoot:th});eo={id:Date.now(),templateId:e,loading:!0,flowSteps:t,activeFlowKey:r,promise:l,listeners:new Set};let a=[];try{let e=await l;e.documentId&&(localStorage.setItem(tW,e.documentId),eQ(e.documentId),(null==eo?void 0:eo.promise)===l&&(eo.documentId=e.documentId)),await tG();let t=e.documentId?await ra(e.documentId,(null==eo?void 0:eo.promise)===l?eo:void 0):void 0,r=e.draft||(null==t?void 0:t.draft);if(!r)throw Error("生成结果为空");(e.documentId||(null==t?void 0:t.id))&&eQ(e.documentId||t.id),a.forEach(e=>window.clearTimeout(e)),eq(r),eO((null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown),(null==eo?void 0:eo.promise)===l&&(eo.draft=r,eo.content=(null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown);let s=t||{id:e.documentId||"draft-".concat(Date.now()),templateId:ek,title:r.title,requirement:r.requirement,projectRoot:r.projectRoot||th,projectId:r.projectId,markdown:r.markdown,status:r.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!r.exportGate.passed?"warning":"completed",draft:r,executionStages:r.executionStages,assets:r.assets||[],createdAt:r.generatedAt,updatedAt:Date.now()},{steps:n}=t$(s);tv(n),tZ(n,"done",!1),tf("done"),(null==eo?void 0:eo.promise)===l&&(eo.activeFlowKey="done",eo.loading=!1,ei(),eo=null),localStorage.removeItem(tW),await tG(),ey.success(ef("common.success")),window.setTimeout(()=>{var e;return null==(e=eb.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(r){localStorage.removeItem(tW);let e=r instanceof Error?r.message:ef("common.error"),t=/用户中止|abort|aborted/i.test(e);t||tv(t=>{let r=t.map(t=>"process"===t.status?{...t,status:"error",description:e,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)})(t,"error")}:t);return tZ(r,tj,!1),r}),(null==eo?void 0:eo.promise)===l&&(eo.loading=!1,eo.error=e,ei(),eo=null),await tG().catch(()=>void 0),t||ey.error(e)}finally{a.forEach(e=>window.clearTimeout(e)),eW(!1),(null==eo?void 0:eo.promise)===l&&(eo.loading=!1,ei())}},ro=(0,l.useRef)(!1);(0,l.useEffect)(()=>(tP.current&&(clearTimeout(tP.current),tP.current=null),!tS||"workflow"!==tN||tF||eV||ro.current||(null==eo?void 0:eo.loading)||null==tq||!tq.projectRoleConfigId||(ro.current=!0,tP.current=setTimeout(()=>{tP.current=null,tS&&"workflow"===tN&&!eV&&ek==ek&&rn()},300)),tS||(ro.current=!1),()=>{tP.current&&(clearTimeout(tP.current),tP.current=null)}),[tS,tN,tF,eV,tq,ek]);let ri=async e=>{try{eQ(e.id),eN(e.templateId),tC("workflow"),tk(!0),eW(!0);let t=await (0,ee.UQ)(e.id,e.projectRoot||th||void 0);localStorage.setItem(tW,t.documentId),await tG();let r=await ra(t.documentId);r.draft&&(eq(r.draft),eO(r.editedMarkdown||r.markdown||r.draft.markdown),tC("editor")),localStorage.removeItem(tW),await tG(),ey.success("已继续生成并完成")}catch(e){ey.error(e instanceof Error?e.message:"继续生成失败")}finally{eW(!1)}},rc=async e=>{if((null==eo?void 0:eo.loading)&&eo.documentId===e.id){var t;eo.aborted=!0,null==(t=eo.pollController)||t.abort(),eo.loading=!1,eo.error="用户中止",ei(),eo=null,eW(!1)}localStorage.removeItem(tW),t5(e.id);try{await (0,ee.r)(e.id,e.projectRoot||th||void 0),ey.success("已中止生成任务")}catch(e){ey.info("任务已不在运行,已刷新状态")}finally{await tG(),eV===e.id&&(eQ(null),tw(null),eq(null),eO(""))}},rd=async e=>{if(eG){eJ(e);try{eG.exportGate.passed||ey.warning("导出门禁存在风险项,已允许导出,请下载后人工复核。");let t={documentId:eV||void 0,title:eG.title,markdown:eH,format:e,enforceGate:!1,exportGate:eG.exportGate,useClientMarkdown:!0,projectRoot:eG.projectRoot||th||void 0},r=await (0,ee.UE)(t);if(((e,t,r)=>{let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),a=document.createElement("a");a.href=l,a.download=t,a.target="_self",a.rel="noopener",a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),a.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),1e3)})(r,"".concat(eG.title,".").concat("markdown"===e?"md":e),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[e]),eV)try{let{document:e}=await (0,ee.v7)(eV,!1,eG.projectRoot||th||void 0);e&&tm(e.exportReports||[])}catch(e){}}catch(e){ey.error(e instanceof Error?e.message:ef("common.error"))}finally{eJ(null)}}},ru=async()=>{if(eG)try{if(eV)await (0,ee.a6)(eV,{editedMarkdown:eH,markdown:eH},eG.projectRoot||th||void 0);else{let e=await (0,ee.Af)({...eG,markdown:eH});eq(e.draft)}await tG(),ey.success(ef("common.success"))}catch(e){ey.error(ef("common.error"))}},rp=(e,t)=>{te(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},rx=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eZ(""),e5(null),e8(null),e7({start:0,end:0})},rm=(e,t)=>{var r,s;return{title:(null==eG?void 0:eG.title)||"未命名文档",markdown:t,instruction:e,facts:null==eG||null==(r=eG.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==eG||null==(s=eG.chapters)?void 0:s.map(e=>e.title),...(()=>{let e=e3.start,t=e3.end;return t>e?{selection:{start:e,end:t,text:eH.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},rh=async()=>{let e=eY.trim();if(!eG||!e||e$)return;let t=tL.current+1;tL.current=t,e0(!0),e2("planning"),e8(null);try{let r=await (0,ee.Gi)({mode:"plan",...rm(e,eH)});if(tL.current!==t||eV!=eV)return;if(!r.plan)throw Error("AI 未返回修改计划");e5(r.plan)}catch(e){tL.current===t&&ey.error(e instanceof Error?e.message:ef("common.error"))}finally{tL.current===t&&(e0(!1),e2("idle"))}},rg=async e=>{let t=eY.trim();if(!eG||!t||e$)return;let r=tL.current+1;tL.current=r,e0(!0),e2("applying");try{let s=await (0,ee.Gi)({mode:"apply",...rm(t,eH),plan:e});if(tL.current!==r||eV!=eV)return;if(!s.markdown)throw Error("AI 未返回修改结果");e8({plan:s.plan||e,markdown:s.markdown,beforeSnippet:s.beforeSnippet,afterSnippet:s.afterSnippet,summary:s.summary,changedChars:s.changedChars,prompt:t,before:eH})}catch(e){tL.current===r&&ey.error(e instanceof Error?e.message:ef("common.error"))}finally{tL.current===r&&(e0(!1),e2("idle"))}};if(eD)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(x.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(x.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(x.A,{active:!0,paragraph:{rows:8}})]});let rv="workflow"===tN?"工作流:".concat((null==tq?void 0:tq.name)||"选择模板"):"编辑:".concat((null==eG?void 0:eG.title)||(null==tq?void 0:tq.outputTitle)||"文档");return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 mb-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2.5 flex items-center gap-2",children:[(0,s.jsx)(C.A,{className:"text-[var(--colorAccent)]"}),ef("documents.title")]}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:ef("documents.description")})]}),(0,s.jsx)(p.Ay,{type:"primary",icon:(0,s.jsx)(O.A,{}),onClick:()=>t7(),className:"shadow-none rounded-lg",children:ef("documents.newTemplate")})]}),(0,s.jsxs)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl shadow-sm overflow-hidden",children:[(0,s.jsx)(m.A,{items:[{key:"templates",label:(0,s.jsxs)("span",{className:"px-4",children:["模板库 ",(0,s.jsx)(u.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eA.length})]})},{key:"drafts",label:(0,s.jsxs)("span",{className:"px-4",children:["生成记录 ",(0,s.jsx)(u.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eK.length})]})}],activeKey:tb,onChange:tA,className:"documents-tabs",size:"large",tabBarStyle:{margin:0,padding:"0 16px",background:"var(--colorBgHover)",borderBottom:"1px solid var(--borderColor)"}}),(0,s.jsx)("div",{className:"p-4 bg-[var(--colorFillAlter)] min-h-[500px]",children:"templates"===tb?0===eA.length?(0,s.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgContainer)]",children:(0,s.jsx)(h.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ef("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eA.map(e=>(0,s.jsxs)("div",{ref:t=>{tc.current[e.id]=t},className:"group flex items-center p-4 rounded-2xl transition-all cursor-pointer ".concat(ek===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>eN(e.id),children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0 pr-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2 min-w-0",children:[function(e,t){let r=ed[e]||(0,s.jsx)(D.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(e.category,ek===e.id),(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.name}),ek===e.id&&(0,s.jsx)(u.A,{color:"blue",className:"border-0 m-0 shrink-0",children:"当前选中"}),(0,s.jsx)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:e.category})]}),e.description&&(0,s.jsx)("div",{className:"text-sm text-[var(--colorTextSecondary)] line-clamp-2 leading-relaxed mb-3",children:e.description}),(e=>{let t=ta[e.id];if(!t)return null;let r=t.issues.filter(e=>"error"===e.level),l=t.issues.filter(e=>"warning"===e.level),a=to===e.id,n=t.roleDiagnostics||[],o=new Map;for(let e of t.promptDiagnostics){let t=o.get(e.roleId)||[];t.push(e),o.set(e.roleId,t)}let i=t.strategyPreview,c=(null==i?void 0:i.mode)==="strict"?"error":(null==i?void 0:i.mode)==="fast"?"blue":(null==i?void 0:i.mode)==="longform"?"purple":"green";return(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"flex flex-col items-start gap-2 w-full",children:[(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat(r.length?"border-red-200 bg-red-50/50":l.length?"border-yellow-200 bg-yellow-50/50":"border-green-200 bg-green-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:r.length?"检查未通过(".concat(r.length," 项阻断)"):l.length?"存在警告(".concat(l.length," 项)"):"检查通过"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["项目资料 ",t.fileDiagnostics.length]}),(0,s.jsxs)("span",{children:["提示词 ",t.promptDiagnostics.length]}),(0,s.jsxs)("span",{children:["角色链路 ",n.length]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)(u.A,{color:c,className:"border-0 m-0",children:[i.mode," 策略预估"]})]}),!r.length&&l.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsx)("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:()=>{rr(e.id)},children:"忽略警告并运行"})]}),(0,s.jsxs)("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:()=>ti(a?null:e.id),children:[a?(0,s.jsx)(q.A,{}):(0,s.jsx)(H.A,{}),a?"收起体检":"体检报告"]})]}),a&&(0,s.jsxs)("div",{className:"w-full flex flex-col gap-3 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-3",children:[r.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorError)]",children:["阻断项(",r.length,")— 必须修复后才能运行"]}),r.map(t=>{var r;let l=(r=t.message,/资料包|项目资料|知识库|索引/u.test(r)?{label:"配置模板",onClick:()=>t7(e)}:/提示词|绑定/u.test(r)?{label:"提示词库",href:"/prompt"}:/项目角色配置/u.test(r)?{label:"角色配置",href:"/document-roles"}:void 0);return(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2 rounded-lg border border-red-200 bg-red-50/40 px-2.5 py-1.5 text-xs",children:[(0,s.jsx)("span",{className:"text-[var(--colorText)]",children:t.message}),l&&(l.href?(0,s.jsxs)("a",{className:"shrink-0 text-red-500 hover:underline",href:l.href,children:[l.label," ›"]}):(0,s.jsxs)("span",{className:"shrink-0 text-red-500 cursor-pointer hover:underline",onClick:l.onClick,children:[l.label," ›"]}))]},t.message)})]}),l.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorWarning)]",children:["警告项(",l.length,")— 可忽略并继续运行"]}),l.map(e=>(0,s.jsx)("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50/40 px-2.5 py-1.5 text-xs text-[var(--colorTextSecondary)]",children:e.message},e.message))]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorText)]",children:["绑定链路(",t.configName||"未绑定角色配置",")"]}),0===n.length?(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:"未配置提示词角色链路"}):(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:n.map(r=>{let l=o.get(r.roleId)||[];return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs flex-wrap rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-2 py-1",children:[(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:e.name}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:t.configName||"角色配置"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),(0,s.jsx)("span",{className:"ok"===r.status?"text-[var(--colorText)]":"text-[var(--colorError)] font-medium",children:r.roleName||r.roleId}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),0===l.length?(0,s.jsx)(u.A,{color:"error",className:"border-0 m-0",children:"missing_resource"===r.status?"角色未绑定资源":"role_missing"===r.status?"角色不存在":"未绑定提示词"}):(0,s.jsx)("span",{className:"flex items-center gap-1 flex-wrap",children:l.map(e=>(0,s.jsx)(u.A,{color:e.exists&&e.contentLength>0?"success":e.exists?"warning":"error",className:"border-0 m-0",title:e.contentPreview||e.promptId,children:e.exists?"".concat(e.promptTitle||e.promptId," ").concat(e.contentLength,"字符"):"".concat(e.promptId," 已删除")},e.promptId))})]},r.roleId)})})]}),i&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-blue-200 bg-blue-50/40 px-2.5 py-2 text-xs",children:[(0,s.jsx)("span",{className:"font-bold text-[var(--colorText)]",children:"生成策略预估(生成前体检)"}),(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["约 ",i.chapterCount," 章 / 目标 ",i.targetWords>=1e4?"".concat((i.targetWords/1e4).toFixed(1)," 万字"):"".concat(i.targetWords," 字"),";全章节并行(",i.chapterConcurrency," 章同批);审查流水线 ",i.reviewConcurrency," 路;每章证据预算 ",Math.round(i.evidenceFloorChars/1e3),"k-",Math.round(i.evidenceCeilingChars/1e3),"k 字符;修复轮次预算 ",i.repairRoundBudget," 轮",i.globalReviewSamplingRate<1?";全局审查抽检 ".concat(Math.round(100*i.globalReviewSamplingRate),"%"):""]}),i.triggers.map(e=>(0,s.jsxs)("span",{className:"text-[var(--colorTextTertiary)]",children:["\xb7 ",e]},e))]}),(()=>{let r=t.referenceStructureSuggestion;return r&&0!==r.missingHeadings.length?(0,s.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-lg border border-purple-200 bg-purple-50/40 px-2.5 py-2 text-xs",children:[(0,s.jsxs)("span",{className:"font-bold text-[var(--colorText)]",children:["参考库大纲建议(",r.projectType," \xb7 ",r.sourceCount," 份同类工程画像)"]}),(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:"以下章节出现于半数以上同类工程但当前模板缺失,仅建议、不影响运行:"}),(0,s.jsx)("span",{className:"flex items-center gap-1 flex-wrap",children:r.missingHeadings.map(e=>(0,s.jsxs)(u.A,{className:"border-0 m-0 bg-white",children:[e.title," \xb7 ",Math.round(100*e.ratio),"% 样本"]},e.title))}),(0,s.jsx)("span",{children:(0,s.jsx)(p.Ay,{size:"small",type:"primary",ghost:!0,icon:(0,s.jsx)(O.A,{}),onClick:()=>void rl(e,r),className:"rounded-md",children:"一键添加到模板"})})]}):null})()]})]})})(e)]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(ek===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(p.Ay,{size:"small",onClick:t=>{t.stopPropagation(),t7(e)},className:"rounded-md",children:"配置"}),(0,s.jsx)(p.Ay,{size:"small",icon:(0,s.jsx)(K.A,{}),onClick:t=>{t.stopPropagation(),re(e.id)},className:"rounded-md"}),(0,s.jsx)(el,{title:ef("documents.deleteTemplateConfirm"),onConfirm:t=>{null==t||t.stopPropagation(),rt(e.id)},children:(0,s.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(W.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})}),(()=>{var t;let r=ta[e.id],l=null!=(t=null==r?void 0:r.issues.filter(e=>"error"===e.level).length)?t:0;return l>0?(0,s.jsxs)(p.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(U.A,{}),disabled:!!tF&&tF!==e.id,onClick:t=>{var r;t.stopPropagation(),eN(r=e.id),ti(r),window.setTimeout(()=>{var e;return null==(e=tc.current[r])?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})},50)},className:"min-w-[108px] rounded-md justify-center",children:["先修复 ",l," 个问题"]}):(0,s.jsx)(p.Ay,{size:"small",type:"primary",icon:tF===e.id?(0,s.jsx)(L.A,{}):(0,s.jsx)(V.A,{}),loading:tF===e.id,disabled:!!tF&&tF!==e.id,onClick:t=>{t.stopPropagation(),rr(e.id)},className:"min-w-[72px] rounded-md justify-center",children:tF===e.id?"准备中":"运行"})})()]})]},e.id))}):0===eK.length?(0,s.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgContainer)]",children:(0,s.jsx)(h.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ef("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eK.slice(0,15).map((e,t)=>{var r,l,a,n,o,i,c,d,x,m;let h,g;return(0,s.jsxs)("div",{className:"group flex items-center gap-4 p-4 rounded-2xl transition-all cursor-pointer ".concat(eV===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>{tX(e)},children:[(0,s.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,s.jsx)(F.A,{className:"text-xl text-[var(--colorOk)]"}):"failed"===e.status||"aborted"===e.status?(0,s.jsx)(G.A,{className:"text-xl text-[var(--colorDanger)]"}):"warning"===e.status?(0,s.jsx)(E.A,{className:"text-xl text-[var(--colorWarning)]"}):(0,s.jsx)(Q.A,{spin:!0,className:"text-xl text-blue-500"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0 pr-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.title}),(0,s.jsxs)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:["#",t+1]}),(0,s.jsx)(u.A,{color:"completed"===(h=e.status)?"success":"warning"===h?"warning":"failed"===h?"error":"aborted"===h?"default":"processing",className:"border-0 m-0 shrink-0",children:"completed"===(g=e.status)?"已完成":"warning"===g?"需复核":"failed"===g?"失败":"aborted"===g?"已中止":"生成中"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-xs text-[var(--colorTextSecondary)] mb-3",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(X.A,{})," ",new Date(e.updatedAt).toLocaleString()]}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),s=t%60;if(r<60)return s?"".concat(r," 分 ").concat(s," 秒"):"".concat(r," 分");let l=Math.floor(r/60),a=r%60;return a?"".concat(l," 小时 ").concat(a," 分"):"".concat(l," 小时")})(e)]}),e.partialChapters&&e.partialChapters.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["进度 ",e.partialChapters.filter(e=>"completed"===e.status).length,"/",e.partialChapters.length," 章"]}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["共 ",e.partialChapters.reduce((e,t)=>e+t.chars,0).toLocaleString()," 字"]})]})]}),("warning"===e.status||"failed"===e.status||"aborted"===e.status)&&(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat("failed"===e.status||"aborted"===e.status?"border-red-200 bg-red-50/50":"border-yellow-200 bg-yellow-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:"failed"===e.status?(null==(l=e.draft)||null==(r=l.exportGate)?void 0:r.passed)===!1?"门禁未通过":"生成失败":"aborted"===e.status?"已中止":"需复核"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsx)("span",{className:"truncate max-w-[400px]",children:e.error||(null==(a=e.warningIssues)?void 0:a[0])||(null==(o=e.draft)||null==(n=o.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:n.message)||(null==(d=e.draft)||null==(c=d.exportGate)||null==(i=c.checklist.find(e=>!e.passed))?void 0:i.label)||"需复核"})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(eV===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(p.Ay,{size:"small",type:"primary",icon:tJ(e.status)?(0,s.jsx)(Q.A,{spin:!0}):(0,s.jsx)(V.A,{}),onClick:t=>{t.stopPropagation(),tX(e)},className:"min-w-[72px] rounded-md justify-center",children:"打开"}),tJ(e.status)&&(0,s.jsx)(el,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),rc(e)},children:(0,s.jsx)(p.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),className:"rounded-md",children:"中止"})}),("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(x=e.checkpointChapters)?void 0:x.length)&&/继续生成|重新生成|中断|卡住|未完成/u.test(e.error||(null==(m=e.warningIssues)?void 0:m.join(";"))||""))&&(0,s.jsx)(p.Ay,{size:"small",onClick:t=>{t.stopPropagation(),ri(e)},className:"rounded-md",children:"继续"}),(0,s.jsx)(el,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),rs(e)},children:(0,s.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(W.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})})]})]},e.id)})})})]}),(0,s.jsx)(g.A,{title:rv,open:tS,onClose:()=>{for(let e of(tk(!1),t_.current.values()))clearInterval(e);t_.current.clear()},size:"large",mask:{closable:!1},style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eG?(0,s.jsxs)(i.A,{wrap:!0,children:[tY(ty)&&(0,s.jsx)(p.Ay,{icon:(0,s.jsx)(V.A,{}),disabled:e$||eL,onClick:()=>{ty&&ri(ty)},children:"继续生成"}),(0,s.jsx)(p.Ay,{icon:(0,s.jsx)(J.A,{}),disabled:e$,onClick:()=>{ru()},children:ef("documents.saveDraft")}),(0,s.jsx)(p.Ay,{icon:(0,s.jsx)(Y.A,{}),disabled:e$,loading:"markdown"===eX,onClick:()=>{rd("markdown")},children:"MD"}),(0,s.jsx)(p.Ay,{disabled:e$,loading:"html"===eX,onClick:()=>{rd("html")},children:"HTML"}),(0,s.jsx)(p.Ay,{disabled:e$,loading:"docx"===eX,onClick:()=>{rd("docx")},children:"DOCX"}),(0,s.jsx)(p.Ay,{type:"primary",disabled:e$,loading:"pdf"===eX,onClick:()=>{rd("pdf")},children:"PDF"})]}):tY(ty)?(0,s.jsx)(p.Ay,{type:"primary",icon:(0,s.jsx)(V.A,{}),loading:eL,onClick:()=>{ty&&ri(ty)},children:"继续生成"}):eL&&"workflow"===tN?(0,s.jsx)(p.Ay,{danger:!0,onClick:()=>{(async()=>{if(eV&&await (0,ee.r)(eV,th||void 0).catch(()=>void 0),eo){var e;eo.aborted=!0,null==(e=eo.pollController)||e.abort(),eo.loading=!1,eo.error="用户中止",ei(),eo=null}for(let e of(localStorage.removeItem(tW),t_.current.values()))clearInterval(e);t_.current.clear(),eW(!1),tv([]),tf(null),tk(!1),await tG(),ey.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,s.jsxs)(en,{style:{width:"100%"},gap:16,children:["workflow"===tN&&tg.length>0&&(0,s.jsx)(en,{gap:10,children:tg.map((e,t)=>{let r,l=tI.has(e.key),a=e.subSteps.length>8||e.description.length>240;return(0,s.jsxs)("div",{style:{display:"flex",gap:10,padding:10,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:t===tO?"var(--colorFillAlter)":"var(--colorBgContainer)"},children:[(0,s.jsx)("span",{children:"process"===e.status?(0,s.jsx)(L.A,{}):"warning"===e.status?(0,s.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):e.icon}),(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(es,{strong:!0,children:e.title}),(0,s.jsx)(u.A,{color:"finish"===e.status?"success":"error"===e.status?"error":"warning"===e.status?"warning":"process"===e.status?"processing":"default",children:"warning"===(r=e.status)?"finish":r}),(e=>{var t;let r=td.current.get(e.key);if(!r)return null;let l=t2((null!=(t=r.endedAt)?t:Date.now())-r.startedAt);return(0,s.jsx)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:r.endedAt?l:"".concat(l,"(运行中)")})})(e)]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12,whiteSpace:"pre-wrap"},children:((e,t)=>{let r=e.description.length>240,l=t?e.subSteps:e.subSteps.slice(0,8);return(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(u.A,{children:e.subtitle})}),(0,s.jsx)("div",{style:!t&&r?{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0,children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:l.map(e=>{var t;return(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"process"===e.status?"var(--colorPrimary)":"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,s.jsx)(L.A,{}):"finish"===t?(0,s.jsx)(F.A,{}):"warning"===t?(0,s.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(W.A,{}):(0,s.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,s.jsx)("span",{children:e.title})]},e.key)})})]})})(e,l)}),a&&(0,s.jsx)(p.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",marginTop:6},onClick:()=>{var t;return t=e.key,void tT(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},children:l?"收起":e.subSteps.length>8?"更多(".concat(e.subSteps.length," 条详情)"):"更多"})]})]},e.key)})}),"workflow"===tN&&(null==ty?void 0:ty.partialChapters)&&ty.partialChapters.length>0&&(0,s.jsx)(v.A,{size:"small",title:"章节进度",extra:(0,s.jsxs)(u.A,{color:"blue",children:[ty.partialChapters.filter(e=>"completed"===e.status).length,"/",ty.partialChapters.length]}),children:(0,s.jsx)(en,{gap:6,style:{width:"100%"},children:ty.partialChapters.map(e=>(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,fontSize:12},children:[(0,s.jsx)(es,{ellipsis:!0,style:{maxWidth:480},children:e.title}),(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(u.A,{color:"failed"===e.status?"error":"success",children:"failed"===e.status?"失败":"完成"}),(0,s.jsxs)(es,{type:"secondary",children:[e.chars.toLocaleString()," 字"]})]})]},e.id))})}),"workflow"===tN&&(null==ty||null==(t=ty.draft)||null==(e=t.exportGate)?void 0:e.passed)===!1&&(()=>{var e;let t=(null==(e=ty.draft.exportGate.blockingIssues)?void 0:e.map(e=>e.message))||ty.draft.exportGate.checklist.filter(e=>!e.passed).map(e=>e.label)||["存在阻断级校验错误"],r=tz?t:t.slice(0,6);return(0,s.jsx)(ea,{type:"error",title:"生成已完成,但导出门禁未通过",children:(0,s.jsxs)(i.A,{direction:"vertical",size:8,style:{width:"100%"},children:[(0,s.jsx)("span",{children:"阻断项:".concat(r.join(";")).concat(t.length>6&&!tz?"…(共 ".concat(t.length," 项)"):"","。可点击继续生成触发自动修复,或在“校验”页查看完整问题。")}),t.length>6&&(0,s.jsx)(p.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",alignSelf:"flex-start"},onClick:()=>tR(e=>!e),children:tz?"收起":"查看全部 ".concat(t.length," 项")}),tY(ty)&&(0,s.jsx)(p.Ay,{type:"primary",size:"small",icon:(0,s.jsx)(V.A,{}),loading:eL,onClick:()=>{ri(ty)},children:"继续生成 / 自动修复"})]})})})(),"workflow"===tN&&(null==ty||null==(r=ty.reviewMetadata)?void 0:r.diagnostics)&&(0,s.jsx)(ea,{type:"info",title:"后台自动优化",children:"策略:".concat(ty.reviewMetadata.diagnostics.strategy.mode,";LLM 调用 ").concat(ty.reviewMetadata.diagnostics.llm.calls," 次;噪声过滤 ").concat((null==(a=ty.reviewMetadata.diagnostics.evidence)?void 0:a.filteredNoise)||0," 条;质量门禁 阻断").concat((null==(o=ty.reviewMetadata.diagnostics.quality)?void 0:o.blockingCount)||0,"/重要").concat((null==(M=ty.reviewMetadata.diagnostics.quality)?void 0:M.importantCount)||0,"/轻微").concat((null==(P=ty.reviewMetadata.diagnostics.quality)?void 0:P.minorCount)||0,";自动限流调整 ").concat(ty.reviewMetadata.diagnostics.llm.limitAdjustments," 次。审查与诊断信息仅用于系统修复,不会写入正文或导出文件。")}),"workflow"===tN&&(null==ty||null==(eh=ty.draft)?void 0:eh.promptRules)&&(()=>{let e=ty.draft.promptRules,t=e.executionSummary||[],r=Object.entries(e.ruleSources||{}).filter(e=>{let[,t]=e;return t.length>0}),l=r.length>0,a=tM?r:r.slice(0,3);return(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(E.A,{style:{color:"var(--colorAccent)"}}),"提示词规则生效报告",t.length>0&&(0,s.jsxs)(u.A,{style:{margin:0},children:[t.length," 条"]})]}),styles:{body:{padding:12}},children:(0,s.jsxs)(en,{gap:6,children:[t.length>0&&t.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",gap:6,fontSize:12,color:"var(--colorText)",lineHeight:1.6},children:[(0,s.jsx)(F.A,{style:{color:"var(--colorSuccess)",marginTop:4}}),(0,s.jsx)("span",{children:e})]},t)),l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.A,{style:{margin:"4px 0"}}),(0,s.jsx)(es,{type:"secondary",style:{fontSize:12},children:"规则溯源(自动从以下提示词中抽取):"}),a.map(e=>{let[t,r]=e;return(0,s.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)",lineHeight:1.6},children:[(0,s.jsx)(es,{strong:!0,style:{fontSize:12},children:t}),":",r.map(e=>"".concat(e.roleId,"「").concat(e.matchedText.length>24?"".concat(e.matchedText.slice(0,24),"…"):e.matchedText,"」")).join("、")]},t)}),r.length>3&&(0,s.jsx)(p.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",alignSelf:"flex-start"},onClick:()=>tE(e=>!e),children:tM?"收起溯源":"查看全部溯源(".concat(r.length," 类)")})]}),!l&&0===t.length&&(0,s.jsx)(es,{type:"secondary",style:{fontSize:12},children:"未从提示词中识别到额外硬规则,使用系统默认质量规则。"})]})})})(),"workflow"===tN&&(null==ty||null==(ev=ty.draft)||null==(eg=ev.reviewMetadata)?void 0:eg.qualityBenchmark)&&(()=>{let e=ty.draft.reviewMetadata.qualityBenchmark;return(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(Z.A,{style:{color:"#faad14"}}),"质量对标",(0,s.jsxs)(u.A,{color:"gold",style:{margin:0},children:[e.projectType,"参考"]})]}),extra:(0,s.jsxs)(es,{strong:!0,style:{fontSize:15,color:e.overallScore>=80?"var(--colorSuccess)":"var(--colorWarning)"},children:[e.overallScore," 分"]}),styles:{body:{padding:12}},children:(0,s.jsxs)(en,{gap:8,children:[(0,s.jsxs)(es,{type:"secondary",style:{fontSize:12},children:["与模板参考库 ",e.referenceSourceCount," 份同类入围文件的质量画像对比:"]}),e.items.map(e=>(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,s.jsx)("div",{style:{width:86,fontSize:12,color:"var(--colorTextSecondary)",flexShrink:0},children:e.label}),(0,s.jsx)(f.A,{percent:Math.min(100,e.score),size:"small",status:e.passed?"normal":"exception",style:{flex:1,margin:0},showInfo:!1}),(0,s.jsxs)("div",{style:{width:96,fontSize:12,textAlign:"right",flexShrink:0,color:e.passed?"var(--colorSuccess)":"var(--colorWarning)"},children:[e.passed?(0,s.jsx)(F.A,{style:{marginRight:4}}):(0,s.jsx)($.A,{style:{marginRight:4}}),t6(e.generated,e.unit)]})]},e.key)),(0,s.jsxs)(es,{type:"secondary",style:{fontSize:12},children:["基准参考值:",e.items.map(e=>"".concat(e.label," ").concat(t6(e.reference,e.unit))).join(";")]})]})})})(),"workflow"===tN&&eL&&0===tg.length&&(0,s.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在准备生成…"})]}),"editor"===tN&&(null==eG||null==(ej=eG.reviewMetadata)?void 0:ej.qualityBenchmark)&&(()=>{var e;let t=eG.reviewMetadata.qualityBenchmark,r=null==(e=eG.reviewMetadata.diagnostics)?void 0:e.quality,l=(eG.executionStages||[]).filter(e=>"llm_review"===e.type||"quality-repair"===e.roleId).flatMap(e=>(e.details||[]).filter(e=>/修复|补写|补齐|改进|调整/u.test(e))).slice(0,8);return(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(Z.A,{style:{color:"#faad14"}}),"运行质量报告",(0,s.jsxs)(u.A,{color:"gold",className:"border-0 m-0",children:[t.projectType,"对标"]})]}),extra:(0,s.jsxs)(es,{strong:!0,style:{fontSize:15,color:t.overallScore>=80?"var(--colorSuccess)":"var(--colorWarning)"},children:[t.overallScore," 分"]}),styles:{body:{padding:12}},children:(0,s.jsxs)(en,{gap:8,children:[(0,s.jsxs)(i.A,{wrap:!0,size:6,children:[(0,s.jsxs)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:["对标库 ",t.referenceSourceCount," 份同类文件"]}),r&&(0,s.jsxs)(u.A,{color:r.blockingCount>0?"error":"success",className:"border-0 m-0",children:["审查修复 ",r.repairedCount," 项 / 问题 ",r.blockingCount+r.importantCount+r.minorCount," 项"]}),(0,s.jsxs)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:[t.items.filter(e=>e.passed).length,"/",t.items.length," 指标达标"]})]}),l.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-[var(--colorText)]",children:"修复记录(审查阶段自动修复的内容)"}),l.map((e,t)=>(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:["\xb7 ",e]},t))]}),(0,s.jsxs)(es,{type:"secondary",style:{fontSize:12},children:["基准参考值:",t.items.map(e=>"".concat(e.label," ").concat(t6(e.reference,e.unit))).join(";")]})]})})})(),"editor"===tN&&tx.length>0&&(0,s.jsx)(v.A,{size:"small",title:(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(Y.A,{}),"导出闭环报告",(0,s.jsx)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:tx.length})]}),styles:{body:{padding:12}},children:(0,s.jsx)(en,{gap:6,children:[...tx].reverse().map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2 text-xs",children:[(0,s.jsx)(es,{strong:!0,children:e.format.toUpperCase()}),(0,s.jsx)(u.A,{color:"blue",className:"border-0 m-0",children:new Date(e.exportedAt).toLocaleString()}),void 0!==e.durationMs&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["总用时 ",t2(e.durationMs)]}),void 0!==e.benchmarkScore&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["质量对标 ",e.benchmarkScore," 分"]}),void 0!==e.repairedCount&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["修复 ",e.repairedCount," 项",void 0!==e.blockingCount?"(阻断 ".concat(e.blockingCount,")"):""]}),e.ruleSummary&&e.ruleSummary.length>0&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["规则 ",e.ruleSummary.length," 条"]}),!1===e.gatePassed&&(0,s.jsx)(u.A,{color:"error",className:"border-0 m-0",children:"门禁未过"})]},"".concat(e.exportedAt,"-").concat(t)))})}),eG&&(0,s.jsx)("div",{ref:eb,children:(0,s.jsx)(m.A,{items:[{key:"edit",label:ef("documents.edit"),children:(0,s.jsxs)(en,{gap:16,style:{width:"100%"},children:[(0,s.jsx)(er,{rows:28,value:eH,disabled:e$,onSelect:e=>{var t,r,s;return e7({start:null!=(t=e.currentTarget.selectionStart)?t:0,end:null!=(s=null!=(r=e.currentTarget.selectionEnd)?r:e.currentTarget.selectionStart)?s:0})},onChange:e=>{var t,r,s;eO(e.target.value),e5(null),e8(null),e7({start:null!=(t=e.target.selectionStart)?t:0,end:null!=(s=null!=(r=e.target.selectionEnd)?r:e.target.selectionStart)?s:0})}}),(0,s.jsx)(v.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,s.jsxs)(en,{gap:16,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(B.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(es,{strong:!0,children:"精准修改"}),(0,s.jsx)(u.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(p.Ay,{size:"small",icon:(0,s.jsx)(X.A,{}),onClick:()=>tr(e=>!e),disabled:0===e9.length,children:["历史版本 ",e9.length>0?e9.length:""]})]}),(0,s.jsx)(ea,{type:"info",title:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,s.jsx)(er,{rows:4,value:eY,disabled:e$,onChange:e=>{eZ(e.target.value),e5(null),e8(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,s.jsxs)(i.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(i.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,s.jsx)(p.Ay,{size:"small",disabled:e$,onClick:()=>eZ(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(p.Ay,{type:"primary",icon:(0,s.jsx)(B.A,{}),loading:e$&&"planning"===e1,disabled:!eY.trim()||e$,onClick:()=>{rh()},children:"识别修改范围"})]}),e6&&!e4&&(0,s.jsx)(v.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,s.jsxs)(en,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(u.A,{color:"purple",children:e6.scope}),(0,s.jsx)(u.A,{color:"blue",children:e6.action}),(0,s.jsxs)(u.A,{color:e6.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*e6.confidence),"%"]}),e6.targetTitle&&(0,s.jsx)(es,{strong:!0,children:e6.targetTitle})]}),(0,s.jsx)(es,{children:e6.summary}),(0,s.jsx)(es,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,s.jsxs)(i.A,{children:[(0,s.jsx)(p.Ay,{type:"primary",loading:e$&&"applying"===e1,onClick:()=>{rg(e6)},children:"执行并预览"}),(0,s.jsx)(p.Ay,{disabled:e$,onClick:()=>e5(null),children:"取消"})]})]})}),e4&&(0,s.jsx)(v.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,s.jsxs)(en,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(u.A,{color:"green",children:"修改预览"}),(0,s.jsx)(es,{children:e4.summary||e4.plan.summary}),(0,s.jsxs)(u.A,{children:[e4.changedChars&&e4.changedChars>0?"+".concat(e4.changedChars):e4.changedChars," 字符"]})]}),(0,s.jsxs)(w.A,{gutter:12,children:[(0,s.jsxs)(b.A,{span:12,children:[(0,s.jsx)(es,{strong:!0,children:"修改前"}),(0,s.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e4.beforeSnippet||"无片段预览"})]}),(0,s.jsxs)(b.A,{span:12,children:[(0,s.jsx)(es,{strong:!0,children:"修改后"}),(0,s.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e4.afterSnippet||"无片段预览"})]})]}),(0,s.jsxs)(i.A,{children:[(0,s.jsx)(p.Ay,{type:"primary",onClick:()=>{e4&&(rp(e4.before,e4.prompt),eO(e4.markdown),rx(!0),ey.success("已应用精准修改"))},children:"应用到文档"}),(0,s.jsx)(p.Ay,{onClick:()=>e8(null),children:"返回计划"}),(0,s.jsx)(p.Ay,{danger:!0,onClick:()=>{e5(null),e8(null)},children:"放弃"})]})]})}),tt&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(A.A,{size:"small",dataSource:e9,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(A.A.Item,{actions:[(0,s.jsx)(p.Ay,{size:"small",disabled:e$,onClick:()=>{rp(eH,"恢复前版本"),eO(e.content),rx(!0),ey.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(A.A.Item.Meta,{title:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(es,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(u.A,{children:e.prompt})]}),description:(0,s.jsx)(es,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eG.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eG.chapters.length,")"]}),(0,s.jsx)(A.A,{size:"small",dataSource:eG.chapters,renderItem:e=>(0,s.jsx)(A.A.Item,{children:(0,s.jsx)(A.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eG.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eG.structuredFacts.length,")"]}),(0,s.jsx)(S.A,{size:"small",column:1,bordered:!0,children:eG.structuredFacts.map((e,t)=>(0,s.jsxs)(S.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(u.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(es,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eG.sources.length,")"]}),0===eG.sources.length?(0,s.jsx)(h.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eG.sources.map(e=>(0,s.jsxs)(u.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eG.missingItems.length,")"]}),0===eG.missingItems.length?(0,s.jsx)(h.A,{description:"无缺失"}):(0,s.jsx)(A.A,{size:"small",dataSource:eG.missingItems,renderItem:e=>(0,s.jsx)(A.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eG.validationIssues.length,")"),children:0===eG.validationIssues.length?(0,s.jsx)(h.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eG.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(u.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,s.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,s.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eG.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(es,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(A.A,{size:"small",dataSource:eG.exportGate.checklist,renderItem:e=>(0,s.jsxs)(A.A.Item,{children:[(0,s.jsx)(es,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(u.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eG.executionStages.length,")"),children:(0,s.jsx)(A.A,{size:"small",dataSource:eG.executionStages,renderItem:e=>(0,s.jsxs)(A.A.Item,{children:[(0,s.jsx)(A.A.Item.Meta,{avatar:ec[e.type]||(0,s.jsx)(D.A,{}),title:(0,s.jsx)(es,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(ex[e.type]||e.type," \xb7 ").concat(e.roleName||tK(e.roleId))}),description:(0,s.jsx)(es,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(u.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,s.jsx)(g.A,{title:ef("documents.templateEditor"),open:ts,onClose:()=>tl(!1),size:"large",mask:{closable:!1},styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(p.Ay,{onClick:()=>tl(!1),children:ef("common.cancel")}),(0,s.jsx)(p.Ay,{type:"primary",onClick:()=>{t9()},children:ef("common.save")})]}),children:(0,s.jsxs)(d.A,{form:ew,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(w.A,{gutter:12,children:[(0,s.jsx)(d.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"name",label:ef("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"category",label:ef("documents.templateCategory"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"outputTitle",label:ef("documents.outputTitle"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:12,children:(0,s.jsx)(d.A.Item,{name:"description",label:ef("documents.templateDescription"),children:(0,s.jsx)(n.A,{})})})]}),(0,s.jsx)(d.A.Item,{name:"projectRoleConfigId",label:ef("documents.projectRoleConfig"),rules:[{required:!0,message:ef("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(k.A,{showSearch:!0,placeholder:ef("documents.projectRoleConfigRequired"),options:tH})}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(es,{strong:!0,className:"text-base text-[var(--colorText)] block mb-1",children:"项目资料包绑定"}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:"直接选择整个项目文件夹,系统会自动识别招标正文、清单、图纸、补疑等资料类型。"})]}),(0,s.jsx)(u.A,{color:"blue",className:"border-0",children:"按项目资料包"})]}),eB?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("div",{className:"mt-3 text-[var(--colorTextSecondary)] text-xs",children:"正在加载知识库文件…"})]}):0===eE.length?(0,s.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):(0,s.jsx)(d.A.Item,{name:"projectMaterialRoots",rules:[{required:!0,message:"请选择项目资料包"}],children:(0,s.jsx)(N.A,{treeData:eE,loadData:t3,fieldNames:{label:"rawTitle",value:"value",children:"children"},onChange:e=>{var t;return t=e.map(e=>String(e)),void ew.setFieldValue("projectMaterialRoots",eu(t))},treeCheckable:!0,showCheckedStrategy:N.A.SHOW_PARENT,placeholder:"点击这里选择项目文件夹...",style:{width:"100%"},listHeight:360,showSearch:!0,maxTagCount:"responsive",size:"large"})})]})]})})]})}}},e=>{e.O(0,[717,883,69,700,44,224,787,195,455,506,930,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-900:oklch(39.3% .095 152.535);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-1{top:var(--spacing)}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.\!m-0{margin:0!important}.m-0{margin:0}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.\!my-3{margin-block:calc(var(--spacing) * 3)!important}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-auto{margin-top:auto}.-mr-2{margin-right:calc(var(--spacing) * -2)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-4{margin-right:calc(var(--spacing) * 4)}.\!mb-0{margin-bottom:0!important}.\!mb-1{margin-bottom:var(--spacing)!important}.\!mb-3{margin-bottom:calc(var(--spacing) * 3)!important}.\!mb-4{margin-bottom:calc(var(--spacing) * 4)!important}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-2,.line-clamp-3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.\!h-7{height:calc(var(--spacing) * 7)!important}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-\[calc\(100vh-140px\)\]{height:calc(100vh - 140px)}.h-auto{height:auto}.h-full{height:100%}.max-h-52{max-height:calc(var(--spacing) * 52)}.min-h-0{min-height:0}.min-h-\[44px\]{min-height:44px}.min-h-\[500px\]{min-height:500px}.\!w-7{width:calc(var(--spacing) * 7)!important}.\!w-24{width:calc(var(--spacing) * 24)!important}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-\[1px\]{width:1px}.w-\[260px\]{width:260px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[120px\]{max-width:120px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-\[520px\]{max-width:520px}.max-w-full{max-width:100%}.\!min-w-7{min-width:calc(var(--spacing) * 7)!important}.min-w-0{min-width:0}.min-w-\[72px\]{min-width:72px}.min-w-\[108px\]{min-width:108px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.scale-\[1\.03\]{scale:1.03}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[28px_1fr_auto\]{grid-template-columns:28px 1fr auto}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-12>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 12) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 12) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-8{row-gap:calc(var(--spacing) * 8)}.gap-y-16{row-gap:calc(var(--spacing) * 16)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-\[var\(--borderColor\)\]>:not(:last-child)){border-color:var(--borderColor)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.\!rounded-xl{border-radius:var(--radius-xl)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--borderColor\)\]{border-color:var(--borderColor)}.border-\[var\(--borderColorStrong\)\]{border-color:var(--borderColorStrong)}.border-\[var\(--colorBorderSecondary\)\]{border-color:var(--colorBorderSecondary)}.border-\[var\(--colorDanger\)\]\/20{border-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--colorDanger\)\]\/20{border-color:color-mix(in oklab,var(--colorDanger) 20%,transparent)}}.border-\[var\(--colorPrimary\)\]{border-color:var(--colorPrimary)}.border-blue-200{border-color:var(--color-blue-200)}.border-green-200{border-color:var(--color-green-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-red-200{border-color:var(--color-red-200)}.border-slate-100{border-color:var(--color-slate-100)}.border-transparent{border-color:#0000}.border-yellow-200{border-color:var(--color-yellow-200)}.bg-\[\#1e1e1e\]{background-color:#1e1e1e}.bg-\[var\(--borderColor\)\]{background-color:var(--borderColor)}.bg-\[var\(--borderColorStrong\)\]{background-color:var(--borderColorStrong)}.bg-\[var\(--colorAccent\)\]{background-color:var(--colorAccent)}.bg-\[var\(--colorBg\)\]{background-color:var(--colorBg)}.bg-\[var\(--colorBgContainer\)\]{background-color:var(--colorBgContainer)}.bg-\[var\(--colorBgElevated\)\]{background-color:var(--colorBgElevated)}.bg-\[var\(--colorBgHover\)\],.bg-\[var\(--colorBgHover\)\]\/50{background-color:var(--colorBgHover)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBgHover\)\]\/50{background-color:color-mix(in oklab,var(--colorBgHover) 50%,transparent)}}.bg-\[var\(--colorBgSecondary\)\]\/30{background-color:var(--colorBgSecondary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBgSecondary\)\]\/30{background-color:color-mix(in oklab,var(--colorBgSecondary) 30%,transparent)}}.bg-\[var\(--colorBgSelected\)\]{background-color:var(--colorBgSelected)}.bg-\[var\(--colorBorderSecondary\)\]{background-color:var(--colorBorderSecondary)}.bg-\[var\(--colorBrand\)\]\/5{background-color:var(--colorBrand)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBrand\)\]\/5{background-color:color-mix(in oklab,var(--colorBrand) 5%,transparent)}}.bg-\[var\(--colorDanger\)\]\/10{background-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorDanger\)\]\/10{background-color:color-mix(in oklab,var(--colorDanger) 10%,transparent)}}.bg-\[var\(--colorFillAlter\)\]{background-color:var(--colorFillAlter)}.bg-\[var\(--colorFillQuaternary\)\]{background-color:var(--colorFillQuaternary)}.bg-\[var\(--colorFillSecondary\)\]{background-color:var(--colorFillSecondary)}.bg-\[var\(--colorFillTertiary\)\]{background-color:var(--colorFillTertiary)}.bg-\[var\(--colorText\)\]{background-color:var(--colorText)}.bg-black{background-color:var(--color-black)}.bg-blue-50\/40{background-color:#eff6ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/40{background-color:color-mix(in oklab,var(--color-blue-50) 40%,transparent)}}.bg-blue-50\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/50{background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/50{background-color:#f0fdf480}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/50{background-color:color-mix(in oklab,var(--color-green-50) 50%,transparent)}}.bg-purple-50\/40{background-color:#faf5ff66}@supports (color:color-mix(in lab,red,red)){.bg-purple-50\/40{background-color:color-mix(in oklab,var(--color-purple-50) 40%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/40{background-color:#fef2f266}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/40{background-color:color-mix(in oklab,var(--color-red-50) 40%,transparent)}}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-50\/40{background-color:#fefce866}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/40{background-color:color-mix(in oklab,var(--color-yellow-50) 40%,transparent)}}.bg-yellow-50\/50{background-color:#fefce880}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/50{background-color:color-mix(in oklab,var(--color-yellow-50) 50%,transparent)}}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-32{padding-block:calc(var(--spacing) * 32)}.py-px{padding-block:1px}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-1{padding-bottom:var(--spacing)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[18px\]{--tw-leading:18px;line-height:18px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#d4d4d4\]{color:#d4d4d4}.text-\[var\(--colorAccent\)\]{color:var(--colorAccent)}.text-\[var\(--colorBg\)\]{color:var(--colorBg)}.text-\[var\(--colorBorderSecondary\)\]{color:var(--colorBorderSecondary)}.text-\[var\(--colorBrand\)\]{color:var(--colorBrand)}.text-\[var\(--colorDanger\)\]{color:var(--colorDanger)}.text-\[var\(--colorError\)\]{color:var(--colorError)}.text-\[var\(--colorInfo\)\]{color:var(--colorInfo)}.text-\[var\(--colorOk\)\]{color:var(--colorOk)}.text-\[var\(--colorPrimary\)\]{color:var(--colorPrimary)}.text-\[var\(--colorText\)\]{color:var(--colorText)}.text-\[var\(--colorTextQuaternary\)\]{color:var(--colorTextQuaternary)}.text-\[var\(--colorTextSecondary\)\]{color:var(--colorTextSecondary)}.text-\[var\(--colorTextTertiary\)\]{color:var(--colorTextTertiary)}.text-\[var\(--colorWarn\)\]{color:var(--colorWarn)}.text-\[var\(--colorWarning\)\]{color:var(--colorWarning)}.text-blue-500{color:var(--color-blue-500)}.text-green-600{color:var(--color-green-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-500{color:var(--color-slate-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.shadow-md,.shadow-none{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\:text-\[var\(--colorAccent\)\]:is(:where(.group):hover *){color:var(--colorAccent)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-\[var\(--borderColorStrong\)\]:hover{border-color:var(--borderColorStrong)}.hover\:border-\[var\(--colorBorderSecondary\)\]:hover{border-color:var(--colorBorderSecondary)}.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:var(--colorBrand)}.hover\:border-\[var\(--colorTextTertiary\)\]:hover{border-color:var(--colorTextTertiary)}.hover\:bg-\[var\(--colorBgContainer\)\]:hover{background-color:var(--colorBgContainer)}.hover\:bg-\[var\(--colorBgHover\)\]:hover{background-color:var(--colorBgHover)}.hover\:bg-\[var\(--colorFillAlter\)\]:hover{background-color:var(--colorFillAlter)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-\[var\(--colorText\)\]:hover{color:var(--colorText)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.hover\:shadow-lg:hover,.hover\:shadow-md:hover{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:bg-\[var\(--colorBgContainer\)\]:focus{background-color:var(--colorBgContainer)}.focus\:bg-\[var\(--colorBgElevated\)\]:focus{background-color:var(--colorBgElevated)}.focus\:bg-transparent:focus{background-color:#0000}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[var\(--colorAccent\)\]:focus-visible{--tw-ring-color:var(--colorAccent)}@media (min-width:40rem){.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:pb-0{padding-bottom:0}}@media (min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media (min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-end{align-items:flex-end}}@media (min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:96rem){.\32 xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\:bg-green-900\/20{background-color:#0d542b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-900\/20{background-color:color-mix(in oklab,var(--color-green-900) 20%,transparent)}}.dark\:bg-red-900\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/20{background-color:color-mix(in oklab,var(--color-red-900) 20%,transparent)}}.dark\:bg-white{background-color:var(--color-white)}.dark\:text-black{color:var(--color-black)}.dark\:text-green-500{color:var(--color-green-500)}.dark\:text-red-500{color:var(--color-red-500)}}}:root{--colorBg:#fff;--colorBgElevated:#fff;--colorBgSecondary:#fafafa;--colorBgHover:#f5f5f5;--colorBgSelected:#eff6ff;--colorText:#171717;--colorTextSecondary:#737373;--colorTextTertiary:#a3a3a3;--colorBrand:#06c;--colorBrandHover:#0052a3;--colorBrand2:#171717;--colorDanger:#e11d48;--colorOk:#16a34a;--colorWarn:#f59e0b;--colorInfo:#2563eb;--colorPrimary:#007aff;--colorAccent:#007aff;--colorSuccess:#34c759;--colorWarning:#ff9500;--colorError:#ff3b30;--colorBgContainer:#ffffffc7;--colorFillAlter:#00000005;--colorFillSecondary:#0000000a;--colorFillTertiary:#00000008;--colorFillQuaternary:#00000005;--colorBorderSecondary:#3c3c431f;--colorTextQuaternary:#3c3c432e;--colorWarningBg:#fff8e6;--colorSuccessBg:#e8f9ee;--colorInfoBg:#e8f2ff;--colorErrorBg:#ffeceb;--glassBg:#ffffffd9;--glassBlur:saturate(180%) blur(16px);--borderColor:#00000014;--borderColorStrong:#00000026;--borderColorSelected:#3b82f6;--borderSoft:#0000000f;--textSecondary:#737373;--surfaceElevated:#fff;--shadowSoft:0 4px 12px #0000000d,0 1px 2px #00000005;--shadowCard:0 0 0 1px #00000008,0 2px 12px #0000000a;--shadowButton:0 1px 2px #0000000d;--radiusSm:6px;--radiusMd:10px;--radiusLg:14px;--radiusPill:9999px;--sidebarWidth:260px;--fontSans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.dark{--colorBg:#000;--colorBgElevated:#0a0a0a;--colorBgSecondary:#121212;--colorBgHover:#1a1a1a;--colorBgSelected:#3b82f626;--colorText:#ededed;--colorTextSecondary:#a3a3a3;--colorTextTertiary:#737373;--colorBrand:#3b82f6;--colorBrandHover:#60a5fa;--colorBrand2:#d4d4d4;--colorDanger:#f43f5e;--colorOk:#22c55e;--colorWarn:#fbbf24;--colorInfo:#3b82f6;--colorPrimary:#0a84ff;--colorAccent:#0a84ff;--colorSuccess:#30d158;--colorWarning:#ff9f0a;--colorError:#ff453a;--colorBgContainer:#2c2c2ec7;--colorFillAlter:#ffffff08;--colorFillSecondary:#ffffff0f;--colorFillTertiary:#ffffff0a;--colorFillQuaternary:#ffffff08;--colorBorderSecondary:#ffffff1a;--colorTextQuaternary:#ebebf53d;--colorWarningBg:#ff9f0a1f;--colorSuccessBg:#30d1581f;--colorInfoBg:#0a84ff1f;--colorErrorBg:#ff453a1f;--glassBg:#000000d9;--borderColor:#ffffff1f;--borderColorStrong:#fff3;--borderColorSelected:#60a5fa;--borderSoft:#ffffff14;--textSecondary:#a3a3a3;--surfaceElevated:#1c1c1e;--shadowSoft:0 4px 12px #00000080,0 1px 2px #0003;--shadowCard:0 0 0 1px #ffffff14,0 4px 16px #0006;--shadowButton:0 1px 2px #0000004d}*,:after,:before{box-sizing:border-box}html{font-family:var(--fontSans);background:var(--colorBg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.appShellPlaceholder,body{background:var(--colorBg);min-height:100vh}body{font-family:var(--fontSans);color:var(--colorText);margin:0}a{color:inherit;text-decoration:none}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--borderColorStrong);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--colorTextTertiary)}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.animateFadeIn{animation:fadeIn .4s cubic-bezier(.2,.8,.2,1) forwards}.stagger-1{animation-delay:50ms}.stagger-2{animation-delay:.1s}.stagger-3{animation-delay:.15s}.stagger-4{animation-delay:.2s}.stagger-5{animation-delay:.25s}.space-y-8>*+*{margin-top:32px}.space-y-6>*+*{margin-top:24px}.space-y-5>*+*{margin-top:20px}.space-y-4>*+*{margin-top:16px}.space-y-3>*+*{margin-top:12px}.space-y-2>*+*{margin-top:8px}.space-x-8>*+*{margin-left:32px}.space-x-6>*+*{margin-left:24px}.space-x-4>*+*{margin-left:16px}.space-x-2>*+*{margin-left:8px}.routeProgress{top:0;left:var(--sidebarWidth);z-index:1000;background:linear-gradient(90deg,var(--colorPrimary),var(--colorAccent));height:3px;animation:routeProgress .9s ease-in-out infinite;position:fixed;right:0}#nprogress{pointer-events:none}#nprogress .bar{background:var(--colorBrand);z-index:1031;width:100%;height:3px;position:fixed;top:0;left:0}#nprogress .peg{width:100px;height:100%;box-shadow:0 0 10px var(--colorBrand),0 0 5px var(--colorBrand);opacity:1;display:block;position:absolute;right:0;transform:rotate(3deg)translateY(-4px)}.routeLoadingCard{border:1px solid var(--borderSoft);color:var(--textSecondary);background:var(--surfaceElevated);border-radius:16px;margin-bottom:16px;padding:14px 16px}@keyframes routeProgress{0%{transform-origin:0;opacity:.65;transform:scaleX(.15)}50%{transform-origin:0;opacity:1;transform:scaleX(.7)}to{transform-origin:0;opacity:.35;transform:scaleX(1)}}@media (max-width:1024px){:root{--sidebarWidth:200px}}@media (max-width:860px){:root{--sidebarWidth:72px}.sidebarLogo{justify-content:center;padding:16px}.sidebarFooter,.sidebarItem span:not(.sidebarChevron),.sidebarLogoSub,.sidebarLogoTitle{display:none}.sidebarItem{justify-content:center;padding:11px}.sidebarSubmenu{padding-left:0}.sidebarSubItem{padding-left:11px}.mainInner{padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px))}.topbar{margin:10px 12px 0;padding:10px 16px}}@media (max-width:640px){.sidebar{top:6px;left:6px;bottom:calc(6px + env(safe-area-inset-bottom,0px))}.mainContent{margin-left:72px}.mainInner{padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px))}.topbar{border-radius:16px;margin:8px 8px 0;padding:8px 12px}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebarWidth);display:flex;flex-direction:column;z-index:20;background:var(--colorBgSecondary);border-right:none;box-shadow:2px 0 8px rgba(0,0,0,.02);overflow:hidden;transition:width .3s cubic-bezier(.2,.8,.2,1),transform .3s ease}.sidebarCollapsedSelf{width:72px}.sidebarLogo{display:flex;align-items:center;gap:12px;padding:24px 20px 20px;height:68px;overflow:hidden}.sidebarCollapsedSelf .sidebarLogo{justify-content:center;padding:24px 0 20px}.sidebarCollapsedSelf .sidebarChevron,.sidebarCollapsedSelf .sidebarLabel,.sidebarCollapsedSelf .sidebarLogoTitle{display:none}.sidebarCollapsedSelf .sidebarItem{justify-content:center;padding:10px}.sidebarCollapsedSelf .sidebarCollapseWrapper{padding:12px}.sidebarLogoTitle{font-size:16px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;opacity:1;transition:opacity .2s ease;color:var(--colorText)}.sidebarNav{flex:1;overflow-y:auto;overflow-x:hidden;flex-direction:column;gap:2px}.sidebarItem,.sidebarNav{padding:8px 12px;display:flex}.sidebarItem{align-items:center;gap:10px;border-radius:var(--radiusSm);font-size:13.5px;font-weight:500;color:var(--colorTextSecondary);transition:all .15s ease;cursor:pointer;white-space:nowrap}.sidebarLabel{transition:opacity .2s ease}.sidebarItem:hover{background:var(--colorBgHover);color:var(--colorText)}.sidebarItemActive,.sidebarItemActive:hover{background:var(--colorBgElevated);color:var(--colorText);box-shadow:none}.dark .sidebarItemActive,.dark .sidebarItemActive:hover{box-shadow:none}.sidebarCollapseWrapper{padding:12px;border-top:1px solid var(--borderColor);display:flex;justify-content:center}.sidebarCollapseBtn{width:100%;height:32px;border-radius:var(--radiusSm);border:1px solid transparent;background:transparent;color:var(--colorTextSecondary);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}.sidebarCollapseBtn:hover{background:var(--colorBgHover);color:var(--colorText)}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:16px 32px;background:var(--glassBg);backdrop-filter:var(--glassBlur);-webkit-backdrop-filter:var(--glassBlur);border-bottom:none;box-shadow:0 1px 3px rgba(0,0,0,.02)}.topbarBtn{display:inline-flex;align-items:center;gap:8px;padding:6px;border-radius:var(--radiusSm);border:1px solid transparent;background:transparent;color:var(--colorTextSecondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease;outline:none}.topbarBtn:hover{background:var(--colorBgHover);color:var(--colorText)}.mainContent{margin-left:var(--sidebarWidth);flex:1;display:flex;flex-direction:column;min-height:100vh;background:var(--colorBg);transition:margin-left .3s cubic-bezier(.2,.8,.2,1)}.sidebarCollapsed .mainContent{margin-left:68px}.mainInner{flex:1;padding:32px clamp(24px,4vw,48px) calc(32px + env(safe-area-inset-bottom, 0px));width:100%;min-width:0;overflow-x:hidden;transition:opacity .2s ease}.mainInner.pageTransitioning{opacity:.5;pointer-events:none}.pageTitle{font-size:24px;font-weight:700;letter-spacing:-.01em;color:var(--colorText);margin:0}.pageDesc{margin-top:6px;font-size:14px;color:var(--colorTextSecondary)}.ant-card{background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;margin-bottom:0!important}.ant-card-head{border-bottom:none!important;padding:0!important;min-height:auto!important;margin-bottom:16px}.ant-card-head-title{font-size:16px!important;font-weight:600!important;padding:0!important}.ant-card-body{padding:0!important}.ant-modal-content{background:var(--colorBgElevated)!important;border:1px solid var(--borderColor)!important;border-radius:var(--radiusLg)!important;box-shadow:var(--shadowCard)!important;padding:24px!important}.ant-modal-header{background:transparent!important;margin-bottom:24px!important}.ant-input,.ant-input-number,.ant-input-password,.ant-select-selector{border:1px solid transparent!important;background:var(--colorBgHover)!important;border-radius:var(--radiusSm)!important;box-shadow:none!important;transition:all .2s ease!important}.ant-input-focused,.ant-input-number-focused,.ant-input-number:focus,.ant-input-number:hover,.ant-input-password:focus,.ant-input-password:hover,.ant-input:focus,.ant-input:hover,.ant-select-focused .ant-select-selector,.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:var(--borderColorStrong)!important;background:transparent!important;box-shadow:none!important}.ant-input-affix-wrapper-outlined:focus,.ant-input-affix-wrapper-outlined:focus-within,.ant-input-number-outlined:focus,.ant-input-number-outlined:focus-within,.ant-input-outlined:focus,.ant-input-outlined:focus-within,.ant-select-outlined.ant-select-focused .ant-select-selector{box-shadow:none!important;outline:none!important;border-color:var(--borderColorStrong)!important}.modern-table .ant-table{background:transparent!important;border:none!important;border-radius:0!important}.modern-table .ant-table-container{border:none!important}.modern-table .ant-table-thead>tr>th{background:var(--colorBgSecondary)!important;border:none!important;font-size:11px!important;font-weight:600!important;color:var(--colorTextSecondary)!important;text-transform:uppercase;letter-spacing:.05em;padding:14px 16px!important}.modern-table .ant-table-thead>tr>th:first-child{border-top-left-radius:var(--radiusMd)!important;border-bottom-left-radius:var(--radiusMd)!important}.modern-table .ant-table-thead>tr>th:last-child{border-top-right-radius:var(--radiusMd)!important;border-bottom-right-radius:var(--radiusMd)!important}.modern-table .ant-table-thead>tr>th:before{display:none!important}.modern-table .ant-table-tbody>tr>td{border:none!important;background:transparent!important;padding:18px 16px!important;font-size:14px}.modern-table .ant-table-tbody>tr:last-child>td{border-bottom:none!important}.modern-table .ant-table-tbody>tr:hover>td{background:var(--colorBgHover)!important}.modern-table .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--colorBgSelected)!important;border:0!important;box-shadow:none!important;outline:0!important}.ant-btn-default{border-color:var(--borderColor)!important;background:transparent!important;box-shadow:none!important}.ant-btn-default:hover{background:var(--colorBgHover)!important;border-color:var(--borderColorStrong)!important;color:var(--colorText)!important}.ant-btn-primary{background:var(--colorText)!important;color:var(--colorBg)!important;box-shadow:none!important;border:none!important}.ant-btn-primary:hover{background:var(--colorTextSecondary)!important;color:var(--colorBg)!important}.ant-row{row-gap:24px}.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-input-password,.ant-input-search .ant-input,.ant-input-search .ant-input-group-addon .ant-btn,.ant-mentions,.ant-picker,.ant-select-selector{min-height:34px;border:1px solid var(--borderColor)!important;background:var(--colorBgSecondary)!important;border-radius:var(--radiusSm)!important;box-shadow:none!important;outline:none!important}.ant-input-affix-wrapper>input.ant-input,.ant-input-affix-wrapper>textarea.ant-input,.ant-input-number .ant-input-number-input,.ant-input-password>input.ant-input,.ant-input-search .ant-input-affix-wrapper>input.ant-input{min-height:auto;border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;outline:none!important}.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus,.ant-input-affix-wrapper:hover,.ant-input-focused,.ant-input-number-focused,.ant-input-number:hover,.ant-input-password:hover,.ant-input:focus,.ant-input:hover,.ant-picker-focused,.ant-picker:hover,.ant-select-focused .ant-select-selector,.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:var(--colorBrand)!important;background:var(--colorBgElevated)!important;box-shadow:none!important;outline:none!important}.ant-btn:focus-visible,.ant-input-affix-wrapper:focus-visible,.ant-input:focus-visible,.ant-picker:focus-visible,.ant-select-selector:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:none!important;box-shadow:none!important}.ant-input-group-wrapper .ant-input-wrapper,.ant-input-search .ant-input-group{display:flex;align-items:stretch}.ant-input-search .ant-input,.ant-input-search .ant-input-affix-wrapper{border-start-end-radius:0!important;border-end-end-radius:0!important}.ant-input-search .ant-input-group-addon .ant-btn{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left:0!important}.ant-input-affix-wrapper{padding-inline-start:11px!important;padding-inline-end:11px!important}.ant-input-affix-wrapper .ant-input-prefix{margin-inline-end:8px!important;color:var(--colorTextTertiary)!important}.ant-input-affix-wrapper .ant-input-suffix{margin-inline-start:8px!important}.ant-input-affix-wrapper>input.ant-input{padding-inline-start:0!important}.ant-table-wrapper,.ant-table-wrapper .ant-spin-container,.ant-table-wrapper .ant-spin-nested-loading,.ant-table-wrapper .ant-table,.ant-table-wrapper .ant-table-body,.ant-table-wrapper .ant-table-container,.ant-table-wrapper .ant-table-content{background:transparent!important;border:0!important;box-shadow:none!important}.ant-table-wrapper .ant-table-cell:before,.ant-table-wrapper .ant-table-container:after,.ant-table-wrapper .ant-table-container:before{display:none!important}.ant-table-wrapper .ant-table-thead>tr>th{height:auto!important;padding:10px 12px!important;border:0!important;background:var(--colorBgSecondary)!important;color:var(--colorTextSecondary)!important;font-size:12px!important;font-weight:600!important;line-height:1.45!important;vertical-align:middle!important}.ant-table-wrapper .ant-table-tbody>tr>td{height:auto!important;min-height:0!important;padding:11px 12px!important;border:0!important;background:transparent!important;color:var(--colorText)!important;line-height:1.5!important;vertical-align:middle!important;overflow:visible!important;white-space:normal;word-break:break-word}.ant-table-wrapper .ant-table-tbody>tr.ant-table-row:hover>td,.ant-table-wrapper .ant-table-tbody>tr:hover>td{background:var(--colorBgHover)!important}.ant-table-wrapper .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--colorBgSelected)!important}.ant-table-wrapper .ant-table-expanded-row>td,.ant-table-wrapper .ant-table-placeholder>td{background:transparent!important}.ant-table-wrapper .ant-table-cell .ant-btn,.ant-table-wrapper .ant-table-cell .ant-space,.ant-table-wrapper .ant-table-cell .ant-tag{vertical-align:middle}.ant-table-wrapper .ant-table-cell .ant-typography,.ant-table-wrapper .ant-table-cell div,.ant-table-wrapper .ant-table-cell p,.ant-table-wrapper .ant-table-cell span{max-height:none;line-height:inherit}.ant-table-wrapper .ant-table-cell-ellipsis{white-space:normal!important}.ant-table-wrapper .ant-table-cell-ellipsis .ant-table-cell-content{display:block;overflow:visible;text-overflow:clip;white-space:normal}.ant-alert-description,.ant-alert-message,.ant-breadcrumb-link,.ant-btn,.ant-dropdown-menu-title-content,.ant-menu-title-content,.ant-select-selection-item,.ant-tabs-tab-btn,.ant-tag{display:inline-flex;align-items:center;gap:6px;min-width:0}.ant-btn{justify-content:center;line-height:1.2!important}.ant-btn .anticon,.ant-btn svg,.ant-menu-item svg,.ant-menu-item-icon,.ant-tabs-tab .anticon,.ant-tabs-tab svg,.ant-tag .anticon,.ant-tag svg,.anticon,.sidebarItem svg,.topbarBtn svg{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;vertical-align:-.125em}.ant-space{align-items:center}.ant-alert+.ant-card,.ant-card+.ant-alert,.ant-card+.ant-card,.cardGlass+.cardGlass{margin-top:16px!important}.ant-card-head{margin-bottom:14px!important}.ant-card .ant-typography,.ant-card ol,.ant-card p,.ant-card ul{line-height:1.65}.ant-card .ant-typography:last-child,.ant-card ol:last-child,.ant-card p:last-child,.ant-card ul:last-child{margin-bottom:0!important}.ant-tabs>.ant-tabs-nav,.ant-tabs>div>.ant-tabs-nav{margin:0 0 18px!important;padding:0 2px!important}.ant-tabs .ant-tabs-tab{padding:10px 12px!important;margin:0 4px 0 0!important}.ant-tabs .ant-tabs-content-holder{padding-top:2px}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab{border-radius:var(--radiusSm) var(--radiusSm) 0 0!important}.ant-form-item{margin-bottom:18px!important}.ant-form-item-label>label{align-items:center;height:auto!important;color:var(--colorText)!important;font-weight:500}.ant-form-item-explain,.ant-form-item-extra{margin-top:6px;font-size:12px}.ant-collapse-header,.ant-descriptions-item,.ant-list-item{align-items:center!important}.ant-table-wrapper.modern-table,.ant-table-wrapper.modern-table *,.modern-table.ant-table-wrapper,.modern-table.ant-table-wrapper *{border-color:transparent!important}.modern-table .ant-table,.modern-table .ant-table-body,.modern-table .ant-table-container,.modern-table .ant-table-content,.modern-table .ant-table-header,.modern-table .ant-table-tbody,.modern-table .ant-table-thead,.modern-table table{border:0!important;box-shadow:none!important;outline:0!important}.modern-table .ant-table-expanded-row>td,.modern-table .ant-table-selection-column,.modern-table .ant-table-tbody>tr>td,.modern-table .ant-table-thead>tr>th{height:auto!important;min-height:0!important;border:0!important;border-inline-end:0!important;border-bottom:0!important;box-shadow:none!important;outline:0!important;line-height:1.55!important;vertical-align:middle!important}.modern-table .ant-table-tbody>tr>td{padding:10px 12px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}.modern-table .ant-table-thead>tr>th{padding:9px 12px!important;border-radius:0!important}.modern-table .ant-table-cell-ellipsis,.modern-table .truncate{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;max-height:none!important}.modern-table .ant-table-row-expand-icon-cell,.modern-table .ant-table-selection-column{text-align:center!important;vertical-align:middle!important;white-space:nowrap!important}.modern-table .ant-table-cell .anticon,.modern-table .ant-table-cell svg,.modern-table .ant-table-row-expand-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle!important}.modern-table .ant-table-expanded-row-fixed,.modern-table .ant-table-expanded-row>td>div{border:0!important}.modern-table .ant-table-tbody>tr{height:auto!important;min-height:44px!important}.modern-table .ant-table-cell{height:auto!important;max-height:none!important;overflow:visible!important}.modern-table .ant-table-cell .ant-tag,.modern-table .ant-table-cell .ant-typography,.modern-table .ant-table-cell a,.modern-table .ant-table-cell button,.modern-table .ant-table-cell>*{max-height:none!important;overflow:visible!important;line-height:1.45!important}.modern-table .ant-table-body{overflow-y:auto!important;overflow-x:hidden!important}.ant-card,.cardGlass,[class*=Card],[class*=card]{box-shadow:none!important}.ant-card:hover,.cardGlass:hover,.group:hover,.hover\:border-\[var\(--borderColorStrong\)\]:hover,.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:transparent!important;box-shadow:none!important}.active,.ant-card.ant-card-bordered:hover,.ant-list-item-selected,.ant-list-item.active,.ant-menu-item-selected,.ant-menu-submenu-selected>.ant-menu-submenu-title,.ant-segmented-item-selected,.ant-select-item-option-selected,.ant-table-row-selected>td,.ant-tabs-tab-active,.ant-tabs-tab.ant-tabs-tab-active,.ant-tree-node-selected,.selected,[aria-selected=true],[data-selected=true]{border-color:transparent!important;box-shadow:none!important;outline:0!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@customize-agent/server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Customize Agent Web 管理控制台",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json"
|
|
@@ -9,14 +9,6 @@
|
|
|
9
9
|
"customize-web": "scripts/start-server.cjs",
|
|
10
10
|
"customize-dashboard": "scripts/start-server.cjs"
|
|
11
11
|
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"dev": "node -e \"require('fs').rmSync('.next', { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && next dev -p 17321",
|
|
14
|
-
"build": "node -e \"require('fs').rmSync('.next', { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && next build && node -e \"const fs=require('fs'); for (const p of ['.next/cache','.next/static/development','.next/static/webpack']) fs.rmSync(p, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && node scripts/verify-next-static.js",
|
|
15
|
-
"prepack": "node -e \"const fs=require('fs'); for (const p of ['.next/cache','.next/static/development','.next/static/webpack']) fs.rmSync(p, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && node scripts/verify-next-static.js --silent",
|
|
16
|
-
"prestart": "node scripts/verify-next-static.js",
|
|
17
|
-
"start": "next start -p 17321",
|
|
18
|
-
"lint": "eslint src/"
|
|
19
|
-
},
|
|
20
12
|
"files": [
|
|
21
13
|
".next/BUILD_ID",
|
|
22
14
|
".next/app-build-manifest.json",
|
|
@@ -44,7 +36,7 @@
|
|
|
44
36
|
},
|
|
45
37
|
"dependencies": {
|
|
46
38
|
"@ant-design/icons": "^6.3.2",
|
|
47
|
-
"@customize-agent/knowledge": "^4.0
|
|
39
|
+
"@customize-agent/knowledge": "^4.1.0",
|
|
48
40
|
"@customize-agent/llm": "^3.0.13",
|
|
49
41
|
"@customize-agent/runtime": "^3.0.13",
|
|
50
42
|
"@napi-rs/canvas": "^0.1.82",
|
|
@@ -78,5 +70,12 @@
|
|
|
78
70
|
"postcss": "^8.4.49",
|
|
79
71
|
"sass": "^1.101.0",
|
|
80
72
|
"tailwindcss": "^4.3.2"
|
|
73
|
+
},
|
|
74
|
+
"scripts": {
|
|
75
|
+
"dev": "node -e \"require('fs').rmSync('.next', { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && next dev -p 17321",
|
|
76
|
+
"build": "node -e \"require('fs').rmSync('.next', { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && next build && node -e \"const fs=require('fs'); for (const p of ['.next/cache','.next/static/development','.next/static/webpack']) fs.rmSync(p, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 })\" && node scripts/verify-next-static.js",
|
|
77
|
+
"prestart": "node scripts/verify-next-static.js",
|
|
78
|
+
"start": "next start -p 17321",
|
|
79
|
+
"lint": "eslint src/"
|
|
81
80
|
}
|
|
82
|
-
}
|
|
81
|
+
}
|
package/.next/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type": "commonjs"}
|