@critical-path/svelte 0.17.11 → 0.18.0
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/CHANGELOG.md +16 -0
- package/README.md +13 -0
- package/dist/activity-state.svelte.d.ts +3 -0
- package/dist/activity-state.svelte.d.ts.map +1 -1
- package/dist/attachment-state.svelte.d.ts +3 -0
- package/dist/attachment-state.svelte.d.ts.map +1 -1
- package/dist/cancellation.test.d.ts +2 -0
- package/dist/cancellation.test.d.ts.map +1 -0
- package/dist/comment-state.svelte.d.ts +3 -0
- package/dist/comment-state.svelte.d.ts.map +1 -1
- package/dist/critical-path-state.svelte.d.ts +3 -0
- package/dist/critical-path-state.svelte.d.ts.map +1 -1
- package/dist/deliverable-state.svelte.d.ts +3 -0
- package/dist/deliverable-state.svelte.d.ts.map +1 -1
- package/dist/deliverable-summary-state.svelte.d.ts +3 -0
- package/dist/deliverable-summary-state.svelte.d.ts.map +1 -1
- package/dist/index.js +645 -551
- package/dist/latest-request.d.ts +15 -0
- package/dist/latest-request.d.ts.map +1 -0
- package/dist/project-state.svelte.d.ts +3 -0
- package/dist/project-state.svelte.d.ts.map +1 -1
- package/dist/task-metrics-state.svelte.d.ts +3 -0
- package/dist/task-metrics-state.svelte.d.ts.map +1 -1
- package/dist/task-state.svelte.d.ts +3 -0
- package/dist/task-state.svelte.d.ts.map +1 -1
- package/dist/task-transitions-state.svelte.d.ts +3 -0
- package/dist/task-transitions-state.svelte.d.ts.map +1 -1
- package/dist/timeline-ladder-state.svelte.d.ts +3 -0
- package/dist/timeline-ladder-state.svelte.d.ts.map +1 -1
- package/dist/workflow-state.svelte.d.ts +3 -0
- package/dist/workflow-state.svelte.d.ts.map +1 -1
- package/dist/workload-state.svelte.d.ts +3 -0
- package/dist/workload-state.svelte.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/activity-state.svelte.ts +13 -3
- package/src/attachment-state.svelte.ts +12 -2
- package/src/cancellation.test.ts +43 -0
- package/src/comment-state.svelte.ts +12 -2
- package/src/critical-path-state.svelte.ts +12 -2
- package/src/deliverable-state.svelte.ts +12 -2
- package/src/deliverable-summary-state.svelte.ts +12 -2
- package/src/latest-request.ts +24 -0
- package/src/project-state.svelte.ts +12 -2
- package/src/task-metrics-state.svelte.ts +27 -7
- package/src/task-state.svelte.ts +12 -2
- package/src/task-transitions-state.svelte.ts +12 -2
- package/src/timeline-ladder-state.svelte.ts +12 -2
- package/src/workflow-state.svelte.ts +12 -2
- package/src/workload-state.svelte.ts +12 -2
package/dist/index.js
CHANGED
|
@@ -1,41 +1,57 @@
|
|
|
1
1
|
import { CriticalPathClient as e } from "@critical-path/client";
|
|
2
2
|
import * as t from "svelte/internal/client";
|
|
3
3
|
import { isTempTaskId as n, resolveStatusDefinition as r } from "@critical-path/core";
|
|
4
|
-
//#region src/
|
|
4
|
+
//#region src/latest-request.ts
|
|
5
5
|
var i = class {
|
|
6
|
+
controller;
|
|
7
|
+
begin(e) {
|
|
8
|
+
this.controller?.abort(), this.controller = new AbortController();
|
|
9
|
+
let { signal: t } = this.controller;
|
|
10
|
+
return {
|
|
11
|
+
api: typeof e.with == "function" ? e.with({ signal: t }) : e,
|
|
12
|
+
signal: t
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
cancel() {
|
|
16
|
+
this.controller?.abort(), this.controller = void 0;
|
|
17
|
+
}
|
|
18
|
+
}, a = class {
|
|
6
19
|
client;
|
|
7
|
-
#e =
|
|
20
|
+
#e = new i();
|
|
21
|
+
#t = t.state(t.proxy([]));
|
|
8
22
|
get data() {
|
|
9
|
-
return t.get(this.#
|
|
23
|
+
return t.get(this.#t);
|
|
10
24
|
}
|
|
11
25
|
set data(e) {
|
|
12
|
-
t.set(this.#
|
|
26
|
+
t.set(this.#t, e, !0);
|
|
13
27
|
}
|
|
14
|
-
#
|
|
28
|
+
#n = t.state(!1);
|
|
15
29
|
get loading() {
|
|
16
|
-
return t.get(this.#
|
|
30
|
+
return t.get(this.#n);
|
|
17
31
|
}
|
|
18
32
|
set loading(e) {
|
|
19
|
-
t.set(this.#
|
|
33
|
+
t.set(this.#n, e, !0);
|
|
20
34
|
}
|
|
21
|
-
#
|
|
35
|
+
#r = t.state(null);
|
|
22
36
|
get error() {
|
|
23
|
-
return t.get(this.#
|
|
37
|
+
return t.get(this.#r);
|
|
24
38
|
}
|
|
25
39
|
set error(e) {
|
|
26
|
-
t.set(this.#
|
|
40
|
+
t.set(this.#r, e, !0);
|
|
27
41
|
}
|
|
28
42
|
constructor(e) {
|
|
29
43
|
this.client = e;
|
|
30
44
|
}
|
|
31
45
|
async fetch() {
|
|
46
|
+
let { api: e, signal: t } = this.#e.begin(this.client);
|
|
32
47
|
this.loading = !0, this.error = null;
|
|
33
48
|
try {
|
|
34
|
-
this.data = await
|
|
49
|
+
if (this.data = await e.getProjects(), t.aborted) return;
|
|
35
50
|
} catch (e) {
|
|
51
|
+
if (t.aborted) return;
|
|
36
52
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
37
53
|
} finally {
|
|
38
|
-
this.loading = !1;
|
|
54
|
+
t.aborted || (this.loading = !1);
|
|
39
55
|
}
|
|
40
56
|
}
|
|
41
57
|
async createProject(e) {
|
|
@@ -55,35 +71,39 @@ var i = class {
|
|
|
55
71
|
throw this.error = n, n;
|
|
56
72
|
}
|
|
57
73
|
}
|
|
74
|
+
destroy() {
|
|
75
|
+
this.#e.cancel();
|
|
76
|
+
}
|
|
58
77
|
};
|
|
59
|
-
function
|
|
60
|
-
return new
|
|
78
|
+
function o(e) {
|
|
79
|
+
return new a(e);
|
|
61
80
|
}
|
|
62
81
|
//#endregion
|
|
63
82
|
//#region src/task-state.svelte.ts
|
|
64
|
-
var
|
|
83
|
+
var s = class {
|
|
65
84
|
client;
|
|
66
85
|
projectId;
|
|
67
|
-
#e =
|
|
86
|
+
#e = new i();
|
|
87
|
+
#t = t.state(t.proxy([]));
|
|
68
88
|
get data() {
|
|
69
|
-
return t.get(this.#
|
|
89
|
+
return t.get(this.#t);
|
|
70
90
|
}
|
|
71
91
|
set data(e) {
|
|
72
|
-
t.set(this.#
|
|
92
|
+
t.set(this.#t, e, !0);
|
|
73
93
|
}
|
|
74
|
-
#
|
|
94
|
+
#n = t.state(!1);
|
|
75
95
|
get loading() {
|
|
76
|
-
return t.get(this.#
|
|
96
|
+
return t.get(this.#n);
|
|
77
97
|
}
|
|
78
98
|
set loading(e) {
|
|
79
|
-
t.set(this.#
|
|
99
|
+
t.set(this.#n, e, !0);
|
|
80
100
|
}
|
|
81
|
-
#
|
|
101
|
+
#r = t.state(null);
|
|
82
102
|
get error() {
|
|
83
|
-
return t.get(this.#
|
|
103
|
+
return t.get(this.#r);
|
|
84
104
|
}
|
|
85
105
|
set error(e) {
|
|
86
|
-
t.set(this.#
|
|
106
|
+
t.set(this.#r, e, !0);
|
|
87
107
|
}
|
|
88
108
|
pendingCreations = /* @__PURE__ */ new Map();
|
|
89
109
|
tempToRealIdMap = /* @__PURE__ */ new Map();
|
|
@@ -91,13 +111,15 @@ var o = class {
|
|
|
91
111
|
this.client = e, this.projectId = t;
|
|
92
112
|
}
|
|
93
113
|
async fetch() {
|
|
114
|
+
let { api: e, signal: t } = this.#e.begin(this.client);
|
|
94
115
|
this.loading = !0, this.error = null;
|
|
95
116
|
try {
|
|
96
|
-
this.data = await
|
|
117
|
+
if (this.data = await e.getTasks(this.projectId), t.aborted) return;
|
|
97
118
|
} catch (e) {
|
|
119
|
+
if (t.aborted) return;
|
|
98
120
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
99
121
|
} finally {
|
|
100
|
-
this.loading = !1;
|
|
122
|
+
t.aborted || (this.loading = !1);
|
|
101
123
|
}
|
|
102
124
|
}
|
|
103
125
|
async createTask(e) {
|
|
@@ -194,46 +216,52 @@ var o = class {
|
|
|
194
216
|
throw this.error = t, t;
|
|
195
217
|
}
|
|
196
218
|
}
|
|
219
|
+
destroy() {
|
|
220
|
+
this.#e.cancel();
|
|
221
|
+
}
|
|
197
222
|
};
|
|
198
|
-
function
|
|
199
|
-
return new
|
|
223
|
+
function c(e, t) {
|
|
224
|
+
return new s(e, t);
|
|
200
225
|
}
|
|
201
226
|
//#endregion
|
|
202
227
|
//#region src/workflow-state.svelte.ts
|
|
203
|
-
var
|
|
228
|
+
var ee = class {
|
|
204
229
|
client;
|
|
205
|
-
#e =
|
|
230
|
+
#e = new i();
|
|
231
|
+
#t = t.state(t.proxy([]));
|
|
206
232
|
get data() {
|
|
207
|
-
return t.get(this.#
|
|
233
|
+
return t.get(this.#t);
|
|
208
234
|
}
|
|
209
235
|
set data(e) {
|
|
210
|
-
t.set(this.#
|
|
236
|
+
t.set(this.#t, e, !0);
|
|
211
237
|
}
|
|
212
|
-
#
|
|
238
|
+
#n = t.state(!1);
|
|
213
239
|
get loading() {
|
|
214
|
-
return t.get(this.#
|
|
240
|
+
return t.get(this.#n);
|
|
215
241
|
}
|
|
216
242
|
set loading(e) {
|
|
217
|
-
t.set(this.#
|
|
243
|
+
t.set(this.#n, e, !0);
|
|
218
244
|
}
|
|
219
|
-
#
|
|
245
|
+
#r = t.state(null);
|
|
220
246
|
get error() {
|
|
221
|
-
return t.get(this.#
|
|
247
|
+
return t.get(this.#r);
|
|
222
248
|
}
|
|
223
249
|
set error(e) {
|
|
224
|
-
t.set(this.#
|
|
250
|
+
t.set(this.#r, e, !0);
|
|
225
251
|
}
|
|
226
252
|
constructor(e) {
|
|
227
253
|
this.client = e;
|
|
228
254
|
}
|
|
229
255
|
async fetch() {
|
|
256
|
+
let { api: e, signal: t } = this.#e.begin(this.client);
|
|
230
257
|
this.loading = !0, this.error = null;
|
|
231
258
|
try {
|
|
232
|
-
this.data = await
|
|
259
|
+
if (this.data = await e.getWorkflows(), t.aborted) return;
|
|
233
260
|
} catch (e) {
|
|
261
|
+
if (t.aborted) return;
|
|
234
262
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
235
263
|
} finally {
|
|
236
|
-
this.loading = !1;
|
|
264
|
+
t.aborted || (this.loading = !1);
|
|
237
265
|
}
|
|
238
266
|
}
|
|
239
267
|
async createWorkflow(e) {
|
|
@@ -262,37 +290,41 @@ var c = class {
|
|
|
262
290
|
throw this.error = t, t;
|
|
263
291
|
}
|
|
264
292
|
}
|
|
293
|
+
destroy() {
|
|
294
|
+
this.#e.cancel();
|
|
295
|
+
}
|
|
265
296
|
};
|
|
266
|
-
function
|
|
267
|
-
return new
|
|
297
|
+
function te(e) {
|
|
298
|
+
return new ee(e);
|
|
268
299
|
}
|
|
269
300
|
//#endregion
|
|
270
301
|
//#region src/comment-state.svelte.ts
|
|
271
|
-
var
|
|
302
|
+
var ne = class {
|
|
272
303
|
client;
|
|
273
304
|
taskId;
|
|
274
|
-
#e =
|
|
305
|
+
#e = new i();
|
|
306
|
+
#t = t.state(t.proxy([]));
|
|
275
307
|
get data() {
|
|
276
|
-
return t.get(this.#
|
|
308
|
+
return t.get(this.#t);
|
|
277
309
|
}
|
|
278
310
|
set data(e) {
|
|
279
|
-
t.set(this.#
|
|
311
|
+
t.set(this.#t, e, !0);
|
|
280
312
|
}
|
|
281
|
-
#
|
|
313
|
+
#n = t.state(!1);
|
|
282
314
|
get loading() {
|
|
283
|
-
return t.get(this.#
|
|
315
|
+
return t.get(this.#n);
|
|
284
316
|
}
|
|
285
317
|
set loading(e) {
|
|
286
|
-
t.set(this.#
|
|
318
|
+
t.set(this.#n, e, !0);
|
|
287
319
|
}
|
|
288
|
-
#
|
|
320
|
+
#r = t.state(null);
|
|
289
321
|
get error() {
|
|
290
|
-
return t.get(this.#
|
|
322
|
+
return t.get(this.#r);
|
|
291
323
|
}
|
|
292
324
|
set error(e) {
|
|
293
|
-
t.set(this.#
|
|
325
|
+
t.set(this.#r, e, !0);
|
|
294
326
|
}
|
|
295
|
-
#
|
|
327
|
+
#i = t.derived(() => {
|
|
296
328
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
297
329
|
for (let t of this.data) e.set(t.id, {
|
|
298
330
|
...t,
|
|
@@ -305,27 +337,28 @@ var te = class {
|
|
|
305
337
|
return t;
|
|
306
338
|
});
|
|
307
339
|
get threads() {
|
|
308
|
-
return t.get(this.#
|
|
340
|
+
return t.get(this.#i);
|
|
309
341
|
}
|
|
310
342
|
set threads(e) {
|
|
311
|
-
t.set(this.#
|
|
343
|
+
t.set(this.#i, e);
|
|
312
344
|
}
|
|
313
345
|
constructor(e, t) {
|
|
314
346
|
this.client = e, this.taskId = t;
|
|
315
347
|
}
|
|
316
348
|
async fetch(e) {
|
|
317
|
-
let t = e || this.taskId;
|
|
318
|
-
if (!
|
|
349
|
+
let { api: t, signal: n } = this.#e.begin(this.client), r = e || this.taskId;
|
|
350
|
+
if (!r) {
|
|
319
351
|
this.data = [];
|
|
320
352
|
return;
|
|
321
353
|
}
|
|
322
|
-
this.taskId =
|
|
354
|
+
this.taskId = r, this.loading = !0, this.error = null;
|
|
323
355
|
try {
|
|
324
|
-
this.data = await
|
|
356
|
+
if (this.data = await t.getComments(r), n.aborted) return;
|
|
325
357
|
} catch (e) {
|
|
358
|
+
if (n.aborted) return;
|
|
326
359
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
327
360
|
} finally {
|
|
328
|
-
this.loading = !1;
|
|
361
|
+
n.aborted || (this.loading = !1);
|
|
329
362
|
}
|
|
330
363
|
}
|
|
331
364
|
async addComment(e) {
|
|
@@ -379,47 +412,53 @@ var te = class {
|
|
|
379
412
|
throw this.error = t, t;
|
|
380
413
|
}
|
|
381
414
|
}
|
|
415
|
+
destroy() {
|
|
416
|
+
this.#e.cancel();
|
|
417
|
+
}
|
|
382
418
|
};
|
|
383
|
-
function
|
|
384
|
-
return new
|
|
419
|
+
function re(e, t) {
|
|
420
|
+
return new ne(e, t);
|
|
385
421
|
}
|
|
386
422
|
//#endregion
|
|
387
423
|
//#region src/attachment-state.svelte.ts
|
|
388
|
-
var
|
|
424
|
+
var ie = class {
|
|
389
425
|
client;
|
|
390
426
|
filter;
|
|
391
|
-
#e =
|
|
427
|
+
#e = new i();
|
|
428
|
+
#t = t.state(t.proxy([]));
|
|
392
429
|
get data() {
|
|
393
|
-
return t.get(this.#
|
|
430
|
+
return t.get(this.#t);
|
|
394
431
|
}
|
|
395
432
|
set data(e) {
|
|
396
|
-
t.set(this.#
|
|
433
|
+
t.set(this.#t, e, !0);
|
|
397
434
|
}
|
|
398
|
-
#
|
|
435
|
+
#n = t.state(!1);
|
|
399
436
|
get loading() {
|
|
400
|
-
return t.get(this.#
|
|
437
|
+
return t.get(this.#n);
|
|
401
438
|
}
|
|
402
439
|
set loading(e) {
|
|
403
|
-
t.set(this.#
|
|
440
|
+
t.set(this.#n, e, !0);
|
|
404
441
|
}
|
|
405
|
-
#
|
|
442
|
+
#r = t.state(null);
|
|
406
443
|
get error() {
|
|
407
|
-
return t.get(this.#
|
|
444
|
+
return t.get(this.#r);
|
|
408
445
|
}
|
|
409
446
|
set error(e) {
|
|
410
|
-
t.set(this.#
|
|
447
|
+
t.set(this.#r, e, !0);
|
|
411
448
|
}
|
|
412
449
|
constructor(e, t) {
|
|
413
450
|
this.client = e, this.filter = t;
|
|
414
451
|
}
|
|
415
452
|
async fetch(e) {
|
|
453
|
+
let { api: t, signal: n } = this.#e.begin(this.client);
|
|
416
454
|
e && (this.filter = e), this.loading = !0, this.error = null;
|
|
417
455
|
try {
|
|
418
|
-
this.data = await
|
|
456
|
+
if (this.data = await t.getAttachments(this.filter), n.aborted) return;
|
|
419
457
|
} catch (e) {
|
|
458
|
+
if (n.aborted) return;
|
|
420
459
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
421
460
|
} finally {
|
|
422
|
-
this.loading = !1;
|
|
461
|
+
n.aborted || (this.loading = !1);
|
|
423
462
|
}
|
|
424
463
|
}
|
|
425
464
|
async createAttachment(e) {
|
|
@@ -442,44 +481,48 @@ var re = class {
|
|
|
442
481
|
throw this.error = n, n;
|
|
443
482
|
}
|
|
444
483
|
}
|
|
484
|
+
destroy() {
|
|
485
|
+
this.#e.cancel();
|
|
486
|
+
}
|
|
445
487
|
};
|
|
446
|
-
function
|
|
447
|
-
return new
|
|
488
|
+
function ae(e, t) {
|
|
489
|
+
return new ie(e, t);
|
|
448
490
|
}
|
|
449
491
|
//#endregion
|
|
450
492
|
//#region src/activity-state.svelte.ts
|
|
451
|
-
var
|
|
493
|
+
var oe = class {
|
|
452
494
|
client;
|
|
453
495
|
taskId;
|
|
454
|
-
#e =
|
|
496
|
+
#e = new i();
|
|
497
|
+
#t = t.state(t.proxy([]));
|
|
455
498
|
get comments() {
|
|
456
|
-
return t.get(this.#
|
|
499
|
+
return t.get(this.#t);
|
|
457
500
|
}
|
|
458
501
|
set comments(e) {
|
|
459
|
-
t.set(this.#
|
|
502
|
+
t.set(this.#t, e, !0);
|
|
460
503
|
}
|
|
461
|
-
#
|
|
504
|
+
#n = t.state(t.proxy([]));
|
|
462
505
|
get attachments() {
|
|
463
|
-
return t.get(this.#
|
|
506
|
+
return t.get(this.#n);
|
|
464
507
|
}
|
|
465
508
|
set attachments(e) {
|
|
466
|
-
t.set(this.#
|
|
509
|
+
t.set(this.#n, e, !0);
|
|
467
510
|
}
|
|
468
|
-
#
|
|
511
|
+
#r = t.state(!1);
|
|
469
512
|
get loading() {
|
|
470
|
-
return t.get(this.#
|
|
513
|
+
return t.get(this.#r);
|
|
471
514
|
}
|
|
472
515
|
set loading(e) {
|
|
473
|
-
t.set(this.#
|
|
516
|
+
t.set(this.#r, e, !0);
|
|
474
517
|
}
|
|
475
|
-
#
|
|
518
|
+
#i = t.state(null);
|
|
476
519
|
get error() {
|
|
477
|
-
return t.get(this.#
|
|
520
|
+
return t.get(this.#i);
|
|
478
521
|
}
|
|
479
522
|
set error(e) {
|
|
480
|
-
t.set(this.#
|
|
523
|
+
t.set(this.#i, e, !0);
|
|
481
524
|
}
|
|
482
|
-
#
|
|
525
|
+
#a = t.derived(() => {
|
|
483
526
|
let e = /* @__PURE__ */ new Map(), t = [], n = /* @__PURE__ */ new Map();
|
|
484
527
|
for (let e of this.attachments) e.commentId && (n.has(e.commentId) || n.set(e.commentId, []), n.get(e.commentId).push(e));
|
|
485
528
|
for (let t of this.comments) e.set(t.id, {
|
|
@@ -494,35 +537,37 @@ var ae = class {
|
|
|
494
537
|
return t;
|
|
495
538
|
});
|
|
496
539
|
get threads() {
|
|
497
|
-
return t.get(this.#
|
|
540
|
+
return t.get(this.#a);
|
|
498
541
|
}
|
|
499
542
|
set threads(e) {
|
|
500
|
-
t.set(this.#
|
|
543
|
+
t.set(this.#a, e);
|
|
501
544
|
}
|
|
502
|
-
#
|
|
545
|
+
#o = t.derived(() => this.attachments.filter((e) => !e.commentId));
|
|
503
546
|
get standaloneAttachments() {
|
|
504
|
-
return t.get(this.#
|
|
547
|
+
return t.get(this.#o);
|
|
505
548
|
}
|
|
506
549
|
set standaloneAttachments(e) {
|
|
507
|
-
t.set(this.#
|
|
550
|
+
t.set(this.#o, e);
|
|
508
551
|
}
|
|
509
552
|
constructor(e, t) {
|
|
510
553
|
this.client = e, this.taskId = t;
|
|
511
554
|
}
|
|
512
555
|
async fetch(e) {
|
|
513
|
-
let t = e || this.taskId;
|
|
514
|
-
if (!
|
|
556
|
+
let { api: t, signal: n } = this.#e.begin(this.client), r = e || this.taskId;
|
|
557
|
+
if (!r) {
|
|
515
558
|
this.comments = [], this.attachments = [];
|
|
516
559
|
return;
|
|
517
560
|
}
|
|
518
|
-
this.taskId =
|
|
561
|
+
this.taskId = r, this.loading = !0, this.error = null;
|
|
519
562
|
try {
|
|
520
|
-
let [e,
|
|
521
|
-
|
|
563
|
+
let [e, i] = await Promise.all([t.getComments(r), t.getAttachments({ taskId: r })]);
|
|
564
|
+
if (n.aborted) return;
|
|
565
|
+
this.comments = e, this.attachments = i;
|
|
522
566
|
} catch (e) {
|
|
567
|
+
if (n.aborted) return;
|
|
523
568
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
524
569
|
} finally {
|
|
525
|
-
this.loading = !1;
|
|
570
|
+
n.aborted || (this.loading = !1);
|
|
526
571
|
}
|
|
527
572
|
}
|
|
528
573
|
async addComment(e, t) {
|
|
@@ -598,48 +643,54 @@ var ae = class {
|
|
|
598
643
|
throw this.error = t, t;
|
|
599
644
|
}
|
|
600
645
|
}
|
|
646
|
+
destroy() {
|
|
647
|
+
this.#e.cancel();
|
|
648
|
+
}
|
|
601
649
|
};
|
|
602
|
-
function
|
|
603
|
-
return new
|
|
650
|
+
function se(e, t) {
|
|
651
|
+
return new oe(e, t);
|
|
604
652
|
}
|
|
605
653
|
//#endregion
|
|
606
654
|
//#region src/deliverable-state.svelte.ts
|
|
607
|
-
var
|
|
655
|
+
var ce = class {
|
|
608
656
|
client;
|
|
609
657
|
projectId;
|
|
610
|
-
#e =
|
|
658
|
+
#e = new i();
|
|
659
|
+
#t = t.state(t.proxy([]));
|
|
611
660
|
get data() {
|
|
612
|
-
return t.get(this.#
|
|
661
|
+
return t.get(this.#t);
|
|
613
662
|
}
|
|
614
663
|
set data(e) {
|
|
615
|
-
t.set(this.#
|
|
664
|
+
t.set(this.#t, e, !0);
|
|
616
665
|
}
|
|
617
|
-
#
|
|
666
|
+
#n = t.state(!1);
|
|
618
667
|
get loading() {
|
|
619
|
-
return t.get(this.#
|
|
668
|
+
return t.get(this.#n);
|
|
620
669
|
}
|
|
621
670
|
set loading(e) {
|
|
622
|
-
t.set(this.#
|
|
671
|
+
t.set(this.#n, e, !0);
|
|
623
672
|
}
|
|
624
|
-
#
|
|
673
|
+
#r = t.state(null);
|
|
625
674
|
get error() {
|
|
626
|
-
return t.get(this.#
|
|
675
|
+
return t.get(this.#r);
|
|
627
676
|
}
|
|
628
677
|
set error(e) {
|
|
629
|
-
t.set(this.#
|
|
678
|
+
t.set(this.#r, e, !0);
|
|
630
679
|
}
|
|
631
680
|
constructor(e, t) {
|
|
632
681
|
this.client = e, this.projectId = t;
|
|
633
682
|
}
|
|
634
683
|
async fetch(e) {
|
|
684
|
+
let { api: t, signal: n } = this.#e.begin(this.client);
|
|
635
685
|
if (e && (this.projectId = e), this.projectId) {
|
|
636
686
|
this.loading = !0, this.error = null;
|
|
637
687
|
try {
|
|
638
|
-
this.data = await
|
|
688
|
+
if (this.data = await t.getDeliverables(this.projectId), n.aborted) return;
|
|
639
689
|
} catch (e) {
|
|
690
|
+
if (n.aborted) return;
|
|
640
691
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
641
692
|
} finally {
|
|
642
|
-
this.loading = !1;
|
|
693
|
+
n.aborted || (this.loading = !1);
|
|
643
694
|
}
|
|
644
695
|
}
|
|
645
696
|
}
|
|
@@ -681,35 +732,39 @@ var se = class {
|
|
|
681
732
|
async getSummary(e) {
|
|
682
733
|
return this.client.getDeliverableSummary(e);
|
|
683
734
|
}
|
|
735
|
+
destroy() {
|
|
736
|
+
this.#e.cancel();
|
|
737
|
+
}
|
|
684
738
|
};
|
|
685
|
-
function
|
|
686
|
-
return new
|
|
739
|
+
function le(e, t) {
|
|
740
|
+
return new ce(e, t);
|
|
687
741
|
}
|
|
688
742
|
//#endregion
|
|
689
743
|
//#region src/deliverable-summary-state.svelte.ts
|
|
690
|
-
var
|
|
744
|
+
var ue = class {
|
|
691
745
|
client;
|
|
692
746
|
deliverableId;
|
|
693
|
-
#e =
|
|
747
|
+
#e = new i();
|
|
748
|
+
#t = t.state(null);
|
|
694
749
|
get summary() {
|
|
695
|
-
return t.get(this.#
|
|
750
|
+
return t.get(this.#t);
|
|
696
751
|
}
|
|
697
752
|
set summary(e) {
|
|
698
|
-
t.set(this.#
|
|
753
|
+
t.set(this.#t, e, !0);
|
|
699
754
|
}
|
|
700
|
-
#
|
|
755
|
+
#n = t.state(!1);
|
|
701
756
|
get loading() {
|
|
702
|
-
return t.get(this.#
|
|
757
|
+
return t.get(this.#n);
|
|
703
758
|
}
|
|
704
759
|
set loading(e) {
|
|
705
|
-
t.set(this.#
|
|
760
|
+
t.set(this.#n, e, !0);
|
|
706
761
|
}
|
|
707
|
-
#
|
|
762
|
+
#r = t.state(null);
|
|
708
763
|
get error() {
|
|
709
|
-
return t.get(this.#
|
|
764
|
+
return t.get(this.#r);
|
|
710
765
|
}
|
|
711
766
|
set error(e) {
|
|
712
|
-
t.set(this.#
|
|
767
|
+
t.set(this.#r, e, !0);
|
|
713
768
|
}
|
|
714
769
|
get data() {
|
|
715
770
|
return this.summary;
|
|
@@ -718,27 +773,31 @@ var le = class {
|
|
|
718
773
|
this.client = e, this.deliverableId = t;
|
|
719
774
|
}
|
|
720
775
|
async fetch(e) {
|
|
721
|
-
let t = e || this.deliverableId;
|
|
722
|
-
if (!
|
|
776
|
+
let { api: t, signal: n } = this.#e.begin(this.client), r = e || this.deliverableId;
|
|
777
|
+
if (!r) {
|
|
723
778
|
this.summary = null, this.loading = !1;
|
|
724
779
|
return;
|
|
725
780
|
}
|
|
726
|
-
this.deliverableId =
|
|
781
|
+
this.deliverableId = r, this.loading = !0, this.error = null;
|
|
727
782
|
try {
|
|
728
|
-
this.summary = await
|
|
783
|
+
if (this.summary = await t.getDeliverableSummary(r), n.aborted) return;
|
|
729
784
|
} catch (e) {
|
|
785
|
+
if (n.aborted) return;
|
|
730
786
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
731
787
|
} finally {
|
|
732
|
-
this.loading = !1;
|
|
788
|
+
n.aborted || (this.loading = !1);
|
|
733
789
|
}
|
|
734
790
|
}
|
|
791
|
+
destroy() {
|
|
792
|
+
this.#e.cancel();
|
|
793
|
+
}
|
|
735
794
|
};
|
|
736
|
-
function
|
|
737
|
-
return new
|
|
795
|
+
function de(e, t) {
|
|
796
|
+
return new ue(e, t);
|
|
738
797
|
}
|
|
739
798
|
//#endregion
|
|
740
799
|
//#region src/kanban-state.svelte.ts
|
|
741
|
-
var
|
|
800
|
+
var fe = class {
|
|
742
801
|
projectId;
|
|
743
802
|
options;
|
|
744
803
|
taskState;
|
|
@@ -782,7 +841,7 @@ var de = class {
|
|
|
782
841
|
t.set(this.#e, e);
|
|
783
842
|
}
|
|
784
843
|
constructor(e, t, n = {}) {
|
|
785
|
-
this.projectId = t, this.options = n, this.taskState = new
|
|
844
|
+
this.projectId = t, this.options = n, this.taskState = new s(e, t);
|
|
786
845
|
}
|
|
787
846
|
async fetch() {
|
|
788
847
|
return this.taskState.fetch();
|
|
@@ -800,56 +859,61 @@ var de = class {
|
|
|
800
859
|
return this.taskState.deleteTask(e);
|
|
801
860
|
}
|
|
802
861
|
};
|
|
803
|
-
function
|
|
804
|
-
return new
|
|
862
|
+
function pe(e, t, n) {
|
|
863
|
+
return new fe(e, t, n);
|
|
805
864
|
}
|
|
806
865
|
//#endregion
|
|
807
866
|
//#region src/task-transitions-state.svelte.ts
|
|
808
|
-
var
|
|
867
|
+
var me = class {
|
|
809
868
|
client;
|
|
810
869
|
taskId;
|
|
811
|
-
#e =
|
|
870
|
+
#e = new i();
|
|
871
|
+
#t = t.state(t.proxy([]));
|
|
812
872
|
get allowedTransitions() {
|
|
813
|
-
return t.get(this.#
|
|
873
|
+
return t.get(this.#t);
|
|
814
874
|
}
|
|
815
875
|
set allowedTransitions(e) {
|
|
816
|
-
t.set(this.#
|
|
876
|
+
t.set(this.#t, e, !0);
|
|
817
877
|
}
|
|
818
|
-
#
|
|
878
|
+
#n = t.state(!1);
|
|
819
879
|
get loading() {
|
|
820
|
-
return t.get(this.#
|
|
880
|
+
return t.get(this.#n);
|
|
821
881
|
}
|
|
822
882
|
set loading(e) {
|
|
823
|
-
t.set(this.#
|
|
883
|
+
t.set(this.#n, e, !0);
|
|
824
884
|
}
|
|
825
|
-
#
|
|
885
|
+
#r = t.state(null);
|
|
826
886
|
get error() {
|
|
827
|
-
return t.get(this.#
|
|
887
|
+
return t.get(this.#r);
|
|
828
888
|
}
|
|
829
889
|
set error(e) {
|
|
830
|
-
t.set(this.#
|
|
890
|
+
t.set(this.#r, e, !0);
|
|
831
891
|
}
|
|
832
892
|
constructor(e, t) {
|
|
833
893
|
this.client = e, this.taskId = t;
|
|
834
894
|
}
|
|
835
895
|
async fetch(e) {
|
|
836
|
-
let t = e || this.taskId;
|
|
837
|
-
if (!
|
|
896
|
+
let { api: t, signal: n } = this.#e.begin(this.client), r = e || this.taskId;
|
|
897
|
+
if (!r) {
|
|
838
898
|
this.allowedTransitions = [], this.loading = !1;
|
|
839
899
|
return;
|
|
840
900
|
}
|
|
841
|
-
this.taskId =
|
|
901
|
+
this.taskId = r, this.loading = !0, this.error = null;
|
|
842
902
|
try {
|
|
843
|
-
this.allowedTransitions = await
|
|
903
|
+
if (this.allowedTransitions = await t.getAllowedTaskTransitions(r), n.aborted) return;
|
|
844
904
|
} catch (e) {
|
|
905
|
+
if (n.aborted) return;
|
|
845
906
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
846
907
|
} finally {
|
|
847
|
-
this.loading = !1;
|
|
908
|
+
n.aborted || (this.loading = !1);
|
|
848
909
|
}
|
|
849
910
|
}
|
|
911
|
+
destroy() {
|
|
912
|
+
this.#e.cancel();
|
|
913
|
+
}
|
|
850
914
|
};
|
|
851
|
-
function
|
|
852
|
-
return new
|
|
915
|
+
function he(e, t) {
|
|
916
|
+
return new me(e, t);
|
|
853
917
|
}
|
|
854
918
|
//#endregion
|
|
855
919
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
@@ -883,13 +947,13 @@ var l;
|
|
|
883
947
|
}
|
|
884
948
|
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
885
949
|
})(l ||= {});
|
|
886
|
-
var
|
|
950
|
+
var ge;
|
|
887
951
|
(function(e) {
|
|
888
952
|
e.mergeShapes = (e, t) => ({
|
|
889
953
|
...e,
|
|
890
954
|
...t
|
|
891
955
|
});
|
|
892
|
-
})(
|
|
956
|
+
})(ge ||= {});
|
|
893
957
|
var u = l.arrayToEnum([
|
|
894
958
|
"string",
|
|
895
959
|
"nan",
|
|
@@ -1055,13 +1119,13 @@ var m = (e, t) => {
|
|
|
1055
1119
|
default: n = t.defaultError, l.assertNever(e);
|
|
1056
1120
|
}
|
|
1057
1121
|
return { message: n };
|
|
1058
|
-
},
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
1122
|
+
}, _e = m;
|
|
1123
|
+
function ve() {
|
|
1124
|
+
return _e;
|
|
1061
1125
|
}
|
|
1062
1126
|
//#endregion
|
|
1063
1127
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
1064
|
-
var
|
|
1128
|
+
var ye = (e) => {
|
|
1065
1129
|
let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
|
|
1066
1130
|
...i,
|
|
1067
1131
|
path: a
|
|
@@ -1083,7 +1147,7 @@ var ve = (e) => {
|
|
|
1083
1147
|
};
|
|
1084
1148
|
};
|
|
1085
1149
|
function h(e, t) {
|
|
1086
|
-
let n =
|
|
1150
|
+
let n = ve(), r = ye({
|
|
1087
1151
|
issueData: t,
|
|
1088
1152
|
data: e.data,
|
|
1089
1153
|
path: e.path,
|
|
@@ -1140,13 +1204,13 @@ var g = class e {
|
|
|
1140
1204
|
value: n
|
|
1141
1205
|
};
|
|
1142
1206
|
}
|
|
1143
|
-
}, _ = Object.freeze({ status: "aborted" }),
|
|
1207
|
+
}, _ = Object.freeze({ status: "aborted" }), be = (e) => ({
|
|
1144
1208
|
status: "dirty",
|
|
1145
1209
|
value: e
|
|
1146
1210
|
}), v = (e) => ({
|
|
1147
1211
|
status: "valid",
|
|
1148
1212
|
value: e
|
|
1149
|
-
}),
|
|
1213
|
+
}), xe = (e) => e.status === "aborted", Se = (e) => e.status === "dirty", y = (e) => e.status === "valid", Ce = (e) => typeof Promise < "u" && e instanceof Promise, b;
|
|
1150
1214
|
(function(e) {
|
|
1151
1215
|
e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
1152
1216
|
})(b ||= {});
|
|
@@ -1159,7 +1223,7 @@ var x = class {
|
|
|
1159
1223
|
get path() {
|
|
1160
1224
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1161
1225
|
}
|
|
1162
|
-
},
|
|
1226
|
+
}, we = (e, t) => {
|
|
1163
1227
|
if (y(t)) return {
|
|
1164
1228
|
success: !0,
|
|
1165
1229
|
data: t.value
|
|
@@ -1221,7 +1285,7 @@ var C = class {
|
|
|
1221
1285
|
}
|
|
1222
1286
|
_parseSync(e) {
|
|
1223
1287
|
let t = this._parse(e);
|
|
1224
|
-
if (
|
|
1288
|
+
if (Ce(t)) throw Error("Synchronous parse encountered promise.");
|
|
1225
1289
|
return t;
|
|
1226
1290
|
}
|
|
1227
1291
|
_parseAsync(e) {
|
|
@@ -1246,7 +1310,7 @@ var C = class {
|
|
|
1246
1310
|
data: e,
|
|
1247
1311
|
parsedType: d(e)
|
|
1248
1312
|
};
|
|
1249
|
-
return
|
|
1313
|
+
return we(n, this._parseSync({
|
|
1250
1314
|
data: e,
|
|
1251
1315
|
path: n.path,
|
|
1252
1316
|
parent: n
|
|
@@ -1305,7 +1369,7 @@ var C = class {
|
|
|
1305
1369
|
path: n.path,
|
|
1306
1370
|
parent: n
|
|
1307
1371
|
});
|
|
1308
|
-
return
|
|
1372
|
+
return we(n, await (Ce(r) ? r : Promise.resolve(r)));
|
|
1309
1373
|
}
|
|
1310
1374
|
refine(e, t) {
|
|
1311
1375
|
let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
|
|
@@ -1321,7 +1385,7 @@ var C = class {
|
|
|
1321
1385
|
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
|
|
1322
1386
|
}
|
|
1323
1387
|
_refinement(e) {
|
|
1324
|
-
return new
|
|
1388
|
+
return new L({
|
|
1325
1389
|
schema: this,
|
|
1326
1390
|
typeName: H.ZodEffects,
|
|
1327
1391
|
effect: {
|
|
@@ -1341,10 +1405,10 @@ var C = class {
|
|
|
1341
1405
|
};
|
|
1342
1406
|
}
|
|
1343
1407
|
optional() {
|
|
1344
|
-
return
|
|
1408
|
+
return R.create(this, this._def);
|
|
1345
1409
|
}
|
|
1346
1410
|
nullable() {
|
|
1347
|
-
return
|
|
1411
|
+
return z.create(this, this._def);
|
|
1348
1412
|
}
|
|
1349
1413
|
nullish() {
|
|
1350
1414
|
return this.nullable().optional();
|
|
@@ -1353,16 +1417,16 @@ var C = class {
|
|
|
1353
1417
|
return D.create(this);
|
|
1354
1418
|
}
|
|
1355
1419
|
promise() {
|
|
1356
|
-
return
|
|
1420
|
+
return I.create(this, this._def);
|
|
1357
1421
|
}
|
|
1358
1422
|
or(e) {
|
|
1359
|
-
return
|
|
1423
|
+
return at.create([this, e], this._def);
|
|
1360
1424
|
}
|
|
1361
1425
|
and(e) {
|
|
1362
|
-
return
|
|
1426
|
+
return ct.create(this, e, this._def);
|
|
1363
1427
|
}
|
|
1364
1428
|
transform(e) {
|
|
1365
|
-
return new
|
|
1429
|
+
return new L({
|
|
1366
1430
|
...S(this._def),
|
|
1367
1431
|
schema: this,
|
|
1368
1432
|
typeName: H.ZodEffects,
|
|
@@ -1374,7 +1438,7 @@ var C = class {
|
|
|
1374
1438
|
}
|
|
1375
1439
|
default(e) {
|
|
1376
1440
|
let t = typeof e == "function" ? e : () => e;
|
|
1377
|
-
return new
|
|
1441
|
+
return new B({
|
|
1378
1442
|
...S(this._def),
|
|
1379
1443
|
innerType: this,
|
|
1380
1444
|
defaultValue: t,
|
|
@@ -1382,7 +1446,7 @@ var C = class {
|
|
|
1382
1446
|
});
|
|
1383
1447
|
}
|
|
1384
1448
|
brand() {
|
|
1385
|
-
return new
|
|
1449
|
+
return new ht({
|
|
1386
1450
|
typeName: H.ZodBranded,
|
|
1387
1451
|
type: this,
|
|
1388
1452
|
...S(this._def)
|
|
@@ -1390,7 +1454,7 @@ var C = class {
|
|
|
1390
1454
|
}
|
|
1391
1455
|
catch(e) {
|
|
1392
1456
|
let t = typeof e == "function" ? e : () => e;
|
|
1393
|
-
return new
|
|
1457
|
+
return new V({
|
|
1394
1458
|
...S(this._def),
|
|
1395
1459
|
innerType: this,
|
|
1396
1460
|
catchValue: t,
|
|
@@ -1405,10 +1469,10 @@ var C = class {
|
|
|
1405
1469
|
});
|
|
1406
1470
|
}
|
|
1407
1471
|
pipe(e) {
|
|
1408
|
-
return
|
|
1472
|
+
return gt.create(this, e);
|
|
1409
1473
|
}
|
|
1410
1474
|
readonly() {
|
|
1411
|
-
return
|
|
1475
|
+
return _t.create(this);
|
|
1412
1476
|
}
|
|
1413
1477
|
isOptional() {
|
|
1414
1478
|
return this.safeParse(void 0).success;
|
|
@@ -1416,25 +1480,25 @@ var C = class {
|
|
|
1416
1480
|
isNullable() {
|
|
1417
1481
|
return this.safeParse(null).success;
|
|
1418
1482
|
}
|
|
1419
|
-
},
|
|
1420
|
-
function
|
|
1483
|
+
}, Te = /^c[^\s-]{8,}$/i, Ee = /^[0-9a-z]+$/, De = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Oe = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ke = /^[a-z0-9_-]{21}$/i, Ae = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, je = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Me = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ne = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Pe, Fe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ie = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Le = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Re = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ze = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Be = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ve = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", He = RegExp(`^${Ve}$`);
|
|
1484
|
+
function Ue(e) {
|
|
1421
1485
|
let t = "[0-5]\\d";
|
|
1422
1486
|
e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
|
|
1423
1487
|
let n = e.precision ? "+" : "?";
|
|
1424
1488
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
|
|
1425
1489
|
}
|
|
1426
|
-
function Ue(e) {
|
|
1427
|
-
return RegExp(`^${He(e)}$`);
|
|
1428
|
-
}
|
|
1429
1490
|
function We(e) {
|
|
1430
|
-
|
|
1431
|
-
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1491
|
+
return RegExp(`^${Ue(e)}$`);
|
|
1432
1492
|
}
|
|
1433
|
-
function Ge(e
|
|
1434
|
-
|
|
1493
|
+
function Ge(e) {
|
|
1494
|
+
let t = `${Ve}T${Ue(e)}`, n = [];
|
|
1495
|
+
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1435
1496
|
}
|
|
1436
1497
|
function Ke(e, t) {
|
|
1437
|
-
|
|
1498
|
+
return !!((t === "v4" || !t) && Fe.test(e) || (t === "v6" || !t) && Le.test(e));
|
|
1499
|
+
}
|
|
1500
|
+
function qe(e, t) {
|
|
1501
|
+
if (!Ae.test(e)) return !1;
|
|
1438
1502
|
try {
|
|
1439
1503
|
let [n] = e.split(".");
|
|
1440
1504
|
if (!n) return !1;
|
|
@@ -1444,10 +1508,10 @@ function Ke(e, t) {
|
|
|
1444
1508
|
return !1;
|
|
1445
1509
|
}
|
|
1446
1510
|
}
|
|
1447
|
-
function
|
|
1448
|
-
return !!((t === "v4" || !t) &&
|
|
1511
|
+
function Je(e, t) {
|
|
1512
|
+
return !!((t === "v4" || !t) && Ie.test(e) || (t === "v6" || !t) && Re.test(e));
|
|
1449
1513
|
}
|
|
1450
|
-
var
|
|
1514
|
+
var w = class e extends C {
|
|
1451
1515
|
_parse(e) {
|
|
1452
1516
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
|
1453
1517
|
let t = this._getOrReturnCtx(e);
|
|
@@ -1491,37 +1555,37 @@ var Je = class e extends C {
|
|
|
1491
1555
|
exact: !0,
|
|
1492
1556
|
message: r.message
|
|
1493
1557
|
}), t.dirty());
|
|
1494
|
-
} else if (r.kind === "email")
|
|
1558
|
+
} else if (r.kind === "email") Me.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1495
1559
|
validation: "email",
|
|
1496
1560
|
code: f.invalid_string,
|
|
1497
1561
|
message: r.message
|
|
1498
1562
|
}), t.dirty());
|
|
1499
|
-
else if (r.kind === "emoji")
|
|
1563
|
+
else if (r.kind === "emoji") Pe ||= new RegExp(Ne, "u"), Pe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1500
1564
|
validation: "emoji",
|
|
1501
1565
|
code: f.invalid_string,
|
|
1502
1566
|
message: r.message
|
|
1503
1567
|
}), t.dirty());
|
|
1504
|
-
else if (r.kind === "uuid")
|
|
1568
|
+
else if (r.kind === "uuid") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1505
1569
|
validation: "uuid",
|
|
1506
1570
|
code: f.invalid_string,
|
|
1507
1571
|
message: r.message
|
|
1508
1572
|
}), t.dirty());
|
|
1509
|
-
else if (r.kind === "nanoid")
|
|
1573
|
+
else if (r.kind === "nanoid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1510
1574
|
validation: "nanoid",
|
|
1511
1575
|
code: f.invalid_string,
|
|
1512
1576
|
message: r.message
|
|
1513
1577
|
}), t.dirty());
|
|
1514
|
-
else if (r.kind === "cuid")
|
|
1578
|
+
else if (r.kind === "cuid") Te.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1515
1579
|
validation: "cuid",
|
|
1516
1580
|
code: f.invalid_string,
|
|
1517
1581
|
message: r.message
|
|
1518
1582
|
}), t.dirty());
|
|
1519
|
-
else if (r.kind === "cuid2")
|
|
1583
|
+
else if (r.kind === "cuid2") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1520
1584
|
validation: "cuid2",
|
|
1521
1585
|
code: f.invalid_string,
|
|
1522
1586
|
message: r.message
|
|
1523
1587
|
}), t.dirty());
|
|
1524
|
-
else if (r.kind === "ulid")
|
|
1588
|
+
else if (r.kind === "ulid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1525
1589
|
validation: "ulid",
|
|
1526
1590
|
code: f.invalid_string,
|
|
1527
1591
|
message: r.message
|
|
@@ -1554,39 +1618,39 @@ var Je = class e extends C {
|
|
|
1554
1618
|
code: f.invalid_string,
|
|
1555
1619
|
validation: { endsWith: r.value },
|
|
1556
1620
|
message: r.message
|
|
1557
|
-
}), t.dirty()) : r.kind === "datetime" ?
|
|
1621
|
+
}), t.dirty()) : r.kind === "datetime" ? Ge(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1558
1622
|
code: f.invalid_string,
|
|
1559
1623
|
validation: "datetime",
|
|
1560
1624
|
message: r.message
|
|
1561
|
-
}), t.dirty()) : r.kind === "date" ?
|
|
1625
|
+
}), t.dirty()) : r.kind === "date" ? He.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1562
1626
|
code: f.invalid_string,
|
|
1563
1627
|
validation: "date",
|
|
1564
1628
|
message: r.message
|
|
1565
|
-
}), t.dirty()) : r.kind === "time" ?
|
|
1629
|
+
}), t.dirty()) : r.kind === "time" ? We(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1566
1630
|
code: f.invalid_string,
|
|
1567
1631
|
validation: "time",
|
|
1568
1632
|
message: r.message
|
|
1569
|
-
}), t.dirty()) : r.kind === "duration" ?
|
|
1633
|
+
}), t.dirty()) : r.kind === "duration" ? je.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1570
1634
|
validation: "duration",
|
|
1571
1635
|
code: f.invalid_string,
|
|
1572
1636
|
message: r.message
|
|
1573
|
-
}), t.dirty()) : r.kind === "ip" ?
|
|
1637
|
+
}), t.dirty()) : r.kind === "ip" ? Ke(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1574
1638
|
validation: "ip",
|
|
1575
1639
|
code: f.invalid_string,
|
|
1576
1640
|
message: r.message
|
|
1577
|
-
}), t.dirty()) : r.kind === "jwt" ?
|
|
1641
|
+
}), t.dirty()) : r.kind === "jwt" ? qe(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1578
1642
|
validation: "jwt",
|
|
1579
1643
|
code: f.invalid_string,
|
|
1580
1644
|
message: r.message
|
|
1581
|
-
}), t.dirty()) : r.kind === "cidr" ?
|
|
1645
|
+
}), t.dirty()) : r.kind === "cidr" ? Je(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1582
1646
|
validation: "cidr",
|
|
1583
1647
|
code: f.invalid_string,
|
|
1584
1648
|
message: r.message
|
|
1585
|
-
}), t.dirty()) : r.kind === "base64" ?
|
|
1649
|
+
}), t.dirty()) : r.kind === "base64" ? ze.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1586
1650
|
validation: "base64",
|
|
1587
1651
|
code: f.invalid_string,
|
|
1588
1652
|
message: r.message
|
|
1589
|
-
}), t.dirty()) : r.kind === "base64url" ?
|
|
1653
|
+
}), t.dirty()) : r.kind === "base64url" ? Be.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1590
1654
|
validation: "base64url",
|
|
1591
1655
|
code: f.invalid_string,
|
|
1592
1656
|
message: r.message
|
|
@@ -1855,7 +1919,7 @@ var Je = class e extends C {
|
|
|
1855
1919
|
return e;
|
|
1856
1920
|
}
|
|
1857
1921
|
};
|
|
1858
|
-
|
|
1922
|
+
w.create = (e) => new w({
|
|
1859
1923
|
checks: [],
|
|
1860
1924
|
typeName: H.ZodString,
|
|
1861
1925
|
coerce: e?.coerce ?? !1,
|
|
@@ -2261,7 +2325,7 @@ et.create = (e) => new et({
|
|
|
2261
2325
|
typeName: H.ZodSymbol,
|
|
2262
2326
|
...S(e)
|
|
2263
2327
|
});
|
|
2264
|
-
var
|
|
2328
|
+
var tt = class extends C {
|
|
2265
2329
|
_parse(e) {
|
|
2266
2330
|
if (this._getType(e) !== u.undefined) {
|
|
2267
2331
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2274,11 +2338,11 @@ var w = class extends C {
|
|
|
2274
2338
|
return v(e.data);
|
|
2275
2339
|
}
|
|
2276
2340
|
};
|
|
2277
|
-
|
|
2341
|
+
tt.create = (e) => new tt({
|
|
2278
2342
|
typeName: H.ZodUndefined,
|
|
2279
2343
|
...S(e)
|
|
2280
2344
|
});
|
|
2281
|
-
var
|
|
2345
|
+
var nt = class extends C {
|
|
2282
2346
|
_parse(e) {
|
|
2283
2347
|
if (this._getType(e) !== u.null) {
|
|
2284
2348
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2291,11 +2355,11 @@ var tt = class extends C {
|
|
|
2291
2355
|
return v(e.data);
|
|
2292
2356
|
}
|
|
2293
2357
|
};
|
|
2294
|
-
|
|
2358
|
+
nt.create = (e) => new nt({
|
|
2295
2359
|
typeName: H.ZodNull,
|
|
2296
2360
|
...S(e)
|
|
2297
2361
|
});
|
|
2298
|
-
var
|
|
2362
|
+
var rt = class extends C {
|
|
2299
2363
|
constructor() {
|
|
2300
2364
|
super(...arguments), this._any = !0;
|
|
2301
2365
|
}
|
|
@@ -2303,7 +2367,7 @@ var nt = class extends C {
|
|
|
2303
2367
|
return v(e.data);
|
|
2304
2368
|
}
|
|
2305
2369
|
};
|
|
2306
|
-
|
|
2370
|
+
rt.create = (e) => new rt({
|
|
2307
2371
|
typeName: H.ZodAny,
|
|
2308
2372
|
...S(e)
|
|
2309
2373
|
});
|
|
@@ -2333,7 +2397,7 @@ E.create = (e) => new E({
|
|
|
2333
2397
|
typeName: H.ZodNever,
|
|
2334
2398
|
...S(e)
|
|
2335
2399
|
});
|
|
2336
|
-
var
|
|
2400
|
+
var it = class extends C {
|
|
2337
2401
|
_parse(e) {
|
|
2338
2402
|
if (this._getType(e) !== u.undefined) {
|
|
2339
2403
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2346,7 +2410,7 @@ var rt = class extends C {
|
|
|
2346
2410
|
return v(e.data);
|
|
2347
2411
|
}
|
|
2348
2412
|
};
|
|
2349
|
-
|
|
2413
|
+
it.create = (e) => new it({
|
|
2350
2414
|
typeName: H.ZodVoid,
|
|
2351
2415
|
...S(e)
|
|
2352
2416
|
});
|
|
@@ -2435,7 +2499,7 @@ function O(e) {
|
|
|
2435
2499
|
let t = {};
|
|
2436
2500
|
for (let n in e.shape) {
|
|
2437
2501
|
let r = e.shape[n];
|
|
2438
|
-
t[n] =
|
|
2502
|
+
t[n] = R.create(O(r));
|
|
2439
2503
|
}
|
|
2440
2504
|
return new k({
|
|
2441
2505
|
...e._def,
|
|
@@ -2445,7 +2509,7 @@ function O(e) {
|
|
|
2445
2509
|
return e instanceof D ? new D({
|
|
2446
2510
|
...e._def,
|
|
2447
2511
|
type: O(e.element)
|
|
2448
|
-
}) : e instanceof
|
|
2512
|
+
}) : e instanceof R ? R.create(O(e.unwrap())) : e instanceof z ? z.create(O(e.unwrap())) : e instanceof j ? j.create(e.items.map((e) => O(e))) : e;
|
|
2449
2513
|
}
|
|
2450
2514
|
var k = class e extends C {
|
|
2451
2515
|
constructor() {
|
|
@@ -2615,7 +2679,7 @@ var k = class e extends C {
|
|
|
2615
2679
|
for (let e of l.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
|
|
2616
2680
|
else {
|
|
2617
2681
|
let t = this.shape[e];
|
|
2618
|
-
for (; t instanceof
|
|
2682
|
+
for (; t instanceof R;) t = t._def.innerType;
|
|
2619
2683
|
n[e] = t;
|
|
2620
2684
|
}
|
|
2621
2685
|
return new e({
|
|
@@ -2624,7 +2688,7 @@ var k = class e extends C {
|
|
|
2624
2688
|
});
|
|
2625
2689
|
}
|
|
2626
2690
|
keyof() {
|
|
2627
|
-
return
|
|
2691
|
+
return pt(l.objectKeys(this.shape));
|
|
2628
2692
|
}
|
|
2629
2693
|
};
|
|
2630
2694
|
k.create = (e, t) => new k({
|
|
@@ -2646,7 +2710,7 @@ k.create = (e, t) => new k({
|
|
|
2646
2710
|
typeName: H.ZodObject,
|
|
2647
2711
|
...S(t)
|
|
2648
2712
|
});
|
|
2649
|
-
var
|
|
2713
|
+
var at = class extends C {
|
|
2650
2714
|
_parse(e) {
|
|
2651
2715
|
let { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2652
2716
|
function r(e) {
|
|
@@ -2709,12 +2773,12 @@ var A = class extends C {
|
|
|
2709
2773
|
return this._def.options;
|
|
2710
2774
|
}
|
|
2711
2775
|
};
|
|
2712
|
-
|
|
2776
|
+
at.create = (e, t) => new at({
|
|
2713
2777
|
options: e,
|
|
2714
2778
|
typeName: H.ZodUnion,
|
|
2715
2779
|
...S(t)
|
|
2716
2780
|
});
|
|
2717
|
-
var
|
|
2781
|
+
var A = (e) => e instanceof M ? A(e.schema) : e instanceof L ? A(e.innerType()) : e instanceof N ? [e.value] : e instanceof P ? e.options : e instanceof F ? l.objectValues(e.enum) : e instanceof B ? A(e._def.innerType) : e instanceof tt ? [void 0] : e instanceof nt ? [null] : e instanceof R ? [void 0, ...A(e.unwrap())] : e instanceof z ? [null, ...A(e.unwrap())] : e instanceof ht || e instanceof _t ? A(e.unwrap()) : e instanceof V ? A(e._def.innerType) : [], ot = class e extends C {
|
|
2718
2782
|
_parse(e) {
|
|
2719
2783
|
let { ctx: t } = this._processInputParams(e);
|
|
2720
2784
|
if (t.parsedType !== u.object) return h(t, {
|
|
@@ -2749,7 +2813,7 @@ var j = (e) => e instanceof N ? j(e.schema) : e instanceof R ? j(e.innerType())
|
|
|
2749
2813
|
static create(t, n, r) {
|
|
2750
2814
|
let i = /* @__PURE__ */ new Map();
|
|
2751
2815
|
for (let e of n) {
|
|
2752
|
-
let n =
|
|
2816
|
+
let n = A(e.shape[t]);
|
|
2753
2817
|
if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
2754
2818
|
for (let r of n) {
|
|
2755
2819
|
if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
|
|
@@ -2765,7 +2829,7 @@ var j = (e) => e instanceof N ? j(e.schema) : e instanceof R ? j(e.innerType())
|
|
|
2765
2829
|
});
|
|
2766
2830
|
}
|
|
2767
2831
|
};
|
|
2768
|
-
function
|
|
2832
|
+
function st(e, t) {
|
|
2769
2833
|
let n = d(e), r = d(t);
|
|
2770
2834
|
if (e === t) return {
|
|
2771
2835
|
valid: !0,
|
|
@@ -2777,7 +2841,7 @@ function at(e, t) {
|
|
|
2777
2841
|
...t
|
|
2778
2842
|
};
|
|
2779
2843
|
for (let n of r) {
|
|
2780
|
-
let r =
|
|
2844
|
+
let r = st(e[n], t[n]);
|
|
2781
2845
|
if (!r.valid) return { valid: !1 };
|
|
2782
2846
|
i[n] = r.data;
|
|
2783
2847
|
}
|
|
@@ -2790,7 +2854,7 @@ function at(e, t) {
|
|
|
2790
2854
|
if (e.length !== t.length) return { valid: !1 };
|
|
2791
2855
|
let n = [];
|
|
2792
2856
|
for (let r = 0; r < e.length; r++) {
|
|
2793
|
-
let i = e[r], a = t[r], o =
|
|
2857
|
+
let i = e[r], a = t[r], o = st(i, a);
|
|
2794
2858
|
if (!o.valid) return { valid: !1 };
|
|
2795
2859
|
n.push(o.data);
|
|
2796
2860
|
}
|
|
@@ -2804,12 +2868,12 @@ function at(e, t) {
|
|
|
2804
2868
|
data: e
|
|
2805
2869
|
} : { valid: !1 };
|
|
2806
2870
|
}
|
|
2807
|
-
var
|
|
2871
|
+
var ct = class extends C {
|
|
2808
2872
|
_parse(e) {
|
|
2809
2873
|
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2810
|
-
if (
|
|
2811
|
-
let i =
|
|
2812
|
-
return i.valid ? ((
|
|
2874
|
+
if (xe(e) || xe(r)) return _;
|
|
2875
|
+
let i = st(e.value, r.value);
|
|
2876
|
+
return i.valid ? ((Se(e) || Se(r)) && t.dirty(), {
|
|
2813
2877
|
status: t.value,
|
|
2814
2878
|
value: i.data
|
|
2815
2879
|
}) : (h(n, { code: f.invalid_intersection_types }), _);
|
|
@@ -2833,13 +2897,13 @@ var ot = class extends C {
|
|
|
2833
2897
|
}));
|
|
2834
2898
|
}
|
|
2835
2899
|
};
|
|
2836
|
-
|
|
2900
|
+
ct.create = (e, t, n) => new ct({
|
|
2837
2901
|
left: e,
|
|
2838
2902
|
right: t,
|
|
2839
2903
|
typeName: H.ZodIntersection,
|
|
2840
2904
|
...S(n)
|
|
2841
2905
|
});
|
|
2842
|
-
var
|
|
2906
|
+
var j = class e extends C {
|
|
2843
2907
|
_parse(e) {
|
|
2844
2908
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2845
2909
|
if (n.parsedType !== u.array) return h(n, {
|
|
@@ -2877,16 +2941,16 @@ var M = class e extends C {
|
|
|
2877
2941
|
});
|
|
2878
2942
|
}
|
|
2879
2943
|
};
|
|
2880
|
-
|
|
2944
|
+
j.create = (e, t) => {
|
|
2881
2945
|
if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2882
|
-
return new
|
|
2946
|
+
return new j({
|
|
2883
2947
|
items: e,
|
|
2884
2948
|
typeName: H.ZodTuple,
|
|
2885
2949
|
rest: null,
|
|
2886
2950
|
...S(t)
|
|
2887
2951
|
});
|
|
2888
2952
|
};
|
|
2889
|
-
var
|
|
2953
|
+
var lt = class e extends C {
|
|
2890
2954
|
get keySchema() {
|
|
2891
2955
|
return this._def.keyType;
|
|
2892
2956
|
}
|
|
@@ -2918,13 +2982,13 @@ var st = class e extends C {
|
|
|
2918
2982
|
typeName: H.ZodRecord,
|
|
2919
2983
|
...S(r)
|
|
2920
2984
|
}) : new e({
|
|
2921
|
-
keyType:
|
|
2985
|
+
keyType: w.create(),
|
|
2922
2986
|
valueType: t,
|
|
2923
2987
|
typeName: H.ZodRecord,
|
|
2924
2988
|
...S(n)
|
|
2925
2989
|
});
|
|
2926
2990
|
}
|
|
2927
|
-
},
|
|
2991
|
+
}, ut = class extends C {
|
|
2928
2992
|
get keySchema() {
|
|
2929
2993
|
return this._def.keyType;
|
|
2930
2994
|
}
|
|
@@ -2970,13 +3034,13 @@ var st = class e extends C {
|
|
|
2970
3034
|
}
|
|
2971
3035
|
}
|
|
2972
3036
|
};
|
|
2973
|
-
|
|
3037
|
+
ut.create = (e, t, n) => new ut({
|
|
2974
3038
|
valueType: t,
|
|
2975
3039
|
keyType: e,
|
|
2976
3040
|
typeName: H.ZodMap,
|
|
2977
3041
|
...S(n)
|
|
2978
3042
|
});
|
|
2979
|
-
var
|
|
3043
|
+
var dt = class e extends C {
|
|
2980
3044
|
_parse(e) {
|
|
2981
3045
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2982
3046
|
if (n.parsedType !== u.set) return h(n, {
|
|
@@ -3040,14 +3104,14 @@ var lt = class e extends C {
|
|
|
3040
3104
|
return this.min(1, e);
|
|
3041
3105
|
}
|
|
3042
3106
|
};
|
|
3043
|
-
|
|
3107
|
+
dt.create = (e, t) => new dt({
|
|
3044
3108
|
valueType: e,
|
|
3045
3109
|
minSize: null,
|
|
3046
3110
|
maxSize: null,
|
|
3047
3111
|
typeName: H.ZodSet,
|
|
3048
3112
|
...S(t)
|
|
3049
3113
|
});
|
|
3050
|
-
var
|
|
3114
|
+
var ft = class e extends C {
|
|
3051
3115
|
constructor() {
|
|
3052
3116
|
super(...arguments), this.validate = this.implement;
|
|
3053
3117
|
}
|
|
@@ -3059,13 +3123,13 @@ var ut = class e extends C {
|
|
|
3059
3123
|
received: t.parsedType
|
|
3060
3124
|
}), _;
|
|
3061
3125
|
function n(e, n) {
|
|
3062
|
-
return
|
|
3126
|
+
return ye({
|
|
3063
3127
|
data: e,
|
|
3064
3128
|
path: t.path,
|
|
3065
3129
|
errorMaps: [
|
|
3066
3130
|
t.common.contextualErrorMap,
|
|
3067
3131
|
t.schemaErrorMap,
|
|
3068
|
-
|
|
3132
|
+
ve(),
|
|
3069
3133
|
m
|
|
3070
3134
|
].filter((e) => !!e),
|
|
3071
3135
|
issueData: {
|
|
@@ -3075,13 +3139,13 @@ var ut = class e extends C {
|
|
|
3075
3139
|
});
|
|
3076
3140
|
}
|
|
3077
3141
|
function r(e, n) {
|
|
3078
|
-
return
|
|
3142
|
+
return ye({
|
|
3079
3143
|
data: e,
|
|
3080
3144
|
path: t.path,
|
|
3081
3145
|
errorMaps: [
|
|
3082
3146
|
t.common.contextualErrorMap,
|
|
3083
3147
|
t.schemaErrorMap,
|
|
3084
|
-
|
|
3148
|
+
ve(),
|
|
3085
3149
|
m
|
|
3086
3150
|
].filter((e) => !!e),
|
|
3087
3151
|
issueData: {
|
|
@@ -3091,7 +3155,7 @@ var ut = class e extends C {
|
|
|
3091
3155
|
});
|
|
3092
3156
|
}
|
|
3093
3157
|
let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
3094
|
-
if (this._def.returns instanceof
|
|
3158
|
+
if (this._def.returns instanceof I) {
|
|
3095
3159
|
let e = this;
|
|
3096
3160
|
return v(async function(...t) {
|
|
3097
3161
|
let o = new p([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
|
|
@@ -3122,7 +3186,7 @@ var ut = class e extends C {
|
|
|
3122
3186
|
args(...t) {
|
|
3123
3187
|
return new e({
|
|
3124
3188
|
...this._def,
|
|
3125
|
-
args:
|
|
3189
|
+
args: j.create(t).rest(T.create())
|
|
3126
3190
|
});
|
|
3127
3191
|
}
|
|
3128
3192
|
returns(t) {
|
|
@@ -3139,13 +3203,13 @@ var ut = class e extends C {
|
|
|
3139
3203
|
}
|
|
3140
3204
|
static create(t, n, r) {
|
|
3141
3205
|
return new e({
|
|
3142
|
-
args: t ||
|
|
3206
|
+
args: t || j.create([]).rest(T.create()),
|
|
3143
3207
|
returns: n || T.create(),
|
|
3144
3208
|
typeName: H.ZodFunction,
|
|
3145
3209
|
...S(r)
|
|
3146
3210
|
});
|
|
3147
3211
|
}
|
|
3148
|
-
},
|
|
3212
|
+
}, M = class extends C {
|
|
3149
3213
|
get schema() {
|
|
3150
3214
|
return this._def.getter();
|
|
3151
3215
|
}
|
|
@@ -3158,12 +3222,12 @@ var ut = class e extends C {
|
|
|
3158
3222
|
});
|
|
3159
3223
|
}
|
|
3160
3224
|
};
|
|
3161
|
-
|
|
3225
|
+
M.create = (e, t) => new M({
|
|
3162
3226
|
getter: e,
|
|
3163
3227
|
typeName: H.ZodLazy,
|
|
3164
3228
|
...S(t)
|
|
3165
3229
|
});
|
|
3166
|
-
var
|
|
3230
|
+
var N = class extends C {
|
|
3167
3231
|
_parse(e) {
|
|
3168
3232
|
if (e.data !== this._def.value) {
|
|
3169
3233
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3182,19 +3246,19 @@ var P = class extends C {
|
|
|
3182
3246
|
return this._def.value;
|
|
3183
3247
|
}
|
|
3184
3248
|
};
|
|
3185
|
-
|
|
3249
|
+
N.create = (e, t) => new N({
|
|
3186
3250
|
value: e,
|
|
3187
3251
|
typeName: H.ZodLiteral,
|
|
3188
3252
|
...S(t)
|
|
3189
3253
|
});
|
|
3190
|
-
function
|
|
3191
|
-
return new
|
|
3254
|
+
function pt(e, t) {
|
|
3255
|
+
return new P({
|
|
3192
3256
|
values: e,
|
|
3193
3257
|
typeName: H.ZodEnum,
|
|
3194
3258
|
...S(t)
|
|
3195
3259
|
});
|
|
3196
3260
|
}
|
|
3197
|
-
var
|
|
3261
|
+
var P = class e extends C {
|
|
3198
3262
|
_parse(e) {
|
|
3199
3263
|
if (typeof e.data != "string") {
|
|
3200
3264
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -3245,8 +3309,8 @@ var F = class e extends C {
|
|
|
3245
3309
|
});
|
|
3246
3310
|
}
|
|
3247
3311
|
};
|
|
3248
|
-
|
|
3249
|
-
var
|
|
3312
|
+
P.create = pt;
|
|
3313
|
+
var F = class extends C {
|
|
3250
3314
|
_parse(e) {
|
|
3251
3315
|
let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3252
3316
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -3271,12 +3335,12 @@ var I = class extends C {
|
|
|
3271
3335
|
return this._def.values;
|
|
3272
3336
|
}
|
|
3273
3337
|
};
|
|
3274
|
-
|
|
3338
|
+
F.create = (e, t) => new F({
|
|
3275
3339
|
values: e,
|
|
3276
3340
|
typeName: H.ZodNativeEnum,
|
|
3277
3341
|
...S(t)
|
|
3278
3342
|
});
|
|
3279
|
-
var
|
|
3343
|
+
var I = class extends C {
|
|
3280
3344
|
unwrap() {
|
|
3281
3345
|
return this._def.type;
|
|
3282
3346
|
}
|
|
@@ -3292,12 +3356,12 @@ var L = class extends C {
|
|
|
3292
3356
|
})));
|
|
3293
3357
|
}
|
|
3294
3358
|
};
|
|
3295
|
-
|
|
3359
|
+
I.create = (e, t) => new I({
|
|
3296
3360
|
type: e,
|
|
3297
3361
|
typeName: H.ZodPromise,
|
|
3298
3362
|
...S(t)
|
|
3299
3363
|
});
|
|
3300
|
-
var
|
|
3364
|
+
var L = class extends C {
|
|
3301
3365
|
innerType() {
|
|
3302
3366
|
return this._def.schema;
|
|
3303
3367
|
}
|
|
@@ -3322,7 +3386,7 @@ var R = class extends C {
|
|
|
3322
3386
|
path: n.path,
|
|
3323
3387
|
parent: n
|
|
3324
3388
|
});
|
|
3325
|
-
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ?
|
|
3389
|
+
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? be(r.value) : r;
|
|
3326
3390
|
});
|
|
3327
3391
|
{
|
|
3328
3392
|
if (t.value === "aborted") return _;
|
|
@@ -3331,7 +3395,7 @@ var R = class extends C {
|
|
|
3331
3395
|
path: n.path,
|
|
3332
3396
|
parent: n
|
|
3333
3397
|
});
|
|
3334
|
-
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ?
|
|
3398
|
+
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? be(r.value) : r;
|
|
3335
3399
|
}
|
|
3336
3400
|
}
|
|
3337
3401
|
if (r.type === "refinement") {
|
|
@@ -3388,12 +3452,12 @@ var R = class extends C {
|
|
|
3388
3452
|
l.assertNever(r);
|
|
3389
3453
|
}
|
|
3390
3454
|
};
|
|
3391
|
-
|
|
3455
|
+
L.create = (e, t, n) => new L({
|
|
3392
3456
|
schema: e,
|
|
3393
3457
|
typeName: H.ZodEffects,
|
|
3394
3458
|
effect: t,
|
|
3395
3459
|
...S(n)
|
|
3396
|
-
}),
|
|
3460
|
+
}), L.createWithPreprocess = (e, t, n) => new L({
|
|
3397
3461
|
schema: t,
|
|
3398
3462
|
effect: {
|
|
3399
3463
|
type: "preprocess",
|
|
@@ -3402,7 +3466,7 @@ R.create = (e, t, n) => new R({
|
|
|
3402
3466
|
typeName: H.ZodEffects,
|
|
3403
3467
|
...S(n)
|
|
3404
3468
|
});
|
|
3405
|
-
var
|
|
3469
|
+
var R = class extends C {
|
|
3406
3470
|
_parse(e) {
|
|
3407
3471
|
return this._getType(e) === u.undefined ? v(void 0) : this._def.innerType._parse(e);
|
|
3408
3472
|
}
|
|
@@ -3410,12 +3474,12 @@ var z = class extends C {
|
|
|
3410
3474
|
return this._def.innerType;
|
|
3411
3475
|
}
|
|
3412
3476
|
};
|
|
3413
|
-
|
|
3477
|
+
R.create = (e, t) => new R({
|
|
3414
3478
|
innerType: e,
|
|
3415
3479
|
typeName: H.ZodOptional,
|
|
3416
3480
|
...S(t)
|
|
3417
3481
|
});
|
|
3418
|
-
var
|
|
3482
|
+
var z = class extends C {
|
|
3419
3483
|
_parse(e) {
|
|
3420
3484
|
return this._getType(e) === u.null ? v(null) : this._def.innerType._parse(e);
|
|
3421
3485
|
}
|
|
@@ -3423,12 +3487,12 @@ var B = class extends C {
|
|
|
3423
3487
|
return this._def.innerType;
|
|
3424
3488
|
}
|
|
3425
3489
|
};
|
|
3426
|
-
|
|
3490
|
+
z.create = (e, t) => new z({
|
|
3427
3491
|
innerType: e,
|
|
3428
3492
|
typeName: H.ZodNullable,
|
|
3429
3493
|
...S(t)
|
|
3430
3494
|
});
|
|
3431
|
-
var
|
|
3495
|
+
var B = class extends C {
|
|
3432
3496
|
_parse(e) {
|
|
3433
3497
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3434
3498
|
return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
@@ -3441,13 +3505,13 @@ var V = class extends C {
|
|
|
3441
3505
|
return this._def.innerType;
|
|
3442
3506
|
}
|
|
3443
3507
|
};
|
|
3444
|
-
|
|
3508
|
+
B.create = (e, t) => new B({
|
|
3445
3509
|
innerType: e,
|
|
3446
3510
|
typeName: H.ZodDefault,
|
|
3447
3511
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
3448
3512
|
...S(t)
|
|
3449
3513
|
});
|
|
3450
|
-
var
|
|
3514
|
+
var V = class extends C {
|
|
3451
3515
|
_parse(e) {
|
|
3452
3516
|
let { ctx: t } = this._processInputParams(e), n = {
|
|
3453
3517
|
...t,
|
|
@@ -3460,7 +3524,7 @@ var ft = class extends C {
|
|
|
3460
3524
|
path: n.path,
|
|
3461
3525
|
parent: { ...n }
|
|
3462
3526
|
});
|
|
3463
|
-
return
|
|
3527
|
+
return Ce(r) ? r.then((e) => ({
|
|
3464
3528
|
status: "valid",
|
|
3465
3529
|
value: e.status === "valid" ? e.value : this._def.catchValue({
|
|
3466
3530
|
get error() {
|
|
@@ -3482,13 +3546,13 @@ var ft = class extends C {
|
|
|
3482
3546
|
return this._def.innerType;
|
|
3483
3547
|
}
|
|
3484
3548
|
};
|
|
3485
|
-
|
|
3549
|
+
V.create = (e, t) => new V({
|
|
3486
3550
|
innerType: e,
|
|
3487
3551
|
typeName: H.ZodCatch,
|
|
3488
3552
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
3489
3553
|
...S(t)
|
|
3490
3554
|
});
|
|
3491
|
-
var
|
|
3555
|
+
var mt = class extends C {
|
|
3492
3556
|
_parse(e) {
|
|
3493
3557
|
if (this._getType(e) !== u.nan) {
|
|
3494
3558
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3504,11 +3568,11 @@ var pt = class extends C {
|
|
|
3504
3568
|
};
|
|
3505
3569
|
}
|
|
3506
3570
|
};
|
|
3507
|
-
|
|
3571
|
+
mt.create = (e) => new mt({
|
|
3508
3572
|
typeName: H.ZodNaN,
|
|
3509
3573
|
...S(e)
|
|
3510
3574
|
});
|
|
3511
|
-
var
|
|
3575
|
+
var ht = class extends C {
|
|
3512
3576
|
_parse(e) {
|
|
3513
3577
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3514
3578
|
return this._def.type._parse({
|
|
@@ -3520,7 +3584,7 @@ var mt = class extends C {
|
|
|
3520
3584
|
unwrap() {
|
|
3521
3585
|
return this._def.type;
|
|
3522
3586
|
}
|
|
3523
|
-
},
|
|
3587
|
+
}, gt = class e extends C {
|
|
3524
3588
|
_parse(e) {
|
|
3525
3589
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3526
3590
|
if (n.common.async) return (async () => {
|
|
@@ -3529,7 +3593,7 @@ var mt = class extends C {
|
|
|
3529
3593
|
path: n.path,
|
|
3530
3594
|
parent: n
|
|
3531
3595
|
});
|
|
3532
|
-
return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(),
|
|
3596
|
+
return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), be(e.value)) : this._def.out._parseAsync({
|
|
3533
3597
|
data: e.value,
|
|
3534
3598
|
path: n.path,
|
|
3535
3599
|
parent: n
|
|
@@ -3558,16 +3622,16 @@ var mt = class extends C {
|
|
|
3558
3622
|
typeName: H.ZodPipeline
|
|
3559
3623
|
});
|
|
3560
3624
|
}
|
|
3561
|
-
},
|
|
3625
|
+
}, _t = class extends C {
|
|
3562
3626
|
_parse(e) {
|
|
3563
3627
|
let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
|
|
3564
|
-
return
|
|
3628
|
+
return Ce(t) ? t.then((e) => n(e)) : n(t);
|
|
3565
3629
|
}
|
|
3566
3630
|
unwrap() {
|
|
3567
3631
|
return this._def.innerType;
|
|
3568
3632
|
}
|
|
3569
3633
|
};
|
|
3570
|
-
|
|
3634
|
+
_t.create = (e, t) => new _t({
|
|
3571
3635
|
innerType: e,
|
|
3572
3636
|
typeName: H.ZodReadonly,
|
|
3573
3637
|
...S(t)
|
|
@@ -3576,17 +3640,17 @@ var H;
|
|
|
3576
3640
|
(function(e) {
|
|
3577
3641
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
3578
3642
|
})(H ||= {});
|
|
3579
|
-
var U =
|
|
3580
|
-
|
|
3581
|
-
var
|
|
3582
|
-
$e.create, et.create,
|
|
3583
|
-
var
|
|
3584
|
-
k.strictCreate,
|
|
3585
|
-
var K =
|
|
3586
|
-
I.create, L.create, R.create, z.create,
|
|
3643
|
+
var U = w.create, W = Xe.create;
|
|
3644
|
+
mt.create, Ze.create;
|
|
3645
|
+
var vt = Qe.create;
|
|
3646
|
+
$e.create, et.create, tt.create, nt.create, rt.create, T.create, E.create, it.create;
|
|
3647
|
+
var yt = D.create, G = k.create;
|
|
3648
|
+
k.strictCreate, at.create, ot.create, ct.create, j.create, lt.create, ut.create, dt.create, ft.create, M.create, N.create;
|
|
3649
|
+
var K = P.create;
|
|
3650
|
+
F.create, I.create, L.create, R.create, z.create, L.createWithPreprocess, gt.create;
|
|
3587
3651
|
//#endregion
|
|
3588
3652
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
3589
|
-
var
|
|
3653
|
+
var bt = Symbol("Let zodToJsonSchema decide on which parser to use"), xt = {
|
|
3590
3654
|
name: void 0,
|
|
3591
3655
|
$refStrategy: "root",
|
|
3592
3656
|
basePath: ["#"],
|
|
@@ -3609,14 +3673,14 @@ var yt = Symbol("Let zodToJsonSchema decide on which parser to use"), bt = {
|
|
|
3609
3673
|
base64Strategy: "contentEncoding:base64",
|
|
3610
3674
|
nameStrategy: "ref",
|
|
3611
3675
|
openAiAnyTypeName: "OpenAiAnyType"
|
|
3612
|
-
},
|
|
3613
|
-
...
|
|
3676
|
+
}, St = (e) => typeof e == "string" ? {
|
|
3677
|
+
...xt,
|
|
3614
3678
|
name: e
|
|
3615
3679
|
} : {
|
|
3616
|
-
...
|
|
3680
|
+
...xt,
|
|
3617
3681
|
...e
|
|
3618
|
-
},
|
|
3619
|
-
let t =
|
|
3682
|
+
}, Ct = (e) => {
|
|
3683
|
+
let t = St(e), n = t.name === void 0 ? t.basePath : [
|
|
3620
3684
|
...t.basePath,
|
|
3621
3685
|
t.definitionPath,
|
|
3622
3686
|
t.name
|
|
@@ -3639,18 +3703,18 @@ var yt = Symbol("Let zodToJsonSchema decide on which parser to use"), bt = {
|
|
|
3639
3703
|
};
|
|
3640
3704
|
//#endregion
|
|
3641
3705
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
3642
|
-
function
|
|
3706
|
+
function wt(e, t, n, r) {
|
|
3643
3707
|
r?.errorMessages && n && (e.errorMessage = {
|
|
3644
3708
|
...e.errorMessage,
|
|
3645
3709
|
[t]: n
|
|
3646
3710
|
});
|
|
3647
3711
|
}
|
|
3648
3712
|
function q(e, t, n, r, i) {
|
|
3649
|
-
e[t] = n,
|
|
3713
|
+
e[t] = n, wt(e, t, r, i);
|
|
3650
3714
|
}
|
|
3651
3715
|
//#endregion
|
|
3652
3716
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
3653
|
-
var
|
|
3717
|
+
var Tt = (e, t) => {
|
|
3654
3718
|
let n = 0;
|
|
3655
3719
|
for (; n < e.length && n < t.length && e[n] === t[n]; n++);
|
|
3656
3720
|
return [(e.length - n).toString(), ...t.slice(n)].join("/");
|
|
@@ -3664,11 +3728,11 @@ function J(e) {
|
|
|
3664
3728
|
e.definitionPath,
|
|
3665
3729
|
e.openAiAnyTypeName
|
|
3666
3730
|
];
|
|
3667
|
-
return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ?
|
|
3731
|
+
return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? Tt(t, e.currentPath) : t.join("/") };
|
|
3668
3732
|
}
|
|
3669
3733
|
//#endregion
|
|
3670
3734
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
3671
|
-
function
|
|
3735
|
+
function Et(e, t) {
|
|
3672
3736
|
let n = { type: "array" };
|
|
3673
3737
|
return e.type?._def && e.type?._def?.typeName !== H.ZodAny && (n.items = Q(e.type._def, {
|
|
3674
3738
|
...t,
|
|
@@ -3677,7 +3741,7 @@ function Tt(e, t) {
|
|
|
3677
3741
|
}
|
|
3678
3742
|
//#endregion
|
|
3679
3743
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
3680
|
-
function
|
|
3744
|
+
function Dt(e, t) {
|
|
3681
3745
|
let n = {
|
|
3682
3746
|
type: "integer",
|
|
3683
3747
|
format: "int64"
|
|
@@ -3696,22 +3760,22 @@ function Et(e, t) {
|
|
|
3696
3760
|
}
|
|
3697
3761
|
//#endregion
|
|
3698
3762
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
3699
|
-
function
|
|
3763
|
+
function Ot() {
|
|
3700
3764
|
return { type: "boolean" };
|
|
3701
3765
|
}
|
|
3702
3766
|
//#endregion
|
|
3703
3767
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
3704
|
-
function
|
|
3768
|
+
function kt(e, t) {
|
|
3705
3769
|
return Q(e.type._def, t);
|
|
3706
3770
|
}
|
|
3707
3771
|
//#endregion
|
|
3708
3772
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
3709
|
-
var
|
|
3773
|
+
var At = (e, t) => Q(e.innerType._def, t);
|
|
3710
3774
|
//#endregion
|
|
3711
3775
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
3712
|
-
function
|
|
3776
|
+
function jt(e, t, n) {
|
|
3713
3777
|
let r = n ?? t.dateStrategy;
|
|
3714
|
-
if (Array.isArray(r)) return { anyOf: r.map((n, r) =>
|
|
3778
|
+
if (Array.isArray(r)) return { anyOf: r.map((n, r) => jt(e, t, n)) };
|
|
3715
3779
|
switch (r) {
|
|
3716
3780
|
case "string":
|
|
3717
3781
|
case "format:date-time": return {
|
|
@@ -3722,10 +3786,10 @@ function At(e, t, n) {
|
|
|
3722
3786
|
type: "string",
|
|
3723
3787
|
format: "date"
|
|
3724
3788
|
};
|
|
3725
|
-
case "integer": return
|
|
3789
|
+
case "integer": return Mt(e, t);
|
|
3726
3790
|
}
|
|
3727
3791
|
}
|
|
3728
|
-
var
|
|
3792
|
+
var Mt = (e, t) => {
|
|
3729
3793
|
let n = {
|
|
3730
3794
|
type: "integer",
|
|
3731
3795
|
format: "unix-time"
|
|
@@ -3741,7 +3805,7 @@ var jt = (e, t) => {
|
|
|
3741
3805
|
};
|
|
3742
3806
|
//#endregion
|
|
3743
3807
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
3744
|
-
function
|
|
3808
|
+
function Nt(e, t) {
|
|
3745
3809
|
return {
|
|
3746
3810
|
...Q(e.innerType._def, t),
|
|
3747
3811
|
default: e.defaultValue()
|
|
@@ -3749,12 +3813,12 @@ function Mt(e, t) {
|
|
|
3749
3813
|
}
|
|
3750
3814
|
//#endregion
|
|
3751
3815
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
3752
|
-
function
|
|
3816
|
+
function Pt(e, t) {
|
|
3753
3817
|
return t.effectStrategy === "input" ? Q(e.schema._def, t) : J(t);
|
|
3754
3818
|
}
|
|
3755
3819
|
//#endregion
|
|
3756
3820
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
3757
|
-
function
|
|
3821
|
+
function Ft(e) {
|
|
3758
3822
|
return {
|
|
3759
3823
|
type: "string",
|
|
3760
3824
|
enum: Array.from(e.values)
|
|
@@ -3762,8 +3826,8 @@ function Pt(e) {
|
|
|
3762
3826
|
}
|
|
3763
3827
|
//#endregion
|
|
3764
3828
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
3765
|
-
var
|
|
3766
|
-
function
|
|
3829
|
+
var It = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
|
|
3830
|
+
function Lt(e, t) {
|
|
3767
3831
|
let n = [Q(e.left._def, {
|
|
3768
3832
|
...t,
|
|
3769
3833
|
currentPath: [
|
|
@@ -3780,7 +3844,7 @@ function It(e, t) {
|
|
|
3780
3844
|
]
|
|
3781
3845
|
})].filter((e) => !!e), r = t.target === "jsonSchema2019-09" ? { unevaluatedProperties: !1 } : void 0, i = [];
|
|
3782
3846
|
return n.forEach((e) => {
|
|
3783
|
-
if (
|
|
3847
|
+
if (It(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
|
|
3784
3848
|
else {
|
|
3785
3849
|
let t = e;
|
|
3786
3850
|
if ("additionalProperties" in e && e.additionalProperties === !1) {
|
|
@@ -3796,7 +3860,7 @@ function It(e, t) {
|
|
|
3796
3860
|
}
|
|
3797
3861
|
//#endregion
|
|
3798
3862
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
3799
|
-
function
|
|
3863
|
+
function Rt(e, t) {
|
|
3800
3864
|
let n = typeof e.value;
|
|
3801
3865
|
return n !== "bigint" && n !== "number" && n !== "boolean" && n !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : t.target === "openApi3" ? {
|
|
3802
3866
|
type: n === "bigint" ? "integer" : n,
|
|
@@ -3808,12 +3872,12 @@ function Lt(e, t) {
|
|
|
3808
3872
|
}
|
|
3809
3873
|
//#endregion
|
|
3810
3874
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
3811
|
-
var
|
|
3875
|
+
var zt = void 0, Y = {
|
|
3812
3876
|
cuid: /^[cC][^\s-]{8,}$/,
|
|
3813
3877
|
cuid2: /^[0-9a-z]+$/,
|
|
3814
3878
|
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
3815
3879
|
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
3816
|
-
emoji: () => (
|
|
3880
|
+
emoji: () => (zt === void 0 && (zt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), zt),
|
|
3817
3881
|
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
3818
3882
|
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
3819
3883
|
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
@@ -3824,7 +3888,7 @@ var Rt = void 0, Y = {
|
|
|
3824
3888
|
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
3825
3889
|
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
3826
3890
|
};
|
|
3827
|
-
function
|
|
3891
|
+
function Bt(e, t) {
|
|
3828
3892
|
let n = { type: "string" };
|
|
3829
3893
|
if (e.checks) for (let r of e.checks) switch (r.kind) {
|
|
3830
3894
|
case "min":
|
|
@@ -3860,10 +3924,10 @@ function zt(e, t) {
|
|
|
3860
3924
|
Z(n, Y.cuid2, r.message, t);
|
|
3861
3925
|
break;
|
|
3862
3926
|
case "startsWith":
|
|
3863
|
-
Z(n, RegExp(`^${
|
|
3927
|
+
Z(n, RegExp(`^${Vt(r.value, t)}`), r.message, t);
|
|
3864
3928
|
break;
|
|
3865
3929
|
case "endsWith":
|
|
3866
|
-
Z(n, RegExp(`${
|
|
3930
|
+
Z(n, RegExp(`${Vt(r.value, t)}$`), r.message, t);
|
|
3867
3931
|
break;
|
|
3868
3932
|
case "datetime":
|
|
3869
3933
|
X(n, "date-time", r.message, t);
|
|
@@ -3881,7 +3945,7 @@ function zt(e, t) {
|
|
|
3881
3945
|
q(n, "minLength", typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, r.message, t), q(n, "maxLength", typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value, r.message, t);
|
|
3882
3946
|
break;
|
|
3883
3947
|
case "includes":
|
|
3884
|
-
Z(n, RegExp(
|
|
3948
|
+
Z(n, RegExp(Vt(r.value, t)), r.message, t);
|
|
3885
3949
|
break;
|
|
3886
3950
|
case "ip":
|
|
3887
3951
|
r.version !== "v6" && X(n, "ipv4", r.message, t), r.version !== "v4" && X(n, "ipv6", r.message, t);
|
|
@@ -3916,13 +3980,13 @@ function zt(e, t) {
|
|
|
3916
3980
|
}
|
|
3917
3981
|
return n;
|
|
3918
3982
|
}
|
|
3919
|
-
function
|
|
3920
|
-
return t.patternStrategy === "escape" ?
|
|
3983
|
+
function Vt(e, t) {
|
|
3984
|
+
return t.patternStrategy === "escape" ? Ut(e) : e;
|
|
3921
3985
|
}
|
|
3922
|
-
var
|
|
3923
|
-
function
|
|
3986
|
+
var Ht = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
3987
|
+
function Ut(e) {
|
|
3924
3988
|
let t = "";
|
|
3925
|
-
for (let n = 0; n < e.length; n++)
|
|
3989
|
+
for (let n = 0; n < e.length; n++) Ht.has(e[n]) || (t += "\\"), t += e[n];
|
|
3926
3990
|
return t;
|
|
3927
3991
|
}
|
|
3928
3992
|
function X(e, t, n, r) {
|
|
@@ -3939,11 +4003,11 @@ function Z(e, t, n, r) {
|
|
|
3939
4003
|
pattern: e.pattern,
|
|
3940
4004
|
...e.errorMessage && r.errorMessages && { errorMessage: { pattern: e.errorMessage.pattern } }
|
|
3941
4005
|
}), delete e.pattern, e.errorMessage && (delete e.errorMessage.pattern, Object.keys(e.errorMessage).length === 0 && delete e.errorMessage)), e.allOf.push({
|
|
3942
|
-
pattern:
|
|
4006
|
+
pattern: Wt(t, r),
|
|
3943
4007
|
...n && r.errorMessages && { errorMessage: { pattern: n } }
|
|
3944
|
-
})) : q(e, "pattern",
|
|
4008
|
+
})) : q(e, "pattern", Wt(t, r), n, r);
|
|
3945
4009
|
}
|
|
3946
|
-
function
|
|
4010
|
+
function Wt(e, t) {
|
|
3947
4011
|
if (!t.applyRegexFlags || !e.flags) return e.source;
|
|
3948
4012
|
let n = {
|
|
3949
4013
|
i: e.flags.includes("i"),
|
|
@@ -3991,7 +4055,7 @@ function Ut(e, t) {
|
|
|
3991
4055
|
}
|
|
3992
4056
|
//#endregion
|
|
3993
4057
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
3994
|
-
function
|
|
4058
|
+
function Gt(e, t) {
|
|
3995
4059
|
if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName === H.ZodEnum) return {
|
|
3996
4060
|
type: "object",
|
|
3997
4061
|
required: e.keyType._def.values,
|
|
@@ -4017,7 +4081,7 @@ function Wt(e, t) {
|
|
|
4017
4081
|
};
|
|
4018
4082
|
if (t.target === "openApi3") return n;
|
|
4019
4083
|
if (e.keyType?._def.typeName === H.ZodString && e.keyType._def.checks?.length) {
|
|
4020
|
-
let { type: r, ...i } =
|
|
4084
|
+
let { type: r, ...i } = Bt(e.keyType._def, t);
|
|
4021
4085
|
return {
|
|
4022
4086
|
...n,
|
|
4023
4087
|
propertyNames: i
|
|
@@ -4028,7 +4092,7 @@ function Wt(e, t) {
|
|
|
4028
4092
|
propertyNames: { enum: e.keyType._def.values }
|
|
4029
4093
|
};
|
|
4030
4094
|
if (e.keyType?._def.typeName === H.ZodBranded && e.keyType._def.type._def.typeName === H.ZodString && e.keyType._def.type._def.checks?.length) {
|
|
4031
|
-
let { type: r, ...i } =
|
|
4095
|
+
let { type: r, ...i } = kt(e.keyType._def, t);
|
|
4032
4096
|
return {
|
|
4033
4097
|
...n,
|
|
4034
4098
|
propertyNames: i
|
|
@@ -4038,8 +4102,8 @@ function Wt(e, t) {
|
|
|
4038
4102
|
}
|
|
4039
4103
|
//#endregion
|
|
4040
4104
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
4041
|
-
function
|
|
4042
|
-
return t.mapStrategy === "record" ?
|
|
4105
|
+
function Kt(e, t) {
|
|
4106
|
+
return t.mapStrategy === "record" ? Gt(e, t) : {
|
|
4043
4107
|
type: "array",
|
|
4044
4108
|
maxItems: 125,
|
|
4045
4109
|
items: {
|
|
@@ -4068,7 +4132,7 @@ function Gt(e, t) {
|
|
|
4068
4132
|
}
|
|
4069
4133
|
//#endregion
|
|
4070
4134
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
4071
|
-
function
|
|
4135
|
+
function qt(e) {
|
|
4072
4136
|
let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
|
|
4073
4137
|
return {
|
|
4074
4138
|
type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
@@ -4077,7 +4141,7 @@ function Kt(e) {
|
|
|
4077
4141
|
}
|
|
4078
4142
|
//#endregion
|
|
4079
4143
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
4080
|
-
function
|
|
4144
|
+
function Jt(e) {
|
|
4081
4145
|
return e.target === "openAi" ? void 0 : { not: J({
|
|
4082
4146
|
...e,
|
|
4083
4147
|
currentPath: [...e.currentPath, "not"]
|
|
@@ -4085,7 +4149,7 @@ function qt(e) {
|
|
|
4085
4149
|
}
|
|
4086
4150
|
//#endregion
|
|
4087
4151
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
4088
|
-
function
|
|
4152
|
+
function Yt(e) {
|
|
4089
4153
|
return e.target === "openApi3" ? {
|
|
4090
4154
|
enum: ["null"],
|
|
4091
4155
|
nullable: !0
|
|
@@ -4093,19 +4157,19 @@ function Jt(e) {
|
|
|
4093
4157
|
}
|
|
4094
4158
|
//#endregion
|
|
4095
4159
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
4096
|
-
var
|
|
4160
|
+
var Xt = {
|
|
4097
4161
|
ZodString: "string",
|
|
4098
4162
|
ZodNumber: "number",
|
|
4099
4163
|
ZodBigInt: "integer",
|
|
4100
4164
|
ZodBoolean: "boolean",
|
|
4101
4165
|
ZodNull: "null"
|
|
4102
4166
|
};
|
|
4103
|
-
function
|
|
4104
|
-
if (t.target === "openApi3") return
|
|
4167
|
+
function Zt(e, t) {
|
|
4168
|
+
if (t.target === "openApi3") return Qt(e, t);
|
|
4105
4169
|
let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
|
|
4106
|
-
if (n.every((e) => e._def.typeName in
|
|
4170
|
+
if (n.every((e) => e._def.typeName in Xt && (!e._def.checks || !e._def.checks.length))) {
|
|
4107
4171
|
let e = n.reduce((e, t) => {
|
|
4108
|
-
let n =
|
|
4172
|
+
let n = Xt[t._def.typeName];
|
|
4109
4173
|
return n && !e.includes(n) ? [...e, n] : e;
|
|
4110
4174
|
}, []);
|
|
4111
4175
|
return { type: e.length > 1 ? e : e[0] };
|
|
@@ -4133,9 +4197,9 @@ function Xt(e, t) {
|
|
|
4133
4197
|
type: "string",
|
|
4134
4198
|
enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
|
|
4135
4199
|
};
|
|
4136
|
-
return
|
|
4200
|
+
return Qt(e, t);
|
|
4137
4201
|
}
|
|
4138
|
-
var
|
|
4202
|
+
var Qt = (e, t) => {
|
|
4139
4203
|
let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => Q(e._def, {
|
|
4140
4204
|
...t,
|
|
4141
4205
|
currentPath: [
|
|
@@ -4148,7 +4212,7 @@ var Zt = (e, t) => {
|
|
|
4148
4212
|
};
|
|
4149
4213
|
//#endregion
|
|
4150
4214
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
4151
|
-
function
|
|
4215
|
+
function $t(e, t) {
|
|
4152
4216
|
if ([
|
|
4153
4217
|
"ZodString",
|
|
4154
4218
|
"ZodNumber",
|
|
@@ -4156,9 +4220,9 @@ function Qt(e, t) {
|
|
|
4156
4220
|
"ZodBoolean",
|
|
4157
4221
|
"ZodNull"
|
|
4158
4222
|
].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return t.target === "openApi3" ? {
|
|
4159
|
-
type:
|
|
4223
|
+
type: Xt[e.innerType._def.typeName],
|
|
4160
4224
|
nullable: !0
|
|
4161
|
-
} : { type: [
|
|
4225
|
+
} : { type: [Xt[e.innerType._def.typeName], "null"] };
|
|
4162
4226
|
if (t.target === "openApi3") {
|
|
4163
4227
|
let n = Q(e.innerType._def, {
|
|
4164
4228
|
...t,
|
|
@@ -4184,12 +4248,12 @@ function Qt(e, t) {
|
|
|
4184
4248
|
}
|
|
4185
4249
|
//#endregion
|
|
4186
4250
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
4187
|
-
function
|
|
4251
|
+
function en(e, t) {
|
|
4188
4252
|
let n = { type: "number" };
|
|
4189
4253
|
if (!e.checks) return n;
|
|
4190
4254
|
for (let r of e.checks) switch (r.kind) {
|
|
4191
4255
|
case "int":
|
|
4192
|
-
n.type = "integer",
|
|
4256
|
+
n.type = "integer", wt(n, "type", r.message, t);
|
|
4193
4257
|
break;
|
|
4194
4258
|
case "min":
|
|
4195
4259
|
t.target === "jsonSchema7" ? r.inclusive ? q(n, "minimum", r.value, r.message, t) : q(n, "exclusiveMinimum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMinimum = !0), q(n, "minimum", r.value, r.message, t));
|
|
@@ -4203,7 +4267,7 @@ function $t(e, t) {
|
|
|
4203
4267
|
}
|
|
4204
4268
|
//#endregion
|
|
4205
4269
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
4206
|
-
function
|
|
4270
|
+
function tn(e, t) {
|
|
4207
4271
|
let n = t.target === "openAi", r = {
|
|
4208
4272
|
type: "object",
|
|
4209
4273
|
properties: {}
|
|
@@ -4211,7 +4275,7 @@ function en(e, t) {
|
|
|
4211
4275
|
for (let e in a) {
|
|
4212
4276
|
let o = a[e];
|
|
4213
4277
|
if (o === void 0 || o._def === void 0) continue;
|
|
4214
|
-
let s =
|
|
4278
|
+
let s = rn(o);
|
|
4215
4279
|
s && n && (o._def.typeName === "ZodOptional" && (o = o._def.innerType), o.isNullable() || (o = o.nullable()), s = !1);
|
|
4216
4280
|
let c = Q(o._def, {
|
|
4217
4281
|
...t,
|
|
@@ -4229,10 +4293,10 @@ function en(e, t) {
|
|
|
4229
4293
|
c !== void 0 && (r.properties[e] = c, s || i.push(e));
|
|
4230
4294
|
}
|
|
4231
4295
|
i.length && (r.required = i);
|
|
4232
|
-
let o =
|
|
4296
|
+
let o = nn(e, t);
|
|
4233
4297
|
return o !== void 0 && (r.additionalProperties = o), r;
|
|
4234
4298
|
}
|
|
4235
|
-
function
|
|
4299
|
+
function nn(e, t) {
|
|
4236
4300
|
if (e.catchall._def.typeName !== "ZodNever") return Q(e.catchall._def, {
|
|
4237
4301
|
...t,
|
|
4238
4302
|
currentPath: [...t.currentPath, "additionalProperties"]
|
|
@@ -4243,7 +4307,7 @@ function tn(e, t) {
|
|
|
4243
4307
|
case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
4244
4308
|
}
|
|
4245
4309
|
}
|
|
4246
|
-
function
|
|
4310
|
+
function rn(e) {
|
|
4247
4311
|
try {
|
|
4248
4312
|
return e.isOptional();
|
|
4249
4313
|
} catch {
|
|
@@ -4252,7 +4316,7 @@ function nn(e) {
|
|
|
4252
4316
|
}
|
|
4253
4317
|
//#endregion
|
|
4254
4318
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
4255
|
-
var
|
|
4319
|
+
var an = (e, t) => {
|
|
4256
4320
|
if (t.currentPath.toString() === t.propertyPath?.toString()) return Q(e.innerType._def, t);
|
|
4257
4321
|
let n = Q(e.innerType._def, {
|
|
4258
4322
|
...t,
|
|
@@ -4263,7 +4327,7 @@ var rn = (e, t) => {
|
|
|
4263
4327
|
]
|
|
4264
4328
|
});
|
|
4265
4329
|
return n ? { anyOf: [{ not: J(t) }, n] } : J(t);
|
|
4266
|
-
},
|
|
4330
|
+
}, on = (e, t) => {
|
|
4267
4331
|
if (t.pipeStrategy === "input") return Q(e.in._def, t);
|
|
4268
4332
|
if (t.pipeStrategy === "output") return Q(e.out._def, t);
|
|
4269
4333
|
let n = Q(e.in._def, {
|
|
@@ -4285,12 +4349,12 @@ var rn = (e, t) => {
|
|
|
4285
4349
|
};
|
|
4286
4350
|
//#endregion
|
|
4287
4351
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
4288
|
-
function
|
|
4352
|
+
function sn(e, t) {
|
|
4289
4353
|
return Q(e.type._def, t);
|
|
4290
4354
|
}
|
|
4291
4355
|
//#endregion
|
|
4292
4356
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
4293
|
-
function
|
|
4357
|
+
function cn(e, t) {
|
|
4294
4358
|
let n = {
|
|
4295
4359
|
type: "array",
|
|
4296
4360
|
uniqueItems: !0,
|
|
@@ -4303,7 +4367,7 @@ function sn(e, t) {
|
|
|
4303
4367
|
}
|
|
4304
4368
|
//#endregion
|
|
4305
4369
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
4306
|
-
function
|
|
4370
|
+
function ln(e, t) {
|
|
4307
4371
|
return e.rest ? {
|
|
4308
4372
|
type: "array",
|
|
4309
4373
|
minItems: e.items.length,
|
|
@@ -4335,51 +4399,51 @@ function cn(e, t) {
|
|
|
4335
4399
|
}
|
|
4336
4400
|
//#endregion
|
|
4337
4401
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
4338
|
-
function
|
|
4402
|
+
function un(e) {
|
|
4339
4403
|
return { not: J(e) };
|
|
4340
4404
|
}
|
|
4341
4405
|
//#endregion
|
|
4342
4406
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
4343
|
-
function
|
|
4407
|
+
function dn(e) {
|
|
4344
4408
|
return J(e);
|
|
4345
4409
|
}
|
|
4346
4410
|
//#endregion
|
|
4347
4411
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
4348
|
-
var
|
|
4412
|
+
var fn = (e, t) => Q(e.innerType._def, t), pn = (e, t, n) => {
|
|
4349
4413
|
switch (t) {
|
|
4350
|
-
case H.ZodString: return
|
|
4351
|
-
case H.ZodNumber: return
|
|
4352
|
-
case H.ZodObject: return
|
|
4353
|
-
case H.ZodBigInt: return
|
|
4354
|
-
case H.ZodBoolean: return
|
|
4355
|
-
case H.ZodDate: return
|
|
4356
|
-
case H.ZodUndefined: return
|
|
4357
|
-
case H.ZodNull: return
|
|
4358
|
-
case H.ZodArray: return
|
|
4414
|
+
case H.ZodString: return Bt(e, n);
|
|
4415
|
+
case H.ZodNumber: return en(e, n);
|
|
4416
|
+
case H.ZodObject: return tn(e, n);
|
|
4417
|
+
case H.ZodBigInt: return Dt(e, n);
|
|
4418
|
+
case H.ZodBoolean: return Ot();
|
|
4419
|
+
case H.ZodDate: return jt(e, n);
|
|
4420
|
+
case H.ZodUndefined: return un(n);
|
|
4421
|
+
case H.ZodNull: return Yt(n);
|
|
4422
|
+
case H.ZodArray: return Et(e, n);
|
|
4359
4423
|
case H.ZodUnion:
|
|
4360
|
-
case H.ZodDiscriminatedUnion: return
|
|
4361
|
-
case H.ZodIntersection: return
|
|
4362
|
-
case H.ZodTuple: return
|
|
4363
|
-
case H.ZodRecord: return
|
|
4364
|
-
case H.ZodLiteral: return
|
|
4365
|
-
case H.ZodEnum: return
|
|
4366
|
-
case H.ZodNativeEnum: return
|
|
4367
|
-
case H.ZodNullable: return
|
|
4368
|
-
case H.ZodOptional: return
|
|
4369
|
-
case H.ZodMap: return
|
|
4370
|
-
case H.ZodSet: return
|
|
4424
|
+
case H.ZodDiscriminatedUnion: return Zt(e, n);
|
|
4425
|
+
case H.ZodIntersection: return Lt(e, n);
|
|
4426
|
+
case H.ZodTuple: return ln(e, n);
|
|
4427
|
+
case H.ZodRecord: return Gt(e, n);
|
|
4428
|
+
case H.ZodLiteral: return Rt(e, n);
|
|
4429
|
+
case H.ZodEnum: return Ft(e);
|
|
4430
|
+
case H.ZodNativeEnum: return qt(e);
|
|
4431
|
+
case H.ZodNullable: return $t(e, n);
|
|
4432
|
+
case H.ZodOptional: return an(e, n);
|
|
4433
|
+
case H.ZodMap: return Kt(e, n);
|
|
4434
|
+
case H.ZodSet: return cn(e, n);
|
|
4371
4435
|
case H.ZodLazy: return () => e.getter()._def;
|
|
4372
|
-
case H.ZodPromise: return
|
|
4436
|
+
case H.ZodPromise: return sn(e, n);
|
|
4373
4437
|
case H.ZodNaN:
|
|
4374
|
-
case H.ZodNever: return
|
|
4375
|
-
case H.ZodEffects: return
|
|
4438
|
+
case H.ZodNever: return Jt(n);
|
|
4439
|
+
case H.ZodEffects: return Pt(e, n);
|
|
4376
4440
|
case H.ZodAny: return J(n);
|
|
4377
|
-
case H.ZodUnknown: return
|
|
4378
|
-
case H.ZodDefault: return
|
|
4379
|
-
case H.ZodBranded: return
|
|
4380
|
-
case H.ZodReadonly: return
|
|
4381
|
-
case H.ZodCatch: return
|
|
4382
|
-
case H.ZodPipeline: return
|
|
4441
|
+
case H.ZodUnknown: return dn(n);
|
|
4442
|
+
case H.ZodDefault: return Nt(e, n);
|
|
4443
|
+
case H.ZodBranded: return kt(e, n);
|
|
4444
|
+
case H.ZodReadonly: return fn(e, n);
|
|
4445
|
+
case H.ZodCatch: return At(e, n);
|
|
4446
|
+
case H.ZodPipeline: return on(e, n);
|
|
4383
4447
|
case H.ZodFunction:
|
|
4384
4448
|
case H.ZodVoid:
|
|
4385
4449
|
case H.ZodSymbol: return;
|
|
@@ -4392,10 +4456,10 @@ function Q(e, t, n = !1) {
|
|
|
4392
4456
|
let r = t.seen.get(e);
|
|
4393
4457
|
if (t.override) {
|
|
4394
4458
|
let i = t.override?.(e, t, r, n);
|
|
4395
|
-
if (i !==
|
|
4459
|
+
if (i !== bt) return i;
|
|
4396
4460
|
}
|
|
4397
4461
|
if (r && !n) {
|
|
4398
|
-
let e =
|
|
4462
|
+
let e = mn(r, t);
|
|
4399
4463
|
if (e !== void 0) return e;
|
|
4400
4464
|
}
|
|
4401
4465
|
let i = {
|
|
@@ -4404,22 +4468,22 @@ function Q(e, t, n = !1) {
|
|
|
4404
4468
|
jsonSchema: void 0
|
|
4405
4469
|
};
|
|
4406
4470
|
t.seen.set(e, i);
|
|
4407
|
-
let a =
|
|
4408
|
-
if (o &&
|
|
4471
|
+
let a = pn(e, e.typeName, t), o = typeof a == "function" ? Q(a(), t) : a;
|
|
4472
|
+
if (o && hn(e, t, o), t.postProcess) {
|
|
4409
4473
|
let n = t.postProcess(o, e, t);
|
|
4410
4474
|
return i.jsonSchema = o, n;
|
|
4411
4475
|
}
|
|
4412
4476
|
return i.jsonSchema = o, o;
|
|
4413
4477
|
}
|
|
4414
|
-
var
|
|
4478
|
+
var mn = (e, t) => {
|
|
4415
4479
|
switch (t.$refStrategy) {
|
|
4416
4480
|
case "root": return { $ref: e.path.join("/") };
|
|
4417
|
-
case "relative": return { $ref:
|
|
4481
|
+
case "relative": return { $ref: Tt(t.currentPath, e.path) };
|
|
4418
4482
|
case "none":
|
|
4419
4483
|
case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), J(t)) : t.$refStrategy === "seen" ? J(t) : void 0;
|
|
4420
4484
|
}
|
|
4421
|
-
},
|
|
4422
|
-
let n =
|
|
4485
|
+
}, hn = (e, t, n) => (e.description && (n.description = e.description, t.markdownDescription && (n.markdownDescription = e.description)), n), gn = (e, t) => {
|
|
4486
|
+
let n = Ct(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
|
|
4423
4487
|
...e,
|
|
4424
4488
|
[t]: Q(r._def, {
|
|
4425
4489
|
...n,
|
|
@@ -4471,26 +4535,26 @@ var pn = (e, t) => {
|
|
|
4471
4535
|
//#endregion
|
|
4472
4536
|
//#region ../mcp/dist/tools/definitions.js
|
|
4473
4537
|
function $(e) {
|
|
4474
|
-
let { $schema: t, ...n } =
|
|
4538
|
+
let { $schema: t, ...n } = gn(e.zodSchema, { $refStrategy: "none" });
|
|
4475
4539
|
return {
|
|
4476
4540
|
...e,
|
|
4477
4541
|
inputSchema: n
|
|
4478
4542
|
};
|
|
4479
4543
|
}
|
|
4480
|
-
var
|
|
4544
|
+
var _n = class extends Error {
|
|
4481
4545
|
constructor(e, t) {
|
|
4482
4546
|
super(`Invalid arguments for tool "${e}": ${t}`), this.name = "ToolArgumentError";
|
|
4483
4547
|
}
|
|
4484
4548
|
};
|
|
4485
|
-
function
|
|
4549
|
+
function vn(e, t) {
|
|
4486
4550
|
let n = e.zodSchema.strict().safeParse(t ?? {});
|
|
4487
4551
|
if (!n.success) {
|
|
4488
4552
|
let t = n.error.issues.map((e) => `${e.path.join(".") || "(root)"}: ${e.message}`).join("; ");
|
|
4489
|
-
throw new
|
|
4553
|
+
throw new _n(e.name, t);
|
|
4490
4554
|
}
|
|
4491
4555
|
return n.data;
|
|
4492
4556
|
}
|
|
4493
|
-
var
|
|
4557
|
+
var yn = [
|
|
4494
4558
|
$({
|
|
4495
4559
|
name: "list_projects",
|
|
4496
4560
|
title: "List Projects",
|
|
@@ -4580,9 +4644,9 @@ var vn = [
|
|
|
4580
4644
|
]).optional().default("none").describe("Task priority"),
|
|
4581
4645
|
assigneeId: U().optional().describe("User ID to assign task to"),
|
|
4582
4646
|
dueDate: U().optional().describe("Due date (ISO string)"),
|
|
4583
|
-
tags:
|
|
4647
|
+
tags: yt(U()).optional().describe("Tags for categorization"),
|
|
4584
4648
|
estimatedHours: W().optional().describe("Estimated hours to complete"),
|
|
4585
|
-
isBlocked:
|
|
4649
|
+
isBlocked: vt().optional().describe("Whether the task is blocked"),
|
|
4586
4650
|
blockedReason: U().optional().describe("Reason why the task is blocked")
|
|
4587
4651
|
}),
|
|
4588
4652
|
execute: async (e, t, n) => {
|
|
@@ -4622,10 +4686,10 @@ var vn = [
|
|
|
4622
4686
|
]).optional(),
|
|
4623
4687
|
assigneeId: U().optional(),
|
|
4624
4688
|
dueDate: U().optional(),
|
|
4625
|
-
tags:
|
|
4689
|
+
tags: yt(U()).optional(),
|
|
4626
4690
|
estimatedHours: W().optional(),
|
|
4627
4691
|
loggedHours: W().optional(),
|
|
4628
|
-
isBlocked:
|
|
4692
|
+
isBlocked: vt().optional().describe("Whether the task is blocked"),
|
|
4629
4693
|
blockedReason: U().optional().describe("Reason why the task is blocked")
|
|
4630
4694
|
}),
|
|
4631
4695
|
execute: async (e, t) => {
|
|
@@ -4662,7 +4726,7 @@ var vn = [
|
|
|
4662
4726
|
title: U(),
|
|
4663
4727
|
description: U().optional(),
|
|
4664
4728
|
dueDate: U().optional(),
|
|
4665
|
-
taskIds:
|
|
4729
|
+
taskIds: yt(U()).optional()
|
|
4666
4730
|
}),
|
|
4667
4731
|
execute: async (e, t, n) => {
|
|
4668
4732
|
let r = e.projectId || n?.projectId;
|
|
@@ -4799,10 +4863,10 @@ var vn = [
|
|
|
4799
4863
|
}
|
|
4800
4864
|
})
|
|
4801
4865
|
];
|
|
4802
|
-
new Map(
|
|
4866
|
+
new Map(yn.map((e) => [e.name, e]));
|
|
4803
4867
|
//#endregion
|
|
4804
4868
|
//#region ../mcp/dist/web/index.js
|
|
4805
|
-
function
|
|
4869
|
+
function bn(e = typeof document < "u" ? document : null) {
|
|
4806
4870
|
if (!e) return null;
|
|
4807
4871
|
if (!e.modelContext) {
|
|
4808
4872
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -4827,10 +4891,10 @@ function yn(e = typeof document < "u" ? document : null) {
|
|
|
4827
4891
|
}
|
|
4828
4892
|
return e.modelContext;
|
|
4829
4893
|
}
|
|
4830
|
-
function
|
|
4894
|
+
function xn(e) {
|
|
4831
4895
|
let t = e.document ?? (typeof document < "u" ? document : null), n = e.navigator ?? (typeof navigator < "u" ? navigator : null), r = e.window ?? (typeof window < "u" ? window : null), i;
|
|
4832
|
-
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i =
|
|
4833
|
-
let a = e.tools ?
|
|
4896
|
+
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = bn(t) ?? void 0);
|
|
4897
|
+
let a = e.tools ? yn.filter((t) => e.tools.includes(t.name)) : yn, o = [], s = new AbortController();
|
|
4834
4898
|
e.signal && e.signal.addEventListener("abort", () => s.abort(), { once: !0 });
|
|
4835
4899
|
for (let t of a) {
|
|
4836
4900
|
let n = {
|
|
@@ -4840,7 +4904,7 @@ function bn(e) {
|
|
|
4840
4904
|
inputSchema: t.inputSchema,
|
|
4841
4905
|
annotations: t.annotations,
|
|
4842
4906
|
execute: async (n) => {
|
|
4843
|
-
let r = e.projectId ? { projectId: e.projectId } : void 0, i = await t.execute(
|
|
4907
|
+
let r = e.projectId ? { projectId: e.projectId } : void 0, i = await t.execute(vn(t, n), e.client, r);
|
|
4844
4908
|
return e.onToolExecuted?.(t.name, n, i), i;
|
|
4845
4909
|
}
|
|
4846
4910
|
};
|
|
@@ -4868,7 +4932,7 @@ function bn(e) {
|
|
|
4868
4932
|
}
|
|
4869
4933
|
//#endregion
|
|
4870
4934
|
//#region src/webmcp-state.svelte.ts
|
|
4871
|
-
var
|
|
4935
|
+
var Sn = class {
|
|
4872
4936
|
client;
|
|
4873
4937
|
options;
|
|
4874
4938
|
#e = t.state(!1);
|
|
@@ -4908,7 +4972,7 @@ var xn = class {
|
|
|
4908
4972
|
if (!this.registered) {
|
|
4909
4973
|
this.error = null;
|
|
4910
4974
|
try {
|
|
4911
|
-
this.abortController = new AbortController(), this.handle =
|
|
4975
|
+
this.abortController = new AbortController(), this.handle = xn({
|
|
4912
4976
|
client: this.client,
|
|
4913
4977
|
projectId: this.activeProjectId,
|
|
4914
4978
|
tools: this.options.tools,
|
|
@@ -4932,105 +4996,112 @@ var xn = class {
|
|
|
4932
4996
|
this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
|
|
4933
4997
|
}
|
|
4934
4998
|
};
|
|
4935
|
-
function
|
|
4936
|
-
return new
|
|
4999
|
+
function Cn(e, t) {
|
|
5000
|
+
return new Sn(e, t);
|
|
4937
5001
|
}
|
|
4938
5002
|
//#endregion
|
|
4939
5003
|
//#region src/critical-path-state.svelte.ts
|
|
4940
|
-
var
|
|
5004
|
+
var wn = class {
|
|
4941
5005
|
client;
|
|
4942
5006
|
projectId;
|
|
4943
|
-
#e =
|
|
5007
|
+
#e = new i();
|
|
5008
|
+
#t = t.state(null);
|
|
4944
5009
|
get data() {
|
|
4945
|
-
return t.get(this.#
|
|
5010
|
+
return t.get(this.#t);
|
|
4946
5011
|
}
|
|
4947
5012
|
set data(e) {
|
|
4948
|
-
t.set(this.#
|
|
5013
|
+
t.set(this.#t, e, !0);
|
|
4949
5014
|
}
|
|
4950
|
-
#
|
|
5015
|
+
#n = t.state(!1);
|
|
4951
5016
|
get loading() {
|
|
4952
|
-
return t.get(this.#
|
|
5017
|
+
return t.get(this.#n);
|
|
4953
5018
|
}
|
|
4954
5019
|
set loading(e) {
|
|
4955
|
-
t.set(this.#
|
|
5020
|
+
t.set(this.#n, e, !0);
|
|
4956
5021
|
}
|
|
4957
|
-
#
|
|
5022
|
+
#r = t.state(null);
|
|
4958
5023
|
get error() {
|
|
4959
|
-
return t.get(this.#
|
|
5024
|
+
return t.get(this.#r);
|
|
4960
5025
|
}
|
|
4961
5026
|
set error(e) {
|
|
4962
|
-
t.set(this.#
|
|
5027
|
+
t.set(this.#r, e, !0);
|
|
4963
5028
|
}
|
|
4964
5029
|
constructor(e, t) {
|
|
4965
5030
|
this.client = e, this.projectId = t;
|
|
4966
5031
|
}
|
|
4967
5032
|
async fetch() {
|
|
5033
|
+
let { api: e, signal: t } = this.#e.begin(this.client);
|
|
4968
5034
|
this.loading = !0, this.error = null;
|
|
4969
5035
|
try {
|
|
4970
|
-
this.data = await
|
|
5036
|
+
if (this.data = await e.calculateCriticalPath(this.projectId), t.aborted) return;
|
|
4971
5037
|
} catch (e) {
|
|
5038
|
+
if (t.aborted) return;
|
|
4972
5039
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
4973
5040
|
} finally {
|
|
4974
|
-
this.loading = !1;
|
|
5041
|
+
t.aborted || (this.loading = !1);
|
|
4975
5042
|
}
|
|
4976
5043
|
}
|
|
5044
|
+
destroy() {
|
|
5045
|
+
this.#e.cancel();
|
|
5046
|
+
}
|
|
4977
5047
|
};
|
|
4978
|
-
function
|
|
4979
|
-
return new
|
|
5048
|
+
function Tn(e, t) {
|
|
5049
|
+
return new wn(e, t);
|
|
4980
5050
|
}
|
|
4981
5051
|
//#endregion
|
|
4982
5052
|
//#region src/timeline-ladder-state.svelte.ts
|
|
4983
|
-
var
|
|
5053
|
+
var En = class {
|
|
4984
5054
|
client;
|
|
4985
5055
|
projectId;
|
|
4986
|
-
#e =
|
|
5056
|
+
#e = new i();
|
|
5057
|
+
#t = t.state(null);
|
|
4987
5058
|
get data() {
|
|
4988
|
-
return t.get(this.#
|
|
5059
|
+
return t.get(this.#t);
|
|
4989
5060
|
}
|
|
4990
5061
|
set data(e) {
|
|
4991
|
-
t.set(this.#
|
|
5062
|
+
t.set(this.#t, e, !0);
|
|
4992
5063
|
}
|
|
4993
|
-
#
|
|
5064
|
+
#n = t.state("all");
|
|
4994
5065
|
get level() {
|
|
4995
|
-
return t.get(this.#
|
|
5066
|
+
return t.get(this.#n);
|
|
4996
5067
|
}
|
|
4997
5068
|
set level(e) {
|
|
4998
|
-
t.set(this.#
|
|
5069
|
+
t.set(this.#n, e, !0);
|
|
4999
5070
|
}
|
|
5000
|
-
#
|
|
5071
|
+
#r = t.state(!1);
|
|
5001
5072
|
get loading() {
|
|
5002
|
-
return t.get(this.#
|
|
5073
|
+
return t.get(this.#r);
|
|
5003
5074
|
}
|
|
5004
5075
|
set loading(e) {
|
|
5005
|
-
t.set(this.#
|
|
5076
|
+
t.set(this.#r, e, !0);
|
|
5006
5077
|
}
|
|
5007
|
-
#
|
|
5078
|
+
#i = t.state(null);
|
|
5008
5079
|
get error() {
|
|
5009
|
-
return t.get(this.#
|
|
5080
|
+
return t.get(this.#i);
|
|
5010
5081
|
}
|
|
5011
5082
|
set error(e) {
|
|
5012
|
-
t.set(this.#
|
|
5083
|
+
t.set(this.#i, e, !0);
|
|
5013
5084
|
}
|
|
5014
|
-
#
|
|
5085
|
+
#a = t.derived(() => this.data?.macro ?? null);
|
|
5015
5086
|
get macro() {
|
|
5016
|
-
return t.get(this.#
|
|
5087
|
+
return t.get(this.#a);
|
|
5017
5088
|
}
|
|
5018
5089
|
set macro(e) {
|
|
5019
|
-
t.set(this.#
|
|
5090
|
+
t.set(this.#a, e);
|
|
5020
5091
|
}
|
|
5021
|
-
#
|
|
5092
|
+
#o = t.derived(() => this.data?.standard ?? null);
|
|
5022
5093
|
get standard() {
|
|
5023
|
-
return t.get(this.#
|
|
5094
|
+
return t.get(this.#o);
|
|
5024
5095
|
}
|
|
5025
5096
|
set standard(e) {
|
|
5026
|
-
t.set(this.#
|
|
5097
|
+
t.set(this.#o, e);
|
|
5027
5098
|
}
|
|
5028
|
-
#
|
|
5099
|
+
#s = t.derived(() => this.data?.concrete ?? null);
|
|
5029
5100
|
get concrete() {
|
|
5030
|
-
return t.get(this.#
|
|
5101
|
+
return t.get(this.#s);
|
|
5031
5102
|
}
|
|
5032
5103
|
set concrete(e) {
|
|
5033
|
-
t.set(this.#
|
|
5104
|
+
t.set(this.#s, e);
|
|
5034
5105
|
}
|
|
5035
5106
|
constructor(e, t, n) {
|
|
5036
5107
|
this.client = e, this.projectId = t, n?.level && (this.level = n.level);
|
|
@@ -5039,223 +5110,241 @@ var Tn = class {
|
|
|
5039
5110
|
this.level = e, await this.fetch();
|
|
5040
5111
|
}
|
|
5041
5112
|
async fetch(e) {
|
|
5113
|
+
let { api: t, signal: n } = this.#e.begin(this.client);
|
|
5042
5114
|
this.loading = !0, this.error = null;
|
|
5043
5115
|
try {
|
|
5044
|
-
this.data = await
|
|
5116
|
+
if (this.data = await t.getTimelineLadder(this.projectId, {
|
|
5045
5117
|
level: this.level,
|
|
5046
5118
|
...e
|
|
5047
|
-
});
|
|
5119
|
+
}), n.aborted) return;
|
|
5048
5120
|
} catch (e) {
|
|
5121
|
+
if (n.aborted) return;
|
|
5049
5122
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
5050
5123
|
} finally {
|
|
5051
|
-
this.loading = !1;
|
|
5124
|
+
n.aborted || (this.loading = !1);
|
|
5052
5125
|
}
|
|
5053
5126
|
}
|
|
5127
|
+
destroy() {
|
|
5128
|
+
this.#e.cancel();
|
|
5129
|
+
}
|
|
5054
5130
|
};
|
|
5055
|
-
function
|
|
5056
|
-
return new
|
|
5131
|
+
function Dn(e, t, n) {
|
|
5132
|
+
return new En(e, t, n);
|
|
5057
5133
|
}
|
|
5058
5134
|
//#endregion
|
|
5059
5135
|
//#region src/task-metrics-state.svelte.ts
|
|
5060
|
-
var
|
|
5136
|
+
var On = class {
|
|
5061
5137
|
client;
|
|
5062
5138
|
taskId;
|
|
5063
|
-
#e =
|
|
5139
|
+
#e = new i();
|
|
5140
|
+
#t = new i();
|
|
5141
|
+
#n = new i();
|
|
5142
|
+
#r = t.state(null);
|
|
5064
5143
|
get metrics() {
|
|
5065
|
-
return t.get(this.#
|
|
5144
|
+
return t.get(this.#r);
|
|
5066
5145
|
}
|
|
5067
5146
|
set metrics(e) {
|
|
5068
|
-
t.set(this.#
|
|
5147
|
+
t.set(this.#r, e, !0);
|
|
5069
5148
|
}
|
|
5070
|
-
#
|
|
5149
|
+
#i = t.state(null);
|
|
5071
5150
|
get history() {
|
|
5072
|
-
return t.get(this.#
|
|
5151
|
+
return t.get(this.#i);
|
|
5073
5152
|
}
|
|
5074
5153
|
set history(e) {
|
|
5075
|
-
t.set(this.#
|
|
5154
|
+
t.set(this.#i, e, !0);
|
|
5076
5155
|
}
|
|
5077
|
-
#
|
|
5156
|
+
#a = t.state(!1);
|
|
5078
5157
|
get loading() {
|
|
5079
|
-
return t.get(this.#
|
|
5158
|
+
return t.get(this.#a);
|
|
5080
5159
|
}
|
|
5081
5160
|
set loading(e) {
|
|
5082
|
-
t.set(this.#
|
|
5161
|
+
t.set(this.#a, e, !0);
|
|
5083
5162
|
}
|
|
5084
|
-
#
|
|
5163
|
+
#o = t.state(null);
|
|
5085
5164
|
get error() {
|
|
5086
|
-
return t.get(this.#
|
|
5165
|
+
return t.get(this.#o);
|
|
5087
5166
|
}
|
|
5088
5167
|
set error(e) {
|
|
5089
|
-
t.set(this.#
|
|
5168
|
+
t.set(this.#o, e, !0);
|
|
5090
5169
|
}
|
|
5091
|
-
#
|
|
5170
|
+
#s = t.derived(() => this.metrics?.inferredActuals ?? null);
|
|
5092
5171
|
get inferredActuals() {
|
|
5093
|
-
return t.get(this.#
|
|
5172
|
+
return t.get(this.#s);
|
|
5094
5173
|
}
|
|
5095
5174
|
set inferredActuals(e) {
|
|
5096
|
-
t.set(this.#
|
|
5175
|
+
t.set(this.#s, e);
|
|
5097
5176
|
}
|
|
5098
|
-
#
|
|
5177
|
+
#c = t.derived(() => this.metrics?.realityDelta ?? null);
|
|
5099
5178
|
get realityDelta() {
|
|
5100
|
-
return t.get(this.#
|
|
5179
|
+
return t.get(this.#c);
|
|
5101
5180
|
}
|
|
5102
5181
|
set realityDelta(e) {
|
|
5103
|
-
t.set(this.#
|
|
5182
|
+
t.set(this.#c, e);
|
|
5104
5183
|
}
|
|
5105
|
-
#
|
|
5184
|
+
#l = t.derived(() => this.metrics?.progress ?? null);
|
|
5106
5185
|
get progress() {
|
|
5107
|
-
return t.get(this.#
|
|
5186
|
+
return t.get(this.#l);
|
|
5108
5187
|
}
|
|
5109
5188
|
set progress(e) {
|
|
5110
|
-
t.set(this.#
|
|
5189
|
+
t.set(this.#l, e);
|
|
5111
5190
|
}
|
|
5112
|
-
#
|
|
5191
|
+
#u = t.derived(() => this.metrics?.evm ?? null);
|
|
5113
5192
|
get evm() {
|
|
5114
|
-
return t.get(this.#
|
|
5193
|
+
return t.get(this.#u);
|
|
5115
5194
|
}
|
|
5116
5195
|
set evm(e) {
|
|
5117
|
-
t.set(this.#
|
|
5196
|
+
t.set(this.#u, e);
|
|
5118
5197
|
}
|
|
5119
|
-
#
|
|
5198
|
+
#d = t.derived(() => this.history?.curveProfile ?? null);
|
|
5120
5199
|
get curveProfile() {
|
|
5121
|
-
return t.get(this.#
|
|
5200
|
+
return t.get(this.#d);
|
|
5122
5201
|
}
|
|
5123
5202
|
set curveProfile(e) {
|
|
5124
|
-
t.set(this.#
|
|
5203
|
+
t.set(this.#d, e);
|
|
5125
5204
|
}
|
|
5126
5205
|
constructor(e, t) {
|
|
5127
5206
|
this.client = e, this.taskId = t;
|
|
5128
5207
|
}
|
|
5129
5208
|
async fetchMetrics() {
|
|
5209
|
+
let { api: e, signal: t } = this.#e.begin(this.client);
|
|
5130
5210
|
this.loading = !0, this.error = null;
|
|
5131
5211
|
try {
|
|
5132
|
-
return this.metrics = await
|
|
5212
|
+
return this.metrics = await e.getTaskMetrics(this.taskId), t.aborted ? null : this.metrics;
|
|
5133
5213
|
} catch (e) {
|
|
5134
|
-
return this.error = e instanceof Error ? e : Error(String(e)), null;
|
|
5214
|
+
return t.aborted || (this.error = e instanceof Error ? e : Error(String(e))), null;
|
|
5135
5215
|
} finally {
|
|
5136
|
-
this.loading = !1;
|
|
5216
|
+
t.aborted || (this.loading = !1);
|
|
5137
5217
|
}
|
|
5138
5218
|
}
|
|
5139
5219
|
async fetchHistory() {
|
|
5220
|
+
let { api: e, signal: t } = this.#n.begin(this.client);
|
|
5140
5221
|
this.loading = !0, this.error = null;
|
|
5141
5222
|
try {
|
|
5142
|
-
return this.history = await
|
|
5223
|
+
return this.history = await e.getTaskProgressHistory(this.taskId), t.aborted ? null : this.history;
|
|
5143
5224
|
} catch (e) {
|
|
5144
|
-
return this.error = e instanceof Error ? e : Error(String(e)), null;
|
|
5225
|
+
return t.aborted || (this.error = e instanceof Error ? e : Error(String(e))), null;
|
|
5145
5226
|
} finally {
|
|
5146
|
-
this.loading = !1;
|
|
5227
|
+
t.aborted || (this.loading = !1);
|
|
5147
5228
|
}
|
|
5148
5229
|
}
|
|
5149
5230
|
async fetchAll() {
|
|
5231
|
+
let { api: e, signal: t } = this.#t.begin(this.client);
|
|
5150
5232
|
this.loading = !0, this.error = null;
|
|
5151
5233
|
try {
|
|
5152
|
-
let [
|
|
5153
|
-
return
|
|
5154
|
-
metrics:
|
|
5155
|
-
history:
|
|
5156
|
-
}
|
|
5234
|
+
let [n, r] = await Promise.all([e.getTaskMetrics(this.taskId), e.getTaskProgressHistory(this.taskId)]);
|
|
5235
|
+
return t.aborted ? {
|
|
5236
|
+
metrics: null,
|
|
5237
|
+
history: null
|
|
5238
|
+
} : (this.metrics = n, this.history = r, {
|
|
5239
|
+
metrics: n,
|
|
5240
|
+
history: r
|
|
5241
|
+
});
|
|
5157
5242
|
} catch (e) {
|
|
5158
|
-
return this.error = e instanceof Error ? e : Error(String(e)), {
|
|
5243
|
+
return t.aborted || (this.error = e instanceof Error ? e : Error(String(e))), {
|
|
5159
5244
|
metrics: null,
|
|
5160
5245
|
history: null
|
|
5161
5246
|
};
|
|
5162
5247
|
} finally {
|
|
5163
|
-
this.loading = !1;
|
|
5248
|
+
t.aborted || (this.loading = !1);
|
|
5164
5249
|
}
|
|
5165
5250
|
}
|
|
5251
|
+
destroy() {
|
|
5252
|
+
this.#e.cancel(), this.#t.cancel(), this.#n.cancel();
|
|
5253
|
+
}
|
|
5166
5254
|
};
|
|
5167
|
-
function
|
|
5168
|
-
return new
|
|
5255
|
+
function kn(e, t) {
|
|
5256
|
+
return new On(e, t);
|
|
5169
5257
|
}
|
|
5170
5258
|
//#endregion
|
|
5171
5259
|
//#region src/workload-state.svelte.ts
|
|
5172
|
-
var
|
|
5260
|
+
var An = class {
|
|
5173
5261
|
client;
|
|
5174
5262
|
projectId;
|
|
5175
5263
|
initialOptions;
|
|
5176
|
-
#e =
|
|
5264
|
+
#e = new i();
|
|
5265
|
+
#t = t.state(null);
|
|
5177
5266
|
get data() {
|
|
5178
|
-
return t.get(this.#
|
|
5267
|
+
return t.get(this.#t);
|
|
5179
5268
|
}
|
|
5180
5269
|
set data(e) {
|
|
5181
|
-
t.set(this.#
|
|
5270
|
+
t.set(this.#t, e, !0);
|
|
5182
5271
|
}
|
|
5183
|
-
#
|
|
5272
|
+
#n = t.state("week");
|
|
5184
5273
|
get interval() {
|
|
5185
|
-
return t.get(this.#
|
|
5274
|
+
return t.get(this.#n);
|
|
5186
5275
|
}
|
|
5187
5276
|
set interval(e) {
|
|
5188
|
-
t.set(this.#
|
|
5277
|
+
t.set(this.#n, e, !0);
|
|
5189
5278
|
}
|
|
5190
|
-
#
|
|
5279
|
+
#r = t.state("assignee");
|
|
5191
5280
|
get groupBy() {
|
|
5192
|
-
return t.get(this.#
|
|
5281
|
+
return t.get(this.#r);
|
|
5193
5282
|
}
|
|
5194
5283
|
set groupBy(e) {
|
|
5195
|
-
t.set(this.#
|
|
5284
|
+
t.set(this.#r, e, !0);
|
|
5196
5285
|
}
|
|
5197
|
-
#
|
|
5286
|
+
#i = t.state("blended");
|
|
5198
5287
|
get metric() {
|
|
5199
|
-
return t.get(this.#
|
|
5288
|
+
return t.get(this.#i);
|
|
5200
5289
|
}
|
|
5201
5290
|
set metric(e) {
|
|
5202
|
-
t.set(this.#
|
|
5291
|
+
t.set(this.#i, e, !0);
|
|
5203
5292
|
}
|
|
5204
|
-
#
|
|
5293
|
+
#a = t.state(!1);
|
|
5205
5294
|
get loading() {
|
|
5206
|
-
return t.get(this.#
|
|
5295
|
+
return t.get(this.#a);
|
|
5207
5296
|
}
|
|
5208
5297
|
set loading(e) {
|
|
5209
|
-
t.set(this.#
|
|
5298
|
+
t.set(this.#a, e, !0);
|
|
5210
5299
|
}
|
|
5211
|
-
#
|
|
5300
|
+
#o = t.state(null);
|
|
5212
5301
|
get error() {
|
|
5213
|
-
return t.get(this.#
|
|
5302
|
+
return t.get(this.#o);
|
|
5214
5303
|
}
|
|
5215
5304
|
set error(e) {
|
|
5216
|
-
t.set(this.#
|
|
5305
|
+
t.set(this.#o, e, !0);
|
|
5217
5306
|
}
|
|
5218
|
-
#
|
|
5307
|
+
#s = t.derived(() => this.data?.buckets ?? []);
|
|
5219
5308
|
get buckets() {
|
|
5220
|
-
return t.get(this.#
|
|
5309
|
+
return t.get(this.#s);
|
|
5221
5310
|
}
|
|
5222
5311
|
set buckets(e) {
|
|
5223
|
-
t.set(this.#
|
|
5312
|
+
t.set(this.#s, e);
|
|
5224
5313
|
}
|
|
5225
|
-
#
|
|
5314
|
+
#c = t.derived(() => this.data?.seriesKeys ?? []);
|
|
5226
5315
|
get seriesKeys() {
|
|
5227
|
-
return t.get(this.#
|
|
5316
|
+
return t.get(this.#c);
|
|
5228
5317
|
}
|
|
5229
5318
|
set seriesKeys(e) {
|
|
5230
|
-
t.set(this.#
|
|
5319
|
+
t.set(this.#c, e);
|
|
5231
5320
|
}
|
|
5232
|
-
#
|
|
5321
|
+
#l = t.derived(() => this.data?.seriesLabels ?? {});
|
|
5233
5322
|
get seriesLabels() {
|
|
5234
|
-
return t.get(this.#
|
|
5323
|
+
return t.get(this.#l);
|
|
5235
5324
|
}
|
|
5236
5325
|
set seriesLabels(e) {
|
|
5237
|
-
t.set(this.#
|
|
5326
|
+
t.set(this.#l, e);
|
|
5238
5327
|
}
|
|
5239
|
-
#
|
|
5328
|
+
#u = t.derived(() => this.data?.totalHours ?? 0);
|
|
5240
5329
|
get totalHours() {
|
|
5241
|
-
return t.get(this.#
|
|
5330
|
+
return t.get(this.#u);
|
|
5242
5331
|
}
|
|
5243
5332
|
set totalHours(e) {
|
|
5244
|
-
t.set(this.#
|
|
5333
|
+
t.set(this.#u, e);
|
|
5245
5334
|
}
|
|
5246
|
-
#
|
|
5335
|
+
#d = t.derived(() => this.data?.totalCapacity ?? 0);
|
|
5247
5336
|
get totalCapacity() {
|
|
5248
|
-
return t.get(this.#
|
|
5337
|
+
return t.get(this.#d);
|
|
5249
5338
|
}
|
|
5250
5339
|
set totalCapacity(e) {
|
|
5251
|
-
t.set(this.#
|
|
5340
|
+
t.set(this.#d, e);
|
|
5252
5341
|
}
|
|
5253
|
-
#
|
|
5342
|
+
#f = t.derived(() => this.data?.averageUtilization);
|
|
5254
5343
|
get averageUtilization() {
|
|
5255
|
-
return t.get(this.#
|
|
5344
|
+
return t.get(this.#f);
|
|
5256
5345
|
}
|
|
5257
5346
|
set averageUtilization(e) {
|
|
5258
|
-
t.set(this.#
|
|
5347
|
+
t.set(this.#f, e);
|
|
5259
5348
|
}
|
|
5260
5349
|
constructor(e, t, n) {
|
|
5261
5350
|
this.client = e, this.projectId = t, this.initialOptions = n, n?.interval && (this.interval = n.interval), n?.groupBy && (this.groupBy = n.groupBy), n?.metric && (this.metric = n.metric);
|
|
@@ -5270,29 +5359,34 @@ var kn = class {
|
|
|
5270
5359
|
this.metric = e, await this.fetch();
|
|
5271
5360
|
}
|
|
5272
5361
|
async fetch(e) {
|
|
5362
|
+
let { api: t, signal: n } = this.#e.begin(this.client);
|
|
5273
5363
|
this.loading = !0, this.error = null;
|
|
5274
5364
|
try {
|
|
5275
|
-
this.data = await
|
|
5365
|
+
if (this.data = await t.getWorkloadDistribution(this.projectId, {
|
|
5276
5366
|
...this.initialOptions,
|
|
5277
5367
|
interval: this.interval,
|
|
5278
5368
|
groupBy: this.groupBy,
|
|
5279
5369
|
metric: this.metric,
|
|
5280
5370
|
...e
|
|
5281
|
-
});
|
|
5371
|
+
}), n.aborted) return;
|
|
5282
5372
|
} catch (e) {
|
|
5373
|
+
if (n.aborted) return;
|
|
5283
5374
|
this.error = e instanceof Error ? e : Error(String(e));
|
|
5284
5375
|
} finally {
|
|
5285
|
-
this.loading = !1;
|
|
5376
|
+
n.aborted || (this.loading = !1);
|
|
5286
5377
|
}
|
|
5287
5378
|
}
|
|
5379
|
+
destroy() {
|
|
5380
|
+
this.#e.cancel();
|
|
5381
|
+
}
|
|
5288
5382
|
};
|
|
5289
|
-
function
|
|
5290
|
-
return new
|
|
5383
|
+
function jn(e, t, n) {
|
|
5384
|
+
return new An(e, t, n);
|
|
5291
5385
|
}
|
|
5292
5386
|
//#endregion
|
|
5293
5387
|
//#region src/index.ts
|
|
5294
|
-
function
|
|
5388
|
+
function Mn(t) {
|
|
5295
5389
|
return new e(t);
|
|
5296
5390
|
}
|
|
5297
5391
|
//#endregion
|
|
5298
|
-
export {
|
|
5392
|
+
export { ie as AttachmentState, ne as CommentState, wn as CriticalPathState, ce as DeliverableState, ue as DeliverableSummaryState, fe as KanbanState, a as ProjectState, oe as TaskActivityState, On as TaskMetricsState, s as TaskState, me as TaskTransitionsState, En as TimelineLadderState, Sn as WebMcpState, ee as WorkflowState, An as WorkloadState, ae as createAttachmentState, re as createCommentState, Mn as createCriticalPathClient, Tn as createCriticalPathState, le as createDeliverableState, de as createDeliverableSummaryState, pe as createKanbanState, o as createProjectState, se as createTaskActivityState, kn as createTaskMetricsState, c as createTaskState, he as createTaskTransitionsState, Dn as createTimelineLadderState, Cn as createWebMcpState, te as createWorkflowState, jn as createWorkloadState };
|