assassinlike commited on
Commit
0ffbce4
·
verified ·
1 Parent(s): ed729e0

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. home/.vscode-server/cli/agent-host-stable.lock +1 -0
  3. home/.vscode-server/cli/agent-host-stable.log +0 -0
  4. home/.vscode-server/cli/agent-host-token +1 -0
  5. home/.vscode-server/data/languagepacks.json +1 -0
  6. home/.vscode-server/data/machineid +1 -0
  7. home/.vscode-server/extensions/extensions.json +1 -0
  8. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/.vsixmanifest +47 -0
  9. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/LICENSE.txt +21 -0
  10. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/io.js +404 -0
  11. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/main.js +246 -0
  12. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/progressbar.js +20 -0
  13. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/util.js +1334 -0
  14. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/images/logo.png +3 -0
  15. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/package.json +899 -0
  16. home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/readme.md +231 -0
  17. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/.vsixmanifest +43 -0
  18. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/CHANGELOG.md +228 -0
  19. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/DEV_README.md +185 -0
  20. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/LICENSE.txt +21 -0
  21. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/README.md +186 -0
  22. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/dialect_select.html +112 -0
  23. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/dialect_select.js +76 -0
  24. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/eslint.config.mjs +32 -0
  25. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/eslint.config_browser.mjs +30 -0
  26. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/extension.js +0 -0
  27. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/fast_load_utils.js +135 -0
  28. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/language-configuration.json +8 -0
  29. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/package.json +639 -0
  30. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rainbow_csv_logo.png +3 -0
  31. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rainbow_utils.js +1339 -0
  32. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_client.html +616 -0
  33. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_client.js +423 -0
  34. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_logo.svg +0 -0
  35. home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_suggest.js +286 -0
  36. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/.vsixmanifest +49 -0
  37. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/LICENSE.md +25 -0
  38. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/ThirdPartyNotices.txt +230 -0
  39. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/changelog.md +39 -0
  40. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/languagepack.png +3 -0
  41. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/package.json +417 -0
  42. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/readme.md +135 -0
  43. home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/telemetry.json +1 -0
  44. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/.flake8 +14 -0
  45. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/.vsixmanifest +47 -0
  46. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/LICENSE.txt +21 -0
  47. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/SECURITY.md +41 -0
  48. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/SUPPORT.md +11 -0
  49. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/component-detection-pip-report.json +18 -0
  50. home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/contributing.md +89 -0
.gitattributes CHANGED
@@ -539,3 +539,5 @@ home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/urll
539
  home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/zipfile/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
540
  home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/ensurepip/_bundled/pip-25.0.1-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
541
  home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/tk8.6/demos/images/teapot.ppm filter=lfs diff=lfs merge=lfs -text
 
 
 
539
  home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/zipfile/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
540
  home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/ensurepip/_bundled/pip-25.0.1-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
541
  home/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/tk8.6/demos/images/teapot.ppm filter=lfs diff=lfs merge=lfs -text
542
+ home/.vscode-server/extensions/ms-vscode.cmake-tools-1.23.52/res/vswhere.exe filter=lfs diff=lfs merge=lfs -text
543
+ home/.vscode-server/extensions/ms-python.vscode-python-envs-1.36.0-linux-x64/python-env-tools/bin/pet filter=lfs diff=lfs merge=lfs -text
home/.vscode-server/cli/agent-host-stable.lock ADDED
@@ -0,0 +1 @@
 
 
1
+ {"schemaVersion":1,"pid":54816,"port":40195,"host":"127.0.0.1","connectionToken":"c76dc6c0-62d2-4fd3-9d9f-c3dfde2c5cc5","protocolVersion":"0.1.0","quality":"stable"}
home/.vscode-server/cli/agent-host-stable.log ADDED
The diff for this file is too large to render. See raw diff
 
home/.vscode-server/cli/agent-host-token ADDED
@@ -0,0 +1 @@
 
 
1
+ c76dc6c0-62d2-4fd3-9d9f-c3dfde2c5cc5
home/.vscode-server/data/languagepacks.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"zh-cn":{"hash":"08e3eb26a94cfe99087efc53c5a0cebc","extensions":[{"extensionIdentifier":{"id":"ms-ceintl.vscode-language-pack-zh-hans","uuid":"e4ee7751-6514-4731-9cdb-7580ffa9e70b"},"version":"1.130.2026072017"}],"translations":{"vscode":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/main.i18n.json","ms-vscode.js-debug":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/ms-vscode.js-debug.i18n.json","vscode.bat":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.bat.i18n.json","vscode.builtin-notebook-renderers":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.builtin-notebook-renderers.i18n.json","vscode.clojure":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.clojure.i18n.json","vscode.coffeescript":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.coffeescript.i18n.json","vscode.configuration-editing":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.configuration-editing.i18n.json","vscode.cpp":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.cpp.i18n.json","vscode.csharp":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.csharp.i18n.json","vscode.css-language-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.css-language-features.i18n.json","vscode.css":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.css.i18n.json","vscode.dart":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.dart.i18n.json","vscode.debug-auto-launch":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.debug-auto-launch.i18n.json","vscode.debug-server-ready":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.debug-server-ready.i18n.json","vscode.diff":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.diff.i18n.json","vscode.docker":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.docker.i18n.json","vscode.dotenv":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.dotenv.i18n.json","vscode.emmet":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.emmet.i18n.json","vscode.extension-editing":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.extension-editing.i18n.json","vscode.fsharp":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.fsharp.i18n.json","vscode.git-base":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.git-base.i18n.json","vscode.git":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.git.i18n.json","vscode.github-authentication":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.github-authentication.i18n.json","vscode.github":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.github.i18n.json","vscode.go":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.go.i18n.json","vscode.groovy":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.groovy.i18n.json","vscode.grunt":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.grunt.i18n.json","vscode.gulp":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.gulp.i18n.json","vscode.handlebars":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.handlebars.i18n.json","vscode.hlsl":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.hlsl.i18n.json","vscode.html-language-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.html-language-features.i18n.json","vscode.html":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.html.i18n.json","vscode.ini":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.ini.i18n.json","vscode.ipynb":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.ipynb.i18n.json","vscode.jake":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.jake.i18n.json","vscode.java":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.java.i18n.json","vscode.javascript":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.javascript.i18n.json","vscode.json-language-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.json-language-features.i18n.json","vscode.json":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.json.i18n.json","vscode.julia":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.julia.i18n.json","vscode.latex":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.latex.i18n.json","vscode.less":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.less.i18n.json","vscode.log":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.log.i18n.json","vscode.lua":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.lua.i18n.json","vscode.make":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.make.i18n.json","vscode.markdown-language-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.markdown-language-features.i18n.json","vscode.markdown-math":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.markdown-math.i18n.json","vscode.markdown":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.markdown.i18n.json","vscode.media-preview":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.media-preview.i18n.json","vscode.merge-conflict":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.merge-conflict.i18n.json","vscode.mermaid-chat-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.mermaid-chat-features.i18n.json","vscode.mermaid-markdown-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.mermaid-markdown-features.i18n.json","vscode.microsoft-authentication":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.microsoft-authentication.i18n.json","vscode.npm":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.npm.i18n.json","vscode.objective-c":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.objective-c.i18n.json","vscode.perl":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.perl.i18n.json","vscode.php-language-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.php-language-features.i18n.json","vscode.php":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.php.i18n.json","vscode.powershell":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.powershell.i18n.json","vscode.prompt":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.prompt.i18n.json","vscode.pug":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.pug.i18n.json","vscode.python":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.python.i18n.json","vscode.r":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.r.i18n.json","vscode.razor":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.razor.i18n.json","vscode.references-view":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.references-view.i18n.json","vscode.restructuredtext":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.restructuredtext.i18n.json","vscode.ruby":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.ruby.i18n.json","vscode.rust":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.rust.i18n.json","vscode.scss":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.scss.i18n.json","vscode.search-result":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.search-result.i18n.json","vscode.shaderlab":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.shaderlab.i18n.json","vscode.shellscript":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.shellscript.i18n.json","vscode.simple-browser":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.simple-browser.i18n.json","vscode.sql":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.sql.i18n.json","vscode.swift":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.swift.i18n.json","vscode.terminal-suggest":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.terminal-suggest.i18n.json","vscode.theme-2026":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-2026.i18n.json","vscode.theme-abyss":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-abyss.i18n.json","vscode.theme-defaults":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-defaults.i18n.json","vscode.theme-kimbie-dark":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-kimbie-dark.i18n.json","vscode.theme-monokai-dimmed":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-monokai-dimmed.i18n.json","vscode.theme-monokai":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-monokai.i18n.json","vscode.theme-quietlight":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-quietlight.i18n.json","vscode.theme-red":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-red.i18n.json","vscode.theme-solarized-dark":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-solarized-dark.i18n.json","vscode.theme-solarized-light":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-solarized-light.i18n.json","vscode.theme-tomorrow-night-blue":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.theme-tomorrow-night-blue.i18n.json","vscode.tunnel-forwarding":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.tunnel-forwarding.i18n.json","vscode.typescript-language-features":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.typescript-language-features.i18n.json","vscode.typescript":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.typescript.i18n.json","vscode.vb":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.vb.i18n.json","vscode.vscode-theme-seti":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.vscode-theme-seti.i18n.json","vscode.xml":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.xml.i18n.json","vscode.yaml":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/translations/extensions/vscode.yaml.i18n.json"},"label":"中文(简体)"}}
home/.vscode-server/data/machineid ADDED
@@ -0,0 +1 @@
 
 
1
+ fb65a8a6-7a83-4928-b1f5-4aad14b7ff4f
home/.vscode-server/extensions/extensions.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"identifier":{"id":"ms-vscode.cpptools-themes","uuid":"99b17261-8f6e-45f0-9ad5-a69c6f509a4f"},"version":"2.0.0","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-vscode.cpptools-themes-2.0.0","scheme":"file"},"relativeLocation":"ms-vscode.cpptools-themes-2.0.0","metadata":{"installedTimestamp":1771994910408,"pinned":false,"source":"gallery","id":"99b17261-8f6e-45f0-9ad5-a69c6f509a4f","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-vscode.cpptools-extension-pack","uuid":"3957b2f6-f086-49b5-a7b4-5da772123130"},"version":"1.5.1","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-vscode.cpptools-extension-pack-1.5.1","scheme":"file"},"relativeLocation":"ms-vscode.cpptools-extension-pack-1.5.1","metadata":{"installedTimestamp":1771994910404,"source":"gallery","id":"3957b2f6-f086-49b5-a7b4-5da772123130","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-python.python","uuid":"f1f59ae4-9318-4f3c-a9b5-81b2eaa5f8a5"},"version":"2026.4.0","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-python.python-2026.4.0-linux-x64","scheme":"file"},"relativeLocation":"ms-python.python-2026.4.0-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1773360146579,"pinned":false,"source":"gallery","id":"f1f59ae4-9318-4f3c-a9b5-81b2eaa5f8a5","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-vscode.cmake-tools","uuid":"7c889349-8749-43d4-8b5e-08939936d7f4"},"version":"1.23.52","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-vscode.cmake-tools-1.23.52","scheme":"file"},"relativeLocation":"ms-vscode.cmake-tools-1.23.52","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1776936938777,"pinned":false,"source":"gallery","id":"7c889349-8749-43d4-8b5e-08939936d7f4","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-toolsai.jupyter-keymap","uuid":"9f6dc8db-620c-4844-b8c5-e74914f1be27"},"version":"1.1.2","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-toolsai.jupyter-keymap-1.1.2","scheme":"file"},"relativeLocation":"ms-toolsai.jupyter-keymap-1.1.2","metadata":{"isApplicationScoped":true,"installedTimestamp":1778081302439,"source":"gallery","id":"9f6dc8db-620c-4844-b8c5-e74914f1be27","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.vscode-jupyter-slideshow","uuid":"e153ca70-b543-4865-b4c5-b31d34185948"},"version":"0.1.6","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.6","scheme":"file"},"relativeLocation":"ms-toolsai.vscode-jupyter-slideshow-0.1.6","metadata":{"isApplicationScoped":true,"installedTimestamp":1778081302442,"pinned":false,"source":"gallery","id":"e153ca70-b543-4865-b4c5-b31d34185948","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.vscode-jupyter-cell-tags","uuid":"ab4fb32a-befb-4102-adf9-1652d0cd6a5e"},"version":"0.1.9","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-toolsai.vscode-jupyter-cell-tags-0.1.9","scheme":"file"},"relativeLocation":"ms-toolsai.vscode-jupyter-cell-tags-0.1.9","metadata":{"isApplicationScoped":true,"installedTimestamp":1778081302444,"pinned":false,"source":"gallery","id":"ab4fb32a-befb-4102-adf9-1652d0cd6a5e","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.jupyter","uuid":"6c2f1801-1e7f-45b2-9b5c-7782f1e076e8"},"version":"2025.9.1","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-toolsai.jupyter-2025.9.1-linux-x64","scheme":"file"},"relativeLocation":"ms-toolsai.jupyter-2025.9.1-linux-x64","metadata":{"isApplicationScoped":true,"installedTimestamp":1778081302441,"source":"gallery","id":"6c2f1801-1e7f-45b2-9b5c-7782f1e076e8","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-toolsai.jupyter-renderers","uuid":"b15c72f8-d5fe-421a-a4f7-27ed9f6addbf"},"version":"1.3.0","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-toolsai.jupyter-renderers-1.3.0","scheme":"file"},"relativeLocation":"ms-toolsai.jupyter-renderers-1.3.0","metadata":{"isApplicationScoped":true,"installedTimestamp":1778081302440,"source":"gallery","id":"b15c72f8-d5fe-421a-a4f7-27ed9f6addbf","publisherId":"ac8eb7c9-3e59-4b39-8040-f0484d8170ce","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"ms-python.debugpy","uuid":"4bd5d2c9-9d65-401a-b0b2-7498d9f17615"},"version":"2026.6.0","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64","scheme":"file"},"relativeLocation":"ms-python.debugpy-2026.6.0-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1778575279782,"pinned":false,"source":"gallery","id":"4bd5d2c9-9d65-401a-b0b2-7498d9f17615","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-vscode.cpp-devtools","uuid":"a71e0b52-0402-498f-a148-d2e344390f14"},"version":"0.5.13","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-vscode.cpp-devtools-0.5.13","scheme":"file"},"relativeLocation":"ms-vscode.cpp-devtools-0.5.13","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1778575283783,"pinned":false,"source":"gallery","id":"a71e0b52-0402-498f-a148-d2e344390f14","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-vscode.cpptools","uuid":"690b692e-e8a9-493f-b802-8089d50ac1b2"},"version":"1.32.2","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-vscode.cpptools-1.32.2-linux-x64","scheme":"file"},"relativeLocation":"ms-vscode.cpptools-1.32.2-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1778575281508,"pinned":false,"source":"gallery","id":"690b692e-e8a9-493f-b802-8089d50ac1b2","publisherId":"5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"mechatroner.rainbow-csv","uuid":"3792588c-3d35-442d-91ea-fe6a755e8155"},"version":"3.24.1","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1","scheme":"file"},"relativeLocation":"mechatroner.rainbow-csv-3.24.1","metadata":{"installedTimestamp":1779258761255,"source":"gallery","id":"3792588c-3d35-442d-91ea-fe6a755e8155","publisherId":"0d5438b6-325a-4f88-aa28-6192aa2cf2a6","publisherDisplayName":"mechatroner","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"yzhang.markdown-all-in-one","uuid":"98790d67-10fa-497c-9113-f6c7489207b2"},"version":"3.6.3","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/yzhang.markdown-all-in-one-3.6.3","scheme":"file"},"relativeLocation":"yzhang.markdown-all-in-one-3.6.3","metadata":{"installedTimestamp":1779729737512,"source":"gallery","id":"98790d67-10fa-497c-9113-f6c7489207b2","publisherId":"36c8b41c-6ef6-4bf5-a5b7-65bef29b606f","publisherDisplayName":"Yu Zhang","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"janisdd.vscode-edit-csv","uuid":"72e9b049-d75d-415c-96e1-d6e74f0e3074"},"version":"0.11.9","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9","scheme":"file"},"relativeLocation":"janisdd.vscode-edit-csv-0.11.9","metadata":{"installedTimestamp":1780153920792,"pinned":false,"source":"gallery","id":"72e9b049-d75d-415c-96e1-d6e74f0e3074","publisherId":"58bd5644-7810-46e8-9e77-98e658298b7d","publisherDisplayName":"janisdd","targetPlatform":"undefined","updated":false,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false}},{"identifier":{"id":"shd101wyy.markdown-preview-enhanced","uuid":"3b1db1fc-c7f7-4bd6-9fa4-b499dfa99a8a"},"version":"0.8.30","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/shd101wyy.markdown-preview-enhanced-0.8.30","scheme":"file"},"relativeLocation":"shd101wyy.markdown-preview-enhanced-0.8.30","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1780905847121,"pinned":false,"source":"gallery","id":"3b1db1fc-c7f7-4bd6-9fa4-b499dfa99a8a","publisherId":"deac4ec9-08f5-4752-aa45-c6f09e1f615d","publisherDisplayName":"Yiyi Wang","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-python.vscode-python-envs","uuid":"b41d8e8a-b6d4-4202-8f07-7189bdda81be"},"version":"1.36.0","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-python.vscode-python-envs-1.36.0-linux-x64","scheme":"file"},"relativeLocation":"ms-python.vscode-python-envs-1.36.0-linux-x64","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1781820430701,"pinned":false,"source":"gallery","id":"b41d8e8a-b6d4-4202-8f07-7189bdda81be","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"linux-x64","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-python.vscode-pylance","uuid":"364d2426-116a-433a-a5d8-a5098dc3afbd"},"version":"2026.3.1","location":{"$mid":1,"path":"/home/zangyihe/.vscode-server/extensions/ms-python.vscode-pylance-2026.3.1","scheme":"file"},"relativeLocation":"ms-python.vscode-pylance-2026.3.1","metadata":{"isApplicationScoped":false,"isMachineScoped":false,"isBuiltin":false,"installedTimestamp":1784666131852,"pinned":false,"source":"gallery","id":"364d2426-116a-433a-a5d8-a5098dc3afbd","publisherId":"998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}},{"identifier":{"id":"ms-ceintl.vscode-language-pack-zh-hans"},"version":"1.130.2026072017","location":{"$mid":1,"fsPath":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017","external":"file:///home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017","path":"/home/zangyihe/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017","scheme":"file"},"relativeLocation":"ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017","metadata":{"isApplicationScoped":true,"isMachineScoped":true,"isBuiltin":false,"installedTimestamp":1784809925286,"pinned":false,"source":"gallery","id":"e4ee7751-6514-4731-9cdb-7580ffa9e70b","publisherId":"0b0882c3-aee3-4d7c-b5f9-872f9be0a115","publisherDisplayName":"Microsoft","targetPlatform":"undefined","updated":true,"private":false,"isPreReleaseVersion":false,"hasPreReleaseVersion":false,"preRelease":false}}]
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/.vsixmanifest ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3
+ <Metadata>
4
+ <Identity Language="en-US" Id="vscode-edit-csv" Version="0.11.9" Publisher="janisdd" />
5
+ <DisplayName>Edit CSV</DisplayName>
6
+ <Description xml:space="preserve">extension to edit csv files with a table ui</Description>
7
+ <Tags>CSV,csv,__ext_csv,tsv,TSV,__ext_tsv,__ext_tab</Tags>
8
+ <Categories>Other</Categories>
9
+ <GalleryFlags>Public</GalleryFlags>
10
+
11
+ <Properties>
12
+ <Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.70.0" />
13
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
14
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
15
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace" />
16
+ <Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
17
+ <Property Id="Microsoft.VisualStudio.Code.EnabledApiProposals" Value="" />
18
+
19
+ <Property Id="Microsoft.VisualStudio.Code.ExecutesCode" Value="true" />
20
+
21
+ <Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/janisdd/vscode-edit-csv.git" />
22
+ <Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/janisdd/vscode-edit-csv.git" />
23
+ <Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/janisdd/vscode-edit-csv.git" />
24
+ <Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/janisdd/vscode-edit-csv/issues" />
25
+ <Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/janisdd/vscode-edit-csv#readme" />
26
+ <Property Id="Microsoft.VisualStudio.Services.Branding.Color" Value="#687bff" />
27
+ <Property Id="Microsoft.VisualStudio.Services.Branding.Theme" Value="light" />
28
+ <Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
29
+ <Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
30
+
31
+
32
+
33
+ </Properties>
34
+ <License>extension/LICENSE.txt</License>
35
+ <Icon>extension/images/logo.png</Icon>
36
+ </Metadata>
37
+ <Installation>
38
+ <InstallationTarget Id="Microsoft.VisualStudio.Code"/>
39
+ </Installation>
40
+ <Dependencies/>
41
+ <Assets>
42
+ <Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
43
+ <Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/readme.md" Addressable="true" />
44
+ <Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" />
45
+ <Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/images/logo.png" Addressable="true" />
46
+ </Assets>
47
+ </PackageManifest>
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2019 janisdd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/io.js ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ function parseCsv(content, csvReadOptions) {
3
+ if (content === '') {
4
+ content = defaultCsvContentIfEmpty;
5
+ }
6
+ hasFinalNewLine = content.endsWith('\n');
7
+ const parseResult = papaCsv.parse(content, {
8
+ ...csvReadOptions,
9
+ comments: null,
10
+ rowInsertCommentLines_commentsString: typeof csvReadOptions.comments === 'string' && csvReadOptions.comments !== '' ? csvReadOptions.comments : null,
11
+ retainQuoteInformation: true,
12
+ calcLineIndexToCsvLineIndexMapping: initialVars.sourceFileCursorLineIndex !== null ? true : false,
13
+ calcColumnIndexToCsvColumnIndexMapping: initialVars.sourceFileCursorColumnIndex !== null ? true : false,
14
+ calcCsvFieldToInputPositionMapping: true,
15
+ });
16
+ if (parseResult.errors.length === 1 && parseResult.errors[0].type === 'Delimiter' && parseResult.errors[0].code === 'UndetectableDelimiter') {
17
+ }
18
+ else {
19
+ if (parseResult.errors.length > 0) {
20
+ for (let i = 0; i < parseResult.errors.length; i++) {
21
+ const error = parseResult.errors[i];
22
+ if (error.type === 'Delimiter' && error.code === 'UndetectableDelimiter') {
23
+ continue;
24
+ }
25
+ if (typeof error.row === 'number') {
26
+ statusInfo.innerText = `Error`;
27
+ const errorMsg = `${error.message} on line ${error.row + 1}`;
28
+ csvEditorDiv.innerText = errorMsg;
29
+ _error(errorMsg);
30
+ continue;
31
+ }
32
+ statusInfo.innerText = `Error`;
33
+ const errorMsg = `${error.message}`;
34
+ csvEditorDiv.innerText = errorMsg;
35
+ _error(errorMsg);
36
+ }
37
+ return null;
38
+ }
39
+ }
40
+ defaultCsvWriteOptions.delimiter = parseResult.meta.delimiter;
41
+ usedDelimiter = parseResult.meta.delimiter;
42
+ newLineFromInput = parseResult.meta.linebreak;
43
+ updateNewLineSelect();
44
+ readDelimiterTooltip.setAttribute('data-tooltip', `${readDelimiterTooltipText} (detected: ${defaultCsvWriteOptions.delimiter.replace("\t", "⇥")})`);
45
+ outColumnIndexToCsvColumnEndIndexWithDelimiterMapping = parseResult.meta.outColumnIndexToCsvColumnIndexMapping ?? [];
46
+ outLineIndexToCsvLineIndexMapping = parseResult.meta.outLineIndexToCsvLineIndexMapping ?? [];
47
+ outCsvFieldToInputPositionMapping = parseResult.meta.outCsvFieldToInputPositionMapping ?? [];
48
+ return {
49
+ data: parseResult.data,
50
+ columnIsQuoted: parseResult.meta.columnIsQuoted ?? [],
51
+ cellIsQuotedInfo: parseResult.meta.cellIsQuotedInfo ?? [],
52
+ outLineIndexToCsvLineIndexMapping: parseResult.meta.outLineIndexToCsvLineIndexMapping ?? null,
53
+ outColumnIndexToCsvColumnIndexMapping: parseResult.meta.outColumnIndexToCsvColumnIndexMapping ?? null,
54
+ originalContent: content,
55
+ hasFinalNewLine: hasFinalNewLine,
56
+ };
57
+ }
58
+ function updateNewLineSelect() {
59
+ newlineSameSsInputOption.innerText = `${newlineSameSsInputOptionText} (${newLineFromInput === `\n` ? 'LF' : 'CRLF'})`;
60
+ }
61
+ function getData() {
62
+ if (!hot)
63
+ throw new Error('table was null');
64
+ return hot.getData();
65
+ }
66
+ function getFirstRowWithIndex(skipCommentLines = true) {
67
+ if (!hot)
68
+ return null;
69
+ const rowCount = hot.countRows();
70
+ if (rowCount === 0)
71
+ return null;
72
+ let firstDataRow = [];
73
+ let rowIndex = -1;
74
+ for (let i = 0; i < rowCount; i++) {
75
+ const row = hot.getDataAtRow(i);
76
+ if (row.length === 0)
77
+ continue;
78
+ if (skipCommentLines && isCommentCell(row[0], defaultCsvReadOptions))
79
+ continue;
80
+ firstDataRow = [...row];
81
+ rowIndex = i;
82
+ break;
83
+ }
84
+ if (rowIndex === -1) {
85
+ return null;
86
+ }
87
+ return {
88
+ physicalIndex: rowIndex,
89
+ row: firstDataRow
90
+ };
91
+ }
92
+ function getFirstRowWithIndexByData(data, skipCommentLines = true) {
93
+ const rowCount = data.length;
94
+ if (rowCount === 0)
95
+ return null;
96
+ let firstDataRow = [];
97
+ let rowIndex = -1;
98
+ for (let i = 0; i < rowCount; i++) {
99
+ const row = data[i];
100
+ if (row.length === 0)
101
+ continue;
102
+ if (skipCommentLines && isCommentCell(row[0], defaultCsvReadOptions))
103
+ continue;
104
+ firstDataRow = [...row];
105
+ rowIndex = i;
106
+ break;
107
+ }
108
+ if (rowIndex === -1) {
109
+ return null;
110
+ }
111
+ return {
112
+ physicalIndex: rowIndex,
113
+ row: firstDataRow
114
+ };
115
+ }
116
+ function getDataAsCsv(csvReadOptions, csvWriteOptions) {
117
+ const data = getData();
118
+ if (csvWriteOptions.newline === '') {
119
+ csvWriteOptions.newline = newLineFromInput;
120
+ }
121
+ const _conf = {
122
+ ...csvWriteOptions,
123
+ quotes: csvWriteOptions.quoteAllFields,
124
+ quoteEmptyOrNullFields: csvWriteOptions.quoteEmptyOrNullFields,
125
+ calcCsvFieldToInputPositionMapping: true,
126
+ };
127
+ if (csvWriteOptions.header) {
128
+ if (!hot)
129
+ throw new Error('table was null');
130
+ if (headerRowWithIndex === null) {
131
+ const colHeaderCells = hot.getColHeader();
132
+ data.unshift(colHeaderCells.map((p, index) => getSpreadsheetColumnLabel(index)));
133
+ }
134
+ else {
135
+ if (headerRowWithIndex === null) {
136
+ throw new Error('header row was null');
137
+ }
138
+ data.unshift(headerRowWithIndex.row.map((val) => val !== null ? val : ''));
139
+ }
140
+ }
141
+ for (let i = 0; i < data.length; i++) {
142
+ const row = data[i];
143
+ if (row[0] === null)
144
+ continue;
145
+ if (typeof csvReadOptions.comments === 'string'
146
+ && typeof csvWriteOptions.comments === 'string'
147
+ && isCommentCell(row[0], csvReadOptions)) {
148
+ const index = row[0].indexOf(csvReadOptions.comments);
149
+ row[0] = `${row[0].substring(0, index)}${csvWriteOptions.comments}${row[0].substring(index + csvReadOptions.comments.length)}`.trimLeft().replace(/\n/mg, "");
150
+ }
151
+ }
152
+ _conf.skipEmptyLines = false;
153
+ _conf.rowInsertCommentLines_commentsString = typeof csvWriteOptions.comments === 'string' ? csvWriteOptions.comments : null;
154
+ switch (initialConfig?.retainQuoteInformation ?? 'full') {
155
+ case 'none': {
156
+ break;
157
+ }
158
+ case 'determinedByColumns': {
159
+ _conf.quotes = columnIsQuoted;
160
+ break;
161
+ }
162
+ case 'full': {
163
+ let cellIsQuotedInfoPhysicalIndicesFull = [...cellIsQuotedInfoPhysicalIndices];
164
+ if (headerRowWithIndex && cellIsQuotedInfoPhysicalIndicesHeaderRow.length > 0) {
165
+ cellIsQuotedInfoPhysicalIndicesFull.splice(headerRowWithIndex.physicalIndex, 0, cellIsQuotedInfoPhysicalIndicesHeaderRow);
166
+ }
167
+ _conf.determineFieldHasQuotesFunc = (content, row, col) => {
168
+ if (row >= cellIsQuotedInfoPhysicalIndicesFull.length) {
169
+ return newColumnQuoteInformationIsQuoted;
170
+ }
171
+ let physicalRow = hot.toPhysicalRow(row);
172
+ if (col >= cellIsQuotedInfoPhysicalIndicesFull[row].length) {
173
+ return newColumnQuoteInformationIsQuoted;
174
+ }
175
+ let physicalCol = hot.toPhysicalColumn(col);
176
+ return cellIsQuotedInfoPhysicalIndicesFull[physicalRow][physicalCol] ?? newColumnQuoteInformationIsQuoted;
177
+ };
178
+ break;
179
+ }
180
+ }
181
+ _conf.quoteLeadingSpace = initialConfig?.forceQuoteLeadingWhitespace ?? false;
182
+ _conf.quoteTrailingSpace = initialConfig?.forceQuoteTrailingWhitespace ?? false;
183
+ const unparseResult = papaCsv.unparse(data, _conf);
184
+ let dataAsString = unparseResult.csv;
185
+ let finalNewLineOption = "sameAsSourceFile";
186
+ if (initialConfig) {
187
+ finalNewLineOption = initialConfig.finalNewLine;
188
+ }
189
+ switch (finalNewLineOption) {
190
+ case 'sameAsSourceFile': {
191
+ if (hasFinalNewLine) {
192
+ dataAsString += csvWriteOptions.newline;
193
+ }
194
+ else {
195
+ }
196
+ break;
197
+ }
198
+ case 'add': {
199
+ dataAsString += csvWriteOptions.newline;
200
+ break;
201
+ }
202
+ case 'remove': {
203
+ break;
204
+ }
205
+ default:
206
+ notExhaustiveSwitch(finalNewLineOption);
207
+ }
208
+ return {
209
+ csv: dataAsString,
210
+ meta: {
211
+ outCsvFieldToInputPositionMapping: unparseResult.meta.outCsvFieldToInputPositionMapping ?? []
212
+ }
213
+ };
214
+ }
215
+ function postReloadFile() {
216
+ if (!vscode) {
217
+ console.log(`postReloadFile (but in browser)`);
218
+ return;
219
+ }
220
+ _postReadyMessage();
221
+ }
222
+ var postVsInformation = (text) => {
223
+ if (!vscode) {
224
+ console.log(`postVsInformation (but in browser)`);
225
+ return;
226
+ }
227
+ vscode.postMessage({
228
+ command: 'msgBox',
229
+ type: 'info',
230
+ content: text
231
+ });
232
+ };
233
+ var postVsWarning = (text) => {
234
+ if (!vscode) {
235
+ console.log(`postVsWarning (but in browser)`);
236
+ return;
237
+ }
238
+ vscode.postMessage({
239
+ command: 'msgBox',
240
+ type: 'warn',
241
+ content: text
242
+ });
243
+ };
244
+ var postVsError = (text) => {
245
+ if (!vscode) {
246
+ console.log(`postVsError (but in browser)`);
247
+ return;
248
+ }
249
+ vscode.postMessage({
250
+ command: 'msgBox',
251
+ type: 'error',
252
+ content: text
253
+ });
254
+ };
255
+ function postCopyToClipboard(text) {
256
+ if (!vscode) {
257
+ console.log(`postCopyToClipboard (but in browser)`);
258
+ navigator.clipboard.writeText(text);
259
+ return;
260
+ }
261
+ vscode.postMessage({
262
+ command: 'copyToClipboard',
263
+ text
264
+ });
265
+ }
266
+ function postSetEditorHasChanges(hasChanges) {
267
+ _setHasUnsavedChangesUiIndicator(hasChanges);
268
+ if (!vscode) {
269
+ console.log(`postSetEditorHasChanges (but in browser)`);
270
+ return;
271
+ }
272
+ vscode.postMessage({
273
+ command: 'setHasChanges',
274
+ hasChanges
275
+ });
276
+ }
277
+ function _postApplyContent(csvContent, saveSourceFile) {
278
+ _setHasUnsavedChangesUiIndicator(false);
279
+ if (!vscode) {
280
+ console.log(`_postApplyContent (but in browser)`);
281
+ return;
282
+ }
283
+ vscode.postMessage({
284
+ command: 'apply',
285
+ csvContent,
286
+ saveSourceFile
287
+ });
288
+ }
289
+ function _postReadyMessage() {
290
+ if (!vscode) {
291
+ console.log(`_postReadyMessage (but in browser)`);
292
+ return;
293
+ }
294
+ startReceiveCsvProgBar();
295
+ vscode.postMessage({
296
+ command: 'ready'
297
+ });
298
+ }
299
+ function handleVsCodeMessage(event) {
300
+ const message = event.data;
301
+ switch (message.command) {
302
+ case 'csvUpdate': {
303
+ if (typeof message.csvContent === 'string') {
304
+ onReceiveCsvContentSlice({
305
+ text: message.csvContent,
306
+ sliceNr: 1,
307
+ totalSlices: 1
308
+ });
309
+ }
310
+ else {
311
+ onReceiveCsvContentSlice(message.csvContent);
312
+ }
313
+ break;
314
+ }
315
+ case "applyPress": {
316
+ postApplyContent(false);
317
+ break;
318
+ }
319
+ case 'applyAndSavePress': {
320
+ postApplyContent(true);
321
+ break;
322
+ }
323
+ case 'changeFontSizeInPx': {
324
+ changeFontSizeInPx(message.fontSizeInPx);
325
+ break;
326
+ }
327
+ case 'sourceFileChanged': {
328
+ if (initialConfig) {
329
+ switch (initialConfig.shouldWatchCsvSourceFile) {
330
+ case 'no': {
331
+ break;
332
+ }
333
+ case 'yesAndAutoReload': {
334
+ reloadFileFromDisk();
335
+ break;
336
+ }
337
+ case 'yesAndNotify':
338
+ default: {
339
+ toggleSourceFileChangedModalDiv(true, false);
340
+ break;
341
+ }
342
+ }
343
+ }
344
+ break;
345
+ }
346
+ default: {
347
+ _error('received unknown message from vs code');
348
+ notExhaustiveSwitch(message);
349
+ break;
350
+ }
351
+ }
352
+ }
353
+ function onReceiveCsvContentSlice(slice) {
354
+ if (slice.sliceNr === 1) {
355
+ initialContent = '';
356
+ statusInfo.innerText = `Receiving csv...`;
357
+ csvEditorDiv.innerText = ``;
358
+ }
359
+ initialContent += slice.text;
360
+ receivedCsvProgBar.value = slice.sliceNr * 100 / slice.totalSlices;
361
+ if (slice.sliceNr === slice.totalSlices) {
362
+ stopReceiveCsvProgBar();
363
+ startRenderData();
364
+ }
365
+ }
366
+ function startRenderData() {
367
+ statusInfo.innerText = `Rendering table...`;
368
+ hasOriginalTableStructuralChanges = false;
369
+ if (hasHeaderReadOptionInput.checked) {
370
+ isFirstHasHeaderChangedEvent = true;
371
+ defaultCsvReadOptions._hasHeader = true;
372
+ }
373
+ else {
374
+ isFirstHasHeaderChangedEvent = false;
375
+ defaultCsvReadOptions._hasHeader = false;
376
+ }
377
+ call_after_DOM_updated(() => {
378
+ resetData(initialContent, defaultCsvReadOptions);
379
+ statusInfo.innerText = `Performing last steps...`;
380
+ if (!defaultCsvReadOptions._hasHeader) {
381
+ setTimeout(() => {
382
+ statusInfo.innerText = '';
383
+ }, 0);
384
+ }
385
+ });
386
+ }
387
+ function call_after_DOM_updated(fn) {
388
+ var intermediate = function () { window.requestAnimationFrame(fn); };
389
+ window.requestAnimationFrame(intermediate);
390
+ }
391
+ function notExhaustiveSwitch(x) {
392
+ throw new Error('not exhaustive switch');
393
+ }
394
+ function postSetMultipleCursors(positions) {
395
+ if (!vscode) {
396
+ console.log(`postSetMultipleCursors (but in browser)`);
397
+ return;
398
+ }
399
+ vscode.postMessage({
400
+ command: 'setMultipleCursors',
401
+ positions: positions
402
+ });
403
+ }
404
+ //# sourceMappingURL=io.js.map
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/main.js ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ dayjs.extend(dayjs_plugin_customParseFormat);
3
+ var fontSizeAddModifier = 0;
4
+ let currentFontSize = 16;
5
+ const defaultInitialVars = {
6
+ isWatchingSourceFile: false,
7
+ sourceFileCursorLineIndex: null,
8
+ sourceFileCursorColumnIndex: null,
9
+ isCursorPosAfterLastColumn: false,
10
+ openTableAndSelectCellAtCursorPos: 'initialOnly_correctRowAlwaysFirstColumn',
11
+ os: 'web',
12
+ };
13
+ let vscode = undefined;
14
+ if (typeof acquireVsCodeApi !== 'undefined') {
15
+ vscode = acquireVsCodeApi();
16
+ }
17
+ if (typeof initialConfig === 'undefined') {
18
+ var initialConfig = undefined;
19
+ var initialVars = {
20
+ ...defaultInitialVars
21
+ };
22
+ }
23
+ else {
24
+ if (typeof initialConfig.doubleClickColumnHandleForcedWith === 'string') {
25
+ initialConfig.doubleClickColumnHandleForcedWith = parseInt(initialConfig.doubleClickColumnHandleForcedWith);
26
+ if (isNaN(initialConfig.doubleClickColumnHandleForcedWith)) {
27
+ initialConfig.doubleClickColumnHandleForcedWith = 200;
28
+ }
29
+ }
30
+ }
31
+ const regression = window.regression;
32
+ const papaCsv = window.papaparse.Papa;
33
+ let hot;
34
+ toFormat(Big);
35
+ const defaultCsvContentIfEmpty = `,\n,`;
36
+ let headerRowWithIndex = null;
37
+ let lastClickedHeaderCellTh = null;
38
+ let editHeaderCellTextInputEl = null;
39
+ let editHeaderCellTextInputLeftOffsetInPx = 0;
40
+ let handsontableOverlayScrollLeft = 0;
41
+ let _onTableScrollThrottled = null;
42
+ let hiddenPhysicalRowIndicesSorted = [];
43
+ let hiddenPhysicalColumnIndicesSorted = [];
44
+ let firstAndLastVisibleRows = null;
45
+ let firstAndLastVisibleColumns = null;
46
+ let copyPasteRowLimit = 10000000;
47
+ let copyPasteColLimit = 10000000;
48
+ let headerRowWithIndexUndoStack = [];
49
+ let headerRowWithIndexRedoStack = [];
50
+ let usedDelimiter;
51
+ let outColumnIndexToCsvColumnEndIndexWithDelimiterMapping;
52
+ let outLineIndexToCsvLineIndexMapping;
53
+ let outCsvFieldToInputPositionMapping;
54
+ let columnIsQuoted;
55
+ let cellIsQuotedInfoPhysicalIndices = [];
56
+ let cellIsQuotedInfoPhysicalIndicesHeaderRow = [];
57
+ let defaultCsvReadOptions = {
58
+ header: false,
59
+ comments: '#',
60
+ delimiter: '',
61
+ delimitersToGuess: [',', '\t', '|', ';',
62
+ String.fromCharCode(30),
63
+ String.fromCharCode(31),
64
+ ],
65
+ newline: '',
66
+ quoteChar: '"',
67
+ escapeChar: '"',
68
+ skipEmptyLines: true,
69
+ dynamicTyping: false,
70
+ _hasHeader: false,
71
+ };
72
+ let defaultCsvWriteOptions = {
73
+ header: false,
74
+ comments: '#',
75
+ delimiter: '',
76
+ newline: '',
77
+ quoteChar: '"',
78
+ escapeChar: '"',
79
+ quoteAllFields: false,
80
+ quoteEmptyOrNullFields: false,
81
+ };
82
+ let newLineFromInput = '\n';
83
+ let lastHandsonMoveWas = null;
84
+ let highlightCsvComments = true;
85
+ let newColumnQuoteInformationIsQuoted = false;
86
+ let enableWrapping = true;
87
+ let disableBorders = false;
88
+ let fixedRowsTop = 0;
89
+ let fixedColumnsLeft = 0;
90
+ let isFirstHasHeaderChangedEvent = true;
91
+ let isCurrentlyChangingHasHeader = false;
92
+ let initialColumnWidth = 0;
93
+ let initiallyHiddenColumnIndices = [];
94
+ let shouldApplyHasHeaderAfterRowsAdded = false;
95
+ let isReadonlyMode = false;
96
+ let hasOriginalTableStructuralChanges = false;
97
+ let hasFinalNewLine;
98
+ const linkIsOpenableAttribute = 'data-link-is-openable';
99
+ const isOpenUrlKeyDownClass = `is-open-url-key-down`;
100
+ let hoveredATag = null;
101
+ let isMacOpenLinkModifierKey = initialVars.os === 'mac';
102
+ let isMacOS = initialVars.os === `mac`;
103
+ let isBrowser = false;
104
+ let allColWidths = [];
105
+ let isInitialHotRender = true;
106
+ const cssFgColorVariableName = `--text-color`;
107
+ const pageWrapperDiv = _getById('full-page');
108
+ const allOptionsDiv = _getById('all-options');
109
+ const tableActionsDiv = _getById('table-actions');
110
+ const csvEditorWrapper = _getById('csv-editor-wrapper');
111
+ const csvEditorDiv = _getById('csv-editor');
112
+ const helModalDiv = _getById('help-modal');
113
+ const askReadAgainModalDiv = _getById('ask-read-again-modal');
114
+ const askReloadFileModalDiv = _getById('ask-reload-file-modal');
115
+ const sourceFileChangedDiv = _getById('source-file-changed-modal');
116
+ const readContent = _getById('read-options-content');
117
+ const writeContent = _getById('write-options-content');
118
+ const previewContent = _getById('preview-content');
119
+ const btnApplyChangesToFileAndSave = _getById(`btn-apply-changes-to-file-and-save`);
120
+ const btnApplyChangesToFile = vscode ? _getById(`btn-apply-changes-to-file`) : null;
121
+ const readDelimiterTooltip = _getById('read-delimiter-tooltip');
122
+ const readDelimiterTooltipText = "Empty to auto detect";
123
+ const receivedCsvProgBar = _getById('received-csv-prog-bar');
124
+ const receivedCsvProgBarWrapper = _getById('received-csv-prog-bar-wrapper');
125
+ const statusInfo = _getById('status-info');
126
+ const fixedRowsTopInfoSpan = _getById('fixed-rows-top-info');
127
+ const fixedRowsTopIcon = _getById('fixed-rows-icon');
128
+ const fixedRowsTopText = _getById('fixed-rows-text');
129
+ const fixedColumnsTopInfoSpan = _getById('fixed-columns-top-info');
130
+ const fixedColumnsTopIcon = _getById('fixed-columns-icon');
131
+ const fixedColumnsTopText = _getById('fixed-columns-text');
132
+ const showCommentsBtn = _getById('show-comments-btn');
133
+ const hideCommentsBtn = _getById('hide-comments-btn');
134
+ const newlineSameSsInputOption = _getById('newline-same-as-input-option');
135
+ const newlineSameSsInputOptionText = `Same as input`;
136
+ updateNewLineSelect();
137
+ const warningTooltipTextWhenCommentRowNotFirstCellIsUsed = `Please use only the first cell in comment row (others are not exported)`;
138
+ const unsavedChangesIndicator = _getById('unsaved-changes-indicator');
139
+ const reloadFileSpan = _getById('reload-file');
140
+ const sourceFileUnwatchedIndicator = _getById('source-file-unwatched-indicator');
141
+ const hasHeaderReadOptionInput = _getById('has-header');
142
+ const hasHeaderLabel = _getById(`has-header-label`);
143
+ const leftSidePanelToggle = document.getElementById('left-panel-toggle');
144
+ if (vscode && !leftSidePanelToggle)
145
+ throw new Error(`element with id 'left-panel-toggle' not found`);
146
+ const leftPanelToggleIconExpand = document.getElementById(`left-panel-toggle-icon-expand`);
147
+ if (vscode && !leftPanelToggleIconExpand)
148
+ throw new Error(`element with id 'left-panel-toggle-icon-expand' not found`);
149
+ const sideBarResizeHandle = _getById(`side-panel-resize-handle`);
150
+ const sidePanel = _getById(`side-panel`);
151
+ const statSelectedRows = _getById(`stat-selected-rows`);
152
+ const statSelectedCols = _getById(`stat-selected-cols`);
153
+ const statRowsCount = _getById(`stat-rows-count`);
154
+ const statColsCount = _getById(`stat-cols-count`);
155
+ const statSelectedCellsCount = _getById(`stat-selected-cells-count`);
156
+ const statSelectedNotEmptyCells = _getById(`stat-selected-not-empty-cells`);
157
+ const statSumOfNumbers = _getById(`stat-sum-of-numbers`);
158
+ const numbersStyleEnRadio = _getById(`numbers-style-en`);
159
+ const numbersStyleNonEnRadio = _getById(`numbers-style-non-en`);
160
+ const isReadonlyModeToggleSpan = _getById(`is-readonly-mode-toggle`);
161
+ const toolMenuWrapper = _getById(`tools-menu-wrapper`);
162
+ const toolsMenuBtnIcon = _getById(`tools-menu-btn-icon`);
163
+ const findWidgetInstance = new FindWidget();
164
+ setupSideBarResizeHandle();
165
+ setupDropdownHandlers();
166
+ const urlRegex = /(https?):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/gmi;
167
+ let previousSelectedCell = null;
168
+ let previousViewportOffsets = null;
169
+ let previousManualRowHeights = null;
170
+ setCsvReadOptionsInitial(defaultCsvReadOptions);
171
+ setCsvWriteOptionsInitial(defaultCsvWriteOptions);
172
+ if (typeof initialContent === 'undefined') {
173
+ var initialContent = '';
174
+ }
175
+ if (initialContent === undefined) {
176
+ initialContent = '';
177
+ }
178
+ if (!vscode) {
179
+ console.log("initialConfig: ", initialConfig);
180
+ console.log("initialContent: " + initialContent);
181
+ }
182
+ setupAndApplyInitialConfigPart1(initialConfig, initialVars);
183
+ setupGlobalShortcutsInVs();
184
+ if (!vscode) {
185
+ let initialRows = 5;
186
+ let initialCols = 5;
187
+ initialContent = [...Array(initialRows).keys()].map(p => [...Array(initialCols).keys()].map(k => '').join(',')).join('\n');
188
+ }
189
+ let _data = parseCsv(initialContent, defaultCsvReadOptions);
190
+ if (_data && !vscode) {
191
+ displayData(_data, defaultCsvReadOptions);
192
+ }
193
+ if (vscode) {
194
+ receivedCsvProgBarWrapper.style.display = "block";
195
+ window.addEventListener('message', (e) => {
196
+ handleVsCodeMessage(e);
197
+ });
198
+ _postReadyMessage();
199
+ }
200
+ function setupGlobalShortcutsInVs() {
201
+ if (vscode) {
202
+ Mousetrap.bindGlobal(['meta+s', 'ctrl+s'], (e) => {
203
+ e.preventDefault();
204
+ if (hot) {
205
+ let editor = hot.getActiveEditor();
206
+ if (editor.isOpened()) {
207
+ editor.finishEditing(false);
208
+ }
209
+ }
210
+ postApplyContent(true);
211
+ });
212
+ }
213
+ Mousetrap.bindGlobal(['ctrl+ins'], (e) => {
214
+ insertRowBelow();
215
+ });
216
+ Mousetrap.bindGlobal(['ctrl+shift+ins'], (e) => {
217
+ insertRowAbove();
218
+ });
219
+ Mousetrap.bindGlobal(['ctrl+shift+alt+-'], (e) => {
220
+ pretendRemoveRowContextMenuActionClicked();
221
+ });
222
+ document.documentElement.addEventListener('keydown', (e) => {
223
+ if (hoveredATag && isOpenLinkModifierPressed(e)) {
224
+ hoveredATag.classList.add(isOpenUrlKeyDownClass);
225
+ }
226
+ });
227
+ document.documentElement.addEventListener('keyup', (e) => {
228
+ if (hoveredATag) {
229
+ hoveredATag.classList.remove(isOpenUrlKeyDownClass);
230
+ }
231
+ });
232
+ function handleWheel(e) {
233
+ if (!e.ctrlKey)
234
+ return;
235
+ e.preventDefault();
236
+ e.stopPropagation();
237
+ if (e.deltaY > 0) {
238
+ decTableContentZoom();
239
+ }
240
+ else {
241
+ incTableContentZoom();
242
+ }
243
+ }
244
+ document.documentElement.addEventListener(`wheel`, handleWheel, { passive: false });
245
+ }
246
+ //# sourceMappingURL=main.js.map
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/progressbar.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ class Progressbar {
3
+ constructor(id) {
4
+ this.id = id;
5
+ this.el = document.getElementById(id);
6
+ if (!this.el) {
7
+ throw new Error(`could not find element with id ${id}`);
8
+ }
9
+ }
10
+ setValue(percentage) {
11
+ this.el.style.right = `${100 - percentage}%`;
12
+ }
13
+ show() {
14
+ this.el.style.display = 'block';
15
+ }
16
+ hide() {
17
+ this.el.style.display = 'none';
18
+ }
19
+ }
20
+ //# sourceMappingURL=progressbar.js.map
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/csvEditorHtml/out/util.js ADDED
@@ -0,0 +1,1334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ const normalCellValues = new Set([
3
+ `true`,
4
+ `false`,
5
+ ]);
6
+ const knownNumberStylesMap = {
7
+ "en": {
8
+ key: 'en',
9
+ regex: /-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?/,
10
+ regexStartToEnd: /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/,
11
+ thousandSeparator: /(\,| )/gm,
12
+ thousandSeparatorReplaceRegex: /((\,| )\d{3})+/gm
13
+ },
14
+ "non-en": {
15
+ key: 'non-en',
16
+ regex: /-?(\d+(\,\d*)?|\,\d+)(e[+-]?\d+)?/,
17
+ regexStartToEnd: /^-?(\d+(\,\d*)?|\,\d+)(e[+-]?\d+)?$/,
18
+ thousandSeparator: /(\.| )/gm,
19
+ thousandSeparatorReplaceRegex: /((\.| )\d{3})+/gm
20
+ }
21
+ };
22
+ function getNumbersStyleFromUi() {
23
+ if (numbersStyleEnRadio.checked)
24
+ return knownNumberStylesMap['en'];
25
+ if (numbersStyleNonEnRadio.checked)
26
+ return knownNumberStylesMap['non-en'];
27
+ postVsWarning(`Got unknown numbers style from ui, defaulting to 'en'`);
28
+ return knownNumberStylesMap['en'];
29
+ }
30
+ function _getById(id) {
31
+ const el = document.getElementById(id);
32
+ if (!el) {
33
+ _error(`could not find element with id '${id}'`);
34
+ return null;
35
+ }
36
+ return el;
37
+ }
38
+ function ensuredSingleCharacterString(el) {
39
+ if (el.value.length > 1) {
40
+ el.value = el.value.substring(el.value.length - 1);
41
+ }
42
+ }
43
+ function isCommentCell(value, csvReadConfig) {
44
+ if (value === null)
45
+ return false;
46
+ if (typeof csvReadConfig.comments === 'string' && csvReadConfig.comments !== '') {
47
+ return value.trimLeft().startsWith(csvReadConfig.comments);
48
+ }
49
+ return false;
50
+ }
51
+ function containAndExtractUrl(text) {
52
+ urlRegex.lastIndex = 0;
53
+ urlRegex.lastIndex = 0;
54
+ let matches = urlRegex.exec(text);
55
+ if (matches) {
56
+ let urls = [];
57
+ while (matches) {
58
+ urls.push({
59
+ url: matches[0],
60
+ startIndex: matches.index,
61
+ endIndex: matches.index + matches[0].length
62
+ });
63
+ matches = urlRegex.exec(text);
64
+ }
65
+ return urls;
66
+ }
67
+ return null;
68
+ }
69
+ function createCellValueWithUrlLinks(text, urls) {
70
+ const aTags = urls.map(url => {
71
+ const a = document.createElement('a');
72
+ a.href = url.url;
73
+ a.innerText = url.url;
74
+ a.setAttribute('target', '_blank');
75
+ a.setAttribute('rel', 'noopener noreferrer');
76
+ a.setAttribute(linkIsOpenableAttribute, '1');
77
+ a.title = `${getOpenLinkModifierTooltopPart()} ${url.url}`;
78
+ return a;
79
+ });
80
+ let htmlParts = [];
81
+ let currIndex = 0;
82
+ for (let i = 0; i < aTags.length; i++) {
83
+ const aTag = aTags[i];
84
+ const urlObj = urls[i];
85
+ if (currIndex < urlObj.startIndex) {
86
+ htmlParts.push(text.substring(currIndex, urlObj.startIndex));
87
+ }
88
+ aTag.addEventListener(`mouseover`, (e) => {
89
+ aTag.classList.add('link-hovered');
90
+ hoveredATag = aTag;
91
+ if (isOpenLinkModifierPressed(e)) {
92
+ aTag.classList.add(isOpenUrlKeyDownClass);
93
+ }
94
+ });
95
+ aTag.addEventListener(`mouseout`, (e) => {
96
+ aTag.classList.remove('link-hovered');
97
+ aTag.classList.remove(isOpenUrlKeyDownClass);
98
+ hoveredATag = null;
99
+ });
100
+ aTag.addEventListener(`click`, (e) => {
101
+ if (isOpenLinkModifierPressed(e)) {
102
+ return;
103
+ }
104
+ e.stopPropagation();
105
+ e.preventDefault();
106
+ return false;
107
+ });
108
+ htmlParts.push(aTag);
109
+ currIndex = urlObj.endIndex;
110
+ }
111
+ if (currIndex < text.length) {
112
+ htmlParts.push(text.substring(currIndex));
113
+ }
114
+ return htmlParts;
115
+ }
116
+ function _normalizeDataArray(csvParseResult, csvReadConfig, fillString = '') {
117
+ const maxCols = csvParseResult.data.reduce((prev, curr) => curr.length > prev ? curr.length : prev, 0);
118
+ let someRowWasExpanded = false;
119
+ let firstRealRowExpandedWasFound = false;
120
+ if (csvParseResult.cellIsQuotedInfo.length !== csvParseResult.data.length) {
121
+ postVsWarning(`cell quote information length does not match data length, defaulting to setting 'newColumnQuoteInformationIsQuoted': ${newColumnQuoteInformationIsQuoted}`);
122
+ csvParseResult.cellIsQuotedInfo = Array.from(Array(csvParseResult.data.length), () => Array(maxCols).fill(newColumnQuoteInformationIsQuoted));
123
+ }
124
+ for (let i = 0; i < csvParseResult.data.length; i++) {
125
+ const row = csvParseResult.data[i];
126
+ const quoteRowInfo = csvParseResult.cellIsQuotedInfo[i];
127
+ if (isCommentCell(row[0], csvReadConfig) === false && firstRealRowExpandedWasFound === false) {
128
+ firstRealRowExpandedWasFound = true;
129
+ if (row.length < maxCols && csvParseResult.columnIsQuoted !== null) {
130
+ csvParseResult.columnIsQuoted.push(...Array.from(Array(maxCols - row.length), (p, index) => newColumnQuoteInformationIsQuoted));
131
+ }
132
+ }
133
+ if (row.length < maxCols) {
134
+ row.push(...Array.from(Array(maxCols - row.length), (p, index) => fillString));
135
+ if (row.length > 0 && isCommentCell(row[0], csvReadConfig) === false) {
136
+ someRowWasExpanded = true;
137
+ }
138
+ }
139
+ if (quoteRowInfo.length < maxCols) {
140
+ quoteRowInfo.push(...Array.from(Array(maxCols - quoteRowInfo.length), (p, index) => newColumnQuoteInformationIsQuoted));
141
+ }
142
+ }
143
+ if (someRowWasExpanded) {
144
+ console.debug(`[edit csv] csv data changed because one row was extended so that all rows have the same length`);
145
+ postSetEditorHasChanges(true);
146
+ }
147
+ }
148
+ function _resolveInitiallyHiddenColumns(csvParseResult, csvReadConfig) {
149
+ let firstRealRow = null;
150
+ for (let i = 0; i < csvParseResult.data.length; i++) {
151
+ const row = csvParseResult.data[i];
152
+ if (isCommentCell(row[0], csvReadConfig) === false) {
153
+ firstRealRow = row;
154
+ break;
155
+ }
156
+ }
157
+ initiallyHiddenColumnIndices = [];
158
+ if (firstRealRow === null || !initialConfig)
159
+ return;
160
+ let initiallyHiddenColumnIndicesSet = new Set();
161
+ let _initiallyHiddenColumnNames = initialConfig.initiallyHiddenColumnNames ?? [];
162
+ let _initiallyHiddenColumnNumbers = initialConfig.initiallyHiddenColumnNumbers ?? [];
163
+ if (_initiallyHiddenColumnNames.length === 0 && _initiallyHiddenColumnNumbers.length === 0)
164
+ return;
165
+ let colNameToIndicesMap = new Map();
166
+ for (let i = 0; i < firstRealRow.length; i++) {
167
+ const cell = firstRealRow[i];
168
+ let indicesList = colNameToIndicesMap.get(cell);
169
+ if (indicesList === undefined) {
170
+ indicesList = [];
171
+ colNameToIndicesMap.set(cell, indicesList);
172
+ }
173
+ indicesList.push(i);
174
+ }
175
+ for (let i = 0; i < _initiallyHiddenColumnNames.length; i++) {
176
+ const colName = _initiallyHiddenColumnNames[i];
177
+ if (!colNameToIndicesMap.has(colName))
178
+ continue;
179
+ let indicesToHide = colNameToIndicesMap.get(colName);
180
+ if (indicesToHide) {
181
+ indicesToHide.forEach(index => initiallyHiddenColumnIndicesSet.add(index));
182
+ }
183
+ }
184
+ for (let i = 0; i < _initiallyHiddenColumnNumbers.length; i++) {
185
+ let maybeColNumber = _initiallyHiddenColumnNumbers[i];
186
+ if (typeof maybeColNumber === 'string') {
187
+ let check = parseInt(maybeColNumber);
188
+ if (isNaN(check))
189
+ continue;
190
+ maybeColNumber = check;
191
+ }
192
+ let colIndex = maybeColNumber - 1;
193
+ if (colIndex >= 0) {
194
+ initiallyHiddenColumnIndicesSet.add(colIndex);
195
+ }
196
+ }
197
+ initiallyHiddenColumnIndices = Array.from(initiallyHiddenColumnIndicesSet);
198
+ if (initiallyHiddenColumnIndices.length === firstRealRow.length) {
199
+ console.warn(`initially hidden columns: all columns are hidden, this is not allowed`);
200
+ initiallyHiddenColumnIndices = [];
201
+ }
202
+ }
203
+ function _hideColumnByIndices(columnIndices) {
204
+ if (!hot)
205
+ return;
206
+ for (let i = 0; i < columnIndices.length; i++) {
207
+ const targetColIndex = columnIndices[i];
208
+ const physicalColIndex = hot.toPhysicalColumn(targetColIndex);
209
+ hiddenPhysicalColumnIndicesSorted.push(physicalColIndex);
210
+ const manualColumnResizePlugin = hot.getPlugin('manualColumnResize');
211
+ manualColumnResizePlugin.manualColumnWidths[physicalColIndex] = undefined;
212
+ }
213
+ hiddenPhysicalColumnIndicesSorted = hiddenPhysicalColumnIndicesSorted.sort();
214
+ firstAndLastVisibleColumns = getFirstAndLastVisibleColumns();
215
+ hot.render();
216
+ }
217
+ function _unhideAllColumns() {
218
+ if (!hot)
219
+ return;
220
+ let manualColumnResizePlugin = hot.getPlugin('manualColumnResize');
221
+ for (let i = 0; i < hiddenPhysicalColumnIndicesSorted.length; i++) {
222
+ const visualColIndex = hot.toVisualColumn(hiddenPhysicalColumnIndicesSorted[i]);
223
+ manualColumnResizePlugin.clearManualSize(visualColIndex);
224
+ }
225
+ hiddenPhysicalColumnIndicesSorted = [];
226
+ firstAndLastVisibleColumns = getFirstAndLastVisibleColumns();
227
+ hot.render();
228
+ }
229
+ function _getCommentIndices(data, csvReadConfig) {
230
+ if (typeof csvReadConfig.comments !== "string")
231
+ return [];
232
+ let commentIndices = [];
233
+ for (let i = 0; i < data.length; i++) {
234
+ const row = data[i];
235
+ if (row.length > 0 && row[0] !== null && isCommentCell(row[0], csvReadConfig)) {
236
+ commentIndices.push(i);
237
+ }
238
+ }
239
+ return commentIndices;
240
+ }
241
+ function getSpreadsheetColumnLabel(index) {
242
+ return `column ${index + 1}`;
243
+ }
244
+ const COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
245
+ const COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;
246
+ function spreadsheetColumnLetterLabel(index) {
247
+ let num = index;
248
+ let columnLabel = '';
249
+ while (num >= 0) {
250
+ columnLabel = COLUMN_LABEL_BASE[num % 26] + columnLabel;
251
+ num = Math.floor(num / 26) - 1;
252
+ }
253
+ return columnLabel;
254
+ }
255
+ function addColumn(selectNewColumn = true) {
256
+ if (!hot)
257
+ throw new Error('table was null');
258
+ const numCols = hot.countCols();
259
+ hot.alter('insert_col', numCols);
260
+ checkIfHasHeaderReadOptionIsAvailable(false);
261
+ const pos = hot.getSelected();
262
+ if (pos && pos.length === 1) {
263
+ if (selectNewColumn) {
264
+ hot.selectCell(pos[0][0], numCols);
265
+ }
266
+ }
267
+ }
268
+ function addRow(selectNewRow = true) {
269
+ if (!hot)
270
+ throw new Error('table was null');
271
+ const numRows = hot.countRows();
272
+ hot.alter('insert_row', numRows);
273
+ firstAndLastVisibleRows = getFirstAndLastVisibleRows();
274
+ if (selectNewRow) {
275
+ hot.selectCell(numRows, 0);
276
+ }
277
+ checkAutoApplyHasHeader();
278
+ }
279
+ function _getSelectedVisualRowIndex() {
280
+ if (!hot)
281
+ throw new Error('table was null');
282
+ const selections = hot.getSelected();
283
+ if (!selections?.length)
284
+ return null;
285
+ const firstSelection = selections[0];
286
+ const rowIndex = firstSelection[0];
287
+ return rowIndex;
288
+ }
289
+ function _getSelectedVisualColIndex() {
290
+ if (!hot)
291
+ throw new Error('table was null');
292
+ const selections = hot.getSelected();
293
+ if (!selections?.length)
294
+ return null;
295
+ const firstSelection = selections[0];
296
+ const rowIndex = firstSelection[1];
297
+ return rowIndex;
298
+ }
299
+ function insertRowAbove() {
300
+ if (isReadonlyMode)
301
+ return;
302
+ _insertRowInternal(false);
303
+ }
304
+ function insertRowBelow() {
305
+ if (isReadonlyMode)
306
+ return;
307
+ _insertRowInternal(true);
308
+ }
309
+ function _insertRowInternal(belowCurrRow) {
310
+ if (!hot)
311
+ throw new Error('table was null');
312
+ const currRowIndex = _getSelectedVisualRowIndex();
313
+ const currColIndex = _getSelectedVisualColIndex();
314
+ if (currRowIndex === null || currColIndex === null)
315
+ return;
316
+ const targetRowIndex = currRowIndex + (belowCurrRow ? 1 : 0);
317
+ hot.alter('insert_row', targetRowIndex);
318
+ const focusBehavior = initialConfig?.insertRowBehavior ?? 'focusFirstCellNewRow';
319
+ switch (focusBehavior) {
320
+ case 'focusFirstCellNewRow': {
321
+ hot.selectCell(targetRowIndex, 0);
322
+ break;
323
+ }
324
+ case 'keepRowKeepColumn': {
325
+ hot.selectCell(targetRowIndex + (belowCurrRow ? -1 : 1), currColIndex);
326
+ break;
327
+ }
328
+ default: notExhaustiveSwitch(focusBehavior);
329
+ }
330
+ checkAutoApplyHasHeader();
331
+ }
332
+ function insertColLeft(selectNewCol = true, preserveSelectedRow = true) {
333
+ if (isReadonlyMode)
334
+ return;
335
+ _insertColInternal(false);
336
+ }
337
+ function insertColRight(selectNewCol = true, preserveSelectedRow = true) {
338
+ if (isReadonlyMode)
339
+ return;
340
+ _insertColInternal(true);
341
+ }
342
+ function _insertColInternal(afterCurrCol) {
343
+ if (!hot)
344
+ throw new Error('table was null');
345
+ const currColIndex = _getSelectedVisualColIndex();
346
+ const currRowIndex = _getSelectedVisualRowIndex();
347
+ if (currRowIndex === null || currColIndex === null)
348
+ return;
349
+ const targetColIndex = currColIndex + (afterCurrCol ? 1 : 0);
350
+ hot.alter('insert_col', targetColIndex);
351
+ const focusBehavior = initialConfig?.insertColBehavior ?? 'keepRowKeepColumn';
352
+ switch (focusBehavior) {
353
+ case 'keepRowFocusNewColumn': {
354
+ hot.selectCell(currRowIndex, targetColIndex);
355
+ break;
356
+ }
357
+ case 'keepRowKeepColumn': {
358
+ hot.selectCell(currRowIndex, targetColIndex + (afterCurrCol ? -1 : 1));
359
+ break;
360
+ }
361
+ default: notExhaustiveSwitch(focusBehavior);
362
+ }
363
+ }
364
+ function getIsCallRemoveRowContextMenuActionDisabled() {
365
+ if (isReadonlyMode)
366
+ return true;
367
+ const selection = hot.getSelected();
368
+ let allRowsAreSelected = false;
369
+ if (selection) {
370
+ const selectedRowsCount = Math.abs(selection[0][0] - selection[0][2]);
371
+ allRowsAreSelected = hot.countRows() === selectedRowsCount + 1;
372
+ }
373
+ return hot.countRows() === 1 || allRowsAreSelected;
374
+ }
375
+ function pretendRemoveRowContextMenuActionClicked() {
376
+ if (!hot)
377
+ return;
378
+ let isMenuActionDisabled = getIsCallRemoveRowContextMenuActionDisabled();
379
+ if (isMenuActionDisabled)
380
+ return;
381
+ const activeEditor = hot.getActiveEditor();
382
+ if (activeEditor && activeEditor.isOpened()) {
383
+ activeEditor.finishEditing(true);
384
+ activeEditor.close();
385
+ }
386
+ const currRowIndex = _getSelectedVisualRowIndex();
387
+ if (currRowIndex === null)
388
+ return;
389
+ const selRanges = hot.getSelectedRange();
390
+ const normalizedSelection = selRanges
391
+ ? selRanges.map(range => ({
392
+ start: range.getTopLeftCorner(),
393
+ end: range.getBottomRightCorner(),
394
+ }))
395
+ : [];
396
+ hot.getPlugin('contextMenu')?.executeCommand('remove_row', normalizedSelection);
397
+ }
398
+ function removeRow(index) {
399
+ if (isReadonlyMode)
400
+ return;
401
+ if (!hot)
402
+ throw new Error('table was null');
403
+ hot.alter('remove_row', index);
404
+ checkIfHasHeaderReadOptionIsAvailable(false);
405
+ }
406
+ function removeColumn(index) {
407
+ if (isReadonlyMode)
408
+ return;
409
+ if (!hot)
410
+ throw new Error('table was null');
411
+ hot.alter('remove_col', index);
412
+ checkIfHasHeaderReadOptionIsAvailable(false);
413
+ }
414
+ function commentValueAndUrlsRenderer(instance, td, row, col, prop, value, cellProperties) {
415
+ let isCellWithUrls = initialConfig?.convertUrlsToLinkTags
416
+ ? value && (value.indexOf("http://") >= 0 || value.indexOf("https://") >= 0)
417
+ : false;
418
+ if (isCellWithUrls) {
419
+ const urls = containAndExtractUrl(value);
420
+ if (urls !== null) {
421
+ const htmlParts = createCellValueWithUrlLinks(value, urls);
422
+ Handsontable.dom.empty(td);
423
+ td.append(...htmlParts);
424
+ Handsontable.renderers.BaseRenderer.apply(this, arguments);
425
+ }
426
+ else {
427
+ Handsontable.renderers.TextRenderer.apply(this, arguments);
428
+ }
429
+ }
430
+ else {
431
+ Handsontable.renderers.TextRenderer.apply(this, arguments);
432
+ }
433
+ if (highlightCsvComments) {
434
+ if (value !== null && col === 0 && isCommentCell(value, defaultCsvReadOptions)) {
435
+ if (td && td.nextSibling) {
436
+ td.nextSibling.title = warningTooltipTextWhenCommentRowNotFirstCellIsUsed;
437
+ }
438
+ if (td && td.parentElement) {
439
+ td.parentElement.classList.add('comment-row');
440
+ }
441
+ }
442
+ }
443
+ if (isCellWithUrls) {
444
+ return td;
445
+ }
446
+ }
447
+ Handsontable.renderers.registerRenderer('commentValueAndUrlsRenderer', commentValueAndUrlsRenderer);
448
+ function _setOption(targetOptions, options, optionName) {
449
+ if (options.hasOwnProperty(optionName)) {
450
+ if (targetOptions.hasOwnProperty(optionName) === false) {
451
+ _error(`target options object has not property '${String(optionName)}'`);
452
+ return;
453
+ }
454
+ targetOptions[optionName] = options[optionName];
455
+ }
456
+ else {
457
+ _error(`options object has not property '${String(optionName)}'`);
458
+ }
459
+ }
460
+ function setCsvReadOptionsInitial(options) {
461
+ const keys = Object.keys(defaultCsvReadOptions);
462
+ for (const key of keys) {
463
+ _setOption(defaultCsvReadOptions, options, key);
464
+ }
465
+ const el1 = _getById('delimiter-string');
466
+ el1.value = defaultCsvReadOptions.delimiter;
467
+ const el3 = hasHeaderReadOptionInput;
468
+ el3.checked = defaultCsvReadOptions._hasHeader;
469
+ const el4 = _getById('comment-string');
470
+ el4.value = defaultCsvReadOptions.comments === false ? '' : defaultCsvReadOptions.comments;
471
+ const el5 = _getById('quote-char-string');
472
+ el5.value = defaultCsvReadOptions.quoteChar;
473
+ const el6 = _getById('escape-char-string');
474
+ el6.value = defaultCsvReadOptions.escapeChar;
475
+ }
476
+ function setCsvWriteOptionsInitial(options) {
477
+ const keys = Object.keys(defaultCsvWriteOptions);
478
+ for (const key of keys) {
479
+ _setOption(defaultCsvWriteOptions, options, key);
480
+ }
481
+ const el1 = _getById('has-header-write');
482
+ el1.checked = defaultCsvWriteOptions.header;
483
+ const el2 = _getById('delimiter-string-write');
484
+ el2.value = defaultCsvWriteOptions.delimiter;
485
+ const el3 = _getById('comment-string-write');
486
+ el3.value = defaultCsvWriteOptions.comments === false ? '' : defaultCsvWriteOptions.comments;
487
+ const el4 = _getById('quote-char-string-write');
488
+ el4.value = defaultCsvWriteOptions.quoteChar;
489
+ const el5 = _getById('escape-char-string-write');
490
+ el5.value = defaultCsvWriteOptions.quoteChar;
491
+ const el6 = _getById('quote-all-fields-write');
492
+ el6.checked = defaultCsvWriteOptions.quoteAllFields;
493
+ }
494
+ function checkIfHasHeaderReadOptionIsAvailable(isInitialRender) {
495
+ const data = getData();
496
+ const el = hasHeaderReadOptionInput;
497
+ let canSetOption = false;
498
+ if (isInitialRender) {
499
+ canSetOption = data.length > 1;
500
+ }
501
+ else {
502
+ if (defaultCsvReadOptions._hasHeader) {
503
+ canSetOption = data.length >= 1;
504
+ }
505
+ else {
506
+ canSetOption = data.length > 1;
507
+ }
508
+ }
509
+ if (canSetOption) {
510
+ const firstRow = getFirstRowWithIndex();
511
+ if (firstRow === null && !el.checked) {
512
+ canSetOption = false;
513
+ }
514
+ }
515
+ if (canSetOption) {
516
+ }
517
+ else {
518
+ defaultCsvReadOptions._hasHeader = false;
519
+ el.checked = false;
520
+ return false;
521
+ }
522
+ return true;
523
+ }
524
+ function throttle(func, wait) {
525
+ var context, args, result;
526
+ var timeout = null;
527
+ var previous = 0;
528
+ var later = function () {
529
+ previous = Date.now();
530
+ timeout = null;
531
+ result = func.apply(context, args);
532
+ if (!timeout)
533
+ context = args = null;
534
+ };
535
+ return function () {
536
+ var now = Date.now();
537
+ var remaining = wait - (now - previous);
538
+ context = this;
539
+ args = arguments;
540
+ if (remaining <= 0 || remaining > wait) {
541
+ if (timeout) {
542
+ clearTimeout(timeout);
543
+ timeout = null;
544
+ }
545
+ previous = now;
546
+ result = func.apply(context, args);
547
+ if (!timeout)
548
+ context = args = null;
549
+ }
550
+ else if (!timeout) {
551
+ timeout = setTimeout(later, remaining);
552
+ }
553
+ return result;
554
+ };
555
+ }
556
+ function debounce(func, wait, immediate = false) {
557
+ var timeout;
558
+ return function () {
559
+ var context = this, args = arguments;
560
+ var later = function () {
561
+ timeout = null;
562
+ if (!immediate)
563
+ func.apply(context, args);
564
+ };
565
+ var callNow = immediate && !timeout;
566
+ clearTimeout(timeout);
567
+ timeout = setTimeout(later, wait);
568
+ if (callNow)
569
+ func.apply(context, args);
570
+ };
571
+ }
572
+ function _error(text) {
573
+ postVsError(text);
574
+ throw new Error(text);
575
+ }
576
+ function setupAndApplyInitialConfigPart1(initialConfig, initialVars) {
577
+ {
578
+ _setIsWatchingSourceFileUiIndicator(initialVars.isWatchingSourceFile);
579
+ }
580
+ if (initialConfig === undefined) {
581
+ toggleOptionsBar(true);
582
+ showCommentsBtn.style.display = 'none';
583
+ hideCommentsBtn.style.display = '';
584
+ return;
585
+ }
586
+ highlightCsvComments = initialConfig.highlightCsvComments;
587
+ enableWrapping = initialConfig.enableWrapping;
588
+ initialColumnWidth = initialConfig.initialColumnWidth;
589
+ newColumnQuoteInformationIsQuoted = initialConfig.newColumnQuoteInformationIsQuoted;
590
+ fixedRowsTop = Math.max(initialConfig.initiallyFixedRowsTop, 0);
591
+ fixedColumnsLeft = Math.max(initialConfig.initiallyFixedColumnsLeft, 0);
592
+ disableBorders = initialConfig.disableBorders;
593
+ if (disableBorders) {
594
+ const style = document.createElement('style');
595
+ style.type = 'text/css';
596
+ style.innerHTML = `.vscode-dark td, th { border: 0px !important; }`;
597
+ document.getElementsByTagName('head')[0].appendChild(style);
598
+ }
599
+ changeFontSizeInPx(initialConfig.fontSizeInPx);
600
+ const copyReadOptions = {
601
+ ...defaultCsvReadOptions
602
+ };
603
+ let _readOption_hasHeader = initialConfig.readOption_hasHeader === 'true' ? true : false;
604
+ if (_readOption_hasHeader) {
605
+ isFirstHasHeaderChangedEvent = true;
606
+ }
607
+ else {
608
+ isFirstHasHeaderChangedEvent = false;
609
+ }
610
+ setCsvReadOptionsInitial({
611
+ ...copyReadOptions,
612
+ delimiter: initialConfig.readOption_delimiter,
613
+ delimitersToGuess: initialConfig.readOption_delimitersToGuess,
614
+ comments: initialConfig.readOption_comment,
615
+ _hasHeader: _readOption_hasHeader,
616
+ escapeChar: initialConfig.readOption_escapeChar,
617
+ quoteChar: initialConfig.readOption_quoteChar,
618
+ });
619
+ const copyWriteOptions = {
620
+ ...defaultCsvReadOptions
621
+ };
622
+ setCsvWriteOptionsInitial({
623
+ ...copyWriteOptions,
624
+ comments: initialConfig.writeOption_comment,
625
+ delimiter: initialConfig.writeOption_delimiter,
626
+ header: initialConfig.writeOption_hasHeader === 'true' ? true : false,
627
+ escapeChar: initialConfig.writeOption_escapeChar,
628
+ quoteChar: initialConfig.writeOption_quoteChar,
629
+ quoteAllFields: initialConfig.quoteAllFields,
630
+ quoteEmptyOrNullFields: initialConfig.quoteEmptyOrNullFields === 'true' ? true : false,
631
+ });
632
+ switch (initialConfig.optionsBarAppearance) {
633
+ case 'expanded': {
634
+ toggleOptionsBar(false);
635
+ break;
636
+ }
637
+ case 'collapsed': {
638
+ toggleOptionsBar(true);
639
+ break;
640
+ }
641
+ default: {
642
+ _error(`unknown optionsBarAppearance: ${initialConfig.optionsBarAppearance}`);
643
+ notExhaustiveSwitch(initialConfig.optionsBarAppearance);
644
+ break;
645
+ }
646
+ }
647
+ if (initialConfig.initiallyHideComments) {
648
+ showCommentsBtn.style.display = '';
649
+ hideCommentsBtn.style.display = 'none';
650
+ }
651
+ else {
652
+ showCommentsBtn.style.display = 'none';
653
+ hideCommentsBtn.style.display = '';
654
+ }
655
+ fixedRowsTopInfoSpan.innerText = fixedRowsTop + '';
656
+ fixedColumnsTopInfoSpan.innerText = fixedColumnsLeft + '';
657
+ isReadonlyMode = initialConfig.initiallyIsInReadonlyMode;
658
+ _updateToggleReadonlyModeUi();
659
+ setNumbersStyleUi(initialConfig.initialNumbersStyle);
660
+ for (let i = 0; i < document.styleSheets.length; i++) {
661
+ const styleSheet = document.styleSheets[i];
662
+ if (!styleSheet.href?.toLowerCase().endsWith(`dark.css`) &&
663
+ !styleSheet.href?.toLowerCase().endsWith(`light.css`))
664
+ continue;
665
+ for (let j = 0; j < styleSheet.cssRules.length; j++) {
666
+ const cssRule = styleSheet.cssRules[j];
667
+ if (cssRule instanceof CSSStyleRule) {
668
+ const cssStyleRule = cssRule;
669
+ if (cssStyleRule.selectorText === `body.vscode-light`) {
670
+ cssStyleRule.style.setProperty(cssFgColorVariableName, initialConfig.lightThemeTextColor);
671
+ }
672
+ if (cssStyleRule.selectorText === `body.vscode-dark`) {
673
+ cssStyleRule.style.setProperty(cssFgColorVariableName, initialConfig.darkThemeTextColor);
674
+ }
675
+ }
676
+ }
677
+ }
678
+ }
679
+ function _getVsState() {
680
+ if (!vscode)
681
+ return _createDefaultVsState();
682
+ const state = vscode.getState();
683
+ if (!state)
684
+ return _createDefaultVsState();
685
+ return state;
686
+ }
687
+ function _createDefaultVsState() {
688
+ return {
689
+ previewIsCollapsed: true,
690
+ readOptionIsCollapsed: true,
691
+ writeOptionIsCollapsed: true
692
+ };
693
+ }
694
+ function _setReadOptionCollapsedVsState(isCollapsed) {
695
+ if (vscode) {
696
+ }
697
+ }
698
+ function _setWriteOptionCollapsedVsState(isCollapsed) {
699
+ if (vscode) {
700
+ }
701
+ }
702
+ function _setPreviewCollapsedVsState(isCollapsed) {
703
+ if (vscode) {
704
+ }
705
+ }
706
+ function customSearchMethod(query, value) {
707
+ if (query === null || query === undefined || value === null || value === undefined)
708
+ return false;
709
+ if (query === '')
710
+ return false;
711
+ if (!findWidgetInstance.findOptionMatchCaseCache) {
712
+ value = value.toLowerCase();
713
+ query = query.toLowerCase();
714
+ }
715
+ if (findWidgetInstance.findOptionTrimCellCache) {
716
+ value = value.trim();
717
+ }
718
+ if (findWidgetInstance.findOptionUseRegexCache) {
719
+ if (findWidgetInstance.findWidgetCurrRegex === null) {
720
+ throw new Error('should not happen...');
721
+ }
722
+ let result = findWidgetInstance.findWidgetCurrRegex.exec(value);
723
+ if (findWidgetInstance.findOptionMatchWholeCellCache) {
724
+ if (result !== null && result.length > 0) {
725
+ return result[0] === value;
726
+ }
727
+ }
728
+ return result !== null;
729
+ }
730
+ else {
731
+ if (findWidgetInstance.findOptionMatchWholeCellCache) {
732
+ return value === query;
733
+ }
734
+ return value.indexOf(query) !== -1;
735
+ }
736
+ }
737
+ function afterHandsontableCreated(hot) {
738
+ const afterSelectionHandler = (row, column, row2, column2) => {
739
+ if (getIsSidePanelCollapsed()) {
740
+ }
741
+ else {
742
+ calculateStats(row, column, row2, column2);
743
+ }
744
+ };
745
+ hot.addHook('afterSelection', afterSelectionHandler);
746
+ const afterRowOrColsCountChangeHandler = () => {
747
+ statRowsCount.innerText = `${hot.countRows()}`;
748
+ statColsCount.innerText = `${hot.countCols()}`;
749
+ };
750
+ hot.addHook('afterRemoveRow', afterRowOrColsCountChangeHandler);
751
+ hot.addHook('afterCreateRow', afterRowOrColsCountChangeHandler);
752
+ hot.addHook('afterCreateCol', afterRowOrColsCountChangeHandler);
753
+ hot.addHook('afterRemoveCol', afterRowOrColsCountChangeHandler);
754
+ statSelectedRows.innerText = `${0}`;
755
+ statSelectedCols.innerText = `${0}`;
756
+ statSelectedNotEmptyCells.innerText = `${0}`;
757
+ statSumOfNumbers.innerText = `${0}`;
758
+ statSelectedCellsCount.innerText = `${0}`;
759
+ statRowsCount.innerText = `${hot.countRows()}`;
760
+ statColsCount.innerText = `${hot.countCols()}`;
761
+ }
762
+ function recalculateStats() {
763
+ const selectedRanges = hot.getSelected();
764
+ if (!selectedRanges)
765
+ return;
766
+ const firstRange = selectedRanges[0];
767
+ calculateStats(...firstRange);
768
+ }
769
+ function _calculateStats(row, column, row2, column2) {
770
+ let numbersStyleToUse = getNumbersStyleFromUi();
771
+ let rowsCount = Math.abs(row2 - row) + 1;
772
+ let colsCount = Math.abs(column2 - column) + 1;
773
+ statSelectedRows.innerText = `${rowsCount}`;
774
+ statSelectedCols.innerText = `${colsCount}`;
775
+ statSelectedCellsCount.innerText = `${rowsCount * colsCount}`;
776
+ let notEmptyCount = 0;
777
+ let numbersSum = Big(0);
778
+ let containsInvalidNumbers = false;
779
+ let minR = Math.min(row, row2);
780
+ let maxR = Math.max(row, row2);
781
+ for (let index = minR; index <= maxR; index++) {
782
+ const data = hot.getDataAtRow(index);
783
+ let minC = Math.min(column, column2);
784
+ let maxC = Math.max(column, column2);
785
+ for (let i = minC; i <= maxC; i++) {
786
+ const el = data[i];
787
+ if (el !== '' && el !== null) {
788
+ notEmptyCount++;
789
+ if (!containsInvalidNumbers) {
790
+ const firstCanonicalNumberStringInCell = getFirstCanonicalNumberStringInCell(el, numbersStyleToUse);
791
+ if (firstCanonicalNumberStringInCell === null)
792
+ continue;
793
+ try {
794
+ let _num = Big(firstCanonicalNumberStringInCell);
795
+ numbersSum = numbersSum.plus(_num);
796
+ }
797
+ catch (error) {
798
+ console.warn(`could not create or add number to statSumOfNumbers at row: ${index}, col: ${i}`, error);
799
+ containsInvalidNumbers = true;
800
+ }
801
+ }
802
+ }
803
+ }
804
+ }
805
+ statSelectedNotEmptyCells.innerText = `${notEmptyCount}`;
806
+ statSumOfNumbers.innerText = containsInvalidNumbers
807
+ ? `Some invalid num`
808
+ : `${formatBigJsNumber(numbersSum, numbersStyleToUse)}`;
809
+ }
810
+ const calculateStats = throttle(_calculateStats, 300);
811
+ function getFirstCanonicalNumberStringInCell(cellValue, numbersStyle) {
812
+ let cellContent = cellValue;
813
+ let thousandSeparatorsMatches;
814
+ while (thousandSeparatorsMatches = numbersStyle.thousandSeparatorReplaceRegex.exec(cellValue)) {
815
+ let replaceContent = thousandSeparatorsMatches[0].replace(numbersStyle.thousandSeparator, '');
816
+ cellContent = cellContent.replace(thousandSeparatorsMatches[0], replaceContent);
817
+ }
818
+ let numberRegexRes = numbersStyle.regex.exec(cellContent);
819
+ if (!numberRegexRes || numberRegexRes.length === 0)
820
+ return null;
821
+ return numberRegexRes[0].replace(/\,/gm, '.');
822
+ }
823
+ function checkCellOnlyContainsSingleNumber(cellValue, numbersStyle) {
824
+ let cellContent = cellValue;
825
+ let matchSize = 0;
826
+ let originalSize = cellValue.length;
827
+ let thousandSeparatorsMatches;
828
+ while (thousandSeparatorsMatches = numbersStyle.thousandSeparatorReplaceRegex.exec(cellValue)) {
829
+ let replaceContent = thousandSeparatorsMatches[0].replace(numbersStyle.thousandSeparator, '');
830
+ matchSize += thousandSeparatorsMatches[0].length - replaceContent.length;
831
+ cellContent = cellContent.replace(thousandSeparatorsMatches[0], replaceContent);
832
+ }
833
+ let numberRegexRes = numbersStyle.regex.exec(cellContent);
834
+ if (!numberRegexRes || numberRegexRes.length === 0)
835
+ return false;
836
+ matchSize += numberRegexRes[0].length;
837
+ return matchSize === originalSize;
838
+ }
839
+ function setNumbersStyleUi(numbersStyleToUse) {
840
+ numbersStyleEnRadio.checked = false;
841
+ numbersStyleNonEnRadio.checked = false;
842
+ numbersStyleEnRadio.removeAttribute('checked');
843
+ numbersStyleEnRadio.removeAttribute('checked');
844
+ switch (numbersStyleToUse) {
845
+ case 'en': {
846
+ numbersStyleEnRadio.checked = true;
847
+ numbersStyleEnRadio.setAttribute('checked', 'true');
848
+ break;
849
+ }
850
+ case 'non-en': {
851
+ numbersStyleNonEnRadio.checked = true;
852
+ numbersStyleNonEnRadio.setAttribute('checked', 'true');
853
+ break;
854
+ }
855
+ default:
856
+ notExhaustiveSwitch(numbersStyleToUse);
857
+ }
858
+ }
859
+ const b = new Big(1);
860
+ function formatBigJsNumber(bigJsNumber, numbersStyleToUse) {
861
+ switch (numbersStyleToUse.key) {
862
+ case 'en': {
863
+ bigJsNumber.format = {
864
+ decimalSeparator: '.',
865
+ groupSeparator: '',
866
+ };
867
+ break;
868
+ }
869
+ case 'non-en': {
870
+ bigJsNumber.format = {
871
+ decimalSeparator: ',',
872
+ groupSeparator: '',
873
+ };
874
+ break;
875
+ }
876
+ default:
877
+ notExhaustiveSwitch(numbersStyleToUse.key);
878
+ }
879
+ return bigJsNumber.toFormat();
880
+ }
881
+ function calcHotCellToSelectFromCurosPos(openTableAndSelectCellAtCursorPos, sourceFileCursorLineIndex, sourceFileCursorColumnIndex, isCursorPosAfterLastColumn, csvParseResult, csvReadOptions) {
882
+ if (openTableAndSelectCellAtCursorPos === 'never'
883
+ || sourceFileCursorLineIndex === null
884
+ || sourceFileCursorColumnIndex === null
885
+ || !csvParseResult
886
+ || !csvParseResult.outLineIndexToCsvLineIndexMapping
887
+ || !csvParseResult.outColumnIndexToCsvColumnIndexMapping) {
888
+ return {
889
+ rowIndex: 0,
890
+ colIndex: 0,
891
+ };
892
+ }
893
+ let modifySelectedRowBecauseIfHeaderBy = 0;
894
+ let csvRowToSelect = 0;
895
+ let csvColToSelect = 0;
896
+ try {
897
+ let currentCsvRowStartTextFileLineIndex = 0;
898
+ let currentCsvRowEndTextFileLineIndex = 0;
899
+ let currentCursorColAsCsvCol = sourceFileCursorColumnIndex ?? 0;
900
+ if (sourceFileCursorLineIndex < csvParseResult.outLineIndexToCsvLineIndexMapping.length) {
901
+ csvRowToSelect = csvParseResult.outLineIndexToCsvLineIndexMapping[sourceFileCursorLineIndex];
902
+ currentCsvRowStartTextFileLineIndex = csvParseResult.outLineIndexToCsvLineIndexMapping.indexOf(csvRowToSelect);
903
+ currentCsvRowEndTextFileLineIndex = currentCsvRowStartTextFileLineIndex;
904
+ if (currentCsvRowStartTextFileLineIndex === -1) {
905
+ throw new Error(`Could not find text line for csv row ${csvRowToSelect}`);
906
+ }
907
+ {
908
+ for (let i = currentCsvRowStartTextFileLineIndex; i < csvParseResult.outLineIndexToCsvLineIndexMapping.length; i++) {
909
+ let csvRowIndex = csvParseResult.outLineIndexToCsvLineIndexMapping[i];
910
+ if (csvRowIndex === csvRowToSelect) {
911
+ currentCsvRowEndTextFileLineIndex = i;
912
+ continue;
913
+ }
914
+ break;
915
+ }
916
+ }
917
+ if (currentCsvRowStartTextFileLineIndex !== currentCsvRowEndTextFileLineIndex) {
918
+ let allLines = csvParseResult.originalContent.split('\n');
919
+ let startLineToSearch = currentCsvRowStartTextFileLineIndex;
920
+ let maxTextLineToSearch = sourceFileCursorLineIndex - 1;
921
+ currentCursorColAsCsvCol = 0;
922
+ for (let i = startLineToSearch; i <= maxTextLineToSearch; i++) {
923
+ const textFileLine = allLines[i];
924
+ currentCursorColAsCsvCol += textFileLine.length + 1;
925
+ }
926
+ currentCursorColAsCsvCol += sourceFileCursorColumnIndex ?? 0;
927
+ }
928
+ }
929
+ if (openTableAndSelectCellAtCursorPos === 'initialOnly_correctRowAndColumn') {
930
+ let fieldEndIndices = csvParseResult.outColumnIndexToCsvColumnIndexMapping[csvRowToSelect];
931
+ let findColByEndIndex = true;
932
+ if (isCursorPosAfterLastColumn) {
933
+ if (currentCsvRowStartTextFileLineIndex !== currentCsvRowEndTextFileLineIndex) {
934
+ if (sourceFileCursorLineIndex === currentCsvRowEndTextFileLineIndex) {
935
+ csvColToSelect = fieldEndIndices.length - 1;
936
+ findColByEndIndex = false;
937
+ }
938
+ else {
939
+ findColByEndIndex = true;
940
+ }
941
+ }
942
+ else {
943
+ csvColToSelect = fieldEndIndices.length - 1;
944
+ findColByEndIndex = false;
945
+ }
946
+ }
947
+ else {
948
+ findColByEndIndex = true;
949
+ }
950
+ if (findColByEndIndex) {
951
+ for (let i = 0; i < fieldEndIndices.length; i++) {
952
+ let colEndIndex = fieldEndIndices[i];
953
+ if (currentCursorColAsCsvCol <= colEndIndex) {
954
+ csvColToSelect = i;
955
+ break;
956
+ }
957
+ }
958
+ }
959
+ }
960
+ if (csvReadOptions._hasHeader) {
961
+ let csvHeaderRowIndex = 0;
962
+ for (let i = 0; i < csvParseResult.data.length; i++) {
963
+ const csvRow = csvParseResult.data[i];
964
+ if (csvRow.length > 0 && isCommentCell(csvRow[0], csvReadOptions) === false) {
965
+ csvHeaderRowIndex = i;
966
+ break;
967
+ }
968
+ }
969
+ if (csvRowToSelect === csvHeaderRowIndex) {
970
+ csvRowToSelect++;
971
+ modifySelectedRowBecauseIfHeaderBy = -1;
972
+ }
973
+ else if (csvRowToSelect > csvHeaderRowIndex) {
974
+ modifySelectedRowBecauseIfHeaderBy = -1;
975
+ }
976
+ else {
977
+ if (hiddenPhysicalRowIndicesSorted.length > 0) {
978
+ csvRowToSelect = getNextRowIfCommentsAreHidden(csvHeaderRowIndex + 1);
979
+ modifySelectedRowBecauseIfHeaderBy = -1;
980
+ }
981
+ }
982
+ }
983
+ }
984
+ catch (e) {
985
+ console.warn(`[edit csv] could not select line ${sourceFileCursorLineIndex ?? -1} or column ${sourceFileCursorColumnIndex ?? -1}`, e);
986
+ return {
987
+ rowIndex: 0,
988
+ colIndex: 0
989
+ };
990
+ }
991
+ let selectCellPos = {
992
+ rowIndex: Math.max(0, csvRowToSelect),
993
+ colIndex: Math.max(0, csvColToSelect)
994
+ };
995
+ selectCellPos.rowIndex = getNextRowIfCommentsAreHidden(selectCellPos.rowIndex);
996
+ selectCellPos.rowIndex += modifySelectedRowBecauseIfHeaderBy;
997
+ try {
998
+ selectCellPos.rowIndex = Math.max(0, Math.min(csvParseResult.data.length - 1, selectCellPos.rowIndex));
999
+ let dataRow = csvParseResult.data[selectCellPos.rowIndex];
1000
+ selectCellPos.colIndex = Math.max(0, Math.min(dataRow.length - 1, selectCellPos.colIndex));
1001
+ }
1002
+ catch (e) {
1003
+ selectCellPos.rowIndex = 0;
1004
+ selectCellPos.colIndex = 0;
1005
+ }
1006
+ return selectCellPos;
1007
+ }
1008
+ function scrollToSelectedCell(hot, cellToSelect) {
1009
+ let viewportTopRowToShow = 0;
1010
+ if (cellToSelect.rowIndex !== 0) {
1011
+ let autoRowSizePlugin = hot.getPlugin('autoRowSize');
1012
+ let firstVisibleRow = autoRowSizePlugin.getFirstVisibleRow();
1013
+ let lastVisibleRow = autoRowSizePlugin.getLastVisibleRow();
1014
+ let visibleRowCount = lastVisibleRow - firstVisibleRow + 1;
1015
+ viewportTopRowToShow = cellToSelect.rowIndex - Math.floor(visibleRowCount / 2);
1016
+ if (viewportTopRowToShow < 0) {
1017
+ viewportTopRowToShow = firstVisibleRow;
1018
+ }
1019
+ let maxRowCount = hot.countRows();
1020
+ viewportTopRowToShow = Math.max(0, Math.min(viewportTopRowToShow, maxRowCount - 1));
1021
+ }
1022
+ let viewportLeftColToShow = 0;
1023
+ if (cellToSelect.colIndex !== 0) {
1024
+ let autoColumnSizePlugin = hot.getPlugin('autoColumnSize');
1025
+ let firstVisibleCol = autoColumnSizePlugin.getFirstVisibleColumn();
1026
+ let lastVisibleCol = autoColumnSizePlugin.getLastVisibleColumn();
1027
+ let colWidths = autoColumnSizePlugin.widths;
1028
+ let viewportAbsoluteLeftOffset = 0;
1029
+ let viewportWidth = 0;
1030
+ let cumulativeAbsoluteOffsets = [];
1031
+ let selectedCellLeftOffsetMiddle = 0;
1032
+ for (let i = 0; i <= lastVisibleCol; i++) {
1033
+ if (i < firstVisibleCol) {
1034
+ viewportAbsoluteLeftOffset += colWidths[i];
1035
+ }
1036
+ else {
1037
+ viewportWidth += colWidths[i];
1038
+ }
1039
+ if (i < cellToSelect.colIndex) {
1040
+ selectedCellLeftOffsetMiddle += colWidths[i];
1041
+ }
1042
+ else if (i === cellToSelect.colIndex) {
1043
+ selectedCellLeftOffsetMiddle += Math.floor(colWidths[i] / 2);
1044
+ }
1045
+ if (i === 0) {
1046
+ cumulativeAbsoluteOffsets.push(colWidths[i]);
1047
+ }
1048
+ else {
1049
+ cumulativeAbsoluteOffsets.push(colWidths[i] + cumulativeAbsoluteOffsets[i - 1]);
1050
+ }
1051
+ }
1052
+ if (firstVisibleCol === 0 && selectedCellLeftOffsetMiddle <= viewportWidth / 2) {
1053
+ viewportLeftColToShow = 0;
1054
+ }
1055
+ else {
1056
+ let viewportAbsoluteMiddle = viewportAbsoluteLeftOffset + Math.floor(viewportWidth / 2);
1057
+ let viewportMiddleDiff = selectedCellLeftOffsetMiddle - viewportAbsoluteMiddle;
1058
+ let neededViewporLeftOffsetAbsolute = viewportAbsoluteLeftOffset + viewportMiddleDiff;
1059
+ for (let i = 0; i <= lastVisibleCol; i++) {
1060
+ let cumulativeOffset = cumulativeAbsoluteOffsets[i];
1061
+ if (neededViewporLeftOffsetAbsolute <= cumulativeOffset) {
1062
+ viewportLeftColToShow = i;
1063
+ break;
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ hot.scrollViewportTo(viewportTopRowToShow, viewportLeftColToShow, false, false);
1069
+ }
1070
+ function getHotScrollPosition(hot) {
1071
+ return {
1072
+ top: hot.view.activeWt.wtOverlays.topOverlay.getScrollPosition(),
1073
+ left: hot.view.activeWt.wtOverlays.leftOverlay.getScrollPosition()
1074
+ };
1075
+ }
1076
+ function setHotScrollPosition(hot, viewportOffsetInPx) {
1077
+ ;
1078
+ hot.view.activeWt.wtOverlays.topOverlay.setScrollPosition(viewportOffsetInPx.top);
1079
+ hot.view.activeWt.wtOverlays.leftOverlay.setScrollPosition(viewportOffsetInPx.left);
1080
+ }
1081
+ function storeHotSelectedCellAndScrollPosition() {
1082
+ if (!hot)
1083
+ return;
1084
+ let hotSelection = hot.getSelected();
1085
+ if (hotSelection && hotSelection.length > 0) {
1086
+ previousSelectedCell = {
1087
+ rowIndex: hotSelection[0][0],
1088
+ colIndex: hotSelection[0][1]
1089
+ };
1090
+ }
1091
+ previousViewportOffsets = getHotScrollPosition(hot);
1092
+ let manualRowResizePlugin = hot.getPlugin('manualRowResize');
1093
+ previousManualRowHeights = manualRowResizePlugin.manualRowHeights;
1094
+ }
1095
+ function getNextRowIfCommentsAreHidden(visualRowIndex) {
1096
+ if (!hot)
1097
+ return visualRowIndex;
1098
+ if (hiddenPhysicalRowIndicesSorted.length === 0)
1099
+ return visualRowIndex;
1100
+ const lastPossibleRowIndex = hot.countRows() - 1;
1101
+ for (let i = visualRowIndex; i <= lastPossibleRowIndex; i++) {
1102
+ let physicalIndex = hot.toPhysicalRow(i);
1103
+ let isRowCommentAndHidden = hiddenPhysicalRowIndicesSorted.indexOf(physicalIndex) !== -1;
1104
+ if (isRowCommentAndHidden) {
1105
+ continue;
1106
+ }
1107
+ return i;
1108
+ }
1109
+ for (let i = visualRowIndex; i >= 0; i--) {
1110
+ let physicalIndex = hot.toPhysicalRow(i);
1111
+ let isRowCommentAndHidden = hiddenPhysicalRowIndicesSorted.indexOf(physicalIndex) !== -1;
1112
+ if (isRowCommentAndHidden) {
1113
+ continue;
1114
+ }
1115
+ return i;
1116
+ }
1117
+ return 0;
1118
+ }
1119
+ function getOpenLinkModifierTooltopPart() {
1120
+ if (isBrowser) {
1121
+ if (isMacOpenLinkModifierKey) {
1122
+ return `(cmd + click)`;
1123
+ }
1124
+ return `(ctrl + click)`;
1125
+ }
1126
+ if (isMacOpenLinkModifierKey) {
1127
+ return `(cmd + click)`;
1128
+ }
1129
+ return `(ctrl + click)`;
1130
+ }
1131
+ function isOpenLinkModifierPressed(e) {
1132
+ if (isBrowser) {
1133
+ if (isMacOpenLinkModifierKey && e.metaKey)
1134
+ return true;
1135
+ if (!isMacOpenLinkModifierKey && e.ctrlKey)
1136
+ return true;
1137
+ }
1138
+ if (isMacOpenLinkModifierKey && e.metaKey)
1139
+ return true;
1140
+ if (!isMacOpenLinkModifierKey && e.ctrlKey)
1141
+ return true;
1142
+ return false;
1143
+ }
1144
+ function getFirstAndLastVisibleColumns() {
1145
+ if (!hot)
1146
+ return { first: 0, last: 0 };
1147
+ let firstVisibleCol = 0;
1148
+ let lastVisibleCol = 0;
1149
+ const lastPossibleColIndex = hot.countCols() - 1;
1150
+ for (let index = 0; index <= lastPossibleColIndex; index++) {
1151
+ let physicalColIndex = hot.toPhysicalColumn(index);
1152
+ let isColHidden = hiddenPhysicalColumnIndicesSorted.indexOf(physicalColIndex) !== -1;
1153
+ if (!isColHidden) {
1154
+ firstVisibleCol = index;
1155
+ break;
1156
+ }
1157
+ }
1158
+ for (let index = lastPossibleColIndex; index >= 0; index--) {
1159
+ let physicalColIndex = hot.toPhysicalColumn(index);
1160
+ let isColHidden = hiddenPhysicalColumnIndicesSorted.indexOf(physicalColIndex) !== -1;
1161
+ if (!isColHidden) {
1162
+ lastVisibleCol = index;
1163
+ break;
1164
+ }
1165
+ }
1166
+ return { first: firstVisibleCol, last: lastVisibleCol };
1167
+ }
1168
+ function getFirstAndLastVisibleRows() {
1169
+ if (!hot)
1170
+ return { first: 0, last: 0 };
1171
+ let firstVisibleRow = 0;
1172
+ let lastVisibleRow = 0;
1173
+ const lastPossibleRowIndex = hot.countRows() - 1;
1174
+ for (let index = 0; index <= lastPossibleRowIndex; index++) {
1175
+ let physicalRowIndex = hot.toPhysicalRow(index);
1176
+ let isRowHidden = hiddenPhysicalRowIndicesSorted.indexOf(physicalRowIndex) !== -1;
1177
+ if (!isRowHidden) {
1178
+ firstVisibleRow = index;
1179
+ break;
1180
+ }
1181
+ }
1182
+ for (let index = lastPossibleRowIndex; index >= 0; index--) {
1183
+ let physicalRowIndex = hot.toPhysicalRow(index);
1184
+ let isRowHidden = hiddenPhysicalRowIndicesSorted.indexOf(physicalRowIndex) !== -1;
1185
+ if (!isRowHidden) {
1186
+ lastVisibleRow = index;
1187
+ break;
1188
+ }
1189
+ }
1190
+ return { first: firstVisibleRow, last: lastVisibleRow };
1191
+ }
1192
+ function tryToGuessHasHeader(csvLines, csvReadConfig) {
1193
+ if (csvLines.length <= 1)
1194
+ return false;
1195
+ const rowsToSample = Math.min(csvLines.length - 1, 100);
1196
+ const lookLikeHeaderCellThresholdInColumns = 3;
1197
+ const cellContainsNumberThusNoHeaderThreshold = 3;
1198
+ let firstRow = [];
1199
+ let i = 0;
1200
+ for (; i <= rowsToSample; i++) {
1201
+ if (!csvLines[i])
1202
+ continue;
1203
+ firstRow = csvLines[i];
1204
+ const firstCellValue = firstRow[0].trim().toLowerCase();
1205
+ if (isCommentCell(firstCellValue, csvReadConfig))
1206
+ continue;
1207
+ break;
1208
+ }
1209
+ i++;
1210
+ const cellValuesMapPerColumn = [];
1211
+ let isFirstRealRow = true;
1212
+ for (; i <= rowsToSample; i++) {
1213
+ const row = csvLines[i];
1214
+ const firstCell = row[0];
1215
+ if (isCommentCell(firstCell, csvReadConfig))
1216
+ continue;
1217
+ for (let j = 0; j < row.length; j++) {
1218
+ const cellValue = row[j] ? row[j].trim().toLowerCase() : ``;
1219
+ if (isFirstRealRow) {
1220
+ cellValuesMapPerColumn[j] = new Map();
1221
+ }
1222
+ cellValuesMapPerColumn[j].set(cellValue, (cellValuesMapPerColumn[j].get(cellValue) ?? 0) + 1);
1223
+ }
1224
+ isFirstRealRow = false;
1225
+ }
1226
+ let numColsThatLookLikeHeader = 0;
1227
+ let numColsThatContainASingleNumber = 0;
1228
+ for (let i = 0; i < firstRow.length; i++) {
1229
+ if (!firstRow[i])
1230
+ continue;
1231
+ const cellValue = firstRow[i].trim().toLowerCase();
1232
+ let isEnNumber = checkCellOnlyContainsSingleNumber(cellValue, knownNumberStylesMap['en']);
1233
+ let isNonEnNumber = checkCellOnlyContainsSingleNumber(cellValue, knownNumberStylesMap['non-en']);
1234
+ const isKnownNormalCellValue = normalCellValues.has(cellValue);
1235
+ let isNumberString = isEnNumber || isNonEnNumber;
1236
+ if (isNumberString) {
1237
+ numColsThatContainASingleNumber++;
1238
+ }
1239
+ if (numColsThatContainASingleNumber >= cellContainsNumberThusNoHeaderThreshold) {
1240
+ return false;
1241
+ }
1242
+ const valueCount = cellValuesMapPerColumn[i].get(cellValue) ?? 0;
1243
+ const looksLikeTableBodyNormalCell = isNumberString || valueCount > 0 || isKnownNormalCellValue;
1244
+ if (looksLikeTableBodyNormalCell === false) {
1245
+ numColsThatLookLikeHeader++;
1246
+ }
1247
+ }
1248
+ if (numColsThatLookLikeHeader >= lookLikeHeaderCellThresholdInColumns) {
1249
+ return true;
1250
+ }
1251
+ return false;
1252
+ }
1253
+ function calculateSourceFileCursorPositions2(selections, where) {
1254
+ const hasHeaderRow = getHasHeaderRow();
1255
+ let rowOffset = hasHeaderRow ? 1 : 0;
1256
+ const positions = [];
1257
+ for (let i = 0; i < selections.length; i++) {
1258
+ const selection = selections[i];
1259
+ const startLine = selection.start.row + rowOffset;
1260
+ const endLine = selection.end.row + rowOffset;
1261
+ for (let row = startLine; row <= endLine; row++) {
1262
+ const _row = hot.toPhysicalRow(row);
1263
+ let startColumn = selection.start.col;
1264
+ let endColumn = selection.end.col;
1265
+ let fileCsvColPositions = outCsvFieldToInputPositionMapping[_row];
1266
+ if (fileCsvColPositions === undefined) {
1267
+ postVsWarning(`could not find row for ${_row}`);
1268
+ throw new Error('row was undefined');
1269
+ }
1270
+ if (fileCsvColPositions.length === 1) {
1271
+ startColumn = 0;
1272
+ endColumn = 0;
1273
+ }
1274
+ for (let column = startColumn; column <= endColumn; column++) {
1275
+ const _column = hot.toPhysicalColumn(column);
1276
+ const realCol = Math.min(_column, fileCsvColPositions.length - 1);
1277
+ let position = fileCsvColPositions[realCol];
1278
+ switch (where) {
1279
+ case 'start': {
1280
+ positions.push({
1281
+ startPos: position.start,
1282
+ endPos: position.start,
1283
+ });
1284
+ break;
1285
+ }
1286
+ case 'end': {
1287
+ positions.push({
1288
+ startPos: position.end,
1289
+ endPos: position.end,
1290
+ });
1291
+ break;
1292
+ }
1293
+ case 'entire': {
1294
+ positions.push({
1295
+ startPos: position.start,
1296
+ endPos: position.end,
1297
+ });
1298
+ break;
1299
+ }
1300
+ default: {
1301
+ notExhaustiveSwitch(where);
1302
+ }
1303
+ }
1304
+ }
1305
+ }
1306
+ }
1307
+ return positions;
1308
+ }
1309
+ function fallbackCopyTextToClipboard(text) {
1310
+ var textArea = document.createElement("textarea");
1311
+ textArea.value = text;
1312
+ textArea.style.top = "0";
1313
+ textArea.style.left = "0";
1314
+ textArea.style.position = "fixed";
1315
+ document.body.appendChild(textArea);
1316
+ textArea.focus();
1317
+ textArea.select();
1318
+ try {
1319
+ document.execCommand('copy');
1320
+ }
1321
+ catch (err) {
1322
+ }
1323
+ document.body.removeChild(textArea);
1324
+ }
1325
+ function copyTextToClipboardBrowser(text) {
1326
+ if (!navigator.clipboard) {
1327
+ fallbackCopyTextToClipboard(text);
1328
+ return;
1329
+ }
1330
+ navigator.clipboard.writeText(text).then(function () {
1331
+ }, function (err) {
1332
+ });
1333
+ }
1334
+ //# sourceMappingURL=util.js.map
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/images/logo.png ADDED

Git LFS Details

  • SHA256: f2ccd12ca3ec79894a160af4c9232d6b99b3cc39d4a0196343052b13b375e1c0
  • Pointer size: 129 Bytes
  • Size of remote file: 4.42 kB
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/package.json ADDED
@@ -0,0 +1,899 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vscode-edit-csv",
3
+ "displayName": "Edit CSV",
4
+ "description": "extension to edit csv files with a table ui",
5
+ "version": "0.11.9",
6
+ "license": "MIT",
7
+ "icon": "images/logo.png",
8
+ "publisher": "janisdd",
9
+ "engines": {
10
+ "vscode": "^1.70.0"
11
+ },
12
+ "categories": [
13
+ "Other"
14
+ ],
15
+ "keywords": [
16
+ "CSV"
17
+ ],
18
+ "preview": false,
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/janisdd/vscode-edit-csv.git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/janisdd/vscode-edit-csv/issues"
25
+ },
26
+ "galleryBanner": {
27
+ "color": "#687bff",
28
+ "theme": "light"
29
+ },
30
+ "activationEvents": [
31
+ "onCommand:edit-csv.edit",
32
+ "onCommand:edit-csv.apply",
33
+ "onCommand:edit-csv.applyAndSave",
34
+ "onCommand:edit-csv.editWithConfig"
35
+ ],
36
+ "main": "./out/extension.js",
37
+ "contributes": {
38
+ "languages": [
39
+ {
40
+ "id": "csv",
41
+ "extensions": [
42
+ ".csv"
43
+ ],
44
+ "aliases": [
45
+ "CSV"
46
+ ]
47
+ },
48
+ {
49
+ "id": "tsv",
50
+ "extensions": [
51
+ ".tsv",
52
+ ".tab"
53
+ ],
54
+ "aliases": [
55
+ "TSV"
56
+ ]
57
+ }
58
+ ],
59
+ "commands": [
60
+ {
61
+ "command": "edit-csv.edit",
62
+ "category": "CSV",
63
+ "title": "Edit CSV"
64
+ },
65
+ {
66
+ "command": "edit-csv.goto-source",
67
+ "category": "CSV",
68
+ "title": "Go to csv source file"
69
+ },
70
+ {
71
+ "command": "edit-csv.apply",
72
+ "category": "CSV",
73
+ "title": "Apply changes to source file"
74
+ },
75
+ {
76
+ "command": "edit-csv.applyAndSave",
77
+ "category": "CSV",
78
+ "title": "Apply changes to source file and save"
79
+ }
80
+ ],
81
+ "menus": {
82
+ "explorer/context": [
83
+ {
84
+ "when": "resourceLangId == csv && !config.csv-edit.hideOpenCsvEditorUiActions",
85
+ "command": "edit-csv.edit",
86
+ "group": "navigation"
87
+ },
88
+ {
89
+ "when": "resourceLangId == tsv && !config.csv-edit.hideOpenCsvEditorUiActions",
90
+ "command": "edit-csv.edit",
91
+ "group": "navigation"
92
+ },
93
+ {
94
+ "when": "resourceLangId == CSV && !config.csv-edit.hideOpenCsvEditorUiActions",
95
+ "command": "edit-csv.edit",
96
+ "group": "navigation"
97
+ },
98
+ {
99
+ "when": "resourceLangId == TSV && !config.csv-edit.hideOpenCsvEditorUiActions",
100
+ "command": "edit-csv.edit",
101
+ "group": "navigation"
102
+ },
103
+ {
104
+ "when": "resourceLangId == 'CSV (semicolon)' && !config.csv-edit.hideOpenCsvEditorUiActions",
105
+ "command": "edit-csv.edit",
106
+ "group": "navigation"
107
+ },
108
+ {
109
+ "when": "resourceLangId == 'csv (semicolon)' && !config.csv-edit.hideOpenCsvEditorUiActions",
110
+ "command": "edit-csv.edit",
111
+ "group": "navigation"
112
+ },
113
+ {
114
+ "when": "resourceLangId == 'csv (pipe)' && !config.csv-edit.hideOpenCsvEditorUiActions",
115
+ "command": "edit-csv.edit",
116
+ "group": "navigation"
117
+ },
118
+ {
119
+ "when": "resourceLangId == 'csv (whitespace)' && !config.csv-edit.hideOpenCsvEditorUiActions",
120
+ "command": "edit-csv.edit",
121
+ "group": "navigation"
122
+ },
123
+ {
124
+ "when": "resourceLangId == 'csv (tilde)' && !config.csv-edit.hideOpenCsvEditorUiActions",
125
+ "command": "edit-csv.edit",
126
+ "group": "navigation"
127
+ },
128
+ {
129
+ "when": "resourceLangId == 'csv (caret)' && !config.csv-edit.hideOpenCsvEditorUiActions",
130
+ "command": "edit-csv.edit",
131
+ "group": "navigation"
132
+ },
133
+ {
134
+ "when": "resourceLangId == 'csv (colon)' && !config.csv-edit.hideOpenCsvEditorUiActions",
135
+ "command": "edit-csv.edit",
136
+ "group": "navigation"
137
+ },
138
+ {
139
+ "when": "resourceLangId == 'csv (double quote)' && !config.csv-edit.hideOpenCsvEditorUiActions",
140
+ "command": "edit-csv.edit",
141
+ "group": "navigation"
142
+ },
143
+ {
144
+ "when": "resourceLangId == 'csv (equals)' && !config.csv-edit.hideOpenCsvEditorUiActions",
145
+ "command": "edit-csv.edit",
146
+ "group": "navigation"
147
+ },
148
+ {
149
+ "when": "resourceLangId == 'csv (dot)' && !config.csv-edit.hideOpenCsvEditorUiActions",
150
+ "command": "edit-csv.edit",
151
+ "group": "navigation"
152
+ },
153
+ {
154
+ "when": "resourceLangId == 'csv (hyphen)' && !config.csv-edit.hideOpenCsvEditorUiActions",
155
+ "command": "edit-csv.edit",
156
+ "group": "navigation"
157
+ },
158
+ {
159
+ "when": "resourceLangId == 'dynamic csv' && !config.csv-edit.hideOpenCsvEditorUiActions",
160
+ "command": "edit-csv.edit",
161
+ "group": "navigation"
162
+ }
163
+ ],
164
+ "editor/title/context": [
165
+ {
166
+ "when": "resourceLangId == csv && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
167
+ "command": "edit-csv.edit",
168
+ "group": "navigation"
169
+ },
170
+ {
171
+ "when": "resourceLangId == tsv && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
172
+ "command": "edit-csv.edit",
173
+ "group": "navigation"
174
+ },
175
+ {
176
+ "when": "resourceLangId == CSV && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
177
+ "command": "edit-csv.edit",
178
+ "group": "navigation"
179
+ },
180
+ {
181
+ "when": "resourceLangId == TSV && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
182
+ "command": "edit-csv.edit",
183
+ "group": "navigation"
184
+ },
185
+ {
186
+ "when": "resourceLangId == 'CSV (semicolon)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
187
+ "command": "edit-csv.edit",
188
+ "group": "navigation"
189
+ },
190
+ {
191
+ "when": "resourceLangId == 'csv (semicolon)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
192
+ "command": "edit-csv.edit",
193
+ "group": "navigation"
194
+ },
195
+ {
196
+ "when": "resourceLangId == 'csv (pipe)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
197
+ "command": "edit-csv.edit",
198
+ "group": "navigation"
199
+ },
200
+ {
201
+ "when": "resourceLangId == 'csv (whitespace)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
202
+ "command": "edit-csv.edit",
203
+ "group": "navigation"
204
+ },
205
+ {
206
+ "when": "resourceLangId == 'csv (tilde)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
207
+ "command": "edit-csv.edit",
208
+ "group": "navigation"
209
+ },
210
+ {
211
+ "when": "resourceLangId == 'csv (caret)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
212
+ "command": "edit-csv.edit",
213
+ "group": "navigation"
214
+ },
215
+ {
216
+ "when": "resourceLangId == 'csv (colon)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
217
+ "command": "edit-csv.edit",
218
+ "group": "navigation"
219
+ },
220
+ {
221
+ "when": "resourceLangId == 'csv (double quote)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
222
+ "command": "edit-csv.edit",
223
+ "group": "navigation"
224
+ },
225
+ {
226
+ "when": "resourceLangId == 'csv (equals)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
227
+ "command": "edit-csv.edit",
228
+ "group": "navigation"
229
+ },
230
+ {
231
+ "when": "resourceLangId == 'csv (dot)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
232
+ "command": "edit-csv.edit",
233
+ "group": "navigation"
234
+ },
235
+ {
236
+ "when": "resourceLangId == 'csv (hyphen)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
237
+ "command": "edit-csv.edit",
238
+ "group": "navigation"
239
+ },
240
+ {
241
+ "when": "resourceLangId == 'dynamic csv' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
242
+ "command": "edit-csv.edit",
243
+ "group": "navigation"
244
+ }
245
+ ],
246
+ "editor/title": [
247
+ {
248
+ "when": "editorLangId == csv && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
249
+ "command": "edit-csv.edit",
250
+ "group": "navigation"
251
+ },
252
+ {
253
+ "when": "editorLangId == tsv && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
254
+ "command": "edit-csv.edit",
255
+ "group": "navigation"
256
+ },
257
+ {
258
+ "when": "editorLangId == CSV && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
259
+ "command": "edit-csv.edit",
260
+ "group": "navigation"
261
+ },
262
+ {
263
+ "when": "editorLangId == TSV && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
264
+ "command": "edit-csv.edit",
265
+ "group": "navigation"
266
+ },
267
+ {
268
+ "when": "editorLangId == 'CSV (semicolon)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
269
+ "command": "edit-csv.edit",
270
+ "group": "navigation"
271
+ },
272
+ {
273
+ "when": "editorLangId == 'csv (semicolon)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
274
+ "command": "edit-csv.edit",
275
+ "group": "navigation"
276
+ },
277
+ {
278
+ "when": "editorLangId == 'csv (pipe)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
279
+ "command": "edit-csv.edit",
280
+ "group": "navigation"
281
+ },
282
+ {
283
+ "when": "editorLangId == 'csv (whitespace)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
284
+ "command": "edit-csv.edit",
285
+ "group": "navigation"
286
+ },
287
+ {
288
+ "when": "editorLangId == 'csv (tilde)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
289
+ "command": "edit-csv.edit",
290
+ "group": "navigation"
291
+ },
292
+ {
293
+ "when": "editorLangId == 'csv (caret)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
294
+ "command": "edit-csv.edit",
295
+ "group": "navigation"
296
+ },
297
+ {
298
+ "when": "editorLangId == 'csv (colon)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
299
+ "command": "edit-csv.edit",
300
+ "group": "navigation"
301
+ },
302
+ {
303
+ "when": "editorLangId == 'csv (double quote)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
304
+ "command": "edit-csv.edit",
305
+ "group": "navigation"
306
+ },
307
+ {
308
+ "when": "editorLangId == 'csv (equals)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
309
+ "command": "edit-csv.edit",
310
+ "group": "navigation"
311
+ },
312
+ {
313
+ "when": "editorLangId == 'csv (dot)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
314
+ "command": "edit-csv.edit",
315
+ "group": "navigation"
316
+ },
317
+ {
318
+ "when": "editorLangId == 'csv (hyphen)' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
319
+ "command": "edit-csv.edit",
320
+ "group": "navigation"
321
+ },
322
+ {
323
+ "when": "editorLangId == 'dynamic csv' && resourceScheme != csv-edit && !config.csv-edit.hideOpenCsvEditorUiActions",
324
+ "command": "edit-csv.edit",
325
+ "group": "navigation"
326
+ }
327
+ ]
328
+ },
329
+ "configuration": {
330
+ "title": "Edit CSV configuration",
331
+ "type": "object",
332
+ "properties": {
333
+ "csv-edit.highlightCsvComments": {
334
+ "type": "boolean",
335
+ "default": true,
336
+ "description": "true: the cell/row color is changed if the first cell is a comment, (might have negative impact on performance e.g. for large data sets), false: no additional highlighting (comments are still treated as comments). NOTE that only the first cell value is saved to the csv file."
337
+ },
338
+ "csv-edit.lastRowEnterBehavior": {
339
+ "type": "string",
340
+ "default": "default",
341
+ "description": "if one edits a cell in the last row and presses enter what the editor should do (default is to jump to the first row in the next column)",
342
+ "enum": [
343
+ "default",
344
+ "createRow"
345
+ ],
346
+ "enumDescriptions": [
347
+ "default of handsontable (or lastRowOrFirstRowNavigationBehavior)",
348
+ "create a new row"
349
+ ]
350
+ },
351
+ "csv-edit.lastColumnTabBehavior": {
352
+ "type": "string",
353
+ "default": "default",
354
+ "description": "if one edits a cell in the last column and presses tab what the editor should do (default is to jump to the first row in the first column)",
355
+ "enum": [
356
+ "default",
357
+ "createColumn"
358
+ ],
359
+ "enumDescriptions": [
360
+ "default of handsontable (or lastColumnOrFirstColumnNavigationBehavior)",
361
+ "create a new column"
362
+ ]
363
+ },
364
+ "csv-edit.lastRowOrFirstRowNavigationBehavior": {
365
+ "type": "string",
366
+ "default": "stop",
367
+ "description": "if a cell in the last row (or first) is selected and one presses arrow down or (enter in cell editor), what should happen?",
368
+ "enum": [
369
+ "wrap",
370
+ "stop"
371
+ ],
372
+ "enumDescriptions": [
373
+ "the next cell in the first row (or last) should be selected (wrap)",
374
+ "the selection should stay the same (stop)"
375
+ ]
376
+ },
377
+ "csv-edit.lastColumnOrFirstColumnNavigationBehavior": {
378
+ "type": "string",
379
+ "default": "stop",
380
+ "description": "if a cell in the last column (or first) is selected and one presses arrow right or tab, what should happen?",
381
+ "enum": [
382
+ "wrap",
383
+ "stop"
384
+ ],
385
+ "enumDescriptions": [
386
+ "the first cell in the next row should be selected (wrap)",
387
+ "the selection should stay the same (stop)"
388
+ ]
389
+ },
390
+ "csv-edit.optionsBarAppearance": {
391
+ "type": "string",
392
+ "default": "collapsed",
393
+ "description": "the appearance of the options bar",
394
+ "enum": [
395
+ "expanded",
396
+ "collapsed"
397
+ ],
398
+ "enumDescriptions": [
399
+ "options bar will always start expanded",
400
+ "options bar will always start collapsed"
401
+ ]
402
+ },
403
+ "csv-edit.tryToGuessHasHeader": {
404
+ "type": "boolean",
405
+ "default": false,
406
+ "description": "true: tries to guess if the csv file has a header line, false: not. Note: This only sets the has header option to true, but never to false"
407
+ },
408
+ "csv-edit.readOption_hasHeader": {
409
+ "type": "string",
410
+ "default": "false",
411
+ "description": "whether the first data line is a header line",
412
+ "enum": [
413
+ "true",
414
+ "false"
415
+ ],
416
+ "enumDescriptions": [
417
+ "first row is the header row",
418
+ "first row is a normal data row"
419
+ ]
420
+ },
421
+ "csv-edit.readOption_delimiter": {
422
+ "type": "string",
423
+ "default": "",
424
+ "description": "the delimiter to use, empty string to auto detect"
425
+ },
426
+ "csv-edit.readOption_delimitersToGuess": {
427
+ "type": "array",
428
+ "default": [
429
+ ",",
430
+ "\t",
431
+ "|",
432
+ ";",
433
+ "\u001e",
434
+ "\u001f"
435
+ ],
436
+ "description": "the delimiters to guess automatically (in the given order)"
437
+ },
438
+ "csv-edit.readOption_comment": {
439
+ "type": "string",
440
+ "default": "#",
441
+ "description": "the string used as comment, empty string to treat every line as data line (no comments)"
442
+ },
443
+ "csv-edit.readOption_quoteChar": {
444
+ "type": "string",
445
+ "default": "\"",
446
+ "description": "the string used to quote fields",
447
+ "maxLength": 1
448
+ },
449
+ "csv-edit.readOption_escapeChar": {
450
+ "type": "string",
451
+ "default": "\"",
452
+ "description": "the string used to escape the quote character within a field",
453
+ "maxLength": 1
454
+ },
455
+ "csv-edit.writeOption_hasHeader": {
456
+ "type": "string",
457
+ "default": "false",
458
+ "description": "whether the first data line is a header line",
459
+ "enum": [
460
+ "true",
461
+ "false"
462
+ ],
463
+ "enumDescriptions": [
464
+ "first row is the header row",
465
+ "first row is a normal data row"
466
+ ]
467
+ },
468
+ "csv-edit.writeOption_delimiter": {
469
+ "type": "string",
470
+ "default": "",
471
+ "description": "the delimiter to use, empty string to auto detect"
472
+ },
473
+ "csv-edit.writeOption_comment": {
474
+ "type": "string",
475
+ "default": "#",
476
+ "description": "the string used as comment, empty string to exclude comments"
477
+ },
478
+ "csv-edit.writeOption_quoteChar": {
479
+ "type": "string",
480
+ "default": "\"",
481
+ "description": "the string used to quote fields",
482
+ "maxLength": 1
483
+ },
484
+ "csv-edit.writeOption_escapeChar": {
485
+ "type": "string",
486
+ "default": "\"",
487
+ "description": "the string used to escape the quote character within a field",
488
+ "maxLength": 1
489
+ },
490
+ "csv-edit.doubleClickColumnHandleForcedWith": {
491
+ "type": "number",
492
+ "default": 200,
493
+ "description": "normally the columns are auto sized. If we click on the handle when it has auto size, its width is set to this value (in px). Useful if we have a very wide column (wider than the screen and quickly want to shrink it). Also controls which size is displayed in the context menu for resizing columns."
494
+ },
495
+ "csv-edit.doubleClickRowHandleForcedHeight": {
496
+ "type": "number",
497
+ "default": 106,
498
+ "description": "normally the rows are auto sized. If we click on the handle when it has auto size, its height is set to this value (in px). Useful if we have a very tall rows (wider than the screen and quickly want to shrink it). Also controls which size is displayed in the context menu for resizing rows (Default value gives you 5 rows with the default font size)."
499
+ },
500
+ "csv-edit.openSourceFileAfterApply": {
501
+ "type": "boolean",
502
+ "default": false,
503
+ "description": "true: opens the source file after apply, false: keep the editor displayed"
504
+ },
505
+ "csv-edit.selectTextAfterBeginEditCell": {
506
+ "type": "boolean",
507
+ "default": false,
508
+ "description": "true: select the text inside the cell (note you can also select the cell and start typings to overwrite the cell value), false: cursor starts at the end of the text"
509
+ },
510
+ "csv-edit.quoteAllFields": {
511
+ "type": "boolean",
512
+ "default": false,
513
+ "description": "true: to always quote fields, false: not (only if necessary, and respect retainQuoteInformation)"
514
+ },
515
+ "csv-edit.quoteEmptyOrNullFields": {
516
+ "type": "string",
517
+ "default": "false",
518
+ "description": "whether null, undefined and empty values should be quoted (takes precedence over quoteAllFields)",
519
+ "enum": [
520
+ "true",
521
+ "false"
522
+ ],
523
+ "enumDescriptions": [
524
+ "quote null, undefined and empty values",
525
+ "do not quote null, undefined and empty values"
526
+ ]
527
+ },
528
+ "csv-edit.initiallyHideComments": {
529
+ "type": "boolean",
530
+ "default": false,
531
+ "description": "true: Initially hides rows with comments found in the table, false: not hide rows with comments"
532
+ },
533
+ "csv-edit.enableWrapping": {
534
+ "type": "boolean",
535
+ "default": true,
536
+ "description": "true: cell content is wrapped and the row height is changed, false: no wrapping (content is hidden)"
537
+ },
538
+ "csv-edit.initialColumnWidth": {
539
+ "type": "integer",
540
+ "default": 0,
541
+ "description": "the initial width for columns, 0 or a negative number will disable this and auto column size is used on initial render"
542
+ },
543
+ "csv-edit.autoColumnWidthsIgnoreComments": {
544
+ "type": "boolean",
545
+ "default": true,
546
+ "description": "true: auto sizing columns will ignore comments, false: auto sizing columns will take comments into account"
547
+ },
548
+ "csv-edit.retainQuoteInformation": {
549
+ "type": "string",
550
+ "default": "full",
551
+ "description": "determines how the quote information is tracked across cells. NOTE: This only sets quotes for cells, but never prevents quotes from being added (so as not to interfere with other quote-related settings)",
552
+ "enum": [
553
+ "none",
554
+ "determinedByColumns",
555
+ "full"
556
+ ],
557
+ "enumDescriptions": [
558
+ "do not retain any quote information",
559
+ "is determined by the first cell in the same column (as the cell in question)",
560
+ "track the quote information for every cell individually"
561
+ ]
562
+ },
563
+ "csv-edit.forceQuoteLeadingWhitespace": {
564
+ "type": "boolean",
565
+ "default": false,
566
+ "description": "true: if a csv field begins with whitespace, it should always be enclosed in quotes, false: not"
567
+ },
568
+ "csv-edit.forceQuoteTrailingWhitespace": {
569
+ "type": "boolean",
570
+ "default": false,
571
+ "description": "true: if a csv field ends with whitespace, it should always be enclosed in quotes, false: not"
572
+ },
573
+ "csv-edit.newColumnQuoteInformationIsQuoted": {
574
+ "type": "boolean",
575
+ "default": false,
576
+ "description": "true: new columns will get true as quote information (also for added columns via expanding), false: new columns will get false as quote information"
577
+ },
578
+ "csv-edit.disableBorders": {
579
+ "type": "boolean",
580
+ "default": false,
581
+ "description": "true: borders are set to 0 (in css). This helps if you encounter some border color issues, false: normal borders"
582
+ },
583
+ "csv-edit.initiallyFixedRowsTop": {
584
+ "type": "number",
585
+ "default": 0,
586
+ "description": "the first X rows are pinned so they will stay in view even if you scroll"
587
+ },
588
+ "csv-edit.initiallyFixedColumnsLeft": {
589
+ "type": "number",
590
+ "default": 0,
591
+ "description": "the first X columns are pinned so they will stay in view even if you scroll"
592
+ },
593
+ "csv-edit.fontSizeInPx": {
594
+ "type": "number",
595
+ "default": 16,
596
+ "description": "the font size in px, 0 or -x to sync the font size with the editor, +x to overwrite the font size (changing will rerender the table)"
597
+ },
598
+ "csv-edit.showColumnHeaderNamesWithLettersLikeExcel": {
599
+ "type": "boolean",
600
+ "default": false,
601
+ "description": "true: show column names with letters e.g. A, B, ..., Z (like Excel), false: use numbers for column names e.g. 1, 2, ..."
602
+ },
603
+ "csv-edit.columnNamesStartIndex": {
604
+ "type": "integer",
605
+ "default": 1,
606
+ "description": "When numbers are used for column names (column 1, column 2, ...), the first column number starts with this number"
607
+ },
608
+ "csv-edit.shouldWatchCsvSourceFile": {
609
+ "type": "string",
610
+ "default": "yesAndNotify",
611
+ "description": "if the source csv file should be watched for changes",
612
+ "enum": [
613
+ "no",
614
+ "yesAndNotify",
615
+ "yesAndAutoReload"
616
+ ],
617
+ "enumDescriptions": [
618
+ "do not watch the source csv file for changes",
619
+ "the source csv file is watched for changes and you will be notified if the source file is changed",
620
+ "the source csv file is watched for changes and new data is automatically loaded, overwriting existing changes (no undo!)"
621
+ ]
622
+ },
623
+ "csv-edit.sidePanelAppearance": {
624
+ "type": "string",
625
+ "default": "collapsed",
626
+ "description": "the appearance of the side panel",
627
+ "enum": [
628
+ "expanded",
629
+ "collapsed"
630
+ ],
631
+ "enumDescriptions": [
632
+ "side panel will always start expanded",
633
+ "side panel will always start collapsed"
634
+ ]
635
+ },
636
+ "csv-edit.initialNumbersStyle": {
637
+ "type": "string",
638
+ "default": "en",
639
+ "description": "the initial numbers style for the side panel stats and auto fill function",
640
+ "enum": [
641
+ "en",
642
+ "non-en"
643
+ ],
644
+ "enumDescriptions": [
645
+ "decimal separator is '.' e.g. 3.14 Optional thousand separator: ',' e.g. 1,003.14",
646
+ "decimal separator is ',' e.g. 3,14 Optional thousand separator: '.' e.g. 1.003,14"
647
+ ]
648
+ },
649
+ "csv-edit.insertRowBehavior": {
650
+ "type": "string",
651
+ "default": "keepRowKeepColumn",
652
+ "description": "which cell should be focused or selected when a new row is inserted (above or below)",
653
+ "enum": [
654
+ "focusFirstCellNewRow",
655
+ "keepRowKeepColumn"
656
+ ],
657
+ "enumDescriptions": [
658
+ "focus the first cell in the new row",
659
+ "keep the currently selected cell"
660
+ ]
661
+ },
662
+ "csv-edit.insertColBehavior": {
663
+ "type": "string",
664
+ "default": "keepRowKeepColumn",
665
+ "description": "which cell should be focused or selected when a new column is inserted (left or right)",
666
+ "enum": [
667
+ "keepRowFocusNewColumn",
668
+ "keepRowKeepColumn"
669
+ ],
670
+ "enumDescriptions": [
671
+ "we stay in the same row but the cell in the new column is selected",
672
+ "keep the currently selected cell"
673
+ ]
674
+ },
675
+ "csv-edit.initiallyIsInReadonlyMode": {
676
+ "type": "boolean",
677
+ "default": false,
678
+ "description": "true: table starts in readonly mode, false: normal edit mode"
679
+ },
680
+ "csv-edit.hideOpenCsvEditorUiActions": {
681
+ "type": "boolean",
682
+ "default": false,
683
+ "description": "false: hide the edit csv button and the file context menu action to open the editor (useful if you want to call this extension from another extension and show a custom button), true: show them"
684
+ },
685
+ "csv-edit.openTableAndSelectCellAtCursorPos": {
686
+ "type": "string",
687
+ "default": "initialOnly_correctRowAlwaysFirstColumn",
688
+ "description": "if the table should be opened at the cursor position and select the corresponding csv cell",
689
+ "enum": [
690
+ "initialOnly_correctRowAlwaysFirstColumn",
691
+ "initialOnly_correctRowAndColumn",
692
+ "never"
693
+ ],
694
+ "enumDescriptions": [
695
+ "(initial only) select the correct row at the cursor position but always select the first column",
696
+ "only opens the table at the cursor position (cell) the first time the table is opened",
697
+ "never open the table at the cursor position, open the table at the top left corner"
698
+ ]
699
+ },
700
+ "csv-edit.pasteMode": {
701
+ "type": "string",
702
+ "default": "normal",
703
+ "description": "the paste mode to use (note that this is done after the cell processing e.g. remove quote escapes)",
704
+ "enum": [
705
+ "normal",
706
+ "onlyKeepRowSeparators",
707
+ "onlyKeepColumnSeparators",
708
+ "ignoreAllSeparators"
709
+ ],
710
+ "enumDescriptions": [
711
+ "normal paste (rows and columns are respected)",
712
+ "only keep row separators (ignore column separators) (every row will have 1 column)",
713
+ "only keep column separators (ignore row separators) (only 1 row will be pasted)",
714
+ "always paste into a single cell (ignoring row and column separators)"
715
+ ]
716
+ },
717
+ "csv-edit.pasteBehavior": {
718
+ "type": "string",
719
+ "default": "overwrite",
720
+ "description": "the paste behaviour to be used (what should happen to the old content)",
721
+ "enum": [
722
+ "overwrite",
723
+ "overwriteExceptEmpty",
724
+ "shift_down",
725
+ "shift_right"
726
+ ],
727
+ "enumDescriptions": [
728
+ "pasting content overwrites the existing content",
729
+ "pasting content overwrites the existing content except for empty cells (in the pasting content)",
730
+ "pasting content shifts the existing content (cells) down",
731
+ "pasting content shifts the existing content (cells) to the right"
732
+ ]
733
+ },
734
+ "csv-edit.pasteScrollBehavior": {
735
+ "type": "string",
736
+ "default": "scrollToLastPastedCell",
737
+ "description": "the scroll behaviour after pasting data",
738
+ "enum": [
739
+ "scrollToLastPastedCell",
740
+ "scrollToFirstPastedCell",
741
+ "dontScroll"
742
+ ],
743
+ "enumDescriptions": [
744
+ "scrolls to the laste pasted cell",
745
+ "scrolls to the first pasted cell",
746
+ "don't scroll to the pasted cells"
747
+ ]
748
+ },
749
+ "csv-edit.fontFamilyInTable": {
750
+ "type": "string",
751
+ "default": "default",
752
+ "description": "sets the font family used in the table",
753
+ "enum": [
754
+ "default",
755
+ "sameAsCodeEditor"
756
+ ],
757
+ "enumDescriptions": [
758
+ "use the default font",
759
+ "use the same font family as the code editor"
760
+ ]
761
+ },
762
+ "csv-edit.showDeleteColumnHeaderButton": {
763
+ "type": "boolean",
764
+ "default": true,
765
+ "description": "true: shows a delete column button in the column header (on hover), false: not"
766
+ },
767
+ "csv-edit.showDeleteRowHeaderButton": {
768
+ "type": "boolean",
769
+ "default": true,
770
+ "description": "true: shows a delete row button in the row header (on hover), false: not"
771
+ },
772
+ "csv-edit.finalNewLine": {
773
+ "type": "string",
774
+ "default": "sameAsSourceFile",
775
+ "description": "Decides how to handle final new lines when writing the csv data back to the source file",
776
+ "enum": [
777
+ "sameAsSourceFile",
778
+ "add",
779
+ "remove"
780
+ ],
781
+ "enumDescriptions": [
782
+ "If the source csv file had a new line at the end, the resulting csv will also have one. Otherwise, no final new line will be inserted after the data.",
783
+ "Will add a final new line after the csv data",
784
+ "Will not write a final new line after the csv data"
785
+ ]
786
+ },
787
+ "csv-edit.darkThemeTextColor": {
788
+ "type": "string",
789
+ "default": "#d0d0d0",
790
+ "description": "the color used for text in the dark theme (some valid css string)"
791
+ },
792
+ "csv-edit.lightThemeTextColor": {
793
+ "type": "string",
794
+ "default": "#657b83",
795
+ "description": "the color used for text in the light theme (some valid css string)"
796
+ },
797
+ "csv-edit.convertUrlsToLinkTags": {
798
+ "type": "boolean",
799
+ "default": true,
800
+ "description": "true: if a cell contains url-like text, the urls are displayed as urls and can be clicked on. false: all urls are rendered as normal text"
801
+ },
802
+ "csv-edit.dragToAutoFill": {
803
+ "type": "string",
804
+ "default": "excelLike",
805
+ "description": "Determines whether a handle is displayed on the cell to automatically fill the content",
806
+ "enum": [
807
+ "none",
808
+ "copyOnly",
809
+ "excelLike"
810
+ ],
811
+ "enumDescriptions": [
812
+ "Disables drag to auto fill",
813
+ "Adds a drag handle for copying data",
814
+ "Adds a drag handle for filling data like excel (numbers, months, dates). Defaults to copying if nothing can be interpolated. You can hold down the Alt key to use copying instead of interpolation."
815
+ ]
816
+ },
817
+ "csv-edit.initiallyHiddenColumnNames": {
818
+ "type": "array",
819
+ "description": "Specifies the column names that are to be hidden initially (the first row is used, ignoring comment rows)",
820
+ "default": [],
821
+ "items": {
822
+ "type": "string",
823
+ "description": "the name of the column to be hidden initially"
824
+ }
825
+ },
826
+ "csv-edit.initiallyHiddenColumnNumbers": {
827
+ "type": "array",
828
+ "description": "Specifies the columns (by number) that are to be hidden initially",
829
+ "default": [],
830
+ "items": {
831
+ "type": "number",
832
+ "description": "the number (1-based) of the column to be hidden initially"
833
+ }
834
+ },
835
+ "csv-edit.useSaveButtonsAsAdditionalUnsavedChangesIndicator": {
836
+ "type": "boolean",
837
+ "description": "Determines whether the save buttons should also indicate unsaved changes (true) or not (false)",
838
+ "default": true
839
+ },
840
+ "csv-edit.copyColumnHeaderNamesSeparator": {
841
+ "type": "string",
842
+ "default": ", ",
843
+ "description": "The string used to join multiple column header names when copying column header names",
844
+ "minLength": 1
845
+ }
846
+ }
847
+ }
848
+ },
849
+ "scripts": {
850
+ "preinstall": "npx npm-force-resolutions",
851
+ "vscode:prepublish": "npm audit && npm run compile && npm run testFe && npm run promptUp",
852
+ "compile": "npx tsc -p ./ && tsc -p ./csvEditorHtml/tsconfig.json",
853
+ "watch": "npx tsc -watch -p ./",
854
+ "watchEditor": "npx tsc -w -p ./csvEditorHtml/tsconfig.json",
855
+ "package": "vsce package",
856
+ "test": "npm run compile && vscode-test",
857
+ "testFe": "vitest run --config csvEditorHtml/test/vitest.config.ts",
858
+ "test2": "echo 'to run the tests compile and then go to the debug tab and start Extension Tests'",
859
+ "lint": "npx tslint -p . && npx tslint -p ./csvEditorHtml/tsconfig.json",
860
+ "promptUp": "node ./promtUploadbuild.js",
861
+ "buildBrowser": "node ./csvEditorHtml/out/browser/build/build.js"
862
+ },
863
+ "dependencies": {
864
+ "@vscode/webview-ui-toolkit": "1.0.0",
865
+ "dayjs": "1.11.13"
866
+ },
867
+ "devDependencies": {
868
+ "@sweetalert2/theme-dark": "3.2.0",
869
+ "@types/big.js": "4.0.5",
870
+ "@types/fs-extra": "9.0.1",
871
+ "@types/glob": "7.1.2",
872
+ "@types/jsdom": "11.0.4",
873
+ "@types/mocha": "2.2.48",
874
+ "@types/mousetrap": "1.6.3",
875
+ "@types/node": "18.11.9",
876
+ "@types/readline-sync": "1.4.3",
877
+ "@types/vscode": "1.70.0",
878
+ "@vitest/browser": "3.0.8",
879
+ "@vscode/test-electron": "2.4.1",
880
+ "bulma-toast": "2.0.3",
881
+ "chardet": "1.2.1",
882
+ "fs-extra": "9.0.1",
883
+ "glob": "7.1.6",
884
+ "iconv-lite": "0.6.2",
885
+ "jsdom": "28.1.0",
886
+ "playwright": "1.56.1",
887
+ "readline-sync": "1.4.10",
888
+ "sweetalert2": "9.17.2",
889
+ "toaster-js": "2.2.3",
890
+ "tslint": "5.8.0",
891
+ "typescript": "5.0.4",
892
+ "vitest": "3.0.8"
893
+ },
894
+ "__metadata": {
895
+ "installedTimestamp": 1780153922371,
896
+ "targetPlatform": "undefined",
897
+ "size": 1529263
898
+ }
899
+ }
home/.vscode-server/extensions/janisdd.vscode-edit-csv-0.11.9/readme.md ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # vscode-edit-csv
2
+
3
+ This extensions allows you to edit csv files with an excel like table ui
4
+
5
+ ## Web version
6
+
7
+ If you don't have vs code to hand, you can use the online version at https://edit-csv.net
8
+
9
+ ## Features
10
+
11
+ Execute the command `edit as csv` to open an editor for the current file.
12
+
13
+ *Execute the command again to switch back to the source file or to switch back to the editor*
14
+
15
+ ![feature X](https://github.com/janisdd/vscode-edit-csv/raw/HEAD/images/titleImg.gif)
16
+
17
+ **Note that the data flow is one way (editor to source file). If you make changes to the source file (.csv) while the editor is open, the editor will not be updated!**
18
+
19
+ ## ¡ Important Notes !
20
+
21
+ - On initial load all rows are expanded so that all rows have equal length (number of cells (if necessary))
22
+ - if that happens you will see the `unsaved changes` indicator right from the start
23
+
24
+ - enabling/disabling the `has header` read option will **clear the undo/redo stack!**
25
+
26
+ - empty lines are skipped!
27
+ - this will not trigger the `unsaved changes` indicator
28
+ - (during parsing) a row is also empty when it only contains `""`
29
+ - this can be problematic if you have only 1 column...
30
+
31
+ - We try to retain quote information (default) but in *some cases* fields could get unquoted on save (see [Retain Quote Information Rules](##retain-quote-information-rules))
32
+
33
+ - Comment row (rows starting with a comment) will only export the first cell
34
+ - if you accidentally added comment text to a cell other than the first cell you will notice it (color)
35
+
36
+ - Adding new lines to comments rows (via alt + enter) will have no effect when exporting (lines breaks are removed in comments!)
37
+ - leading spaces will be removed in comment rows!
38
+
39
+ - Starting with Version **0.1.0** the table has a context menu (right-click the table)
40
+ - *(just mentioning it because it is not obvious via the ui)*
41
+
42
+ - Plugin Version **0.0.11** had an issue with loading and saving files with more than \~1 MB
43
+ - saved files were corrupted (content of the first \~1MB was repeated after the first \~1MB until the file size was reached)
44
+
45
+ ## Retain Quote Information Rules
46
+
47
+ during parsing information about the quotes are stored
48
+
49
+ - quote information is only stored for columns
50
+ - only the first non-comment, not empty row (no fields) is used to gather quote information
51
+ - if the first row has less cells than other rows
52
+ - then missing entries are filled with `csv-edit.newColumnQuoteInformationIsQuoted` (default is not quoted)
53
+ - manually added columns will get `csv-edit.newColumnQuoteInformationIsQuoted` quote information
54
+ - moving columns will also "move" the quote information
55
+ - e.g. column 3 was quoted and is now column 1 then column 1 is quoted after moving
56
+
57
+
58
+ Implications of this
59
+
60
+ - columns with mixed cells (quoted and not quoted fields) will get homogeneously quoted
61
+
62
+
63
+ This can be turned off by setting `csv-edit.retainQuoteInformation` to `false`
64
+ In this case all unnecessary quotes are removed
65
+
66
+
67
+ ## How this extension works
68
+
69
+ *essentially it's just import csv and export csv*
70
+
71
+ When you click on `Edit CSV file`
72
+
73
+ - the file content is cut into pieced and transferred via `[webview].postMessage`
74
+ - the current config is stringified and injected into the editor (webview) html
75
+ - a manager stores a reference to the webview, source file uri, editor uri
76
+
77
+ - in the webview the pieces are put together and the text is parsed as csv and displayed in the (handsontable) table element
78
+
79
+ When you click on `apply`
80
+
81
+ - the current table is transformed into csv, transferred via `vscode.postMessage` to the extension and written to the source file
82
+ - if you clicked on `apply` by accident, you can undo the changes in the table element (with the usual shortcuts) and apply again or open the source file and just do an undo (with the usual shortcuts)
83
+
84
+ - When you click on `apply and save`
85
+ - the first step is equal to `apply`
86
+ - then the source file is saved
87
+
88
+
89
+ - When you click in `Read again`
90
+ - the injected content is used (when the editor was opened), this does not read the source file again
91
+
92
+ As you can see this **does not** scale very well with **large csv files** (needs to be stringified and stored the whole time)
93
+
94
+ ## Extension Settings
95
+
96
+ There are some settings for this plugin. Open the VS Code Settings and search for `csv-edit`
97
+
98
+ ### Supported file types/extension
99
+
100
+ Files with the extension `.csv`, `.tsv` should work out of the box.
101
+
102
+ You can change the file type in the bottom right corner of the editor (select language mode). This is required for unnamed/new files.
103
+
104
+ For `tsv`, make sure the indentation is set to `tabs`.
105
+
106
+ ### File extension xyz is not recognized by the vs code extension
107
+
108
+ See https://code.visualstudio.com/docs/languages/overview#_adding-a-file-extension-to-a-language
109
+
110
+ If the link is down: Search for `files.associations` in the vs code settings. Then add an entry for `*.xyz` to `csv`.
111
+ Now the file is treated as a csv file and is recognized by the extension
112
+
113
+ ## Drag to Auto Fill
114
+
115
+ Starting from version `0.10.0` the setting `dragToAutoFill` defaults to `excelLike`.
116
+
117
+ The other values are `none` and `copyOnly`.
118
+
119
+ `none` is used to disable auto fill.
120
+
121
+ Setting `dragToAutoFill` to `copyOnly` will copy the selected cell values over and over again.
122
+ Example: `1,b,3` and you drag the handle 6 cells further will give `1,b,3,1,b,3` as auto fill values.
123
+ As you can see, there is no interpolation, the selected sequence is copied again and again.
124
+
125
+ The default setting `excelLike` imitates the Excel behaviour for automatic fill values.
126
+
127
+ In most cases it will work *just fine*, but there may be some special cases.
128
+
129
+ In general, the following values can be filled in automatically: Numbers, month names and dates.
130
+
131
+ Similar to Excel, you can hold down the `alt` key before releasing the mouse button to copy the cell values. No interpolation is carried out.
132
+
133
+ You can find a complete explanation of how automatic filling works in `docs/autoFillBehavior.md`.
134
+
135
+ ## Known Issues
136
+
137
+ - `apply and save` an unnamed file will close the editor
138
+ - this is because the new uri for the new file is not known and for some reason if an extension saves an unnamed file the new file is not displayed automatically
139
+ - maybe this can be resolved when https://github.com/Microsoft/vscode/issues/43768 is closed
140
+
141
+ - renaming a file while an editor is open for that file will break the reference the the source file
142
+ - thus changes can no longer be saved/applied
143
+ - maybe this can be resolved when https://github.com/Microsoft/vscode/issues/43768 is closed
144
+
145
+ - if the source file content changes and the file is not in the current workspace (open folder) auto file content reload is not working
146
+ - however, you are notified if the file content changes (e.g. outside of vs code)
147
+
148
+ ## Alternatives
149
+
150
+ I recommend installing the `Rainbow CSV` extension, the extensions play well together!
151
+
152
+ *If you want to only view csv files you can go for the extension [Excel Viewer](https://marketplace.visualstudio.com/items?itemName=GrapeCity.gc-excelviewer). It has some more advanced sorting and filtering features.*
153
+
154
+ ## How long will it stay in preview?
155
+
156
+ There is one things missing...
157
+
158
+ - tests
159
+ - especially for interaction between vs code and the webview
160
+ - I added some listeners to handsontable hooks which manipulate rendering, selection...
161
+
162
+ ## Why not...?
163
+
164
+ - use merged cells for comments (rows)
165
+ - there are some problems with adding/removing rows in connection with undo & redo, sorting...
166
+ - update handsontable to 7.x.x
167
+ - with version 7 handsontable is only free for non-commercial use
168
+
169
+ ## Used projects
170
+
171
+ - for csv parsing/writing: [papaparse](https://github.com/mholt/PapaParse)
172
+ - with small custom modifications to handle comments specially
173
+ - for grid/table element: [handsontable](https://github.com/handsontable/handsontable)
174
+ - for ui: [vs code webview-ui-toolkit](https://github.com/microsoft/vscode-webview-ui-toolkit), [fontawesome](https://github.com/FortAwesome/Font-Awesome)
175
+ - for shortcuts: [mousetrap](https://github.com/ccampbell/mousetrap)
176
+ - for big numbers: [big.js](https://github.com/MikeMcl/big.js)
177
+ - for auto fill
178
+ - [regression-js](https://github.com/Tom-Alexander/regression-js)
179
+ - [day.js](https://day.js.org/en/) for date handling
180
+ - (big.js for numbers)
181
+
182
+ *see `thirdParty` folders*
183
+
184
+ There are some more in `package.json`. Even if they are not referenced directly, they are used e.g. for the browser build. We copy them from `node_modules` into the `thirdParty` folders.
185
+
186
+ ## Open the editor from other (your) extension with custom settings
187
+
188
+ There is a command `edit-csv.editWithConfig`. It can be used to open the editor with settings specified by you.
189
+
190
+ All possible settings can be found in `[project root]/csvEditorHtml/types.d.ts > EditCsvConfig`. The easiest way is to copy both types `EditCsvConfig` and `EditCsvConfigOverwrite` and then call the extension command like this:
191
+
192
+ ```ts
193
+ vscode.commands.registerCommand('yourExtension.yourCommand', () => {
194
+ let overwriteSettings: EditCsvConfigOverwrite = {
195
+ readOption_hasHeader: "true",
196
+ //other options, auto completion enabled
197
+ }
198
+
199
+ vscode.commands.executeCommand(`edit-csv.editWithConfig`, overwriteSettings)
200
+ })
201
+ ```
202
+
203
+ There is one problem left: the `Edit CSV` button in the title bar (and the file right click menu action) will still use the settings set by the user...
204
+ For this there is the option `csv-edit.hideOpenCsvEditorUiActions`. If set to true it will hide the two ui actions. This way you can create a button from your extension and open the editor and force your settings.
205
+
206
+ **Make sure to keep the type EditCsvConfig up-to-date (in case any types change)**
207
+
208
+ The extension will warn you about any unknown settings supplied but will not check the actual property values!
209
+
210
+ It will overwrite the settings configured by the user and call the same method as `edit-csv.edit` (the default when the editor is opened via the `Edit CSV` button).
211
+
212
+ ## How to build locally
213
+
214
+ To compile (and watch) the files in `csvEditorHtml` run
215
+
216
+ ```bash
217
+ tsc -w #or just tsc to transpile only once
218
+ # new terminal
219
+ cd csvEditorHtml
220
+ tsc -w #or just tsc to transpile only once
221
+ ```
222
+
223
+ then press `F5` to run the extension
224
+
225
+ When you edit `csvEditorHtml/index.html` you need to manually copy the changes (everything in the body but without the scripts) into `src/getHtml.ts` (past into body)
226
+
227
+ You can also open `csvEditorHtml/index.html` in your favorite browser and play around *(the vs code settings are not applied in the browser)*
228
+
229
+ ## License
230
+
231
+ Code: MIT
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/.vsixmanifest ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3
+ <Metadata>
4
+ <Identity Language="en-US" Id="rainbow-csv" Version="3.24.1" Publisher="mechatroner" />
5
+ <DisplayName>Rainbow CSV</DisplayName>
6
+ <Description xml:space="preserve">Highlight CSV and TSV files, Run SQL-like queries</Description>
7
+ <Tags>csv,tsv,highlight,CSV,__ext_csv,TSV,__ext_tsv,__ext_tab,csv (pipe),CSV (pipe),csv (whitespace),CSV (whitespace),csv (semicolon),CSV (semicolon),dynamic csv,Dynamic CSV,plaintext,sql,__web_extension</Tags>
8
+ <Categories>Data Science,Other,Programming Languages</Categories>
9
+ <GalleryFlags>Public</GalleryFlags>
10
+
11
+ <Properties>
12
+ <Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.95.0" />
13
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
14
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
15
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace,web" />
16
+ <Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
17
+
18
+ <Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/mechatroner/vscode_rainbow_csv.git" />
19
+ <Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/mechatroner/vscode_rainbow_csv.git" />
20
+ <Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/mechatroner/vscode_rainbow_csv.git" />
21
+ <Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/mechatroner/vscode_rainbow_csv/issues" />
22
+ <Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/mechatroner/vscode_rainbow_csv#readme" />
23
+
24
+
25
+ <Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
26
+
27
+
28
+ </Properties>
29
+ <License>extension/LICENSE.txt</License>
30
+ <Icon>extension/rainbow_csv_logo.png</Icon>
31
+ </Metadata>
32
+ <Installation>
33
+ <InstallationTarget Id="Microsoft.VisualStudio.Code"/>
34
+ </Installation>
35
+ <Dependencies/>
36
+ <Assets>
37
+ <Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
38
+ <Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" />
39
+ <Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" />
40
+ <Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" />
41
+ <Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/rainbow_csv_logo.png" Addressable="true" />
42
+ </Assets>
43
+ </PackageManifest>
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/CHANGELOG.md ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Rainbow CSV for Visual Studio Code Change Log
2
+
3
+ ## 3.24.1
4
+ * Fix config autoadjustment for virtual align [#242](https://github.com/mechatroner/vscode_rainbow_csv/issues/242).
5
+
6
+ ## 3.24.0
7
+ * Add "Go To Column" command suggested in [#216](https://github.com/mechatroner/vscode_rainbow_csv/issues/216).
8
+ * Improve config autoadjustment for virtual align [#242](https://github.com/mechatroner/vscode_rainbow_csv/issues/242).
9
+ * Fix autodetection for small .csv files.
10
+ * Update RBQL
11
+
12
+ ## 3.23.0
13
+ * Support RBQL pipe `|` query chaining operator.
14
+ * Remove python2 (`python` command) from RBQL.
15
+ * Improve Excel Export command - use the current selection range if specified.
16
+ * Minor bug fixes and improvements.
17
+
18
+ ## 3.22.0
19
+ * Reduce number of cosmetic whitespaces in virtual alignment as a workaround for max number of inlay hints limit, see [#205](https://github.com/mechatroner/vscode_rainbow_csv/issues/205).
20
+
21
+ ## 3.21.0
22
+ * Add `Copy for Markdown export` command.
23
+ * Fix sticky header alignment in virtual alignment mode.
24
+ * Remove obsolete scratch file alignment feature (it was superseded by virtual alignment).
25
+
26
+ ## 3.20.0
27
+ * Add `Copy for Excel / Sheets export` command.
28
+ * RBQL: remove trailing spaces from fields by default.
29
+
30
+ ## 3.19.0
31
+ * Fix virtual alignment range issue, see [#205](https://github.com/mechatroner/vscode_rainbow_csv/issues/205).
32
+
33
+ ## 3.18.0
34
+ * Alignment: Add extra readability whitespace at the beginning of each field instead of having them at the end of each field.
35
+ * Move Virtual Align configuration back into js code and make it global - it doesn't work reliably in package.json for some reason.
36
+ * Add optional virtual vertical grid in the virtual alignment mode that resembles vertical grid in graphical tables.
37
+
38
+ ## 3.17.0
39
+ * New feature: Alternate row background highlighting.
40
+ * New feature: Auxiliary column tracking.
41
+
42
+ ## 3.16.0
43
+ * Fix Virtual Align configuration by moving it into package.json.
44
+
45
+ ## 3.15.1
46
+ * Temporarily revert default on-click alignment to content-modifying whitespace-based version.
47
+
48
+ ## 3.15.0
49
+ * Use Virtual Alignment on "Align" button click instead of content-modifying whitespaces by default.
50
+ * Group Rainbow CSV context actions into "Rainbow CSV" submenu.
51
+ * Fix a bug in virtual alignment.
52
+
53
+ ## 3.14.0
54
+ * Fix Virtual Alignment configuration by [@krlmlr](https://github.com/krlmlr)
55
+ * Use middle dot instead of whitespace for virtual alignment by default per [@krlmlr](https://github.com/krlmlr)
56
+ * Use whole-doc stats for Virtual Alignment on manual realignment.
57
+
58
+ ## 3.13.0
59
+ * Added "Virtual" Alignment based on VSCode inlay hints that doesn't change the underlying file content.
60
+ * Do not enable sticky header by default since it is already enabled at VSCode level and somewhat incompatible with the extension config.
61
+
62
+ ## 3.12.0
63
+ * Improved Dynamic CSV separator selection UI which allows more (separator, policy) combinations
64
+ * Minor fixes
65
+
66
+ ## 3.11.0
67
+ * Add user-friendly sticky header config option.
68
+ * Enable sticky header by default.
69
+ * Fix tooltip hover text bug, see [#157](https://github.com/mechatroner/vscode_rainbow_csv/issues/157).
70
+
71
+ ## 3.10.0
72
+ * Fix major dynamic csv semantic highlighting bug for many non-built-in color themes [#149](https://github.com/mechatroner/vscode_rainbow_csv/issues/149)
73
+ * Fix comment lines highlighting for many non-built-in color themes
74
+ * Make dynamic csv semantic highlighting colors consistent with regular texmate grammar colors [#149](https://github.com/mechatroner/vscode_rainbow_csv/issues/149)
75
+ * RBQL: More robust python invocation order, see [#148](https://github.com/mechatroner/vscode_rainbow_csv/issues/148)
76
+ * Add debug logging option to facilitate bug reporting and triaging.
77
+
78
+ ## 3.9.0
79
+ * Adjust state transition logic and improve UX for some edge cases.
80
+ * Get rid of rainbow hover text colorizing since it probably didn't work anyway.
81
+
82
+ ## 3.8.0
83
+ * UI improvement: Better "CSVLint" status button by [@kostasx](https://github.com/kostasx).
84
+ * Add "Rainbow ON" conditional button.
85
+ * Update RBQL: Add `ANY_VALUE` aggregate function.
86
+ * Other minor improvements.
87
+
88
+ ## 3.7.1
89
+ * Update RBQL: Fix GROUP BY queries with bare columns, see [#144](https://github.com/mechatroner/vscode_rainbow_csv/issues/144)
90
+
91
+ ## 3.7.0
92
+ * Add config option to align in a new file, see [#62](https://github.com/mechatroner/vscode_rainbow_csv/issues/62).
93
+ * Other minor fixes and improvements.
94
+
95
+ ## 3.6.0
96
+ * Improve CSV alignment for files containing double-width characters e.g. Chinese or Japanese characters.
97
+ * Fix performance bug in CSV alignment procedure - alignment should work noticeable faster for large files.
98
+
99
+ ## 3.5.1
100
+ * Minor bugfix by lramos15@.
101
+
102
+ ## 3.5.0
103
+ * Add Fixed Sticky Header support. Proposed by @BeneKenobi, see [#124](https://github.com/mechatroner/vscode_rainbow_csv/issues/124).
104
+ * Minor fixes.
105
+
106
+ ## 3.4.0
107
+ * Fix minor interoperability issue with other extensions (additional autodetection check, see [#123](https://github.com/mechatroner/vscode_rainbow_csv/issues/123)).
108
+ * Update RBQL: support `AS` column alias in queries.
109
+
110
+ ## 3.3.0
111
+ * Support column alignment for CSV files with multiline fields (rfc-4180).
112
+ * Remove uncommon csv dialects (such as tilde, colon and other separators) in favor of generic "dynamic csv".
113
+ * Update docs.
114
+
115
+ ## 3.2.0
116
+ * UX improvements for Dynamic CSV filetype.
117
+
118
+ ## 3.1.0
119
+ * Support comment lines toggle, see [#84](https://github.com/mechatroner/vscode_rainbow_csv/issues/84).
120
+ * Support double quote autoclosing and text auto-surrounding.
121
+ * Minor UX improvements
122
+ * Minor Bug fixes
123
+
124
+ ## 3.0.0
125
+ * Support infinite number of arbitrary single-character and multi-character separators.
126
+ * Support multiline fields with RFC-4180 - compatible syntax highlighting.
127
+ * Support highlighting of comment lines.
128
+ * Various minor usability improvements and fixes.
129
+ * Update RBQL.
130
+
131
+ ## 2.4.0
132
+ * Show cursor column info in the status line.
133
+ * UI and UX improvements.
134
+
135
+ ## 2.3.0
136
+ * Improve alignment algorithm: special handling of numeric columns, see [#106](https://github.com/mechatroner/vscode_rainbow_csv/issues/106).
137
+ * Show alignment progress indicator which is very nice for large files.
138
+
139
+ ## 2.2.0
140
+ * UI and UX improvements by [@anthroid](https://github.com/anthroid).
141
+
142
+ ## 2.1.0
143
+ * Support RBQL and column edit mode in web version of VSCode.
144
+ * Support RBQL result set output dir customization [#101](https://github.com/mechatroner/vscode_rainbow_csv/issues/101).
145
+ * Slightly reduce startup time by moving non-critical code into a lazy-loaded module.
146
+ * Internal code refactoring.
147
+
148
+ ## 2.0.0
149
+ * Enable web/browser version for vscode.dev
150
+ * RBQL: improve join table path handling.
151
+
152
+ ## 1.10.0
153
+ * RBQL update: improved console UI.
154
+
155
+ ## 1.9.0
156
+ * RBQL update: improved CSV header support.
157
+
158
+ ## 1.8.1
159
+ * Minor RBQL update
160
+
161
+ ## 1.8.0
162
+ * New command: "SetHeaderLine" by @WetDesertRock, see [#71](https://github.com/mechatroner/vscode_rainbow_csv/issues/71)
163
+ * Updated RBQL
164
+ * Added integration tests
165
+
166
+
167
+ ## 1.7.0
168
+ * Updated RBQL
169
+ * Improved RBQL UI
170
+
171
+
172
+ ## 1.6.0
173
+ * Updated RBQL
174
+
175
+
176
+ ## 1.5.0
177
+ * Highlight column info tooltip with the same color as the column itself
178
+
179
+
180
+ ## 1.4.0
181
+ * Run CSV autodetection whenever a text chunk is copied into a new untitled buffer
182
+ * Improve startup performance
183
+ * RBQL: Support column names as variables
184
+ * RBQL: Support newlines in double-quoted CSV fields
185
+ * RBQL: Change default encoding to UTF-8
186
+ * RBQL: Enable for untitled buffers
187
+ * RBQL: Improve UI/UX, add history, built-in docs
188
+
189
+
190
+ ## 1.3.0
191
+ * Updated RBQL to version 0.9.0
192
+ * Restricted usage of Align/Shrink commands in files with unbalanced double quotes
193
+ * Fixed incorrect dialect name: "tilda" -> "tilde", see [#40](https://github.com/mechatroner/vscode_rainbow_csv/issues/40)
194
+ * Added an error message when RBQL console is used with unsaved file [#41](https://github.com/mechatroner/vscode_rainbow_csv/issues/41)
195
+
196
+
197
+ ## 1.2.0
198
+ * Added frequency-based fallback content-based autodetection algorithm for .csv files
199
+ * Adjusted default parameters: added '|' to the list of autodetected separators
200
+ * Fixed "Align/Shrink" button logic [#38](https://github.com/mechatroner/vscode_rainbow_csv/issues/38)
201
+ * Fixed bug: incorrect RBQL result set dialect when output dialect doesn't match input
202
+ * Improved documentation
203
+
204
+
205
+ ## 1.1.0
206
+ * Special treatment of comment lines by [@larsonmars](https://github.com/larsonmars)
207
+ * RBQL encoding customization by [@mandel59](https://github.com/mandel59)
208
+ * Implemented Whitespace-separated dialect
209
+ * Linter: detect trailing whitespaces in fields [#15](https://github.com/mechatroner/vscode_rainbow_csv/issues/15)
210
+ * Added commands: remove trailing whitespaces from all fields and align columns with trailing whitespaces
211
+ * Implemented RBQL result set copy-back command
212
+ * Improved RBQL console UI
213
+ * Customizable "Preview big CSV: head/tail" context menu options [#32](https://github.com/mechatroner/vscode_rainbow_csv/issues/32)
214
+ * Improved autodetection algorithm for files with multiple candidate separators
215
+
216
+
217
+ ## 0.8.0
218
+ * Large files preview functionality implemented by [@neilsustc](https://github.com/neilsustc) see [#24](https://github.com/mechatroner/vscode_rainbow_csv/issues/24)
219
+ * Fix single-autodetection per file limit, see [#26](https://github.com/mechatroner/vscode_rainbow_csv/issues/26)
220
+ * Enable content-based autodetection for .csv files
221
+ * Support tooltip message customizations, see [#12](https://github.com/mechatroner/vscode_rainbow_csv/issues/12)
222
+ * Fix RBQL warnings
223
+ * Various minor improvements
224
+
225
+
226
+ ## 0.7.1
227
+ * Fix: Added safety check to RBQL that would prevent accidental usage of assignment operator "=" instead of comparison "==" or "===" in JS (In Python this was not possible before the fix due to Python's own syntactic checker).
228
+ * Added "Rainbow CSV" category to all extension commands by [@yozlet](https://github.com/yozlet) request, see [#22](https://github.com/mechatroner/vscode_rainbow_csv/issues/22)
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/DEV_README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Instructions
2
+
3
+ ### Key Info
4
+ * Surprising VSCode filetype (language mode in the bottom-right corner) persistence behaviour:
5
+ - filetypes are often (or always?) preserved across restarts, even "Dynamic CSV".
6
+ - filetypes are not preserved on file re-open (both non-preview and preview modes)
7
+ - sometimes filetype are not preserved across tab back-and-forth switching (let's call this "curious doc reopening" problem)
8
+ this is reproducible when first selecting a manual separator e.g. `~#~`, then switching to "plain text" through the lang selection menu, than back to "dynamic csv".
9
+ Now "Dynamic CSV" and highlighting would disappear if user clicks another tab and back - the "dynamic csv" version of the doc would be closed and plaintext doc opened.
10
+ It is possible to "fix" this scenario for a particular doc by explicitly closing and opening it again.
11
+ Apparently this also affects the reverse situation and switch from plaintext back to e.g. TSV when we select TSV manually, then click "Rainbow Off", switch tabs and it is "On" again. So somehow manual "language mode" selection is more persistent than setTextDocumentLanguage effect.
12
+
13
+ * "Dynamic CSV" highlighting might not work because of the conflict with some other extensions.
14
+ * To ensure the required behaviour we will use "defensive programming" paradigm and there might be some redundancy in the method invocation (e.g. we might disable/enable something twice both on doc opening and closing), this is fine as long as the invocations are idempotent.
15
+
16
+
17
+
18
+ ### Pre-publishing checklist
19
+ * Make sure to run unit tests in browser.
20
+ * Make sure that "sticky header" feature works if enabled.
21
+ * Make sure that "Dynamic CSV" -> "Dynamic CSV" switch from one separator to another works.
22
+ * Run `npm run lint`
23
+
24
+
25
+ ### Debugging the extension:
26
+ #### For standard VSCode:
27
+ 1. Open rainbow_csv directory in VSCode
28
+ 2. Make sure you have "Extension" run mode enabled
29
+ 3. Click "Run" or F5
30
+
31
+
32
+ #### For web-based VSCode:
33
+ 1. Run `npm install` - OK to run in WSL.
34
+ 2. Run `npm run compile-web && npm run start-web-server` - OK to run in WSL. - This should start a local server at http://localhost:3000/
35
+ 3. Point your browser to http://localhost:3000/
36
+ It is possible to run this in windows cmd too, but it could be that the node_modules dir has to be deleted and installed from scratch.
37
+ The difference between running in win and in WSL is that in WSL it would only run with `--browser=none` option and this option doesn't run unit tests automatically which could be an issue if you want to run tests instead of manual debugging.
38
+
39
+ NOTE: if `npm run test-in-browser` fails with an error it could show a message telling to install/update playwright - do it (it will also print the command, something like: `npx playwright install`).
40
+
41
+ If it still doesn't work for some reason e.g. shows a blank page try to update the dependencies (this should update the package.json file content):
42
+ ```
43
+ npx npm-check-updates -u
44
+ npm install
45
+ ```
46
+
47
+
48
+ ### Running non-integration unit tests (without VSCode)
49
+ Run `node ./test/suite/run_unit_tests.js` - OK to do in WSL.
50
+
51
+
52
+ ### Running unit tests for the extension OUTSIDE VSCode:
53
+ #### For standard VSCode:
54
+ 1. **IMPORTANT** Make sure you have no open VSCode instances running, all VSCode windows are closed (otherwise will might get some weird caching/webworker errors or other issues)!
55
+ 2. run `npm install` (If you have WSL - run in Windows, don't run in WSL).
56
+ 3. run `npm run test` in Windows (If you have WSL - run in Windows, don't run in WSL). Make sure that the tests are successful.
57
+
58
+ #### For web-based VSCode:
59
+ 1. run `npm install` (If you have WSL - run in Windows, don't run in WSL).
60
+ 2. run `npm run compile-web` (If you have WSL - run in Windows, don't run in WSL). This will combine all scripts into a single web script and put it into the `dist` folder.
61
+ 3. run `npm run test-in-browser` (If you have WSL - run in Windows, don't run in WSL). This will open a new browser windows and run all the unit tests. Make sure that the tests are successful.
62
+
63
+ NOTE: if `npm run test-in-browser` fails with an error it could show a message telling to install/update playwright - do it (it will also print the command, something like: `npx playwright install`).
64
+
65
+ If it still doesn't work for some reason e.g. shows a blank page try to update the dependencies (this should update the package.json file content):
66
+ ```
67
+ npx npm-check-updates -u
68
+ npm install
69
+ ```
70
+
71
+
72
+ ### Running unit tests for the extension INSIDE VSCode:
73
+ 1. In console in rainbow_csv directory run `npm install` - OK to run the command in WSL while launching in Windows. This will install the dependencies, including `vscode/lib/testrunner`
74
+ 2. Open rainbow_csv directory in VSCode switch to "Extension Tests" mode and click run
75
+ **IMPORTANT** for some reason unit tests that are run from inside VSCode will often start with some files reopened from the previous session, this among other issues could cause `is_lazy_loaded` check to fail. An only known workaround is to quickly close all tabs in the test run and then restart the tests.
76
+
77
+
78
+ Example of minimalistic test setup:
79
+ https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-test-sample
80
+
81
+
82
+
83
+ #### Debugging
84
+ Looks like it is possible to directly run scripts from package.json with `npx` like this:
85
+ ```
86
+ npx vscode-test-web --help
87
+ ```
88
+ And apparently another option to execute this command is (never tested):
89
+ ```
90
+ npx @vscode/test-web --extensionDevelopmentPath=$extensionFolderPath $testDataPath
91
+ ```
92
+
93
+ Options available for vscode-test-web
94
+ * version
95
+ `'insiders' | 'stable' | 'sources' [Optional, default 'insiders']`
96
+
97
+ * browser
98
+ `'chromium' | 'firefox' | 'webkit' | 'none': The browser to launch. [Optional, defaults to 'chromium']`
99
+ If `none` is provided it wouldn't run unit test and it wouldn't kill the server when the browser window is closed.
100
+
101
+ If exceptions happens in extension.js you will be able to see it in the browser console (but the line number would be wrong).
102
+
103
+
104
+ #### Issues
105
+ * FS mount not working: https://github.com/microsoft/vscode-test-web/issues/16
106
+
107
+
108
+ ### Running the browser version for vscode.dev
109
+ The npx command `npx serve --cors -l 5000` failed in WSL with `cb.apply is not a function` error.
110
+ The same command worked as expected from Windows cmd.
111
+ Steps:
112
+ 1. Run `npx serve --cors -l 5000` - this may not work in WSL, in this case run in windows cmd. This local server uses `http` instead of `https` and because of that VSCode will not work with it directly, although the docs say otherwise (https://code.visualstudio.com/api/extension-guides/web-extensions#test-your-web-extension-in-on-vscode.dev) - it will just produce some cors/wss content security policy related errors in the log. So you need to do step 2.
113
+ 2. In another cmd tab run another command: `npx localtunnel -p 5000` - this will create a "tunnel" server pointing to the server from the first command - this will produce a link like `https://rotten-snake-42.loca.lt/`
114
+ 3. Follow the `https://rotten-snake-42.loca.lt/` link and press the button - this will show the content of your extension folder - https server is working.
115
+ 4. Go to vscode.dev -> Ctrl+Shift+P -> run Developer: Install Web Extension... -> Copy the `https://rotten-snake-42.loca.lt/` link. In my experience this will work only with https urls. If you use http, the extension will be sort of "installed" - it will be listed in the installed extension panel but the main extension.js won't be loaded so all the logic will be missing from it.
116
+
117
+
118
+ ### Publishing
119
+ 1. Make sure you have webpack installed: run `npm install` (Better to avoid running this in WSL).
120
+ Although this would create `node_modules/` and `package-lock.json` file this is not a problem because they are excluded from final package via the `.vscodeignore` file.
121
+ 2. Run `vsce publish minor -p <key>` as usual. vsce will also automatically run `vscode:prepublish` / `npm run package-web` command.
122
+
123
+ ### Publishing to openvsx
124
+ 1. Make sure you have webpack installed: run `npm install` (Better to avoid running this in WSL).
125
+ Although this would create `node_modules/` and `package-lock.json` file this is not a problem because they are excluded from final package via the `.vscodeignore` file.
126
+ 2. Run `npx ovsx publish -p <openvsx_token>`
127
+
128
+ Unlike vsce publishing for the official Microsoft VSCode marketplace, ovsx tool does not need to be provided with version increment specification (such as major/minor/fix), instead it will just use the version from package.json file which is very convenient. And it will also won't try to update that version value in package.json during the publishing process.
129
+
130
+ See more docs here: https://github.com/eclipse/openvsx/wiki/Publishing-Extensions
131
+
132
+
133
+ ### Testing for remote development
134
+ 1. Install code on the remote machine. Note: In my case "snap" installation didn't work, but the deb package worked without issues.
135
+ 2. Run `code tunnel`, see more here: https://code.visualstudio.com/docs/remote/tunnels#_using-the-code-cli
136
+ 3. Access the link from the browser or through the desktop VSCode app using `Remote - Tunnels` extension https://code.visualstudio.com/blogs/2022/12/07/remote-even-better
137
+ Enter `Remote - Tunnels: Connect to Tunnel` command in the palette.
138
+
139
+
140
+ ### Generating documentation with showdown
141
+ In order to generate RBQL documentation use showdown - based markdown_to_html.js script from junk/rainbow_stuff
142
+ Usage: `node markdown_to_html.js ~/vscode_rainbow_csv/rbql_core/README.md out.html`
143
+
144
+
145
+ ## Other
146
+ ### TODO LIST
147
+ * Improve RBQL encoding handling logic when VScode encoding info API is implemented, see https://github.com/microsoft/vscode/issues/824.
148
+
149
+ * Consider keeping only one open RBQL console at any time - if another one opens automatically close the previous one.
150
+
151
+ * DEBUG: Add a huge no-op loop on startup in order to reproduce/emulate high-cpu load error from #55.
152
+
153
+ * Support virtual header for rbql_csv.
154
+
155
+ * Consider replacing the RBQL query text input with scrollable textarea - it has a drawback that on enter it will go to the next line instead running the query.
156
+
157
+ * Store VSCode documents instead of file paths in result_set_parent_map so that the map can be used in web version. And the autodetection_stoplist also should be doc based to work in web.
158
+
159
+ * Support JOIN queries in web version.
160
+
161
+ * Support all commands in web version
162
+
163
+ * Get rid of `then` entirely
164
+
165
+ * Merge rbql_query_web and rbql_query_node
166
+
167
+ * Add feature to decorate separators with a transparent box or different color or something, see the opened issue.
168
+
169
+ * Consider using RFC-like syntax by ajhyndman, see https://github.com/mechatroner/vscode_rainbow_csv/issues/4
170
+
171
+ * Consider removing double quote autoclosing from non-csv/scsv dialects when native rfc csv is enabled.
172
+
173
+ * Consider adding optional "keep-it-dark" mode that would force dark color theme even if all other filetypes use light color theme to improve csv readability.
174
+
175
+ * Add `"csv (tab)"` alias to TSV language if/when https://github.com/microsoft/vscode/issues/167208 is resolved
176
+
177
+
178
+ ### RFC Support plan
179
+ 1. Full doc tokenization (rbql + rbql UI preview sampling + lint + autodetection) - 100% correct, doesn't have to use VSCode ranges.
180
+ 2. Fragment tokenization (hover + highlighting) - best effort, fast, should use VSCode ranges.
181
+
182
+
183
+ ### Maximum supported file size in VSCode
184
+ https://stackoverflow.com/questions/53625687/what-is-the-largest-filesize-supported-by-vs-code-syntax-highlighting
185
+ 20MB Or 300K lines (avg 66 chars per line).
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Dmitry Ignatovich
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/README.md ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Rainbow CSV
2
+
3
+ ## Main Features
4
+ * Highlights columns in CSV, TSV, semicolon, and pipe-separated files with distinct colors.
5
+ * Query, transform, and filter data using a built-in SQL-like language (RBQL).
6
+ * Augmented tracking of up to 3 columns of interest with auxiliary decorations.
7
+ * Align columns graphically or with extra spaces and Shrink (trim spaces from fields).
8
+ * Optional sticky header line.
9
+ * Provide info about column on hover.
10
+ * Automatic CSV consistency checks (CSVLint).
11
+ * Optional alternating row background colors for improved readability.
12
+ * Multi-cursor column edit.
13
+ * Copy in Excel and Markdown format for export.
14
+ * Works in browser ([vscode.dev](https://vscode.dev/)).
15
+
16
+ ![screenshot](https://i.imgur.com/ryjBI1R.png)
17
+
18
+ ## Usage
19
+
20
+ Rainbow CSV looks better and is more usable in general with dark mode.
21
+ Manually enable highlighting by running the `Set rainbow separator` command or by clicking on the current language button in the bottom right corner and choosing one of the built-in CSV dialects from the table below.
22
+
23
+ #### Supported separators
24
+
25
+ |Language name | Separator | Extension | Properties |
26
+ |-----------------|----------------------|-----------|-------------------------------------|
27
+ |csv | , (comma) | .csv | Ignored inside double-quoted fields |
28
+ |tsv | \t (TAB) | .tsv .tab | |
29
+ |csv (semicolon) | ; (semicolon) | | Ignored inside double-quoted fields |
30
+ |csv (whitespace) | whitespace | | Consecutive whitespaces are merged |
31
+ |csv (pipe) | &#124; (pipe) | | |
32
+ |dynamic csv | any char or string | | Customizable |
33
+
34
+
35
+ #### Content-based separator autodetection
36
+ Rainbow CSV automatically detects separators for "Plain Text" and "*.csv" files. This is usually a fast operation, typically analyzing only the first few lines.
37
+ Autodetection can be adjusted or disabled in the extension settings.
38
+
39
+
40
+ #### Customizing file extension - separator association
41
+ To avoid relying on autodetection for specific file extensions (e.g., ".dat"), you can manually associate them with a supported separator in VSCode config:
42
+ ```
43
+ "files.associations": {
44
+ "*.dat": "csv (pipe)",
45
+ "*.csv": "csv (semicolon)"
46
+ },
47
+ ```
48
+
49
+ Important: language identifiers in the config must be specified in **lower case**! E.g. use `csv (semicolon)`, not `CSV (semicolon)`.
50
+ List of supported language ids: `"csv", "tsv", "csv (semicolon)", "csv (pipe)", "csv (whitespace)", "dynamic csv"`.
51
+
52
+ #### Working with arbitrary separators
53
+
54
+ Rainbow CSV supports using any character or string as a separator.
55
+ You can add the separator to the list of autodetected separators in the VSCode settings or if you just want to use it once you can either:
56
+ * Select `Dynamic CSV` filetype (bottom-right corner) and then enter the separator in the prompt.
57
+ * Select the separator text with the cursor and run `Rainbow CSV: Set rainbow separator` command.
58
+
59
+ `Dynamic CSV` filetype also supports multiline CSV fields escaped in double quotes (RFC-4180 compliant).
60
+
61
+ Note: In rare cases `Dynamic CSV` highlighting might not work at all due to compatibility issues with some other third-party extensions.
62
+
63
+ #### CSVLint consistency check
64
+
65
+ The linter checks the following:
66
+ * Ensures consistent use of double quotes within rows.
67
+ * Verifies that each row has the same number of fields.
68
+
69
+ To recheck a CSV file, click the "CSVLint" button in the status bar.
70
+
71
+ #### Working with large files
72
+ To enable Rainbow CSV for very big files (more than 300K lines or 20MB) disable "Editor:Large File Optimizations" option in VS Code settings.
73
+ You can preview huge files by clicking "Preview... " option in VS Code File Explorer context menu.
74
+ All Rainbow CSV features would be disabled by VSCode if the file is bigger than 50MB.
75
+
76
+
77
+ #### Colors customization
78
+ You can customize Rainbow CSV colors to increase contrast, see [Instructions](https://github.com/mechatroner/vscode_rainbow_csv/blob/HEAD/test/color_customization_example.md#colors-customization).
79
+ This is especially helpful if you are using one of Light color themes.
80
+
81
+
82
+ #### Working with CSV files with comments
83
+ Some CSV files can contain comment lines e.g. metadata before the header line.
84
+ To allow CSVLint, content-based autodetection algorithms, and _Align_, _Shrink_, _ColumnEdit_ commands to work properly with such files you need to adjust your settings.
85
+
86
+
87
+ #### Aligning/Shrinking table
88
+ Rainbow CSV provides two alignment modes:
89
+ 1. **Virtual Align:** Provides visual alignment without modifying the file content.
90
+ 2. **Whitespace Align:** Inserts spaces to align columns, modifying the file content.
91
+
92
+ You can align columns in CSV files by clicking "Align" status-line button or using the alignment command.
93
+ To shrink the table, i.e. remove leading and trailing whitespaces, click "Shrink" status-line button or use _Shrink_ command
94
+
95
+
96
+ #### Column Tracking
97
+ You can track up to 3 columns of interest with auxiliary decorations to make them even more noticeable compared to color-only rainbow indication.
98
+ This is especially helpful for tables with multiple columns and/or when viewing the table in Row-Wrap i.e. word wrap mode.
99
+ Column Tracking is available via the editor context menu (Right click -> Rainbow CSV ...) or via the "ToggleColumnTracking" command.
100
+ If you find yourself often using this command you can also set a keyboard shortcut to toggle column tracking.
101
+ To do this run `Open Keyboard Shortcuts (JSON)` command that will open VSCode `keybindings.json` file and add the following line to the list:
102
+ ```
103
+ {"key": "ctrl+t", "command": "rainbow-csv.ToggleColumnTracking", "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/"},
104
+ ```
105
+
106
+
107
+ #### Alternate Row Background Highlighting
108
+ You can enable highlighting of odd and even rows with alternating background colors.
109
+ This is especially helpful for tables with multiple columns and/or when viewing the table in Row-Wrap i.e. word wrap mode.
110
+
111
+ Screenshot of Row-Wrap & Column Tracking & Alternating Row Background:
112
+ ![rowwrap](https://i.imgur.com/uTCT9Ft.png)
113
+
114
+
115
+ #### Settings
116
+ Customize Rainbow CSV's behavior in the extension settings section of VS Code.
117
+ There you can find the list of available options and their description.
118
+
119
+
120
+ #### Commands
121
+
122
+ Most of the Rainbow CSV commands are available through the editor context menu `[Right click]` -> `[Rainbow CSV]` -> `<Command>`
123
+
124
+ ## SQL-like "RBQL" query language
125
+
126
+ Rainbow CSV has a built-in RBQL query language interpreter that allows you to run SQL-like queries using a1, a2, a3, ... column names.
127
+ Example:
128
+ ```
129
+ SELECT a1, a2 * 10 WHERE a1 == "Buy" && a4.indexOf('oil') != -1 ORDER BY parseInt(a2), a4 LIMIT 100
130
+ ```
131
+ To enter query-editing mode, execute _RBQL_ VSCode command.
132
+ RBQL is a very simple and powerful tool that would allow you to quickly and easily perform the most common data-manipulation tasks and convert your csv tables to bash scripts, single-line json, single-line xml files, etc.
133
+ It is very easy to start using RBQL even if you don't know SQL. For example to cut out the third and first columns use `SELECT a3, a1`
134
+ You can use RBQL command for all possible types of files (e.g. .js, .xml, .html), but for non-table files, only two variables: _NR_ and _a1_ would be available.
135
+
136
+ [Full Documentation](https://github.com/mechatroner/vscode_rainbow_csv/blob/master/rbql_core/README.md#rbql-rainbow-query-language-description)
137
+
138
+
139
+ Screenshot of RBQL Console:
140
+ ![VSCode RBQL Console](https://i.imgur.com/dHqD53E.png)
141
+
142
+
143
+ ## Addendum
144
+ ### Comparison of Rainbow CSV technology with traditional graphical column alignment
145
+
146
+ #### Advantages:
147
+
148
+ * WYSIWYG
149
+ * Familiar editing environment of your favorite text editor
150
+ * High information density: Rainbow CSV shows more data per screen because it doesn't insert column-aligning whitespaces.
151
+ * Ability to see the table in "Row Wrapped" display mode (via WordWrap editor setting) thus avoiding horizontal scrolling that prevents looking at all columns simultaneously. "Row Wrapped" display mode can be further augmented with targeted tracking of the columns of interest.
152
+ * Reduced-cost abstraction: Syntax highlighting can be local and therefore less resource-intensive compared to graphical column alignment that requires whole-doc statistic.
153
+ * Color -> column association allows locating the column of interest more quickly when looking back and forth between the data and other objects on the screen (with column alignment one has to locate the header or count the columns to find the right one)
154
+ * Ability to visually associate two same-colored columns from two different windows. This is not possible with graphical column alignment
155
+
156
+ #### Disadvantages:
157
+
158
+ * Rainbow CSV could be less effective for CSV files with many (> 10) columns and for files with multiline fields. This problem can be alleviated with textual or virtual alignment or auxiliary column tracking that provides targeted highlighting for the columns of interest. "Row Wrap" mode can even make Rainbow CSV more efficient for wide row tables than traditional graphical alignment in certain cases.
159
+ * Rainbow CSV could be less usable with light mode because font colors become less distinguishable when compared to a dark mode (this phenomenon is also described [here](https://eclecticlight.co/2018/10/11/beyond-mere-appearance-dark-mode-the-semantics-of-colour-and-text-without-print/)). This problem could be somewhat mitigated by using customized high-contrast rainbow colors (see color customization section).
160
+
161
+
162
+ ### References
163
+
164
+ #### Related VSCode extensions
165
+ These extensions can work well together with Rainbow CSV and provide additional functionality e.g. export to Excel format:
166
+ * [Data Wrangler & Data Viewer](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.datawrangler)
167
+ * [Excel Viewer](https://marketplace.visualstudio.com/items?itemName=GrapeCity.gc-excelviewer)
168
+ * [Edit CSV](https://marketplace.visualstudio.com/items?itemName=janisdd.vscode-edit-csv)
169
+ * [Data Preview](https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview)
170
+
171
+
172
+ #### Rainbow CSV and similar plugins in other editors:
173
+
174
+ * Rainbow CSV extension in [Vim](https://github.com/mechatroner/rainbow_csv)
175
+ * rainbow_csv plugin in [Sublime Text](https://packagecontrol.io/packages/rainbow_csv)
176
+ * rainbow_csv plugin in [gedit](https://github.com/mechatroner/gtk_gedit_rainbow_csv) - doesn't support quoted commas in csv
177
+ * rainbow_csv_4_nedit in [NEdit](https://github.com/DmitTrix/rainbow_csv_4_nedit)
178
+ * CSV highlighting in [Nano](https://github.com/scopatz/nanorc)
179
+ * Rainbow CSV in [IntelliJ IDEA](https://plugins.jetbrains.com/plugin/12896-rainbow-csv/)
180
+ * CSVLint for [Notepad++](https://github.com/BdR76/CSVLint)
181
+
182
+ #### RBQL
183
+ * [RBQL](https://github.com/mechatroner/RBQL)
184
+ * Library and CLI App for Python [RBQL](https://pypi.org/project/rbql/)
185
+ * Library and CLI App for JavaScript [RBQL](https://www.npmjs.com/package/rbql)
186
+
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/dialect_select.html ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+
7
+ <style>
8
+
9
+ html * {
10
+ font-size: 16px !important;
11
+ }
12
+
13
+ body {
14
+ background-color: var(--vscode-editor-background);
15
+ color: var(--vscode-editor-foreground);
16
+ }
17
+
18
+ .select_input {
19
+ background-color: var(--vscode-input-background);
20
+ color: var(--vscode-input-foreground);
21
+ margin-bottom: 6px;
22
+ width: 400px;
23
+ font-size: 14px !important;
24
+ font-family: Consolas, Monaco, monospace;
25
+ }
26
+
27
+ .text_input {
28
+ margin: 0px;
29
+ height: 24px !important;
30
+ font-family: Consolas, Monaco, monospace;
31
+ font-size: 14px !important;
32
+ padding-left: 2px;
33
+ background-color: var(--vscode-input-background);
34
+ caret-color: var(--vscode-input-foreground);
35
+ color: var(--vscode-input-foreground);
36
+ display: inline-block;
37
+ box-sizing: border-box; /* See css-submit-button-looks-smaller-than-text-input-and-textarea */
38
+ vertical-align:middle;
39
+ width: 400px;
40
+ }
41
+
42
+ #apply_button {
43
+ margin: 0px;
44
+ width: 70px;
45
+ background-color: var(--vscode-button-background);
46
+ color: var(--vscode-button-foreground);
47
+ height: 24px !important;
48
+ padding: 0px;
49
+ outline:none;
50
+ vertical-align:middle;
51
+ box-sizing: border-box;
52
+ border-width: 0px;
53
+ margin-top: 5px;
54
+ }
55
+
56
+ #apply_button:hover {
57
+ background-color: var(--vscode-button-hoverBackground);
58
+ }
59
+
60
+ </style>
61
+
62
+ <script src="dialect_select.js"></script>
63
+
64
+ </head>
65
+
66
+ <meta charset="utf-8">
67
+
68
+ <body>
69
+
70
+ <div>
71
+ <div>
72
+ <span>Choose a separator - select from the list:</span>
73
+ </div>
74
+ <select class="select_input" id="separator_selector" title="Select Separator">
75
+ <option class="select_input" value="comma">Comma `,`</option>
76
+ <option class="select_input" id="tab_option" value="tab">Tab `\t`</option>
77
+ <option class="select_input" id="whitespace_option" value="whitespace">Whitespace ` `</option>
78
+ <option class="select_input" id="manual_entry_option" value="manual">Other...</option>
79
+ </select>
80
+ <div>
81
+ <div>
82
+ <span>Or enter separator character or string manually:</span>
83
+ </div>
84
+ <input type="text" class="text_input" id="custom_separator_input">
85
+ </div>
86
+ </div>
87
+
88
+ <div style="margin-top: 5px;">
89
+ <div>
90
+ <span>Choose a policy:</span>
91
+ </div>
92
+ <select class="select_input" id="policy_selector" title="Select Policy">
93
+ <option class="select_input" id="rfc_option" value="quoted_rfc">Double quote escape (Excel dialect)</option>
94
+ <option class="select_input" id="simple_option" value="simple">Literal (separator is not escapable)</option>
95
+ <option class="select_input" id="merging_option" value="whitespace">Merging (consecutive separators are merged)</option>
96
+ </select>
97
+ </div>
98
+
99
+ <div style="margin-top: 5px;">
100
+ <div>
101
+ <div>
102
+ <span>Enter a comment prefix (optional):</span>
103
+ </div>
104
+ <input type="text" class="text_input" id="custom_comment_prefix">
105
+ </div>
106
+ </div>
107
+
108
+ <button id="apply_button">Apply</button>
109
+
110
+ </body>
111
+
112
+ </html>
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/dialect_select.js ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const vscode = acquireVsCodeApi();
2
+
3
+ function sleep(ms) {
4
+ return new Promise(resolve => setTimeout(resolve, ms));
5
+ }
6
+
7
+
8
+ function handle_manual_separator_change() {
9
+ document.getElementById("separator_selector").value = document.getElementById("manual_entry_option").value;
10
+ }
11
+
12
+
13
+ function handle_apply_click() {
14
+ let separator_selection_option = document.getElementById("separator_selector").value;
15
+ let manual_separator_text = document.getElementById("custom_separator_input").value;
16
+ if (!manual_separator_text) {
17
+ if (separator_selection_option == 'comma') {
18
+ manual_separator_text = ',';
19
+ } else if (separator_selection_option == 'tab') {
20
+ manual_separator_text = '\t';
21
+ } else if (separator_selection_option == 'whitespace') {
22
+ manual_separator_text = ' ';
23
+ }
24
+ }
25
+ let policy = document.getElementById("policy_selector").value;
26
+ let custom_comment_prefix = document.getElementById("custom_comment_prefix").value;
27
+ vscode.postMessage({'msg_type': 'apply_dialect', 'delim': manual_separator_text, 'policy': policy, 'comment_prefix': custom_comment_prefix});
28
+ }
29
+
30
+
31
+ async function handle_message(msg_event) {
32
+ console.log('message received at client: ' + JSON.stringify(msg_event));
33
+ var message = msg_event.data;
34
+ if (!message) {
35
+ return;
36
+ }
37
+ let message_type = message['msg_type'];
38
+ if (message_type == 'dialect_handshake') {
39
+ let selected_separator = message.selected_separator;
40
+
41
+ if (selected_separator == '\t') {
42
+ document.getElementById("separator_selector").value = document.getElementById("tab_option").value;
43
+ } else if (selected_separator == ' ') {
44
+ document.getElementById("separator_selector").value = document.getElementById("whitespace_option").value;
45
+ } else if (selected_separator) {
46
+ document.getElementById("custom_separator_input").value = selected_separator;
47
+ document.getElementById("separator_selector").value = document.getElementById("manual_entry_option").value;
48
+ }
49
+
50
+ let policy = document.getElementById("simple_option").value;
51
+ if (selected_separator == ' ') {
52
+ policy = document.getElementById("merging_option").value;
53
+ } else if (selected_separator == ',' || selected_separator == ';' || !selected_separator) {
54
+ policy = document.getElementById("rfc_option").value;
55
+ }
56
+ document.getElementById("policy_selector").value = policy;
57
+
58
+ if (message.integration_test) {
59
+ await sleep(1500);
60
+ handle_apply_click();
61
+ }
62
+ }
63
+ }
64
+
65
+
66
+ function main() {
67
+ window.addEventListener('message', handle_message);
68
+ vscode.postMessage({'msg_type': 'dialect_handshake'});
69
+
70
+ document.getElementById("custom_separator_input").addEventListener("input", handle_manual_separator_change);
71
+ document.getElementById("apply_button").addEventListener("click", handle_apply_click);
72
+ }
73
+
74
+ document.addEventListener("DOMContentLoaded", function(_event) {
75
+ main();
76
+ });
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/eslint.config.mjs ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import globals from "globals";
2
+
3
+ export default [{
4
+ languageOptions: {
5
+ globals: {
6
+ ...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
7
+ ...globals.commonjs,
8
+ ...globals.node,
9
+ },
10
+
11
+ ecmaVersion: 8,
12
+ sourceType: "module",
13
+
14
+ parserOptions: {
15
+ ecmaFeatures: {
16
+ jsx: true,
17
+ },
18
+ },
19
+ },
20
+
21
+ rules: {
22
+ "no-const-assign": "warn",
23
+ "no-this-before-super": "warn",
24
+ "no-undef": "warn",
25
+ semi: [2, "always"],
26
+ "no-unreachable": "warn",
27
+ "no-unused-vars": "warn",
28
+ "constructor-super": "warn",
29
+ "no-trailing-spaces": "error",
30
+ "valid-typeof": "warn",
31
+ },
32
+ }];
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/eslint.config_browser.mjs ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import globals from "globals";
2
+
3
+ export default [{
4
+ languageOptions: {
5
+ globals: {
6
+ ...globals.browser,
7
+ ...globals.commonjs,
8
+ ...Object.fromEntries(Object.entries(globals.node).map(([key]) => [key, "off"])),
9
+ },
10
+
11
+ ecmaVersion: 8,
12
+ sourceType: "script",
13
+
14
+ parserOptions: {
15
+ ecmaFeatures: {
16
+ jsx: true,
17
+ },
18
+ },
19
+ },
20
+
21
+ rules: {
22
+ "no-const-assign": "warn",
23
+ "no-this-before-super": "warn",
24
+ "no-undef": "warn",
25
+ "no-unreachable": "warn",
26
+ "no-unused-vars": "warn",
27
+ "constructor-super": "warn",
28
+ "valid-typeof": "warn",
29
+ },
30
+ }];
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/extension.js ADDED
The diff for this file is too large to render. See raw diff
 
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/fast_load_utils.js ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file stores only functionality that is required for idle operation of Rainbow CSV i.e. autodetection only.
2
+ // We want to avoid loading/parsing a lot of JS code in cases where we don't have any CSV files to work with.
3
+
4
+ const csv_utils = require('./rbql_core/rbql-js/csv_utils.js');
5
+
6
+ class AssertionError extends Error {}
7
+
8
+ function assert(condition, message=null) {
9
+ if (!condition) {
10
+ if (!message) {
11
+ message = 'Assertion error';
12
+ }
13
+ throw new AssertionError(message);
14
+ }
15
+ }
16
+
17
+ class RecordTextConsumer {
18
+ // The only purpose of this class is to avoid code duplication when dealing with leftover lines in line_aggregator (the second `consume` call).
19
+ constructor(delim, policy, stop_on_warning, collect_records, preserve_quotes_and_whitespaces, detect_trailing_spaces, min_num_fields_for_autodetection, trim_whitespaces) {
20
+ this.delim = delim;
21
+ this.policy = policy;
22
+ this.stop_on_warning = stop_on_warning;
23
+ this.first_defective_line = null;
24
+ this.records = collect_records ? [] : null;
25
+ this.collect_records = collect_records;
26
+ this.num_records_parsed = 0;
27
+ this.fields_info = new Map();
28
+ this.first_trailing_space_line = null;
29
+ this.detect_trailing_spaces = detect_trailing_spaces;
30
+ this.preserve_quotes_and_whitespaces = preserve_quotes_and_whitespaces;
31
+ this.min_num_fields_for_autodetection = min_num_fields_for_autodetection;
32
+ this.trim_whitespaces = trim_whitespaces;
33
+ }
34
+
35
+ consume(record_text, record_start_line) {
36
+ let [record, warning] = csv_utils.smart_split(record_text, this.delim, this.policy, this.preserve_quotes_and_whitespaces);
37
+ if (warning) {
38
+ if (this.first_defective_line === null) {
39
+ this.first_defective_line = record_start_line;
40
+ }
41
+ if (this.stop_on_warning)
42
+ return /*can_continue=*/false;
43
+ }
44
+ if (this.detect_trailing_spaces && this.first_trailing_space_line === null) {
45
+ for (let field of record) {
46
+ if (field.length && (field.charAt(0) == ' ' || field.charAt(field.length - 1) == ' ')) {
47
+ this.first_trailing_space_line = record_start_line;
48
+ }
49
+ }
50
+ }
51
+ if (this.trim_whitespaces) {
52
+ record = record.map((v) => v.trim());
53
+ }
54
+ if (!this.fields_info.has(record.length)) {
55
+ this.fields_info.set(record.length, this.num_records_parsed);
56
+ if (this.min_num_fields_for_autodetection != -1) {
57
+ // Autodetection mode: stop on inconsistent records length and when there is not enough columns (typically less than 2 i.e. 1).
58
+ if (record.length < this.min_num_fields_for_autodetection)
59
+ return /*can_continue=*/false;
60
+ if (this.fields_info.size > 1)
61
+ return /*can_continue=*/false;
62
+ }
63
+ }
64
+ if (this.collect_records) {
65
+ this.records.push(record);
66
+ }
67
+ this.num_records_parsed += 1;
68
+ return /*can_continue=*/true;
69
+ }
70
+ }
71
+
72
+
73
+ function parse_document_records(document, delim, policy, comment_prefix=null, stop_on_warning=false, max_records_to_parse=-1, collect_records=true, preserve_quotes_and_whitespaces=false, detect_trailing_spaces=false, min_num_fields_for_autodetection=-1, trim_whitespaces=false) {
74
+ // TODO consider switching to a single row_info array format that would have (comment, record_ranges and the record itself) - this would make it more compatible with the incremental parsing functions.
75
+ let num_lines = document.lineCount;
76
+ let record_start_line = 0;
77
+ let line_aggregator = new csv_utils.MultilineRecordAggregator(comment_prefix);
78
+ let consumer = new RecordTextConsumer(delim, policy, stop_on_warning, collect_records, preserve_quotes_and_whitespaces, detect_trailing_spaces, min_num_fields_for_autodetection, trim_whitespaces);
79
+ let comments = []; // An ordered list of {record_no, comment_text} tuples which can be merged with the records later.
80
+
81
+ for (let lnum = 0; lnum < num_lines; ++lnum) {
82
+ let line_text = document.lineAt(lnum).text;
83
+ if (lnum + 1 >= num_lines && line_text == "") {
84
+ if (collect_records) {
85
+ // Treat the last empty line as a comment - this is to prevent align/shrink functions from removing it.
86
+ comments.push({record_num: consumer.num_records_parsed, comment_text: line_text});
87
+ }
88
+ break; // Skip the last empty line.
89
+ }
90
+ let record_text = null;
91
+ if (policy == 'quoted_rfc') {
92
+ line_aggregator.add_line(line_text);
93
+ if (line_aggregator.has_comment_line) {
94
+ record_start_line = lnum + 1;
95
+ line_aggregator.reset();
96
+ if (collect_records) {
97
+ comments.push({record_num: consumer.num_records_parsed, comment_text: line_text});
98
+ }
99
+ continue;
100
+ } else if (line_aggregator.has_full_record) {
101
+ record_text = line_aggregator.get_full_line('\n');
102
+ line_aggregator.reset();
103
+ } else {
104
+ continue;
105
+ }
106
+ } else {
107
+ if (comment_prefix && line_text.startsWith(comment_prefix)) {
108
+ record_start_line = lnum + 1;
109
+ if (collect_records) {
110
+ comments.push({record_num: consumer.num_records_parsed, comment_text: line_text});
111
+ }
112
+ continue;
113
+ } else {
114
+ record_text = line_text;
115
+ }
116
+ }
117
+ if (!consumer.consume(record_text, record_start_line)) {
118
+ return [consumer.records, consumer.num_records_parsed, consumer.fields_info, consumer.first_defective_line, consumer.first_trailing_space_line, comments];
119
+ }
120
+ record_start_line = lnum + 1;
121
+ if (max_records_to_parse !== -1 && consumer.num_records_parsed >= max_records_to_parse) {
122
+ return [consumer.records, consumer.num_records_parsed, consumer.fields_info, consumer.first_defective_line, consumer.first_trailing_space_line, comments];
123
+ }
124
+ }
125
+
126
+ if (line_aggregator.is_inside_multiline_record()) {
127
+ assert(policy == 'quoted_rfc');
128
+ consumer.consume(line_aggregator.get_full_line('\n'), record_start_line);
129
+ }
130
+ return [consumer.records, consumer.num_records_parsed, consumer.fields_info, consumer.first_defective_line, consumer.first_trailing_space_line, comments];
131
+ }
132
+
133
+
134
+ module.exports.parse_document_records = parse_document_records;
135
+ module.exports.assert = assert;
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/language-configuration.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "autoClosingPairs": [
3
+ ["\"", "\""]
4
+ ],
5
+ "surroundingPairs": [
6
+ ["\"", "\""]
7
+ ]
8
+ }
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/package.json ADDED
@@ -0,0 +1,639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "rainbow-csv",
3
+ "displayName": "Rainbow CSV",
4
+ "description": "Highlight CSV and TSV files, Run SQL-like queries",
5
+ "version": "3.24.1",
6
+ "publisher": "mechatroner",
7
+ "license": "MIT",
8
+ "icon": "rainbow_csv_logo.png",
9
+ "engines": {
10
+ "vscode": "^1.95.0"
11
+ },
12
+ "keywords": [
13
+ "csv",
14
+ "tsv",
15
+ "highlight"
16
+ ],
17
+ "categories": [
18
+ "Data Science",
19
+ "Other",
20
+ "Programming Languages"
21
+ ],
22
+ "activationEvents": [
23
+ "onLanguage:csv",
24
+ "onLanguage:tsv",
25
+ "onLanguage:csv (semicolon)",
26
+ "onLanguage:csv (pipe)",
27
+ "onLanguage:csv (whitespace)",
28
+ "onLanguage:dynamic csv",
29
+ "onLanguage:plaintext",
30
+ "onCommand:rainbow-csv.RBQL",
31
+ "onCommand:rainbow-csv.RainbowSeparator",
32
+ "onCommand:rainbow-csv.SampleHead",
33
+ "onCommand:rainbow-csv.SampleTail"
34
+ ],
35
+ "main": "./extension",
36
+ "browser": "./dist/web/extension.js",
37
+ "contributes": {
38
+ "colors": [
39
+ {
40
+ "id": "rainbowtrack1",
41
+ "description": "Color for column tracking one.",
42
+ "defaults": {
43
+ "dark": "#ff0000",
44
+ "light": "#ff0000",
45
+ "highContrast": "#ff0000",
46
+ "highContrastLight": "#ff0000"
47
+ }
48
+ },
49
+ {
50
+ "id": "rainbowtrack2",
51
+ "description": "Color for column tracking two.",
52
+ "defaults": {
53
+ "dark": "#00ff00",
54
+ "light": "#00ff00",
55
+ "highContrast": "#00ff00",
56
+ "highContrastLight": "#00ff00"
57
+ }
58
+ },
59
+ {
60
+ "id": "rainbowtrack3",
61
+ "description": "Color for column tracking three.",
62
+ "defaults": {
63
+ "dark": "#0000ff",
64
+ "light": "#0000ff",
65
+ "highContrast": "#0000ff",
66
+ "highContrastLight": "#0000ff"
67
+ }
68
+ }
69
+ ],
70
+ "configuration": {
71
+ "type": "object",
72
+ "title": "Rainbow CSV",
73
+ "properties": {
74
+ "rainbow_csv.enable_sticky_header": {
75
+ "type": "boolean",
76
+ "default": true,
77
+ "order": 1,
78
+ "description": "Enable sticky header line at the top."
79
+ },
80
+ "rainbow_csv.enable_separator_autodetection": {
81
+ "type": "boolean",
82
+ "default": true,
83
+ "order": 2,
84
+ "description": "Enable automatic content based separator autodetection."
85
+ },
86
+ "rainbow_csv.autodetect_separators": {
87
+ "type": "array",
88
+ "default": [
89
+ "TAB",
90
+ ",",
91
+ ";",
92
+ "|"
93
+ ],
94
+ "description": "Enable automatic content-based separator autodetection for the specified list of separators (multicharacter separators are supported).",
95
+ "order": 3,
96
+ "items": {
97
+ "type": "string",
98
+ "description": "Separator"
99
+ }
100
+ },
101
+ "rainbow_csv.autodetection_min_line_count": {
102
+ "type": "number",
103
+ "default": 10,
104
+ "order": 4,
105
+ "description": "Minimum number of non-comment lines in file for content-based autodetection."
106
+ },
107
+ "rainbow_csv.highlight_rows": {
108
+ "type": "boolean",
109
+ "default": false,
110
+ "order": 5,
111
+ "description": "Highlight rows with alternate background colors by default."
112
+ },
113
+ "rainbow_csv.virtual_alignment_mode": {
114
+ "type": "string",
115
+ "enum": [
116
+ "disabled",
117
+ "manual",
118
+ "always"
119
+ ],
120
+ "enumDescriptions": [
121
+ "Disabled. Align only when \"VirtualAlign\" command is executed",
122
+ "Align when \"Align\" Status Bar button is clicked",
123
+ "Automatically align all files"
124
+ ],
125
+ "order": 6,
126
+ "default": "disabled",
127
+ "description": "Virtual alignment based on VSCode inlay hints that doesn't change underlying file content."
128
+ },
129
+ "rainbow_csv.virtual_alignment_char": {
130
+ "type": "string",
131
+ "enum": [
132
+ "middot",
133
+ "space"
134
+ ],
135
+ "enumDescriptions": [
136
+ "Middle dot",
137
+ "Whitespace"
138
+ ],
139
+ "order": 7,
140
+ "default": "middot",
141
+ "description": "Virtual alignment character."
142
+ },
143
+ "rainbow_csv.virtual_alignment_vertical_grid": {
144
+ "type": "boolean",
145
+ "default": false,
146
+ "order": 8,
147
+ "description": "Show vertical grid in virtual alignment mode."
148
+ },
149
+ "rainbow_csv.enable_tooltip": {
150
+ "type": "boolean",
151
+ "default": true,
152
+ "order": 9,
153
+ "description": "Enable column-info tooltip on hover."
154
+ },
155
+ "rainbow_csv.enable_tooltip_column_names": {
156
+ "type": "boolean",
157
+ "default": true,
158
+ "order": 10,
159
+ "description": "Show column names in tooltip."
160
+ },
161
+ "rainbow_csv.enable_cursor_position_info": {
162
+ "type": "boolean",
163
+ "default": true,
164
+ "order": 11,
165
+ "description": "Keyboard input text cursor: show info about the cursor CSV column in the status bar."
166
+ },
167
+ "rainbow_csv.double_width_alignment": {
168
+ "type": "boolean",
169
+ "default": true,
170
+ "order": 12,
171
+ "description": "If enabled treat double width unicode chars e.g. Chinese or Japanese chars as double wide when aligning."
172
+ },
173
+ "rainbow_csv.enable_auto_csv_lint": {
174
+ "type": "boolean",
175
+ "default": true,
176
+ "order": 13,
177
+ "description": "Automatically run linter for every CSV file."
178
+ },
179
+ "rainbow_csv.csv_lint_detect_trailing_spaces": {
180
+ "type": "boolean",
181
+ "default": false,
182
+ "order": 14,
183
+ "description": "CSV Lint: detect leading and trailing whitespaces in fields and show warning."
184
+ },
185
+ "rainbow_csv.comment_prefix": {
186
+ "type": "string",
187
+ "default": "",
188
+ "order": 15,
189
+ "description": "Comment lines prefix, e.g. \"#\". Set to empty string to disable."
190
+ },
191
+ "rainbow_csv.rbql_output_dir": {
192
+ "type": "string",
193
+ "default": "TMP",
194
+ "order": 16,
195
+ "description": "Output directory for RBQL result sets, can be `TMP`, `INPUT` or a custom absolute path. `TMP` - output in system tmp dir(default), `INPUT` - output in the same dir as input file, otherwise use provided path as the output directory e.g. `/path/to/custom/dir`."
196
+ },
197
+ "rainbow_csv.rbql_with_headers_by_default": {
198
+ "type": "boolean",
199
+ "default": false,
200
+ "order": 17,
201
+ "description": "RBQL treats the first line as header by default."
202
+ },
203
+ "rainbow_csv.rbql_strip_spaces": {
204
+ "type": "boolean",
205
+ "default": true,
206
+ "order": 18,
207
+ "description": "RBQL strips (trims) leading and trailing spaces from each field as a preprocessig step."
208
+ },
209
+ "rainbow_csv.enable_context_menu_head": {
210
+ "type": "boolean",
211
+ "default": false,
212
+ "order": 19,
213
+ "description": "Enable \"Preview CSV head\" option in File Explorer context menu for all files."
214
+ },
215
+ "rainbow_csv.enable_context_menu_tail": {
216
+ "type": "boolean",
217
+ "default": false,
218
+ "order": 20,
219
+ "description": "Enable \"Preview CSV tail\" option in File Explorer context menu for all files."
220
+ },
221
+ "rainbow_csv.enable_debug_logging": {
222
+ "type": "boolean",
223
+ "default": false,
224
+ "order": 21,
225
+ "description": "Dev Mode: Enable Debug Logging. Run command [Developer: Show Logs...] -> [rainbow_csv_debug_channel] to see the output."
226
+ }
227
+ }
228
+ },
229
+ "submenus": [
230
+ {
231
+ "id": "rainbow_csv.submenu",
232
+ "label": "Rainbow CSV"
233
+ }
234
+ ],
235
+ "menus": {
236
+ "editor/context": [
237
+ {
238
+ "submenu": "rainbow_csv.submenu"
239
+ }
240
+ ],
241
+ "rainbow_csv.submenu": [
242
+ {
243
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
244
+ "command": "rainbow-csv.GoToColumn",
245
+ "group": "common@7"
246
+ },
247
+ {
248
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
249
+ "command": "rainbow-csv.SetHeaderLine",
250
+ "group": "common@7"
251
+ },
252
+ {
253
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
254
+ "command": "rainbow-csv.SetCommentPrefix",
255
+ "group": "common@6"
256
+ },
257
+ {
258
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|plaintext|^[ct]sv/",
259
+ "command": "rainbow-csv.RainbowSeparator",
260
+ "group": "common@5"
261
+ },
262
+ {
263
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
264
+ "command": "rainbow-csv.RBQL",
265
+ "group": "common@4"
266
+ },
267
+ {
268
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
269
+ "command": "rainbow-csv.ToggleRowBackground",
270
+ "group": "common@3"
271
+ },
272
+ {
273
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
274
+ "command": "rainbow-csv.ToggleColumnTracking",
275
+ "group": "common@2"
276
+ },
277
+ {
278
+ "when": "editorTextFocus && editorLangId =~ /plaintext/",
279
+ "command": "rainbow-csv.RainbowSeparatorOn",
280
+ "group": "common@1"
281
+ },
282
+ {
283
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
284
+ "command": "rainbow-csv.ExcelCopy",
285
+ "group": "datacopy@1"
286
+ },
287
+ {
288
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
289
+ "command": "rainbow-csv.MarkdownCopy",
290
+ "group": "datacopy@2"
291
+ },
292
+ {
293
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
294
+ "command": "rainbow-csv.Align",
295
+ "group": "regular_align@1"
296
+ },
297
+ {
298
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
299
+ "command": "rainbow-csv.Shrink",
300
+ "group": "regular_align@2"
301
+ },
302
+ {
303
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
304
+ "command": "rainbow-csv.VirtualAlign",
305
+ "group": "virtual_align@1"
306
+ },
307
+ {
308
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
309
+ "command": "rainbow-csv.VirtualShrink",
310
+ "group": "virtual_align@2"
311
+ },
312
+ {
313
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
314
+ "command": "rainbow-csv.ColumnEditSelect",
315
+ "group": "wgroup@1"
316
+ },
317
+ {
318
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
319
+ "command": "rainbow-csv.ColumnEditBefore",
320
+ "group": "wgroup@2"
321
+ },
322
+ {
323
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
324
+ "command": "rainbow-csv.ColumnEditAfter",
325
+ "group": "wgroup@3"
326
+ },
327
+ {
328
+ "when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
329
+ "command": "rainbow-csv.RainbowSeparatorOff",
330
+ "group": "xgroup@1"
331
+ }
332
+ ],
333
+ "explorer/context": [
334
+ {
335
+ "command": "rainbow-csv.SampleHead",
336
+ "when": "config.rainbow_csv.enable_context_menu_head || resourceLangId =~ /plaintext|^[ct]sv/",
337
+ "group": "rainbow_csv"
338
+ },
339
+ {
340
+ "command": "rainbow-csv.SampleTail",
341
+ "when": "config.rainbow_csv.enable_context_menu_tail",
342
+ "group": "rainbow_csv"
343
+ }
344
+ ]
345
+ },
346
+ "languages": [
347
+ {
348
+ "id": "csv",
349
+ "aliases": [
350
+ "CSV",
351
+ "csv"
352
+ ],
353
+ "extensions": [
354
+ ".csv"
355
+ ],
356
+ "configuration": "./language-configuration.json"
357
+ },
358
+ {
359
+ "id": "tsv",
360
+ "aliases": [
361
+ "TSV",
362
+ "tsv"
363
+ ],
364
+ "extensions": [
365
+ ".tsv",
366
+ ".tab"
367
+ ],
368
+ "configuration": "./language-configuration.json"
369
+ },
370
+ {
371
+ "id": "csv (pipe)",
372
+ "aliases": [
373
+ "CSV (pipe)",
374
+ "csv (pipe)"
375
+ ],
376
+ "extensions": [],
377
+ "configuration": "./language-configuration.json"
378
+ },
379
+ {
380
+ "id": "csv (whitespace)",
381
+ "aliases": [
382
+ "CSV (whitespace)",
383
+ "csv (whitespace)"
384
+ ],
385
+ "extensions": [],
386
+ "configuration": "./language-configuration.json"
387
+ },
388
+ {
389
+ "id": "csv (semicolon)",
390
+ "aliases": [
391
+ "CSV (semicolon)",
392
+ "csv (semicolon)"
393
+ ],
394
+ "extensions": [],
395
+ "configuration": "./language-configuration.json"
396
+ },
397
+ {
398
+ "id": "dynamic csv",
399
+ "aliases": [
400
+ "Dynamic CSV",
401
+ "dynamic csv"
402
+ ],
403
+ "extensions": [],
404
+ "configuration": "./language-configuration.json"
405
+ }
406
+ ],
407
+ "commands": [
408
+ {
409
+ "command": "rainbow-csv.CSVLint",
410
+ "category": "Rainbow CSV",
411
+ "title": "CSV Lint"
412
+ },
413
+ {
414
+ "command": "rainbow-csv.SetVirtualHeader",
415
+ "category": "Rainbow CSV",
416
+ "title": "Set virtual header"
417
+ },
418
+ {
419
+ "command": "rainbow-csv.SetHeaderLine",
420
+ "category": "Rainbow CSV",
421
+ "title": "Set header line"
422
+ },
423
+ {
424
+ "command": "rainbow-csv.SetCommentPrefix",
425
+ "category": "Rainbow CSV",
426
+ "title": "Set selection as comment prefix"
427
+ },
428
+ {
429
+ "command": "rainbow-csv.RBQL",
430
+ "category": "Rainbow CSV",
431
+ "title": "RBQL Query"
432
+ },
433
+ {
434
+ "command": "rainbow-csv.SetJoinTableName",
435
+ "category": "Rainbow CSV",
436
+ "title": "Set join table name for RBQL"
437
+ },
438
+ {
439
+ "command": "rainbow-csv.ColumnEditBefore",
440
+ "category": "Rainbow CSV",
441
+ "title": "Column edit - Before"
442
+ },
443
+ {
444
+ "command": "rainbow-csv.ColumnEditAfter",
445
+ "category": "Rainbow CSV",
446
+ "title": "Column edit - After"
447
+ },
448
+ {
449
+ "command": "rainbow-csv.ColumnEditSelect",
450
+ "category": "Rainbow CSV",
451
+ "title": "Column edit - Selection"
452
+ },
453
+ {
454
+ "command": "rainbow-csv.RainbowSeparator",
455
+ "category": "Rainbow CSV",
456
+ "title": "Set rainbow separator"
457
+ },
458
+ {
459
+ "command": "rainbow-csv.ToggleColumnTracking",
460
+ "category": "Rainbow CSV",
461
+ "title": "Toggle Column Tracking"
462
+ },
463
+ {
464
+ "command": "rainbow-csv.ExcelCopy",
465
+ "category": "Rainbow CSV",
466
+ "title": "Copy for Excel / Sheets export"
467
+ },
468
+ {
469
+ "command": "rainbow-csv.MarkdownCopy",
470
+ "category": "Rainbow CSV",
471
+ "title": "Copy in Markdown table format"
472
+ },
473
+ {
474
+ "command": "rainbow-csv.RainbowSeparatorOff",
475
+ "category": "Rainbow CSV",
476
+ "title": "Disable Rainbow CSV"
477
+ },
478
+ {
479
+ "command": "rainbow-csv.RainbowSeparatorOn",
480
+ "category": "Rainbow CSV",
481
+ "title": "Re-enable Rainbow CSV"
482
+ },
483
+ {
484
+ "command": "rainbow-csv.ToggleRowBackground",
485
+ "category": "Rainbow CSV",
486
+ "title": "Toggle Alternating Row Background"
487
+ },
488
+ {
489
+ "command": "rainbow-csv.Align",
490
+ "category": "Rainbow CSV",
491
+ "title": "Align CSV Columns with whitespaces"
492
+ },
493
+ {
494
+ "command": "rainbow-csv.Shrink",
495
+ "category": "Rainbow CSV",
496
+ "title": "Shrink CSV table - trim whitespaces"
497
+ },
498
+ {
499
+ "command": "rainbow-csv.VirtualAlign",
500
+ "category": "Rainbow CSV",
501
+ "title": "Virtual Align CSV Columns"
502
+ },
503
+ {
504
+ "command": "rainbow-csv.VirtualShrink",
505
+ "category": "Rainbow CSV",
506
+ "title": "Undo Virtual Align"
507
+ },
508
+ {
509
+ "command": "rainbow-csv.CopyBack",
510
+ "category": "Rainbow CSV",
511
+ "title": "CopyBack"
512
+ },
513
+ {
514
+ "command": "rainbow-csv.SampleHead",
515
+ "title": "Preview big CSV: head"
516
+ },
517
+ {
518
+ "command": "rainbow-csv.SampleTail",
519
+ "title": "Preview big CSV: tail"
520
+ },
521
+ {
522
+ "command": "rainbow-csv.GoToColumn",
523
+ "category": "Rainbow CSV",
524
+ "title": "Go to column"
525
+ }
526
+ ],
527
+ "semanticTokenScopes": [
528
+ {
529
+ "language": "dynamic csv",
530
+ "scopes": {
531
+ "rainbow1": [
532
+ "rainbow1"
533
+ ],
534
+ "rainbow2": [
535
+ "keyword.rainbow2"
536
+ ],
537
+ "rainbow3": [
538
+ "entity.name.function.rainbow3"
539
+ ],
540
+ "rainbow4": [
541
+ "comment.rainbow4"
542
+ ],
543
+ "rainbow5": [
544
+ "string.rainbow5"
545
+ ],
546
+ "rainbow6": [
547
+ "variable.parameter.rainbow6"
548
+ ],
549
+ "rainbow7": [
550
+ "constant.numeric.rainbow7"
551
+ ],
552
+ "rainbow8": [
553
+ "entity.name.type.rainbow8"
554
+ ],
555
+ "rainbow9": [
556
+ "markup.bold.rainbow9"
557
+ ],
558
+ "rainbow10": [
559
+ "invalid.rainbow10"
560
+ ],
561
+ "comment": [
562
+ "comment"
563
+ ]
564
+ }
565
+ }
566
+ ],
567
+ "configurationDefaults": {
568
+ "[dynamic csv][csv][tsv][csv (semicolon)][csv (pipe)][csv (whitespace)]": {
569
+ "editor.semanticHighlighting.enabled": true
570
+ }
571
+ },
572
+ "grammars": [
573
+ {
574
+ "language": "csv",
575
+ "scopeName": "text.csv",
576
+ "path": "./syntaxes/csv.tmLanguage.json"
577
+ },
578
+ {
579
+ "language": "tsv",
580
+ "scopeName": "text.tsv",
581
+ "path": "./syntaxes/tsv.tmLanguage.json"
582
+ },
583
+ {
584
+ "language": "csv (pipe)",
585
+ "scopeName": "text.psv",
586
+ "path": "./syntaxes/pipe_simple.tmLanguage.json"
587
+ },
588
+ {
589
+ "language": "csv (whitespace)",
590
+ "scopeName": "text.wspcsv",
591
+ "path": "./syntaxes/wspcsv.tmLanguage.json"
592
+ },
593
+ {
594
+ "language": "csv (semicolon)",
595
+ "scopeName": "text.scsv",
596
+ "path": "./syntaxes/scsv.tmLanguage.json"
597
+ },
598
+ {
599
+ "language": "dynamic csv",
600
+ "scopeName": "text.dynamiccsv",
601
+ "path": "./syntaxes/dynamic_csv.tmLanguage.json"
602
+ }
603
+ ]
604
+ },
605
+ "capabilities": {
606
+ "hoverProvider": "true"
607
+ },
608
+ "scripts": {
609
+ "vscode:prepublish": "npm run package-web",
610
+ "compile-web": "webpack",
611
+ "lint": "eslint rainbow_utils.js fast_load_utils.js extension.js test/runTest.js && eslint -c .eslintrc_browser.json rainbow_utils.js rbql_client.js dialect_select.js",
612
+ "watch-web": "webpack --watch",
613
+ "package-web": "webpack --mode production --devtool hidden-source-map",
614
+ "start-web-server": "vscode-test-web --version stable --browser=none --extensionDevelopmentPath=. test",
615
+ "test-in-browser": "vscode-test-web --version stable --browser=chromium --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/suite/index.js test",
616
+ "test": "node ./test/runTest.js",
617
+ "unit-test-only": "node ./test/suite/run_unit_tests.js"
618
+ },
619
+ "devDependencies": {
620
+ "@types/vscode": "^1.95.0",
621
+ "@vscode/test-web": "^0.0.64",
622
+ "@vscode/test-electron": "^2.4.1",
623
+ "webpack": "^5.96.1",
624
+ "webpack-cli": "^5.1.4",
625
+ "assert": "^2.1.0",
626
+ "process": "^0.11.10",
627
+ "globals": "^15.12.0",
628
+ "eslint": "^9.15.0"
629
+ },
630
+ "repository": {
631
+ "type": "git",
632
+ "url": "https://github.com/mechatroner/vscode_rainbow_csv"
633
+ },
634
+ "__metadata": {
635
+ "installedTimestamp": 1779258762987,
636
+ "targetPlatform": "undefined",
637
+ "size": 3018244
638
+ }
639
+ }
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rainbow_csv_logo.png ADDED

Git LFS Details

  • SHA256: 33155f3091c1b8ebff06ac11e54886456dfc7fe2a503f85e93c83fc0555efe47
  • Pointer size: 129 Bytes
  • Size of remote file: 2.55 kB
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rainbow_utils.js ADDED
@@ -0,0 +1,1339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const os = require('os');
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ const rbql = require('./rbql_core/rbql-js/rbql.js');
6
+ const rbql_csv = require('./rbql_core/rbql-js/rbql_csv.js');
7
+ const csv_utils = require('./rbql_core/rbql-js/csv_utils.js');
8
+
9
+ const fast_load_utils = require('./fast_load_utils.js');
10
+
11
+ const wcwidth = require('./contrib/wcwidth/index.js');
12
+
13
+ // TODO Allow the number regex to end with dot e.g. 12. or 1245. without the fractional part.
14
+ // Otherwise as soon as someone start typing a fractional part it immediately renders the whole column as non-number for live CSV editing.
15
+ const number_regex = /^([0-9]+)(\.[0-9]+)?$/;
16
+
17
+ // Copypasted from extension.js
18
+ const QUOTED_RFC_POLICY = 'quoted_rfc';
19
+ const QUOTED_POLICY = 'quoted';
20
+ const max_preview_field_length = 250;
21
+
22
+
23
+ class AssertionError extends Error {}
24
+
25
+ function assert(condition, message=null) {
26
+ if (!condition) {
27
+ if (!message) {
28
+ message = 'Assertion error';
29
+ }
30
+ throw new AssertionError(message);
31
+ }
32
+ }
33
+
34
+
35
+ function get_default_js_udf_content() {
36
+ let default_content = `// This file can be used to store RBQL UDFs. Example:
37
+ //
38
+ // function foo(value) {
39
+ // return 'foo ' + String(value.length);
40
+ // }
41
+ //
42
+ // Functions defined in this file can be used in RBQL queries e.g.
43
+ // SELECT foo(a1), a2 WHERE foo(a3) != 'foo 5' LIMIT 10
44
+ //
45
+ // Don't forget to save this file after editing!
46
+ //
47
+ // Write your own functions below this line:
48
+ `.replace(new RegExp(/^ */, 'mg'), '');
49
+ return default_content;
50
+ }
51
+
52
+
53
+ function get_default_python_udf_content() {
54
+ let default_content = `# This file can be used to store RBQL UDFs. Example:
55
+ #
56
+ # def foo(value):
57
+ # return 'foo ' + str(len(value))
58
+ #
59
+ #
60
+ # Functions defined in this file can be used in RBQL queries e.g.
61
+ # SELECT foo(a1), a2 WHERE foo(a3) != 'foo 5' LIMIT 10
62
+ #
63
+ # Don't forget to save this file after editing!
64
+ #
65
+ # Write your own functions below this line:
66
+ `.replace(new RegExp(/^ */, 'mg'), '');
67
+ return default_content;
68
+ }
69
+
70
+
71
+ function get_cursor_position_if_unambiguous(active_editor) {
72
+ let selections = active_editor.selections;
73
+ if (!selections || selections.length != 1) {
74
+ // Support only single-cursor, multicursor is ambiguous.
75
+ return null;
76
+ }
77
+ let selection = selections[0];
78
+ let position = selection.active;
79
+ if (!position.isEqual(selection.anchor)) {
80
+ // Selections are ambiguous.
81
+ return null;
82
+ }
83
+ return position;
84
+ }
85
+
86
+
87
+ function is_ascii(src_str) {
88
+ return /^[\x00-\x7F]*$/.test(src_str);
89
+ }
90
+
91
+
92
+ class ColumnStat {
93
+ constructor(enable_double_width_alignment) {
94
+ this.enable_double_width_alignment = enable_double_width_alignment;
95
+ this.can_be_numeric = true;
96
+ this.max_total_length = 0;
97
+ this.max_int_length = 0;
98
+ this.max_fractional_length = 0;
99
+ this.only_ascii = enable_double_width_alignment ? true : null;
100
+ this.has_wide_chars = enable_double_width_alignment ? false : null;
101
+ }
102
+
103
+ mark_non_numeric() {
104
+ this.can_be_numeric = false;
105
+ this.max_int_length = 0;
106
+ this.max_fractional_length = 0;
107
+ }
108
+
109
+ is_numeric() {
110
+ return this.max_int_length > 0;
111
+ }
112
+
113
+ reconcile(rhs) {
114
+ this.max_total_length = Math.max(this.max_total_length, rhs.max_total_length);
115
+ if (this.enable_double_width_alignment) {
116
+ assert(rhs.enable_double_width_alignment, "Unable to reconcile");
117
+ this.only_ascii = this.only_ascii && rhs.only_ascii;
118
+ this.has_wide_chars = this.has_wide_chars || rhs.has_wide_chars;
119
+ }
120
+ if (!rhs.can_be_numeric) {
121
+ this.mark_non_numeric();
122
+ }
123
+ if (!this.can_be_numeric) {
124
+ return;
125
+ }
126
+ this.max_int_length = Math.max(this.max_int_length, rhs.max_int_length);
127
+ this.max_fractional_length = Math.max(this.max_fractional_length, rhs.max_fractional_length);
128
+ }
129
+
130
+ get_adjusted_total_length() {
131
+ // The sum of integer and float parts can be bigger than the max width, e.g. here:
132
+ // value
133
+ // 0.12
134
+ // 1234
135
+ return Math.max(this.max_total_length, this.max_int_length + this.max_fractional_length);
136
+ }
137
+
138
+ get_adjusted_int_length() {
139
+ // This is needed when the header is wider than numeric components and/or their sum.
140
+ return Math.max(this.max_int_length, this.max_total_length - this.max_fractional_length);
141
+ }
142
+
143
+ update_from_field(multiline_field_segments, is_first_record) {
144
+ if (multiline_field_segments.length > 1) {
145
+ // We don't allow multiline fields to be numeric for simplicity.
146
+ this.mark_non_numeric();
147
+ }
148
+ for (let field_segment of multiline_field_segments) {
149
+ this.max_total_length = Math.max(this.max_total_length, field_segment.length);
150
+ if (this.enable_double_width_alignment) {
151
+ this.only_ascii = this.only_ascii && is_ascii(field_segment);
152
+ let visual_field_length = this.only_ascii ? field_segment.length : wcwidth(field_segment);
153
+ this.has_wide_chars = this.has_wide_chars || visual_field_length != field_segment.length;
154
+ this.max_total_length = Math.max(this.max_total_length, visual_field_length);
155
+ }
156
+ if (!this.can_be_numeric) {
157
+ continue;
158
+ }
159
+ // TODO improve number_regex and subsequent logic to work with numeric fields with leading/trailing spaces for virtual alignment.
160
+ let match_result = number_regex.exec(field_segment);
161
+ if (match_result === null) {
162
+ if (!is_first_record && field_segment.length) { // Checking field_length here allows numeric columns to have some of the fields empty.
163
+ // We only mark the column as non-numeric if we know that this is not a header line.
164
+ this.mark_non_numeric();
165
+ }
166
+ continue;
167
+ }
168
+ let cur_integer_part_length = match_result[1].length;
169
+ this.max_int_length = Math.max(this.max_int_length, cur_integer_part_length);
170
+ let cur_fractional_part_length = match_result[2] === undefined ? 0 : match_result[2].length;
171
+ this.max_fractional_length = Math.max(this.max_fractional_length, cur_fractional_part_length);
172
+ }
173
+ }
174
+
175
+ evaluate_align_field(field, is_first_record, is_first_in_line, is_last_in_line, post_delim_readability_gap_length) {
176
+ // Align field, use Math.max() to avoid negative delta_length which can happen theorethically due to async doc edit.
177
+ let visual_field_length = this.has_wide_chars ? wcwidth(field) : field.length;
178
+ let readability_gap = is_first_in_line ? 0 : post_delim_readability_gap_length;
179
+ if (!this.is_numeric()) {
180
+ let delta_length = Math.max(this.max_total_length - visual_field_length, 0);
181
+ let trailing_length = is_last_in_line ? 0 : delta_length;
182
+ return [readability_gap, trailing_length];
183
+ }
184
+ if (is_first_record) {
185
+ if (number_regex.exec(field) === null) {
186
+ // The line must be a header - align it using max_width rule.
187
+ let delta_length = Math.max(this.get_adjusted_total_length() - visual_field_length, 0);
188
+ let trailing_length = is_last_in_line ? 0 : delta_length;
189
+ return [readability_gap, trailing_length];
190
+ }
191
+ }
192
+ let dot_pos = field.indexOf('.');
193
+ let cur_integer_part_length = dot_pos == -1 ? field.length : dot_pos;
194
+ // Here `cur_fractional_part_length` includes the leading dot too.
195
+ let cur_fractional_part_length = dot_pos == -1 ? 0 : field.length - dot_pos;
196
+ let integer_delta_length = Math.max(this.get_adjusted_int_length() - cur_integer_part_length, 0);
197
+ let fractional_delta_length = Math.max(this.max_fractional_length - cur_fractional_part_length);
198
+ let trailing_length = is_last_in_line ? 0 : fractional_delta_length;
199
+ return [integer_delta_length + readability_gap, trailing_length];
200
+ }
201
+
202
+ }
203
+
204
+
205
+ function update_column_stats_from_record(record_fields, is_first_record, all_columns_stats, enable_double_width_alignment) {
206
+ for (let fnum = 0; fnum < record_fields.length; fnum++) {
207
+ if (all_columns_stats.length <= fnum) {
208
+ all_columns_stats.push(new ColumnStat(enable_double_width_alignment));
209
+ }
210
+ all_columns_stats[fnum].update_from_field(record_fields[fnum], is_first_record);
211
+ }
212
+ }
213
+
214
+
215
+ function get_trimmed_rfc_record_fields_from_record(record) {
216
+ let record_fields = [];
217
+ for (let fnum = 0; fnum < record.length; fnum++) {
218
+ let field_segments = record[fnum].split('\n');
219
+ field_segments = field_segments.map(v => v.trim());
220
+ record_fields.push(field_segments);
221
+ }
222
+ return record_fields;
223
+ }
224
+
225
+
226
+ function calculate_column_offsets(column_stats, delim_length, post_delim_readability_gap_length=1) {
227
+ let result = [];
228
+ if (!column_stats.length) {
229
+ return result;
230
+ }
231
+ result.push(0);
232
+ for (let i = 1; i < column_stats.length; i++) {
233
+ let previous_length = column_stats[i - 1].get_adjusted_total_length();
234
+ let previous_offset = result[i - 1];
235
+ result.push(previous_offset + previous_length + delim_length + post_delim_readability_gap_length);
236
+ }
237
+ assert(result.length == column_stats.length);
238
+ return result;
239
+ }
240
+
241
+
242
+ function calc_column_stats(active_doc, delim, policy, comment_prefix, enable_double_width_alignment) {
243
+ let [records, _num_records_parsed, _fields_info, first_defective_line, _first_trailing_space_line, comments] = fast_load_utils.parse_document_records(active_doc, delim, policy, comment_prefix, /*stop_on_warning=*/true, /*max_records_to_parse=*/-1, /*collect_records=*/true, /*preserve_quotes_and_whitespaces=*/true);
244
+ if (first_defective_line !== null) {
245
+ return [null, first_defective_line, null, null];
246
+ }
247
+ let all_columns_stats = [];
248
+ let is_first_record = true;
249
+ for (let record of records) {
250
+ // TODO for optimization we can actually return a new array of record_fields to avoid doing the same thing again in align.
251
+ let record_fields = get_trimmed_rfc_record_fields_from_record(record);
252
+ update_column_stats_from_record(record_fields, is_first_record, all_columns_stats, enable_double_width_alignment);
253
+ is_first_record = false;
254
+ }
255
+ return [all_columns_stats, null, records, comments];
256
+ }
257
+
258
+
259
+ function calc_column_stats_for_fragment(row_infos, header_lnum, enable_double_width_alignment) {
260
+ // Note: `row_infos` can contain non-consecutive fragments of the document e.g. header and view range below.
261
+ let all_columns_stats = [];
262
+ for (let row_info of row_infos) {
263
+ if (row_info.comment_range !== null) {
264
+ continue;
265
+ }
266
+ let is_assumed_header_record = row_info.record_ranges.length && row_info.record_ranges[0].length && row_info.record_ranges[0][0].start.line == header_lnum;
267
+ update_column_stats_from_record(row_info.record_fields, is_assumed_header_record, all_columns_stats, enable_double_width_alignment);
268
+ }
269
+ return all_columns_stats;
270
+ }
271
+
272
+
273
+ function reconcile_whole_doc_and_local_column_stats(whole_doc_column_stats, local_column_stats) {
274
+ let max_num_fields = Math.max(whole_doc_column_stats.length, local_column_stats.length);
275
+ for (let i = 0; i < max_num_fields; i++) {
276
+ if (i >= whole_doc_column_stats.length) {
277
+ break;
278
+ }
279
+ if (i >= local_column_stats.length) {
280
+ local_column_stats.push(whole_doc_column_stats[i]);
281
+ continue;
282
+ }
283
+ local_column_stats[i].reconcile(whole_doc_column_stats[i]);
284
+ }
285
+ }
286
+
287
+
288
+ function evaluate_rfc_align_field(field, is_first_record, column_stat, column_offset, is_field_segment, is_first_in_line, is_last_in_line, post_delim_readability_gap_length=1) {
289
+ let [num_before, num_after] = column_stat.evaluate_align_field(field, is_first_record, is_first_in_line, is_last_in_line, post_delim_readability_gap_length);
290
+ if (is_field_segment) {
291
+ num_before += column_offset;
292
+ }
293
+ return [num_before, num_after];
294
+ }
295
+
296
+
297
+ function rfc_align_field(field, is_first_record, column_stat, column_offset, is_field_segment, is_first_in_line, is_last_in_line) {
298
+ let [num_before, num_after] = evaluate_rfc_align_field(field, is_first_record, column_stat, column_offset, is_field_segment, is_first_in_line, is_last_in_line);
299
+ return ' '.repeat(num_before) + field + ' '.repeat(num_after);
300
+ }
301
+
302
+
303
+ function calc_max_column_widths(records) {
304
+ if (!records.length) {
305
+ return [];
306
+ }
307
+ let column_widths = [];
308
+ for (let row = 0; row < records.length; row++) {
309
+ for (let col = 0; col < records[row].length; col++) {
310
+ if (column_widths.length <= col) {
311
+ column_widths.push(0);
312
+ }
313
+ column_widths[col] = Math.max(column_widths[col], records[row][col].length);
314
+ }
315
+ }
316
+ return column_widths;
317
+ }
318
+
319
+
320
+ function generate_markdown_lines(records) {
321
+ for (let row = 0; row < records.length; row++) {
322
+ for (let col = 0; col < records[row].length; col++) {
323
+ // Escape pipe char.
324
+ records[row][col] = records[row][col].replaceAll('|', '\\|');
325
+ }
326
+ }
327
+ let max_column_widths = calc_max_column_widths(records);
328
+ let markdown_table_cells = [];
329
+ for (let row = 0; row < records.length; row++) {
330
+ let markdown_row_cells = [];
331
+ for (let col = 0; col < records[row].length; col++) {
332
+ // Here we ensure that `delta_length` is positive just in case: the substraction result can't become negative.
333
+ let delta_length = Math.max(0, max_column_widths[col] - records[row][col].length);
334
+ let aligned_cell = records[row][col] + ' '.repeat(delta_length);
335
+ markdown_row_cells.push(aligned_cell);
336
+ }
337
+ markdown_table_cells.push(markdown_row_cells);
338
+ }
339
+ let markdown_lines = markdown_table_cells.map(v => '| ' + v.join(' | ') + ' |');
340
+ let header_separator_line = '| ' + (max_column_widths.map(v => '-'.repeat(v))).join(' | ') + ' |';
341
+ markdown_lines.splice(1, 0, header_separator_line);
342
+ return markdown_lines;
343
+ }
344
+
345
+
346
+ class RecordCommentMerger {
347
+ constructor(records, comments) {
348
+ this.records = records;
349
+ this.comments = comments;
350
+ this.nr = 0;
351
+ this.next_comment = 0;
352
+ }
353
+
354
+ get_next() {
355
+ // Returns tuple (record, comment).
356
+ if (this.has_comments_left() && (!this.has_records_left() || this.comments[this.next_comment].record_num <= this.nr)) {
357
+ let result = [null, this.comments[this.next_comment].comment_text];
358
+ this.next_comment += 1;
359
+ return result;
360
+ }
361
+ if (this.has_records_left()) {
362
+ let result = [this.records[this.nr], null];
363
+ this.nr += 1;
364
+ return result;
365
+ }
366
+ return [null, null];
367
+ }
368
+
369
+ has_comments_left() {
370
+ return this.next_comment < this.comments.length;
371
+ }
372
+
373
+ has_records_left() {
374
+ return this.nr < this.records.length;
375
+ }
376
+
377
+ has_entries_left() {
378
+ return this.has_comments_left() || this.has_records_left();
379
+ }
380
+ }
381
+
382
+
383
+ function generate_inlay_hints(vscode, visible_range, header_lnum, table_ranges, all_columns_stats, delim_length, alignment_char, enable_vertical_grid, post_delim_readability_gap_length) {
384
+ // NOTE: `table_ranges` can contain non-consecutive fragments of the document e.g. header and view range below.
385
+ assert(alignment_char.length == 1);
386
+ let column_offsets = calculate_column_offsets(all_columns_stats, delim_length, post_delim_readability_gap_length);
387
+ let inlay_hints = [];
388
+ // Setting hint display margin too high could prevent lower hint labels from diplaying. There is a non-configurable VSCode limit apparently, see also https://github.com/mechatroner/vscode_rainbow_csv/issues/205
389
+ // We set higher limit below because it is the bottom lines that would be non-aligned due to the max inlay hint limit reached. Actually we might not need the bottom limit at all.
390
+ // Plus the more typical scroll direction is from top to bottom.
391
+ let leading_aligned_margin = 30;
392
+ let trailing_aligned_margin = 30;
393
+ let vscode_max_num_inline_hints = 1500;
394
+ if ((leading_aligned_margin + visible_range.end.line - visible_range.start.line + trailing_aligned_margin) * all_columns_stats.length > vscode_max_num_inline_hints) {
395
+ leading_aligned_margin = 5;
396
+ }
397
+ let hint_display_start_line = visible_range.start.line - leading_aligned_margin;
398
+ let hint_display_end_line = visible_range.end.line + trailing_aligned_margin;
399
+ for (let row_info of table_ranges) {
400
+ if (row_info.comment_range !== null) {
401
+ continue;
402
+ }
403
+ let is_assumed_header_record = row_info.record_ranges.length && row_info.record_ranges[0].length && row_info.record_ranges[0][0].start.line === header_lnum;
404
+ if (row_info.record_fields.length != row_info.record_ranges.length) {
405
+ break; // Should never happen.
406
+ }
407
+ for (let fnum = 0; fnum < row_info.record_fields.length; fnum++) {
408
+ if (fnum >= all_columns_stats.length) {
409
+ break; // Should never happen.
410
+ }
411
+ let is_last_field = fnum + 1 == row_info.record_fields.length;
412
+ let field_segments = row_info.record_fields[fnum];
413
+ let field_segments_ranges = row_info.record_ranges[fnum];
414
+ if (field_segments.length != field_segments_ranges.length) {
415
+ break; // Should never happen.
416
+ }
417
+ for (let i = 0; i < field_segments.length; i++) {
418
+ let field_segment_range = field_segments_ranges[i];
419
+ let is_field_segment = i > 0;
420
+ let is_last_in_line = is_last_field || i + 1 < field_segments.length;
421
+ let is_first_in_line = (fnum == 0) || is_field_segment;
422
+ let [num_before, num_after] = evaluate_rfc_align_field(field_segments[i], is_assumed_header_record, all_columns_stats[fnum], column_offsets[fnum], is_field_segment, is_first_in_line, is_last_in_line, post_delim_readability_gap_length);
423
+ if (num_before > 0) {
424
+ let hint_label = '';
425
+ if (!enable_vertical_grid || is_field_segment) {
426
+ hint_label += alignment_char.repeat(num_before);
427
+ } else {
428
+ // TODO find a way to "draw" vertical grid by extending hints for multiline rfc fields. Add a screenshot to README when implemented.
429
+ hint_label = '\u2588';
430
+ hint_label += alignment_char.repeat(num_before - 1);
431
+ }
432
+ let hint_line = field_segment_range.start.line;
433
+ if ((hint_line === header_lnum) || (hint_line >= hint_display_start_line && hint_line <= hint_display_end_line)) {
434
+ inlay_hints.push(new vscode.InlayHint(field_segment_range.start, hint_label));
435
+ }
436
+ }
437
+ if (num_after > 0) {
438
+ let hint_label = alignment_char.repeat(num_after);
439
+ let hint_line = field_segment_range.end.line;
440
+ if ((hint_line === header_lnum) || (hint_line >= hint_display_start_line && hint_line <= hint_display_end_line)) {
441
+ inlay_hints.push(new vscode.InlayHint(field_segment_range.end, hint_label));
442
+ }
443
+ }
444
+ }
445
+ }
446
+ }
447
+ return inlay_hints;
448
+ }
449
+
450
+
451
+ function align_columns(records, comments, column_stats, delim) {
452
+ // Unlike shrink_columns, here we don't compute `has_edit` flag because it is
453
+ // 1: Algorithmically complicated (especially for multiline fields) and we also can't just compare fields lengths like in shrink.
454
+ // 2: The alignment procedure is opinionated and "Already aligned" report has little value.
455
+ // Because of this in case of executing "Align" command consecutively N times one would have to run undo N times too.
456
+ // Here records do not contain delim and column_stats were calculated without taking the delim length into account.
457
+ let column_offsets = calculate_column_offsets(column_stats, delim.length);
458
+ let result_lines = [];
459
+ let is_first_record = true;
460
+ let merger = new RecordCommentMerger(records, comments);
461
+ while (merger.has_entries_left()) {
462
+ let [record, comment] = merger.get_next();
463
+ assert((comment === null) != (record === null));
464
+ if (record === null) {
465
+ result_lines.push(comment);
466
+ continue;
467
+ }
468
+ let aligned_fields = [];
469
+ let record_fields = get_trimmed_rfc_record_fields_from_record(record);
470
+ for (let fnum = 0; fnum < record_fields.length; fnum++) {
471
+ if (fnum >= column_stats.length) // Safeguard against async doc edit, should never happen.
472
+ break;
473
+ let is_last_field = fnum + 1 == record_fields.length;
474
+ let field_segments = record_fields[fnum];
475
+ for (let i = 0; i < field_segments.length; i++) {
476
+ let is_field_segment = i > 0;
477
+ if (is_field_segment) {
478
+ result_lines.push(aligned_fields.join(delim));
479
+ aligned_fields = [];
480
+ }
481
+ let is_last_in_line = is_last_field || i + 1 < field_segments.length;
482
+ let is_first_in_line = (fnum == 0) || is_field_segment;
483
+ let aligned_field = rfc_align_field(field_segments[i], is_first_record, column_stats[fnum], column_offsets[fnum], is_field_segment, is_first_in_line, is_last_in_line);
484
+ aligned_fields.push(aligned_field);
485
+ }
486
+ }
487
+ is_first_record = false;
488
+ result_lines.push(aligned_fields.join(delim));
489
+ }
490
+ return result_lines;
491
+ }
492
+
493
+
494
+ function shrink_columns(active_doc, delim, policy, comment_prefix) {
495
+ let [records, _num_records_parsed, _fields_info, first_defective_line, _first_trailing_space_line, comments] = fast_load_utils.parse_document_records(active_doc, delim, policy, comment_prefix, /*stop_on_warning=*/true, /*max_records_to_parse=*/-1, /*collect_records=*/true, /*preserve_quotes_and_whitespaces=*/true);
496
+ if (first_defective_line !== null) {
497
+ return [null, first_defective_line];
498
+ }
499
+ let result_lines = [];
500
+ let has_edit = false;
501
+ let merger = new RecordCommentMerger(records, comments);
502
+ while (merger.has_entries_left()) {
503
+ let [record, comment] = merger.get_next();
504
+ assert((comment === null) != (record === null));
505
+ if (record === null) {
506
+ result_lines.push(comment);
507
+ continue;
508
+ }
509
+ let aligned_fields = [];
510
+ for (let fnum = 0; fnum < record.length; fnum++) {
511
+ let field = record[fnum];
512
+ let field_lines = field.split('\n');
513
+ for (let i = 0; i < field_lines.length; i++) {
514
+ if (i > 0) {
515
+ result_lines.push(aligned_fields.join(delim));
516
+ aligned_fields = [];
517
+ }
518
+ let aligned_field = field_lines[i].trim();
519
+ if (aligned_field.length != field_lines[i].length) {
520
+ // Unlike in align function here we can just compare resulting length to decide if change has occured.
521
+ has_edit = true;
522
+ }
523
+ aligned_fields.push(aligned_field);
524
+ }
525
+ }
526
+ result_lines.push(aligned_fields.join(delim));
527
+ }
528
+ if (!has_edit)
529
+ return [null, null];
530
+ return [result_lines.join('\n'), null];
531
+ }
532
+
533
+
534
+ function make_table_name_key(file_path) {
535
+ return 'rbql_table_name:' + file_path;
536
+ }
537
+
538
+
539
+ function expanduser(filepath) {
540
+ if (filepath.charAt(0) === '~') {
541
+ return path.join(os.homedir(), filepath.slice(1));
542
+ }
543
+ return filepath;
544
+ }
545
+
546
+
547
+ function find_table_path(vscode_global_state, main_table_dir, table_id) {
548
+ // If table_id is a relative path it could be relative either to the current directory or to the main table dir.
549
+ var candidate_path = expanduser(table_id);
550
+ if (fs.existsSync(candidate_path)) {
551
+ return candidate_path;
552
+ }
553
+ if (main_table_dir && !path.isAbsolute(candidate_path)) {
554
+ candidate_path = path.join(main_table_dir, candidate_path);
555
+ if (fs.existsSync(candidate_path)) {
556
+ return candidate_path;
557
+ }
558
+ }
559
+ let table_path = vscode_global_state ? vscode_global_state.get(make_table_name_key(table_id)) : null;
560
+ if (table_path && fs.existsSync(table_path)) {
561
+ return table_path;
562
+ }
563
+ return null;
564
+ }
565
+
566
+
567
+ async function read_header(table_path, encoding) {
568
+ if (encoding == 'latin-1')
569
+ encoding = 'binary';
570
+ let readline = require('readline');
571
+ let input_reader = readline.createInterface({ input: fs.createReadStream(table_path, {encoding: encoding}) });
572
+ let closed = false;
573
+ let promise_resolve = null;
574
+ let promise_reject = null;
575
+ let output_promise = new Promise(function(resolve, reject) {
576
+ promise_resolve = resolve;
577
+ promise_reject = reject;
578
+ });
579
+ input_reader.on('line', line => {
580
+ if (!closed) {
581
+ closed = true;
582
+ input_reader.close();
583
+ promise_resolve(line);
584
+ }
585
+ });
586
+ input_reader.on('error', error => {
587
+ promise_reject(error);
588
+ });
589
+ return output_promise;
590
+ }
591
+
592
+
593
+ function get_header_line(document, comment_prefix) {
594
+ const num_lines = document.lineCount;
595
+ for (let lnum = 0; lnum < num_lines; ++lnum) {
596
+ const line_text = document.lineAt(lnum).text;
597
+ if (!comment_prefix || !line_text.startsWith(comment_prefix)) {
598
+ return [lnum, line_text];
599
+ }
600
+ }
601
+ return [null, null];
602
+ }
603
+
604
+
605
+ function make_inconsistent_num_fields_warning(table_name, inconsistent_records_info) {
606
+ let [record_num_1, num_fields_1, record_num_2, num_fields_2] = rbql.sample_first_two_inconsistent_records(inconsistent_records_info);
607
+ let warn_msg = `Number of fields in "${table_name}" table is not consistent: `;
608
+ warn_msg += `e.g. record ${record_num_1 + 1} -> ${num_fields_1} fields, record ${record_num_2 + 1} -> ${num_fields_2} fields`;
609
+ return warn_msg;
610
+ }
611
+
612
+
613
+ class RbqlIOHandlingError extends Error {}
614
+
615
+ class VSCodeRecordIterator extends rbql.RBQLInputIterator {
616
+ constructor(document, delim, policy, has_header=false, comment_prefix=null, table_name='input', variable_prefix='a', trim_whitespaces=false) {
617
+ // We could have done a hack here actually: convert the document to stream/buffer and then use the standard reader.
618
+ super();
619
+ this.has_header = has_header;
620
+ this.table_name = table_name;
621
+ this.variable_prefix = variable_prefix;
622
+ this.NR = 0; // Record number.
623
+ this.NL = 0; // Line number (NL != NR when the CSV file has comments or multiline fields).
624
+ let fail_on_warning = policy == 'quoted_rfc';
625
+ let [_num_records_parsed, _comments] = [null, null];
626
+ [this.records, _num_records_parsed, this.fields_info, this.first_defective_line, this._first_trailing_space_line, _comments] = fast_load_utils.parse_document_records(document, delim, policy, comment_prefix, fail_on_warning, /*max_records_to_parse=*/-1, /*collect_records=*/true, /*preserve_quotes_and_whitespaces=*/false, /*detect_trailing_spaces=*/false, /*min_num_fields_for_autodetection=*/-1, trim_whitespaces);
627
+ if (fail_on_warning && this.first_defective_line !== null) {
628
+ throw new RbqlIOHandlingError(`Inconsistent double quote escaping in ${this.table_name} table at record ${this.records.length}, line ${this.first_defective_line + 1}`);
629
+ }
630
+ this.first_record = this.records.length ? this.records[0] : [];
631
+ this.next_record_index = 0;
632
+ }
633
+
634
+ stop() {
635
+ }
636
+
637
+ async get_variables_map(query_text) {
638
+ let variable_map = new Object();
639
+ rbql.parse_basic_variables(query_text, this.variable_prefix, variable_map);
640
+ rbql.parse_array_variables(query_text, this.variable_prefix, variable_map);
641
+ if (this.has_header) {
642
+ rbql.parse_attribute_variables(query_text, this.variable_prefix, this.first_record, 'CSV header line', variable_map);
643
+ rbql.parse_dictionary_variables(query_text, this.variable_prefix, this.first_record, variable_map);
644
+ }
645
+ return variable_map;
646
+ }
647
+
648
+ async get_header() {
649
+ return this.has_header ? this.first_record : null;
650
+ }
651
+
652
+ do_get_record() {
653
+ if (this.next_record_index >= this.records.length) {
654
+ return null;
655
+ }
656
+ let record = this.records[this.next_record_index];
657
+ this.next_record_index += 1;
658
+ return record;
659
+ }
660
+
661
+ async get_record() {
662
+ if (this.NR == 0 && this.has_header) {
663
+ this.do_get_record(); // Skip the header record.
664
+ }
665
+ this.NR += 1;
666
+ let record = this.do_get_record();
667
+ return record;
668
+ }
669
+
670
+ get_warnings() {
671
+ let result = [];
672
+ if (this.first_defective_line !== null)
673
+ result.push(`Inconsistent double quote escaping in ${this.table_name} table. E.g. at line ${this.first_defective_line + 1}`);
674
+ if (this.fields_info.size > 1)
675
+ result.push(make_inconsistent_num_fields_warning(this.table_name, this.fields_info));
676
+ return result;
677
+ }
678
+ }
679
+
680
+
681
+ class VSCodeWriter extends rbql.RBQLOutputWriter {
682
+ constructor(delim, policy) {
683
+ super();
684
+ this.delim = delim;
685
+ this.policy = policy;
686
+ this.header_len = null;
687
+ this.null_in_output = false;
688
+ this.delim_in_simple_output = false;
689
+ this.output_lines = [];
690
+
691
+ if (policy == 'simple') {
692
+ this.polymorphic_join = this.simple_join;
693
+ } else if (policy == 'quoted') {
694
+ this.polymorphic_join = this.quoted_join;
695
+ } else if (policy == 'quoted_rfc') {
696
+ this.polymorphic_join = this.quoted_join_rfc;
697
+ } else if (policy == 'monocolumn') {
698
+ this.polymorphic_join = this.mono_join;
699
+ } else if (policy == 'whitespace') {
700
+ this.polymorphic_join = this.simple_join;
701
+ } else {
702
+ throw new RbqlIOHandlingError('Unknown output csv policy');
703
+ }
704
+ }
705
+
706
+ set_header(header) {
707
+ if (header !== null) {
708
+ this.header_len = header.length;
709
+ this.write(header);
710
+ }
711
+ }
712
+
713
+ quoted_join(fields) {
714
+ let delim = this.delim;
715
+ var quoted_fields = fields.map(function(v) { return csv_utils.quote_field(String(v), delim); });
716
+ return quoted_fields.join(this.delim);
717
+ };
718
+
719
+
720
+ quoted_join_rfc(fields) {
721
+ let delim = this.delim;
722
+ var quoted_fields = fields.map(function(v) { return csv_utils.rfc_quote_field(String(v), delim); });
723
+ return quoted_fields.join(this.delim);
724
+ };
725
+
726
+
727
+ mono_join(fields) {
728
+ if (fields.length > 1) {
729
+ throw new RbqlIOHandlingError('Unable to use "Monocolumn" output format: some records have more than one field');
730
+ }
731
+ return fields[0];
732
+ };
733
+
734
+
735
+ simple_join(fields) {
736
+ var res = fields.join(this.delim);
737
+ if (fields.join('').indexOf(this.delim) != -1) {
738
+ this.delim_in_simple_output = true;
739
+ }
740
+ return res;
741
+ };
742
+
743
+
744
+ normalize_fields(out_fields) {
745
+ for (var i = 0; i < out_fields.length; i++) {
746
+ if (out_fields[i] == null) {
747
+ this.null_in_output = true;
748
+ out_fields[i] = '';
749
+ } else if (Array.isArray(out_fields[i])) {
750
+ this.normalize_fields(out_fields[i]);
751
+ out_fields[i] = out_fields[i].join(this.sub_array_delim);
752
+ }
753
+ }
754
+ };
755
+
756
+
757
+ write(fields) {
758
+ if (this.header_len !== null && fields.length != this.header_len)
759
+ throw new RbqlIOHandlingError(`Inconsistent number of columns in output header and the current record: ${this.header_len} != ${fields.length}`);
760
+ this.normalize_fields(fields);
761
+ this.output_lines.push(this.polymorphic_join(fields));
762
+ return true;
763
+ };
764
+
765
+ async finish() {
766
+ }
767
+
768
+ get_warnings() {
769
+ let result = [];
770
+ if (this.null_in_output)
771
+ result.push('null values in output were replaced by empty strings');
772
+ if (this.delim_in_simple_output)
773
+ result.push('Some output fields contain separator');
774
+ return result;
775
+ };
776
+ }
777
+
778
+ class VSCodeTableRegistry {
779
+ constructor(){}
780
+
781
+ get_iterator_by_table_id(_table_id) {
782
+ throw new RbqlIOHandlingError("JOIN queries are currently not supported in vscode.dev web version.");
783
+ }
784
+
785
+ get_warnings() {
786
+ return [];
787
+ };
788
+ }
789
+
790
+ async function rbql_query_web(query_text, input_document, input_delim, input_policy, output_delim, output_policy, output_warnings, with_headers, comment_prefix=null, trim_whitespaces=false) {
791
+ let user_init_code = ''; // TODO find a way to have init code.
792
+ let join_tables_registry = new VSCodeTableRegistry(); // TODO find a way to have join registry.
793
+ let input_iterator = new VSCodeRecordIterator(input_document, input_delim, input_policy, with_headers, comment_prefix, /*table_name=*/'input', /*variable_prefix=*/'a', trim_whitespaces);
794
+ let output_writer = new VSCodeWriter(output_delim, output_policy);
795
+ await rbql.query(query_text, input_iterator, output_writer, output_warnings, join_tables_registry, user_init_code);
796
+ return output_writer.output_lines;
797
+ }
798
+
799
+
800
+ class VSCodeFileSystemCSVRegistry extends rbql.RBQLTableRegistry {
801
+ constructor(vscode_global_state, input_file_dir, delim, policy, encoding, has_header=false, comment_prefix=null, options=null) {
802
+ super();
803
+ this.vscode_global_state = vscode_global_state;
804
+ this.input_file_dir = input_file_dir;
805
+ this.delim = delim;
806
+ this.policy = policy;
807
+ this.encoding = encoding;
808
+ this.has_header = has_header;
809
+ this.comment_prefix = comment_prefix;
810
+ this.stream = null;
811
+ this.record_iterator = null;
812
+
813
+ this.options = options;
814
+ this.bulk_input_path = null;
815
+ this.table_path = null;
816
+ }
817
+
818
+ get_iterator_by_table_id(table_id) {
819
+ this.table_path = find_table_path(this.vscode_global_state, this.input_file_dir, table_id);
820
+ if (this.table_path === null) {
821
+ throw new RbqlIOHandlingError(`Unable to find join table "${table_id}"`);
822
+ }
823
+ if (this.options && this.options['bulk_read']) {
824
+ this.bulk_input_path = this.table_path;
825
+ } else {
826
+ this.stream = fs.createReadStream(this.table_path);
827
+ }
828
+ this.record_iterator = new rbql_csv.CSVRecordIterator(this.stream, this.bulk_input_path, this.encoding, this.delim, this.policy, this.has_header, this.comment_prefix, table_id, 'b');
829
+ return this.record_iterator;
830
+ };
831
+
832
+ get_warnings(output_warnings) {
833
+ if (this.record_iterator && this.has_header) {
834
+ output_warnings.push(`The first record in JOIN file ${path.basename(this.table_path)} was also treated as header (and skipped)`);
835
+ }
836
+ }
837
+ }
838
+
839
+
840
+ async function rbql_query_node(vscode_global_state, query_text, input_path, input_delim, input_policy, output_path, output_delim, output_policy, csv_encoding, output_warnings, with_headers, comment_prefix, user_init_code, options) {
841
+ let input_stream = null;
842
+ let bulk_input_path = null;
843
+ if (options['bulk_read'] && input_path) {
844
+ bulk_input_path = input_path;
845
+ } else {
846
+ input_stream = input_path === null ? process.stdin : fs.createReadStream(input_path);
847
+ }
848
+ let [output_stream, close_output_on_finish] = output_path === null ? [process.stdout, false] : [fs.createWriteStream(output_path), true];
849
+ if (input_delim == '"' && input_policy == 'quoted')
850
+ throw new RbqlIOHandlingError('Double quote delimiter is incompatible with "quoted" policy');
851
+ if (csv_encoding == 'latin-1')
852
+ csv_encoding = 'binary';
853
+ if (!rbql_csv.is_ascii(query_text) && csv_encoding == 'binary')
854
+ throw new RbqlIOHandlingError('To use non-ascii characters in query enable UTF-8 encoding instead of latin-1/binary');
855
+ if ((!rbql_csv.is_ascii(input_delim) || !rbql_csv.is_ascii(output_delim)) && csv_encoding == 'binary')
856
+ throw new RbqlIOHandlingError('To use non-ascii characters in query enable UTF-8 encoding instead of latin-1/binary');
857
+
858
+ let default_init_source_path = path.join(os.homedir(), '.rbql_init_source.js');
859
+ if (user_init_code == '' && fs.existsSync(default_init_source_path)) {
860
+ user_init_code = rbql_csv.read_user_init_code(default_init_source_path);
861
+ }
862
+ let input_file_dir = input_path ? path.dirname(input_path) : null;
863
+ let join_tables_registry = new VSCodeFileSystemCSVRegistry(vscode_global_state, input_file_dir, input_delim, input_policy, csv_encoding, with_headers, comment_prefix, options);
864
+ let input_iterator = new rbql_csv.CSVRecordIterator(input_stream, bulk_input_path, csv_encoding, input_delim, input_policy, with_headers, comment_prefix, 'input', 'a', options['trim_whitespaces']);
865
+ let output_writer = new rbql_csv.CSVWriter(output_stream, close_output_on_finish, csv_encoding, output_delim, output_policy);
866
+
867
+ await rbql.query(query_text, input_iterator, output_writer, output_warnings, join_tables_registry, user_init_code);
868
+ join_tables_registry.get_warnings(output_warnings);
869
+ }
870
+
871
+
872
+ function make_multiline_row_info(vscode, delim_length, include_delim_length_in_ranges, newline_marker, fields, start_line, expected_end_line_for_control) {
873
+ // Semantic ranges in VSCode can't span multiple lines, so we use this workaround.
874
+ let record_ranges = [];
875
+ let record_fields = [];
876
+ let lnum_current = start_line;
877
+ let pos_in_editor_line = 0;
878
+ let next_pos_in_editor_line = 0;
879
+ for (let i = 0; i < fields.length; i++) {
880
+ let pos_in_multiline_field = 0;
881
+ // Group tokens belonging to the same logical field.
882
+ let multiline_field_singleline_ranges = [];
883
+ let multiline_field_singleline_components = [];
884
+ while (true) {
885
+ let newline_marker_pos = fields[i].indexOf(newline_marker, pos_in_multiline_field);
886
+ if (newline_marker_pos == -1)
887
+ break;
888
+ multiline_field_singleline_components.push(fields[i].substring(pos_in_multiline_field, newline_marker_pos));
889
+ multiline_field_singleline_ranges.push(new vscode.Range(lnum_current, pos_in_editor_line, lnum_current, pos_in_editor_line + newline_marker_pos - pos_in_multiline_field));
890
+ lnum_current += 1;
891
+ pos_in_editor_line = 0;
892
+ next_pos_in_editor_line = 0;
893
+ pos_in_multiline_field = newline_marker_pos + newline_marker.length;
894
+ }
895
+ next_pos_in_editor_line += fields[i].length - pos_in_multiline_field;
896
+ let current_range_end = next_pos_in_editor_line;
897
+ if (i + 1 < fields.length) {
898
+ next_pos_in_editor_line += delim_length;
899
+ if (include_delim_length_in_ranges) {
900
+ current_range_end = next_pos_in_editor_line;
901
+ }
902
+ }
903
+ // Note that `multiline_field_singleline_components` NEVER include the delim, while `multiline_field_singleline_ranges` COULD include the delim.
904
+ multiline_field_singleline_components.push(fields[i].substring(pos_in_multiline_field));
905
+ multiline_field_singleline_ranges.push(new vscode.Range(lnum_current, pos_in_editor_line, lnum_current, current_range_end));
906
+ record_fields.push(multiline_field_singleline_components);
907
+ record_ranges.push(multiline_field_singleline_ranges);
908
+ // From semantic tokenization perspective the end of token doesn't include the last character of vscode.Range i.e. it treats the range as [) interval, unlike the Range.contains() function which treats ranges as [] intervals.
909
+ pos_in_editor_line = next_pos_in_editor_line;
910
+ }
911
+ if (lnum_current != expected_end_line_for_control) {
912
+ return null;
913
+ }
914
+ return new RowInfo(record_ranges, record_fields, /*comment_prefix=*/null);
915
+ }
916
+
917
+
918
+ function is_opening_rfc_line(line_text, delim) {
919
+ // The line is oppening if by adding a character (to avoid accidental double double quote) and single double quote at the end we can make it parsable without warning!
920
+ // Some lines can be simultaneously opening and closing, e.g. `",a1,a2` or `a1,a2,"`
921
+ let [_record, warning] = csv_utils.split_quoted_str(line_text + 'x"', delim);
922
+ return !warning;
923
+ }
924
+
925
+
926
+ class RowInfo {
927
+ // TODO consider adding parsing_error_range.
928
+ constructor(record_ranges, record_fields, comment_range) {
929
+ this.record_ranges = record_ranges;
930
+ this.record_fields = record_fields;
931
+ this.comment_range = comment_range;
932
+ }
933
+ }
934
+
935
+
936
+ function extend_range_by_margin(vscode, doc, range, margin) {
937
+ let begin_line = Math.max(0, range.start.line - margin);
938
+ let end_line_inclusive = Math.min(doc.lineCount - 1, range.end.line + margin);
939
+ return new vscode.Range(begin_line, range.start.character, end_line_inclusive, range.end.character);
940
+ }
941
+
942
+
943
+ function parse_document_range_rfc(vscode, doc, delim, include_delim_length_in_ranges, comment_prefix, range) {
944
+ let begin_line = Math.max(0, range.start.line);
945
+ let end_line = Math.min(doc.lineCount, range.end.line + 1);
946
+ let table_ranges = [];
947
+ let first_defective_line = null;
948
+ let line_aggregator = new csv_utils.MultilineRecordAggregator(comment_prefix);
949
+ // The first or the second line in range with an odd number of double quotes is a start line, after finding it we can use the standard parsing algorithm.
950
+ for (let lnum = begin_line; lnum < end_line; lnum++) {
951
+ let line_text = doc.lineAt(lnum).text;
952
+ if (lnum + 1 == doc.lineCount && !line_text)
953
+ break;
954
+ let inside_multiline_record_before = line_aggregator.is_inside_multiline_record();
955
+ let start_line = lnum - line_aggregator.get_num_lines_in_record();
956
+ line_aggregator.add_line(line_text);
957
+ let inside_multiline_record_after = line_aggregator.is_inside_multiline_record();
958
+ if (!inside_multiline_record_before && inside_multiline_record_after) {
959
+ // Must be an odd-num line, check if this is an openning line - otherwise reset ranges.
960
+ if (!is_opening_rfc_line(line_text, delim)) {
961
+ table_ranges = [];
962
+ line_aggregator.reset();
963
+ }
964
+ }
965
+ if (line_aggregator.has_comment_line) {
966
+ let comment_range = new vscode.Range(lnum, 0, lnum, line_text.length);
967
+ table_ranges.push(new RowInfo(/*record_ranges=*/null, /*record_fields=*/null, comment_range));
968
+ line_aggregator.reset();
969
+ } else if (line_aggregator.has_full_record) {
970
+ const newline_marker = '\r\n'; // Use '\r\n' here to guarantee that this sequence is not present anywhere in the lines themselves. We also compare expected_end_line_for_control at the end.
971
+ let combined_line = line_aggregator.get_full_line(newline_marker);
972
+ line_aggregator.reset();
973
+ let [fields, warning] = csv_utils.smart_split(combined_line, delim, QUOTED_POLICY, /*preserve_quotes_and_whitespaces=*/true);
974
+ if (warning) {
975
+ if (first_defective_line === null) {
976
+ first_defective_line = lnum;
977
+ }
978
+ } else {
979
+ let row_info = make_multiline_row_info(vscode, delim.length, include_delim_length_in_ranges, newline_marker, fields, start_line, /*expected_end_line_for_control=*/lnum);
980
+ if (row_info !== null) {
981
+ // If row_info is null it means that `expected_end_line_for_control` doesn't match and something went very wrong with the newline_marker join workaround.
982
+ table_ranges.push(row_info);
983
+ }
984
+ }
985
+ }
986
+ }
987
+ return [table_ranges, first_defective_line];
988
+ }
989
+
990
+
991
+ function parse_document_range_single_line(vscode, doc, delim, include_delim_length_in_ranges, policy, comment_prefix, range) {
992
+ let table_ranges = [];
993
+ let begin_line = Math.max(0, range.start.line);
994
+ let end_line = Math.min(doc.lineCount, range.end.line + 1);
995
+ let first_defective_line = null;
996
+ for (let lnum = begin_line; lnum < end_line; lnum++) {
997
+ let record_ranges = [];
998
+ let record_fields = [];
999
+ let line_text = doc.lineAt(lnum).text;
1000
+ if (lnum + 1 == doc.lineCount && !line_text)
1001
+ break;
1002
+ if (comment_prefix && line_text.startsWith(comment_prefix)) {
1003
+ let comment_range = new vscode.Range(lnum, 0, lnum, line_text.length);
1004
+ table_ranges.push(new RowInfo(/*record_ranges=*/null, /*record_fields=*/null, comment_range));
1005
+ continue;
1006
+ }
1007
+ let [fields, warning] = csv_utils.smart_split(line_text, delim, policy, /*preserve_quotes_and_whitespaces=*/true);
1008
+ if (warning) {
1009
+ if (first_defective_line === null) {
1010
+ first_defective_line = lnum;
1011
+ }
1012
+ continue;
1013
+ }
1014
+ let cpos = 0;
1015
+ let next_cpos = 0;
1016
+ for (let i = 0; i < fields.length; i++) {
1017
+ next_cpos += fields[i].length;
1018
+ let current_range_end = next_cpos;
1019
+ if (i + 1 < fields.length) {
1020
+ next_cpos += delim.length;
1021
+ if (include_delim_length_in_ranges) {
1022
+ current_range_end = next_cpos;
1023
+ }
1024
+ }
1025
+ // Note that `record_fields` NEVER include the delim, while `record_ranges` COULD include the delim.
1026
+ record_fields.push([fields[i]]);
1027
+ record_ranges.push([new vscode.Range(lnum, cpos, lnum, current_range_end)]);
1028
+ // From semantic tokenization perspective the end of token doesn't include the last character of vscode.Range i.e. it treats the range as [) interval, unlike the Range.contains() function which treats ranges as [] intervals.
1029
+ cpos = next_cpos;
1030
+ }
1031
+ table_ranges.push(new RowInfo(record_ranges, record_fields, /*comment_range=*/null));
1032
+ }
1033
+ return [table_ranges, first_defective_line];
1034
+ }
1035
+
1036
+
1037
+ function parse_document_range(vscode, doc, delim, include_delim_length_in_ranges, policy, comment_prefix, range) {
1038
+ // A single field can contain multiple ranges if it spans multiple lines.
1039
+ // A generic example for an rfc file:
1040
+ // [
1041
+ // record_ranges: [[field_1_range_1, field_1_range_2, ... ,field_1_range_n], ... [field_n_range_1]]
1042
+ // ...
1043
+ // record_ranges: [[field_1_range_1], ..., [field_n_range_1]]
1044
+ // ]
1045
+ // There is no warning returned because on parsing failure it would just return a partial range.
1046
+ if (policy == QUOTED_RFC_POLICY) {
1047
+ return parse_document_range_rfc(vscode, doc, delim, include_delim_length_in_ranges, comment_prefix, range);
1048
+ } else {
1049
+ return parse_document_range_single_line(vscode, doc, delim, include_delim_length_in_ranges, policy, comment_prefix, range);
1050
+ }
1051
+ }
1052
+
1053
+
1054
+ function get_field_by_line_position(fields, delim_length, query_pos) {
1055
+ if (!fields.length)
1056
+ return null;
1057
+ var col_num = 0;
1058
+ var cpos = fields[col_num].length + delim_length;
1059
+ while (query_pos > cpos && col_num + 1 < fields.length) {
1060
+ col_num += 1;
1061
+ cpos = cpos + fields[col_num].length + delim_length;
1062
+ }
1063
+ return col_num;
1064
+ }
1065
+
1066
+
1067
+ function get_cursor_position_info_rfc(vscode, document, delim, comment_prefix, position) {
1068
+ let range = new vscode.Range(position.line, 0, position.line, 0);
1069
+ range = extend_range_by_margin(vscode, document, range, 20);
1070
+ let table_ranges = parse_document_range_rfc(vscode, document, delim, /*include_delim_length_in_ranges=*/true, comment_prefix, range)[0];
1071
+ let last_found_position_info = null; // Use last found instead of first found because cursor position at the border can belong to two ranges simultaneously.
1072
+ for (let row_info of table_ranges) {
1073
+ if (row_info.comment_range !== null) {
1074
+ if (row_info.comment_range.contains(position)) {
1075
+ last_found_position_info = {is_comment: true};
1076
+ }
1077
+ } else {
1078
+ for (let col_num = 0; col_num < row_info.record_ranges.length; col_num++) {
1079
+ // One logical field can map to multiple ranges if it spans multiple lines.
1080
+ for (let record_range of row_info.record_ranges[col_num]) {
1081
+ if (record_range.contains(position)) {
1082
+ last_found_position_info = {column_number: col_num, total_columns: row_info.record_ranges.length, split_warning: false};
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ }
1088
+ return last_found_position_info;
1089
+ }
1090
+
1091
+
1092
+ function get_cursor_position_info_standard(document, delim, policy, comment_prefix, position) {
1093
+ var lnum = position.line;
1094
+ var cnum = position.character;
1095
+ var line = document.lineAt(lnum).text;
1096
+
1097
+ if (comment_prefix && line.startsWith(comment_prefix))
1098
+ return {is_comment: true};
1099
+
1100
+ let [entries, warning] = csv_utils.smart_split(line, delim, policy, true);
1101
+ var col_num = get_field_by_line_position(entries, delim.length, cnum + 1);
1102
+ if (col_num == null)
1103
+ return null;
1104
+ return {column_number: col_num, total_columns: entries.length, split_warning: warning};
1105
+ }
1106
+
1107
+
1108
+ function get_cursor_position_info(vscode, document, delim, policy, comment_prefix, position) {
1109
+ if (policy === null)
1110
+ return null;
1111
+ if (policy == QUOTED_RFC_POLICY) {
1112
+ return get_cursor_position_info_rfc(vscode, document, delim, comment_prefix, position);
1113
+ } else {
1114
+ return get_cursor_position_info_standard(document, delim, policy, comment_prefix, position);
1115
+ }
1116
+ }
1117
+
1118
+
1119
+ function format_cursor_position_info(cursor_position_info, header, show_column_names, show_comments, max_label_length) {
1120
+ if (cursor_position_info.is_comment) {
1121
+ if (show_comments) {
1122
+ return ['Comment', 'Comment'];
1123
+ } else {
1124
+ return [null, null];
1125
+ }
1126
+ }
1127
+ let short_report = 'Col ' + (cursor_position_info.column_number + 1);
1128
+ let full_report = '[Rainbow CSV] ' + short_report;
1129
+ if (show_column_names && cursor_position_info.column_number < header.length) {
1130
+ let column_label = header[cursor_position_info.column_number].trim();
1131
+ let short_column_label = column_label.substr(0, max_label_length);
1132
+ if (short_column_label != column_label)
1133
+ short_column_label = short_column_label + '...';
1134
+ short_report += ': ' + short_column_label;
1135
+ full_report += ': ' + column_label;
1136
+ }
1137
+ if (cursor_position_info.split_warning) {
1138
+ full_report += '; ERR: Inconsistent double quotes in line';
1139
+ } else if (header.length != cursor_position_info.total_columns) {
1140
+ full_report += `; WARN: Inconsistent num of fields, header: ${header.length}, this line: ${cursor_position_info.total_columns}`;
1141
+ }
1142
+ return [full_report, short_report];
1143
+ }
1144
+
1145
+
1146
+ function sample_records(document, delim, policy, comment_prefix, end_record, preview_window_size, stop_on_warning, cached_table_parse_result) {
1147
+ let records = [];
1148
+ let first_failed_line = null;
1149
+ let vscode_doc_version = null;
1150
+ let [_num_records_parsed, _fields_info, _first_trailing_space_line, _comments] = [null, null, null, null];
1151
+ // Here `preview_window_size` is typically 100.
1152
+ if (end_record < preview_window_size * 5) {
1153
+ // Re-sample the records. Re-sampling top records is fast and it ensures that all manual changes are mirrored into RBQL console.
1154
+ [records, _num_records_parsed, _fields_info, first_failed_line, _first_trailing_space_line, _comments] = fast_load_utils.parse_document_records(document, delim, policy, comment_prefix, stop_on_warning, /*max_records_to_parse=*/end_record, /*collect_records=*/true, /*preserve_quotes_and_whitespaces=*/false);
1155
+ } else {
1156
+ let need_full_doc_parse = true;
1157
+ if (cached_table_parse_result.has(document.fileName)) {
1158
+ [records, first_failed_line, vscode_doc_version] = cached_table_parse_result.get(document.fileName);
1159
+ if (document.version === vscode_doc_version) {
1160
+ need_full_doc_parse = false;
1161
+ }
1162
+ }
1163
+ if (need_full_doc_parse) {
1164
+ let [records, _num_records_parsed, _fields_info, first_failed_line, _first_trailing_space_line, _comments] = fast_load_utils.parse_document_records(document, delim, policy, comment_prefix, stop_on_warning, /*max_records_to_parse=*/-1, /*collect_records=*/true, /*preserve_quotes_and_whitespaces=*/false);
1165
+ cached_table_parse_result.set(document.fileName, [records, first_failed_line, document.version]);
1166
+ }
1167
+ [records, first_failed_line, vscode_doc_version] = cached_table_parse_result.get(document.fileName);
1168
+ }
1169
+ return [records, first_failed_line];
1170
+ }
1171
+
1172
+
1173
+ function sample_preview_records_from_context(rbql_context, dst_message, preview_window_size, cached_table_parse_result) {
1174
+ let [document, delim, policy, comment_prefix] = [rbql_context.input_document, rbql_context.delim, rbql_context.policy, rbql_context.comment_prefix];
1175
+ rbql_context.requested_start_record = Math.max(rbql_context.requested_start_record, 0);
1176
+ let stop_on_warning = policy == QUOTED_RFC_POLICY;
1177
+ let [records, first_failed_line] = sample_records(document, delim, policy, comment_prefix, rbql_context.requested_start_record + preview_window_size, preview_window_size, stop_on_warning, cached_table_parse_result);;
1178
+ if (first_failed_line !== null && policy == QUOTED_RFC_POLICY) {
1179
+ dst_message.preview_sampling_error = `Double quotes are not consistent in record ${records.length + 1} which starts at line ${first_failed_line + 1}`;
1180
+ return;
1181
+ }
1182
+ rbql_context.requested_start_record = Math.max(0, Math.min(rbql_context.requested_start_record, records.length - preview_window_size));
1183
+ let preview_records = records.slice(rbql_context.requested_start_record, rbql_context.requested_start_record + preview_window_size);
1184
+
1185
+ // Here we trim excessively long fields. The only benefit of doing is here instead of UI layer is to minimize the ammount of traffic that we send to UI - the total message size is limited.
1186
+ for (let r = 0; r < preview_records.length; r++) {
1187
+ let cur_record = preview_records[r];
1188
+ for (let c = 0; c < cur_record.length; c++) {
1189
+ if (cur_record[c].length > max_preview_field_length) {
1190
+ cur_record[c] = cur_record[c].substr(0, max_preview_field_length) + '###UI_STRING_TRIM_MARKER###';
1191
+ }
1192
+ }
1193
+ }
1194
+ dst_message.preview_records = preview_records;
1195
+ dst_message.actual_start_record = rbql_context.requested_start_record;
1196
+ }
1197
+
1198
+ function show_lint_status_bar_button(vscode, extension_context, file_path, language_id) {
1199
+
1200
+ const COLOR_PROCESSING = '#A0A0A0';
1201
+ const COLOR_ERROR = '#f44242';
1202
+ const COLOR_WARNING = '#ffff28';
1203
+ const COLOR_OK = '#62f442';
1204
+
1205
+ let lint_cache_key = `${file_path}.${language_id}`;
1206
+
1207
+ if (!extension_context.lint_results.has(lint_cache_key)){
1208
+ return;
1209
+ }
1210
+
1211
+ var lint_report = extension_context.lint_results.get(lint_cache_key);
1212
+
1213
+ if (!extension_context.lint_status_bar_button){
1214
+ extension_context.lint_status_bar_button = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
1215
+ }
1216
+
1217
+ extension_context.lint_status_bar_button.text = 'CSVLint';
1218
+ let lint_report_msg = '';
1219
+ if (lint_report.is_processing) {
1220
+
1221
+ extension_context.lint_status_bar_button.color = COLOR_PROCESSING;
1222
+ extension_context.lint_status_bar_button.text = '$(clock) CSVLint';
1223
+ lint_report_msg = 'Processing';
1224
+
1225
+ } else if (Number.isInteger(lint_report.first_defective_line)) {
1226
+
1227
+ lint_report_msg = `Error. Line ${lint_report.first_defective_line + 1} has formatting error: double quote chars are not consistent`;
1228
+ extension_context.lint_status_bar_button.color = COLOR_ERROR;
1229
+ extension_context.lint_status_bar_button.text = '$(error) CSVLint';
1230
+
1231
+ } else if (lint_report.fields_info && lint_report.fields_info.size > 1) {
1232
+
1233
+ let [record_num_1, num_fields_1, record_num_2, num_fields_2] = rbql.sample_first_two_inconsistent_records(lint_report.fields_info);
1234
+ lint_report_msg = `Error. Number of fields is not consistent: e.g. record ${record_num_1 + 1} has ${num_fields_1} fields, and record ${record_num_2 + 1} has ${num_fields_2} fields`;
1235
+ extension_context.lint_status_bar_button.color = COLOR_ERROR;
1236
+ extension_context.lint_status_bar_button.text = '$(error) CSVLint';
1237
+
1238
+ } else if (Number.isInteger(lint_report.first_trailing_space_line)) {
1239
+
1240
+ lint_report_msg = `Leading/Trailing spaces detected: e.g. at line ${lint_report.first_trailing_space_line + 1}. Run "Shrink" command to remove them`;
1241
+ extension_context.lint_status_bar_button.color = COLOR_WARNING;
1242
+ extension_context.lint_status_bar_button.text = '$(alert) CSVLint';
1243
+ } else {
1244
+ assert(lint_report.is_ok);
1245
+ extension_context.lint_status_bar_button.color = COLOR_OK;
1246
+ extension_context.lint_status_bar_button.text = '$(pass) CSVLint';
1247
+ lint_report_msg = 'OK';
1248
+ }
1249
+ extension_context.lint_status_bar_button.tooltip = lint_report_msg + '\nClick to recheck';
1250
+ extension_context.lint_status_bar_button.command = 'rainbow-csv.CSVLint';
1251
+ extension_context.lint_status_bar_button.show();
1252
+ }
1253
+
1254
+
1255
+ function generate_column_edit_selections(vscode, active_doc, delim, policy, comment_prefix, edit_mode, col_num) {
1256
+ let [records, _num_records_parsed, _fields_info, first_defective_line, _first_trailing_space_line, comments] = fast_load_utils.parse_document_records(active_doc, delim, policy, comment_prefix, /*stop_on_warning=*/true, /*max_records_to_parse=*/-1, /*collect_records=*/true, /*preserve_quotes_and_whitespaces=*/true);
1257
+ if (first_defective_line !== null) {
1258
+ return [null, `Unable to enter column edit mode: quoting error at line ${first_defective_line + 1}`, null];
1259
+ }
1260
+ if (records.length + comments.length != active_doc.lineCount) {
1261
+ // It is possible to support editing of non-multiline columns in such files, but for simplicity we won't do this.
1262
+ return [null, 'Column edit mode is not supported for files with multiline fields', null];
1263
+ }
1264
+ let lnum = 0;
1265
+ let selections = [];
1266
+ let warning_msg = null;
1267
+ let merger = new RecordCommentMerger(records, comments);
1268
+ while (merger.has_entries_left()) {
1269
+ let [record, comment] = merger.get_next();
1270
+ assert((comment === null) != (record === null));
1271
+ if (record !== null) {
1272
+ if (col_num >= record.length) {
1273
+ return [null, `Line ${lnum + 1} doesn't have field number ${col_num + 1}`, null];
1274
+ }
1275
+ let char_pos_before = record.slice(0, col_num).join('').length + col_num * delim.length;
1276
+ let char_pos_after = record.slice(0, col_num + 1).join('').length + col_num * delim.length;
1277
+ let line_text = record.join(delim);
1278
+ if (!warning_msg && edit_mode == 'ce_before' && (policy == QUOTED_POLICY || policy == QUOTED_RFC_POLICY) && line_text.substring(char_pos_before - 2, char_pos_before + 2).indexOf('"') != -1) {
1279
+ warning_msg = `Be careful, cursor at line ${lnum + 1} has a double quote is in proximity.`;
1280
+ }
1281
+ if (!warning_msg && edit_mode == 'ce_after' && (policy == QUOTED_POLICY || policy == QUOTED_RFC_POLICY) && line_text.substring(char_pos_after - 2, char_pos_after + 2).indexOf('"') != -1) {
1282
+ warning_msg = `Be careful, cursor at line ${lnum + 1} has a double quote is in proximity.`;
1283
+ }
1284
+ if (!warning_msg && edit_mode == 'ce_select' && char_pos_before == char_pos_after) {
1285
+ warning_msg = `Be careful, Field ${col_num + 1} at line ${lnum + 1} is empty.`;
1286
+ }
1287
+ let position_before = new vscode.Position(lnum, char_pos_before);
1288
+ let position_after = new vscode.Position(lnum, char_pos_after);
1289
+ if (edit_mode == 'ce_before') {
1290
+ selections.push(new vscode.Selection(position_before, position_before));
1291
+ }
1292
+ if (edit_mode == 'ce_after') {
1293
+ selections.push(new vscode.Selection(position_after, position_after));
1294
+ }
1295
+ if (edit_mode == 'ce_select') {
1296
+ selections.push(new vscode.Selection(position_before, position_after));
1297
+ }
1298
+ }
1299
+ lnum += 1;
1300
+ }
1301
+ return [selections, null, warning_msg];
1302
+ }
1303
+
1304
+
1305
+ module.exports.make_table_name_key = make_table_name_key;
1306
+ module.exports.find_table_path = find_table_path;
1307
+ module.exports.read_header = read_header;
1308
+ module.exports.rbql_query_web = rbql_query_web;
1309
+ module.exports.rbql_query_node = rbql_query_node;
1310
+ module.exports.get_header_line = get_header_line;
1311
+ module.exports.get_default_js_udf_content = get_default_js_udf_content;
1312
+ module.exports.get_default_python_udf_content = get_default_python_udf_content;
1313
+ module.exports.align_columns = align_columns;
1314
+ module.exports.shrink_columns = shrink_columns;
1315
+ module.exports.calculate_column_offsets = calculate_column_offsets;
1316
+ module.exports.calc_column_stats = calc_column_stats;
1317
+ module.exports.calc_column_stats_for_fragment = calc_column_stats_for_fragment;
1318
+ module.exports.reconcile_whole_doc_and_local_column_stats = reconcile_whole_doc_and_local_column_stats;
1319
+ module.exports.rfc_align_field = rfc_align_field;
1320
+ module.exports.evaluate_rfc_align_field = evaluate_rfc_align_field;
1321
+ module.exports.assert = assert;
1322
+ module.exports.get_field_by_line_position = get_field_by_line_position;
1323
+ module.exports.get_cursor_position_info = get_cursor_position_info;
1324
+ module.exports.format_cursor_position_info = format_cursor_position_info;
1325
+ module.exports.parse_document_range = parse_document_range;
1326
+ module.exports.parse_document_range_single_line = parse_document_range_single_line;
1327
+ module.exports.parse_document_range_rfc = parse_document_range_rfc; // Only for unit tests.
1328
+ module.exports.sample_preview_records_from_context = sample_preview_records_from_context;
1329
+ module.exports.sample_first_two_inconsistent_records = rbql.sample_first_two_inconsistent_records;
1330
+ module.exports.is_opening_rfc_line = is_opening_rfc_line; // Only for unit tests.
1331
+ module.exports.show_lint_status_bar_button = show_lint_status_bar_button;
1332
+ module.exports.get_cursor_position_if_unambiguous = get_cursor_position_if_unambiguous;
1333
+ module.exports.RecordCommentMerger = RecordCommentMerger;
1334
+ module.exports.ColumnStat = ColumnStat;
1335
+ module.exports.generate_column_edit_selections = generate_column_edit_selections;
1336
+ module.exports.generate_inlay_hints = generate_inlay_hints;
1337
+ module.exports.extend_range_by_margin = extend_range_by_margin;
1338
+ module.exports.calc_max_column_widths = calc_max_column_widths; // Only for unit tests.
1339
+ module.exports.generate_markdown_lines = generate_markdown_lines;
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_client.html ADDED
@@ -0,0 +1,616 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+
7
+ <style>
8
+
9
+ :root {
10
+ --inputwidth: 80%;
11
+ }
12
+
13
+ html * {
14
+ font-size: 16px !important;
15
+ }
16
+
17
+ body {
18
+ background-color: var(--vscode-editor-background);
19
+ color: var(--vscode-editor-foreground);
20
+ }
21
+
22
+ th {
23
+ padding: 3px 8px;
24
+ border-right: 1px solid;
25
+ border-top: 1px solid;
26
+ border-bottom: 1px solid;
27
+ border-right-color: var(--vscode-window-activeBorder);
28
+ border-top-color: var(--vscode-window-activeBorder);
29
+ border-bottom-color: var(--vscode-window-activeBorder);
30
+ position: sticky;
31
+ top: 0;
32
+ background-color: var(--vscode-editor-background);
33
+ white-space: pre;
34
+ }
35
+
36
+ td {
37
+ padding: 3px 8px;
38
+ background-color: var(--vscode-editor-background);
39
+ border-right: 1px solid;
40
+ border-bottom: 1px solid;
41
+ border-right-color: var(--vscode-window-activeBorder);
42
+ border-bottom-color: var(--vscode-window-activeBorder);
43
+ }
44
+
45
+ table {
46
+ display: block;
47
+ white-space: nowrap;
48
+ border-collapse: separate;
49
+ background-color: var(--vscode-editor-background);
50
+ }
51
+
52
+
53
+ table th:first-child, table td:first-child {
54
+ /* Apply a left border on the first <td> or <th> in a row */
55
+ border-left: 1px solid;
56
+ border-left-color: var(--vscode-window-activeBorder);
57
+ }
58
+
59
+
60
+ .padded_label {
61
+ padding: 5px;
62
+ }
63
+
64
+ .code_sample {
65
+ font-style: italic;
66
+ }
67
+
68
+
69
+ #rbql_console {
70
+ margin-top: 20px;
71
+ }
72
+
73
+ .checkbox_input {
74
+ background-color: var(--vscode-input-background);
75
+ color: var(--vscode-input-foreground);
76
+ margin-bottom: 6px;
77
+ font-size: 14px !important;
78
+ font-family: Consolas, Monaco, monospace;
79
+ }
80
+
81
+
82
+ .select_input {
83
+ background-color: var(--vscode-input-background);
84
+ color: var(--vscode-input-foreground);
85
+ margin-bottom: 6px;
86
+ width: 300px;
87
+ font-size: 14px !important;
88
+ font-family: Consolas, Monaco, monospace;
89
+ }
90
+
91
+ #rbql_input {
92
+ margin: 0px;
93
+ height: 24px !important;
94
+ font-family: Consolas, Monaco, monospace;
95
+ font-size: 14px !important;
96
+ padding-left: 2px;
97
+ background-color: var(--vscode-input-background);
98
+ caret-color: var(--vscode-input-foreground);
99
+ color: var(--vscode-input-foreground);
100
+ display: inline-block;
101
+ box-sizing: border-box; /* See css-submit-button-looks-smaller-than-text-input-and-textarea */
102
+ vertical-align:middle;
103
+ width: var(--inputwidth);
104
+ }
105
+
106
+ #toggle_history_btn {
107
+ margin: 0px;
108
+ width: 28px;
109
+ background-color: var(--vscode-button-secondaryBackground);
110
+ color: var(--vscode-button-secondaryForeground);
111
+ height: 24px !important;
112
+ padding: 0px;
113
+ display: inline-block;
114
+ border-width: 0px;
115
+ outline:none;
116
+ vertical-align:middle;
117
+ box-sizing: border-box;
118
+ }
119
+
120
+ #toggle_history_btn:hover {
121
+ background-color: var(--vscode-button-secondaryHoverBackground);
122
+ }
123
+
124
+
125
+ #rbql_run_btn {
126
+ margin: 0px;
127
+ width: 70px;
128
+ background-color: var(--vscode-button-background);
129
+ color: var(--vscode-button-foreground);
130
+ height: 24px !important;
131
+ padding: 0px;
132
+ display: inline-block;
133
+ outline:none;
134
+ vertical-align:middle;
135
+ box-sizing: border-box;
136
+ border-width: 0px;
137
+ }
138
+
139
+ #rbql_run_btn:hover {
140
+ background-color: var(--vscode-button-hoverBackground);
141
+ }
142
+
143
+
144
+ #help_btn {
145
+ margin: 0px;
146
+ width: 28px;
147
+ background-color: var(--vscode-button-secondaryBackground);
148
+ color: var(--vscode-button-secondaryForeground);
149
+ height: 24px !important;
150
+ padding: 0px;
151
+ display: inline-block;
152
+ outline:none;
153
+ vertical-align:middle;
154
+ box-sizing: border-box;
155
+ border-width: 0px;
156
+ }
157
+
158
+ #help_btn:hover {
159
+ background-color: var(--vscode-button-secondaryHoverBackground);
160
+ }
161
+
162
+
163
+ #clear_history_btn {
164
+ margin: 0px;
165
+ background-color: var(--vscode-button-background);
166
+ color: var(--vscode-button-foreground);
167
+ height: 24px !important;
168
+ padding: 0px 5px 0px 5px;
169
+ display: inline-block;
170
+ float: right;
171
+ outline:none;
172
+ vertical-align:middle;
173
+ border:none;
174
+ }
175
+
176
+ #clear_history_btn:hover {
177
+ background-color: var(--vscode-button-hoverBackground);
178
+ }
179
+
180
+ .history_button {
181
+ margin: 0px;
182
+ width: 100%;
183
+ background-color: var(--vscode-button-secondaryBackground);
184
+ color: var(--vscode-button-secondaryForeground);
185
+ height: 24px !important;
186
+ font-family: Consolas, Monaco, monospace;
187
+ font-size: 14px !important;
188
+ border-width: 0px;
189
+ outline: none;
190
+ display: block;
191
+ text-align: left;
192
+ padding-left: 2px;
193
+ white-space: nowrap;
194
+ }
195
+
196
+ .history_button:hover {
197
+ background-color: var(--vscode-button-secondaryHoverBackground);
198
+ }
199
+
200
+ .navigation_button {
201
+ background-color: var(--vscode-button-secondaryBackground);
202
+ color: var(--vscode-button-secondaryForeground);
203
+ width: 28px;
204
+ font-size: 18px !important;
205
+ height: 28px;
206
+ font-weight: bold;
207
+ border-width: 0px;
208
+ }
209
+
210
+ .navigation_button:hover {
211
+ background-color: var(--vscode-button-secondaryHoverBackground);
212
+ }
213
+
214
+
215
+ #udf_button {
216
+ background-color: var(--vscode-button-secondaryBackground);
217
+ color: var(--vscode-button-secondaryForeground);
218
+ font-size: 14px !important;
219
+ border-width: 0px;
220
+ height: 24px !important;
221
+ outline:none;
222
+ vertical-align:middle;
223
+ padding: 0px;
224
+ padding-left: 12px;
225
+ padding-right: 12px;
226
+ margin-top: 8px;
227
+ }
228
+
229
+ #udf_button:hover {
230
+ background-color: var(--vscode-button-secondaryHoverBackground);
231
+ }
232
+
233
+ #rbql_help {
234
+ width: 80%;
235
+ top: 10%;
236
+ left: 10%;
237
+ height: 80%;
238
+ z-index: 1000000;
239
+ position: fixed;
240
+ display: none;
241
+ overflow: scroll;
242
+ }
243
+
244
+ #close_help {
245
+ height: 28px;
246
+ width: 28px;
247
+ top: 10%;
248
+ left: 90%;
249
+ z-index: 1000010;
250
+ position: fixed;
251
+ font-size: 18px !important;
252
+ background-color: var(--vscode-button-background);
253
+ color: var(--vscode-button-foreground);
254
+ font-weight: bold;
255
+ display: none;
256
+ border-width: 0px;
257
+
258
+ }
259
+ #close_help:hover {
260
+ background-color: var(--vscode-button-hoverBackground);
261
+ }
262
+
263
+
264
+ #rbql_help_text {
265
+ margin-left: 2px;
266
+ }
267
+
268
+
269
+ #query_history {
270
+ font-family: Consolas, Monaco, monospace;
271
+ font-size: 14px !important;
272
+ width: var(--inputwidth);
273
+ z-index: 1000000;
274
+ background-color: var(--vscode-notifications-background);
275
+ color: var(--vscode-notifications-foreground);
276
+ position: fixed;
277
+ display: none;
278
+ border-top: 1px solid;
279
+ border-left: 1px solid;
280
+ border-right: 1px solid;
281
+ border-color: var(--vscode-focusBorder);
282
+ }
283
+
284
+
285
+ #query_suggest{
286
+ width: 200px;
287
+ z-index: 1000010;
288
+ background-color: var(--vscode-notifications-background);
289
+ color: var(--vscode-notifications-foreground);
290
+ position: fixed;
291
+ display: none;
292
+ border-top: 1px solid;
293
+ border-left: 1px solid;
294
+ border-right: 1px solid;
295
+ border-color: var(--vscode-focusBorder);
296
+ max-height: 300px;
297
+ white-space: nowrap;
298
+ overflow-y: auto;
299
+ overflow-x: hidden;
300
+ }
301
+
302
+ #history_entries {
303
+ font-family: Consolas, Monaco, monospace;
304
+ font-size: 14px !important;
305
+ max-height: 300px;
306
+ margin: 0px;
307
+ overflow-x: auto;
308
+ overflow-y: auto;
309
+ white-space: nowrap;
310
+ }
311
+
312
+
313
+ #query_history_header {
314
+ font-size: 18px !important;
315
+ height: 24px;
316
+ margin: 0px;
317
+ }
318
+
319
+
320
+ #table_window {
321
+ max-width: 95%;
322
+ max-height: 350px;
323
+ overflow: scroll;
324
+ width:fit-content;
325
+ /*border: 2px solid black;*/
326
+ }
327
+
328
+ #rbql_error_message {
329
+ width: 50%;
330
+ top: 20%;
331
+ left: 25%;
332
+ z-index: 1000000;
333
+ background-color: var(--vscode-notifications-background);
334
+ color: var(--vscode-notifications-foreground);
335
+ position: fixed;
336
+ display: none;
337
+ }
338
+
339
+ #rbql_error_message_header {
340
+ background-color: var(--vscode-inputValidation-errorBackground);
341
+ color: var(--vscode-inputValidation-errorForeground);
342
+ font-size: 18px !important;
343
+ height: 26px;
344
+ font-weight: bold;
345
+ }
346
+
347
+ #ack_error {
348
+ width: 70px;
349
+ background-color: var(--vscode-button-background);
350
+ color: var(--vscode-button-foreground);
351
+ display: inline-block;
352
+ border:none;
353
+ font-size: 18px !important;
354
+ height: 28px;
355
+ }
356
+
357
+ #ack_error:hover {
358
+ background-color: var(--vscode-button-hoverBackground);
359
+ }
360
+
361
+ #error_message_details {
362
+ height: 100px;
363
+ font-family: Consolas, Monaco, monospace;
364
+ overflow: auto;
365
+ border: 1px solid;
366
+ border-color: var(--vscode-focusBorder);
367
+ white-space: pre;
368
+ margin: 5px;
369
+ background-color: var(--vscode-notifications-background);
370
+ color: var(--vscode-notifications-foreground);
371
+ }
372
+
373
+ [type="checkbox"]
374
+ {
375
+ margin-left: 0px;
376
+ vertical-align:middle;
377
+ height: 20px;
378
+ width: 20px;
379
+ }
380
+
381
+ </style>
382
+
383
+
384
+ <script src="contrib/textarea-caret-position/index.js"></script>
385
+ <script src="rbql_suggest.js"></script>
386
+ <script src="rbql_client.js"></script>
387
+
388
+
389
+ </head>
390
+
391
+
392
+ <body>
393
+
394
+ <div id="rbql_console">
395
+ <div id="table_group">
396
+ <div id="table_window">
397
+ <table id="preview_table">
398
+ </table>
399
+ </div>
400
+ <div id="navig_bar">
401
+ <button class="navigation_button" title="Begin" id="go_begin">&#171;</button>
402
+ <button class="navigation_button" title="Back" id="go_backward">&#8249;</button>
403
+ <button class="navigation_button" title="Forward" id="go_forward">&#8250;</button>
404
+ <button class="navigation_button" title="End" id="go_end">&#187;</button>
405
+ </div>
406
+ </div>
407
+ <div id="query_group" style="margin-top: 10px;">
408
+ <!-- Do not remove the weird comments below, we need them to avoid spaces between inline elements, see https://css-tricks.com/fighting-the-space-between-inline-block-elements/ -->
409
+ <input type="text" id="rbql_input" placeholder="Example: SELECT a1, a2 WHERE a2 != 'foobar' ORDER BY a1 LIMIT 10" autofocus><!--
410
+ --><button id="toggle_history_btn" title="Query history">&#9650;</button><!--
411
+ --><button id="rbql_run_btn" title="Run query and open result set in a new tab">Run</button><!--
412
+ --><button id="help_btn" title="Help">?</button>
413
+ </div>
414
+ <h3 style="margin-bottom: 6px; margin-top: 10px;">&#9881; Query settings</h3>
415
+ <div style="margin-left: 30px;">
416
+ <div id="with_headers_section">
417
+ <label style="word-wrap:break-word" title="Indicate that the input (and join) table has header in the first line"><input class="checkbox_input" id="with_headers" type="checkbox"/>Input table has header</label>
418
+ </div>
419
+ <div>
420
+ <div>
421
+ <span class="select_info">Output format</span>
422
+ </div>
423
+ <select class="select_input" id="select_output_format" title="Output table format">
424
+ <option class="select_input" value="input">Same as input (Default)</option>
425
+ <option class="select_input" value="csv">CSV</option>
426
+ <option class="select_input" value="tsv">TSV</option>
427
+ </select>
428
+ </div>
429
+ <div>
430
+ <div>
431
+ <span class="select_info">Encoding</span>
432
+ </div>
433
+ <select class="select_input" id="select_encoding" title="Input and output encoding">
434
+ <option class="select_input" value="utf-8">UTF-8</option>
435
+ <option class="select_input" value="latin-1">Binary/Latin-1</option>
436
+ </select>
437
+ </div>
438
+ <div>
439
+ <div>
440
+ <span class="select_info">Backend language for RBQL</span>
441
+ </div>
442
+ <select class="select_input" id="select_backend_language">
443
+ <option class="select_input" value="js">JavaScript</option>
444
+ <option class="select_input" value="pyhon">Python (Requires python installed)</option>
445
+ </select>
446
+ </div>
447
+ <div>
448
+ <button id="udf_button" title="Edit UDF (User Defined Functions) - will open a new tab with UDF file">Edit UDF...</button>
449
+ </div>
450
+ </div>
451
+ </div>
452
+
453
+
454
+ <div id="query_history">
455
+ <div id="query_history_header">
456
+ <span class="padded_label">Query history</span>
457
+ <button id="clear_history_btn">Clear history</button>
458
+ </div>
459
+ <div id="history_entries">
460
+ </div>
461
+ </div>
462
+
463
+
464
+ <div id="query_suggest">
465
+ </div>
466
+
467
+
468
+ <div id="rbql_error_message">
469
+ <div id="rbql_error_message_header">
470
+ <span class="padded_label">&#9888; Error while executing RBQL query!</span>
471
+ </div>
472
+ <br>
473
+ <div>
474
+ <span class="padded_label" id="error_message_header"></span>
475
+ </div>
476
+ <br>
477
+ <div>
478
+ <span class="padded_label">Details:</span>
479
+ <br>
480
+ <div id="error_message_details"></div>
481
+ </div>
482
+ <div style="display: flex; justify-content:center;">
483
+ <button id="ack_error">OK</button>
484
+ </div>
485
+ </div>
486
+
487
+
488
+ <button id="close_help">X</button>
489
+ <div id="rbql_help">
490
+ <a href="https://rbql.org"><img src="rbql_logo.svg" alt="RBQL" width="200px" style="background-color:white;"/></a>
491
+ <p><a href="https://github.com/mechatroner/vscode_rainbow_csv/blob/master/rbql_core/README.md#rbql-rainbow-query-language-description">Read RBQL documentation on github</a></p>
492
+ <div id="rbql_help_text">
493
+ <h1 id="rbql-rainbow-query-language">RBQL: Rainbow Query Language</h1>
494
+ <p>RBQL is an eval-based SQL-like query engine for (not only) CSV file processing. It provides SQL-like language that supports SELECT queries with Python or JavaScript expressions. <br />
495
+ RBQL is best suited for data transformation, data cleaning, and analytical queries. <br />
496
+ RBQL is distributed with CLI apps, text editor plugins, Python and JS libraries. </p>
497
+ <h3 id="main-features">Main Features</h3>
498
+ <ul>
499
+ <li>Use Python or JavaScript expressions inside <em>SELECT</em>, <em>UPDATE</em>, <em>WHERE</em> and <em>ORDER BY</em> statements</li>
500
+ <li>Supports multiple input formats</li>
501
+ <li>Result set of any query immediately becomes a first-class table on its own</li>
502
+ <li>No need to provide FROM statement in the query when the input table is defined by the current context.</li>
503
+ <li>Supports all main SQL keywords</li>
504
+ <li>Supports aggregate functions and GROUP BY queries</li>
505
+ <li>Supports user-defined functions (UDF)</li>
506
+ <li>Provides some new useful query modes which traditional SQL engines do not have</li>
507
+ <li>Lightweight, dependency-free, works out of the box</li>
508
+ </ul>
509
+ <h4 id="limitations">Limitations:</h4>
510
+ <ul>
511
+ <li>RBQL doesn't support nested queries, but they can be emulated with consecutive queries</li>
512
+ <li>Number of tables in all JOIN queries is always 2 (input table and join table), use consecutive queries to join 3 or more tables</li>
513
+ </ul>
514
+ <h3 id="supported-sql-keywords-keywords-are-case-insensitive">Supported SQL Keywords (Keywords are case insensitive)</h3>
515
+ <ul>
516
+ <li>SELECT</li>
517
+ <li>UPDATE</li>
518
+ <li>WHERE</li>
519
+ <li>ORDER BY … [ DESC | ASC ]</li>
520
+ <li>[ LEFT | INNER ] JOIN</li>
521
+ <li>DISTINCT</li>
522
+ <li>GROUP BY</li>
523
+ <li>TOP <em>N</em></li>
524
+ <li>LIMIT <em>N</em></li>
525
+ <li>AS</li>
526
+ </ul>
527
+ <p>All keywords have the same meaning as in SQL queries. You can check them <a href="https://www.w3schools.com/sql/default.asp">online</a> </p>
528
+ <h3 id="rbql-variables">RBQL variables</h3>
529
+ <p>RBQL for CSV files provides the following variables which you can use in your queries:</p>
530
+ <ul>
531
+ <li><em>a1</em>, <em>a2</em>,…, <em>a{N}</em> <br />
532
+ Variable type: <strong>string</strong> <br />
533
+ Description: value of i-th field in the current record in input table </li>
534
+ <li><em>b1</em>, <em>b2</em>,…, <em>b{N}</em> <br />
535
+ Variable type: <strong>string</strong> <br />
536
+ Description: value of i-th field in the current record in join table B </li>
537
+ <li><em>NR</em> <br />
538
+ Variable type: <strong>integer</strong> <br />
539
+ Description: Record number (1-based) </li>
540
+ <li><em>NF</em> <br />
541
+ Variable type: <strong>integer</strong> <br />
542
+ Description: Number of fields in the current record </li>
543
+ <li><em>a.name</em>, <em>b.Person_age</em>, … <em>a.{Good_alphanumeric_column_name}</em> <br />
544
+ Variable type: <strong>string</strong> <br />
545
+ Description: Value of the field referenced by it's "name". You can use this notation if the field in the header has a "good" alphanumeric name </li>
546
+ <li><em>a["object id"]</em>, <em>a['9.12341234']</em>, <em>b["%$ !! 10 20"]</em> … <em>a["Arbitrary column name!"]</em> <br />
547
+ Variable type: <strong>string</strong> <br />
548
+ Description: Value of the field referenced by it's "name". You can use this notation to reference fields by arbitrary values in the header</li>
549
+ </ul>
550
+ <h3 id="update-statement">UPDATE statement</h3>
551
+ <p><em>UPDATE</em> query produces a new table where original values are replaced according to the UPDATE expression, so it can also be considered a special type of SELECT query.</p>
552
+ <h3 id="aggregate-functions-and-queries">Aggregate functions and queries</h3>
553
+ <p>RBQL supports the following aggregate functions, which can also be used with <em>GROUP BY</em> keyword: <br />
554
+ <em>COUNT</em>, <em>ARRAY_AGG</em>, <em>MIN</em>, <em>MAX</em>, <em>ANY_VALUE</em>, <em>SUM</em>, <em>AVG</em>, <em>VARIANCE</em>, <em>MEDIAN</em> </p>
555
+ <p>Limitation: aggregate functions inside Python (or JS) expressions are not supported. Although you can use expressions inside aggregate functions. <br />
556
+ E.g. <code>MAX(float(a1) / 1000)</code> - valid; <code>MAX(a1) / 1000</code> - invalid. <br />
557
+ There is a workaround for the limitation above for <em>ARRAY_AGG</em> function which supports an optional parameter - a callback function that can do something with the aggregated array. Example: <br />
558
+ <code>SELECT a2, ARRAY_AGG(a1, lambda v: sorted(v)[:5]) GROUP BY a2</code> - Python; <code>SELECT a2, ARRAY_AGG(a1, v =&gt; v.sort().slice(0, 5)) GROUP BY a2</code> - JS</p>
559
+ <h3 id="join-statements">JOIN statements</h3>
560
+ <p>Join table B can be referenced either by its file path or by its name - an arbitrary string which the user should provide before executing the JOIN query. <br />
561
+ RBQL supports <em>STRICT LEFT JOIN</em> which is like <em>LEFT JOIN</em>, but generates an error if any key in the left table "A" doesn't have exactly one matching key in the right table "B". <br />
562
+ Table B path can be either relative to the working dir, relative to the main table or absolute. <br />
563
+ Limitation: <em>JOIN</em> statements can't contain Python/JS expressions and must have the following form: <em><JOIN_KEYWORD> (/path/to/table.tsv | table_name ) ON a… == b… [AND a… == b… [AND … ]]</em></p>
564
+ <h3 id="select-except-statement">SELECT EXCEPT statement</h3>
565
+ <p>SELECT EXCEPT can be used to select everything except specific columns. E.g. to select everything but columns 2 and 4, run: <code>SELECT * EXCEPT a2, a4</code> <br />
566
+ Traditional SQL engines do not support this query mode.</p>
567
+ <h3 id="unnest-operator">UNNEST() operator</h3>
568
+ <p>UNNEST(list) takes a list/array as an argument and repeats the output record multiple times - one time for each value from the list argument. <br />
569
+ Example: <code>SELECT a1, UNNEST(a2.split(';'))</code> </p>
570
+ <h3 id="like-function">LIKE() function</h3>
571
+ <p>RBQL does not support LIKE operator, instead it provides "like()" function which can be used like this:<br />
572
+ <code>SELECT * where like(a1, 'foo%bar')</code></p>
573
+ <h3 id="with-header-and-with-noheader-statements">WITH (header) and WITH (noheader) statements</h3>
574
+ <p>You can set whether the input (and join) CSV file has a header or not using the environment configuration parameters which could be <code>--with_headers</code> CLI flag or GUI checkbox or something else.<br />
575
+ But it is also possible to override this selection directly in the query by adding either <code>WITH (header)</code> or <code>WITH (noheader)</code> statement at the end of the query.<br />
576
+ Example: <code>select top 5 NR, * with (header)</code></p>
577
+ <h3 id="user-defined-functions-udf">User Defined Functions (UDF)</h3>
578
+ <p>RBQL supports User Defined Functions <br />
579
+ You can define custom functions and/or import libraries in two special files: </p>
580
+ <ul>
581
+ <li><code>~/.rbql_init_source.py</code> - for Python</li>
582
+ <li><code>~/.rbql_init_source.js</code> - for JavaScript</li>
583
+ </ul>
584
+ <h2 id="examples-of-rbql-queries">Examples of RBQL queries</h2>
585
+ <h4 id="with-python-expressions">With Python expressions</h4>
586
+ <ul>
587
+ <li><code>SELECT TOP 100 a1, int(a2) * 10, len(a4) WHERE a1 == "Buy" ORDER BY int(a2) DESC</code></li>
588
+ <li><code>SELECT a.id, a.weight / 1000 AS weight_kg</code></li>
589
+ <li><code>SELECT * ORDER BY random.random()</code> - random sort</li>
590
+ <li><code>SELECT len(a.vehicle_price) / 10, a2 WHERE int(a.vehicle_price) &lt; 500 and a['Vehicle type'] in ["car", "plane", "boat"] limit 20</code> - referencing columns by names from header and using Python's "in" to emulate SQL's "in"</li>
591
+ <li><code>UPDATE SET a3 = 'NPC' WHERE a3.find('Non-playable character') != -1</code></li>
592
+ <li><code>SELECT NR, *</code> - enumerate records, NR is 1-based</li>
593
+ <li><code>SELECT * WHERE re.match(".*ab.*", a1) is not None</code> - select entries where first column has "ab" pattern</li>
594
+ <li><code>SELECT a1, b1, b2 INNER JOIN ./countries.txt ON a2 == b1 ORDER BY a1, a3</code> - example of join query</li>
595
+ <li><code>SELECT MAX(a1), MIN(a1) WHERE a.Name != 'John' GROUP BY a2, a3</code> - example of aggregate query</li>
596
+ <li><code>SELECT *a1.split(':')</code> - Using Python3 unpack operator to split one column into many. Do not try this with other SQL engines!</li>
597
+ </ul>
598
+ <h4 id="with-javascript-expressions">With JavaScript expressions</h4>
599
+ <ul>
600
+ <li><code>SELECT TOP 100 a1, a2 * 10, a4.length WHERE a1 == "Buy" ORDER BY parseInt(a2) DESC</code></li>
601
+ <li><code>SELECT a.id, a.weight / 1000 AS weight_kg</code></li>
602
+ <li><code>SELECT * ORDER BY Math.random()</code> - random sort</li>
603
+ <li><code>SELECT TOP 20 a.vehicle_price.length / 10, a2 WHERE parseInt(a.vehicle_price) &lt; 500 &amp;&amp; ["car", "plane", "boat"].indexOf(a['Vehicle type']) &gt; -1 limit 20</code> - referencing columns by names from header</li>
604
+ <li><code>UPDATE SET a3 = 'NPC' WHERE a3.indexOf('Non-playable character') != -1</code></li>
605
+ <li><code>SELECT NR, *</code> - enumerate records, NR is 1-based</li>
606
+ <li><code>SELECT a1, b1, b2 INNER JOIN ./countries.txt ON a2 == b1 ORDER BY a1, a3</code> - example of join query</li>
607
+ <li><code>SELECT MAX(a1), MIN(a1) WHERE a.Name != 'John' GROUP BY a2, a3</code> - example of aggregate query</li>
608
+ <li><code>SELECT ...a1.split(':')</code> - Using JS "destructuring assignment" syntax to split one column into many. Do not try this with other SQL engines!</li>
609
+ </ul>
610
+ </div>
611
+ </div>
612
+
613
+
614
+ </body>
615
+
616
+ </html>
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_client.js ADDED
@@ -0,0 +1,423 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var rbql_running = false;
2
+
3
+ var handshake_completed = false;
4
+
5
+ var query_history = [];
6
+
7
+ const vscode = acquireVsCodeApi();
8
+
9
+ var global_css_style = null;
10
+
11
+ var last_preview_message = null;
12
+
13
+ var adjust_join_table_header_callback = null;
14
+
15
+ var global_header = null;
16
+
17
+ var is_web_ext = null;
18
+
19
+ function report_backend_language_change() {
20
+ let backend_language = document.getElementById('select_backend_language').value;
21
+ vscode.postMessage({'msg_type': 'global_param_change', 'key': 'rbql_backend_language', 'value': backend_language});
22
+ assign_backend_lang_selection_title();
23
+ }
24
+
25
+
26
+ function report_encoding_change() {
27
+ let encoding = document.getElementById('select_encoding').value;
28
+ vscode.postMessage({'msg_type': 'global_param_change', 'key': 'rbql_encoding', 'value': encoding});
29
+ }
30
+
31
+
32
+ function remove_children(root_node) {
33
+ while (root_node.firstChild) {
34
+ root_node.removeChild(root_node.firstChild);
35
+ }
36
+ }
37
+
38
+
39
+ function get_max_num_columns(records, with_headers) {
40
+ let max_num_columns = 0;
41
+ for (let r = 0; r < records.length; r++) {
42
+ max_num_columns = Math.max(max_num_columns, records[r].length);
43
+ }
44
+ if (with_headers && global_header && global_header.length)
45
+ max_num_columns = Math.max(max_num_columns, global_header.length);
46
+ return max_num_columns;
47
+ }
48
+
49
+
50
+ function add_header_cell_with_text(cell_text, dst_row_elem) {
51
+ let cell = document.createElement('th');
52
+ cell.textContent = cell_text;
53
+ dst_row_elem.appendChild(cell);
54
+ }
55
+
56
+
57
+ function add_header_row(max_num_columns, with_headers, table) {
58
+ let row_elem = document.createElement('tr');
59
+ add_header_cell_with_text('NR', row_elem);
60
+ let named_header_vars = [];
61
+ if (with_headers && global_header && global_header.length) {
62
+ named_header_vars = rbql_suggest.convert_header_to_rbql_variables(global_header, 'a');
63
+ }
64
+ for (let i = 0; i < max_num_columns; i++) {
65
+ let cell_text = `a${i + 1}`;
66
+ if (i < named_header_vars.length) {
67
+ let var_column = named_header_vars[i].dot_var ? named_header_vars[i].dot_var : named_header_vars[i].single_q_var;
68
+ cell_text += '\r\n' + var_column;
69
+ }
70
+ add_header_cell_with_text(cell_text, row_elem);
71
+ }
72
+ table.appendChild(row_elem);
73
+ }
74
+
75
+
76
+ function make_data_cell(cell_text) {
77
+ let cell = document.createElement('td');
78
+ const trim_marker = '###UI_STRING_TRIM_MARKER###';
79
+ let add_ellipsis = false;
80
+ if (cell_text.endsWith(trim_marker)) {
81
+ cell_text = cell_text.substr(0, cell_text.length - trim_marker.length);
82
+ add_ellipsis = true;
83
+ }
84
+ let field_rfc_lines = cell_text.split('\n');
85
+ for (let i = 0; i < field_rfc_lines.length; i++) {
86
+ let span = document.createElement('span');
87
+ span.textContent = field_rfc_lines[i];
88
+ cell.appendChild(span);
89
+ if (i + 1 < field_rfc_lines.length) {
90
+ let newline_span = document.createElement('span');
91
+ newline_span.textContent = '\\n';
92
+ newline_span.style.color = global_css_style.getPropertyValue('--vscode-editorWarning-foreground');
93
+ newline_span.title = 'new line';
94
+ cell.appendChild(newline_span);
95
+ }
96
+ }
97
+ if (add_ellipsis) {
98
+ let ellipsis_span = document.createElement('span');
99
+ ellipsis_span.style.color = global_css_style.getPropertyValue('--vscode-editorWarning-foreground');
100
+ ellipsis_span.textContent = ' ...';
101
+ ellipsis_span.title = 'value too long to display';
102
+ cell.appendChild(ellipsis_span);
103
+ }
104
+ return cell;
105
+ }
106
+
107
+
108
+ function make_nr_cell(cell_text) {
109
+ let nr_cell = document.createElement('td');
110
+ nr_cell.textContent = cell_text;
111
+ return nr_cell;
112
+ }
113
+
114
+
115
+ function make_preview_table() {
116
+ if (!last_preview_message)
117
+ return;
118
+ let records = last_preview_message.preview_records;
119
+ let actual_start_record = last_preview_message.actual_start_record;
120
+ let preview_error = last_preview_message.preview_sampling_error;
121
+
122
+ var table = document.getElementById('preview_table');
123
+ remove_children(table);
124
+ if (preview_error) {
125
+ let row = document.createElement('tr');
126
+ table.appendChild(row);
127
+ let span = document.createElement('span');
128
+ span.style.color = global_css_style.getPropertyValue('--vscode-inputValidation-errorForeground');
129
+ span.textContent = 'Unable to display preview table and run RBQL query:';
130
+ row.appendChild(span);
131
+ row.appendChild(document.createElement('br'));
132
+ span = document.createElement('span');
133
+ span.style.color = global_css_style.getPropertyValue('--vscode-inputValidation-errorForeground');
134
+ span.textContent = preview_error;
135
+ row.appendChild(span);
136
+ return;
137
+ }
138
+
139
+ let with_headers = document.getElementById('with_headers').checked;
140
+ let max_num_columns = get_max_num_columns(records, with_headers);
141
+ add_header_row(max_num_columns, with_headers, table);
142
+ for (var r = 0; r < records.length; r++) {
143
+ let row = document.createElement('tr');
144
+ let NR = r + actual_start_record + 1;
145
+ if (with_headers) {
146
+ NR -= 1;
147
+ if (NR == 0)
148
+ continue;
149
+ }
150
+ row.appendChild(make_nr_cell(String(NR)));
151
+ for (var nf = 0; nf < records[r].length; nf++) {
152
+ row.appendChild(make_data_cell(records[r][nf]));
153
+ }
154
+ table.appendChild(row);
155
+ }
156
+ }
157
+
158
+
159
+ function navigate_preview(direction) {
160
+ vscode.postMessage({'msg_type': 'navigate', 'direction': direction});
161
+ }
162
+
163
+
164
+ function preview_backward() {
165
+ navigate_preview('backward');
166
+ }
167
+
168
+
169
+ function preview_forward() {
170
+ navigate_preview('forward');
171
+ }
172
+
173
+
174
+ function preview_begin() {
175
+ navigate_preview('begin');
176
+ }
177
+
178
+
179
+ function preview_end() {
180
+ navigate_preview('end');
181
+ }
182
+
183
+
184
+ function apply_suggest_callback(query) {
185
+ vscode.postMessage({'msg_type': 'update_query', 'query': query});
186
+ }
187
+
188
+
189
+ function fetch_join_header_callback(join_table_id, adjust_join_table_headers) {
190
+ adjust_join_table_header_callback = adjust_join_table_headers;
191
+ let encoding = document.getElementById('select_encoding').value;
192
+ vscode.postMessage({'msg_type': 'fetch_table_header', 'table_id': join_table_id, 'encoding': encoding});
193
+ }
194
+
195
+
196
+ function process_with_headers_change() {
197
+ let with_headers = document.getElementById('with_headers').checked;
198
+ vscode.postMessage({'msg_type': 'with_headers_change', 'with_headers': with_headers}); // We need to send it to remember preview state
199
+ let header = with_headers ? global_header : null;
200
+ rbql_suggest.initialize_suggest('rbql_input', 'query_suggest', 'history_button', apply_suggest_callback, header, fetch_join_header_callback);
201
+ make_preview_table();
202
+ }
203
+
204
+
205
+ function show_error(error_type, error_msg) {
206
+ error_msg = error_msg.replace('\r?\n', '\r\n');
207
+ document.getElementById('error_message_header').textContent = 'Error type: "' + error_type + '"';
208
+ document.getElementById('error_message_details').textContent = error_msg;
209
+ document.getElementById('rbql_error_message').style.display = 'block';
210
+ document.getElementById('ack_error').focus();
211
+ }
212
+
213
+
214
+ function hide_error_msg() {
215
+ document.getElementById('rbql_error_message').style.display = 'none';
216
+ document.getElementById("rbql_input").focus();
217
+ }
218
+
219
+
220
+ function toggle_help_msg() {
221
+ let document_bg_color = global_css_style.getPropertyValue('--vscode-notifications-background');
222
+ let rbql_help_element = document.getElementById('rbql_help');
223
+ var style_before = rbql_help_element.style.display;
224
+ var new_style = style_before == 'block' ? 'none' : 'block';
225
+ if (new_style == 'block')
226
+ rbql_help_element.style.backgroundColor = document_bg_color;
227
+ rbql_help_element.style.display = new_style;
228
+ document.getElementById('close_help').style.display = new_style;
229
+ }
230
+
231
+
232
+ function register_history_callback(button_element, query) {
233
+ button_element.addEventListener("click", () => { document.getElementById('rbql_input').value = query; });
234
+ }
235
+
236
+
237
+ function toggle_history() {
238
+ let query_history_block = document.getElementById('query_history');
239
+ var style_before = query_history_block.style.display;
240
+ var new_style = style_before == 'block' ? 'none' : 'block';
241
+ if (new_style == 'block') {
242
+ document.getElementById('toggle_history_btn').textContent = '\u25BC';
243
+ } else {
244
+ document.getElementById('toggle_history_btn').textContent = '\u25B2';
245
+ }
246
+ let history_entries_block = document.getElementById('history_entries');
247
+ remove_children(history_entries_block);
248
+ for (let nr = 0; nr < query_history.length; nr++) {
249
+ let entry_button = document.createElement('button');
250
+ entry_button.className = 'history_button';
251
+ entry_button.textContent = query_history[nr];
252
+ register_history_callback(entry_button, query_history[nr]);
253
+ history_entries_block.appendChild(entry_button);
254
+ }
255
+ query_history_block.style.display = new_style;
256
+ let calculated_height = query_history_block.offsetHeight;
257
+ let text_input_coordinates = document.getElementById('rbql_input').getBoundingClientRect();
258
+ query_history_block.style.left = text_input_coordinates.left + 'px';
259
+ query_history_block.style.top = (text_input_coordinates.top - calculated_height) + 'px';
260
+ }
261
+
262
+
263
+ function clear_history() {
264
+ query_history = [];
265
+ toggle_history();
266
+ vscode.postMessage({'msg_type': 'global_param_change', 'key': 'rbql_query_history', 'value': []});
267
+ }
268
+
269
+
270
+ function start_rbql() {
271
+ var rbql_text = document.getElementById('rbql_input').value;
272
+ if (!rbql_text || rbql_running)
273
+ return;
274
+ rbql_running = true;
275
+ document.getElementById('rbql_run_btn').textContent = "\u231B";
276
+ let backend_language = document.getElementById('select_backend_language').value;
277
+ let output_format = document.getElementById('select_output_format').value;
278
+ let encoding = document.getElementById('select_encoding').value;
279
+ let with_headers = document.getElementById('with_headers').checked;
280
+ vscode.postMessage({'msg_type': 'run', 'query': rbql_text, 'backend_language': backend_language, 'output_dialect': output_format, 'encoding': encoding, 'with_headers': with_headers});
281
+ }
282
+
283
+
284
+ function handle_message(msg_event) {
285
+ var message = msg_event.data;
286
+ console.log('message received at client: ' + JSON.stringify(msg_event));
287
+ let message_type = message['msg_type'];
288
+
289
+ if (message_type == 'handshake') {
290
+ if (handshake_completed)
291
+ return;
292
+ handshake_completed = true;
293
+ if (message.hasOwnProperty('last_query')) {
294
+ document.getElementById('rbql_input').value = message['last_query'];
295
+ }
296
+ if (message.hasOwnProperty('query_history')) {
297
+ query_history = message['query_history'];
298
+ }
299
+ global_header = message['header_for_ui'];
300
+ is_web_ext = message['is_web_ext'];
301
+ let with_headers = message['with_headers'];
302
+ let header = with_headers ? global_header : null;
303
+ rbql_suggest.initialize_suggest('rbql_input', 'query_suggest', 'history_button', apply_suggest_callback, header, fetch_join_header_callback);
304
+ last_preview_message = message;
305
+ document.getElementById("select_backend_language").value = message['backend_language'];
306
+ assign_backend_lang_selection_title();
307
+ document.getElementById("select_encoding").value = message['encoding'];
308
+ document.getElementById("with_headers").checked = with_headers;
309
+ make_preview_table();
310
+
311
+ let integration_test_query = message['integration_test_query'];
312
+ let integration_test_language = message['integration_test_language'];
313
+ let integration_test_delay = message.hasOwnProperty('integration_test_delay') ? message.integration_test_delay : 2000;
314
+ if (integration_test_query && integration_test_language) {
315
+ if (message['integration_test_with_headers']) {
316
+ document.getElementById("with_headers").checked = true;
317
+ } else {
318
+ document.getElementById("with_headers").checked = false;
319
+ }
320
+ process_with_headers_change();
321
+ document.getElementById("select_backend_language").value = integration_test_language;
322
+ assign_backend_lang_selection_title();
323
+ document.getElementById('rbql_input').value = integration_test_query;
324
+ setTimeout(function() {
325
+ start_rbql();
326
+ }, integration_test_delay);
327
+ }
328
+ }
329
+
330
+ if (message_type == 'fetch_table_header_response') {
331
+ if (adjust_join_table_header_callback && message['header_for_ui']) {
332
+ adjust_join_table_header_callback(message['header_for_ui']);
333
+ }
334
+ }
335
+
336
+ if (message_type == 'navigate' || message_type == 'resample') {
337
+ last_preview_message = message;
338
+ make_preview_table();
339
+ }
340
+
341
+ if (message_type == 'rbql_report') {
342
+ rbql_running = false;
343
+ if (message.hasOwnProperty('error_type') || message.hasOwnProperty('error_msg')) {
344
+ let error_type = message.hasOwnProperty('error_type') ? message['error_type'] : 'Unexpected';
345
+ let error_msg = message.hasOwnProperty('error_msg') ? message['error_msg'] : 'Unknown Error';
346
+ show_error(error_type, error_msg);
347
+ }
348
+ document.getElementById('rbql_run_btn').textContent = "Run";
349
+ }
350
+ }
351
+
352
+
353
+ function is_printable_key_code(keycode) {
354
+ // Taken from here: https://stackoverflow.com/a/12467610/2898283
355
+ return (keycode > 47 && keycode < 58) || keycode == 32 || (keycode > 64 && keycode < 91) || (keycode > 185 && keycode < 193) || (keycode > 218 && keycode < 223);
356
+ }
357
+
358
+
359
+ function handle_input_keyup(event) {
360
+ rbql_suggest.handle_input_keyup(event);
361
+ if (is_printable_key_code(event.keyCode) || event.keyCode == 8 /* Bakspace */) {
362
+ let current_query = document.getElementById('rbql_input').value;
363
+ vscode.postMessage({'msg_type': 'update_query', 'query': current_query});
364
+ }
365
+ }
366
+
367
+
368
+ function handle_input_keydown(event) {
369
+ if (event.keyCode == 13 && rbql_suggest.active_suggest_idx === null) {
370
+ start_rbql();
371
+ } else {
372
+ rbql_suggest.handle_input_keydown(event);
373
+ }
374
+ }
375
+
376
+
377
+ function assign_backend_lang_selection_title() {
378
+ let select_backend_element = document.getElementById('select_backend_language');
379
+ let backend_language = select_backend_element.value;
380
+ if (backend_language == 'js') {
381
+ select_backend_element.title = 'Allows to use JS expressions such as: `Math.sqrt(a1)`, `a2.substring(1, 5)`, `a3.toUpperCase()`, etc';
382
+ } else {
383
+ select_backend_element.title = 'Allows to use Python expressions such as: `math.sqrt(float(a1))`, `a2[1:5]`, `a3.upper()`, etc';
384
+ }
385
+ }
386
+
387
+
388
+ function handle_udf_edit() {
389
+ let backend_language = document.getElementById('select_backend_language').value;
390
+ vscode.postMessage({'msg_type': 'edit_udf', 'backend_language': backend_language});
391
+ }
392
+
393
+
394
+ function main() {
395
+ global_css_style = getComputedStyle(document.body);
396
+ assign_backend_lang_selection_title();
397
+
398
+ window.addEventListener('message', handle_message);
399
+ vscode.postMessage({'msg_type': 'handshake'});
400
+
401
+ document.getElementById("rbql_run_btn").addEventListener("click", start_rbql);
402
+ document.getElementById("select_backend_language").addEventListener("change", report_backend_language_change);
403
+ document.getElementById("select_encoding").addEventListener("change", report_encoding_change);
404
+ document.getElementById("with_headers").addEventListener("click", process_with_headers_change);
405
+ document.getElementById("ack_error").addEventListener("click", hide_error_msg);
406
+ document.getElementById("help_btn").addEventListener("click", toggle_help_msg);
407
+ document.getElementById("close_help").addEventListener("click", toggle_help_msg);
408
+ document.getElementById("toggle_history_btn").addEventListener("click", toggle_history);
409
+ document.getElementById("clear_history_btn").addEventListener("click", clear_history);
410
+ document.getElementById("go_begin").addEventListener("click", preview_begin);
411
+ document.getElementById("go_backward").addEventListener("click", preview_backward);
412
+ document.getElementById("go_forward").addEventListener("click", preview_forward);
413
+ document.getElementById("go_end").addEventListener("click", preview_end);
414
+ document.getElementById("rbql_input").addEventListener("keyup", handle_input_keyup);
415
+ document.getElementById("rbql_input").addEventListener("keydown", handle_input_keydown);
416
+ document.getElementById("udf_button").addEventListener("click", handle_udf_edit);
417
+ document.getElementById("rbql_input").focus();
418
+ }
419
+
420
+
421
+ document.addEventListener("DOMContentLoaded", function(_event) {
422
+ main();
423
+ });
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_logo.svg ADDED
home/.vscode-server/extensions/mechatroner.rainbow-csv-3.24.1/rbql_suggest.js ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ let rbql_suggest = {};
2
+
3
+ ( function() {
4
+
5
+ rbql_suggest.active_suggest_idx = null;
6
+ rbql_suggest.suggest_list = []
7
+ rbql_suggest.apply_suggest_callback = null;
8
+ rbql_suggest.autosuggest_header_vars = [];
9
+ rbql_suggest.input_id = null;
10
+ rbql_suggest.suggest_list_id = null;
11
+ rbql_suggest.suggest_entry_class = null;
12
+ rbql_suggest.current_join_table_id = null;
13
+ rbql_suggest.fetch_join_header_callback = null;
14
+
15
+
16
+
17
+ function js_string_escape_column_name(column_name, quote_char) {
18
+ column_name = column_name.replace(/\\/g, '\\\\');
19
+ column_name = column_name.replace(/\n/g, '\\n');
20
+ column_name = column_name.replace(/\r/g, '\\r');
21
+ column_name = column_name.replace(/\t/g, '\\t');
22
+ if (quote_char === "'")
23
+ return column_name.replace(/'/g, "\\'");
24
+ if (quote_char === '"')
25
+ return column_name.replace(/"/g, '\\"');
26
+ return column_name.replace(/`/g, "\\`");
27
+ }
28
+
29
+
30
+ function convert_header_to_rbql_variables(header, table_var_prefix) {
31
+ let max_suggest_len = 100; // Suggest UI could become unresponsive if there are too many suggest options to consider
32
+ let result = [];
33
+ for (let h of header) {
34
+ let column_var_options = {orig_column_name: h, table_var_prefix: table_var_prefix};
35
+ if (h.match('^[_a-zA-Z][_a-zA-Z0-9]*$') !== null) {
36
+ column_var_options.dot_var = `${table_var_prefix}.${h}`;
37
+ } else {
38
+ column_var_options.dot_var = null;
39
+ }
40
+ let escaped_column_name = js_string_escape_column_name(h, '"');
41
+ column_var_options.double_q_var = `${table_var_prefix}["${escaped_column_name}"]`;
42
+ escaped_column_name = js_string_escape_column_name(h, "'");
43
+ column_var_options.single_q_var = `${table_var_prefix}['${escaped_column_name}']`;
44
+ result.push(column_var_options);
45
+ if (result.length > max_suggest_len)
46
+ break;
47
+ }
48
+ return result;
49
+ }
50
+
51
+
52
+ function initialize_suggest(input_id, suggest_list_id, suggest_entry_class, apply_suggest_callback, header, fetch_join_header_callback=null) {
53
+ if (!header)
54
+ header = [];
55
+ rbql_suggest.autosuggest_header_vars = convert_header_to_rbql_variables(header, 'a');
56
+ rbql_suggest.active_suggest_idx = null;
57
+ rbql_suggest.suggest_list = []
58
+ rbql_suggest.input_id = input_id;
59
+ rbql_suggest.suggest_list_id = suggest_list_id;
60
+ rbql_suggest.suggest_entry_class = suggest_entry_class;
61
+ rbql_suggest.apply_suggest_callback = apply_suggest_callback;
62
+ rbql_suggest.fetch_join_header_callback = fetch_join_header_callback;
63
+ }
64
+
65
+
66
+ function hide_suggest(suggest_div) {
67
+ if (rbql_suggest.active_suggest_idx !== null) {
68
+ suggest_div.style.display = 'none';
69
+ rbql_suggest.active_suggest_idx = null;
70
+ rbql_suggest.suggest_list = [];
71
+ }
72
+ }
73
+
74
+
75
+ function apply_suggest(suggest_index) {
76
+ try {
77
+ let rbql_input = document.getElementById(rbql_suggest.input_id);
78
+ rbql_input.value = rbql_suggest.suggest_list[suggest_index][0];
79
+ rbql_input.selectionStart = rbql_suggest.suggest_list[suggest_index][1];
80
+ rbql_input.selectionEnd = rbql_suggest.suggest_list[suggest_index][1];
81
+ rbql_input.focus();
82
+ if (rbql_suggest.apply_suggest_callback) {
83
+ rbql_suggest.apply_suggest_callback(rbql_suggest.suggest_list[suggest_index][0]);
84
+ }
85
+ hide_suggest(document.getElementById(rbql_suggest.suggest_list_id));
86
+ } catch (e) {
87
+ console.error(`Autocomplete error: ${e}`);
88
+ }
89
+ }
90
+
91
+
92
+ function register_suggest_callback(button_element, suggest_index) {
93
+ button_element.addEventListener("click", () => {
94
+ apply_suggest(suggest_index);
95
+ });
96
+ }
97
+
98
+
99
+ function highlight_active_suggest_entry(do_highlight) {
100
+ let entry_button = document.getElementById(`rbql_suggest_var_${rbql_suggest.active_suggest_idx}`);
101
+ if (!entry_button)
102
+ return;
103
+ if (do_highlight) {
104
+ let active_entry_class = rbql_suggest.suggest_entry_class + '_active';
105
+ entry_button.className = [rbql_suggest.suggest_entry_class, active_entry_class].join(' ');
106
+ entry_button.scrollIntoView();
107
+ } else {
108
+ entry_button.className = rbql_suggest.suggest_entry_class;
109
+ }
110
+ }
111
+
112
+
113
+ function remove_children(root_node) {
114
+ while (root_node.firstChild) {
115
+ root_node.removeChild(root_node.firstChild);
116
+ }
117
+ }
118
+
119
+
120
+ function show_suggest(suggest_div, query_before_var, relevant_suggest_list, query_after_cursor) {
121
+ let rbql_input = document.getElementById(rbql_suggest.input_id);
122
+ let caret_left_shift = 0;
123
+ try {
124
+ let caret_coordinates = getCaretCoordinates(rbql_input, rbql_input.selectionStart);
125
+ caret_left_shift = caret_coordinates.left ? caret_coordinates.left : 0;
126
+ } catch (e) {
127
+ caret_left_shift = 0;
128
+ }
129
+ remove_children(suggest_div);
130
+ rbql_suggest.active_suggest_idx = 0;
131
+ rbql_suggest.suggest_list = [];
132
+ for (let i = 0; i < relevant_suggest_list.length; i++) {
133
+ let suggest_text = relevant_suggest_list[i];
134
+ let entry_button = document.createElement('button');
135
+ entry_button.className = rbql_suggest.suggest_entry_class;
136
+ entry_button.textContent = suggest_text;
137
+ entry_button.setAttribute('id', `rbql_suggest_var_${i}`);
138
+ register_suggest_callback(entry_button, i);
139
+ suggest_div.appendChild(entry_button);
140
+ rbql_suggest.suggest_list.push([query_before_var + suggest_text + query_after_cursor, (query_before_var + suggest_text).length]);
141
+ }
142
+ highlight_active_suggest_entry(true);
143
+ suggest_div.style.display = 'block';
144
+ let calculated_height = suggest_div.offsetHeight;
145
+ let calculated_width = suggest_div.offsetWidth;
146
+ let box = rbql_input.getBoundingClientRect();
147
+ suggest_div.style.left = Math.max(0, Math.min(box.left + caret_left_shift, box.right - calculated_width)) + 'px';
148
+ suggest_div.style.top = (box.top - calculated_height) + 'px';
149
+ }
150
+
151
+
152
+ function switch_active_suggest(direction) {
153
+ if (rbql_suggest.active_suggest_idx === null)
154
+ return false;
155
+ highlight_active_suggest_entry(false);
156
+ if (direction == 'up') {
157
+ rbql_suggest.active_suggest_idx = (rbql_suggest.active_suggest_idx + rbql_suggest.suggest_list.length - 1) % rbql_suggest.suggest_list.length;
158
+ } else {
159
+ rbql_suggest.active_suggest_idx = (rbql_suggest.active_suggest_idx + 1) % rbql_suggest.suggest_list.length;
160
+ }
161
+ highlight_active_suggest_entry(true);
162
+ return true;
163
+ }
164
+
165
+
166
+ function is_printable_key_code(keycode) {
167
+ // Taken from here: https://stackoverflow.com/a/12467610/2898283
168
+ return (keycode > 47 && keycode < 58) || keycode == 32 || (keycode > 64 && keycode < 91) || (keycode > 185 && keycode < 193) || (keycode > 218 && keycode < 223);
169
+ }
170
+
171
+
172
+ function handle_input_keydown(event) {
173
+ // We need this logic to prevent the caret from going to the start of the input field with the default arrow-up keydown handler
174
+ try {
175
+ if (event.keyCode == 38) {
176
+ if (switch_active_suggest('up'))
177
+ event.preventDefault();
178
+ } else if (event.keyCode == 40) {
179
+ if (switch_active_suggest('down'))
180
+ event.preventDefault();
181
+ } else if (event.keyCode == 39) {
182
+ if (rbql_suggest.active_suggest_idx !== null) {
183
+ apply_suggest(rbql_suggest.active_suggest_idx);
184
+ event.preventDefault();
185
+ }
186
+ }
187
+ } catch (e) {
188
+ console.error(`Autocomplete error: ${e}`);
189
+ }
190
+ }
191
+
192
+
193
+ function variable_has_prefix(full_variable, cursor_var_prefix) {
194
+ return full_variable && full_variable.toLowerCase().startsWith(cursor_var_prefix.toLowerCase()) && full_variable != cursor_var_prefix;
195
+ }
196
+
197
+
198
+ function get_best_matching_variable(cursor_var_prefix, column_var_options) {
199
+ if (cursor_var_prefix.startsWith(column_var_options.table_var_prefix + '.')) {
200
+ if (variable_has_prefix(column_var_options.dot_var, cursor_var_prefix))
201
+ return column_var_options.dot_var;
202
+ if (variable_has_prefix(column_var_options.table_var_prefix + '.' + column_var_options.orig_column_name, cursor_var_prefix))
203
+ return column_var_options.single_q_var;
204
+ }
205
+ if (variable_has_prefix(column_var_options.single_q_var, cursor_var_prefix))
206
+ return column_var_options.single_q_var;
207
+ if (variable_has_prefix(column_var_options.double_q_var, cursor_var_prefix))
208
+ return column_var_options.double_q_var;
209
+ return null;
210
+ }
211
+
212
+
213
+ function get_join_table_id(query) {
214
+ let match = query.match(/ join +([^ ]+)(?: *$| +o$| +on)/i);
215
+ if (!match)
216
+ return null;
217
+ return match[1];
218
+ }
219
+
220
+
221
+ function adjust_join_table_header_callback(join_header) {
222
+ if (!join_header || !join_header.length) {
223
+ rbql_suggest.autosuggest_header_vars = rbql_suggest.autosuggest_header_vars.filter(v => v.table_var_prefix != 'b');
224
+ } else {
225
+ let join_header_vars = convert_header_to_rbql_variables(join_header, 'b');
226
+ rbql_suggest.autosuggest_header_vars = rbql_suggest.autosuggest_header_vars.concat(join_header_vars);
227
+ }
228
+ }
229
+
230
+
231
+ function handle_input_keyup(event) {
232
+ try {
233
+ if (event.keyCode == 13) {
234
+ if (rbql_suggest.active_suggest_idx !== null)
235
+ apply_suggest(rbql_suggest.active_suggest_idx);
236
+ return;
237
+ }
238
+ if (is_printable_key_code(event.keyCode) || event.keyCode == 8 /* Bakspace */) {
239
+ // We can't move this into the keydown handler because the characters appear in the input box only after keyUp event.
240
+ // Or alternatively we could scan the event.keyCode to find out the next char, but this is additional logic
241
+ let rbql_input = document.getElementById(rbql_suggest.input_id);
242
+ let current_query = rbql_input.value;
243
+ if (rbql_suggest.fetch_join_header_callback !== null) {
244
+ let join_table_id = get_join_table_id(current_query);
245
+ if (rbql_suggest.current_join_table_id != join_table_id) {
246
+ rbql_suggest.current_join_table_id = join_table_id;
247
+ if (join_table_id === null) {
248
+ adjust_join_table_header_callback([]);
249
+ } else {
250
+ rbql_suggest.fetch_join_header_callback(join_table_id, adjust_join_table_header_callback)
251
+ }
252
+ }
253
+ }
254
+ let suggest_div = document.getElementById(rbql_suggest.suggest_list_id);
255
+ hide_suggest(suggest_div);
256
+ let cursor_pos = rbql_input.selectionStart;
257
+ let query_before_cursor = current_query.substr(0, cursor_pos);
258
+ let query_after_cursor = current_query.substr(cursor_pos);
259
+ // TODO improve the match - just find last var-looking expression. The problem with this one - it won't match extended suggest like a.arbitrary-var -> a['arbitrary-var']
260
+ let last_var_prefix_match = query_before_cursor.match(/(?:[^_a-zA-Z0-9])([ab](?:\.[_a-zA-Z0-9]*|\[[^\]]*))$/);
261
+ if (last_var_prefix_match) {
262
+ let relevant_suggest_list = [];
263
+ let cursor_var_prefix = last_var_prefix_match[1];
264
+ let query_before_var = query_before_cursor.substr(0, last_var_prefix_match.index + 1);
265
+ for (let column_var_options of rbql_suggest.autosuggest_header_vars) {
266
+ let suggested_var = get_best_matching_variable(cursor_var_prefix, column_var_options);
267
+ if (suggested_var)
268
+ relevant_suggest_list.push(suggested_var);
269
+ }
270
+ if (relevant_suggest_list.length) {
271
+ show_suggest(suggest_div, query_before_var, relevant_suggest_list, query_after_cursor);
272
+ }
273
+ }
274
+ }
275
+ } catch (e) {
276
+ console.error(`Autocomplete error: ${e}`);
277
+ }
278
+ }
279
+
280
+
281
+ rbql_suggest.initialize_suggest = initialize_suggest;
282
+ rbql_suggest.handle_input_keydown = handle_input_keydown;
283
+ rbql_suggest.handle_input_keyup = handle_input_keyup;
284
+ rbql_suggest.convert_header_to_rbql_variables = convert_header_to_rbql_variables;
285
+
286
+ } )();
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/.vsixmanifest ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3
+ <Metadata>
4
+ <Identity Language="en-US" Id="vscode-language-pack-zh-hans" Version="1.130.2026072017" Publisher="MS-CEINTL" />
5
+ <DisplayName>Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code</DisplayName>
6
+ <Description xml:space="preserve">Language pack extension for Chinese (Simplified)</Description>
7
+ <Tags>中文(简体),lp-zh-cn,__lp_vscode,__lp-zh-cn_vscode,__lp_ms-vscode.js-debug,__lp-zh-cn_ms-vscode.js-debug,__lp_vscode.bat,__lp-zh-cn_vscode.bat,__lp_vscode.builtin-notebook-renderers,__lp-zh-cn_vscode.builtin-notebook-renderers,__lp_vscode.clojure,__lp-zh-cn_vscode.clojure,__lp_vscode.coffeescript,__lp-zh-cn_vscode.coffeescript,__lp_vscode.configuration-editing,__lp-zh-cn_vscode.configuration-editing,__lp_vscode.cpp,__lp-zh-cn_vscode.cpp,__lp_vscode.csharp,__lp-zh-cn_vscode.csharp,__lp_vscode.css-language-features,__lp-zh-cn_vscode.css-language-features,__lp_vscode.css,__lp-zh-cn_vscode.css,__lp_vscode.dart,__lp-zh-cn_vscode.dart,__lp_vscode.debug-auto-launch,__lp-zh-cn_vscode.debug-auto-launch,__lp_vscode.debug-server-ready,__lp-zh-cn_vscode.debug-server-ready,__lp_vscode.diff,__lp-zh-cn_vscode.diff,__lp_vscode.docker,__lp-zh-cn_vscode.docker,__lp_vscode.dotenv,__lp-zh-cn_vscode.dotenv,__lp_vscode.emmet,__lp-zh-cn_vscode.emmet,__lp_vscode.extension-editing,__lp-zh-cn_vscode.extension-editing,__lp_vscode.fsharp,__lp-zh-cn_vscode.fsharp,__lp_vscode.git-base,__lp-zh-cn_vscode.git-base,__lp_vscode.git,__lp-zh-cn_vscode.git,__lp_vscode.github-authentication,__lp-zh-cn_vscode.github-authentication,__lp_vscode.github,__lp-zh-cn_vscode.github,__lp_vscode.go,__lp-zh-cn_vscode.go,__lp_vscode.groovy,__lp-zh-cn_vscode.groovy,__lp_vscode.grunt,__lp-zh-cn_vscode.grunt,__lp_vscode.gulp,__lp-zh-cn_vscode.gulp,__lp_vscode.handlebars,__lp-zh-cn_vscode.handlebars,__lp_vscode.hlsl,__lp-zh-cn_vscode.hlsl,__lp_vscode.html-language-features,__lp-zh-cn_vscode.html-language-features,__lp_vscode.html,__lp-zh-cn_vscode.html,__lp_vscode.ini,__lp-zh-cn_vscode.ini,__lp_vscode.ipynb,__lp-zh-cn_vscode.ipynb,__lp_vscode.jake,__lp-zh-cn_vscode.jake,__lp_vscode.java,__lp-zh-cn_vscode.java,__lp_vscode.javascript,__lp-zh-cn_vscode.javascript,__lp_vscode.json-language-features,__lp-zh-cn_vscode.json-language-features,__lp_vscode.json,__lp-zh-cn_vscode.json,__lp_vscode.julia,__lp-zh-cn_vscode.julia,__lp_vscode.latex,__lp-zh-cn_vscode.latex,__lp_vscode.less,__lp-zh-cn_vscode.less,__lp_vscode.log,__lp-zh-cn_vscode.log,__lp_vscode.lua,__lp-zh-cn_vscode.lua,__lp_vscode.make,__lp-zh-cn_vscode.make,__lp_vscode.markdown-language-features,__lp-zh-cn_vscode.markdown-language-features,__lp_vscode.markdown-math,__lp-zh-cn_vscode.markdown-math,__lp_vscode.markdown,__lp-zh-cn_vscode.markdown,__lp_vscode.media-preview,__lp-zh-cn_vscode.media-preview,__lp_vscode.merge-conflict,__lp-zh-cn_vscode.merge-conflict,__lp_vscode.mermaid-chat-features,__lp-zh-cn_vscode.mermaid-chat-features,__lp_vscode.mermaid-markdown-features,__lp-zh-cn_vscode.mermaid-markdown-features,__lp_vscode.microsoft-authentication,__lp-zh-cn_vscode.microsoft-authentication,__lp_vscode.npm,__lp-zh-cn_vscode.npm,__lp_vscode.objective-c,__lp-zh-cn_vscode.objective-c,__lp_vscode.perl,__lp-zh-cn_vscode.perl,__lp_vscode.php-language-features,__lp-zh-cn_vscode.php-language-features,__lp_vscode.php,__lp-zh-cn_vscode.php,__lp_vscode.powershell,__lp-zh-cn_vscode.powershell,__lp_vscode.prompt,__lp-zh-cn_vscode.prompt,__lp_vscode.pug,__lp-zh-cn_vscode.pug,__lp_vscode.python,__lp-zh-cn_vscode.python,__lp_vscode.r,__lp-zh-cn_vscode.r,__lp_vscode.razor,__lp-zh-cn_vscode.razor,__lp_vscode.references-view,__lp-zh-cn_vscode.references-view,__lp_vscode.restructuredtext,__lp-zh-cn_vscode.restructuredtext,__lp_vscode.ruby,__lp-zh-cn_vscode.ruby,__lp_vscode.rust,__lp-zh-cn_vscode.rust,__lp_vscode.scss,__lp-zh-cn_vscode.scss,__lp_vscode.search-result,__lp-zh-cn_vscode.search-result,__lp_vscode.shaderlab,__lp-zh-cn_vscode.shaderlab,__lp_vscode.shellscript,__lp-zh-cn_vscode.shellscript,__lp_vscode.simple-browser,__lp-zh-cn_vscode.simple-browser,__lp_vscode.sql,__lp-zh-cn_vscode.sql,__lp_vscode.swift,__lp-zh-cn_vscode.swift,__lp_vscode.terminal-suggest,__lp-zh-cn_vscode.terminal-suggest,__lp_vscode.theme-2026,__lp-zh-cn_vscode.theme-2026,__lp_vscode.theme-abyss,__lp-zh-cn_vscode.theme-abyss,__lp_vscode.theme-defaults,__lp-zh-cn_vscode.theme-defaults,__lp_vscode.theme-kimbie-dark,__lp-zh-cn_vscode.theme-kimbie-dark,__lp_vscode.theme-monokai-dimmed,__lp-zh-cn_vscode.theme-monokai-dimmed,__lp_vscode.theme-monokai,__lp-zh-cn_vscode.theme-monokai,__lp_vscode.theme-quietlight,__lp-zh-cn_vscode.theme-quietlight,__lp_vscode.theme-red,__lp-zh-cn_vscode.theme-red,__lp_vscode.theme-solarized-dark,__lp-zh-cn_vscode.theme-solarized-dark,__lp_vscode.theme-solarized-light,__lp-zh-cn_vscode.theme-solarized-light,__lp_vscode.theme-tomorrow-night-blue,__lp-zh-cn_vscode.theme-tomorrow-night-blue,__lp_vscode.tunnel-forwarding,__lp-zh-cn_vscode.tunnel-forwarding,__lp_vscode.typescript-language-features,__lp-zh-cn_vscode.typescript-language-features,__lp_vscode.typescript,__lp-zh-cn_vscode.typescript,__lp_vscode.vb,__lp-zh-cn_vscode.vb,__lp_vscode.vscode-theme-seti,__lp-zh-cn_vscode.vscode-theme-seti,__lp_vscode.xml,__lp-zh-cn_vscode.xml,__lp_vscode.yaml,__lp-zh-cn_vscode.yaml</Tags>
8
+ <Categories>Language Packs</Categories>
9
+ <GalleryFlags>Public</GalleryFlags>
10
+
11
+ <Properties>
12
+ <Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.130.0" />
13
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
14
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
15
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="ui,workspace" />
16
+ <Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="中文(简体)" />
17
+ <Property Id="Microsoft.VisualStudio.Code.EnabledApiProposals" Value="" />
18
+
19
+
20
+
21
+ <Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/Microsoft/vscode-loc.git" />
22
+ <Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/Microsoft/vscode-loc.git" />
23
+ <Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/Microsoft/vscode-loc.git" />
24
+ <Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/Microsoft/vscode-loc/issues" />
25
+ <Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/Microsoft/vscode-loc#readme" />
26
+
27
+
28
+ <Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
29
+ <Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
30
+
31
+
32
+
33
+ </Properties>
34
+ <License>extension/LICENSE.md</License>
35
+ <Icon>extension/languagepack.png</Icon>
36
+ </Metadata>
37
+ <Installation>
38
+ <InstallationTarget Id="Microsoft.VisualStudio.Code"/>
39
+ </Installation>
40
+ <Dependencies/>
41
+ <Assets>
42
+ <Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
43
+ <Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/readme.md" Addressable="true" />
44
+ <Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/changelog.md" Addressable="true" />
45
+ <Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.md" Addressable="true" />
46
+ <Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/languagepack.png" Addressable="true" />
47
+ <Asset Type="Microsoft.VisualStudio.Code.Translation.ZH-CN" Path="extension/translations/main.i18n.json" Addressable="true" />
48
+ </Assets>
49
+ </PackageManifest>
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/LICENSE.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Visual Studio Code Localization Packs
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/ThirdPartyNotices.txt ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NOTICES AND INFORMATION
2
+ Do Not Translate or Localize
3
+
4
+ This software incorporates material from third parties.
5
+ Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com,
6
+ or you may send a check or money order for US $5.00, including the product name,
7
+ the open source component name, platform, and version number, to:
8
+
9
+ Source Code Compliance Team
10
+ Microsoft Corporation
11
+ One Microsoft Way
12
+ Redmond, WA 98052
13
+ USA
14
+
15
+ Notwithstanding any other terms, you may reverse engineer this software to the extent
16
+ required to debug changes to any libraries licensed under the GNU Lesser General Public License.
17
+
18
+ ---------------------------------------------------------
19
+
20
+ s 1.0.0 - Apache-2.0
21
+ http://sheetjs.com/opensource
22
+
23
+ Copyright (c) 2019-present SheetJS LLC
24
+ (c) 2019-present SheetJS https://sheetjs.com
25
+
26
+ Apache License
27
+ Version 2.0, January 2004
28
+ http://www.apache.org/licenses/
29
+
30
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
31
+
32
+ 1. Definitions.
33
+
34
+ "License" shall mean the terms and conditions for use, reproduction,
35
+ and distribution as defined by Sections 1 through 9 of this document.
36
+
37
+ "Licensor" shall mean the copyright owner or entity authorized by
38
+ the copyright owner that is granting the License.
39
+
40
+ "Legal Entity" shall mean the union of the acting entity and all
41
+ other entities that control, are controlled by, or are under common
42
+ control with that entity. For the purposes of this definition,
43
+ "control" means (i) the power, direct or indirect, to cause the
44
+ direction or management of such entity, whether by contract or
45
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
46
+ outstanding shares, or (iii) beneficial ownership of such entity.
47
+
48
+ "You" (or "Your") shall mean an individual or Legal Entity
49
+ exercising permissions granted by this License.
50
+
51
+ "Source" form shall mean the preferred form for making modifications,
52
+ including but not limited to software source code, documentation
53
+ source, and configuration files.
54
+
55
+ "Object" form shall mean any form resulting from mechanical
56
+ transformation or translation of a Source form, including but
57
+ not limited to compiled object code, generated documentation,
58
+ and conversions to other media types.
59
+
60
+ "Work" shall mean the work of authorship, whether in Source or
61
+ Object form, made available under the License, as indicated by a
62
+ copyright notice that is included in or attached to the work
63
+ (an example is provided in the Appendix below).
64
+
65
+ "Derivative Works" shall mean any work, whether in Source or Object
66
+ form, that is based on (or derived from) the Work and for which the
67
+ editorial revisions, annotations, elaborations, or other modifications
68
+ represent, as a whole, an original work of authorship. For the purposes
69
+ of this License, Derivative Works shall not include works that remain
70
+ separable from, or merely link (or bind by name) to the interfaces of,
71
+ the Work and Derivative Works thereof.
72
+
73
+ "Contribution" shall mean any work of authorship, including
74
+ the original version of the Work and any modifications or additions
75
+ to that Work or Derivative Works thereof, that is intentionally
76
+ submitted to Licensor for inclusion in the Work by the copyright owner
77
+ or by an individual or Legal Entity authorized to submit on behalf of
78
+ the copyright owner. For the purposes of this definition, "submitted"
79
+ means any form of electronic, verbal, or written communication sent
80
+ to the Licensor or its representatives, including but not limited to
81
+ communication on electronic mailing lists, source code control systems,
82
+ and issue tracking systems that are managed by, or on behalf of, the
83
+ Licensor for the purpose of discussing and improving the Work, but
84
+ excluding communication that is conspicuously marked or otherwise
85
+ designated in writing by the copyright owner as "Not a Contribution."
86
+
87
+ "Contributor" shall mean Licensor and any individual or Legal Entity
88
+ on behalf of whom a Contribution has been received by Licensor and
89
+ subsequently incorporated within the Work.
90
+
91
+ 2. Grant of Copyright License. Subject to the terms and conditions of
92
+ this License, each Contributor hereby grants to You a perpetual,
93
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
94
+ copyright license to reproduce, prepare Derivative Works of,
95
+ publicly display, publicly perform, sublicense, and distribute the
96
+ Work and such Derivative Works in Source or Object form.
97
+
98
+ 3. Grant of Patent License. Subject to the terms and conditions of
99
+ this License, each Contributor hereby grants to You a perpetual,
100
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
101
+ (except as stated in this section) patent license to make, have made,
102
+ use, offer to sell, sell, import, and otherwise transfer the Work,
103
+ where such license applies only to those patent claims licensable
104
+ by such Contributor that are necessarily infringed by their
105
+ Contribution(s) alone or by combination of their Contribution(s)
106
+ with the Work to which such Contribution(s) was submitted. If You
107
+ institute patent litigation against any entity (including a
108
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
109
+ or a Contribution incorporated within the Work constitutes direct
110
+ or contributory patent infringement, then any patent licenses
111
+ granted to You under this License for that Work shall terminate
112
+ as of the date such litigation is filed.
113
+
114
+ 4. Redistribution. You may reproduce and distribute copies of the
115
+ Work or Derivative Works thereof in any medium, with or without
116
+ modifications, and in Source or Object form, provided that You
117
+ meet the following conditions:
118
+
119
+ (a) You must give any other recipients of the Work or
120
+ Derivative Works a copy of this License; and
121
+
122
+ (b) You must cause any modified files to carry prominent notices
123
+ stating that You changed the files; and
124
+
125
+ (c) You must retain, in the Source form of any Derivative Works
126
+ that You distribute, all copyright, patent, trademark, and
127
+ attribution notices from the Source form of the Work,
128
+ excluding those notices that do not pertain to any part of
129
+ the Derivative Works; and
130
+
131
+ (d) If the Work includes a "NOTICE" text file as part of its
132
+ distribution, then any Derivative Works that You distribute must
133
+ include a readable copy of the attribution notices contained
134
+ within such NOTICE file, excluding those notices that do not
135
+ pertain to any part of the Derivative Works, in at least one
136
+ of the following places: within a NOTICE text file distributed
137
+ as part of the Derivative Works; within the Source form or
138
+ documentation, if provided along with the Derivative Works; or,
139
+ within a display generated by the Derivative Works, if and
140
+ wherever such third-party notices normally appear. The contents
141
+ of the NOTICE file are for informational purposes only and
142
+ do not modify the License. You may add Your own attribution
143
+ notices within Derivative Works that You distribute, alongside
144
+ or as an addendum to the NOTICE text from the Work, provided
145
+ that such additional attribution notices cannot be construed
146
+ as modifying the License.
147
+
148
+ You may add Your own copyright statement to Your modifications and
149
+ may provide additional or different license terms and conditions
150
+ for use, reproduction, or distribution of Your modifications, or
151
+ for any such Derivative Works as a whole, provided Your use,
152
+ reproduction, and distribution of the Work otherwise complies with
153
+ the conditions stated in this License.
154
+
155
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
156
+ any Contribution intentionally submitted for inclusion in the Work
157
+ by You to the Licensor shall be under the terms and conditions of
158
+ this License, without any additional terms or conditions.
159
+ Notwithstanding the above, nothing herein shall supersede or modify
160
+ the terms of any separate license agreement you may have executed
161
+ with Licensor regarding such Contributions.
162
+
163
+ 6. Trademarks. This License does not grant permission to use the trade
164
+ names, trademarks, service marks, or product names of the Licensor,
165
+ except as required for reasonable and customary use in describing the
166
+ origin of the Work and reproducing the content of the NOTICE file.
167
+
168
+ 7. Disclaimer of Warranty. Unless required by applicable law or
169
+ agreed to in writing, Licensor provides the Work (and each
170
+ Contributor provides its Contributions) on an "AS IS" BASIS,
171
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
172
+ implied, including, without limitation, any warranties or conditions
173
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
174
+ PARTICULAR PURPOSE. You are solely responsible for determining the
175
+ appropriateness of using or redistributing the Work and assume any
176
+ risks associated with Your exercise of permissions under this License.
177
+
178
+ 8. Limitation of Liability. In no event and under no legal theory,
179
+ whether in tort (including negligence), contract, or otherwise,
180
+ unless required by applicable law (such as deliberate and grossly
181
+ negligent acts) or agreed to in writing, shall any Contributor be
182
+ liable to You for damages, including any direct, indirect, special,
183
+ incidental, or consequential damages of any character arising as a
184
+ result of this License or out of the use or inability to use the
185
+ Work (including but not limited to damages for loss of goodwill,
186
+ work stoppage, computer failure or malfunction, or any and all
187
+ other commercial damages or losses), even if such Contributor
188
+ has been advised of the possibility of such damages.
189
+
190
+ 9. Accepting Warranty or Additional Liability. While redistributing
191
+ the Work or Derivative Works thereof, You may choose to offer,
192
+ and charge a fee for, acceptance of support, warranty, indemnity,
193
+ or other liability obligations and/or rights consistent with this
194
+ License. However, in accepting such obligations, You may act only
195
+ on Your own behalf and on Your sole responsibility, not on behalf
196
+ of any other Contributor, and only if You agree to indemnify,
197
+ defend, and hold each Contributor harmless for any liability
198
+ incurred by, or claims asserted against, such Contributor by reason
199
+ of your accepting any such warranty or additional liability.
200
+
201
+ END OF TERMS AND CONDITIONS
202
+
203
+ APPENDIX: How to apply the Apache License to your work.
204
+
205
+ To apply the Apache License to your work, attach the following
206
+ boilerplate notice, with the fields enclosed by brackets "{}"
207
+ replaced with your own identifying information. (Don't include
208
+ the brackets!) The text should be enclosed in the appropriate
209
+ comment syntax for the file format. We also recommend that a
210
+ file or class name and description of purpose be included on the
211
+ same "printed page" as the copyright notice for easier
212
+ identification within third-party archives.
213
+
214
+ Copyright (C) 2019-present SheetJS LLC
215
+
216
+ Licensed under the Apache License, Version 2.0 (the "License");
217
+ you may not use this file except in compliance with the License.
218
+ You may obtain a copy of the License at
219
+
220
+ http://www.apache.org/licenses/LICENSE-2.0
221
+
222
+ Unless required by applicable law or agreed to in writing, software
223
+ distributed under the License is distributed on an "AS IS" BASIS,
224
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
225
+ See the License for the specific language governing permissions and
226
+ limitations under the License.
227
+
228
+
229
+ ---------------------------------------------------------
230
+
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/changelog.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+ All notable changes to the "vscode-language-pack-zh-hans" language pack will be documented in this file.
3
+
4
+ ## [Released]
5
+ * May 5, 2021 - Release for VS Code 1.56
6
+ * March 31, 2021 - Release for VS Code 1.55
7
+ * March 3, 2021 - Release for VS Code 1.54
8
+ * February 3, 2021 - Release for VS Code 1.53
9
+ * December 9, 2020 - Release for VS Code 1.52
10
+ * November 4, 2020 - Release for VS Code 1.51
11
+ * October 7, 2020 - Release for VS Code 1.50
12
+ * September 9, 2020 - Release for VS Code 1.49
13
+ * August 12, 2020 - Release for VS Code 1.48
14
+ * July 8, 2020 - Release for VS Code 1.47
15
+ * June 10, 2020 - Release for VS Code 1.46
16
+ * May 7, 2020 - Release for VS Code 1.45
17
+ * April 7, 2020 - Release for VS Code 1.44
18
+ * March 3, 2020 - Release for VS Code 1.43
19
+ * February 5, 2020 - Release for VS Code 1.42
20
+ * December 16, 2019 - Release for VS Code 1.41
21
+ * November 6, 2019 - Release for VS Code 1.40
22
+ * October 9, 2019 - Release for VS Code 1.39
23
+ * September 4, 2019 - Release for VS Code 1.38
24
+ * August 7, 2019 - Release for VS Code 1.37
25
+ * July 3, 2019 - Release for VS Code 1.36
26
+ * June 6, 2019 - Release for VS Code 1.35
27
+ * May 15, 2019 - Release for VS Code 1.34
28
+ * April 3, 2019 - Release for VS Code 1.33
29
+ * March 6, 2019 - Release for VS Code 1.32
30
+ * February 6, 2019 - Release for VS Code 1.31
31
+ * December 12, 2018 - Release for VS Code 1.30
32
+ * November 7, 2018 - Release for VS Code 1.29
33
+ * October 3, 2018 - Release for VS Code 1.28
34
+ * September 5, 2018 - Release for VS Code 1.27
35
+ * August 8, 2018 - Release for VS Code 1.26
36
+ * July 5, 2018 - Release for VS Code 1.25
37
+ * June 6, 2018 - Release for VS Code 1.24
38
+ * May 5, 2018 - Release for VS Code 1.23
39
+ * April 16, 2018 - Initial release
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/languagepack.png ADDED

Git LFS Details

  • SHA256: 00446b52fa5fe7550f8618f5fe8a8dbba6d1b241fecb01490dc9ac4c90da04ac
  • Pointer size: 129 Bytes
  • Size of remote file: 5.21 kB
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/package.json ADDED
@@ -0,0 +1,417 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "vscode-language-pack-zh-hans",
3
+ "displayName": "Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code",
4
+ "description": "Language pack extension for Chinese (Simplified)",
5
+ "version": "1.130.2026072017",
6
+ "publisher": "MS-CEINTL",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/Microsoft/vscode-loc"
10
+ },
11
+ "license": "SEE MIT LICENSE IN LICENSE.md",
12
+ "engines": {
13
+ "vscode": "^1.130.0"
14
+ },
15
+ "icon": "languagepack.png",
16
+ "categories": [
17
+ "Language Packs"
18
+ ],
19
+ "keywords": [
20
+ "中文(简体)"
21
+ ],
22
+ "contributes": {
23
+ "localizations": [
24
+ {
25
+ "languageId": "zh-cn",
26
+ "languageName": "Chinese Simplified",
27
+ "localizedLanguageName": "中文(简体)",
28
+ "translations": [
29
+ {
30
+ "id": "vscode",
31
+ "path": "./translations/main.i18n.json"
32
+ },
33
+ {
34
+ "id": "ms-vscode.js-debug",
35
+ "path": "./translations/extensions/ms-vscode.js-debug.i18n.json"
36
+ },
37
+ {
38
+ "id": "vscode.bat",
39
+ "path": "./translations/extensions/vscode.bat.i18n.json"
40
+ },
41
+ {
42
+ "id": "vscode.builtin-notebook-renderers",
43
+ "path": "./translations/extensions/vscode.builtin-notebook-renderers.i18n.json"
44
+ },
45
+ {
46
+ "id": "vscode.clojure",
47
+ "path": "./translations/extensions/vscode.clojure.i18n.json"
48
+ },
49
+ {
50
+ "id": "vscode.coffeescript",
51
+ "path": "./translations/extensions/vscode.coffeescript.i18n.json"
52
+ },
53
+ {
54
+ "id": "vscode.configuration-editing",
55
+ "path": "./translations/extensions/vscode.configuration-editing.i18n.json"
56
+ },
57
+ {
58
+ "id": "vscode.cpp",
59
+ "path": "./translations/extensions/vscode.cpp.i18n.json"
60
+ },
61
+ {
62
+ "id": "vscode.csharp",
63
+ "path": "./translations/extensions/vscode.csharp.i18n.json"
64
+ },
65
+ {
66
+ "id": "vscode.css-language-features",
67
+ "path": "./translations/extensions/vscode.css-language-features.i18n.json"
68
+ },
69
+ {
70
+ "id": "vscode.css",
71
+ "path": "./translations/extensions/vscode.css.i18n.json"
72
+ },
73
+ {
74
+ "id": "vscode.dart",
75
+ "path": "./translations/extensions/vscode.dart.i18n.json"
76
+ },
77
+ {
78
+ "id": "vscode.debug-auto-launch",
79
+ "path": "./translations/extensions/vscode.debug-auto-launch.i18n.json"
80
+ },
81
+ {
82
+ "id": "vscode.debug-server-ready",
83
+ "path": "./translations/extensions/vscode.debug-server-ready.i18n.json"
84
+ },
85
+ {
86
+ "id": "vscode.diff",
87
+ "path": "./translations/extensions/vscode.diff.i18n.json"
88
+ },
89
+ {
90
+ "id": "vscode.docker",
91
+ "path": "./translations/extensions/vscode.docker.i18n.json"
92
+ },
93
+ {
94
+ "id": "vscode.dotenv",
95
+ "path": "./translations/extensions/vscode.dotenv.i18n.json"
96
+ },
97
+ {
98
+ "id": "vscode.emmet",
99
+ "path": "./translations/extensions/vscode.emmet.i18n.json"
100
+ },
101
+ {
102
+ "id": "vscode.extension-editing",
103
+ "path": "./translations/extensions/vscode.extension-editing.i18n.json"
104
+ },
105
+ {
106
+ "id": "vscode.fsharp",
107
+ "path": "./translations/extensions/vscode.fsharp.i18n.json"
108
+ },
109
+ {
110
+ "id": "vscode.git-base",
111
+ "path": "./translations/extensions/vscode.git-base.i18n.json"
112
+ },
113
+ {
114
+ "id": "vscode.git",
115
+ "path": "./translations/extensions/vscode.git.i18n.json"
116
+ },
117
+ {
118
+ "id": "vscode.github-authentication",
119
+ "path": "./translations/extensions/vscode.github-authentication.i18n.json"
120
+ },
121
+ {
122
+ "id": "vscode.github",
123
+ "path": "./translations/extensions/vscode.github.i18n.json"
124
+ },
125
+ {
126
+ "id": "vscode.go",
127
+ "path": "./translations/extensions/vscode.go.i18n.json"
128
+ },
129
+ {
130
+ "id": "vscode.groovy",
131
+ "path": "./translations/extensions/vscode.groovy.i18n.json"
132
+ },
133
+ {
134
+ "id": "vscode.grunt",
135
+ "path": "./translations/extensions/vscode.grunt.i18n.json"
136
+ },
137
+ {
138
+ "id": "vscode.gulp",
139
+ "path": "./translations/extensions/vscode.gulp.i18n.json"
140
+ },
141
+ {
142
+ "id": "vscode.handlebars",
143
+ "path": "./translations/extensions/vscode.handlebars.i18n.json"
144
+ },
145
+ {
146
+ "id": "vscode.hlsl",
147
+ "path": "./translations/extensions/vscode.hlsl.i18n.json"
148
+ },
149
+ {
150
+ "id": "vscode.html-language-features",
151
+ "path": "./translations/extensions/vscode.html-language-features.i18n.json"
152
+ },
153
+ {
154
+ "id": "vscode.html",
155
+ "path": "./translations/extensions/vscode.html.i18n.json"
156
+ },
157
+ {
158
+ "id": "vscode.ini",
159
+ "path": "./translations/extensions/vscode.ini.i18n.json"
160
+ },
161
+ {
162
+ "id": "vscode.ipynb",
163
+ "path": "./translations/extensions/vscode.ipynb.i18n.json"
164
+ },
165
+ {
166
+ "id": "vscode.jake",
167
+ "path": "./translations/extensions/vscode.jake.i18n.json"
168
+ },
169
+ {
170
+ "id": "vscode.java",
171
+ "path": "./translations/extensions/vscode.java.i18n.json"
172
+ },
173
+ {
174
+ "id": "vscode.javascript",
175
+ "path": "./translations/extensions/vscode.javascript.i18n.json"
176
+ },
177
+ {
178
+ "id": "vscode.json-language-features",
179
+ "path": "./translations/extensions/vscode.json-language-features.i18n.json"
180
+ },
181
+ {
182
+ "id": "vscode.json",
183
+ "path": "./translations/extensions/vscode.json.i18n.json"
184
+ },
185
+ {
186
+ "id": "vscode.julia",
187
+ "path": "./translations/extensions/vscode.julia.i18n.json"
188
+ },
189
+ {
190
+ "id": "vscode.latex",
191
+ "path": "./translations/extensions/vscode.latex.i18n.json"
192
+ },
193
+ {
194
+ "id": "vscode.less",
195
+ "path": "./translations/extensions/vscode.less.i18n.json"
196
+ },
197
+ {
198
+ "id": "vscode.log",
199
+ "path": "./translations/extensions/vscode.log.i18n.json"
200
+ },
201
+ {
202
+ "id": "vscode.lua",
203
+ "path": "./translations/extensions/vscode.lua.i18n.json"
204
+ },
205
+ {
206
+ "id": "vscode.make",
207
+ "path": "./translations/extensions/vscode.make.i18n.json"
208
+ },
209
+ {
210
+ "id": "vscode.markdown-language-features",
211
+ "path": "./translations/extensions/vscode.markdown-language-features.i18n.json"
212
+ },
213
+ {
214
+ "id": "vscode.markdown-math",
215
+ "path": "./translations/extensions/vscode.markdown-math.i18n.json"
216
+ },
217
+ {
218
+ "id": "vscode.markdown",
219
+ "path": "./translations/extensions/vscode.markdown.i18n.json"
220
+ },
221
+ {
222
+ "id": "vscode.media-preview",
223
+ "path": "./translations/extensions/vscode.media-preview.i18n.json"
224
+ },
225
+ {
226
+ "id": "vscode.merge-conflict",
227
+ "path": "./translations/extensions/vscode.merge-conflict.i18n.json"
228
+ },
229
+ {
230
+ "id": "vscode.mermaid-chat-features",
231
+ "path": "./translations/extensions/vscode.mermaid-chat-features.i18n.json"
232
+ },
233
+ {
234
+ "id": "vscode.mermaid-markdown-features",
235
+ "path": "./translations/extensions/vscode.mermaid-markdown-features.i18n.json"
236
+ },
237
+ {
238
+ "id": "vscode.microsoft-authentication",
239
+ "path": "./translations/extensions/vscode.microsoft-authentication.i18n.json"
240
+ },
241
+ {
242
+ "id": "vscode.npm",
243
+ "path": "./translations/extensions/vscode.npm.i18n.json"
244
+ },
245
+ {
246
+ "id": "vscode.objective-c",
247
+ "path": "./translations/extensions/vscode.objective-c.i18n.json"
248
+ },
249
+ {
250
+ "id": "vscode.perl",
251
+ "path": "./translations/extensions/vscode.perl.i18n.json"
252
+ },
253
+ {
254
+ "id": "vscode.php-language-features",
255
+ "path": "./translations/extensions/vscode.php-language-features.i18n.json"
256
+ },
257
+ {
258
+ "id": "vscode.php",
259
+ "path": "./translations/extensions/vscode.php.i18n.json"
260
+ },
261
+ {
262
+ "id": "vscode.powershell",
263
+ "path": "./translations/extensions/vscode.powershell.i18n.json"
264
+ },
265
+ {
266
+ "id": "vscode.prompt",
267
+ "path": "./translations/extensions/vscode.prompt.i18n.json"
268
+ },
269
+ {
270
+ "id": "vscode.pug",
271
+ "path": "./translations/extensions/vscode.pug.i18n.json"
272
+ },
273
+ {
274
+ "id": "vscode.python",
275
+ "path": "./translations/extensions/vscode.python.i18n.json"
276
+ },
277
+ {
278
+ "id": "vscode.r",
279
+ "path": "./translations/extensions/vscode.r.i18n.json"
280
+ },
281
+ {
282
+ "id": "vscode.razor",
283
+ "path": "./translations/extensions/vscode.razor.i18n.json"
284
+ },
285
+ {
286
+ "id": "vscode.references-view",
287
+ "path": "./translations/extensions/vscode.references-view.i18n.json"
288
+ },
289
+ {
290
+ "id": "vscode.restructuredtext",
291
+ "path": "./translations/extensions/vscode.restructuredtext.i18n.json"
292
+ },
293
+ {
294
+ "id": "vscode.ruby",
295
+ "path": "./translations/extensions/vscode.ruby.i18n.json"
296
+ },
297
+ {
298
+ "id": "vscode.rust",
299
+ "path": "./translations/extensions/vscode.rust.i18n.json"
300
+ },
301
+ {
302
+ "id": "vscode.scss",
303
+ "path": "./translations/extensions/vscode.scss.i18n.json"
304
+ },
305
+ {
306
+ "id": "vscode.search-result",
307
+ "path": "./translations/extensions/vscode.search-result.i18n.json"
308
+ },
309
+ {
310
+ "id": "vscode.shaderlab",
311
+ "path": "./translations/extensions/vscode.shaderlab.i18n.json"
312
+ },
313
+ {
314
+ "id": "vscode.shellscript",
315
+ "path": "./translations/extensions/vscode.shellscript.i18n.json"
316
+ },
317
+ {
318
+ "id": "vscode.simple-browser",
319
+ "path": "./translations/extensions/vscode.simple-browser.i18n.json"
320
+ },
321
+ {
322
+ "id": "vscode.sql",
323
+ "path": "./translations/extensions/vscode.sql.i18n.json"
324
+ },
325
+ {
326
+ "id": "vscode.swift",
327
+ "path": "./translations/extensions/vscode.swift.i18n.json"
328
+ },
329
+ {
330
+ "id": "vscode.terminal-suggest",
331
+ "path": "./translations/extensions/vscode.terminal-suggest.i18n.json"
332
+ },
333
+ {
334
+ "id": "vscode.theme-2026",
335
+ "path": "./translations/extensions/vscode.theme-2026.i18n.json"
336
+ },
337
+ {
338
+ "id": "vscode.theme-abyss",
339
+ "path": "./translations/extensions/vscode.theme-abyss.i18n.json"
340
+ },
341
+ {
342
+ "id": "vscode.theme-defaults",
343
+ "path": "./translations/extensions/vscode.theme-defaults.i18n.json"
344
+ },
345
+ {
346
+ "id": "vscode.theme-kimbie-dark",
347
+ "path": "./translations/extensions/vscode.theme-kimbie-dark.i18n.json"
348
+ },
349
+ {
350
+ "id": "vscode.theme-monokai-dimmed",
351
+ "path": "./translations/extensions/vscode.theme-monokai-dimmed.i18n.json"
352
+ },
353
+ {
354
+ "id": "vscode.theme-monokai",
355
+ "path": "./translations/extensions/vscode.theme-monokai.i18n.json"
356
+ },
357
+ {
358
+ "id": "vscode.theme-quietlight",
359
+ "path": "./translations/extensions/vscode.theme-quietlight.i18n.json"
360
+ },
361
+ {
362
+ "id": "vscode.theme-red",
363
+ "path": "./translations/extensions/vscode.theme-red.i18n.json"
364
+ },
365
+ {
366
+ "id": "vscode.theme-solarized-dark",
367
+ "path": "./translations/extensions/vscode.theme-solarized-dark.i18n.json"
368
+ },
369
+ {
370
+ "id": "vscode.theme-solarized-light",
371
+ "path": "./translations/extensions/vscode.theme-solarized-light.i18n.json"
372
+ },
373
+ {
374
+ "id": "vscode.theme-tomorrow-night-blue",
375
+ "path": "./translations/extensions/vscode.theme-tomorrow-night-blue.i18n.json"
376
+ },
377
+ {
378
+ "id": "vscode.tunnel-forwarding",
379
+ "path": "./translations/extensions/vscode.tunnel-forwarding.i18n.json"
380
+ },
381
+ {
382
+ "id": "vscode.typescript-language-features",
383
+ "path": "./translations/extensions/vscode.typescript-language-features.i18n.json"
384
+ },
385
+ {
386
+ "id": "vscode.typescript",
387
+ "path": "./translations/extensions/vscode.typescript.i18n.json"
388
+ },
389
+ {
390
+ "id": "vscode.vb",
391
+ "path": "./translations/extensions/vscode.vb.i18n.json"
392
+ },
393
+ {
394
+ "id": "vscode.vscode-theme-seti",
395
+ "path": "./translations/extensions/vscode.vscode-theme-seti.i18n.json"
396
+ },
397
+ {
398
+ "id": "vscode.xml",
399
+ "path": "./translations/extensions/vscode.xml.i18n.json"
400
+ },
401
+ {
402
+ "id": "vscode.yaml",
403
+ "path": "./translations/extensions/vscode.yaml.i18n.json"
404
+ }
405
+ ]
406
+ }
407
+ ]
408
+ },
409
+ "scripts": {
410
+ "update": "cd ../vscode && npm run update-localization-extension zh-hans"
411
+ },
412
+ "__metadata": {
413
+ "installedTimestamp": 1784809928454,
414
+ "targetPlatform": "undefined",
415
+ "size": 2123788
416
+ }
417
+ }
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/readme.md ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 适用于 VS Code 的中文(简体)语言包
2
+
3
+ 此中文(简体)语言包为 VS Code 提供本地化界面。
4
+
5
+ ## 使用方法
6
+
7
+ 通过使用“Configure Display Language”命令显式设置 VS Code 显示语言,可以替代默认 UI 语言。
8
+ 按下“Ctrl+Shift+P”组合键以显示“命令面板”,然后键入“display”以筛选并显示“Configure Display Language”命令。按“Enter”,然后会按区域设置显示安装的语言列表,并突出显示当前语言设置。选择另一个“语言”以切换 UI 语言。
9
+ 请参阅[文档](https://go.microsoft.com/fwlink/?LinkId=761051)并获取更多信息。
10
+
11
+ ## 参与
12
+
13
+ 有关翻译改进的反馈,请在 [vscode-loc](https://github.com/microsoft/vscode-loc) 存储库中创建问题。
14
+ 翻译字符串在 Microsoft 本地化平台中维护。只能在 Microsoft 本地化平台中进行更改,然后才能导出到 vscode-loc 存储库。因此,vscode-loc 存储库中不接受拉取请求。
15
+
16
+ ## 许可证
17
+
18
+ 源代码和字符串使用[MIT](https://github.com/Microsoft/vscode-loc/blob/master/LICENSE.md)许可进行授权。
19
+
20
+ ## 感谢
21
+
22
+ 此中文(简体)语言包是“来自社区,奉献社区”的社区本地化工作的成果。
23
+
24
+ 特别感谢社区中每一位向这个项目做出贡献的朋友。
25
+
26
+ **杰出贡献者:**
27
+
28
+ * Joel Yang:在此项目向社区开放之后,翻译了大部分新增字符串。先后翻译了4万余字。
29
+ * Daniel Ye
30
+ * Neng Xue
31
+
32
+ **贡献者:**
33
+
34
+ * YF
35
+ * 陈嘉恺
36
+ * pluwen
37
+ * Shawn Dai
38
+ * Ying Feng
39
+ * Simon Chan
40
+ * 王子实
41
+ * 王韦煊
42
+ * 王旭晨
43
+ * Zijian Zhou
44
+ * wwj403
45
+ * Shizeng Zhou
46
+ * Aifen Qin
47
+ * lychichem
48
+ * Wang Dongcheng
49
+ * Yurui Zhang
50
+ * DongWei
51
+ * Bingxing Wang
52
+ * 林昊
53
+ * KingofCoding
54
+ * 潘冬冬
55
+ * 陈仁松
56
+ * Henry Chu
57
+ * Zhijian Zeng
58
+ * aimin guo
59
+ * 刘丁明
60
+ * hackereric
61
+ * Zou Jian
62
+ * Jianfeng Fang
63
+ * Ricky Wang
64
+ * Egg Zhang
65
+
66
+ **尽情享用吧!**
67
+
68
+ # Chinese (Simplified) Language Pack for VS Code
69
+
70
+ Chinese (Simplified) Language Pack provides localized UI experience for VS Code.
71
+
72
+ ## Usage
73
+
74
+ You can override the default UI language by explicitly setting the VS Code display language using the **Configure Display Language** command.
75
+
76
+ Press `Ctrl+Shift+P` to bring up the **Command Palette** then start typing `display` to filter and display the **Configure Display Language** command.
77
+
78
+ Press `Enter` and a list of installed languages by locale is displayed, with the current locale highlighted. Select another `locale` to switch UI language.
79
+
80
+ See [Docs](https://go.microsoft.com/fwlink/?LinkId=761051) for more information.
81
+
82
+ ## Contributing
83
+
84
+ For feedback of translation improvement, please create Issue in [vscode-loc](https://github.com/microsoft/vscode-loc) repo.
85
+
86
+ The translation strings are maintained in Microsoft Localization Platform. Change can only be made in Microsoft Localization Platform then export to vscode-loc repo. So pull request won't be accepted in vscode-loc repo.
87
+
88
+ ## License
89
+
90
+ The source code and strings are licensed under the [MIT](https://github.com/Microsoft/vscode-loc/blob/master/LICENSE.md) license.
91
+
92
+ ## Credits
93
+
94
+ Chinese (Simplified) Language Pack had received contribution through "By the community, for the community" community localization effort.
95
+
96
+ Special thanks to community contributors for making it available.
97
+
98
+ **Top Contributors:**
99
+
100
+ * Joel Yang: localized majority of the new translation volume since open the project to community. Total 40k words localized.
101
+
102
+ **Contributors:**
103
+
104
+ * YF
105
+ * 陈嘉恺
106
+ * pluwen
107
+ * Shawn Dai
108
+ * Ying Feng
109
+ * Simon Chan
110
+ * 王子实
111
+ * 王韦煊
112
+ * Zijian Zhou
113
+ * wwj403
114
+ * Shizeng Zhou
115
+ * Aifen Qin
116
+ * lychichem
117
+ * Wang Dongcheng
118
+ * Yurui Zhang
119
+ * DongWei
120
+ * Bingxing Wang
121
+ * 林昊
122
+ * KingofCoding
123
+ * 潘冬冬
124
+ * 陈仁松
125
+ * Henry Chu
126
+ * Zhijian Zeng
127
+ * aimin guo
128
+ * 刘丁明
129
+ * hackereric
130
+ * Zou Jian
131
+ * Jianfeng Fang
132
+ * Ricky Wang
133
+ * Egg Zhang
134
+
135
+ **Enjoy!**
home/.vscode-server/extensions/ms-ceintl.vscode-language-pack-zh-hans-1.130.2026072017/telemetry.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"commonProperties":{},"events":{}}
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/.flake8 ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [flake8]
2
+ ignore = W,BLK,
3
+ E24,E121,E123,E125,E126,E221,E226,E266,E704,
4
+ E265,E722,E501,E731,E306,E401,E302,E222,E303,
5
+ E402,E305,E261,E262,E203
6
+ exclude =
7
+ __pycache__,
8
+ .eggs,
9
+ .git,
10
+ .tox,
11
+ .nox,
12
+ build,
13
+ dist,
14
+ src/test/python_tests/test_data
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/.vsixmanifest ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3
+ <Metadata>
4
+ <Identity Language="en-US" Id="debugpy" Version="2026.6.0" Publisher="ms-python" TargetPlatform="linux-x64"/>
5
+ <DisplayName>Python Debugger</DisplayName>
6
+ <Description xml:space="preserve">Python Debugger extension using debugpy.</Description>
7
+ <Tags>python,debugger,debugpy,debuggers</Tags>
8
+ <Categories>Debuggers</Categories>
9
+ <GalleryFlags>Public</GalleryFlags>
10
+
11
+ <Properties>
12
+ <Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.92.0" />
13
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="ms-python.python" />
14
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
15
+ <Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace" />
16
+ <Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
17
+ <Property Id="Microsoft.VisualStudio.Code.EnabledApiProposals" Value="portsAttributes,debugVisualization,contribViewsWelcome" />
18
+
19
+ <Property Id="Microsoft.VisualStudio.Code.ExecutesCode" Value="true" />
20
+
21
+ <Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/microsoft/vscode-python-debugger.git" />
22
+ <Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/microsoft/vscode-python-debugger.git" />
23
+ <Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/microsoft/vscode-python-debugger.git" />
24
+ <Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/Microsoft/vscode-python-debugger/issues" />
25
+ <Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/Microsoft/vscode-python-debugger" />
26
+
27
+
28
+ <Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
29
+ <Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
30
+
31
+
32
+
33
+ </Properties>
34
+ <License>extension/LICENSE.txt</License>
35
+ <Icon>extension/icon.png</Icon>
36
+ </Metadata>
37
+ <Installation>
38
+ <InstallationTarget Id="Microsoft.VisualStudio.Code"/>
39
+ </Installation>
40
+ <Dependencies/>
41
+ <Assets>
42
+ <Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
43
+ <Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/readme.md" Addressable="true" />
44
+ <Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" />
45
+ <Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/icon.png" Addressable="true" />
46
+ </Assets>
47
+ </PackageManifest>
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/SECURITY.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->
2
+
3
+ ## Security
4
+
5
+ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
+
7
+ If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8
+
9
+ ## Reporting Security Issues
10
+
11
+ **Please do not report security vulnerabilities through public GitHub issues.**
12
+
13
+ Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14
+
15
+ If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16
+
17
+ You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18
+
19
+ Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
+
21
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
+ * Full paths of source file(s) related to the manifestation of the issue
23
+ * The location of the affected source code (tag/branch/commit or direct URL)
24
+ * Any special configuration required to reproduce the issue
25
+ * Step-by-step instructions to reproduce the issue
26
+ * Proof-of-concept or exploit code (if possible)
27
+ * Impact of the issue, including how an attacker might exploit the issue
28
+
29
+ This information will help us triage your report more quickly.
30
+
31
+ If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32
+
33
+ ## Preferred Languages
34
+
35
+ We prefer all communications to be in English.
36
+
37
+ ## Policy
38
+
39
+ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40
+
41
+ <!-- END MICROSOFT SECURITY.MD BLOCK -->
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/SUPPORT.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Support
2
+
3
+ ## How to file issues and get help
4
+
5
+ This project uses GitHub Issues to track bugs and feature requests. Please search the [existing issues](https://github.com/microsoft/vscode-python-debugger/issues) before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue.
6
+
7
+ For help and questions about using this project, please see the [python+visual-studio-code labels on Stack Overflow](https://stackoverflow.com/questions/tagged/visual-studio-code+python) or the `#vscode` channel on the [microsoft-python server on Discord](https://aka.ms/python-discord-invite).
8
+
9
+ ## Microsoft Support Policy
10
+
11
+ Support for this project is limited to the resources listed above.
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/component-detection-pip-report.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1",
3
+ "pip_version": "26.0.1",
4
+ "install": [],
5
+ "environment": {
6
+ "implementation_name": "cpython",
7
+ "implementation_version": "3.9.25",
8
+ "os_name": "posix",
9
+ "platform_machine": "x86_64",
10
+ "platform_release": "6.8.0-1044-azure",
11
+ "platform_system": "Linux",
12
+ "platform_version": "#50~22.04.1-Ubuntu SMP Wed Dec 3 15:13:22 UTC 2025",
13
+ "python_full_version": "3.9.25",
14
+ "platform_python_implementation": "CPython",
15
+ "python_version": "3.9",
16
+ "sys_platform": "linux"
17
+ }
18
+ }
home/.vscode-server/extensions/ms-python.debugpy-2026.6.0-linux-x64/contributing.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Getting Started
2
+
3
+ Follow the steps below for setup:
4
+ ```
5
+ git clone https://github.com/microsoft/vscode-python-debugger
6
+ cd vscode-python-debugger
7
+ npm ci
8
+ ```
9
+
10
+ Create virtual environment as appropriate for your shell or use the command `Python: Create Environment` in VS Code. Then activate it appropriate for your shell.
11
+ ```
12
+ python3 -m venv .venv
13
+ # Activate the virtual environment
14
+ # ".venv/Scripts/activate.bat"
15
+ # On bash/zsh it's ...
16
+ source .venv/bin/activate
17
+ ```
18
+
19
+ Install then setup with nox.
20
+ ```
21
+ python3 -m pip install nox
22
+ nox
23
+ ```
24
+
25
+ ## Reporting Issues
26
+
27
+ If you encounter any issues, please report them using the [GitHub Issues](https://github.com/microsoft/vscode-python-debugger/issues) page. Provide as much detail as possible, including steps to reproduce the issue and any relevant logs or screenshots. We also recommend using the Report Issue command in VS Code, selecting Python Debugger as the extension. This helps automatically attach crucial information.
28
+
29
+ ## Submitting Pull Requests
30
+
31
+ 1. Fork the repository and create your branch from `main`.
32
+ 2. If you've added code that should be tested, add tests.
33
+ 3. Ensure the test suite passes.
34
+ 4. Make sure your code passes linting and formatting requirements
35
+ 5. Submit a pull request.
36
+
37
+ ## Running Tests
38
+
39
+ To run tests, use the following commands:
40
+
41
+ ```
42
+ npm run compile-tests
43
+ npm run test
44
+ ```
45
+
46
+ Ensure all tests pass before submitting your pull request.
47
+
48
+ ## Coding Standards
49
+
50
+ This project follows the coding standards and guidelines from the [vscode-python](https://github.com/microsoft/vscode-python/wiki/Coding#guidelines) repository. Please ensure your code adheres to these standards.
51
+
52
+ ## Code Formatting & Linting
53
+
54
+ To check code formatting, run:
55
+
56
+ ```
57
+ npm run format-check
58
+ ```
59
+
60
+ To automatically fix formatting issues, run:
61
+
62
+ ```
63
+ npm run format-fix
64
+ ```
65
+
66
+ To lint your code, run:
67
+
68
+ ```
69
+ npm run lint
70
+ ```
71
+
72
+ Ensure there are no linting errors before submitting your pull request.
73
+
74
+ ## Python Code Linting and Formatting
75
+
76
+ For Python code, this project uses `ruff` for linting and formatting. To check your Python code for linting and formatting issues, run:
77
+
78
+ ```
79
+ ruff check .
80
+ ```
81
+
82
+ To automatically fix formatting issues, run:
83
+
84
+ ```
85
+ ruff --fix .
86
+ ```
87
+
88
+ Ensure there are no linting or formatting errors before submitting your pull request.
89
+