memory-eternal 0.10.54 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.en.md +25 -10
- package/README.md +25 -10
- package/assets/icon.png +0 -0
- package/index.js +15 -0
- package/lib/api.js +25 -0
- package/lib/client.js +376 -21
- package/lib/web.js +16 -0
- package/package.json +3 -1
- package/web/app.js +383 -28
- package/web/icon.png +0 -0
- package/web/support/group-qr.jpg +0 -0
- package/web/support/wechat-pay.jpg +0 -0
- package/web/support/wechat-reward.jpg +0 -0
package/lib/client.js
CHANGED
|
@@ -3,17 +3,17 @@ window.__ModuleLoader__.load({
|
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
|
-
var
|
|
7
|
-
`),
|
|
8
|
-
`)){let
|
|
9
|
-
`)).body;if(!
|
|
10
|
-
`)){let
|
|
11
|
-
`)}function Ut(t,i,s=48){if(!i||!t)return"";let u=String(t),p=u.toLowerCase(),r=String(i).toLowerCase();if(!r)return"";let v=p.indexOf(r);if(v<0)return"";let D=Math.max(0,v-s),N=Math.min(u.length,v+r.length+s),j=u.slice(D,N).replace(/\s+/g," ").trim();return(D>0?"\u2026":"")+j+(N<u.length?"\u2026":"")}function Kt({hasVersion:t=!1,hostVersion:i="",onDisk:s="",residentServed:u="",residentPresent:p=!1,residentManaged:r=null,residentManagedKnown:v=null,residentManagedBy:D="",replaceBlocked:N=null}={}){let j=String(s||""),C=String(i||""),k=String(u||""),m=!!(t&&p&&!k),B=!!(j&&k&&k!==j),P=r===!1&&v===!1,S=D==="host",I=r===!1&&!P&&!S,A=!!(C&&j&&C!==j),_=!!(N&&N.fresh),te=B||m||I||P,de=null;A?de="hostProcessStale":m?de="residentDown":_?de="residentReplaceBlocked":P?de="residentLockUnknown":I&&(de="residentUnmanaged");let G;return m?G="restartStart":B?G="restartFixes":I||P?G="restartRepair":A?G="restartHostOnly":G="restartAnyway",{showButton:!!t,emphasis:te,warn:de,hint:G,hostStale:A,residentDown:m,residentStale:B,residentUnmanaged:I,residentLockUnknown:P,residentHostManaged:S,needsRestart:te}}function Vt(t={}){let i=t.repo||"EternalNight996/memory-eternal",s=String(t.title||"[Bug] ").slice(0,120),u=Array.isArray(t.labels)?t.labels:["bug"],p=Number(t.maxLength)>500?Number(t.maxLength):7e3,r=N=>{let j=new URLSearchParams;return j.set("title",s),j.set("body",N),u.length&&j.set("labels",u.join(",")),"https://github.com/"+i+"/issues/new?"+j.toString()},v=String(t.body||""),D=r(v);if(D.length>p){let N=`
|
|
12
|
-
|
|
13
|
-
> \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,
|
|
14
|
-
`)}var
|
|
15
|
-
`),
|
|
16
|
-
`);function Yt(t={}){let i=t.lang==="en"?"en":"zh",s=i==="en"?wa:ka,u=t.repo||"EternalNight996/memory-eternal";return s=s.split(Lt).join("https://github.com/"+u),t.description&&(s=s.replace(i==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(s=s.replace(i==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),s}function Gt({panX:t=0,panY:i=0,zoom:s=1,w:u=0,h:p=0,margin:r=60}={}){let v=s||1;return{x0:(0-t)/v-r,y0:(0-i)/v-r,x1:(u-t)/v+r,y1:(p-i)/v+r}}function Tt(t,i,s,u){return u?t+s>=u.x0&&t-s<=u.x1&&i+s>=u.y0&&i-s<=u.y1:!0}function Xt(t){let i=Number(t)||0;return i<=120?1/0:i<=300?160:i<=600?90:60}function Jt(t,i={}){let s=Number.isFinite(i.limit)?i.limit:1/0,u=new Set,p=N=>{N&&u.size<s&&u.add(N)};if(p(i.focusId),p(i.hoverId),i.searchHits)for(let N of i.searchHits){if(u.size>=s)break;u.add(N)}let r=i.degree||{},v=N=>Number(r[N])||0,D=[];for(let N of Array.isArray(t)?t:[])N&&N.id&&!u.has(N.id)&&D.push(N);D.sort((N,j)=>v(j.id)-v(N.id));for(let N of D){if(u.size>=s)break;u.add(N.id)}return u}function Sa(t,i){if(t===i)return!0;if(t===null||i===null||t===void 0||i===void 0||typeof t!="object"&&typeof i!="object")return t===i;try{return JSON.stringify(t)===JSON.stringify(i)}catch{return!1}}function Zt(t,i){let s={...t||{}},u={};for(let[p,r]of Object.entries(i||{}))Sa(t?t[p]:void 0,r)||(s[p]=r,u[p]=r);return{values:s,overlay:u}}var e=require("react/jsx-runtime"),pt="memory-eternal",$="/memory-eternal/api",Ca=100,Na=["slots","locale"],ta={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",cardsTab:"\u77E5\u8BC6\u5361",graphTab:"\u77E5\u8BC6\u56FE\u8C31",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u7528\u91CF/\u4ECA\u65E5",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",tabAudit:"\u5BA1\u6838\u4E2D\u5FC3",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
6
|
+
var ha=Object.create;var It=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var va=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty;var ka=(t,a)=>{for(var i in a)It(t,i,{get:a[i],enumerable:!0})},Jt=(t,a,i,g)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of va(a))!wa.call(t,c)&&c!==i&&It(t,c,{get:()=>a[c],enumerable:!(g=ya(a,c))||g.enumerable});return t};var Sa=(t,a,i)=>(i=t!=null?ha(xa(t)):{},Jt(a||!t||!t.__esModule?It(i,"default",{value:t,enumerable:!0}):i,t)),Ca=t=>Jt(It({},"__esModule",{value:!0}),t);var ln={};ka(ln,{EN:()=>ca,MemoryLibrary:()=>Ga,ZH:()=>da,apply:()=>Ea,inject:()=>Pa});module.exports=Ca(ln);var o=Sa(require("react"),1);var Na={"&":"&","<":"<",">":">"},Ot=t=>String(t).replace(/[&<>]/g,a=>Na[a]),Ma=[[/结论|总结|tl;?dr|summary|takeaway/i,"\u2705","ok"],[/风险|注意|警告|禁止|坑|踩坑|务必/i,"\u26A0\uFE0F","warn"],[/根因|原因|为什么|定位|复现/i,"\u{1F50D}","info"],[/修复|解决|变更|fix/i,"\u{1F527}","ok"],[/验证|测试|实测|回归/i,"\u{1F9EA}","ok"],[/方案|做法|实现|设计|思路|架构/i,"\u{1F6E0}\uFE0F","plan"],[/步骤|流程|操作|用法|命令/i,"\u{1F9E9}","plan"],[/背景|由来|context/i,"\u{1F9ED}","info"],[/目标|需求|要解决/i,"\u{1F3AF}","plan"],[/环境|依赖|前置|安装/i,"\u{1F4E6}","info"],[/收益|效果|性能|指标|数据|统计/i,"\u{1F4C8}","ok"],[/示例|例子|样例|demo/i,"\u{1F4A1}","idea"],[/参考|链接|相关/i,"\u{1F517}","info"]],Ta=["\u2728","info"],Ra=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],za=t=>{let a=String(t);for(let[i,g,c]of Ma)if(i.test(a))return[g,c];return Ta},Da=t=>{let a=t.join(" ");for(let[i,g,c]of Ra)if(i.test(a))return[g,c];return["\u{1F4CC}","info"]};function wt(t){let a=String(t),i=/^([^::\s]{1,8})[::]\s*(.+)$/.exec(a);if(i&&!/[是为有了吗呢着过把被和与或于]/.test(i[1]))return'<span class="md-kv"><span class="md-k">'+Ot(i[1])+'</span><span class="md-v">'+wt(i[2])+"</span></span>";let g=Ot(a);return g=g.replace(/^\[([ xX])\](?=\s|$)\s*/,(c,s)=>'<span class="md-task">'+(s.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),g=g.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),g=g.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),g=g.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),g=g.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(c,s,h)=>/^(https?:|\/|#)/i.test(h)?'<a class="md-link" href="'+h+'" target="_blank" rel="noopener noreferrer">'+s+"</a>":s),g}function jt(t){let a=String(t||"").replace(/\r\n?/g,`
|
|
7
|
+
`),i=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!i)return{meta:[],body:a};let g=[];for(let c of i[1].split(`
|
|
8
|
+
`)){let s=c.indexOf(":");if(s<=0)continue;let h=c.slice(0,s).trim(),k=c.slice(s+1).trim().replace(/^["']|["']$/g,"");h&&g.push([h,k])}return{meta:g,body:a.slice(i[0].length)}}function Xt(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function Wt(t){let a=jt(String(t||"").replace(/\r\n?/g,`
|
|
9
|
+
`)).body;if(!a.trim())return"";let i=[],g=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(z,N,P)=>(i.push('<pre class="md-pre"><code>'+Ot(P.replace(/\n$/,""))+"</code></pre>"),"\0F"+(i.length-1)+"\0")),c=[],s=0,h=[],k=null,S=null,L=()=>{h.length&&(c.push('<p class="md-p">'+h.join("<br/>")+"</p>"),h=[])},M=()=>{if(!k)return;let z=k.type;c.push("<"+z+' class="md-'+z+'">'+k.items.map(N=>"<li>"+N+"</li>").join("")+"</"+z+">"),k=null},x=()=>{if(!S)return;let[z,N]=Da(S);c.push('<div class="md-callout md-c-'+N+'"><span class="md-ico">'+z+"</span>"+S.join("<br/>")+"</div>"),S=null},m=()=>{L(),M(),x()};for(let z of g.split(`
|
|
10
|
+
`)){let N=z.trim();if(!N){m();continue}let P=/^\u0000F(\d+)\u0000$/.exec(N);if(P){m(),c.push(i[Number(P[1])]);continue}let T;if(T=/^(#{1,6})\s+(.+)$/.exec(N)){m();let[E,K]=za(T[2]);s++,c.push('<div id="md-h-'+s+'" class="md-h md-h-'+(T[1].length<=2?"h1":"h2")+" md-c-"+K+'"><span class="md-ico">'+E+'</span><span class="md-hx">'+wt(T[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(N)){m(),c.push('<hr class="md-hr"/>');continue}if(T=/^>\s?(.*)$/.exec(N)){L(),M(),S=S||[],S.push(wt(T[1]));continue}if(T=/^[-*+]\s+(.+)$/.exec(N)){L(),x(),(!k||k.type!=="ul")&&(M(),k={type:"ul",items:[]}),k.items.push(wt(T[1]));continue}if(T=/^\d+[.)]\s+(.+)$/.exec(N)){L(),x(),(!k||k.type!=="ol")&&(M(),k={type:"ol",items:[]}),k.items.push(wt(T[1]));continue}M(),x(),h.push(wt(N))}return m(),c.join(`
|
|
11
|
+
`)}var Pt="data:image/png;base64,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";function Zt(t,a,i=48){if(!a||!t)return"";let g=String(t),c=g.toLowerCase(),s=String(a).toLowerCase();if(!s)return"";let h=c.indexOf(s);if(h<0)return"";let k=Math.max(0,h-i),S=Math.min(g.length,h+s.length+i),L=g.slice(k,S).replace(/\s+/g," ").trim();return(k>0?"\u2026":"")+L+(S<g.length?"\u2026":"")}function Qt({hasVersion:t=!1,hostVersion:a="",onDisk:i="",residentServed:g="",residentPresent:c=!1,residentManaged:s=null,residentManagedKnown:h=null,residentManagedBy:k="",replaceBlocked:S=null}={}){let L=String(i||""),M=String(a||""),x=String(g||""),m=!!(t&&c&&!x),z=!!(L&&x&&x!==L),N=s===!1&&h===!1,P=k==="host",T=s===!1&&!N&&!P,E=!!(M&&L&&M!==L),K=!!(S&&S.fresh),se=z||m||T||N,V=null;E?V="hostProcessStale":m?V="residentDown":K?V="residentReplaceBlocked":N?V="residentLockUnknown":T&&(V="residentUnmanaged");let Z;return m?Z="restartStart":z?Z="restartFixes":T||N?Z="restartRepair":E?Z="restartHostOnly":Z="restartAnyway",{showButton:!!t,emphasis:se,warn:V,hint:Z,hostStale:E,residentDown:m,residentStale:z,residentUnmanaged:T,residentLockUnknown:N,residentHostManaged:P,needsRestart:se}}function ea(t={}){let a=t.repo||"EternalNight996/memory-eternal",i=String(t.title||"[Bug] ").slice(0,120),g=Array.isArray(t.labels)?t.labels:["bug"],c=Number(t.maxLength)>500?Number(t.maxLength):7e3,s=S=>{let L=new URLSearchParams;return L.set("title",i),L.set("body",S),g.length&&L.set("labels",g.join(",")),"https://github.com/"+a+"/issues/new?"+L.toString()},h=String(t.body||""),k=s(h);if(k.length>c){let S=`
|
|
12
|
+
|
|
13
|
+
> \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,L=M=>s(h.slice(0,M)+S);if(L(0).length>c)h=S;else{let M=0,x=h.length;for(;M<x;){let m=Math.ceil((M+x)/2);L(m).length<=c?M=m:x=m-1}h=h.slice(0,M)+S}k=s(h)}return k}function ta(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
|
|
14
|
+
`)}var $t="https://github.com/EternalNight996/memory-eternal",Ba=["\u6211\u5728\u4F7F\u7528 memory-eternal\uFF08DeepSeek Harness \u7684\u8BB0\u5FC6\u63D2\u4EF6\uFF09\u65F6\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u4F60\u5E2E\u6211\u628A\u8FD9\u4E2A\u95EE\u9898\u63D0\u4EA4\u5230 GitHub\u3002","","\u4ED3\u5E93\uFF1A"+$t,"","\u8BF7\u6309\u8FD9\u4E2A\u6D41\u7A0B\u505A\uFF1A","","1. \u5148\u8DD1 `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50`\uFF0C\u770B\u662F\u5426\u5DF2\u6709\u76F8\u540C\u95EE\u9898\uFF1A"," - \u5DF2\u6709 \u2192 \u7528 `gh issue comment <\u7F16\u53F7> --body-file <\u6587\u4EF6>` \u8865\u5145\u73B0\u8C61\uFF0C\u4E0D\u8981\u91CD\u590D\u5F00\u65B0 issue\uFF1B"," - \u6CA1\u6709 \u2192 \u7EE7\u7EED\u7B2C 2 \u6B65\u3002",'2. \u628A\u6B63\u6587\u5199\u6210\u6587\u4EF6\uFF0C\u7136\u540E `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <\u4E00\u53E5\u8BDD\u6982\u62EC>" --body-file <\u6587\u4EF6>`\uFF1B\u6B63\u6587\u7528\u8FD9\u4E2A\u7ED3\u6784\uFF1A'," \u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A / \u5B9E\u9645\u884C\u4E3A / \u73AF\u5883\uFF08\u63D2\u4EF6\u7248\u672C / DSH \u7248\u672C / \u64CD\u4F5C\u7CFB\u7EDF / Node\uFF09/ \u8BCA\u65AD\u4FE1\u606F\u3002","3. \u5982\u679C `gh` \u6CA1\u767B\u5F55\u6216\u4E0D\u53EF\u7528\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u6539\u4E3A\u8F93\u51FA\u4E00\u6761\u300C\u6807\u9898\u4E0E\u6B63\u6587\u90FD\u5DF2\u9884\u586B\u300D\u7684 GitHub \u65B0\u5EFA issue \u94FE\u63A5\u7ED9\u6211\uFF0C\u6211\u81EA\u5DF1\u70B9\u63D0\u4EA4\u3002","4. \u63D0\u4EA4\u6210\u529F\u540E\uFF0C\u628A issue \u94FE\u63A5\u53D1\u7ED9\u6211\u3002","","\u6CE8\u610F\uFF1A\u6211\u7684\u95EE\u9898\u63CF\u8FF0\u8BF7\u539F\u6837\u7167\u5F55\uFF0C\u4E0D\u8981\u66FF\u6211\u7F8E\u5316\u6216\u7701\u7565\u7EC6\u8282\uFF1B\u8BCA\u65AD\u4FE1\u606F\u539F\u6837\u653E\u8FDB\u300C\u8BCA\u65AD\u4FE1\u606F\u300D\u4E00\u8282\u3002","","\u6211\u7684\u95EE\u9898\u63CF\u8FF0\uFF1A","<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>","","\u8BCA\u65AD\u4FE1\u606F\uFF1A","<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>"].join(`
|
|
15
|
+
`),Aa=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+$t,"","Workflow:","","1. Run `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50` first: if a matching issue exists, add a comment with `gh issue comment <n> --body-file <file>` instead of opening a duplicate.",'2. Otherwise create it with `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <one-line summary>" --body-file <file>`, using sections: Symptoms / Steps to reproduce / Expected / Actual / Environment (plugin, DSH, OS, Node) / Diagnostics.',"3. If `gh` is not authenticated or unavailable, do NOT try to submit: output a GitHub new-issue link with the title and body pre-filled instead, and I will click submit myself.","4. Report the resulting issue URL back to me.","","Keep my description verbatim - do not rewrite or summarise it. Put the diagnostics under the Diagnostics section as-is.","","My description:","<write your problem here>","","Diagnostics:","<paste the diagnostics copied from the in-app Report-a-bug dialog>"].join(`
|
|
16
|
+
`);function aa(t={}){let a=t.lang==="en"?"en":"zh",i=a==="en"?Aa:Ba,g=t.repo||"EternalNight996/memory-eternal";return i=i.split($t).join("https://github.com/"+g),t.description&&(i=i.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(i=i.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),i}function na({panX:t=0,panY:a=0,zoom:i=1,w:g=0,h:c=0,margin:s=60}={}){let h=i||1;return{x0:(0-t)/h-s,y0:(0-a)/h-s,x1:(g-t)/h+s,y1:(c-a)/h+s}}function Ft(t,a,i,g){return g?t+i>=g.x0&&t-i<=g.x1&&a+i>=g.y0&&a-i<=g.y1:!0}function oa(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function ia(t,a={}){let i=Number.isFinite(a.limit)?a.limit:1/0,g=new Set,c=S=>{S&&g.size<i&&g.add(S)};if(c(a.focusId),c(a.hoverId),a.searchHits)for(let S of a.searchHits){if(g.size>=i)break;g.add(S)}let s=a.degree||{},h=S=>Number(s[S])||0,k=[];for(let S of Array.isArray(t)?t:[])S&&S.id&&!g.has(S.id)&&k.push(S);k.sort((S,L)=>h(L.id)-h(S.id));for(let S of k){if(g.size>=i)break;g.add(S.id)}return g}function Ia(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function ra(t,a){let i={...t||{}},g={};for(let[c,s]of Object.entries(a||{}))Ia(t?t[c]:void 0,s)||(i[c]=s,g[c]=s);return{values:i,overlay:g}}var e=require("react/jsx-runtime"),kt="memory-eternal",$="/memory-eternal/api";async function Kt(t){try{let a=await fetch(`${$}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),i=await a.json().catch(()=>null);if(a.ok&&i&&i.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var ja=100,Pa=["slots","locale"],da={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",cardsTab:"\u77E5\u8BC6\u5361",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
17
17
|
|
|
18
18
|
## \u80CC\u666F
|
|
19
19
|
- \u95EE\u9898\u63CF\u8FF0
|
|
@@ -58,7 +58,7 @@ var sa=Object.create;var Rt=Object.defineProperty;var la=Object.getOwnPropertyDe
|
|
|
58
58
|
-
|
|
59
59
|
|
|
60
60
|
## \u98CE\u9669/\u963B\u585E
|
|
61
|
-
- `},aa={nav:"Memory",loading:"Loading\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",cardsTab:"Cards",graphTab:"Graph",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Usage / Today",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",tabAudit:"Audit Center",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
|
|
61
|
+
- `},ca={nav:"Memory",loading:"Loading\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",cardsTab:"Cards",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
|
|
62
62
|
|
|
63
63
|
## Background
|
|
64
64
|
- Problem
|
|
@@ -103,7 +103,7 @@ Option A, because:
|
|
|
103
103
|
-
|
|
104
104
|
|
|
105
105
|
## Risks/blockers
|
|
106
|
-
- `},
|
|
106
|
+
- `},qt=["all","project","knowledge","content","prompt","business","tool","mistake"],_e={project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},_t=t=>Array.isArray(t&&t.tags)?t.tags:[],gt={project:"\u{1F4C1}",knowledge:"\u{1F4DA}",content:"\u{1F4DD}",prompt:"\u{1F4AC}",business:"\u{1F4BC}",tool:"\u{1F527}",mistake:"\u26A0\uFE0F",other:"\u{1F4CE}"},$e={project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindKnowledge"},Rt="deepseek-harness",ut=t=>{let a=String(t||""),i=a.toLowerCase();return!a||a==="agent"||a==="unknown"||a.startsWith("session:")||i.startsWith("claude-code")?i.startsWith("claude-code")?"claude":Rt:i==="deepseek harness"?Rt:a.split(":")[0]||Rt},Fa=[Rt,"claude","codex","cursor","codex-desktop"],pa=(t=[])=>[...new Set([...Fa,...(t||[]).map(ut)])],Ha={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},Ue=`
|
|
107
107
|
.memory-eternal-root { font-family: inherit; color: var(--dsw-alias-label-primary, #1f2937); }
|
|
108
108
|
.mc-card { background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 14px 16px; }
|
|
109
109
|
.mc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
|
|
@@ -120,7 +120,7 @@ Option A, because:
|
|
|
120
120
|
.mc-tabs { display: inline-flex; gap: 4px; padding: 3px; background: var(--dsw-alias-bg-base, #f3f4f6); border-radius: 999px; }
|
|
121
121
|
.mc-tab { border: 0; background: transparent; color: inherit; border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer; opacity: 0.7; }
|
|
122
122
|
.mc-viewbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
|
|
123
|
-
.mc-rail { width: 54px; flex: none; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding-right: 12px; border-right: 1px solid var(--dsw-alias-border-l1, #e5e7eb); transition: width 0.18s ease; }
|
|
123
|
+
.mc-rail { width: 54px; flex: none; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding-right: 12px; border-right: 1px solid var(--dsw-alias-border-l1, #e5e7eb); transition: width 0.18s ease; overflow-y: auto; }
|
|
124
124
|
.mc-rail.open { width: 150px; }
|
|
125
125
|
.mc-rail-collapse { align-self: flex-start; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: var(--dsw-alias-bg-base, #f3f4f6); color: var(--dsw-alias-label-secondary, #6b7280); border-radius: 8px; width: 26px; height: 26px; line-height: 1; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; }
|
|
126
126
|
.mc-rail-collapse:hover { color: var(--dsw-alias-label-primary, #111); border-color: var(--dsw-alias-brand-primary, #3b82f6); }
|
|
@@ -159,6 +159,139 @@ Option A, because:
|
|
|
159
159
|
.mc-status { display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 999px; font-size: 10px; line-height: 16px; font-weight: 600; color: #fff; vertical-align: middle; }
|
|
160
160
|
.mc-kind { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
|
|
161
161
|
.mc-empty { text-align: center; padding: 40px 10px; opacity: 0.6; font-size: 13px; }
|
|
162
|
+
/* ---- \u5BA1\u6838\u4E2D\u5FC3\uFF1A\u5DE6\u4FA7\u7C7B\u578B\u680F + \u6279\u91CF\u64CD\u4F5C ---- */
|
|
163
|
+
.me-audit { display: block; container-type: inline-size; }
|
|
164
|
+
.me-audit-types-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; width: 100%; padding-bottom: 8px; border-bottom: 1px solid rgba(127,127,127,.12); }
|
|
165
|
+
.me-audit-types-label { padding: 0 5px 0 2px; font-size: 9px; letter-spacing: .14em; opacity: .5; font-weight: 600; text-transform: uppercase; }
|
|
166
|
+
.me-audit-types-top .me-audit-kind { width: auto; padding: 3px 7px; gap: 5px; font-size: 10.5px; border-radius: 6px; }
|
|
167
|
+
.me-audit-types-top .me-audit-kind-name { flex: none; }
|
|
168
|
+
.me-audit-types-top .me-audit-kind-count { min-width: 16px; line-height: 14px; font-size: 9px; }
|
|
169
|
+
.me-audit-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
|
|
170
|
+
.me-audit-filtercard { min-width: 0; }
|
|
171
|
+
.me-audit-kinds { position: sticky; top: 0; width: 150px; flex: 0 0 150px; padding: 10px 8px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; background: var(--dsw-alias-bg-layer-1, #fff); }
|
|
172
|
+
.me-audit-kinds-title { padding: 0 6px 7px; font-size: 10px; letter-spacing: .12em; opacity: .55; font-weight: 600; }
|
|
173
|
+
.me-audit-kind { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 7px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; font-size: 12px; cursor: pointer; text-align: left; }
|
|
174
|
+
.me-audit-kind:hover { background: rgba(127,127,127,.08); }
|
|
175
|
+
.me-audit-kind.active { border-color: rgba(99,102,241,.35); background: rgba(99,102,241,.13); }
|
|
176
|
+
.me-audit-kind-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
|
|
177
|
+
.me-audit-kind-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
178
|
+
.me-audit-kind-count { min-width: 18px; padding: 0 5px; border-radius: 5px; background: rgba(127,127,127,.12); font-size: 10px; line-height: 16px; text-align: center; opacity: .8; font-variant-numeric: tabular-nums; }
|
|
179
|
+
.me-audit-kind-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid; border-radius: 999px; font-size: 10px; line-height: 17px; white-space: nowrap; flex: none; }
|
|
180
|
+
.me-audit-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; }
|
|
181
|
+
.me-audit-queue { flex: 1; min-width: 0; }
|
|
182
|
+
.me-audit-preview { flex: 0 0 500px; width: 500px; position: sticky; top: 0; display: flex; flex-direction: column; max-height: calc(100vh - 130px); overflow: hidden; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; background: var(--dsw-alias-bg-layer-1, #fff); }
|
|
183
|
+
.me-audit-preview-head { flex: none; padding: 13px 14px 10px; border-bottom: 1px solid rgba(127,127,127,.12); }
|
|
184
|
+
.me-audit-preview-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
185
|
+
.me-audit-preview-head h3 { margin: 9px 0 0; font-size: 15px; line-height: 1.45; color: inherit; overflow-wrap: anywhere; }
|
|
186
|
+
.me-audit-preview-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; font-size: 10px; color: var(--dsw-alias-label-secondary, #6b7280); }
|
|
187
|
+
.me-audit-preview-reason { color: #f59e0b; }
|
|
188
|
+
.me-audit-preview-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 14px 16px; }
|
|
189
|
+
.me-audit-preview-body .md-doc { font-size: 12px; }
|
|
190
|
+
.me-audit-preview-body .md-doc table, .me-audit-preview-body .md-doc pre { display: block; max-width: 100%; overflow-x: auto; }
|
|
191
|
+
.me-audit-preview-summary { margin: 0; font-size: 12px; line-height: 1.75; opacity: .72; }
|
|
192
|
+
.me-audit-preview-empty { padding: 24px 12px; text-align: center; font-size: 12px; opacity: .55; }
|
|
193
|
+
.me-audit-preview-actions { flex: none; display: flex; gap: 7px; padding: 10px 14px; border-top: 1px solid rgba(127,127,127,.12); }
|
|
194
|
+
.me-audit-row-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
|
|
195
|
+
.me-audit-row { border-bottom: 1px solid rgba(127,127,127,.12); }
|
|
196
|
+
.me-audit-row:last-child { border-bottom: 0; }
|
|
197
|
+
.me-audit-row:hover { background: rgba(127,127,127,.035); }
|
|
198
|
+
.me-audit-row.active { background: rgba(255,122,69,.055); box-shadow: inset 2px 0 0 #ff7a45; }
|
|
199
|
+
.me-audit-row-main { cursor: pointer; }
|
|
200
|
+
.me-audit-row-main { display: flex; align-items: flex-start; gap: 9px; padding: 10px 8px; min-width: 0; }
|
|
201
|
+
.me-audit-row-main > input { margin-top: 7px; flex: none; }
|
|
202
|
+
.me-audit-row-expand { padding: 2px 5px !important; flex: none; margin-top: 4px; opacity: .55; }
|
|
203
|
+
.me-audit-row-tile { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid; border-radius: 8px; font-size: 14px; flex: none; margin-top: 1px; }
|
|
204
|
+
.me-audit-row-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
205
|
+
.me-audit-row-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
|
|
206
|
+
.me-audit-row-kind { font-size: 10px; color: #b0b7c1; }
|
|
207
|
+
.me-audit-row-state { padding: 0 5px; border-radius: 4px; font-size: 9px; line-height: 15px; background: rgba(245,158,11,.1); color: #fbbf24; }
|
|
208
|
+
.me-audit-row-state.rejected { background: rgba(248,113,113,.1); color: #f87171; }
|
|
209
|
+
.me-audit-row-time { margin-left: auto; font-size: 9.5px; color: #99a1ac; white-space: nowrap; }
|
|
210
|
+
.me-audit-row-title { padding: 0; border: 0; background: transparent; text-align: left; color: #f3f5f8; font-size: 13px; line-height: 1.5; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
|
|
211
|
+
.me-audit-row-title:hover { color: #ff9a72; }
|
|
212
|
+
.me-audit-row-reason { margin: 0; font-size: 11px; line-height: 1.55; color: #aeb5bf; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
213
|
+
.me-audit-row-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 9.5px; color: #8f98a4; }
|
|
214
|
+
.me-audit-row-meta span { white-space: nowrap; }
|
|
215
|
+
.me-audit-row .me-audit-row-actions { align-items: center; padding-top: 3px; }
|
|
216
|
+
@container (max-width: 1120px) { .me-audit-main { flex-direction: row; } .me-audit-preview { display: flex; flex: 0 0 460px; width: 460px; max-height: calc(100vh - 130px); position: sticky; top: 0; } }
|
|
217
|
+
@container (max-width: 950px) {
|
|
218
|
+
.me-audit-kinds { position: static; flex: 0 0 100%; width: 100%; display: flex; flex-wrap: wrap; gap: 3px; padding: 8px; }
|
|
219
|
+
.me-audit-kinds-title { width: 100%; padding-bottom: 4px; }
|
|
220
|
+
.me-audit-kind { width: auto; }
|
|
221
|
+
.me-audit-row-sev, .me-audit-row-reason { display: none; }
|
|
222
|
+
}
|
|
223
|
+
@container (max-width: 900px) {
|
|
224
|
+
.mc-audit-batchcard { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px !important; }
|
|
225
|
+
.mc-audit-batchcard > label, .mc-audit-batchcard > span, .mc-audit-batchcard > b { grid-column: 1 / -1; }
|
|
226
|
+
.mc-audit-batchcard > .mc-btn { width: 100%; }
|
|
227
|
+
.mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
|
|
228
|
+
}
|
|
229
|
+
@media (max-width: 1100px) {
|
|
230
|
+
.me-v5 .mc-rail, .me-v5 .mc-rail.open { width: 68px; padding: 10px 8px; }
|
|
231
|
+
.me-v5 .mc-v5-railbrand, .me-v5 .mc-rail-sec, .me-v5 .mc-rail-label { display: none; }
|
|
232
|
+
.me-v5 .mc-railbtn { justify-content: center; padding: 0; }
|
|
233
|
+
}
|
|
234
|
+
@container (max-width: 1100px) {
|
|
235
|
+
.me-v5 .mc-rail, .me-v5 .mc-rail.open { width: 68px; padding: 10px 8px; }
|
|
236
|
+
.me-v5 .mc-v5-railbrand, .me-v5 .mc-rail-sec, .me-v5 .mc-rail-label { display: none; }
|
|
237
|
+
.me-v5 .mc-railbtn { justify-content: center; padding: 0; }
|
|
238
|
+
}
|
|
239
|
+
@media (max-width: 1180px) { .me-audit-main { flex-direction: row; } .me-audit-preview { display: flex; flex: 0 0 460px; width: 460px; max-height: calc(100vh - 130px); position: sticky; top: 0; } }
|
|
240
|
+
@media (max-width: 900px) { .me-audit-main { gap: 8px; } .me-audit-preview { flex-basis: 360px; width: 360px; } }
|
|
241
|
+
.me-audit-bulk { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 10px; background: var(--dsw-alias-bg-layer-1, #fff); box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
|
|
242
|
+
/* ---- \u652F\u6301\u4E0E\u4EA4\u6D41 / \u9996\u6B21\u5F15\u5BFC ---- */
|
|
243
|
+
.me-support { max-width: 720px; }
|
|
244
|
+
.me-support-tabs { display: flex; gap: 6px; padding: 10px 18px 0; border-bottom: 1px solid var(--dsw-alias-border-l1, #e5e7eb); }
|
|
245
|
+
.me-support-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: inherit; opacity: .6; font-size: 12px; padding: 7px 9px; cursor: pointer; }
|
|
246
|
+
.me-support-tab.active { opacity: 1; border-bottom-color: var(--dsw-alias-brand-primary, #6366f1); font-weight: 600; }
|
|
247
|
+
.me-support-body { padding: 16px 18px; overflow: auto; }
|
|
248
|
+
.me-support-qr { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
|
|
249
|
+
.me-support-qr figure { margin: 0; }
|
|
250
|
+
.me-support-qr img { width: 190px; max-width: 46vw; display: block; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 10px; background: #fff; padding: 6px; cursor: zoom-in; }
|
|
251
|
+
.me-lightbox { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 34px; background: rgba(0,0,0,.84); backdrop-filter: blur(8px); WebkitBackdropFilter: blur(8px); }
|
|
252
|
+
.me-lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 10px; background: #fff; padding: 7px; box-shadow: 0 30px 90px rgba(0,0,0,.65); cursor: default; }
|
|
253
|
+
.me-lightbox-close { position: absolute; right: 22px; top: 18px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; }
|
|
254
|
+
.me-lightbox-close:hover { background: rgba(255,255,255,.22); }
|
|
255
|
+
.me-support-qr figcaption { margin-top: 6px; font-size: 11px; opacity: .6; text-align: center; }
|
|
256
|
+
.me-support-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
|
|
257
|
+
.me-support-note { margin: 0 0 10px; font-size: 11.5px; line-height: 1.75; opacity: .72; }
|
|
258
|
+
.me-support-link { color: var(--dsw-alias-brand-primary, #6366f1); font-size: 11.5px; }
|
|
259
|
+
.me-guide { max-width: 620px; }
|
|
260
|
+
.me-guide-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
|
|
261
|
+
.me-guide-head b { font-size: 15px; }
|
|
262
|
+
.me-guide-head .spacer { flex: 1; }
|
|
263
|
+
.me-guide-dots { display: flex; gap: 5px; padding: 0 20px 4px; }
|
|
264
|
+
.me-guide-dot { width: 16px; height: 3px; border-radius: 2px; background: rgba(127,127,127,.22); }
|
|
265
|
+
.me-guide-dot.on { background: var(--dsw-alias-brand-primary, #6366f1); }
|
|
266
|
+
.me-guide-body { padding: 12px 20px 6px; }
|
|
267
|
+
.me-guide-body h3 { margin: 0 0 8px; font-size: 16px; }
|
|
268
|
+
.me-guide-body p { margin: 0; font-size: 12.5px; line-height: 1.8; opacity: .75; }
|
|
269
|
+
.me-guide-github { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
|
|
270
|
+
.me-guide-github .mc-btn { text-decoration: none; }
|
|
271
|
+
.me-guide-github-hint { flex-basis: 100%; font-size: 10.5px; color: #99a1ac; }
|
|
272
|
+
.me-guide-like { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 16px; border: 1px solid rgba(16,185,129,.35); border-radius: 9px; background: rgba(16,185,129,.10); font-size: 15px; font-weight: 600; animation: me-guide-pulse 1.8s ease-in-out infinite; }
|
|
273
|
+
.me-guide-thumb { font-size: 26px; line-height: 1; }
|
|
274
|
+
@keyframes me-guide-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } 50% { box-shadow: 0 0 0 7px rgba(16,185,129,.12); } }
|
|
275
|
+
.me-guide-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
|
|
276
|
+
.me-guide-chips span { padding: 4px 9px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 7px; font-size: 11px; opacity: .78; }
|
|
277
|
+
.me-guide-actions { display: flex; align-items: center; gap: 8px; padding: 14px 20px 18px; }
|
|
278
|
+
.me-guide-actions .spacer { flex: 1; }
|
|
279
|
+
.me-guide-tip { font-size: 10px; opacity: .5; }
|
|
280
|
+
@media (max-width: 720px) {
|
|
281
|
+
.mc-rail, .mc-rail.open { width: 54px; padding-right: 8px; }
|
|
282
|
+
.mc-rail .mc-rail-label { display: none; }
|
|
283
|
+
.mc-rail .mc-railbtn { justify-content: center; padding-left: 0; padding-right: 0; }
|
|
284
|
+
.mc-rail .mc-rail-collapse { display: none; }
|
|
285
|
+
.me-guide-head span { display: none; }
|
|
286
|
+
.me-guide-actions { flex-wrap: wrap; }
|
|
287
|
+
.me-guide-tip { display: none; }
|
|
288
|
+
}
|
|
289
|
+
@media (max-width: 760px) {
|
|
290
|
+
.me-audit { flex-direction: column; }
|
|
291
|
+
.me-audit-kinds { position: static; width: 100%; flex: none; display: flex; flex-wrap: wrap; gap: 3px; padding: 8px; }
|
|
292
|
+
.me-audit-kinds-title { width: 100%; padding-bottom: 4px; }
|
|
293
|
+
.me-audit-kind { width: auto; }
|
|
294
|
+
}
|
|
162
295
|
.mc-flag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); margin-left: 6px; }
|
|
163
296
|
/* \u4FA7\u680F\u6309\u94AE\u4E0A\u7684\u8BA1\u6570\u5FBD\u6807\uFF08\u5BA1\u6838\u4E2D\u5FC3 = \u9694\u79BB\u533A\u5F85\u5BA1\u6570\uFF0C\u56DE\u6536\u4E2D\u5FC3 = \u56DE\u6536\u7AD9\u6570\uFF09 */
|
|
164
297
|
.mc-dot { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 9.5px; line-height: 15px; font-weight: 700; text-align: center; box-shadow: 0 0 0 2px var(--dsw-alias-bg-base, rgba(0,0,0,.35)); }
|
|
@@ -192,13 +325,45 @@ Option A, because:
|
|
|
192
325
|
.me-modal-title h2 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
193
326
|
.me-modal-title span { font-size: 12px; opacity: 0.55; white-space: nowrap; flex: 0 0 auto; }
|
|
194
327
|
.me-modal-title .me-wicon { width: 26px; height: 26px; flex: none; }
|
|
195
|
-
.me-modal-title .me-wicon svg { display: block; width: 100%; height: 100%; }
|
|
328
|
+
.me-modal-title .me-wicon svg, .me-modal-title .me-wicon img { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
196
329
|
.me-modal-head .spacer { flex: 1; }
|
|
197
|
-
.me-modal-close { border:
|
|
198
|
-
.me-modal-close
|
|
330
|
+
.me-modal-close { border: 0; background: transparent; color: inherit; border-radius: 8px; width: 30px; height: 30px; line-height: 1; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .55; transition: background .15s ease, color .15s ease, opacity .15s ease; }
|
|
331
|
+
.me-modal-close svg { width: 15px; height: 15px; }
|
|
332
|
+
.me-modal-close:hover { background: rgba(255,122,69,.12); color: #ff9a72; opacity: 1; }
|
|
333
|
+
.me-modal-close:active { background: rgba(255,122,69,.18); }
|
|
199
334
|
.me-modal-body { flex: 1; padding: 18px 20px; overflow: hidden; display: flex; }
|
|
200
335
|
.me-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.66); z-index: 1002; display: flex; align-items: center; justify-content: center; padding: 24px; }
|
|
201
336
|
.me-dialog { background: var(--dsw-alias-bg-layer-1, #1e232c); color: var(--dsw-alias-label-primary, #e5e7eb); border-radius: 14px; max-width: 760px; width: 100%; max-height: 84vh; display: flex; flex-direction: column; box-sizing: border-box; box-shadow: 0 24px 60px rgba(0,0,0,0.5); border: 1px solid var(--dsw-alias-border-l1, #2c333c); }
|
|
337
|
+
.me-reader-dialog { max-width: 1180px; }
|
|
338
|
+
.me-reader-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
|
|
339
|
+
.me-reader-main { margin: 0 auto; }
|
|
340
|
+
.me-reader-callout { margin: 0 0 18px; padding: 11px 13px; border-left: 3px solid var(--dsw-alias-brand-primary, #ff7a45); border-radius: 0 8px 8px 0; background: linear-gradient(90deg, rgba(255,122,69,.09), rgba(255,122,69,.02)); }
|
|
341
|
+
.me-reader-callout-k { display: block; margin-bottom: 3px; color: #ff9a72; font-size: 9px; font-weight: 650; letter-spacing: .08em; }
|
|
342
|
+
.me-reader-callout p { margin: 0; color: #c7ccd4; font-size: 12px; line-height: 1.75; }
|
|
343
|
+
.me-reader-side { min-height: 0; overflow: auto; padding: 16px 16px 26px; border-left: 1px solid var(--dsw-alias-border-l1, #2c333c); background: rgba(127,127,127,.025); }
|
|
344
|
+
.me-reader-side .side-label { margin: 16px 0 6px; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; font-weight: 650; opacity: .48; }
|
|
345
|
+
.me-reader-side .side-label:first-child { margin-top: 0; }
|
|
346
|
+
.me-reader-side-val { font-size: 11px; line-height: 1.6; opacity: .72; overflow-wrap: anywhere; }
|
|
347
|
+
.me-reader-side-val.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px; }
|
|
348
|
+
.me-reader-toc { display: flex; flex-direction: column; gap: 2px; }
|
|
349
|
+
.me-reader-toc button { display: flex; gap: 7px; text-align: left; padding: 4px 5px; border: 0; background: transparent; border-radius: 5px; font-size: 10.5px; line-height: 1.5; color: var(--dsw-alias-label-secondary, #9aa3af); }
|
|
350
|
+
.me-reader-toc button:hover { background: rgba(127,127,127,.09); color: var(--dsw-alias-label-primary, #e9ecf1); }
|
|
351
|
+
.me-reader-toc button.lv2 { padding-left: 13px; }
|
|
352
|
+
.me-reader-toc button.lv3 { padding-left: 22px; }
|
|
353
|
+
.me-reader-toc button span { flex: none; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 8.5px; opacity: .45; padding-top: 1px; }
|
|
354
|
+
.me-reader-tags { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
355
|
+
.me-reader-tags .mc-chip { font-size: 9.5px; padding: 2px 7px; }
|
|
356
|
+
.me-reader-related { display: flex; flex-direction: column; gap: 4px; }
|
|
357
|
+
.me-reader-related button { display: flex; gap: 7px; align-items: flex-start; text-align: left; padding: 6px 7px; border: 1px solid var(--dsw-alias-border-l1, #2c333c); border-radius: 7px; background: transparent; font-size: 10.5px; line-height: 1.45; color: var(--dsw-alias-label-primary, #e9ecf1); }
|
|
358
|
+
.me-reader-related button:hover { border-color: var(--dsw-alias-brand-primary, #ff7a45); }
|
|
359
|
+
.me-reader-related button b { font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
360
|
+
.me-reader-related button span { flex: none; }
|
|
361
|
+
.md-h { scroll-margin-top: 14px; }
|
|
362
|
+
@media (max-width: 860px) {
|
|
363
|
+
.me-reader-dialog { max-width: 760px; }
|
|
364
|
+
.me-reader-body { grid-template-columns: 1fr; }
|
|
365
|
+
.me-reader-side { display: none; }
|
|
366
|
+
}
|
|
202
367
|
.me-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--dsw-alias-border-l1, #e5e7eb); }
|
|
203
368
|
.me-dialog-head h3 { margin: 0; font-size: 15px; }
|
|
204
369
|
/* \u6807\u9898\u8FC7\u957F\u65F6\u4E0D\u8BB8\u6324\u538B\u6309\u94AE\uFF08\u7528\u6237\u53CD\u9988\uFF0C\u89C1\u56FE 1/\u56FE 2\uFF09\uFF1A
|
|
@@ -347,13 +512,203 @@ Option A, because:
|
|
|
347
512
|
height: calc(100vh - var(--dsh-frame-overlay-top, 68px));
|
|
348
513
|
max-height: calc(100vh - var(--dsh-frame-overlay-top, 68px));
|
|
349
514
|
}
|
|
350
|
-
|
|
515
|
+
/* ---- V5\uFF1AMemory Atlas \u4E3B\u9898\uFF08RC\uFF09 ---- */
|
|
516
|
+
.memory-eternal-root.me-v5 {
|
|
517
|
+
--dsw-alias-bg-base: #1e2228;
|
|
518
|
+
--dsw-alias-bg-layer-1: #262b33;
|
|
519
|
+
--dsw-alias-bg-layer-2: #2f353e;
|
|
520
|
+
--dsw-alias-border-l1: #3a404a;
|
|
521
|
+
--dsw-alias-border-l2: #454c57;
|
|
522
|
+
--dsw-alias-label-primary: #f3f5f8;
|
|
523
|
+
--dsw-alias-label-secondary: #b0b7c1;
|
|
524
|
+
--dsw-alias-accent: #ff7a45;
|
|
525
|
+
--dsw-alias-brand-primary: #ff7a45;
|
|
526
|
+
background: #1e2228;
|
|
527
|
+
color: #f3f5f8;
|
|
528
|
+
}
|
|
529
|
+
.me-v5 .mc-v5-top { flex: none; height: 54px; display: flex; align-items: center; gap: 9px; padding: 0 16px; border-bottom: 1px solid #343a43; background: linear-gradient(180deg, rgba(35,39,46,.98), rgba(30,34,40,.96)); }
|
|
530
|
+
.me-v5 .mc-v5-top .spacer { flex: 1 1 auto; }
|
|
531
|
+
.me-v5 .mc-v5-top.in-host { padding-right: 108px; }
|
|
532
|
+
.me-v5 .mc-v5-logo { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; flex: none; background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
|
|
533
|
+
.me-v5 .mc-v5-crumb { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #b0b7c1; white-space: nowrap; }
|
|
534
|
+
.me-v5 .mc-v5-crumb b { color: #f3f5f8; font-weight: 600; }
|
|
535
|
+
.me-v5 .mc-v5-crumb i { color: #5a616d; font-style: normal; }
|
|
536
|
+
.me-v5 .mc-v5-top-actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
|
|
537
|
+
.me-v5 .mc-v5-sys { display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 9px; border: 1px solid #3a404a; border-radius: 999px; color: #b0b7c1; font-size: 10px; white-space: nowrap; }
|
|
538
|
+
.me-v5 .mc-v5-sys i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.1); }
|
|
539
|
+
.me-v5 .mc-v5-ver { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; background: rgba(127,127,127,.08); color: #99a1ac; font-family: var(--mono, ui-monospace, monospace); font-size: 9.5px; white-space: nowrap; }
|
|
540
|
+
.me-v5 .mc-v5-star { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid #454c57; border-radius: 7px; background: transparent; color: #dde2e9; font-size: 10.5px; text-decoration: none; white-space: nowrap; cursor: pointer; }
|
|
541
|
+
.me-v5 .mc-v5-star:hover { border-color: rgba(255,122,69,.45); color: #ff9a72; }
|
|
542
|
+
.me-v5 .mc-v5-help { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #454c57; border-radius: 50%; background: transparent; color: #b0b7c1; font-size: 12px; font-weight: 650; cursor: pointer; }
|
|
543
|
+
.me-v5 .mc-v5-help:hover { border-color: rgba(255,122,69,.45); color: #ff9a72; }
|
|
544
|
+
.me-v5 .me-modal-body { background: #1e2228; container-type: inline-size; }
|
|
545
|
+
.me-v5 .mc-rail { width: 68px; gap: 2px; padding: 12px 10px 12px 8px; background: #1b1f25; border-right: 1px solid #343a43; }
|
|
546
|
+
.me-v5 .mc-rail.open { width: 228px; }
|
|
547
|
+
.me-v5 .mc-v5-rail-top { display: flex; align-items: center; gap: 8px; padding: 0 4px 11px; }
|
|
548
|
+
.me-v5 .mc-v5-railbrand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
|
|
549
|
+
.me-v5 .mc-v5-railbrand .mark { width: 27px; height: 27px; display: block; border-radius: 8px; object-fit: cover; background: #fff; border: 1px solid #3a404a; padding: 1px; flex: none; }
|
|
550
|
+
.me-v5 .mc-v5-railbrand b { display: block; font-size: 13px; color: #f3f5f8; white-space: nowrap; }
|
|
551
|
+
.me-v5 .mc-v5-railbrand span { display: block; margin-top: 1px; font-size: 8px; letter-spacing: .16em; color: #99a1ac; white-space: nowrap; }
|
|
552
|
+
.me-v5 .mc-rail-collapse { margin-left: auto; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: #b0b7c1; }
|
|
553
|
+
.me-v5 .mc-rail-collapse:hover { background: rgba(255,255,255,.05); color: #f3f5f8; border-color: transparent; }
|
|
554
|
+
.me-v5 .mc-rail-sec { padding: 12px 10px 5px; font-size: 9px; letter-spacing: .14em; font-weight: 600; color: #99a1ac; text-transform: uppercase; }
|
|
555
|
+
.me-v5 .mc-rail:not(.open) .mc-v5-railbrand, .me-v5 .mc-rail:not(.open) .mc-rail-sec { display: none; }
|
|
556
|
+
.me-v5 .mc-railbtn { height: 37px; padding: 0 10px; gap: 10px; border: 0; border-radius: 9px; background: transparent; color: #b0b7c1; font-size: 12.5px; font-weight: 500; }
|
|
557
|
+
.me-v5 .mc-railbtn:hover { background: rgba(255,255,255,.04); color: #f3f5f8; border-color: transparent; }
|
|
558
|
+
.me-v5 .mc-railbtn.active { background: linear-gradient(90deg, rgba(255,122,69,.16), rgba(255,122,69,.04)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,122,69,.18); }
|
|
559
|
+
.me-v5 .mc-railbtn.active .mc-rail-ico { color: #ff7a45; }
|
|
560
|
+
.me-v5 .mc-railbtn .mc-rail-ico { font-size: 16px; }
|
|
561
|
+
.me-v5 .mc-rail:not(.open) .mc-railbtn { justify-content: center; padding: 0; }
|
|
562
|
+
.me-v5 .mc-main { background: #1e2228; }
|
|
563
|
+
.me-v5 .mc-card, .me-v5 .me-audit-kinds, .me-v5 .me-audit-bulk { background: #262b33; border-color: #3a404a; }
|
|
564
|
+
.me-v5 .mc-toolbar input[type=text] { background: #262b33; border-color: #454c57; border-radius: 8px; color: #f3f5f8; }
|
|
565
|
+
.me-v5 .mc-btn { background: #2a3038; border-color: #454c57; color: #dde2e9; border-radius: 8px; }
|
|
566
|
+
.me-v5 .mc-btn:hover { border-color: #ff7a45; color: #fff; opacity: 1; }
|
|
567
|
+
.me-v5 .mc-btn.me-on { background: #ff7a45; border-color: transparent; color: #160d08; box-shadow: 0 6px 18px rgba(255,122,69,.2); }
|
|
568
|
+
.me-v5 .mc-chip { border-color: #454c57; color: #b0b7c1; background: transparent; }
|
|
569
|
+
.me-v5 .mc-chip.active { border-color: rgba(255,122,69,.4); color: #ff9a72; background: rgba(255,122,69,.06); }
|
|
570
|
+
.me-v5 .mc-tabs { background: #262b33; border: 1px solid #3a404a; }
|
|
571
|
+
.me-v5 .mc-tab.active { background: #30363f; }
|
|
572
|
+
.me-v5 .mc-cardrow { background: #262b33; border-color: #3a404a; border-radius: 12px; }
|
|
573
|
+
.me-v5 .mc-cardrow:hover { border-color: rgba(255,122,69,.35); box-shadow: 0 10px 30px rgba(0,0,0,.28); }
|
|
574
|
+
.me-v5 .mc-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 11px; }
|
|
575
|
+
.me-v5 .mc-v5-pagehead { display: flex; align-items: flex-end; gap: 16px; padding: 8px 4px 16px; }
|
|
576
|
+
.me-v5 .mc-v5-eyebrow { font-size: 9px; letter-spacing: .16em; color: #ff7a45; font-weight: 650; margin-bottom: 5px; }
|
|
577
|
+
.me-v5 .mc-v5-pagehead h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; color: #f0f2f5; }
|
|
578
|
+
.me-v5 .mc-v5-pagehead p { margin: 6px 0 0; font-size: 11.5px; line-height: 1.6; color: #b0b7c1; max-width: 56ch; }
|
|
579
|
+
.me-v5 .mc-v5-pagehead-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 10.5px; color: #99a1ac; }
|
|
580
|
+
.me-v5 .mc-v5-pagehead-stats b { color: #f3f5f8; font-weight: 650; }
|
|
581
|
+
.me-v5 .mc-v5-pagehead-stats span + span { position: relative; padding-left: 12px; }
|
|
582
|
+
.me-v5 .mc-v5-pagehead-stats span + span::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #5a616d; transform: translateY(-50%); }
|
|
583
|
+
.me-v5 .mc-v5-audithead { flex: none; padding-bottom: 12px; }
|
|
584
|
+
.me-v5 .mc-v5-audit-trust { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; padding: 4px 9px; border: 1px solid #363c46; border-radius: 999px; background: #22262d; color: #b0b7c1; font-size: 10px; white-space: nowrap; }
|
|
585
|
+
.me-v5 .mc-v5-recycle-hint { margin: 0 2px 10px; font-size: 11px; color: #99a1ac; }
|
|
586
|
+
.me-v5 .mc-v5-recycle { overflow: hidden; padding: 0 !important; }
|
|
587
|
+
.me-v5 .mc-v5-recycle-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-bottom: 1px solid rgba(127,127,127,.12); }
|
|
588
|
+
.me-v5 .mc-v5-recycle-row:last-child { border-bottom: 0; }
|
|
589
|
+
.me-v5 .mc-v5-recycle-row:hover { background: rgba(127,127,127,.035); }
|
|
590
|
+
.me-v5 .mc-v5-recycle-tile { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid; border-radius: 9px; font-size: 15px; flex: none; }
|
|
591
|
+
.me-v5 .mc-v5-recycle-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
592
|
+
.me-v5 .mc-v5-recycle-copy b { font-size: 12.5px; line-height: 1.5; color: #f3f5f8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
593
|
+
.me-v5 .mc-v5-recycle-copy span { font-size: 10px; color: #99a1ac; }
|
|
594
|
+
.me-v5 .mc-v5-recycle-actions { display: flex; align-items: center; gap: 6px; flex: none; }
|
|
595
|
+
.me-v5 .mc-danger { color: #f87171; }
|
|
596
|
+
.me-v5 .mc-v5-empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px; text-align: center; font-size: 12px; color: #99a1ac; }
|
|
597
|
+
.me-v5 .mc-v5-empty-state b { color: #e5e9ef; font-size: 13px; }
|
|
598
|
+
.me-v5 .mc-v5-empty-state span { font-size: 11px; }
|
|
599
|
+
@media (max-width: 640px) { .me-v5 .mc-v5-recycle-row { flex-wrap: wrap; } .me-v5 .mc-v5-recycle-actions { width: 100%; padding-left: 42px; } }
|
|
600
|
+
.me-v5 .mc-v5-pagecount { margin-left: auto; padding-bottom: 4px; font-size: 10px; color: #99a1ac; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
601
|
+
.me-v5 .mc-v5-card { min-height: 176px; padding: 13px 14px 11px; gap: 7px; }
|
|
602
|
+
.me-v5 .mc-v5-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
603
|
+
.me-v5 .mc-v5-card-kind { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border: 1px solid; border-radius: 999px; font-size: 9.5px; line-height: 17px; white-space: nowrap; }
|
|
604
|
+
.me-v5 .mc-v5-card-tile { width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid; border-radius: 7px; font-size: 12px; flex: none; }
|
|
605
|
+
.me-v5 .mc-v5-card-kind-name { font-size: 9.5px; color: #b0b7c1; white-space: nowrap; }
|
|
606
|
+
.me-v5 .mc-v5-pin { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font-size: 9px; opacity: .35; flex: none; }
|
|
607
|
+
.me-v5 .mc-v5-pin:hover, .me-v5 .mc-v5-pin.on { opacity: 1; background: rgba(255,122,69,.12); }
|
|
608
|
+
.me-v5 .mc-v5-card.pinned { border-color: rgba(255,122,69,.32); }
|
|
609
|
+
.me-v5 .mc-v5-card-insight { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
|
|
610
|
+
.me-v5 .mc-v5-insight-k { flex: none; margin-top: 1px; padding: 1px 4px; border-radius: 4px; background: rgba(255,122,69,.09); color: #ff9a72; font-size: 8.5px; line-height: 14px; white-space: nowrap; }
|
|
611
|
+
.me-v5 .mc-v5-card-lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
612
|
+
.me-v5 .mc-v5-mini { flex: none; opacity: .9; }
|
|
613
|
+
.me-v5 .mc-v5-conn { display: inline-flex; align-items: center; gap: 3px; color: #e0a184; }
|
|
614
|
+
.me-v5 .mc-v5-conn b { color: #ff9a72; }
|
|
615
|
+
.me-v5 .mc-chip-n { margin-left: 5px; padding: 0 4px; border-radius: 4px; background: rgba(127,127,127,.12); font-size: 9px; line-height: 14px; opacity: .7; }
|
|
616
|
+
.me-v5 .mc-v5-card .mc-tag.more { opacity: .55; }
|
|
617
|
+
.me-v5 .mc-v5-card-status { font-size: 9px; padding: 1px 6px; border-radius: 999px; line-height: 15px; }
|
|
618
|
+
.me-v5 .mc-v5-card-status.pending { color: #fbbf24; background: rgba(251,191,36,.1); }
|
|
619
|
+
.me-v5 .mc-v5-card-status.rejected { color: #fb7185; background: rgba(251,113,133,.1); }
|
|
620
|
+
.me-v5 .mc-v5-card-time { font-size: 9px; color: #99a1ac; white-space: nowrap; }
|
|
621
|
+
.me-v5 .mc-v5-card-title { margin: 1px 0 0; font-size: 13.5px; line-height: 1.48; font-weight: 600; color: #f3f5f8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
622
|
+
.me-v5 .mc-v5-card-lead { margin: 0; font-size: 11px; line-height: 1.65; color: #b9bfc9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
623
|
+
.me-v5 .mc-v5-card-tags { margin-top: 0; }
|
|
624
|
+
.me-v5 .mc-v5-card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 7px; border-top: 1px solid rgba(127,127,127,.1); font-size: 9.5px; color: #99a1ac; }
|
|
625
|
+
.me-v5 .mc-v5-conn { color: #e6a98c; }
|
|
626
|
+
.me-v5 .mc-v5-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
|
|
627
|
+
.me-v5 .mc-v5-feature { display: flex; align-items: stretch; gap: 18px; margin-bottom: 11px; padding: 18px 20px; border: 1px solid rgba(255,122,69,.22); border-radius: 14px; background: linear-gradient(115deg, rgba(255,122,69,.09), rgba(255,122,69,.02) 55%, rgba(255,255,255,.01)); cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
|
|
628
|
+
.me-v5 .mc-v5-feature:hover { border-color: rgba(255,122,69,.45); transform: translateY(-1px); }
|
|
629
|
+
.me-v5 .mc-v5-feature-copy { flex: 1; min-width: 0; }
|
|
630
|
+
.me-v5 .mc-v5-feature h3 { margin: 3px 0 0; font-size: 20px; line-height: 1.35; font-weight: 650; color: #f3f5f8; overflow-wrap: anywhere; }
|
|
631
|
+
.me-v5 .mc-v5-feature p { margin: 8px 0 0; font-size: 11.5px; line-height: 1.7; color: #b9bfc9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
632
|
+
.me-v5 .mc-v5-feature-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 9.5px; color: #99a1ac; }
|
|
633
|
+
.me-v5 .mc-v5-feature-side { flex: none; width: 88px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 2px; border-left: 1px solid rgba(255,122,69,.16); padding-left: 16px; }
|
|
634
|
+
.me-v5 .mc-v5-feature-side b { font-size: 26px; line-height: 1; color: #ff9a72; font-weight: 650; }
|
|
635
|
+
.me-v5 .mc-v5-feature-side span { font-size: 9.5px; color: #99a1ac; }
|
|
636
|
+
.me-v5 .mc-v5-feature-open { margin-top: 7px; color: #ff9a72 !important; }
|
|
637
|
+
.me-v5 .mc-v5-feature-shuffle { margin-top: 5px; padding: 2px 6px; border: 1px solid rgba(255,122,69,.28); border-radius: 5px; background: transparent; color: #ff9a72; font-size: 9px; cursor: pointer; }
|
|
638
|
+
.me-v5 .mc-v5-feature-shuffle:hover { background: rgba(255,122,69,.1); }
|
|
639
|
+
@media (max-width: 720px) { .me-v5 .mc-v5-feature { flex-direction: column; padding: 15px; } .me-v5 .mc-v5-feature-side { width: 100%; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 8px; border-left: 0; border-top: 1px solid rgba(255,122,69,.16); padding: 8px 0 0; } .me-v5 .mc-v5-feature h3 { font-size: 17px; } }
|
|
640
|
+
@media (max-width: 760px) { .me-v5 .mc-v5-top { height: 50px; padding: 0 10px; gap: 6px; } .me-v5 .mc-v5-top.in-host { padding-right: 76px; } .me-v5 .mc-v5-ver, .me-v5 .mc-v5-star-label { display: none; } .me-v5 .mc-v5-star { padding: 0 7px; } .me-v5 .mc-v5-sys { padding: 0 7px; } }
|
|
641
|
+
.me-v5 .mc-v5-statusgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
|
|
642
|
+
.me-v5 .mc-v5-statuscard { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 13px 14px; border: 1px solid #30353e; border-radius: 12px; background: #1c1f25; min-width: 0; }
|
|
643
|
+
.me-v5 .mc-v5-status-ico { position: absolute; right: 12px; top: 11px; opacity: .55; font-size: 14px; }
|
|
644
|
+
.me-v5 .mc-v5-statuscard b { font-size: 22px; line-height: 1.2; color: #f3f5f8; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
645
|
+
.me-v5 .mc-v5-statuscard > span:not(.mc-v5-status-ico) { font-size: 10.5px; color: #b0b7c1; }
|
|
646
|
+
.me-v5 .mc-v5-statuscard small { font-size: 9.5px; color: #99a1ac; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
647
|
+
.me-v5 .mc-v5-graphhead { flex: none; padding: 0 4px 10px; }
|
|
648
|
+
.me-v5 .me-graph-count { display: none; }
|
|
649
|
+
.me-v5 .mc-v5-graph-legend { position: absolute; left: 12px; top: 12px; z-index: 2; min-width: 130px; padding: 9px 10px; border: 1px solid rgba(127,127,127,.18); border-radius: 9px; background: rgba(28,31,37,.78); backdrop-filter: blur(10px); WebkitBackdropFilter: blur(10px); pointer-events: none; }
|
|
650
|
+
.me-v5 .mc-v5-graph-legend-title { margin-bottom: 6px; font-size: 8.5px; letter-spacing: .14em; color: #99a1ac; font-weight: 650; }
|
|
651
|
+
.me-v5 .mc-v5-graph-legend-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 10px; color: #b0b7c1; }
|
|
652
|
+
.me-v5 .mc-v5-graph-legend-row i { width: 6px; height: 6px; border-radius: 2px; flex: none; }
|
|
653
|
+
.me-v5 .mc-v5-graph-legend-row span { flex: 1; }
|
|
654
|
+
.me-v5 .mc-v5-graph-legend-row b { color: #e9ecf1; font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
655
|
+
@media (max-width: 900px) { .me-v5 .mc-v5-statusgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .me-v5 .mc-v5-graph-legend { display: none; } }
|
|
656
|
+
.me-v5 .mc-stats { gap: 10px; }
|
|
657
|
+
.me-v5 .mc-stats .mc-card { border-radius: 12px; }
|
|
658
|
+
.me-v5 .mc-stat b { color: #f0f2f5; font-weight: 650; }
|
|
659
|
+
.me-v5 .mc-stat span { color: #b0b7c1; }
|
|
660
|
+
.me-v5 .me-modal-head { background: #1b1f25; border-bottom-color: #343a43; }
|
|
661
|
+
.me-v5 .me-dialog { background: #242930; border-color: #454c57; }
|
|
662
|
+
.me-v5 .me-dialog-head { border-bottom-color: #3a404a; }
|
|
663
|
+
.me-v5 .md-doc { color: #dde2e9; }
|
|
664
|
+
.me-v5 .md-doc h1, .me-v5 .md-doc h2, .me-v5 .md-doc h3 { color: #f3f5f8; }
|
|
665
|
+
.me-v5 .me-audit-kind.active { border-color: rgba(255,122,69,.3); background: rgba(255,122,69,.1); }
|
|
666
|
+
.me-v5 .me-audit-bulk { box-shadow: 0 -8px 24px rgba(0,0,0,.32); }
|
|
667
|
+
.me-v5 .mc-dot { background: #ff7a45; color: #160d08; }
|
|
668
|
+
.me-audit-eye { display: none; align-items: center; justify-content: center; padding: 2px 6px; }
|
|
669
|
+
.me-audit-drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.46); backdrop-filter: blur(2px); }
|
|
670
|
+
.me-audit-drawer-close { display: none; position: absolute; top: 9px; right: 9px; z-index: 3; width: 27px; height: 27px; padding: 0; justify-content: center; }
|
|
671
|
+
@container (max-width: 1120px) {
|
|
672
|
+
.me-audit-eye { display: inline-flex; }
|
|
673
|
+
.me-audit-preview.drawer-open { display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(440px, 92vw); max-height: none; height: 100dvh; border-radius: 0; box-shadow: -24px 0 70px rgba(0,0,0,.45); }
|
|
674
|
+
.me-audit-preview.drawer-open .me-audit-drawer-close { display: inline-flex; }
|
|
675
|
+
.me-audit-preview.drawer-open .me-audit-preview-head { padding-right: 42px; }
|
|
676
|
+
}
|
|
677
|
+
@media (max-width: 1100px) {
|
|
678
|
+
.me-v5 .mc-rail, .me-v5 .mc-rail.open { width: 68px; padding: 10px 8px; }
|
|
679
|
+
.me-v5 .mc-v5-railbrand, .me-v5 .mc-rail-sec, .me-v5 .mc-rail-label { display: none; }
|
|
680
|
+
.me-v5 .mc-railbtn { justify-content: center; padding: 0; }
|
|
681
|
+
}
|
|
682
|
+
@container (max-width: 1100px) {
|
|
683
|
+
.me-v5 .mc-rail, .me-v5 .mc-rail.open { width: 68px; padding: 10px 8px; }
|
|
684
|
+
.me-v5 .mc-v5-railbrand, .me-v5 .mc-rail-sec, .me-v5 .mc-rail-label { display: none; }
|
|
685
|
+
.me-v5 .mc-railbtn { justify-content: center; padding: 0; }
|
|
686
|
+
}
|
|
687
|
+
@media (max-width: 720px) {
|
|
688
|
+
.me-v5 .mc-rail, .me-v5 .mc-rail.open { width: 54px; padding: 10px 8px; }
|
|
689
|
+
.me-v5 .mc-v5-railbrand, .me-v5 .mc-rail-sec { display: none; }
|
|
690
|
+
.me-v5 .mc-v5-top { height: 46px; padding: 0 12px; }
|
|
691
|
+
.me-v5 .mc-v5-crumb { font-size: 10px; }
|
|
692
|
+
.me-v5 .mc-v5-pagehead h1 { font-size: 21px; }
|
|
693
|
+
.me-v5 .mc-v5-pagehead p { display: none; }
|
|
694
|
+
.me-v5 .mc-v5-pagehead { padding-bottom: 10px; }
|
|
695
|
+
.me-audit-queue .mc-card { min-width: 0; }
|
|
696
|
+
.me-audit-queue .mc-card > div[style*="flex: 1"] { display: none; }
|
|
697
|
+
.me-audit-queue .mc-card .mc-btn { flex: 0 0 auto; }
|
|
698
|
+
|
|
699
|
+
.mc-audit-batchcard { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px !important; }
|
|
700
|
+
.mc-audit-batchcard > label, .mc-audit-batchcard > span, .mc-audit-batchcard > b { grid-column: 1 / -1; }
|
|
701
|
+
.mc-audit-batchcard > .mc-btn { width: 100%; }
|
|
702
|
+
.mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
|
|
703
|
+
}
|
|
704
|
+
`;function Ea(t){t.effect(()=>t.locale.register(kt,{zh:da,en:ca}),"memory-eternal: locale");let a=t.locale.bind(kt);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:kt,order:25,label:()=>a("nav"),locale:kt,inject:()=>({})},()=>o.default.createElement(Wa,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${kt}:footer`,order:100,label:()=>a("nav"),locale:kt,inject:()=>({})},i=>o.default.createElement($a,{t:a,locale:t.locale,wide:!(i&&i.wide===!1)}))),"memory-eternal: sidebar footer action")}function Oa(){let[t,a]=(0,o.useState)($+"/ui/app");return(0,o.useEffect)(()=>{let i=!0,g=()=>fetch("/memory-eternal/api/web-info").then(c=>c.json()).then(c=>{i&&c&&c.ok&&c.alive!==!1&&c.url&&a(c.url.endsWith("/")?c.url:c.url+"/")}).catch(()=>{});return fetch($+"/ui/app",{method:"HEAD"}).then(c=>{if(i&&!c.ok)return g()}).catch(()=>i?g():void 0),()=>{i=!1}},[]),t}function Wa({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsx)(ua,{t,onReload:()=>{},version:0})]})}function $a({t,locale:a,wide:i}){let[g,c]=(0,o.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${i?"":" rail"}`,children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>c(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(Ua,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),g&&(0,e.jsx)(_a,{t,locale:a,onClose:()=>c(!1)})]})}function _a({t,locale:a,onClose:i,tab:g}){let[c,s]=(0,o.useState)(!1),h=(0,o.useRef)(null),k=Oa(),S=(0,o.useCallback)(N=>a&&typeof a.subscribe=="function"?a.subscribe(N):()=>{},[a]),L=(0,o.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),M=(0,o.useSyncExternalStore)(S,L),x=M&&(M.active==="zh"||M.active==="en")?M.active:null,m=(0,o.useRef)(null);m.current===null&&x&&(m.current=x);let z=(0,o.useMemo)(()=>{let N=m.current?`lang=${m.current}`:"";if(g==="config")return`${$}/ui/config?tab=config${N?`&${N}`:""}`;let P=k.replace(/\/$/,""),T=P.endsWith("/ui/app")?"?":"/?";return g?`${P}${T}tab=${g}${N?`&${N}`:""}`:N?`${P}${T}${N}`:k},[k,g]);return(0,o.useEffect)(()=>{let N=h.current&&h.current.contentWindow;N&&x&&N.postMessage({source:"memory-eternal",type:"locale",lang:x},"*")},[x]),(0,o.useEffect)(()=>{let N=P=>{P.key==="Escape"&&i()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[i]),(0,e.jsxs)("div",{className:"me-overlay-top",onClick:i,children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsx)("div",{className:"me-modal"+(c?" me-modal-full":""),onClick:N=>N.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{style:{position:"absolute",top:8,right:8,zIndex:10,display:"flex",gap:4,padding:"4px 6px",background:"var(--dsw-alias-bg-overlay, rgba(17,24,39,0.45))",borderRadius:8,backdropFilter:"blur(4px)"},children:[(0,e.jsx)("button",{type:"button",onClick:()=>s(N=>!N),"aria-label":t(c?"exitFullscreen":"enterFullscreen"),title:t(c?"exitFullscreen":"enterFullscreen"),style:{width:26,height:26,borderRadius:6,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.08)",color:"#fff",cursor:"pointer",fontSize:14,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:c?"\u2921":"\u2922"}),(0,e.jsx)("button",{type:"button",onClick:i,"aria-label":t("close"),title:t("close"),style:{width:26,height:26,borderRadius:6,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.08)",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),(0,e.jsx)("iframe",{ref:h,src:z,title:"memory-eternal",allow:"clipboard-write; clipboard-read",style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"var(--dsw-alias-bg-base, #fff)"}})]})})]})}function Ua(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}var St="0.11.0";function Ga({t,inModal:a,onClose:i}){let g=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[c,s]=(0,o.useState)(null),[h,k]=(0,o.useState)([]),[S,L]=(0,o.useState)(!0),[M,x]=(0,o.useState)(null),[m,z]=(0,o.useState)(""),[N,P]=(0,o.useState)("all"),[T,E]=(0,o.useState)(""),[K,se]=(0,o.useState)("all"),[V,Z]=(0,o.useState)("all"),[te,G]=(0,o.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[fe,ue]=(0,o.useState)(!1),_=(0,o.useCallback)(b=>{G(r=>{let v=new Set(r);v.has(b)?v.delete(b):v.add(b);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...v]))}catch{}return v})},[]),[Q,je]=(0,o.useState)(""),[O,Be]=(0,o.useState)(()=>{try{let b=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),r={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config"};if(b&&r[b])return r[b]}catch{}return"cards"}),[f,F]=(0,o.useState)(()=>new Set([O])),W=(0,o.useCallback)(b=>{F(r=>r.has(b)?r:new Set(r).add(b)),Be(b)},[]),[B,Ce]=(0,o.useState)("recent"),[ze,pe]=(0,o.useState)(null),ve=(0,o.useRef)(null),y=(0,o.useRef)(null),[ae,X]=(0,o.useState)(!1),[Ne,ne]=(0,o.useState)(null),[xe,Ge]=(0,o.useState)(!1),[p,D]=(0,o.useState)(!1),[A,Y]=(0,o.useState)(!1),[Se,le]=(0,o.useState)("group"),[H,we]=(0,o.useState)(!1),be=(0,o.useCallback)(()=>{we(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),u=(0,o.useCallback)((b="group")=>{le(b),Y(!0)},[]);(0,o.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||O!=="cards")return;let b=setTimeout(()=>we(!0),900);return()=>clearTimeout(b)}catch{}},[O]);let[d,J]=(0,o.useState)(!0),[he,Me]=(0,o.useState)(null),[Te,n]=(0,o.useState)(0),ot=(0,o.useCallback)(()=>n(b=>b+1),[]),ct=c?.quarantine?.pending??0,Ke=c?.quarantine?.deleted??0,Pe=(0,o.useRef)(null),[Xe,bt]=(0,o.useState)(0),[it,Re]=(0,o.useState)(!1),et=(0,o.useRef)(null),Fe=(0,o.useRef)(null),l=(0,o.useCallback)(async(b=N,r=T,v=V,C={})=>{let R=C.append===!0;try{R?Re(!0):(L(!0),z(""));let j=new URLSearchParams;b&&b!=="all"&&j.set("kind",b),r.trim()&&j.set("q",r.trim());let ee=C.tag!==void 0?C.tag:Q;ee&&j.set("tag",ee),j.set("status",v||"all"),j.set("limit",String(ja)),j.set("offset",String(C.offset||0)),B==="title"&&j.set("sort","title");let ge=await(await fetch(`${$}/cards?${j.toString()}`)).json();if(ge.ok){let Ae=ge.cards||[];k(De=>R?[...De,...Ae.filter(ye=>!De.some(ke=>ke.path===ye.path))]:Ae),bt(Number(ge.total)||Ae.length)}}catch(j){z(String(j&&j.message?j.message:j))}finally{R?Re(!1):L(!1)}},[N,T,V,B,Q]),I=(0,o.useCallback)(async()=>{try{let[b,r]=await Promise.all([fetch(`${$}/overview`).then(v=>v.json()),fetch(`${$}/capture-log`).then(v=>v.json()).catch(()=>null)]);b.ok&&s(b),x(r&&r.ok&&r.available&&r.health||null)}catch(b){z(String(b&&b.message?b.message:b))}finally{L(!1)}},[]),U=async b=>{try{let v=await(await fetch(`${$}/delete?path=${encodeURIComponent(b)}`)).json();v.ok?(pe({ok:!0,msg:t("deleted")}),await I(),ot()):pe({ok:!1,msg:v.error||t("deleteFail")})}catch{pe({ok:!1,msg:t("deleteFail")})}ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>pe(null),2e3)};(0,o.useEffect)(()=>(I(),()=>{Pe.current&&clearTimeout(Pe.current)}),[I]);let oe=b=>{E(b),Pe.current&&clearTimeout(Pe.current),Pe.current=setTimeout(()=>l(N,b,V),280)},ie=b=>{P(b),l(b,T,V)},q=b=>{let r=String(b||"");je(r),ne(null),l(N,T,V,{tag:r})};(0,o.useEffect)(()=>{O==="cards"&&l(N,T,V)},[V,O,Te,B,Q]),(0,o.useEffect)(()=>{if(O!=="cards"||S||it||h.length>=Xe)return;let b=et.current,r=Fe.current;if(!b)return;let v=new IntersectionObserver(C=>{C[0]&&C[0].isIntersecting&&l(N,T,V,{append:!0,offset:h.length})},{root:r||null,rootMargin:"400px"});return v.observe(b),()=>v.disconnect()},[O,h,Xe,S,it,N,T,V,l]);let re=async b=>{try{let r=b.status;if(!r&&b.path)try{let ee=((await fetch(`${$}/cards?status=all&q=${encodeURIComponent(b.title||"")}&limit=50`).then(de=>de.json())).cards||[]).find(de=>de.path===b.path);ee&&(r=ee.status)}catch{}let v=r&&r!=="approved"?`&status=${encodeURIComponent(r)}`:"",C=await fetch(`${$}/card?path=${encodeURIComponent(b.path||b.id)}${v}`),R=await C.json();R.ok?ne({path:R.path,title:b.title,text:R.text}):z(R.error||`HTTP ${C.status}`)}catch(r){z(String(r&&r.message?r.message:r))}},He=async(b,r)=>{X(!0);try{let v=await fetch(`${$}/export`);if(!v.ok)throw new Error("HTTP "+v.status);let C=await v.json();if(!C.ok)throw new Error(C.error||"export failed");let R,j,ee;if(b==="json"){j="memory-vault.json",ee="application/json";let Ae=C.cards.map(De=>({path:De.path,title:De.title,kind:De.kind,status:De.status,store:De.store,text:De.text}));R=JSON.stringify({format:C.format||"memory-eternal-vault",formatVersion:C.formatVersion||1,exportedAt:C.exportedAt||new Date().toISOString(),count:Ae.length,cards:Ae},null,2)}else j="memory-vault.md",ee="text/markdown;charset=utf-8",R=C.cards.map(Ae=>Ae.text.trim()).filter(Boolean).join(`
|
|
351
705
|
|
|
352
706
|
---
|
|
353
707
|
|
|
354
|
-
`);let ne=new Blob([E],{type:O}),Se=await Va(ne,U,!1);if(!Se.ok){oe({ok:!1,msg:t("exportFail")}),ue(!1);return}oe({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+Se.name})}catch(x){oe({ok:!1,msg:t("exportFail")+" \xB7 "+(x.message||"")})}finally{ue(!1)}h.current&&clearTimeout(h.current),h.current=setTimeout(()=>oe(null),2600)},it=async b=>{let n=b.target.files&&b.target.files[0];if(b.target.value="",!!n){try{let x=await n.text(),E=await(await fetch(`${$}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:x})).json();if(E.ok){await Te();let U=E.imported||0,O=t("importedVault")+"\uFF1A"+U;E.total&&(O+=t("importedTotal")+E.total+t("importedTotalTail")),E.quarantined&&(O+=t("importedQuarantine")+E.quarantined+t("importedQuarantineTail")),E.skipped&&(O+=t("importedSkipped")+E.skipped+t("importedSkippedTail")),E.warning&&(O+=" \xB7 "+E.warning),oe({ok:U>0||!E.total,msg:O})}else oe({ok:!1,msg:E.error||t("importFail")})}catch{oe({ok:!1,msg:t("importFail")})}h.current&&clearTimeout(h.current),h.current=setTimeout(()=>oe(null),2400)}},ve=(0,o.useMemo)(()=>{let b=D.slice();return te!=="all"&&(b=b.filter(n=>ft(n.submittedBy)===te)),G!=="all"&&(b=b.filter(n=>(n.status||"approved")===G)),Ne==="title"?b.sort((n,x)=>String(n.title||"").localeCompare(String(x.title||""))):Ne==="hot"?b.sort((n,x)=>(x.weight||x.links||0)-(n.weight||n.links||0)):b.sort((n,x)=>new Date(x.updated||0).getTime()-new Date(n.updated||0).getTime()),b},[D,Ne,te,G]),rt=(0,o.useMemo)(()=>[...new Set(D.map(b=>ft(b.submittedBy)))],[D]);return(0,e.jsxs)("div",{className:"memory-eternal-root",style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:Ee}),Re&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Re.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Re.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Re.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Re.msg})]}),i&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)(oa,{})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),u&&(0,e.jsx)("button",{type:"button",className:"me-modal-close",onClick:u,"aria-label":t(p?"exitFull":"fullscreen"),children:p?"\u2750":"\u26F6"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close",onClick:s,"aria-label":t("close"),children:"\u2715"})]}),k&&k.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[k.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:k.since?gt(new Date(k.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${ke?" open":""}`,children:[(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>je(b=>!b),"aria-label":t(ke?"collapse":"expand"),title:t(ke?"collapse":"expand"),children:ke?"\xAB":"\xBB"}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${V==="cards"?" active":""}`,onClick:()=>be("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${V==="graph"?" active":""}`,onClick:()=>be("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${V==="stats"?" active":""}`,onClick:()=>be("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${V==="audit"?" active":""}`,onClick:()=>be("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),Y>0&&(0,e.jsx)("span",{className:"mc-dot",children:Y>99?"99+":Y})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${V==="optimize"?" active":""}`,onClick:()=>be("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),J>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:J>99?"99+":J})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${V==="config"?" active":""}`,onClick:()=>be("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>ze(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:Be,children:[r&&r.db&&r.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",r.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,V==="cards"&&(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsx)(ut,{label:t("total"),value:r?r.total:"\u2014"}),(0,e.jsx)(ut,{label:t("recent"),value:r?r.recent:"\u2014"}),(0,e.jsx)(ut,{label:t("tags"),value:r?r.tags:"\u2014"}),(0,e.jsx)(ut,{label:t("pending"),value:r?.quarantine?.pending??r?.status?.pending??0}),(0,e.jsx)(ut,{label:t("rejected"),value:r?.quarantine?.rejected??r?.status?.rejected??0}),(0,e.jsx)(ut,{label:t("cardCount"),value:r?r.byKind?.knowledge??0:"\u2014"})]}),V==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:A,onChange:b=>lt(b.target.value)}),K&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>qe(""),children:["\u{1F3F7} ",K," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:Q,type:"file",accept:".json,application/json",style:{display:"none"},onChange:it}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Q.current&&Q.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>R({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ce,onClick:()=>Ge("md"),children:t(ce?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ce,onClick:()=>Ge("json"),children:t(ce?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Te(),children:t("refresh")})]}),V==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[Ht.map(b=>(0,e.jsx)("button",{type:"button",className:`mc-chip${S===b?" active":""}`,onClick:()=>We(b),children:t(b==="all"?"all":Ke[b])},b)),(0,e.jsxs)("select",{value:te,onChange:b=>de(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),na(rt).map(b=>(0,e.jsx)("option",{value:b,children:b},b))]}),(0,e.jsxs)("select",{value:G,onChange:b=>ee(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(b=>(0,e.jsx)("button",{type:"button",className:`mc-chip${Ne===b.key?" active":""}`,onClick:()=>g(b.key),children:b.label},b.key))]}),B&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",B]}),(0,e.jsx)("div",{style:{display:V==="cards"?"contents":"none"},children:j?(0,e.jsx)("div",{className:"mc-empty",children:t("loading")}):B?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",B," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Te(),children:t("retry")})]}):D.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"mc-grid",children:ve.map(b=>(0,e.jsx)(Pa,{card:b,t,query:A.trim(),onOpen:ot,onDelete:nt,onTagClick:qe},b.path))}),D.length<c&&(0,e.jsx)("div",{ref:we,style:{height:1}}),H&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",D.length," / ",c,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:V==="graph"?"flex":"none",flex:1,minHeight:0},children:L.has("graph")&&(0,e.jsx)(Wa,{t,onOpen:ot,all:Le,onAllChange:Me,onMutate:he,active:V==="graph",visible:V==="graph"})}),(0,e.jsx)("div",{style:{display:V==="config"?"contents":"none"},children:L.has("config")&&(0,e.jsx)(ra,{t,onReload:()=>Te(),version:T})}),(0,e.jsx)("div",{style:{display:V==="stats"?"contents":"none"},children:L.has("stats")&&(0,e.jsx)(ja,{t,tab:"stats",onReload:()=>Te(),version:T})}),(0,e.jsx)("div",{style:{display:V==="audit"?"contents":"none"},children:L.has("audit")&&(0,e.jsx)(La,{t,onReload:()=>Te(),version:T})}),(0,e.jsx)("div",{style:{display:V==="optimize"?"contents":"none"},children:L.has("optimize")&&(0,e.jsx)(Fa,{t,onReload:()=>Te(),version:T})}),Qe&&(0,e.jsx)(Oa,{t,onClose:()=>ze(!1)}),ae&&(0,e.jsx)(Ea,{t,card:ae,query:A.trim(),onNavigate:b=>{let n=ve.findIndex(w=>w.path===ae.path),x=ve[n+b];x&&Z(x)},onTagClick:qe,onClose:()=>Z(null),onDelete:b=>{Z(null),nt(b)},onFeedback:b=>{let n=ae.path;fetch(`${$}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:A.trim(),path:n,useful:b})}).then(()=>oe({ok:!0,msg:t(b?"fbUseful":"fbIrr")})).catch(()=>{}),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>oe(null),2e3)}}),(0,e.jsx)(Ha,{t,newCard:l,setNewCard:R,onCreated:()=>{Te(),he(),oe({ok:!0,msg:t("created")}),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>oe(null),2e3)}})]})]})]})}var ia=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null,ut=({label:t,value:i})=>(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:i}),(0,e.jsx)("span",{children:t})]});function ra({t,onReload:i,version:s,compact:u}){let[p,r]=(0,o.useState)(null),[v,D]=(0,o.useState)(0),[N,j]=(0,o.useState)(null),[C,k]=(0,o.useState)(null),[m,B]=(0,o.useState)(!1),[P,S]=(0,o.useState)(!1),I=(0,o.useRef)(!1),A=(0,o.useRef)(null),_=(0,o.useRef)({}),[te,de]=(0,o.useState)(null),[G,ee]=(0,o.useState)(null),[K,pe]=(0,o.useState)(""),[V,M]=(0,o.useState)(""),[L,fe]=(0,o.useState)(""),[be,Ne]=(0,o.useState)(null),[g,Re]=(0,o.useState)(null),oe=(0,o.useCallback)(async(n,x=!1)=>{x||M("version");try{let w=await fetch($+"/version-check"+(n?"?force=1":"")).then(E=>E.json());w&&w.ok?(Re(w),n&&Z(w.updateAvailable?t("vcLatest")+" v"+w.latest:t("vcUpToDate"))):n&&Z(t("vcCheckFail"),!1)}catch{n&&Z(t("vcCheckFail"),!1)}finally{x||M("")}},[t]);(0,o.useEffect)(()=>{oe(!1);let n=setInterval(()=>{oe(!1,!0)},6e4),x=()=>{typeof document<"u"&&!document.hidden&&oe(!1,!0)};return document.addEventListener("visibilitychange",x),()=>{clearInterval(n),document.removeEventListener("visibilitychange",x)}},[s,oe]);let[h,Q]=(0,o.useState)(""),[ce,ue]=(0,o.useState)(null),ae=(0,o.useRef)(null),Z=(n,x=!0)=>{ae.current&&clearTimeout(ae.current),ue({msg:n,ok:x}),ae.current=setTimeout(()=>ue(null),1900)},Le=async()=>{if(!V){M("restart");try{let n=await fetch($+"/restart-self",{method:"POST"});if(n.status===404||n.status===405){Z(J("vcRestartNoRoute",{cmd:g&&g.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let x=await n.json().catch(()=>null);if(!x){Z(t("vcRestartFail")+"\uFF08HTTP "+n.status+"\uFF09",!1);return}if(!x.ok){Z(x.error||t("vcRestartFail"),!1);return}if(x.alreadyCurrent){Z(x.note||t("vcRestartCurrent"));return}Z(x.note||t("vcRestartSent")),x.alreadyRunning||setTimeout(()=>{oe(!0)},6e3)}catch(n){Z(t("vcRestartFail")+"\uFF1A"+String(n&&n.message||n),!1)}finally{M("")}}},Me=g&&g.resident?String(g.resident.served||""):"",Qe=!!(g&&g.onDisk&&Me&&Me!==g.onDisk),ze=!!(g&&g.resident&&g.resident.managed===!1&&g.resident.managedKnown===!1),ke=g&&g.resident&&g.resident.replaceBlocked&&g.resident.replaceBlocked.fresh||null,je=!!(g&&g.resident&&g.resident.managedBy==="host"),l=!!(g&&g.resident&&g.resident.managed===!1&&!ze&&!je),R=!!(g&&g.resident&&!Me),T=Qe||R||l||ze,q=Kt({hasVersion:!!g,hostVersion:g?g.loaded:"",onDisk:g?g.onDisk:"",residentServed:g&&g.resident?g.resident.served:"",residentPresent:!!(g&&g.resident),residentManaged:g&&g.resident?g.resident.managed:null,residentManagedKnown:g&&g.resident?g.resident.managedKnown:null,residentManagedBy:g&&g.resident?g.resident.managedBy:"",replaceBlocked:g&&g.resident?g.resident.replaceBlocked:null}),he={hostProcessStale:()=>J("vcHostProcessStale",{disk:g.onDisk,loaded:g.loaded}),residentDown:()=>J("vcResidentDown",{port:g.resident&&g.resident.port||"",cmd:g.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>J("vcResidentReplaceBlocked",{served:Me,err:ke&&ke.error||"",path:ke&&ke.lockPath||"",cmd:g.restartCommand||"dsh-memory restart --port "+(g.resident&&g.resident.port||7999)}),residentLockUnknown:()=>J("vcResidentLockUnknown",{served:Me,path:g.resident&&g.resident.lock&&g.resident.lock.path||"",err:g.resident&&g.resident.lock&&g.resident.lock.error||""}),residentUnmanaged:()=>J("vcResidentUnmanaged",{served:Me,cmd:g.restartCommand||"dsh-memory restart --port 7999"})},Y={restartStart:()=>J("vcRestartStart",{disk:g&&g.onDisk||""}),restartRepair:()=>J("vcRestartRepair",{disk:g&&g.onDisk||""}),restartFixes:()=>J("vcRestartFixes",{served:Me||"",disk:g&&g.onDisk||""}),restartHostOnly:()=>J("vcRestartHostOnly",{loaded:g&&g.loaded||"",disk:g&&g.onDisk||""}),restartAnyway:()=>J("vcRestartAnyway",{ver:g&&g.onDisk||""})},J=(n,x)=>Object.keys(x).reduce((w,E)=>w.split("{"+E+"}").join(x[E]),t(n)),ie=(0,o.useCallback)(async()=>{try{let[n,x,w,E]=await Promise.all([fetch(`${$}/config`).then(U=>U.json()).catch(()=>null),fetch(`${$}/setup-status`).then(U=>U.json()).catch(()=>null),fetch(`${$}/budget`).then(U=>U.json()).catch(()=>null),fetch(`${$}/llm-routes`).then(U=>U.json()).catch(()=>null)]);if(E&&E.ok&&Ne(E),n&&n.ok){r(n),D(n.revision??0),j(n.schema??null);let U=Zt(n.config??{},_.current);_.current=U.overlay,k({...U.values}),de(n.dsh??null),B(n.writable===!1),S(n.viaPending===!0),pe(""),I.current=!1}else w&&w.ok?(k({...w}),B(!0),pe(t("configNeedsDsh"))):pe(t("adminLoadFail"));x&&x.ok&&ee(x),fe("")}catch{pe(t("adminLoadFail"))}},[t]);(0,o.useEffect)(()=>{ie()},[s,ie]);let c=(n,x)=>{I.current=!0,k(w=>({...w??{},[n]:x}))};(0,o.useEffect)(()=>{A.current=ie},[ie]),(0,o.useEffect)(()=>{if(typeof EventSource>"u")return;let n=null;try{n=new EventSource($+"/events")}catch{return}let x=()=>{!I.current&&typeof A.current=="function"&&A.current()};try{n.addEventListener("config",x)}catch{}return()=>{try{n.close()}catch{}}},[]);let d=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars"]),H=n=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[n]||n,me=async()=>{if(!C)return;if(m){Z(t("editInSetting"),!1);return}let n={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9]},x=[];for(let[w,[E,U]]of Object.entries(n)){if(!(w in C))continue;let O=C[w],ne=typeof O=="number"?O:Number(O);(O===""||O===null||O===void 0||!Number.isFinite(ne)||ne<E||ne>U)&&x.push(t("invalidField",{field:w,min:E,max:U,value:String(O===""?"\u7A7A":O)}))}if(x.length){let w=t("saveInvalid")+"\uFF1A"+x.join("\uFF1B");pe(w),Z(w,!1);return}M("save");try{let w={...C};for(let ne of Object.keys(C))ne in w&&typeof w[ne]=="string"&&w[ne].trim()!==""&&d.has(ne)&&(w[ne]=Number(w[ne]));Array.isArray(w.vaultProfiles)&&(w.vaultProfiles=w.vaultProfiles.filter(ne=>ne&&(String(ne.name||"").trim()||String(ne.path||"").trim())));let E=await fetch(`${$}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:w,expectedRevision:v})}),U=await E.text(),O=null;try{O=U?JSON.parse(U):null}catch{O=null}if(O||(O={error:"HTTP "+E.status+(U?"\uFF1A"+U.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),O&&O.ok){let ne=typeof O.pendingOutcome=="string"?O.pendingOutcome:"",Se,Ae=!0;if(ne==="applied")Se=t("savedApplied")+(Array.isArray(O.applied)&&O.applied.length?" \xB7 "+O.applied.join("\u3001"):"");else if(ne==="queued")Ae=!1,Se=t("saveQueued");else if(ne==="failed")Ae=!1,Se=t("saveFail")+" \xB7 "+(O.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(ne==="applied-direct")Se=t("savedOk")+" \xB7 "+t("savedDirect");else{let Fe=Array.isArray(O.pending)&&O.pending.length?" \xB7 "+t("savePending"):O.note?" \xB7 "+t("restartHint"):"";Se=(O.retried?"\u267B ":"")+t("savedOk")+Fe}_.current={..._.current,...w},Ae?fe(Se):pe(Se),Z(Se,Ae),await ie()}else{let ne=E.status===409?t("conflictRefresh"):O?.error||t("saveFail");pe(ne),Z(ne,!1)}}catch{pe(t("saveFail")),Z(t("saveFail"),!1)}finally{M("")}},we=()=>{_.current={},k({...p?.config??{}}),fe("")},Be={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},a=n=>Array.isArray(n?.vaultProfiles)?n.vaultProfiles:[],Te=(n,x,w)=>k(E=>{let U=a(E).map(ne=>({...ne||{}})),O={...U[n]||{}};return x==="match"?String(w).trim()?O.match={...O.match||{},workspace:w}:delete O.match:O[x]=w,U[n]=O,{...E??{},vaultProfiles:U}}),nt=()=>k(n=>({...n??{},vaultProfiles:[...a(n),{name:"",path:""}]})),lt=n=>k(x=>({...x??{},vaultProfiles:a(x).filter((w,E)=>E!==n)})),We={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},qe={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},ot={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},Ge=async n=>{let x=ot[n];x&&k(w=>({...w??{},...x}))},it=async(n,x)=>{M(n+x);try{let E=await(await fetch(`${$}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:n,action:x})})).json();E&&E.ok?Z(J(x==="install"?"mcpInstalled":"mcpUninstalled",{agent:n})):Z(J("mcpActionFail",{agent:n,error:E?.error||""}),!1);try{let U=await fetch(`${$}/setup-status`).then(O=>O.json());U&&U.ok&&ee(U)}catch{}}catch{Z(t("mergeFail"),!1)}finally{M("")}},ve=({k:n,label:x,type:w="text",step:E,min:U,max:O})=>(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12,minWidth:0},children:[(0,e.jsx)("span",{style:{opacity:.6,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.5},children:x||n}),(0,e.jsx)("input",{type:w,step:E,min:U,max:O,value:C?C[n]??"":"",onChange:ne=>{let Se=ne.target.value;c(n,w==="number"?Se===""?"":Number(Se):Se)},style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12}})]}),rt=new Set(["autoRestartOnDrift"]),b=({k:n,label:x})=>{let w=C?C[n]:void 0,E=w===void 0?rt.has(n):!!w;return(0,e.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",gap:6,fontSize:12,minWidth:0,lineHeight:1.5},children:[(0,e.jsx)("input",{type:"checkbox",checked:E,onChange:U=>c(n,U.target.checked),style:{marginTop:2,flex:"0 0 auto"}}),(0,e.jsx)("span",{style:{whiteSpace:"normal",overflowWrap:"anywhere"},children:x||n})]})};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:u?"0 0 auto":1,minHeight:0,maxHeight:u?"52vh":void 0},children:[(0,e.jsx)("style",{children:Ee}),ce&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(ce.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ce.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ce.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:ce.msg})]}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[K&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",K]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ie,children:["\u21BB ",t("retry")]})]}),P&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),m&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),L&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",L]}),p&&(p.version||p.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),p.version&&(0,e.jsxs)("code",{style:We,children:[t("vcLoaded")," v",p.version]}),g&&g.resident&&g.resident.served&&g.resident.served!==p.version&&(0,e.jsxs)("code",{style:We,children:[t("vcResident")," v",g.resident.served]}),g&&g.resident&&!g.resident.served&&(0,e.jsxs)("code",{style:{...We,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),g&&g.resident&&g.resident.served&&g.resident.managed===!1&&(0,e.jsxs)("code",{style:{...We,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",g.resident.served," \xB7 ",t(ke?"vcResidentReplaceBlockedShort":je?"vcResidentHostManagedShort":ze?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),vt&&(0,e.jsxs)("code",{style:We,children:[t("vcPage")," v",vt]}),g&&g.onDisk&&(0,e.jsxs)("code",{style:We,children:[t("vcOnDisk")," v",g.onDisk]}),g&&g.latest&&(0,e.jsxs)("code",{style:We,children:[t("vcLatest")," v",g.latest]}),p.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",p.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:V==="version",onClick:()=>oe(!0),children:V==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),g&&q.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",he[q.warn]?he[q.warn]():""]})}),q.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(q.emphasis?" me-on":""),disabled:!!V,onClick:Le,children:V==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),g.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:g.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:Y[q.hint]?Y[q.hint]():""})]}),vt&&g&&g.onDisk&&vt!==g.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:vt,disk:g.onDisk})}),g&&g.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:g.updateCommand})]}),g&&g.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",g.checkError]})]}),G&&G.agents&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F50C} ",t("mcpSetupStatus")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("mcpManageHint")})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:G.agents.map(n=>(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1},children:[(0,e.jsx)("b",{children:n.isDsh?t("dshHostLabel"):n.name}),n.isDsh&&n.version&&(0,e.jsxs)("span",{style:{marginLeft:6,fontSize:11,opacity:.5},children:["v",n.version]}),!n.installed&&(0,e.jsxs)("span",{style:{marginLeft:6,opacity:.6},children:["(",t("notInstalled"),")"]}),n.installed&&n.mcpConfigured===!1&&(0,e.jsxs)("span",{style:{marginLeft:6,color:"#f59e0b"},children:["(",t("noMcpEntry"),")"]}),n.mcpConfigured===!0&&(0,e.jsxs)("span",{style:{marginLeft:6,color:"#10b981"},children:["\u2713 ",t("healthy")]}),n.mcpConfigured===!0&&n.mcpMatchesCurrentNode===!1&&(0,e.jsxs)("span",{style:{marginLeft:6,color:"#9ca3af",fontSize:10},children:["(",t("nodePathNote"),")"]}),n.isDsh&&(0,e.jsxs)("span",{style:{marginLeft:6,opacity:.6,fontSize:11},children:["(",t("recallTool"),": ",n.recallTool?t("enabled"):t("disabled"),")"]})]}),n.hook&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.7},children:["hook: ",n.hook]}),!n.isDsh&&n.installed&&n.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!V,onClick:()=>it(n.name,"install"),children:t("installMcp")}),!n.isDsh&&n.installed&&n.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!V,onClick:()=>{window.confirm(t("uninstallConfirm"))&&it(n.name,"uninstall")},children:t("uninstallMcp")})]},n.name))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),h&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:h})})]}),C?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #3b82f6"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("presetConfig")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("presetHint")})]}),(0,e.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:["A","B","C"].map(n=>(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Ge(n),disabled:!!V,children:[n==="A"?"\u{1F7E2} ":n==="B"?"\u{1F4B0} ":"\u2B50 ",ot[n].label]},n))})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:[(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9E0} ",t("dshMemoryConfig")]})}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:8},children:[(0,e.jsx)(b,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(b,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(ve,{k:"captureMinChars",label:t("captureMinChars"),type:"number"}),(0,e.jsx)(ve,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),type:"number"}),(0,e.jsx)(ve,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(ve,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(ve,{k:"recallSummaryLen",label:t("recallSummaryLen"),type:"number"}),(0,e.jsx)(b,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(ve,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(ve,{k:"recallEmbedding",label:t("recallEmbedding")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #06b6d4"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F5C2}\uFE0F ",t("vaultMulti")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("vaultMultiHint")})]}),(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:te?.vaultDir||"\u2014"}),te?.vaultName?`\uFF08${te.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(Be[te?.vaultSource]||"vaultSrcDefault"),te?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:te.workspace})]}):null]}),a(C).map((n,x)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:n.name||"",placeholder:t("vaultNamePh"),onChange:w=>Te(x,"name",w.target.value),style:qe,disabled:m}),(0,e.jsx)("input",{value:n.path||"",placeholder:t("vaultPathPh"),onChange:w=>Te(x,"path",w.target.value),style:qe,disabled:m}),(0,e.jsx)("input",{value:n.match&&n.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:w=>Te(x,"match",w.target.value),style:qe,disabled:m}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>lt(x),disabled:m,title:t("delete"),children:"\u2715"})]},x)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:nt,disabled:m,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:C.activeVault||"",onChange:n=>c("activeVault",n.target.value),disabled:m,style:qe,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),a(C).filter(n=>n&&n.name).map(n=>(0,e.jsx)("option",{value:n.name,children:n.name},n.name))]})]})]})]}),(0,e.jsx)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:8},children:[(0,e.jsx)(b,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(ve,{k:"vaultDir",label:t("vaultDirLabel")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #f59e0b"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4B0} ",t("costControl")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("costHint")})]}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:8,marginTop:6},children:[(0,e.jsx)(b,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(b,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(ve,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(ve,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(ve,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(ve,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),be&&be.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",J("routeListFail",{err:be.error||"\u672A\u77E5\u539F\u56E0"})]}),be&&be.providers&&be.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:3,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("captureProvider")}),(0,e.jsxs)("select",{value:C.captureProvider||"",onChange:n=>{c("captureProvider",n.target.value),c("captureModel","")},style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),be.providers.map(n=>(0,e.jsx)("option",{value:n.id,children:n.label},n.id))]})]}),(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:3,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("captureModel")}),(0,e.jsxs)("select",{value:C.captureModel||"",onChange:n=>c("captureModel",n.target.value),style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((be.providers.find(n=>n.id===C.captureProvider)||{}).models||[]).map(n=>(0,e.jsx)("option",{value:n.id,children:n.label||n.id},n.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ve,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(ve,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(b,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(b,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(ve,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!V,onClick:async()=>{M("llmtest");try{let n=await fetch($+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:C.captureProvider||"",model:C.captureModel||"",firstOnly:C.captureFirstOnly===!0})}).then(x=>x.json());n&&n.ok?Z(t("llmTestOk")+"\uFF1A"+n.route.provider+(n.route.model?"/"+n.route.model:"")+" \xB7 "+n.ms+"ms \xB7 "+t("llmCandidates")+" "+n.candidates):Z(t("llmTestFail")+"\uFF1A"+(n&&(n.failure?n.failure.code+" "+n.failure.message:n.error)||"?"),!1)}catch(n){Z(t("llmTestFail")+"\uFF1A"+String(n&&n.message||n),!1)}finally{M("")}},children:V==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #8b5cf6"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("auditConfig")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("auditHint")})]}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:8},children:[(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12,minWidth:0},children:[(0,e.jsx)("span",{style:{opacity:.6,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.5},children:t("auditMode")}),(0,e.jsxs)("select",{value:C.auditMode??"all",onChange:n=>c("auditMode",n.target.value),style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(ea,{label:t("auditExemptAgents"),value:C.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(G?.agents||[]).filter(n=>!n.isDsh).map(n=>({value:n.name,label:n.name}))],onChange:n=>c("auditExemptAgents",n)}),(0,e.jsx)(ea,{label:t("auditExemptKinds"),value:C.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...Ht.filter(n=>n!=="all").map(n=>({value:n,label:t(Ke[n])}))],onChange:n=>c("auditExemptKinds",n)}),(0,e.jsx)(ve,{k:"recycleRetentionDays",label:t("recycleDays"),type:"number"})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:[(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E0} ",t("serviceConfig")]})}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:8},children:[(0,e.jsx)(b,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:3,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("autoWebMode")}),(0,e.jsxs)("select",{value:C.autoWebMode??"init",onChange:n=>c("autoWebMode",n.target.value),style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(ve,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(ve,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(ve,{k:"webMaxRestart",label:t("webMaxRestart"),type:"number"}),(0,e.jsx)(b,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(b,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(b,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",alignItems:"center",marginBottom:10,flexWrap:"wrap"},children:[V==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),L&&V!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",L]}),K&&V!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",K]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:we,disabled:!!V,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:m?()=>Z(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):me,disabled:V==="save",title:t(m?"readonlyBody":"saveConfig"),children:V==="save"?"\u23F3 "+t("saving"):m?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})}function La({t,onReload:i,version:s}){let[u,p]=(0,o.useState)([]),[r,v]=(0,o.useState)([]),[D,N]=(0,o.useState)("all"),[j,C]=(0,o.useState)("all"),[k,m]=(0,o.useState)(""),[B,P]=(0,o.useState)(new Set),[S,I]=(0,o.useState)(""),[A,_]=(0,o.useState)(null),[te,de]=(0,o.useState)("pending"),G=(h,Q=!0)=>{_({msg:h,ok:Q}),setTimeout(()=>_(null),3e3)},ee=[...new Set([...u,...r].map(h=>h.submittedBy).filter(Boolean))],K=(0,o.useCallback)(async()=>{try{let h=await fetch(`${$}/audit/list`).then(Q=>Q.json());h.ok&&(p(h.pending||[]),v(h.rejected||[]),P(new Set),fe(new Set),Ne({}))}catch{}},[]);(0,o.useEffect)(()=>{K()},[s,K]);let pe=(te==="pending"?u:r).filter(h=>{if(D!=="all"&&h.kind!==D||j!=="all"&&ft(h.submittedBy)!==j)return!1;if(k){let Q=(h.created||"").slice(0,10);if(Q&&Q!==k)return!1}return!0}),V=h=>P(Q=>{let ce=new Set(Q);return ce.has(h)?ce.delete(h):ce.add(h),ce}),M=async(h,Q)=>{let ce=Q||[...B];if(!ce.length){G(t("noSelection"),!1);return}I("apply");let ue=t(h==="approved"?"toastApproved":h==="rejected"?"toastRejected":"toastCardDeleted");try{let ae=0;for(let Z of ce){let Le=h==="approved"?"audit/approve":h==="rejected"?"audit/reject":"delete";try{(await fetch($+"/"+Le+"?path="+encodeURIComponent(Z)+(h==="delete"?"&permanent=0":""))).ok||ae++}catch{ae++}}await K(),i&&i(),ae?G(t("toastFailed")+"\uFF08"+ae+"/"+ce.length+"\uFF09",!1):G(ue+" "+ce.length+" \u5F20")}catch(ae){G(t("toastFailed")+": "+String(ae&&ae.message||ae),!1)}finally{I("")}},[L,fe]=(0,o.useState)(new Set),[be,Ne]=(0,o.useState)({}),g=h=>be[h]||{},Re=async h=>{let Q=h.path,ce=!L.has(Q);if(fe(ue=>{let ae=new Set(ue);return ce?ae.add(Q):ae.delete(Q),ae}),!(!ce||be[Q])){Ne(ue=>({...ue,[Q]:{loading:!0}}));try{let ue=h.status||(te==="pending"?"pending":"rejected"),ae=await fetch(`${$}/card?path=${encodeURIComponent(Q)}&status=${ue}`).then(Z=>Z.json());ae&&ae.ok?Ne(Z=>({...Z,[Q]:{text:ae.text||""}})):Ne(Z=>({...Z,[Q]:{error:ae&&ae.error||"HTTP"}}))}catch(ue){Ne(ae=>({...ae,[Q]:{error:String(ue&&ue.message||ue)}}))}}},oe=[...B];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ia,{toast:A}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("select",{value:D,onChange:h=>N(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("all")}),Ht.filter(h=>h!=="all").map(h=>(0,e.jsx)("option",{value:h,children:t(Ke[h])},h))]}),(0,e.jsxs)("select",{value:j,onChange:h=>C(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),na(ee).map(h=>(0,e.jsx)("option",{value:h,children:h},h))]}),(0,e.jsx)("input",{type:"date",value:k,onChange:h=>m(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${te==="pending"?" me-on":""}`,onClick:()=>de("pending"),children:[t("pending"),"\uFF08",u.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${te==="rejected"?" me-on":""}`,onClick:()=>de("rejected"),children:[t("rejected"),"\uFF08",r.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:pe.length>0&&oe.length===pe.length,onChange:h=>{h.target.checked?P(new Set(pe.map(Q=>Q.path))):P(new Set)}})," ",t("selectAll")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!oe.length||!!S,onClick:()=>M("approved"),children:["\u2713 ",t(te==="rejected"?"restore":"approve")]}),te==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!oe.length||!!S,onClick:()=>M("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!oe.length||!!S,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&M("delete")},children:["\u{1F5D1} ",t("restoreDelete")]})]}),pe.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:pe.map(h=>{let Q=g(h.path),ce=L.has(h.path);return(0,e.jsxs)("div",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 4px",fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:B.has(h.path),onChange:()=>V(h.path)}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"0 6px"},title:t(ce?"collapse":"expand"),"aria-expanded":ce,onClick:()=>Re(h),children:ce?"\u25BE":"\u25B8"}),(0,e.jsx)("span",{className:"mc-kind",style:{background:Ve[h.kind]||"#999"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"},title:t(ce?"collapse":"expand"),onClick:()=>Re(h),children:h.title}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.6},children:ft(h.submittedBy)}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.6},children:h.created?h.created.slice(0,16).replace("T"," "):"-"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.6},children:h.kind}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.6,color:h.severity==="high"?"#f87171":"#9ca3af"},children:h.severity}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.6,maxWidth:120,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.reason||"-"}),te==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>M("approved",[h.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>M("rejected",[h.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>M("approved",[h.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&M("delete",[h.path])},children:"\u{1F5D1}"})]})]}),ce&&(0,e.jsxs)("div",{style:{padding:"2px 10px 12px 34px"},children:[Q.loading&&(0,e.jsxs)("div",{style:{fontSize:12,opacity:.6},children:["\u23F3 ",t("loading")]}),Q.error&&(0,e.jsxs)("div",{style:{fontSize:12,color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Q.error]}),Q.text!=null&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"md-meta",style:{marginBottom:6},children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:Ve[h.kind]||"#6B7280",borderColor:(Ve[h.kind]||"#6B7280")+"59",background:(Ve[h.kind]||"#6B7280")+"1a"},children:[kt[h.kind]||"\u{1F4CE}"," ",t(Ke[h.kind]||"kindKnowledge")]}),(Array.isArray(h.tags)?h.tags:[]).slice(0,8).map(ue=>(0,e.jsxs)("span",{className:"md-chip md-chip-tag",children:["\u{1F3F7} ",ue]},ue)),!!h.reason&&(0,e.jsxs)("span",{className:"md-chip md-chip-st-warn",children:["\u2691 ",h.reason]})]}),(0,e.jsx)("div",{className:"md-doc",style:{maxHeight:340,overflow:"auto"},dangerouslySetInnerHTML:{__html:At(Dt(Q.text).body)}}),te==="pending"&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!S,onClick:()=>M("approved",[h.path]),children:["\u2713 ",t("approve")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!S,onClick:()=>M("rejected",[h.path]),children:["\u2715 ",t("reject")]})]})]})]})]},h.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t("noAuditItems")})]})]})}function Fa({t,onReload:i,version:s}){let[u,p]=(0,o.useState)([]),[r,v]=(0,o.useState)(""),[D,N]=(0,o.useState)(null),j=(m,B=!0)=>{N({msg:m,ok:B}),setTimeout(()=>N(null),3200)},C=(0,o.useCallback)(async()=>{try{let m=await fetch(`${$}/recycle/list`).then(B=>B.json());m.ok&&p(m.items||[])}catch{}},[]);(0,o.useEffect)(()=>{C()},[s,C]);let k=async(m,B)=>{let P=(u.find(S=>S.path===B)||{}).title||B;v(m+B);try{let I=await fetch($+(m==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(B)),A=await I.json().catch(()=>null);await C(),i&&i(),I.ok&&(!A||A.ok!==!1)?j(t(m==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+P):j(t("toastFailed")+"\uFF1A"+(A&&A.error||"HTTP "+I.status),!1)}catch(S){j(t("toastFailed")+"\uFF1A"+String(S&&S.message||S),!1)}finally{v("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ia,{toast:D}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F5D1}\uFE0F ",t("tabRecycle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("recycleHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!r||u.length===0,title:u.length?"":t("emptyRecycle"),onClick:async()=>{v("purgeAll");try{let m=await fetch($+"/recycle/purge-expired?days=0"),B=await m.json().catch(()=>null);await C(),j(m.ok?t("toastPurgedExpired")+(B&&B.purged!=null?"\uFF08"+B.purged+"\uFF09":""):t("toastFailed"),m.ok)}catch(m){j(t("toastFailed")+"\uFF1A"+String(m&&m.message||m),!1)}finally{v("")}},children:t("emptyRecycle")})]}),u.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:u.map(m=>(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ve[m.kind]||"#999"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m.title}),(0,e.jsxs)("span",{style:{fontSize:10,opacity:.6},children:[t("deletedAt")," ",(m.deletedAt||"").slice(0,10)]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!r,onClick:()=>k("restore",m.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!r,onClick:()=>{window.confirm(t("purgeConfirm"))&&k("purge",m.path)},children:t("purge")})]},m.path))}):(0,e.jsxs)("div",{className:"mc-card",style:{padding:18,fontSize:12.5,opacity:.78,textAlign:"center",lineHeight:1.9},children:["\u{1F5D1}\uFE0F ",t("emptyRecycle"),(0,e.jsx)("br",{}),(0,e.jsx)("span",{style:{fontSize:11.5},children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var Pa=({card:t,t:i,onOpen:s,query:u,onDelete:p,onTagClick:r})=>(0,e.jsxs)("article",{className:"mc-cardrow mc-card",onClick:()=>s(t),children:[(0,e.jsxs)("h4",{children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ve[t.kind]||Ve.other}}),(0,e.jsx)("span",{style:{marginRight:4},children:kt[t.kind]||"\u{1F4CE}"}),u?Pt(t.title,u):t.title,Ka(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:i("newBadge")}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",i("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#ef4444"},children:["\u274C ",i("statusRejected")]}),(!t.status||t.status==="approved")&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#10b981"},children:["\u2705 ",i("statusApproved")]})]}),(0,e.jsx)("p",{children:u?Pt(t.summary||"",u):t.summary||""}),u&&(()=>{let v=Ut(t.body||"",u);return v?(0,e.jsx)("p",{className:"mc-snippet",children:Pt(v,u)}):null})(),Qt(t).length>0&&(0,e.jsx)("div",{className:"mc-tags",children:Qt(t).slice(0,4).map(v=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:v,onClick:D=>{D.stopPropagation(),r&&r(v)},children:["\u{1F3F7} ",v]},v))}),(0,e.jsxs)("footer",{children:[(0,e.jsxs)("span",{children:[kt[t.kind]||"\u{1F4CE}"," ",i(Ke[t.kind])]}),(0,e.jsxs)("span",{style:{fontSize:10,opacity:.6},children:["\u{1F916} ",ft(t.submittedBy)]}),(0,e.jsxs)("span",{children:["\u{1F4C5} ",gt(t.updated)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:i("delete"),onClick:v=>{v.stopPropagation(),window.confirm(i("deleteConfirm"))&&p&&p(t.path)},children:"\u{1F5D1}"})]})]});function ja({t,tab:i,onReload:s,version:u}){let[p,r]=(0,o.useState)(null),[v,D]=(0,o.useState)(""),[N,j]=(0,o.useState)(null),[C,k]=(0,o.useState)(null),[m,B]=(0,o.useState)(null),[P,S]=(0,o.useState)(null),[I,A]=(0,o.useState)(null),_=(0,o.useCallback)(async()=>{K("align");try{let l=await fetch($+"/align").then(R=>R.json());l&&l.findings?A(l):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{K("")}},[t]),te=async()=>{if(window.confirm(t("alignFixConfirm"))){K("alignfix");try{let l=await fetch($+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(R=>R.json());l&&l.ok?(notify(t("alignFixed")),await _()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{K("")}}},[de,G]=(0,o.useState)([]),[ee,K]=(0,o.useState)(""),[pe,V]=(0,o.useState)(!1),M=(0,o.useCallback)(async()=>{if(!(!N||!N.merge||!N.merge.length)&&window.confirm(t("mergeAllConfirm"))){K("merge");try{let l={},R=J=>l[J]===void 0?J:l[J]=R(l[J]),T=(J,ie)=>{l[R(J)]=R(ie)},q=new Set;for(let J of N.merge)q.add(J.a.path),q.add(J.b.path),T(J.a.path,J.b.path);let he={};for(let J of q){let ie=R(J);(he[ie]=he[ie]||[]).push(J)}let Y=0;for(let J of Object.values(he)){if(J.length<2)continue;(await fetch(`${$}/merge?paths=${encodeURIComponent(J.join(","))}`).then(c=>c.json())).ok&&Y++}await L(),s&&s()}catch{}K("")}},[N,L,s,t]);async function L(){try{let l=await Promise.all([fetch(`${$}/stats`),fetch(`${$}/budget`),fetch(`${$}/capture-log`),fetch(`${$}/cards?status=all&limit=30&agent=${xt}`),fetch(`${$}/overview`)]),[R,T,q,he,Y]=await Promise.all(l.map(J=>J.json()));R&&R.ok&&r(R),T&&T.ok&&k(T),q&&q.ok&&B(q),he&&he.ok&&G(he.cards||[]),Y&&Y.ok&&S({db:Y.db,backups:Y.backups,total:Y.total,degraded:Y.degraded===!0}),D(!R||!R.ok?t("adminLoadFail"):"")}catch{D(t("adminLoadFail"))}}let fe=(0,o.useCallback)(async()=>{K("scan");try{let l=await fetch(`${$}/optimize`).then(R=>R.json());l.ok&&j(l)}catch{D(t("adminLoadFail"))}finally{K("")}},[t]),[be,Ne]=(0,o.useState)(null),g=(0,o.useCallback)(async()=>{K("refine");try{let l=await fetch(`${$}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(R=>R.json());l&&l.ok?Ne(l):notify(l&&l.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{K("")}},[t]),Re=async(l,R)=>{if(!(R==="merge"&&!window.confirm(t("mergeConfirm")))){K("refineapply");try{let T=await fetch(`${$}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:l.a.path,b:l.b.path,action:R,relation:l.relation})}).then(q=>q.json());T&&T.ok?(notify(t("refineApplied")),Ne(q=>q&&{...q,findings:(q.findings||[]).filter(he=>!(he.a.path===l.a.path&&he.b.path===l.b.path))}),await L(),s&&s()):notify(T&&T.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{K("")}}},[oe,h]=(0,o.useState)(null),Q=(0,o.useCallback)(async()=>{K("junk");try{let l=await fetch(`${$}/refine-junk`).then(R=>R.json());l&&l.ok?h(l.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{K("")}},[t]),ce=async l=>{if(l.length&&window.confirm(t("junkRecycleAllConfirm"))){K("junkpurge");try{let R=await fetch(`${$}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:l})}).then(T=>T.json());R&&R.removed?(notify(t("junkDone")+"\uFF1A"+R.removed.length+(R.failed?.length?"\uFF08\u5931\u8D25 "+R.failed.length+"\uFF09":"")),h(T=>T&&T.filter(q=>!R.removed.includes(q.path))),await L(),s&&s()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{K("")}}},[ue,ae]=(0,o.useState)(null),Z=(0,o.useCallback)(async()=>{K("goals");try{let l=await fetch($+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(R=>R.json());l&&l.ok?ae(l):notify(l&&l.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{K("")}},[t]),Le=async l=>{K("goalskeep");try{let R=await fetch($+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:l.members.map(T=>T.path)})}).then(T=>T.json());R&&R.ok?(notify(t("goalDone")),ae(T=>T&&{...T,clusters:(T.clusters||[]).filter(q=>q.goal!==l.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{K("")}},Me=async l=>{if(window.confirm(t("mergeConfirm"))){K("goalsmerge");try{let R=await fetch($+"/merge?paths="+encodeURIComponent(l.members.map(T=>T.path).join(","))).then(T=>T.json());R&&R.ok?(notify(t("goalMerged")),ae(T=>T&&{...T,clusters:(T.clusters||[]).filter(q=>q.goal!==l.goal)}),await L(),s&&s()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{K("")}}};(0,o.useEffect)(()=>{L()},[u]);let Qe=async(l,R)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${$}/merge?paths=${encodeURIComponent(l+","+R)}`).then(q=>q.json())).ok&&(await L(),s&&s())}catch{}},ze=async l=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${$}/delete?path=${encodeURIComponent(l)}`).then(T=>T.json())).ok&&(await L(),s&&s())}catch{}},ke=["project","knowledge","content","prompt","business","tool","mistake"],je=({title:l,kind:R,updated:T,path:q})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[R]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:gt(T)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>ze(q),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[v&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",v]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:L,children:["\u21BB ",t("retry")]})]}),i==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>L(),children:["\u21BB ",t("refresh")]})]}),P?(()=>{let l=P.db||{},R=l.writable!==!1&&!l.corrupt,T=P.backups||{count:0,newestAt:0},q=T.newestAt?Math.floor((Date.now()-Number(T.newestAt))/864e5):-1,he=T.count?q>7?"warn":"ok":"bad",Y=m&&m.available?m.health:null,J=Y?Y.ok?"ok":"warn":"none",ie=I&&I.findings?I.onDisk&&I.residentServed===I.onDisk&&I.hostVersion===I.onDisk?"ok":"warn":"none",c={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},d=[{label:t("healthDb"),level:R?"ok":"bad",text:R?"journal="+(l.journalMode||"?")+(l.checkedAt?" \xB7 "+new Date(l.checkedAt).toLocaleString():""):(l.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:he,text:T.count?(q<=0?t("healthBackupToday").replace("{n}",String(T.count)):t("healthBackupAge").replace("{n}",String(T.count)).replace("{d}",String(q)))+(T.files&&T.files.length?" \xB7 "+T.files[T.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:J,text:Y?Y.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(Y.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:ie,text:ie==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(I.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(I.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(I.hostVersion||"?"),action:ie==="none"?{label:t("alignRun"),run:_}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:d.map(H=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:c[H.level][1]},children:c[H.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:H.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:H.text}),H.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!ee,onClick:H.action.run,children:H.action.label})]},H.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ee,onClick:_,children:t(ee==="align"?"exporting":"alignRun")}),I&&I.counts&&I.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!ee,onClick:te,children:t(ee==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),I&&I.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",I.onDisk||"?",I.residentServed?" \xB7 "+t("alignResident")+" v"+I.residentServed:"",I.hostVersion?" \xB7 "+t("alignHost")+" v"+I.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:I.findings.map((l,R)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:R?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:l.level==="fix"?"#ef4444":l.level==="warn"?"#f59e0b":"#10b981"},children:l.level==="fix"?"\u2717":l.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:l.title}),l.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:l.detail}):null,l.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:l.command})]}):null]},R))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>L(),children:["\u21BB ",t("refresh")]})]}),m?m.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(m.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(m.entries||[]).map((l,R)=>{let T=Ra[l.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:gt(l.time?new Date(l.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:T[1],fontWeight:600},children:[T[0]," ",l.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:l.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:l.preview||"",children:l.preview||""})]},R)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",de.length,"\uFF09"]}),de.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:de.map(l=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ve[l.kind]||Ve.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.title}),l.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:gt(l.updated)})]},l.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),p&&(0,e.jsxs)(e.Fragment,{children:[p.trend&&p.trend.length>0&&(()=>{let l=p.trend,R=Math.max(...l.map(Y=>Y.count),1),T=260,q=50,he=T/l.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:T,height:q,style:{display:"block",width:"100%",height:50},children:l.map((Y,J)=>{let ie=Math.round(Y.count/R*(q-4));return(0,e.jsx)("rect",{x:J*he+1,y:q-ie,width:Math.max(he-2,2),height:ie,rx:1.5,fill:Y.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:Y.count>0?.85:.35},Y.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:p.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:p.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:p.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:p.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:ke.map(l=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[l]||"#666"}}),t(Ke[l]),": ",p.byKind?.[l]||0]},l))})]}),C&&(C.budgetChars||C.recallLimit||C.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:C.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:C.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",C.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",p.todayCards?.length||0,"\uFF09"]}),p.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:p.todayCards.map(l=>(0,e.jsx)(je,{title:l.title,kind:l.kind,updated:l.updated,path:l.path},l.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),i==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ee,onClick:fe,children:ee==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),N&&N.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!ee,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){K("oneclick");try{let l=JSON.stringify({cleanupStale:pe}),T=await(await fetch(`${$}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:l})).json();T&&T.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${T.plan.merged} ${t("optimizedMerged")}${pe?` \xB7 ${T.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await L(),s&&s(),j(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{K("")}}},children:ee==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),N&&N.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:pe,onChange:l=>V(l.target.checked)}),t("oneClickAlsoStale")]})]}),!N&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),N&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),N.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!ee,onClick:M,children:t(ee==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),N.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:N.merge.map((l,R)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[l.a.title," \u21C4 ",l.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(l.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Qe(l.a.path,l.b.path),children:t("mergeNow")})]},R))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",N.stale?.length||0,"\uFF09"]}),N.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!ee,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;K("clean");let l=0;for(let R of N.stale)try{await fetch(`${$}/delete?path=${encodeURIComponent(R.path)}`),l++}catch{}K(""),notify(`${l} ${t("deletedStale")}`),await L(),s&&s()},children:t("cleanStale")})}),N.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:N.stale.map(l=>(0,e.jsx)(je,{title:l.title,kind:"other",updated:l.updated,path:l.path},l.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ee,onClick:g,children:t(ee==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),be?.findings?.length?be.findings.map((l,R)=>(0,e.jsxs)("div",{style:{borderTop:R?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:l.relation==="conflict"?"#ef4444":l.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+l.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",l.sim," \xB7 ",l.useModel||""]}),l.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:l.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",l.a.title,(0,e.jsx)("br",{}),"B\uFF1A",l.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>Re(l,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>Re(l,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>Re(l,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>Re(l,"merge"),children:t("refineMerge")})]})]},R)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(be?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ee,onClick:Q,children:t(ee==="junk"?"exporting":"junkScan")}),oe?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ee,onClick:()=>ce(oe.map(l=>l.path)),children:t(ee==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),oe?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:oe.map((l,R)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:R?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:l.reasons.join("\uFF1B"),children:l.title||l.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:l.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>ce([l.path]),children:t("junkRecycle")})]},R))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(oe?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ee,onClick:Z,children:t(ee==="goals"?"exporting":"goalScan")}),ue?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",ue.cached," / ",ue.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),ue?.clusters?.length?ue.clusters.map((l,R)=>(0,e.jsxs)("div",{style:{borderTop:R?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:l.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",l.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:l.members.map((T,q)=>(0,e.jsx)("li",{children:T.title},q))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>Le(l),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ee,onClick:()=>Me(l),children:t("goalMerge")})]})]},R)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ue?"goalNone":"goalIdle")})]})]})]})]})}var Ft=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function Ha({t,newCard:i,setNewCard:s,onCreated:u}){if(!i)return null;let p=Ft.find(k=>k.key===i.template),r=i.body||(p?t(p.bodyKey):""),v=i.kind||(p?p.kind:"knowledge"),D=i.tags||(p?t(p.tagKey):""),N=i._creating,j=k=>{let m=Ft.find(B=>B.key===k);s(B=>({...B,template:k,kind:m?m.kind:B.kind,body:m?t(m.bodyKey):B.body,tags:m?t(m.tagKey):B.tags}))},C=async()=>{if(!(!i.title&&!r)){s(k=>({...k,_creating:!0}));try{(await fetch(`${$}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:i.title||t("untitled"),kind:v,tags:D.split(",").map(m=>m.trim()).filter(Boolean),body:r,source:"manual"})}).then(m=>m.json())).ok?(s(null),u&&u()):s(m=>({...m,_creating:!1}))}catch{s(m=>({...m,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>s(null),children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:k=>k.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>s(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[Ft.map(k=>(0,e.jsx)("button",{type:"button",className:`mc-btn${i.template===k.key?" me-on":""}`,onClick:()=>j(k.key),children:t(k.label)},k.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${i.template===""?" me-on":""}`,onClick:()=>s(k=>({...k,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:v,onChange:k=>s(m=>({...m,kind:k.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:["project","knowledge","content","prompt","business","tool","mistake"].map(k=>(0,e.jsx)("option",{value:k,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:k},k))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:i.title||"",onChange:k=>s(m=>({...m,title:k.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:D,onChange:k=>s(m=>({...m,tags:k.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:r,onChange:k=>s(m=>({...m,body:k.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:N,onClick:C,children:t(N?"exporting":"createCard")})})]})]})]})}async function jt(t){let i=String(t||"");if(!i)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(i),!0}catch{}try{let s=document.createElement("textarea");s.value=i,s.setAttribute("readonly",""),s.style.position="fixed",s.style.left="-9999px",s.style.top="0",document.body.appendChild(s),s.focus(),s.select();let u=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(s),u}catch{return!1}}function Oa({t,onClose:i}){let[s,u]=(0,o.useState)(""),[p,r]=(0,o.useState)(""),[v,D]=(0,o.useState)(""),[N,j]=(0,o.useState)(!0),[C,k]=(0,o.useState)(!1),[m,B]=(0,o.useState)(""),[P,S]=(0,o.useState)(""),I=(0,o.useRef)(null),A=(0,o.useRef)(null),_=()=>{let M=I.current;if(M)try{M.focus(),M.select()}catch{}},te=M=>{B(M),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>B(""),2400)};(0,o.useEffect)(()=>{let M=!0;return fetch($+"/diagnostics").then(L=>L.json()).then(L=>{M&&(L&&L.ok?(r(String(L.diagnostics||"")),D(String(L.version||""))):k(!0))}).catch(()=>{M&&k(!0)}).finally(()=>{M&&j(!1)}),()=>{M=!1}},[]),(0,o.useEffect)(()=>{let M=L=>{L.key==="Escape"&&i()};return window.addEventListener("keydown",M),()=>{window.removeEventListener("keydown",M),A.current&&clearTimeout(A.current)}},[i]);let de=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),G=()=>{let M=s.trim().split(`
|
|
355
|
-
`)[0]||"",L=Vt({title:"[Bug] "+(M.slice(0,60)||"memory-eternal \u95EE\u9898"),body:qt({description:s,diagnostics:p,version:v})});try{window.open(L,"_blank","noopener")}catch{te(t("fbCopyFail"))}},ee=async()=>{await jt(p)?(S(""),te(t("fbCopiedDiag"))):(S(p),te(t("fbCopyManual")))},K=async()=>{let M=Yt({lang:de,description:s,diagnostics:p});await jt(M)?(S(""),te(t("fbCopiedPrompt"))):(S(M),te(t("fbCopyManual")))},pe={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},V={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:i,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:s,onChange:M=>u(M.target.value),placeholder:t("fbDesc"),rows:5,style:pe}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ee,disabled:!p,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:V,children:N?t("fbLoading"):C?t("fbDiagFail"):p})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!s.trim()){te(t("fbNeedDesc"));return}G()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:K,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),m&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:m}),P&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:_,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:I,readOnly:!0,value:P,rows:7,style:pe})]})]})]})]})}function Ea({t,card:i,query:s,onClose:u,onDelete:p,onFeedback:r,onNavigate:v,onTagClick:D}){let[N,j]=(0,o.useState)(0),[C,k]=(0,o.useState)(""),[m,B]=(0,o.useState)(()=>{try{let M=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(M)?M:"mid"}catch{return"mid"}}),P={narrow:720,mid:900,wide:1180};(0,o.useEffect)(()=>{let M=L=>{if(L.key==="Escape"){u();return}let fe=String(L.target&&L.target.tagName||"").toLowerCase();fe==="input"||fe==="textarea"||fe==="select"||L.target&&L.target.isContentEditable||(L.key==="j"&&v?(L.preventDefault(),v(1)):L.key==="k"&&v&&(L.preventDefault(),v(-1)))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[u,v]);let S=async(M,L)=>{let fe=await jt(String(M||""));k(fe?t("copied")+" \xB7 "+L:t("copyFail")),setTimeout(()=>k(""),1500)},{meta:I,body:A}=(0,o.useMemo)(()=>Dt(i.text||""),[i.text]),_=M=>{let L=I.find(([fe])=>String(fe).toLowerCase()===M);return L?L[1]:""},te=_t(_("tags")),de=_("kind")||"knowledge",G=(_("status")||"approved").toLowerCase(),ee=Ve[de]||"#6B7280",K=(A||"").length>460,[pe,V]=(0,o.useState)(!0);return(0,e.jsxs)("div",{className:"me-overlay",onClick:u,children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{className:"me-dialog",onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:i.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:kt[de]||"\u{1F4CE}"}),i.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[C&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:C}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>S(A,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>S(i.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let M=["narrow","mid","wide"],L=M[(M.indexOf(m)+1)%M.length];B(L);try{localStorage.setItem("me-read-width",L)}catch{}},children:[t("readWidth")," \xB7 ",t(m==="narrow"?"widthNarrow":m==="wide"?"widthWide":"widthMid")]}),s&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>r&&r(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>r&&r(!1),children:["\u{1F44E} ",t("fbNotUseful")]})]}),K&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":pe,onClick:()=>V(M=>!M),children:t(pe?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&p&&p(i.path)},children:t("delete")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:u,children:t("close")})]})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:ee,borderColor:ee+"59",background:ee+"1a"},children:[kt[de]||"\u{1F4CE}"," ",t(Ke[de]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(G==="approved"?"md-chip-st-ok":G==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[G==="approved"?"\u2705":G==="pending"?"\u23F3":"\u26D4"," ",t(G==="approved"?"statusApproved":G==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(te)?te:[]).slice(0,8).map(M=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:M,onClick:()=>D&&D(M),children:["\u{1F3F7} ",M]},M)),!!_("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",gt(_("updated"))]}),!!_("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",_("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:N+"%"}})}),(0,e.jsx)("div",{className:"me-dialog-body",style:{maxWidth:P[m],margin:"0 auto",width:"100%",boxSizing:"border-box",...pe?{}:{maxHeight:300,overflow:"hidden"}},onScroll:M=>{let L=M.currentTarget,fe=L.scrollHeight-L.clientHeight;j(fe<=0?100:Math.min(100,Math.max(0,L.scrollTop/fe*100)))},onClick:pe?void 0:M=>{M.stopPropagation(),V(!0)},children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:At(A)}})}),!pe&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:M=>{M.stopPropagation(),V(!0)},children:[t("expand")," \u2304"]})]})]})}function Wa({t,onOpen:i,all:s,onAllChange:u,onMutate:p,active:r,visible:v}){let[D,N]=(0,o.useState)(null),[j,C]=(0,o.useState)(""),k=(0,o.useRef)(!1),m=(0,o.useRef)(0),B=(0,o.useRef)(t);B.current=t;let P=(0,o.useCallback)(async()=>{try{k.current=!1;let _=await(await fetch(`${$}/graph${s?"?all=1":""}`)).json();_.ok?(N(_),C(""),k.current=!0):(N(null),C(_.error||t("error")))}catch(A){C(String(A&&A.message?A.message:A))}},[s,t]);(0,o.useEffect)(()=>{if(!r||k.current)return;let A=!0;return fetch(`${$}/graph${s?"?all=1":""}`).then(_=>_.json()).then(_=>{A&&(_.ok?(N(_),C(""),k.current=!0):(N(null),C(_.error||t("error"))))}).catch(_=>{A&&C(String(_&&_.message?_.message:_))}),()=>{A=!1}},[s,t,r]),(0,o.useEffect)(()=>{v&&D&&m.current++},[v,D]);let S=(0,o.useCallback)(async A=>{try{let te=await(await fetch(`${$}/delete?path=${encodeURIComponent(A)}`)).json();return te&&te.ok?(await P(),p&&p(),!0):!1}catch{return!1}},[P]),I=(0,o.useCallback)(async A=>{if(!A||A.length<2)return!1;try{let _=await fetch(`${$}/merge?paths=${encodeURIComponent(A.join(","))}`).then(te=>te.json());return _&&_.ok?(await P(),p&&p(),!0):!1}catch{return!1}},[P,p]);return(0,e.jsxs)("div",{className:"me-graph",children:[(0,e.jsx)("style",{children:Ee}),j&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",j]}),!D&&!j&&(0,e.jsx)("div",{className:"mc-empty",children:t("loading")}),D&&D.nodes.length===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("emptyGraph")}),D&&D.nodes.length>0&&(0,e.jsx)(_a,{nodes:D.nodes,edges:D.edges,onOpen:i,onDelete:S,onMerge:I,t,all:s,onAllChange:u,countLabel:`${D.nodes.length} ${t("nodes")} \xB7 ${$a(D.edges)} ${t("edges")}`,fitTrigger:m.current})]})}function $a(t){let i=new Set;for(let s of t||[])i.add([s.source,s.target].sort().join("|"));return i.size}var mt={colors:{project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function _a({nodes:t,edges:i,onOpen:s,onDelete:u,onMerge:p,t:r,countLabel:v,all:D,onAllChange:N,fitTrigger:j}){let C=(0,o.useRef)(null),k=(0,o.useRef)(null),m=(0,o.useRef)(null),B=(0,o.useRef)(null),P=(0,o.useRef)(null),S=(0,o.useRef)(s);(0,o.useEffect)(()=>{S.current=s},[s]);let I=(0,o.useRef)(u);(0,o.useEffect)(()=>{I.current=u},[u]);let A=(0,o.useRef)(p);(0,o.useEffect)(()=>{A.current=p},[p]);let[_,te]=(0,o.useState)(""),[de,G]=(0,o.useState)(null),ee=(0,o.useRef)("");(0,o.useEffect)(()=>{ee.current=_.trim().toLowerCase()},[_]),(0,o.useEffect)(()=>{let c=m.current;if(!c)return;let d=_.trim().toLowerCase();if(!d)return;let H=c.nodes.find(me=>(me.name||"").toLowerCase().includes(d));H&&(m.current.selectedId=H.id,G(H.id),c.panX=c.w/2-H.x*c.zoom,c.panY=c.h/2-H.y*c.zoom,c.render&&c.render())},[_]);let[K,pe]=(0,o.useState)("all"),[V,M]=(0,o.useState)(!1),L=(0,o.useRef)("all"),[fe,be]=(0,o.useState)(""),Ne=(0,o.useRef)(""),[g,Re]=(0,o.useState)(!1),oe=(0,o.useRef)(!1),[h,Q]=(0,o.useState)(null);(0,o.useEffect)(()=>{L.current=K},[K]),(0,o.useEffect)(()=>{Ne.current=fe},[fe]),(0,o.useEffect)(()=>{oe.current=g},[g]);let ce=(0,o.useMemo)(()=>{let c=new Map;for(let d of t)for(let H of d.tags||[]){let me=String(H).trim();me&&c.set(me,(c.get(me)||0)+1)}return[...c.entries()].sort((d,H)=>H[1]-d[1]).slice(0,24).map(([d,H])=>({tag:d,n:H}))},[t]),ue=(()=>{let c=_.trim().toLowerCase();return!!c&&!t.some(d=>(d.title||d.name||"").toLowerCase().includes(c)||String(d.kind||"").toLowerCase().includes(c)||String(Ke[d.kind]||"").toLowerCase().includes(c))})();(0,o.useEffect)(()=>{let c=m.current;c&&c.wake&&c.wake()},[_]),(0,o.useEffect)(()=>{let c=m.current;c&&c.render&&c.render()},[K,fe,g]);let ae=(0,o.useRef)(null),[Z,Le]=(0,o.useState)([]),[Me,Qe]=(0,o.useState)(null),[ze,ke]=(0,o.useState)(!1),[je,l]=(0,o.useState)(null),[R,T]=(0,o.useState)(""),q=(0,o.useRef)(null),he=(0,o.useRef)(null),Y=(c,d=!0)=>{q.current&&clearTimeout(q.current),l({msg:c,ok:d}),q.current=setTimeout(()=>l(null),1900)},J=c=>{T(c),he.current&&clearTimeout(he.current),he.current=setTimeout(()=>T(""),1600)};(0,o.useEffect)(()=>()=>{q.current&&clearTimeout(q.current),he.current&&clearTimeout(he.current)},[]);let ie=(0,o.useMemo)(()=>t.reduce((c,d)=>(c[d.id]=d,c),{}),[t]);return(0,o.useEffect)(()=>{let c=C.current;if(!c||t.length===0)return;let d=c.getContext("2d");if(!d)return;let H=Math.max(1,window.devicePixelRatio||1),me=()=>document.documentElement.getAttribute("data-theme")==="dark",we={};i.forEach(f=>{we[f.source]=(we[f.source]||0)+1,we[f.target]=(we[f.target]||0)+1});let Be=Math.max(1,...Object.values(we)),a={nodes:t.map(f=>({id:f.id,name:f.title||"",type:f.kind||"other",r:9+Math.min(10,(we[f.id]||0)/Be*8),x:0,y:0,vx:0,vy:0})),edges:i.map(f=>({sourceNodeId:f.source,targetNodeId:f.target,weight:1})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:H,ctx:d,multi:[],marquee:null};a.domain=t,a.domainById=t.reduce((f,F)=>(f[F.id]=F,f),{}),a.nodes.forEach((f,F)=>{let z=F/a.nodes.length*Math.PI*2-Math.PI/2;f.x=Math.cos(z)*60,f.y=Math.sin(z)*60});let Te=[...new Set(a.nodes.map(f=>f.type))];a.clustered=Te.length>1,a.typeCenters={},Te.forEach((f,F)=>{let z=F/Te.length*Math.PI*2-Math.PI/2;a.typeCenters[f]={x:Math.cos(z)*160,y:Math.sin(z)*160}}),m.current=a;let nt=0,lt=0,We=()=>{let f=c.clientWidth,F=c.clientHeight;a.w=f,a.h=F,c.width=f*H,c.height=F*H,d.setTransform(H,0,0,H,0,0),(nt===0||lt===0)&&f>0&&F>0&&a.tickCount>0&&requestAnimationFrame(()=>n()),nt=f,lt=F};We();let qe=new ResizeObserver(We);qe.observe(c.parentElement);let ot=(f,F)=>f&&f.length>F?f.slice(0,F)+"\u2026":f,Ge=(f,F,z,W)=>{if(d.beginPath(),W==="rect")d.rect(f-z,F-z*.75,z*2,z*1.5);else if(W==="diamond")d.moveTo(f,F-z),d.lineTo(f+z,F),d.lineTo(f,F+z),d.lineTo(f-z,F),d.closePath();else if(W==="hexagon"){for(let X=0;X<6;X++){let ge=Math.PI/3*X-Math.PI/2,re=f+z*Math.cos(ge),Ie=F+z*Math.sin(ge);X===0?d.moveTo(re,Ie):d.lineTo(re,Ie)}d.closePath()}else d.arc(f,F,z,0,Math.PI*2)},it=new Map,ve=(f,F)=>{let z=f+"|"+Math.round(F),W=it.get(z);if(!W){let X=parseInt(f.slice(1,3),16),ge=parseInt(f.slice(3,5),16),re=parseInt(f.slice(5,7),16);W=d.createRadialGradient(-F*.3,-F*.3,0,0,0,F*1.2),W.addColorStop(0,"rgba("+Math.min(255,X+70)+","+Math.min(255,ge+70)+","+Math.min(255,re+70)+",0.95)"),W.addColorStop(1,f),it.set(z,W)}return W},rt=1.1,b=2,n=()=>{if(!a.nodes.length)return;let f=1/0,F=-1/0,z=1/0,W=-1/0;a.nodes.forEach($e=>{f=Math.min(f,$e.x),F=Math.max(F,$e.x),z=Math.min(z,$e.y),W=Math.max(W,$e.y)});let X=20,ge=F-f+X*2,re=W-z+X*2,Ie=Math.min(a.w/ge,a.h/re),et=Math.pow(1/rt,b);a.zoom=Math.max(.35,Math.min(1.8,Ie*et)),a.panX=a.w/2-(f+F)/2*a.zoom,a.panY=a.h/2-(z+W)/2*a.zoom};B.current=n;let x=()=>{d.clearRect(0,0,a.w,a.h),a.searchTerm=ee.current,a.kindFilter=L.current,a.timeMode=oe.current,a.tagFilter=Ne.current;let f=a.tagFilter,F=a.kindFilter,z=y=>String(y||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");d.save(),d.strokeStyle=me()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",d.lineWidth=.5;for(let y=0;y<a.w;y+=24)d.beginPath(),d.moveTo(y,0),d.lineTo(y,a.h),d.stroke();for(let y=0;y<a.h;y+=24)d.beginPath(),d.moveTo(0,y),d.lineTo(a.w,y),d.stroke();d.restore(),d.save(),d.translate(a.panX,a.panY),d.scale(a.zoom,a.zoom);let W={};a.nodes.forEach(y=>W[y.id]=y);let X=a.nodes.length>40,ge=X?1.5:.55,re=a.selectedId||a.hoverId,Ie=Gt({panX:a.panX,panY:a.panY,zoom:a.zoom,w:a.w,h:a.h,margin:80}),et=(()=>{let y=(a.searchTerm||"").toLowerCase();if(!y)return null;let se=[];for(let le of a.nodes){let De=(a.domainById[le.id]||{}).kind||"other";if(((le.name||"").toLowerCase().includes(y)||String(Ke[De]||"").toLowerCase().includes(y)||String(De).toLowerCase().includes(y))&&se.push(le.id),se.length>200)break}return se})(),$e=Jt(a.nodes,{limit:Xt(a.nodes.length),focusId:re,hoverId:a.hoverId,searchHits:et,degree:we}),ye=new Map,Ce=(y,se)=>{let le=y+"|"+se,xe=ye.get(le);return xe===void 0&&(d.font=y,xe=d.measureText(se).width,ye.set(le,xe)),xe},He=a.nodes.length<=250,_e=new Map;a.edges.forEach(y=>{let se=W[y.sourceNodeId],le=W[y.targetNodeId];if(!se||!le||!Tt(se.x,se.y,10,Ie)&&!Tt(le.x,le.y,10,Ie))return;if(F!=="all"){let dt=a.domainById[y.sourceNodeId]&&a.domainById[y.sourceNodeId].kind,Ze=a.domainById[y.targetNodeId]&&a.domainById[y.targetNodeId].kind;if(dt!==F&&Ze!==F)return}if(f){let dt=a.domainById[y.sourceNodeId]&&(a.domainById[y.sourceNodeId].tags||[]).includes(f),Ze=a.domainById[y.targetNodeId]&&(a.domainById[y.targetNodeId].tags||[]).includes(f);if(!dt&&!Ze)return}let xe=le.x-se.x,De=le.y-se.y,Pe=Math.sqrt(xe*xe+De*De)||1,tt=X?12:18,at=-De/Pe*tt,Ct=xe/Pe*tt,Nt=(se.x+le.x)/2+at,Mt=(se.y+le.y)/2+Ct,ht=mt.colors[a.domainById[se.id]&&a.domainById[se.id].kind||"other"],yt=re&&(y.sourceNodeId===re||y.targetNodeId===re),zt=re?yt?.6:.08:X?.14:.24,Je=parseInt(ht.slice(1,3),16),bt=parseInt(ht.slice(3,5),16),Bt=parseInt(ht.slice(5,7),16),Ye=yt?1.6+(y.weight||1):.8+(y.weight||1)*.5,st=Je+","+bt+","+Bt+","+zt+","+Ye,Ue=_e.get(st);Ue||(Ue={path:new Path2D,stroke:"rgba("+Je+","+bt+","+Bt+","+zt+")",width:Ye},_e.set(st,Ue)),Ue.path.moveTo(se.x,se.y),Ue.path.quadraticCurveTo(Nt,Mt,le.x,le.y)}),_e.forEach(y=>{d.strokeStyle=y.stroke,d.lineWidth=y.width,d.stroke(y.path)});let Oe=null;re&&(Oe=new Set,a.edges.forEach(y=>{y.sourceNodeId===re?Oe.add(y.targetNodeId):y.targetNodeId===re&&Oe.add(y.sourceNodeId)}));let Xe=[];if(a.nodes.forEach(y=>{if(!Tt(y.x,y.y,y.r+2,Ie))return;let se=a.domainById[y.id]||{},le=se.kind||"other",xe=a.timeMode?Ua(se.updated):mt.colors[le],De=mt.shapes[le],Pe=a.selectedId===y.id,tt=a.hoverId===y.id,at=a.searchTerm||"",Ct=!at||(y.name||"").toLowerCase().includes(at)||String(Ke[le]||"").toLowerCase().includes(at)||String(le).toLowerCase().includes(at),Nt=F==="all"||le===F,Mt=!f||(se.tags||[]).includes(f),ht=re&&y.id!==re&&!(Oe&&Oe.has(y.id))||at&&!Ct||!Nt||!Mt;d.save(),d.globalAlpha=ht?.08:1,(Pe||tt)&&He&&(d.shadowColor=xe,d.shadowBlur=Pe?20:14),d.translate(y.x,y.y),Ge(0,0,y.r,De),d.fillStyle=ve(xe,y.r),d.fill(),d.restore(),Pe?(d.save(),Ge(y.x,y.y,y.r+3,De),d.strokeStyle=xe,d.lineWidth=3,d.shadowColor=xe,d.shadowBlur=12,d.stroke(),d.restore()):tt?(d.save(),Ge(y.x,y.y,y.r+2,De),d.strokeStyle=xe,d.lineWidth=2,d.stroke(),d.restore()):at&&Ct?(d.save(),Ge(y.x,y.y,y.r+2,De),d.strokeStyle="#e11d48",d.lineWidth=2,d.stroke(),d.restore()):a.multi.indexOf(y.id)>=0&&(d.save(),Ge(y.x,y.y,y.r+2,De),d.strokeStyle="#60a5fa",d.lineWidth=2,d.shadowColor="#60a5fa",d.shadowBlur=8,d.stroke(),d.restore());let yt=ot(y.name,16);if((Pe||tt||$e.has(y.id)&&a.zoom>ge||!X&&a.zoom>.6)&&Nt&&Mt){let Je=1/a.zoom,bt="500 "+(12*Je).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";d.font=bt;let Ye=Ce(bt,yt)+16*Je,st=18*Je,Ue=y.y+y.r+8*Je,dt=!0;for(let Ze of Xe)if(y.x-Ye/2<Ze.x+Ze.w&&y.x+Ye/2>Ze.x&&Ue<Ze.y+Ze.h&&Ue+st>Ze.y){dt=!1;break}if(!dt&&!Pe&&!tt)return;Xe.push({x:y.x-Ye/2,y:Ue,w:Ye,h:st}),d.fillStyle=me()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",d.beginPath(),d.roundRect?d.roundRect(y.x-Ye/2,Ue,Ye,st,4*Je):d.rect(y.x-Ye/2,Ue,Ye,st),d.fill(),d.strokeStyle=me()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",d.lineWidth=1*Je,d.stroke(),d.fillStyle=me()?Pe||tt?"#eee":"#bbb":Pe||tt?"#111":"#444",d.textAlign="center",d.fillText(yt,y.x,Ue+13*Je)}}),d.restore(),a.marquee){let y=a.marquee,se=Math.min(y.sx,y.ex),le=Math.min(y.sy,y.ey),xe=Math.abs(y.ex-y.sx),De=Math.abs(y.ey-y.sy);d.save(),d.setLineDash([4,4]),d.strokeStyle="rgba(96,165,250,0.9)",d.lineWidth=1,d.fillStyle="rgba(96,165,250,0.12)",d.fillRect(se,le,xe,De),d.strokeRect(se,le,xe,De),d.restore()}if(a.hoverId&&ae.current){let y=a.domainById[a.hoverId],se=a.nodes.find(function(le){return le.id===a.hoverId});if(y&&se){let le=a.edges.filter(function(Pe){return Pe.sourceNodeId===y.id||Pe.targetNodeId===y.id}).length,xe=se.x*a.zoom+a.panX,De=se.y*a.zoom+a.panY;ae.current.style.display="block",ae.current.style.left=xe+14+"px",ae.current.style.top=De-6+"px",ae.current.innerHTML="<b>"+z(y.title||y.name||"")+'</b><br/><span style="opacity:.8">'+z(y.kind||"")+" \xB7 "+tRef.current("connCount").replace("{n}",le)+"</span>"}}else ae.current&&(ae.current.style.display="none")},w=()=>{a.running=!0,a.raf||(a.raf=requestAnimationFrame(U))};a.wake=w,a.render=x;let E=()=>{let f=a.nodes.length;a.tickCount++;let z=.9-Math.min(.4,a.tickCount/1500),W=f>1e3?3e3:f>100?2e3:f>50?1200:800,X=f>100?.002:.005,ge=f>1e3?.012:f>100?.005:.01,re=f>1e3?6:f>200?12:24,Ie={};a.nodes.forEach(ye=>Ie[ye.id]=ye);for(let ye=0;ye<f;ye++){if(a.dragNode===a.nodes[ye])continue;let Ce=a.nodes[ye],He=0,_e=0;for(let y=0;y<f;y++){if(ye===y)continue;let se=Ce.x-a.nodes[y].x,le=Ce.y-a.nodes[y].y,xe=Math.sqrt(se*se+le*le)||1,De=W/(xe*xe);He+=se/xe*De,_e+=le/xe*De}if(a.clustered&&a.typeCenters[Ce.type]){let y=a.typeCenters[Ce.type];He+=(y.x-Ce.x)*.006,_e+=(y.y-Ce.y)*.006}else He-=Ce.x*ge,_e-=Ce.y*ge;let Oe=(Ce.vx+He)*z,Xe=(Ce.vy+_e)*z;Oe=Math.max(-re,Math.min(re,Oe)),Xe=Math.max(-re,Math.min(re,Xe)),Ce.vx=Oe,Ce.vy=Xe}a.edges.forEach(ye=>{let Ce=Ie[ye.sourceNodeId],He=Ie[ye.targetNodeId];if(!Ce||!He)return;let _e=He.x-Ce.x,Oe=He.y-Ce.y,Xe=Math.sqrt(_e*_e+Oe*Oe)||1,y=(Xe-100)*X,se=_e/Xe*y,le=Oe/Xe*y;a.dragNode!==Ce&&(Ce.vx+=se,Ce.vy+=le),a.dragNode!==He&&(He.vx-=se,He.vy-=le)});let et=0;a.nodes.forEach(ye=>{a.dragNode!==ye&&(ye.x+=ye.vx,ye.y+=ye.vy,et+=ye.vx*ye.vx+ye.vy*ye.vy)}),a.autoFitPending&&a.tickCount>45&&(a.autoFitPending=!1,n()),(f?Math.sqrt(et/f):0)<.05&&a.tickCount>60&&!a.dragNode?a.quietTicks=(a.quietTicks|0)+1:a.quietTicks=0},U=()=>{if(a.running){try{E(),x()}catch{}if(a.quietTicks>30){a.raf=0;return}a.raf=requestAnimationFrame(U)}},O=(f,F)=>{let z=c.getBoundingClientRect();return{x:(f-z.left-a.panX)/a.zoom,y:(F-z.top-a.panY)/a.zoom}},ne=f=>{let F=a.domainById[f];return!(!F||L.current!=="all"&&F.kind!==L.current||Ne.current&&!(F.tags||[]).includes(Ne.current))},Se=(f,F,z)=>Math.max(F,Math.min(z,f)),Ae=f=>{a.mouseX=f.clientX,a.mouseY=f.clientY;let F=O(f.clientX,f.clientY),z=null;for(let W=a.nodes.length-1;W>=0;W--){let X=a.nodes[W];if(!ne(X.id))continue;let ge=X.x-F.x,re=X.y-F.y;if(ge*ge+re*re<X.r*X.r+36){z=X.id;break}}z!==a.hoverId&&(a.hoverId=z,w())},Fe=f=>{if(f.button!==0)return;let F=O(f.clientX,f.clientY),z=null;for(let W=a.nodes.length-1;W>=0;W--){let X=a.nodes[W];if(!ne(X.id))continue;let ge=X.x-F.x,re=X.y-F.y;if(ge*ge+re*re<X.r*X.r+25){z=X;break}}if(f.shiftKey){if(z){a.shiftClick=z.id;return}a.marquee={sx:f.clientX,sy:f.clientY,ex:f.clientX,ey:f.clientY};return}a.dragStart={x:f.clientX,y:f.clientY,px:a.panX,py:a.panY},a.dragging=!1,a.dragNode=z||null,z&&(a.dragOffset={dx:z.x-F.x,dy:z.y-F.y})},wt=f=>{if(a.marquee){a.marquee.ex=f.clientX,a.marquee.ey=f.clientY,w();return}if(!a.dragStart)return;let F=f.clientX-a.dragStart.x,z=f.clientY-a.dragStart.y;if(Math.abs(F)+Math.abs(z)>3&&(a.dragging=!0),a.dragNode){let W=O(f.clientX,f.clientY);a.dragNode.x=W.x+a.dragOffset.dx,a.dragNode.y=W.y+a.dragOffset.dy,w()}else a.dragging&&(a.panX=Se(a.dragStart.px+F,-1e5,1e5),a.panY=Se(a.dragStart.py+z,-1e5,1e5),w())},St=f=>{if(a.marquee){let z=a.marquee;a.marquee=null;let W=c.getBoundingClientRect(),X=Math.min(z.sx,z.ex)-W.left,ge=Math.max(z.sx,z.ex)-W.left,re=Math.min(z.sy,z.ey)-W.top,Ie=Math.max(z.sy,z.ey)-W.top,et=a.nodes.filter($e=>{let ye=$e.x*a.zoom+a.panX,Ce=$e.y*a.zoom+a.panY;return ye>=X&&ye<=ge&&Ce>=re&&Ce<=Ie}).map($e=>$e.id);a.multi=et,Le(et),w();return}let F=a.dragStart&&!a.dragging;if(a.shiftClick){let z=a.shiftClick;a.shiftClick=null;let W=Array.isArray(a.multi)?a.multi.slice():[];W.includes(z)||W.push(z),a.multi=W,Le(W),w();return}if(F){let z=O(f.clientX,f.clientY),W=null;for(let X=a.nodes.length-1;X>=0;X--){let ge=a.nodes[X];if(!ne(ge.id))continue;let re=ge.x-z.x,Ie=ge.y-z.y;if(re*re+Ie*Ie<ge.r*ge.r+20){W=ge;break}}W?(a.selectedId=W.id,G(W.id),w()):(a.selectedId=null,a.hoverId=null,f.shiftKey||(a.multi=[],Le([])),G(null),w())}a.dragStart=null,a.dragging=!1,a.dragNode=null},Ot=f=>{f.preventDefault();let F=O(f.clientX,f.clientY),z=null;for(let W=a.nodes.length-1;W>=0;W--){let X=a.nodes[W];if(!ne(X.id))continue;let ge=X.x-F.x,re=X.y-F.y;if(ge*ge+re*re<X.r*X.r+25){z=X;break}}if(z){let W=a.domainById[z.id];W&&Q({x:f.clientX,y:f.clientY,id:z.id,path:W.id,title:W.title})}else Q(null)},Et=f=>{f.preventDefault();let F=c.getBoundingClientRect(),z=(f.clientX-F.left-a.panX)/a.zoom,W=(f.clientY-F.top-a.panY)/a.zoom,X=Math.max(.3,Math.min(3,a.zoom*(f.deltaY<0?rt:1/rt)));a.panX=Se(a.panX+z*(a.zoom-X),-1e5,1e5),a.panY=Se(a.panY+W*(a.zoom-X),-1e5,1e5),a.zoom=X,w()};c.addEventListener("mousemove",Ae),c.addEventListener("mousedown",Fe),window.addEventListener("mousemove",wt),window.addEventListener("mouseup",St),c.addEventListener("wheel",Et,{passive:!1}),c.addEventListener("contextmenu",Ot),P.current=()=>{a.selectedId=null,a.hoverId=null,a.multi=[],Le([]),n(),w()};for(let f=0;f<200;f++)E();n(),w();let Wt=()=>M(!1);return window.addEventListener("mousedown",Wt),()=>{a.running=!1,a.raf&&cancelAnimationFrame(a.raf),qe.disconnect(),c.removeEventListener("mousemove",Ae),c.removeEventListener("mousedown",Fe),window.removeEventListener("mousemove",wt),window.removeEventListener("mouseup",St),c.removeEventListener("wheel",Et),c.removeEventListener("contextmenu",Ot),window.removeEventListener("mousedown",Wt)}},[t,i]),(0,o.useEffect)(()=>{j!==void 0&&B.current&&requestAnimationFrame(()=>B.current())},[j]),(0,e.jsxs)("div",{className:"me-graph",ref:k,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[t.length," ",r("nodes")," \xB7 ",i.length," ",r("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:r("search"),value:_,onChange:c=>te(c.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>M(c=>!c),"aria-expanded":V,title:r("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",r("filterLabel")," ",K!=="all"||g||fe?"\u25CF":"\u25BE"]}),V&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:c=>c.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${K==="all"&&!g?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{pe("all"),Re(!1)},children:r("all")}),Object.keys(Ve).map(c=>(0,e.jsxs)("button",{type:"button",className:`lg${K===c?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>pe(d=>d===c?"all":c),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[c]||Ve[c]}}),r(Ke[c])]},c)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${g?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Re(c=>!c),children:["\u23F1 ",r("timeDim")]}),ce.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:ce.map(c=>(0,e.jsxs)("button",{type:"button",className:`lg${fe===c.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>be(d=>d===c.tag?"":c.tag),title:c.tag,children:["#",c.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:c.n})]},c.tag))})]}),(K!=="all"||g||fe)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{pe("all"),Re(!1),be("")},children:[r("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:r("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!D,onChange:c=>N&&N(c.target.checked)}),r("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${g?" me-on":""}`,onClick:()=>Re(c=>!c),children:r("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=C.current;if(c)try{c.toBlob(d=>{d&&Qe({url:URL.createObjectURL(d),blob:d})},"image/png")}catch{}},children:r("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>B.current&&B.current(),children:r("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{G(null),pe("all"),P.current&&P.current()},children:r("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:C,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:ae,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),ue&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:r("noMatch")}),h&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>Q(null)}),h&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:h.x,top:h.y,zIndex:31},onMouseDown:c=>c.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",onClick:()=>{S.current({path:h.path,title:h.title}),Q(null)},children:r("openCard")}),(0,e.jsx)("button",{type:"button",onClick:()=>{h.id&&(m.current.selectedId=h.id,G(h.id)),Q(null);let c=m.current;c&&c.wake&&c.wake()},children:r("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(h.title||"")}catch{}Q(null),Y(r("copied"))},children:r("copyName")}),(0,e.jsx)("button",{type:"button",onClick:()=>{let c=m.current,d=c&&Array.isArray(c.multi)?c.multi.slice():[],H=h.id;if(H&&!d.includes(H)&&d.push(H),Q(null),d.length<2){Y(r("mergeNeed"),!1);return}if(!window.confirm(r("mergeConfirm")))return;let me=A.current&&A.current(d);me&&me.then?me.then(we=>we?Y(r("merged")):Y(r("mergeFail"),!1)).catch(()=>Y(r("mergeFail"),!1)):me&&Y(r("merged"))},children:r("merge")}),(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let c=h.path;Q(null),window.confirm(r("deleteConfirm"))&&(async()=>{try{(I.current?await I.current(c):!1)?Y(r("deleted")):Y(r("deleteFail"),!1)}catch{Y(r("deleteFail"),!1)}})()},children:r("delete")})]}),Z.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[Z.length," ",r("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let d=Z.map(Be=>ie[Be]).filter(Boolean).map(Be=>Be.title||Be.name).join(`
|
|
356
|
-
`),H=new Blob([d],{type:"text/plain;charset=utf-8"}),me=URL.createObjectURL(H),we=document.createElement("a");we.href=me,we.download="memory-selected.txt",document.body.appendChild(we),we.click(),document.body.removeChild(we),setTimeout(()=>URL.revokeObjectURL(me),1e3),Y(Z.length+r("exportedSel"))},children:r("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(Z.length<2){Y(r("mergeNeed"),!1);return}let c=Z.map(H=>ie[H]?ie[H].id:H);if(!window.confirm(r("mergeConfirm")))return;Le([]);let d=m.current;d&&(d.multi=[]),fetch(`${$}/merge?paths=${encodeURIComponent(c.join(","))}`).then(H=>H.json()).then(H=>{H&&H.ok?Y(r("merged")):Y(r("mergeFail"),!1)}).catch(()=>Y(r("mergeFail"),!1))},children:r("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(r("deleteConfirm")))return;let c=Z.map(H=>ie[H]?ie[H].id:H);Le([]);let d=m.current;d&&(d.multi=[]),(async()=>{let H=0;for(let me of c)try{(I.current?await I.current(me):!1)&&H++}catch{}Y(H+r("deletedSelected"),H>0)})()},children:r("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=m.current;c&&(c.multi=[]),Le([]);let d=m.current;d&&d.render&&d.render()},children:r("clearSelection")})]}),de&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:ie[de]?ie[de].title||ie[de].name:de}),(0,e.jsx)("div",{style:{opacity:.8,marginBottom:8},children:ie[de]?r(Ke[ie[de].kind]||"kindKnowledge"):"\u2014"}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:r("graphHint")}),(i.filter(c=>c.source===de||c.target===de)||[]).slice(0,8).map((c,d)=>{let H=c.source===de?c.target:c.source,me=ie[H];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:we=>{we.preventDefault();let Be=m.current;Be&&(Be.selectedId=H,Be.hoverId=H,Be.wake&&Be.wake()),G(H)},children:me?(me.title||me.name).slice(0,28):H},d)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:r("graphTip")}),je&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(je.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:je.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:je.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:je.msg})]}),Me&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{Me.url&&URL.revokeObjectURL(Me.url),Qe(null),ke(!1)},children:[(0,e.jsx)("style",{children:Ee}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:ze?"100vw":900,width:ze?"100vw":"92vw",maxHeight:ze?"100%":"90vh",height:ze?"100%":void 0,borderRadius:ze?0:14},onClick:c=>c.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:r("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:Me.url,download:"memory-graph.png",onClick:()=>{J("download"),Y(r("downloaded")+" \xB7 "+r("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:r(R==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{J("full"),ke(c=>!c),Y(r("fullscreen"))},children:r(R==="full"?"done":ze?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=Me.blob;c&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":c})]).then(()=>{J("copy"),Y(r("copied"))}).catch(()=>{Y(r("copyFail"),!1)}):Y(r("copyFail"),!1)},children:r(R==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Me.url&&URL.revokeObjectURL(Me.url),Qe(null),ke(!1)},children:r("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:ze?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:Me.url,alt:r("exportGraph"),style:{maxWidth:"100%",maxHeight:ze?"calc(100% - 64px)":"70vh",borderRadius:ze?0:8,cursor:"zoom-in"},onClick:()=>ke(c=>!c)})})]})]})]})}function Ua(t){let i=new Date(t||0).getTime();if(!i)return"#94a3b8";let s=(Date.now()-i)/864e5;return s<3?"#10b981":s<14?"#f59e0b":s<30?"#f97316":"#94a3b8"}function ea({label:t,value:i=[],options:s,onChange:u,placeholder:p,z:r=20}){let[v,D]=(0,o.useState)(!1),N=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!v)return;let S=I=>{N.current&&!N.current.contains(I.target)&&D(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[v]);let j=Array.isArray(i)?i:[],C=j.includes("__all__"),k=C?s.find(S=>S.value==="__all__")?.label||"":j.length?j.map(S=>s.find(I=>I.value===S)?.label||S).join("\u3001"):"",m=(S,I)=>{if(S.value==="__all__"){u(I?["__all__"]:[]);return}let A=new Set(j);A.has("__all__")&&A.delete("__all__"),I?A.add(S.value):A.delete(S.value),u([...A])},B=s.find(S=>S.value==="__all__"),P=s.filter(S=>S.value!=="__all__");return(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12,minWidth:0},children:[(0,e.jsx)("span",{style:{opacity:.6,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.5},children:t}),(0,e.jsxs)("div",{ref:N,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>D(S=>!S),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k||p||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),v&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:r,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[B&&(0,e.jsxs)("label",{onClick:S=>S.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:C,onChange:S=>m(B,S.target.checked)}),(0,e.jsx)("span",{children:B.label})]}),P.map(S=>(0,e.jsxs)("label",{onClick:I=>I.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer"},children:[(0,e.jsx)("input",{type:"checkbox",checked:j.includes(S.value),onChange:I=>m(S,I.target.checked)}),(0,e.jsx)("span",{children:S.label})]},S.value))]})]})]})}function Ka(t){let i=new Date(t||0).getTime();return!!i&&(Date.now()-i)/864e5<3}async function Va(t,i,s){if(s&&typeof window.showSaveFilePicker=="function")try{let r=await window.showSaveFilePicker({suggestedName:i}),v=await r.createWritable();return await v.write(t),await v.close(),{ok:!0,picked:!0,name:r.name}}catch(r){return r&&r.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(r.message||r)}}let u=URL.createObjectURL(t),p=document.createElement("a");return p.href=u,p.download=i,document.body.appendChild(p),p.click(),document.body.removeChild(p),setTimeout(()=>URL.revokeObjectURL(u),1e3),{ok:!0,picked:!1,name:i}}function Pt(t,i){if(!i||!t)return t;let s=t.toLowerCase(),u=i.toLowerCase(),p=[],r=0;for(;r<t.length;){let v=s.indexOf(u,r);if(v<0){p.push(t.slice(r));break}v>r&&p.push(t.slice(r,v)),p.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(v,v+u.length)},v)),r=v+u.length}return p}function gt(t){if(!t)return"";let i=new Date(t);if(Number.isNaN(i.getTime()))return"";let s=new Date,u=i.toDateString()===s.toDateString(),p=v=>String(v).padStart(2,"0"),r=`${p(i.getHours())}:${p(i.getMinutes())}`;return u?r:`${i.getMonth()+1}-${i.getDate()} ${r}`}
|
|
708
|
+
`);let de=new Blob([R],{type:ee}),ge=await sn(de,j,!1);if(!ge.ok){pe({ok:!1,msg:t("exportFail")}),X(!1);return}pe({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+ge.name})}catch(v){pe({ok:!1,msg:t("exportFail")+" \xB7 "+(v.message||"")})}finally{X(!1)}ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>pe(null),2600)},Ye=async b=>{let r=b.target.files&&b.target.files[0];if(b.target.value="",!!r){try{let v=await r.text(),R=await(await fetch(`${$}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:v})).json();if(R.ok){await I();let j=R.imported||0,ee=t("importedVault")+"\uFF1A"+j;R.total&&(ee+=t("importedTotal")+R.total+t("importedTotalTail")),R.quarantined&&(ee+=t("importedQuarantine")+R.quarantined+t("importedQuarantineTail")),R.skipped&&(ee+=t("importedSkipped")+R.skipped+t("importedSkippedTail")),R.warning&&(ee+=" \xB7 "+R.warning),pe({ok:j>0||!R.total,msg:ee})}else pe({ok:!1,msg:R.error||t("importFail")})}catch{pe({ok:!1,msg:t("importFail")})}ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>pe(null),2400)}},Le=(0,o.useMemo)(()=>{let b=h.slice();return K!=="all"&&(b=b.filter(r=>ut(r.submittedBy)===K)),V!=="all"&&(b=b.filter(r=>(r.status||"approved")===V)),fe&&(b=b.filter(r=>te.has(r.path))),B==="title"?b.sort((r,v)=>String(r.title||"").localeCompare(String(v.title||""))):B==="hot"?b.sort((r,v)=>(v.weight||v.links||0)-(r.weight||r.links||0)):b.sort((r,v)=>new Date(v.updated||0).getTime()-new Date(r.updated||0).getTime()),b},[h,B,K,V,fe,te]),ht=(0,o.useMemo)(()=>[...new Set(h.map(b=>ut(b.submittedBy)))],[h]),yt=(0,o.useMemo)(()=>{let b={};for(let r of h){let v=new Set(r.tags||[]),C=0;for(let R of h)R.path!==r.path&&(R.tags||[]).some(j=>v.has(j))&&C++;b[r.path]=C}return b},[h]),[vt,zt]=(0,o.useState)(null),Ee=(0,o.useMemo)(()=>{if(!Le.length)return null;let b=vt?Le.find(v=>v.path===vt):null;return b||Le.find(v=>Date.now()-new Date(v.updated||0).getTime()>21*864e5)||Le[0]},[Le,vt]),Dt=()=>{if(!Le.length)return;let b=Le.findIndex(r=>r.path===(Ee&&Ee.path));zt(Le[(b+1+Le.length)%Le.length].path)},Ct=!T&&N==="all"&&!Q&&V==="all"&&!!Ee;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5",style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:Ue}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${g?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:Pt,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(O==="cards"?"cardsTab":O==="graph"?"graphTab":O==="stats"?"tabUsage":O==="audit"?"tabAudit":O==="optimize"?"tabRecycle":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",St]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>Kt("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>u("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),ze&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(ze.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ze.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ze.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:ze.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:Pt,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:i,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),M&&M.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[M.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:M.since?dt(new Date(M.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${d?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[d&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:Pt,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>J(b=>!b),"aria-label":t(d?"collapse":"expand"),title:t(d?"collapse":"expand"),children:d?"\xAB":"\xBB"})]}),d&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="cards"?" active":""}`,onClick:()=>W("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="graph"?" active":""}`,onClick:()=>W("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="stats"?" active":""}`,onClick:()=>W("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="audit"?" active":""}`,onClick:()=>W("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),ct>0&&(0,e.jsx)("span",{className:"mc-dot",children:ct>99?"99+":ct})]}),d&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="optimize"?" active":""}`,onClick:()=>W("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),Ke>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:Ke>99?"99+":Ke})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="config"?" active":""}`,onClick:()=>W("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),d&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>u("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>u("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>u("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>D(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),d&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:Fe,children:[c&&c.db&&c.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",c.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,O==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:c?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",c?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",c?.quarantine?.pending??c?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",c?.quarantine?.rejected??c?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[h.length," / ",Xe]})]}),O==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:T,onChange:b=>oe(b.target.value)}),Q&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>q(""),children:["\u{1F3F7} ",Q," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:y,type:"file",accept:".json,application/json",style:{display:"none"},onChange:Ye}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>y.current&&y.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>Me({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ae,onClick:()=>He("md"),children:t(ae?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ae,onClick:()=>He("json"),children:t(ae?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>I(),children:t("refresh")})]}),O==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[qt.map(b=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${N===b?" active":""}`,onClick:()=>ie(b),children:[t(b==="all"?"all":$e[b]),(0,e.jsx)("span",{className:"mc-chip-n",children:b==="all"?c?.total??0:c?.byKind?.[b]??0})]},b)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${fe?" active":""}`,onClick:()=>ue(b=>!b),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:te.size})]}),(0,e.jsxs)("select",{value:K,onChange:b=>se(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),pa(ht).map(b=>(0,e.jsx)("option",{value:b,children:b},b))]}),(0,e.jsxs)("select",{value:V,onChange:b=>Z(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(b=>(0,e.jsx)("button",{type:"button",className:`mc-chip${B===b.key?" active":""}`,onClick:()=>Ce(b.key),children:b.label},b.key))]}),m&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",m]}),(0,e.jsx)("div",{style:{display:O==="cards"?"contents":"none"},children:S?(0,e.jsx)("div",{className:"mc-empty",children:t("loading")}):m?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",m," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>I(),children:t("retry")})]}):h.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[Ct&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>re(Ee),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:Ee.title}),(0,e.jsx)("p",{children:Yt(Ee)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[gt[Ee.kind]||"\u{1F4CE}"," ",t($e[Ee.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",dt(Ee.updated)]}),(Ee.tags||[]).slice(0,3).map(b=>(0,e.jsxs)("span",{children:["#",b]},b))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(ba,{n:yt[Ee.path]||0,color:_e[Ee.kind]||_e.other,size:58}),(0,e.jsx)("b",{children:yt[Ee.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:b=>{b.stopPropagation(),Dt()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:Le.filter(b=>!Ct||b.path!==Ee.path).map(b=>(0,e.jsx)(Ya,{card:b,t,query:T.trim(),onOpen:re,onDelete:U,onTagClick:q,pinned:te.has(b.path),onPin:_,links:yt[b.path]||0},b.path))}),h.length<Xe&&(0,e.jsx)("div",{ref:et,style:{height:1}}),it&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",h.length," / ",Xe,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:O==="graph"?"flex":"none",flex:1,minHeight:0},children:f.has("graph")&&(0,e.jsx)(an,{t,onOpen:re,all:xe,onAllChange:Ge,onMutate:ot,active:O==="graph",visible:O==="graph"})}),(0,e.jsx)("div",{style:{display:O==="config"?"contents":"none"},children:f.has("config")&&(0,e.jsx)(ua,{t,onReload:()=>I(),version:Te})}),(0,e.jsx)("div",{style:{display:O==="stats"?"contents":"none"},children:f.has("stats")&&(0,e.jsx)(Ja,{t,tab:"stats",onReload:()=>I(),version:Te})}),(0,e.jsx)("div",{style:{display:O==="audit"?"contents":"none"},children:f.has("audit")&&(0,e.jsx)(Ka,{t,onReload:()=>I(),version:Te})}),(0,e.jsx)("div",{style:{display:O==="optimize"?"contents":"none"},children:f.has("optimize")&&(0,e.jsx)(Va,{t,onReload:()=>I(),version:Te})}),p&&(0,e.jsx)(Za,{t,onClose:()=>D(!1)}),A&&(0,e.jsx)(Qa,{t,tab:Se,onTab:le,onClose:()=>Y(!1),onFeedback:()=>{Y(!1),D(!0)},onReplay:()=>{Y(!1),we(!0)}}),H&&(0,e.jsx)(en,{t,onDone:be}),Ne&&(0,e.jsx)(tn,{t,card:Ne,query:T.trim(),onNavigate:b=>{let r=Le.findIndex(C=>C.path===Ne.path),v=Le[r+b];v&&re(v)},onTagClick:q,onClose:()=>ne(null),onDelete:b=>{ne(null),U(b)},onFeedback:b=>{let r=Ne.path;fetch(`${$}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:T.trim(),path:r,useful:b})}).then(()=>pe({ok:!0,msg:t(b?"fbUseful":"fbIrr")})).catch(()=>{}),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>pe(null),2e3)},allCards:Le,onOpenRelated:b=>re(b)}),(0,e.jsx)(Xa,{t,newCard:he,setNewCard:Me,onCreated:()=>{I(),ot(),pe({ok:!0,msg:t("created")}),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>pe(null),2e3)}})]})]})]})}var ma=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;function ua({t,onReload:a,version:i,compact:g}){let[c,s]=(0,o.useState)(null),[h,k]=(0,o.useState)(0),[S,L]=(0,o.useState)(null),[M,x]=(0,o.useState)(null),[m,z]=(0,o.useState)(!1),[N,P]=(0,o.useState)(!1),T=(0,o.useRef)(!1),E=(0,o.useRef)(null),K=(0,o.useRef)({}),[se,V]=(0,o.useState)(null),[Z,te]=(0,o.useState)(null),[G,fe]=(0,o.useState)(""),[ue,_]=(0,o.useState)(""),[Q,je]=(0,o.useState)(""),[O,Be]=(0,o.useState)(null),[f,F]=(0,o.useState)(null),W=(0,o.useCallback)(async(l,I=!1)=>{I||_("version");try{let U=await fetch($+"/version-check"+(l?"?force=1":"")).then(oe=>oe.json());U&&U.ok?(F(U),l&&y(U.updateAvailable?t("vcLatest")+" v"+U.latest:t("vcUpToDate"))):l&&y(t("vcCheckFail"),!1)}catch{l&&y(t("vcCheckFail"),!1)}finally{I||_("")}},[t]);(0,o.useEffect)(()=>{W(!1);let l=setInterval(()=>{W(!1,!0)},6e4),I=()=>{typeof document<"u"&&!document.hidden&&W(!1,!0)};return document.addEventListener("visibilitychange",I),()=>{clearInterval(l),document.removeEventListener("visibilitychange",I)}},[i,W]);let[B,Ce]=(0,o.useState)(""),[ze,pe]=(0,o.useState)(null),ve=(0,o.useRef)(null),y=(l,I=!0)=>{ve.current&&clearTimeout(ve.current),pe({msg:l,ok:I}),ve.current=setTimeout(()=>pe(null),1900)},ae=async()=>{if(!ue){_("restart");try{let l=await fetch($+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){y(H("vcRestartNoRoute",{cmd:f&&f.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let I=await l.json().catch(()=>null);if(!I){y(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!I.ok){y(I.error||t("vcRestartFail"),!1);return}if(I.alreadyCurrent){y(I.note||t("vcRestartCurrent"));return}y(I.note||t("vcRestartSent")),I.alreadyRunning||setTimeout(()=>{W(!0)},6e3)}catch(l){y(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{_("")}}},X=f&&f.resident?String(f.resident.served||""):"",Ne=!!(f&&f.onDisk&&X&&X!==f.onDisk),ne=!!(f&&f.resident&&f.resident.managed===!1&&f.resident.managedKnown===!1),xe=f&&f.resident&&f.resident.replaceBlocked&&f.resident.replaceBlocked.fresh||null,Ge=!!(f&&f.resident&&f.resident.managedBy==="host"),p=!!(f&&f.resident&&f.resident.managed===!1&&!ne&&!Ge),D=!!(f&&f.resident&&!X),A=Ne||D||p||ne,Y=Qt({hasVersion:!!f,hostVersion:f?f.loaded:"",onDisk:f?f.onDisk:"",residentServed:f&&f.resident?f.resident.served:"",residentPresent:!!(f&&f.resident),residentManaged:f&&f.resident?f.resident.managed:null,residentManagedKnown:f&&f.resident?f.resident.managedKnown:null,residentManagedBy:f&&f.resident?f.resident.managedBy:"",replaceBlocked:f&&f.resident?f.resident.replaceBlocked:null}),Se={hostProcessStale:()=>H("vcHostProcessStale",{disk:f.onDisk,loaded:f.loaded}),residentDown:()=>H("vcResidentDown",{port:f.resident&&f.resident.port||"",cmd:f.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>H("vcResidentReplaceBlocked",{served:X,err:xe&&xe.error||"",path:xe&&xe.lockPath||"",cmd:f.restartCommand||"dsh-memory restart --port "+(f.resident&&f.resident.port||7999)}),residentLockUnknown:()=>H("vcResidentLockUnknown",{served:X,path:f.resident&&f.resident.lock&&f.resident.lock.path||"",err:f.resident&&f.resident.lock&&f.resident.lock.error||""}),residentUnmanaged:()=>H("vcResidentUnmanaged",{served:X,cmd:f.restartCommand||"dsh-memory restart --port 7999"})},le={restartStart:()=>H("vcRestartStart",{disk:f&&f.onDisk||""}),restartRepair:()=>H("vcRestartRepair",{disk:f&&f.onDisk||""}),restartFixes:()=>H("vcRestartFixes",{served:X||"",disk:f&&f.onDisk||""}),restartHostOnly:()=>H("vcRestartHostOnly",{loaded:f&&f.loaded||"",disk:f&&f.onDisk||""}),restartAnyway:()=>H("vcRestartAnyway",{ver:f&&f.onDisk||""})},H=(l,I)=>Object.keys(I).reduce((U,oe)=>U.split("{"+oe+"}").join(I[oe]),t(l)),we=(0,o.useCallback)(async()=>{try{let[l,I,U,oe]=await Promise.all([fetch(`${$}/config`).then(ie=>ie.json()).catch(()=>null),fetch(`${$}/setup-status`).then(ie=>ie.json()).catch(()=>null),fetch(`${$}/budget`).then(ie=>ie.json()).catch(()=>null),fetch(`${$}/llm-routes`).then(ie=>ie.json()).catch(()=>null)]);if(oe&&oe.ok&&Be(oe),l&&l.ok){s(l),k(l.revision??0),L(l.schema??null);let ie=ra(l.config??{},K.current);K.current=ie.overlay,x({...ie.values}),V(l.dsh??null),z(l.writable===!1),P(l.viaPending===!0),fe(""),T.current=!1}else U&&U.ok?(x({...U}),z(!0),fe(t("configNeedsDsh"))):fe(t("adminLoadFail"));I&&I.ok&&te(I),je("")}catch{fe(t("adminLoadFail"))}},[t]);(0,o.useEffect)(()=>{we()},[i,we]);let be=(l,I)=>{T.current=!0,x(U=>({...U??{},[l]:I}))};(0,o.useEffect)(()=>{E.current=we},[we]),(0,o.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource($+"/events")}catch{return}let I=()=>{!T.current&&typeof E.current=="function"&&E.current()};try{l.addEventListener("config",I)}catch{}return()=>{try{l.close()}catch{}}},[]);let u=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars"]),d=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,J=async()=>{if(!M)return;if(m){y(t("editInSetting"),!1);return}let l={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9]},I=[];for(let[U,[oe,ie]]of Object.entries(l)){if(!(U in M))continue;let q=M[U],re=typeof q=="number"?q:Number(q);(q===""||q===null||q===void 0||!Number.isFinite(re)||re<oe||re>ie)&&I.push(t("invalidField",{field:U,min:oe,max:ie,value:String(q===""?"\u7A7A":q)}))}if(I.length){let U=t("saveInvalid")+"\uFF1A"+I.join("\uFF1B");fe(U),y(U,!1);return}_("save");try{let U={...M};for(let re of Object.keys(M))re in U&&typeof U[re]=="string"&&U[re].trim()!==""&&u.has(re)&&(U[re]=Number(U[re]));Array.isArray(U.vaultProfiles)&&(U.vaultProfiles=U.vaultProfiles.filter(re=>re&&(String(re.name||"").trim()||String(re.path||"").trim())));let oe=await fetch(`${$}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:U,expectedRevision:h})}),ie=await oe.text(),q=null;try{q=ie?JSON.parse(ie):null}catch{q=null}if(q||(q={error:"HTTP "+oe.status+(ie?"\uFF1A"+ie.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),q&&q.ok){let re=typeof q.pendingOutcome=="string"?q.pendingOutcome:"",He,Ye=!0;if(re==="applied")He=t("savedApplied")+(Array.isArray(q.applied)&&q.applied.length?" \xB7 "+q.applied.join("\u3001"):"");else if(re==="queued")Ye=!1,He=t("saveQueued");else if(re==="failed")Ye=!1,He=t("saveFail")+" \xB7 "+(q.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(re==="applied-direct")He=t("savedOk")+" \xB7 "+t("savedDirect");else{let Le=Array.isArray(q.pending)&&q.pending.length?" \xB7 "+t("savePending"):q.note?" \xB7 "+t("restartHint"):"";He=(q.retried?"\u267B ":"")+t("savedOk")+Le}K.current={...K.current,...U},Ye?je(He):fe(He),y(He,Ye),await we()}else{let re=oe.status===409?t("conflictRefresh"):q?.error||t("saveFail");fe(re),y(re,!1)}}catch{fe(t("saveFail")),y(t("saveFail"),!1)}finally{_("")}},he=()=>{K.current={},x({...c?.config??{}}),je("")},Me={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},Te=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],n=(l,I,U)=>x(oe=>{let ie=Te(oe).map(re=>({...re||{}})),q={...ie[l]||{}};return I==="match"?String(U).trim()?q.match={...q.match||{},workspace:U}:delete q.match:q[I]=U,ie[l]=q,{...oe??{},vaultProfiles:ie}}),ot=()=>x(l=>({...l??{},vaultProfiles:[...Te(l),{name:"",path:""}]})),ct=l=>x(I=>({...I??{},vaultProfiles:Te(I).filter((U,oe)=>oe!==l)})),Ke={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},Pe={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},Xe={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},bt=async l=>{let I=Xe[l];I&&x(U=>({...U??{},...I}))},it=async(l,I)=>{_(l+I);try{let oe=await(await fetch(`${$}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:I})})).json();oe&&oe.ok?y(H(I==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):y(H("mcpActionFail",{agent:l,error:oe?.error||""}),!1);try{let ie=await fetch(`${$}/setup-status`).then(q=>q.json());ie&&ie.ok&&te(ie)}catch{}}catch{y(t("mergeFail"),!1)}finally{_("")}},Re=({k:l,label:I,type:U="text",step:oe,min:ie,max:q})=>(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12,minWidth:0},children:[(0,e.jsx)("span",{style:{opacity:.6,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.5},children:I||l}),(0,e.jsx)("input",{type:U,step:oe,min:ie,max:q,value:M?M[l]??"":"",onChange:re=>{let He=re.target.value;be(l,U==="number"?He===""?"":Number(He):He)},style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12}})]}),et=new Set(["autoRestartOnDrift"]),Fe=({k:l,label:I})=>{let U=M?M[l]:void 0,oe=U===void 0?et.has(l):!!U;return(0,e.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",gap:6,fontSize:12,minWidth:0,lineHeight:1.5},children:[(0,e.jsx)("input",{type:"checkbox",checked:oe,onChange:ie=>be(l,ie.target.checked),style:{marginTop:2,flex:"0 0 auto"}}),(0,e.jsx)("span",{style:{whiteSpace:"normal",overflowWrap:"anywhere"},children:I||l})]})};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:g?"0 0 auto":1,minHeight:0,maxHeight:g?"52vh":void 0},children:[(0,e.jsx)("style",{children:Ue}),ze&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(ze.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ze.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ze.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:ze.msg})]}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[!g&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),G&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",G]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:we,children:["\u21BB ",t("retry")]})]}),N&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),m&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),Q&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",Q]}),c&&(c.version||c.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),c.version&&(0,e.jsxs)("code",{style:Ke,children:[t("vcLoaded")," v",c.version]}),f&&f.resident&&f.resident.served&&f.resident.served!==c.version&&(0,e.jsxs)("code",{style:Ke,children:[t("vcResident")," v",f.resident.served]}),f&&f.resident&&!f.resident.served&&(0,e.jsxs)("code",{style:{...Ke,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),f&&f.resident&&f.resident.served&&f.resident.managed===!1&&(0,e.jsxs)("code",{style:{...Ke,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",f.resident.served," \xB7 ",t(xe?"vcResidentReplaceBlockedShort":Ge?"vcResidentHostManagedShort":ne?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),St&&(0,e.jsxs)("code",{style:Ke,children:[t("vcPage")," v",St]}),f&&f.onDisk&&(0,e.jsxs)("code",{style:Ke,children:[t("vcOnDisk")," v",f.onDisk]}),f&&f.latest&&(0,e.jsxs)("code",{style:Ke,children:[t("vcLatest")," v",f.latest]}),c.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",c.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:ue==="version",onClick:()=>W(!0),children:ue==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),f&&Y.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",Se[Y.warn]?Se[Y.warn]():""]})}),Y.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(Y.emphasis?" me-on":""),disabled:!!ue,onClick:ae,children:ue==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),f.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:f.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:le[Y.hint]?le[Y.hint]():""})]}),St&&f&&f.onDisk&&St!==f.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:St,disk:f.onDisk})}),f&&f.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:f.updateCommand})]}),f&&f.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",f.checkError]})]}),Z&&Z.agents&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F50C} ",t("mcpSetupStatus")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("mcpManageHint")})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:Z.agents.map(l=>(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1},children:[(0,e.jsx)("b",{children:l.isDsh?t("dshHostLabel"):l.name}),l.isDsh&&l.version&&(0,e.jsxs)("span",{style:{marginLeft:6,fontSize:11,opacity:.5},children:["v",l.version]}),!l.installed&&(0,e.jsxs)("span",{style:{marginLeft:6,opacity:.6},children:["(",t("notInstalled"),")"]}),l.installed&&l.mcpConfigured===!1&&(0,e.jsxs)("span",{style:{marginLeft:6,color:"#f59e0b"},children:["(",t("noMcpEntry"),")"]}),l.mcpConfigured===!0&&(0,e.jsxs)("span",{style:{marginLeft:6,color:"#10b981"},children:["\u2713 ",t("healthy")]}),l.mcpConfigured===!0&&l.mcpMatchesCurrentNode===!1&&(0,e.jsxs)("span",{style:{marginLeft:6,color:"#9ca3af",fontSize:10},children:["(",t("nodePathNote"),")"]}),l.isDsh&&(0,e.jsxs)("span",{style:{marginLeft:6,opacity:.6,fontSize:11},children:["(",t("recallTool"),": ",l.recallTool?t("enabled"):t("disabled"),")"]})]}),l.hook&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.7},children:["hook: ",l.hook]}),!l.isDsh&&l.installed&&l.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!ue,onClick:()=>it(l.name,"install"),children:t("installMcp")}),!l.isDsh&&l.installed&&l.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!ue,onClick:()=>{window.confirm(t("uninstallConfirm"))&&it(l.name,"uninstall")},children:t("uninstallMcp")})]},l.name))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),B&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:B})})]}),M?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #3b82f6"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("presetConfig")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("presetHint")})]}),(0,e.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:["A","B","C"].map(l=>(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>bt(l),disabled:!!ue,children:[l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",Xe[l].label]},l))})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:[(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9E0} ",t("dshMemoryConfig")]})}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:8},children:[(0,e.jsx)(Fe,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(Fe,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Re,{k:"captureMinChars",label:t("captureMinChars"),type:"number"}),(0,e.jsx)(Re,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),type:"number"}),(0,e.jsx)(Re,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Re,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Re,{k:"recallSummaryLen",label:t("recallSummaryLen"),type:"number"}),(0,e.jsx)(Fe,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Re,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Re,{k:"recallEmbedding",label:t("recallEmbedding")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #06b6d4"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F5C2}\uFE0F ",t("vaultMulti")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("vaultMultiHint")})]}),(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:se?.vaultDir||"\u2014"}),se?.vaultName?`\uFF08${se.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(Me[se?.vaultSource]||"vaultSrcDefault"),se?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:se.workspace})]}):null]}),Te(M).map((l,I)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:U=>n(I,"name",U.target.value),style:Pe,disabled:m}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:U=>n(I,"path",U.target.value),style:Pe,disabled:m}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:U=>n(I,"match",U.target.value),style:Pe,disabled:m}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ct(I),disabled:m,title:t("delete"),children:"\u2715"})]},I)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ot,disabled:m,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:M.activeVault||"",onChange:l=>be("activeVault",l.target.value),disabled:m,style:Pe,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),Te(M).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsx)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:8},children:[(0,e.jsx)(Fe,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(Re,{k:"vaultDir",label:t("vaultDirLabel")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #f59e0b"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4B0} ",t("costControl")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("costHint")})]}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:8,marginTop:6},children:[(0,e.jsx)(Fe,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(Fe,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(Re,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Re,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Re,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Re,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),O&&O.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",H("routeListFail",{err:O.error||"\u672A\u77E5\u539F\u56E0"})]}),O&&O.providers&&O.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:3,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("captureProvider")}),(0,e.jsxs)("select",{value:M.captureProvider||"",onChange:l=>{be("captureProvider",l.target.value),be("captureModel","")},style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),O.providers.map(l=>(0,e.jsx)("option",{value:l.id,children:l.label},l.id))]})]}),(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:3,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("captureModel")}),(0,e.jsxs)("select",{value:M.captureModel||"",onChange:l=>be("captureModel",l.target.value),style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((O.providers.find(l=>l.id===M.captureProvider)||{}).models||[]).map(l=>(0,e.jsx)("option",{value:l.id,children:l.label||l.id},l.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Re,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Re,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(Fe,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(Fe,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Re,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!ue,onClick:async()=>{_("llmtest");try{let l=await fetch($+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:M.captureProvider||"",model:M.captureModel||"",firstOnly:M.captureFirstOnly===!0})}).then(I=>I.json());l&&l.ok?y(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):y(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){y(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{_("")}},children:ue==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px",borderLeft:"3px solid #8b5cf6"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("auditConfig")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("auditHint")})]}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:8},children:[(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12,minWidth:0},children:[(0,e.jsx)("span",{style:{opacity:.6,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.5},children:t("auditMode")}),(0,e.jsxs)("select",{value:M.auditMode??"all",onChange:l=>be("auditMode",l.target.value),style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(la,{label:t("auditExemptAgents"),value:M.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(Z?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>be("auditExemptAgents",l)}),(0,e.jsx)(la,{label:t("auditExemptKinds"),value:M.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...qt.filter(l=>l!=="all").map(l=>({value:l,label:t($e[l])}))],onChange:l=>be("auditExemptKinds",l)}),(0,e.jsx)(Re,{k:"recycleRetentionDays",label:t("recycleDays"),type:"number"})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"12px 14px"},children:[(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E0} ",t("serviceConfig")]})}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:8},children:[(0,e.jsx)(Fe,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:3,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("autoWebMode")}),(0,e.jsxs)("select",{value:M.autoWebMode??"init",onChange:l=>be("autoWebMode",l.target.value),style:{padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12},children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(Re,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Re,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Re,{k:"webMaxRestart",label:t("webMaxRestart"),type:"number"}),(0,e.jsx)(Fe,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(Fe,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(Fe,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",alignItems:"center",marginBottom:10,flexWrap:"wrap"},children:[ue==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),Q&&ue!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",Q]}),G&&ue!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",G]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:he,disabled:!!ue,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:m?()=>y(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):J,disabled:ue==="save",title:t(m?"readonlyBody":"saveConfig"),children:ue==="save"?"\u23F3 "+t("saving"):m?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})}function Ka({t,onReload:a,version:i}){let[g,c]=(0,o.useState)([]),[s,h]=(0,o.useState)([]),[k,S]=(0,o.useState)("all"),[L,M]=(0,o.useState)("all"),[x,m]=(0,o.useState)(""),[z,N]=(0,o.useState)(new Set),[P,T]=(0,o.useState)(null),[E,K]=(0,o.useState)(""),[se,V]=(0,o.useState)(null),[Z,te]=(0,o.useState)("pending"),G=(y,ae=!0)=>{V({msg:y,ok:ae}),setTimeout(()=>V(null),3e3)},fe=[...new Set([...g,...s].map(y=>y.submittedBy).filter(Boolean))],ue=(0,o.useCallback)(async()=>{try{let y=await fetch(`${$}/audit/list`).then(ae=>ae.json());y.ok&&(c(y.pending||[]),h(y.rejected||[]),N(new Set),f({}))}catch{}},[]);(0,o.useEffect)(()=>{ue()},[i,ue]);let _=(Z==="pending"?g:s).filter(y=>{if(k!=="all"&&y.kind!==k||L!=="all"&&ut(y.submittedBy)!==L)return!1;if(x){let ae=(y.created||"").slice(0,10);if(ae&&ae!==x)return!1}return!0}),Q=(0,o.useMemo)(()=>{let y=Z==="pending"?g:s,ae={all:0};return y.forEach(X=>{if(!(L!=="all"&&ut(X.submittedBy)!==L)){if(x){let Ne=(X.created||"").slice(0,10);if(Ne&&Ne!==x)return}ae.all++,ae[X.kind||"other"]=(ae[X.kind||"other"]||0)+1}}),ae},[g,s,Z,L,x]),je=y=>N(ae=>{let X=new Set(ae);return X.has(y)?X.delete(y):X.add(y),X}),O=async(y,ae)=>{let X=ae||[...z];if(!X.length){G(t("noSelection"),!1);return}K("apply");let Ne=t(y==="approved"?"toastApproved":y==="rejected"?"toastRejected":"toastCardDeleted");try{let ne=0;for(let xe of X){let Ge=y==="approved"?"audit/approve":y==="rejected"?"audit/reject":"delete";try{(await fetch($+"/"+Ge+"?path="+encodeURIComponent(xe)+(y==="delete"?"&permanent=0":""))).ok||ne++}catch{ne++}}await ue(),a&&a(),ne?G(t("toastFailed")+"\uFF08"+ne+"/"+X.length+"\uFF09",!1):G(Ne+" "+X.length+" \u5F20")}catch(ne){G(t("toastFailed")+": "+String(ne&&ne.message||ne),!1)}finally{K("")}},[Be,f]=(0,o.useState)({}),F=y=>Be[y]||{},W=[...z],B=_.find(y=>y.path===P)||_[0]||null,Ce=B?F(B.path):{};(0,o.useEffect)(()=>{let y=B;if(!y||Be[y.path])return;let ae=!0,X=y.path;f(ne=>({...ne,[X]:{loading:!0}}));let Ne=y.status||(Z==="pending"?"pending":"rejected");return fetch(`${$}/card?path=${encodeURIComponent(X)}&status=${Ne}`).then(ne=>ne.json()).then(ne=>{ae&&(ne&&ne.ok?f(xe=>({...xe,[X]:{text:ne.text||""}})):f(xe=>({...xe,[X]:{error:ne&&ne.error||"HTTP"}})))}).catch(ne=>{ae&&f(xe=>({...xe,[X]:{error:String(ne&&ne.message||ne)}}))}),()=>{ae=!1}},[B&&B.path,Z]);let ze=()=>N(new Set),pe=y=>{te(y),ze()},ve=["all",...qt.filter(y=>y!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ma,{toast:se}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[g.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("select",{value:L,onChange:y=>{M(y.target.value),ze()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),pa(fe).map(y=>(0,e.jsx)("option",{value:y,children:y},y))]}),(0,e.jsx)("input",{type:"date",value:x,onChange:y=>{m(y.target.value),ze()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),ve.map(y=>{let ae=y==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":_e[y]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${k===y?" active":""}`,onClick:()=>{S(y),ze()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:ae}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(y==="all"?"all":$e[y])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:Q[y]||0})]},y)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${Z==="pending"?" me-on":""}`,onClick:()=>pe("pending"),children:[t("pending"),"\uFF08",g.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${Z==="rejected"?" me-on":""}`,onClick:()=>pe("rejected"),children:[t("rejected"),"\uFF08",s.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:_.length>0&&W.length===_.length,onChange:y=>{y.target.checked?N(new Set(_.map(ae=>ae.path))):N(new Set)}})," ",t("selectAll"),"\uFF08",_.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",W.length]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!W.length||!!E,onClick:()=>O("approved"),children:["\u2713 ",t(Z==="rejected"?"restore":"approve")]}),Z==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!W.length||!!E,onClick:()=>O("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!W.length||!!E,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&O("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),W.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ze,children:t("auditClearSelection")})]}),_.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:_.map(y=>{let ae=_e[y.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${B&&B.path===y.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>T(y.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:z.has(y.path),onClick:X=>X.stopPropagation(),onChange:()=>je(y.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:ae,borderColor:ae+"38",background:ae+"18"},children:gt[y.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:"me-audit-row-kind",children:t($e[y.kind]||"kindKnowledge")}),(0,e.jsx)("span",{className:`me-audit-row-state ${Z==="pending"?"pending":"rejected"}`,children:Z==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:y.created?y.created.slice(0,16).replace("T"," "):"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:y.title,onClick:()=>T(y.path),children:y.title}),(y.reason||y.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:y.reason||y.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",ut(y.submittedBy)]}),(Array.isArray(y.tags)?y.tags:[]).slice(0,3).map(X=>(0,e.jsxs)("span",{children:["#",X]},X))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:X=>X.stopPropagation(),children:Z==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>O("approved",[y.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>O("rejected",[y.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>O("approved",[y.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&O("delete",[y.path])},children:"\u{1F5D1}"})]})})]})},y.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t("noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:B?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:_e[B.kind]||"#6B7280",borderColor:(_e[B.kind]||"#6B7280")+"59",background:(_e[B.kind]||"#6B7280")+"1a"},children:[gt[B.kind]||"\u{1F4CE}"," ",t($e[B.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${Z==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:Z==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:B.created?B.created.slice(0,16).replace("T"," "):""})]}),(0,e.jsx)("h3",{children:B.title}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",ut(B.submittedBy)]}),!!B.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",B.reason]}),(Array.isArray(B.tags)?B.tags:[]).slice(0,5).map(y=>(0,e.jsxs)("span",{children:["#",y]},y))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[Ce.loading&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",children:["\u23F3 ",t("loading")]}),Ce.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Ce.error]}),Ce.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Wt(ga(jt(Ce.text).body,B.title))}}):!Ce.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:B.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!E,onClick:()=>O("approved",[B.path]),children:["\u2713 ",t(Z==="rejected"?"restore":"approve")]}),Z==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!E,onClick:()=>O("rejected",[B.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!E,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&O("delete",[B.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("noAuditItems")})})]})]})]})]})}function Va({t,onReload:a,version:i}){let[g,c]=(0,o.useState)([]),[s,h]=(0,o.useState)(""),[k,S]=(0,o.useState)(null),L=(m,z=!0)=>{S({msg:m,ok:z}),setTimeout(()=>S(null),3200)},M=(0,o.useCallback)(async()=>{try{let m=await fetch(`${$}/recycle/list`).then(z=>z.json());m.ok&&c(m.items||[])}catch{}},[]);(0,o.useEffect)(()=>{M()},[i,M]);let x=async(m,z)=>{let N=(g.find(P=>P.path===z)||{}).title||z;h(m+z);try{let T=await fetch($+(m==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(z)),E=await T.json().catch(()=>null);await M(),a&&a(),T.ok&&(!E||E.ok!==!1)?L(t(m==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+N):L(t("toastFailed")+"\uFF1A"+(E&&E.error||"HTTP "+T.status),!1)}catch(P){L(t("toastFailed")+"\uFF1A"+String(P&&P.message||P),!1)}finally{h("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ma,{toast:k}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:g.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!s||g.length===0,title:g.length?"":t("emptyRecycle"),onClick:async()=>{h("purgeAll");try{let m=await fetch($+"/recycle/purge-expired?days=0"),z=await m.json().catch(()=>null);await M(),L(m.ok?t("toastPurgedExpired")+(z&&z.purged!=null?"\uFF08"+z.purged+"\uFF09":""):t("toastFailed"),m.ok)}catch(m){L(t("toastFailed")+"\uFF1A"+String(m&&m.message||m),!1)}finally{h("")}},children:["\u{1F5D1} ",t("emptyRecycle")]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),g.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:g.map(m=>{let z=_e[m.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:z,background:z+"18",borderColor:z+"38"},children:gt[m.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:m.title}),(0,e.jsxs)("span",{children:[t($e[m.kind]||"kindKnowledge")," \xB7 ",t("deletedAt")," ",(m.deletedAt||"").slice(0,10)]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!s,onClick:()=>x("restore",m.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!s,onClick:()=>{window.confirm(t("purgeConfirm"))&&x("purge",m.path)},children:t("purge")})]})]},m.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var ga=(t,a)=>{let i=String(t||"").split(/\r?\n/),g=s=>String(s||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),c=g(a);for(;;){let s=0;for(;s<i.length&&!i[s].trim();)s++;let h=/^#{1,2}\s+(.+?)\s*$/.exec(i[s]||"");if(!h||g(h[1])!==c)break;for(i.splice(s,1);s<i.length&&!i[s].trim();)i.splice(s,1)}return i.join(`
|
|
709
|
+
`)},qa=t=>{let a=[],i=!1,g=0;for(let c of String(t||"").split(/\r?\n/)){let s=c.trim();if(/^```/.test(s)){i=!i;continue}if(i)continue;let h=/^(#{1,6})\s+(.+)$/.exec(s);if(!h)continue;g++;let k=h[1].length;k<=3&&a.push({id:"md-h-"+g,level:k,text:h[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},Yt=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},fa=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},ba=({n:t=0,color:a="#ff9a72",size:i=30})=>{let g=Math.max(2,Math.min(6,Number(t)||2)),c=Array.from({length:g},(s,h)=>{let k=-Math.PI/2+h*Math.PI*2/g,S=h%2?13:16;return[20+Math.cos(k)*S,20+Math.sin(k)*S]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:i,height:i,viewBox:"0 0 40 40","aria-hidden":"true",children:[c.map(([s,h],k)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:s,y2:h,stroke:a,strokeOpacity:".35"},"l"+k)),c.map(([s,h],k)=>(0,e.jsx)("circle",{cx:s,cy:h,r:k%2?2.2:1.8,fill:a,fillOpacity:k%2?.8:.55},"c"+k)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},Ya=({card:t,t:a,onOpen:i,query:g,onDelete:c,onTagClick:s,pinned:h,onPin:k,links:S})=>{let L=_e[t.kind]||_e.other,M=Number(S??t.links??t.weight??0),x=_t(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${h?" pinned":""}`,onClick:()=>i(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:L,background:L+"18",borderColor:L+"38"},children:gt[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:a($e[t.kind]||"kindKnowledge")}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),rn(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:dt(t.updated)}),k&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${h?" on":""}`,title:a(h?"unpinCard":"pinCard"),"aria-label":a(h?"unpinCard":"pinCard"),onClick:m=>{m.stopPropagation(),k(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:g?Gt(t.title,g):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(fa(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:g?Gt(t.summary||"",g):Yt(t)})]}),g&&(()=>{let m=Zt(t.body||"",g);return m?(0,e.jsx)("p",{className:"mc-snippet",children:Gt(m,g)}):null})(),_t(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[_t(t).slice(0,2).map(m=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:m,onClick:z=>{z.stopPropagation(),s&&s(m)},children:["#",m]},m)),x.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",x.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[M>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(ba,{n:M,color:L})," ",(0,e.jsx)("b",{children:M})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",ut(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:m=>{m.stopPropagation(),window.confirm(a("deleteConfirm"))&&c&&c(t.path)},children:"\u{1F5D1}"})]})]})};function Ja({t,tab:a,onReload:i,version:g}){let[c,s]=(0,o.useState)(null),[h,k]=(0,o.useState)(""),[S,L]=(0,o.useState)(null),[M,x]=(0,o.useState)(null),[m,z]=(0,o.useState)(null),[N,P]=(0,o.useState)(null),[T,E]=(0,o.useState)(null),K=(0,o.useCallback)(async()=>{G("align");try{let p=await fetch($+"/align").then(D=>D.json());p&&p.findings?E(p):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{G("")}},[t]),se=async()=>{if(window.confirm(t("alignFixConfirm"))){G("alignfix");try{let p=await fetch($+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(D=>D.json());p&&p.ok?(notify(t("alignFixed")),await K()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{G("")}}},[V,Z]=(0,o.useState)([]),[te,G]=(0,o.useState)(""),[fe,ue]=(0,o.useState)(!1),_=(0,o.useCallback)(async()=>{if(!(!S||!S.merge||!S.merge.length)&&window.confirm(t("mergeAllConfirm"))){G("merge");try{let p={},D=H=>p[H]===void 0?H:p[H]=D(p[H]),A=(H,we)=>{p[D(H)]=D(we)},Y=new Set;for(let H of S.merge)Y.add(H.a.path),Y.add(H.b.path),A(H.a.path,H.b.path);let Se={};for(let H of Y){let we=D(H);(Se[we]=Se[we]||[]).push(H)}let le=0;for(let H of Object.values(Se)){if(H.length<2)continue;(await fetch(`${$}/merge?paths=${encodeURIComponent(H.join(","))}`).then(be=>be.json())).ok&&le++}await Q(),i&&i()}catch{}G("")}},[S,Q,i,t]);async function Q(){try{let p=await Promise.all([fetch(`${$}/stats`),fetch(`${$}/budget`),fetch(`${$}/capture-log`),fetch(`${$}/cards?status=all&limit=30&agent=${Rt}`),fetch(`${$}/overview`)]),[D,A,Y,Se,le]=await Promise.all(p.map(H=>H.json()));D&&D.ok&&s(D),A&&A.ok&&x(A),Y&&Y.ok&&z(Y),Se&&Se.ok&&Z(Se.cards||[]),le&&le.ok&&P({db:le.db,backups:le.backups,total:le.total,version:le.version,degraded:le.degraded===!0}),k(!D||!D.ok?t("adminLoadFail"):"")}catch{k(t("adminLoadFail"))}}let je=(0,o.useCallback)(async()=>{G("scan");try{let p=await fetch(`${$}/optimize`).then(D=>D.json());p.ok&&L(p)}catch{k(t("adminLoadFail"))}finally{G("")}},[t]),[O,Be]=(0,o.useState)(null),f=(0,o.useCallback)(async()=>{G("refine");try{let p=await fetch(`${$}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(D=>D.json());p&&p.ok?Be(p):notify(p&&p.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{G("")}},[t]),F=async(p,D)=>{if(!(D==="merge"&&!window.confirm(t("mergeConfirm")))){G("refineapply");try{let A=await fetch(`${$}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:p.a.path,b:p.b.path,action:D,relation:p.relation})}).then(Y=>Y.json());A&&A.ok?(notify(t("refineApplied")),Be(Y=>Y&&{...Y,findings:(Y.findings||[]).filter(Se=>!(Se.a.path===p.a.path&&Se.b.path===p.b.path))}),await Q(),i&&i()):notify(A&&A.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{G("")}}},[W,B]=(0,o.useState)(null),Ce=(0,o.useCallback)(async()=>{G("junk");try{let p=await fetch(`${$}/refine-junk`).then(D=>D.json());p&&p.ok?B(p.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{G("")}},[t]),ze=async p=>{if(p.length&&window.confirm(t("junkRecycleAllConfirm"))){G("junkpurge");try{let D=await fetch(`${$}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:p})}).then(A=>A.json());D&&D.removed?(notify(t("junkDone")+"\uFF1A"+D.removed.length+(D.failed?.length?"\uFF08\u5931\u8D25 "+D.failed.length+"\uFF09":"")),B(A=>A&&A.filter(Y=>!D.removed.includes(Y.path))),await Q(),i&&i()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{G("")}}},[pe,ve]=(0,o.useState)(null),y=(0,o.useCallback)(async()=>{G("goals");try{let p=await fetch($+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(D=>D.json());p&&p.ok?ve(p):notify(p&&p.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{G("")}},[t]),ae=async p=>{G("goalskeep");try{let D=await fetch($+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:p.members.map(A=>A.path)})}).then(A=>A.json());D&&D.ok?(notify(t("goalDone")),ve(A=>A&&{...A,clusters:(A.clusters||[]).filter(Y=>Y.goal!==p.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{G("")}},X=async p=>{if(window.confirm(t("mergeConfirm"))){G("goalsmerge");try{let D=await fetch($+"/merge?paths="+encodeURIComponent(p.members.map(A=>A.path).join(","))).then(A=>A.json());D&&D.ok?(notify(t("goalMerged")),ve(A=>A&&{...A,clusters:(A.clusters||[]).filter(Y=>Y.goal!==p.goal)}),await Q(),i&&i()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{G("")}}};(0,o.useEffect)(()=>{Q()},[g]);let Ne=async(p,D)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${$}/merge?paths=${encodeURIComponent(p+","+D)}`).then(Y=>Y.json())).ok&&(await Q(),i&&i())}catch{}},ne=async p=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${$}/delete?path=${encodeURIComponent(p)}`).then(A=>A.json())).ok&&(await Q(),i&&i())}catch{}},xe=["project","knowledge","content","prompt","business","tool","mistake"],Ge=({title:p,kind:D,updated:A,path:Y})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[D]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:dt(A)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>ne(Y),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[h&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",h]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Q,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:N?`${N.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Q(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:N?N.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:N?.db?.journalMode||N?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:N?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:N?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(N.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:m?.available?m.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:m?.health?.lastAt?dt(new Date(m.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:N?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Q(),children:["\u21BB ",t("refresh")]})]}),N?(()=>{let p=N.db||{},D=p.writable!==!1&&!p.corrupt,A=N.backups||{count:0,newestAt:0},Y=A.newestAt?Math.floor((Date.now()-Number(A.newestAt))/864e5):-1,Se=A.count?Y>7?"warn":"ok":"bad",le=m&&m.available?m.health:null,H=le?le.ok?"ok":"warn":"none",we=T&&T.findings?T.onDisk&&T.residentServed===T.onDisk&&T.hostVersion===T.onDisk?"ok":"warn":"none",be={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},u=[{label:t("healthDb"),level:D?"ok":"bad",text:D?"journal="+(p.journalMode||"?")+(p.checkedAt?" \xB7 "+new Date(p.checkedAt).toLocaleString():""):(p.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:Se,text:A.count?(Y<=0?t("healthBackupToday").replace("{n}",String(A.count)):t("healthBackupAge").replace("{n}",String(A.count)).replace("{d}",String(Y)))+(A.files&&A.files.length?" \xB7 "+A.files[A.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:H,text:le?le.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(le.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:we,text:we==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(T.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(T.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(T.hostVersion||"?"),action:we==="none"?{label:t("alignRun"),run:K}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:u.map(d=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:be[d.level][1]},children:be[d.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:d.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:d.text}),d.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!te,onClick:d.action.run,children:d.action.label})]},d.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!te,onClick:K,children:t(te==="align"?"exporting":"alignRun")}),T&&T.counts&&T.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!te,onClick:se,children:t(te==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),T&&T.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",T.onDisk||"?",T.residentServed?" \xB7 "+t("alignResident")+" v"+T.residentServed:"",T.hostVersion?" \xB7 "+t("alignHost")+" v"+T.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:T.findings.map((p,D)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:D?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:p.level==="fix"?"#ef4444":p.level==="warn"?"#f59e0b":"#10b981"},children:p.level==="fix"?"\u2717":p.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:p.title}),p.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:p.detail}):null,p.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:p.command})]}):null]},D))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Q(),children:["\u21BB ",t("refresh")]})]}),m?m.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(m.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(m.entries||[]).map((p,D)=>{let A=Ha[p.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:dt(p.time?new Date(p.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:A[1],fontWeight:600},children:[A[0]," ",p.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:p.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:p.preview||"",children:p.preview||""})]},D)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",V.length,"\uFF09"]}),V.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:V.map(p=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:_e[p.kind]||_e.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.title}),p.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:dt(p.updated)})]},p.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),c&&(0,e.jsxs)(e.Fragment,{children:[c.trend&&c.trend.length>0&&(()=>{let p=c.trend,D=Math.max(...p.map(le=>le.count),1),A=260,Y=50,Se=A/p.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:A,height:Y,style:{display:"block",width:"100%",height:50},children:p.map((le,H)=>{let we=Math.round(le.count/D*(Y-4));return(0,e.jsx)("rect",{x:H*Se+1,y:Y-we,width:Math.max(Se-2,2),height:we,rx:1.5,fill:le.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:le.count>0?.85:.35},le.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:xe.map(p=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[p]||"#666"}}),t($e[p]),": ",c.byKind?.[p]||0]},p))})]}),M&&(M.budgetChars||M.recallLimit||M.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:M.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:M.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",M.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",c.todayCards?.length||0,"\uFF09"]}),c.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:c.todayCards.map(p=>(0,e.jsx)(Ge,{title:p.title,kind:p.kind,updated:p.updated,path:p.path},p.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!te,onClick:je,children:te==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),S&&S.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!te,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){G("oneclick");try{let p=JSON.stringify({cleanupStale:fe}),A=await(await fetch(`${$}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:p})).json();A&&A.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${A.plan.merged} ${t("optimizedMerged")}${fe?` \xB7 ${A.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await Q(),i&&i(),L(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{G("")}}},children:te==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),S&&S.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:fe,onChange:p=>ue(p.target.checked)}),t("oneClickAlsoStale")]})]}),!S&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),S&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),S.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!te,onClick:_,children:t(te==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),S.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:S.merge.map((p,D)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p.a.title," \u21C4 ",p.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(p.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ne(p.a.path,p.b.path),children:t("mergeNow")})]},D))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",S.stale?.length||0,"\uFF09"]}),S.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!te,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;G("clean");let p=0;for(let D of S.stale)try{await fetch(`${$}/delete?path=${encodeURIComponent(D.path)}`),p++}catch{}G(""),notify(`${p} ${t("deletedStale")}`),await Q(),i&&i()},children:t("cleanStale")})}),S.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:S.stale.map(p=>(0,e.jsx)(Ge,{title:p.title,kind:"other",updated:p.updated,path:p.path},p.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!te,onClick:f,children:t(te==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),O?.findings?.length?O.findings.map((p,D)=>(0,e.jsxs)("div",{style:{borderTop:D?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:p.relation==="conflict"?"#ef4444":p.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+p.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",p.sim," \xB7 ",p.useModel||""]}),p.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:p.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",p.a.title,(0,e.jsx)("br",{}),"B\uFF1A",p.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>F(p,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>F(p,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>F(p,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>F(p,"merge"),children:t("refineMerge")})]})]},D)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(O?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!te,onClick:Ce,children:t(te==="junk"?"exporting":"junkScan")}),W?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!te,onClick:()=>ze(W.map(p=>p.path)),children:t(te==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),W?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:W.map((p,D)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:D?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:p.reasons.join("\uFF1B"),children:p.title||p.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:p.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>ze([p.path]),children:t("junkRecycle")})]},D))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(W?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!te,onClick:y,children:t(te==="goals"?"exporting":"goalScan")}),pe?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",pe.cached," / ",pe.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),pe?.clusters?.length?pe.clusters.map((p,D)=>(0,e.jsxs)("div",{style:{borderTop:D?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:p.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",p.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:p.members.map((A,Y)=>(0,e.jsx)("li",{children:A.title},Y))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>ae(p),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!te,onClick:()=>X(p),children:t("goalMerge")})]})]},D)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(pe?"goalNone":"goalIdle")})]})]})]})]})}var Ut=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function Xa({t,newCard:a,setNewCard:i,onCreated:g}){if(!a)return null;let c=Ut.find(x=>x.key===a.template),s=a.body||(c?t(c.bodyKey):""),h=a.kind||(c?c.kind:"knowledge"),k=a.tags||(c?t(c.tagKey):""),S=a._creating,L=x=>{let m=Ut.find(z=>z.key===x);i(z=>({...z,template:x,kind:m?m.kind:z.kind,body:m?t(m.bodyKey):z.body,tags:m?t(m.tagKey):z.tags}))},M=async()=>{if(!(!a.title&&!s)){i(x=>({...x,_creating:!0}));try{(await fetch(`${$}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:h,tags:k.split(",").map(m=>m.trim()).filter(Boolean),body:s,source:"manual"})}).then(m=>m.json())).ok?(i(null),g&&g()):i(m=>({...m,_creating:!1}))}catch{i(m=>({...m,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>i(null),children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:x=>x.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>i(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[Ut.map(x=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===x.key?" me-on":""}`,onClick:()=>L(x.key),children:t(x.label)},x.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>i(x=>({...x,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:h,onChange:x=>i(m=>({...m,kind:x.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:["project","knowledge","content","prompt","business","tool","mistake"].map(x=>(0,e.jsx)("option",{value:x,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:x},x))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:x=>i(m=>({...m,title:x.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:k,onChange:x=>i(m=>({...m,tags:x.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:s,onChange:x=>i(m=>({...m,body:x.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:S,onClick:M,children:t(S?"exporting":"createCard")})})]})]})]})}async function Vt(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let i=document.createElement("textarea");i.value=a,i.setAttribute("readonly",""),i.style.position="fixed",i.style.left="-9999px",i.style.top="0",document.body.appendChild(i),i.focus(),i.select();let g=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(i),g}catch{return!1}}function Za({t,onClose:a}){let[i,g]=(0,o.useState)(""),[c,s]=(0,o.useState)(""),[h,k]=(0,o.useState)(""),[S,L]=(0,o.useState)(!0),[M,x]=(0,o.useState)(!1),[m,z]=(0,o.useState)(""),[N,P]=(0,o.useState)(""),T=(0,o.useRef)(null),E=(0,o.useRef)(null),K=()=>{let _=T.current;if(_)try{_.focus(),_.select()}catch{}},se=_=>{z(_),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>z(""),2400)};(0,o.useEffect)(()=>{let _=!0;return fetch($+"/diagnostics").then(Q=>Q.json()).then(Q=>{_&&(Q&&Q.ok?(s(String(Q.diagnostics||"")),k(String(Q.version||""))):x(!0))}).catch(()=>{_&&x(!0)}).finally(()=>{_&&L(!1)}),()=>{_=!1}},[]),(0,o.useEffect)(()=>{let _=Q=>{Q.key==="Escape"&&a()};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_),E.current&&clearTimeout(E.current)}},[a]);let V=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),Z=()=>{let _=i.trim().split(`
|
|
710
|
+
`)[0]||"",Q=ea({title:"[Bug] "+(_.slice(0,60)||"memory-eternal \u95EE\u9898"),body:ta({description:i,diagnostics:c,version:h})});try{window.open(Q,"_blank","noopener")}catch{se(t("fbCopyFail"))}},te=async()=>{await Vt(c)?(P(""),se(t("fbCopiedDiag"))):(P(c),se(t("fbCopyManual")))},G=async()=>{let _=aa({lang:V,description:i,diagnostics:c});await Vt(_)?(P(""),se(t("fbCopiedPrompt"))):(P(_),se(t("fbCopyManual")))},fe={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},ue={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:_=>_.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:i,onChange:_=>g(_.target.value),placeholder:t("fbDesc"),rows:5,style:fe}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:te,disabled:!c,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:ue,children:S?t("fbLoading"):M?t("fbDiagFail"):c})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!i.trim()){se(t("fbNeedDesc"));return}Z()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:G,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),m&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:m}),N&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:K,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:T,readOnly:!0,value:N,rows:7,style:fe})]})]})]})]})}function Qa({t,tab:a,onTab:i,onClose:g,onFeedback:c,onReplay:s}){let[h,k]=(0,o.useState)(null);(0,o.useEffect)(()=>{if(!h)return;let x=m=>{m.key==="Escape"&&k(null)};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[h]);let S=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],L="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",M=(x,m)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:x,alt:m,loading:"lazy",title:t("clickToZoom"),onClick:z=>k(z.currentTarget.currentSrc||x),onError:z=>{let N=z.currentTarget;N.dataset.fb||(N.dataset.fb="1",N.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(x).split("/").pop())}}),(0,e.jsx)("figcaption",{children:m})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:g,children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:x=>x.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:g,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:S.map(x=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===x.id?" active":""}`,onClick:()=>i(x.id),children:x.label},x.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsx)("div",{className:"me-support-qr",children:M("support/group-qr.jpg",t("supportGroup"))}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:L,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[M("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),M("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:L,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:c,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:s,children:["\u2728 ",t("supportReplay")]})]})]}),h&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:x=>{x.stopPropagation(),k(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:x=>{x.stopPropagation(),k(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:h,alt:"",onClick:x=>x.stopPropagation()})]})]})}function en({t,onDone:a}){let[i,g]=(0,o.useState)(0),c="https://github.com/EternalNight996/memory-eternal",s=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],h=i===s.length-1;return(0,o.useEffect)(()=>{let k=S=>{S.key==="Escape"&&a()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:s.map((k,S)=>(0,e.jsx)("span",{className:`me-guide-dot${S<=i?" on":""}`},S))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:s[i].title}),(0,e.jsx)("p",{children:s[i].body}),i===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>Kt(c),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Kt(c+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),i===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),i===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),i===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),i>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>g(k=>k-1),children:t("onboardBack")}),h?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>g(k=>k+1),children:t(i===0?"onboardStarred":"onboardNext")})]})]})]})}function tn({t,card:a,query:i,onClose:g,onDelete:c,onFeedback:s,onNavigate:h,onTagClick:k,allCards:S,onOpenRelated:L}){let[M,x]=(0,o.useState)(0),[m,z]=(0,o.useState)(""),[N,P]=(0,o.useState)(()=>{try{let F=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(F)?F:"mid"}catch{return"mid"}}),T={narrow:720,mid:900,wide:1180};(0,o.useEffect)(()=>{let F=W=>{if(W.key==="Escape"){g();return}let B=String(W.target&&W.target.tagName||"").toLowerCase();B==="input"||B==="textarea"||B==="select"||W.target&&W.target.isContentEditable||(W.key==="j"&&h?(W.preventDefault(),h(1)):W.key==="k"&&h&&(W.preventDefault(),h(-1)))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[g,h]);let E=async(F,W)=>{let B=await Vt(String(F||""));z(B?t("copied")+" \xB7 "+W:t("copyFail")),setTimeout(()=>z(""),1500)},{meta:K,body:se}=(0,o.useMemo)(()=>jt(a.text||""),[a.text]),V=F=>{let W=K.find(([B])=>String(B).toLowerCase()===F);return W?W[1]:""},Z=Xt(V("tags")),te=V("kind")||"knowledge",G=(V("status")||"approved").toLowerCase(),fe=_e[te]||"#6B7280",ue=(se||"").length>460,_=(0,o.useMemo)(()=>ga(se,a.title),[se,a.title]),Q=(0,o.useMemo)(()=>{let F=Yt(a);if(F)return F;let B=(_.split(/\r?\n/).map(Ce=>Ce.trim()).find(Ce=>Ce&&!/^#{1,2}\s/.test(Ce))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return B.length>150?B.slice(0,148)+"\u2026":B},[a,_]),je=(0,o.useMemo)(()=>qa(_),[_]),O=(0,o.useMemo)(()=>{let F=new Set(Z);return(S||[]).filter(W=>W.path!==a.path&&(W.tags||[]).some(B=>F.has(B))).slice(0,3)},[S,a.path,Z.join("|")]),[Be,f]=(0,o.useState)(!0);return(0,e.jsxs)("div",{className:"me-overlay",onClick:g,children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:F=>F.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:gt[te]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[m&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:m}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>E(se,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>E(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let F=["narrow","mid","wide"],W=F[(F.indexOf(N)+1)%F.length];P(W);try{localStorage.setItem("me-read-width",W)}catch{}},children:[t("readWidth")," \xB7 ",t(N==="narrow"?"widthNarrow":N==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!1),children:["\u{1F44E} ",t("fbIrr")]}),ue&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":Be,onClick:()=>f(F=>!F),children:t(Be?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&c&&c(a.path)},children:t("delete")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:g,children:t("close")})]})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:fe,borderColor:fe+"59",background:fe+"1a"},children:[gt[te]||"\u{1F4CE}"," ",t($e[te]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(G==="approved"?"md-chip-st-ok":G==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[G==="approved"?"\u2705":G==="pending"?"\u23F3":"\u26D4"," ",t(G==="approved"?"statusApproved":G==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(Z)?Z:[]).slice(0,8).map(F=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:F,onClick:()=>k&&k(F),children:["\u{1F3F7} ",F]},F)),!!V("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",dt(V("updated"))]}),!!V("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",V("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:M+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:T[N],margin:"0 auto",width:"100%",boxSizing:"border-box",...Be?{}:{maxHeight:300,overflow:"hidden"}},onScroll:F=>{let W=F.currentTarget,B=W.scrollHeight-W.clientHeight;x(B<=0?100:Math.min(100,Math.max(0,W.scrollTop/B*100)))},onClick:Be?void 0:F=>{F.stopPropagation(),f(!0)},children:[!!Q&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(fa(a))}),(0,e.jsx)("p",{children:Q})]}),(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Wt(_)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[je.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:je.map((F,W)=>(0,e.jsxs)("button",{type:"button",className:`lv${F.level}`,onClick:()=>{let B=document.getElementById(F.id);B&&B.scrollIntoView({block:"start",behavior:"smooth"})},children:[(0,e.jsx)("span",{children:String(W+1).padStart(2,"0")}),F.text]},F.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:V("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:dt(V("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),Z.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:Z.slice(0,8).map(F=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>k&&k(F),children:["#",F]},F))})]}),O.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:O.map(F=>(0,e.jsxs)("button",{type:"button",onClick:()=>L&&L(F),children:[(0,e.jsx)("span",{children:gt[F.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:F.title})]},F.path))})]})]})]}),!Be&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:F=>{F.stopPropagation(),f(!0)},children:[t("expand")," \u2304"]})]})]})}function an({t,onOpen:a,all:i,onAllChange:g,onMutate:c,active:s,visible:h}){let[k,S]=(0,o.useState)(null),[L,M]=(0,o.useState)(""),x=(0,o.useRef)(!1),m=(0,o.useRef)(0),z=(0,o.useRef)(t);z.current=t;let N=(0,o.useCallback)(async()=>{try{x.current=!1;let K=await(await fetch(`${$}/graph${i?"?all=1":""}`)).json();K.ok?(S(K),M(""),x.current=!0):(S(null),M(K.error||t("error")))}catch(E){M(String(E&&E.message?E.message:E))}},[i,t]);(0,o.useEffect)(()=>{if(!s||x.current)return;let E=!0;return fetch(`${$}/graph${i?"?all=1":""}`).then(K=>K.json()).then(K=>{E&&(K.ok?(S(K),M(""),x.current=!0):(S(null),M(K.error||t("error"))))}).catch(K=>{E&&M(String(K&&K.message?K.message:K))}),()=>{E=!1}},[i,t,s]),(0,o.useEffect)(()=>{h&&k&&m.current++},[h,k]);let P=(0,o.useCallback)(async E=>{try{let se=await(await fetch(`${$}/delete?path=${encodeURIComponent(E)}`)).json();return se&&se.ok?(await N(),c&&c(),!0):!1}catch{return!1}},[N]),T=(0,o.useCallback)(async E=>{if(!E||E.length<2)return!1;try{let K=await fetch(`${$}/merge?paths=${encodeURIComponent(E.join(","))}`).then(se=>se.json());return K&&K.ok?(await N(),c&&c(),!0):!1}catch{return!1}},[N,c]);return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:k?`${k.nodes.length} ${t("nodes")} \xB7 ${sa(k.edges)} ${t("edges")}`:""})]}),L&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",L]}),!k&&!L&&(0,e.jsx)("div",{className:"mc-empty",children:t("loading")}),k&&k.nodes.length===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("emptyGraph")}),k&&k.nodes.length>0&&(0,e.jsx)(nn,{nodes:k.nodes,edges:k.edges,onOpen:a,onDelete:P,onMerge:T,t,all:i,onAllChange:g,countLabel:`${k.nodes.length} ${t("nodes")} \xB7 ${sa(k.edges)} ${t("edges")}`,fitTrigger:m.current})]})}function sa(t){let a=new Set;for(let i of t||[])a.add([i.source,i.target].sort().join("|"));return a.size}var mt={colors:{project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function nn({nodes:t,edges:a,onOpen:i,onDelete:g,onMerge:c,t:s,countLabel:h,all:k,onAllChange:S,fitTrigger:L}){let M=(0,o.useRef)(null),x=(0,o.useRef)(null),m=(0,o.useRef)(null),z=(0,o.useRef)(null),N=(0,o.useRef)(null),P=(0,o.useRef)(i);(0,o.useEffect)(()=>{P.current=i},[i]);let T=(0,o.useRef)(g);(0,o.useEffect)(()=>{T.current=g},[g]);let E=(0,o.useRef)(c);(0,o.useEffect)(()=>{E.current=c},[c]);let[K,se]=(0,o.useState)(""),[V,Z]=(0,o.useState)(null),te=(0,o.useRef)("");(0,o.useEffect)(()=>{te.current=K.trim().toLowerCase()},[K]),(0,o.useEffect)(()=>{let u=m.current;if(!u)return;let d=K.trim().toLowerCase();if(!d)return;let J=u.nodes.find(he=>(he.name||"").toLowerCase().includes(d));J&&(m.current.selectedId=J.id,Z(J.id),u.panX=u.w/2-J.x*u.zoom,u.panY=u.h/2-J.y*u.zoom,u.render&&u.render())},[K]);let[G,fe]=(0,o.useState)("all"),[ue,_]=(0,o.useState)(!1),Q=(0,o.useRef)("all"),[je,O]=(0,o.useState)(""),Be=(0,o.useRef)(""),[f,F]=(0,o.useState)(!1),W=(0,o.useRef)(!1),[B,Ce]=(0,o.useState)(null);(0,o.useEffect)(()=>{Q.current=G},[G]),(0,o.useEffect)(()=>{Be.current=je},[je]),(0,o.useEffect)(()=>{W.current=f},[f]);let ze=(0,o.useMemo)(()=>{let u=new Map;for(let d of t)for(let J of d.tags||[]){let he=String(J).trim();he&&u.set(he,(u.get(he)||0)+1)}return[...u.entries()].sort((d,J)=>J[1]-d[1]).slice(0,24).map(([d,J])=>({tag:d,n:J}))},[t]),pe=(0,o.useMemo)(()=>{let u={};for(let d of t)u[d.kind||"other"]=(u[d.kind||"other"]||0)+1;return u},[t]),ve=(()=>{let u=K.trim().toLowerCase();return!!u&&!t.some(d=>(d.title||d.name||"").toLowerCase().includes(u)||String(d.kind||"").toLowerCase().includes(u)||String($e[d.kind]||"").toLowerCase().includes(u))})();(0,o.useEffect)(()=>{let u=m.current;u&&u.wake&&u.wake()},[K]),(0,o.useEffect)(()=>{let u=m.current;u&&u.render&&u.render()},[G,je,f]);let y=(0,o.useRef)(null),[ae,X]=(0,o.useState)([]),[Ne,ne]=(0,o.useState)(null),[xe,Ge]=(0,o.useState)(!1),[p,D]=(0,o.useState)(null),[A,Y]=(0,o.useState)(""),Se=(0,o.useRef)(null),le=(0,o.useRef)(null),H=(u,d=!0)=>{Se.current&&clearTimeout(Se.current),D({msg:u,ok:d}),Se.current=setTimeout(()=>D(null),1900)},we=u=>{Y(u),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>Y(""),1600)};(0,o.useEffect)(()=>()=>{Se.current&&clearTimeout(Se.current),le.current&&clearTimeout(le.current)},[]);let be=(0,o.useMemo)(()=>t.reduce((u,d)=>(u[d.id]=d,u),{}),[t]);return(0,o.useEffect)(()=>{let u=M.current;if(!u||t.length===0)return;let d=u.getContext("2d");if(!d)return;let J=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),he=()=>document.documentElement.getAttribute("data-theme")==="dark",Me={};a.forEach(r=>{Me[r.source]=(Me[r.source]||0)+1,Me[r.target]=(Me[r.target]||0)+1});let Te=Math.max(1,...Object.values(Me)),n={nodes:t.map(r=>({id:r.id,name:r.title||"",type:r.kind||"other",r:9+Math.min(10,(Me[r.id]||0)/Te*8),x:0,y:0,vx:0,vy:0})),edges:a.map(r=>({sourceNodeId:r.source,targetNodeId:r.target,weight:1})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:J,ctx:d,multi:[],marquee:null};n.domain=t,n.domainById=t.reduce((r,v)=>(r[v.id]=v,r),{}),n.nodes.forEach((r,v)=>{let C=v/n.nodes.length*Math.PI*2-Math.PI/2;r.x=Math.cos(C)*60,r.y=Math.sin(C)*60});let ot=[...new Set(n.nodes.map(r=>r.type))];n.clustered=ot.length>1,n.typeCenters={},ot.forEach((r,v)=>{let C=v/ot.length*Math.PI*2-Math.PI/2;n.typeCenters[r]={x:Math.cos(C)*160,y:Math.sin(C)*160}}),m.current=n;let ct=0,Ke=0,Pe=null,Xe="",bt=()=>{let r=u.clientWidth,v=u.clientHeight;n.w=r,n.h=v,u.width=r*J,u.height=v*J,d.setTransform(J,0,0,J,0,0),(ct===0||Ke===0)&&r>0&&v>0&&n.tickCount>0&&requestAnimationFrame(()=>oe()),ct=r,Ke=v};bt();let it=new ResizeObserver(bt);it.observe(u.parentElement);let Re=(r,v)=>r&&r.length>v?r.slice(0,v)+"\u2026":r,et=(r,v,C,R)=>{if(d.beginPath(),R==="rect")d.rect(r-C,v-C*.75,C*2,C*1.5);else if(R==="diamond")d.moveTo(r,v-C),d.lineTo(r+C,v),d.lineTo(r,v+C),d.lineTo(r-C,v),d.closePath();else if(R==="hexagon"){for(let j=0;j<6;j++){let ee=Math.PI/3*j-Math.PI/2,de=r+C*Math.cos(ee),ge=v+C*Math.sin(ee);j===0?d.moveTo(de,ge):d.lineTo(de,ge)}d.closePath()}else d.arc(r,v,C,0,Math.PI*2)},Fe=new Map,l=(r,v)=>{let C=r+"|"+Math.round(v),R=Fe.get(C);if(!R){let j=parseInt(r.slice(1,3),16),ee=parseInt(r.slice(3,5),16),de=parseInt(r.slice(5,7),16);R=d.createRadialGradient(-v*.3,-v*.3,0,0,0,v*1.2),R.addColorStop(0,"rgba("+Math.min(255,j+70)+","+Math.min(255,ee+70)+","+Math.min(255,de+70)+",0.95)"),R.addColorStop(1,r),Fe.set(C,R)}return R},I=1.1,U=3,oe=()=>{if(!n.nodes.length)return;let r=1/0,v=-1/0,C=1/0,R=-1/0;n.nodes.forEach(De=>{r=Math.min(r,De.x),v=Math.max(v,De.x),C=Math.min(C,De.y),R=Math.max(R,De.y)});let j=20,ee=v-r+j*2,de=R-C+j*2,ge=Math.min(n.w/ee,n.h/de),Ae=Math.pow(1/I,U);n.zoom=Math.max(.35,Math.min(1.8,ge*Ae)),n.panX=n.w/2-(r+v)/2*n.zoom,n.panY=n.h/2-(C+R)/2*n.zoom};z.current=oe;let ie=()=>{d.clearRect(0,0,n.w,n.h),n.searchTerm=te.current,n.kindFilter=Q.current,n.timeMode=W.current,n.tagFilter=Be.current;let r=n.tagFilter,v=n.kindFilter,C=w=>String(w||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");d.save();let R=n.w+"x"+n.h;if(!Pe||Xe!==R){Pe=new Path2D;for(let w=0;w<n.w;w+=24)Pe.moveTo(w,0),Pe.lineTo(w,n.h);for(let w=0;w<n.h;w+=24)Pe.moveTo(0,w),Pe.lineTo(n.w,w);Xe=R}d.strokeStyle=he()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",d.lineWidth=.5,d.stroke(Pe),d.restore(),d.save(),d.translate(n.panX,n.panY),d.scale(n.zoom,n.zoom);let j={};n.nodes.forEach(w=>j[w.id]=w);let ee=n.nodes.length>40,de=ee?1.5:.55,ge=n.selectedId||n.hoverId,Ae=na({panX:n.panX,panY:n.panY,zoom:n.zoom,w:n.w,h:n.h,margin:80}),De=(()=>{let w=(n.searchTerm||"").toLowerCase();if(!w)return null;let ce=[];for(let me of n.nodes){let We=(n.domainById[me.id]||{}).kind||"other";if(((me.name||"").toLowerCase().includes(w)||String($e[We]||"").toLowerCase().includes(w)||String(We).toLowerCase().includes(w))&&ce.push(me.id),ce.length>200)break}return ce})(),ye=ia(n.nodes,{limit:oa(n.nodes.length),focusId:ge,hoverId:n.hoverId,searchHits:De,degree:Me}),ke=new Map,qe=(w,ce)=>{let me=w+"|"+ce,Ie=ke.get(me);return Ie===void 0&&(d.font=w,Ie=d.measureText(ce).width,ke.set(me,Ie)),Ie},tt=n.nodes.length<=250,Ze=new Map,rt=n.nodes.length>1200&&n.zoom<.3;n.edges.forEach(w=>{if(rt)return;let ce=j[w.sourceNodeId],me=j[w.targetNodeId];if(!ce||!me||!Ft(ce.x,ce.y,10,Ae)&&!Ft(me.x,me.y,10,Ae))return;if(v!=="all"){let xt=n.domainById[w.sourceNodeId]&&n.domainById[w.sourceNodeId].kind,nt=n.domainById[w.targetNodeId]&&n.domainById[w.targetNodeId].kind;if(xt!==v&&nt!==v)return}if(r){let xt=n.domainById[w.sourceNodeId]&&(n.domainById[w.sourceNodeId].tags||[]).includes(r),nt=n.domainById[w.targetNodeId]&&(n.domainById[w.targetNodeId].tags||[]).includes(r);if(!xt&&!nt)return}let Ie=me.x-ce.x,We=me.y-ce.y,Ve=Math.sqrt(Ie*Ie+We*We)||1,lt=ee?12:18,pt=-We/Ve*lt,Lt=Ie/Ve*lt,Bt=(ce.x+me.x)/2+pt,At=(ce.y+me.y)/2+Lt,Nt=mt.colors[n.domainById[ce.id]&&n.domainById[ce.id].kind||"other"],Mt=ge&&(w.sourceNodeId===ge||w.targetNodeId===ge),Ht=ge?Mt?.6:.08:ee?.14:.24,at=parseInt(Nt.slice(1,3),16),Tt=parseInt(Nt.slice(3,5),16),Et=parseInt(Nt.slice(5,7),16),Qe=Mt?1.6+(w.weight||1):.8+(w.weight||1)*.5,ft=at+","+Tt+","+Et+","+Ht+","+Qe,Je=Ze.get(ft);Je||(Je={path:new Path2D,stroke:"rgba("+at+","+Tt+","+Et+","+Ht+")",width:Qe},Ze.set(ft,Je)),Je.path.moveTo(ce.x,ce.y),Je.path.quadraticCurveTo(Bt,At,me.x,me.y)}),Ze.forEach(w=>{d.strokeStyle=w.stroke,d.lineWidth=w.width,d.stroke(w.path)});let Oe=null;ge&&(Oe=new Set,n.edges.forEach(w=>{w.sourceNodeId===ge?Oe.add(w.targetNodeId):w.targetNodeId===ge&&Oe.add(w.sourceNodeId)}));let st=[];if(n.nodes.forEach(w=>{if(!Ft(w.x,w.y,w.r+2,Ae))return;let ce=n.domainById[w.id]||{},me=ce.kind||"other",Ie=n.timeMode?on(ce.updated):mt.colors[me],We=mt.shapes[me],Ve=n.selectedId===w.id,lt=n.hoverId===w.id,pt=n.searchTerm||"",Lt=!pt||(w.name||"").toLowerCase().includes(pt)||String($e[me]||"").toLowerCase().includes(pt)||String(me).toLowerCase().includes(pt),Bt=v==="all"||me===v,At=!r||(ce.tags||[]).includes(r),Nt=ge&&w.id!==ge&&!(Oe&&Oe.has(w.id))||pt&&!Lt||!Bt||!At;d.save(),d.globalAlpha=Nt?.08:1,(Ve||lt)&&tt&&(d.shadowColor=Ie,d.shadowBlur=Ve?20:14),d.translate(w.x,w.y),et(0,0,w.r,We),d.fillStyle=l(Ie,w.r),d.fill(),d.restore(),Ve?(d.save(),et(w.x,w.y,w.r+3,We),d.strokeStyle=Ie,d.lineWidth=3,d.shadowColor=Ie,d.shadowBlur=12,d.stroke(),d.restore()):lt?(d.save(),et(w.x,w.y,w.r+2,We),d.strokeStyle=Ie,d.lineWidth=2,d.stroke(),d.restore()):pt&&Lt?(d.save(),et(w.x,w.y,w.r+2,We),d.strokeStyle="#e11d48",d.lineWidth=2,d.stroke(),d.restore()):n.multi.indexOf(w.id)>=0&&(d.save(),et(w.x,w.y,w.r+2,We),d.strokeStyle="#60a5fa",d.lineWidth=2,d.shadowColor="#60a5fa",d.shadowBlur=8,d.stroke(),d.restore());let Mt=Re(w.name,16);if((Ve||lt||ye.has(w.id)&&n.zoom>de||!ee&&n.zoom>.6)&&Bt&&At){let at=1/n.zoom,Tt="500 "+(12*at).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";d.font=Tt;let Qe=qe(Tt,Mt)+16*at,ft=18*at,Je=w.y+w.r+8*at,xt=!0;for(let nt of st)if(w.x-Qe/2<nt.x+nt.w&&w.x+Qe/2>nt.x&&Je<nt.y+nt.h&&Je+ft>nt.y){xt=!1;break}if(!xt&&!Ve&&!lt)return;st.push({x:w.x-Qe/2,y:Je,w:Qe,h:ft}),d.fillStyle=he()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",d.beginPath(),d.roundRect?d.roundRect(w.x-Qe/2,Je,Qe,ft,4*at):d.rect(w.x-Qe/2,Je,Qe,ft),d.fill(),d.strokeStyle=he()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",d.lineWidth=1*at,d.stroke(),d.fillStyle=he()?Ve||lt?"#eee":"#bbb":Ve||lt?"#111":"#444",d.textAlign="center",d.fillText(Mt,w.x,Je+13*at)}}),d.restore(),n.marquee){let w=n.marquee,ce=Math.min(w.sx,w.ex),me=Math.min(w.sy,w.ey),Ie=Math.abs(w.ex-w.sx),We=Math.abs(w.ey-w.sy);d.save(),d.setLineDash([4,4]),d.strokeStyle="rgba(96,165,250,0.9)",d.lineWidth=1,d.fillStyle="rgba(96,165,250,0.12)",d.fillRect(ce,me,Ie,We),d.strokeRect(ce,me,Ie,We),d.restore()}if(n.hoverId&&y.current){let w=n.domainById[n.hoverId],ce=n.nodes.find(function(me){return me.id===n.hoverId});if(w&&ce){let me=n.edges.filter(function(Ve){return Ve.sourceNodeId===w.id||Ve.targetNodeId===w.id}).length,Ie=ce.x*n.zoom+n.panX,We=ce.y*n.zoom+n.panY;y.current.style.display="block",y.current.style.left=Ie+14+"px",y.current.style.top=We-6+"px",y.current.innerHTML="<b>"+C(w.title||w.name||"")+'</b><br/><span style="opacity:.8">'+C(w.kind||"")+" \xB7 "+tRef.current("connCount").replace("{n}",me)+"</span>"}}else y.current&&(y.current.style.display="none")},q=()=>{n.running=!0,n.raf||(n.raf=requestAnimationFrame(He))};n.wake=q,n.render=ie;let re=()=>{let r=n.nodes.length;n.tickCount++;let C=.9-Math.min(.4,n.tickCount/1500),R=r>1e3?3e3:r>100?2e3:r>50?1200:800,j=r>100?.002:.005,ee=r>1e3?.012:r>100?.005:.01,de=r>1e3?6:r>200?12:24,ge={};n.nodes.forEach(ye=>ge[ye.id]=ye);for(let ye=0;ye<r;ye++){if(n.dragNode===n.nodes[ye])continue;let ke=n.nodes[ye],qe=0,tt=0;for(let Oe=0;Oe<r;Oe++){if(ye===Oe)continue;let st=ke.x-n.nodes[Oe].x,w=ke.y-n.nodes[Oe].y,ce=Math.sqrt(st*st+w*w)||1,me=R/(ce*ce);qe+=st/ce*me,tt+=w/ce*me}if(n.clustered&&n.typeCenters[ke.type]){let Oe=n.typeCenters[ke.type];qe+=(Oe.x-ke.x)*.006,tt+=(Oe.y-ke.y)*.006}else qe-=ke.x*ee,tt-=ke.y*ee;let Ze=(ke.vx+qe)*C,rt=(ke.vy+tt)*C;Ze=Math.max(-de,Math.min(de,Ze)),rt=Math.max(-de,Math.min(de,rt)),ke.vx=Ze,ke.vy=rt}n.edges.forEach(ye=>{let ke=ge[ye.sourceNodeId],qe=ge[ye.targetNodeId];if(!ke||!qe)return;let tt=qe.x-ke.x,Ze=qe.y-ke.y,rt=Math.sqrt(tt*tt+Ze*Ze)||1,Oe=(rt-100)*j,st=tt/rt*Oe,w=Ze/rt*Oe;n.dragNode!==ke&&(ke.vx+=st,ke.vy+=w),n.dragNode!==qe&&(qe.vx-=st,qe.vy-=w)});let Ae=0;n.nodes.forEach(ye=>{n.dragNode!==ye&&(ye.x+=ye.vx,ye.y+=ye.vy,Ae+=ye.vx*ye.vx+ye.vy*ye.vy)}),n.autoFitPending&&n.tickCount>45&&(n.autoFitPending=!1,oe()),(r?Math.sqrt(Ae/r):0)<.05&&n.tickCount>60&&!n.dragNode?n.quietTicks=(n.quietTicks|0)+1:n.quietTicks=0},He=()=>{if(n.running){try{re(),ie()}catch{}if(n.quietTicks>30){n.raf=0;return}n.raf=requestAnimationFrame(He)}},Ye=(r,v)=>{let C=u.getBoundingClientRect();return{x:(r-C.left-n.panX)/n.zoom,y:(v-C.top-n.panY)/n.zoom}},Le=r=>{let v=n.domainById[r];return!(!v||Q.current!=="all"&&v.kind!==Q.current||Be.current&&!(v.tags||[]).includes(Be.current))},ht=(r,v,C)=>Math.max(v,Math.min(C,r)),yt=r=>{n.mouseX=r.clientX,n.mouseY=r.clientY;let v=Ye(r.clientX,r.clientY),C=null;for(let R=n.nodes.length-1;R>=0;R--){let j=n.nodes[R];if(!Le(j.id))continue;let ee=j.x-v.x,de=j.y-v.y;if(ee*ee+de*de<j.r*j.r+36){C=j.id;break}}C!==n.hoverId&&(n.hoverId=C,q())},vt=r=>{if(r.button!==0)return;let v=Ye(r.clientX,r.clientY),C=null;for(let R=n.nodes.length-1;R>=0;R--){let j=n.nodes[R];if(!Le(j.id))continue;let ee=j.x-v.x,de=j.y-v.y;if(ee*ee+de*de<j.r*j.r+25){C=j;break}}if(r.shiftKey){if(C){n.shiftClick=C.id;return}n.marquee={sx:r.clientX,sy:r.clientY,ex:r.clientX,ey:r.clientY};return}n.dragStart={x:r.clientX,y:r.clientY,px:n.panX,py:n.panY},n.dragging=!1,n.dragNode=C||null,C&&(n.dragOffset={dx:C.x-v.x,dy:C.y-v.y})},zt=r=>{if(n.marquee){n.marquee.ex=r.clientX,n.marquee.ey=r.clientY,q();return}if(!n.dragStart)return;let v=r.clientX-n.dragStart.x,C=r.clientY-n.dragStart.y;if(Math.abs(v)+Math.abs(C)>3&&(n.dragging=!0),n.dragNode){let R=Ye(r.clientX,r.clientY);n.dragNode.x=R.x+n.dragOffset.dx,n.dragNode.y=R.y+n.dragOffset.dy,q()}else n.dragging&&(n.panX=ht(n.dragStart.px+v,-1e5,1e5),n.panY=ht(n.dragStart.py+C,-1e5,1e5),q())},Ee=r=>{if(n.marquee){let C=n.marquee;n.marquee=null;let R=u.getBoundingClientRect(),j=Math.min(C.sx,C.ex)-R.left,ee=Math.max(C.sx,C.ex)-R.left,de=Math.min(C.sy,C.ey)-R.top,ge=Math.max(C.sy,C.ey)-R.top,Ae=n.nodes.filter(De=>{let ye=De.x*n.zoom+n.panX,ke=De.y*n.zoom+n.panY;return ye>=j&&ye<=ee&&ke>=de&&ke<=ge}).map(De=>De.id);n.multi=Ae,X(Ae),q();return}let v=n.dragStart&&!n.dragging;if(n.shiftClick){let C=n.shiftClick;n.shiftClick=null;let R=Array.isArray(n.multi)?n.multi.slice():[];R.includes(C)||R.push(C),n.multi=R,X(R),q();return}if(v){let C=Ye(r.clientX,r.clientY),R=null;for(let j=n.nodes.length-1;j>=0;j--){let ee=n.nodes[j];if(!Le(ee.id))continue;let de=ee.x-C.x,ge=ee.y-C.y;if(de*de+ge*ge<ee.r*ee.r+20){R=ee;break}}R?(n.selectedId=R.id,Z(R.id),q()):(n.selectedId=null,n.hoverId=null,r.shiftKey||(n.multi=[],X([])),Z(null),q())}n.dragStart=null,n.dragging=!1,n.dragNode=null},Dt=r=>{r.preventDefault();let v=Ye(r.clientX,r.clientY),C=null;for(let R=n.nodes.length-1;R>=0;R--){let j=n.nodes[R];if(!Le(j.id))continue;let ee=j.x-v.x,de=j.y-v.y;if(ee*ee+de*de<j.r*j.r+25){C=j;break}}if(C){let R=n.domainById[C.id];R&&Ce({x:r.clientX,y:r.clientY,id:C.id,path:R.id,title:R.title})}else Ce(null)},Ct=r=>{r.preventDefault();let v=u.getBoundingClientRect(),C=(r.clientX-v.left-n.panX)/n.zoom,R=(r.clientY-v.top-n.panY)/n.zoom,j=Math.max(.3,Math.min(3,n.zoom*(r.deltaY<0?I:1/I)));n.panX=ht(n.panX+C*(n.zoom-j),-1e5,1e5),n.panY=ht(n.panY+R*(n.zoom-j),-1e5,1e5),n.zoom=j,q()};u.addEventListener("mousemove",yt),u.addEventListener("mousedown",vt),window.addEventListener("mousemove",zt),window.addEventListener("mouseup",Ee),u.addEventListener("wheel",Ct,{passive:!1}),u.addEventListener("contextmenu",Dt),N.current=()=>{n.selectedId=null,n.hoverId=null,n.multi=[],X([]),oe(),q()};for(let r=0;r<200;r++)re();oe(),q();let b=()=>_(!1);return window.addEventListener("mousedown",b),()=>{n.running=!1,n.raf&&cancelAnimationFrame(n.raf),it.disconnect(),u.removeEventListener("mousemove",yt),u.removeEventListener("mousedown",vt),window.removeEventListener("mousemove",zt),window.removeEventListener("mouseup",Ee),u.removeEventListener("wheel",Ct),u.removeEventListener("contextmenu",Dt),window.removeEventListener("mousedown",b)}},[t,a]),(0,o.useEffect)(()=>{L!==void 0&&z.current&&requestAnimationFrame(()=>z.current())},[L]),(0,e.jsxs)("div",{className:"me-graph",ref:x,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[t.length," ",s("nodes")," \xB7 ",a.length," ",s("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:s("search"),value:K,onChange:u=>se(u.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>_(u=>!u),"aria-expanded":ue,title:s("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",s("filterLabel")," ",G!=="all"||f||je?"\u25CF":"\u25BE"]}),ue&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:u=>u.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${G==="all"&&!f?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{fe("all"),F(!1)},children:s("all")}),Object.keys(_e).map(u=>(0,e.jsxs)("button",{type:"button",className:`lg${G===u?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>fe(d=>d===u?"all":u),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[u]||_e[u]}}),s($e[u])]},u)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${f?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>F(u=>!u),children:["\u23F1 ",s("timeDim")]}),ze.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:ze.map(u=>(0,e.jsxs)("button",{type:"button",className:`lg${je===u.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>O(d=>d===u.tag?"":u.tag),title:u.tag,children:["#",u.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:u.n})]},u.tag))})]}),(G!=="all"||f||je)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{fe("all"),F(!1),O("")},children:[s("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:s("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!k,onChange:u=>S&&S(u.target.checked)}),s("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${f?" me-on":""}`,onClick:()=>F(u=>!u),children:s("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let u=M.current;if(u)try{u.toBlob(d=>{d&&ne({url:URL.createObjectURL(d),blob:d})},"image/png")}catch{}},children:s("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>z.current&&z.current(),children:s("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Z(null),fe("all"),N.current&&N.current()},children:s("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:M,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(mt.colors).filter(u=>pe[u]).map(u=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:mt.colors[u]}}),(0,e.jsx)("span",{children:s($e[u]||"kindKnowledge")}),(0,e.jsx)("b",{children:pe[u]})]},u))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:y,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),ve&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:s("noMatch")}),B&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>Ce(null)}),B&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:B.x,top:B.y,zIndex:31},onMouseDown:u=>u.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",onClick:()=>{P.current({path:B.path,title:B.title}),Ce(null)},children:s("openCard")}),(0,e.jsx)("button",{type:"button",onClick:()=>{B.id&&(m.current.selectedId=B.id,Z(B.id)),Ce(null);let u=m.current;u&&u.wake&&u.wake()},children:s("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(B.title||"")}catch{}Ce(null),H(s("copied"))},children:s("copyName")}),(0,e.jsx)("button",{type:"button",onClick:()=>{let u=m.current,d=u&&Array.isArray(u.multi)?u.multi.slice():[],J=B.id;if(J&&!d.includes(J)&&d.push(J),Ce(null),d.length<2){H(s("mergeNeed"),!1);return}if(!window.confirm(s("mergeConfirm")))return;let he=E.current&&E.current(d);he&&he.then?he.then(Me=>Me?H(s("merged")):H(s("mergeFail"),!1)).catch(()=>H(s("mergeFail"),!1)):he&&H(s("merged"))},children:s("merge")}),(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let u=B.path;Ce(null),window.confirm(s("deleteConfirm"))&&(async()=>{try{(T.current?await T.current(u):!1)?H(s("deleted")):H(s("deleteFail"),!1)}catch{H(s("deleteFail"),!1)}})()},children:s("delete")})]}),ae.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[ae.length," ",s("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let d=ae.map(Te=>be[Te]).filter(Boolean).map(Te=>Te.title||Te.name).join(`
|
|
711
|
+
`),J=new Blob([d],{type:"text/plain;charset=utf-8"}),he=URL.createObjectURL(J),Me=document.createElement("a");Me.href=he,Me.download="memory-selected.txt",document.body.appendChild(Me),Me.click(),document.body.removeChild(Me),setTimeout(()=>URL.revokeObjectURL(he),1e3),H(ae.length+s("exportedSel"))},children:s("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(ae.length<2){H(s("mergeNeed"),!1);return}let u=ae.map(J=>be[J]?be[J].id:J);if(!window.confirm(s("mergeConfirm")))return;X([]);let d=m.current;d&&(d.multi=[]),fetch(`${$}/merge?paths=${encodeURIComponent(u.join(","))}`).then(J=>J.json()).then(J=>{J&&J.ok?H(s("merged")):H(s("mergeFail"),!1)}).catch(()=>H(s("mergeFail"),!1))},children:s("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(s("deleteConfirm")))return;let u=ae.map(J=>be[J]?be[J].id:J);X([]);let d=m.current;d&&(d.multi=[]),(async()=>{let J=0;for(let he of u)try{(T.current?await T.current(he):!1)&&J++}catch{}H(J+s("deletedSelected"),J>0)})()},children:s("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let u=m.current;u&&(u.multi=[]),X([]);let d=m.current;d&&d.render&&d.render()},children:s("clearSelection")})]}),V&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:be[V]?be[V].title||be[V].name:V}),(0,e.jsx)("div",{style:{opacity:.8,marginBottom:8},children:be[V]?s($e[be[V].kind]||"kindKnowledge"):"\u2014"}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:s("graphHint")}),(a.filter(u=>u.source===V||u.target===V)||[]).slice(0,8).map((u,d)=>{let J=u.source===V?u.target:u.source,he=be[J];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:Me=>{Me.preventDefault();let Te=m.current;Te&&(Te.selectedId=J,Te.hoverId=J,Te.wake&&Te.wake()),Z(J)},children:he?(he.title||he.name).slice(0,28):J},d)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:s("graphTip")}),p&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(p.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:p.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:p.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:p.msg})]}),Ne&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{Ne.url&&URL.revokeObjectURL(Ne.url),ne(null),Ge(!1)},children:[(0,e.jsx)("style",{children:Ue}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:xe?"100vw":900,width:xe?"100vw":"92vw",maxHeight:xe?"100%":"90vh",height:xe?"100%":void 0,borderRadius:xe?0:14},onClick:u=>u.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:s("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:Ne.url,download:"memory-graph.png",onClick:()=>{we("download"),H(s("downloaded")+" \xB7 "+s("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:s(A==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{we("full"),Ge(u=>!u),H(s("fullscreen"))},children:s(A==="full"?"done":xe?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let u=Ne.blob;u&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":u})]).then(()=>{we("copy"),H(s("copied"))}).catch(()=>{H(s("copyFail"),!1)}):H(s("copyFail"),!1)},children:s(A==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Ne.url&&URL.revokeObjectURL(Ne.url),ne(null),Ge(!1)},children:s("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:xe?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:Ne.url,alt:s("exportGraph"),style:{maxWidth:"100%",maxHeight:xe?"calc(100% - 64px)":"70vh",borderRadius:xe?0:8,cursor:"zoom-in"},onClick:()=>Ge(u=>!u)})})]})]})]})}function on(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let i=(Date.now()-a)/864e5;return i<3?"#10b981":i<14?"#f59e0b":i<30?"#f97316":"#94a3b8"}function la({label:t,value:a=[],options:i,onChange:g,placeholder:c,z:s=20}){let[h,k]=(0,o.useState)(!1),S=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!h)return;let P=T=>{S.current&&!S.current.contains(T.target)&&k(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[h]);let L=Array.isArray(a)?a:[],M=L.includes("__all__"),x=M?i.find(P=>P.value==="__all__")?.label||"":L.length?L.map(P=>i.find(T=>T.value===P)?.label||P).join("\u3001"):"",m=(P,T)=>{if(P.value==="__all__"){g(T?["__all__"]:[]);return}let E=new Set(L);E.has("__all__")&&E.delete("__all__"),T?E.add(P.value):E.delete(P.value),g([...E])},z=i.find(P=>P.value==="__all__"),N=i.filter(P=>P.value!=="__all__");return(0,e.jsxs)("label",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:12,minWidth:0},children:[(0,e.jsx)("span",{style:{opacity:.6,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.5},children:t}),(0,e.jsxs)("div",{ref:S,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>k(P=>!P),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x||c||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),h&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:s,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[z&&(0,e.jsxs)("label",{onClick:P=>P.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:M,onChange:P=>m(z,P.target.checked)}),(0,e.jsx)("span",{children:z.label})]}),N.map(P=>(0,e.jsxs)("label",{onClick:T=>T.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer"},children:[(0,e.jsx)("input",{type:"checkbox",checked:L.includes(P.value),onChange:T=>m(P,T.target.checked)}),(0,e.jsx)("span",{children:P.label})]},P.value))]})]})]})}function rn(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function sn(t,a,i){if(i&&typeof window.showSaveFilePicker=="function")try{let s=await window.showSaveFilePicker({suggestedName:a}),h=await s.createWritable();return await h.write(t),await h.close(),{ok:!0,picked:!0,name:s.name}}catch(s){return s&&s.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(s.message||s)}}let g=URL.createObjectURL(t),c=document.createElement("a");return c.href=g,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),setTimeout(()=>URL.revokeObjectURL(g),1e3),{ok:!0,picked:!1,name:a}}function Gt(t,a){if(!a||!t)return t;let i=t.toLowerCase(),g=a.toLowerCase(),c=[],s=0;for(;s<t.length;){let h=i.indexOf(g,s);if(h<0){c.push(t.slice(s));break}h>s&&c.push(t.slice(s,h)),c.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(h,h+g.length)},h)),s=h+g.length}return c}function dt(t){if(!t)return"";let a=new Date(t);if(Number.isNaN(a.getTime()))return"";let i=new Date,g=a.toDateString()===i.toDateString(),c=h=>String(h).padStart(2,"0"),s=`${c(a.getHours())}:${c(a.getMinutes())}`;return g?s:`${a.getMonth()+1}-${a.getDate()} ${s}`}
|
|
357
712
|
|
|
358
713
|
return module.exports;
|
|
359
714
|
},
|