@testsmith/api-spector 0.0.7 → 0.0.8

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.
@@ -1,511 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
- const promises = require("fs/promises");
25
- const path = require("path");
26
- const crypto = require("crypto");
27
- const vm = require("vm");
28
- const dayjs = require("dayjs");
29
- const tv4 = require("tv4");
30
- const jsonpathPlus = require("jsonpath-plus");
31
- const xmldom = require("@xmldom/xmldom");
32
- function _interopNamespaceDefault(e) {
33
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
34
- if (e) {
35
- for (const k in e) {
36
- if (k !== "default") {
37
- const d = Object.getOwnPropertyDescriptor(e, k);
38
- Object.defineProperty(n, k, d.get ? d : {
39
- enumerable: true,
40
- get: () => e[k]
41
- });
42
- }
43
- }
44
- }
45
- n.default = e;
46
- return Object.freeze(n);
47
- }
48
- const vm__namespace = /* @__PURE__ */ _interopNamespaceDefault(vm);
49
- let globals = {};
50
- let currentDir = null;
51
- function globalsPath(dir) {
52
- return path.join(dir, "globals.json");
53
- }
54
- async function loadGlobals(workspaceDir) {
55
- currentDir = workspaceDir;
56
- try {
57
- const raw = await promises.readFile(globalsPath(workspaceDir), "utf8");
58
- globals = JSON.parse(raw);
59
- } catch {
60
- globals = {};
61
- }
62
- return { ...globals };
63
- }
64
- async function persistGlobals() {
65
- if (!currentDir) return;
66
- await promises.writeFile(globalsPath(currentDir), JSON.stringify(globals, null, 2), "utf8");
67
- }
68
- function getGlobals() {
69
- return { ...globals };
70
- }
71
- function setGlobals(next) {
72
- globals = { ...next };
73
- }
74
- function patchGlobals(patch) {
75
- globals = { ...globals, ...patch };
76
- }
77
- const MASTER_KEY_ENV = "API_SPECTOR_MASTER_KEY";
78
- let secretStore = {};
79
- let secretStorePath = null;
80
- async function initSecretStore(userDataPath) {
81
- secretStorePath = path.join(userDataPath, "secrets.json");
82
- try {
83
- const raw = await promises.readFile(secretStorePath, "utf8");
84
- secretStore = JSON.parse(raw);
85
- } catch {
86
- secretStore = {};
87
- }
88
- }
89
- async function persistSecretStore() {
90
- if (!secretStorePath) return;
91
- await promises.writeFile(secretStorePath, JSON.stringify(secretStore, null, 2), "utf8");
92
- }
93
- function getSafeStorage() {
94
- try {
95
- const { safeStorage } = require("electron");
96
- if (typeof safeStorage?.isEncryptionAvailable === "function") return safeStorage;
97
- return null;
98
- } catch {
99
- return null;
100
- }
101
- }
102
- function registerSecretHandlers(ipc) {
103
- ipc.handle("secret:checkMasterKey", () => {
104
- return { set: Boolean(process.env[MASTER_KEY_ENV]) };
105
- });
106
- ipc.handle("secret:setMasterKey", (_e, value) => {
107
- process.env[MASTER_KEY_ENV] = value;
108
- });
109
- ipc.handle("secret:set", async (_e, ref, value) => {
110
- const ss = getSafeStorage();
111
- if (!ss || !ss.isEncryptionAvailable()) {
112
- throw new Error("OS encryption is not available — set the secret via environment variable instead");
113
- }
114
- secretStore[ref] = ss.encryptString(value).toString("base64");
115
- await persistSecretStore();
116
- });
117
- }
118
- function decryptSecret(encrypted, salt, iv, password) {
119
- const saltBuf = Buffer.from(salt, "base64");
120
- const ivBuf = Buffer.from(iv, "base64");
121
- const encBuf = Buffer.from(encrypted, "base64");
122
- const key = crypto.pbkdf2Sync(password, saltBuf, 1e5, 32, "sha256");
123
- const authTag = encBuf.subarray(encBuf.length - 16);
124
- const ciphertext = encBuf.subarray(0, encBuf.length - 16);
125
- const decipher = crypto.createDecipheriv("aes-256-gcm", key, ivBuf);
126
- decipher.setAuthTag(authTag);
127
- return Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString("utf8");
128
- }
129
- async function getSecret(ref) {
130
- const stored = secretStore[ref];
131
- if (stored) {
132
- const ss = getSafeStorage();
133
- if (ss && ss.isEncryptionAvailable()) {
134
- try {
135
- return ss.decryptString(Buffer.from(stored, "base64"));
136
- } catch {
137
- }
138
- }
139
- }
140
- return process.env[ref] ?? null;
141
- }
142
- function interpolate(str, vars) {
143
- return str.replace(/\{\{([^}]+)\}\}/g, (_, key) => vars[key.trim()] ?? `{{${key}}}`);
144
- }
145
- function buildUrl(baseUrl, params, vars) {
146
- const url = interpolate(baseUrl, vars);
147
- const enabled = params.filter((p) => p.enabled && p.key);
148
- if (!enabled.length) return url;
149
- const sep = url.includes("?") ? "&" : "?";
150
- const qs = enabled.map((p) => `${encodeURIComponent(interpolate(p.key, vars))}=${encodeURIComponent(interpolate(p.value, vars))}`).join("&");
151
- return url + sep + qs;
152
- }
153
- async function buildEnvVars(environment) {
154
- const vars = {};
155
- if (!environment) return vars;
156
- const masterKey = process.env["API_SPECTOR_MASTER_KEY"];
157
- for (const v of environment.variables) {
158
- if (!v.enabled) continue;
159
- if (v.envRef) {
160
- const envValue = process.env[v.envRef];
161
- if (envValue !== void 0) vars[v.key] = envValue;
162
- } else if (v.secret && v.secretEncrypted && v.secretSalt && v.secretIv) {
163
- if (masterKey) {
164
- try {
165
- vars[v.key] = decryptSecret(v.secretEncrypted, v.secretSalt, v.secretIv, masterKey);
166
- } catch {
167
- }
168
- }
169
- } else {
170
- vars[v.key] = v.value;
171
- }
172
- }
173
- return vars;
174
- }
175
- function mergeVars(envVars, collectionVars, globals2, localVars = {}) {
176
- return { ...globals2, ...collectionVars, ...envVars, ...localVars };
177
- }
178
- function xmlFindAll(node, tag, nth) {
179
- const results = [];
180
- const siblings = Array.from(node.childNodes).filter((c) => c.nodeType === 1 && c.tagName === tag);
181
- if (siblings[nth]) results.push(siblings[nth]);
182
- for (const child of Array.from(node.childNodes)) {
183
- if (child.nodeType === 1) results.push(...xmlFindAll(child, tag, nth));
184
- }
185
- return results;
186
- }
187
- function xmlQuerySelector(root, selector) {
188
- const parts = selector.trim().split(/\s*>\s*/);
189
- const m0 = parts[0].match(/^([A-Za-z0-9_:.-]+?)(?::nth-of-type\((\d+)\))?$/);
190
- if (!m0) return null;
191
- let candidates = xmlFindAll(root, m0[1], m0[2] ? parseInt(m0[2]) - 1 : 0);
192
- for (let i = 1; i < parts.length; i++) {
193
- const m = parts[i].match(/^([A-Za-z0-9_:.-]+?)(?::nth-of-type\((\d+)\))?$/);
194
- if (!m) return null;
195
- const tag = m[1];
196
- const idx = m[2] ? parseInt(m[2]) - 1 : 0;
197
- const next = [];
198
- for (const node of candidates) {
199
- const children = Array.from(node.childNodes).filter((c) => c.nodeType === 1 && c.tagName === tag);
200
- if (children[idx]) next.push(children[idx]);
201
- }
202
- candidates = next;
203
- }
204
- return candidates[0] ?? null;
205
- }
206
- function makeSandboxDOMParser() {
207
- return {
208
- parseFromString(str, mime) {
209
- const doc = new xmldom.DOMParser().parseFromString(str, mime);
210
- doc.querySelector = (sel) => xmlQuerySelector(doc, sel);
211
- return doc;
212
- }
213
- };
214
- }
215
- let _fakerCache = null;
216
- async function getFaker() {
217
- if (!_fakerCache) _fakerCache = await import("@faker-js/faker");
218
- return _fakerCache.faker;
219
- }
220
- function makeAsserter(value, negated = false) {
221
- function doAssert(condition, msg) {
222
- const passed = negated ? !condition : condition;
223
- if (!passed) throw new AssertionError(msg);
224
- }
225
- const asserter = {};
226
- const chainer = { get: () => asserter };
227
- for (const key of ["to", "be", "been", "have", "that", "and", "is", "deep"]) {
228
- Object.defineProperty(asserter, key, chainer);
229
- }
230
- Object.defineProperty(asserter, "not", { get: () => makeAsserter(value, !negated) });
231
- Object.defineProperty(asserter, "ok", { get: () => {
232
- doAssert(Boolean(value), `Expected ${JSON.stringify(value)} to be truthy`);
233
- return asserter;
234
- } });
235
- Object.defineProperty(asserter, "true", { get: () => {
236
- doAssert(value === true, `Expected ${JSON.stringify(value)} to be true`);
237
- return asserter;
238
- } });
239
- Object.defineProperty(asserter, "false", { get: () => {
240
- doAssert(value === false, `Expected ${JSON.stringify(value)} to be false`);
241
- return asserter;
242
- } });
243
- Object.defineProperty(asserter, "null", { get: () => {
244
- doAssert(value === null, `Expected ${JSON.stringify(value)} to be null`);
245
- return asserter;
246
- } });
247
- Object.defineProperty(asserter, "undefined", { get: () => {
248
- doAssert(value === void 0, `Expected value to be undefined`);
249
- return asserter;
250
- } });
251
- asserter.equal = (expected) => {
252
- doAssert(
253
- value === expected,
254
- `Expected ${JSON.stringify(value)} to ${negated ? "not " : ""}equal ${JSON.stringify(expected)}`
255
- );
256
- return asserter;
257
- };
258
- asserter.eq = asserter.equal;
259
- asserter.eql = (expected) => {
260
- doAssert(
261
- JSON.stringify(value) === JSON.stringify(expected),
262
- `Expected deep equal: ${JSON.stringify(value)} ${negated ? "!=" : "=="} ${JSON.stringify(expected)}`
263
- );
264
- return asserter;
265
- };
266
- asserter.include = (substr) => {
267
- if (typeof value === "string") {
268
- doAssert(
269
- value.includes(String(substr)),
270
- `Expected "${value}" to ${negated ? "not " : ""}include "${substr}"`
271
- );
272
- } else if (Array.isArray(value)) {
273
- doAssert(
274
- value.includes(substr),
275
- `Expected array to ${negated ? "not " : ""}include ${JSON.stringify(substr)}`
276
- );
277
- }
278
- return asserter;
279
- };
280
- asserter.contain = asserter.include;
281
- asserter.property = (name, expected) => {
282
- doAssert(
283
- value != null && name in Object(value),
284
- `Expected object to ${negated ? "not " : ""}have property "${name}"`
285
- );
286
- if (expected !== void 0) {
287
- doAssert(
288
- value[name] === expected,
289
- `Expected property "${name}" to equal ${JSON.stringify(expected)}`
290
- );
291
- }
292
- return asserter;
293
- };
294
- asserter.a = (type) => {
295
- const actual = Array.isArray(value) ? "array" : typeof value;
296
- doAssert(
297
- actual === type,
298
- `Expected ${JSON.stringify(value)} to ${negated ? "not " : ""}be a ${type}`
299
- );
300
- return asserter;
301
- };
302
- asserter.above = (n) => {
303
- doAssert(value > n, `Expected ${value} to ${negated ? "not " : ""}be above ${n}`);
304
- return asserter;
305
- };
306
- asserter.below = (n) => {
307
- doAssert(value < n, `Expected ${value} to ${negated ? "not " : ""}be below ${n}`);
308
- return asserter;
309
- };
310
- asserter.least = (n) => {
311
- doAssert(value >= n, `Expected ${value} to ${negated ? "not " : ""}be at least ${n}`);
312
- return asserter;
313
- };
314
- asserter.most = (n) => {
315
- doAssert(value <= n, `Expected ${value} to ${negated ? "not " : ""}be at most ${n}`);
316
- return asserter;
317
- };
318
- asserter.gt = asserter.above;
319
- asserter.gte = asserter.least;
320
- asserter.lt = asserter.below;
321
- asserter.lte = asserter.most;
322
- asserter.oneOf = (list) => {
323
- doAssert(
324
- list.includes(value),
325
- `Expected ${JSON.stringify(value)} to ${negated ? "not " : ""}be one of ${JSON.stringify(list)}`
326
- );
327
- return asserter;
328
- };
329
- asserter.lengthOf = (n) => {
330
- const len = value.length;
331
- doAssert(
332
- len === n,
333
- `Expected length ${len} to ${negated ? "not " : ""}equal ${n}`
334
- );
335
- return asserter;
336
- };
337
- asserter.match = (re) => {
338
- doAssert(
339
- re.test(String(value)),
340
- `Expected "${value}" to ${negated ? "not " : ""}match ${re}`
341
- );
342
- return asserter;
343
- };
344
- return asserter;
345
- }
346
- class AssertionError extends Error {
347
- constructor(message) {
348
- super(message);
349
- this.name = "AssertionError";
350
- }
351
- }
352
- function buildAt(ctx, testResults, consoleOutput) {
353
- const { envVars, collectionVars, globals: globals2, localVars } = ctx;
354
- function makeVarScope(store, scopeName) {
355
- return {
356
- get: (key) => store[key] ?? null,
357
- set: (key, value) => {
358
- store[key] = String(value);
359
- consoleOutput.push(`[set] ${scopeName}.${key} = ${JSON.stringify(String(value))}`);
360
- },
361
- clear: (key) => {
362
- delete store[key];
363
- consoleOutput.push(`[set] ${scopeName}.${key} cleared`);
364
- },
365
- has: (key) => key in store,
366
- toObject: () => ({ ...store })
367
- };
368
- }
369
- const sp = {
370
- // Variable scopes
371
- variables: makeVarScope(localVars, "variables"),
372
- environment: makeVarScope(envVars, "environment"),
373
- collectionVariables: makeVarScope(collectionVars, "collectionVariables"),
374
- globals: makeVarScope(globals2, "globals"),
375
- // Convenience: get/set across all scopes (local wins)
376
- variables_get: (key) => localVars[key] ?? envVars[key] ?? collectionVars[key] ?? globals2[key] ?? null,
377
- variables_set: (key, value) => {
378
- localVars[key] = String(value);
379
- },
380
- // Test runner
381
- test: (name, fn) => {
382
- try {
383
- fn();
384
- testResults.push({ name, passed: true });
385
- } catch (err) {
386
- testResults.push({
387
- name,
388
- passed: false,
389
- error: err instanceof Error ? err.message : String(err)
390
- });
391
- }
392
- },
393
- // Expect / assertions
394
- expect: (value) => makeAsserter(value, false),
395
- // JSONPath query: sp.jsonPath(data, '$.store.book[?(@.price < 10)].title')
396
- jsonPath: (data, expr) => jsonpathPlus.JSONPath({ path: expr, json: data })
397
- };
398
- if (ctx.response) {
399
- const resp = ctx.response;
400
- let parsedJson = void 0;
401
- sp.response = {
402
- code: resp.status,
403
- status: `${resp.status} ${resp.statusText}`,
404
- statusText: resp.statusText,
405
- responseTime: resp.durationMs,
406
- responseSize: resp.bodySize,
407
- headers: {
408
- get: (name) => resp.headers[name.toLowerCase()] ?? null,
409
- toObject: () => resp.headers
410
- },
411
- json: () => {
412
- if (parsedJson === void 0) parsedJson = JSON.parse(resp.body);
413
- return parsedJson;
414
- },
415
- text: () => resp.body,
416
- xmlText: (selector) => {
417
- const doc = new xmldom.DOMParser().parseFromString(resp.body, "text/xml");
418
- const node = xmlQuerySelector(doc, selector);
419
- return node ? String(node.textContent ?? "").trim() : null;
420
- },
421
- to: {
422
- have: {
423
- status: (code) => {
424
- if (resp.status !== code) throw new AssertionError(`Expected status ${resp.status} to be ${code}`);
425
- }
426
- }
427
- }
428
- };
429
- }
430
- return sp;
431
- }
432
- async function runScript(code, ctx, timeoutMs = 5e3) {
433
- const faker = await getFaker();
434
- const testResults = [];
435
- const consoleOutput = [];
436
- const envVarsCopy = { ...ctx.envVars };
437
- const collectionCopy = { ...ctx.collectionVars };
438
- const globalsCopy = { ...ctx.globals };
439
- const localVarsCopy = { ...ctx.localVars };
440
- const scriptCtx = {
441
- envVars: envVarsCopy,
442
- collectionVars: collectionCopy,
443
- globals: globalsCopy,
444
- localVars: localVarsCopy,
445
- response: ctx.response
446
- };
447
- const sp = buildAt(scriptCtx, testResults, consoleOutput);
448
- const captureConsole = {
449
- log: (...args) => consoleOutput.push(args.map(String).join(" ")),
450
- warn: (...args) => consoleOutput.push("[warn] " + args.map(String).join(" ")),
451
- error: (...args) => consoleOutput.push("[error] " + args.map(String).join(" ")),
452
- info: (...args) => consoleOutput.push("[info] " + args.map(String).join(" "))
453
- };
454
- const sandbox = {
455
- sp,
456
- DOMParser: makeSandboxDOMParser,
457
- dayjs,
458
- faker,
459
- tv4,
460
- console: captureConsole,
461
- JSON,
462
- Math,
463
- Date,
464
- parseInt,
465
- parseFloat,
466
- isNaN,
467
- isFinite,
468
- encodeURIComponent,
469
- decodeURIComponent,
470
- btoa: (s) => Buffer.from(s, "binary").toString("base64"),
471
- atob: (s) => Buffer.from(s, "base64").toString("binary"),
472
- setTimeout: void 0,
473
- // not available in sync vm context
474
- setInterval: void 0
475
- };
476
- try {
477
- vm__namespace.runInNewContext(code, sandbox, { timeout: timeoutMs, filename: "script.js" });
478
- } catch (err) {
479
- const message = err instanceof Error ? err.message : String(err);
480
- return {
481
- testResults,
482
- consoleOutput,
483
- updatedEnvVars: envVarsCopy,
484
- updatedCollectionVars: collectionCopy,
485
- updatedGlobals: globalsCopy,
486
- updatedLocalVars: localVarsCopy,
487
- error: message
488
- };
489
- }
490
- return {
491
- testResults,
492
- consoleOutput,
493
- updatedEnvVars: envVarsCopy,
494
- updatedCollectionVars: collectionCopy,
495
- updatedGlobals: globalsCopy,
496
- updatedLocalVars: localVarsCopy
497
- };
498
- }
499
- exports.buildEnvVars = buildEnvVars;
500
- exports.buildUrl = buildUrl;
501
- exports.getGlobals = getGlobals;
502
- exports.getSecret = getSecret;
503
- exports.initSecretStore = initSecretStore;
504
- exports.interpolate = interpolate;
505
- exports.loadGlobals = loadGlobals;
506
- exports.mergeVars = mergeVars;
507
- exports.patchGlobals = patchGlobals;
508
- exports.persistGlobals = persistGlobals;
509
- exports.registerSecretHandlers = registerSecretHandlers;
510
- exports.runScript = runScript;
511
- exports.setGlobals = setGlobals;
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-full{top:100%}.left-1\/2{left:50%}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[200\]{z-index:200}.z-\[300\]{z-index:300}.col-1{grid-column:1}.col-2{grid-column:2}.mx-auto{margin-inline:auto}.mt-px{margin-top:1px}.-mb-px{margin-bottom:-1px}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.table{display:table}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[45vh\]{max-height:45vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.min-h-\[160px\]{min-height:160px}.w-\[420px\]{width:420px}.w-\[480px\]{width:480px}.w-\[500px\]{width:500px}.w-\[520px\]{width:520px}.w-\[560px\]{width:560px}.w-\[680px\]{width:680px}.w-\[780px\]{width:780px}.w-full{width:100%}.w-px{width:1px}.max-w-\[60px\]{max-width:60px}.max-w-\[64px\]{max-width:64px}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[260px\]{max-width:260px}.max-w-\[420px\]{max-width:420px}.min-w-\[72px\]{min-width:72px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[160px\]{min-width:160px}.min-w-\[220px\]{min-width:220px}.min-w-\[260px\]{min-width:260px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-transparent{border-color:#0000}.bg-\[\#1e1b2e\]{background-color:#1e1b2e}.bg-transparent{background-color:#0000}.py-px{padding-block:1px}.pt-\[20vh\]{padding-top:20vh}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s)}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\[writing-mode\:vertical-rl\]{writing-mode:vertical-rl}@media (hover:hover){.group-hover\:flex:is(:where(.group):hover *){display:flex}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\/tip\:block:is(:where(.group\/tip):hover *){display:block}}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:scale-150:hover{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:text-\[var\(--text-primary\)\]:hover{color:var(--text-primary)}}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}:root{--ts-blue-400:#6aa3c8;--ts-blue-500:#3d7fb2;--ts-blue-600:#205d96;--ts-blue-700:#1a4e7e;--ts-green-400:#9fc93c;--ts-green-800:#4a5e1d;--ts-green-900:#2d3a12;--drag-region:28px;--surface-50:#f0eff4;--surface-100:#dddce3;--surface-200:#c4c2cb;--surface-400:#9d9aa8;--surface-500:#7a7785;--surface-700:#615e6d;--surface-800:#3d3b48;--surface-900:#312f3b;--surface-950:#272630;--text-primary:#e4e3ea;--text-muted:#9d9aa8;--bg-app:#272630;--border:#3d3b48}:root.light{--surface-50:#272630;--surface-100:#312f3b;--surface-200:#3d3b48;--surface-400:#615e6d;--surface-500:#716e7b;--surface-700:#908e9a;--surface-800:#c4c2cb;--surface-900:#d5d3dc;--surface-950:#e2e0e9;--text-primary:#1c1b24;--text-muted:#615e6d;--bg-app:#e2e0e9;--border:#c4c2cb;--ts-green-400:#567818}*{box-sizing:border-box}body{background:var(--bg-app);color:var(--text-primary);margin:0;padding:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;overflow:hidden}.drag-region{-webkit-app-region:drag;height:var(--drag-region)}.no-drag{-webkit-app-region:no-drag}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}.cm-editor{height:100%}.cm-scroller{overflow:auto}:root.light .text-white,:root.light .hover\:text-white:hover{color:var(--text-primary)!important}:root.light .bg-blue-500,:root.light .bg-blue-600,:root.light .bg-blue-700,:root.light .hover\:bg-blue-500:hover,:root.light .hover\:bg-blue-600:hover,:root.light .bg-emerald-600,:root.light .bg-red-600,:root.light .bg-amber-600,:root.light .bg-orange-600{color:#fff!important}:root.light input::placeholder,:root.light textarea::placeholder{opacity:1;color:var(--text-muted)!important}:root.light .bg-surface-800{background-color:var(--surface-800)}:root.light option{color:#1c1b24;background:#d5d3dc}:root.light .text-red-300{color:#b91c1c!important}:root.light .text-red-400{color:#dc2626!important}:root.light .text-red-500{color:#991b1b!important}:root.light .bg-red-900\/30{background-color:#fee2e2!important}:root.light .bg-red-900\/20{background-color:#fef2f2!important}:root.light .border-red-700,:root.light .border-red-800{border-color:#fca5a5!important}:root.light .text-emerald-300{color:#15803d!important}:root.light .text-emerald-400{color:#16a34a!important}:root.light .bg-emerald-900\/20{background-color:#f0fdf4!important}:root.light .bg-emerald-900\/30{background-color:#dcfce7!important}:root.light .border-emerald-800,:root.light .border-emerald-700{border-color:#86efac!important}:root.light .text-amber-300{color:#b45309!important}:root.light .text-amber-400{color:#d97706!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}