@customize-agent/server 4.60.4 → 4.60.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +12 -12
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/required-server-files.json +1 -1
  5. package/.next/server/chunks/1243.js +1 -1
  6. package/.next/server/chunks/2328.js +1 -1
  7. package/.next/server/chunks/6822.js +1 -1
  8. package/.next/server/chunks/{4683.js → 7848.js} +66 -66
  9. package/.next/server/chunks/9399.js +1 -1
  10. package/.next/server/chunks/9666.js +18 -18
  11. package/.next/server/instrumentation.js +1 -1
  12. package/.next/server/instrumentation.js.nft.json +1 -1
  13. package/.next/server/middleware-build-manifest.js +1 -1
  14. package/.next/server/pages/404.html +1 -1
  15. package/.next/server/pages/500.html +1 -1
  16. package/.next/server/pages/api/health.js +1 -1
  17. package/.next/server/pages/canvas/[id].html +1 -1
  18. package/.next/server/pages/canvas.html +1 -1
  19. package/.next/server/pages/documents.html +1 -1
  20. package/.next/server/pages/guide.html +1 -1
  21. package/.next/server/pages/index.html +1 -1
  22. package/.next/server/pages/knowledge/file-detail.html +1 -1
  23. package/.next/server/pages/knowledge/files.html +1 -1
  24. package/.next/server/pages/knowledge/manage.html +1 -1
  25. package/.next/server/pages/knowledge/source-preview.html +1 -1
  26. package/.next/server/pages/knowledge.html +1 -1
  27. package/.next/server/pages/models.html +1 -1
  28. package/.next/server/pages/overview.html +1 -1
  29. package/.next/server/pages/prompt.html +1 -1
  30. package/.next/server/pages/settings.html +1 -1
  31. package/.next/server/pages/skills/[id]/edit.html +1 -1
  32. package/.next/server/pages/skills/[id].html +1 -1
  33. package/.next/server/pages/skills/new.html +1 -1
  34. package/.next/server/pages/skills.html +1 -1
  35. package/.next/server/pages/system/logs.html +1 -1
  36. package/.next/server/pages-manifest.json +33 -33
  37. package/.next/static/{77a0c591cb44f2d0fda8be7c18cd915e32ecb5272d201914c0e332124a63d539 → 3a50a07d5e578847f7a1eefe9573b36527d6e1f5a7d0cb3b4883423ccfabc75b}/_buildManifest.js +1 -1
  38. package/.next/static/chunks/2-434e34e83819f4e4.js +1 -0
  39. package/.next/static/chunks/257-6938c7ab284ab21c.js +1 -0
  40. package/.next/static/chunks/pages/knowledge/{file-detail-4ccc50ced6382dab.js → file-detail-dc1807f8ed32cd59.js} +1 -1
  41. package/.next/static/chunks/pages/knowledge/source-preview-4309277bf497521c.js +1 -0
  42. package/.next/static/chunks/pages/{prompt-f00bf2272142bfa1.js → prompt-d75de6a6fead73c9.js} +1 -1
  43. package/.next/static/chunks/pages/skills/[id]-5130d68546be49cb.js +1 -0
  44. package/.next/static/css/f4f2d386cfeae8e4.css +1 -0
  45. package/package.json +1 -1
  46. package/.next/static/chunks/2-8570cd2beee4da6e.js +0 -1
  47. package/.next/static/chunks/257-3ea888b096943bc8.js +0 -1
  48. package/.next/static/chunks/pages/knowledge/source-preview-56ce59763fa015db.js +0 -1
  49. package/.next/static/chunks/pages/skills/[id]-101d753aa8fbf7a9.js +0 -1
  50. package/.next/static/css/39e9d8f998ce517b.css +0 -1
  51. /package/.next/static/{77a0c591cb44f2d0fda8be7c18cd915e32ecb5272d201914c0e332124a63d539 → 3a50a07d5e578847f7a1eefe9573b36527d6e1f5a7d0cb3b4883423ccfabc75b}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95],{2232:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>W});var r=s(65321),a=s(97109),l=s(1873),n=s.n(l),c=s(43220),i=s.n(c),o=s(86109),d=s(33442),x=s(14932),h=s(85114),m=s(85493),u=s(48318),p=s(75174),j=s(57271),v=s(42700),g=s(84253),f=s(68787),y=s(11702),b=s(76506),N=s(58569),w=s(88762),C=s(99271),k=s(37510),A=s(47210),S=s(99811),T=s(6578);let z={whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12.5,lineHeight:1.75};function M(e){let{children:t,maxHeight:s=520}=e;return(0,r.jsx)("div",{className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5",style:{maxHeight:s,overflow:"auto"},children:t})}function R(e){let{zoom:t,onChange:s,viewportRef:a}=e,l=e=>Math.min(4,Math.max(.2,Math.round(100*e)/100));return(0,r.jsxs)(d.A,{size:4,align:"center",children:[(0,r.jsx)(x.A,{title:"缩小(Ctrl/⌘ + 滚轮同效)",children:(0,r.jsx)(h.Ay,{size:"small",icon:(0,r.jsx)(C.A,{}),"aria-label":"缩小",onClick:()=>s(l(t-.1))})}),(0,r.jsxs)("span",{className:"text-xs tabular-nums text-[var(--colorTextSecondary)] w-12 text-center",children:[Math.round(100*t),"%"]}),(0,r.jsx)(x.A,{title:"放大(Ctrl/⌘ + 滚轮同效)",children:(0,r.jsx)(h.Ay,{size:"small",icon:(0,r.jsx)(k.A,{}),"aria-label":"放大",onClick:()=>s(l(t+.1))})}),(0,r.jsx)(h.Ay,{size:"small",onClick:()=>{let e=a.current,r=null==e?void 0:e.firstElementChild;if(!e||!r)return;let n=r.clientWidth/t;n&&s(l((e.clientWidth-2)/n))},children:"适应宽度"}),(0,r.jsx)(h.Ay,{size:"small",disabled:1===t,onClick:()=>s(1),children:"原始比例"})]})}function I(e){let{zoom:t,viewportRef:s,children:a}=e;return(0,r.jsx)("div",{ref:s,className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-3 overflow-auto",style:{maxHeight:"68vh"},children:1===t?a:(0,r.jsx)("div",{style:{zoom:t},children:a})})}function F(e){var t,s,a;let{block:l,parts:n}=e;if("undefined"==typeof DOMParser)return(0,r.jsx)(M,{children:(0,r.jsx)("pre",{style:z,children:l.text})});let c=null!=(a=null==(t=/<[^!?][^>]*?\s([^>]*)>/u.exec(null!=(s=n[l.part])?s:""))?void 0:t[1])?a:'xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"',i=new DOMParser().parseFromString("<root ".concat(c,">").concat(l.xml,"</root>"),"application/xml"),o=i.documentElement.firstElementChild;if(!o||i.querySelector("parsererror"))return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.A,{type:"warning",message:"表格XML显示未完成,保留原文及结构供核查"}),(0,r.jsx)(M,{children:(0,r.jsx)("pre",{style:z,children:l.text})})]});let d=[...o.children].filter(e=>"tr"===e.localName).map(e=>{let t=0;return[...e.children].filter(e=>"tc"===e.localName).map(e=>{var s,r,a;let l=Number(null!=(r=null==(s=e.getElementsByTagName("w:gridSpan")[0])?void 0:s.getAttribute("w:val"))?r:1),n=e.getElementsByTagName("w:vMerge")[0],c={column:t,span:l,merge:n?null!=(a=n.getAttribute("w:val"))?a:"continue":void 0,text:[...e.getElementsByTagName("w:t")].map(e=>{var t;return null!=(t=e.textContent)?t:""}).join("")};return t+=l,c})});return(0,r.jsx)("table",{className:"w-full border-collapse my-3 text-sm",children:(0,r.jsx)("tbody",{children:d.map((e,t)=>(0,r.jsx)("tr",{className:"even:bg-[var(--colorFillAlter)]",children:e.filter(e=>"continue"!==e.merge).map(e=>{var s,a;let l=1;if("restart"===e.merge)for(;(null==(a=d[t+l])||null==(s=a.find(t=>t.column===e.column))?void 0:s.merge)==="continue";)l++;return(0,r.jsx)("td",{className:"border border-[var(--borderColor)] p-2 align-top whitespace-pre-wrap",colSpan:e.span,rowSpan:l,children:e.text},e.column)})},t))})})}function O(e){let{sheet:t,zoom:s,viewportRef:l}=e,[n,c]=(0,a.useState)(1),[i,o]=(0,a.useState)(1),d=t.cells.reduce((e,t)=>Math.max(e,t.row),t.merges.reduce((e,t)=>Math.max(e,t.endRow),1)),x=t.cells.reduce((e,t)=>Math.max(e,t.col),t.merges.reduce((e,t)=>Math.max(e,t.endCol),1)),h=(0,a.useMemo)(()=>new Map(t.cells.map(e=>["".concat(e.row,":").concat(e.col),e])),[t]),m=(n-1)*50+1,j=Math.min(d,m+49),v=Math.min(x,i+19);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-3 text-xs text-[var(--colorTextSecondary)]",children:[(0,r.jsx)("span",{children:"原工作表物理坐标;公式使用已保存缓存值"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-2",children:["起始列 ",(0,r.jsx)(u.A,{size:"small",min:1,max:x,value:i,onChange:e=>o(null!=e?e:1)})]})]}),(0,r.jsx)(I,{zoom:s,viewportRef:l,children:(0,r.jsxs)("table",{className:"border-collapse text-xs",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 sticky top-0 left-0 z-[2]",children:"行"}),Array.from({length:v-i+1},(e,t)=>(0,r.jsxs)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 sticky top-0 z-[1] min-w-24",children:["C",i+t]},t))]})}),(0,r.jsx)("tbody",{children:Array.from({length:j-m+1},(e,s)=>{let a=m+s;return(0,r.jsxs)("tr",{className:"even:bg-[var(--colorFillAlter)]",children:[(0,r.jsxs)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 text-[var(--colorTextSecondary)] sticky left-0 z-[1]",children:["R",a]}),Array.from({length:v-i+1},(e,s)=>{var l,n,c;let o=i+s,d=h.get("".concat(a,":").concat(o)),x=t.merges.find(e=>a>=e.startRow&&a<=e.endRow&&o>=e.startCol&&o<=e.endCol);if(x&&(a!==Math.max(m,x.startRow)||o!==Math.max(i,x.startCol)))return null;let u=x?h.get("".concat(x.startRow,":").concat(x.startCol)):d,p=null!=(l=null==u?void 0:u.display)?l:"";return(0,r.jsxs)("td",{className:"border border-[var(--borderColor)] px-2 py-1 whitespace-pre-wrap align-top ".concat("number"==typeof p||"string"==typeof p&&/^-?[\d,]+(\.\d+)?$/u.test(p.trim())?"text-right tabular-nums":""," ").concat(""===p?"bg-[var(--colorFillQuaternary)]":""),rowSpan:x?Math.min(j,x.endRow)-Math.max(m,x.startRow)+1:1,colSpan:x?Math.min(v,x.endCol)-Math.max(i,x.startCol)+1:1,title:"".concat(null!=(n=null==u?void 0:u.address)?n:"R".concat(a,"C").concat(o),"\n原值: ").concat(String(null!=(c=null==u?void 0:u.value)?c:"")).concat((null==u?void 0:u.formula)?"\n公式: =".concat(u.formula):""),children:[p,(null==u?void 0:u.formula)&&(0,r.jsxs)("div",{className:"text-[10px] text-[var(--colorTextTertiary)]",children:["=",u.formula]})]},o)})]},a)})})]})}),(0,r.jsx)("div",{className:"mt-3 flex justify-end",children:(0,r.jsx)(p.A,{size:"small",current:n,pageSize:50,total:d,showSizeChanger:!1,onChange:c})})]})}function E(e){let{frameIds:t,endpoint:s,zoom:l,viewportRef:c}=e,[i,o]=(0,a.useState)(0),[d,x]=(0,a.useState)(""),[h,u]=(0,a.useState)(),[p,f]=(0,a.useState)(""),[y,b]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=!0;x(""),f(""),u(void 0);let r=t[i];if(r)return b(!0),(0,T.x6)("".concat(s,"&frame=").concat(encodeURIComponent(r),"&format=json")).then(t=>{e&&(x(t.image),u(t.receipt))}).catch(t=>{e&&f(String(t))}).finally(()=>{e&&b(!1)}),()=>{e=!1}},[i,t,s]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-3",children:[(0,r.jsx)(j.A,{size:"small",className:"min-w-64",value:i,onChange:o,options:t.map((e,t)=>({value:t,label:e}))}),(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:"显示实际库内实体与块实例;绘制限制不等同数据丢失。"})]}),(0,r.jsxs)(v.A,{spinning:y,children:[p&&(0,r.jsx)(m.A,{type:"warning",message:"图框显示未完成",description:"".concat(p,";请区分已入库结构和绘制能力,已有库内文字仍可读取。")}),d?(0,r.jsx)(I,{zoom:l,viewportRef:c,children:(0,r.jsx)("div",{className:"bg-white inline-block p-2",children:(0,r.jsx)(n(),{unoptimized:!0,width:2400,height:1800,src:d,alt:"已解析CAD图框",style:{width:"100%",height:"auto",display:"block"}})})}):!y&&!p&&(0,r.jsx)(g.A,{description:"尚未识别到可显示图框"}),void 0!==h&&(0,r.jsxs)("details",{className:"mt-3",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"本次绘制回执与限制"}),(0,r.jsx)(M,{maxHeight:260,children:(0,r.jsx)("pre",{style:z,children:JSON.stringify(h,null,2)})})]})]})]})}function P(e){let{structure:t,endpoint:s,zoom:l,viewportRef:c}=e,[i,o]=(0,a.useState)(0);if(t.spreadsheet){let e=t.spreadsheet.sheets;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(j.A,{size:"small",className:"min-w-64",value:i,options:e.map((e,t)=>({value:t,label:e.name})),onChange:o})}),e[i]&&(0,r.jsx)(O,{sheet:e[i],zoom:l,viewportRef:c},i)]})}if(t.docx)return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(I,{zoom:l,viewportRef:c,children:(0,r.jsxs)("div",{className:"mx-auto",style:{maxWidth:860},children:[t.docx.blocks.map(e=>(0,r.jsxs)("div",{id:e.id,className:"mb-4",children:[(0,r.jsxs)("div",{className:"mb-1 text-[10px] text-[var(--colorTextTertiary)]",children:[e.part," \xb7 第 ",e.index+1," 块"]}),"table"===e.kind?(0,r.jsx)(F,{block:e,parts:t.docx.parts}):(0,r.jsx)("p",{className:e.headingLevel?"font-semibold text-lg whitespace-pre-wrap mt-2":"whitespace-pre-wrap leading-8 text-sm",children:e.text}),(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextTertiary)]",children:"来源 XML"}),(0,r.jsx)(M,{maxHeight:260,children:(0,r.jsx)("pre",{style:z,children:e.xml})})]})]},e.id)),t.docx.images.map(e=>(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("div",{className:"mb-1 text-xs text-[var(--colorTextSecondary)]",children:e.name}),/^image\/(?:png|jpeg|gif|webp|svg\+xml|bmp)$/u.test(e.mediaType)?(0,r.jsx)(n(),{unoptimized:!0,width:1200,height:900,src:"".concat(s,"&image=").concat(encodeURIComponent(e.name)),alt:e.name,style:{maxWidth:"100%",height:"auto"}}):(0,r.jsx)(m.A,{type:"info",message:"已保留".concat(e.mediaType,"图片数据,浏览器未声明支持显示")})]},e.name))]})})});if(t.pdf){var d,x,h,u;let e=t.pdf.pages,s=e[i],a=null!=(x=null!=(d=null==s?void 0:s.width)?d:null==s?void 0:s.glyphs.reduce((e,t)=>Math.max(e,t.x+t.width+20),600))?x:600,n=null!=(u=null!=(h=null==s?void 0:s.height)?h:null==s?void 0:s.glyphs.reduce((e,t)=>Math.max(e,t.y+t.height+20),800))?u:800;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:"显示库内已保存文字与位置;可选原版本对照不影响本页及后续生成。"}),(0,r.jsx)(p.A,{size:"small",current:i+1,pageSize:1,total:e.length,showSizeChanger:!1,onChange:e=>o(e-1)})]}),s&&(0,r.jsxs)(I,{zoom:l,viewportRef:c,children:[(0,r.jsx)("div",{className:"mx-auto bg-white shadow-sm border border-[var(--borderColor)]",style:{width:a},children:(0,r.jsx)("svg",{viewBox:"0 0 ".concat(a," ").concat(n),width:"100%",role:"img","aria-label":"解析第".concat(s.page,"页"),children:s.glyphs.map(e=>(0,r.jsx)("text",{x:e.x,y:n-e.y,fontSize:Math.max(6,e.height),children:e.str},e.id))})}),s.ocrText&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("div",{className:"mb-1 text-xs text-[var(--colorTextSecondary)]",children:"该页 OCR 文本"}),(0,r.jsx)(M,{maxHeight:260,children:(0,r.jsx)("pre",{style:z,children:s.ocrText})})]}),!s.glyphs.length&&!s.ocrText&&(0,r.jsx)(g.A,{description:"该页没有可展示文字,不能据此断言原页为空"})]})]})}return t.cad?(0,r.jsx)(E,{frameIds:t.cad.frameIds,endpoint:s,zoom:l,viewportRef:c}):(0,r.jsx)(g.A,{description:"此解析结果尚无结构显示适配,完整解析文字仍可查看"})}function _(e){let{data:t}=e,s=t.conservation,a=[{key:"chars",label:"文本覆盖",value:"".concat(s.coveredNonWhitespaceChars," / ").concat(s.sourceNonWhitespaceChars," 个非空白字符"),trouble:s.coveredNonWhitespaceChars!==s.sourceNonWhitespaceChars,...s.uncovered.length?{detail:(0,r.jsxs)(r.Fragment,{children:[s.uncovered.slice(0,5).map((e,t)=>(0,r.jsxs)("div",{className:"mb-1",children:["字符 ",e.start,"–",e.end,":",e.text.slice(0,120)]},t)),s.uncovered.length>5?(0,r.jsxs)("div",{children:["…还有 ",s.uncovered.length-5," 段"]}):null]})}:{}},{key:"chunks",label:"切片数",value:"".concat(t.totalChunks," 块(库内登记 ").concat(s.registeredChunkCount,",与底稿一致:").concat(s.chunkCountMatches?"是":"否",")"),trouble:!s.chunkCountMatches},{key:"stale",label:"身份过期的切片",value:s.staleChunkIdentities.length?"".concat(s.staleChunkIdentities.length," 块"):"无",trouble:s.staleChunkIdentities.length>0,...s.staleChunkIdentities.length?{detail:(0,r.jsxs)("div",{children:["切片序号:",s.staleChunkIdentities.slice(0,20).join(", "),s.staleChunkIdentities.length>20?" …":""]})}:{}},{key:"unmapped",label:"未能映射回底稿的切片",value:s.unmapped.length?"".concat(s.unmapped.length," 块"):"无",trouble:s.unmapped.length>0,...s.unmapped.length?{detail:(0,r.jsxs)(r.Fragment,{children:[s.unmapped.slice(0,5).map(e=>(0,r.jsxs)("div",{className:"mb-1",children:["切片 ",e.chunkIndex,":",e.text.slice(0,120)]},e.chunkIndex)),s.unmapped.length>5?(0,r.jsxs)("div",{children:["…还有 ",s.unmapped.length-5," 块"]}):null]})}:{}},{key:"order",label:"切片顺序",value:s.outOfOrderChunks.length?"乱序 ".concat(s.outOfOrderChunks.length," 块"):"与底稿一致",trouble:s.outOfOrderChunks.length>0,...s.outOfOrderChunks.length?{detail:(0,r.jsxs)("div",{children:["切片序号:",s.outOfOrderChunks.slice(0,20).join(", ")]})}:{}},{key:"repeated",label:"重复上下文跨度",value:"".concat(s.repeatedContextSpans," 处"),trouble:!1}];return(0,r.jsx)("div",{className:"flex flex-col",children:a.map(e=>(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-1 sm:gap-3 py-2 border-b border-[var(--colorBorderSecondary)] last:border-0",children:[(0,r.jsx)("div",{className:"sm:w-44 shrink-0 text-xs text-[var(--colorTextTertiary)] sm:pt-0.5",children:e.label}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 text-sm",children:[(0,r.jsx)("span",{className:e.trouble?"text-[var(--colorError)]":"text-[var(--colorText)]",children:e.value}),e.detail&&(0,r.jsxs)("details",{className:"mt-1",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"展开明细"}),(0,r.jsx)(M,{maxHeight:220,children:(0,r.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:e.detail})})]})]})]},e.key))})}function W(){let e=(0,o.useRouter)(),t="string"==typeof e.query.relativePath?e.query.relativePath:"",s="string"==typeof e.query.projectRoot?e.query.projectRoot:"",[l,n]=(0,a.useState)(),[c,x]=(0,a.useState)(""),[u,j]=(0,a.useState)(!1),[C,k]=(0,a.useState)(1),[I,F]=(0,a.useState)("structure"),O=(0,a.useRef)(null),E=(0,a.useRef)(0),W=new URLSearchParams({relativePath:t,...s?{projectRoot:s}:{}}),H="/api/kb/files/source-preview?".concat(W),B="".concat(H).concat((null==l?void 0:l.status)==="recorded"?"&snapshotId=".concat(l.identity.snapshotId):""),D=(0,a.useCallback)(async e=>{let t=++E.current;j(!0),x("");try{let s=await (0,T.x6)(e);t===E.current&&n(s)}catch(e){t===E.current&&x(e instanceof Error?e.message:String(e))}finally{t===E.current&&j(!1)}},[]);(0,a.useEffect)(()=>{n(void 0),t&&D(H)},[t,H,D]);let q=null==l?void 0:l.pdfCoverage,L=q&&"complete"!==q.status?(0,r.jsx)(m.A,{showIcon:!0,type:"warning",message:"unmeasured"===q.status?"PDF 页覆盖未记录":"PDF 页覆盖不完整",description:(0,r.jsxs)(d.A,{direction:"vertical",size:2,children:[q.pageCount?(0,r.jsx)("span",{children:"已处理页:".concat(q.processedPages,"/").concat(q.pageCount)}):(0,r.jsx)("span",{children:'没有记录到声明页数,无法据此断言"处理了几页"。'}),q.missingPages.length>0&&(0,r.jsx)("span",{children:"缺少页:".concat(q.missingPages.join(", "))}),q.failedPages.length>0&&(0,r.jsx)("span",{children:"失败页:".concat(q.failedPages.join(", "))}),(0,r.jsx)("span",{children:"这条读数只说明解析侧处理了哪些页,不证明内容、版式或专业采用正确。"})]})}):null;return(0,r.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,r.jsx)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl border border-[var(--borderColor)] p-6",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center min-w-0",children:[(0,r.jsxs)(i(),{href:"/knowledge/file-detail?".concat(W),className:"mr-4 text-sm text-[var(--colorTextSecondary)] hover:text-[var(--colorText)] inline-flex items-center gap-1 shrink-0",children:[(0,r.jsx)(A.A,{})," 返回切片详情"]}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-[var(--colorText)] mb-1",children:"解析核查预览"}),(0,r.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0 break-all",children:t})]})]}),(0,r.jsxs)(d.A,{wrap:!0,className:"shrink-0",children:["structure"===I&&(0,r.jsx)(R,{zoom:C,onChange:k,viewportRef:O}),(0,r.jsx)(h.Ay,{size:"small",icon:(0,r.jsx)(S.A,{}),onClick:()=>{D(H)},loading:u,children:"刷新"})]})]})}),c&&(0,r.jsx)(m.A,{type:"error",message:c}),(0,r.jsx)(v.A,{spinning:u,children:(null==l?void 0:l.status)==="not-recorded"?(0,r.jsxs)(f.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,r.jsx)(m.A,{type:"warning",message:"独立解析底稿尚未记录",description:l.reason}),L&&(0,r.jsx)("div",{className:"mt-3",children:L}),(0,r.jsx)(h.Ay,{className:"mt-4",onClick:()=>{(async()=>{try{await (0,T.HC)(t,s||void 0),x("重新解析任务已提交,请在处理完成后刷新本页。")}catch(e){x(String(e))}})()},children:"重新解析此文件"}),(0,r.jsx)("p",{className:"mt-4 mb-2 text-sm text-[var(--colorTextSecondary)]",children:"当前实际库内切片(不是独立底稿):"}),l.chunks.map(e=>(0,r.jsxs)("div",{className:"my-3",children:[(0,r.jsxs)(y.A,{children:["切片 ",e.chunkIndex]}),(0,r.jsx)(M,{children:(0,r.jsx)("pre",{style:z,children:e.content})})]},e.id)),(0,r.jsx)("div",{className:"mt-3 flex justify-end",children:(0,r.jsx)(p.A,{current:Math.floor(l.offset/30)+1,pageSize:30,total:l.totalChunks,showSizeChanger:!1,onChange:e=>{D("".concat(H,"&offset=").concat((e-1)*30))}})})]}):(null==l?void 0:l.status)==="recorded"?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(f.A,{className:"rounded-2xl border-[var(--borderColor)] mb-5",children:[(0,r.jsx)(m.A,{className:"mb-4",type:"verified"===l.conservation.status&&l.conservation.chunkCountMatches&&!l.conservation.staleChunkIdentities.length?"success":"error",message:"文本覆盖:".concat(l.conservation.coveredNonWhitespaceChars,"/").concat(l.conservation.sourceNonWhitespaceChars,";实际切片:").concat(l.totalChunks),description:"这项检查只证明独立解析文字与切片的内容覆盖,不证明原文件解析、版式、工程理解或专业采用全部正确。"}),(0,r.jsx)(_,{data:l}),L&&(0,r.jsx)("div",{className:"mt-3",children:L}),l.identity.limitations.map(e=>(0,r.jsx)("p",{className:"mt-2 mb-0 text-xs text-[var(--colorTextSecondary)]",children:e},e)),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[(0,r.jsx)(h.Ay,{size:"small",href:"".concat(B,"&original=1"),target:"_blank",children:"查看/下载入库原版本"}),(0,r.jsx)(h.Ay,{size:"small",onClick:()=>{(0,T.tn)(t,"source-version",s||void 0).catch(e=>x("可选原版本对照不可用:".concat(String(e),";库内数据仍可读取")))},children:"本机打开入库原版本"})]}),(0,r.jsxs)("details",{className:"mt-4",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"技术详情(原文件哈希 / 解析版本 / 解析身份 / 核查口径)"}),(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsxs)(b.A,{size:"small",column:{xxl:3,xl:3,lg:2,md:1,sm:1,xs:1},bordered:!0,styles:{label:{width:"120px",background:"var(--colorFillAlter)",color:"var(--colorTextSecondary)"}},children:[(0,r.jsx)(b.A.Item,{label:"原文件SHA256",children:(0,r.jsx)("span",{className:"break-all text-xs",children:l.identity.sourceHash})}),(0,r.jsx)(b.A.Item,{label:"解析版本",children:(0,r.jsx)("span",{className:"text-xs",children:l.identity.parserVersion})}),(0,r.jsx)(b.A.Item,{label:"解析身份",children:(0,r.jsx)("span",{className:"break-all text-xs",children:l.identity.snapshotId})}),(0,r.jsx)(b.A.Item,{label:"核查口径",children:(0,r.jsxs)("span",{className:"text-xs",children:[l.conservation.version," \xb7 ",l.conservation.scope," \xb7 入库状态 ",l.conservation.ingestionStatus]})}),(0,r.jsx)(b.A.Item,{label:"底稿快照",children:(0,r.jsx)("span",{className:"break-all text-xs",children:l.conservation.snapshotId})})]})})]})]}),(0,r.jsx)(N.A,{className:"documents-tabs",activeKey:I,onChange:F,items:[{key:"structure",label:"解析结构",children:(0,r.jsx)(f.A,{className:"rounded-2xl border-[var(--borderColor)]",onWheelCapture:e=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),k(t=>Math.min(4,Math.max(.2,Math.round((t-.1*Math.sign(e.deltaY))*100)/100))))},children:(0,r.jsx)(P,{structure:l.structure,endpoint:B,zoom:C,viewportRef:O},l.identity.snapshotId)})},{key:"chunks",label:"实际切片重组",children:(0,r.jsxs)(f.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,r.jsxs)("p",{className:"text-xs text-[var(--colorTextSecondary)]",children:["当前展示切片 ",l.offset+1," 至 ",l.offset+l.chunks.length,",共 ",l.totalChunks," 块;分页不代表其余内容不存在。"]}),l.chunks.map(e=>(0,r.jsxs)("div",{className:"my-4",children:[(0,r.jsxs)(d.A,{size:4,wrap:!0,children:[(0,r.jsxs)(y.A,{children:["切片 ",e.chunkIndex]}),e.sectionTitle?(0,r.jsx)(y.A,{color:"cyan",children:e.sectionTitle}):null]}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(M,{children:(0,r.jsx)("pre",{style:z,children:e.content})})}),(0,r.jsxs)("details",{className:"mt-2",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextTertiary)]",children:"库内解析底稿区间"}),(0,r.jsx)(M,{maxHeight:240,children:(0,r.jsx)("pre",{style:z,children:JSON.stringify(e.sourceSpans,null,2)})})]})]},e.id)),(0,r.jsx)("div",{className:"mt-3 flex justify-end",children:(0,r.jsx)(p.A,{current:Math.floor(l.offset/30)+1,pageSize:30,total:l.totalChunks,showSizeChanger:!1,onChange:e=>{D("".concat(B,"&offset=").concat((e-1)*30))}})})]})}]})]}):u?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(w.A,{active:!0,title:!1,paragraph:{rows:3}}),(0,r.jsx)(w.A,{active:!0,title:!1,paragraph:{rows:6}})]}):(0,r.jsx)(g.A,{description:"选择文件后查看解析结果"})})]})}},59528:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/source-preview",function(){return s(2232)}])}},e=>{e.O(0,[324,280,665,569,499,787,808,318,781,636,593,792],()=>e(e.s=59528)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{27549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(69583)}])},45551:(e,t,r)=>{"use strict";r.d(t,{Jm:()=>i,fw:()=>l,je:()=>a.j,mc:()=>c,z3:()=>o});var a=r(96538);function o(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t);return"".concat(r.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let r=Math.floor(Math.floor((Date.now()-e)/1e3)/60),a=Math.floor(r/60),o=Math.floor(a/24);return o>30?new Date(e).toLocaleDateString(t):"en-US"===t?o>0?"".concat(o,"d ago"):a>0?"".concat(a,"h ago"):r>0?"".concat(r,"m ago"):"Just now":o>0?"".concat(o," 天前"):a>0?"".concat(a," 小时前"):r>0?"".concat(r," 分钟前"):"刚刚"}let s={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},n={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function i(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===r?n:s)[e])?t:e}let c={active:"common.statusIndexed",outdated:"common.statusOutdated",error:"common.statusAbnormal",deleted:"common.statusDeleted",disk:"common.statusNotIndexed"}},58690:(e,t,r)=>{"use strict";function a(e){var t,r,a;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{defaultPageSize:null!=(t=o.pageSize)?t:10,pageSizeOptions:null!=(r=o.pageSizeOptions)?r:[10,20,50,100],showSizeChanger:!0,showTotal:t=>{var r,a;return e(null!=(r=o.totalLabelKey)?r:"common.totalRows",null!=(a=o.totalLabelFallback)?a:"共 {count} 条").replace("{count}",String(t))},hideOnSinglePage:null!=(a=o.hideOnSinglePage)&&a,showQuickJumper:!1}}r.d(t,{B:()=>a})},69583:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eo});var a=r(65321),o=r(97109),l=r(39507),s=r(45551),n=r(58690),i=r(6578),c=r(17807),d=r(33442),m=r(11702),p=r(85114),x=r(32965),u=r(56985),h=r(88762),g=r(45759),f=r(7576),v=r(57271),j=r(49292),y=r(84253),w=r(38964),b=r(34052),N=r(42700),S=r(55122),A=r(93360),C=r(82238);function T(e){let{idPrefix:t="prompt-writing-guide"}=e,r=(0,l.Vr)();return(0,a.jsxs)("aside",{"aria-labelledby":"".concat(t,"-title"),className:"mb-3 shrink-0 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgHover)] px-3 py-2.5 text-xs leading-relaxed",children:[(0,a.jsx)("div",{id:"".concat(t,"-title"),className:"font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideTitle")}),(0,a.jsx)("p",{id:"".concat(t,"-intro"),className:"mt-1 text-[var(--colorTextSecondary)]",children:r("prompt.writingGuideIntro")}),(0,a.jsx)("p",{className:"mt-1 text-[var(--colorTextSecondary)]",children:r("prompt.writingGuideParameters")}),(0,a.jsxs)("details",{className:"mt-2",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[var(--colorAccent)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:r("prompt.writingGuideDetails")}),(0,a.jsxs)("div",{className:"mt-3 max-h-[320px] overflow-y-auto pr-1 text-[var(--colorTextSecondary)]",children:[(0,a.jsx)("div",{className:"font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideNeedsTitle")}),(0,a.jsxs)("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:[(0,a.jsx)("li",{children:r("prompt.writingGuidePurpose")}),(0,a.jsx)("li",{children:r("prompt.writingGuideStructure")}),(0,a.jsx)("li",{children:r("prompt.writingGuideEngineering")}),(0,a.jsx)("li",{children:r("prompt.writingGuideStyle")})]}),(0,a.jsx)("div",{className:"mt-3 font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideManagedTitle")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideManaged")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideAvoid")}),(0,a.jsx)("div",{className:"mt-3 font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideExampleTitle")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideExampleHint")}),(0,a.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words rounded-lg border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-2.5 font-mono text-[11px] text-[var(--colorText)]",children:r("prompt.writingGuideExample")}),(0,a.jsx)("p",{className:"mt-2",children:r("prompt.writingGuideOneOutline")})]})]})]})}var z=r(99650),F=r(81668),E=r(58209),k=r(26631),P=r(7225),O=r(96091),B=r(54746),M=r(30486),D=r(46082),I=r(42758),G=r(7851),R=r(84742),_=r(24810),J=r(7492);async function L(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function U(e,t,r){let a=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t,name:r})});if(!a.ok)throw Error("Failed");return a.json()}async function K(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"previewRules",content:e})});return t.ok&&(await t.json()).preview||null}async function H(e,t){let r=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"createCustom",name:e,content:t})});if(!r.ok)throw Error("Failed");return r.json()}async function X(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",selectedIds:e})});if(!t.ok)throw Error("Failed");return t.json()}async function $(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"import",...e&&"object"==typeof e?e:{prompts:[]}})});if(!t.ok)throw Error(await t.text());return t.json()}async function q(){return W("",!1,60)}async function V(e){let t=await fetch("/api/kb/files/detail?relativePath=".concat(encodeURIComponent(e)));if(!t.ok)throw Error("Failed");return((await t.json()).chunks||[]).map(e=>e.content||"").filter(Boolean).join("\n\n").slice(0,12e3)}async function W(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;return(await (0,i.nU)({limit:r,...e.trim()?{query:e.trim()}:{},...t?{}:{includeContent:!1}})).files||[]}async function Q(e,t){let r=await fetch("/api/prompt/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok){let e=await r.text();try{let r=JSON.parse(e);throw Error(r.error||r.message||e||t)}catch(r){throw Error(e||t)}}return r.json()}function Y(e,t){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=e,o.click(),URL.revokeObjectURL(a)}function Z(e,t,r){return e?"customize-agent:prompt-chat:".concat(e.id,":").concat(e.customizePath||e.projectName):"customize-agent:prompt-chat:draft:".concat(r||t||"new")}function ee(e){let t=Date.parse(e);return Number.isNaN(t)?"-":new Date(t).toLocaleString()}function et(e){return{type:"customize-agent.prompts",version:1,exportedAt:new Date().toISOString(),prompts:e.map(e=>({name:e.projectName,content:e.content||"",selected:e.selected,source:"custom"}))}}function er(e){return e.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled"}function ea(e){let t=e.match(/(^|\s)@([^\s@]*)$/);return t?t[2]:null}function eo(){let e=(0,l.Vr)(),{message:t}=c.A.useApp(),[r,i]=(0,o.useState)(!0),[eo,el]=(0,o.useState)([]),[es,en]=(0,o.useState)(!1),[ei,ec]=(0,o.useState)(null),[ed,em]=(0,o.useState)(""),[ep,ex]=(0,o.useState)(""),[eu,eh]=(0,o.useState)(!1),[eg,ef]=(0,o.useState)(!1),[ev,ej]=(0,o.useState)("all"),[ey,ew]=(0,o.useState)("mtime"),[eb,eN]=(0,o.useState)("list"),[eS,eA]=(0,o.useState)(""),[eC,eT]=(0,o.useState)(!1),[ez,eF]=(0,o.useState)([]),[eE,ek]=(0,o.useState)(""),[eP,eO]=(0,o.useState)(""),[eB,eM]=(0,o.useState)(!1),[eD,eI]=(0,o.useState)([]),[eG,eR]=(0,o.useState)([]),[e_,eJ]=(0,o.useState)([]),[eL,eU]=(0,o.useState)(!1),[eK,eH]=(0,o.useState)(!1),[eX,e$]=(0,o.useState)(!1),[eq,eV]=(0,o.useState)(null),[eW,eQ]=(0,o.useState)(!1),[eY,eZ]=(0,o.useState)([]),[e0,e1]=(0,o.useState)(!1),[e2,e3]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!es||!ed.trim()){eV(null),eQ(!1);return}eQ(!0);let e=setTimeout(()=>{K(ed).then(e=>{eV(e),eQ(!1)})},500);return()=>clearTimeout(e)},[ed,es]);let e4=(0,o.useRef)(null),e5=ea(eP),e6=async()=>{i(!0);try{let e,t=[],r=await (e=L(),e.catch(()=>(t.push("提示词列表"),null)));eZ(t),r&&el(r)}catch(r){t.error(e("common.error"))}finally{i(!1)}};(0,o.useEffect)(()=>{e6()},[]),(0,o.useEffect)(()=>{let e=window.localStorage.getItem("customize-agent:prompt-view-mode");("list"===e||"card"===e)&&eN(e)},[]),(0,o.useEffect)(()=>{window.localStorage.setItem("customize-agent:prompt-view-mode",eb)},[eb]),(0,o.useEffect)(()=>{let e=e4.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),eE&&window.localStorage.setItem(eE,JSON.stringify(ez.slice(-30)))},[ez,eB,eE]),(0,o.useEffect)(()=>{es||e1(!1)},[es]),(0,o.useEffect)(()=>{!es||eD.length>0||eL||e0||(eU(!0),q().then(e=>{eI(e),e1(!1)}).catch(()=>e1(!0)).finally(()=>eU(!1)))},[es,eD.length,eL,e0]),(0,o.useEffect)(()=>{let e=null==e5?void 0:e5.trim();if(!es||!e){eR([]),eH(!1),e3(!1);return}let t=!1;eH(!0);let r=window.setTimeout(()=>{W(e).then(e=>{t||(eR(e),e3(!1))}).catch(()=>{t||(eR([]),e3(!0))}).finally(()=>{t||eH(!1)})},250);return()=>{t=!0,window.clearTimeout(r)}},[es,e5]);let e8=eY.includes("提示词列表"),e9=e=>e8?"—":String(e),e7={selected:eo.filter(e=>e.selected).length,unselected:eo.filter(e=>!e.selected).length,hasFile:eo.filter(e=>e.hasFile).length,missingFile:eo.filter(e=>!e.hasFile).length},te=eo.filter(e=>{var t;return("selected"!==ev||!!e.selected)&&("unselected"!==ev||!e.selected)&&("hasFile"!==ev||!!e.hasFile)&&("missingFile"!==ev||!e.hasFile)&&(!eS.trim()||(t=eS.trim(),!!"".concat(e.projectName,"\n").concat(e.projectRoot||"","\n").concat(e.customizePath||"","\n").concat(e.content||"").toLowerCase().includes(t.toLowerCase())))}).sort((e,t)=>"name"===ey?e.projectName.localeCompare(t.projectName):"selected"===ey&&Number(t.selected)-Number(e.selected)||Date.parse(t.mtime||"")-Date.parse(e.mtime||"")),tt=te.filter(e=>e.selected).length,tr=te.length>0&&te.every(e=>e.selected),ta=(null==e5?void 0:e5.trim())?eG:eD,to=(e,t,r)=>{let a=Z(e,t,r);ek(a),eF(function(e){try{let t=JSON.parse(window.localStorage.getItem(e)||"[]");return Array.isArray(t)?t.filter(e=>("user"===e.role||"assistant"===e.role)&&"string"==typeof e.content).slice(-30):[]}catch(e){return[]}}(a)),eO(""),eM(!1),eJ([]),e$(!1)},tl=async()=>{if(!ep.trim())return void t.error(e("prompt.nameRequired"));eh(!0);try{if(ei)await U(ei.customizePath,ed,ep.trim()),t.success(e("common.success"));else{let r=await H(ep.trim(),ed||"# ".concat(ep.trim(),"\n"));!function(e,t){if(!e||!t||e===t)return;let r=window.localStorage.getItem(e);r&&!window.localStorage.getItem(t)&&window.localStorage.setItem(t,r)}(eE,Z({id:r.id,projectId:r.id,projectName:ep.trim(),customizePath:r.id,content:ed,mtime:"",hasFile:!0,isCurrent:!1,selected:!1,source:"custom"},ep.trim())),t.success(e("common.success"))}en(!1),await e6()}catch(r){t.error(e("common.error"))}finally{eh(!1)}},ts=async e=>{let t=Array.from(new Set([...e_,...eD.filter(t=>e.includes("@".concat(t.relativePath))).map(e=>e.relativePath)])).slice(0,3),r=[];for(let e of t){let t=await V(e);t&&r.push({relativePath:e,content:t})}return r},tn=async()=>{let r=eP.trim();if(!r||eB)return;let a=[...ez,{role:"user",content:r}];eF(a),eO(""),e$(!1),eM(!0);try{let t=await ts(r),o=await Q({name:ep||(null==ei?void 0:ei.projectName)||e("prompt.untitled"),content:ed,message:r,history:ez,references:t},e("prompt.chatFailed"));eF([...a,{role:"assistant",content:o.content||e("prompt.chatEmptyReply")}])}catch(r){t.error(r instanceof Error?r.message:e("prompt.chatFailed")),eF(a)}finally{eM(!1)}},ti=async(r,a)=>{let o=a?Array.from(new Set([...eo.filter(e=>e.selected).map(e=>e.id),r.id])):eo.filter(e=>e.selected&&e.id!==r.id).map(e=>e.id);try{await X(o),el(e=>e.map(e=>({...e,selected:o.includes(e.id)})))}catch(r){t.error(e("common.error"))}},tc=async r=>{let a=eo.filter(e=>e.selected).map(e=>e.id),o=te.map(e=>e.id),l=r?Array.from(new Set([...a,...o])):a.filter(e=>!o.includes(e));try{await X(l),el(e=>e.map(e=>({...e,selected:l.includes(e.id)}))),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},td=async r=>{try{if(!(await fetch("/api/prompt",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:r.customizePath})})).ok)throw Error("Failed");t.success(e("common.success")),await e6()}catch(r){t.error(e("common.error"))}},tm=async r=>{if(r){eT(!0);try{let a=await r.text(),o=JSON.parse(a),l=await $(o);t.success(e("prompt.importedCount").replace("{count}",String(l.imported))),await e6()}catch(r){t.error(e("prompt.importFailed"))}finally{eT(!1)}}},tp=t=>(0,a.jsx)(d.A,{size:4,wrap:!0,children:!t.hasFile&&(0,a.jsx)(m.A,{style:{margin:0},children:e("prompt.missingFileStatus")})}),tx=r=>(0,a.jsxs)(d.A,{size:0,onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(p.Ay,{size:"small",type:"text",icon:(0,a.jsx)(z.A,{}),title:e("common.edit"),onClick:()=>{ec(r),ef(!1),ex(r.projectName),em(r.content||""),to(r,r.projectName),en(!0)}}),(0,a.jsx)(p.Ay,{size:"small",type:"text",icon:(0,a.jsx)(F.A,{}),title:e("prompt.exportOne"),onClick:()=>{Y("customize-prompt-".concat(er(r.projectName),"-").concat(new Date().toISOString().slice(0,10),".json"),et([r])),t.success(e("prompt.exportedCount").replace("{count}","1"))}}),(0,a.jsx)(x.A,{title:e("prompt.deleteCustomConfirm"),onConfirm:()=>{td(r)},children:(0,a.jsx)(p.Ay,{size:"small",type:"text",danger:!0,icon:(0,a.jsx)(E.A,{}),title:e("common.delete")})})]}),tu=[{title:e("prompt.promptName"),dataIndex:"projectName",render:(e,t)=>(0,a.jsxs)(d.A,{size:8,className:"min-w-0",children:[(0,a.jsx)(k.A,{className:t.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,a.jsx)("span",{className:"font-semibold text-[var(--colorText)]",children:e}),tp(t)]})},{title:e("prompt.columnSource"),width:170,render:()=>(0,a.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] inline-flex items-center gap-1.5",children:[(0,a.jsx)(P.A,{}),e("prompt.localPrompt")]})},{title:e("prompt.columnMtime"),width:210,render:(e,t)=>(0,a.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:ee(t.mtime)})},{title:e("prompt.columnActions"),width:140,render:(e,t)=>(0,a.jsx)("div",{onClick:e=>e.stopPropagation(),children:tx(t)})}];return r?(0,a.jsxs)("div",{className:"space-y-12",children:[(0,a.jsx)(h.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:4}).map((e,t)=>(0,a.jsx)("div",{className:"p-4 border border-[var(--borderColor)]",children:(0,a.jsx)(h.A,{active:!0,paragraph:{rows:4}})},t))})]}):(0,a.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,a.jsx)(C.X,{failures:eY}),(0,a.jsx)(A.z,{title:e("nav.promptManagement"),description:e("prompt.description"),extra:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{accept:"application/json,.json",showUploadList:!1,beforeUpload:e=>(tm(e),!1),children:(0,a.jsx)(p.Ay,{icon:(0,a.jsx)(O.A,{}),loading:eC,className:"rounded-lg",children:e("prompt.import")})}),(0,a.jsx)(p.Ay,{icon:(0,a.jsx)(F.A,{}),disabled:0===eo.length,onClick:()=>(()=>{let r=eo.filter(e=>e.selected);if(0===r.length)return void t.warning(e("prompt.exportNoneSelected"));let a=new Date().toISOString().slice(0,10);r.forEach((e,t)=>{window.setTimeout(()=>{Y("customize-prompt-".concat(er(e.projectName),"-").concat(a,".json"),et([e]))},250*t)}),t.success(e("prompt.exportedCount").replace("{count}",String(r.length)))})(),className:"rounded-lg",children:e("prompt.exportOne")}),(0,a.jsx)(p.Ay,{type:"primary",icon:(0,a.jsx)(B.A,{}),onClick:()=>(()=>{let e="new:".concat(Date.now());ec(null),ef(!0),ex(""),em(""),to(null,"new",e),en(!0)})(),className:"shadow-none rounded-lg",children:e("prompt.createPrompt")})]})}),(0,a.jsx)(T,{idPrefix:"prompt-page-guide"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 bg-[var(--colorBgContainer)] border border-[var(--borderColor)] p-3 rounded-2xl",children:[(0,a.jsx)(f.A,{prefix:(0,a.jsx)(M.A,{className:"text-[var(--colorTextTertiary)]"}),allowClear:!0,placeholder:e("prompt.searchPrompt"),value:eS,onChange:e=>eA(e.target.value),style:{width:260},className:"rounded-lg"}),(0,a.jsx)("div",{className:"h-6 w-[1px] bg-[var(--borderColor)] mx-1","aria-hidden":!0}),(0,a.jsx)(v.A,{value:ev,onChange:ej,style:{width:130},className:"rounded-lg",options:[{label:e("prompt.promptStatus"),value:"all"},{label:"".concat(e("prompt.selected")," (").concat(e9(e7.selected),")"),value:"selected"},{label:"".concat(e("prompt.unselected")," (").concat(e9(e7.unselected),")"),value:"unselected"},{label:"".concat(e("prompt.hasFileStatus")," (").concat(e9(e7.hasFile),")"),value:"hasFile"},{label:"".concat(e("prompt.missingFileStatus")," (").concat(e9(e7.missingFile),")"),value:"missingFile"}]}),(0,a.jsx)(v.A,{value:ey,onChange:ew,style:{width:140},className:"rounded-lg",options:[{label:e("prompt.sortByMtime"),value:"mtime"},{label:e("prompt.sortByName"),value:"name"},{label:e("prompt.sortBySelected"),value:"selected"}]}),(0,a.jsx)("div",{className:"flex-1 min-w-4"}),(0,a.jsx)(j.A,{value:eb,onChange:e=>eN(e),options:[{label:(0,a.jsx)(D.A,{}),value:"list"},{label:(0,a.jsx)(I.A,{}),value:"card"}],className:"bg-[var(--colorBgHover)] p-1 rounded-lg"})]}),(0,a.jsxs)("div",{className:"min-w-0 rounded-2xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap px-4 py-3 border-b border-[var(--borderColor)]",children:[(0,a.jsx)("span",{className:"text-sm text-[var(--colorTextSecondary)]",children:e("prompt.shownCount").replace("{count}",e9(te.length))}),(0,a.jsx)("div",{className:"h-4 w-[1px] bg-[var(--borderColor)] mx-1","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-semibold text-sm",children:e("prompt.selectedCount").replace("{count}",String(tt))}),(0,a.jsx)("div",{className:"flex-1 min-w-4"}),(0,a.jsx)(p.Ay,{size:"small",disabled:0===te.length,onClick:()=>{tc(!tr)},children:tr?e("prompt.cancelSelectAll"):e("prompt.selectAll")})]}),0===te.length?(0,a.jsx)("div",{className:"py-24 text-center",children:e8?(0,a.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"—"}):(0,a.jsx)(y.A,{image:y.A.PRESENTED_IMAGE_SIMPLE,description:(0,a.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:eS||"all"!==ev?e("prompt.noMatchDesc"):e("prompt.noPromptInGroup")})})}):"list"===eb?(0,a.jsx)(w.A,{rowKey:"id",dataSource:te,columns:tu,pagination:(0,n.B)(e),rowSelection:{selectedRowKeys:eo.filter(e=>e.selected).map(e=>e.id),onSelect:(e,t)=>{ti(e,t)},onSelectAll:e=>{tc(e)}},className:"custom-table"}):(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 p-4",children:te.map(t=>(0,a.jsxs)("div",{className:"flex flex-col p-5 rounded-2xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-md transition-all",children:[(0,a.jsx)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,a.jsx)(u.A,{checked:t.selected,onChange:e=>{ti(t,e.target.checked)}}),(0,a.jsx)(k.A,{className:t.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,a.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:t.projectName})]})}),(0,a.jsx)("div",{className:"mb-3",children:tp(t)}),(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] truncate flex items-center gap-1.5 mb-4 bg-[var(--colorFillAlter)] p-1.5 rounded inline-flex self-start",children:[(0,a.jsx)(P.A,{}),e("prompt.localPrompt")]}),(0,a.jsxs)("div",{className:"mt-auto pt-4 flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-[var(--colorTextTertiary)] bg-[var(--colorFillSecondary)] px-2 py-1 rounded",children:ee(t.mtime)}),tx(t)]})]},t.id))})]}),(0,a.jsxs)(b.A,{title:eg?e("prompt.createPrompt"):"".concat(e("prompt.customPrompt")," — ").concat(ep||(null==ei?void 0:ei.projectName)||""),open:es,onClose:()=>en(!1),styles:{body:{padding:"24px 32px",display:"grid",gridTemplateRows:"minmax(320px, 1fr) 420px",gap:24,height:"100%"},header:{borderBottom:"1px solid var(--colorBorderSecondary)",padding:"16px 32px"}},extra:(0,a.jsx)(d.A,{children:(0,a.jsx)(p.Ay,{type:"primary",loading:eu,onClick:()=>{tl()},children:e("common.save")})}),children:[(0,a.jsxs)("div",{className:"min-h-0 flex flex-col overflow-y-auto",children:[eg||null!==ei?(0,a.jsx)(f.A,{size:"large",placeholder:e("prompt.promptName"),value:ep,onChange:e=>ex(e.target.value),className:"mb-4 font-medium"}):null,(0,a.jsx)(f.A.TextArea,{"aria-describedby":"prompt-page-guide-intro",value:ed,onChange:e=>em(e.target.value),className:"flex-1 shrink-0 min-h-[140px] resize-none font-mono text-[13px]"}),(0,a.jsxs)("div",{className:"mt-3 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] px-3 py-2.5 max-h-[170px] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsxs)(d.A,{size:6,children:[(0,a.jsx)(G.A,{className:"text-[var(--colorAccent)]"}),(0,a.jsx)("span",{className:"font-semibold text-xs",children:e("prompt.rulePreviewTitle")})]}),eW&&(0,a.jsx)(N.A,{size:"small"})]}),eq?eq.recognized?(0,a.jsx)("div",{className:"flex flex-col gap-1",children:eq.summary.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs text-[var(--colorText)] flex gap-1.5 leading-relaxed",children:[(0,a.jsx)(R.A,{className:"text-[var(--colorSuccess)] mt-1"}),(0,a.jsx)("span",{children:e})]},t))}):(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:e("prompt.rulePreviewNone")}):(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:ed.trim()?e("prompt.rulePreviewAnalyzing"):e("prompt.rulePreviewHint")})]})]}),(0,a.jsxs)("div",{className:"min-h-0 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] flex flex-col overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 border-b border-[var(--borderColor)] flex items-center justify-between gap-2",children:[(0,a.jsxs)(d.A,{size:6,children:[(0,a.jsx)(_.A,{className:"text-[var(--colorAccent)]"}),(0,a.jsx)("span",{className:"font-semibold",children:e("prompt.aiPromptAssistant")})]}),(0,a.jsxs)(d.A,{size:6,children:[ez.length>0&&(0,a.jsx)(p.Ay,{size:"small",onClick:()=>eF([]),children:e("prompt.clearHistory")}),eB?(0,a.jsx)(m.A,{color:"processing",className:"m-0",children:e("prompt.generating")}):(0,a.jsx)(m.A,{color:"blue",className:"m-0",children:e("prompt.canConverse")})]})]}),(0,a.jsx)("div",{ref:e4,className:"flex-1 min-h-0 overflow-y-auto p-3.5 bg-[var(--colorFillAlter)]",children:0!==ez.length||eB?(0,a.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[ez.map((r,o)=>{let l="user"===r.role;return(0,a.jsx)("div",{className:"flex ".concat(l?"justify-end":"justify-start"),children:(0,a.jsxs)("div",{className:"max-w-[78%] px-3 py-2.5 rounded-xl border border-[var(--borderColor)] whitespace-pre-wrap leading-relaxed text-[13px] transition-colors ".concat(l?"bg-[var(--colorFillSecondary)]":"bg-[var(--colorBgContainer)]"),children:[r.content,!l&&(0,a.jsx)("div",{className:"flex justify-end mt-2",children:(0,a.jsx)(p.Ay,{size:"small",type:"primary",onClick:()=>{em(r.content),t.success(e("prompt.appliedToEditor"))},children:e("prompt.apply")})})]})},"".concat(r.role,"-").concat(o))}),eB&&(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"px-3 py-2.5 rounded-xl bg-[var(--colorBgContainer)] border border-[var(--borderColor)] text-[var(--colorTextSecondary)] text-[13px]",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.aiAnalyzing")]})})]}):(0,a.jsx)(y.A,{image:y.A.PRESENTED_IMAGE_SIMPLE,description:e("prompt.mentionRecallHint")})}),(0,a.jsx)(S.A,{className:"!m-0"}),(0,a.jsxs)("div",{className:"p-3",children:[e_.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:e_.map(e=>(0,a.jsxs)(m.A,{closable:!0,onClose:()=>eJ(t=>t.filter(t=>t!==e)),className:"m-0 max-w-[360px] overflow-hidden text-ellipsis",children:["@",e]},e))}),eX&&(0,a.jsxs)("div",{className:"max-h-[260px] overflow-y-auto mb-2 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgElevated)] shadow-lg",children:[(0,a.jsxs)("div",{className:"sticky top-0 z-[1] px-3 py-2.5 border-b border-[var(--borderColor)] bg-[var(--colorBgElevated)] flex justify-between gap-3 items-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[var(--colorText)] text-[13px] font-bold",children:e("prompt.recallKbFiles")}),(0,a.jsx)("div",{className:"text-[var(--colorTextSecondary)] text-[11px]",children:e("prompt.recallLimitHint")})]}),(0,a.jsx)(m.A,{color:e5?"blue":"default",className:"m-0 max-w-[240px] overflow-hidden text-ellipsis",children:e5?"@".concat(e5):e("prompt.inputAtKeyword")})]}),(e0||e2)&&(0,a.jsx)("div",{className:"p-2.5",children:(0,a.jsx)(C.X,{failures:[...e0?["知识库文件清单"]:[],...e2?["知识库检索"]:[]]})}),e0?null:eL?(0,a.jsxs)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.loadingKbFiles")]}):0===eD.length?(0,a.jsx)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:e("prompt.noRecallableKbFiles")}):0===ta.length?(0,a.jsx)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:eK?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.searchingKbContent")]}):e2?null:e("prompt.noMatchingKbFiles")}):(0,a.jsxs)(a.Fragment,{children:[eK&&(0,a.jsxs)("div",{className:"px-3 py-2 text-[var(--colorTextSecondary)] text-xs border-b border-[var(--borderColor)]",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.continueSearchingKb")]}),ta.slice(0,30).map(t=>(0,a.jsxs)("div",{onMouseDown:e=>{var r;e.preventDefault(),r=t.relativePath,eJ(e=>e.includes(r)?e:[...e,r]),eO(e=>e.replace(/(^|\s)@([^\s@]*)$/,"$1@".concat(r," "))),e$(!1)},className:"px-3 py-2.5 cursor-pointer border-b border-[var(--borderColor)] text-xs grid grid-cols-[22px_minmax(0,1fr)_auto] gap-2.5 items-center hover:bg-[var(--colorBgHover)] transition-colors",children:[(0,a.jsx)("div",{className:"w-[22px] h-[22px] rounded-lg bg-[var(--colorFillSecondary)] flex items-center justify-center",children:(0,a.jsx)(k.A,{className:"text-[var(--colorAccent)]"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[var(--colorText)] truncate font-bold",children:t.relativePath}),(0,a.jsxs)("div",{className:"text-[var(--colorTextSecondary)] text-[11px] truncate",children:[t.category||e("prompt.unclassified")," \xb7 ",t.format||e("prompt.unknownFormat"),"number"==typeof t.score?" \xb7 score ".concat(t.score.toFixed(2)):""]})]}),(0,a.jsxs)(d.A,{size:4,children:[(0,a.jsx)(m.A,{color:"content"===t.matchedBy?"purple":"disk"===t.matchedBy?"orange":"blue",className:"m-0",children:"content"===t.matchedBy?e("prompt.contentMatch"):"disk"===t.matchedBy?e("prompt.diskFile"):e("prompt.fileMatch")}),(0,a.jsx)(m.A,{className:"m-0",children:e(s.mc[t.status]||"common.unknown")})]})]},t.relativePath))]})]}),(0,a.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,a.jsx)(f.A.TextArea,{value:eP,onChange:e=>{let t=e.target.value;eO(t),e$(null!==ea(t))},onFocus:()=>e$(null!==ea(eP)),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),tn())},disabled:eB,placeholder:e("prompt.mentionRecallPlaceholder"),autoSize:{minRows:1,maxRows:5},className:"flex-1 min-w-0 text-[13px] leading-relaxed"}),(0,a.jsx)(p.Ay,{type:"primary",icon:(0,a.jsx)(J.A,{}),loading:eB,disabled:!eP.trim(),onClick:()=>{tn()},className:"shrink-0",children:e("prompt.send")})]})]})]})]})]})}},93360:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var a=r(65321);r(97109);var o=r(48399),l=r(33442);let{Title:s,Text:n}=o.A;function i(e){let{title:t,description:r,extra:o,bottomContent:i}=e;return(0,a.jsxs)("div",{className:"mb-6 animateFadeIn",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(s,{level:4,style:{margin:0,fontWeight:700,letterSpacing:"-0.01em"},children:t}),r&&(0,a.jsx)(n,{type:"secondary",className:"mt-1 block text-sm",children:r})]}),o&&(0,a.jsx)(l.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0",size:"middle",wrap:!1,children:o})]}),i&&(0,a.jsx)("div",{className:"mt-4",children:i})]})}},96538:(e,t,r)=>{"use strict";r.d(t,{a:()=>o,j:()=>l});let a={coarse:function(e,t){let r=Math.floor(e/1e3),a=Math.floor(r/86400),o=Math.floor(r%86400/3600),l=Math.floor(r%3600/60),s="en-US"===t;return a>0?s?"".concat(a,"d ").concat(o,"h"):"".concat(a," 天 ").concat(o," 小时"):o>0?s?"".concat(o,"h ").concat(l,"m"):"".concat(o," 小时 ").concat(l," 分"):l>0?s?"".concat(l,"m"):"".concat(l," 分"):s?"Just now":"刚刚"},fine:function(e){let t=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," 分")},"fine-decimal":function(e){return e>=6e4?"".concat(Math.floor(e/6e4)," 分 ").concat(Math.round(e%6e4/1e3)," 秒"):"".concat((e/1e3).toFixed(1)," 秒")},metric:function(e){return e<1e3?"".concat(Math.round(e),"ms"):e<6e4?"".concat((e/1e3).toFixed(1),"s"):"".concat((e/6e4).toFixed(1),"min")}};function o(e,t){var r;return a[t.style](function(e,t){let r="s"===t?1e3*e:e;return Number.isFinite(r)&&r>0?r:0}(e,t.unit),null!=(r=t.locale)?r:"zh-CN")}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return o(e,{unit:"s",style:"coarse",locale:t})}}},e=>{e.O(0,[324,280,665,576,499,338,964,711,636,593,792],()=>e(e.s=27549)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{27549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(69583)}])},45551:(e,t,r)=>{"use strict";r.d(t,{Jm:()=>i,fw:()=>l,je:()=>a.j,mc:()=>c,z3:()=>o});var a=r(96538);function o(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t);return"".concat(r.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let r=Math.floor(Math.floor((Date.now()-e)/1e3)/60),a=Math.floor(r/60),o=Math.floor(a/24);return o>30?new Date(e).toLocaleDateString(t):"en-US"===t?o>0?"".concat(o,"d ago"):a>0?"".concat(a,"h ago"):r>0?"".concat(r,"m ago"):"Just now":o>0?"".concat(o," 天前"):a>0?"".concat(a," 小时前"):r>0?"".concat(r," 分钟前"):"刚刚"}let s={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},n={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function i(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===r?n:s)[e])?t:e}let c={active:"common.statusIndexed",outdated:"common.statusOutdated",error:"common.statusAbnormal",deleted:"common.statusDeleted",disk:"common.statusNotIndexed"}},58690:(e,t,r)=>{"use strict";function a(e){var t,r,a;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{defaultPageSize:null!=(t=o.pageSize)?t:10,pageSizeOptions:null!=(r=o.pageSizeOptions)?r:[10,20,50,100],showSizeChanger:!0,showTotal:t=>{var r,a;return e(null!=(r=o.totalLabelKey)?r:"common.totalRows",null!=(a=o.totalLabelFallback)?a:"共 {count} 条").replace("{count}",String(t))},hideOnSinglePage:null!=(a=o.hideOnSinglePage)&&a,showQuickJumper:!1}}r.d(t,{B:()=>a})},69583:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eo});var a=r(65321),o=r(97109),l=r(39507),s=r(45551),n=r(58690),i=r(6578),c=r(17807),d=r(33442),m=r(11702),p=r(85114),x=r(32965),u=r(56985),h=r(88762),g=r(45759),f=r(7576),v=r(57271),j=r(49292),y=r(84253),w=r(38964),b=r(34052),N=r(42700),S=r(55122),A=r(93360),C=r(82238);function T(e){let{idPrefix:t="prompt-writing-guide"}=e,r=(0,l.Vr)();return(0,a.jsxs)("aside",{"aria-labelledby":"".concat(t,"-title"),className:"mb-3 shrink-0 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgHover)] px-3 py-2.5 text-xs leading-relaxed",children:[(0,a.jsx)("div",{id:"".concat(t,"-title"),className:"font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideTitle")}),(0,a.jsx)("p",{id:"".concat(t,"-intro"),className:"mt-1 text-[var(--colorTextSecondary)]",children:r("prompt.writingGuideIntro")}),(0,a.jsx)("p",{className:"mt-1 text-[var(--colorTextSecondary)]",children:r("prompt.writingGuideParameters")}),(0,a.jsxs)("details",{className:"mt-2",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[var(--colorAccent)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:r("prompt.writingGuideDetails")}),(0,a.jsxs)("div",{className:"mt-3 max-h-[320px] overflow-y-auto pr-1 text-[var(--colorTextSecondary)]",children:[(0,a.jsx)("div",{className:"font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideNeedsTitle")}),(0,a.jsxs)("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:[(0,a.jsx)("li",{children:r("prompt.writingGuidePurpose")}),(0,a.jsx)("li",{children:r("prompt.writingGuideStructure")}),(0,a.jsx)("li",{children:r("prompt.writingGuideEngineering")}),(0,a.jsx)("li",{children:r("prompt.writingGuideStyle")})]}),(0,a.jsx)("div",{className:"mt-3 font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideManagedTitle")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideManaged")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideAvoid")}),(0,a.jsx)("div",{className:"mt-3 font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideExampleTitle")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideExampleHint")}),(0,a.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words rounded-lg border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-2.5 font-mono text-[11px] text-[var(--colorText)]",children:r("prompt.writingGuideExample")}),(0,a.jsx)("p",{className:"mt-2",children:r("prompt.writingGuideOneOutline")})]})]})]})}var z=r(99650),F=r(81668),E=r(58209),k=r(26631),P=r(7225),O=r(96091),B=r(54746),M=r(30486),D=r(46082),I=r(42758),G=r(7851),R=r(84742),_=r(24810),J=r(7492);async function L(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function U(e,t,r){let a=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t,name:r})});if(!a.ok)throw Error("Failed");return a.json()}async function K(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"previewRules",content:e})});return t.ok&&(await t.json()).preview||null}async function H(e,t){let r=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"createCustom",name:e,content:t})});if(!r.ok)throw Error("Failed");return r.json()}async function X(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",selectedIds:e})});if(!t.ok)throw Error("Failed");return t.json()}async function $(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"import",...e&&"object"==typeof e?e:{prompts:[]}})});if(!t.ok)throw Error(await t.text());return t.json()}async function q(){return W("",!1,60)}async function V(e){let t=await fetch("/api/kb/files/detail?relativePath=".concat(encodeURIComponent(e)));if(!t.ok)throw Error("Failed");return((await t.json()).chunks||[]).map(e=>e.content||"").filter(Boolean).join("\n\n").slice(0,12e3)}async function W(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;return(await (0,i.nU)({limit:r,...e.trim()?{query:e.trim()}:{},...t?{}:{includeContent:!1}})).files||[]}async function Q(e,t){let r=await fetch("/api/prompt/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok){let e=await r.text();try{let r=JSON.parse(e);throw Error(r.error||r.message||e||t)}catch(r){throw Error(e||t)}}return r.json()}function Y(e,t){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=e,o.click(),URL.revokeObjectURL(a)}function Z(e,t,r){return e?"customize-agent:prompt-chat:".concat(e.id,":").concat(e.customizePath||e.projectName):"customize-agent:prompt-chat:draft:".concat(r||t||"new")}function ee(e){let t=Date.parse(e);return Number.isNaN(t)?"-":new Date(t).toLocaleString()}function et(e){return{type:"customize-agent.prompts",version:1,exportedAt:new Date().toISOString(),prompts:e.map(e=>({name:e.projectName,content:e.content||"",selected:e.selected,source:"custom"}))}}function er(e){return e.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled"}function ea(e){let t=e.match(/(^|\s)@([^\s@]*)$/);return t?t[2]:null}function eo(){let e=(0,l.Vr)(),{message:t}=c.A.useApp(),[r,i]=(0,o.useState)(!0),[eo,el]=(0,o.useState)([]),[es,en]=(0,o.useState)(!1),[ei,ec]=(0,o.useState)(null),[ed,em]=(0,o.useState)(""),[ep,ex]=(0,o.useState)(""),[eu,eh]=(0,o.useState)(!1),[eg,ef]=(0,o.useState)(!1),[ev,ej]=(0,o.useState)("all"),[ey,ew]=(0,o.useState)("mtime"),[eb,eN]=(0,o.useState)("list"),[eS,eA]=(0,o.useState)(""),[eC,eT]=(0,o.useState)(!1),[ez,eF]=(0,o.useState)([]),[eE,ek]=(0,o.useState)(""),[eP,eO]=(0,o.useState)(""),[eB,eM]=(0,o.useState)(!1),[eD,eI]=(0,o.useState)([]),[eG,eR]=(0,o.useState)([]),[e_,eJ]=(0,o.useState)([]),[eL,eU]=(0,o.useState)(!1),[eK,eH]=(0,o.useState)(!1),[eX,e$]=(0,o.useState)(!1),[eq,eV]=(0,o.useState)(null),[eW,eQ]=(0,o.useState)(!1),[eY,eZ]=(0,o.useState)([]),[e0,e1]=(0,o.useState)(!1),[e2,e3]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!es||!ed.trim()){eV(null),eQ(!1);return}eQ(!0);let e=setTimeout(()=>{K(ed).then(e=>{eV(e),eQ(!1)})},500);return()=>clearTimeout(e)},[ed,es]);let e4=(0,o.useRef)(null),e5=ea(eP),e6=async()=>{i(!0);try{let e,t=[],r=await (e=L(),e.catch(()=>(t.push("提示词列表"),null)));eZ(t),r&&el(r)}catch(r){t.error(e("common.error"))}finally{i(!1)}};(0,o.useEffect)(()=>{e6()},[]),(0,o.useEffect)(()=>{let e=window.localStorage.getItem("customize-agent:prompt-view-mode");("list"===e||"card"===e)&&eN(e)},[]),(0,o.useEffect)(()=>{window.localStorage.setItem("customize-agent:prompt-view-mode",eb)},[eb]),(0,o.useEffect)(()=>{let e=e4.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),eE&&window.localStorage.setItem(eE,JSON.stringify(ez.slice(-30)))},[ez,eB,eE]),(0,o.useEffect)(()=>{es||e1(!1)},[es]),(0,o.useEffect)(()=>{!es||eD.length>0||eL||e0||(eU(!0),q().then(e=>{eI(e),e1(!1)}).catch(()=>e1(!0)).finally(()=>eU(!1)))},[es,eD.length,eL,e0]),(0,o.useEffect)(()=>{let e=null==e5?void 0:e5.trim();if(!es||!e){eR([]),eH(!1),e3(!1);return}let t=!1;eH(!0);let r=window.setTimeout(()=>{W(e).then(e=>{t||(eR(e),e3(!1))}).catch(()=>{t||(eR([]),e3(!0))}).finally(()=>{t||eH(!1)})},250);return()=>{t=!0,window.clearTimeout(r)}},[es,e5]);let e9=eY.includes("提示词列表"),e8=e=>e9?"—":String(e),e7={selected:eo.filter(e=>e.selected).length,unselected:eo.filter(e=>!e.selected).length,hasFile:eo.filter(e=>e.hasFile).length,missingFile:eo.filter(e=>!e.hasFile).length},te=eo.filter(e=>{var t;return("selected"!==ev||!!e.selected)&&("unselected"!==ev||!e.selected)&&("hasFile"!==ev||!!e.hasFile)&&("missingFile"!==ev||!e.hasFile)&&(!eS.trim()||(t=eS.trim(),!!"".concat(e.projectName,"\n").concat(e.projectRoot||"","\n").concat(e.customizePath||"","\n").concat(e.content||"").toLowerCase().includes(t.toLowerCase())))}).sort((e,t)=>"name"===ey?e.projectName.localeCompare(t.projectName):"selected"===ey&&Number(t.selected)-Number(e.selected)||Date.parse(t.mtime||"")-Date.parse(e.mtime||"")),tt=te.filter(e=>e.selected).length,tr=te.length>0&&te.every(e=>e.selected),ta=(null==e5?void 0:e5.trim())?eG:eD,to=(e,t,r)=>{let a=Z(e,t,r);ek(a),eF(function(e){try{let t=JSON.parse(window.localStorage.getItem(e)||"[]");return Array.isArray(t)?t.filter(e=>("user"===e.role||"assistant"===e.role)&&"string"==typeof e.content).slice(-30):[]}catch(e){return[]}}(a)),eO(""),eM(!1),eJ([]),e$(!1)},tl=async()=>{if(!ep.trim())return void t.error(e("prompt.nameRequired"));eh(!0);try{if(ei)await U(ei.customizePath,ed,ep.trim()),t.success(e("common.success"));else{let r=await H(ep.trim(),ed||"# ".concat(ep.trim(),"\n"));!function(e,t){if(!e||!t||e===t)return;let r=window.localStorage.getItem(e);r&&!window.localStorage.getItem(t)&&window.localStorage.setItem(t,r)}(eE,Z({id:r.id,projectId:r.id,projectName:ep.trim(),customizePath:r.id,content:ed,mtime:"",hasFile:!0,isCurrent:!1,selected:!1,source:"custom"},ep.trim())),t.success(e("common.success"))}en(!1),await e6()}catch(r){t.error(e("common.error"))}finally{eh(!1)}},ts=async e=>{let t=Array.from(new Set([...e_,...eD.filter(t=>e.includes("@".concat(t.relativePath))).map(e=>e.relativePath)])).slice(0,3),r=[];for(let e of t){let t=await V(e);t&&r.push({relativePath:e,content:t})}return r},tn=async()=>{let r=eP.trim();if(!r||eB)return;let a=[...ez,{role:"user",content:r}];eF(a),eO(""),e$(!1),eM(!0);try{let t=await ts(r),o=await Q({name:ep||(null==ei?void 0:ei.projectName)||e("prompt.untitled"),content:ed,message:r,history:ez,references:t},e("prompt.chatFailed"));eF([...a,{role:"assistant",content:o.content||e("prompt.chatEmptyReply")}])}catch(r){t.error(r instanceof Error?r.message:e("prompt.chatFailed")),eF(a)}finally{eM(!1)}},ti=async(r,a)=>{let o=a?Array.from(new Set([...eo.filter(e=>e.selected).map(e=>e.id),r.id])):eo.filter(e=>e.selected&&e.id!==r.id).map(e=>e.id);try{await X(o),el(e=>e.map(e=>({...e,selected:o.includes(e.id)})))}catch(r){t.error(e("common.error"))}},tc=async r=>{let a=eo.filter(e=>e.selected).map(e=>e.id),o=te.map(e=>e.id),l=r?Array.from(new Set([...a,...o])):a.filter(e=>!o.includes(e));try{await X(l),el(e=>e.map(e=>({...e,selected:l.includes(e.id)}))),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},td=async r=>{try{if(!(await fetch("/api/prompt",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:r.customizePath})})).ok)throw Error("Failed");t.success(e("common.success")),await e6()}catch(r){t.error(e("common.error"))}},tm=async r=>{if(r){eT(!0);try{let a=await r.text(),o=JSON.parse(a),l=await $(o);t.success(e("prompt.importedCount").replace("{count}",String(l.imported))),await e6()}catch(r){t.error(e("prompt.importFailed"))}finally{eT(!1)}}},tp=t=>(0,a.jsx)(d.A,{size:4,wrap:!0,children:!t.hasFile&&(0,a.jsx)(m.A,{style:{margin:0},children:e("prompt.missingFileStatus")})}),tx=r=>(0,a.jsxs)(d.A,{size:0,onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(p.Ay,{size:"small",type:"text",icon:(0,a.jsx)(z.A,{}),title:e("common.edit"),onClick:()=>{ec(r),ef(!1),ex(r.projectName),em(r.content||""),to(r,r.projectName),en(!0)}}),(0,a.jsx)(p.Ay,{size:"small",type:"text",icon:(0,a.jsx)(F.A,{}),title:e("prompt.exportOne"),onClick:()=>{Y("customize-prompt-".concat(er(r.projectName),"-").concat(new Date().toISOString().slice(0,10),".json"),et([r])),t.success(e("prompt.exportedCount").replace("{count}","1"))}}),(0,a.jsx)(x.A,{title:e("prompt.deleteCustomConfirm"),onConfirm:()=>{td(r)},children:(0,a.jsx)(p.Ay,{size:"small",type:"text",danger:!0,icon:(0,a.jsx)(E.A,{}),title:e("common.delete")})})]}),tu=[{title:e("prompt.promptName"),dataIndex:"projectName",render:(e,t)=>(0,a.jsxs)(d.A,{size:8,className:"min-w-0",children:[(0,a.jsx)(k.A,{className:t.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,a.jsx)("span",{className:"font-semibold text-[var(--colorText)]",children:e}),tp(t)]})},{title:e("prompt.columnSource"),width:170,render:()=>(0,a.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] inline-flex items-center gap-1.5",children:[(0,a.jsx)(P.A,{}),e("prompt.localPrompt")]})},{title:e("prompt.columnMtime"),width:210,render:(e,t)=>(0,a.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:ee(t.mtime)})},{title:e("prompt.columnActions"),width:140,render:(e,t)=>(0,a.jsx)("div",{onClick:e=>e.stopPropagation(),children:tx(t)})}];return r?(0,a.jsxs)("div",{className:"space-y-12",children:[(0,a.jsx)(h.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:4}).map((e,t)=>(0,a.jsx)("div",{className:"p-4 border border-[var(--borderColor)]",children:(0,a.jsx)(h.A,{active:!0,paragraph:{rows:4}})},t))})]}):(0,a.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,a.jsx)(C.X,{failures:eY}),(0,a.jsx)(A.z,{title:e("nav.promptManagement"),description:e("prompt.description"),extra:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{accept:"application/json,.json",showUploadList:!1,beforeUpload:e=>(tm(e),!1),children:(0,a.jsx)(p.Ay,{icon:(0,a.jsx)(O.A,{}),loading:eC,className:"rounded-lg",children:e("prompt.import")})}),(0,a.jsx)(p.Ay,{icon:(0,a.jsx)(F.A,{}),disabled:0===eo.length,onClick:()=>(()=>{let r=eo.filter(e=>e.selected);if(0===r.length)return void t.warning(e("prompt.exportNoneSelected"));let a=new Date().toISOString().slice(0,10);r.forEach((e,t)=>{window.setTimeout(()=>{Y("customize-prompt-".concat(er(e.projectName),"-").concat(a,".json"),et([e]))},250*t)}),t.success(e("prompt.exportedCount").replace("{count}",String(r.length)))})(),className:"rounded-lg",children:e("prompt.exportOne")}),(0,a.jsx)(p.Ay,{type:"primary",icon:(0,a.jsx)(B.A,{}),onClick:()=>(()=>{let e="new:".concat(Date.now());ec(null),ef(!0),ex(""),em(""),to(null,"new",e),en(!0)})(),className:"shadow-none rounded-lg",children:e("prompt.createPrompt")})]})}),(0,a.jsx)(T,{idPrefix:"prompt-page-guide"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 bg-[var(--colorBgContainer)] border border-[var(--borderColor)] p-3 rounded-2xl",children:[(0,a.jsx)(f.A,{prefix:(0,a.jsx)(M.A,{className:"text-[var(--colorTextTertiary)]"}),allowClear:!0,placeholder:e("prompt.searchPrompt"),value:eS,onChange:e=>eA(e.target.value),style:{width:260},className:"rounded-lg"}),(0,a.jsx)("div",{className:"h-6 w-[1px] bg-[var(--borderColor)] mx-1","aria-hidden":!0}),(0,a.jsx)(v.A,{value:ev,onChange:ej,style:{width:130},className:"rounded-lg",options:[{label:e("prompt.promptStatus"),value:"all"},{label:"".concat(e("prompt.selected")," (").concat(e8(e7.selected),")"),value:"selected"},{label:"".concat(e("prompt.unselected")," (").concat(e8(e7.unselected),")"),value:"unselected"},{label:"".concat(e("prompt.hasFileStatus")," (").concat(e8(e7.hasFile),")"),value:"hasFile"},{label:"".concat(e("prompt.missingFileStatus")," (").concat(e8(e7.missingFile),")"),value:"missingFile"}]}),(0,a.jsx)(v.A,{value:ey,onChange:ew,style:{width:140},className:"rounded-lg",options:[{label:e("prompt.sortByMtime"),value:"mtime"},{label:e("prompt.sortByName"),value:"name"},{label:e("prompt.sortBySelected"),value:"selected"}]}),(0,a.jsx)("div",{className:"flex-1 min-w-4"}),(0,a.jsx)(j.A,{value:eb,onChange:e=>eN(e),options:[{label:(0,a.jsx)(D.A,{}),value:"list"},{label:(0,a.jsx)(I.A,{}),value:"card"}],className:"bg-[var(--colorBgHover)] p-1 rounded-lg"})]}),(0,a.jsxs)("div",{className:"min-w-0 rounded-2xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap px-4 py-3 border-b border-[var(--borderColor)]",children:[(0,a.jsx)("span",{className:"text-sm text-[var(--colorTextSecondary)]",children:e("prompt.shownCount").replace("{count}",e8(te.length))}),(0,a.jsx)("div",{className:"h-4 w-[1px] bg-[var(--borderColor)] mx-1","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-semibold text-sm",children:e("prompt.selectedCount").replace("{count}",String(tt))}),(0,a.jsx)("div",{className:"flex-1 min-w-4"}),(0,a.jsx)(p.Ay,{size:"small",disabled:0===te.length,onClick:()=>{tc(!tr)},children:tr?e("prompt.cancelSelectAll"):e("prompt.selectAll")})]}),0===te.length?(0,a.jsx)("div",{className:"py-24 text-center",children:e9?(0,a.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"—"}):(0,a.jsx)(y.A,{image:y.A.PRESENTED_IMAGE_SIMPLE,description:(0,a.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:eS||"all"!==ev?e("prompt.noMatchDesc"):e("prompt.noPromptInGroup")})})}):"list"===eb?(0,a.jsx)(w.A,{rowKey:"id",dataSource:te,columns:tu,pagination:(0,n.B)(e),rowSelection:{selectedRowKeys:eo.filter(e=>e.selected).map(e=>e.id),onSelect:(e,t)=>{ti(e,t)},onSelectAll:e=>{tc(e)}},className:"custom-table"}):(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 p-4",children:te.map(t=>(0,a.jsxs)("div",{className:"flex flex-col p-5 rounded-2xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-md transition-all",children:[(0,a.jsx)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,a.jsx)(u.A,{checked:t.selected,onChange:e=>{ti(t,e.target.checked)}}),(0,a.jsx)(k.A,{className:t.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,a.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:t.projectName})]})}),(0,a.jsx)("div",{className:"mb-3",children:tp(t)}),(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] truncate flex items-center gap-1.5 mb-4 bg-[var(--colorFillAlter)] p-1.5 rounded inline-flex self-start",children:[(0,a.jsx)(P.A,{}),e("prompt.localPrompt")]}),(0,a.jsxs)("div",{className:"mt-auto pt-4 flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-[var(--colorTextTertiary)] bg-[var(--colorFillSecondary)] px-2 py-1 rounded",children:ee(t.mtime)}),tx(t)]})]},t.id))})]}),(0,a.jsxs)(b.A,{title:(0,a.jsx)("span",{className:"truncate",children:eg?e("prompt.createPrompt"):e("prompt.customPrompt")}),open:es,onClose:()=>en(!1),styles:{body:{padding:"24px 32px",display:"grid",gridTemplateRows:"minmax(320px, 1fr) 420px",gap:24,height:"100%"},header:{borderBottom:"1px solid var(--colorBorderSecondary)",padding:"16px 32px"}},extra:(0,a.jsx)(d.A,{children:(0,a.jsx)(p.Ay,{type:"primary",loading:eu,onClick:()=>{tl()},children:e("common.save")})}),children:[(0,a.jsxs)("div",{className:"min-h-0 flex flex-col overflow-y-auto",children:[eg||null!==ei?(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mb-1.5",children:e("prompt.promptName")}),(0,a.jsx)(f.A,{size:"large",placeholder:e("prompt.promptName"),value:ep,onChange:e=>ex(e.target.value),className:"font-medium"})]}):null,(0,a.jsx)(f.A.TextArea,{"aria-describedby":"prompt-page-guide-intro",value:ed,onChange:e=>em(e.target.value),className:"flex-1 shrink-0 min-h-[140px] resize-none font-mono text-[13px]"}),(0,a.jsxs)("div",{className:"mt-3 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] px-4 py-3 max-h-[190px] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsxs)(d.A,{size:6,children:[(0,a.jsx)(G.A,{className:"text-[var(--colorAccent)]"}),(0,a.jsx)("span",{className:"font-semibold text-xs",children:e("prompt.rulePreviewTitle")})]}),eW&&(0,a.jsx)(N.A,{size:"small"})]}),eq?eq.recognized?(0,a.jsx)("div",{className:"flex flex-col gap-1",children:eq.summary.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs text-[var(--colorText)] flex gap-1.5 leading-relaxed",children:[(0,a.jsx)(R.A,{className:"text-[var(--colorSuccess)] mt-1"}),(0,a.jsx)("span",{children:e})]},t))}):(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:e("prompt.rulePreviewNone")}):(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:ed.trim()?e("prompt.rulePreviewAnalyzing"):e("prompt.rulePreviewHint")})]})]}),(0,a.jsxs)("div",{className:"min-h-0 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] flex flex-col overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 border-b border-[var(--borderColor)] flex items-center justify-between gap-2",children:[(0,a.jsxs)(d.A,{size:6,children:[(0,a.jsx)(_.A,{className:"text-[var(--colorAccent)]"}),(0,a.jsx)("span",{className:"font-semibold",children:e("prompt.aiPromptAssistant")})]}),(0,a.jsxs)(d.A,{size:6,children:[ez.length>0&&(0,a.jsx)(p.Ay,{size:"small",onClick:()=>eF([]),children:e("prompt.clearHistory")}),eB?(0,a.jsx)(m.A,{color:"processing",className:"m-0",children:e("prompt.generating")}):(0,a.jsx)(m.A,{color:"blue",className:"m-0",children:e("prompt.canConverse")})]})]}),(0,a.jsx)("div",{ref:e4,className:"flex-1 min-h-0 overflow-y-auto p-3.5 bg-[var(--colorFillAlter)]",children:0!==ez.length||eB?(0,a.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[ez.map((r,o)=>{let l="user"===r.role;return(0,a.jsx)("div",{className:"flex ".concat(l?"justify-end":"justify-start"),children:(0,a.jsxs)("div",{className:"max-w-[78%] px-3 py-2.5 rounded-xl border border-[var(--borderColor)] whitespace-pre-wrap leading-relaxed text-[13px] transition-colors ".concat(l?"bg-[var(--colorFillSecondary)]":"bg-[var(--colorBgContainer)]"),children:[r.content,!l&&(0,a.jsx)("div",{className:"flex justify-end mt-2",children:(0,a.jsx)(p.Ay,{size:"small",type:"primary",onClick:()=>{em(r.content),t.success(e("prompt.appliedToEditor"))},children:e("prompt.apply")})})]})},"".concat(r.role,"-").concat(o))}),eB&&(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"px-3 py-2.5 rounded-xl bg-[var(--colorBgContainer)] border border-[var(--borderColor)] text-[var(--colorTextSecondary)] text-[13px]",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.aiAnalyzing")]})})]}):(0,a.jsx)(y.A,{image:y.A.PRESENTED_IMAGE_SIMPLE,description:e("prompt.mentionRecallHint")})}),(0,a.jsx)(S.A,{className:"!m-0"}),(0,a.jsxs)("div",{className:"p-3",children:[e_.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:e_.map(e=>(0,a.jsxs)(m.A,{closable:!0,onClose:()=>eJ(t=>t.filter(t=>t!==e)),className:"m-0 max-w-[360px] overflow-hidden text-ellipsis",children:["@",e]},e))}),eX&&(0,a.jsxs)("div",{className:"max-h-[260px] overflow-y-auto mb-2 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgElevated)] shadow-lg",children:[(0,a.jsxs)("div",{className:"sticky top-0 z-[1] px-3 py-2.5 border-b border-[var(--borderColor)] bg-[var(--colorBgElevated)] flex justify-between gap-3 items-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[var(--colorText)] text-[13px] font-bold",children:e("prompt.recallKbFiles")}),(0,a.jsx)("div",{className:"text-[var(--colorTextSecondary)] text-[11px]",children:e("prompt.recallLimitHint")})]}),(0,a.jsx)(m.A,{color:e5?"blue":"default",className:"m-0 max-w-[240px] overflow-hidden text-ellipsis",children:e5?"@".concat(e5):e("prompt.inputAtKeyword")})]}),(e0||e2)&&(0,a.jsx)("div",{className:"p-2.5",children:(0,a.jsx)(C.X,{failures:[...e0?["知识库文件清单"]:[],...e2?["知识库检索"]:[]]})}),e0?null:eL?(0,a.jsxs)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.loadingKbFiles")]}):0===eD.length?(0,a.jsx)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:e("prompt.noRecallableKbFiles")}):0===ta.length?(0,a.jsx)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:eK?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.searchingKbContent")]}):e2?null:e("prompt.noMatchingKbFiles")}):(0,a.jsxs)(a.Fragment,{children:[eK&&(0,a.jsxs)("div",{className:"px-3 py-2 text-[var(--colorTextSecondary)] text-xs border-b border-[var(--borderColor)]",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.continueSearchingKb")]}),ta.slice(0,30).map(t=>(0,a.jsxs)("div",{onMouseDown:e=>{var r;e.preventDefault(),r=t.relativePath,eJ(e=>e.includes(r)?e:[...e,r]),eO(e=>e.replace(/(^|\s)@([^\s@]*)$/,"$1@".concat(r," "))),e$(!1)},className:"px-3 py-2.5 cursor-pointer border-b border-[var(--borderColor)] text-xs grid grid-cols-[22px_minmax(0,1fr)_auto] gap-2.5 items-center hover:bg-[var(--colorBgHover)] transition-colors",children:[(0,a.jsx)("div",{className:"w-[22px] h-[22px] rounded-lg bg-[var(--colorFillSecondary)] flex items-center justify-center",children:(0,a.jsx)(k.A,{className:"text-[var(--colorAccent)]"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[var(--colorText)] truncate font-bold",children:t.relativePath}),(0,a.jsxs)("div",{className:"text-[var(--colorTextSecondary)] text-[11px] truncate",children:[t.category||e("prompt.unclassified")," \xb7 ",t.format||e("prompt.unknownFormat"),"number"==typeof t.score?" \xb7 score ".concat(t.score.toFixed(2)):""]})]}),(0,a.jsxs)(d.A,{size:4,children:[(0,a.jsx)(m.A,{color:"content"===t.matchedBy?"purple":"disk"===t.matchedBy?"orange":"blue",className:"m-0",children:"content"===t.matchedBy?e("prompt.contentMatch"):"disk"===t.matchedBy?e("prompt.diskFile"):e("prompt.fileMatch")}),(0,a.jsx)(m.A,{className:"m-0",children:e(s.mc[t.status]||"common.unknown")})]})]},t.relativePath))]})]}),(0,a.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,a.jsx)(f.A.TextArea,{value:eP,onChange:e=>{let t=e.target.value;eO(t),e$(null!==ea(t))},onFocus:()=>e$(null!==ea(eP)),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),tn())},disabled:eB,placeholder:e("prompt.mentionRecallPlaceholder"),autoSize:{minRows:1,maxRows:5},className:"flex-1 min-w-0 text-[13px] leading-relaxed"}),(0,a.jsx)(p.Ay,{type:"primary",icon:(0,a.jsx)(J.A,{}),loading:eB,disabled:!eP.trim(),onClick:()=>{tn()},className:"shrink-0",children:e("prompt.send")})]})]})]})]})]})}},93360:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var a=r(65321);r(97109);var o=r(48399),l=r(33442);let{Title:s,Text:n}=o.A;function i(e){let{title:t,description:r,extra:o,bottomContent:i}=e;return(0,a.jsxs)("div",{className:"mb-6 animateFadeIn",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(s,{level:4,style:{margin:0,fontWeight:700,letterSpacing:"-0.01em"},children:t}),r&&(0,a.jsx)(n,{type:"secondary",className:"mt-1 block text-sm",children:r})]}),o&&(0,a.jsx)(l.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0",size:"middle",wrap:!1,children:o})]}),i&&(0,a.jsx)("div",{className:"mt-4",children:i})]})}},96538:(e,t,r)=>{"use strict";r.d(t,{a:()=>o,j:()=>l});let a={coarse:function(e,t){let r=Math.floor(e/1e3),a=Math.floor(r/86400),o=Math.floor(r%86400/3600),l=Math.floor(r%3600/60),s="en-US"===t;return a>0?s?"".concat(a,"d ").concat(o,"h"):"".concat(a," 天 ").concat(o," 小时"):o>0?s?"".concat(o,"h ").concat(l,"m"):"".concat(o," 小时 ").concat(l," 分"):l>0?s?"".concat(l,"m"):"".concat(l," 分"):s?"Just now":"刚刚"},fine:function(e){let t=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," 分")},"fine-decimal":function(e){return e>=6e4?"".concat(Math.floor(e/6e4)," 分 ").concat(Math.round(e%6e4/1e3)," 秒"):"".concat((e/1e3).toFixed(1)," 秒")},metric:function(e){return e<1e3?"".concat(Math.round(e),"ms"):e<6e4?"".concat((e/1e3).toFixed(1),"s"):"".concat((e/6e4).toFixed(1),"min")}};function o(e,t){var r;return a[t.style](function(e,t){let r="s"===t?1e3*e:e;return Number.isFinite(r)&&r>0?r:0}(e,t.unit),null!=(r=t.locale)?r:"zh-CN")}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return o(e,{unit:"s",style:"coarse",locale:t})}}},e=>{e.O(0,[324,280,665,576,499,338,964,711,636,593,792],()=>e(e.s=27549)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[388],{71922:(e,l,s)=>{"use strict";s.r(l),s.d(l,{default:()=>w});var a=s(65321),i=s(86109),n=s(43220),c=s.n(n),r=s(88762),t=s(85493),d=s(84253),o=s(85114),x=s(99650),m=s(97109),h=s(62561),p=s(48399),j=s(68787),u=s(11702),v=s(33442),b=s(14524),y=s(35071);let{Text:N}=p.A;function g(e){let{label:l,children:s}=e;return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-1",children:l}),(0,a.jsx)("div",{className:"text-sm font-medium text-[var(--colorText)] break-words",children:s})]})}function f(e){var l,s,i,n,c;let{skill:r,options:t,labelMap:d}=e,o=e=>{var l;return null!=(l=d.get(e))?l:e},x=e=>{var l,s;return null!=(s=null==t||null==(l=t.processCards.find(l=>l.value===e))?void 0:l.label)?s:e},m=r.chapterChecklist,h=m?[{label:"章内检索词",values:null!=(l=m.queries)?l:[]},{label:"必含事实",values:null!=(s=m.requiredFacts)?s:[]},{label:"要求成表的小节",values:null!=(i=m.tableSections)?i:[]},{label:"表格形态要求",values:null!=(n=m.tableRequirements)?n:[]},{label:"钉住的证据文件",values:null!=(c=m.pinnedEvidenceFilePaths)?c:[]}].filter(e=>e.values.length>0):[];return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(j.A,{className:"rounded-2xl border-[var(--borderColor)]",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4",children:[(0,a.jsx)(g,{label:"技能 ID",children:(0,a.jsx)(N,{code:!0,className:"text-xs",children:r.id})}),(0,a.jsxs)(g,{label:"来源",children:[r.builtIn?(0,a.jsx)(u.A,{color:"gold",className:"m-0",children:"内置"}):(0,a.jsx)(u.A,{className:"m-0",children:"用户"}),(0,a.jsxs)(N,{type:"secondary",className:"text-xs ml-2",children:["技能格式 v",r.version]})]}),(0,a.jsx)(g,{label:"状态",children:(0,a.jsx)(u.A,{color:r.enabled?"green":"default",className:"m-0 border-0",children:r.enabled?"已启用":"已停用"})}),(0,a.jsx)(g,{label:"章域",children:(0,a.jsx)(u.A,{color:"blue",className:"m-0",children:o(r.match.chapterDomain)})}),(0,a.jsx)(g,{label:"适用工程类型",children:0===r.match.projectTypes.length?(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:"全类型(不限定工程类型)"}):(0,a.jsx)(v.A,{size:4,wrap:!0,children:r.match.projectTypes.map(e=>(0,a.jsx)(u.A,{className:"m-0",children:o(e)},e))})}),(0,a.jsx)(g,{label:"文档名称建议",children:r.outputTitle?(0,a.jsx)("span",{children:r.outputTitle}):(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:"未声明(不对文档名称表态)"})}),(0,a.jsx)(g,{label:"章职责",children:(null==m?void 0:m.purpose)?(0,a.jsx)("span",{children:m.purpose}):(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:"未声明"})}),(0,a.jsx)(g,{label:"提供内容",children:(0,a.jsxs)(v.A,{size:4,wrap:!0,children:[(0,a.jsxs)(u.A,{className:"m-0",children:[r.structure.length," 个专业主题"]}),(0,a.jsxs)(u.A,{color:"green",className:"m-0",children:[r.acceptance.reduce((e,l)=>e+l.items.length,0)," 条核对提示"]})]})})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 items-start",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(b.PZ,{title:"相关专业主题",description:"本条技能提供的专业内容主题。",hint:"".concat(r.structure.length," 项"),children:0===r.structure.length?(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:"未声明专业主题"}):(0,a.jsx)("ol",{className:"m-0 pl-5 text-sm leading-7",children:r.structure.map((e,l)=>{var s;return(0,a.jsxs)("li",{children:[e.title,(0,a.jsx)(N,{type:"secondary",className:"text-xs ml-2",children:(null==(s=e.required)?void 0:s.join(";"))||"按具体对象组织内容"})]},"".concat(e.title,"-").concat(l))})})}),(0,a.jsxs)(b.PZ,{title:"匹配条件",description:"这条技能在什么章域、工程类型与章节标题下被选用。",children:[(0,a.jsx)(b.RU,{label:"小节标题关键词",children:(0,a.jsx)(b.n$,{empty:"未限定小节标题关键词",items:r.match.sectionKeywords.map(e=>(0,a.jsx)(u.A,{className:"m-0 border-0 bg-[var(--colorFillSecondary)]",children:e},e))})}),(0,a.jsx)(b.RU,{label:"小节标题匹配表达式",children:r.match.sectionRegex?(0,a.jsx)(N,{code:!0,className:"text-xs",children:r.match.sectionRegex}):void 0})]}),(0,a.jsx)(b.PZ,{title:"工艺知识引用",description:"写作时可加载的专业参考(按工艺卡名称显示)。",children:(0,a.jsx)(b.n$,{empty:"未声明知识引用",items:r.knowledge.map((e,l)=>{var s,i,n,c;let r=(null!=(s=e.ids)?s:[]).map(x).join("、");return(0,a.jsxs)(u.A,{className:"mb-1",children:[(i=e.kind,null!=(c=null==t||null==(n=t.knowledgeKinds.find(e=>e.value===i))?void 0:n.label)?c:i),r?" \xb7 ".concat(r):"",e.note?"(".concat(e.note,")"):""]},"".concat(e.kind,"-").concat(l))})})}),t&&t.isolationRules.length>0&&(0,a.jsx)(b.PZ,{title:"资料与采用边界",description:"以下边界由软件统一执行,技能不能扩大或豁免。",children:(0,a.jsx)("div",{className:"flex flex-col gap-2",children:t.isolationRules.map(e=>(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-baseline gap-1 sm:gap-2",children:[(0,a.jsx)(N,{className:"text-sm shrink-0",children:e.label}),(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:e.note})]},e.id))})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(b.PZ,{title:"所需项目资料",description:"本次任务要先查证的项目事实;标为必需而查不到时会被上游拦下。",children:(0,a.jsx)(b.n$,{empty:"未声明必需事实",items:r.requires.map(e=>(0,a.jsxs)(u.A,{color:e.required?"red":"default",className:"mb-1",children:[e.key," \xb7 ",o(e.source),e.required?" \xb7 必需":" \xb7 可选"]},e.key))})}),(0,a.jsx)(b.PZ,{title:"文档业务提示",description:"给本次规划的章级候选内容与资料检索提示。",children:0===h.length?(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:"未声明章级清单"}):h.map(e=>(0,a.jsx)(b.RU,{label:e.label,children:(0,a.jsx)(b.n$,{items:e.values.map(e=>(0,a.jsx)(u.A,{className:"m-0 border-0 bg-[var(--colorFillSecondary)]",children:e},e))})},e.label))}),(0,a.jsx)(b.PZ,{title:"禁写项",description:"这条技能明确要求避免的内容或表达。",children:(0,a.jsx)(b.n$,{empty:"没有禁写项",items:r.forbidden.map(e=>(0,a.jsx)(u.A,{color:"red",className:"m-0 border-0",children:(0,y.Oz)(e)},(0,y.Oz)(e)))})}),(0,a.jsx)(b.PZ,{title:"专业写作核对提示",description:"按本任务对象和工况选用,不是数量要求或验收通过证明。",children:0===r.acceptance.flatMap(e=>e.items).length?(0,a.jsx)(N,{type:"secondary",className:"text-xs",children:"没有核对提示"}):(0,a.jsx)("ul",{className:"m-0 pl-5 text-sm leading-7",children:r.acceptance.flatMap(e=>e.items).map(e=>(0,a.jsx)("li",{children:e},e))})}),(0,a.jsx)(b.PZ,{title:"表达示例",description:"示例供理解专业表达,不能作为本项目事实。",children:(0,a.jsx)(b.RU,{label:"是否带示例",children:r.examples?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{color:"green",className:"m-0 border-0",children:"带正例/反例"}),(0,a.jsx)(N,{type:"secondary",className:"text-xs ml-2",children:"本编辑器保留原示例。"})]}):void 0})})]})]})]})}var A=s(33061);function k(e){let{skillId:l}=e,s=(0,A.G)(),i=(0,m.useMemo)(()=>l?s.skills.find(e=>e.id===l):void 0,[s.skills,l]),n=(0,m.useMemo)(()=>{var e,l,a,i,n,c;return new Map([...null!=(i=null==(e=s.options)?void 0:e.chapterDomains)?i:[],...null!=(n=null==(l=s.options)?void 0:l.projectTypes)?n:[],...null!=(c=null==(a=s.options)?void 0:a.factSources)?c:[]].map(e=>[e.value,e.label]))},[s.options]),p=!l,j=!s.loading&&!s.failed&&!!s.options&&!i;return p||s.loading?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(r.A,{active:!0,title:!0,paragraph:{rows:2}}),(0,a.jsx)(r.A,{active:!0,paragraph:{rows:10}})]}):s.failed?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(h.e,{title:"技能预览"}),(0,a.jsx)(t.A,{type:"error",showIcon:!0,message:"技能库读取失败",description:"".concat(s.failed,';这不是"技能不存在",请核对服务端状态后重试。')})]}):j||!i?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(h.e,{title:"技能预览"}),(0,a.jsx)(d.A,{description:"技能库里没有「".concat(l,"」这条技能(可能已被删除或改名)"),children:(0,a.jsx)(c(),{href:"/skills",children:(0,a.jsx)(o.Ay,{type:"primary",children:"返回技能库"})})})]}):(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(h.e,{title:"技能预览 \xb7 ".concat(i.displayName),description:"只读查看这条技能声明了什么;要改内容进编辑页,保存前会做字段与引用校验。",extra:(0,a.jsx)(c(),{href:"/skills/".concat(encodeURIComponent(i.id),"/edit"),children:(0,a.jsx)(o.Ay,{type:"primary",icon:(0,a.jsx)(x.A,{}),disabled:i.builtIn,title:i.builtIn?y.F:void 0,children:"编辑"})})}),i.builtIn&&(0,a.jsx)(t.A,{type:"info",showIcon:!0,message:y.F}),(0,a.jsx)(f,{skill:i,options:s.options,labelMap:n})]})}function w(){let e=(0,i.useRouter)(),l="string"==typeof e.query.id?e.query.id:void 0;return(0,a.jsx)(k,{skillId:l})}},95195:(e,l,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/skills/[id]",function(){return s(71922)}])}},e=>{e.O(0,[665,569,787,564,2,636,593,792],()=>e(e.s=95195)),_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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--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}}}@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-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--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-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}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:0}.top-1{top:var(--spacing)}.top-3{top:calc(var(--spacing) * 3)}.top-5{top:calc(var(--spacing) * 5)}.left-0{left:0}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.col-span-2{grid-column:span 2/span 2}.row-1{grid-row:1}.row-17{grid-row:17}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.\!m-0{margin:0!important}.m-0{margin:0}.m-10{margin:calc(var(--spacing) * 10)}.-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}.my-3{margin-block:calc(var(--spacing) * 3)}.my-4{margin-block:calc(var(--spacing) * 4)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.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-4{margin-bottom:calc(var(--spacing) * 4)!important}.mb-0{margin-bottom:0}.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-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-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 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}.table-caption{display:table-caption}.table-cell{display:table-cell}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-3{height:calc(var(--spacing) * 3)}.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-12{height:calc(var(--spacing) * 12)}.h-\[22px\]{height:22px}.h-\[calc\(100vh-140px\)\],.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)}.max-h-\[190px\]{max-height:190px}.max-h-\[260px\]{max-height:260px}.max-h-\[320px\]{max-height:320px}.min-h-0{min-height:0}.min-h-\[66px\]{min-height:66px}.min-h-\[140px\]{min-height:140px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.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-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-\[1px\]{width:1px}.w-\[22px\]{width:22px}.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-\[78\%\]{max-width:78%}.max-w-\[120px\]{max-width:120px}.max-w-\[240px\]{max-width:240px}.max-w-\[260px\]{max-width:260px}.max-w-\[360px\]{max-width:360px}.max-w-\[420px\]{max-width:420px}.max-w-\[520px\]{max-width:520px}.min-w-0{min-width:0}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-64{min-width:calc(var(--spacing) * 64)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.basis-0{flex-basis:0}.basis-9{flex-basis:calc(var(--spacing) * 9)}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[22px_minmax\(0\,1fr\)_auto\]{grid-template-columns:22px minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.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)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}: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-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-1{row-gap:var(--spacing)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}: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)))}.self-center{align-self:center}.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}.overflow-y-auto{overflow-y:auto}.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-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--borderColor\)\]{border-color:var(--borderColor)}.border-\[var\(--borderColorStrong\)\]{border-color:var(--borderColorStrong)}.border-\[var\(--canvasSectionBorder\)\]{border-color:var(--canvasSectionBorder)}.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\(--colorDanger\)\]\/30{border-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--colorDanger\)\]\/30{border-color:color-mix(in oklab,var(--colorDanger) 30%,transparent)}}.border-\[var\(--colorWarning\)\]{border-color:var(--colorWarning)}.border-\[…\]{border-color:…}.border-blue-200{border-color:var(--color-blue-200)}.border-transparent{border-color:#0000}.bg-\[\#1e1e1e\]{background-color:#1e1e1e}.bg-\[var\(--borderColor\)\]{background-color:var(--borderColor)}.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\(--colorBrand\)\]\/10{background-color:var(--colorBrand)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBrand\)\]\/10{background-color:color-mix(in oklab,var(--colorBrand) 10%,transparent)}}.bg-\[var\(--colorDanger\)\],.bg-\[var\(--colorDanger\)\]\/5{background-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorDanger\)\]\/5{background-color:color-mix(in oklab,var(--colorDanger) 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\(--colorOk\)\]{background-color:var(--colorOk)}.bg-\[var\(--colorText\)\]{background-color:var(--colorText)}.bg-\[var\(--colorTextTertiary\)\]{background-color:var(--colorTextTertiary)}.bg-\[var\(--colorWarning\)\]{background-color:var(--colorWarning)}.bg-\[var\(--colorWarningBg\)\]{background-color:var(--colorWarningBg)}.bg-black{background-color:var(--color-black)}.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-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.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-3\.5{padding:calc(var(--spacing) * 3.5)}.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-2{padding-inline:calc(var(--spacing) * 2)}.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-1{padding-block:var(--spacing)}.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-10{padding-block:calc(var(--spacing) * 10)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-24{padding-block:calc(var(--spacing) * 24)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-1{padding-right:var(--spacing)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.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-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-8{--tw-leading:calc(var(--spacing) * 8);line-height:calc(var(--spacing) * 8)}.leading-\[18px\]{--tw-leading:18px;line-height:18px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.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}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.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\(--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\(--colorSuccess\)\]{color:var(--colorSuccess)}.text-\[var\(--colorText\)\]{color:var(--colorText)}.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-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal}.ordinal,.tabular-nums{font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow,.shadow-\[var\(--shadowSurface\)\]{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[var\(--shadowSurface\)\]{--tw-shadow:var(--shadowSurface)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-lg,.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))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.block-7{block-size:calc(var(--spacing) * 7)}.block-9{block-size:calc(var(--spacing) * 9)}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.even\:bg-\[var\(--colorFillAlter\)\]:nth-child(2n){background-color:var(--colorFillAlter)}.focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.hover\:border-\[var\(--borderColorStrong\)\]:hover{border-color:var(--borderColorStrong)}.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-transparent:hover{background-color:#0000}.hover\:text-\[var\(--colorText\)\]:hover{color:var(--colorText)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-\[var\(--shadowSurfaceHover\)\]:hover{--tw-shadow:var(--shadowSurfaceHover)}.hover\:shadow-\[var\(--shadowSurfaceHover\)\]: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)}}.focus\:bg-\[var\(--colorBgContainer\)\]:focus{background-color:var(--colorBgContainer)}.focus\:bg-transparent:focus{background-color:#0000}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}@media (min-width:40rem){.sm\:w-44{width:calc(var(--spacing) * 44)}.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\:grid-cols-\[132px_minmax\(0\,1fr\)\]{grid-template-columns:132px minmax(0,1fr)}.sm\:flex-row{flex-direction:row}.sm\:items-baseline{align-items:baseline}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:items-start{align-items:flex-start}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:pt-0\.5{padding-top:calc(var(--spacing) * .5)}.sm\:pt-1{padding-top:var(--spacing)}.sm\:pb-0{padding-bottom:0}}@media (min-width:48rem){.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\:grid-cols-\[minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,2fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,2fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media (min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.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-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:80rem){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\:bg-white{background-color:var(--color-white)}.dark\:text-black{color:var(--color-black)}}}:root{--mainInnerPadY:32px;--mainInnerPadX:clamp(24px,4vw,48px)}@media (max-width:900px){:root{--mainInnerPadY:20px;--mainInnerPadX:20px}}@media (max-width:640px){:root{--mainInnerPadY:12px;--mainInnerPadX:12px}}.canvasRoot{flex:1;min-height:0;position:relative;overflow:hidden}.mainInner.mainInnerCanvas{flex-direction:column;padding:0;display:flex}.canvasStage{background:var(--canvasBg);-webkit-user-select:none;user-select:none;position:absolute;inset:0;overflow:hidden}:root{--colorBg:#fff;--colorBgElevated:#fff;--colorBgSecondary:#fbfbfc;--colorBgHover:#f6f6f7;--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:#fff;--colorFillAlter:#00000004;--colorFillSecondary:#00000008;--colorFillTertiary:#00000006;--colorFillQuaternary:#00000004;--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 0 4px #00000008,0 0 12px #0000000a;--shadowCard:0 0 4px #0000000d,0 0 16px #0000000d;--shadowButton:0 1px 2px #0000000d;--shadowSurface:0 0 4px #0000000d,0 0 12px #0000000b;--shadowSurfaceHover:0 0 6px #00000012,0 0 18px #0000000f;--radiusSm:6px;--radiusMd:10px;--radiusLg:14px;--radiusPill:9999px;--sidebarWidth:260px;--fontSans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--canvasBg:transparent;--canvasGridDot:#00000017;--canvasNodeBg:#fff;--canvasNodeBorder:#0000001a;--canvasNodeShadow:0 1px 2px #0000000d,0 2px 8px #0000000a;--canvasNodeSelected:#007aff;--canvasNodeAffected:#ff9500;--canvasEdge:#3c3c4359;--canvasEdgeActive:#007aff;--canvasEdgeWarn:#ff9500;--canvasEdgeAffected:#ff3b30;--canvasSectionBg:#fff9;--canvasFloatBg:#ffffffd1;--canvasPanelBg:#fffffff5;--canvasSectionBorder:#00000014;--canvasBubbleBg:#fffffff7;--canvasBubbleBorder:#0000001a;--canvasBubbleText:#1c1c1e;--canvasBubbleShadow:0 2px 8px #00000024}.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 0 4px #00000047,0 0 12px #0006;--shadowCard:0 0 4px #0000005c,0 0 16px #0006;--shadowButton:0 1px 2px #0000004d;--shadowSurface:0 0 4px #0000005c,0 0 12px #0000004d;--shadowSurfaceHover:0 0 6px #00000070,0 0 18px #0000005c;--canvasBg:transparent;--canvasGridDot:#ffffff1a;--canvasNodeBg:#1c1c1e;--canvasNodeBorder:#ffffff24;--canvasNodeShadow:0 1px 2px #0006,0 2px 10px #00000059;--canvasNodeSelected:#0a84ff;--canvasNodeAffected:#ff9f0a;--canvasEdge:#ebebf552;--canvasEdgeActive:#0a84ff;--canvasEdgeWarn:#ff9f0a;--canvasEdgeAffected:#ff453a;--canvasSectionBg:#1c1c1e99;--canvasFloatBg:#1c1c1ed1;--canvasPanelBg:#1c1c1ef5;--canvasSectionBorder:#ffffff1a;--canvasBubbleBg:#2c2c2ef5;--canvasBubbleBorder:#ffffff29;--canvasBubbleText:#f2f2f7;--canvasBubbleShadow:0 2px 10px #00000080}.canvasInputBar,.canvasToolbar{pointer-events:auto;z-index:2;position:absolute}.canvasInputPanel,.canvasToolbar{border:1px solid var(--canvasSectionBorder);background:var(--canvasFloatBg);-webkit-backdrop-filter:saturate(180%)blur(16px);border-radius:14px;box-shadow:0 6px 24px #00000014}.canvasToolbar{flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;top:12px}.canvasInputBar,.canvasToolbar{display:flex;left:12px;right:12px}.canvasInputBar{flex-direction:column;bottom:12px}.canvasInputPanel{padding:8px 12px}.canvasToolbar.canvasToolbarCollapsed{border-radius:999px;width:max-content;padding:4px;right:auto}.canvasToolbarBubble{color:var(--colorText);cursor:pointer;background:0 0;border:0;border-radius:999px;align-items:center;gap:6px;padding:5px 12px;font-size:14px;transition:background .15s;display:inline-flex}.canvasToolbarBubble:hover{background:var(--colorBgHover)}.canvasToolbarBubble:focus-visible{outline:2px solid var(--colorAccent);outline-offset:1px}.canvasToolbar:not(.canvasToolbarCollapsed){animation:canvasPanelIn .16s ease-out}.canvasInputBar.canvasInputBarCollapsed{left:50%;right:auto;transform:translate(-50%)}.canvasInputPanel{animation:canvasPanelIn .18s ease-out}.canvasInputPanel.isLeaving{animation:canvasPanelOut .2s ease-in forwards}.canvasInputHandleRow{justify-content:center;margin-bottom:4px;display:flex}.canvasInputHandle{width:44px;height:18px;color:var(--colorTextTertiary);cursor:pointer;background:0 0;border:0;border-radius:999px;justify-content:center;align-items:center;padding:0;transition:background .15s,color .15s;display:inline-flex}.canvasInputHandle:hover{background:var(--colorBgHover);color:var(--colorText)}.canvasInputHandle:focus-visible{outline:2px solid var(--colorAccent);outline-offset:1px}.canvasInputHandle.isCollapsed{border:1px solid var(--canvasSectionBorder);background:var(--canvasPanelBg);-webkit-backdrop-filter:saturate(180%)blur(16px);height:30px;color:var(--colorTextSecondary);box-shadow:0 6px 24px #0000001f}.canvasInputHandle.isCollapsed:hover{color:var(--colorText);transform:scale(1.06)}@keyframes canvasPanelIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes canvasPanelOut{0%{opacity:1;transform:none}to{opacity:0;transform:translateY(10px)}}.nodeInfoLayer{z-index:4;border:1px solid var(--canvasSectionBorder);background:var(--canvasPanelBg);-webkit-backdrop-filter:saturate(180%)blur(16px);border-radius:14px;flex-direction:column;display:flex;position:absolute;overflow:hidden;box-shadow:0 10px 32px #0000001f,0 2px 6px #0000000f}.nodeInfoHeader{border-bottom:1px solid var(--colorBorderSecondary);align-items:center;gap:6px;margin-bottom:10px;padding-bottom:10px;display:flex}.nodeInfoHeaderIcon{color:var(--colorTextSecondary);display:inline-flex}.nodeInfoClose{color:var(--colorTextTertiary)}.nodeInfoClose:hover{color:var(--colorText)}.nodeInfoActions{background:var(--colorFillQuaternary,var(--colorFillAlter));border-radius:8px;flex-wrap:wrap;gap:6px;margin-bottom:10px;padding:8px;display:flex}.nodeInfoPanel{width:min(460px,92vw);min-height:0;max-height:100%;padding:12px 14px;overflow:auto}.nodeInfoPanel .ant-descriptions-item-label{white-space:nowrap;width:92px;color:var(--colorTextSecondary)}.nodeInfoPanel .ant-tabs-nav{margin-bottom:12px}.nodeInfoRepair{border:1px solid var(--canvasNodeAffected);background:var(--colorWarningBg);border-radius:10px;margin-bottom:8px;padding:8px 10px}.nodeInfoRepairRun{border-top:1px dashed var(--colorSplit);flex-direction:column;gap:6px;padding-top:8px;display:flex}.nodeInfoRepairResult{background:var(--colorFillQuaternary);border-radius:6px;flex-direction:column;gap:4px;padding:6px 8px;display:flex}.canvasRecordsBall{pointer-events:auto}.canvasRecordsBallBtn{border:1px solid var(--canvasSectionBorder);background:var(--canvasPanelBg);-webkit-backdrop-filter:saturate(180%)blur(16px);color:var(--colorText);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;border-radius:999px;justify-content:center;align-items:center;font-size:18px;transition:transform .12s;display:flex;position:relative;box-shadow:0 6px 24px #0000001f}.canvasRecordsBallBtn:hover{transform:scale(1.06)}.canvasRecordsBallBtn:active{cursor:grabbing}.canvasRecordsBallBadge{background:var(--colorAccent);color:#fff;text-align:center;font-variant-numeric:tabular-nums;border-radius:999px;min-width:18px;height:18px;padding:0 4px;font-size:10px;line-height:18px;position:absolute;top:-2px;right:-2px}.canvasRecordsBallBadge.isZero{background:var(--colorFillTertiary);color:var(--colorTextSecondary)}.canvasRecordsPanel{border:1px solid var(--canvasSectionBorder);background:var(--canvasPanelBg);-webkit-backdrop-filter:saturate(180%)blur(16px);border-radius:14px;overflow:hidden;box-shadow:0 10px 32px #0000001f,0 2px 6px #0000000f}.canvasRecordsLink{color:var(--colorAccent);cursor:pointer;background:0 0;border:0;padding:0;font-size:12px}.canvasRecordsLink:hover{text-decoration:underline}.canvasRecordsDelete{width:24px;height:24px;color:var(--colorTextTertiary);cursor:pointer;opacity:0;background:0 0;border:0;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:opacity .12s,color .12s;display:inline-flex}.canvasRecordsDelete:focus-visible,.canvasRecordsPanel>div>div:hover .canvasRecordsDelete{opacity:1}.canvasRecordsDelete:hover{color:var(--colorDanger);background:var(--colorBgHover)}.canvasRecordsDelete.isDisabled{cursor:not-allowed;opacity:0}.canvasRecordsPanel>div>div:hover .canvasRecordsDelete.isDisabled{opacity:.35}.canvasRecordsPanel>div>div:hover .canvasRecordsDelete.isDisabled:hover{color:var(--colorTextTertiary);background:0 0}.canvasRecordsDanger{border:1px solid var(--colorDanger);color:var(--colorDanger);cursor:pointer;background:0 0;border-radius:8px;align-items:center;padding:3px 10px;font-size:12px;display:inline-flex}.canvasRecordsDanger:disabled{opacity:.4;cursor:not-allowed}.canvasRecordsDanger:not(:disabled):hover{background:var(--colorDanger);color:#fff}.canvasEdgeLayer{pointer-events:none;position:absolute;top:0;left:0;overflow:visible}.canvasEdge{fill:none;stroke:var(--canvasEdge);stroke-width:1.4px}.canvasEdgeActive{stroke:var(--canvasEdgeActive);stroke-width:2px}.canvasEdgeWarn{stroke:var(--canvasEdgeWarn);stroke-width:1.8px;stroke-dasharray:5 4}.canvasEdgeAffected{stroke:var(--canvasEdgeAffected);stroke-width:2.2px}.canvasEdgeFlow{fill:none;stroke:var(--canvasEdgeActive);stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:7 11;opacity:.85;animation:canvasEdgeFlow 1.1s linear infinite}@keyframes canvasEdgeFlow{0%{stroke-dashoffset:18px}to{stroke-dashoffset:0}}@media (prefers-reduced-motion:reduce){.canvasEdgeFlow{stroke-dashoffset:0;animation:none}}.canvasAgentChip,.canvasAgentsChips{align-items:center}.canvasAgentChip{border:1px solid var(--canvasSectionBorder);background:var(--canvasPanelBg);color:inherit;font:inherit;cursor:pointer;border-radius:999px;gap:4px;padding:1px 7px 1px 6px;transition:border-color .15s,box-shadow .15s;display:inline-flex}.canvasAgentChip:hover{border-color:var(--canvasNodeSelected);box-shadow:0 0 0 2px var(--canvasNodeSelected)}.canvasAgentRole{border-radius:4px;justify-content:center;align-items:center;min-width:14px;height:14px;padding:0 2px;font-size:10px;line-height:1;display:inline-flex}.canvasAgentRole[data-role=main]{background:var(--colorPrimary);color:#fff}.canvasAgentRole[data-role=sub]{background:var(--canvasSectionBorder);color:var(--colorTextSecondary)}.canvasAgentChipMain{border-color:var(--colorPrimary)}.canvasAgentAvatar{border:1.5px solid var(--canvasEdge);background:var(--canvasNodeBg);width:22px;height:22px;color:var(--colorTextSecondary);border-radius:50%;justify-content:center;align-items:center;display:inline-flex;position:relative}.canvasAgentAvatarGlyph{font-size:12px;line-height:1;display:inline-flex}.canvasAgentAvatar[data-status=running]{border-color:var(--colorPrimary);color:var(--colorPrimary);animation:canvasAgentAvatarPulse 1.6s ease-in-out infinite}.canvasAgentAvatar[data-status=repairing]{border-color:var(--colorWarning);color:var(--colorWarning)}.canvasAgentAvatar[data-status=completed]{border-color:var(--colorSuccess);color:var(--colorSuccess)}@keyframes canvasAgentAvatarPulse{0%,to{box-shadow:0 0 #007aff59}50%{box-shadow:0 0 0 4px #007aff00}}@media (prefers-reduced-motion:reduce){.canvasAgentAvatar[data-status=running]{animation:none}}.canvasAgentIcon{color:var(--colorTextSecondary);display:inline-flex}.canvasAgentIcon[data-status=running]{color:var(--colorPrimary);animation:canvasNodePulse 1.6s ease-in-out infinite}.canvasAgentIcon[data-status=repairing]{color:var(--colorWarning)}.canvasAgentIcon[data-status=completed]{color:var(--colorSuccess)}.canvasAgentDetail{flex-direction:column;gap:6px;width:306px;display:flex}.canvasAgentDetailHead{align-items:center;gap:6px;display:flex}.canvasAgentDetailRow{align-items:baseline;gap:8px;display:flex}.canvasAgentDetailRow>:first-child{flex:0 0 46px}.canvasAgentDetailRow>:last-child{word-break:break-word;flex:1;min-width:0}.canvasAgentLocate{border:1px solid var(--canvasSectionBorder);color:var(--colorPrimary);cursor:pointer;background:0 0;border-radius:8px;align-self:flex-start;margin-top:2px;padding:3px 10px;font-size:12px}.canvasAgentLocate:hover{background:var(--colorBgHover)}.canvasBubbleLayer{pointer-events:none;position:absolute;top:0;left:0;overflow:visible}.canvasBubble{offset-distance:0;will-change:offset-distance,opacity;animation-name:canvasBubbleFly;animation-timing-function:cubic-bezier(.33,0,.67,1);animation-fill-mode:forwards;position:absolute;top:0;left:0}@keyframes canvasBubbleFly{0%{offset-distance:0;opacity:0}14%{opacity:1}80%{offset-distance:100%;opacity:1}to{offset-distance:100%;opacity:0}}.canvasBubbleStatic{offset-distance:55%;opacity:1;animation:none}.canvasBubbleBody{border:1px solid var(--canvasBubbleBorder);background:var(--canvasBubbleBg);max-width:220px;box-shadow:var(--canvasBubbleShadow);color:var(--canvasBubbleText);white-space:nowrap;border-radius:999px;align-items:center;padding:3px 9px;font-size:11px;line-height:16px;display:inline-flex;transform:translate(-50%,-50%)}.canvasBubble[data-kind=dispatch] .canvasBubbleBody{border-color:var(--canvasEdgeActive)}.canvasBubble[data-kind=report] .canvasBubbleBody{border-color:var(--canvasEdge)}.canvasBubbleText{text-overflow:ellipsis;overflow:hidden}.canvasNode{border:1px solid var(--canvasNodeBorder);background:var(--canvasNodeBg);box-shadow:var(--canvasNodeShadow);cursor:pointer;border-radius:10px;flex-direction:column;gap:4px;padding:8px 10px;transition:box-shadow .15s,border-color .15s;display:flex;position:absolute}.canvasNode:hover{border-color:var(--canvasNodeSelected)}@keyframes canvasNodeFlash{0%,to{box-shadow:var(--canvasNodeShadow)}50%{box-shadow:0 0 0 4px var(--canvasNodeSelected),var(--canvasNodeShadow)}}.canvasNodeFlashed{animation:canvasNodeFlash .6s ease-in-out 2}.canvasNodeSelected{border-color:var(--canvasNodeSelected);box-shadow:0 0 0 2px var(--canvasNodeSelected),var(--canvasNodeShadow)}.canvasNodeAffected{border-color:var(--canvasNodeAffected);box-shadow:0 0 0 2px var(--canvasNodeAffected)}.canvasNodeHeader{align-items:center;gap:6px;min-width:0;display:flex}.canvasNodeIcon{color:var(--colorTextSecondary);display:inline-flex}.canvasNodeIcon[data-status=running]{color:var(--colorPrimary);animation:canvasNodePulse 1.6s ease-in-out infinite}.canvasNodeIcon[data-status=blocked],.canvasNodeIcon[data-status=failed]{color:var(--colorError)}.canvasNodeIcon[data-status=paused],.canvasNodeIcon[data-status=repairing]{color:var(--colorWarning)}.canvasNodeMeta{gap:2px}.canvasNodeMeta,.canvasNodeMetrics{align-items:center;min-width:0;display:flex}.canvasNodeMetrics{white-space:nowrap;flex-shrink:0;gap:8px;overflow:hidden}.canvasNodeMetrics>.ant-typography{text-overflow:ellipsis;flex:0 auto;min-width:0;overflow:hidden}@keyframes canvasNodePulse{0%,to{opacity:1}50%{opacity:.35}}@media (max-width:1024px){.nodeInfoPanel{width:92vw}}.deliverablePreview{width:100%}.deliverablePreviewStack{flex-direction:column;gap:10px;width:100%;display:flex}.deliverablePreviewMeta{border-bottom:1px solid var(--colorBorderSecondary);flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:14px;padding-bottom:10px;display:flex}.deliverablePreviewPaper{border:1px solid var(--colorBorderSecondary);background:var(--colorBgContainer);border-radius:10px;width:100%;margin:0 auto;padding:28px 32px;box-shadow:0 1px 2px #00000008,0 8px 24px #0000000a}.deliverablePreviewBody{color:var(--colorText);text-align:justify;text-justify:inter-ideograph;overflow-wrap:anywhere;word-break:break-word;font-size:15px;line-height:1.9}.deliverablePreviewBody h1,.deliverablePreviewBody h2,.deliverablePreviewBody h3,.deliverablePreviewBody h4,.deliverablePreviewBody h5,.deliverablePreviewBody h6{text-align:left;margin:1.6em 0 .6em;font-weight:700;line-height:1.4}.deliverablePreviewBody h1{border-bottom:2px solid var(--colorBorder);padding-bottom:8px;font-size:1.6em}.deliverablePreviewBody h2{border-bottom:1px solid var(--colorBorderSecondary);padding-bottom:6px;font-size:1.35em}.deliverablePreviewBody h3{font-size:1.15em}.deliverablePreviewBody h4{font-size:1.02em}.deliverablePreviewBody h5,.deliverablePreviewBody h6{color:var(--colorTextSecondary);font-size:1em}.deliverablePreviewBody>:first-child{margin-top:0}.deliverablePreviewBody p{margin:.9em 0}.deliverablePreviewBody ol,.deliverablePreviewBody ul{margin:.9em 0;padding-left:1.8em}.deliverablePreviewBody ul{list-style:outside}.deliverablePreviewBody ol{list-style:decimal}.deliverablePreviewBody li{margin:.35em 0}.deliverablePreviewBody li::marker{color:var(--colorTextTertiary)}.deliverablePreviewBody li>ol,.deliverablePreviewBody li>ul{margin:.35em 0}.deliverablePreviewBody blockquote{border-left:3px solid var(--colorPrimaryBorder,var(--colorBorder));background:var(--colorFillQuaternary,var(--colorFillAlter));color:var(--colorTextSecondary);border-radius:0 6px 6px 0;margin:1em 0;padding:.6em 1.1em}.deliverablePreviewBody hr{border:none;border-top:1px solid var(--colorBorderSecondary);margin:1.8em 0}.deliverablePreviewBody a{color:var(--colorPrimary);text-underline-offset:2px;text-decoration:underline}.deliverablePreviewBody img{border-radius:6px;max-width:100%;height:auto}.deliverablePreviewBody strong{font-weight:600}.deliverablePreviewBody table{border-collapse:collapse;text-align:left;width:100%;margin:1.1em 0;font-size:13.5px}.deliverablePreviewBody td,.deliverablePreviewBody th{border:1px solid var(--colorBorderSecondary);vertical-align:top;padding:8px 10px}.deliverablePreviewBody th{background:var(--colorFillAlter);border-bottom:2px solid var(--colorBorder);white-space:nowrap;font-weight:600}.deliverablePreviewBody tbody tr:nth-child(2n) td{background:var(--colorFillQuaternary,transparent)}.deliverablePreviewBody code{background:var(--colorFillSecondary);font-family:var(--fontMono,ui-monospace,SFMono-Regular,Menlo,monospace);border-radius:4px;padding:.15em .4em;font-size:.9em}.deliverablePreviewBody pre{background:var(--colorFillAlter);text-align:left;border-radius:8px;margin:1em 0;padding:12px 14px;overflow-x:auto}.deliverablePreviewBody pre code{background:0 0;padding:0;font-size:12.5px}.deliverablePreviewEnd{border-top:1px dashed var(--colorBorderSecondary);flex-direction:column;gap:4px;width:100%;margin-top:28px;padding-top:14px;display:flex}*,: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}.ant-drawer-content-wrapper{min-width:320px;width:30%!important}a{color:inherit;text-decoration:none}*{scrollbar-width:thin;scrollbar-color:var(--borderColorStrong) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--borderColorStrong);background-clip:padding-box;border:2px solid #0000;border-radius:999px}::-webkit-scrollbar-thumb:hover{background-color: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}#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)}@media (max-width:1024px){:root{--sidebarWidth:200px}}@media (max-width:860px){:root{--sidebarWidth:72px}.sidebarLogo{justify-content:center;padding:16px}.sidebarItem span:not(.sidebarChevron),.sidebarLogoTitle{display:none}.sidebarItem{justify-content:center;padding:11px}.sidebarSubmenu{padding-left:0}.sidebarSubItem{padding-left:11px}.mainInner{padding:var(--mainInnerPadY) var(--mainInnerPadX);padding-bottom:calc(var(--mainInnerPadY) + 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:var(--mainInnerPadY) var(--mainInnerPadX);padding-bottom:calc(var(--mainInnerPadY) + env(safe-area-inset-bottom,0px))}.topbar{border-radius:16px;margin:8px 8px 0;padding:8px 12px}}:root{--pageStickyTop:68px}.skillStickyHeader{top:var(--pageStickyTop);z-index:5;background:linear-gradient(to bottom,var(--colorBg) 82%,transparent);padding-bottom:12px;position:sticky}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@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}.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}.sidebarLogoRow{gap:4px;padding-right:8px}.sidebarLogo,.sidebarLogoRow{display:flex;align-items:center}.sidebarLogo{gap:12px;padding:24px 20px 20px;height:68px;overflow:hidden}.sidebarCollapsedSelf .sidebarLogo{justify-content:center;padding:24px 0 20px}.sidebarCollapsedSelf .sidebarLogoRow{padding-right:0}.sidebarCollapsedSelf .sidebarChevron,.sidebarCollapsedSelf .sidebarLabel,.sidebarCollapsedSelf .sidebarLogoTitle{display:none}.sidebarCollapsedSelf .sidebarItem{justify-content:center;padding:10px}.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}.sidebarCollapseBtn{width:32px;height:32px;flex-shrink:0;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:var(--mainInnerPadY,32px) var(--mainInnerPadX,clamp(24px,4vw,48px));padding-bottom:calc(var(--mainInnerPadY, 32px) + env(safe-area-inset-bottom, 0px));width:100%;min-width:0;overflow-x:clip;transition:opacity .2s ease}.mainInner.pageTransitioning{opacity:.5;pointer-events:none}.ant-card{background:var(--colorBgContainer)!important;border:none!important;border-radius:20px!important;box-shadow:var(--shadowSurface)!important;margin-bottom:0!important}.ant-card-head{border-bottom:none!important;padding:0 24px!important;min-height:auto!important;margin-bottom:16px}.ant-card-small>.ant-card-head{padding:0 12px!important}.ant-card-head-title{font-size:16px!important;font-weight:600!important;padding:0!important}.tableFillHeight,.tableFillHeight>.ant-spin,.tableFillHeight>.ant-spin>.ant-spin-container{display:flex;flex-direction:column;min-height:0}.tableFillHeight>.ant-spin,.tableFillHeight>.ant-spin>.ant-spin-container{flex:1}.tableFillHeight .ant-table{flex:1 1 auto;min-height:0}.tableFillHeight .ant-table-container{display:flex;flex-direction:column;height:100%;min-height:0}.tableFillHeight .ant-table-body{max-height:none!important}.tableFillHeight .ant-table-body,.tableFillHeight .ant-table-content{flex:1;min-height:0;overflow:auto!important}.tableFillHeight .ant-table-pagination.ant-pagination{margin:auto 16px 12px!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-selection-column .ant-checkbox-wrapper{vertical-align:middle;align-items:center}.ant-table-wrapper .ant-table-cell .ant-checkbox{line-height:1}.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{margin-top:16px!important}.ant-card-head{margin-bottom:16px!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:16px!important}.ant-form-item-row{row-gap:8px!important}.ant-descriptions-small .ant-descriptions-item-content,.ant-descriptions-small .ant-descriptions-item-label{padding-top:12px!important;padding-bottom:12px!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}[class*=Card]:not(.ant-card),[class*=card]:not(.ant-card){box-shadow:none!important}.group:hover,.hover\:border-\[var\(--borderColorStrong\)\]:hover,.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:transparent!important;box-shadow:none!important}.active,.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.60.4",
3
+ "version": "4.60.6",
4
4
  "description": "Customize Agent Web 管理控制台",
5
5
  "exports": {
6
6
  "./package.json": "./package.json"
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2],{14524:(e,t,r)=>{r.d(t,{PZ:()=>d,RU:()=>u,jT:()=>p,n$:()=>m});var l=r(65321),s=r(48399),n=r(68787),i=r(33442),a=r(85114),c=r(58209);let{Text:o}=s.A;function d(e){let{title:t,description:r,hint:s,className:i,children:a}=e;return(0,l.jsxs)(n.A,{size:"small",className:"rounded-2xl border-[var(--borderColor)] ".concat(null!=i?i:""),title:(0,l.jsx)("span",{className:"font-semibold",children:t}),extra:s?(0,l.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:s}):null,styles:{body:{padding:"16px 20px 20px"}},children:[r&&(0,l.jsx)("p",{className:"text-xs text-[var(--colorTextSecondary)] mb-4 mt-0 leading-relaxed",children:r}),a]})}function u(e){let{label:t,children:r,empty:s}=e,n=null==r||!1===r;return(0,l.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-[132px_minmax(0,1fr)] gap-x-4 gap-y-1 py-2 border-b border-[var(--colorBorderSecondary)] last:border-0",children:[(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] sm:pt-1",children:t}),(0,l.jsx)("div",{className:"min-w-0 text-sm leading-6",children:n?(0,l.jsx)(o,{type:"secondary",className:"text-xs",children:null!=s?s:"未声明"}):r})]})}function m(e){let{items:t,empty:r}=e;return 0===t.length?(0,l.jsx)(o,{type:"secondary",className:"text-xs",children:null!=r?r:"未声明"}):(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map((e,t)=>(0,l.jsx)("span",{children:e},t))})}function p(e){let{children:t,columns:r="md:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",onRemove:s,removeLabel:n="删除这一行"}=e;return(0,l.jsxs)("div",{className:"flex items-start gap-2 rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5 transition-colors hover:bg-[var(--colorBgHover)]",children:[(0,l.jsx)("div",{className:"min-w-0 flex-1 grid grid-cols-1 ".concat(r," gap-x-3 gap-y-1 items-start"),children:t}),(0,l.jsx)(i.A,{size:0,className:"pt-6",children:(0,l.jsx)(a.Ay,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(c.A,{}),"aria-label":n,title:n,onClick:s})})]})}},33061:(e,t,r)=>{r.d(t,{G:()=>n});var l=r(97109),s=r(35071);function n(){let[e,t]=(0,l.useState)([]),[r,n]=(0,l.useState)(),[i,a]=(0,l.useState)([]),[c,o]=(0,l.useState)(!0),[d,u]=(0,l.useState)(""),m=(0,l.useCallback)(async()=>{o(!0);let e=await (0,s.SS)("/api/skills");if(e.ok){var r;t(e.data.skills),n(e.data.options),a(null!=(r=e.data.invalid)?r:[]),u("")}else u(e.message);o(!1)},[]);return(0,l.useEffect)(()=>{m()},[m]),{skills:e,options:r,invalid:i,loading:c,failed:d,reload:m,applySkills:t}}},35071:(e,t,r)=>{r.d(t,{F:()=>n,Ie:()=>o,Oz:()=>a,RW:()=>m,SS:()=>s,eT:()=>l,m6:()=>c});let l={"Content-Type":"application/json"};async function s(e,t){try{let l,s=await fetch(e,t),n=await s.text();try{l=n?JSON.parse(n):void 0}catch(e){l=void 0}if(!s.ok){var r;let e=null!=l?l:{};return{ok:!1,status:s.status,message:null!=(r=e.error)?r:"HTTP ".concat(s.status),issues:Array.isArray(e.errors)?e.errors:[]}}return{ok:!0,data:l}}catch(e){return{ok:!1,status:0,message:e instanceof Error?e.message:"网络请求失败",issues:[]}}}let n="内置技能只读,随应用版本更新。可新建用户技能进行配置。";function i(e){return[...new Set((null!=e?e:[]).map(e=>e.trim()).filter(e=>e.length>0))]}function a(e){return"string"==typeof e?e:e.phrase}function c(e){return{id:e.id,enabled:e.enabled,match:{chapterDomain:e.match.chapterDomain,projectTypes:[...e.match.projectTypes],sectionKeywords:[...e.match.sectionKeywords],...e.match.sectionRegex?{sectionRegex:e.match.sectionRegex}:{}},requires:e.requires.map(e=>({...e})),structure:e.structure.map(e=>{var t;return{title:e.title,required:[...null!=(t=e.required)?t:[]]}}),forbidden:e.forbidden.map(a),knowledge:e.knowledge.map(e=>({kind:e.kind,...e.ids?{ids:[...e.ids]}:{},...e.note?{note:e.note}:{}})),acceptance:e.acceptance.map(e=>({kind:"llmChecklist",checklistItems:[...e.items]})),...void 0!==e.outputTitle?{outputTitle:e.outputTitle}:{},...e.chapterChecklist?{chapterChecklist:{...e.chapterChecklist,...e.chapterChecklist.sections?{sections:[...e.chapterChecklist.sections]}:{}}}:{}}}function o(){return{id:"skill-".concat(Date.now()),enabled:!0,match:{projectTypes:[],sectionKeywords:[]},requires:[{source:"boq",required:!1}],structure:[{}],forbidden:[],knowledge:[],acceptance:[{kind:"llmChecklist",checklistItems:[]}]}}function d(e){var t;return(null!=(t=e.ids)?t:[]).length>0}function u(e){var t;return(null!=(t=e.checklistItems)?t:[]).length>0}function m(e,t,r){var l,s,n,a,c,o,m,p,x,h;let v={chapterDomain:null==(l=e.match)?void 0:l.chapterDomain,projectTypes:[...null!=(o=null==(s=e.match)?void 0:s.projectTypes)?o:[]],sectionKeywords:i(null==(n=e.match)?void 0:n.sectionKeywords),...(null==(c=e.match)||null==(a=c.sectionRegex)?void 0:a.trim())?{sectionRegex:e.match.sectionRegex.trim()}:{}},f=(null!=(m=e.requires)?m:[]).filter(e=>{var t;return(null!=(t=e.key)?t:"").trim().length>0}).map(e=>{var t;return{key:(null!=(t=e.key)?t:"").trim(),source:e.source,required:!0===e.required}}),g=(null!=(p=e.structure)?p:[]).filter(e=>{var t;return(null!=(t=e.title)?t:"").trim().length>0}).map(e=>{var t;return{title:(null!=(t=e.title)?t:"").trim(),required:i(e.required)}}),k=(null!=(x=e.knowledge)?x:[]).filter(d).map(e=>{var t;return{kind:"processCard",ids:i(e.ids),...(null==(t=e.note)?void 0:t.trim())?{note:e.note.trim()}:{}}}),b=(null!=(h=e.acceptance)?h:[]).filter(u).map(e=>({kind:"llmChecklist",items:i(e.checklistItems),nonDeterministic:!0}));return{id:e.id.trim(),version:t,source:"user",enabled:!1!==e.enabled,match:v,requires:f,structure:g,forbidden:i(e.forbidden),knowledge:k,acceptance:b,...function(e){var t,r,l,s;let n=null!=(s=null==(t=e.outputTitle)?void 0:t.trim())?s:"",a=e.chapterChecklist,c={sections:i(null==a?void 0:a.sections),queries:i(null==a?void 0:a.queries),requiredFacts:i(null==a?void 0:a.requiredFacts),tableSections:i(null==a?void 0:a.tableSections),tableRequirements:i(null==a?void 0:a.tableRequirements),pinnedEvidenceFilePaths:i(null==a?void 0:a.pinnedEvidenceFilePaths)},o=!!(null==a||null==(r=a.purpose)?void 0:r.trim())||Object.values(c).some(e=>e.length>0);return{...n?{outputTitle:n}:{},...o?{chapterChecklist:{...(null==a||null==(l=a.purpose)?void 0:l.trim())?{purpose:a.purpose.trim()}:{},...Object.fromEntries(Object.entries(c).filter(e=>{let[,t]=e;return t.length>0}))}}:{}}}(e),...r?{examples:r}:{}}}},62561:(e,t,r)=>{r.d(t,{e:()=>a});var l=r(65321),s=r(43220),n=r.n(s),i=r(47210);function a(e){let{title:t,description:r,extra:s}=e;return(0,l.jsx)("div",{className:"skillStickyHeader",children:(0,l.jsx)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl border border-[var(--borderColor)] px-5 py-4",children:(0,l.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"flex items-center min-w-0",children:[(0,l.jsxs)(n(),{href:"/skills",className:"mr-4 text-sm text-[var(--colorTextSecondary)] hover:text-[var(--colorText)] inline-flex items-center gap-1 shrink-0",children:[(0,l.jsx)(i.A,{})," 返回技能库"]}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h1",{className:"text-xl font-bold text-[var(--colorText)] mb-0.5 truncate",children:t}),r?(0,l.jsx)("p",{className:"text-xs text-[var(--colorTextSecondary)] m-0 truncate",children:r}):null]})]}),s?(0,l.jsx)("div",{className:"shrink-0 flex items-center gap-2",children:s}):null]})})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[257],{75257:(e,s,l)=>{l.d(s,{q:()=>F});var a=l(65321),r=l(97109),i=l(86109),t=l(48399),n=l(17807),c=l(63455),d=l(88762),o=l(85493),m=l(84253),x=l(85114),h=l(33442),p=l(99650),j=l(67547),u=l(43220),g=l.n(u),A=l(62561),b=l(7576),v=l(44534),y=l(57271),f=l(54746),N=l(39507),k=l(14524);let{Text:I}=t.A;function w(e){var s,l;let{form:r,options:i,idLocked:t}=e,n=(0,N.Vr)(),d=i.chapterDomains.map(e=>({value:e.value,label:e.label,title:e.note})),o=i.projectTypes.map(e=>({value:e.value,label:e.label})),m=i.factSources.map(e=>({value:e.value,label:e.label})),h=i.processCards.map(e=>({value:e.value,label:e.label}));return(0,a.jsx)(c.A,{form:r,layout:"vertical",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 items-start",children:[(0,a.jsxs)(k.PZ,{title:"基本信息",description:"技能的身份与启停;ID 是落盘文件名,新建后不再改。",children:[(0,a.jsx)(c.A.Item,{name:"id",label:"技能 ID",rules:[{required:!0,message:"技能 ID 必填"}],extra:"使用小写字母、数字和连字符,以字母开头。",children:(0,a.jsx)(b.A,{disabled:t,placeholder:"例如 c02-major-content-building"})}),(0,a.jsx)(c.A.Item,{name:"enabled",label:"启用",valuePropName:"checked",extra:"停用后本条技能不参与本次生成的技能匹配。",className:"!mb-0",children:(0,a.jsx)(v.A,{checkedChildren:"启用",unCheckedChildren:"停用"})})]}),(0,a.jsxs)(k.PZ,{title:"匹配条件",description:"决定这条技能在什么章域、什么工程类型、什么样的章节标题下被选用。",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-4",children:[(0,a.jsx)(c.A.Item,{name:["match","chapterDomain"],label:"章域",rules:[{required:!0,message:"章域必选"}],extra:"本章所属的专业内容范围。",children:(0,a.jsx)(y.A,{options:d,placeholder:"选择本章所属的内容域"})}),(0,a.jsx)(c.A.Item,{name:["match","projectTypes"],label:"适用工程类型",extra:"留空表示不限定工程类型。",children:(0,a.jsx)(y.A,{mode:"multiple",allowClear:!0,options:o,placeholder:"全类型"})})]}),(0,a.jsx)(c.A.Item,{name:["match","sectionKeywords"],label:"小节标题关键词",extra:"用于匹配相关小节标题,可输入多个关键词。",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","," "],placeholder:"输入后回车,例如:主要施工 / 分部分项"})}),(0,a.jsx)(c.A.Item,{name:["match","sectionRegex"],label:"小节标题匹配表达式(可选)",extra:"填写正则表达式文本;复杂或不安全的表达式会被校验拒绝。",className:"!mb-0",children:(0,a.jsx)(b.A,{placeholder:"例如 交通导改|导行|管线保护"})})]}),(0,a.jsx)(k.PZ,{className:"xl:col-span-2",title:"所需项目资料",description:"本条技能要求本次任务先查证的项目事实(事实键来自服务端闭集);标为必需而查不到时会被上游拦下。",children:(0,a.jsx)(c.A.List,{name:"requires",children:(e,s)=>{let{add:l,remove:r}=s;return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.map(e=>{let{key:s,name:l,...i}=e;return(0,a.jsxs)(k.jT,{onRemove:()=>r(l),columns:"md:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_auto]",children:[(0,a.jsx)(c.A.Item,{...i,name:[l,"key"],rules:[{required:!0,message:"事实键必填"}],className:"!mb-0",children:(0,a.jsx)(b.A,{placeholder:"事实键,如 boq.divisions"})}),(0,a.jsx)(c.A.Item,{...i,name:[l,"source"],rules:[{required:!0,message:"来源必选"}],className:"!mb-0",children:(0,a.jsx)(y.A,{options:m,placeholder:"事实来源"})}),(0,a.jsx)(c.A.Item,{...i,name:[l,"required"],valuePropName:"checked",className:"!mb-0",children:(0,a.jsx)(v.A,{checkedChildren:"必需",unCheckedChildren:"可选"})})]},s)}),(0,a.jsxs)(x.Ay,{type:"dashed",block:!0,icon:(0,a.jsx)(f.A,{}),onClick:()=>l({source:"boq",required:!1}),children:[n("common.add"),"事实需求"]})]})}})}),(0,a.jsx)(k.PZ,{className:"xl:col-span-2",title:"相关专业主题",description:"本条技能提供的专业内容主题;主题下的小标签写这一主题要覆盖的工序、条件、控制点或验收要求。",children:(0,a.jsx)(c.A.List,{name:"structure",children:(e,s)=>{let{add:l,remove:r}=s;return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.map(e=>{let{key:s,name:l,...i}=e;return(0,a.jsxs)(k.jT,{onRemove:()=>r(l),columns:"md:grid-cols-[minmax(0,1fr)_minmax(0,2fr)]",children:[(0,a.jsx)(c.A.Item,{...i,name:[l,"title"],rules:[{required:!0,message:"专业主题标题必填"}],className:"!mb-0",children:(0,a.jsx)(b.A,{placeholder:"专业主题标题"})}),(0,a.jsx)(c.A.Item,{...i,name:[l,"required"],extra:"按实际对象选用,不写固定字数或参数数量。",className:"!mb-0",children:(0,a.jsx)(y.A,{mode:"tags",className:"w-full",placeholder:"工序、适用条件、控制要点或验收要求"})})]},s)}),(0,a.jsxs)(x.Ay,{type:"dashed",block:!0,icon:(0,a.jsx)(f.A,{}),onClick:()=>l({required:[]}),children:[n("common.add"),"专业主题"]})]})}})}),(0,a.jsxs)(k.PZ,{className:"xl:col-span-2",title:"文档业务提示",description:"给本次规划的建议:文档名称、本章职责与资料检索提示。实际章节职责由本次规划确定,专业主题在上面的卡片里单独填写。",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-4",children:[(0,a.jsx)(c.A.Item,{name:"outputTitle",label:"文档名称建议",extra:"提供文档名称建议,实际名称由本次生成配置确定。",children:(0,a.jsx)(b.A,{placeholder:"留空 = 本技能不对文档名称表态"})}),(0,a.jsx)(c.A.Item,{name:["chapterChecklist","purpose"],label:"章级内容提示",extra:"说明本章关注的专业内容。",children:(0,a.jsx)(b.A,{placeholder:"例如:说明本工程的安全管理目标与危大工程清单"})})]}),(0,a.jsxs)("div",{className:"mt-1 mb-3 border-t border-[var(--colorBorderSecondary)] pt-3",children:[(0,a.jsx)(I,{strong:!0,className:"text-sm",children:"章级清单"}),(0,a.jsx)(I,{type:"secondary",className:"text-xs ml-2",children:"章级候选内容与资料检索提示;实际职责由本次规划确定。"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-4",children:[(0,a.jsx)(c.A.Item,{name:["chapterChecklist","queries"],label:"资料检索词",extra:"帮助定位相关资料。",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","],className:"w-full",placeholder:"回车添加"})}),(0,a.jsx)(c.A.Item,{name:["chapterChecklist","requiredFacts"],label:"待核事实提示",extra:"提示应查证的项目事实。",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","],className:"w-full",placeholder:"回车添加"})}),(0,a.jsx)(c.A.Item,{name:["chapterChecklist","tableSections"],label:"成表内容建议",extra:"提示适合用表格表达的内容。",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","],className:"w-full",placeholder:"回车添加"})}),(0,a.jsx)(c.A.Item,{name:["chapterChecklist","tableRequirements"],label:"表格表达提示",extra:"提示表格列项与表达方式。",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","],className:"w-full",placeholder:"回车添加"})})]}),(0,a.jsx)(c.A.Item,{name:["chapterChecklist","pinnedEvidenceFilePaths"],label:"相关证据文件",extra:"填写需要关注的文件名;实际读取范围和来源资格仍由本次任务核对。",className:"!mb-0",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","],placeholder:"回车添加文件名"})}),(null!=(l=null==(s=i.absentCarriers)?void 0:s.length)?l:0)>0&&(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5",children:[(0,a.jsx)("div",{className:"text-xs font-semibold mb-1",children:"不在这里配置的事项"}),(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:i.absentCarriers.map(e=>(0,a.jsxs)("div",{children:[e.label,":","formatting"===e.id?"排版要求由招标资料与导出设置管理,技能编辑器提供专业内容。":e.note]},e.id))})]})]}),(0,a.jsx)(k.PZ,{title:"禁写项",description:"这条技能明确要求避免的内容或表达;没有就留空。",children:(0,a.jsx)(c.A.Item,{name:"forbidden",extra:"填错一条会挡住真实存在的内容,宁可留空。",className:"!mb-0",children:(0,a.jsx)(y.A,{mode:"tags",tokenSeparators:[",",","],placeholder:"输入后回车,例如:管道闭水试验"})})}),(0,a.jsx)(k.PZ,{title:"可加载工艺知识",description:"选用后,这些工艺卡会作为专业参考进入本次写作;引用是否存在由保存前的校验核对。",children:(0,a.jsx)(c.A.List,{name:"knowledge",children:(e,s)=>{let{add:l,remove:r}=s;return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.map(e=>{let{key:s,name:l,...i}=e;return(0,a.jsxs)(k.jT,{onRemove:()=>r(l),columns:"md:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,a.jsx)(c.A.Item,{...i,name:[l,"ids"],rules:[{required:!0,type:"array",min:1,message:"请选择实际工艺卡"}],className:"!mb-0",children:(0,a.jsx)(y.A,{mode:"multiple",showSearch:!0,optionFilterProp:"label",options:h,placeholder:"按工艺卡名称搜索"})}),(0,a.jsx)(c.A.Item,{...i,name:[l,"note"],className:"!mb-0",children:(0,a.jsx)(b.A,{placeholder:"适用条件说明(可选)"})})]},s)}),(0,a.jsxs)(x.Ay,{type:"dashed",block:!0,icon:(0,a.jsx)(f.A,{}),onClick:()=>l({kind:"processCard",ids:[]}),children:[n("common.add"),"工艺知识"]})]})}})}),(0,a.jsx)(k.PZ,{className:"xl:col-span-2",title:"专业写作核对提示",description:"写清适用对象、方法和检验注意。提示供作者按具体任务选用,不构成评分、字数或参数数量要求。",children:(0,a.jsx)(c.A.List,{name:"acceptance",children:(e,s)=>{let{add:l,remove:r}=s;return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.map(e=>{let{key:s,name:l,...i}=e;return(0,a.jsx)(k.jT,{onRemove:()=>r(l),columns:"md:grid-cols-[minmax(0,1fr)]",children:(0,a.jsx)(c.A.Item,{...i,name:[l,"checklistItems"],rules:[{required:!0,type:"array",min:1,message:"请输入专业注意事项"}],className:"!mb-0",children:(0,a.jsx)(y.A,{mode:"tags",className:"w-full",placeholder:"例如:保留实际检验对象、触发条件和转序要求"})})},s)}),(0,a.jsxs)(x.Ay,{type:"dashed",block:!0,icon:(0,a.jsx)(f.A,{}),onClick:()=>l({kind:"llmChecklist",checklistItems:[]}),children:[n("common.add"),"专业提示"]})]})}})}),(0,a.jsx)(k.PZ,{className:"xl:col-span-2",title:"资料与采用边界",description:"以下边界由软件统一执行,技能不能扩大或豁免。",children:(0,a.jsx)("div",{className:"flex flex-col gap-2",children:i.isolationRules.map(e=>(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-baseline gap-1 sm:gap-2",children:[(0,a.jsx)(I,{className:"text-sm shrink-0",children:e.label}),(0,a.jsx)(I,{type:"secondary",className:"text-xs",children:e.note})]},e.id))})})]})})}var C=l(33061),S=l(35071);let{Text:q}=t.A;function F(e){let{mode:s,skillId:l}=e,{message:t}=n.A.useApp(),u=(0,i.useRouter)(),[b]=c.A.useForm(),v=(0,C.G)(),[y,f]=(0,r.useState)(!1),[N,k]=(0,r.useState)([]),I=(0,r.useMemo)(()=>"edit"===s&&l?v.skills.find(e=>e.id===l):void 0,[s,l,v.skills]),F="edit"===s&&!l,P="edit"===s&&!v.loading&&!v.failed&&!I&&void 0!==v.options,[T,R]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(T||v.loading||!v.options)return;if("create"===s){b.resetFields(),b.setFieldsValue((0,S.Ie)()),R(!0);return}if(!I)return;let e=I.promptBindings;Array.isArray(e)&&e.length>0&&t.warning("「".concat(I.id,"」里还留着 ").concat(e.length," 条已退休的提示词绑定(promptBindings):该字段已随角色配置页删除,本次保存会把它从技能里移除。")),b.resetFields(),b.setFieldsValue((0,S.m6)(I)),R(!0)},[T,v.loading,v.options,s,I,b,t]);let Z=async()=>{let e;if(!v.options)return;try{e=await b.validateFields()}catch(e){return}let s=(0,S.RW)(e,v.options.contractVersion,null==I?void 0:I.examples);f(!0),k([]);try{var l,a,r;let i=await (0,S.SS)("/api/skills/validate",{method:"POST",headers:S.eT,body:JSON.stringify(s)});if(!i.ok){t.error("校验请求失败:".concat(i.message)),k(i.issues);return}if(!i.data.ok){k(i.data.errors),t.error("校验未通过:".concat(i.data.errors.length," 处问题,请核对技能字段和工艺卡引用。"));return}let n=I?await (0,S.SS)("/api/skills/".concat(encodeURIComponent(I.id)),{method:"PUT",headers:S.eT,body:JSON.stringify(s)}):await (0,S.SS)("/api/skills",{method:"POST",headers:S.eT,body:JSON.stringify(s)});if(!n.ok){k(n.issues),t.error("保存失败:".concat(n.message));return}(null==(l=n.data.warnings)?void 0:l.length)&&t.warning("已保存,但有 ".concat(n.data.warnings.length," 条提示:").concat(n.data.warnings.map(e=>e.message).join(";"))),t.success("已保存"),await u.push("/skills/".concat(encodeURIComponent(null!=(r=null==(a=n.data.skill)?void 0:a.id)?r:e.id)))}finally{f(!1)}};return F||v.loading?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(d.A,{active:!0,title:!0,paragraph:{rows:2}}),(0,a.jsx)(d.A,{active:!0,paragraph:{rows:12}})]}):v.failed?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(A.e,{title:"create"===s?"新建技能":"编辑技能"}),(0,a.jsx)(o.A,{type:"error",showIcon:!0,message:"技能库读取失败",description:"".concat(v.failed,';这不是"技能不存在",请核对服务端状态后重试。')})]}):P?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(A.e,{title:"编辑技能"}),(0,a.jsx)(m.A,{description:"技能库里没有「".concat(l,"」这条技能(可能已被删除或改名)"),children:(0,a.jsx)(g(),{href:"/skills",children:(0,a.jsx)(x.Ay,{type:"primary",children:"返回技能库"})})})]}):v.options?(null==I?void 0:I.builtIn)?(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(A.e,{title:"编辑技能 \xb7 ".concat(I.displayName),description:"内置技能随应用版本更新,不能在这里修改。",extra:(0,a.jsx)(g(),{href:"/skills/".concat(encodeURIComponent(I.id)),children:(0,a.jsx)(x.Ay,{icon:(0,a.jsx)(p.A,{}),children:"查看预览"})})}),(0,a.jsx)(o.A,{type:"info",showIcon:!0,message:"内置技能",description:S.F}),(0,a.jsx)("div",{children:(0,a.jsx)(g(),{href:"/skills/new",children:(0,a.jsx)(x.Ay,{type:"primary",children:"新建用户技能"})})})]}):(0,a.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,a.jsx)(A.e,{title:I?"编辑技能 \xb7 ".concat(I.displayName):"新建技能",description:I?"改动会在保存前做一次字段与工艺卡引用校验,通过后写入技能文件。":"技能提供专业主题、资料需求、工艺知识和写作核对提示;保存前同样会做引用校验。",extra:(0,a.jsxs)(a.Fragment,{children:[I?(0,a.jsx)(g(),{href:"/skills/".concat(encodeURIComponent(I.id)),children:(0,a.jsx)(x.Ay,{children:"放弃改动并返回预览"})}):(0,a.jsx)(g(),{href:"/skills",children:(0,a.jsx)(x.Ay,{children:"取消"})}),(0,a.jsxs)(h.A,{size:4,children:[(0,a.jsx)(q,{type:"secondary",className:"text-xs",children:"保存后自动进入预览"}),(0,a.jsx)(x.Ay,{type:"primary",icon:(0,a.jsx)(j.A,{}),loading:y,onClick:()=>{Z()},children:"保存"})]})]})}),(null==I?void 0:I.examples)&&(0,a.jsx)(o.A,{type:"info",showIcon:!0,message:"该技能带表达示例",description:"示例供理解专业表达,不能作为本项目事实;本编辑器不修改示例,保存时原样保留。"}),N.length>0&&(0,a.jsx)(o.A,{type:"error",showIcon:!0,message:"校验未通过:".concat(N.length," 处"),description:(0,a.jsx)("div",{className:"text-xs",children:N.map((e,s)=>{var l;return(0,a.jsxs)("div",{children:[(0,a.jsx)(q,{code:!0,children:e.path||"(root)"})," ",e.message]},"".concat(null!=(l=e.path)?l:"root","-").concat(s))})})}),(0,a.jsx)(w,{form:b,options:v.options,idLocked:!!I})]}):null}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95],{2232:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_});var r=s(65321),a=s(97109),l=s(1873),n=s.n(l),c=s(43220),o=s.n(c),i=s(86109),d=s(33442),x=s(14932),h=s(85114),m=s(85493),u=s(48318),p=s(75174),j=s(57271),v=s(42700),g=s(84253),f=s(68787),y=s(11702),b=s(76506),N=s(58569),w=s(99271),C=s(37510),k=s(47210),S=s(99811),A=s(6578);let T={whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12.5,lineHeight:1.75};function z(e){let{children:t,maxHeight:s=520}=e;return(0,r.jsx)("div",{className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5",style:{maxHeight:s,overflow:"auto"},children:t})}function M(e){let{zoom:t,onChange:s,viewportRef:a}=e,l=e=>Math.min(4,Math.max(.2,Math.round(100*e)/100));return(0,r.jsxs)(d.A,{size:4,align:"center",children:[(0,r.jsx)(x.A,{title:"缩小(Ctrl/⌘ + 滚轮同效)",children:(0,r.jsx)(h.Ay,{size:"small",icon:(0,r.jsx)(w.A,{}),"aria-label":"缩小",onClick:()=>s(l(t-.1))})}),(0,r.jsxs)("span",{className:"text-xs tabular-nums text-[var(--colorTextSecondary)] w-12 text-center",children:[Math.round(100*t),"%"]}),(0,r.jsx)(x.A,{title:"放大(Ctrl/⌘ + 滚轮同效)",children:(0,r.jsx)(h.Ay,{size:"small",icon:(0,r.jsx)(C.A,{}),"aria-label":"放大",onClick:()=>s(l(t+.1))})}),(0,r.jsx)(h.Ay,{size:"small",onClick:()=>{let e=a.current,r=null==e?void 0:e.firstElementChild;if(!e||!r)return;let n=r.clientWidth/t;n&&s(l((e.clientWidth-2)/n))},children:"适应宽度"}),(0,r.jsx)(h.Ay,{size:"small",disabled:1===t,onClick:()=>s(1),children:"原始比例"})]})}function R(e){let{zoom:t,viewportRef:s,children:a}=e;return(0,r.jsx)("div",{ref:s,className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-2 overflow-auto",style:{maxHeight:"68vh"},children:1===t?a:(0,r.jsx)("div",{style:{zoom:t},children:a})})}function I(e){var t,s,a;let{block:l,parts:n}=e;if("undefined"==typeof DOMParser)return(0,r.jsx)(z,{children:(0,r.jsx)("pre",{style:T,children:l.text})});let c=null!=(a=null==(t=/<[^!?][^>]*?\s([^>]*)>/u.exec(null!=(s=n[l.part])?s:""))?void 0:t[1])?a:'xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"',o=new DOMParser().parseFromString("<root ".concat(c,">").concat(l.xml,"</root>"),"application/xml"),i=o.documentElement.firstElementChild;if(!i||o.querySelector("parsererror"))return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.A,{type:"warning",message:"表格XML显示未完成,保留原文及结构供核查"}),(0,r.jsx)(z,{children:(0,r.jsx)("pre",{style:T,children:l.text})})]});let d=[...i.children].filter(e=>"tr"===e.localName).map(e=>{let t=0;return[...e.children].filter(e=>"tc"===e.localName).map(e=>{var s,r,a;let l=Number(null!=(r=null==(s=e.getElementsByTagName("w:gridSpan")[0])?void 0:s.getAttribute("w:val"))?r:1),n=e.getElementsByTagName("w:vMerge")[0],c={column:t,span:l,merge:n?null!=(a=n.getAttribute("w:val"))?a:"continue":void 0,text:[...e.getElementsByTagName("w:t")].map(e=>{var t;return null!=(t=e.textContent)?t:""}).join("")};return t+=l,c})});return(0,r.jsx)("table",{className:"w-full border-collapse my-3 text-sm",children:(0,r.jsx)("tbody",{children:d.map((e,t)=>(0,r.jsx)("tr",{className:"even:bg-[var(--colorFillAlter)]",children:e.filter(e=>"continue"!==e.merge).map(e=>{var s,a;let l=1;if("restart"===e.merge)for(;(null==(a=d[t+l])||null==(s=a.find(t=>t.column===e.column))?void 0:s.merge)==="continue";)l++;return(0,r.jsx)("td",{className:"border border-[var(--borderColor)] p-2 align-top whitespace-pre-wrap",colSpan:e.span,rowSpan:l,children:e.text},e.column)})},t))})})}function F(e){let{sheet:t,zoom:s,viewportRef:l}=e,[n,c]=(0,a.useState)(1),[o,i]=(0,a.useState)(1),d=t.cells.reduce((e,t)=>Math.max(e,t.row),t.merges.reduce((e,t)=>Math.max(e,t.endRow),1)),x=t.cells.reduce((e,t)=>Math.max(e,t.col),t.merges.reduce((e,t)=>Math.max(e,t.endCol),1)),h=(0,a.useMemo)(()=>new Map(t.cells.map(e=>["".concat(e.row,":").concat(e.col),e])),[t]),m=(n-1)*50+1,j=Math.min(d,m+49),v=Math.min(x,o+19);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-3 text-xs text-[var(--colorTextSecondary)]",children:[(0,r.jsx)("span",{children:"原工作表物理坐标;公式使用已保存缓存值"}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-2",children:["起始列 ",(0,r.jsx)(u.A,{size:"small",min:1,max:x,value:o,onChange:e=>i(null!=e?e:1)})]})]}),(0,r.jsx)(R,{zoom:s,viewportRef:l,children:(0,r.jsxs)("table",{className:"border-collapse text-xs",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 sticky top-0 left-0 z-[2]",children:"行"}),Array.from({length:v-o+1},(e,t)=>(0,r.jsxs)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 sticky top-0 z-[1] min-w-24",children:["C",o+t]},t))]})}),(0,r.jsx)("tbody",{children:Array.from({length:j-m+1},(e,s)=>{let a=m+s;return(0,r.jsxs)("tr",{className:"even:bg-[var(--colorFillAlter)]",children:[(0,r.jsxs)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 text-[var(--colorTextSecondary)] sticky left-0 z-[1]",children:["R",a]}),Array.from({length:v-o+1},(e,s)=>{var l,n,c;let i=o+s,d=h.get("".concat(a,":").concat(i)),x=t.merges.find(e=>a>=e.startRow&&a<=e.endRow&&i>=e.startCol&&i<=e.endCol);if(x&&(a!==Math.max(m,x.startRow)||i!==Math.max(o,x.startCol)))return null;let u=x?h.get("".concat(x.startRow,":").concat(x.startCol)):d,p=null!=(l=null==u?void 0:u.display)?l:"";return(0,r.jsxs)("td",{className:"border border-[var(--borderColor)] px-2 py-1 whitespace-pre-wrap align-top ".concat("number"==typeof p||"string"==typeof p&&/^-?[\d,]+(\.\d+)?$/u.test(p.trim())?"text-right tabular-nums":""," ").concat(""===p?"bg-[var(--colorFillQuaternary)]":""),rowSpan:x?Math.min(j,x.endRow)-Math.max(m,x.startRow)+1:1,colSpan:x?Math.min(v,x.endCol)-Math.max(o,x.startCol)+1:1,title:"".concat(null!=(n=null==u?void 0:u.address)?n:"R".concat(a,"C").concat(i),"\n原值: ").concat(String(null!=(c=null==u?void 0:u.value)?c:"")).concat((null==u?void 0:u.formula)?"\n公式: =".concat(u.formula):""),children:[p,(null==u?void 0:u.formula)&&(0,r.jsxs)("div",{className:"text-[10px] text-[var(--colorTextTertiary)]",children:["=",u.formula]})]},i)})]},a)})})]})}),(0,r.jsx)("div",{className:"mt-3 flex justify-end",children:(0,r.jsx)(p.A,{size:"small",current:n,pageSize:50,total:d,showSizeChanger:!1,onChange:c})})]})}function O(e){let{frameIds:t,endpoint:s,zoom:l,viewportRef:c}=e,[o,i]=(0,a.useState)(0),[d,x]=(0,a.useState)(""),[h,u]=(0,a.useState)(),[p,f]=(0,a.useState)(""),[y,b]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=!0;x(""),f(""),u(void 0);let r=t[o];if(r)return b(!0),(0,A.x6)("".concat(s,"&frame=").concat(encodeURIComponent(r),"&format=json")).then(t=>{e&&(x(t.image),u(t.receipt))}).catch(t=>{e&&f(String(t))}).finally(()=>{e&&b(!1)}),()=>{e=!1}},[o,t,s]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-3",children:[(0,r.jsx)(j.A,{size:"small",className:"min-w-64",value:o,onChange:i,options:t.map((e,t)=>({value:t,label:e}))}),(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:"显示实际库内实体与块实例;绘制限制不等同数据丢失。"})]}),(0,r.jsxs)(v.A,{spinning:y,children:[p&&(0,r.jsx)(m.A,{type:"warning",message:"图框显示未完成",description:"".concat(p,";请区分已入库结构和绘制能力,已有库内文字仍可读取。")}),d?(0,r.jsx)(R,{zoom:l,viewportRef:c,children:(0,r.jsx)("div",{className:"bg-white inline-block p-2",children:(0,r.jsx)(n(),{unoptimized:!0,width:2400,height:1800,src:d,alt:"已解析CAD图框",style:{width:"100%",height:"auto",display:"block"}})})}):!y&&!p&&(0,r.jsx)(g.A,{description:"尚未识别到可显示图框"}),void 0!==h&&(0,r.jsxs)("details",{className:"mt-3",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"本次绘制回执与限制"}),(0,r.jsx)(z,{maxHeight:260,children:(0,r.jsx)("pre",{style:T,children:JSON.stringify(h,null,2)})})]})]})]})}function E(e){let{structure:t,endpoint:s,zoom:l,viewportRef:c}=e,[o,i]=(0,a.useState)(0);if(t.spreadsheet){let e=t.spreadsheet.sheets;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(j.A,{size:"small",className:"min-w-64",value:o,options:e.map((e,t)=>({value:t,label:e.name})),onChange:i})}),e[o]&&(0,r.jsx)(F,{sheet:e[o],zoom:l,viewportRef:c},o)]})}if(t.docx)return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(R,{zoom:l,viewportRef:c,children:(0,r.jsxs)("div",{className:"mx-auto",style:{maxWidth:860},children:[t.docx.blocks.map(e=>(0,r.jsxs)("div",{id:e.id,className:"mb-4",children:[(0,r.jsxs)("div",{className:"mb-1 text-[10px] text-[var(--colorTextTertiary)]",children:[e.part," \xb7 第 ",e.index+1," 块"]}),"table"===e.kind?(0,r.jsx)(I,{block:e,parts:t.docx.parts}):(0,r.jsx)("p",{className:e.headingLevel?"font-semibold text-lg whitespace-pre-wrap mt-2":"whitespace-pre-wrap leading-8 text-sm",children:e.text}),(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextTertiary)]",children:"来源 XML"}),(0,r.jsx)(z,{maxHeight:260,children:(0,r.jsx)("pre",{style:T,children:e.xml})})]})]},e.id)),t.docx.images.map(e=>(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("div",{className:"mb-1 text-xs text-[var(--colorTextSecondary)]",children:e.name}),/^image\/(?:png|jpeg|gif|webp|svg\+xml|bmp)$/u.test(e.mediaType)?(0,r.jsx)(n(),{unoptimized:!0,width:1200,height:900,src:"".concat(s,"&image=").concat(encodeURIComponent(e.name)),alt:e.name,style:{maxWidth:"100%",height:"auto"}}):(0,r.jsx)(m.A,{type:"info",message:"已保留".concat(e.mediaType,"图片数据,浏览器未声明支持显示")})]},e.name))]})})});if(t.pdf){var d,x,h,u;let e=t.pdf.pages,s=e[o],a=null!=(x=null!=(d=null==s?void 0:s.width)?d:null==s?void 0:s.glyphs.reduce((e,t)=>Math.max(e,t.x+t.width+20),600))?x:600,n=null!=(u=null!=(h=null==s?void 0:s.height)?h:null==s?void 0:s.glyphs.reduce((e,t)=>Math.max(e,t.y+t.height+20),800))?u:800;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:"显示库内已保存文字与位置;可选原版本对照不影响本页及后续生成。"}),(0,r.jsx)(p.A,{size:"small",current:o+1,pageSize:1,total:e.length,showSizeChanger:!1,onChange:e=>i(e-1)})]}),s&&(0,r.jsxs)(R,{zoom:l,viewportRef:c,children:[(0,r.jsx)("div",{className:"mx-auto bg-white shadow-sm border border-[var(--borderColor)]",style:{width:a},children:(0,r.jsx)("svg",{viewBox:"0 0 ".concat(a," ").concat(n),width:"100%",role:"img","aria-label":"解析第".concat(s.page,"页"),children:s.glyphs.map(e=>(0,r.jsx)("text",{x:e.x,y:n-e.y,fontSize:Math.max(6,e.height),children:e.str},e.id))})}),s.ocrText&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("div",{className:"mb-1 text-xs text-[var(--colorTextSecondary)]",children:"该页 OCR 文本"}),(0,r.jsx)(z,{maxHeight:260,children:(0,r.jsx)("pre",{style:T,children:s.ocrText})})]}),!s.glyphs.length&&!s.ocrText&&(0,r.jsx)(g.A,{description:"该页没有可展示文字,不能据此断言原页为空"})]})]})}return t.cad?(0,r.jsx)(O,{frameIds:t.cad.frameIds,endpoint:s,zoom:l,viewportRef:c}):(0,r.jsx)(g.A,{description:"此解析结果尚无结构显示适配,完整解析文字仍可查看"})}function P(e){let{data:t}=e,s=t.conservation,a=[{key:"chars",label:"文本覆盖",value:"".concat(s.coveredNonWhitespaceChars," / ").concat(s.sourceNonWhitespaceChars," 个非空白字符"),trouble:s.coveredNonWhitespaceChars!==s.sourceNonWhitespaceChars,...s.uncovered.length?{detail:(0,r.jsxs)(r.Fragment,{children:[s.uncovered.slice(0,5).map((e,t)=>(0,r.jsxs)("div",{className:"mb-1",children:["字符 ",e.start,"–",e.end,":",e.text.slice(0,120)]},t)),s.uncovered.length>5?(0,r.jsxs)("div",{children:["…还有 ",s.uncovered.length-5," 段"]}):null]})}:{}},{key:"chunks",label:"切片数",value:"".concat(t.totalChunks," 块(库内登记 ").concat(s.registeredChunkCount,",与底稿一致:").concat(s.chunkCountMatches?"是":"否",")"),trouble:!s.chunkCountMatches},{key:"stale",label:"身份过期的切片",value:s.staleChunkIdentities.length?"".concat(s.staleChunkIdentities.length," 块"):"无",trouble:s.staleChunkIdentities.length>0,...s.staleChunkIdentities.length?{detail:(0,r.jsxs)("div",{children:["切片序号:",s.staleChunkIdentities.slice(0,20).join(", "),s.staleChunkIdentities.length>20?" …":""]})}:{}},{key:"unmapped",label:"未能映射回底稿的切片",value:s.unmapped.length?"".concat(s.unmapped.length," 块"):"无",trouble:s.unmapped.length>0,...s.unmapped.length?{detail:(0,r.jsxs)(r.Fragment,{children:[s.unmapped.slice(0,5).map(e=>(0,r.jsxs)("div",{className:"mb-1",children:["切片 ",e.chunkIndex,":",e.text.slice(0,120)]},e.chunkIndex)),s.unmapped.length>5?(0,r.jsxs)("div",{children:["…还有 ",s.unmapped.length-5," 块"]}):null]})}:{}},{key:"order",label:"切片顺序",value:s.outOfOrderChunks.length?"乱序 ".concat(s.outOfOrderChunks.length," 块"):"与底稿一致",trouble:s.outOfOrderChunks.length>0,...s.outOfOrderChunks.length?{detail:(0,r.jsxs)("div",{children:["切片序号:",s.outOfOrderChunks.slice(0,20).join(", ")]})}:{}},{key:"repeated",label:"重复上下文跨度",value:"".concat(s.repeatedContextSpans," 处"),trouble:!1}];return(0,r.jsx)("div",{className:"flex flex-col",children:a.map(e=>(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-1 sm:gap-3 py-2 border-b border-[var(--colorBorderSecondary)] last:border-0",children:[(0,r.jsx)("div",{className:"sm:w-44 shrink-0 text-xs text-[var(--colorTextTertiary)] sm:pt-0.5",children:e.label}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 text-sm",children:[(0,r.jsx)("span",{className:e.trouble?"text-[var(--colorError)]":"text-[var(--colorText)]",children:e.value}),e.detail&&(0,r.jsxs)("details",{className:"mt-1",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"展开明细"}),(0,r.jsx)(z,{maxHeight:220,children:(0,r.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:e.detail})})]})]})]},e.key))})}function _(){let e=(0,i.useRouter)(),t="string"==typeof e.query.relativePath?e.query.relativePath:"",s="string"==typeof e.query.projectRoot?e.query.projectRoot:"",[l,n]=(0,a.useState)(),[c,x]=(0,a.useState)(""),[u,j]=(0,a.useState)(!1),[w,C]=(0,a.useState)(1),[R,I]=(0,a.useState)("structure"),F=(0,a.useRef)(null),O=(0,a.useRef)(0),_=new URLSearchParams({relativePath:t,...s?{projectRoot:s}:{}}),W="/api/kb/files/source-preview?".concat(_),H="".concat(W).concat((null==l?void 0:l.status)==="recorded"?"&snapshotId=".concat(l.identity.snapshotId):""),B=(0,a.useCallback)(async e=>{let t=++O.current;j(!0),x("");try{let s=await (0,A.x6)(e);t===O.current&&n(s)}catch(e){t===O.current&&x(e instanceof Error?e.message:String(e))}finally{t===O.current&&j(!1)}},[]);(0,a.useEffect)(()=>{n(void 0),t&&B(W)},[t,W,B]);let D=null==l?void 0:l.pdfCoverage,q=D&&"complete"!==D.status?(0,r.jsx)(m.A,{showIcon:!0,type:"warning",message:"unmeasured"===D.status?"PDF 页覆盖未记录":"PDF 页覆盖不完整",description:(0,r.jsxs)(d.A,{direction:"vertical",size:2,children:[D.pageCount?(0,r.jsx)("span",{children:"已处理页:".concat(D.processedPages,"/").concat(D.pageCount)}):(0,r.jsx)("span",{children:'没有记录到声明页数,无法据此断言"处理了几页"。'}),D.missingPages.length>0&&(0,r.jsx)("span",{children:"缺少页:".concat(D.missingPages.join(", "))}),D.failedPages.length>0&&(0,r.jsx)("span",{children:"失败页:".concat(D.failedPages.join(", "))}),(0,r.jsx)("span",{children:"这条读数只说明解析侧处理了哪些页,不证明内容、版式或专业采用正确。"})]})}):null;return(0,r.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,r.jsx)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl border border-[var(--borderColor)] p-6",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center min-w-0",children:[(0,r.jsxs)(o(),{href:"/knowledge/file-detail?".concat(_),className:"mr-4 text-sm text-[var(--colorTextSecondary)] hover:text-[var(--colorText)] inline-flex items-center gap-1 shrink-0",children:[(0,r.jsx)(k.A,{})," 返回切片详情"]}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-[var(--colorText)] mb-1",children:"解析核查预览"}),(0,r.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0 break-all",children:t})]})]}),(0,r.jsxs)(d.A,{wrap:!0,className:"shrink-0",children:["structure"===R&&(0,r.jsx)(M,{zoom:w,onChange:C,viewportRef:F}),(0,r.jsx)(h.Ay,{size:"small",icon:(0,r.jsx)(S.A,{}),onClick:()=>{B(W)},loading:u,children:"刷新"})]})]})}),c&&(0,r.jsx)(m.A,{type:"error",message:c}),(0,r.jsx)(v.A,{spinning:u,children:(null==l?void 0:l.status)==="not-recorded"?(0,r.jsxs)(f.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,r.jsx)(m.A,{type:"warning",message:"独立解析底稿尚未记录",description:l.reason}),q&&(0,r.jsx)("div",{className:"mt-3",children:q}),(0,r.jsx)(h.Ay,{className:"mt-4",onClick:()=>{(async()=>{try{await (0,A.HC)(t,s||void 0),x("重新解析任务已提交,请在处理完成后刷新本页。")}catch(e){x(String(e))}})()},children:"重新解析此文件"}),(0,r.jsx)("p",{className:"mt-4 mb-2 text-sm text-[var(--colorTextSecondary)]",children:"当前实际库内切片(不是独立底稿):"}),l.chunks.map(e=>(0,r.jsxs)("div",{className:"my-3",children:[(0,r.jsxs)(y.A,{children:["切片 ",e.chunkIndex]}),(0,r.jsx)(z,{children:(0,r.jsx)("pre",{style:T,children:e.content})})]},e.id)),(0,r.jsx)("div",{className:"mt-3 flex justify-end",children:(0,r.jsx)(p.A,{current:Math.floor(l.offset/30)+1,pageSize:30,total:l.totalChunks,showSizeChanger:!1,onChange:e=>{B("".concat(W,"&offset=").concat((e-1)*30))}})})]}):(null==l?void 0:l.status)==="recorded"?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(f.A,{className:"rounded-2xl border-[var(--borderColor)] mb-5",children:[(0,r.jsx)(m.A,{className:"mb-4",type:"verified"===l.conservation.status&&l.conservation.chunkCountMatches&&!l.conservation.staleChunkIdentities.length?"success":"error",message:"文本覆盖:".concat(l.conservation.coveredNonWhitespaceChars,"/").concat(l.conservation.sourceNonWhitespaceChars,";实际切片:").concat(l.totalChunks),description:"这项检查只证明独立解析文字与切片的内容覆盖,不证明原文件解析、版式、工程理解或专业采用全部正确。"}),(0,r.jsx)(P,{data:l}),q&&(0,r.jsx)("div",{className:"mt-3",children:q}),l.identity.limitations.map(e=>(0,r.jsx)("p",{className:"mt-2 mb-0 text-xs text-[var(--colorTextSecondary)]",children:e},e)),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[(0,r.jsx)(h.Ay,{size:"small",href:"".concat(H,"&original=1"),target:"_blank",children:"查看/下载入库原版本"}),(0,r.jsx)(h.Ay,{size:"small",onClick:()=>{(0,A.tn)(t,"source-version",s||void 0).catch(e=>x("可选原版本对照不可用:".concat(String(e),";库内数据仍可读取")))},children:"本机打开入库原版本"})]}),(0,r.jsxs)("details",{className:"mt-4",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"技术详情(原文件哈希 / 解析版本 / 解析身份 / 核查口径)"}),(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsxs)(b.A,{size:"small",column:{xxl:3,xl:3,lg:2,md:1,sm:1,xs:1},bordered:!0,styles:{label:{width:"120px",background:"var(--colorFillAlter)",color:"var(--colorTextSecondary)"}},children:[(0,r.jsx)(b.A.Item,{label:"原文件SHA256",children:(0,r.jsx)("span",{className:"break-all text-xs",children:l.identity.sourceHash})}),(0,r.jsx)(b.A.Item,{label:"解析版本",children:(0,r.jsx)("span",{className:"text-xs",children:l.identity.parserVersion})}),(0,r.jsx)(b.A.Item,{label:"解析身份",children:(0,r.jsx)("span",{className:"break-all text-xs",children:l.identity.snapshotId})}),(0,r.jsx)(b.A.Item,{label:"核查口径",children:(0,r.jsxs)("span",{className:"text-xs",children:[l.conservation.version," \xb7 ",l.conservation.scope," \xb7 入库状态 ",l.conservation.ingestionStatus]})}),(0,r.jsx)(b.A.Item,{label:"底稿快照",children:(0,r.jsx)("span",{className:"break-all text-xs",children:l.conservation.snapshotId})})]})})]})]}),(0,r.jsx)(N.A,{className:"documents-tabs",activeKey:R,onChange:I,items:[{key:"structure",label:"解析结构",children:(0,r.jsx)(f.A,{className:"rounded-2xl border-[var(--borderColor)]",onWheelCapture:e=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),C(t=>Math.min(4,Math.max(.2,Math.round((t-.1*Math.sign(e.deltaY))*100)/100))))},children:(0,r.jsx)(E,{structure:l.structure,endpoint:H,zoom:w,viewportRef:F},l.identity.snapshotId)})},{key:"chunks",label:"实际切片重组",children:(0,r.jsxs)(f.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,r.jsxs)("p",{className:"text-xs text-[var(--colorTextSecondary)]",children:["当前展示切片 ",l.offset+1," 至 ",l.offset+l.chunks.length,",共 ",l.totalChunks," 块;分页不代表其余内容不存在。"]}),l.chunks.map(e=>(0,r.jsxs)("div",{className:"my-4",children:[(0,r.jsxs)(d.A,{size:4,wrap:!0,children:[(0,r.jsxs)(y.A,{children:["切片 ",e.chunkIndex]}),e.sectionTitle?(0,r.jsx)(y.A,{color:"cyan",children:e.sectionTitle}):null]}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(z,{children:(0,r.jsx)("pre",{style:T,children:e.content})})}),(0,r.jsxs)("details",{className:"mt-2",children:[(0,r.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextTertiary)]",children:"库内解析底稿区间"}),(0,r.jsx)(z,{maxHeight:240,children:(0,r.jsx)("pre",{style:T,children:JSON.stringify(e.sourceSpans,null,2)})})]})]},e.id)),(0,r.jsx)("div",{className:"mt-3 flex justify-end",children:(0,r.jsx)(p.A,{current:Math.floor(l.offset/30)+1,pageSize:30,total:l.totalChunks,showSizeChanger:!1,onChange:e=>{B("".concat(H,"&offset=").concat((e-1)*30))}})})]})}]})]}):!u&&(0,r.jsx)(g.A,{description:"选择文件后查看解析结果"})})]})}},59528:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/source-preview",function(){return s(2232)}])}},e=>{e.O(0,[324,280,665,569,499,787,808,318,781,636,593,792],()=>e(e.s=59528)),_N_E=e.O()}]);