634 |
635 | This program is free software: you can redistribute it and/or modify
636 | it under the terms of the GNU Affero General Public License as published by
637 | the Free Software Foundation, either version 3 of the License, or
638 | (at your option) any later version.
639 |
640 | This program is distributed in the hope that it will be useful,
641 | but WITHOUT ANY WARRANTY; without even the implied warranty of
642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643 | GNU Affero General Public License for more details.
644 |
645 | You should have received a copy of the GNU Affero General Public License
646 | along with this program. If not, see .
647 |
648 | Also add information on how to contact you by electronic and paper mail.
649 |
650 | If your software can interact with users remotely through a computer
651 | network, you should also make sure that it provides a way for users to
652 | get its source. For example, if your program is a web application, its
653 | interface could display a "Source" link that leads users to an archive
654 | of the code. There are many ways you could offer source, and different
655 | solutions will be better for different programs; see section 13 for the
656 | specific requirements.
657 |
658 | You should also get your employer (if you work as a programmer) or school,
659 | if any, to sign a "copyright disclaimer" for the program, if necessary.
660 | For more information on this, and how to apply and follow the GNU AGPL, see
661 | .
662 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # loom(sidian)
2 |
3 | **READ THE README IF YOU PLAN TO USE THIS PLUGIN. IT IS USEFUL**
4 |
5 | This is a reimplementation of [Loom](https://github.com/socketteer/loom) as an Obsidian plugin, designed to be easier to use and more modular and extensible.
6 |
7 | Loom is a recursively branching interface to GPT-3 and other language models; it is designed to be conducive to exploratory and experimental use of base models. The workflow primarily consists of this: you hit `Ctrl+Space` from a point in the text, and Loom generates `n` child nodes of the current node, where each child contains a different completion of the text leading up to the cursor. This is paired with a tree interface and settings panel in the right sidebar, as well as a pane containing the full text of the current node and its siblings.
8 |
9 | Loom can request completions from the following providers: [Cohere](https://docs.cohere.ai/docs), [TextSynth](https://textsynth.com/documentation.html), [OpenAI](https://platform.openai.com/docs/introduction), and [Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/ai-services/openai). It can also request completions from implementations of [openai-cd2-proxy](https://github.com/cosmicoptima/openai-cd2-proxy), in which case you must provide the base URL in the Loom tab in Settings.
10 |
11 | If you are interested in funding this plugin's development, you can **[support me on Patreon](https://patreon.com/parafactual)**; I would then be able to devote more time to this and other independent projects.
12 |
13 | **If you are new to Obsidian:** if you want to see the tree interface, make sure to open the right sidebar using the button on the top right, or using `Ctrl+P` then `Toggle right sidebar`. Once you've done that, go to the Loom tab, which is signified by a network icon.
14 |
15 | **Default hotkeys:**
16 |
17 | - generate - `Ctrl+Space`
18 | - generate siblings - `Ctrl+Shift+Space`
19 | - split at point - `Alt+s`
20 | - split at point and create child - `Alt+c`
21 | - delete (current node) - `Alt+Backspace`
22 | - merge (current node) with parent - `Alt+m`
23 |
24 | Navigation:
25 | - switch to next sibling - `Alt+Down`
26 | - switch to previous sibling - `Alt+Up`
27 | - switch to parent - `Alt+Left`
28 | - switch to (most recently visited) child - `Alt+Right`
29 |
30 | In the editor:
31 | - `Shift+click` on the text corresponding to a node to switch to it
32 |
33 | **Loom can be installed in the Obsidian store.** If you don't want to do that:
34 |
35 | 1. Go to the latest release under the "Releases" subheading on the right
36 | 2. Download the zip file under "Assets"
37 | 3. Unzip the file you downloaded in `[path to vault]/.obsidian/plugins`, creating the `plugins` directory if necessary
38 | 4. Go to the "Community plugins" tab in Obsidian settings, then enable "Loom"
39 |
40 | Alternatively, you can build Loom from source:
41 |
42 | 1. Clone this repository (`git clone https://github.com/cosmicoptima/loom`) in `[path to vault]/.obsidian/plugins`, creating the `plugins` directory if necessary
43 | 2. Run the following: `cd loom; npm i; npm run build`
44 | 3. Go to the "Community plugins" tab in Obsidian settings, then enable "Loom"
45 | 4. To update, go to the repository and `git pull; npm i; npm run build`, then disable and re-enable Loom
46 |
47 | **If you are using MacOS:** a few hotkeys -- `Alt+s`, `Alt+c`, and `Alt+m` -- are bound to special characters. You can either:
48 |
49 | 1. Disable MacOS's special character shortcuts, as explained here: https://superuser.com/questions/941286/disable-default-option-key-binding
50 | 2. Rebind the Loom hotkeys you want to use in the Hotkeys tab in Settings
51 |
--------------------------------------------------------------------------------
/assets/loom_tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicoptima/loom/afbb3519f10d668d4688c68370d7b9305c9f80dc/assets/loom_tab.png
--------------------------------------------------------------------------------
/common.ts:
--------------------------------------------------------------------------------
1 | export const PROVIDERS = [
2 | "cohere",
3 | "textsynth",
4 | "openai-compat",
5 | "openai",
6 | "openai-chat",
7 | "azure",
8 | "azure-chat",
9 | "anthropic",
10 | "openrouter",
11 | ];
12 | export type Provider = (typeof PROVIDERS)[number];
13 |
14 | type ProviderProps = {
15 | openai: { organization: string };
16 | "openai-chat": { organization: string };
17 | "openai-compat": { url: string };
18 | azure: { url: string };
19 | "azure-chat": { url: string };
20 | anthropic: { url: string };
21 | openrouter: { quantization: string };
22 | };
23 |
24 | type SharedPresetSettings = {
25 | name: string;
26 |
27 | model: string;
28 | contextLength: number;
29 | apiKey: string;
30 | };
31 |
32 | export type ModelPreset = SharedPresetSettings &
33 | (P extends keyof ProviderProps ? ProviderProps[P] : {}) & { provider: P };
34 |
35 | export interface LoomSettings {
36 | passageFolder: string;
37 | defaultPassageSeparator: string;
38 | defaultPassageFrontmatter: string;
39 |
40 | logApiCalls: boolean;
41 |
42 | modelPresets: ModelPreset[];
43 | modelPreset: number;
44 |
45 | visibility: Record;
46 | maxTokens: number;
47 | temperature: number;
48 | topP: number;
49 | frequencyPenalty: number;
50 | presencePenalty: number;
51 | prepend: string;
52 | bestOf: number;
53 | n: number;
54 | systemPrompt: string;
55 | userMessage: string;
56 |
57 | showSettings: boolean;
58 | showSearchBar: boolean;
59 | showNodeBorders: boolean;
60 | showExport: boolean;
61 | }
62 |
63 | export const getPreset = (settings: LoomSettings) =>
64 | settings.modelPresets[settings.modelPreset];
65 |
66 | export type SearchResultState = "result" | "ancestor" | "none" | null;
67 |
68 | export interface Node {
69 | text: string;
70 | parentId: string | null;
71 | collapsed: boolean;
72 | unread: boolean;
73 | bookmarked: boolean;
74 | lastVisited?: number;
75 | searchResultState: SearchResultState;
76 | }
77 |
78 | export interface NoteState {
79 | current: string;
80 | hoisted: string[];
81 | searchTerm: string;
82 | nodes: Record;
83 | generating: string | null;
84 | }
85 |
--------------------------------------------------------------------------------
/esbuild.config.mjs:
--------------------------------------------------------------------------------
1 | import esbuild from "esbuild";
2 | import process from "process";
3 | import builtins from "builtin-modules";
4 |
5 | const banner =
6 | `/*
7 | THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
8 | if you want to view the source, please visit the github repository of this plugin
9 | */
10 | `;
11 |
12 | const prod = (process.argv[2] === "production");
13 |
14 | const context = await esbuild.context({
15 | banner: {
16 | js: banner,
17 | },
18 | entryPoints: ["main.ts"],
19 | bundle: true,
20 | external: [
21 | "obsidian",
22 | "electron",
23 | "@codemirror/autocomplete",
24 | "@codemirror/collab",
25 | "@codemirror/commands",
26 | "@codemirror/language",
27 | "@codemirror/lint",
28 | "@codemirror/search",
29 | "@codemirror/state",
30 | "@codemirror/view",
31 | "@lezer/common",
32 | "@lezer/highlight",
33 | "@lezer/lr",
34 | ...builtins],
35 | format: "cjs",
36 | target: "es2018",
37 | logLevel: "info",
38 | sourcemap: prod ? false : "inline",
39 | treeShaking: true,
40 | outfile: "main.js",
41 | });
42 |
43 | if (prod) {
44 | await context.rebuild();
45 | process.exit(0);
46 | } else {
47 | await context.watch();
48 | }
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "loom",
3 | "name": "Loom",
4 | "version": "1.22.6",
5 | "minAppVersion": "0.15.0",
6 | "description": "Loom in Obsidian",
7 | "author": "celeste",
8 | "authorUrl": "https://celeste.exposed",
9 | "fundingUrl": "https://www.patreon.com/parafactual",
10 | "isDesktopOnly": true
11 | }
12 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "obsidian-loom",
3 | "version": "1.21.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "obsidian-loom",
9 | "version": "1.21.0",
10 | "license": "MIT",
11 | "dependencies": {
12 | "@anthropic-ai/sdk": "^0.20.0",
13 | "@codemirror/state": "^6.2.0",
14 | "@codemirror/view": "^6.9.3",
15 | "@types/lodash": "^4.14.191",
16 | "@types/roman-numerals": "^0.3.0",
17 | "azure-openai": "^0.9.4",
18 | "cohere-ai": "^6.1.0",
19 | "gpt-tokenizer": "^2.1.1",
20 | "openai": "^3.2.0",
21 | "roman-numerals": "^0.3.2",
22 | "untildify": "^4.0.0",
23 | "uuid": "^9.0.0"
24 | },
25 | "devDependencies": {
26 | "@types/node": "^16.11.6",
27 | "@types/uuid": "^9.0.1",
28 | "@typescript-eslint/eslint-plugin": "^5.54.1",
29 | "@typescript-eslint/parser": "^5.54.1",
30 | "builtin-modules": "3.3.0",
31 | "esbuild": "0.17.3",
32 | "eslint": "^8.35.0",
33 | "obsidian": "latest",
34 | "tslib": "2.4.0",
35 | "typescript": "4.7.4"
36 | }
37 | },
38 | "node_modules/@anthropic-ai/sdk": {
39 | "version": "0.20.0",
40 | "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.20.0.tgz",
41 | "integrity": "sha512-VpkVetFHQ31cendkcAGnZo08yWDJeo4jPRRtsNEgVKoF+NkzZDVktGvK4ZB7mhPrUQlCcjd4DzjijiWnZ4qIog==",
42 | "dependencies": {
43 | "@types/node": "^18.11.18",
44 | "@types/node-fetch": "^2.6.4",
45 | "abort-controller": "^3.0.0",
46 | "agentkeepalive": "^4.2.1",
47 | "form-data-encoder": "1.7.2",
48 | "formdata-node": "^4.3.2",
49 | "node-fetch": "^2.6.7",
50 | "web-streams-polyfill": "^3.2.1"
51 | }
52 | },
53 | "node_modules/@anthropic-ai/sdk/node_modules/@types/node": {
54 | "version": "18.19.29",
55 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.29.tgz",
56 | "integrity": "sha512-5pAX7ggTmWZdhUrhRWLPf+5oM7F80bcKVCBbr0zwEkTNzTJL2CWQjznpFgHYy6GrzkYi2Yjy7DHKoynFxqPV8g==",
57 | "dependencies": {
58 | "undici-types": "~5.26.4"
59 | }
60 | },
61 | "node_modules/@codemirror/state": {
62 | "version": "6.2.0",
63 | "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.2.0.tgz",
64 | "integrity": "sha512-69QXtcrsc3RYtOtd+GsvczJ319udtBf1PTrr2KbLWM/e2CXUPnh0Nz9AUo8WfhSQ7GeL8dPVNUmhQVgpmuaNGA=="
65 | },
66 | "node_modules/@codemirror/view": {
67 | "version": "6.9.3",
68 | "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.9.3.tgz",
69 | "integrity": "sha512-BJ5mvEIhFM+SrNwc5X8pLIvMM9ffjkviVbxpg84Xk2OE8ZyKaEbId8kX+nAYEEso7+qnbwsXe1bkAHsasebMow==",
70 | "dependencies": {
71 | "@codemirror/state": "^6.1.4",
72 | "style-mod": "^4.0.0",
73 | "w3c-keyname": "^2.2.4"
74 | }
75 | },
76 | "node_modules/@esbuild/linux-arm64": {
77 | "version": "0.17.3",
78 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.3.tgz",
79 | "integrity": "sha512-JHeZXD4auLYBnrKn6JYJ0o5nWJI9PhChA/Nt0G4MvLaMrvXuWnY93R3a7PiXeJQphpL1nYsaMcoV2QtuvRnF/g==",
80 | "cpu": [
81 | "arm64"
82 | ],
83 | "dev": true,
84 | "optional": true,
85 | "os": [
86 | "linux"
87 | ],
88 | "engines": {
89 | "node": ">=12"
90 | }
91 | },
92 | "node_modules/@eslint/eslintrc": {
93 | "version": "2.0.0",
94 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz",
95 | "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==",
96 | "dev": true,
97 | "dependencies": {
98 | "ajv": "^6.12.4",
99 | "debug": "^4.3.2",
100 | "espree": "^9.4.0",
101 | "globals": "^13.19.0",
102 | "ignore": "^5.2.0",
103 | "import-fresh": "^3.2.1",
104 | "js-yaml": "^4.1.0",
105 | "minimatch": "^3.1.2",
106 | "strip-json-comments": "^3.1.1"
107 | },
108 | "engines": {
109 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
110 | },
111 | "funding": {
112 | "url": "https://opencollective.com/eslint"
113 | }
114 | },
115 | "node_modules/@eslint/js": {
116 | "version": "8.35.0",
117 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz",
118 | "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==",
119 | "dev": true,
120 | "engines": {
121 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
122 | }
123 | },
124 | "node_modules/@humanwhocodes/config-array": {
125 | "version": "0.11.8",
126 | "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
127 | "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
128 | "dev": true,
129 | "dependencies": {
130 | "@humanwhocodes/object-schema": "^1.2.1",
131 | "debug": "^4.1.1",
132 | "minimatch": "^3.0.5"
133 | },
134 | "engines": {
135 | "node": ">=10.10.0"
136 | }
137 | },
138 | "node_modules/@humanwhocodes/module-importer": {
139 | "version": "1.0.1",
140 | "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
141 | "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
142 | "dev": true,
143 | "engines": {
144 | "node": ">=12.22"
145 | },
146 | "funding": {
147 | "type": "github",
148 | "url": "https://github.com/sponsors/nzakas"
149 | }
150 | },
151 | "node_modules/@humanwhocodes/object-schema": {
152 | "version": "1.2.1",
153 | "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
154 | "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
155 | "dev": true
156 | },
157 | "node_modules/@nodelib/fs.scandir": {
158 | "version": "2.1.5",
159 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
160 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
161 | "dev": true,
162 | "dependencies": {
163 | "@nodelib/fs.stat": "2.0.5",
164 | "run-parallel": "^1.1.9"
165 | },
166 | "engines": {
167 | "node": ">= 8"
168 | }
169 | },
170 | "node_modules/@nodelib/fs.stat": {
171 | "version": "2.0.5",
172 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
173 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
174 | "dev": true,
175 | "engines": {
176 | "node": ">= 8"
177 | }
178 | },
179 | "node_modules/@nodelib/fs.walk": {
180 | "version": "1.2.8",
181 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
182 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
183 | "dev": true,
184 | "dependencies": {
185 | "@nodelib/fs.scandir": "2.1.5",
186 | "fastq": "^1.6.0"
187 | },
188 | "engines": {
189 | "node": ">= 8"
190 | }
191 | },
192 | "node_modules/@types/codemirror": {
193 | "version": "0.0.108",
194 | "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.108.tgz",
195 | "integrity": "sha512-3FGFcus0P7C2UOGCNUVENqObEb4SFk+S8Dnxq7K6aIsLVs/vDtlangl3PEO0ykaKXyK56swVF6Nho7VsA44uhw==",
196 | "dev": true,
197 | "dependencies": {
198 | "@types/tern": "*"
199 | }
200 | },
201 | "node_modules/@types/estree": {
202 | "version": "1.0.0",
203 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz",
204 | "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==",
205 | "dev": true
206 | },
207 | "node_modules/@types/json-schema": {
208 | "version": "7.0.11",
209 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
210 | "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
211 | "dev": true
212 | },
213 | "node_modules/@types/lodash": {
214 | "version": "4.14.191",
215 | "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
216 | "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ=="
217 | },
218 | "node_modules/@types/node": {
219 | "version": "16.18.12",
220 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.12.tgz",
221 | "integrity": "sha512-vzLe5NaNMjIE3mcddFVGlAXN1LEWueUsMsOJWaT6wWMJGyljHAWHznqfnKUQWGzu7TLPrGvWdNAsvQYW+C0xtw=="
222 | },
223 | "node_modules/@types/node-fetch": {
224 | "version": "2.6.11",
225 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",
226 | "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==",
227 | "dependencies": {
228 | "@types/node": "*",
229 | "form-data": "^4.0.0"
230 | }
231 | },
232 | "node_modules/@types/roman-numerals": {
233 | "version": "0.3.0",
234 | "resolved": "https://registry.npmjs.org/@types/roman-numerals/-/roman-numerals-0.3.0.tgz",
235 | "integrity": "sha512-sfO4vwDEH5hpm9GHQMkcJaRUWgcrlgJn9YLQv+6l9JBQk+Xe4nx9zfbHgS+3x1sMwZUnFc0sgTY0eAHr9Foqhw=="
236 | },
237 | "node_modules/@types/semver": {
238 | "version": "7.3.13",
239 | "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz",
240 | "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==",
241 | "dev": true
242 | },
243 | "node_modules/@types/tern": {
244 | "version": "0.23.4",
245 | "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz",
246 | "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==",
247 | "dev": true,
248 | "dependencies": {
249 | "@types/estree": "*"
250 | }
251 | },
252 | "node_modules/@types/uuid": {
253 | "version": "9.0.1",
254 | "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz",
255 | "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==",
256 | "dev": true
257 | },
258 | "node_modules/@typescript-eslint/eslint-plugin": {
259 | "version": "5.54.1",
260 | "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.1.tgz",
261 | "integrity": "sha512-a2RQAkosH3d3ZIV08s3DcL/mcGc2M/UC528VkPULFxR9VnVPT8pBu0IyBAJJmVsCmhVfwQX1v6q+QGnmSe1bew==",
262 | "dev": true,
263 | "dependencies": {
264 | "@typescript-eslint/scope-manager": "5.54.1",
265 | "@typescript-eslint/type-utils": "5.54.1",
266 | "@typescript-eslint/utils": "5.54.1",
267 | "debug": "^4.3.4",
268 | "grapheme-splitter": "^1.0.4",
269 | "ignore": "^5.2.0",
270 | "natural-compare-lite": "^1.4.0",
271 | "regexpp": "^3.2.0",
272 | "semver": "^7.3.7",
273 | "tsutils": "^3.21.0"
274 | },
275 | "engines": {
276 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
277 | },
278 | "funding": {
279 | "type": "opencollective",
280 | "url": "https://opencollective.com/typescript-eslint"
281 | },
282 | "peerDependencies": {
283 | "@typescript-eslint/parser": "^5.0.0",
284 | "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
285 | },
286 | "peerDependenciesMeta": {
287 | "typescript": {
288 | "optional": true
289 | }
290 | }
291 | },
292 | "node_modules/@typescript-eslint/parser": {
293 | "version": "5.54.1",
294 | "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.54.1.tgz",
295 | "integrity": "sha512-8zaIXJp/nG9Ff9vQNh7TI+C3nA6q6iIsGJ4B4L6MhZ7mHnTMR4YP5vp2xydmFXIy8rpyIVbNAG44871LMt6ujg==",
296 | "dev": true,
297 | "dependencies": {
298 | "@typescript-eslint/scope-manager": "5.54.1",
299 | "@typescript-eslint/types": "5.54.1",
300 | "@typescript-eslint/typescript-estree": "5.54.1",
301 | "debug": "^4.3.4"
302 | },
303 | "engines": {
304 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
305 | },
306 | "funding": {
307 | "type": "opencollective",
308 | "url": "https://opencollective.com/typescript-eslint"
309 | },
310 | "peerDependencies": {
311 | "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
312 | },
313 | "peerDependenciesMeta": {
314 | "typescript": {
315 | "optional": true
316 | }
317 | }
318 | },
319 | "node_modules/@typescript-eslint/scope-manager": {
320 | "version": "5.54.1",
321 | "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.1.tgz",
322 | "integrity": "sha512-zWKuGliXxvuxyM71UA/EcPxaviw39dB2504LqAmFDjmkpO8qNLHcmzlh6pbHs1h/7YQ9bnsO8CCcYCSA8sykUg==",
323 | "dev": true,
324 | "dependencies": {
325 | "@typescript-eslint/types": "5.54.1",
326 | "@typescript-eslint/visitor-keys": "5.54.1"
327 | },
328 | "engines": {
329 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
330 | },
331 | "funding": {
332 | "type": "opencollective",
333 | "url": "https://opencollective.com/typescript-eslint"
334 | }
335 | },
336 | "node_modules/@typescript-eslint/type-utils": {
337 | "version": "5.54.1",
338 | "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.1.tgz",
339 | "integrity": "sha512-WREHsTz0GqVYLIbzIZYbmUUr95DKEKIXZNH57W3s+4bVnuF1TKe2jH8ZNH8rO1CeMY3U4j4UQeqPNkHMiGem3g==",
340 | "dev": true,
341 | "dependencies": {
342 | "@typescript-eslint/typescript-estree": "5.54.1",
343 | "@typescript-eslint/utils": "5.54.1",
344 | "debug": "^4.3.4",
345 | "tsutils": "^3.21.0"
346 | },
347 | "engines": {
348 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
349 | },
350 | "funding": {
351 | "type": "opencollective",
352 | "url": "https://opencollective.com/typescript-eslint"
353 | },
354 | "peerDependencies": {
355 | "eslint": "*"
356 | },
357 | "peerDependenciesMeta": {
358 | "typescript": {
359 | "optional": true
360 | }
361 | }
362 | },
363 | "node_modules/@typescript-eslint/types": {
364 | "version": "5.54.1",
365 | "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz",
366 | "integrity": "sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==",
367 | "dev": true,
368 | "engines": {
369 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
370 | },
371 | "funding": {
372 | "type": "opencollective",
373 | "url": "https://opencollective.com/typescript-eslint"
374 | }
375 | },
376 | "node_modules/@typescript-eslint/typescript-estree": {
377 | "version": "5.54.1",
378 | "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz",
379 | "integrity": "sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==",
380 | "dev": true,
381 | "dependencies": {
382 | "@typescript-eslint/types": "5.54.1",
383 | "@typescript-eslint/visitor-keys": "5.54.1",
384 | "debug": "^4.3.4",
385 | "globby": "^11.1.0",
386 | "is-glob": "^4.0.3",
387 | "semver": "^7.3.7",
388 | "tsutils": "^3.21.0"
389 | },
390 | "engines": {
391 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
392 | },
393 | "funding": {
394 | "type": "opencollective",
395 | "url": "https://opencollective.com/typescript-eslint"
396 | },
397 | "peerDependenciesMeta": {
398 | "typescript": {
399 | "optional": true
400 | }
401 | }
402 | },
403 | "node_modules/@typescript-eslint/utils": {
404 | "version": "5.54.1",
405 | "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.1.tgz",
406 | "integrity": "sha512-IY5dyQM8XD1zfDe5X8jegX6r2EVU5o/WJnLu/znLPWCBF7KNGC+adacXnt5jEYS9JixDcoccI6CvE4RCjHMzCQ==",
407 | "dev": true,
408 | "dependencies": {
409 | "@types/json-schema": "^7.0.9",
410 | "@types/semver": "^7.3.12",
411 | "@typescript-eslint/scope-manager": "5.54.1",
412 | "@typescript-eslint/types": "5.54.1",
413 | "@typescript-eslint/typescript-estree": "5.54.1",
414 | "eslint-scope": "^5.1.1",
415 | "eslint-utils": "^3.0.0",
416 | "semver": "^7.3.7"
417 | },
418 | "engines": {
419 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
420 | },
421 | "funding": {
422 | "type": "opencollective",
423 | "url": "https://opencollective.com/typescript-eslint"
424 | },
425 | "peerDependencies": {
426 | "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
427 | }
428 | },
429 | "node_modules/@typescript-eslint/visitor-keys": {
430 | "version": "5.54.1",
431 | "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz",
432 | "integrity": "sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg==",
433 | "dev": true,
434 | "dependencies": {
435 | "@typescript-eslint/types": "5.54.1",
436 | "eslint-visitor-keys": "^3.3.0"
437 | },
438 | "engines": {
439 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
440 | },
441 | "funding": {
442 | "type": "opencollective",
443 | "url": "https://opencollective.com/typescript-eslint"
444 | }
445 | },
446 | "node_modules/abort-controller": {
447 | "version": "3.0.0",
448 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
449 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
450 | "dependencies": {
451 | "event-target-shim": "^5.0.0"
452 | },
453 | "engines": {
454 | "node": ">=6.5"
455 | }
456 | },
457 | "node_modules/acorn": {
458 | "version": "8.8.2",
459 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
460 | "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
461 | "dev": true,
462 | "bin": {
463 | "acorn": "bin/acorn"
464 | },
465 | "engines": {
466 | "node": ">=0.4.0"
467 | }
468 | },
469 | "node_modules/acorn-jsx": {
470 | "version": "5.3.2",
471 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
472 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
473 | "dev": true,
474 | "peerDependencies": {
475 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
476 | }
477 | },
478 | "node_modules/agentkeepalive": {
479 | "version": "4.5.0",
480 | "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
481 | "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
482 | "dependencies": {
483 | "humanize-ms": "^1.2.1"
484 | },
485 | "engines": {
486 | "node": ">= 8.0.0"
487 | }
488 | },
489 | "node_modules/ajv": {
490 | "version": "6.12.6",
491 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
492 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
493 | "dev": true,
494 | "dependencies": {
495 | "fast-deep-equal": "^3.1.1",
496 | "fast-json-stable-stringify": "^2.0.0",
497 | "json-schema-traverse": "^0.4.1",
498 | "uri-js": "^4.2.2"
499 | },
500 | "funding": {
501 | "type": "github",
502 | "url": "https://github.com/sponsors/epoberezkin"
503 | }
504 | },
505 | "node_modules/ansi-regex": {
506 | "version": "5.0.1",
507 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
508 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
509 | "dev": true,
510 | "engines": {
511 | "node": ">=8"
512 | }
513 | },
514 | "node_modules/ansi-styles": {
515 | "version": "4.3.0",
516 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
517 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
518 | "dev": true,
519 | "dependencies": {
520 | "color-convert": "^2.0.1"
521 | },
522 | "engines": {
523 | "node": ">=8"
524 | },
525 | "funding": {
526 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
527 | }
528 | },
529 | "node_modules/argparse": {
530 | "version": "2.0.1",
531 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
532 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
533 | "dev": true
534 | },
535 | "node_modules/array-union": {
536 | "version": "2.1.0",
537 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
538 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
539 | "dev": true,
540 | "engines": {
541 | "node": ">=8"
542 | }
543 | },
544 | "node_modules/asynckit": {
545 | "version": "0.4.0",
546 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
547 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
548 | },
549 | "node_modules/axios": {
550 | "version": "0.26.1",
551 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
552 | "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
553 | "dependencies": {
554 | "follow-redirects": "^1.14.8"
555 | }
556 | },
557 | "node_modules/azure-openai": {
558 | "version": "0.9.4",
559 | "resolved": "https://registry.npmjs.org/azure-openai/-/azure-openai-0.9.4.tgz",
560 | "integrity": "sha512-7uii4ZInxzu2zjLg45PdvgOaw3ps18tEAw0Yux9mo8anX4PwnCMSS9xdlKNiNQyyEKPogvAcxH2PIufHXFLx6Q==",
561 | "dependencies": {
562 | "axios": "^0.26.0",
563 | "form-data": "^4.0.0"
564 | }
565 | },
566 | "node_modules/balanced-match": {
567 | "version": "1.0.2",
568 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
569 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
570 | "dev": true
571 | },
572 | "node_modules/brace-expansion": {
573 | "version": "1.1.11",
574 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
575 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
576 | "dev": true,
577 | "dependencies": {
578 | "balanced-match": "^1.0.0",
579 | "concat-map": "0.0.1"
580 | }
581 | },
582 | "node_modules/braces": {
583 | "version": "3.0.2",
584 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
585 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
586 | "dev": true,
587 | "dependencies": {
588 | "fill-range": "^7.0.1"
589 | },
590 | "engines": {
591 | "node": ">=8"
592 | }
593 | },
594 | "node_modules/builtin-modules": {
595 | "version": "3.3.0",
596 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
597 | "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
598 | "dev": true,
599 | "engines": {
600 | "node": ">=6"
601 | },
602 | "funding": {
603 | "url": "https://github.com/sponsors/sindresorhus"
604 | }
605 | },
606 | "node_modules/callsites": {
607 | "version": "3.1.0",
608 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
609 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
610 | "dev": true,
611 | "engines": {
612 | "node": ">=6"
613 | }
614 | },
615 | "node_modules/chalk": {
616 | "version": "4.1.2",
617 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
618 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
619 | "dev": true,
620 | "dependencies": {
621 | "ansi-styles": "^4.1.0",
622 | "supports-color": "^7.1.0"
623 | },
624 | "engines": {
625 | "node": ">=10"
626 | },
627 | "funding": {
628 | "url": "https://github.com/chalk/chalk?sponsor=1"
629 | }
630 | },
631 | "node_modules/cohere-ai": {
632 | "version": "6.1.0",
633 | "resolved": "https://registry.npmjs.org/cohere-ai/-/cohere-ai-6.1.0.tgz",
634 | "integrity": "sha512-1hx13cEB0QqxkW213JhAOw8Q2jzCeo6GUFSQ5lsOQPNtDFhSZZusTD/+DcAvd8IVw2y/Cm+pfK3tofPngVG3BA=="
635 | },
636 | "node_modules/color-convert": {
637 | "version": "2.0.1",
638 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
639 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
640 | "dev": true,
641 | "dependencies": {
642 | "color-name": "~1.1.4"
643 | },
644 | "engines": {
645 | "node": ">=7.0.0"
646 | }
647 | },
648 | "node_modules/color-name": {
649 | "version": "1.1.4",
650 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
651 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
652 | "dev": true
653 | },
654 | "node_modules/combined-stream": {
655 | "version": "1.0.8",
656 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
657 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
658 | "dependencies": {
659 | "delayed-stream": "~1.0.0"
660 | },
661 | "engines": {
662 | "node": ">= 0.8"
663 | }
664 | },
665 | "node_modules/concat-map": {
666 | "version": "0.0.1",
667 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
668 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
669 | "dev": true
670 | },
671 | "node_modules/cross-spawn": {
672 | "version": "7.0.3",
673 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
674 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
675 | "dev": true,
676 | "dependencies": {
677 | "path-key": "^3.1.0",
678 | "shebang-command": "^2.0.0",
679 | "which": "^2.0.1"
680 | },
681 | "engines": {
682 | "node": ">= 8"
683 | }
684 | },
685 | "node_modules/debug": {
686 | "version": "4.3.4",
687 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
688 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
689 | "dev": true,
690 | "dependencies": {
691 | "ms": "2.1.2"
692 | },
693 | "engines": {
694 | "node": ">=6.0"
695 | },
696 | "peerDependenciesMeta": {
697 | "supports-color": {
698 | "optional": true
699 | }
700 | }
701 | },
702 | "node_modules/deep-is": {
703 | "version": "0.1.4",
704 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
705 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
706 | "dev": true
707 | },
708 | "node_modules/delayed-stream": {
709 | "version": "1.0.0",
710 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
711 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
712 | "engines": {
713 | "node": ">=0.4.0"
714 | }
715 | },
716 | "node_modules/dir-glob": {
717 | "version": "3.0.1",
718 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
719 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
720 | "dev": true,
721 | "dependencies": {
722 | "path-type": "^4.0.0"
723 | },
724 | "engines": {
725 | "node": ">=8"
726 | }
727 | },
728 | "node_modules/doctrine": {
729 | "version": "3.0.0",
730 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
731 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
732 | "dev": true,
733 | "dependencies": {
734 | "esutils": "^2.0.2"
735 | },
736 | "engines": {
737 | "node": ">=6.0.0"
738 | }
739 | },
740 | "node_modules/esbuild": {
741 | "version": "0.17.3",
742 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.3.tgz",
743 | "integrity": "sha512-9n3AsBRe6sIyOc6kmoXg2ypCLgf3eZSraWFRpnkto+svt8cZNuKTkb1bhQcitBcvIqjNiK7K0J3KPmwGSfkA8g==",
744 | "dev": true,
745 | "hasInstallScript": true,
746 | "bin": {
747 | "esbuild": "bin/esbuild"
748 | },
749 | "engines": {
750 | "node": ">=12"
751 | },
752 | "optionalDependencies": {
753 | "@esbuild/android-arm": "0.17.3",
754 | "@esbuild/android-arm64": "0.17.3",
755 | "@esbuild/android-x64": "0.17.3",
756 | "@esbuild/darwin-arm64": "0.17.3",
757 | "@esbuild/darwin-x64": "0.17.3",
758 | "@esbuild/freebsd-arm64": "0.17.3",
759 | "@esbuild/freebsd-x64": "0.17.3",
760 | "@esbuild/linux-arm": "0.17.3",
761 | "@esbuild/linux-arm64": "0.17.3",
762 | "@esbuild/linux-ia32": "0.17.3",
763 | "@esbuild/linux-loong64": "0.17.3",
764 | "@esbuild/linux-mips64el": "0.17.3",
765 | "@esbuild/linux-ppc64": "0.17.3",
766 | "@esbuild/linux-riscv64": "0.17.3",
767 | "@esbuild/linux-s390x": "0.17.3",
768 | "@esbuild/linux-x64": "0.17.3",
769 | "@esbuild/netbsd-x64": "0.17.3",
770 | "@esbuild/openbsd-x64": "0.17.3",
771 | "@esbuild/sunos-x64": "0.17.3",
772 | "@esbuild/win32-arm64": "0.17.3",
773 | "@esbuild/win32-ia32": "0.17.3",
774 | "@esbuild/win32-x64": "0.17.3"
775 | }
776 | },
777 | "node_modules/escape-string-regexp": {
778 | "version": "4.0.0",
779 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
780 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
781 | "dev": true,
782 | "engines": {
783 | "node": ">=10"
784 | },
785 | "funding": {
786 | "url": "https://github.com/sponsors/sindresorhus"
787 | }
788 | },
789 | "node_modules/eslint": {
790 | "version": "8.35.0",
791 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz",
792 | "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==",
793 | "dev": true,
794 | "dependencies": {
795 | "@eslint/eslintrc": "^2.0.0",
796 | "@eslint/js": "8.35.0",
797 | "@humanwhocodes/config-array": "^0.11.8",
798 | "@humanwhocodes/module-importer": "^1.0.1",
799 | "@nodelib/fs.walk": "^1.2.8",
800 | "ajv": "^6.10.0",
801 | "chalk": "^4.0.0",
802 | "cross-spawn": "^7.0.2",
803 | "debug": "^4.3.2",
804 | "doctrine": "^3.0.0",
805 | "escape-string-regexp": "^4.0.0",
806 | "eslint-scope": "^7.1.1",
807 | "eslint-utils": "^3.0.0",
808 | "eslint-visitor-keys": "^3.3.0",
809 | "espree": "^9.4.0",
810 | "esquery": "^1.4.2",
811 | "esutils": "^2.0.2",
812 | "fast-deep-equal": "^3.1.3",
813 | "file-entry-cache": "^6.0.1",
814 | "find-up": "^5.0.0",
815 | "glob-parent": "^6.0.2",
816 | "globals": "^13.19.0",
817 | "grapheme-splitter": "^1.0.4",
818 | "ignore": "^5.2.0",
819 | "import-fresh": "^3.0.0",
820 | "imurmurhash": "^0.1.4",
821 | "is-glob": "^4.0.0",
822 | "is-path-inside": "^3.0.3",
823 | "js-sdsl": "^4.1.4",
824 | "js-yaml": "^4.1.0",
825 | "json-stable-stringify-without-jsonify": "^1.0.1",
826 | "levn": "^0.4.1",
827 | "lodash.merge": "^4.6.2",
828 | "minimatch": "^3.1.2",
829 | "natural-compare": "^1.4.0",
830 | "optionator": "^0.9.1",
831 | "regexpp": "^3.2.0",
832 | "strip-ansi": "^6.0.1",
833 | "strip-json-comments": "^3.1.0",
834 | "text-table": "^0.2.0"
835 | },
836 | "bin": {
837 | "eslint": "bin/eslint.js"
838 | },
839 | "engines": {
840 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
841 | },
842 | "funding": {
843 | "url": "https://opencollective.com/eslint"
844 | }
845 | },
846 | "node_modules/eslint-scope": {
847 | "version": "5.1.1",
848 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
849 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
850 | "dev": true,
851 | "dependencies": {
852 | "esrecurse": "^4.3.0",
853 | "estraverse": "^4.1.1"
854 | },
855 | "engines": {
856 | "node": ">=8.0.0"
857 | }
858 | },
859 | "node_modules/eslint-utils": {
860 | "version": "3.0.0",
861 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
862 | "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
863 | "dev": true,
864 | "dependencies": {
865 | "eslint-visitor-keys": "^2.0.0"
866 | },
867 | "engines": {
868 | "node": "^10.0.0 || ^12.0.0 || >= 14.0.0"
869 | },
870 | "funding": {
871 | "url": "https://github.com/sponsors/mysticatea"
872 | },
873 | "peerDependencies": {
874 | "eslint": ">=5"
875 | }
876 | },
877 | "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
878 | "version": "2.1.0",
879 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
880 | "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
881 | "dev": true,
882 | "engines": {
883 | "node": ">=10"
884 | }
885 | },
886 | "node_modules/eslint-visitor-keys": {
887 | "version": "3.3.0",
888 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
889 | "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
890 | "dev": true,
891 | "engines": {
892 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
893 | }
894 | },
895 | "node_modules/eslint/node_modules/eslint-scope": {
896 | "version": "7.1.1",
897 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
898 | "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
899 | "dev": true,
900 | "dependencies": {
901 | "esrecurse": "^4.3.0",
902 | "estraverse": "^5.2.0"
903 | },
904 | "engines": {
905 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
906 | }
907 | },
908 | "node_modules/eslint/node_modules/estraverse": {
909 | "version": "5.3.0",
910 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
911 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
912 | "dev": true,
913 | "engines": {
914 | "node": ">=4.0"
915 | }
916 | },
917 | "node_modules/espree": {
918 | "version": "9.4.1",
919 | "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
920 | "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
921 | "dev": true,
922 | "dependencies": {
923 | "acorn": "^8.8.0",
924 | "acorn-jsx": "^5.3.2",
925 | "eslint-visitor-keys": "^3.3.0"
926 | },
927 | "engines": {
928 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
929 | },
930 | "funding": {
931 | "url": "https://opencollective.com/eslint"
932 | }
933 | },
934 | "node_modules/esquery": {
935 | "version": "1.4.2",
936 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
937 | "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
938 | "dev": true,
939 | "dependencies": {
940 | "estraverse": "^5.1.0"
941 | },
942 | "engines": {
943 | "node": ">=0.10"
944 | }
945 | },
946 | "node_modules/esquery/node_modules/estraverse": {
947 | "version": "5.3.0",
948 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
949 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
950 | "dev": true,
951 | "engines": {
952 | "node": ">=4.0"
953 | }
954 | },
955 | "node_modules/esrecurse": {
956 | "version": "4.3.0",
957 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
958 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
959 | "dev": true,
960 | "dependencies": {
961 | "estraverse": "^5.2.0"
962 | },
963 | "engines": {
964 | "node": ">=4.0"
965 | }
966 | },
967 | "node_modules/esrecurse/node_modules/estraverse": {
968 | "version": "5.3.0",
969 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
970 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
971 | "dev": true,
972 | "engines": {
973 | "node": ">=4.0"
974 | }
975 | },
976 | "node_modules/estraverse": {
977 | "version": "4.3.0",
978 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
979 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
980 | "dev": true,
981 | "engines": {
982 | "node": ">=4.0"
983 | }
984 | },
985 | "node_modules/esutils": {
986 | "version": "2.0.3",
987 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
988 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
989 | "dev": true,
990 | "engines": {
991 | "node": ">=0.10.0"
992 | }
993 | },
994 | "node_modules/event-target-shim": {
995 | "version": "5.0.1",
996 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
997 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
998 | "engines": {
999 | "node": ">=6"
1000 | }
1001 | },
1002 | "node_modules/fast-deep-equal": {
1003 | "version": "3.1.3",
1004 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
1005 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
1006 | "dev": true
1007 | },
1008 | "node_modules/fast-glob": {
1009 | "version": "3.2.12",
1010 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
1011 | "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
1012 | "dev": true,
1013 | "dependencies": {
1014 | "@nodelib/fs.stat": "^2.0.2",
1015 | "@nodelib/fs.walk": "^1.2.3",
1016 | "glob-parent": "^5.1.2",
1017 | "merge2": "^1.3.0",
1018 | "micromatch": "^4.0.4"
1019 | },
1020 | "engines": {
1021 | "node": ">=8.6.0"
1022 | }
1023 | },
1024 | "node_modules/fast-glob/node_modules/glob-parent": {
1025 | "version": "5.1.2",
1026 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
1027 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
1028 | "dev": true,
1029 | "dependencies": {
1030 | "is-glob": "^4.0.1"
1031 | },
1032 | "engines": {
1033 | "node": ">= 6"
1034 | }
1035 | },
1036 | "node_modules/fast-json-stable-stringify": {
1037 | "version": "2.1.0",
1038 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
1039 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
1040 | "dev": true
1041 | },
1042 | "node_modules/fast-levenshtein": {
1043 | "version": "2.0.6",
1044 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
1045 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
1046 | "dev": true
1047 | },
1048 | "node_modules/fastq": {
1049 | "version": "1.15.0",
1050 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
1051 | "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
1052 | "dev": true,
1053 | "dependencies": {
1054 | "reusify": "^1.0.4"
1055 | }
1056 | },
1057 | "node_modules/file-entry-cache": {
1058 | "version": "6.0.1",
1059 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
1060 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
1061 | "dev": true,
1062 | "dependencies": {
1063 | "flat-cache": "^3.0.4"
1064 | },
1065 | "engines": {
1066 | "node": "^10.12.0 || >=12.0.0"
1067 | }
1068 | },
1069 | "node_modules/fill-range": {
1070 | "version": "7.0.1",
1071 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
1072 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
1073 | "dev": true,
1074 | "dependencies": {
1075 | "to-regex-range": "^5.0.1"
1076 | },
1077 | "engines": {
1078 | "node": ">=8"
1079 | }
1080 | },
1081 | "node_modules/find-up": {
1082 | "version": "5.0.0",
1083 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
1084 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
1085 | "dev": true,
1086 | "dependencies": {
1087 | "locate-path": "^6.0.0",
1088 | "path-exists": "^4.0.0"
1089 | },
1090 | "engines": {
1091 | "node": ">=10"
1092 | },
1093 | "funding": {
1094 | "url": "https://github.com/sponsors/sindresorhus"
1095 | }
1096 | },
1097 | "node_modules/flat-cache": {
1098 | "version": "3.0.4",
1099 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
1100 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
1101 | "dev": true,
1102 | "dependencies": {
1103 | "flatted": "^3.1.0",
1104 | "rimraf": "^3.0.2"
1105 | },
1106 | "engines": {
1107 | "node": "^10.12.0 || >=12.0.0"
1108 | }
1109 | },
1110 | "node_modules/flatted": {
1111 | "version": "3.2.7",
1112 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz",
1113 | "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
1114 | "dev": true
1115 | },
1116 | "node_modules/follow-redirects": {
1117 | "version": "1.15.2",
1118 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
1119 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
1120 | "funding": [
1121 | {
1122 | "type": "individual",
1123 | "url": "https://github.com/sponsors/RubenVerborgh"
1124 | }
1125 | ],
1126 | "engines": {
1127 | "node": ">=4.0"
1128 | },
1129 | "peerDependenciesMeta": {
1130 | "debug": {
1131 | "optional": true
1132 | }
1133 | }
1134 | },
1135 | "node_modules/form-data": {
1136 | "version": "4.0.0",
1137 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
1138 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
1139 | "dependencies": {
1140 | "asynckit": "^0.4.0",
1141 | "combined-stream": "^1.0.8",
1142 | "mime-types": "^2.1.12"
1143 | },
1144 | "engines": {
1145 | "node": ">= 6"
1146 | }
1147 | },
1148 | "node_modules/form-data-encoder": {
1149 | "version": "1.7.2",
1150 | "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
1151 | "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A=="
1152 | },
1153 | "node_modules/formdata-node": {
1154 | "version": "4.4.1",
1155 | "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
1156 | "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
1157 | "dependencies": {
1158 | "node-domexception": "1.0.0",
1159 | "web-streams-polyfill": "4.0.0-beta.3"
1160 | },
1161 | "engines": {
1162 | "node": ">= 12.20"
1163 | }
1164 | },
1165 | "node_modules/formdata-node/node_modules/web-streams-polyfill": {
1166 | "version": "4.0.0-beta.3",
1167 | "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
1168 | "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
1169 | "engines": {
1170 | "node": ">= 14"
1171 | }
1172 | },
1173 | "node_modules/fs.realpath": {
1174 | "version": "1.0.0",
1175 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1176 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
1177 | "dev": true
1178 | },
1179 | "node_modules/glob": {
1180 | "version": "7.2.3",
1181 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
1182 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
1183 | "dev": true,
1184 | "dependencies": {
1185 | "fs.realpath": "^1.0.0",
1186 | "inflight": "^1.0.4",
1187 | "inherits": "2",
1188 | "minimatch": "^3.1.1",
1189 | "once": "^1.3.0",
1190 | "path-is-absolute": "^1.0.0"
1191 | },
1192 | "engines": {
1193 | "node": "*"
1194 | },
1195 | "funding": {
1196 | "url": "https://github.com/sponsors/isaacs"
1197 | }
1198 | },
1199 | "node_modules/glob-parent": {
1200 | "version": "6.0.2",
1201 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
1202 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
1203 | "dev": true,
1204 | "dependencies": {
1205 | "is-glob": "^4.0.3"
1206 | },
1207 | "engines": {
1208 | "node": ">=10.13.0"
1209 | }
1210 | },
1211 | "node_modules/globals": {
1212 | "version": "13.20.0",
1213 | "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
1214 | "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
1215 | "dev": true,
1216 | "dependencies": {
1217 | "type-fest": "^0.20.2"
1218 | },
1219 | "engines": {
1220 | "node": ">=8"
1221 | },
1222 | "funding": {
1223 | "url": "https://github.com/sponsors/sindresorhus"
1224 | }
1225 | },
1226 | "node_modules/globby": {
1227 | "version": "11.1.0",
1228 | "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
1229 | "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
1230 | "dev": true,
1231 | "dependencies": {
1232 | "array-union": "^2.1.0",
1233 | "dir-glob": "^3.0.1",
1234 | "fast-glob": "^3.2.9",
1235 | "ignore": "^5.2.0",
1236 | "merge2": "^1.4.1",
1237 | "slash": "^3.0.0"
1238 | },
1239 | "engines": {
1240 | "node": ">=10"
1241 | },
1242 | "funding": {
1243 | "url": "https://github.com/sponsors/sindresorhus"
1244 | }
1245 | },
1246 | "node_modules/gpt-tokenizer": {
1247 | "version": "2.1.1",
1248 | "resolved": "https://registry.npmjs.org/gpt-tokenizer/-/gpt-tokenizer-2.1.1.tgz",
1249 | "integrity": "sha512-WlX+vj6aPaZ71U6Bf18fem+5k58zlgh2a4nbc7KHy6aGVIyq3nCh709b/8momu34sV/5t/SpzWi8LayWD9uyDw==",
1250 | "dependencies": {
1251 | "rfc4648": "^1.5.2"
1252 | }
1253 | },
1254 | "node_modules/grapheme-splitter": {
1255 | "version": "1.0.4",
1256 | "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
1257 | "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
1258 | "dev": true
1259 | },
1260 | "node_modules/has-flag": {
1261 | "version": "4.0.0",
1262 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
1263 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
1264 | "dev": true,
1265 | "engines": {
1266 | "node": ">=8"
1267 | }
1268 | },
1269 | "node_modules/humanize-ms": {
1270 | "version": "1.2.1",
1271 | "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
1272 | "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
1273 | "dependencies": {
1274 | "ms": "^2.0.0"
1275 | }
1276 | },
1277 | "node_modules/ignore": {
1278 | "version": "5.2.4",
1279 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
1280 | "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
1281 | "dev": true,
1282 | "engines": {
1283 | "node": ">= 4"
1284 | }
1285 | },
1286 | "node_modules/import-fresh": {
1287 | "version": "3.3.0",
1288 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
1289 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
1290 | "dev": true,
1291 | "dependencies": {
1292 | "parent-module": "^1.0.0",
1293 | "resolve-from": "^4.0.0"
1294 | },
1295 | "engines": {
1296 | "node": ">=6"
1297 | },
1298 | "funding": {
1299 | "url": "https://github.com/sponsors/sindresorhus"
1300 | }
1301 | },
1302 | "node_modules/imurmurhash": {
1303 | "version": "0.1.4",
1304 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
1305 | "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
1306 | "dev": true,
1307 | "engines": {
1308 | "node": ">=0.8.19"
1309 | }
1310 | },
1311 | "node_modules/inflight": {
1312 | "version": "1.0.6",
1313 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1314 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
1315 | "dev": true,
1316 | "dependencies": {
1317 | "once": "^1.3.0",
1318 | "wrappy": "1"
1319 | }
1320 | },
1321 | "node_modules/inherits": {
1322 | "version": "2.0.4",
1323 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1324 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
1325 | "dev": true
1326 | },
1327 | "node_modules/is-extglob": {
1328 | "version": "2.1.1",
1329 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1330 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
1331 | "dev": true,
1332 | "engines": {
1333 | "node": ">=0.10.0"
1334 | }
1335 | },
1336 | "node_modules/is-glob": {
1337 | "version": "4.0.3",
1338 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
1339 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
1340 | "dev": true,
1341 | "dependencies": {
1342 | "is-extglob": "^2.1.1"
1343 | },
1344 | "engines": {
1345 | "node": ">=0.10.0"
1346 | }
1347 | },
1348 | "node_modules/is-number": {
1349 | "version": "7.0.0",
1350 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
1351 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
1352 | "dev": true,
1353 | "engines": {
1354 | "node": ">=0.12.0"
1355 | }
1356 | },
1357 | "node_modules/is-path-inside": {
1358 | "version": "3.0.3",
1359 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
1360 | "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
1361 | "dev": true,
1362 | "engines": {
1363 | "node": ">=8"
1364 | }
1365 | },
1366 | "node_modules/isexe": {
1367 | "version": "2.0.0",
1368 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1369 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
1370 | "dev": true
1371 | },
1372 | "node_modules/js-sdsl": {
1373 | "version": "4.3.0",
1374 | "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
1375 | "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
1376 | "dev": true,
1377 | "funding": {
1378 | "type": "opencollective",
1379 | "url": "https://opencollective.com/js-sdsl"
1380 | }
1381 | },
1382 | "node_modules/js-yaml": {
1383 | "version": "4.1.0",
1384 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
1385 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
1386 | "dev": true,
1387 | "dependencies": {
1388 | "argparse": "^2.0.1"
1389 | },
1390 | "bin": {
1391 | "js-yaml": "bin/js-yaml.js"
1392 | }
1393 | },
1394 | "node_modules/json-schema-traverse": {
1395 | "version": "0.4.1",
1396 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
1397 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
1398 | "dev": true
1399 | },
1400 | "node_modules/json-stable-stringify-without-jsonify": {
1401 | "version": "1.0.1",
1402 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
1403 | "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
1404 | "dev": true
1405 | },
1406 | "node_modules/levn": {
1407 | "version": "0.4.1",
1408 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
1409 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1410 | "dev": true,
1411 | "dependencies": {
1412 | "prelude-ls": "^1.2.1",
1413 | "type-check": "~0.4.0"
1414 | },
1415 | "engines": {
1416 | "node": ">= 0.8.0"
1417 | }
1418 | },
1419 | "node_modules/locate-path": {
1420 | "version": "6.0.0",
1421 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
1422 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
1423 | "dev": true,
1424 | "dependencies": {
1425 | "p-locate": "^5.0.0"
1426 | },
1427 | "engines": {
1428 | "node": ">=10"
1429 | },
1430 | "funding": {
1431 | "url": "https://github.com/sponsors/sindresorhus"
1432 | }
1433 | },
1434 | "node_modules/lodash.merge": {
1435 | "version": "4.6.2",
1436 | "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
1437 | "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
1438 | "dev": true
1439 | },
1440 | "node_modules/lru-cache": {
1441 | "version": "6.0.0",
1442 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
1443 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
1444 | "dev": true,
1445 | "dependencies": {
1446 | "yallist": "^4.0.0"
1447 | },
1448 | "engines": {
1449 | "node": ">=10"
1450 | }
1451 | },
1452 | "node_modules/merge2": {
1453 | "version": "1.4.1",
1454 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
1455 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
1456 | "dev": true,
1457 | "engines": {
1458 | "node": ">= 8"
1459 | }
1460 | },
1461 | "node_modules/micromatch": {
1462 | "version": "4.0.5",
1463 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
1464 | "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
1465 | "dev": true,
1466 | "dependencies": {
1467 | "braces": "^3.0.2",
1468 | "picomatch": "^2.3.1"
1469 | },
1470 | "engines": {
1471 | "node": ">=8.6"
1472 | }
1473 | },
1474 | "node_modules/mime-db": {
1475 | "version": "1.52.0",
1476 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
1477 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
1478 | "engines": {
1479 | "node": ">= 0.6"
1480 | }
1481 | },
1482 | "node_modules/mime-types": {
1483 | "version": "2.1.35",
1484 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
1485 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
1486 | "dependencies": {
1487 | "mime-db": "1.52.0"
1488 | },
1489 | "engines": {
1490 | "node": ">= 0.6"
1491 | }
1492 | },
1493 | "node_modules/minimatch": {
1494 | "version": "3.1.2",
1495 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
1496 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
1497 | "dev": true,
1498 | "dependencies": {
1499 | "brace-expansion": "^1.1.7"
1500 | },
1501 | "engines": {
1502 | "node": "*"
1503 | }
1504 | },
1505 | "node_modules/moment": {
1506 | "version": "2.29.4",
1507 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
1508 | "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
1509 | "dev": true,
1510 | "engines": {
1511 | "node": "*"
1512 | }
1513 | },
1514 | "node_modules/ms": {
1515 | "version": "2.1.2",
1516 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
1517 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
1518 | },
1519 | "node_modules/natural-compare": {
1520 | "version": "1.4.0",
1521 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
1522 | "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
1523 | "dev": true
1524 | },
1525 | "node_modules/natural-compare-lite": {
1526 | "version": "1.4.0",
1527 | "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
1528 | "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
1529 | "dev": true
1530 | },
1531 | "node_modules/node-domexception": {
1532 | "version": "1.0.0",
1533 | "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
1534 | "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
1535 | "funding": [
1536 | {
1537 | "type": "github",
1538 | "url": "https://github.com/sponsors/jimmywarting"
1539 | },
1540 | {
1541 | "type": "github",
1542 | "url": "https://paypal.me/jimmywarting"
1543 | }
1544 | ],
1545 | "engines": {
1546 | "node": ">=10.5.0"
1547 | }
1548 | },
1549 | "node_modules/node-fetch": {
1550 | "version": "2.7.0",
1551 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
1552 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
1553 | "dependencies": {
1554 | "whatwg-url": "^5.0.0"
1555 | },
1556 | "engines": {
1557 | "node": "4.x || >=6.0.0"
1558 | },
1559 | "peerDependencies": {
1560 | "encoding": "^0.1.0"
1561 | },
1562 | "peerDependenciesMeta": {
1563 | "encoding": {
1564 | "optional": true
1565 | }
1566 | }
1567 | },
1568 | "node_modules/obsidian": {
1569 | "version": "1.1.1",
1570 | "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.1.1.tgz",
1571 | "integrity": "sha512-GcxhsHNkPEkwHEjeyitfYNBcQuYGeAHFs1pEpZIv0CnzSfui8p8bPLm2YKLgcg20B764770B1sYGtxCvk9ptxg==",
1572 | "dev": true,
1573 | "dependencies": {
1574 | "@types/codemirror": "0.0.108",
1575 | "moment": "2.29.4"
1576 | },
1577 | "peerDependencies": {
1578 | "@codemirror/state": "^6.0.0",
1579 | "@codemirror/view": "^6.0.0"
1580 | }
1581 | },
1582 | "node_modules/once": {
1583 | "version": "1.4.0",
1584 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1585 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
1586 | "dev": true,
1587 | "dependencies": {
1588 | "wrappy": "1"
1589 | }
1590 | },
1591 | "node_modules/openai": {
1592 | "version": "3.2.1",
1593 | "resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",
1594 | "integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",
1595 | "dependencies": {
1596 | "axios": "^0.26.0",
1597 | "form-data": "^4.0.0"
1598 | }
1599 | },
1600 | "node_modules/optionator": {
1601 | "version": "0.9.1",
1602 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
1603 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
1604 | "dev": true,
1605 | "dependencies": {
1606 | "deep-is": "^0.1.3",
1607 | "fast-levenshtein": "^2.0.6",
1608 | "levn": "^0.4.1",
1609 | "prelude-ls": "^1.2.1",
1610 | "type-check": "^0.4.0",
1611 | "word-wrap": "^1.2.3"
1612 | },
1613 | "engines": {
1614 | "node": ">= 0.8.0"
1615 | }
1616 | },
1617 | "node_modules/p-limit": {
1618 | "version": "3.1.0",
1619 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
1620 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
1621 | "dev": true,
1622 | "dependencies": {
1623 | "yocto-queue": "^0.1.0"
1624 | },
1625 | "engines": {
1626 | "node": ">=10"
1627 | },
1628 | "funding": {
1629 | "url": "https://github.com/sponsors/sindresorhus"
1630 | }
1631 | },
1632 | "node_modules/p-locate": {
1633 | "version": "5.0.0",
1634 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
1635 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
1636 | "dev": true,
1637 | "dependencies": {
1638 | "p-limit": "^3.0.2"
1639 | },
1640 | "engines": {
1641 | "node": ">=10"
1642 | },
1643 | "funding": {
1644 | "url": "https://github.com/sponsors/sindresorhus"
1645 | }
1646 | },
1647 | "node_modules/parent-module": {
1648 | "version": "1.0.1",
1649 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
1650 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
1651 | "dev": true,
1652 | "dependencies": {
1653 | "callsites": "^3.0.0"
1654 | },
1655 | "engines": {
1656 | "node": ">=6"
1657 | }
1658 | },
1659 | "node_modules/path-exists": {
1660 | "version": "4.0.0",
1661 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
1662 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
1663 | "dev": true,
1664 | "engines": {
1665 | "node": ">=8"
1666 | }
1667 | },
1668 | "node_modules/path-is-absolute": {
1669 | "version": "1.0.1",
1670 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1671 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
1672 | "dev": true,
1673 | "engines": {
1674 | "node": ">=0.10.0"
1675 | }
1676 | },
1677 | "node_modules/path-key": {
1678 | "version": "3.1.1",
1679 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
1680 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
1681 | "dev": true,
1682 | "engines": {
1683 | "node": ">=8"
1684 | }
1685 | },
1686 | "node_modules/path-type": {
1687 | "version": "4.0.0",
1688 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
1689 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
1690 | "dev": true,
1691 | "engines": {
1692 | "node": ">=8"
1693 | }
1694 | },
1695 | "node_modules/picomatch": {
1696 | "version": "2.3.1",
1697 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
1698 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
1699 | "dev": true,
1700 | "engines": {
1701 | "node": ">=8.6"
1702 | },
1703 | "funding": {
1704 | "url": "https://github.com/sponsors/jonschlinkert"
1705 | }
1706 | },
1707 | "node_modules/prelude-ls": {
1708 | "version": "1.2.1",
1709 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
1710 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
1711 | "dev": true,
1712 | "engines": {
1713 | "node": ">= 0.8.0"
1714 | }
1715 | },
1716 | "node_modules/punycode": {
1717 | "version": "2.3.0",
1718 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
1719 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
1720 | "dev": true,
1721 | "engines": {
1722 | "node": ">=6"
1723 | }
1724 | },
1725 | "node_modules/queue-microtask": {
1726 | "version": "1.2.3",
1727 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
1728 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
1729 | "dev": true,
1730 | "funding": [
1731 | {
1732 | "type": "github",
1733 | "url": "https://github.com/sponsors/feross"
1734 | },
1735 | {
1736 | "type": "patreon",
1737 | "url": "https://www.patreon.com/feross"
1738 | },
1739 | {
1740 | "type": "consulting",
1741 | "url": "https://feross.org/support"
1742 | }
1743 | ]
1744 | },
1745 | "node_modules/regexpp": {
1746 | "version": "3.2.0",
1747 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
1748 | "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
1749 | "dev": true,
1750 | "engines": {
1751 | "node": ">=8"
1752 | },
1753 | "funding": {
1754 | "url": "https://github.com/sponsors/mysticatea"
1755 | }
1756 | },
1757 | "node_modules/resolve-from": {
1758 | "version": "4.0.0",
1759 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
1760 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
1761 | "dev": true,
1762 | "engines": {
1763 | "node": ">=4"
1764 | }
1765 | },
1766 | "node_modules/reusify": {
1767 | "version": "1.0.4",
1768 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
1769 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
1770 | "dev": true,
1771 | "engines": {
1772 | "iojs": ">=1.0.0",
1773 | "node": ">=0.10.0"
1774 | }
1775 | },
1776 | "node_modules/rfc4648": {
1777 | "version": "1.5.2",
1778 | "resolved": "https://registry.npmjs.org/rfc4648/-/rfc4648-1.5.2.tgz",
1779 | "integrity": "sha512-tLOizhR6YGovrEBLatX1sdcuhoSCXddw3mqNVAcKxGJ+J0hFeJ+SjeWCv5UPA/WU3YzWPPuCVYgXBKZUPGpKtg=="
1780 | },
1781 | "node_modules/rimraf": {
1782 | "version": "3.0.2",
1783 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
1784 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
1785 | "dev": true,
1786 | "dependencies": {
1787 | "glob": "^7.1.3"
1788 | },
1789 | "bin": {
1790 | "rimraf": "bin.js"
1791 | },
1792 | "funding": {
1793 | "url": "https://github.com/sponsors/isaacs"
1794 | }
1795 | },
1796 | "node_modules/roman-numerals": {
1797 | "version": "0.3.2",
1798 | "resolved": "https://registry.npmjs.org/roman-numerals/-/roman-numerals-0.3.2.tgz",
1799 | "integrity": "sha512-aTmaKtxczT3K4ZhtJDauOZ6LY3e1xNDf2SBn7aRY/ErAtCCuVYuwNQbPuh+SWTjGmbg9p5Nlt8sJbQNkto8uyg=="
1800 | },
1801 | "node_modules/run-parallel": {
1802 | "version": "1.2.0",
1803 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
1804 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
1805 | "dev": true,
1806 | "funding": [
1807 | {
1808 | "type": "github",
1809 | "url": "https://github.com/sponsors/feross"
1810 | },
1811 | {
1812 | "type": "patreon",
1813 | "url": "https://www.patreon.com/feross"
1814 | },
1815 | {
1816 | "type": "consulting",
1817 | "url": "https://feross.org/support"
1818 | }
1819 | ],
1820 | "dependencies": {
1821 | "queue-microtask": "^1.2.2"
1822 | }
1823 | },
1824 | "node_modules/semver": {
1825 | "version": "7.3.8",
1826 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
1827 | "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
1828 | "dev": true,
1829 | "dependencies": {
1830 | "lru-cache": "^6.0.0"
1831 | },
1832 | "bin": {
1833 | "semver": "bin/semver.js"
1834 | },
1835 | "engines": {
1836 | "node": ">=10"
1837 | }
1838 | },
1839 | "node_modules/shebang-command": {
1840 | "version": "2.0.0",
1841 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
1842 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
1843 | "dev": true,
1844 | "dependencies": {
1845 | "shebang-regex": "^3.0.0"
1846 | },
1847 | "engines": {
1848 | "node": ">=8"
1849 | }
1850 | },
1851 | "node_modules/shebang-regex": {
1852 | "version": "3.0.0",
1853 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
1854 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
1855 | "dev": true,
1856 | "engines": {
1857 | "node": ">=8"
1858 | }
1859 | },
1860 | "node_modules/slash": {
1861 | "version": "3.0.0",
1862 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
1863 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
1864 | "dev": true,
1865 | "engines": {
1866 | "node": ">=8"
1867 | }
1868 | },
1869 | "node_modules/strip-ansi": {
1870 | "version": "6.0.1",
1871 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
1872 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
1873 | "dev": true,
1874 | "dependencies": {
1875 | "ansi-regex": "^5.0.1"
1876 | },
1877 | "engines": {
1878 | "node": ">=8"
1879 | }
1880 | },
1881 | "node_modules/strip-json-comments": {
1882 | "version": "3.1.1",
1883 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
1884 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
1885 | "dev": true,
1886 | "engines": {
1887 | "node": ">=8"
1888 | },
1889 | "funding": {
1890 | "url": "https://github.com/sponsors/sindresorhus"
1891 | }
1892 | },
1893 | "node_modules/style-mod": {
1894 | "version": "4.0.0",
1895 | "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz",
1896 | "integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw=="
1897 | },
1898 | "node_modules/supports-color": {
1899 | "version": "7.2.0",
1900 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
1901 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
1902 | "dev": true,
1903 | "dependencies": {
1904 | "has-flag": "^4.0.0"
1905 | },
1906 | "engines": {
1907 | "node": ">=8"
1908 | }
1909 | },
1910 | "node_modules/text-table": {
1911 | "version": "0.2.0",
1912 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
1913 | "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
1914 | "dev": true
1915 | },
1916 | "node_modules/to-regex-range": {
1917 | "version": "5.0.1",
1918 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1919 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1920 | "dev": true,
1921 | "dependencies": {
1922 | "is-number": "^7.0.0"
1923 | },
1924 | "engines": {
1925 | "node": ">=8.0"
1926 | }
1927 | },
1928 | "node_modules/tr46": {
1929 | "version": "0.0.3",
1930 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
1931 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
1932 | },
1933 | "node_modules/tslib": {
1934 | "version": "2.4.0",
1935 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
1936 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
1937 | "dev": true
1938 | },
1939 | "node_modules/tsutils": {
1940 | "version": "3.21.0",
1941 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
1942 | "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
1943 | "dev": true,
1944 | "dependencies": {
1945 | "tslib": "^1.8.1"
1946 | },
1947 | "engines": {
1948 | "node": ">= 6"
1949 | },
1950 | "peerDependencies": {
1951 | "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
1952 | }
1953 | },
1954 | "node_modules/tsutils/node_modules/tslib": {
1955 | "version": "1.14.1",
1956 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
1957 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
1958 | "dev": true
1959 | },
1960 | "node_modules/type-check": {
1961 | "version": "0.4.0",
1962 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
1963 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
1964 | "dev": true,
1965 | "dependencies": {
1966 | "prelude-ls": "^1.2.1"
1967 | },
1968 | "engines": {
1969 | "node": ">= 0.8.0"
1970 | }
1971 | },
1972 | "node_modules/type-fest": {
1973 | "version": "0.20.2",
1974 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
1975 | "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
1976 | "dev": true,
1977 | "engines": {
1978 | "node": ">=10"
1979 | },
1980 | "funding": {
1981 | "url": "https://github.com/sponsors/sindresorhus"
1982 | }
1983 | },
1984 | "node_modules/typescript": {
1985 | "version": "4.7.4",
1986 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
1987 | "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
1988 | "dev": true,
1989 | "bin": {
1990 | "tsc": "bin/tsc",
1991 | "tsserver": "bin/tsserver"
1992 | },
1993 | "engines": {
1994 | "node": ">=4.2.0"
1995 | }
1996 | },
1997 | "node_modules/undici-types": {
1998 | "version": "5.26.5",
1999 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
2000 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
2001 | },
2002 | "node_modules/untildify": {
2003 | "version": "4.0.0",
2004 | "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
2005 | "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
2006 | "engines": {
2007 | "node": ">=8"
2008 | }
2009 | },
2010 | "node_modules/uri-js": {
2011 | "version": "4.4.1",
2012 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
2013 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
2014 | "dev": true,
2015 | "dependencies": {
2016 | "punycode": "^2.1.0"
2017 | }
2018 | },
2019 | "node_modules/uuid": {
2020 | "version": "9.0.0",
2021 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
2022 | "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
2023 | "bin": {
2024 | "uuid": "dist/bin/uuid"
2025 | }
2026 | },
2027 | "node_modules/w3c-keyname": {
2028 | "version": "2.2.6",
2029 | "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz",
2030 | "integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg=="
2031 | },
2032 | "node_modules/web-streams-polyfill": {
2033 | "version": "3.3.3",
2034 | "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
2035 | "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
2036 | "engines": {
2037 | "node": ">= 8"
2038 | }
2039 | },
2040 | "node_modules/webidl-conversions": {
2041 | "version": "3.0.1",
2042 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
2043 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
2044 | },
2045 | "node_modules/whatwg-url": {
2046 | "version": "5.0.0",
2047 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
2048 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
2049 | "dependencies": {
2050 | "tr46": "~0.0.3",
2051 | "webidl-conversions": "^3.0.0"
2052 | }
2053 | },
2054 | "node_modules/which": {
2055 | "version": "2.0.2",
2056 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
2057 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
2058 | "dev": true,
2059 | "dependencies": {
2060 | "isexe": "^2.0.0"
2061 | },
2062 | "bin": {
2063 | "node-which": "bin/node-which"
2064 | },
2065 | "engines": {
2066 | "node": ">= 8"
2067 | }
2068 | },
2069 | "node_modules/word-wrap": {
2070 | "version": "1.2.3",
2071 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
2072 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
2073 | "dev": true,
2074 | "engines": {
2075 | "node": ">=0.10.0"
2076 | }
2077 | },
2078 | "node_modules/wrappy": {
2079 | "version": "1.0.2",
2080 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
2081 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
2082 | "dev": true
2083 | },
2084 | "node_modules/yallist": {
2085 | "version": "4.0.0",
2086 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
2087 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
2088 | "dev": true
2089 | },
2090 | "node_modules/yocto-queue": {
2091 | "version": "0.1.0",
2092 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
2093 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
2094 | "dev": true,
2095 | "engines": {
2096 | "node": ">=10"
2097 | },
2098 | "funding": {
2099 | "url": "https://github.com/sponsors/sindresorhus"
2100 | }
2101 | }
2102 | }
2103 | }
2104 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "obsidian-loom",
3 | "version": "1.22.6",
4 | "description": "Loom in Obsidian",
5 | "main": "main.js",
6 | "scripts": {
7 | "dev": "node esbuild.config.mjs",
8 | "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
9 | "version": "node version-bump.mjs && git add manifest.json versions.json"
10 | },
11 | "keywords": [],
12 | "author": "",
13 | "license": "MIT",
14 | "devDependencies": {
15 | "@types/node": "^16.11.6",
16 | "@types/uuid": "^9.0.1",
17 | "@typescript-eslint/eslint-plugin": "^5.54.1",
18 | "@typescript-eslint/parser": "^5.54.1",
19 | "builtin-modules": "3.3.0",
20 | "esbuild": "0.17.3",
21 | "eslint": "^8.35.0",
22 | "obsidian": "latest",
23 | "tslib": "2.4.0",
24 | "typescript": "4.7.4"
25 | },
26 | "dependencies": {
27 | "@anthropic-ai/sdk": "^0.20.0",
28 | "@codemirror/state": "^6.2.0",
29 | "@codemirror/view": "^6.9.3",
30 | "@types/lodash": "^4.14.191",
31 | "@types/roman-numerals": "^0.3.0",
32 | "azure-openai": "^0.9.4",
33 | "cohere-ai": "^6.1.0",
34 | "gpt-tokenizer": "^2.1.1",
35 | "openai": "^3.2.0",
36 | "roman-numerals": "^0.3.2",
37 | "untildify": "^4.0.0",
38 | "uuid": "^9.0.0"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | @settings
3 | name: Loom
4 | id: loom
5 | settings:
6 | -
7 | id: ancestor-editor-color
8 | type: variable-themed-color
9 | title: Ancestor node text color
10 | description: Color of ancestor nodes' text in the editor
11 | format: hex
12 | opacity: false
13 | allowEmpty: false
14 | default-light: "#808080"
15 | default-dark: "#808080"
16 |
17 | -
18 | id: ancestor-editor-background
19 | type: variable-themed-color
20 | title: Ancestor node background color
21 | description: Background color of ancestor nodes in the editor upon hover
22 | format: hex
23 | opacity: false
24 | allowEmpty: false
25 | default-light: "#eee"
26 | default-dark: "#111"
27 | */
28 |
29 | body {
30 | --ancestor-editor-color: #808080;
31 | }
32 | .theme-light {
33 | --ancestor-editor-background: #eee;
34 | }
35 | .theme-dark {
36 | --ancestor-editor-background: #111;
37 | }
38 |
39 | /* all views */
40 |
41 | .loom__view {
42 | overflow-y: auto;
43 | padding: 0 0.6em;
44 | }
45 |
46 | /* nav buttons */
47 |
48 | .loom__nav-buttons {
49 | margin: 0.5em 0 1em;
50 | }
51 |
52 | /* alt export field */
53 |
54 | .loom__alt-export-field {
55 | display: flex;
56 | flex-direction: row;
57 | align-items: center;
58 | width: 100%;
59 | margin-bottom: 0.8em;
60 | }
61 | .loom__alt-export-field input {
62 | flex-grow: 1;
63 | }
64 | .loom__alt-export-field button {
65 | margin-left: 0.6em;
66 | }
67 |
68 | /* search bar */
69 |
70 | .loom__search-bar {
71 | width: 100%;
72 | margin-bottom: 0.8em;
73 | }
74 |
75 | .loom__search-bar-no-results {
76 | background-color: rgba(var(--background-modifier-error-rgb), 0.2) !important;
77 | }
78 |
79 | /* settings */
80 |
81 | .loom__settings {
82 | margin-bottom: 0.3em;
83 | }
84 |
85 | .loom__visibility {
86 | margin-bottom: 0.7em;
87 | }
88 |
89 | .loom__visibility-item {
90 | display: inline-flex;
91 | align-items: center;
92 | margin-right: 0.7em;
93 | }
94 |
95 | .loom__visibility-item-label {
96 | font-size: var(--font-ui-small);
97 | }
98 |
99 | .loom__no-metavisibility {
100 | color: var(--text-faint);
101 | font-size: var(--font-ui-small);
102 | margin: 0 0 0.5em 0.5em;
103 | }
104 |
105 | .loom__setting {
106 | display: flex;
107 | flex-direction: column;
108 | }
109 | .loom__setting label {
110 | font-size: 0.9em;
111 | margin-bottom: 0.3em;
112 | }
113 | .loom__setting input {
114 | margin-bottom: 0.6em;
115 | }
116 | .loom__setting select {
117 | margin-bottom: 0.6em;
118 | }
119 |
120 | /* all tree headers */
121 |
122 | .loom__tree-header {
123 | padding: 0.35em;
124 | }
125 |
126 | .loom__tree-header-text {
127 | color: var(--text-normal);
128 | font-weight: var(--font-medium);
129 | }
130 |
131 | /* bookmarks header */
132 |
133 | .loom__bookmarks {
134 | margin-bottom: 0.5em;
135 | }
136 |
137 | .loom__bookmarks-count {
138 | color: var(--text-faint);
139 | }
140 |
141 | /* nodes */
142 |
143 | .loom__node {
144 | display: flex;
145 | align-items: center;
146 | padding: 0;
147 | }
148 | .loom__node.is-active {
149 | background-color: var(--nav-item-background-active);
150 | }
151 |
152 | .loom__collapse-button {
153 | margin-left: 0.6em;
154 | }
155 | .loom__collapse-button.loom__is-collapsed {
156 | transform: rotate(-90deg);
157 | }
158 |
159 | .loom__node-bookmark-icon {
160 | display: flex;
161 | align-items: center;
162 | margin-left: 0.3em;
163 | margin-right: -0.3em;
164 | }
165 |
166 | .loom__node-search-result {
167 | background-color: rgba(255, 255, 0, 0.1);
168 | }
169 | .loom__node-search-result.is-active {
170 | background-color: rgba(255, 255, 0, 0.2);
171 | }
172 | .loom__node-search-result:hover {
173 | background-color: rgba(255, 255, 0, 0.2) !important;
174 | }
175 | .loom__node-search-result:not(:hover) {
176 | padding-right: 0.3em;
177 | }
178 |
179 | .loom__node-unread {
180 | font-weight: bold !important;
181 | }
182 |
183 | .loom__node-unread-indicator {
184 | width: 0.3em;
185 | height: 0.3em;
186 | border-radius: 50%;
187 | background-color: var(--nav-item-color);
188 | margin-left: 0.6em;
189 | flex-shrink: 0;
190 | }
191 |
192 | .loom__node-text {
193 | white-space: nowrap;
194 | overflow: hidden;
195 | text-overflow: ellipsis;
196 | padding: 0.35em 0 0.35em 0.6em;
197 | flex-grow: 1;
198 | }
199 |
200 | .loom__node-buttons {
201 | display: none;
202 | padding-right: 0.5em;
203 | }
204 | .loom__node:hover .loom__node-buttons {
205 | display: inline-flex !important;
206 | }
207 |
208 | .loom__node-button {
209 | display: inline-flex !important;
210 | margin-left: -0.025em;
211 | padding: 0.1em 0.075em;
212 | border-radius: 0.25em;
213 | --icon-size: 1.1rem;
214 | }
215 | .loom__node-button:hover {
216 | background-color: var(--nav-item-background-active);
217 | }
218 |
219 | .loom__node-footer {
220 | color: var(--text-faint);
221 | font-size: 0.9em;
222 | margin-left: calc(0.85em + 1px);
223 | padding: 0.35em 0 0.35em 1.2em;
224 | white-space: nowrap;
225 |
226 | display: flex;
227 | align-items: center;
228 | width: max-content;
229 |
230 | border-left: 1px solid var(--color-base-35);
231 | }
232 |
233 | .loom__node-footer-text {
234 | margin-left: 0.35em;
235 | }
236 |
237 | @keyframes rotating {
238 | from {
239 | transform: rotate(0deg);
240 | }
241 | to {
242 | transform: rotate(360deg);
243 | }
244 | }
245 | .loom__node-generating-icon {
246 | display: inline-flex;
247 | align-items: center;
248 | }
249 | .loom__node-generating-icon svg {
250 | animation: rotating 2s linear infinite;
251 | }
252 |
253 | .loom__node-show-more:hover {
254 | color: var(--text-normal);
255 | }
256 |
257 | .loom__node-children {
258 | margin-left: 0.85em;
259 | padding-left: 0.6em;
260 | border-left: 1px solid var(--color-base-35);
261 | }
262 |
263 | /* nodes -- siblings view */
264 |
265 | .loom__sibling {
266 | color: var(--nav-item-color);
267 | font-size: 0.9em;
268 |
269 | line-height: 1.3;
270 | margin: 0.2em 0;
271 | padding: 0.8em;
272 | white-space: pre-wrap;
273 |
274 | position: relative;
275 | }
276 | .loom__sibling:hover {
277 | background-color: var(--nav-item-background-active);
278 | color: var(--nav-item-color-active);
279 | }
280 | .loom__sibling.is-active {
281 | background-color: var(--nav-item-background-active);
282 | color: var(--nav-item-color-active);
283 | }
284 |
285 | .loom__sibling-ellipsis {
286 | color: var(--text-faint);
287 | margin-right: 0.3em;
288 | }
289 |
290 | .loom__sibling-buttons {
291 | display: none;
292 |
293 | background-color: rgba(16, 16, 16, 0.6);
294 | border-radius: 0.3em;
295 | padding: 0.2em;
296 |
297 | position: absolute;
298 | right: 0.5em;
299 | top: 0.5em;
300 | }
301 | .loom__sibling:hover .loom__sibling-buttons {
302 | display: inline-flex !important;
303 | }
304 |
305 | .loom__sibling-separator {
306 | margin: 0;
307 | }
308 |
309 | /* nodes -- editor */
310 |
311 | .loom__editor-node {
312 | color: var(--ancestor-editor-color);
313 | }
314 |
315 | .loom__editor-node-hover {
316 | background-color: var(--ancestor-editor-background);
317 | }
318 |
319 | .theme-dark .loom__editor-node-border {
320 | border-right: 2px dashed #333;
321 | }
322 |
323 | /* "make prompt from passages" modal */
324 |
325 | .loom__passage-list {
326 | max-height: 10em;
327 | overflow-y: auto;
328 | }
329 |
330 | .loom__passage {
331 | display: flex;
332 | align-items: center;
333 | padding: 0.35em 0 0.35em 0.6em;
334 | }
335 | .loom__passage:hover {
336 | background-color: var(--nav-item-background-active);
337 | }
338 |
339 | .loom__selected-passages-title {
340 | font-weight: bold;
341 | margin: 1em 0 0.5em;
342 | }
343 |
344 | .loom__selected-passage-list {
345 | margin-bottom: 0.75em;
346 | }
347 |
348 | .loom__no-passages-selected {
349 | color: var(--text-faint);
350 | font-size: var(--font-ui-small);
351 | padding: 0.35em 0 0.35em 0.6em;
352 | }
353 |
354 | /* settings -> loom */
355 |
356 | .loom__preset-editor {
357 | align-items: start;
358 | flex-direction: column;
359 | }
360 |
361 | .loom__preset-list {
362 | width: 100%;
363 | margin: -0.125em 0 0.75em;
364 | }
365 |
366 | .loom__preset {
367 | display: flex;
368 | align-items: center;
369 | padding: 0;
370 | }
371 | .loom__preset.is-active {
372 | background-color: var(--nav-item-background-active);
373 | }
374 |
375 | .loom__preset-name {
376 | white-space: nowrap;
377 | overflow: hidden;
378 | text-overflow: ellipsis;
379 | padding: 0.35em 0 0.35em 0.6em;
380 | flex-grow: 1;
381 | }
382 |
383 | .loom__preset-buttons {
384 | display: flex;
385 | align-items: center;
386 | padding-right: 0.5em;
387 | }
388 |
389 | .loom__preset-button {
390 | display: inline-flex !important;
391 | margin-left: -0.025em;
392 | padding: 0.1em 0.075em;
393 | border-radius: 0.25em;
394 | --icon-size: 1.1rem;
395 | }
396 | .loom__preset-button:hover {
397 | background-color: var(--nav-item-background-active);
398 | }
399 |
400 | .loom__new-preset-buttons {
401 | display: flex;
402 | gap: var(--size-4-2);
403 | }
404 |
405 | .loom__no-preset-selected {
406 | color: var(--text-faint);
407 | font-size: var(--font-ui-small);
408 | }
409 |
410 | /* hidden -- must be at end */
411 |
412 | .hidden {
413 | display: none;
414 | }
415 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "inlineSourceMap": true,
5 | "inlineSources": true,
6 | "module": "ESNext",
7 | "target": "ES6",
8 | "allowJs": true,
9 | "noImplicitAny": true,
10 | "moduleResolution": "node",
11 | "importHelpers": true,
12 | "isolatedModules": true,
13 | "strictNullChecks": true,
14 | "lib": [
15 | "DOM",
16 | "ES5",
17 | "ES6",
18 | "ES7"
19 | ],
20 | "jsx": "react"
21 | },
22 | "include": [
23 | "**/*.ts"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/version-bump.mjs:
--------------------------------------------------------------------------------
1 | import { readFileSync, writeFileSync } from "fs";
2 |
3 | const targetVersion = process.env.npm_package_version;
4 |
5 | // read minAppVersion from manifest.json and bump version to target version
6 | let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
7 | const { minAppVersion } = manifest;
8 | manifest.version = targetVersion;
9 | writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
10 |
11 | // update versions.json with target version and minAppVersion from manifest.json
12 | let versions = JSON.parse(readFileSync("versions.json", "utf8"));
13 | versions[targetVersion] = minAppVersion;
14 | writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
15 |
--------------------------------------------------------------------------------
/versions.json:
--------------------------------------------------------------------------------
1 | {
2 | "0.1.0": "0.15.0"
3 | }
4 |
--------------------------------------------------------------------------------
/views.ts:
--------------------------------------------------------------------------------
1 | import { LoomSettings, Node, NoteState } from "./common";
2 | import {
3 | App,
4 | ItemView,
5 | Menu,
6 | Modal,
7 | Setting,
8 | WorkspaceLeaf,
9 | setIcon,
10 | } from "obsidian";
11 | import { Range } from "@codemirror/state";
12 | import {
13 | Decoration,
14 | DecorationSet,
15 | EditorView,
16 | PluginSpec,
17 | PluginValue,
18 | WidgetType,
19 | } from "@codemirror/view";
20 | const dialog = require("electron").remote.dialog;
21 |
22 | interface NodeContext {
23 | app: App;
24 | state: NoteState;
25 | id: string;
26 | node: Node;
27 | deletable: boolean;
28 | }
29 |
30 | const showNodeMenu = (
31 | event: MouseEvent,
32 | { app, state, id, node, deletable }: NodeContext
33 | ) => {
34 | const menu = new Menu();
35 |
36 | const menuItem = (name: string, icon: string, callback: () => void) =>
37 | menu.addItem((item) => {
38 | item.setTitle(name);
39 | item.setIcon(icon);
40 | item.onClick(callback);
41 | });
42 |
43 | const zeroArgMenuItem = (name: string, icon: string, event: string) =>
44 | menuItem(name, icon, () => app.workspace.trigger(event));
45 | const selfArgMenuItem = (name: string, icon: string, event: string) =>
46 | menuItem(name, icon, () => app.workspace.trigger(event, id));
47 | const selfListArgMenuItem = (name: string, icon: string, event: string) =>
48 | menuItem(name, icon, () => app.workspace.trigger(event, [id]));
49 |
50 | if (state.hoisted[state.hoisted.length - 1] === id)
51 | zeroArgMenuItem("Unhoist", "arrow-down", "loom:unhoist");
52 | else selfArgMenuItem("Hoist", "arrow-up", "loom:hoist");
53 |
54 | if (node.bookmarked)
55 | selfArgMenuItem(
56 | "Remove bookmark",
57 | "bookmark-minus",
58 | "loom:toggle-bookmark"
59 | );
60 | else selfArgMenuItem("Bookmark", "bookmark", "loom:toggle-bookmark");
61 |
62 | menu.addSeparator();
63 | selfArgMenuItem("Create child", "plus", "loom:create-child");
64 | selfArgMenuItem("Create sibling", "list-plus", "loom:create-sibling");
65 |
66 | menu.addSeparator();
67 | selfArgMenuItem("Delete all children", "x", "loom:clear-children");
68 | selfArgMenuItem("Delete all siblings", "list-x", "loom:clear-siblings");
69 |
70 | if (node.parentId !== null) {
71 | menu.addSeparator();
72 | selfArgMenuItem(
73 | "Merge with parent",
74 | "arrow-up-left",
75 | "loom:merge-with-parent"
76 | );
77 | }
78 |
79 | if (deletable) {
80 | menu.addSeparator();
81 | selfListArgMenuItem("Delete", "trash", "loom:delete");
82 | }
83 |
84 | menu.showAtMouseEvent(event);
85 | };
86 |
87 | const renderNodeButtons = (
88 | container: HTMLElement,
89 | { app, state, id, node, deletable }: NodeContext
90 | ) => {
91 | const button = (
92 | label: string,
93 | icon: string,
94 | callback: (event: MouseEvent) => void
95 | ) => {
96 | const button_ = container.createDiv({
97 | cls: "loom__node-button",
98 | attr: { "aria-label": label },
99 | });
100 | setIcon(button_, icon);
101 | button_.addEventListener("click", (event) => {
102 | event.stopPropagation();
103 | callback(event);
104 | });
105 | };
106 |
107 | button("Show menu", "menu", (event) =>
108 | showNodeMenu(event, { app, state, id, node, deletable })
109 | );
110 |
111 | if (state.hoisted[state.hoisted.length - 1] === id)
112 | button("Unhoist", "arrow-down", () =>
113 | app.workspace.trigger("loom:unhoist")
114 | );
115 | else
116 | button("Hoist", "arrow-up", () => app.workspace.trigger("loom:hoist", id));
117 |
118 | if (node.bookmarked)
119 | button("Remove bookmark", "bookmark-minus", () =>
120 | app.workspace.trigger("loom:toggle-bookmark", id)
121 | );
122 | else
123 | button("Bookmark", "bookmark", () =>
124 | app.workspace.trigger("loom:toggle-bookmark", id)
125 | );
126 |
127 | if (deletable)
128 | button("Delete", "trash", () => app.workspace.trigger("loom:delete", [id]));
129 | };
130 |
131 | export class LoomView extends ItemView {
132 | getNoteState: () => NoteState | null;
133 | getSettings: () => LoomSettings;
134 |
135 | tree: HTMLElement;
136 |
137 | constructor(
138 | leaf: WorkspaceLeaf,
139 | getNoteState: () => NoteState | null,
140 | getSettings: () => LoomSettings
141 | ) {
142 | super(leaf);
143 |
144 | this.getNoteState = getNoteState;
145 | this.getSettings = getSettings;
146 | }
147 |
148 | async onOpen() {
149 | this.render();
150 | }
151 |
152 | render() {
153 | const state = this.getNoteState();
154 | const settings = this.getSettings();
155 |
156 | const scroll = this.containerEl.scrollTop;
157 |
158 | this.containerEl.empty();
159 | this.containerEl.addClass("loom__view");
160 |
161 | this.renderNavButtons(settings);
162 | const container = this.containerEl.createDiv({ cls: "outline" });
163 | if (settings.showExport) this.renderAltExportInterface(container);
164 | if (settings.showSearchBar) this.renderSearchBar(container, state);
165 | if (settings.showSettings) this.renderSettings(container, settings);
166 |
167 | if (!state) {
168 | container.createDiv({ cls: "pane-empty", text: "No note selected." });
169 | return;
170 | }
171 | this.renderBookmarks(container, state);
172 | this.tree = container.createDiv();
173 | this.renderTree(this.tree, state);
174 |
175 | this.containerEl.scrollTop = scroll;
176 |
177 | // scroll to active node in the tree
178 | const activeNode = this.tree.querySelector(".is-active");
179 | if (activeNode) {
180 | //&& !container.contains(activeNode)){
181 | activeNode.scrollIntoView({ block: "nearest" });
182 | }
183 | }
184 |
185 | renderNavButtons(settings: LoomSettings) {
186 | const navButtonsContainer = this.containerEl.createDiv({
187 | cls: "nav-buttons-container loom__nav-buttons",
188 | });
189 |
190 | // buttons to toggle 1) settings 2) node borders in the editor
191 |
192 | const settingNavButton = (
193 | setting: string,
194 | value: boolean,
195 | icon: string,
196 | label: string
197 | ) => {
198 | const button = navButtonsContainer.createDiv({
199 | cls: `clickable-icon nav-action-button${value ? " is-active" : ""}`,
200 | attr: { "aria-label": label },
201 | });
202 | setIcon(button, icon);
203 | button.addEventListener("click", () =>
204 | this.app.workspace.trigger("loom:set-setting", setting, !value)
205 | );
206 | };
207 |
208 | settingNavButton(
209 | "showSettings",
210 | settings.showSettings,
211 | "settings",
212 | "Show settings"
213 | );
214 | settingNavButton(
215 | "showSearchBar",
216 | settings.showSearchBar,
217 | "search",
218 | "Show search bar"
219 | );
220 | settingNavButton(
221 | "showNodeBorders",
222 | settings.showNodeBorders,
223 | "separator-vertical",
224 | "Show node borders in the editor"
225 | );
226 |
227 | // the import button
228 |
229 | const importInput = navButtonsContainer.createEl("input", {
230 | cls: "hidden",
231 | attr: { type: "file", id: "loom__import-input" },
232 | });
233 |
234 | const importNavButton = navButtonsContainer.createEl("label", {
235 | cls: "clickable-icon nav-action-button",
236 | attr: { "aria-label": "Import JSON", for: "loom__import-input" },
237 | });
238 | setIcon(importNavButton, "import");
239 |
240 | importInput.addEventListener("change", () => {
241 | // @ts-expect-error
242 | const path = importInput.files?.[0].path;
243 | if (path) this.app.workspace.trigger("loom:import", path);
244 | });
245 |
246 | // the export button
247 |
248 | const exportNavButton = navButtonsContainer.createDiv({
249 | cls: `clickable-icon nav-action-button${
250 | settings.showExport ? " is-active" : ""
251 | }`,
252 | attr: { "aria-label": "Export to JSON" },
253 | });
254 | setIcon(exportNavButton, "download");
255 |
256 | exportNavButton.addEventListener("click", (event) => {
257 | if (event.shiftKey) {
258 | this.app.workspace.trigger(
259 | "loom:set-setting",
260 | "showExport",
261 | !settings.showExport
262 | );
263 | return;
264 | }
265 | dialog
266 | .showSaveDialog({
267 | title: "Export to JSON",
268 | filters: [{ extensions: ["json"] }],
269 | })
270 | .then((result: any) => {
271 | if (result && result.filePath)
272 | this.app.workspace.trigger("loom:export", result.filePath);
273 | });
274 | });
275 | }
276 |
277 | renderAltExportInterface(container: HTMLElement) {
278 | const exportContainer = container.createDiv({
279 | cls: "loom__alt-export-field",
280 | });
281 | const exportInput = exportContainer.createEl("input", {
282 | attr: { type: "text", placeholder: "Path to export to" },
283 | });
284 | const exportButton = exportContainer.createEl("button", {});
285 | setIcon(exportButton, "download");
286 |
287 | exportButton.addEventListener("click", () => {
288 | if (exportInput.value)
289 | this.app.workspace.trigger("loom:export", exportInput.value);
290 | });
291 | }
292 |
293 | renderSearchBar(container: HTMLElement, state: NoteState | null) {
294 | const searchBar = container.createEl("input", {
295 | cls: "loom__search-bar",
296 | value: state?.searchTerm || "",
297 | attr: { type: "text", placeholder: "Search" },
298 | });
299 | searchBar.addEventListener("input", () => {
300 | const state = this.getNoteState();
301 | this.app.workspace.trigger("loom:search", searchBar.value);
302 | if (state) {
303 | this.renderTree(this.tree, state);
304 | if (
305 | Object.values(state.nodes).every(
306 | (node) => node.searchResultState === "none"
307 | )
308 | )
309 | searchBar.addClass("loom__search-bar-no-results");
310 | else searchBar.removeClass("loom__search-bar-no-results");
311 | }
312 | });
313 | }
314 |
315 | renderSettings(container: HTMLElement, settings: LoomSettings) {
316 | const settingsContainer = container.createDiv({ cls: "loom__settings" });
317 |
318 | // visibility checkboxes
319 |
320 | const visibilityContainer = settingsContainer.createDiv({
321 | cls: "loom__visibility",
322 | });
323 |
324 | const createCheckbox = (
325 | id: string,
326 | label: string,
327 | ellipsis: boolean = false
328 | ) => {
329 | const checkboxContainer = visibilityContainer.createSpan({
330 | cls: "loom__visibility-item",
331 | });
332 | const checkbox = checkboxContainer.createEl("input", {
333 | attr: {
334 | id: `loom__${id}-checkbox`,
335 | checked: settings.visibility[id] ? "checked" : null,
336 | },
337 | type: "checkbox",
338 | });
339 | checkbox.addEventListener("change", () =>
340 | this.app.workspace.trigger(
341 | "loom:set-visibility-setting",
342 | id,
343 | checkbox.checked
344 | )
345 | );
346 |
347 | const checkboxLabel = checkboxContainer.createEl("label", {
348 | attr: { for: `loom__${id}-checkbox` },
349 | cls: "loom__visibility-item-label",
350 | text: label,
351 | });
352 | if (ellipsis && !settings.visibility.visibility)
353 | checkboxLabel.createSpan({
354 | cls: "loom__no-metavisibility",
355 | text: "...",
356 | });
357 | };
358 |
359 | createCheckbox("visibility", "These checkboxes", true);
360 | if (settings.visibility["visibility"]) {
361 | createCheckbox("modelPreset", "Model preset");
362 | createCheckbox("maxTokens", "Length");
363 | createCheckbox("n", "Number of completions");
364 | createCheckbox("bestOf", "Best of");
365 | createCheckbox("temperature", "Temperature");
366 | createCheckbox("topP", "Top p");
367 | createCheckbox("frequencyPenalty", "Frequency penalty");
368 | createCheckbox("presencePenalty", "Presence penalty");
369 | createCheckbox("prepend", "Prepend sequence");
370 | createCheckbox("systemPrompt", "System prompt");
371 | createCheckbox("userMessage", "User message");
372 | }
373 |
374 | // preset dropdown
375 |
376 | if (settings.visibility["modelPreset"]) {
377 | const presetContainer = settingsContainer.createDiv({
378 | cls: "loom__setting",
379 | });
380 | presetContainer.createEl("label", { text: "Model preset" });
381 | const presetDropdown = presetContainer.createEl("select");
382 |
383 | if (settings.modelPresets.length === 0)
384 | presetDropdown
385 | .createEl("option")
386 | .createEl("i", {
387 | text: "[You have no presets. Go to Settings → Loom.]",
388 | });
389 | else {
390 | for (const i in settings.modelPresets) {
391 | const preset = settings.modelPresets[i];
392 | presetDropdown.createEl("option", {
393 | text: preset.name,
394 | attr: {
395 | selected: settings.modelPreset === parseInt(i) ? "" : null,
396 | value: i,
397 | },
398 | });
399 | }
400 |
401 | presetDropdown.addEventListener("change", () =>
402 | this.app.workspace.trigger(
403 | "loom:set-setting",
404 | "modelPreset",
405 | parseInt(presetDropdown.value)
406 | )
407 | );
408 | }
409 | }
410 |
411 | // other settings
412 |
413 | const setting = (
414 | label: string,
415 | setting: string,
416 | value: string,
417 | type: "string" | "int" | "int?" | "float"
418 | ) => {
419 | if (!settings.visibility[setting]) return;
420 |
421 | const parsers = {
422 | string: (value: string) => value,
423 | int: (value: string) => parseInt(value),
424 | "int?": (value: string) => (value === "" ? 0 : parseInt(value)),
425 | float: (value: string) => parseFloat(value),
426 | };
427 |
428 | const settingContainer = settingsContainer.createDiv({
429 | cls: "loom__setting",
430 | });
431 | settingContainer.createEl("label", { text: label });
432 | const settingInput = settingContainer.createEl("input", {
433 | type: type === "string" ? "text" : "number",
434 | value,
435 | });
436 | settingInput.addEventListener("blur", () =>
437 | this.app.workspace.trigger(
438 | "loom:set-setting",
439 | setting,
440 | parsers[type](settingInput.value)
441 | )
442 | );
443 | };
444 |
445 | setting(
446 | "Length (in tokens)",
447 | "maxTokens",
448 | String(settings.maxTokens),
449 | "int"
450 | );
451 | setting("Number of completions", "n", String(settings.n), "int");
452 | setting(
453 | "Best of",
454 | "bestOf",
455 | settings.bestOf === 0 ? "" : String(settings.bestOf),
456 | "int?"
457 | );
458 | setting(
459 | "Temperature",
460 | "temperature",
461 | String(settings.temperature),
462 | "float"
463 | );
464 | setting("Top p", "topP", String(settings.topP), "float");
465 | setting(
466 | "Frequency penalty",
467 | "frequencyPenalty",
468 | String(settings.frequencyPenalty),
469 | "float"
470 | );
471 | setting(
472 | "Presence penalty",
473 | "presencePenalty",
474 | String(settings.presencePenalty),
475 | "float"
476 | );
477 | setting("Prepend sequence", "prepend", settings.prepend, "string");
478 | setting("System prompt", "systemPrompt", settings.systemPrompt, "string");
479 | setting("User message", "userMessage", settings.userMessage, "string");
480 | }
481 |
482 | renderBookmarks(container: HTMLElement, state: NoteState) {
483 | const bookmarks = Object.entries(state.nodes).filter(
484 | ([, node]) => node.bookmarked
485 | );
486 |
487 | const bookmarksContainer = container.createDiv({ cls: "loom__bookmarks" });
488 |
489 | const bookmarksHeader = bookmarksContainer.createDiv({
490 | cls: "tree-item-self loom__tree-header",
491 | });
492 | bookmarksHeader.createSpan({
493 | cls: "tree-item-inner loom__tree-header-text",
494 | text: "Bookmarks",
495 | });
496 | bookmarksHeader.createSpan({
497 | cls: "tree-item-flair-outer loom__bookmarks-count",
498 | text: String(bookmarks.length),
499 | });
500 |
501 | for (const [id] of bookmarks)
502 | this.renderNode(bookmarksContainer, state, id, false);
503 | }
504 |
505 | renderTree(container: HTMLElement, state: NoteState) {
506 | container.empty();
507 |
508 | const treeHeader = container.createDiv({
509 | cls: "tree-item-self loom__tree-header",
510 | });
511 | let headerText;
512 | if (state.searchTerm) {
513 | if (state.hoisted.length > 0)
514 | headerText = "Search results under hoisted node";
515 | else headerText = "Search results";
516 | } else if (state.hoisted.length > 0) headerText = "Hoisted node";
517 | else headerText = "All nodes";
518 | treeHeader.createSpan({
519 | cls: "tree-item-inner loom__tree-header-text",
520 | text: headerText,
521 | });
522 |
523 | if (state.hoisted.length > 0)
524 | this.renderNode(
525 | container,
526 | state,
527 | state.hoisted[state.hoisted.length - 1],
528 | true
529 | );
530 | else {
531 | const rootIds = Object.entries(state.nodes)
532 | .filter(([, node]) => node.parentId === null)
533 | .map(([id]) => id);
534 | for (const rootId of rootIds)
535 | this.renderNode(container, state, rootId, true);
536 | }
537 | }
538 |
539 | renderNode(
540 | container: HTMLElement,
541 | state: NoteState,
542 | id: string,
543 | inTree: boolean
544 | ) {
545 | const node = state.nodes[id];
546 |
547 | if (inTree && node.searchResultState === "none") return;
548 |
549 | const branchContainer = container.createDiv({});
550 |
551 | const nodeContainer = branchContainer.createDiv({
552 | cls: "is-clickable outgoing-link-item tree-item-self loom__node",
553 | attr: { id: inTree ? `loom__node-${id}` : null },
554 | });
555 | if (id === state.current) nodeContainer.addClass("is-active");
556 | if (node.searchResultState === "result")
557 | nodeContainer.addClass("loom__node-search-result");
558 | if (node.unread) nodeContainer.addClass("loom__node-unread");
559 |
560 | const children = Object.entries(state.nodes)
561 | .filter(([, node]) => node.parentId === id)
562 | .map(([id]) => id);
563 |
564 | // if the node has children, add an expand/collapse button
565 |
566 | if (inTree && children.length > 0) {
567 | const collapseButton = nodeContainer.createDiv({
568 | cls: "collapse-icon loom__collapse-button",
569 | });
570 | if (node.collapsed) collapseButton.addClass("loom__is-collapsed");
571 | setIcon(collapseButton, "right-triangle");
572 |
573 | collapseButton.addEventListener("click", () =>
574 | this.app.workspace.trigger("loom:toggle-collapse", id)
575 | );
576 | }
577 |
578 | // if the node is bookmarked, add a bookmark icon
579 |
580 | if (node.bookmarked) {
581 | const bookmarkIcon = nodeContainer.createDiv({
582 | cls: "loom__node-bookmark-icon",
583 | });
584 | setIcon(bookmarkIcon, "bookmark");
585 | }
586 |
587 | // if the node is unread, add an unread indicator
588 |
589 | if (node.unread)
590 | nodeContainer.createDiv({ cls: "loom__node-unread-indicator" });
591 |
592 | // add the node's text
593 |
594 | const nodeText = nodeContainer.createEl(node.text.trim() ? "span" : "em", {
595 | cls: "tree-item-inner loom__node-text",
596 | text: node.text.trim() || "No text",
597 | });
598 | nodeText.addEventListener("click", () =>
599 | this.app.workspace.trigger("loom:switch-to", id)
600 | );
601 |
602 | const rootNodes = Object.entries(state.nodes).filter(
603 | ([, node]) => node.parentId === null
604 | );
605 | const deletable = rootNodes.length !== 1 || rootNodes[0][0] !== id;
606 |
607 | const nodeContext: NodeContext = {
608 | app: this.app,
609 | state,
610 | id,
611 | node,
612 | deletable,
613 | };
614 |
615 | nodeContainer.addEventListener("contextmenu", (event) => {
616 | event.preventDefault();
617 | showNodeMenu(event, nodeContext);
618 | });
619 |
620 | // add buttons on hover
621 |
622 | const nodeButtonsContainer = nodeContainer.createDiv({
623 | cls: "loom__node-buttons",
624 | });
625 |
626 | renderNodeButtons(nodeButtonsContainer, nodeContext);
627 |
628 | // indicate if loom is currently generating children for this node
629 |
630 | if (inTree && state.generating === id) {
631 | const generatingContainer = branchContainer.createDiv({
632 | cls: "loom__node-footer",
633 | });
634 | const generatingIcon = generatingContainer.createDiv({
635 | cls: "loom__node-generating-icon",
636 | });
637 | setIcon(generatingIcon, "loader-2");
638 | generatingContainer.createSpan({
639 | cls: "loom__node-footer-text",
640 | text: "Generating...",
641 | });
642 | }
643 |
644 | // if in a tree, and if the node isn't collapsed, render its children
645 |
646 | if (!inTree || node.collapsed) return;
647 |
648 | if (branchContainer.offsetWidth < 150) {
649 | if (children.length > 0) {
650 | const showMore = branchContainer.createDiv({
651 | cls: "loom__node-footer loom__node-show-more",
652 | });
653 | setIcon(showMore, "arrow-up");
654 | showMore.createSpan({
655 | cls: "loom__node-footer-text",
656 | text: "Show more...",
657 | });
658 |
659 | showMore.addEventListener("click", () =>
660 | this.app.workspace.trigger("loom:hoist", id)
661 | );
662 | }
663 |
664 | return;
665 | }
666 |
667 | const childrenContainer = branchContainer.createDiv({
668 | cls: "loom__node-children",
669 | });
670 | for (const childId of children)
671 | this.renderNode(childrenContainer, state, childId, true);
672 | }
673 |
674 | getViewType(): string {
675 | return "loom";
676 | }
677 |
678 | getDisplayText(): string {
679 | return "Loom";
680 | }
681 |
682 | getIcon(): string {
683 | return "network";
684 | }
685 | }
686 |
687 | export class LoomSiblingsView extends ItemView {
688 | getNoteState: () => NoteState | null;
689 |
690 | constructor(leaf: WorkspaceLeaf, getNoteState: () => NoteState | null) {
691 | super(leaf);
692 | this.getNoteState = getNoteState;
693 | this.render();
694 | }
695 |
696 | render() {
697 | const scroll = this.containerEl.scrollTop;
698 |
699 | this.containerEl.empty();
700 | this.containerEl.addClass("loom__view");
701 | const container = this.containerEl.createDiv({ cls: "outline" });
702 |
703 | const state = this.getNoteState();
704 |
705 | if (state === null) {
706 | container.createDiv({
707 | cls: "pane-empty",
708 | text: "No note selected.",
709 | });
710 | return;
711 | }
712 |
713 | const parentId = state.nodes[state.current].parentId;
714 | const siblings = Object.entries(state.nodes).filter(
715 | ([, node]) => node.parentId === parentId
716 | );
717 |
718 | let currentNodeContainer = null;
719 | for (const i in siblings) {
720 | const [id, node] = siblings[i];
721 |
722 | const nodeContainer = container.createDiv({
723 | cls: `loom__sibling${id === state.current ? " is-active" : ""}`,
724 | });
725 | if (parentId !== null)
726 | nodeContainer.createSpan({
727 | text: "…",
728 | cls: "loom__sibling-ellipsis",
729 | });
730 | nodeContainer.createSpan({ text: node.text.trim() });
731 | nodeContainer.addEventListener("click", () =>
732 | this.app.workspace.trigger("loom:switch-to", id)
733 | );
734 |
735 | const rootNodes = Object.entries(state.nodes).filter(
736 | ([, node]) => node.parentId === null
737 | );
738 | const deletable = rootNodes.length !== 1 || rootNodes[0][0] !== id;
739 |
740 | const nodeContext: NodeContext = {
741 | app: this.app,
742 | state,
743 | id,
744 | node,
745 | deletable,
746 | };
747 |
748 | const nodeButtonsContainer = nodeContainer.createDiv({
749 | cls: "loom__sibling-buttons",
750 | });
751 | renderNodeButtons(nodeButtonsContainer, nodeContext);
752 |
753 | nodeContainer.addEventListener("contextmenu", (event) => {
754 | event.preventDefault();
755 | showNodeMenu(event, nodeContext);
756 | });
757 |
758 | if (parseInt(i) !== siblings.length - 1)
759 | container.createEl("hr", { cls: "loom__sibling-separator" });
760 |
761 | if (id === state.current) currentNodeContainer = nodeContainer;
762 | }
763 |
764 | this.containerEl.scrollTop = scroll;
765 |
766 | if (currentNodeContainer !== null)
767 | currentNodeContainer.scrollIntoView({ block: "nearest" });
768 | }
769 |
770 | getViewType(): string {
771 | return "loom-siblings";
772 | }
773 |
774 | getDisplayText(): string {
775 | return "Siblings";
776 | }
777 |
778 | getIcon(): string {
779 | return "layout-list";
780 | }
781 | }
782 |
783 | export interface LoomEditorPluginState {
784 | ancestorLengths: [string, number][];
785 | showNodeBorders: boolean;
786 | }
787 |
788 | export class LoomEditorPlugin implements PluginValue {
789 | decorations: DecorationSet;
790 | state: LoomEditorPluginState;
791 |
792 | constructor() {
793 | this.decorations = Decoration.none;
794 | this.state = { ancestorLengths: [], showNodeBorders: false };
795 | }
796 |
797 | update() {
798 | let decorations: Range[] = [];
799 |
800 | const addRange = (from: number, to: number, id: string) => {
801 | try {
802 | const range = Decoration.mark({
803 | class: `loom__editor-node loom__editor-node-${id}`,
804 | }).range(from, to);
805 | decorations.push(range);
806 | } catch (e) {
807 | // this happens if the range is empty. it's ok. it's fine,
808 | }
809 | };
810 |
811 | const addBorder = (at: number) => {
812 | const range = Decoration.widget({
813 | widget: new LoomNodeBorderWidget(),
814 | side: -1,
815 | }).range(at, at);
816 | decorations.push(range);
817 | };
818 |
819 | let i = 0;
820 | for (const [id, length] of this.state.ancestorLengths) {
821 | addRange(i, i + length, id);
822 | i += length;
823 | if (this.state.showNodeBorders) addBorder(i);
824 | }
825 |
826 | this.decorations = Decoration.set(decorations);
827 | }
828 | }
829 |
830 | class LoomNodeBorderWidget extends WidgetType {
831 | toDOM() {
832 | const el = document.createElement("span");
833 | el.classList.add("loom__editor-node-border");
834 | return el;
835 | }
836 |
837 | eq() {
838 | return true;
839 | }
840 | }
841 |
842 | export const loomEditorPluginSpec: PluginSpec = {
843 | decorations: (plugin: LoomEditorPlugin) => plugin.decorations,
844 | eventHandlers: {
845 | mouseover: (event: MouseEvent, _view: EditorView) => {
846 | if (event.button !== 0) return false;
847 |
848 | const target = event.target as HTMLElement;
849 | if (!target.classList.contains("loom__editor-node")) return false;
850 |
851 | const className = target.classList[target.classList.length - 1];
852 | for (const el of [].slice.call(
853 | document.getElementsByClassName(className)
854 | ))
855 | el.classList.add("loom__editor-node-hover");
856 |
857 | return true;
858 | },
859 | mouseout: (event: MouseEvent, _view: EditorView) => {
860 | if (event.button !== 0) return false;
861 |
862 | const target = event.target as HTMLElement;
863 | if (!target.classList.contains("loom__editor-node")) return false;
864 |
865 | const className = target.classList[target.classList.length - 1];
866 | for (const el of [].slice.call(
867 | document.getElementsByClassName(className)
868 | ))
869 | el.classList.remove("loom__editor-node-hover");
870 |
871 | return true;
872 | },
873 | mousedown: (event: MouseEvent, _view: EditorView) => {
874 | if (event.button !== 0 || !event.shiftKey) return false;
875 |
876 | const target = event.target as HTMLElement;
877 | if (!target.classList.contains("loom__editor-node")) return false;
878 |
879 | // the second last element, since the last is `loom__editor-node-hover`
880 | const className = target.classList[target.classList.length - 2];
881 | const id = className.split("-").slice(2).join("-");
882 | // app.workspace.trigger("loom:switch-to", id); FIXME :3
883 |
884 | return true;
885 | },
886 | },
887 | };
888 |
889 | export class MakePromptFromPassagesModal extends Modal {
890 | getSettings: () => LoomSettings;
891 |
892 | constructor(app: App, getSettings: () => LoomSettings) {
893 | super(app);
894 | this.getSettings = getSettings;
895 | }
896 |
897 | onOpen() {
898 | this.contentEl.createDiv({
899 | cls: "modal-title",
900 | text: "Make prompt from passages",
901 | });
902 |
903 | const pathPrefix = this.getSettings()
904 | .passageFolder.trim()
905 | .replace(/\/?$/, "/");
906 | const passages = this.app.vault
907 | .getFiles()
908 | .filter(
909 | (file) => file.path.startsWith(pathPrefix) && file.extension === "md"
910 | )
911 | .sort((a, b) => b.stat.mtime - a.stat.mtime);
912 |
913 | let selectedPassages: string[] = [];
914 |
915 | const unselectedContainer = this.contentEl.createDiv({
916 | cls: "loom__passage-list",
917 | });
918 | this.contentEl.createDiv({
919 | cls: "loom__selected-passages-title",
920 | text: "Selected passages",
921 | });
922 | const selectedContainer = this.contentEl.createDiv({
923 | cls: "loom__passage-list loom__selected-passage-list",
924 | });
925 | let button: HTMLElement;
926 |
927 | const cleanName = (name: string) => name.slice(pathPrefix.length, -3);
928 |
929 | const renderPassageList = () => {
930 | unselectedContainer.empty();
931 | selectedContainer.empty();
932 |
933 | const unselectedPassages = passages.filter(
934 | (passage) => !selectedPassages.includes(passage.path)
935 | );
936 |
937 | for (const passage of unselectedPassages) {
938 | const passageContainer = unselectedContainer.createDiv({
939 | cls: "tree-item-self loom__passage",
940 | });
941 | passageContainer.createSpan({
942 | cls: "tree-item-inner",
943 | text: cleanName(passage.path),
944 | });
945 | passageContainer.addEventListener("click", () => {
946 | selectedPassages.push(passage.path);
947 | renderPassageList();
948 | });
949 | }
950 |
951 | if (selectedPassages.length === 0) {
952 | selectedContainer.createDiv({
953 | cls: "loom__no-passages-selected",
954 | text: "No passages selected.",
955 | });
956 | }
957 | for (const passage of selectedPassages) {
958 | const passageContainer = selectedContainer.createDiv({
959 | cls: "tree-item-self loom__passage",
960 | });
961 | passageContainer.createSpan({
962 | cls: "tree-item-inner",
963 | text: cleanName(passage),
964 | });
965 | passageContainer.addEventListener("click", () => {
966 | selectedPassages = selectedPassages.filter((p) => p !== passage);
967 | renderPassageList();
968 | });
969 | }
970 | };
971 |
972 | let separator = this.getSettings().defaultPassageSeparator;
973 | let passageFrontmatter = this.getSettings().defaultPassageFrontmatter;
974 |
975 | new Setting(this.contentEl)
976 | .setName("Separator")
977 | .setDesc("Use \\n to denote a newline.")
978 | .addText((text) =>
979 | text.setValue(separator).onChange((value) => (separator = value))
980 | );
981 | new Setting(this.contentEl)
982 | .setName("Passage frontmatter")
983 | .setDesc(
984 | "This will be added before each passage and at the end. %n: 1, 2, 3..., %r: I, II, III..."
985 | )
986 | .addText((text) =>
987 | text
988 | .setValue(passageFrontmatter)
989 | .onChange((value) => (passageFrontmatter = value))
990 | );
991 |
992 | const buttonContainer = this.contentEl.createDiv({
993 | cls: "modal-button-container",
994 | });
995 | button = buttonContainer.createEl("button", {
996 | cls: "mod-cta",
997 | text: "Submit",
998 | });
999 | button.addEventListener("click", () => {
1000 | if (selectedPassages.length === 0) return;
1001 |
1002 | this.app.workspace.trigger(
1003 | "loom:make-prompt-from-passages",
1004 | selectedPassages,
1005 | separator,
1006 | passageFrontmatter
1007 | );
1008 | this.close();
1009 | });
1010 |
1011 | renderPassageList();
1012 | }
1013 |
1014 | onClose() {
1015 | this.contentEl.empty();
1016 | }
1017 | }
1018 |
--------------------------------------------------------------------------------