React App
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Run Extension",
10 | "type": "extensionHost",
11 | "request": "launch",
12 | "runtimeExecutable": "${execPath}",
13 | "args": ["--extensionDevelopmentPath=${workspaceRoot}"],
14 | "outFiles": ["${workspaceFolder}/out/**/*.js"],
15 | "preLaunchTask": "npm: watch"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/assets/tab-icon-white.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webview/asset-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "main.css": "./static/css/main.78c6095b.chunk.css",
4 | "main.js": "./static/js/main.375bc23e.chunk.js",
5 | "main.js.map": "./static/js/main.375bc23e.chunk.js.map",
6 | "runtime-main.js": "./static/js/runtime-main.872e7406.js",
7 | "runtime-main.js.map": "./static/js/runtime-main.872e7406.js.map",
8 | "static/js/2.e4490e60.chunk.js": "./static/js/2.e4490e60.chunk.js",
9 | "static/js/2.e4490e60.chunk.js.map": "./static/js/2.e4490e60.chunk.js.map",
10 | "static/js/3.0a391345.chunk.js": "./static/js/3.0a391345.chunk.js",
11 | "static/js/3.0a391345.chunk.js.map": "./static/js/3.0a391345.chunk.js.map",
12 | "index.html": "./index.html",
13 | "static/css/main.78c6095b.chunk.css.map": "./static/css/main.78c6095b.chunk.css.map",
14 | "static/js/2.e4490e60.chunk.js.LICENSE.txt": "./static/js/2.e4490e60.chunk.js.LICENSE.txt",
15 | "static/media/getFetch.cjs": "./static/media/getFetch.d7d6010d.cjs"
16 | },
17 | "entrypoints": [
18 | "static/js/runtime-main.872e7406.js",
19 | "static/js/2.e4490e60.chunk.js",
20 | "static/css/main.78c6095b.chunk.css",
21 | "static/js/main.375bc23e.chunk.js"
22 | ]
23 | }
--------------------------------------------------------------------------------
/assets/tab-icon-black.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
43 |
--------------------------------------------------------------------------------
/assets/main-icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "regedit",
3 | "displayName": "Regedit",
4 | "description": "A registry editor inside VS Code",
5 | "version": "1.0.3",
6 | "icon": "assets/main-icon.png",
7 | "publisher": "m417z",
8 | "engines": {
9 | "vscode": "^1.47.0"
10 | },
11 | "categories": [
12 | "Other"
13 | ],
14 | "activationEvents": [
15 | "onCommand:regedit.start",
16 | "onWebviewPanel:regedit"
17 | ],
18 | "repository": {
19 | "type": "git",
20 | "url": "https://github.com/m417z/vscode-regedit"
21 | },
22 | "main": "./out/extension.js",
23 | "contributes": {
24 | "commands": [
25 | {
26 | "command": "regedit.start",
27 | "title": "%commands.start.title%",
28 | "category": "%commands.category%"
29 | }
30 | ],
31 | "menus": {
32 | "editor/title": [
33 | {
34 | "command": "regedit.start"
35 | }
36 | ]
37 | }
38 | },
39 | "scripts": {
40 | "vscode:prepublish": "npm run compile",
41 | "compile": "tsc -p ./",
42 | "lint": "eslint . --ext .ts,.tsx",
43 | "watch": "tsc -w -p ./"
44 | },
45 | "dependencies": {
46 | "native-reg": "^0.3.5",
47 | "vscode-nls-i18n": "^0.2.2"
48 | },
49 | "devDependencies": {
50 | "@typescript-eslint/eslint-plugin": "^3.0.2",
51 | "@typescript-eslint/parser": "^3.0.2",
52 | "eslint": "^7.1.0",
53 | "typescript": "^4.0.2",
54 | "@types/vscode": "^1.47.0",
55 | "@types/node": "^12.12.0"
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/webview/locales/en/translation.json:
--------------------------------------------------------------------------------
1 | {
2 | "global": {
3 | "yes": "Yes",
4 | "no": "No"
5 | },
6 | "addressBar": {
7 | "registryPath": "Registry path",
8 | "invalidRegistryPath": "Invalid registry path"
9 | },
10 | "keysTreeView": {
11 | "computer": "Computer",
12 | "keyName": "Key name",
13 | "newKeyModal": {
14 | "title": "Create a new key",
15 | "newKeyName": "New key name",
16 | "create": "Create",
17 | "cancel": "Cancel"
18 | },
19 | "confirmDeleteKeyModal": {
20 | "title": "Confirm key deletion",
21 | "text": "Are you sure you want to permanently delete the key \"{{key}}\" and all of its subkeys?"
22 | }
23 | },
24 | "valuesList": {
25 | "columnNames": {
26 | "name": "Name",
27 | "type": "Type",
28 | "value": "Value"
29 | },
30 | "defaultName": "(Default)",
31 | "newValueModal": {
32 | "title": "Create a new value",
33 | "newValueName": "New value name",
34 | "types": {
35 | "dword": "32-bit number",
36 | "string": "String",
37 | "expandableString": "Expandable string",
38 | "multiString": "Multi-string",
39 | "binaryData": "Binary data"
40 | },
41 | "selectValueType": "Select the value type",
42 | "insertValueData": "Insert value data",
43 | "create": "Create",
44 | "cancel": "Cancel"
45 | },
46 | "confirmDeleteValueModal": {
47 | "title": "Confirm key deletion",
48 | "text": "Are you sure you want to permanently delete the value \"{{value}}\"?"
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/webview/locales/ru/translation.json:
--------------------------------------------------------------------------------
1 | {
2 | "global": {
3 | "yes": "Да",
4 | "no": "Нет"
5 | },
6 | "addressBar": {
7 | "registryPath": "Путь к разделу реестра",
8 | "invalidRegistryPath": "Недопустимый путь к разделу реестра"
9 | },
10 | "keysTreeView": {
11 | "computer": "Компьютер",
12 | "keyName": "Имя ключа",
13 | "newKeyModal": {
14 | "title": "Создать новый ключ",
15 | "newKeyName": "Имя нового ключа",
16 | "create": "Создать",
17 | "cancel": "Отменить"
18 | },
19 | "confirmDeleteKeyModal": {
20 | "title": "Подтвердите удаление ключа",
21 | "text": "Вы уверены, что хотите навсегда удалить ключ \"{{key}}\" и все его подразделы?"
22 | }
23 | },
24 | "valuesList": {
25 | "columnNames": {
26 | "name": "Имя",
27 | "type": "Тип",
28 | "value": "Значение"
29 | },
30 | "defaultName": "(По умолчанию)",
31 | "newValueModal": {
32 | "title": "Создать новое значение",
33 | "newValueName": "Имя нового значения",
34 | "types": {
35 | "dword": "32-разрядное число",
36 | "string": "Текст",
37 | "expandableString": "Текст и переменные",
38 | "multiString": "Массив строк",
39 | "binaryData": "Двоичные данные"
40 | },
41 | "selectValueType": "Выберите тип значения",
42 | "insertValueData": "Введите данные значения",
43 | "create": "Создать",
44 | "cancel": "Отменить"
45 | },
46 | "confirmDeleteValueModal": {
47 | "title": "Подтвердите удаление ключа",
48 | "text": "Вы уверены, что хотите навсегда удалить значение \"{{value}}\"?"
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/webview/static/js/2.e4490e60.chunk.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*
2 | object-assign
3 | (c) Sindre Sorhus
4 | @license MIT
5 | */
6 |
7 | /*!
8 | Copyright (c) 2017 Jed Watson.
9 | Licensed under the MIT License (MIT), see
10 | http://jedwatson.github.io/classnames
11 | */
12 |
13 | /*!
14 | * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
15 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
16 | */
17 |
18 | /** @license React v0.20.1
19 | * scheduler.production.min.js
20 | *
21 | * Copyright (c) Facebook, Inc. and its affiliates.
22 | *
23 | * This source code is licensed under the MIT license found in the
24 | * LICENSE file in the root directory of this source tree.
25 | */
26 |
27 | /** @license React v16.13.1
28 | * react-is.production.min.js
29 | *
30 | * Copyright (c) Facebook, Inc. and its affiliates.
31 | *
32 | * This source code is licensed under the MIT license found in the
33 | * LICENSE file in the root directory of this source tree.
34 | */
35 |
36 | /** @license React v17.0.1
37 | * react-dom.production.min.js
38 | *
39 | * Copyright (c) Facebook, Inc. and its affiliates.
40 | *
41 | * This source code is licensed under the MIT license found in the
42 | * LICENSE file in the root directory of this source tree.
43 | */
44 |
45 | /** @license React v17.0.1
46 | * react-jsx-runtime.production.min.js
47 | *
48 | * Copyright (c) Facebook, Inc. and its affiliates.
49 | *
50 | * This source code is licensed under the MIT license found in the
51 | * LICENSE file in the root directory of this source tree.
52 | */
53 |
54 | /** @license React v17.0.1
55 | * react.production.min.js
56 | *
57 | * Copyright (c) Facebook, Inc. and its affiliates.
58 | *
59 | * This source code is licensed under the MIT license found in the
60 | * LICENSE file in the root directory of this source tree.
61 | */
62 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Regedit - A registry editor inside VS Code
2 |
3 | The extension allows to access and modify the Windows registry from within Visual Studio Code.
4 |
5 | 
6 |
7 | To open the extension, use the "New Regedit Tab" command or open a new tab from the Editor Actions menu.
8 |
9 | 
10 |
11 | To rename the selected key, click on the active item in the tree.
12 |
13 | To rename or modify values, click on their name or value.
14 |
15 | To remove a key or a value, use the middle mouse button.
16 |
17 | To refresh the data, click on the address bar and press Enter.
18 |
19 | ## More information
20 |
21 | I created this extension to learn how to develop extensions for VS Code. This extension demonstrates how to use React inside a WebView, how to communicate with the extension process, and how to implement localization.
22 |
23 | Main dependencies:
24 | * React as the UI framework.
25 | * [React Suite](https://rsuitejs.com/) for the main UI components.
26 | * [native-reg](https://github.com/simonbuchan/native-reg) for accessing the registry from the extension process.
27 |
28 | The React UI source code can be found here: [vscode-regedit-ui](https://github.com/m417z/vscode-regedit-ui).
29 |
30 | Icon by [Freepik](https://www.freepik.com/).
31 |
32 | ## Features that can be added in the future
33 |
34 | Below is a list of features that can be added. Note that it doesn't mean that I plan to add them.
35 |
36 | ### Features available in the Windows regedit
37 |
38 | * Support for more types.
39 | * Binary data access for all types.
40 | * Search.
41 | * Permissions.
42 | * Import and export.
43 | * Hive loading and unloading.
44 | * Network registry.
45 | * Favorites.
46 | * Print?! (Why does Microsoft have this feature?)
47 |
48 | ### More features
49 |
50 | * Undo and redo.
51 | * Moving values and child keys between keys.
52 | * Clipboard operations.
53 | * Displaying last modified time.
54 |
--------------------------------------------------------------------------------
/webview/static/js/runtime-main.872e7406.js:
--------------------------------------------------------------------------------
1 | !function(e){function r(r){for(var n,i,a=r[0],c=r[1],l=r[2],s=0,p=[];s1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:e,delta:0,entries:[],id:r(),isFinal:!1}},u=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(t){}},c=!1,s=!1,d=function(t){c=!t.persisted},f=function(){addEventListener("pagehide",d),addEventListener("beforeunload",(function(){}))},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s||(f(),s=!0),addEventListener("visibilitychange",(function(e){var n=e.timeStamp;"hidden"===document.visibilityState&&t({timeStamp:n,isUnloading:c})}),{capture:!0,once:e})},v=function(t,e,n,i){var a;return function(){n&&e.isFinal&&n.disconnect(),e.value>=0&&(i||e.isFinal||"hidden"===document.visibilityState)&&(e.delta=e.value-(a||0),(e.delta||e.isFinal||void 0===a)&&(t(e),a=e.value))}},l=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=o("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),e())},r=u("layout-shift",a);r&&(e=v(t,i,r,n),p((function(t){var n=t.isUnloading;r.takeRecords().map(a),n&&(i.isFinal=!0),e()})))},m=function(){return void 0===i&&(i="hidden"===document.visibilityState?0:1/0,p((function(t){var e=t.timeStamp;return i=e}),!0)),{get timeStamp(){return i}}},g=function(t){var e,n=o("FCP"),i=m(),a=u("paint",(function(t){"first-contentful-paint"===t.name&&t.startTime1&&void 0!==arguments[1]&&arguments[1],i=o("LCP"),a=m(),r=function(t){var n=t.startTime;n1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:n,delta:0,entries:[],id:e(),isFinal:!1}},a=function(t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var e=new PerformanceObserver((function(t){return t.getEntries().map(n)}));return e.observe({type:t,buffered:!0}),e}}catch(t){}},r=!1,o=!1,s=function(t){r=!t.persisted},u=function(){addEventListener(\"pagehide\",s),addEventListener(\"beforeunload\",(function(){}))},c=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(u(),o=!0),addEventListener(\"visibilitychange\",(function(n){var e=n.timeStamp;\"hidden\"===document.visibilityState&&t({timeStamp:e,isUnloading:r})}),{capture:!0,once:n})},l=function(t,n,e,i){var a;return function(){e&&n.isFinal&&e.disconnect(),n.value>=0&&(i||n.isFinal||\"hidden\"===document.visibilityState)&&(n.delta=n.value-(a||0),(n.delta||n.isFinal||void 0===a)&&(t(n),a=n.value))}},p=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i(\"CLS\",0),o=function(t){t.hadRecentInput||(r.value+=t.value,r.entries.push(t),n())},s=a(\"layout-shift\",o);s&&(n=l(t,r,s,e),c((function(t){var e=t.isUnloading;s.takeRecords().map(o),e&&(r.isFinal=!0),n()})))},d=function(){return void 0===t&&(t=\"hidden\"===document.visibilityState?0:1/0,c((function(n){var e=n.timeStamp;return t=e}),!0)),{get timeStamp(){return t}}},v=function(t){var n,e=i(\"FCP\"),r=d(),o=a(\"paint\",(function(t){\"first-contentful-paint\"===t.name&&t.startTime1&&void 0!==arguments[1]&&arguments[1],r=i(\"LCP\"),o=d(),s=function(t){var e=t.startTime;e {
17 | RegeditPanel.create(context.extensionUri);
18 | })
19 | );
20 |
21 | if (vscode.window.registerWebviewPanelSerializer) {
22 | // Make sure we register a serializer in activation event.
23 | vscode.window.registerWebviewPanelSerializer(RegeditPanel.viewType, {
24 | async deserializeWebviewPanel(webviewPanel: vscode.WebviewPanel, state: any) {
25 | //console.log(`Got state: ${state}`);
26 | RegeditPanel.revive(webviewPanel, context.extensionUri);
27 | }
28 | });
29 | }
30 | }
31 |
32 | /**
33 | * Manages regedit webview panels.
34 | */
35 | class RegeditPanel {
36 | /**
37 | * Track the currently panel. Only allow a single panel to exist at a time.
38 | */
39 | public static readonly viewType = 'regedit';
40 |
41 | private readonly _panel: vscode.WebviewPanel;
42 | private readonly _extensionUri: vscode.Uri;
43 | private _disposables: vscode.Disposable[] = [];
44 |
45 | public static create(extensionUri: vscode.Uri) {
46 | const column = vscode.window.activeTextEditor
47 | ? vscode.window.activeTextEditor.viewColumn
48 | : undefined;
49 |
50 | const localResourceRoots = [vscode.Uri.joinPath(extensionUri, 'webview')];
51 | if (baseDebugReactUiPath) {
52 | localResourceRoots.push(vscode.Uri.file(baseDebugReactUiPath));
53 | }
54 |
55 | // Create a new panel.
56 | const panel = vscode.window.createWebviewPanel(
57 | RegeditPanel.viewType,
58 | i18n.localize('extensionName'),
59 | column || vscode.ViewColumn.One,
60 | {
61 | // Enable javascript in the webview.
62 | enableScripts: true,
63 |
64 | // And restrict the webview to only loading content from our extension's `webview` directory.
65 | localResourceRoots
66 | }
67 | );
68 |
69 | new RegeditPanel(panel, extensionUri);
70 | }
71 |
72 | public static revive(panel: vscode.WebviewPanel, extensionUri: vscode.Uri) {
73 | new RegeditPanel(panel, extensionUri);
74 | }
75 |
76 | private constructor(panel: vscode.WebviewPanel, extensionUri: vscode.Uri) {
77 | this._panel = panel;
78 | this._extensionUri = extensionUri;
79 |
80 | // Set the webview's initial html content and icon.
81 | this._panel.webview.html = this._getHtmlForWebview(this._panel.webview);
82 | this._panel.iconPath = {
83 | light: vscode.Uri.joinPath(extensionUri, 'assets', 'tab-icon-black.svg'),
84 | dark: vscode.Uri.joinPath(extensionUri, 'assets', 'tab-icon-white.svg')
85 | };
86 |
87 | // Listen for when the panel is disposed.
88 | // This happens when the user closes the panel or when the panel is closed programatically.
89 | this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
90 |
91 | // Handle messages from the webview.
92 | this._panel.webview.onDidReceiveMessage(
93 | message => {
94 | switch (message.command) {
95 | case 'alert':
96 | vscode.window.showErrorMessage(message.text);
97 | break;
98 |
99 | case 'setTitle':
100 | this._panel.title = message.title + ' - ' + i18n.localize('extensionName');
101 | break;
102 |
103 | case 'getKeyTreeAndValues':
104 | {
105 | let retrievedKey = null;
106 | let tree = null;
107 | let values = null;
108 | try {
109 | const { retrievedKey: k, tree: t } = regUtils.getKeyTree(message.key);
110 | retrievedKey = k;
111 | tree = t;
112 |
113 | values = regUtils.getKeyValues(retrievedKey);
114 | } catch (e) {
115 | vscode.window.showErrorMessage(e.message);
116 | }
117 |
118 | this._panel.webview.postMessage({
119 | command: 'setKeyTreeAndValues',
120 | key: message.key,
121 | retrievedKey: retrievedKey || '',
122 | tree: tree || [],
123 | values: values || []
124 | });
125 | }
126 | break;
127 |
128 | case 'getSubKeys':
129 | {
130 | let subKeys = null;
131 | try {
132 | subKeys = regUtils.getSubKeys(message.key);
133 | } catch (e) {
134 | vscode.window.showErrorMessage(e.message);
135 | }
136 |
137 | this._panel.webview.postMessage({
138 | command: 'setSubKeys',
139 | key: message.key,
140 | subKeys: subKeys || []
141 | });
142 | }
143 | break;
144 |
145 | case 'createKey':
146 | try {
147 | regUtils.createKey(message.key);
148 | this._panel.webview.postMessage({
149 | command: 'createKeyDone',
150 | key: message.key
151 | });
152 | } catch (e) {
153 | vscode.window.showErrorMessage(e.message);
154 | }
155 | break;
156 |
157 | case 'renameKey':
158 | try {
159 | regUtils.renameKey(message.key, message.newSubKey);
160 | this._panel.webview.postMessage({
161 | command: 'renameKeyDone',
162 | key: message.key,
163 | newSubKey: message.newSubKey
164 | });
165 | } catch (e) {
166 | vscode.window.showErrorMessage(e.message);
167 | }
168 | break;
169 |
170 | case 'deleteKey':
171 | try {
172 | const existed = regUtils.deleteTree(message.key);
173 | this._panel.webview.postMessage({
174 | command: 'deleteKeyDone',
175 | key: message.key
176 | });
177 |
178 | if (!existed) {
179 | vscode.window.showErrorMessage('Key no longer exists, removed from tree');
180 | }
181 | } catch (e) {
182 | vscode.window.showErrorMessage(e.message);
183 | }
184 | break;
185 |
186 | case 'getKeyValues':
187 | {
188 | let values = null;
189 | try {
190 | values = regUtils.getKeyValues(message.key);
191 | } catch (e) {
192 | vscode.window.showErrorMessage(e.message);
193 | }
194 |
195 | this._panel.webview.postMessage({
196 | command: 'setKeyValues',
197 | key: message.key,
198 | values: values || []
199 | });
200 | }
201 | break;
202 |
203 | case 'renameValue':
204 | try {
205 | regUtils.renameValue(
206 | message.key, message.oldName, message.newName);
207 | this._panel.webview.postMessage({
208 | command: 'renameValueDone',
209 | key: message.key,
210 | oldName: message.oldName,
211 | newName: message.newName
212 | });
213 | } catch (e) {
214 | vscode.window.showErrorMessage(e.message);
215 | }
216 | break;
217 |
218 | case 'setValueData':
219 | try {
220 | const newData = regUtils.setValueData(
221 | message.key, message.name, message.type, message.data);
222 | this._panel.webview.postMessage({
223 | command: 'setValueDataDone',
224 | key: message.key,
225 | name: message.name,
226 | newData
227 | });
228 | } catch (e) {
229 | vscode.window.showErrorMessage(e.message);
230 | }
231 | break;
232 |
233 | case 'createValue':
234 | try {
235 | const newData = regUtils.createValue(
236 | message.key, message.name, message.type, message.data);
237 | this._panel.webview.postMessage({
238 | command: 'createValueDone',
239 | key: message.key,
240 | name: message.name,
241 | type: message.type,
242 | data: newData
243 | });
244 | } catch (e) {
245 | vscode.window.showErrorMessage(e.message);
246 | }
247 | break;
248 |
249 | case 'deleteValue':
250 | try {
251 | const existed = regUtils.deleteValue(
252 | message.key, message.name);
253 | this._panel.webview.postMessage({
254 | command: 'deleteValueDone',
255 | key: message.key,
256 | name: message.name
257 | });
258 |
259 | if (!existed) {
260 | vscode.window.showErrorMessage('Value no longer exists, removed from list');
261 | }
262 | } catch (e) {
263 | vscode.window.showErrorMessage(e.message);
264 | }
265 | break;
266 | }
267 | },
268 | null,
269 | this._disposables
270 | );
271 | }
272 |
273 | public dispose() {
274 | // Clean up our resources.
275 | this._panel.dispose();
276 |
277 | while (this._disposables.length) {
278 | const x = this._disposables.pop();
279 | if (x) {
280 | x.dispose();
281 | }
282 | }
283 | }
284 |
285 | private _getHtmlForWebview(webview: vscode.Webview) {
286 | const webviewPathOnDisk = baseDebugReactUiPath
287 | ? vscode.Uri.file(baseDebugReactUiPath)
288 | : vscode.Uri.joinPath(this._extensionUri, 'webview');
289 |
290 | const baseWebviewUri = webview.asWebviewUri(webviewPathOnDisk);
291 | let html = fs.readFileSync(vscode.Uri.joinPath(webviewPathOnDisk, 'index.html').fsPath, 'utf8');
292 |
293 | html = html.replace('', `
294 |
295 |
297 | `);
298 |
299 | const locale = JSON.parse(process.env.VSCODE_NLS_CONFIG ?? '{}').locale;
300 | if (locale) {
301 | html = html.replace('', ``);
302 | }
303 |
304 | return html;
305 | }
306 | }
307 |
--------------------------------------------------------------------------------
/src/regUtils.ts:
--------------------------------------------------------------------------------
1 | import * as reg from 'native-reg';
2 |
3 | function splitKeyPath(keyPath: string) {
4 | let i = keyPath.indexOf('\\');
5 | if (i === -1) {
6 | i = keyPath.length;
7 | }
8 | let rootKey;
9 | switch (keyPath.slice(0, i).toUpperCase()) {
10 | case 'HKEY_CLASSES_ROOT':
11 | rootKey = reg.HKCR;
12 | break;
13 | case 'HKEY_CURRENT_USER':
14 | rootKey = reg.HKCU;
15 | break;
16 | case 'HKEY_LOCAL_MACHINE':
17 | rootKey = reg.HKLM;
18 | break;
19 | case 'HKEY_USERS':
20 | rootKey = reg.HKU;
21 | break;
22 | case 'HKEY_CURRENT_CONFIG':
23 | rootKey = reg.HKEY.CURRENT_CONFIG;
24 | break;
25 | default:
26 | throw new Error('Unsupported registry path');
27 | }
28 | return {
29 | rootKey,
30 | subKey: keyPath.slice(i + 1)
31 | };
32 | }
33 |
34 | function typeToString(type: reg.ValueType) {
35 | let str = reg.ValueType[type];
36 | if (str === undefined) {
37 | return '0x' + type.toString(16);
38 | }
39 |
40 | switch (str) {
41 | case 'DWORD_LITTLE_ENDIAN':
42 | str = 'DWORD';
43 | break;
44 |
45 | case 'QWORD_LITTLE_ENDIAN':
46 | str = 'QWORD';
47 | break;
48 |
49 | default:
50 | break;
51 | }
52 |
53 | return 'REG_' + str;
54 | }
55 |
56 | function myParseValue(valueRaw: reg.Value) {
57 | switch (valueRaw.type) {
58 | case reg.ValueType.BINARY:
59 | default:
60 | return valueRaw.toString('hex').replace(/(..)/g, '$1 ').trim();
61 |
62 | case reg.ValueType.MULTI_SZ:
63 | return (reg.parseValue(valueRaw) as string[]).join(', ');
64 |
65 | case reg.ValueType.DWORD:
66 | return reg.parseValue(valueRaw) as number;
67 |
68 | case reg.ValueType.QWORD:
69 | return (reg.parseValue(valueRaw) as bigint).toString();
70 |
71 | case reg.ValueType.SZ:
72 | case reg.ValueType.EXPAND_SZ:
73 | return reg.parseValue(valueRaw) as string;
74 | }
75 | }
76 |
77 | function myValueToRawData(data: string | number, type: reg.ValueType) {
78 | switch (type) {
79 | case reg.ValueType.BINARY:
80 | default:
81 | return Buffer.from((data as string).replace(/\s/gm, ''), 'hex');
82 |
83 | case reg.ValueType.MULTI_SZ:
84 | return reg.formatMultiString(
85 | (data as string).split(',').map(x => x.trim()).filter(x => x !== ''));
86 |
87 | case reg.ValueType.DWORD:
88 | return reg.formatDWORD(data as number);
89 |
90 | case reg.ValueType.QWORD:
91 | return reg.formatQWORD(BigInt(data));
92 |
93 | case reg.ValueType.SZ:
94 | case reg.ValueType.EXPAND_SZ:
95 | return reg.formatString(data as string);
96 | }
97 | }
98 |
99 | function getSubKeysIntrenal(rootKey: reg.HKEY, subKey: string) {
100 | const key = reg.openKey(
101 | rootKey,
102 | subKey,
103 | reg.Access.QUERY_VALUE | reg.Access.ENUMERATE_SUB_KEYS);
104 | if (!key) {
105 | throw new Error('Registry key doesn\'t exist');
106 | }
107 |
108 | try {
109 | return reg.enumKeyNames(key).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
110 | } finally {
111 | reg.closeKey(key);
112 | }
113 | }
114 |
115 | export function getSubKeys(keyPath: string) {
116 | const { rootKey, subKey } = splitKeyPath(keyPath);
117 | return getSubKeysIntrenal(rootKey, subKey);
118 | }
119 |
120 | export function getKeyTree(keyPath: string) {
121 | type Tree = {
122 | name: string;
123 | children?: Tree;
124 | }[]
125 |
126 | const { rootKey, subKey } = splitKeyPath(keyPath);
127 | const rootKeyName = 'HKEY_' + reg.HKEY[rootKey];
128 | const keyPathParts = subKey === '' ? [] : subKey.split('\\');
129 |
130 | const tree: Tree = [{
131 | name: rootKeyName,
132 | children: []
133 | }];
134 | let treeIter = tree[0];
135 |
136 | let subKeyIter = '';
137 | for (const keyPathPart of [''].concat(keyPathParts)) {
138 | if (keyPathPart !== '') {
139 | const next = treeIter.children?.find(x => x.name.toLowerCase() === keyPathPart.toLowerCase());
140 | if (!next) {
141 | break;
142 | }
143 |
144 | if (subKeyIter !== '') {
145 | subKeyIter += '\\';
146 | }
147 |
148 | subKeyIter += next.name;
149 | treeIter = next;
150 | }
151 |
152 | const children = getSubKeysIntrenal(rootKey, subKeyIter).map(x => ({
153 | name: x,
154 | children: []
155 | }));
156 |
157 | treeIter.children = children.length > 0 ? children : undefined;
158 | }
159 |
160 | let retrievedKey = rootKeyName;
161 | if (subKeyIter !== '') {
162 | retrievedKey += '\\' + subKeyIter;
163 | }
164 |
165 | return {
166 | retrievedKey,
167 | tree
168 | };
169 | }
170 |
171 | export function createKey(keyPath: string) {
172 | const { rootKey, subKey } = splitKeyPath(keyPath);
173 |
174 | let key = reg.openKey(rootKey, subKey, reg.Access.QUERY_VALUE);
175 | if (key) {
176 | reg.closeKey(key);
177 | throw new Error('Registry key already exists');
178 | }
179 |
180 | key = reg.createKey(rootKey, subKey, 0);
181 | reg.closeKey(key);
182 | }
183 |
184 | export function renameKey(keyPath: string, newSubKey: string) {
185 | const { rootKey, subKey } = splitKeyPath(keyPath);
186 |
187 | const key = reg.openKey(
188 | rootKey,
189 | subKey,
190 | reg.Access.WRITE);
191 | if (!key) {
192 | throw new Error('Registry key doesn\'t exist');
193 | }
194 |
195 | try {
196 | reg.renameKey(key, null, newSubKey);
197 | } finally {
198 | reg.closeKey(key);
199 | }
200 | }
201 |
202 | export function deleteTree(keyPath: string) {
203 | const { rootKey, subKey } = splitKeyPath(keyPath);
204 |
205 | const key = reg.openKey(
206 | rootKey,
207 | subKey,
208 | reg.Access.QUERY_VALUE | reg.Access.SET_VALUE | reg.Access.DELETE | reg.Access.ENUMERATE_SUB_KEYS);
209 | if (!key) {
210 | return false;
211 | }
212 |
213 | try {
214 | if (!reg.deleteTree(key, null)) {
215 | return false;
216 | }
217 |
218 | return reg.deleteKey(key, '');
219 | } finally {
220 | reg.closeKey(key);
221 | }
222 | }
223 |
224 | export function getKeyValues(keyPath: string) {
225 | const { rootKey, subKey } = splitKeyPath(keyPath);
226 |
227 | const key = reg.openKey(
228 | rootKey,
229 | subKey,
230 | reg.Access.QUERY_VALUE);
231 | if (!key) {
232 | throw new Error('Registry key doesn\'t exist');
233 | }
234 |
235 | try {
236 | const values = reg.enumValueNames(key).sort((a, b) => {
237 | // Place empty value (Default) first.
238 | if (a.length === 0 && b.length > 0) {
239 | return -1;
240 | }
241 |
242 | if (b.length === 0 && a.length > 0) {
243 | return 1;
244 | }
245 |
246 | return a.toLowerCase().localeCompare(b.toLowerCase());
247 | });
248 | return values.map(valueName => {
249 | let type: string;
250 | let value: string | number;
251 |
252 | const valueRaw = reg.getValueRaw(key, null, valueName, reg.GetValueFlags.NO_EXPAND);
253 | if (valueRaw) {
254 | type = typeToString(valueRaw.type);
255 | value = myParseValue(valueRaw);
256 | } else {
257 | type = '(query error)';
258 | value = '(query error)';
259 | }
260 |
261 | return {
262 | name: valueName,
263 | type,
264 | value
265 | };
266 | });
267 | } finally {
268 | reg.closeKey(key);
269 | }
270 | }
271 |
272 | export function renameValue(keyPath: string, oldName: string, newName: string) {
273 | const { rootKey, subKey } = splitKeyPath(keyPath);
274 |
275 | const key = reg.openKey(
276 | rootKey,
277 | subKey,
278 | reg.Access.QUERY_VALUE | reg.Access.SET_VALUE);
279 | if (!key) {
280 | throw new Error('Registry key doesn\'t exist');
281 | }
282 |
283 | try {
284 | if (reg.getValueRaw(key, null, newName, reg.GetValueFlags.NO_EXPAND)) {
285 | throw new Error('Target name already exists');
286 | }
287 |
288 | const valueRaw = reg.getValueRaw(key, null, oldName, reg.GetValueFlags.NO_EXPAND);
289 | if (!valueRaw) {
290 | throw new Error('Registry value doesn\'t exist');
291 | }
292 |
293 | reg.setValueRaw(key, newName, valueRaw.type, valueRaw);
294 | reg.deleteValue(key, oldName);
295 | } finally {
296 | reg.closeKey(key);
297 | }
298 | }
299 |
300 | export function setValueData(keyPath: string, name: string, type: string, data: string | number) {
301 | const { rootKey, subKey } = splitKeyPath(keyPath);
302 |
303 | const key = reg.openKey(
304 | rootKey,
305 | subKey,
306 | reg.Access.QUERY_VALUE | reg.Access.SET_VALUE);
307 | if (!key) {
308 | throw new Error('Registry key doesn\'t exist');
309 | }
310 |
311 | try {
312 | const valueRaw = reg.getValueRaw(key, null, name, reg.GetValueFlags.NO_EXPAND);
313 | if (!valueRaw) {
314 | throw new Error('Registry value doesn\'t exist');
315 | }
316 |
317 | if (type !== typeToString(valueRaw.type)) {
318 | throw new Error('Registry value type doesn\'t match');
319 | }
320 |
321 | const dataRaw = myValueToRawData(data, valueRaw.type);
322 | reg.setValueRaw(key, name, valueRaw.type, dataRaw);
323 | return myParseValue(Object.assign(dataRaw, { type: valueRaw.type }));
324 | } finally {
325 | reg.closeKey(key);
326 | }
327 | }
328 |
329 | export function createValue(keyPath: string, name: string, type: string, data: string | number) {
330 | const { rootKey, subKey } = splitKeyPath(keyPath);
331 |
332 | const key = reg.openKey(
333 | rootKey,
334 | subKey,
335 | reg.Access.QUERY_VALUE | reg.Access.SET_VALUE);
336 | if (!key) {
337 | throw new Error('Registry key doesn\'t exist');
338 | }
339 |
340 | try {
341 | const valueRaw = reg.getValueRaw(key, null, name, reg.GetValueFlags.NO_EXPAND);
342 | if (valueRaw) {
343 | throw new Error('Registry value already exists');
344 | }
345 |
346 | const regType = reg.ValueType[type.toUpperCase().replace(/^REG_/, '') as keyof typeof reg.ValueType];
347 | if (regType === undefined) {
348 | throw new Error('Unsupported registry value type');
349 | }
350 |
351 | const dataRaw = myValueToRawData(data, regType);
352 | reg.setValueRaw(key, name, regType, dataRaw);
353 | return myParseValue(Object.assign(dataRaw, { type: regType }));
354 | } finally {
355 | reg.closeKey(key);
356 | }
357 | }
358 |
359 | export function deleteValue(keyPath: string, name: string) {
360 | const { rootKey, subKey } = splitKeyPath(keyPath);
361 |
362 | const key = reg.openKey(
363 | rootKey,
364 | subKey,
365 | reg.Access.QUERY_VALUE | reg.Access.SET_VALUE);
366 | if (!key) {
367 | throw new Error('Registry key doesn\'t exist');
368 | }
369 |
370 | try {
371 | return reg.deleteValue(key, name);
372 | } finally {
373 | reg.closeKey(key);
374 | }
375 | }
376 |
--------------------------------------------------------------------------------
/webview/static/js/runtime-main.872e7406.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX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AAEC,MAAO,WAE7DzE,OAAOmE,eAAe7C,EAAS,aAAc,CAAEmD,OAAO,KAQvDvD,EAAoBwD,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQvD,EAAoBuD,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAK7E,OAAO8E,OAAO,MAGvB,GAFA5D,EAAoBoD,EAAEO,GACtB7E,OAAOmE,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOvD,EAAoB8C,EAAEa,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIR3D,EAAoB+D,EAAI,SAAS1D,GAChC,IAAI0C,EAAS1C,GAAUA,EAAOqD,WAC7B,WAAwB,OAAOrD,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoB8C,EAAEC,EAAQ,IAAKA,GAC5BA,GAIR/C,EAAoBgD,EAAI,SAASgB,EAAQC,GAAY,OAAOnF,OAAOC,UAAUC,eAAeC,KAAK+E,EAAQC,IAGzGjE,EAAoBuB,EAAI,KAGxBvB,EAAoBkE,GAAK,SAASC,GAA2B,MAApBC,QAAQ3C,MAAM0C,GAAYA,GAEnE,IAAIE,EAAaC,KAA0C,oCAAIA,KAA0C,qCAAK,GAC1GC,EAAmBF,EAAWlF,KAAK2E,KAAKO,GAC5CA,EAAWlF,KAAOf,EAClBiG,EAAaA,EAAWG,QACxB,IAAI,IAAI7F,EAAI,EAAGA,EAAI0F,EAAWxF,OAAQF,IAAKP,EAAqBiG,EAAW1F,IAC3E,IAAIU,EAAsBkF,EAI1B9E,I","file":"static/js/runtime-main.872e7406.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/js/\" + ({}[chunkId]||chunkId) + \".\" + {\"3\":\"0a391345\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = this[\"webpackJsonpvscode_regedit_react_ui\"] = this[\"webpackJsonpvscode_regedit_react_ui\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
--------------------------------------------------------------------------------
/webview/static/js/main.375bc23e.chunk.js:
--------------------------------------------------------------------------------
1 | (this.webpackJsonpvscode_regedit_react_ui=this.webpackJsonpvscode_regedit_react_ui||[]).push([[0],{276:function(e,n,t){},496:function(e,n,t){},497:function(e,n,t){"use strict";t.r(n);var a=t(4),r=t(0),c=t.n(r),l=t(57),o=t.n(l),i=(t(276),t(13)),u=t(24),s=t(25),d=t(513),b=t(512),j=t(252),v=t(507),O="undefined"!==typeof acquireVsCodeApi?acquireVsCodeApi():null;function p(){var e=Object(u.a)(["\n margin-top: 5px;\n"]);return p=function(){return e},e}var h=Object(s.a)(v.a)(p());var f=function(){var e=Object(b.a)().t,n=Object(r.useState)(""),t=Object(i.a)(n,2),c=t[0],l=t[1],o=Object(r.useCallback)((function(e){var n=function(e){O.setState({address:e}),O.postMessage({command:"setTitle",title:e.replace(/^.*\\/,"")}),l(e)},t=e.data;switch(t.command){case"setKeyValues":n(t.key);break;case"setKeyTreeAndValues":n(t.retrievedKey)}}),[]),u=Object(r.useCallback)((function(e){var n=e.trim();return(n=(n=(n=(n=(n=(n=n.replace(/^Computer\\/i,"")).replace(/^HKCR(\\|$)/i,"HKEY_CLASSES_ROOT$1")).replace(/^HKCU(\\|$)/i,"HKEY_CURRENT_USER$1")).replace(/^HKLM(\\|$)/i,"HKEY_LOCAL_MACHINE$1")).replace(/^HKU(\\|$)/i,"HKEY_USERS$1")).replace(/^HKCC(\\|$)/i,"HKEY_CURRENT_CONFIG$1")).match(/^(HKEY_CLASSES_ROOT|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKEY_CURRENT_CONFIG)(\\|$)/i)?n=(n=n.replace(/\\+$/,"")).replace(/\\{2,}/g,"\\"):null}),[]);return Object(d.a)("message",o),Object(a.jsx)(h,{value:c,onChange:function(e){return l(e)},onKeyDown:function(n){if("Enter"===n.key){var t=u(c);t?O.postMessage({command:"getKeyTreeAndValues",key:t}):O.postMessage({command:"alert",text:e("addressBar.invalidRegistryPath")})}},placeholder:e("addressBar.registryPath")})},y=t(76),E=t(74),g=t(104),m=t(72),_=t(49),R=t(514),x=t(506),C=t(60),S=t(508);function k(){var e=Object(u.a)(["\n .rs-tree-node-label-content {\n // No word wrapping for long names.\n white-space: nowrap;\n }\n\n .ReactVirtualized__Grid {\n // Allow to scroll horizontally.\n overflow: auto !important;\n }\n\n .ReactVirtualized__Grid__innerScrollContainer {\n // Allow to scroll horizontally.\n position: unset !important;\n }\n\n .rs-tree-nodes {\n // Fix resizing.\n height: 100%;\n }\n\n .rs-tree-node-label-content {\n // Remove padding, move it to child div for mouse events (see below).\n padding: 0 !important;\n }\n\n .rs-tree-node-label-content > div {\n // Steal padding from the parent for mouse events (see above).\n padding: 6px 12px 6px 8px;\n }\n"]);return k=function(){return e},e}function K(){var e=Object(u.a)(["\n visibility: ",";\n opacity: ",";\n transition: visibility 0s, opacity 0.5s linear;\n position: absolute !important;\n right: 20px;\n bottom: 20px;\n z-index: 1;\n"]);return K=function(){return e},e}var w=Object(s.a)(R.a)(K(),(function(e){return e.$visible?"visible":"hidden"}),(function(e){return e.$visible?1:0}));function M(e){var n=Object(b.a)().t,t=Object(r.useState)(!1),c=Object(i.a)(t,2),l=c[0],o=c[1],u=Object(r.useState)(""),s=Object(i.a)(u,2),d=s[0],j=s[1],p=function(e){return""!==e&&!e.includes("\\")},h=function(){O.postMessage({command:"createKey",key:e.currentRegKey+"\\"+d})};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(w,{onClick:function(){j(""),o(!0)},icon:Object(a.jsx)(m.a,{icon:_.d}),color:"blue",circle:!0,$visible:e.hovered&&!l}),Object(a.jsxs)(x.a,{backdrop:!0,size:"xs",open:l,onClose:function(){return o(!1)},onClick:function(e){return e.stopPropagation()},onDoubleClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()},children:[Object(a.jsx)(x.a.Title,{children:n("keysTreeView.newKeyModal.title")}),Object(a.jsx)(x.a.Body,{children:Object(a.jsx)(v.a,{value:d,onChange:function(e){return j(e)},onKeyDown:function(e){"Enter"===e.key&&p(d)&&(h(),o(!1))},placeholder:n("keysTreeView.newKeyModal.newKeyName")})}),Object(a.jsxs)(x.a.Footer,{children:[Object(a.jsx)(C.a,{onClick:function(){h(),o(!1)},appearance:"primary",disabled:!p(d),children:n("keysTreeView.newKeyModal.create")}),Object(a.jsx)(C.a,{onClick:function(){return o(!1)},appearance:"subtle",children:n("keysTreeView.newKeyModal.cancel")})]})]})]})}var D=s.a.div(k());function L(e){var n=e.nodeLabel,t=e.nodeRegKey,c=e.nodeIsSelected,l=Object(E.a)(e,["nodeLabel","nodeRegKey","nodeIsSelected"]),o=Object(b.a)().t,u=Object(r.useState)(null),s=Object(i.a)(u,2),d=s[0],j=s[1],p=function(){var e=d;""!==e&&e!==n&&O.postMessage({command:"renameKey",key:t,newSubKey:e})},h=Object(r.useState)(!1),f=Object(i.a)(h,2),y=f[0],g=f[1];return Object(a.jsxs)("div",{onClick:function(){c&&t.includes("\\")&&j(n)},onMouseDown:function(e){1===e.button&&t.includes("\\")&&(g(!0),e.preventDefault())},children:[null!==d?Object(a.jsx)(v.a,{size:"xs",autoFocus:!0,value:d,onChange:function(e){return j(e)},onKeyDown:function(e){"Enter"===e.key?(j(null),p()):"Escape"===e.key&&j(null)},placeholder:o("keysTreeView.keyName"),onBlur:function(){j(null),p()}}):l.children,Object(a.jsxs)(x.a,{backdrop:!0,size:"xs",open:y,onClose:function(){return g(!1)},onClick:function(e){return e.stopPropagation()},onDoubleClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()},children:[Object(a.jsx)(x.a.Title,{children:o("keysTreeView.confirmDeleteKeyModal.title")}),Object(a.jsx)(x.a.Body,{children:o("keysTreeView.confirmDeleteKeyModal.text",{key:n})}),Object(a.jsxs)(x.a.Footer,{children:[Object(a.jsx)(C.a,{onClick:function(){O.postMessage({command:"deleteKey",key:t}),g(!1)},appearance:"primary",children:o("global.yes")}),Object(a.jsx)(C.a,{onClick:function(){return g(!1)},appearance:"subtle",children:o("global.no")})]})]})]})}var N=function(){var e=Object(b.a)().t,n=Object(r.useState)(0),t=Object(i.a)(n,2),c=t[0],l=t[1],o=Object(r.useState)([{label:"Computer",value:"",children:[{label:"HKEY_CLASSES_ROOT",value:"HKEY_CLASSES_ROOT",children:[]},{label:"HKEY_CURRENT_USER",value:"HKEY_CURRENT_USER",children:[]},{label:"HKEY_LOCAL_MACHINE",value:"HKEY_LOCAL_MACHINE",children:[]},{label:"HKEY_USERS",value:"HKEY_USERS",children:[]},{label:"HKEY_CURRENT_CONFIG",value:"HKEY_CURRENT_CONFIG",children:[]}]}]),u=Object(i.a)(o,2),s=u[0],j=u[1],v=Object(r.useState)(""),p=Object(i.a)(v,2),h=p[0],f=p[1],E=Object(r.useCallback)((function(e){var n=[{label:"Computer",value:"",children:[{label:"HKEY_CLASSES_ROOT",value:"HKEY_CLASSES_ROOT",children:[]},{label:"HKEY_CURRENT_USER",value:"HKEY_CURRENT_USER",children:[]},{label:"HKEY_LOCAL_MACHINE",value:"HKEY_LOCAL_MACHINE",children:[]},{label:"HKEY_USERS",value:"HKEY_USERS",children:[]},{label:"HKEY_CURRENT_CONFIG",value:"HKEY_CURRENT_CONFIG",children:[]}]}];if(e.tree.length>0){var t=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return n.map((function(n){return{label:n.name,value:t+n.name,children:n.children&&e(n.children,t+n.name+"\\")}}))}(e.tree),a=t[0].value,r=t[0].children;n[0].children.find((function(e){return e.value===a})).children=r}j(n),f(e.retrievedKey),l(c+1)}),[c]),m=Object(r.useCallback)((function(e){var n=e.key,t=0===e.subKeys.length?void 0:e.subKeys.map((function(e){return{label:e,value:n+"\\"+e,children:[]}})),a=function e(a){var r,c=[],l=Object(y.a)(a);try{for(l.s();!(r=l.n()).done;){var o=r.value;o.value!==n?""===o.value||n.startsWith(o.value+"\\")?c.push(Object.assign({},o,{children:o.children&&e(o.children)})):c.push(o):c.push(Object.assign({},o,{children:t}))}}catch(i){l.e(i)}finally{l.f()}return c}(s);j(a)}),[s]),_=Object(r.useCallback)((function(e){var n=e.key,t=function e(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=[],l=!1,o=Object(y.a)(t||[]);try{for(o.s();!(a=o.n()).done;){var i=a.value;if(i.value===n)l=!0;else if(""===i.value||n.startsWith(i.value+"\\")){l=!0,c.push(Object.assign({},i,{children:e(i.children,i.value)}));continue}c.push(i)}}catch(s){o.e(s)}finally{o.f()}if(!l&&""!==r&&(void 0===t||t.length>0)){var u=n.slice((r+"\\").length).replace(/\\.*$/,"");c.push({label:u,value:r+"\\"+u,children:void 0})}return c}(s);j(t)}),[s]),R=Object(r.useCallback)((function(e){var n=e.key,t=e.newSubKey,a=n.replace(/\\[^\\]+$/,"\\"+t);(h===n||h.startsWith(n+"\\"))&&(f(a),O.postMessage({command:"getKeyValues",key:a}));var r=function e(r){var c,l=[],o=Object(y.a)(r);try{for(o.s();!(c=o.n()).done;){var i=c.value;i.value===n||i.value.startsWith(n+"\\")?l.push(Object.assign({},i,{label:i.value===n?t:i.label,value:a+i.value.slice(n.length),children:i.children&&e(i.children)})):""===i.value||n.startsWith(i.value+"\\")?l.push(Object.assign({},i,{children:i.children&&e(i.children)})):l.push(i)}}catch(u){o.e(u)}finally{o.f()}return l}(s);j(r)}),[s,h]),x=Object(r.useCallback)((function(e){var n=e.key;if(h===n||h.startsWith(n+"\\")){var t=n.replace(/\\[^\\]+$/,"");f(t),O.postMessage({command:"getKeyValues",key:t})}var a=function e(t){var a,r=[],c=Object(y.a)(t);try{for(c.s();!(a=c.n()).done;){var l=a.value;l.value!==n&&(""===l.value||n.startsWith(l.value+"\\")?r.push(Object.assign({},l,{children:l.children&&e(l.children)})):r.push(l))}}catch(o){c.e(o)}finally{c.f()}return r.length>0?r:void 0}(s);j(a)}),[s,h]),C=Object(r.useCallback)((function(e){var n=e.data;switch(n.command){case"setKeyTreeAndValues":E(n);break;case"setSubKeys":m(n);break;case"createKeyDone":_(n);break;case"renameKeyDone":R(n);break;case"deleteKeyDone":x(n)}}),[E,m,_,R,x]);Object(d.a)("message",C);var k=Object(r.useState)(!1),K=Object(i.a)(k,2),w=K[0],N=K[1];return Object(a.jsx)(g.a,{children:function(n){var t=n.height,r=n.width;return Object(a.jsxs)(D,{onMouseEnter:function(){return N(!0)},onMouseLeave:function(){return N(!1)},children:[Object(a.jsx)(M,{currentRegKey:h,hovered:w}),[c].map((function(n){return Object(a.jsx)(S.a,{virtualized:!0,defaultExpandAll:!0,data:s,value:h,height:t,style:{maxHeight:t,width:r},renderTreeNode:function(n){return Object(a.jsx)(L,{nodeLabel:n.label,nodeRegKey:n.value,nodeIsSelected:""!==n.value&&n.value===h,children:""===n.value?e("keysTreeView.computer"):n.label})},onExpand:function(e,n){n.children&&0===n.children.length&&O.postMessage({command:"getSubKeys",key:n.value})},onSelect:function(e,n){""!==n&&n!==h&&(f(n),O.postMessage({command:"getKeyValues",key:n})),e.children&&0===e.children.length&&O.postMessage({command:"getSubKeys",key:e.value})}},n)}))]})}})},T=t(78),V=t(509),H=t(505);function U(){var e=Object(u.a)(["\n overflow: hidden;\n text-overflow: ellipsis;\n"]);return U=function(){return e},e}function G(){var e=Object(u.a)(["\n .rs-table-cell-content {\n display: flex;\n align-items: center;\n }\n"]);return G=function(){return e},e}function A(){var e=Object(u.a)(["\n visibility: ",";\n opacity: ",";\n transition: visibility 0s, opacity 0.5s linear;\n position: absolute !important;\n left: 20px;\n bottom: 20px;\n z-index: 1;\n"]);return A=function(){return e},e}var I=Object(s.a)(R.a)(A(),(function(e){return e.$visible?"visible":"hidden"}),(function(e){return e.$visible?1:0}));function Y(e){var n=Object(b.a)().t,t=Object(r.useState)(!1),c=Object(i.a)(t,2),l=c[0],o=c[1],u=Object(r.useState)(""),s=Object(i.a)(u,2),d=s[0],j=s[1],p=Object(r.useState)(""),h=Object(i.a)(p,2),f=h[0],y=h[1],E=Object(r.useState)(""),g=Object(i.a)(E,2),R=g[0],S=g[1],k=function(){return""!==f},K=function(){O.postMessage({command:"createValue",key:e.currentRegKey,name:d,type:f,data:R})},w=function(e){"Enter"===e.key&&k()&&(K(),o(!1))};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(I,{onClick:function(){j(""),y(""),S(""),o(!0)},icon:Object(a.jsx)(m.a,{icon:_.d}),color:"blue",circle:!0,$visible:e.hovered&&!l}),Object(a.jsxs)(x.a,{backdrop:!0,size:"xs",open:l,onClose:function(){return o(!1)},onClick:function(e){return e.stopPropagation()},onDoubleClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()},children:[Object(a.jsx)(x.a.Title,{children:n("valuesList.newValueModal.title")}),Object(a.jsxs)(x.a.Body,{children:[Object(a.jsx)(v.a,{value:d,onChange:function(e){return j(e)},onKeyDown:w,placeholder:n("valuesList.newValueModal.newValueName")}),Object(a.jsx)(V.a,{value:f,onChange:function(e){return y(e)},data:[{label:n("valuesList.newValueModal.types.dword")+" (REG_DWORD)",value:"REG_DWORD"},{label:n("valuesList.newValueModal.types.string")+" (REG_SZ)",value:"REG_SZ"},{label:n("valuesList.newValueModal.types.expandableString")+" (REG_EXPAND_SZ)",value:"REG_EXPAND_SZ"},{label:n("valuesList.newValueModal.types.multiString")+" (REG_MULTI_SZ)",value:"REG_MULTI_SZ"},{label:n("valuesList.newValueModal.types.binaryData")+" (REG_BINARY)",value:"REG_BINARY"},{label:"REG_NONE",value:"REG_NONE"},{label:"REG_DWORD_BIG_ENDIAN",value:"REG_DWORD_BIG_ENDIAN"},{label:"REG_LINK",value:"REG_LINK"},{label:"REG_RESOURCE_LIST",value:"REG_RESOURCE_LIST"},{label:"REG_FULL_RESOURCE_DESCRIPTOR",value:"REG_FULL_RESOURCE_DESCRIPTOR"},{label:"REG_RESOURCE_REQUIREMENTS_LIST",value:"REG_RESOURCE_REQUIREMENTS_LIST"},{label:"REG_QWORD",value:"REG_QWORD"}],defaultValue:"",searchable:!1,cleanable:!1,style:{width:"100%",marginTop:"5px"},placeholder:n("valuesList.newValueModal.selectValueType")}),Object(a.jsx)(v.a,{value:R,onChange:function(e){return S(e)},onKeyDown:w,placeholder:n("valuesList.newValueModal.insertValueData"),style:{marginTop:"5px"}})]}),Object(a.jsxs)(x.a.Footer,{children:[Object(a.jsx)(C.a,{onClick:function(){K(),o(!1)},appearance:"primary",disabled:!k(),children:n("valuesList.newValueModal.create")}),Object(a.jsx)(C.a,{onClick:function(){return o(!1)},appearance:"subtle",children:n("valuesList.newValueModal.cancel")})]})]})]})}var P=Object(s.a)(H.a.Cell)(G()),$=s.a.div(U());function F(e){var n=e.rowData,t=e.dataKey,c=e.currentKey,l=Object(E.a)(e,["rowData","dataKey","currentKey"]),o=Object(b.a)().t,u=_.b,s="var(--vscode-charts-orange)";switch(n.type){case"REG_DWORD":case"REG_QWORD":u=_.a,s="var(--vscode-charts-green)";break;case"REG_SZ":case"REG_EXPAND_SZ":case"REG_MULTI_SZ":u=_.c,s="var(--vscode-charts-purple)"}var d=Object(r.useState)(null),j=Object(i.a)(d,2),p=j[0],h=j[1],f=function(){var e=n.name,t=p;t!==e&&O.postMessage({command:"renameValue",key:c,oldName:e,newName:t})},y=Object(r.useState)(!1),g=Object(i.a)(y,2),R=g[0],S=g[1],k=n[t]||o("valuesList.defaultName");return Object(a.jsxs)(P,Object(T.a)(Object(T.a)({},l),{},{onClick:function(){return h(n[t])},onMouseDown:function(e){1===e.button&&S(!0)},children:[Object(a.jsx)(m.a,{icon:u,style:{color:s,marginRight:"8px"}}),null!==p?Object(a.jsx)(v.a,{autoFocus:!0,value:p,onChange:function(e){return h(e)},onKeyDown:function(e){"Enter"===e.key?(h(null),f()):"Escape"===e.key&&h(null)},placeholder:o("valuesList.columnNames.name"),onBlur:function(){h(null),f()}}):Object(a.jsx)($,{children:k}),Object(a.jsxs)(x.a,{backdrop:!0,size:"xs",open:R,onClose:function(){return S(!1)},onClick:function(e){return e.stopPropagation()},onDoubleClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onMouseUp:function(e){return e.stopPropagation()},children:[Object(a.jsx)(x.a.Title,{children:o("valuesList.confirmDeleteValueModal.title")}),Object(a.jsx)(x.a.Body,{children:o("valuesList.confirmDeleteValueModal.text",{value:k})}),Object(a.jsxs)(x.a.Footer,{children:[Object(a.jsx)(C.a,{onClick:function(){O.postMessage({command:"deleteValue",key:c,name:n.name}),S(!1)},appearance:"primary",children:o("global.yes")}),Object(a.jsx)(C.a,{onClick:function(){return S(!1)},appearance:"subtle",children:o("global.no")})]})]})]}))}function z(e){var n=e.rowData,t=e.dataKey,c=e.currentKey,l=Object(E.a)(e,["rowData","dataKey","currentKey"]),o=Object(b.a)().t,u=Object(r.useState)(null),s=Object(i.a)(u,2),d=s[0],j=s[1],p=function(){var e=n.value,t="number"===typeof e?parseInt(d):d;e!==t&&O.postMessage({command:"setValueData",key:c,type:n.type,name:n.name,data:t})};return Object(a.jsx)(P,Object(T.a)(Object(T.a)({},l),{},{onClick:function(){return j(n[t])},children:null!==d?Object(a.jsx)(v.a,{autoFocus:!0,value:d,onChange:function(e){return j(e)},onKeyDown:function(e){"Enter"===e.key?(j(null),p()):"Escape"===e.key&&j(null)},placeholder:o("valuesList.columnNames.value"),onBlur:function(){j(null),p()}}):Object(a.jsx)($,{children:"number"===typeof n[t]?"0x"+n[t].toString(16).padStart(8,"0")+" ("+n[t].toString()+")":n[t]})}))}var B=function(){var e=Object(b.a)().t,n=Object(r.useState)([]),t=Object(i.a)(n,2),c=t[0],l=t[1],o=Object(r.useState)(""),u=Object(i.a)(o,2),s=u[0],j=u[1],v=Object(r.useCallback)((function(e){var n=e.data;switch(n.command){case"setKeyValues":l(n.values),j(n.key);break;case"setKeyTreeAndValues":l(n.values),j(n.retrievedKey);break;case"renameValueDone":if(n.key!==s)throw new Error("Expected data for ".concat(s,", got data for ").concat(n.key));l(c.map((function(e){return e.name===n.oldName?Object.assign({},e,{name:n.newName}):e})));break;case"createValueDone":if(n.key!==s)throw new Error("Expected data for ".concat(s,", got data for ").concat(n.key));l(c.concat([{name:n.name,type:n.type,value:n.data}]));break;case"setValueDataDone":if(n.key!==s)throw new Error("Expected data for ".concat(s,", got data for ").concat(n.key));l(c.map((function(e){return e.name===n.name?Object.assign({},e,{value:n.newData}):e})));break;case"deleteValueDone":if(n.key!==s)throw new Error("Expected data for ".concat(s,", got data for ").concat(n.key));l(c.filter((function(e){return e.name!==n.name})))}}),[s,c]);Object(d.a)("message",v);var O=Object(r.useState)(!1),p=Object(i.a)(O,2),h=p[0],f=p[1];return Object(a.jsx)(g.a,{children:function(n){var t=n.height,r=n.width;return Object(a.jsxs)("div",{onMouseEnter:function(){return f(!0)},onMouseLeave:function(){return f(!1)},children:[Object(a.jsx)(Y,{currentRegKey:s,hovered:h}),Object(a.jsxs)(H.a,{virtualized:!0,data:c,height:t,style:{width:r},children:[Object(a.jsxs)(H.a.Column,{width:200,resizable:!0,children:[Object(a.jsx)(H.a.HeaderCell,{children:e("valuesList.columnNames.name")}),Object(a.jsx)(F,{dataKey:"name",currentKey:s})]}),Object(a.jsxs)(H.a.Column,{width:150,resizable:!0,children:[Object(a.jsx)(H.a.HeaderCell,{children:e("valuesList.columnNames.type")}),Object(a.jsx)(H.a.Cell,{dataKey:"type"})]}),Object(a.jsxs)(H.a.Column,{width:300,resizable:!0,children:[Object(a.jsx)(H.a.HeaderCell,{children:e("valuesList.columnNames.value")}),Object(a.jsx)(z,{dataKey:"value",currentKey:s})]})]})]})}})};function W(){var e=Object(u.a)(["\n overflow: hidden;\n"]);return W=function(){return e},e}function Z(){var e=Object(u.a)(["\n display: flex;\n height: 100%;\n .gutter {\n cursor: ew-resize;\n padding: 0 5px;\n box-sizing: border-box;\n background-color: var(--vscode-panelSection-border);\n background-clip: content-box;\n }\n"]);return Z=function(){return e},e}function Q(){var e=Object(u.a)(["\n display: ",";\n flex-direction: column;\n height: 100vh;\n width: 100%;\n"]);return Q=function(){return e},e}var q=s.a.div(Q(),(function(e){return e.$hidden?"none":"flex"})),X=Object(s.a)(j.a)(Z()),J=s.a.div(W());var ee=function(){var e=Object(b.a)().ready,n=Object(r.useState)(!0),t=Object(i.a)(n,2),c=t[0],l=t[1];Object(r.useEffect)((function(){var e=!1;if(O){var n=O.getState();n&&n.address&&(O.postMessage({command:"getKeyTreeAndValues",key:n.address}),e=!0)}l(e)}),[]);var o=Object(r.useCallback)((function(e){switch(e.data.command){case"setKeyTreeAndValues":l(!1)}}),[]);return Object(d.a)("message",o),Object(a.jsxs)(q,{$hidden:c||!e,children:[Object(a.jsx)(f,{}),Object(a.jsxs)(X,{sizes:[25,75],cursor:"",gutterSize:11,snapOffset:0,children:[Object(a.jsx)(J,{children:Object(a.jsx)(N,{})}),Object(a.jsx)(J,{children:Object(a.jsx)(B,{})})]})]})};t(496);var ne=function(){return Object(a.jsx)(ee,{})},te=function(e){e&&e instanceof Function&&t.e(3).then(t.bind(null,515)).then((function(n){var t=n.getCLS,a=n.getFID,r=n.getFCP,c=n.getLCP,l=n.getTTFB;t(e),a(e),r(e),c(e),l(e)}))},ae=t(155),re=t(75),ce=t(250);ae.a.use(ce.a).use(re.e).init({lng:document.querySelector("body").getAttribute("data-locale"),fallbackLng:"en",interpolation:{escapeValue:!1},react:{useSuspense:!1},backend:{loadPath:"./locales/{{lng}}/{{ns}}.json"}});ae.a;o.a.render(Object(a.jsx)(c.a.StrictMode,{children:Object(a.jsx)(ne,{})}),document.getElementById("root")),te()}},[[497,1,2]]]);
2 | //# sourceMappingURL=main.375bc23e.chunk.js.map
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | VSCode Regedit - A registry editor inside VS Code
635 | Copyright (C) 2021 Michael Maltsev
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | VSCode Regedit Copyright (C) 2021 Michael Maltsev
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/webview/static/js/main.375bc23e.chunk.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["VsCodeApi.js","components/AddressBar.js","components/KeysTreeView.js","components/ValuesList.js","components/Regedit.js","App.js","reportWebVitals.js","i18n.js","index.js"],"names":["VsCodeApi","acquireVsCodeApi","StyledInput","styled","Input","AddressBar","t","useTranslation","useState","address","setAddress","onMessage","useCallback","event","setNewAddress","newAddress","setState","postMessage","command","title","replace","message","data","key","retrievedKey","normalizeAddress","userAddress","normalized","trim","match","useEvent","value","onChange","onKeyDown","normalizedAddress","text","placeholder","NewItemIconButton","IconButton","$visible","NewKeyIconButton","props","newKeyDialogOpen","setNewKeyDialogOpen","newKeyName","setNewKeyName","isValidKeyName","name","includes","postCreateKey","currentRegKey","onClick","icon","faPlus","color","circle","hovered","Modal","backdrop","size","open","onClose","stopPropagation","onDoubleClick","onMouseDown","onMouseUp","Title","Body","Footer","Button","appearance","disabled","TreeStyleWrapper","div","KeysTreeNode","nodeLabel","nodeRegKey","nodeIsSelected","editingValue","setEditingValue","applyRename","newName","newSubKey","deleteConfitmationOpen","setDeleteConfitmationOpen","button","preventDefault","autoFocus","onBlur","children","KeysTreeView","treeKey","setTreeKey","label","setData","treeValue","setTreeValue","onSetKeyTreeAndValues","newData","tree","length","mappedData","mapData","prefix","map","item","rootKey","rootChildren","find","x","onSetSubKeys","targetKey","subData","subKeys","undefined","copyRecursiveWithSubKeys","dataToCopy","startsWith","push","Object","assign","onCreateKeyDone","createdKey","copyRecursiveWithAdded","iterKey","foundNext","newValue","slice","onRenameKeyDone","oldKey","newKey","copyRecursiveWithRename","onDeleteKeyDone","deletedKey","copyRecursiveWithoutDeleted","setHovered","height","width","onMouseEnter","onMouseLeave","Tree","virtualized","defaultExpandAll","style","maxHeight","renderTreeNode","nodeData","onExpand","expandItemValues","activeNode","onSelect","NewValueIconButton","newValueDialogOpen","setNewValueDialogOpen","newValueName","setNewValueName","newValueType","setNewValueType","newValueData","setNewValueData","isValidValueData","postCreateValue","type","onInputKeyDown","SelectPicker","defaultValue","searchable","cleanable","marginTop","CustomTableCell","Table","Cell","CustomTableCellText","ValueNameCell","rowData","dataKey","currentKey","faDatabase","faCalculator","faFileAlt","oldName","valueName","marginRight","ValueDataCell","editingData","setEditingData","applySetData","oldData","parseInt","toString","padStart","ValuesList","setCurrentKey","values","Error","concat","filter","Column","resizable","HeaderCell","RegeditWrapper","$hidden","RegeditSplit","Split","RegeditSplitPanel","Regedit","ready","initialDataPending","setInitialDataPending","useEffect","pending","savedState","getState","sizes","cursor","gutterSize","snapOffset","App","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","i18n","use","Backend","initReactI18next","init","lng","document","querySelector","getAttribute","fallbackLng","interpolation","escapeValue","react","useSuspense","backend","loadPath","ReactDOM","render","StrictMode","getElementById"],"mappings":"wSAIeA,EAF+B,qBAArBC,iBAAmCA,mBAAqB,K,2FCKjF,IAAMC,EAAcC,YAAOC,IAAPD,CAAH,KA+EFE,MA3Ef,WAAuB,IACbC,EAAMC,cAAND,EADY,EAGUE,mBAAS,IAHnB,mBAGbC,EAHa,KAGJC,EAHI,KAKdC,EAAYC,uBAAY,SAAAC,GAC5B,IAAMC,EAAgB,SAAAC,GACpBf,EAAUgB,SAAS,CAAEP,QAASM,IAC9Bf,EAAUiB,YAAY,CACpBC,QAAS,WACTC,MAAOJ,EAAWK,QAAQ,QAAS,MAErCV,EAAWK,IAGPM,EAAUR,EAAMS,KACtB,OAAQD,EAAQH,SACd,IAAK,eACHJ,EAAcO,EAAQE,KACtB,MAEF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,EAAUiB,YAAY,CACpBC,QAAS,sBACTK,IAAK4L,EAAW1M,UAElByM,GAAU,GAIdF,EAAsBE,KACrB,IAEH,IAAMvM,EAAYC,uBAAY,SAAAC,GAE5B,OADgBA,EAAMS,KACNJ,SACd,IAAK,sBACH8L,GAAsB,MAMzB,IAIH,OAFAlL,YAAS,UAAWnB,GAGlB,eAAC6L,EAAD,CAAgBC,QAASM,IAAuBD,EAAhD,UACE,cAAC,EAAD,IACA,eAACJ,EAAD,CACEW,MAAO,CAAC,GAAI,IACZC,OAAO,GACPC,WAAY,GACZC,WAAY,EAJd,UAME,cAACZ,EAAD,UACE,cAAC,EAAD,MAEF,cAACA,EAAD,UACE,cAAC,EAAD,a,OCxEKa,OANf,WACE,OACE,cAAC,GAAD,KCOWC,GAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,8BAAqBC,MAAK,YAAkD,IAA/CC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAON,GACPO,EAAQP,O,6BCDdQ,KAGGC,IAAIC,MAEJD,IAAIE,MAGJC,KAAK,CACJC,IAAKC,SAASC,cAAc,QAAQC,aAAa,eACjDC,YAAa,KAGbC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAGfC,QAAS,CAEPC,SAAU,mCAIDf,GAAf,EC1BAgB,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFZ,SAASa,eAAe,SAM1B5B,O","file":"static/js/main.375bc23e.chunk.js","sourcesContent":["/* global acquireVsCodeApi */\r\n\r\nconst VsCodeApi = typeof acquireVsCodeApi !== 'undefined' ? acquireVsCodeApi() : null;\r\n\r\nexport default VsCodeApi;\r\n","import styled from 'styled-components';\r\nimport { useState, useCallback } from 'react';\r\nimport { useEvent } from 'react-use';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { Input } from 'rsuite';\r\nimport VsCodeApi from '../VsCodeApi';\r\n\r\nconst StyledInput = styled(Input)`\r\n margin-top: 5px;\r\n`;\r\n\r\nfunction AddressBar() {\r\n const { t } = useTranslation();\r\n\r\n const [address, setAddress] = useState('');\r\n\r\n const onMessage = useCallback(event => {\r\n const setNewAddress = newAddress => {\r\n VsCodeApi.setState({ address: newAddress });\r\n VsCodeApi.postMessage({\r\n command: 'setTitle',\r\n title: newAddress.replace(/^.*\\\\/, '')\r\n });\r\n setAddress(newAddress);\r\n };\r\n\r\n const message = event.data;\r\n switch (message.command) {\r\n case 'setKeyValues':\r\n setNewAddress(message.key);\r\n break;\r\n\r\n case 'setKeyTreeAndValues':\r\n setNewAddress(message.retrievedKey);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }, []);\r\n\r\n const normalizeAddress = useCallback(userAddress => {\r\n let normalized = userAddress.trim();\r\n normalized = normalized.replace(/^Computer\\\\/i, '');\r\n normalized = normalized.replace(/^HKCR(\\\\|$)/i, 'HKEY_CLASSES_ROOT$1');\r\n normalized = normalized.replace(/^HKCU(\\\\|$)/i, 'HKEY_CURRENT_USER$1');\r\n normalized = normalized.replace(/^HKLM(\\\\|$)/i, 'HKEY_LOCAL_MACHINE$1');\r\n normalized = normalized.replace(/^HKU(\\\\|$)/i, 'HKEY_USERS$1');\r\n normalized = normalized.replace(/^HKCC(\\\\|$)/i, 'HKEY_CURRENT_CONFIG$1');\r\n if (!normalized.match(/^(HKEY_CLASSES_ROOT|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKEY_CURRENT_CONFIG)(\\\\|$)/i)) {\r\n return null;\r\n }\r\n\r\n normalized = normalized.replace(/\\\\+$/, '');\r\n normalized = normalized.replace(/\\\\{2,}/g, '\\\\');\r\n\r\n return normalized;\r\n }, []);\r\n\r\n useEvent('message', onMessage);\r\n\r\n return (\r\n setAddress(value)}\r\n onKeyDown={event => {\r\n if (event.key === 'Enter') {\r\n const normalizedAddress = normalizeAddress(address);\r\n if (normalizedAddress) {\r\n VsCodeApi.postMessage({\r\n command: 'getKeyTreeAndValues',\r\n key: normalizedAddress\r\n });\r\n } else {\r\n VsCodeApi.postMessage({\r\n command: 'alert',\r\n text: t('addressBar.invalidRegistryPath')\r\n });\r\n }\r\n }\r\n }}\r\n placeholder={t('addressBar.registryPath')}\r\n />\r\n );\r\n}\r\n\r\nexport default AddressBar;\r\n","import React, { useState, useCallback } from 'react';\r\nimport { useEvent } from 'react-use';\r\nimport { useTranslation } from 'react-i18next';\r\nimport styled from 'styled-components';\r\nimport AutoSizer from 'react-virtualized-auto-sizer';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faPlus } from '@fortawesome/free-solid-svg-icons'\r\nimport { Tree, IconButton, Modal, Button, Input } from 'rsuite';\r\nimport VsCodeApi from '../VsCodeApi';\r\n\r\nconst NewItemIconButton = styled(IconButton)`\r\n visibility: ${({ $visible }) => $visible ? 'visible' : 'hidden'};\r\n opacity: ${({ $visible }) => $visible ? 1 : 0};\r\n transition: visibility 0s, opacity 0.5s linear;\r\n position: absolute !important;\r\n right: 20px;\r\n bottom: 20px;\r\n z-index: 1;\r\n`;\r\n\r\nfunction NewKeyIconButton(props) {\r\n const { t } = useTranslation();\r\n\r\n const [newKeyDialogOpen, setNewKeyDialogOpen] = useState(false);\r\n\r\n const [newKeyName, setNewKeyName] = useState('');\r\n\r\n const isValidKeyName = name => name !== '' && !name.includes('\\\\');\r\n\r\n const postCreateKey = () => {\r\n VsCodeApi.postMessage({\r\n command: 'createKey',\r\n key: props.currentRegKey + '\\\\' + newKeyName\r\n });\r\n };\r\n\r\n return (\r\n <>\r\n {\r\n setNewKeyName('');\r\n setNewKeyDialogOpen(true);\r\n }}\r\n icon={}\r\n color=\"blue\"\r\n circle\r\n $visible={props.hovered && !newKeyDialogOpen}\r\n />\r\n\r\n setNewKeyDialogOpen(false)}\r\n // Stop propogating events, what the library should be doing...\r\n onClick={event => event.stopPropagation()}\r\n onDoubleClick={event => event.stopPropagation()}\r\n onMouseDown={event => event.stopPropagation()}\r\n onMouseUp={event => event.stopPropagation()}\r\n >\r\n \r\n {t('keysTreeView.newKeyModal.title')}\r\n \r\n \r\n setNewKeyName(value)}\r\n onKeyDown={event => {\r\n if (event.key === 'Enter' && isValidKeyName(newKeyName)) {\r\n postCreateKey();\r\n setNewKeyDialogOpen(false);\r\n }\r\n }}\r\n placeholder={t('keysTreeView.newKeyModal.newKeyName')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n );\r\n}\r\n\r\nconst TreeStyleWrapper = styled.div`\r\n .rs-tree-node-label-content {\r\n // No word wrapping for long names.\r\n white-space: nowrap;\r\n }\r\n\r\n .ReactVirtualized__Grid {\r\n // Allow to scroll horizontally.\r\n overflow: auto !important;\r\n }\r\n\r\n .ReactVirtualized__Grid__innerScrollContainer {\r\n // Allow to scroll horizontally.\r\n position: unset !important;\r\n }\r\n\r\n .rs-tree-nodes {\r\n // Fix resizing.\r\n height: 100%;\r\n }\r\n\r\n .rs-tree-node-label-content {\r\n // Remove padding, move it to child div for mouse events (see below).\r\n padding: 0 !important;\r\n }\r\n\r\n .rs-tree-node-label-content > div {\r\n // Steal padding from the parent for mouse events (see above).\r\n padding: 6px 12px 6px 8px;\r\n }\r\n`;\r\n\r\nconst initialData = () => [\r\n {\r\n label: 'Computer',\r\n value: '',\r\n children: [\r\n {\r\n label: 'HKEY_CLASSES_ROOT',\r\n value: 'HKEY_CLASSES_ROOT',\r\n children: []\r\n },\r\n {\r\n label: 'HKEY_CURRENT_USER',\r\n value: 'HKEY_CURRENT_USER',\r\n children: []\r\n },\r\n {\r\n label: 'HKEY_LOCAL_MACHINE',\r\n value: 'HKEY_LOCAL_MACHINE',\r\n children: []\r\n },\r\n {\r\n label: 'HKEY_USERS',\r\n value: 'HKEY_USERS',\r\n children: []\r\n },\r\n {\r\n label: 'HKEY_CURRENT_CONFIG',\r\n value: 'HKEY_CURRENT_CONFIG',\r\n children: []\r\n }\r\n ]\r\n }\r\n];\r\n\r\nfunction KeysTreeNode({ nodeLabel, nodeRegKey, nodeIsSelected, ...props }) {\r\n const { t } = useTranslation();\r\n\r\n const [editingValue, setEditingValue] = useState(null);\r\n\r\n const applyRename = () => {\r\n const oldName = nodeLabel;\r\n const newName = editingValue;\r\n if (newName !== '' && newName !== oldName) {\r\n VsCodeApi.postMessage({\r\n command: 'renameKey',\r\n key: nodeRegKey,\r\n newSubKey: newName\r\n });\r\n }\r\n };\r\n\r\n const [deleteConfitmationOpen, setDeleteConfitmationOpen] = useState(false);\r\n\r\n return (\r\n