@difizen/libro-jupyter 0.2.35-next.0 → 0.2.36
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/es/add-between-cell/add-between-cell.d.ts.map +1 -1
- package/es/add-between-cell/add-between-cell.js +8 -7
- package/es/add-between-cell/index.less +1 -0
- package/es/components/cell-output-bottom-blank.d.ts +5 -0
- package/es/components/cell-output-bottom-blank.d.ts.map +1 -0
- package/es/components/cell-output-bottom-blank.js +21 -0
- package/es/components/index.less +1 -5
- package/es/config/config.js +13 -13
- package/es/file/file-command.d.ts.map +1 -1
- package/es/file/file-command.js +74 -10
- package/es/file/file-create-modal.d.ts.map +1 -1
- package/es/file/file-create-modal.js +11 -10
- package/es/file/file-createdir-modal.d.ts.map +1 -1
- package/es/file/file-createdir-modal.js +9 -8
- package/es/file/file-icon.d.ts.map +1 -1
- package/es/file/file-icon.js +3 -5
- package/es/file/file-rename-modal.d.ts.map +1 -1
- package/es/file/file-rename-modal.js +6 -5
- package/es/file/file-service.d.ts.map +1 -1
- package/es/file/file-service.js +3 -2
- package/es/file/file-view/index.d.ts.map +1 -1
- package/es/file/file-view/index.js +8 -3
- package/es/file/utils.d.ts.map +1 -1
- package/es/file/utils.js +5 -4
- package/es/keybind-instructions/index.less +0 -1
- package/es/keybind-instructions/keybind-instructions-items.js +65 -63
- package/es/keybind-instructions/keybind-instructions-view.d.ts.map +1 -1
- package/es/keybind-instructions/keybind-instructions-view.js +48 -48
- package/es/libro-jupyter-protocol.d.ts.map +1 -1
- package/es/libro-jupyter-protocol.js +12 -13
- package/es/module.d.ts.map +1 -1
- package/es/module.js +5 -4
- package/es/toolbar/index.less +1 -1
- package/es/toolbar/kernel-status-and-selector.d.ts.map +1 -1
- package/es/toolbar/kernel-status-and-selector.js +3 -3
- package/es/toolbar/run-selector.d.ts.map +1 -1
- package/es/toolbar/run-selector.js +4 -4
- package/es/toolbar/side-toolbar-run-selector.d.ts.map +1 -1
- package/es/toolbar/side-toolbar-run-selector.js +38 -38
- package/es/toolbar/toolbar-contribution.js +9 -7
- package/package.json +17 -17
- package/src/add-between-cell/add-between-cell.tsx +8 -5
- package/src/add-between-cell/index.less +1 -0
- package/src/components/cell-output-bottom-blank.tsx +29 -0
- package/src/components/index.less +1 -5
- package/src/config/config.ts +13 -13
- package/src/file/file-command.tsx +24 -8
- package/src/file/file-create-modal.tsx +14 -11
- package/src/file/file-createdir-modal.tsx +9 -8
- package/src/file/file-icon.tsx +0 -1
- package/src/file/file-rename-modal.tsx +6 -5
- package/src/file/file-service.ts +3 -2
- package/src/file/file-view/index.tsx +6 -3
- package/src/file/utils.ts +5 -4
- package/src/keybind-instructions/index.less +0 -1
- package/src/keybind-instructions/keybind-instructions-items.tsx +63 -63
- package/src/keybind-instructions/keybind-instructions-view.tsx +66 -63
- package/src/libro-jupyter-protocol.ts +12 -13
- package/src/module.ts +5 -4
- package/src/toolbar/index.less +1 -1
- package/src/toolbar/kernel-status-and-selector.tsx +3 -4
- package/src/toolbar/run-selector.tsx +8 -5
- package/src/toolbar/side-toolbar-run-selector.tsx +38 -40
- package/src/toolbar/toolbar-contribution.tsx +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-between-cell.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/add-between-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAA0B,MAAM,qBAAqB,CAAC;AAUvF,OAAO,cAAc,CAAC;AA0BtB,eAAO,MAAM,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"add-between-cell.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/add-between-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAA0B,MAAM,qBAAqB,CAAC;AAUvF,OAAO,cAAc,CAAC;AA0BtB,eAAO,MAAM,6BAA6B,EAAE,mBAkK3C,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,mBAW5C,CAAC"}
|
|
@@ -112,8 +112,6 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
|
|
|
112
112
|
}, []);
|
|
113
113
|
var items = cellsMeta.filter(function (item) {
|
|
114
114
|
return item.type !== 'raw';
|
|
115
|
-
}).sort(function (a, b) {
|
|
116
|
-
return a.order.localeCompare(b.order);
|
|
117
115
|
}).map(function (item) {
|
|
118
116
|
return {
|
|
119
117
|
label: item.name,
|
|
@@ -142,6 +140,7 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
|
|
|
142
140
|
});
|
|
143
141
|
return /*#__PURE__*/_jsxs("div", {
|
|
144
142
|
className: "libro-add-between-cell",
|
|
143
|
+
tabIndex: 0,
|
|
145
144
|
children: [/*#__PURE__*/_jsx(Popover, {
|
|
146
145
|
content: /*#__PURE__*/_jsx(Menu, {
|
|
147
146
|
items: items
|
|
@@ -155,20 +154,24 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
|
|
|
155
154
|
overlayClassName: "libro-add-cell-menu",
|
|
156
155
|
destroyTooltipOnHide: true,
|
|
157
156
|
open: menuVisible,
|
|
157
|
+
arrow: false,
|
|
158
158
|
children: /*#__PURE__*/_jsx("div", {
|
|
159
159
|
tabIndex: 10,
|
|
160
160
|
className: "libro-add-between-cell-anchor",
|
|
161
161
|
style: {
|
|
162
162
|
position: 'absolute',
|
|
163
|
-
top: position.top
|
|
164
|
-
left: position.left +
|
|
163
|
+
top: position.top - 10,
|
|
164
|
+
left: position.left + 0,
|
|
165
165
|
width: 1,
|
|
166
166
|
height: 1,
|
|
167
167
|
zIndex: 1000
|
|
168
168
|
},
|
|
169
169
|
ref: anchorRef,
|
|
170
170
|
onBlur: function onBlur(e) {
|
|
171
|
-
var _anchorRef$current3;
|
|
171
|
+
var _e$relatedTarget, _anchorRef$current3;
|
|
172
|
+
if ((_e$relatedTarget = e.relatedTarget) !== null && _e$relatedTarget !== void 0 && _e$relatedTarget.classList.contains('libro-add-between-cell')) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
172
175
|
if (!((_anchorRef$current3 = anchorRef.current) !== null && _anchorRef$current3 !== void 0 && _anchorRef$current3.contains(e.relatedTarget))) {
|
|
173
176
|
setMenuVisible(false);
|
|
174
177
|
}
|
|
@@ -195,8 +198,6 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
|
|
|
195
198
|
closeTooltip();
|
|
196
199
|
setGutterVisible(true);
|
|
197
200
|
setMenuVisible(true);
|
|
198
|
-
|
|
199
|
-
// TODO: 位置不准确
|
|
200
201
|
setPosition({
|
|
201
202
|
top: e.nativeEvent.offsetY,
|
|
202
203
|
left: e.nativeEvent.offsetX
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-output-bottom-blank.d.ts","sourceRoot":"","sources":["../../src/components/cell-output-bottom-blank.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,kDAsBjE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LibroEditableExecutableCellView, LibroOutputArea } from '@difizen/libro-core';
|
|
2
|
+
import { useObserve } from '@difizen/mana-app';
|
|
3
|
+
import { isWaitingExecute } from "../utils/index.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
export function CellOutputBottomBlank(_ref) {
|
|
6
|
+
var cell = _ref.cell;
|
|
7
|
+
var observableCell = useObserve(cell);
|
|
8
|
+
if (!(cell instanceof LibroEditableExecutableCellView) || !(observableCell.outputArea instanceof LibroOutputArea)) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
var outputs = observableCell.outputArea.outputs;
|
|
12
|
+
var hasNoneOutput = !outputs || outputs.length === 0;
|
|
13
|
+
|
|
14
|
+
// 有output时 或者 没有被执行过,不显示input底部的空白
|
|
15
|
+
if (hasNoneOutput && (observableCell.model.executeCount || isWaitingExecute(observableCell.model))) {
|
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
|
+
className: "libro-cell-bottom-blank"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
package/es/components/index.less
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.libro-cell-execution-tip {
|
|
2
2
|
position: absolute;
|
|
3
|
-
|
|
3
|
+
top: -15px;
|
|
4
4
|
left: 40px;
|
|
5
5
|
z-index: 10;
|
|
6
6
|
width: calc(100% - 50px);
|
|
@@ -36,10 +36,6 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.libro-cell-execution-tip-without-output {
|
|
40
|
-
bottom: 5px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
39
|
.libro-cell-bottom-blank {
|
|
44
40
|
height: 20px;
|
|
45
41
|
border-top: 1px solid var(--mana-color-border);
|
package/es/config/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { l10n } from '@difizen/mana-l10n';
|
|
|
2
2
|
export var LibroConfigAutoSave = {
|
|
3
3
|
id: 'libro.autosave',
|
|
4
4
|
description: l10n.t('是否自动保存修改'),
|
|
5
|
-
title: '自动保存',
|
|
5
|
+
title: l10n.t('自动保存'),
|
|
6
6
|
type: 'checkbox',
|
|
7
7
|
defaultValue: false,
|
|
8
8
|
schema: {
|
|
@@ -11,8 +11,8 @@ export var LibroConfigAutoSave = {
|
|
|
11
11
|
};
|
|
12
12
|
export var LibroConfigOpenSlot = {
|
|
13
13
|
id: 'libro.jupyter.open.slot',
|
|
14
|
-
description: '文件默认打开位置',
|
|
15
|
-
title: '文件默认打开位置',
|
|
14
|
+
description: l10n.t('文件默认打开位置'),
|
|
15
|
+
title: l10n.t('文件默认打开位置'),
|
|
16
16
|
type: 'input',
|
|
17
17
|
defaultValue: 'main',
|
|
18
18
|
schema: {
|
|
@@ -21,8 +21,8 @@ export var LibroConfigOpenSlot = {
|
|
|
21
21
|
};
|
|
22
22
|
export var LibroConfigAllowDownload = {
|
|
23
23
|
id: 'libro.jupyter.allow.download',
|
|
24
|
-
description: '是否允许下载',
|
|
25
|
-
title: '允许下载',
|
|
24
|
+
description: l10n.t('是否允许下载'),
|
|
25
|
+
title: l10n.t('允许下载'),
|
|
26
26
|
type: 'checkbox',
|
|
27
27
|
defaultValue: true,
|
|
28
28
|
schema: {
|
|
@@ -31,8 +31,8 @@ export var LibroConfigAllowDownload = {
|
|
|
31
31
|
};
|
|
32
32
|
export var LibroConfigAllowUpload = {
|
|
33
33
|
id: 'libro.jupyter.allow.upload',
|
|
34
|
-
description: '是否允许上传',
|
|
35
|
-
title: '允许上传',
|
|
34
|
+
description: l10n.t('是否允许上传'),
|
|
35
|
+
title: l10n.t('允许上传'),
|
|
36
36
|
type: 'checkbox',
|
|
37
37
|
defaultValue: true,
|
|
38
38
|
schema: {
|
|
@@ -41,8 +41,8 @@ export var LibroConfigAllowUpload = {
|
|
|
41
41
|
};
|
|
42
42
|
export var LibroConfigAllowPreferredSession = {
|
|
43
43
|
id: 'libro.jupyter.allow.prefer.session',
|
|
44
|
-
description: 'kernel切换是否显示Use Kernel from Preferred Session',
|
|
45
|
-
title: '允许 Preferred session切换显示',
|
|
44
|
+
description: l10n.t('kernel切换是否显示Use Kernel from Preferred Session'),
|
|
45
|
+
title: l10n.t('允许 Preferred session切换显示'),
|
|
46
46
|
type: 'checkbox',
|
|
47
47
|
defaultValue: true,
|
|
48
48
|
schema: {
|
|
@@ -52,9 +52,9 @@ export var LibroConfigAllowPreferredSession = {
|
|
|
52
52
|
export var LibroConfigKernelUnreadyText = {
|
|
53
53
|
id: 'libro.jupyter.kernel.unready.text',
|
|
54
54
|
description: 'kernel unready text',
|
|
55
|
-
title: 'kernel 处于 unready 时左上角提示文案',
|
|
55
|
+
title: l10n.t('kernel 处于 unready 时左上角提示文案'),
|
|
56
56
|
type: 'string',
|
|
57
|
-
defaultValue: 'Kernel 准备中...',
|
|
57
|
+
defaultValue: l10n.t('Kernel 准备中...'),
|
|
58
58
|
schema: {
|
|
59
59
|
type: 'string'
|
|
60
60
|
}
|
|
@@ -62,9 +62,9 @@ export var LibroConfigKernelUnreadyText = {
|
|
|
62
62
|
export var LibroConfigKernelUnreadyBtnText = {
|
|
63
63
|
id: 'libro.jupyter.kernel.unready.btn.text',
|
|
64
64
|
description: 'kernel unready btn text',
|
|
65
|
-
title: 'kernel 处于 unready 时执行按钮提示文案',
|
|
65
|
+
title: l10n.t('kernel 处于 unready 时执行按钮提示文案'),
|
|
66
66
|
type: 'string',
|
|
67
|
-
defaultValue: 'kernel准备中,无法执行',
|
|
67
|
+
defaultValue: l10n.t('kernel准备中,无法执行'),
|
|
68
68
|
schema: {
|
|
69
69
|
type: 'string'
|
|
70
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-command.d.ts","sourceRoot":"","sources":["../../src/file/file-command.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACL,mBAAmB,EACnB,YAAY,EAEZ,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAEb,mBAAmB,EAEpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"file-command.d.ts","sourceRoot":"","sources":["../../src/file/file-command.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,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/libro-kernel';
|
|
20
20
|
import { ViewManager, ConfigurationService } from '@difizen/mana-app';
|
|
21
21
|
import { CommandContribution, FileStatNode, inject, MenuContribution, ModalService, OpenerService, singleton, ToolbarContribution, URI } from '@difizen/mana-app';
|
|
22
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
22
23
|
import { message, Modal } from 'antd';
|
|
23
24
|
import { FileCreateModal } from "./file-create-modal.js";
|
|
24
25
|
import { FileDirCreateModal } from "./file-createdir-modal.js";
|
|
@@ -125,60 +126,121 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
125
126
|
menu.registerMenuAction(FileTreeContextMenuGroups['new'], {
|
|
126
127
|
id: FileCommands.CREATE_FILE.id,
|
|
127
128
|
command: FileCommands.CREATE_FILE.id,
|
|
129
|
+
label: function label() {
|
|
130
|
+
return /*#__PURE__*/_jsx("div", {
|
|
131
|
+
children: l10n.t(FileCommands.CREATE_FILE.label)
|
|
132
|
+
});
|
|
133
|
+
},
|
|
128
134
|
order: 'a'
|
|
129
135
|
});
|
|
130
136
|
menu.registerMenuAction(FileTreeContextMenuGroups['new'], {
|
|
131
137
|
id: FileCommands.CREATE_DIR.id,
|
|
132
138
|
command: FileCommands.CREATE_DIR.id,
|
|
139
|
+
label: function label() {
|
|
140
|
+
return /*#__PURE__*/_jsx("div", {
|
|
141
|
+
children: l10n.t(FileCommands.CREATE_DIR.label)
|
|
142
|
+
});
|
|
143
|
+
},
|
|
133
144
|
order: 'a'
|
|
134
145
|
});
|
|
135
146
|
menu.registerMenuAction(FileTreeContextMenuGroups['new'], {
|
|
136
147
|
id: FileCommands.OPEN_FILE.id,
|
|
137
148
|
command: FileCommands.OPEN_FILE.id,
|
|
149
|
+
label: function label() {
|
|
150
|
+
return /*#__PURE__*/_jsx("div", {
|
|
151
|
+
children: l10n.t(FileCommands.OPEN_FILE.label)
|
|
152
|
+
});
|
|
153
|
+
},
|
|
138
154
|
order: 'a'
|
|
139
155
|
});
|
|
140
156
|
menu.registerMenuAction(FileTreeContextMenuGroups['operator'], {
|
|
141
157
|
id: FileCommands.COPY.id,
|
|
142
158
|
command: FileCommands.COPY.id,
|
|
159
|
+
label: function label() {
|
|
160
|
+
return /*#__PURE__*/_jsx("div", {
|
|
161
|
+
children: l10n.t(FileCommands.COPY.label)
|
|
162
|
+
});
|
|
163
|
+
},
|
|
143
164
|
order: 'b'
|
|
144
165
|
});
|
|
145
166
|
menu.registerMenuAction(FileTreeContextMenuGroups['operator'], {
|
|
146
167
|
id: FileCommands.PASTE.id,
|
|
147
168
|
command: FileCommands.PASTE.id,
|
|
169
|
+
label: function label() {
|
|
170
|
+
return /*#__PURE__*/_jsx("div", {
|
|
171
|
+
children: l10n.t(FileCommands.PASTE.label)
|
|
172
|
+
});
|
|
173
|
+
},
|
|
148
174
|
order: 'c'
|
|
149
175
|
});
|
|
150
176
|
menu.registerMenuAction(FileTreeContextMenuGroups['operator'], {
|
|
151
177
|
id: FileCommands.CUT.id,
|
|
152
178
|
command: FileCommands.CUT.id,
|
|
179
|
+
label: function label() {
|
|
180
|
+
return /*#__PURE__*/_jsx("div", {
|
|
181
|
+
children: l10n.t(FileCommands.CUT.label)
|
|
182
|
+
});
|
|
183
|
+
},
|
|
153
184
|
order: 'd'
|
|
154
185
|
});
|
|
155
|
-
menu.registerMenuAction(FileTreeContextMenuGroups['change'], _objectSpread({
|
|
186
|
+
menu.registerMenuAction(FileTreeContextMenuGroups['change'], _objectSpread(_objectSpread({
|
|
156
187
|
command: FileCommands.REMOVE.id,
|
|
157
188
|
order: 'd'
|
|
158
|
-
}, FileCommands.REMOVE)
|
|
189
|
+
}, FileCommands.REMOVE), {}, {
|
|
190
|
+
label: function label() {
|
|
191
|
+
return /*#__PURE__*/_jsx("div", {
|
|
192
|
+
children: l10n.t(FileCommands.REMOVE.label)
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
159
196
|
menu.registerMenuAction(FileTreeContextMenuGroups['change'], {
|
|
160
197
|
id: FileCommands.RENAME.id,
|
|
161
198
|
command: FileCommands.RENAME.id,
|
|
199
|
+
label: function label() {
|
|
200
|
+
return /*#__PURE__*/_jsx("div", {
|
|
201
|
+
children: l10n.t(FileCommands.RENAME.label)
|
|
202
|
+
});
|
|
203
|
+
},
|
|
162
204
|
order: 'e'
|
|
163
205
|
});
|
|
164
206
|
menu.registerMenuAction(FileTreeContextMenuGroups['extra'], {
|
|
165
207
|
id: FileCommands.COPY_PATH.id,
|
|
166
208
|
command: FileCommands.COPY_PATH.id,
|
|
209
|
+
label: function label() {
|
|
210
|
+
return /*#__PURE__*/_jsx("div", {
|
|
211
|
+
children: l10n.t(FileCommands.COPY_PATH.label)
|
|
212
|
+
});
|
|
213
|
+
},
|
|
167
214
|
order: 'f'
|
|
168
215
|
});
|
|
169
216
|
menu.registerMenuAction(FileTreeContextMenuGroups['extra'], {
|
|
170
217
|
id: FileCommands.COPY_RELATIVE_PATH.id,
|
|
171
218
|
command: FileCommands.COPY_RELATIVE_PATH.id,
|
|
219
|
+
label: function label() {
|
|
220
|
+
return /*#__PURE__*/_jsx("div", {
|
|
221
|
+
children: l10n.t(FileCommands.COPY_RELATIVE_PATH.label)
|
|
222
|
+
});
|
|
223
|
+
},
|
|
172
224
|
order: 'g'
|
|
173
225
|
});
|
|
174
226
|
menu.registerMenuAction(FileTreeContextMenuGroups['extra'], {
|
|
175
227
|
id: FileCommands.DOWNLOAD.id,
|
|
176
228
|
command: FileCommands.DOWNLOAD.id,
|
|
229
|
+
label: function label() {
|
|
230
|
+
return /*#__PURE__*/_jsx("div", {
|
|
231
|
+
children: l10n.t(FileCommands.DOWNLOAD.label)
|
|
232
|
+
});
|
|
233
|
+
},
|
|
177
234
|
order: 'h'
|
|
178
235
|
});
|
|
179
236
|
menu.registerMenuAction(FileTreeContextMenuGroups['extra'], {
|
|
180
237
|
id: FileCommands.UPLOAD.id,
|
|
181
238
|
command: FileCommands.UPLOAD.id,
|
|
239
|
+
label: function label() {
|
|
240
|
+
return /*#__PURE__*/_jsx("div", {
|
|
241
|
+
children: l10n.t(FileCommands.UPLOAD.label)
|
|
242
|
+
});
|
|
243
|
+
},
|
|
182
244
|
order: 'i'
|
|
183
245
|
});
|
|
184
246
|
}
|
|
@@ -204,7 +266,7 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
204
266
|
});
|
|
205
267
|
}
|
|
206
268
|
} catch (_unused) {
|
|
207
|
-
message.error('文件打开失败');
|
|
269
|
+
message.error(l10n.t('文件打开失败'));
|
|
208
270
|
}
|
|
209
271
|
},
|
|
210
272
|
isVisible: function isVisible(node) {
|
|
@@ -217,11 +279,13 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
217
279
|
var filePath = node.uri.path.toString();
|
|
218
280
|
Modal.confirm({
|
|
219
281
|
width: 424,
|
|
220
|
-
title: '确认要删除这个文件/文件夹吗?',
|
|
221
|
-
content:
|
|
282
|
+
title: l10n.t('确认要删除这个文件/文件夹吗?'),
|
|
283
|
+
content: l10n.t('请确认是否删除文件 {filePath} ,删除后将不可恢复,请谨慎操作。', {
|
|
284
|
+
filePath: filePath
|
|
285
|
+
}),
|
|
222
286
|
wrapClassName: 'libro-remove-file-modal',
|
|
223
|
-
cancelText: '取消',
|
|
224
|
-
okText: '确定',
|
|
287
|
+
cancelText: l10n.t('取消'),
|
|
288
|
+
okText: l10n.t('确定'),
|
|
225
289
|
onOk: function () {
|
|
226
290
|
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
227
291
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -237,7 +301,7 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
237
301
|
case 6:
|
|
238
302
|
_context.prev = 6;
|
|
239
303
|
_context.t0 = _context["catch"](0);
|
|
240
|
-
message.error('删除文件失败!');
|
|
304
|
+
message.error(l10n.t('删除文件失败!'));
|
|
241
305
|
case 9:
|
|
242
306
|
_this2.fileView.model.refresh();
|
|
243
307
|
case 10:
|
|
@@ -315,7 +379,7 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
315
379
|
case 18:
|
|
316
380
|
_context2.prev = 18;
|
|
317
381
|
_context2.t0 = _context2["catch"](0);
|
|
318
|
-
message.error('粘贴失败!');
|
|
382
|
+
message.error(l10n.t('粘贴失败!'));
|
|
319
383
|
case 21:
|
|
320
384
|
case "end":
|
|
321
385
|
return _context2.stop();
|
|
@@ -545,7 +609,7 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
545
609
|
id: FileCommands.REFRESH.id,
|
|
546
610
|
command: FileCommands.REFRESH.id,
|
|
547
611
|
icon: /*#__PURE__*/_jsx(ReloadOutlined, {}),
|
|
548
|
-
tooltip: '刷新'
|
|
612
|
+
tooltip: l10n.t('刷新')
|
|
549
613
|
});
|
|
550
614
|
}
|
|
551
615
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-create-modal.d.ts","sourceRoot":"","sources":["../../src/file/file-create-modal.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"file-create-modal.d.ts","sourceRoot":"","sources":["../../src/file/file-create-modal.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAQnE,OAAO,cAAc,CAAC;AAWtB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhE,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CA8K5E,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,aAAa,CAGpD,CAAC"}
|
|
@@ -11,6 +11,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
11
11
|
import { ThemeService } from '@difizen/mana-app';
|
|
12
12
|
import { CommandRegistry } from '@difizen/mana-app';
|
|
13
13
|
import { URI, useInject, ViewManager } from '@difizen/mana-app';
|
|
14
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
14
15
|
import { Col, Form, message, Row, Input, Modal, ConfigProvider, theme } from 'antd';
|
|
15
16
|
import { useEffect, useRef, useState } from 'react';
|
|
16
17
|
import "./index.less";
|
|
@@ -67,7 +68,7 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
67
68
|
case 11:
|
|
68
69
|
_context.prev = 11;
|
|
69
70
|
_context.t0 = _context["catch"](3);
|
|
70
|
-
message.error('新建文件失败');
|
|
71
|
+
message.error(l10n.t('新建文件失败'));
|
|
71
72
|
case 14:
|
|
72
73
|
case "end":
|
|
73
74
|
return _context.stop();
|
|
@@ -88,7 +89,7 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
88
89
|
_context2.next = 4;
|
|
89
90
|
break;
|
|
90
91
|
}
|
|
91
|
-
throw new Error('请输入文件名');
|
|
92
|
+
throw new Error(l10n.t('请输入文件名'));
|
|
92
93
|
case 4:
|
|
93
94
|
targetURI = new URI((data === null || data === void 0 ? void 0 : data.path) + value + (fileType || ''));
|
|
94
95
|
_context2.next = 7;
|
|
@@ -99,7 +100,7 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
99
100
|
_context2.next = 10;
|
|
100
101
|
break;
|
|
101
102
|
}
|
|
102
|
-
throw new Error('文件名称已存在,请重新输入');
|
|
103
|
+
throw new Error(l10n.t('文件名称已存在,请重新输入'));
|
|
103
104
|
case 10:
|
|
104
105
|
case "end":
|
|
105
106
|
return _context2.stop();
|
|
@@ -125,12 +126,12 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
125
126
|
algorithm: themeService.getCurrentTheme().type === 'dark' ? theme.darkAlgorithm : theme.defaultAlgorithm
|
|
126
127
|
},
|
|
127
128
|
children: /*#__PURE__*/_jsxs(Modal, {
|
|
128
|
-
title:
|
|
129
|
+
title: l10n.t('新建文件'),
|
|
129
130
|
open: visible,
|
|
130
131
|
onCancel: close,
|
|
131
132
|
width: 788,
|
|
132
|
-
cancelText:
|
|
133
|
-
okText:
|
|
133
|
+
cancelText: l10n.t('取消'),
|
|
134
|
+
okText: l10n.t('确定'),
|
|
134
135
|
onOk: function onOk() {
|
|
135
136
|
form.submit();
|
|
136
137
|
},
|
|
@@ -140,14 +141,14 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
140
141
|
className: "libro-create-file-path-container",
|
|
141
142
|
children: [/*#__PURE__*/_jsx("div", {
|
|
142
143
|
className: "libro-create-file-des",
|
|
143
|
-
children:
|
|
144
|
+
children: l10n.t('创建位置:')
|
|
144
145
|
}), /*#__PURE__*/_jsx("span", {
|
|
145
146
|
className: "libro-create-file-path",
|
|
146
147
|
children: data === null || data === void 0 ? void 0 : data.path
|
|
147
148
|
})]
|
|
148
149
|
}), /*#__PURE__*/_jsx("div", {
|
|
149
150
|
className: "libro-create-file-des",
|
|
150
|
-
children:
|
|
151
|
+
children: l10n.t('文件类型:')
|
|
151
152
|
}), /*#__PURE__*/_jsxs(Row, {
|
|
152
153
|
children: [/*#__PURE__*/_jsx(Col, {
|
|
153
154
|
className: "gutter-row",
|
|
@@ -218,7 +219,7 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
218
219
|
},
|
|
219
220
|
children: [/*#__PURE__*/_jsx(MoreIcon, {}), /*#__PURE__*/_jsx("span", {
|
|
220
221
|
className: "libro-create-file-type-text",
|
|
221
|
-
children:
|
|
222
|
+
children: l10n.t('其他')
|
|
222
223
|
})]
|
|
223
224
|
})
|
|
224
225
|
})]
|
|
@@ -230,7 +231,7 @@ export var FileCreateModalComponent = function FileCreateModalComponent(_ref) {
|
|
|
230
231
|
className: "libro-create-file-form",
|
|
231
232
|
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
232
233
|
name: "fileName",
|
|
233
|
-
label:
|
|
234
|
+
label: l10n.t('文件名称'),
|
|
234
235
|
rules: [{
|
|
235
236
|
required: true,
|
|
236
237
|
validator: validateFileName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-createdir-modal.d.ts","sourceRoot":"","sources":["../../src/file/file-createdir-modal.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"file-createdir-modal.d.ts","sourceRoot":"","sources":["../../src/file/file-createdir-modal.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAYnE,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAChD,cAAc,CAAC,0BAA0B,CAAC,CA+F3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,0BAA0B,CAGpE,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { ThemeService } from '@difizen/mana-app';
|
|
|
12
12
|
import { URI } from '@difizen/mana-app';
|
|
13
13
|
import { ViewManager } from '@difizen/mana-app';
|
|
14
14
|
import { useInject } from '@difizen/mana-app';
|
|
15
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
15
16
|
import { Form, message, Input, Modal, ConfigProvider, theme } from 'antd';
|
|
16
17
|
import { useEffect, useRef, useState } from 'react';
|
|
17
18
|
import { JupyterFileService } from "./file-service.js";
|
|
@@ -55,7 +56,7 @@ export var FileCreateDirModalComponent = function FileCreateDirModalComponent(_r
|
|
|
55
56
|
case 9:
|
|
56
57
|
_context.prev = 9;
|
|
57
58
|
_context.t0 = _context["catch"](3);
|
|
58
|
-
message.error('新建文件夹失败');
|
|
59
|
+
message.error(l10n.t('新建文件夹失败'));
|
|
59
60
|
case 12:
|
|
60
61
|
case "end":
|
|
61
62
|
return _context.stop();
|
|
@@ -76,7 +77,7 @@ export var FileCreateDirModalComponent = function FileCreateDirModalComponent(_r
|
|
|
76
77
|
_context2.next = 4;
|
|
77
78
|
break;
|
|
78
79
|
}
|
|
79
|
-
throw new Error('请输入文件夹名');
|
|
80
|
+
throw new Error(l10n.t('请输入文件夹名'));
|
|
80
81
|
case 4:
|
|
81
82
|
targetURI = new URI((data === null || data === void 0 ? void 0 : data.path) + value);
|
|
82
83
|
_context2.next = 7;
|
|
@@ -87,7 +88,7 @@ export var FileCreateDirModalComponent = function FileCreateDirModalComponent(_r
|
|
|
87
88
|
_context2.next = 10;
|
|
88
89
|
break;
|
|
89
90
|
}
|
|
90
|
-
throw new Error('文件夹名称已存在,请重新输入');
|
|
91
|
+
throw new Error(l10n.t('文件夹名称已存在,请重新输入'));
|
|
91
92
|
case 10:
|
|
92
93
|
case "end":
|
|
93
94
|
return _context2.stop();
|
|
@@ -113,11 +114,11 @@ export var FileCreateDirModalComponent = function FileCreateDirModalComponent(_r
|
|
|
113
114
|
algorithm: themeService.getCurrentTheme().type === 'dark' ? theme.darkAlgorithm : theme.defaultAlgorithm
|
|
114
115
|
},
|
|
115
116
|
children: /*#__PURE__*/_jsxs(Modal, {
|
|
116
|
-
title:
|
|
117
|
+
title: l10n.t('新建文件夹'),
|
|
117
118
|
open: visible,
|
|
118
119
|
onCancel: close,
|
|
119
|
-
cancelText:
|
|
120
|
-
okText:
|
|
120
|
+
cancelText: l10n.t('取消'),
|
|
121
|
+
okText: l10n.t('确定'),
|
|
121
122
|
onOk: function onOk() {
|
|
122
123
|
form.submit();
|
|
123
124
|
},
|
|
@@ -126,7 +127,7 @@ export var FileCreateDirModalComponent = function FileCreateDirModalComponent(_r
|
|
|
126
127
|
width: 524,
|
|
127
128
|
children: [/*#__PURE__*/_jsx("div", {
|
|
128
129
|
className: "libro-create-file-des",
|
|
129
|
-
children:
|
|
130
|
+
children: l10n.t('创建位置:')
|
|
130
131
|
}), /*#__PURE__*/_jsx("span", {
|
|
131
132
|
className: "libro-create-file-path",
|
|
132
133
|
children: data === null || data === void 0 ? void 0 : data.path
|
|
@@ -138,7 +139,7 @@ export var FileCreateDirModalComponent = function FileCreateDirModalComponent(_r
|
|
|
138
139
|
className: "libro-create-dir-file-form",
|
|
139
140
|
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
140
141
|
name: "dirName",
|
|
141
|
-
label:
|
|
142
|
+
label: l10n.t('文件夹名称'),
|
|
142
143
|
rules: [{
|
|
143
144
|
required: true,
|
|
144
145
|
validator: validateDirName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-icon.d.ts","sourceRoot":"","sources":["../../src/file/file-icon.tsx"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,2CA6BzC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,2CA6BpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,2CA8DrC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,2CA8CvC;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"file-icon.d.ts","sourceRoot":"","sources":["../../src/file/file-icon.tsx"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,2CA6BzC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,2CA6BpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,2CA8DrC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,2CA8CvC;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,2CAgUpC"}
|
package/es/file/file-icon.js
CHANGED
|
@@ -201,16 +201,14 @@ export function PythonIcon(props) {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
export function MoreIcon(prop) {
|
|
204
|
-
return /*#__PURE__*/
|
|
204
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
205
205
|
width: "37px",
|
|
206
206
|
height: "36px",
|
|
207
207
|
viewBox: "0 0 37 36",
|
|
208
208
|
version: "1.1",
|
|
209
209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
210
210
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
211
|
-
children:
|
|
212
|
-
children: "\u5E93\u5B58\u67E5\u8BE2"
|
|
213
|
-
}), /*#__PURE__*/_jsx("g", {
|
|
211
|
+
children: /*#__PURE__*/_jsx("g", {
|
|
214
212
|
id: "\u6574\u4F53\u6846\u67B6\u90E8\u5206",
|
|
215
213
|
stroke: "none",
|
|
216
214
|
strokeWidth: "1",
|
|
@@ -470,6 +468,6 @@ export function MoreIcon(prop) {
|
|
|
470
468
|
})
|
|
471
469
|
})
|
|
472
470
|
})
|
|
473
|
-
})
|
|
471
|
+
})
|
|
474
472
|
});
|
|
475
473
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-rename-modal.d.ts","sourceRoot":"","sources":["../../src/file/file-rename-modal.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"file-rename-modal.d.ts","sourceRoot":"","sources":["../../src/file/file-rename-modal.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxE,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CA6F5E,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,aAAa,CAGpD,CAAC"}
|
|
@@ -9,6 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { ThemeService, useInject, ViewManager } from '@difizen/mana-app';
|
|
12
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
12
13
|
import { Form, message, Input, Modal, theme, ConfigProvider } from 'antd';
|
|
13
14
|
import { useEffect, useRef, useState } from 'react';
|
|
14
15
|
import { JupyterFileService } from "./file-service.js";
|
|
@@ -66,7 +67,7 @@ export var FileRenameModalComponent = function FileRenameModalComponent(_ref) {
|
|
|
66
67
|
case 10:
|
|
67
68
|
_context.prev = 10;
|
|
68
69
|
_context.t0 = _context["catch"](3);
|
|
69
|
-
message.error('重命名文件/文件夹失败');
|
|
70
|
+
message.error(l10n.t('重命名文件/文件夹失败'));
|
|
70
71
|
case 13:
|
|
71
72
|
case "end":
|
|
72
73
|
return _context.stop();
|
|
@@ -86,13 +87,13 @@ export var FileRenameModalComponent = function FileRenameModalComponent(_ref) {
|
|
|
86
87
|
_context2.next = 4;
|
|
87
88
|
break;
|
|
88
89
|
}
|
|
89
|
-
throw new Error('请输入文件夹名');
|
|
90
|
+
throw new Error(l10n.t('请输入文件夹名'));
|
|
90
91
|
case 4:
|
|
91
92
|
if (!(value === (data === null || data === void 0 ? void 0 : data.fileName))) {
|
|
92
93
|
_context2.next = 6;
|
|
93
94
|
break;
|
|
94
95
|
}
|
|
95
|
-
throw new Error('文件/文件夹名称已存在,请重新输入');
|
|
96
|
+
throw new Error(l10n.t('文件/文件夹名称已存在,请重新输入'));
|
|
96
97
|
case 6:
|
|
97
98
|
case "end":
|
|
98
99
|
return _context2.stop();
|
|
@@ -108,7 +109,7 @@ export var FileRenameModalComponent = function FileRenameModalComponent(_ref) {
|
|
|
108
109
|
algorithm: themeService.getCurrentTheme().type === 'dark' ? theme.darkAlgorithm : theme.defaultAlgorithm
|
|
109
110
|
},
|
|
110
111
|
children: /*#__PURE__*/_jsx(Modal, {
|
|
111
|
-
title:
|
|
112
|
+
title: l10n.t('文件重命名'),
|
|
112
113
|
open: visible,
|
|
113
114
|
onCancel: close,
|
|
114
115
|
onOk: function onOk() {
|
|
@@ -123,7 +124,7 @@ export var FileRenameModalComponent = function FileRenameModalComponent(_ref) {
|
|
|
123
124
|
className: "libro-rename-file-form",
|
|
124
125
|
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
125
126
|
name: "rename",
|
|
126
|
-
label:
|
|
127
|
+
label: l10n.t('文件/文件夹名称'),
|
|
127
128
|
rules: [{
|
|
128
129
|
required: true,
|
|
129
130
|
validator: validateRename
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-service.d.ts","sourceRoot":"","sources":["../../src/file/file-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,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