dsh-remote-deck 0.0.0-stage → 1.46.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.
Files changed (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +227 -2
  3. package/README.zh-CN.md +201 -0
  4. package/client.js +8645 -0
  5. package/cordis.patch.yml +6 -0
  6. package/icon.svg +19 -0
  7. package/index.js +701 -0
  8. package/lib/api.js +1452 -0
  9. package/lib/bash-result.js +93 -0
  10. package/lib/connection.js +1133 -0
  11. package/lib/delete.js +199 -0
  12. package/lib/drafts.js +299 -0
  13. package/lib/encoding.js +247 -0
  14. package/lib/file-edit.js +339 -0
  15. package/lib/file-ops.js +402 -0
  16. package/lib/forwards.js +186 -0
  17. package/lib/fs-actions.js +235 -0
  18. package/lib/guide.js +162 -0
  19. package/lib/metrics.js +523 -0
  20. package/lib/remote-shells.js +320 -0
  21. package/lib/remote-terminal.js +427 -0
  22. package/lib/routing.js +695 -0
  23. package/lib/ssh-config.js +118 -0
  24. package/lib/terminal.js +123 -0
  25. package/lib/tool-forward.js +185 -0
  26. package/lib/transfer.js +235 -0
  27. package/lib/upload-chunks.js +306 -0
  28. package/lib/util.js +154 -0
  29. package/locale/README.md +160 -0
  30. package/locale/en-ui.json +477 -0
  31. package/locale/en.json +6 -0
  32. package/locale/zh.json +6 -0
  33. package/package.json +63 -4
  34. package/vendor/codemirror/LICENSE +21 -0
  35. package/vendor/codemirror/README.md +18 -0
  36. package/vendor/codemirror/addon/edit/closebrackets.min.js +8 -0
  37. package/vendor/codemirror/addon/edit/matchbrackets.min.js +8 -0
  38. package/vendor/codemirror/addon/search/search.min.js +8 -0
  39. package/vendor/codemirror/addon/search/searchcursor.min.js +8 -0
  40. package/vendor/codemirror/addon/selection/active-line.min.js +8 -0
  41. package/vendor/codemirror/lib/codemirror.css +344 -0
  42. package/vendor/codemirror/lib/codemirror.min.js +8 -0
  43. package/vendor/codemirror/mode/clike/clike.min.js +8 -0
  44. package/vendor/codemirror/mode/css/css.min.js +8 -0
  45. package/vendor/codemirror/mode/go/go.min.js +8 -0
  46. package/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js +8 -0
  47. package/vendor/codemirror/mode/javascript/javascript.min.js +8 -0
  48. package/vendor/codemirror/mode/markdown/markdown.min.js +8 -0
  49. package/vendor/codemirror/mode/python/python.min.js +8 -0
  50. package/vendor/codemirror/mode/rust/rust.min.js +8 -0
  51. package/vendor/codemirror/mode/shell/shell.min.js +8 -0
  52. package/vendor/codemirror/mode/xml/xml.min.js +8 -0
  53. package/vendor/codemirror/mode/yaml/yaml.min.js +8 -0
  54. package/vendor/node_modules/asn1/Jenkinsfile +65 -0
  55. package/vendor/node_modules/asn1/LICENSE +19 -0
  56. package/vendor/node_modules/asn1/README.md +50 -0
  57. package/vendor/node_modules/asn1/lib/ber/errors.js +13 -0
  58. package/vendor/node_modules/asn1/lib/ber/index.js +27 -0
  59. package/vendor/node_modules/asn1/lib/ber/reader.js +262 -0
  60. package/vendor/node_modules/asn1/lib/ber/types.js +36 -0
  61. package/vendor/node_modules/asn1/lib/ber/writer.js +317 -0
  62. package/vendor/node_modules/asn1/lib/index.js +20 -0
  63. package/vendor/node_modules/asn1/package.json +31 -0
  64. package/vendor/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +13 -0
  65. package/vendor/node_modules/bcrypt-pbkdf/LICENSE +66 -0
  66. package/vendor/node_modules/bcrypt-pbkdf/README.md +45 -0
  67. package/vendor/node_modules/bcrypt-pbkdf/index.js +556 -0
  68. package/vendor/node_modules/bcrypt-pbkdf/package.json +15 -0
  69. package/vendor/node_modules/safer-buffer/LICENSE +21 -0
  70. package/vendor/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  71. package/vendor/node_modules/safer-buffer/Readme.md +156 -0
  72. package/vendor/node_modules/safer-buffer/dangerous.js +58 -0
  73. package/vendor/node_modules/safer-buffer/package.json +34 -0
  74. package/vendor/node_modules/safer-buffer/safer.js +77 -0
  75. package/vendor/node_modules/safer-buffer/tests.js +406 -0
  76. package/vendor/node_modules/ssh2/LICENSE +19 -0
  77. package/vendor/node_modules/ssh2/README.md +1529 -0
  78. package/vendor/node_modules/ssh2/SFTP.md +413 -0
  79. package/vendor/node_modules/ssh2/lib/Channel.js +295 -0
  80. package/vendor/node_modules/ssh2/lib/agent.js +1123 -0
  81. package/vendor/node_modules/ssh2/lib/client.js +2176 -0
  82. package/vendor/node_modules/ssh2/lib/http-agents.js +84 -0
  83. package/vendor/node_modules/ssh2/lib/index.js +44 -0
  84. package/vendor/node_modules/ssh2/lib/keygen.js +582 -0
  85. package/vendor/node_modules/ssh2/lib/protocol/Protocol.js +2136 -0
  86. package/vendor/node_modules/ssh2/lib/protocol/SFTP.js +4052 -0
  87. package/vendor/node_modules/ssh2/lib/protocol/constants.js +356 -0
  88. package/vendor/node_modules/ssh2/lib/protocol/crypto/binding.gyp +23 -0
  89. package/vendor/node_modules/ssh2/lib/protocol/crypto/poly1305.js +43 -0
  90. package/vendor/node_modules/ssh2/lib/protocol/crypto/src/binding.cc +2300 -0
  91. package/vendor/node_modules/ssh2/lib/protocol/crypto.js +1602 -0
  92. package/vendor/node_modules/ssh2/lib/protocol/handlers.js +16 -0
  93. package/vendor/node_modules/ssh2/lib/protocol/handlers.misc.js +1285 -0
  94. package/vendor/node_modules/ssh2/lib/protocol/kex.js +1908 -0
  95. package/vendor/node_modules/ssh2/lib/protocol/keyParser.js +1484 -0
  96. package/vendor/node_modules/ssh2/lib/protocol/node-fs-compat.js +115 -0
  97. package/vendor/node_modules/ssh2/lib/protocol/utils.js +356 -0
  98. package/vendor/node_modules/ssh2/lib/protocol/zlib.js +255 -0
  99. package/vendor/node_modules/ssh2/lib/server.js +1380 -0
  100. package/vendor/node_modules/ssh2/lib/utils.js +336 -0
  101. package/vendor/node_modules/ssh2/package.json +49 -0
  102. package/vendor/node_modules/tweetnacl/AUTHORS.md +28 -0
  103. package/vendor/node_modules/tweetnacl/CHANGELOG.md +221 -0
  104. package/vendor/node_modules/tweetnacl/LICENSE +24 -0
  105. package/vendor/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
  106. package/vendor/node_modules/tweetnacl/README.md +459 -0
  107. package/vendor/node_modules/tweetnacl/nacl-fast.js +2388 -0
  108. package/vendor/node_modules/tweetnacl/nacl-fast.min.js +2 -0
  109. package/vendor/node_modules/tweetnacl/nacl.d.ts +98 -0
  110. package/vendor/node_modules/tweetnacl/nacl.js +1175 -0
  111. package/vendor/node_modules/tweetnacl/nacl.min.js +1 -0
  112. package/vendor/node_modules/tweetnacl/package.json +58 -0
  113. package/vendor/xterm/LICENSE.addon-fit +19 -0
  114. package/vendor/xterm/LICENSE.xterm +21 -0
  115. package/vendor/xterm/README.md +9 -0
  116. package/vendor/xterm/addon-fit.js +2 -0
  117. package/vendor/xterm/xterm.css +218 -0
  118. package/vendor/xterm/xterm.js +2 -0
@@ -0,0 +1,477 @@
1
+ {
2
+ " · 只读(编码无法无损写回)": " · Read-only (encoding can't be written back losslessly)",
3
+ " 等": " and more",
4
+ "DSH 启动后自动拨通": "Connects when DSH starts",
5
+ "DSH 需要重启一次才能加载 Remote Deck 的 host 部分。重启后这里会显示连接列表。": "DSH needs a restart to load Remote Deck's host part. The connection list appears here after that.",
6
+ "Remote Deck 服务未连接": "Remote Deck service not connected",
7
+ "SSH · {n} 台": "SSH · {n} hosts",
8
+ "SSH 工作区": "SSH workspaces",
9
+ "SSH 端口未开放": "SSH port not open",
10
+ "SSH 认证失败": "SSH authentication failed",
11
+ "SSH 连接已断开": "SSH connection closed",
12
+ "SSH 连接超时": "SSH connection timed out",
13
+ "{connected} 台在线 · {workspaces} 个工作区": "{connected} online · {workspaces} workspaces",
14
+ "{connected} 台已连接 · {workspaces} 个工作区": "{connected} connected · {workspaces} workspaces",
15
+ "{files} 个文件、{dirs} 个目录": "{files} files and {dirs} folders",
16
+ "{lines} 行 · {size} · {status}": "{lines} lines · {size} · {status}",
17
+ "{message}(可点「重新扫描」重试)": "{message} (click Rescan to retry)",
18
+ "{mount} · {available} 可用 / {total}": "{mount} · {available} free / {total}",
19
+ "{name} 上传失败": "{name} failed to upload",
20
+ "{name} 收尾失败 {count} 次:{reason}": "{name} failed to finish the upload after {count} attempts: {reason}",
21
+ "{name} 连续 {count} 次上传失败:{reason}": "{name} failed to upload {count} times in a row: {reason}",
22
+ "{name}(已传 {percent}%,请重新选择该文件继续)": "{name} ({percent}% uploaded; choose the same file to continue)",
23
+ "{n} 个": "{n}",
24
+ "{n} 个 · 按更新时间": "{n} · by last update",
25
+ "{n} 个 · 自动刷新": "{n} · auto-refresh",
26
+ "{n} 个 · 连接恢复后自动重建": "{n} · rebuilt automatically when the connection returns",
27
+ "{n} 个会话": "{n} sessions",
28
+ "{n} 个由 Agent 创建": "{n} created by Agent",
29
+ "{n} 个端口转发": "{n} port forwards",
30
+ "{n} 个端口转发,点开查看": "{n} port forwards; click to view",
31
+ "{n} 个软链接": "{n} symlinks",
32
+ "{n} 分钟前": "{n} min ago",
33
+ "{n} 天前": "{n} d ago",
34
+ "{n} 小时前": "{n} h ago",
35
+ "{n} 核": "{n} cores",
36
+ "{n} 项": "{n} items",
37
+ "{n} 项不可读": "{n} unreadable",
38
+ "{section} {value} 超过 {threshold}%": "{section} {value} above {threshold}%",
39
+ "{section} 告警阈值": "{section} alert threshold",
40
+ "{section} 告警阈值(1–100)": "{section} alert threshold (1–100)",
41
+ "⚠ 上一条消息发送失败": "⚠ Previous message failed to send",
42
+ "「{name}」超过 {limit} 上限,未上传。": "{name} exceeds the {limit} limit; not uploaded.",
43
+ "「{name}」超过远端 {limit} 上限,未上传。": "{name} exceeds the remote {limit} limit; not uploaded.",
44
+ "一次最多打包 {n} 项": "Archive at most {n} items at a time",
45
+ "上传": "Upload",
46
+ "上传与目录打包都受此限制": "Applies to both uploads and folder archiving",
47
+ "上传中 0/{total}": "Uploading 0/{total}",
48
+ "上传中 {current}/{total}": "Uploading {current}/{total}",
49
+ "上传中…": "Uploading…",
50
+ "上传到当前目录": "Upload to current folder",
51
+ "上传到当前目录:{dirname}": "Upload to current folder: {dirname}",
52
+ "上传到此处": "Upload here",
53
+ "上传到目录": "Upload to folder",
54
+ "上传文件到 {dirname}": "Upload files to {dirname}",
55
+ "上传文件后它们会出现在这里。": "Uploaded files will show up here.",
56
+ "上传文件夹": "Upload folder",
57
+ "上级目录:{path}": "Parent folder: {path}",
58
+ "下载": "Download",
59
+ "下载 {n} 项(打包)": "Download {n} items (tar.gz)",
60
+ "下载到本地并显示": "Download and show in folder",
61
+ "下载到本机": "Download to this computer",
62
+ "下载到本机:{path}": "Download to this computer: {path}",
63
+ "下载此文件:{path}": "Download this file: {path}",
64
+ "下载此目录": "Download folder",
65
+ "不可用 · {reason}": "Unavailable · {reason}",
66
+ "丢弃": "Discard",
67
+ "主机": "Host",
68
+ "主机不能为空": "Host can't be empty",
69
+ "主机可能已关机、IP/端口不对,或被防火墙拦截。": "The host may be off, the IP or port may be wrong, or a firewall is blocking the connection.",
70
+ "主机名无法解析": "Can't resolve host name",
71
+ "主机指纹不匹配": "Host key mismatch",
72
+ "从 SSH 配置导入": "Import from SSH config",
73
+ "从 ~/.ssh/config 导入,或手动填写一台 SSH 主机": "Import from ~/.ssh/config, or enter an SSH host manually",
74
+ "从远程目录新建工作区": "New workspace from remote folder",
75
+ "代理": "Proxy",
76
+ "会一并恢复": "Also restored",
77
+ "会话": "Sessions",
78
+ "传输": "Transfers",
79
+ "作用于「远程开发 → 控制台」里的终端;DSH 侧栏终端的字号由 DSH 自身控制": "Applies to the terminal in Remote Dev → Console; the DSH sidebar terminal sets its own font size",
80
+ "使用第一个": "Use the first one",
81
+ "侧栏显示名称": "Sidebar name",
82
+ "保存": "Save",
83
+ "保存中…": "Saving…",
84
+ "保存到本机下载目录并在文件夹中显示:{path}": "Save to the local Downloads folder and show it there: {path}",
85
+ "保存后立即连接": "Connect right after saving",
86
+ "保存失败": "Save failed",
87
+ "保存并连接": "Save and connect",
88
+ "修改时间": "Modified",
89
+ "停止": "Stop",
90
+ "停止输入后自动写回远端;关闭后仍可用 Ctrl/Cmd+S 手动保存": "Writes back to the remote after you stop typing; Ctrl/Cmd+S still saves manually when off",
91
+ "全选": "Select all",
92
+ "关": "Off",
93
+ "关闭": "Close",
94
+ "关闭后头部胶囊只保留最后一次采样,不再轮询": "When off, the header pill keeps only the last sample and stops polling",
95
+ "其中 {items} 将被跳过。": "{items} will be skipped.",
96
+ "内存": "Memory",
97
+ "内置字体": "Built-in font",
98
+ "再测一次": "Test again",
99
+ "刚刚": "Just now",
100
+ "创建": "Create",
101
+ "创建后打开新会话": "Open a new session after creating",
102
+ "创建目录失败:{message}": "Couldn't create folder: {message}",
103
+ "创建输入框中的目录(包含缺失的父目录)": "Create the folder in the box (including missing parents)",
104
+ "删除": "Delete",
105
+ "删除 {n} 项": "Delete {n} items",
106
+ "删除完成:成功 {done} / 失败 {failed}": "Delete finished: {done} succeeded / {failed} failed",
107
+ "刷新": "Refresh",
108
+ "刷新间隔(秒,10–300)": "Refresh interval (seconds, 10–300)",
109
+ "刷新页面;仍失败则完全重启 DSH。": "Refresh the page; if that still fails, restart DSH completely.",
110
+ "前往": "Go",
111
+ "加载终端…": "Loading terminal…",
112
+ "单个文件最大 512MB;请压缩或分卷后再试。": "Single files are limited to 512MB. Compress or split the file and try again.",
113
+ "单次上限(MiB,1–8192)": "Per-transfer limit (MiB, 1–8192)",
114
+ "双击进入目录 · ↑↓ 选择 · Enter 进入 · Backspace 上级": "Double-click to enter · ↑↓ to select · Enter to open · Backspace to go up",
115
+ "取消": "Cancel",
116
+ "取消固定到快捷面板": "Unpin from quick panel",
117
+ "只在当前会话显示;恢复后文档引用可能需重新 @ 添加": "Shown only in this session; after restoring, document references may need to be @-mentioned again",
118
+ "只显示目录": "Folders only",
119
+ "只有目录可以添加为工作区": "Only folders can be added as workspaces",
120
+ "只读": "Read-only",
121
+ "右键可对整组操作": "Right-click to act on the whole selection",
122
+ "名字": "Name",
123
+ "名字不能为空": "A name can't be empty",
124
+ "名字不能包含 /": "A name can't contain /",
125
+ "名字不能包含空字符": "A name can't contain null characters",
126
+ "名字不能是 . 或 ..": "A name can't be . or ..",
127
+ "名称": "Name",
128
+ "启动 DSH 时自动连接(点击关闭)": "Auto-connect when DSH starts (click to turn off)",
129
+ "启动 DSH 时自动连接:已关闭": "Auto-connect when DSH starts: off",
130
+ "启动 DSH 时自动连接:已开启": "Auto-connect when DSH starts: on",
131
+ "启动时自动连接": "Auto-connect on startup",
132
+ "启用服务器状态监控": "Enable server status monitoring",
133
+ "命名管道": "Named pipe",
134
+ "固定到快捷面板(最多 3 台)": "Pin to quick panel (up to 3 hosts)",
135
+ "在 {dirname} 下新建文件夹": "New folder in {dirname}",
136
+ "在 {dirname} 下新建空文件": "New empty file in {dirname}",
137
+ "在 {host} 上选择一个目录,它就会成为 DSH 的一个工作区": "Pick a folder on {host}; it becomes a DSH workspace.",
138
+ "在下方「监控设置」中开启后才会采样。": "Enable it under Monitoring settings below to start sampling.",
139
+ "在当前目录刷新": "Refresh the current folder",
140
+ "在当前目录新建文件夹": "New folder in the current folder",
141
+ "在这台远端主机上打开终端(远端 PTY)": "Open a terminal on this remote host (remote PTY)",
142
+ "在远程目录中新建": "New in remote folder",
143
+ "在远端文件中打开": "Open in remote files",
144
+ "在远端文件中打开 {path}": "Open in remote files: {path}",
145
+ "在远端文件页双击一个文本文件即可在这里打开。": "Double-click a text file on the Remote files page to open it here.",
146
+ "块设备": "Block device",
147
+ "复制": "Copy",
148
+ "复制/移动": "Copy/Move",
149
+ "失败": "Failed",
150
+ "失败 {n}": "Failed {n}",
151
+ "套接字": "Socket",
152
+ "字体族": "Font family",
153
+ "字体预览:以下文本按当前设置渲染,不是真实终端输出": "Font preview: this text uses the current settings; it isn't real terminal output",
154
+ "字号(9–24)": "Font size (9–24)",
155
+ "字符设备": "Character device",
156
+ "字距(−0.5–2)": "Letter spacing (−0.5–2)",
157
+ "字距(−0.5–2,本插件额外项)": "Letter spacing (-0.5-2, plugin extra)",
158
+ "它们需要在机器设置里手工填写跳板机或改用 ProxyJump。": "Set their jump host by hand in the machine settings, or switch them to ProxyJump.",
159
+ "完成": "Done",
160
+ "家目录(登录目录)": "Home directory (login directory)",
161
+ "密码": "Password",
162
+ "密钥": "Key",
163
+ "导入中…": "Importing…",
164
+ "导入后不会自动连接;可在机器卡上点连接,或打开「启动时自动连接」。": "Imported hosts don't connect automatically. Click Connect on a host card, or turn on Auto-connect on startup.",
165
+ "导入选中 {n} 台": "Import {n} selected",
166
+ "将打包 {files} 个文件。": "Archive {files} files.",
167
+ "将打包 {files} 个文件(约 {size})。": "Archive {files} files (about {size}).",
168
+ "将永久删除 {n} 项(含目录递归),不可恢复。": "This permanently deletes {n} items, including folders and everything inside them. It can't be undone.",
169
+ "将添加为工作区": "Will be added as a workspace",
170
+ "将递归删除其下全部内容,永久删除、不可恢复。": "Everything inside it will be deleted recursively. This can't be undone.",
171
+ "工作区": "Workspaces",
172
+ "已上传 {n}": "Uploaded {n}",
173
+ "已上传 {n} 个文件": "Uploaded {n} files",
174
+ "已传 {sent} / {total}": "{sent} of {total} uploaded",
175
+ "已保存": "Saved",
176
+ "已保存到 {path}": "Saved to {path}",
177
+ "已保存,留空不修改": "Saved; leave blank to keep",
178
+ "已关闭": "Off",
179
+ "已取消": "Cancelled",
180
+ "已取消打包": "Archive cancelled",
181
+ "已在 {host} 的工作区 · {n}": "In {host}'s workspaces · {n}",
182
+ "已复制 {n} 项": "Copied {n} items",
183
+ "已完成": "Done",
184
+ "已开始下载 {name}": "Downloading {name}",
185
+ "已开始打包": "Archive started",
186
+ "已新建文件 {name}": "Created file {name}",
187
+ "已新建文件夹 {name}": "Created folder {name}",
188
+ "已检测到 {n} 个密钥:{keys} · ": "Found {n} keys: {keys} · ",
189
+ "已永久删除 {name}": "Deleted {name} permanently",
190
+ "已永久删除 {n} 项": "Deleted {n} items permanently",
191
+ "已添加工作区": "Workspace added",
192
+ "已移动 {n} 项": "Moved {n} items",
193
+ "已经在根目录": "Already at the root",
194
+ "已自动保存": "Auto-saved",
195
+ "已跳过 {n} 台使用 ProxyCommand 的机器": "Skipped {n} host(s) that use ProxyCommand",
196
+ "已转发": "Active forwards",
197
+ "已转发到 {port}": "Forwarded to {port}",
198
+ "已连接": "Connected",
199
+ "已退出": "Exited",
200
+ "已选 {n} 项": "{n} selected",
201
+ "已重命名为 {name}": "Renamed to {name}",
202
+ "建立 SSH 通道": "Opening the SSH channel",
203
+ "开": "On",
204
+ "开启": "Start",
205
+ "强制覆盖": "Overwrite anyway",
206
+ "当前机器": "this machine",
207
+ "往返延迟": "Round-trip latency",
208
+ "快捷操作": "Quick actions",
209
+ "快捷面板最多固定 3 台,请先取消一台": "The quick panel holds at most 3 hosts; unpin one first",
210
+ "快速跳转:": "Quick jump:",
211
+ "忽略": "Ignore",
212
+ "忽略并删除远端临时文件": "Ignore and delete the remote temp file",
213
+ "恢复": "Restore",
214
+ "恢复上一条发送失败的消息": "Restore the previous failed message",
215
+ "恢复消息": "Restore message",
216
+ "恢复默认": "Reset to defaults",
217
+ "成功 {done} / 失败 {failed}({reason})": "{done} succeeded / {failed} failed ({reason})",
218
+ "手动": "Manual",
219
+ "手动创建": "Created manually",
220
+ "手动添加": "Add manually",
221
+ "手动配置": "Manual setup",
222
+ "打包下载 {dirname}(tar.gz)": "Download {dirname} (tar.gz)",
223
+ "打包下载此目录(tar.gz):{path}": "Download this folder (tar.gz): {path}",
224
+ "打包确认": "Confirm archive",
225
+ "打开": "Open",
226
+ "打开 {host} 的端口转发": "Open port forwarding for {host}",
227
+ "打开 ›": "Open ›",
228
+ "打开为工作区": "Open as workspace",
229
+ "把 {path} 添加为 DSH 工作区": "Add {path} as a DSH workspace",
230
+ "把整个文件夹上传到 {dirname}": "Upload the whole folder to {dirname}",
231
+ "把选中的 {n} 项打包成一个 tar.gz": "Archive the {n} selected items into one tar.gz",
232
+ "按 {encoding} 打开": "Open as {encoding}",
233
+ "按文件名筛选当前目录": "Filter this folder by file name",
234
+ "控制台": "Console",
235
+ "插件服务令牌已过期": "Plugin service token expired",
236
+ "插件版本 {version}": "Plugin {version}",
237
+ "插件还没激活": "Plugin not active yet",
238
+ "搜索机器、工作区…": "Search hosts and workspaces…",
239
+ "操作": "Actions",
240
+ "操作失败": "Operation failed",
241
+ "放弃修改并关闭": "Discard changes and close",
242
+ "数据不可用": "No data",
243
+ "文件": "Files",
244
+ "文件不存在": "File not found",
245
+ "文件不是 UTF-8。确认编码后即可编辑并原样写回。": "This file isn't UTF-8. Confirm the encoding to edit it and write it back unchanged.",
246
+ "文件夹": "Folder",
247
+ "文件夹名": "Folder name",
248
+ "文件已被外部修改,保存会覆盖对方的改动。": "The file was changed outside the editor; saving overwrites those changes.",
249
+ "文件超过上限": "File exceeds the size limit",
250
+ "文件过大,未完整载入": "File too large to load fully",
251
+ "文件面板出错:{message}": "File panel error: {message}",
252
+ "断开": "Disconnect",
253
+ "新名字": "New name",
254
+ "新建工作区": "New workspace",
255
+ "新建文件": "New file",
256
+ "新建文件夹": "New folder",
257
+ "新建远程工作区": "New remote workspace",
258
+ "无法连接跳板机": "The jump host is unreachable",
259
+ "显示隐藏文件(以 . 开头)": "Show hidden files (starting with .)",
260
+ "更多操作": "More actions",
261
+ "更新于 {time}": "Updated {time}",
262
+ "更新这台机器的连接信息;密码留空表示不修改": "Update this machine's connection details; leave the password blank to keep it",
263
+ "最近会话": "Recent sessions",
264
+ "有未完成的上传": "Unfinished uploads",
265
+ "服务器状态": "Server status",
266
+ "服务暂时无响应,请重试。": "The service isn't responding. Try again.",
267
+ "未使用": "Unused",
268
+ "未保存": "Unsaved",
269
+ "未修改": "Unchanged",
270
+ "未加载到编辑器组件": "Editor component not loaded",
271
+ "未命名": "Untitled",
272
+ "未命名会话": "Untitled session",
273
+ "未注册": "Not registered",
274
+ "未连接": "Disconnected",
275
+ "未连接到 {host}": "Not connected to {host}",
276
+ "未连接机器": "No connected hosts",
277
+ "未配置": "Not configured",
278
+ "本地显示": "Show in folder",
279
+ "本地端口(自动)": "Local port (auto)",
280
+ "查看": "View",
281
+ "检查主机地址、DNS 或 /etc/hosts。": "Check the host address, DNS or /etc/hosts.",
282
+ "检查用户名、密钥或密码;新机器需要先在控制台配置密钥。": "Check the username, key or password. A new machine needs its key set up in the console first.",
283
+ "检查远端用户对该目录的权限。": "Check the remote user's permissions on that folder.",
284
+ "检测到 {n} 台可用机器": "Found {n} available hosts",
285
+ "检测到未保存的草稿({time})": "Found an unsaved draft ({time})",
286
+ "概览": "Overview",
287
+ "正在保存…": "Saving…",
288
+ "正在加载 host…": "Loading hosts…",
289
+ "正在加载完整终端…": "Loading full terminal…",
290
+ "正在加载远程连接…": "Loading remote connections…",
291
+ "正在启动 shell…": "Starting the shell…",
292
+ "正在打包 {n} 项…": "Archiving {n} items…",
293
+ "正在打开远端 shell…": "Opening remote shell…",
294
+ "正在扫描目录…": "Scanning folder…",
295
+ "正在监听的端口": "Listening ports",
296
+ "正在读取 SSH 配置…": "Reading SSH config…",
297
+ "正在读取目录…": "Reading folder…",
298
+ "正在读取远程目录…": "Reading remote folder…",
299
+ "正在读取远端文件…": "Reading remote file…",
300
+ "正在读取远端目录…": "Reading remote folder…",
301
+ "正在连接 {host}…": "Connecting to {host}…",
302
+ "此会话不在远端工作区": "This session isn't in a remote workspace",
303
+ "每 {seconds} 秒": "Every {seconds}s",
304
+ "永久删除": "Delete permanently",
305
+ "永久删除 {n} 项?": "Permanently delete {n} items?",
306
+ "永久删除 {path}": "Permanently delete {path}",
307
+ "永久删除、不可恢复。": "Permanent deletion; this can't be undone.",
308
+ "永久删除这个文件?": "Delete this file permanently?",
309
+ "永久删除这个目录?": "Delete this folder permanently?",
310
+ "永久删除选中的 {n} 项": "Permanently delete the {n} selected items",
311
+ "没有匹配的目录": "No matching folders",
312
+ "没有可编辑的远端文件": "No editable remote file",
313
+ "没有找到 ~/.ssh/config,可以直接在右侧手动填写。": "No ~/.ssh/config found; you can fill in a host manually on the right.",
314
+ "没有权限": "Permission denied",
315
+ "没有读到监听端口(ss/netstat 不可用或无服务)。": "No listening ports found (ss/netstat unavailable or no services running).",
316
+ "测试中…": "Testing…",
317
+ "测试连接": "Test connection",
318
+ "浏览、上传、下载与删除远端文件": "Browse, upload, download and delete remote files",
319
+ "浏览器未能切分该文件,无法分片上传。": "The browser couldn't slice this file, so chunked upload isn't possible.",
320
+ "添加一台 SSH 主机后,它的目录就能作为工作区在这里打开。": "Add an SSH host and its folders can open here as workspaces.",
321
+ "添加中…": "Adding…",
322
+ "添加工作区": "Add workspace",
323
+ "添加机器": "Add host",
324
+ "清空": "Clear",
325
+ "点击空白处输入路径": "Click empty space to type a path",
326
+ "点击重连后再试。": "Reconnect and try again.",
327
+ "状态": "Status",
328
+ "用 DSH 预览打开": "Open in DSH preview",
329
+ "用户名": "Username",
330
+ "由 Agent 创建": "Created by Agent",
331
+ "留空即使用 DSH 内置等宽字体": "Leave blank to use DSH's built-in monospace font",
332
+ "留空表示直连;多跳用逗号分隔,按顺序连接": "Leave blank to connect directly; separate multiple hops with commas, tried in order",
333
+ "登录密码": "Login password",
334
+ "监听中": "Listening",
335
+ "监控": "Monitoring",
336
+ "监控已关闭": "Monitoring is off",
337
+ "目录": "Folder",
338
+ "目录较大,扫描未完成,实际内容可能更多。": "The folder is large and the scan didn't finish; there may be more content.",
339
+ "直接下载(直链)": "Direct download (link)",
340
+ "直接下载(直链):{path}": "Direct download (link): {path}",
341
+ "直接进入该工作区的对话": "Go straight into that workspace's conversation",
342
+ "省一次点击": "Saves a click",
343
+ "确定": "OK",
344
+ "确认 sshd 已启动,端口号正确。": "Make sure sshd is running and the port number is correct.",
345
+ "确认移除": "Remove",
346
+ "确认这台机器可信后,更新 known_hosts。": "Once you trust this machine, update known_hosts.",
347
+ "磁盘": "Disk",
348
+ "私钥口令(可选)": "Key passphrase (optional)",
349
+ "私钥路径": "Private key path",
350
+ "移动": "Move",
351
+ "移除": "Remove",
352
+ "移除只从 DSH 侧栏摘除,机器上的目录不会被删除。": "Removing only takes it out of the DSH sidebar; the folder on the machine is kept.",
353
+ "移除工作区(保留远端目录)": "Remove workspace (keep remote folder)",
354
+ "端口": "Port",
355
+ "端口转发": "Port forwarding",
356
+ "第 {index}/{total} 个文件。可跳过此文件、跳过该目录,或停止本次上传。": "File {index}/{total}. Skip this file, skip its folder, or stop the upload.",
357
+ "等待远端 shell 就绪": "Waiting for the remote shell",
358
+ "筛选…": "Filter…",
359
+ "筛选当前目录": "Filter this folder",
360
+ "筛选文件…": "Filter files…",
361
+ "类型": "Type",
362
+ "系统默认(内置字体)": "System default (built-in font)",
363
+ "终端": "Terminal",
364
+ "终端外观": "Terminal appearance",
365
+ "终端外观、服务器状态监控与传输上限;改动即时生效。": "Terminal appearance, server status monitoring and transfer limits; changes apply immediately.",
366
+ "终端字体与字号": "Terminal font and size",
367
+ "终端字体预览": "Terminal font preview",
368
+ "经 {first} → {second}": "via {first} → {second}",
369
+ "经 {first} → {second} 等 {n} 跳": "via {first} → {second} and {n} hops",
370
+ "经 {hop}": "via {hop}",
371
+ "继续": "Continue",
372
+ "续传中": "Resuming",
373
+ "编辑": "Edit",
374
+ "编辑器": "Editor",
375
+ "编辑器只处理文本;可以用 DSH 的预览查看它。": "The editor only handles text; use DSH's preview to view it.",
376
+ "编辑机器": "Edit host",
377
+ "网络中断,上传失败。": "Network interrupted; upload failed.",
378
+ "自动保存": "Auto-save",
379
+ "自动保存延迟(毫秒,300–10000)": "Auto-save delay (ms, 300–10000)",
380
+ "自动识别主机、端口、用户与私钥,已有的连接会跳过。": "Detects hosts, ports, users and keys automatically; existing connections are skipped.",
381
+ "自动连接:{state}": "Auto-connect: {state}",
382
+ "自定义…": "Custom…",
383
+ "行高(1.0–2.0)": "Line height (1.0–2.0)",
384
+ "行高(1.0–2.0,本插件额外项)": "Line height (1.0-2.0, plugin extra)",
385
+ "认证方式": "Authentication",
386
+ "该目录已经是工作区": "This folder is already a workspace",
387
+ "请减少选择后重试": "Select fewer items and try again",
388
+ "请完全退出 DSH 后重新打开;如果刚更新插件,这一步会重新注入服务地址。": "Quit DSH completely and reopen it. If you just updated the plugin, this reinjects the service address.",
389
+ "请求超时": "Request timed out",
390
+ "请求超时({seconds} 秒),请重试": "Request timed out after {seconds}s; try again.",
391
+ "请输入绝对路径(以 / 开头),或用 ~ 回到远端根目录": "Enter an absolute path starting with /, or use ~ for the remote root",
392
+ "请重试;如果持续失败,展开详情查看原因。": "Try again; if it keeps failing, expand the details for the reason.",
393
+ "读取中…": "Reading…",
394
+ "读取失败": "Couldn't read file",
395
+ "读取远端监听端口…": "Reading remote listening ports…",
396
+ "负载 {value}": "Load {value}",
397
+ "超过 {size} 的文件不在编辑器里打开:只载入一部分会让保存截断原文件。": "Files larger than {size} don't open in the editor: loading only part of one would truncate it on save.",
398
+ "跟随 DSH 设置": "Follows DSH settings",
399
+ "路径不能包含 ..": "A path can't contain ..",
400
+ "路径可能已变更,刷新目录后再试。": "The path may have changed. Refresh the folder and try again.",
401
+ "跳板": "Jump host",
402
+ "跳板机 {jump} 访问 {host}:{port} 被拒绝:确认目标机 sshd 已启动、端口正确,以及跳板机到它的网络与防火墙。": "Jump host {jump} was refused by {host}:{port}. Check that sshd is running on the target, that the port is right, and the network path and firewall between the hop and the target.",
403
+ "跳板机连不上目标机": "The jump host cannot reach the target",
404
+ "跳板机(ProxyJump)": "Jump host (ProxyJump)",
405
+ "跳过": "Skip",
406
+ "跳过 {n}": "Skipped {n}",
407
+ "跳过该目录": "Skip this folder",
408
+ "转发": "Forward",
409
+ "转发中…": "Forwarding…",
410
+ "软链接": "Symlink",
411
+ "输入路径": "Type a path",
412
+ "输入远端路径后回车": "Type a remote path and press Enter",
413
+ "运行中": "Running",
414
+ "还没有工作区。": "No workspaces yet.",
415
+ "还没有端口转发": "No port forwards yet",
416
+ "还没有端口转发。下面可以从监听端口里选一个,或手动填写。": "No port forwards yet. Pick a listening port below, or add one manually.",
417
+ "还没有连接。添加一台 SSH 主机后,它的目录就能作为工作区。": "No connections yet. Add an SSH host and its folders can become workspaces.",
418
+ "还没有连接任何机器": "No machines connected yet",
419
+ "这个名字已经存在": "That name already exists",
420
+ "这个工作区不在 DSH 注册表里": "This workspace isn't in DSH's registry",
421
+ "这个文件是二进制内容": "This file is binary",
422
+ "这个目录是空的": "This folder is empty",
423
+ "这个目录是空的。": "This folder is empty.",
424
+ "这个选择器只列出目录": "This picker lists directories only",
425
+ "这个页面只浏览远端文件;在远程工作区的会话里打开它。": "This page only browses remote files; open it in a session that's in a remote workspace.",
426
+ "这台机器上还没有会话。": "No sessions on this machine yet.",
427
+ "这台机器还没有工作区。": "No workspaces on this machine yet.",
428
+ "进行中": "In progress",
429
+ "远程开发": "Remote Development",
430
+ "远程开发 {version}": "Remote Deck {version}",
431
+ "远程开发管理": "Manage Remote Development",
432
+ "远程控制台": "Remote console",
433
+ "远程端口": "Remote port",
434
+ "远程终端": "Remote terminal",
435
+ "远程路径": "Remote path",
436
+ "远端临时文件已不存在,请重新上传:{name}": "The remote temp file is gone; upload the file again: {name}",
437
+ "远端工作台": "Remote Deck",
438
+ "远端已存在同名文件,未覆盖:{name}": "A file with this name already exists on the remote; not overwritten: {name}",
439
+ "远端文件": "Remote files",
440
+ "远端没有接受这一分片,重试。": "The remote didn't accept this chunk; retry.",
441
+ "远端终端": "Remote terminal",
442
+ "远端编辑": "Remote editor",
443
+ "连不上跳板机 {jump}:确认它的地址、端口与登录凭据。": "Cannot reach jump host {jump}. Check its address, port and credentials.",
444
+ "连接": "Connect",
445
+ "连接中": "Connecting",
446
+ "连接中…": "Connecting…",
447
+ "连接后即可使用终端、文件与端口转发": "Connect to use the terminal, files and port forwarding",
448
+ "连接失败": "Connection failed",
449
+ "连接成功": "Connection succeeded",
450
+ "连接正常": "Connected",
451
+ "连接正常 · {n} 台在线": "Connected · {n} online",
452
+ "适用于没有写入 SSH 配置的主机,或需要密码认证时。": "For hosts that aren't in your SSH config, or when you need password auth.",
453
+ "选择一台机器": "Choose a machine",
454
+ "配置里没有可导入的主机(通配符和 Match 会被跳过)。": "No importable hosts in the config (wildcards and Match blocks are skipped).",
455
+ "采样中…": "Sampling…",
456
+ "采集失败": "Sampling failed",
457
+ "重命名": "Rename",
458
+ "重命名 {path}(F2)": "Rename {path} (F2)",
459
+ "重命名为": "Rename to",
460
+ "重开终端": "Restart terminal",
461
+ "重新加载(丢弃我的修改)": "Reload (discard my changes)",
462
+ "重新扫描": "Rescan",
463
+ "重新读取": "Reload",
464
+ "重新读取 {dirname}": "Reload {dirname}",
465
+ "重新选择": "Choose file again",
466
+ "重试": "Retry",
467
+ "重连": "Reconnect",
468
+ "链接指向的目标不存在": "That link points at something that is not there",
469
+ "附件 {n} 个": "{n} attachments",
470
+ "隐藏以 . 开头的文件": "Hide files starting with .",
471
+ "预检失败,已直接开始打包": "Pre-check failed; archiving directly",
472
+ "默认密钥": "Default key",
473
+ "({n} 个由 Agent 创建)": "({n} created by Agent)",
474
+ "(已停止)": "(stopped)",
475
+ "(已删除 {files} 个文件、{dirs} 个目录)": "({files} files and {dirs} folders deleted)",
476
+ "(空目录)": "(empty folder)"
477
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Remote Deck",
4
+ "description": "SSH workspaces for DeepSeek Harness: connect any number of machines, browse remote folders, and run sessions with the remote filesystem, shell, search, terminal and port forwarding."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "远程工作台",
4
+ "description": "为 DeepSeek Harness 提供 SSH 工作区:连接多台机器、浏览远端目录,并让会话在远端文件系统、命令、搜索、终端与端口转发上运行。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "dsh-remote-deck",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.46.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "Remote Deck: SSH workspaces for DeepSeek Harness. Connect any number of machines, browse remote folders, and run DSH sessions with the remote filesystem, shell, search, terminal and port forwarding.",
7
+ "keywords": [
8
+ "dsh",
9
+ "dsh-plugin",
10
+ "deepseek-harness",
11
+ "ssh",
12
+ "remote",
13
+ "remote-development",
14
+ "workspace",
15
+ "terminal"
16
+ ],
17
+ "license": "MIT",
18
+ "engines": {
19
+ "node": ">=20"
20
+ },
21
+ "exports": {
22
+ ".": "./index.js",
23
+ "./client": "./client.js",
24
+ "./locale/*.json": "./locale/*.json",
25
+ "./icon": "./icon.svg"
26
+ },
27
+ "files": [
28
+ "index.js",
29
+ "lib/*.js",
30
+ "client.js",
31
+ "cordis.patch.yml",
32
+ "locale/*.json",
33
+ "vendor/xterm/*",
34
+ "vendor/codemirror/**",
35
+ "vendor/node_modules/**",
36
+ "icon.svg",
37
+ "README.md",
38
+ "LICENSE"
39
+ ],
40
+ "scripts": {
41
+ "check": "node --check index.js && node --check client.js && node scripts/check-manifest.mjs",
42
+ "test": "node --test",
43
+ "pack:dry": "npm pack --dry-run"
44
+ },
45
+ "dsh": {
46
+ "bundle": {
47
+ "patch": "./cordis.patch.yml"
48
+ },
49
+ "client": {
50
+ "platform": "web",
51
+ "immediately": true,
52
+ "inject": [
53
+ "@deepseek-ai/dsh-client-ui-sidebar"
54
+ ]
55
+ }
56
+ },
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "https://github.com/dsh-plugins-cn/dsh-remote-deck.git"
60
+ },
61
+ "homepage": "https://github.com/dsh-plugins-cn/dsh-remote-deck#readme",
62
+ "bugs": {
63
+ "url": "https://github.com/dsh-plugins-cn/dsh-remote-deck/issues"
64
+ }
65
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,18 @@
1
+ # Vendored editor assets
2
+
3
+ - `lib/codemirror.min.js`, `lib/codemirror.css` — CodeMirror 5.65.16 (MIT), https://github.com/codemirror/codemirror5
4
+ - `mode/*/` — the language modes: javascript, xml, css, htmlmixed, markdown, python, shell, yaml, clike, rust, go
5
+ - `addon/edit/closebrackets.min.js`, `addon/edit/matchbrackets.min.js`, `addon/search/search.min.js`, `addon/search/searchcursor.min.js`, `addon/selection/active-line.min.js`
6
+ - `LICENSE` — the upstream license, unmodified
7
+
8
+ Every file was fetched from jsDelivr's npm mirror of `codemirror@5.65.16` and is the minified
9
+ build it generates from it, for example:
10
+
11
+ - https://cdn.jsdelivr.net/npm/codemirror@5.65.16/lib/codemirror.min.js
12
+ - https://cdn.jsdelivr.net/npm/codemirror@5.65.16/mode/javascript/javascript.min.js
13
+ - https://cdn.jsdelivr.net/npm/codemirror@5.65.16/addon/search/search.min.js
14
+
15
+ No theme stylesheet is vendored: the editor is themed with DSH's own design tokens, so only
16
+ `codemirror.css` (the structural styles) ships. These files are served by the plugin's loopback
17
+ host under `/assets/*` with an exact-name allow-list — nothing else in this directory is
18
+ reachable — and loaded on demand when the file editor opens.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Minified by jsDelivr using Terser v5.39.0.
3
+ * Original file: /npm/codemirror@5.65.16/addon/edit/closebrackets.js
4
+ *
5
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6
+ */
7
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var n={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},t=e.Pos;function r(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}e.defineOption("autoCloseBrackets",!1,(function(n,t,o){o&&o!=e.Init&&(n.removeKeyMap(i),n.state.closeBrackets=null),t&&(a(r(t,"pairs")),n.state.closeBrackets=t,n.addKeyMap(i))}));var i={Backspace:function(n){var i=s(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=n.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return e.Pass;var c=f(n,o[l].head);if(!c||a.indexOf(c)%2!=0)return e.Pass}for(l=o.length-1;l>=0;l--){var h=o[l].head;n.replaceRange("",t(h.line,h.ch-1),t(h.line,h.ch+1),"+delete")}},Enter:function(n){var t=s(n),i=t&&r(t,"explode");if(!i||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var c=f(n,a[o].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}n.operation((function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),l(n,-1),a=n.listSelections();for(var t=0;t<a.length;t++){var r=a[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}}))}};function a(e){for(var n=0;n<e.length;n++){var t=e.charAt(n),r="'"+t+"'";i[r]||(i[r]=o(t))}}function o(n){return function(i){return function(n,i){var a=s(n);if(!a||n.getOption("disableInput"))return e.Pass;var o=r(a,"pairs"),f=o.indexOf(i);if(-1==f)return e.Pass;for(var u,d=r(a,"closeBefore"),p=r(a,"triples"),g=o.charAt(f+1)==i,v=n.listSelections(),b=f%2==0,P=0;P<v.length;P++){var S,k=v[P],y=k.head,O=n.getRange(y,t(y.line,y.ch+1));if(b&&!k.empty())S="surround";else if(!g&&b||O!=i)if(g&&y.ch>1&&p.indexOf(i)>=0&&n.getRange(t(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(n.getTokenTypeAt(t(y.line,y.ch-2))))return e.Pass;S="addFour"}else if(g){var m=0==y.ch?" ":n.getRange(t(y.line,y.ch-1),y);if(e.isWordChar(O)||m==i||e.isWordChar(m))return e.Pass;S="both"}else{if(!b||!(0===O.length||/\s/.test(O)||d.indexOf(O)>-1))return e.Pass;S="both"}else S=g&&h(n,y)?"both":p.indexOf(i)>=0&&n.getRange(y,t(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=S)return e.Pass}else u=S}var x=f%2?o.charAt(f-1):i,A=f%2?i:o.charAt(f+1);n.operation((function(){if("skip"==u)l(n,1);else if("skipThree"==u)l(n,3);else if("surround"==u){for(var e=n.getSelections(),t=0;t<e.length;t++)e[t]=x+e[t]+A;n.replaceSelections(e,"around"),e=n.listSelections().slice();for(t=0;t<e.length;t++)e[t]=c(e[t]);n.setSelections(e)}else"both"==u?(n.replaceSelection(x+A,null),n.triggerElectric(x+A),l(n,-1)):"addFour"==u&&(n.replaceSelection(x+x+x+x,"before"),l(n,1))}))}(i,n)}}function s(e){var n=e.state.closeBrackets;return!n||n.override?n:e.getModeAt(e.getCursor()).closeBrackets||n}function l(e,n){for(var t=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var o=r[a];o.head==e.getCursor()&&(i=a);var s=o.head.ch||n>0?{line:o.head.line,ch:o.head.ch+n}:{line:o.head.line-1};t.push({anchor:s,head:s})}e.setSelections(t,i)}function c(n){var r=e.cmpPos(n.anchor,n.head)>0;return{anchor:new t(n.anchor.line,n.anchor.ch+(r?-1:1)),head:new t(n.head.line,n.head.ch+(r?1:-1))}}function f(e,n){var r=e.getRange(t(n.line,n.ch-1),t(n.line,n.ch+1));return 2==r.length?r:null}function h(e,n){var r=e.getTokenAt(t(n.line,n.ch+1));return/\bstring/.test(r.type)&&r.start==n.ch&&(0==n.ch||!/\bstring/.test(e.getTokenTypeAt(n)))}a(n.pairs+"`")}));
8
+ //# sourceMappingURL=/sm/4c04f9a75ec4213487615d8760c65b8304869cb18f8db3d9004e5ad64726888f.map