@cobaltio/cobalt-js 8.2.0 → 8.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/cobalt.d.ts +31 -0
- package/cobalt.js +117 -11
- package/cobalt.ts +124 -11
- package/docs/assets/icons.js +17 -14
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +5 -4
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +69 -36
- package/docs/classes/Cobalt.html +34 -30
- package/docs/index.html +18 -15
- package/docs/interfaces/Application.html +12 -12
- package/docs/interfaces/CobaltOptions.html +4 -4
- package/docs/interfaces/ConfigPayload.html +6 -6
- package/docs/interfaces/EcosystemLead.html +2 -2
- package/docs/interfaces/EcosystemLeadPayload.html +2 -2
- package/docs/interfaces/InputField.html +8 -8
- package/docs/interfaces/Label.html +5 -5
- package/docs/interfaces/UpdateConfigPayload.html +7 -7
- package/docs/interfaces/WorkflowPayload.html +6 -6
- package/docs/modules.html +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/cobalt.d.ts
CHANGED
|
@@ -107,6 +107,12 @@ declare class Cobalt {
|
|
|
107
107
|
* @returns {Promise<unknown>}
|
|
108
108
|
*/
|
|
109
109
|
getAccountDetails(): Promise<unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the org & customer details for the associated token.
|
|
112
|
+
* @private
|
|
113
|
+
* @returns {Promise<unknown>}
|
|
114
|
+
*/
|
|
115
|
+
updateAccount(payload: Record<string, unknown>): Promise<unknown>;
|
|
110
116
|
/**
|
|
111
117
|
* Returns the list of enabled applications and their details.
|
|
112
118
|
* @returns {Promise<Application[]>} The list of applications.
|
|
@@ -186,5 +192,30 @@ declare class Cobalt {
|
|
|
186
192
|
* @returns {Promise<EcosystemLead>}
|
|
187
193
|
*/
|
|
188
194
|
createEcosystemLead(payload: EcosystemLeadPayload): Promise<EcosystemLead>;
|
|
195
|
+
/**
|
|
196
|
+
* Returns the specified field of the config.
|
|
197
|
+
* @param {String} slug The application slug.
|
|
198
|
+
* @param {String} fieldId The unique ID of the field.
|
|
199
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
200
|
+
* @returns {Promise<Field>} The specified config field.
|
|
201
|
+
*/
|
|
202
|
+
getConfigField(slug: string, fieldId: string, workflowId?: string): Promise<Config>;
|
|
203
|
+
/**
|
|
204
|
+
* Update the specified config field value.
|
|
205
|
+
* @param {String} slug The application slug.
|
|
206
|
+
* @param {String} fieldId The unique ID of the field.
|
|
207
|
+
* @param {String | Number | Boolean | null} value The new value for the field.
|
|
208
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
209
|
+
* @returns {Promise<Field>} The updated config field.
|
|
210
|
+
*/
|
|
211
|
+
updateConfigField(slug: string, fieldId: string, value: string | number | boolean | null, workflowId?: string): Promise<Config>;
|
|
212
|
+
/**
|
|
213
|
+
* Delete the specified config field value.
|
|
214
|
+
* @param {String} slug The application slug.
|
|
215
|
+
* @param {String} fieldId The unique ID of the field.
|
|
216
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
217
|
+
* @returns {Promise<unknown>}
|
|
218
|
+
*/
|
|
219
|
+
deleteConfigField(slug: string, fieldId: string, workflowId?: string): Promise<unknown>;
|
|
189
220
|
}
|
|
190
221
|
export { Cobalt };
|
package/cobalt.js
CHANGED
|
@@ -37,7 +37,31 @@ class Cobalt {
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
if (res.status >= 400 && res.status < 600) {
|
|
40
|
-
|
|
40
|
+
const error = yield res.json();
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
const data = yield res.json();
|
|
44
|
+
return data;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns the org & customer details for the associated token.
|
|
49
|
+
* @private
|
|
50
|
+
* @returns {Promise<unknown>}
|
|
51
|
+
*/
|
|
52
|
+
updateAccount(payload) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/public/linked-account`, {
|
|
55
|
+
method: "PUT",
|
|
56
|
+
headers: {
|
|
57
|
+
authorization: `Bearer ${this.token}`,
|
|
58
|
+
"content-type": "application/json",
|
|
59
|
+
},
|
|
60
|
+
body: JSON.stringify(Object.assign({}, payload)),
|
|
61
|
+
});
|
|
62
|
+
if (res.status >= 400 && res.status < 600) {
|
|
63
|
+
const error = yield res.json();
|
|
64
|
+
throw error;
|
|
41
65
|
}
|
|
42
66
|
const data = yield res.json();
|
|
43
67
|
return data;
|
|
@@ -58,7 +82,8 @@ class Cobalt {
|
|
|
58
82
|
},
|
|
59
83
|
});
|
|
60
84
|
if (res.status >= 400 && res.status < 600) {
|
|
61
|
-
|
|
85
|
+
const error = yield res.json();
|
|
86
|
+
throw error;
|
|
62
87
|
}
|
|
63
88
|
const data = yield res.json();
|
|
64
89
|
return data;
|
|
@@ -76,7 +101,8 @@ class Cobalt {
|
|
|
76
101
|
},
|
|
77
102
|
});
|
|
78
103
|
if (res.status >= 400 && res.status < 600) {
|
|
79
|
-
|
|
104
|
+
const error = yield res.json();
|
|
105
|
+
throw error;
|
|
80
106
|
}
|
|
81
107
|
const data = yield res.json();
|
|
82
108
|
return data;
|
|
@@ -98,7 +124,8 @@ class Cobalt {
|
|
|
98
124
|
},
|
|
99
125
|
});
|
|
100
126
|
if (res.status >= 400 && res.status < 600) {
|
|
101
|
-
|
|
127
|
+
const error = yield res.json();
|
|
128
|
+
throw error;
|
|
102
129
|
}
|
|
103
130
|
const data = yield res.json();
|
|
104
131
|
return data.auth_url;
|
|
@@ -141,6 +168,7 @@ class Cobalt {
|
|
|
141
168
|
})
|
|
142
169
|
.catch(e => {
|
|
143
170
|
console.error(e);
|
|
171
|
+
// connectWindow?.close();
|
|
144
172
|
clearInterval(interval);
|
|
145
173
|
reject(e);
|
|
146
174
|
});
|
|
@@ -177,7 +205,8 @@ class Cobalt {
|
|
|
177
205
|
body: JSON.stringify(Object.assign({}, payload)),
|
|
178
206
|
});
|
|
179
207
|
if (res.status >= 400 && res.status < 600) {
|
|
180
|
-
|
|
208
|
+
const error = yield res.json();
|
|
209
|
+
reject(error);
|
|
181
210
|
}
|
|
182
211
|
const data = yield res.json();
|
|
183
212
|
resolve(data.success);
|
|
@@ -203,7 +232,8 @@ class Cobalt {
|
|
|
203
232
|
},
|
|
204
233
|
});
|
|
205
234
|
if (res.status >= 400 && res.status < 600) {
|
|
206
|
-
|
|
235
|
+
const error = yield res.json();
|
|
236
|
+
throw error;
|
|
207
237
|
}
|
|
208
238
|
});
|
|
209
239
|
}
|
|
@@ -223,7 +253,8 @@ class Cobalt {
|
|
|
223
253
|
body: JSON.stringify(payload),
|
|
224
254
|
});
|
|
225
255
|
if (res.status >= 400 && res.status < 600) {
|
|
226
|
-
|
|
256
|
+
const error = yield res.json();
|
|
257
|
+
throw error;
|
|
227
258
|
}
|
|
228
259
|
return yield res.json();
|
|
229
260
|
});
|
|
@@ -242,7 +273,8 @@ class Cobalt {
|
|
|
242
273
|
},
|
|
243
274
|
});
|
|
244
275
|
if (res.status >= 400 && res.status < 600) {
|
|
245
|
-
|
|
276
|
+
const error = yield res.json();
|
|
277
|
+
throw error;
|
|
246
278
|
}
|
|
247
279
|
return yield res.json();
|
|
248
280
|
});
|
|
@@ -263,7 +295,8 @@ class Cobalt {
|
|
|
263
295
|
body: JSON.stringify(payload),
|
|
264
296
|
});
|
|
265
297
|
if (res.status >= 400 && res.status < 600) {
|
|
266
|
-
|
|
298
|
+
const error = yield res.json();
|
|
299
|
+
throw error;
|
|
267
300
|
}
|
|
268
301
|
return yield res.json();
|
|
269
302
|
});
|
|
@@ -283,7 +316,8 @@ class Cobalt {
|
|
|
283
316
|
},
|
|
284
317
|
});
|
|
285
318
|
if (res.status >= 400 && res.status < 600) {
|
|
286
|
-
|
|
319
|
+
const error = yield res.json();
|
|
320
|
+
throw error;
|
|
287
321
|
}
|
|
288
322
|
return yield res.json();
|
|
289
323
|
});
|
|
@@ -304,7 +338,79 @@ class Cobalt {
|
|
|
304
338
|
body: JSON.stringify(payload),
|
|
305
339
|
});
|
|
306
340
|
if (res.status >= 400 && res.status < 600) {
|
|
307
|
-
|
|
341
|
+
const error = yield res.json();
|
|
342
|
+
throw error;
|
|
343
|
+
}
|
|
344
|
+
return yield res.json();
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Returns the specified field of the config.
|
|
349
|
+
* @param {String} slug The application slug.
|
|
350
|
+
* @param {String} fieldId The unique ID of the field.
|
|
351
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
352
|
+
* @returns {Promise<Field>} The specified config field.
|
|
353
|
+
*/
|
|
354
|
+
getConfigField(slug, fieldId, workflowId) {
|
|
355
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/public/config/field/${fieldId}${workflowId ? `?workflow_id=${workflowId}` : ""}`, {
|
|
357
|
+
headers: {
|
|
358
|
+
authorization: `Bearer ${this.token}`,
|
|
359
|
+
slug,
|
|
360
|
+
},
|
|
361
|
+
});
|
|
362
|
+
if (res.status >= 400 && res.status < 600) {
|
|
363
|
+
const error = yield res.json();
|
|
364
|
+
throw error;
|
|
365
|
+
}
|
|
366
|
+
return yield res.json();
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Update the specified config field value.
|
|
371
|
+
* @param {String} slug The application slug.
|
|
372
|
+
* @param {String} fieldId The unique ID of the field.
|
|
373
|
+
* @param {String | Number | Boolean | null} value The new value for the field.
|
|
374
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
375
|
+
* @returns {Promise<Field>} The updated config field.
|
|
376
|
+
*/
|
|
377
|
+
updateConfigField(slug, fieldId, value, workflowId) {
|
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/public/config/field/${fieldId}${workflowId ? `?workflow_id=${workflowId}` : ""}`, {
|
|
380
|
+
method: "PUT",
|
|
381
|
+
headers: {
|
|
382
|
+
authorization: `Bearer ${this.token}`,
|
|
383
|
+
"content-type": "application/json",
|
|
384
|
+
slug,
|
|
385
|
+
},
|
|
386
|
+
body: JSON.stringify({ value }),
|
|
387
|
+
});
|
|
388
|
+
if (res.status >= 400 && res.status < 600) {
|
|
389
|
+
const error = yield res.json();
|
|
390
|
+
throw error;
|
|
391
|
+
}
|
|
392
|
+
return yield res.json();
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Delete the specified config field value.
|
|
397
|
+
* @param {String} slug The application slug.
|
|
398
|
+
* @param {String} fieldId The unique ID of the field.
|
|
399
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
400
|
+
* @returns {Promise<unknown>}
|
|
401
|
+
*/
|
|
402
|
+
deleteConfigField(slug, fieldId, workflowId) {
|
|
403
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
404
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/public/config/field/${fieldId}${workflowId ? `?workflow_id=${workflowId}` : ""}`, {
|
|
405
|
+
method: "DELETE",
|
|
406
|
+
headers: {
|
|
407
|
+
authorization: `Bearer ${this.token}`,
|
|
408
|
+
slug,
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
if (res.status >= 400 && res.status < 600) {
|
|
412
|
+
const error = yield res.json();
|
|
413
|
+
throw error;
|
|
308
414
|
}
|
|
309
415
|
return yield res.json();
|
|
310
416
|
});
|
package/cobalt.ts
CHANGED
|
@@ -101,6 +101,7 @@ export interface EcosystemLeadPayload {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
type Config = any;
|
|
104
|
+
type Field = any;
|
|
104
105
|
|
|
105
106
|
class Cobalt {
|
|
106
107
|
private baseUrl: string;
|
|
@@ -130,7 +131,34 @@ class Cobalt {
|
|
|
130
131
|
});
|
|
131
132
|
|
|
132
133
|
if (res.status >= 400 && res.status < 600) {
|
|
133
|
-
|
|
134
|
+
const error = await res.json();
|
|
135
|
+
throw error;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const data = await res.json();
|
|
139
|
+
return data;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Returns the org & customer details for the associated token.
|
|
144
|
+
* @private
|
|
145
|
+
* @returns {Promise<unknown>}
|
|
146
|
+
*/
|
|
147
|
+
public async updateAccount(payload: Record<string, unknown>): Promise<unknown> {
|
|
148
|
+
const res = await fetch(`${this.baseUrl}/api/v2/public/linked-account`, {
|
|
149
|
+
method: "PUT",
|
|
150
|
+
headers: {
|
|
151
|
+
authorization: `Bearer ${this.token}`,
|
|
152
|
+
"content-type": "application/json",
|
|
153
|
+
},
|
|
154
|
+
body: JSON.stringify({
|
|
155
|
+
...payload,
|
|
156
|
+
}),
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
if (res.status >= 400 && res.status < 600) {
|
|
160
|
+
const error = await res.json();
|
|
161
|
+
throw error;
|
|
134
162
|
}
|
|
135
163
|
|
|
136
164
|
const data = await res.json();
|
|
@@ -164,7 +192,8 @@ class Cobalt {
|
|
|
164
192
|
});
|
|
165
193
|
|
|
166
194
|
if (res.status >= 400 && res.status < 600) {
|
|
167
|
-
|
|
195
|
+
const error = await res.json();
|
|
196
|
+
throw error;
|
|
168
197
|
}
|
|
169
198
|
|
|
170
199
|
const data = await res.json();
|
|
@@ -183,7 +212,8 @@ class Cobalt {
|
|
|
183
212
|
});
|
|
184
213
|
|
|
185
214
|
if (res.status >= 400 && res.status < 600) {
|
|
186
|
-
|
|
215
|
+
const error = await res.json();
|
|
216
|
+
throw error;
|
|
187
217
|
}
|
|
188
218
|
|
|
189
219
|
const data = await res.json();
|
|
@@ -206,7 +236,8 @@ class Cobalt {
|
|
|
206
236
|
});
|
|
207
237
|
|
|
208
238
|
if (res.status >= 400 && res.status < 600) {
|
|
209
|
-
|
|
239
|
+
const error = await res.json();
|
|
240
|
+
throw error;
|
|
210
241
|
}
|
|
211
242
|
|
|
212
243
|
const data = await res.json();
|
|
@@ -249,6 +280,7 @@ class Cobalt {
|
|
|
249
280
|
})
|
|
250
281
|
.catch(e => {
|
|
251
282
|
console.error(e);
|
|
283
|
+
// connectWindow?.close();
|
|
252
284
|
clearInterval(interval);
|
|
253
285
|
reject(e);
|
|
254
286
|
});
|
|
@@ -287,7 +319,8 @@ class Cobalt {
|
|
|
287
319
|
});
|
|
288
320
|
|
|
289
321
|
if (res.status >= 400 && res.status < 600) {
|
|
290
|
-
|
|
322
|
+
const error = await res.json();
|
|
323
|
+
reject(error);
|
|
291
324
|
}
|
|
292
325
|
|
|
293
326
|
const data = await res.json();
|
|
@@ -313,7 +346,8 @@ class Cobalt {
|
|
|
313
346
|
});
|
|
314
347
|
|
|
315
348
|
if (res.status >= 400 && res.status < 600) {
|
|
316
|
-
|
|
349
|
+
const error = await res.json();
|
|
350
|
+
throw error;
|
|
317
351
|
}
|
|
318
352
|
}
|
|
319
353
|
|
|
@@ -333,7 +367,8 @@ class Cobalt {
|
|
|
333
367
|
});
|
|
334
368
|
|
|
335
369
|
if (res.status >= 400 && res.status < 600) {
|
|
336
|
-
|
|
370
|
+
const error = await res.json();
|
|
371
|
+
throw error;
|
|
337
372
|
}
|
|
338
373
|
|
|
339
374
|
return await res.json();
|
|
@@ -353,7 +388,8 @@ class Cobalt {
|
|
|
353
388
|
});
|
|
354
389
|
|
|
355
390
|
if (res.status >= 400 && res.status < 600) {
|
|
356
|
-
|
|
391
|
+
const error = await res.json();
|
|
392
|
+
throw error;
|
|
357
393
|
}
|
|
358
394
|
|
|
359
395
|
return await res.json();
|
|
@@ -375,7 +411,8 @@ class Cobalt {
|
|
|
375
411
|
});
|
|
376
412
|
|
|
377
413
|
if (res.status >= 400 && res.status < 600) {
|
|
378
|
-
|
|
414
|
+
const error = await res.json();
|
|
415
|
+
throw error;
|
|
379
416
|
}
|
|
380
417
|
|
|
381
418
|
return await res.json();
|
|
@@ -396,7 +433,8 @@ class Cobalt {
|
|
|
396
433
|
});
|
|
397
434
|
|
|
398
435
|
if (res.status >= 400 && res.status < 600) {
|
|
399
|
-
|
|
436
|
+
const error = await res.json();
|
|
437
|
+
throw error;
|
|
400
438
|
}
|
|
401
439
|
|
|
402
440
|
return await res.json();
|
|
@@ -418,7 +456,82 @@ class Cobalt {
|
|
|
418
456
|
});
|
|
419
457
|
|
|
420
458
|
if (res.status >= 400 && res.status < 600) {
|
|
421
|
-
|
|
459
|
+
const error = await res.json();
|
|
460
|
+
throw error;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
return await res.json();
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Returns the specified field of the config.
|
|
468
|
+
* @param {String} slug The application slug.
|
|
469
|
+
* @param {String} fieldId The unique ID of the field.
|
|
470
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
471
|
+
* @returns {Promise<Field>} The specified config field.
|
|
472
|
+
*/
|
|
473
|
+
async getConfigField(slug: string, fieldId: string, workflowId?: string): Promise<Config> {
|
|
474
|
+
const res = await fetch(`${this.baseUrl}/api/v2/public/config/field/${fieldId}${workflowId ? `?workflow_id=${workflowId}` : ""}`, {
|
|
475
|
+
headers: {
|
|
476
|
+
authorization: `Bearer ${this.token}`,
|
|
477
|
+
slug,
|
|
478
|
+
},
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
if (res.status >= 400 && res.status < 600) {
|
|
482
|
+
const error = await res.json();
|
|
483
|
+
throw error;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
return await res.json();
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Update the specified config field value.
|
|
491
|
+
* @param {String} slug The application slug.
|
|
492
|
+
* @param {String} fieldId The unique ID of the field.
|
|
493
|
+
* @param {String | Number | Boolean | null} value The new value for the field.
|
|
494
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
495
|
+
* @returns {Promise<Field>} The updated config field.
|
|
496
|
+
*/
|
|
497
|
+
async updateConfigField(slug: string, fieldId: string, value: string | number | boolean | null, workflowId?: string): Promise<Config> {
|
|
498
|
+
const res = await fetch(`${this.baseUrl}/api/v2/public/config/field/${fieldId}${workflowId ? `?workflow_id=${workflowId}` : ""}`, {
|
|
499
|
+
method: "PUT",
|
|
500
|
+
headers: {
|
|
501
|
+
authorization: `Bearer ${this.token}`,
|
|
502
|
+
"content-type": "application/json",
|
|
503
|
+
slug,
|
|
504
|
+
},
|
|
505
|
+
body: JSON.stringify({ value }),
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
if (res.status >= 400 && res.status < 600) {
|
|
509
|
+
const error = await res.json();
|
|
510
|
+
throw error;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return await res.json();
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Delete the specified config field value.
|
|
518
|
+
* @param {String} slug The application slug.
|
|
519
|
+
* @param {String} fieldId The unique ID of the field.
|
|
520
|
+
* @param {String} [workflowId] The unique ID of the workflow.
|
|
521
|
+
* @returns {Promise<unknown>}
|
|
522
|
+
*/
|
|
523
|
+
async deleteConfigField(slug: string, fieldId: string, workflowId?: string): Promise<unknown> {
|
|
524
|
+
const res = await fetch(`${this.baseUrl}/api/v2/public/config/field/${fieldId}${workflowId ? `?workflow_id=${workflowId}` : ""}`, {
|
|
525
|
+
method: "DELETE",
|
|
526
|
+
headers: {
|
|
527
|
+
authorization: `Bearer ${this.token}`,
|
|
528
|
+
slug,
|
|
529
|
+
},
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
if (res.status >= 400 && res.status < 600) {
|
|
533
|
+
const error = await res.json();
|
|
534
|
+
throw error;
|
|
422
535
|
}
|
|
423
536
|
|
|
424
537
|
return await res.json();
|
package/docs/assets/icons.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
svg.innerHTML = `<g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-checkbox"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g>`;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
else updateUseElements()
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (el.getAttribute('href').includes('#icon-')) {
|
|
10
|
-
el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#'));
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
(function() {
|
|
2
|
+
addIcons();
|
|
3
|
+
function addIcons() {
|
|
4
|
+
if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
|
|
5
|
+
const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
|
|
6
|
+
svg.innerHTML = `"<g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-8388608"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-text)" fill="var(--color-icon-background)"><polygon points="6,5 6,19 18,19, 18,9 15,5"></polygon><line x1="9" y1="9" x2="14" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-checkbox"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g>"`;
|
|
7
|
+
svg.style.display = "none";
|
|
8
|
+
if (location.protocol === "file:") updateUseElements();
|
|
14
9
|
}
|
|
15
|
-
|
|
10
|
+
|
|
11
|
+
function updateUseElements() {
|
|
12
|
+
document.querySelectorAll("use").forEach(el => {
|
|
13
|
+
if (el.getAttribute("href").includes("#icon-")) {
|
|
14
|
+
el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
})()
|