@evandu/super-pi 0.1.294 → 0.1.295

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.
@@ -1,4 +1,4 @@
1
1
  {
2
- "hash": "54a3a131421edf23fe5f575e84583c8c47484c4fdccc9f6e8e584f28fb3a6cb8",
3
- "recordedAt": "2026-11-25T06:29:30.444Z"
2
+ "hash": "d317f3889e43c1ebb9d79635f9614c2f4fa1180460148f754fcde1e93f063efb",
3
+ "recordedAt": "2026-11-25T18:18:35.901Z"
4
4
  }
@@ -1,10 +1,11 @@
1
1
  {
2
- "hash": "5e752bb1088d6afe45f171af23a4dcddac620ff4c45adaf24fcbf7cfd97f1c06",
2
+ "hash": "8aaf24be017e8c55016a185af00fd6dd3bacc705656516667cbb1b49b15397a4",
3
3
  "files": {
4
4
  "src/client/AnchoredPopover.tsx": "3d683cc9e4305678141c83987a37a36b3da30e20d7bd17ea8e48a72504475605",
5
- "src/client/App.tsx": "cb112b3739987033e68a15d3fc8067903f27e71b89a31b3cf819efaa6b4cd60c",
5
+ "src/client/App.tsx": "c89d84c0e83c6f7e8751b3e63c47cf4f0905c19e454a3a22cdbb5482079c74b5",
6
+ "src/client/BackgroundReturnBatch.tsx": "70c4ffb2f93fa4a55e9527c652942c67cea60a4a1b603576603751bcb8be9116",
6
7
  "src/client/CacheWarmingSettings.tsx": "cce26c4547634b76c08c681a4b9605f884d8502f554f12ff8c30cbd2fd0bd9c0",
7
- "src/client/CodeMirrorEditor.tsx": "b96652281e95163544080a1659c1330e72b56d0cd50c56f5bbe09512cc57b8e9",
8
+ "src/client/CodeMirrorEditor.tsx": "746c0f57cf18dc49f75d90b4cc64f88924abf2e8c152cde06e7d3ed708a21b18",
8
9
  "src/client/ContextMeter.tsx": "439384a25fead8d10e9d1f2fcc1b7a3228b9c804a033b9e0b5d2dbc68ba9d959",
9
10
  "src/client/DesktopPanel.tsx": "1011e9409418afa64cd7c84d8131223b3099bd0842c24ebbda86e38b45f37e1c",
10
11
  "src/client/EntryIntegrationNotice.tsx": "b758ed02def94086d8180b0baffbf214df1a82cfdbdeb7d8201d26d4a1a0bbfb",
@@ -12,7 +13,7 @@
12
13
  "src/client/FeishuPanel.tsx": "3b3257da36bf863e004a33a4c1d721db364b4449fb23f0805cb74b973a2ed2da",
13
14
  "src/client/FileMentionMenu.tsx": "d400e7afb31008eda49d4b531eceda65a926b877177d0cffd9a8056b55161c3e",
14
15
  "src/client/FileWorkbenchChrome.tsx": "0863c988bdc50962e3dab365e918ad6de6aee7cc2d0d4d3cce049fa3529d2b6b",
15
- "src/client/FilesPanel.tsx": "19a3d70165331c6bd4e8d3b931b6e04a680abea10624bd5fe045850d953c596e",
16
+ "src/client/FilesPanel.tsx": "ec861fef4d190789fecadbd615430d8d44098846d7b8dff9239d8e930d38e877",
16
17
  "src/client/GitDiffEditor.tsx": "1c012065349a803f5566a5a3c7b94d717963851008546f486a9f543757d2a6ca",
17
18
  "src/client/GitPanel.tsx": "72d777fd4daef8f2b51748e46590b0d8c9d60ae56530da3b95408240814cd55e",
18
19
  "src/client/GroupChatPane.tsx": "8a9b433fb31ba0ec0ec3e6b9a5930aa89646821873214e1a5a305e8193619633",
@@ -55,8 +56,8 @@
55
56
  "src/client/ToolGlyph.tsx": "a1100b61f1eee9520e7323385f667898763bfd69068f22de7dd36db2d4096c76",
56
57
  "src/client/TranscriptFind.tsx": "d455995b8eedd4be6ada0e7d457f401cdbc43200206abb1d97dcc86803d78d48",
57
58
  "src/client/WorkbenchChrome.tsx": "9a7f761a547a627227302746a20d849f82e04062b40c9b60d0ecaf90c679543a",
58
- "src/client/WorkbenchSearch.tsx": "e29767e6596d8c29d386cd16fe43db31d565cdffe5d5a3ef972376b17b62271d",
59
- "src/client/WorkbenchSearchPanel.tsx": "44194765bdb4d15240fbb899a18a52bd85baec5d9ebea26762de319eab0f2341",
59
+ "src/client/WorkbenchSearch.tsx": "cd0d85a54de775fd4af1da3c75c7465b1bc81e42d3947ea015f72b85089ad19a",
60
+ "src/client/WorkbenchSearchPanel.tsx": "d6d207aaba431603c095182703944acff99b0315e705a906114f95fde20ae892",
60
61
  "src/client/WorkbenchSplit.tsx": "7afc0e435ad8eae95f95a28563034e3bf09eef070f47bd3366d9b8eff9bc229e",
61
62
  "src/client/WorkflowCard.tsx": "8ce5458537a3b02dcbb9bbb4c7afacb07e0f41857ed250aa4cde0cbc8d4bde6c",
62
63
  "src/client/WorkspaceBulkSettings.tsx": "859cb5159f1aff91b8e7a7987c569d67df8bbacb3f24c6cc4c47b5ebe17f253c",
@@ -64,14 +65,15 @@
64
65
  "src/client/WorkspaceFilePreview.tsx": "edc0e7a5e6e7362ee6defd88e0b48ed3c18a01bd70ee023235bdd6c75c581bb2",
65
66
  "src/client/anchored-popover.css": "1d617952563b642f94d367e62e64aa97514c5aca09aaa128a82ad0b8c320f556",
66
67
  "src/client/archive-confirm.ts": "a559c1d251e2e3495519d009c50e3adcaaae5859566290c6b8ffef554ddf268c",
68
+ "src/client/background-return.css": "e0c5209585c6ebc5b1862445613deadc0d1eea9b1659de2085c89992d0b0ea28",
67
69
  "src/client/clipboard.ts": "54c7b134515f175acb8befa8e19c55f1c048c3245a7edc2cfc4d233b7593f782",
68
70
  "src/client/context-meter.css": "8795907ff6901326c05449af12b82449be8aea24b12f4016ab51954ab535f518",
69
71
  "src/client/diff-context-scroll.ts": "11f27a1f56c6ec77bf138119c4d00f798e553852d8de07fe258e4af090adfda1",
70
72
  "src/client/diff-layout.ts": "0ca8a64f3cfd3355ebb28542c0bb3ecb52379e3145b45c91a6ef180be2f6f805",
71
73
  "src/client/editor-blame.ts": "d680671b98c64f8ba7f639f660f6b4aab0bf112fc4695c436c9d2a505326b0b0",
72
74
  "src/client/editor-languages.ts": "d5319cfd9b9f3b07c2599ba64ec49a9038304d09fa1702302f3b2b97493d0a69",
73
- "src/client/editor-search.css": "c4cb072034a3156ab9f55fe89d19f94e9e4aa87cf7f8169fe5bff9d225340304",
74
- "src/client/editor-search.ts": "c67f89507e81bfb24914f4f28b1e483fcb3418adb67cbcc8eccfa0a16b8d2b31",
75
+ "src/client/editor-search.css": "21e819872fff9f51fe2e388083715fed255d4cde8d6b24b72dfa945802c996d9",
76
+ "src/client/editor-search.ts": "be236e7004e99a5462adfcdb42eb0b82b7fad3a7b60ceda46ee1e07c8d9213c4",
75
77
  "src/client/errors.ts": "2ea215b8676cca8841b93c780563f1f2031320270d4d0865221f6a12b65c6f22",
76
78
  "src/client/file-diff-layout.css": "aee864e990d66d90380aeb991181cce39e2a29d02ea85095a4bf0c1d59c9ed50",
77
79
  "src/client/file-diff.ts": "b1fd62dd0f561c567f249d98364068c947e31758fa9f1644d27250679e0f62a4",
@@ -97,7 +99,7 @@
97
99
  "src/client/rsi-sidebar.css": "5aacc0b643bc1b2c4a2174051a39bae84092d952e5b199c88bb4f36cf14877d2",
98
100
  "src/client/server-connection-status.css": "1ff49ec39afb0628224a84ef9712e23f54b8b48f514d2a10391e09e4668c3ff8",
99
101
  "src/client/server-connections.ts": "9c4733db7f7c7046a9ad4ceba92479b06122c4db9ec236fdb76eb22c89fef13c",
100
- "src/client/server-scope.ts": "b491bacbe5008d83a1d11ff76899e60962b8bd73fd004ccd4efbefe691cdd943",
102
+ "src/client/server-scope.ts": "b8b6e467b5f79825a98377d3562e314e9b9437ab48c980cea352004c9c8216d3",
101
103
  "src/client/session-tree.ts": "08a14c6611fdd9a72001eb1672060479e7660de5a5d221c7e80036209fd26546",
102
104
  "src/client/shared-read-receipts.ts": "3554e6f85c20d2c2228cca02579b1e5bc2c1c9a3fff7caa4421055d564a04e9b",
103
105
  "src/client/slash-commands.ts": "daa5a8e6f90605a9a3921c977b24f69e9d9718e31a62a4b8e74a71a1faf0ce66",
@@ -113,11 +115,11 @@
113
115
  "src/client/tool-shortcuts.ts": "4422d29ba770af6acef18e66c6be05a9bc021f7323c7ca28bbe7668f26d4adb8",
114
116
  "src/client/tools.ts": "58fe41f0edbd490e3fab7f12f258b1dbc2163b653553b03ac61caf1543618e50",
115
117
  "src/client/transcript-find.css": "3fe2b9c8e1206ac3456a90fe9eafc2864e9a2ecb60c768f6dc580d3450c73600",
116
- "src/client/types.ts": "61a0639bff9cce59518ec11c36ee73359588bbea2b6dec18ee2818c4081264b9",
118
+ "src/client/types.ts": "80b0794c902091acd2d9368b489d672a83bf7568933b4e013fd7fa56fd1119ef",
117
119
  "src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5",
118
120
  "src/client/workbench-memory.ts": "72c9b52cc28f8c8e90636c2425f0d14c4b5af1e36bff9bf8ad272d0811e60099",
119
- "src/client/workbench-navigation.ts": "3b229752a8ce4a45eba7aeff040eb33001413190141f1e9b8e5f38246a1761e2",
120
- "src/client/workbench-search-panel.css": "6978c03db4f17411e9064242b0ff786a520ee8cf58fe8a9d0ea42872ba3737f0"
121
+ "src/client/workbench-navigation.ts": "fff6e8546b2fb19a5db474764628bd10e147779dc26512aa6de9e3a0145a1de5",
122
+ "src/client/workbench-search-panel.css": "06705c7fb52e38ecbac24db3c422f9fdf93b696e50414f7652395abbd91a9bcb"
121
123
  },
122
- "recordedAt": "2026-11-25T18:15:52.940Z"
124
+ "recordedAt": "2026-11-25T19:25:38.800Z"
123
125
  }
@@ -1 +1 @@
1
- .workbench-shell .cm-editor .cm-workbench-selectedText,.workbench-shell .cm-editor .cm-workbench-selectedText *{background:var(--selected)!important;color:var(--bg-app)!important}.workbench-shell .cm-editor .cm-panels{background:var(--bg-panel);color:var(--text-primary)}.workbench-shell .cm-editor .cm-panels-top{border-bottom:1px solid var(--border-default)}.workbench-shell .cm-editor{position:relative}.workbench-shell .cm-editor .cm-panels-top{z-index:10;border:1px solid var(--border-default);width:min(420px,100% - 24px);box-shadow:0 4px 12px var(--shadow-faint);border-radius:5px;position:absolute;top:8px;left:auto;right:12px}.workbench-shell .cm-editor .cm-search:not([data-editor-search-expanded=true]) :is(label,br,input[name=replace],button[name=replace],button[name=replaceAll],button[name=select]){display:none}.workbench-shell .cm-editor .cm-search:not([data-editor-search-expanded=true]) .cm-textfield{flex-basis:120px;width:160px;min-width:80px}.workbench-shell .cm-editor .cm-panel.cm-search{min-width:0;font-family:Manrope,system-ui,sans-serif;font-size:var(--type-control);line-height:var(--type-control-line);background:var(--bg-panel);color:var(--text-primary);flex-wrap:wrap;align-items:center;gap:6px 8px;padding:10px 46px 10px 12px;display:flex;position:relative}.workbench-shell .cm-editor .cm-search :is(input,button,label){font:inherit;margin:0}.workbench-shell .cm-editor .cm-search .cm-textfield{border:1px solid var(--border-default);width:220px;min-width:100px;max-width:340px;height:32px;color:var(--text-primary);background:var(--bg-input);box-shadow:none;border-radius:4px;flex:180px;padding:5px 8px}.workbench-shell .cm-editor .cm-search .cm-textfield::placeholder{color:var(--text-muted)}.workbench-shell .cm-editor .cm-search button{border:1px solid var(--border-default);min-height:32px;color:var(--text-primary);background:var(--bg-raised);box-shadow:none;cursor:pointer;background-image:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:4px 8px;display:inline-flex}.workbench-shell .cm-editor .cm-search button:hover{background:var(--bg-hover)}.workbench-shell .cm-editor .cm-search label{white-space:nowrap;min-height:32px;color:var(--text-secondary);align-items:center;gap:5px;display:inline-flex}.workbench-shell .cm-editor .cm-search input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;margin:0}.workbench-shell .cm-editor .cm-search br{flex-basis:100%;height:0}.workbench-shell .cm-editor .cm-search button[name=close]{background:0 0;border-color:#0000;width:30px;height:32px;min-height:32px;padding:0;font-size:20px;line-height:1;position:absolute;top:10px;right:8px}.workbench-shell .cm-editor .cm-search button[name=close]:hover{background:var(--bg-hover)}.workbench-shell .cm-editor .cm-search :is(input,button):focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.workbench-shell .cm-editor .cm-searchMatch{color:var(--editor-find-fg);background-color:var(--editor-find-bg);box-shadow:inset 0 0 0 1px var(--editor-find-border)}.workbench-shell .cm-editor .cm-searchMatch-selected{color:var(--editor-find-current-fg);background-color:var(--editor-find-current-bg);outline:1px solid var(--editor-find-current-border);box-shadow:inset 0 0 0 1px var(--editor-find-current-border)}.workbench-shell .cm-editor .cm-searchMatch span{color:inherit;background-color:#0000}@media (width<=700px){.workbench-shell .cm-editor .cm-panel.cm-search{padding-right:60px}.workbench-shell .cm-editor .cm-search :is(button,label){min-height:44px}.workbench-shell .cm-editor .cm-search .cm-textfield{height:44px}.workbench-shell .cm-editor .cm-search button[name=close]{width:44px;height:44px}}
1
+ .workbench-shell .cm-editor .cm-workbench-selectedText,.workbench-shell .cm-editor .cm-workbench-selectedText *{background:var(--selected)!important;color:var(--bg-app)!important}.workbench-shell .cm-editor .cm-panels{background:var(--bg-panel);color:var(--text-primary)}.workbench-shell .cm-editor .cm-panels-top{border-bottom:1px solid var(--border-default)}.workbench-shell .cm-editor{position:relative}.workbench-shell .cm-editor .cm-panels-top{z-index:10;border:1px solid var(--border-default);width:min(420px,100% - 24px);box-shadow:0 4px 12px var(--shadow-faint);border-radius:5px;position:absolute;top:8px;left:auto;right:12px}.workbench-shell .cm-editor .cm-search:not([data-editor-search-expanded=true]) :is(label,br,input[name=replace],button[name=replace],button[name=replaceAll],button[name=select]){display:none}.workbench-shell .cm-editor .cm-search:not([data-editor-search-expanded=true]) .cm-textfield{flex-basis:120px;width:160px;min-width:80px}.workbench-shell .cm-editor .cm-panel.cm-search{min-width:0;font-family:Manrope,system-ui,sans-serif;font-size:var(--type-control);line-height:var(--type-control-line);background:var(--bg-panel);color:var(--text-primary);flex-wrap:wrap;align-items:center;gap:6px 8px;padding:10px 46px 10px 12px;display:flex;position:relative}.workbench-shell .cm-editor .cm-search :is(input,button,label){font:inherit;margin:0}.workbench-shell .cm-editor .cm-search .cm-textfield{border:1px solid var(--border-default);width:220px;min-width:100px;max-width:340px;height:32px;color:var(--text-primary);background:var(--bg-input);box-shadow:none;border-radius:4px;flex:180px;padding:5px 8px}.workbench-shell .cm-editor .cm-search .cm-textfield::placeholder{color:var(--text-muted)}.workbench-shell .cm-editor .cm-search button{border:1px solid var(--border-default);min-height:32px;color:var(--text-primary);background:var(--bg-raised);box-shadow:none;cursor:pointer;background-image:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:4px 8px;display:inline-flex}.workbench-shell .cm-editor .cm-search button:hover{background:var(--bg-hover)}.workbench-shell .cm-editor .cm-search label{white-space:nowrap;min-height:32px;color:var(--text-secondary);align-items:center;gap:5px;display:inline-flex}.workbench-shell .cm-editor .cm-search input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;margin:0}.workbench-shell .cm-editor .cm-search br{flex-basis:100%;height:0}.workbench-shell .cm-editor .cm-search button[name=close]{background:0 0;border-color:#0000;width:30px;height:32px;min-height:32px;padding:0;font-size:20px;line-height:1;position:absolute;top:10px;right:8px}.workbench-shell .cm-editor .cm-search button[name=close]:hover{background:var(--bg-hover)}.workbench-shell .cm-editor .cm-search :is(input,button):focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.workbench-shell .cm-editor .cm-searchMatch{color:var(--editor-find-fg);background-color:var(--editor-find-bg);box-shadow:inset 0 0 0 1px var(--editor-find-border)}.workbench-shell .cm-editor .cm-selectionMatch{background-color:var(--editor-find-bg);color:var(--editor-find-fg);box-shadow:inset 0 0 0 1px var(--editor-find-border)}.workbench-shell .cm-editor .cm-selectionMatch span{color:inherit;background-color:#0000}.workbench-shell .cm-editor .cm-searchMatch-selected{color:var(--editor-find-current-fg);background-color:var(--editor-find-current-bg);outline:1px solid var(--editor-find-current-border);box-shadow:inset 0 0 0 1px var(--editor-find-current-border)}.workbench-shell .cm-editor .cm-searchMatch span{color:inherit;background-color:#0000}@media (width<=700px){.workbench-shell .cm-editor .cm-panel.cm-search{padding-right:60px}.workbench-shell .cm-editor .cm-search :is(button,label){min-height:44px}.workbench-shell .cm-editor .cm-search .cm-textfield{height:44px}.workbench-shell .cm-editor .cm-search button[name=close]{width:44px;height:44px}}
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-D978o95T.js","assets/rolldown-runtime-XKyaHtl9.js","assets/dist-B3-a6uF0.js","assets/dist-CX_Hm4GS.js","assets/dist-Cus6_oaF.js","assets/dist-J6XWqRpB.js","assets/dist-scBkrwv-.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{d as t,f as n,i as r,l as i,p as a,r as o,u as s}from"./index-DPQPznQh.js";var c=e(a(),1);function l(e,t,n){return[n.EditorView.decorations.compute([`selection`,`doc`],e=>n.Decoration.set(e.selection.ranges.filter(e=>!e.empty).map(e=>n.Decoration.mark({class:`cm-workbench-selectedText`}).range(e.from,e.to)),!0)),n.ViewPlugin.define(e=>{let t=()=>{let t=e.dom.querySelector(`.cm-panel.cm-search`);if(!t||t.querySelector(`[data-editor-search-options]`))return;let n=document.createElement(`button`);n.type=`button`,n.dataset.editorSearchOptions=``,n.textContent=`选项`,n.setAttribute(`aria-label`,`展开查找选项`),n.setAttribute(`aria-expanded`,`false`),n.onclick=()=>{let e=t.dataset.editorSearchExpanded!==`true`;t.dataset.editorSearchExpanded=String(e),n.setAttribute(`aria-expanded`,String(e)),n.setAttribute(`aria-label`,e?`收起查找选项`:`展开查找选项`)},t.append(n)},n=new MutationObserver(t);return n.observe(e.dom,{childList:!0,subtree:!0}),t(),{destroy(){n.disconnect()}}}),e.Prec.highest(n.keymap.of([{key:`Mod-h`,run:e=>(t.openSearchPanel(e),requestAnimationFrame(()=>{e.dom.querySelector(`[data-editor-search-options][aria-expanded="false"]`)?.click()}),!0)},...[`c`,`w`,`r`].map(e=>({key:`Alt-${e}`,run:n=>{t.openSearchPanel(n);let r=t.getSearchQuery(n.state);return n.dispatch({effects:t.setSearchQuery.of(new t.SearchQuery({...r,...e===`c`?{caseSensitive:!r.caseSensitive}:e===`w`?{wholeWord:!r.wholeWord}:{regexp:!r.regexp}}))}),!0}}))])),t.highlightSelectionMatches({wholeWords:!0,minSelectionLength:1,maxMatches:1e3}),t.search({top:!0}),e.EditorState.phrases.of({Find:`查找`,Replace:`替换为`,next:`下一处`,previous:`上一处`,all:`全部选中`,"match case":`区分大小写`,regexp:`正则表达式`,"by word":`全词匹配`,replace:`替换`,"replace all":`全部替换`,close:`关闭查找`,"current match":`当前匹配`,"on line":`所在行`})]}var u=n(),d=262144,f=131072;function p(e){return e.split(`.`).pop()?.toLowerCase()??``}function m(e,t,n=!1){let r=e=>n?`var(--git-diff-${e.slice(5)}, var(${e}))`:`var(${e})`;return e.HighlightStyle.define([{tag:t.tags.keyword,color:r(`--cm-keyword`)},{tag:t.tags.string,color:r(`--cm-string`)},{tag:t.tags.number,color:r(`--cm-number`)},{tag:t.tags.comment,color:r(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:r(`--cm-function`)},{tag:t.tags.typeName,color:r(`--cm-type`)},{tag:t.tags.className,color:r(`--cm-type`)},{tag:t.tags.propertyName,color:r(`--cm-property`)},{tag:t.tags.operator,color:r(`--cm-operator`)},{tag:t.tags.variableName,color:r(`--cm-variable`)}])}function h({path:e,value:n,onChange:a,jumpToLine:h,onSave:g,workspaceId:_,blame:v,onPosition:y,readOnly:b=!1,languageOverride:x}){let S=(0,c.useRef)(null),C=(0,c.useRef)(null),w=(0,c.useRef)(null),T=(0,c.useRef)(void 0),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useRef)(null),k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=(0,c.useRef)(null),M=(0,c.useRef)(a),N=(0,c.useRef)(g),P=(0,c.useRef)(!1);M.current=a,N.current=g;let[F,I]=(0,c.useState)(!1),[L,R]=(0,c.useState)(!1),[z,B]=(0,c.useState)(`0,0`),[V,H]=(0,c.useState)(0);(0,c.useEffect)(()=>{let i=!1,a,o,c,u,f;return(async()=>{try{let h=x??p(e),g=s(h),[v,y,F,L,z,V,U,W]=await Promise.all([t(()=>import(`./dist-D978o95T.js`).then(e=>e.S),__vite__mapDeps([0,1])),t(()=>import(`./dist-B3-a6uF0.js`).then(e=>e.s),__vite__mapDeps([2,1,0])),t(()=>import(`./dist-CX_Hm4GS.js`),__vite__mapDeps([3,0,1,2,4,5])),t(()=>import(`./dist-scBkrwv-.js`),__vite__mapDeps([6,0,1,2])),t(()=>import(`./dist-J6XWqRpB.js`).then(e=>e.d),__vite__mapDeps([5,1,0,2,4])),t(()=>import(`./dist-Cus6_oaF.js`).then(e=>e.n),__vite__mapDeps([4,1])),g?g().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${h}:`,e),null)):Promise.resolve(null),r().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(i||!S.current)return;w.current=y.EditorView,u=z,f=V,D.current=v.Annotation.define(),O.current=v.Transaction.addToHistory;let G=n.length<=d&&U!==null;o=new v.Compartment;let K=[y.lineNumbers(),y.highlightActiveLine(),y.drawSelection(),F.history(),y.keymap.of([F.indentWithTab,...F.defaultKeymap,...F.historyKeymap,...L.searchKeymap,{key:`Mod-s`,run:()=>(N.current(),!0)}]),y.EditorView.updateListener.of(e=>{e.docChanged&&!(D.current&&e.transactions.some(e=>e.annotation(D.current)===!0))&&M.current(e.state.doc.toString()),e.selectionSet&&B(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),y.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(K.push(y.EditorView.updateListener.of(e=>{e.docChanged?P.current=!1:e.selectionSet&&(P.current=e.transactions.some(e=>e.isUserEvent(`select.search`)||e.isUserEvent(`select.pointer`)))}),l(v,L,y)),b&&K.push(v.EditorState.readOnly.of(!0),y.EditorView.editable.of(!1),y.EditorView.contentAttributes.of({tabindex:`0`})),W&&!b&&(c=new v.Compartment,K.splice(1,0,c.of([])),K.push(W.base)),U)try{K.push(U)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${h}:`,e),G=!1}if(G&&o&&u&&f)try{K.push(o.of(u.syntaxHighlighting(m(u,f))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${h}:`,e),G=!1}let q=T.current,J=q?.scope===JSON.stringify([_,e])&&q.state.doc.toString()===n,Y=J?q.state.update({effects:v.StateEffect.reconfigure.of(K)}).state:v.EditorState.create({doc:n,extensions:K});if(a=new y.EditorView({state:Y,parent:S.current}),J&&(a.scrollDOM.scrollTop=q.top,a.scrollDOM.scrollLeft=q.left),i){a.destroy();return}C.current=a,I(G),R(!0),k.current=W,A.current=c??null,j.current=null,H(e=>e+1);let X=new MutationObserver(()=>{let e=C.current;if(e&&G&&o&&u&&f)try{e.dispatch({effects:o.reconfigure(u.syntaxHighlighting(m(u,f)))})}catch{}});E.current=X,X.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),i||R(!0)}})(),()=>{i=!0,E.current?.disconnect(),E.current=null,a&&(T.current={scope:JSON.stringify([_,e]),state:a.state,top:a.scrollDOM.scrollTop,left:a.scrollDOM.scrollLeft}),a?.destroy(),C.current=null,R(!1),S.current&&(S.current.textContent=``)}},[e,b,x]),(0,c.useEffect)(()=>{let e=C.current;if(!e)return;let t=e.state.doc.toString();t!==n&&e.dispatch({changes:{from:0,to:t.length,insert:n},annotations:D.current?D.current.of(!0):void 0})},[n]),(0,c.useEffect)(()=>{let e=C.current;if(!e||!h)return;let t=e.state.doc.line(Math.min(Math.max(1,h.line),e.state.doc.lines)),n=Math.min(t.to,t.from+(h.column??1)-1);e.dispatch({selection:{anchor:t.to,head:n},effects:w.current?.scrollIntoView(n,{y:`start`,yMargin:Math.round(e.scrollDOM.clientHeight/3)})}),e.focus()},[h,L]);let U=!!(v&&v.state===`ready`&&v.response&&v.path===e&&v.workspaceId===_);(0,c.useEffect)(()=>{let t=C.current,n=k.current,r=A.current;if(!t||!n||!r)return;let i=v&&v.state===`ready`&&v.response&&v.path===e&&v.workspaceId===_?v.response:null,a=i?o(i):null;j.current!==a&&(j.current=a,t.dispatch({effects:[n.setBlame.of(a),r.reconfigure(a?n.gutter:[])]}))},[v?.state,v?.response,v?.path,v?.workspaceId,e,_,V]);let W=C.current?.state.doc.toString()??n,G=W.length<=f?W:W.slice(0,f),K=x??p(e),q=i(K),J=C.current?.state,Y=J?.selection.main.head,X=Y===void 0?void 0:J?.doc.lineAt(Y),Z=X?.number,Q=Y!==void 0&&X?Y-X.from+1:void 0;return(0,c.useEffect)(()=>{L&&Z!==void 0&&Q!==void 0&&y?.({line:Z,column:Q,language:F&&q||`纯文本`,highlight:F?K:`plain`,navigation:P.current})},[L,Z,Q,F,q,K,y]),(0,c.useEffect)(()=>()=>y?.(),[y]),(0,u.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":G,"data-file-content-truncated":W.length>f?`1`:`0`,"data-file-selection":z,"data-file-editor-ready":L?`1`:`0`,"data-file-blame-gutter":U?`1`:void 0,onMouseDown:e=>{e.target.closest(`.cm-panels`)||C.current?.focus()},children:[(0,u.jsx)(`div`,{className:`file-cm`,ref:S,"aria-label":`${b?`查看`:`编辑`} ${e}`}),(!L||!y)&&(0,u.jsxs)(`div`,{className:`file-editor-status`,children:[!L&&(0,u.jsx)(`span`,{"data-file-editor-loading":`1`,children:`正在加载编辑器…`}),L&&Y!==void 0&&X&&(0,u.jsxs)(`span`,{children:[`第 `,X.number,` 行,第 `,Y-X.from+1,` 列`]}),L&&!F&&(0,u.jsx)(`span`,{"data-file-highlight-status":`plain`,children:`纯文本`}),L&&F&&q&&(0,u.jsx)(`span`,{"data-file-highlight-status":K,children:q})]})]})}export{h as CodeMirrorEditor,l as t,m as themeHighlightStyle};