@marimo-team/islands 0.13.7-dev4 → 0.13.7-dev41
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/dist/{ConnectedDataExplorerComponent-QRQGkOs0.js → ConnectedDataExplorerComponent-BZjvJyZJ.js} +2 -2
- package/dist/{VegaLite-Bo0gMnSO.js → VegaLite-DQVgOxz7.js} +3 -3
- package/dist/{_baseUniq-B6VJF29Z.js → _baseUniq-3V9Nn0gP.js} +54 -54
- package/dist/{any-language-editor-B0HG9Ad-.js → any-language-editor-DBs0E_X1.js} +1 -1
- package/dist/{architectureDiagram-IEHRJDOE-UZHC7Jon.js → architectureDiagram-IEHRJDOE-DBrdPoA-.js} +5 -5
- package/dist/assets/{save-worker-9JEjyZ7F.js → save-worker-BPdUArx2.js} +441 -417
- package/dist/assets/{worker-CCjA_vqR.js → worker-ClUJakx7.js} +462 -438
- package/dist/assets/{worker-C9lFbiFX.js → worker-PjUOGXtl.js} +466 -442
- package/dist/{blockDiagram-JOT3LUYC-C8lNho_Q.js → blockDiagram-JOT3LUYC-DdQ0heFq.js} +4 -4
- package/dist/{c4Diagram-VJAJSXHY-4TyXJf3d.js → c4Diagram-VJAJSXHY-DIs8PNMb.js} +2 -2
- package/dist/{channel-DxqvymFF.js → channel-DcCaZM4M.js} +1 -1
- package/dist/{chunk-4BMEZGHF-DJ0qtQvv.js → chunk-4BMEZGHF-DSzu7FyR.js} +1 -1
- package/dist/{chunk-A2AXSNBT-CLkYpNLK.js → chunk-A2AXSNBT-DTdS12oK.js} +2 -2
- package/dist/{chunk-AEK57VVT-uuuXS9P4.js → chunk-AEK57VVT-BIAAg-HQ.js} +2 -2
- package/dist/{chunk-D6G4REZN-CqhCx2qb.js → chunk-D6G4REZN-BN7VkdX4.js} +1 -1
- package/dist/{chunk-RZ5BOZE2-COovrsNU.js → chunk-RZ5BOZE2-DrfUp49k.js} +1 -1
- package/dist/{chunk-XZIHB7SX-DGlimjid.js → chunk-XZIHB7SX-DYVLJYWW.js} +1 -1
- package/dist/{classDiagram-GIVACNV2-QiVAsFGe.js → classDiagram-GIVACNV2-DJZsZ0Zb.js} +2 -2
- package/dist/{classDiagram-v2-COTLJTTW-QiVAsFGe.js → classDiagram-v2-COTLJTTW-DJZsZ0Zb.js} +2 -2
- package/dist/{clone-DXlD4qPF.js → clone-DN-tlQin.js} +1 -1
- package/dist/{dagre-OKDRZEBW-DTTsWSbW.js → dagre-OKDRZEBW-BzK81J-Z.js} +6 -6
- package/dist/{data-editor-Cb6YmWXl.js → data-editor-v07QVe3s.js} +1 -1
- package/dist/{diagram-SSKATNLV-DmmpF1TO.js → diagram-SSKATNLV-BNt6x_MG.js} +3 -3
- package/dist/{diagram-VNBRO52H-BBF0SrKa.js → diagram-VNBRO52H-CE4tW78f.js} +3 -3
- package/dist/{erDiagram-Q7BY3M3F-CkQWj_JU.js → erDiagram-Q7BY3M3F-C0IpU8iU.js} +3 -3
- package/dist/{flowDiagram-4HSFHLVR-DcUI9ZZn.js → flowDiagram-4HSFHLVR-eiI89WXw.js} +3 -3
- package/dist/{ganttDiagram-APWFNJXF-C1gt1lbC.js → ganttDiagram-APWFNJXF-D9LZ1Nyu.js} +55 -55
- package/dist/{gitGraphDiagram-7IBYFJ6S-BtgoS6d3.js → gitGraphDiagram-7IBYFJ6S-CCvgE4Ly.js} +4 -4
- package/dist/{graph-m0I6HuBE.js → graph-Dk_h5GhC.js} +3 -3
- package/dist/{index-DOsABR-a.js → index-Cll3NOBf.js} +1 -1
- package/dist/{index-BjDATKQ5.js → index-DO58yE1z.js} +1 -1
- package/dist/{index-D8TsAbTY.js → index-QGatw2vD.js} +3 -3
- package/dist/{index-D8RQXRhD.js → index-VWy3Rygl.js} +1 -1
- package/dist/{infoDiagram-PH2N3AL5-B8mjxs7h.js → infoDiagram-PH2N3AL5-BhbkxEJF.js} +2 -2
- package/dist/{journeyDiagram-U35MCT3I-BVQnoc_V.js → journeyDiagram-U35MCT3I-BjzbOjSF.js} +2 -2
- package/dist/{kanban-definition-NDS4AKOZ-D9_XjIXw.js → kanban-definition-NDS4AKOZ-Be5H7e3M.js} +1 -1
- package/dist/{layout-UUfR40nX.js → layout-CQm5Xtac.js} +51 -51
- package/dist/{linear-BKLX6Ujz.js → linear-ljfz5y2Q.js} +32 -32
- package/dist/{main-DAFnyU3g.js → main-DbclblC5.js} +44971 -43173
- package/dist/main.js +1 -1
- package/dist/{mermaid-IDQQEy9A.js → mermaid-DvdpBBK9.js} +28 -28
- package/dist/min-DR6WA94N.js +85 -0
- package/dist/{mindmap-definition-ALO5MXBD-By9IkZ7G.js → mindmap-definition-ALO5MXBD-Cl8tFPVW.js} +2 -2
- package/dist/{pieDiagram-IB7DONF6-8c4uUJBq.js → pieDiagram-IB7DONF6-Cdxt41Cl.js} +3 -3
- package/dist/{quadrantDiagram-7GDLP6J5-ChByp_e3.js → quadrantDiagram-7GDLP6J5-DDRCkOtE.js} +2 -2
- package/dist/{radar-MK3ICKWK-hrISqRaa.js → radar-MK3ICKWK-C5tDdqdB.js} +11 -11
- package/dist/{react-plotly-v_twKNy6.js → react-plotly-B1KgIOaj.js} +1 -1
- package/dist/{requirementDiagram-KVF5MWMF-DY08rPCC.js → requirementDiagram-KVF5MWMF-D13U5N0E.js} +2 -2
- package/dist/{sankeyDiagram-QLVOVGJD-B9BOoXwW.js → sankeyDiagram-QLVOVGJD-HzzlUtz4.js} +1 -1
- package/dist/{sequenceDiagram-X6HHIX6F-engFfcXJ.js → sequenceDiagram-X6HHIX6F-CETaupWv.js} +3 -3
- package/dist/{slides-component-D8yo_lsj.js → slides-component-fzg30ltB.js} +1 -1
- package/dist/{stateDiagram-DGXRK772-cu4a5K2A.js → stateDiagram-DGXRK772-DVc0mLHa.js} +4 -4
- package/dist/{stateDiagram-v2-YXO3MK2T-C00QjcxO.js → stateDiagram-v2-YXO3MK2T-Dfd3R8nu.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-DtY_uGKz.js → time-DT9x8Azg.js} +2 -2
- package/dist/{timeline-definition-BDJGKUSR-DyH33LRS.js → timeline-definition-BDJGKUSR-8-UeJAk7.js} +1 -1
- package/dist/{vega-component-AFdMjljl.js → vega-component-DsBlfk0J.js} +2 -2
- package/dist/{xychartDiagram-VJFVF3MP-CbQOgome.js → xychartDiagram-VJFVF3MP-Qs9WONHM.js} +2 -2
- package/package.json +5 -4
- package/dist/min-CMqa9GBC.js +0 -80
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
class
|
|
1
|
+
var vr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var ps = vr((ys, yt) => {
|
|
3
|
+
class _r {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.status = "pending", this.promise = new Promise((e, r) => {
|
|
6
6
|
this.reject = (n) => {
|
|
@@ -47,14 +47,14 @@ var us = mr((ps, pt) => {
|
|
|
47
47
|
}
|
|
48
48
|
t.joinValues = n, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
|
|
49
49
|
})(k || (k = {}));
|
|
50
|
-
var
|
|
50
|
+
var ot;
|
|
51
51
|
(function(t) {
|
|
52
52
|
t.mergeShapes = (e, r) => ({
|
|
53
53
|
...e,
|
|
54
54
|
...r
|
|
55
55
|
// second overwrites first
|
|
56
56
|
});
|
|
57
|
-
})(
|
|
57
|
+
})(ot || (ot = {}));
|
|
58
58
|
const p = k.arrayToEnum([
|
|
59
59
|
"string",
|
|
60
60
|
"nan",
|
|
@@ -114,7 +114,7 @@ var us = mr((ps, pt) => {
|
|
|
114
114
|
"invalid_intersection_types",
|
|
115
115
|
"not_multiple_of",
|
|
116
116
|
"not_finite"
|
|
117
|
-
]),
|
|
117
|
+
]), wr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
118
118
|
class P extends Error {
|
|
119
119
|
get errors() {
|
|
120
120
|
return this.issues;
|
|
@@ -231,14 +231,14 @@ var us = mr((ps, pt) => {
|
|
|
231
231
|
}
|
|
232
232
|
return { message: r };
|
|
233
233
|
};
|
|
234
|
-
let
|
|
235
|
-
function
|
|
236
|
-
|
|
234
|
+
let At = ge;
|
|
235
|
+
function br(t) {
|
|
236
|
+
At = t;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
238
|
+
function He() {
|
|
239
|
+
return At;
|
|
240
240
|
}
|
|
241
|
-
const
|
|
241
|
+
const We = (t) => {
|
|
242
242
|
const { data: e, path: r, errorMaps: n, issueData: s } = t, a = [...r, ...s.path || []], i = {
|
|
243
243
|
...s,
|
|
244
244
|
path: a
|
|
@@ -258,9 +258,9 @@ var us = mr((ps, pt) => {
|
|
|
258
258
|
path: a,
|
|
259
259
|
message: o
|
|
260
260
|
};
|
|
261
|
-
},
|
|
261
|
+
}, kr = [];
|
|
262
262
|
function f(t, e) {
|
|
263
|
-
const r =
|
|
263
|
+
const r = He(), n = We({
|
|
264
264
|
issueData: e,
|
|
265
265
|
data: t.data,
|
|
266
266
|
path: t.path,
|
|
@@ -320,12 +320,12 @@ var us = mr((ps, pt) => {
|
|
|
320
320
|
}
|
|
321
321
|
const g = Object.freeze({
|
|
322
322
|
status: "aborted"
|
|
323
|
-
}), me = (t) => ({ status: "dirty", value: t }), C = (t) => ({ status: "valid", value: t }),
|
|
324
|
-
function
|
|
323
|
+
}), me = (t) => ({ status: "dirty", value: t }), C = (t) => ({ status: "valid", value: t }), dt = (t) => t.status === "aborted", ct = (t) => t.status === "dirty", ie = (t) => t.status === "valid", Oe = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
324
|
+
function Je(t, e, r, n) {
|
|
325
325
|
if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
326
326
|
return e.get(t);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Ct(t, e, r, n, s) {
|
|
329
329
|
if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
330
330
|
return e.set(t, r), r;
|
|
331
331
|
}
|
|
@@ -333,8 +333,8 @@ var us = mr((ps, pt) => {
|
|
|
333
333
|
(function(t) {
|
|
334
334
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
335
335
|
})(h || (h = {}));
|
|
336
|
-
var
|
|
337
|
-
class
|
|
336
|
+
var Se, Te;
|
|
337
|
+
class L {
|
|
338
338
|
constructor(e, r, n, s) {
|
|
339
339
|
this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = s;
|
|
340
340
|
}
|
|
@@ -342,7 +342,7 @@ var us = mr((ps, pt) => {
|
|
|
342
342
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
const
|
|
345
|
+
const xt = (t, e) => {
|
|
346
346
|
if (ie(e))
|
|
347
347
|
return { success: !0, data: e.value };
|
|
348
348
|
if (!t.common.issues.length)
|
|
@@ -401,7 +401,7 @@ var us = mr((ps, pt) => {
|
|
|
401
401
|
}
|
|
402
402
|
_parseSync(e) {
|
|
403
403
|
const r = this._parse(e);
|
|
404
|
-
if (
|
|
404
|
+
if (Oe(r))
|
|
405
405
|
throw new Error("Synchronous parse encountered promise.");
|
|
406
406
|
return r;
|
|
407
407
|
}
|
|
@@ -429,7 +429,7 @@ var us = mr((ps, pt) => {
|
|
|
429
429
|
data: e,
|
|
430
430
|
parsedType: B(e)
|
|
431
431
|
}, a = this._parseSync({ data: e, path: s.path, parent: s });
|
|
432
|
-
return
|
|
432
|
+
return xt(s, a);
|
|
433
433
|
}
|
|
434
434
|
"~validate"(e) {
|
|
435
435
|
var r, n;
|
|
@@ -482,8 +482,8 @@ var us = mr((ps, pt) => {
|
|
|
482
482
|
parent: null,
|
|
483
483
|
data: e,
|
|
484
484
|
parsedType: B(e)
|
|
485
|
-
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (
|
|
486
|
-
return
|
|
485
|
+
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Oe(s) ? s : Promise.resolve(s));
|
|
486
|
+
return xt(n, a);
|
|
487
487
|
}
|
|
488
488
|
refine(e, r) {
|
|
489
489
|
const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
|
|
@@ -499,7 +499,7 @@ var us = mr((ps, pt) => {
|
|
|
499
499
|
return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1));
|
|
500
500
|
}
|
|
501
501
|
_refinement(e) {
|
|
502
|
-
return new
|
|
502
|
+
return new M({
|
|
503
503
|
schema: this,
|
|
504
504
|
typeName: y.ZodEffects,
|
|
505
505
|
effect: { type: "refinement", refinement: e }
|
|
@@ -516,7 +516,7 @@ var us = mr((ps, pt) => {
|
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
optional() {
|
|
519
|
-
return
|
|
519
|
+
return D.create(this, this._def);
|
|
520
520
|
}
|
|
521
521
|
nullable() {
|
|
522
522
|
return K.create(this, this._def);
|
|
@@ -525,19 +525,19 @@ var us = mr((ps, pt) => {
|
|
|
525
525
|
return this.nullable().optional();
|
|
526
526
|
}
|
|
527
527
|
array() {
|
|
528
|
-
return
|
|
528
|
+
return $.create(this);
|
|
529
529
|
}
|
|
530
530
|
promise() {
|
|
531
531
|
return _e.create(this, this._def);
|
|
532
532
|
}
|
|
533
533
|
or(e) {
|
|
534
|
-
return
|
|
534
|
+
return Ce.create([this, e], this._def);
|
|
535
535
|
}
|
|
536
536
|
and(e) {
|
|
537
|
-
return
|
|
537
|
+
return Ie.create(this, e, this._def);
|
|
538
538
|
}
|
|
539
539
|
transform(e) {
|
|
540
|
-
return new
|
|
540
|
+
return new M({
|
|
541
541
|
..._(this._def),
|
|
542
542
|
schema: this,
|
|
543
543
|
typeName: y.ZodEffects,
|
|
@@ -554,7 +554,7 @@ var us = mr((ps, pt) => {
|
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
brand() {
|
|
557
|
-
return new
|
|
557
|
+
return new gt({
|
|
558
558
|
typeName: y.ZodBranded,
|
|
559
559
|
type: this,
|
|
560
560
|
..._(this._def)
|
|
@@ -562,7 +562,7 @@ var us = mr((ps, pt) => {
|
|
|
562
562
|
}
|
|
563
563
|
catch(e) {
|
|
564
564
|
const r = typeof e == "function" ? e : () => e;
|
|
565
|
-
return new
|
|
565
|
+
return new Fe({
|
|
566
566
|
..._(this._def),
|
|
567
567
|
innerType: this,
|
|
568
568
|
catchValue: r,
|
|
@@ -580,7 +580,7 @@ var us = mr((ps, pt) => {
|
|
|
580
580
|
return Le.create(this, e);
|
|
581
581
|
}
|
|
582
582
|
readonly() {
|
|
583
|
-
return
|
|
583
|
+
return De.create(this);
|
|
584
584
|
}
|
|
585
585
|
isOptional() {
|
|
586
586
|
return this.safeParse(void 0).success;
|
|
@@ -589,26 +589,26 @@ var us = mr((ps, pt) => {
|
|
|
589
589
|
return this.safeParse(null).success;
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
const
|
|
593
|
-
let
|
|
594
|
-
const
|
|
595
|
-
function
|
|
592
|
+
const xr = /^c[^\s-]{8,}$/i, Sr = /^[0-9a-z]+$/, Tr = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Er = /^[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, Or = /^[a-z0-9_-]{21}$/i, Nr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Rr = /^[-+]?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)?)??$/, Ar = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Cr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
593
|
+
let at;
|
|
594
|
+
const Ir = /^(?:(?: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])$/, Pr = /^(?:(?: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])$/, jr = /^(([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]))$/, Zr = /^(([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])$/, $r = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Mr = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, It = "((\\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])))", Fr = new RegExp(`^${It}$`);
|
|
595
|
+
function Pt(t) {
|
|
596
596
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
597
597
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
return new RegExp(`^${
|
|
599
|
+
function Dr(t) {
|
|
600
|
+
return new RegExp(`^${Pt(t)}$`);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
let e = `${
|
|
602
|
+
function jt(t) {
|
|
603
|
+
let e = `${It}T${Pt(t)}`;
|
|
604
604
|
const r = [];
|
|
605
605
|
return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return !!((e === "v4" || !e) &&
|
|
607
|
+
function Lr(t, e) {
|
|
608
|
+
return !!((e === "v4" || !e) && Ir.test(t) || (e === "v6" || !e) && jr.test(t));
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
if (!
|
|
610
|
+
function Vr(t, e) {
|
|
611
|
+
if (!Nr.test(t))
|
|
612
612
|
return !1;
|
|
613
613
|
try {
|
|
614
614
|
const [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(n));
|
|
@@ -617,8 +617,8 @@ var us = mr((ps, pt) => {
|
|
|
617
617
|
return !1;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return !!((e === "v4" || !e) &&
|
|
620
|
+
function zr(t, e) {
|
|
621
|
+
return !!((e === "v4" || !e) && Pr.test(t) || (e === "v6" || !e) && Zr.test(t));
|
|
622
622
|
}
|
|
623
623
|
class Z extends w {
|
|
624
624
|
_parse(e) {
|
|
@@ -669,43 +669,43 @@ var us = mr((ps, pt) => {
|
|
|
669
669
|
message: a.message
|
|
670
670
|
}), n.dirty());
|
|
671
671
|
} else if (a.kind === "email")
|
|
672
|
-
|
|
672
|
+
Ar.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
673
673
|
validation: "email",
|
|
674
674
|
code: u.invalid_string,
|
|
675
675
|
message: a.message
|
|
676
676
|
}), n.dirty());
|
|
677
677
|
else if (a.kind === "emoji")
|
|
678
|
-
|
|
678
|
+
at || (at = new RegExp(Cr, "u")), at.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
679
679
|
validation: "emoji",
|
|
680
680
|
code: u.invalid_string,
|
|
681
681
|
message: a.message
|
|
682
682
|
}), n.dirty());
|
|
683
683
|
else if (a.kind === "uuid")
|
|
684
|
-
|
|
684
|
+
Er.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
685
685
|
validation: "uuid",
|
|
686
686
|
code: u.invalid_string,
|
|
687
687
|
message: a.message
|
|
688
688
|
}), n.dirty());
|
|
689
689
|
else if (a.kind === "nanoid")
|
|
690
|
-
|
|
690
|
+
Or.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
691
691
|
validation: "nanoid",
|
|
692
692
|
code: u.invalid_string,
|
|
693
693
|
message: a.message
|
|
694
694
|
}), n.dirty());
|
|
695
695
|
else if (a.kind === "cuid")
|
|
696
|
-
|
|
696
|
+
xr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
697
697
|
validation: "cuid",
|
|
698
698
|
code: u.invalid_string,
|
|
699
699
|
message: a.message
|
|
700
700
|
}), n.dirty());
|
|
701
701
|
else if (a.kind === "cuid2")
|
|
702
|
-
|
|
702
|
+
Sr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
703
703
|
validation: "cuid2",
|
|
704
704
|
code: u.invalid_string,
|
|
705
705
|
message: a.message
|
|
706
706
|
}), n.dirty());
|
|
707
707
|
else if (a.kind === "ulid")
|
|
708
|
-
|
|
708
|
+
Tr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
709
709
|
validation: "ulid",
|
|
710
710
|
code: u.invalid_string,
|
|
711
711
|
message: a.message
|
|
@@ -736,39 +736,39 @@ var us = mr((ps, pt) => {
|
|
|
736
736
|
code: u.invalid_string,
|
|
737
737
|
validation: { endsWith: a.value },
|
|
738
738
|
message: a.message
|
|
739
|
-
}), n.dirty()) : a.kind === "datetime" ?
|
|
739
|
+
}), n.dirty()) : a.kind === "datetime" ? jt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
740
740
|
code: u.invalid_string,
|
|
741
741
|
validation: "datetime",
|
|
742
742
|
message: a.message
|
|
743
|
-
}), n.dirty()) : a.kind === "date" ?
|
|
743
|
+
}), n.dirty()) : a.kind === "date" ? Fr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
744
744
|
code: u.invalid_string,
|
|
745
745
|
validation: "date",
|
|
746
746
|
message: a.message
|
|
747
|
-
}), n.dirty()) : a.kind === "time" ?
|
|
747
|
+
}), n.dirty()) : a.kind === "time" ? Dr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
748
748
|
code: u.invalid_string,
|
|
749
749
|
validation: "time",
|
|
750
750
|
message: a.message
|
|
751
|
-
}), n.dirty()) : a.kind === "duration" ?
|
|
751
|
+
}), n.dirty()) : a.kind === "duration" ? Rr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
752
752
|
validation: "duration",
|
|
753
753
|
code: u.invalid_string,
|
|
754
754
|
message: a.message
|
|
755
|
-
}), n.dirty()) : a.kind === "ip" ?
|
|
755
|
+
}), n.dirty()) : a.kind === "ip" ? Lr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
756
756
|
validation: "ip",
|
|
757
757
|
code: u.invalid_string,
|
|
758
758
|
message: a.message
|
|
759
|
-
}), n.dirty()) : a.kind === "jwt" ?
|
|
759
|
+
}), n.dirty()) : a.kind === "jwt" ? Vr(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
760
760
|
validation: "jwt",
|
|
761
761
|
code: u.invalid_string,
|
|
762
762
|
message: a.message
|
|
763
|
-
}), n.dirty()) : a.kind === "cidr" ?
|
|
763
|
+
}), n.dirty()) : a.kind === "cidr" ? zr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
764
764
|
validation: "cidr",
|
|
765
765
|
code: u.invalid_string,
|
|
766
766
|
message: a.message
|
|
767
|
-
}), n.dirty()) : a.kind === "base64" ?
|
|
767
|
+
}), n.dirty()) : a.kind === "base64" ? $r.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
768
768
|
validation: "base64",
|
|
769
769
|
code: u.invalid_string,
|
|
770
770
|
message: a.message
|
|
771
|
-
}), n.dirty()) : a.kind === "base64url" ?
|
|
771
|
+
}), n.dirty()) : a.kind === "base64url" ? Mr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
772
772
|
validation: "base64url",
|
|
773
773
|
code: u.invalid_string,
|
|
774
774
|
message: a.message
|
|
@@ -1007,7 +1007,7 @@ var us = mr((ps, pt) => {
|
|
|
1007
1007
|
..._(t)
|
|
1008
1008
|
});
|
|
1009
1009
|
};
|
|
1010
|
-
function
|
|
1010
|
+
function Ur(t, e) {
|
|
1011
1011
|
const r = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = r > n ? r : n, a = parseInt(t.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
|
|
1012
1012
|
return a % i / Math.pow(10, s);
|
|
1013
1013
|
}
|
|
@@ -1046,7 +1046,7 @@ var us = mr((ps, pt) => {
|
|
|
1046
1046
|
inclusive: a.inclusive,
|
|
1047
1047
|
exact: !1,
|
|
1048
1048
|
message: a.message
|
|
1049
|
-
}), s.dirty()) : a.kind === "multipleOf" ?
|
|
1049
|
+
}), s.dirty()) : a.kind === "multipleOf" ? Ur(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
1050
1050
|
code: u.not_multiple_of,
|
|
1051
1051
|
multipleOf: a.value,
|
|
1052
1052
|
message: a.message
|
|
@@ -1319,7 +1319,7 @@ var us = mr((ps, pt) => {
|
|
|
1319
1319
|
..._(t)
|
|
1320
1320
|
});
|
|
1321
1321
|
};
|
|
1322
|
-
class
|
|
1322
|
+
class Ne extends w {
|
|
1323
1323
|
_parse(e) {
|
|
1324
1324
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
|
|
1325
1325
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1332,7 +1332,7 @@ var us = mr((ps, pt) => {
|
|
|
1332
1332
|
return C(e.data);
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
|
|
1335
|
+
Ne.create = (t) => new Ne({
|
|
1336
1336
|
typeName: y.ZodBoolean,
|
|
1337
1337
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1338
1338
|
..._(t)
|
|
@@ -1415,7 +1415,7 @@ var us = mr((ps, pt) => {
|
|
|
1415
1415
|
typeName: y.ZodDate,
|
|
1416
1416
|
..._(t)
|
|
1417
1417
|
});
|
|
1418
|
-
class
|
|
1418
|
+
class Ye extends w {
|
|
1419
1419
|
_parse(e) {
|
|
1420
1420
|
if (this._getType(e) !== p.symbol) {
|
|
1421
1421
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1428,11 +1428,11 @@ var us = mr((ps, pt) => {
|
|
|
1428
1428
|
return C(e.data);
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
|
-
|
|
1431
|
+
Ye.create = (t) => new Ye({
|
|
1432
1432
|
typeName: y.ZodSymbol,
|
|
1433
1433
|
..._(t)
|
|
1434
1434
|
});
|
|
1435
|
-
class
|
|
1435
|
+
class Re extends w {
|
|
1436
1436
|
_parse(e) {
|
|
1437
1437
|
if (this._getType(e) !== p.undefined) {
|
|
1438
1438
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1445,11 +1445,11 @@ var us = mr((ps, pt) => {
|
|
|
1445
1445
|
return C(e.data);
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
|
-
|
|
1448
|
+
Re.create = (t) => new Re({
|
|
1449
1449
|
typeName: y.ZodUndefined,
|
|
1450
1450
|
..._(t)
|
|
1451
1451
|
});
|
|
1452
|
-
class
|
|
1452
|
+
class Ae extends w {
|
|
1453
1453
|
_parse(e) {
|
|
1454
1454
|
if (this._getType(e) !== p.null) {
|
|
1455
1455
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1462,7 +1462,7 @@ var us = mr((ps, pt) => {
|
|
|
1462
1462
|
return C(e.data);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
|
|
1465
|
+
Ae.create = (t) => new Ae({
|
|
1466
1466
|
typeName: y.ZodNull,
|
|
1467
1467
|
..._(t)
|
|
1468
1468
|
});
|
|
@@ -1504,7 +1504,7 @@ var us = mr((ps, pt) => {
|
|
|
1504
1504
|
typeName: y.ZodNever,
|
|
1505
1505
|
..._(t)
|
|
1506
1506
|
});
|
|
1507
|
-
class
|
|
1507
|
+
class Ge extends w {
|
|
1508
1508
|
_parse(e) {
|
|
1509
1509
|
if (this._getType(e) !== p.undefined) {
|
|
1510
1510
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1517,11 +1517,11 @@ var us = mr((ps, pt) => {
|
|
|
1517
1517
|
return C(e.data);
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
|
|
1520
|
+
Ge.create = (t) => new Ge({
|
|
1521
1521
|
typeName: y.ZodVoid,
|
|
1522
1522
|
..._(t)
|
|
1523
1523
|
});
|
|
1524
|
-
class
|
|
1524
|
+
class $ extends w {
|
|
1525
1525
|
_parse(e) {
|
|
1526
1526
|
const { ctx: r, status: n } = this._processInputParams(e), s = this._def;
|
|
1527
1527
|
if (r.parsedType !== p.array)
|
|
@@ -1557,27 +1557,27 @@ var us = mr((ps, pt) => {
|
|
|
1557
1557
|
exact: !1,
|
|
1558
1558
|
message: s.maxLength.message
|
|
1559
1559
|
}), n.dirty()), r.common.async)
|
|
1560
|
-
return Promise.all([...r.data].map((i, o) => s.type._parseAsync(new
|
|
1561
|
-
const a = [...r.data].map((i, o) => s.type._parseSync(new
|
|
1560
|
+
return Promise.all([...r.data].map((i, o) => s.type._parseAsync(new L(r, i, r.path, o)))).then((i) => A.mergeArray(n, i));
|
|
1561
|
+
const a = [...r.data].map((i, o) => s.type._parseSync(new L(r, i, r.path, o)));
|
|
1562
1562
|
return A.mergeArray(n, a);
|
|
1563
1563
|
}
|
|
1564
1564
|
get element() {
|
|
1565
1565
|
return this._def.type;
|
|
1566
1566
|
}
|
|
1567
1567
|
min(e, r) {
|
|
1568
|
-
return new
|
|
1568
|
+
return new $({
|
|
1569
1569
|
...this._def,
|
|
1570
1570
|
minLength: { value: e, message: h.toString(r) }
|
|
1571
1571
|
});
|
|
1572
1572
|
}
|
|
1573
1573
|
max(e, r) {
|
|
1574
|
-
return new
|
|
1574
|
+
return new $({
|
|
1575
1575
|
...this._def,
|
|
1576
1576
|
maxLength: { value: e, message: h.toString(r) }
|
|
1577
1577
|
});
|
|
1578
1578
|
}
|
|
1579
1579
|
length(e, r) {
|
|
1580
|
-
return new
|
|
1580
|
+
return new $({
|
|
1581
1581
|
...this._def,
|
|
1582
1582
|
exactLength: { value: e, message: h.toString(r) }
|
|
1583
1583
|
});
|
|
@@ -1586,7 +1586,7 @@ var us = mr((ps, pt) => {
|
|
|
1586
1586
|
return this.min(1, e);
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
|
-
|
|
1589
|
+
$.create = (t, e) => new $({
|
|
1590
1590
|
type: t,
|
|
1591
1591
|
minLength: null,
|
|
1592
1592
|
maxLength: null,
|
|
@@ -1599,16 +1599,16 @@ var us = mr((ps, pt) => {
|
|
|
1599
1599
|
const e = {};
|
|
1600
1600
|
for (const r in t.shape) {
|
|
1601
1601
|
const n = t.shape[r];
|
|
1602
|
-
e[r] =
|
|
1602
|
+
e[r] = D.create(ue(n));
|
|
1603
1603
|
}
|
|
1604
1604
|
return new O({
|
|
1605
1605
|
...t._def,
|
|
1606
1606
|
shape: () => e
|
|
1607
1607
|
});
|
|
1608
|
-
} else return t instanceof
|
|
1608
|
+
} else return t instanceof $ ? new $({
|
|
1609
1609
|
...t._def,
|
|
1610
1610
|
type: ue(t.element)
|
|
1611
|
-
}) : t instanceof
|
|
1611
|
+
}) : t instanceof D ? D.create(ue(t.unwrap())) : t instanceof K ? K.create(ue(t.unwrap())) : t instanceof V ? V.create(t.items.map((e) => ue(e))) : t;
|
|
1612
1612
|
}
|
|
1613
1613
|
class O extends w {
|
|
1614
1614
|
constructor() {
|
|
@@ -1638,7 +1638,7 @@ var us = mr((ps, pt) => {
|
|
|
1638
1638
|
const l = a[c], b = s.data[c];
|
|
1639
1639
|
d.push({
|
|
1640
1640
|
key: { status: "valid", value: c },
|
|
1641
|
-
value: l._parse(new
|
|
1641
|
+
value: l._parse(new L(s, b, s.path, c)),
|
|
1642
1642
|
alwaysSet: c in s.data
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
@@ -1663,7 +1663,7 @@ var us = mr((ps, pt) => {
|
|
|
1663
1663
|
d.push({
|
|
1664
1664
|
key: { status: "valid", value: l },
|
|
1665
1665
|
value: c._parse(
|
|
1666
|
-
new
|
|
1666
|
+
new L(s, b, s.path, l)
|
|
1667
1667
|
//, ctx.child(key), value, getParsedType(value)
|
|
1668
1668
|
),
|
|
1669
1669
|
alwaysSet: l in s.data
|
|
@@ -1863,7 +1863,7 @@ var us = mr((ps, pt) => {
|
|
|
1863
1863
|
r[n] = this.shape[n];
|
|
1864
1864
|
else {
|
|
1865
1865
|
let a = this.shape[n];
|
|
1866
|
-
for (; a instanceof
|
|
1866
|
+
for (; a instanceof D; )
|
|
1867
1867
|
a = a._def.innerType;
|
|
1868
1868
|
r[n] = a;
|
|
1869
1869
|
}
|
|
@@ -1873,7 +1873,7 @@ var us = mr((ps, pt) => {
|
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
1875
|
keyof() {
|
|
1876
|
-
return
|
|
1876
|
+
return Zt(k.objectKeys(this.shape));
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
1879
|
O.create = (t, e) => new O({
|
|
@@ -1897,7 +1897,7 @@ var us = mr((ps, pt) => {
|
|
|
1897
1897
|
typeName: y.ZodObject,
|
|
1898
1898
|
..._(e)
|
|
1899
1899
|
});
|
|
1900
|
-
class
|
|
1900
|
+
class Ce extends w {
|
|
1901
1901
|
_parse(e) {
|
|
1902
1902
|
const { ctx: r } = this._processInputParams(e), n = this._def.options;
|
|
1903
1903
|
function s(a) {
|
|
@@ -1965,13 +1965,13 @@ var us = mr((ps, pt) => {
|
|
|
1965
1965
|
return this._def.options;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
|
|
1968
|
+
Ce.create = (t, e) => new Ce({
|
|
1969
1969
|
options: t,
|
|
1970
1970
|
typeName: y.ZodUnion,
|
|
1971
1971
|
..._(e)
|
|
1972
1972
|
});
|
|
1973
|
-
const q = (t) => t instanceof
|
|
1974
|
-
class
|
|
1973
|
+
const q = (t) => t instanceof je ? q(t.schema) : t instanceof M ? q(t.innerType()) : t instanceof Ze ? [t.value] : t instanceof G ? t.options : t instanceof $e ? k.objectValues(t.enum) : t instanceof Me ? q(t._def.innerType) : t instanceof Re ? [void 0] : t instanceof Ae ? [null] : t instanceof D ? [void 0, ...q(t.unwrap())] : t instanceof K ? [null, ...q(t.unwrap())] : t instanceof gt || t instanceof De ? q(t.unwrap()) : t instanceof Fe ? q(t._def.innerType) : [];
|
|
1974
|
+
class rt extends w {
|
|
1975
1975
|
_parse(e) {
|
|
1976
1976
|
const { ctx: r } = this._processInputParams(e);
|
|
1977
1977
|
if (r.parsedType !== p.object)
|
|
@@ -2024,7 +2024,7 @@ var us = mr((ps, pt) => {
|
|
|
2024
2024
|
s.set(o, a);
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
return new
|
|
2027
|
+
return new rt({
|
|
2028
2028
|
typeName: y.ZodDiscriminatedUnion,
|
|
2029
2029
|
discriminator: e,
|
|
2030
2030
|
options: r,
|
|
@@ -2033,14 +2033,14 @@ var us = mr((ps, pt) => {
|
|
|
2033
2033
|
});
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function ut(t, e) {
|
|
2037
2037
|
const r = B(t), n = B(e);
|
|
2038
2038
|
if (t === e)
|
|
2039
2039
|
return { valid: !0, data: t };
|
|
2040
2040
|
if (r === p.object && n === p.object) {
|
|
2041
2041
|
const s = k.objectKeys(e), a = k.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
|
|
2042
2042
|
for (const o of a) {
|
|
2043
|
-
const d =
|
|
2043
|
+
const d = ut(t[o], e[o]);
|
|
2044
2044
|
if (!d.valid)
|
|
2045
2045
|
return { valid: !1 };
|
|
2046
2046
|
i[o] = d.data;
|
|
@@ -2051,7 +2051,7 @@ var us = mr((ps, pt) => {
|
|
|
2051
2051
|
return { valid: !1 };
|
|
2052
2052
|
const s = [];
|
|
2053
2053
|
for (let a = 0; a < t.length; a++) {
|
|
2054
|
-
const i = t[a], o = e[a], d =
|
|
2054
|
+
const i = t[a], o = e[a], d = ut(i, o);
|
|
2055
2055
|
if (!d.valid)
|
|
2056
2056
|
return { valid: !1 };
|
|
2057
2057
|
s.push(d.data);
|
|
@@ -2059,13 +2059,13 @@ var us = mr((ps, pt) => {
|
|
|
2059
2059
|
return { valid: !0, data: s };
|
|
2060
2060
|
} else return r === p.date && n === p.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
2061
2061
|
}
|
|
2062
|
-
class
|
|
2062
|
+
class Ie extends w {
|
|
2063
2063
|
_parse(e) {
|
|
2064
2064
|
const { status: r, ctx: n } = this._processInputParams(e), s = (a, i) => {
|
|
2065
|
-
if (
|
|
2065
|
+
if (dt(a) || dt(i))
|
|
2066
2066
|
return g;
|
|
2067
|
-
const o =
|
|
2068
|
-
return o.valid ? ((
|
|
2067
|
+
const o = ut(a.value, i.value);
|
|
2068
|
+
return o.valid ? ((ct(a) || ct(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
|
|
2069
2069
|
code: u.invalid_intersection_types
|
|
2070
2070
|
}), g);
|
|
2071
2071
|
};
|
|
@@ -2091,7 +2091,7 @@ var us = mr((ps, pt) => {
|
|
|
2091
2091
|
}));
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
|
-
|
|
2094
|
+
Ie.create = (t, e, r) => new Ie({
|
|
2095
2095
|
left: t,
|
|
2096
2096
|
right: e,
|
|
2097
2097
|
typeName: y.ZodIntersection,
|
|
@@ -2123,7 +2123,7 @@ var us = mr((ps, pt) => {
|
|
|
2123
2123
|
}), r.dirty());
|
|
2124
2124
|
const a = [...n.data].map((i, o) => {
|
|
2125
2125
|
const d = this._def.items[o] || this._def.rest;
|
|
2126
|
-
return d ? d._parse(new
|
|
2126
|
+
return d ? d._parse(new L(n, i, n.path, o)) : null;
|
|
2127
2127
|
}).filter((i) => !!i);
|
|
2128
2128
|
return n.common.async ? Promise.all(a).then((i) => A.mergeArray(r, i)) : A.mergeArray(r, a);
|
|
2129
2129
|
}
|
|
@@ -2147,7 +2147,7 @@ var us = mr((ps, pt) => {
|
|
|
2147
2147
|
..._(e)
|
|
2148
2148
|
});
|
|
2149
2149
|
};
|
|
2150
|
-
class
|
|
2150
|
+
class Pe extends w {
|
|
2151
2151
|
get keySchema() {
|
|
2152
2152
|
return this._def.keyType;
|
|
2153
2153
|
}
|
|
@@ -2165,8 +2165,8 @@ var us = mr((ps, pt) => {
|
|
|
2165
2165
|
const s = [], a = this._def.keyType, i = this._def.valueType;
|
|
2166
2166
|
for (const o in n.data)
|
|
2167
2167
|
s.push({
|
|
2168
|
-
key: a._parse(new
|
|
2169
|
-
value: i._parse(new
|
|
2168
|
+
key: a._parse(new L(n, o, n.path, o)),
|
|
2169
|
+
value: i._parse(new L(n, n.data[o], n.path, o)),
|
|
2170
2170
|
alwaysSet: o in n.data
|
|
2171
2171
|
});
|
|
2172
2172
|
return n.common.async ? A.mergeObjectAsync(r, s) : A.mergeObjectSync(r, s);
|
|
@@ -2175,12 +2175,12 @@ var us = mr((ps, pt) => {
|
|
|
2175
2175
|
return this._def.valueType;
|
|
2176
2176
|
}
|
|
2177
2177
|
static create(e, r, n) {
|
|
2178
|
-
return r instanceof w ? new
|
|
2178
|
+
return r instanceof w ? new Pe({
|
|
2179
2179
|
keyType: e,
|
|
2180
2180
|
valueType: r,
|
|
2181
2181
|
typeName: y.ZodRecord,
|
|
2182
2182
|
..._(n)
|
|
2183
|
-
}) : new
|
|
2183
|
+
}) : new Pe({
|
|
2184
2184
|
keyType: Z.create(),
|
|
2185
2185
|
valueType: e,
|
|
2186
2186
|
typeName: y.ZodRecord,
|
|
@@ -2188,7 +2188,7 @@ var us = mr((ps, pt) => {
|
|
|
2188
2188
|
});
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
class
|
|
2191
|
+
class Ke extends w {
|
|
2192
2192
|
get keySchema() {
|
|
2193
2193
|
return this._def.keyType;
|
|
2194
2194
|
}
|
|
@@ -2204,8 +2204,8 @@ var us = mr((ps, pt) => {
|
|
|
2204
2204
|
received: n.parsedType
|
|
2205
2205
|
}), g;
|
|
2206
2206
|
const s = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o, d], c) => ({
|
|
2207
|
-
key: s._parse(new
|
|
2208
|
-
value: a._parse(new
|
|
2207
|
+
key: s._parse(new L(n, o, n.path, [c, "key"])),
|
|
2208
|
+
value: a._parse(new L(n, d, n.path, [c, "value"]))
|
|
2209
2209
|
}));
|
|
2210
2210
|
if (n.common.async) {
|
|
2211
2211
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -2230,7 +2230,7 @@ var us = mr((ps, pt) => {
|
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
|
-
|
|
2233
|
+
Ke.create = (t, e, r) => new Ke({
|
|
2234
2234
|
valueType: e,
|
|
2235
2235
|
keyType: t,
|
|
2236
2236
|
typeName: y.ZodMap,
|
|
@@ -2271,7 +2271,7 @@ var us = mr((ps, pt) => {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
return { status: r.value, value: c };
|
|
2273
2273
|
}
|
|
2274
|
-
const o = [...n.data.values()].map((d, c) => a._parse(new
|
|
2274
|
+
const o = [...n.data.values()].map((d, c) => a._parse(new L(n, d, n.path, c)));
|
|
2275
2275
|
return n.common.async ? Promise.all(o).then((d) => i(d)) : i(o);
|
|
2276
2276
|
}
|
|
2277
2277
|
min(e, r) {
|
|
@@ -2313,13 +2313,13 @@ var us = mr((ps, pt) => {
|
|
|
2313
2313
|
received: r.parsedType
|
|
2314
2314
|
}), g;
|
|
2315
2315
|
function n(o, d) {
|
|
2316
|
-
return
|
|
2316
|
+
return We({
|
|
2317
2317
|
data: o,
|
|
2318
2318
|
path: r.path,
|
|
2319
2319
|
errorMaps: [
|
|
2320
2320
|
r.common.contextualErrorMap,
|
|
2321
2321
|
r.schemaErrorMap,
|
|
2322
|
-
|
|
2322
|
+
He(),
|
|
2323
2323
|
ge
|
|
2324
2324
|
].filter((c) => !!c),
|
|
2325
2325
|
issueData: {
|
|
@@ -2329,13 +2329,13 @@ var us = mr((ps, pt) => {
|
|
|
2329
2329
|
});
|
|
2330
2330
|
}
|
|
2331
2331
|
function s(o, d) {
|
|
2332
|
-
return
|
|
2332
|
+
return We({
|
|
2333
2333
|
data: o,
|
|
2334
2334
|
path: r.path,
|
|
2335
2335
|
errorMaps: [
|
|
2336
2336
|
r.common.contextualErrorMap,
|
|
2337
2337
|
r.schemaErrorMap,
|
|
2338
|
-
|
|
2338
|
+
He(),
|
|
2339
2339
|
ge
|
|
2340
2340
|
].filter((c) => !!c),
|
|
2341
2341
|
issueData: {
|
|
@@ -2401,7 +2401,7 @@ var us = mr((ps, pt) => {
|
|
|
2401
2401
|
});
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
|
-
class
|
|
2404
|
+
class je extends w {
|
|
2405
2405
|
get schema() {
|
|
2406
2406
|
return this._def.getter();
|
|
2407
2407
|
}
|
|
@@ -2410,12 +2410,12 @@ var us = mr((ps, pt) => {
|
|
|
2410
2410
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
2411
2411
|
}
|
|
2412
2412
|
}
|
|
2413
|
-
|
|
2413
|
+
je.create = (t, e) => new je({
|
|
2414
2414
|
getter: t,
|
|
2415
2415
|
typeName: y.ZodLazy,
|
|
2416
2416
|
..._(e)
|
|
2417
2417
|
});
|
|
2418
|
-
class
|
|
2418
|
+
class Ze extends w {
|
|
2419
2419
|
_parse(e) {
|
|
2420
2420
|
if (e.data !== this._def.value) {
|
|
2421
2421
|
const r = this._getOrReturnCtx(e);
|
|
@@ -2431,12 +2431,12 @@ var us = mr((ps, pt) => {
|
|
|
2431
2431
|
return this._def.value;
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
|
|
2434
|
+
Ze.create = (t, e) => new Ze({
|
|
2435
2435
|
value: t,
|
|
2436
2436
|
typeName: y.ZodLiteral,
|
|
2437
2437
|
..._(e)
|
|
2438
2438
|
});
|
|
2439
|
-
function
|
|
2439
|
+
function Zt(t, e) {
|
|
2440
2440
|
return new G({
|
|
2441
2441
|
values: t,
|
|
2442
2442
|
typeName: y.ZodEnum,
|
|
@@ -2445,7 +2445,7 @@ var us = mr((ps, pt) => {
|
|
|
2445
2445
|
}
|
|
2446
2446
|
class G extends w {
|
|
2447
2447
|
constructor() {
|
|
2448
|
-
super(...arguments),
|
|
2448
|
+
super(...arguments), Se.set(this, void 0);
|
|
2449
2449
|
}
|
|
2450
2450
|
_parse(e) {
|
|
2451
2451
|
if (typeof e.data != "string") {
|
|
@@ -2456,7 +2456,7 @@ var us = mr((ps, pt) => {
|
|
|
2456
2456
|
code: u.invalid_type
|
|
2457
2457
|
}), g;
|
|
2458
2458
|
}
|
|
2459
|
-
if (
|
|
2459
|
+
if (Je(this, Se) || Ct(this, Se, new Set(this._def.values)), !Je(this, Se).has(e.data)) {
|
|
2460
2460
|
const r = this._getOrReturnCtx(e), n = this._def.values;
|
|
2461
2461
|
return f(r, {
|
|
2462
2462
|
received: r.data,
|
|
@@ -2500,11 +2500,11 @@ var us = mr((ps, pt) => {
|
|
|
2500
2500
|
});
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
|
-
|
|
2504
|
-
G.create =
|
|
2505
|
-
class
|
|
2503
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
2504
|
+
G.create = Zt;
|
|
2505
|
+
class $e extends w {
|
|
2506
2506
|
constructor() {
|
|
2507
|
-
super(...arguments),
|
|
2507
|
+
super(...arguments), Te.set(this, void 0);
|
|
2508
2508
|
}
|
|
2509
2509
|
_parse(e) {
|
|
2510
2510
|
const r = k.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2516,7 +2516,7 @@ var us = mr((ps, pt) => {
|
|
|
2516
2516
|
code: u.invalid_type
|
|
2517
2517
|
}), g;
|
|
2518
2518
|
}
|
|
2519
|
-
if (
|
|
2519
|
+
if (Je(this, Te) || Ct(this, Te, new Set(k.getValidEnumValues(this._def.values))), !Je(this, Te).has(e.data)) {
|
|
2520
2520
|
const s = k.objectValues(r);
|
|
2521
2521
|
return f(n, {
|
|
2522
2522
|
received: n.data,
|
|
@@ -2530,8 +2530,8 @@ var us = mr((ps, pt) => {
|
|
|
2530
2530
|
return this._def.values;
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
|
-
|
|
2534
|
-
|
|
2533
|
+
Te = /* @__PURE__ */ new WeakMap();
|
|
2534
|
+
$e.create = (t, e) => new $e({
|
|
2535
2535
|
values: t,
|
|
2536
2536
|
typeName: y.ZodNativeEnum,
|
|
2537
2537
|
..._(e)
|
|
@@ -2560,7 +2560,7 @@ var us = mr((ps, pt) => {
|
|
|
2560
2560
|
typeName: y.ZodPromise,
|
|
2561
2561
|
..._(e)
|
|
2562
2562
|
});
|
|
2563
|
-
class
|
|
2563
|
+
class M extends w {
|
|
2564
2564
|
innerType() {
|
|
2565
2565
|
return this._def.schema;
|
|
2566
2566
|
}
|
|
@@ -2637,19 +2637,19 @@ var us = mr((ps, pt) => {
|
|
|
2637
2637
|
k.assertNever(s);
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
|
-
|
|
2640
|
+
M.create = (t, e, r) => new M({
|
|
2641
2641
|
schema: t,
|
|
2642
2642
|
typeName: y.ZodEffects,
|
|
2643
2643
|
effect: e,
|
|
2644
2644
|
..._(r)
|
|
2645
2645
|
});
|
|
2646
|
-
|
|
2646
|
+
M.createWithPreprocess = (t, e, r) => new M({
|
|
2647
2647
|
schema: e,
|
|
2648
2648
|
effect: { type: "preprocess", transform: t },
|
|
2649
2649
|
typeName: y.ZodEffects,
|
|
2650
2650
|
..._(r)
|
|
2651
2651
|
});
|
|
2652
|
-
class
|
|
2652
|
+
class D extends w {
|
|
2653
2653
|
_parse(e) {
|
|
2654
2654
|
return this._getType(e) === p.undefined ? C(void 0) : this._def.innerType._parse(e);
|
|
2655
2655
|
}
|
|
@@ -2657,7 +2657,7 @@ var us = mr((ps, pt) => {
|
|
|
2657
2657
|
return this._def.innerType;
|
|
2658
2658
|
}
|
|
2659
2659
|
}
|
|
2660
|
-
|
|
2660
|
+
D.create = (t, e) => new D({
|
|
2661
2661
|
innerType: t,
|
|
2662
2662
|
typeName: y.ZodOptional,
|
|
2663
2663
|
..._(e)
|
|
@@ -2695,7 +2695,7 @@ var us = mr((ps, pt) => {
|
|
|
2695
2695
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2696
2696
|
..._(e)
|
|
2697
2697
|
});
|
|
2698
|
-
class
|
|
2698
|
+
class Fe extends w {
|
|
2699
2699
|
_parse(e) {
|
|
2700
2700
|
const { ctx: r } = this._processInputParams(e), n = {
|
|
2701
2701
|
...r,
|
|
@@ -2710,7 +2710,7 @@ var us = mr((ps, pt) => {
|
|
|
2710
2710
|
...n
|
|
2711
2711
|
}
|
|
2712
2712
|
});
|
|
2713
|
-
return
|
|
2713
|
+
return Oe(s) ? s.then((a) => ({
|
|
2714
2714
|
status: "valid",
|
|
2715
2715
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2716
2716
|
get error() {
|
|
@@ -2732,13 +2732,13 @@ var us = mr((ps, pt) => {
|
|
|
2732
2732
|
return this._def.innerType;
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
2735
|
-
|
|
2735
|
+
Fe.create = (t, e) => new Fe({
|
|
2736
2736
|
innerType: t,
|
|
2737
2737
|
typeName: y.ZodCatch,
|
|
2738
2738
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2739
2739
|
..._(e)
|
|
2740
2740
|
});
|
|
2741
|
-
class
|
|
2741
|
+
class Xe extends w {
|
|
2742
2742
|
_parse(e) {
|
|
2743
2743
|
if (this._getType(e) !== p.nan) {
|
|
2744
2744
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2751,12 +2751,12 @@ var us = mr((ps, pt) => {
|
|
|
2751
2751
|
return { status: "valid", value: e.data };
|
|
2752
2752
|
}
|
|
2753
2753
|
}
|
|
2754
|
-
|
|
2754
|
+
Xe.create = (t) => new Xe({
|
|
2755
2755
|
typeName: y.ZodNaN,
|
|
2756
2756
|
..._(t)
|
|
2757
2757
|
});
|
|
2758
|
-
const
|
|
2759
|
-
class
|
|
2758
|
+
const qr = Symbol("zod_brand");
|
|
2759
|
+
class gt extends w {
|
|
2760
2760
|
_parse(e) {
|
|
2761
2761
|
const { ctx: r } = this._processInputParams(e), n = r.data;
|
|
2762
2762
|
return this._def.type._parse({
|
|
@@ -2809,25 +2809,25 @@ var us = mr((ps, pt) => {
|
|
|
2809
2809
|
});
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
|
-
class
|
|
2812
|
+
class De extends w {
|
|
2813
2813
|
_parse(e) {
|
|
2814
2814
|
const r = this._def.innerType._parse(e), n = (s) => (ie(s) && (s.value = Object.freeze(s.value)), s);
|
|
2815
|
-
return
|
|
2815
|
+
return Oe(r) ? r.then((s) => n(s)) : n(r);
|
|
2816
2816
|
}
|
|
2817
2817
|
unwrap() {
|
|
2818
2818
|
return this._def.innerType;
|
|
2819
2819
|
}
|
|
2820
2820
|
}
|
|
2821
|
-
|
|
2821
|
+
De.create = (t, e) => new De({
|
|
2822
2822
|
innerType: t,
|
|
2823
2823
|
typeName: y.ZodReadonly,
|
|
2824
2824
|
..._(e)
|
|
2825
2825
|
});
|
|
2826
|
-
function
|
|
2826
|
+
function St(t, e) {
|
|
2827
2827
|
const r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
2828
2828
|
return typeof r == "string" ? { message: r } : r;
|
|
2829
2829
|
}
|
|
2830
|
-
function
|
|
2830
|
+
function $t(t, e = {}, r) {
|
|
2831
2831
|
return t ? ve.create().superRefine((n, s) => {
|
|
2832
2832
|
var a, i;
|
|
2833
2833
|
const o = t(n);
|
|
@@ -2835,163 +2835,163 @@ var us = mr((ps, pt) => {
|
|
|
2835
2835
|
return o.then((d) => {
|
|
2836
2836
|
var c, l;
|
|
2837
2837
|
if (!d) {
|
|
2838
|
-
const b =
|
|
2838
|
+
const b = St(e, n), S = (l = (c = b.fatal) !== null && c !== void 0 ? c : r) !== null && l !== void 0 ? l : !0;
|
|
2839
2839
|
s.addIssue({ code: "custom", ...b, fatal: S });
|
|
2840
2840
|
}
|
|
2841
2841
|
});
|
|
2842
2842
|
if (!o) {
|
|
2843
|
-
const d =
|
|
2843
|
+
const d = St(e, n), c = (i = (a = d.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
|
|
2844
2844
|
s.addIssue({ code: "custom", ...d, fatal: c });
|
|
2845
2845
|
}
|
|
2846
2846
|
}) : ve.create();
|
|
2847
2847
|
}
|
|
2848
|
-
const
|
|
2848
|
+
const Br = {
|
|
2849
2849
|
object: O.lazycreate
|
|
2850
2850
|
};
|
|
2851
2851
|
var y;
|
|
2852
2852
|
(function(t) {
|
|
2853
2853
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
2854
2854
|
})(y || (y = {}));
|
|
2855
|
-
const
|
|
2855
|
+
const Hr = (t, e = {
|
|
2856
2856
|
message: `Input not instance of ${t.name}`
|
|
2857
|
-
}) =>
|
|
2857
|
+
}) => $t((r) => r instanceof t, e), Mt = Z.create, Ft = J.create, Wr = Xe.create, Jr = Y.create, Dt = Ne.create, Yr = oe.create, Gr = Ye.create, Kr = Re.create, Xr = Ae.create, Qr = ve.create, en = ae.create, tn = H.create, rn = Ge.create, nn = $.create, sn = O.create, an = O.strictCreate, on = Ce.create, dn = rt.create, cn = Ie.create, un = V.create, ln = Pe.create, fn = Ke.create, pn = de.create, hn = ye.create, mn = je.create, yn = Ze.create, gn = G.create, vn = $e.create, _n = _e.create, Tt = M.create, wn = D.create, bn = K.create, kn = M.createWithPreprocess, xn = Le.create, Sn = () => Mt().optional(), Tn = () => Ft().optional(), En = () => Dt().optional(), On = {
|
|
2858
2858
|
string: (t) => Z.create({ ...t, coerce: !0 }),
|
|
2859
2859
|
number: (t) => J.create({ ...t, coerce: !0 }),
|
|
2860
|
-
boolean: (t) =>
|
|
2860
|
+
boolean: (t) => Ne.create({
|
|
2861
2861
|
...t,
|
|
2862
2862
|
coerce: !0
|
|
2863
2863
|
}),
|
|
2864
2864
|
bigint: (t) => Y.create({ ...t, coerce: !0 }),
|
|
2865
2865
|
date: (t) => oe.create({ ...t, coerce: !0 })
|
|
2866
|
-
},
|
|
2866
|
+
}, Nn = g;
|
|
2867
2867
|
var m = /* @__PURE__ */ Object.freeze({
|
|
2868
2868
|
__proto__: null,
|
|
2869
2869
|
defaultErrorMap: ge,
|
|
2870
|
-
setErrorMap:
|
|
2871
|
-
getErrorMap:
|
|
2872
|
-
makeIssue:
|
|
2873
|
-
EMPTY_PATH:
|
|
2870
|
+
setErrorMap: br,
|
|
2871
|
+
getErrorMap: He,
|
|
2872
|
+
makeIssue: We,
|
|
2873
|
+
EMPTY_PATH: kr,
|
|
2874
2874
|
addIssueToContext: f,
|
|
2875
2875
|
ParseStatus: A,
|
|
2876
2876
|
INVALID: g,
|
|
2877
2877
|
DIRTY: me,
|
|
2878
2878
|
OK: C,
|
|
2879
|
-
isAborted:
|
|
2880
|
-
isDirty:
|
|
2879
|
+
isAborted: dt,
|
|
2880
|
+
isDirty: ct,
|
|
2881
2881
|
isValid: ie,
|
|
2882
|
-
isAsync:
|
|
2882
|
+
isAsync: Oe,
|
|
2883
2883
|
get util() {
|
|
2884
2884
|
return k;
|
|
2885
2885
|
},
|
|
2886
2886
|
get objectUtil() {
|
|
2887
|
-
return
|
|
2887
|
+
return ot;
|
|
2888
2888
|
},
|
|
2889
2889
|
ZodParsedType: p,
|
|
2890
2890
|
getParsedType: B,
|
|
2891
2891
|
ZodType: w,
|
|
2892
|
-
datetimeRegex:
|
|
2892
|
+
datetimeRegex: jt,
|
|
2893
2893
|
ZodString: Z,
|
|
2894
2894
|
ZodNumber: J,
|
|
2895
2895
|
ZodBigInt: Y,
|
|
2896
|
-
ZodBoolean:
|
|
2896
|
+
ZodBoolean: Ne,
|
|
2897
2897
|
ZodDate: oe,
|
|
2898
|
-
ZodSymbol:
|
|
2899
|
-
ZodUndefined:
|
|
2900
|
-
ZodNull:
|
|
2898
|
+
ZodSymbol: Ye,
|
|
2899
|
+
ZodUndefined: Re,
|
|
2900
|
+
ZodNull: Ae,
|
|
2901
2901
|
ZodAny: ve,
|
|
2902
2902
|
ZodUnknown: ae,
|
|
2903
2903
|
ZodNever: H,
|
|
2904
|
-
ZodVoid:
|
|
2905
|
-
ZodArray:
|
|
2904
|
+
ZodVoid: Ge,
|
|
2905
|
+
ZodArray: $,
|
|
2906
2906
|
ZodObject: O,
|
|
2907
|
-
ZodUnion:
|
|
2908
|
-
ZodDiscriminatedUnion:
|
|
2909
|
-
ZodIntersection:
|
|
2907
|
+
ZodUnion: Ce,
|
|
2908
|
+
ZodDiscriminatedUnion: rt,
|
|
2909
|
+
ZodIntersection: Ie,
|
|
2910
2910
|
ZodTuple: V,
|
|
2911
|
-
ZodRecord:
|
|
2912
|
-
ZodMap:
|
|
2911
|
+
ZodRecord: Pe,
|
|
2912
|
+
ZodMap: Ke,
|
|
2913
2913
|
ZodSet: de,
|
|
2914
2914
|
ZodFunction: ye,
|
|
2915
|
-
ZodLazy:
|
|
2916
|
-
ZodLiteral:
|
|
2915
|
+
ZodLazy: je,
|
|
2916
|
+
ZodLiteral: Ze,
|
|
2917
2917
|
ZodEnum: G,
|
|
2918
|
-
ZodNativeEnum:
|
|
2918
|
+
ZodNativeEnum: $e,
|
|
2919
2919
|
ZodPromise: _e,
|
|
2920
|
-
ZodEffects:
|
|
2921
|
-
ZodTransformer:
|
|
2922
|
-
ZodOptional:
|
|
2920
|
+
ZodEffects: M,
|
|
2921
|
+
ZodTransformer: M,
|
|
2922
|
+
ZodOptional: D,
|
|
2923
2923
|
ZodNullable: K,
|
|
2924
2924
|
ZodDefault: Me,
|
|
2925
|
-
ZodCatch:
|
|
2926
|
-
ZodNaN:
|
|
2927
|
-
BRAND:
|
|
2928
|
-
ZodBranded:
|
|
2925
|
+
ZodCatch: Fe,
|
|
2926
|
+
ZodNaN: Xe,
|
|
2927
|
+
BRAND: qr,
|
|
2928
|
+
ZodBranded: gt,
|
|
2929
2929
|
ZodPipeline: Le,
|
|
2930
|
-
ZodReadonly:
|
|
2931
|
-
custom:
|
|
2930
|
+
ZodReadonly: De,
|
|
2931
|
+
custom: $t,
|
|
2932
2932
|
Schema: w,
|
|
2933
2933
|
ZodSchema: w,
|
|
2934
|
-
late:
|
|
2934
|
+
late: Br,
|
|
2935
2935
|
get ZodFirstPartyTypeKind() {
|
|
2936
2936
|
return y;
|
|
2937
2937
|
},
|
|
2938
|
-
coerce:
|
|
2939
|
-
any:
|
|
2940
|
-
array:
|
|
2941
|
-
bigint:
|
|
2942
|
-
boolean:
|
|
2943
|
-
date:
|
|
2944
|
-
discriminatedUnion:
|
|
2945
|
-
effect:
|
|
2946
|
-
enum:
|
|
2947
|
-
function:
|
|
2948
|
-
instanceof:
|
|
2949
|
-
intersection:
|
|
2950
|
-
lazy:
|
|
2951
|
-
literal:
|
|
2952
|
-
map:
|
|
2953
|
-
nan:
|
|
2954
|
-
nativeEnum:
|
|
2955
|
-
never:
|
|
2956
|
-
null:
|
|
2957
|
-
nullable:
|
|
2958
|
-
number:
|
|
2959
|
-
object:
|
|
2960
|
-
oboolean:
|
|
2961
|
-
onumber:
|
|
2962
|
-
optional:
|
|
2963
|
-
ostring:
|
|
2964
|
-
pipeline:
|
|
2965
|
-
preprocess:
|
|
2966
|
-
promise:
|
|
2967
|
-
record:
|
|
2968
|
-
set:
|
|
2969
|
-
strictObject:
|
|
2970
|
-
string:
|
|
2971
|
-
symbol:
|
|
2972
|
-
transformer:
|
|
2973
|
-
tuple:
|
|
2974
|
-
undefined:
|
|
2975
|
-
union:
|
|
2976
|
-
unknown:
|
|
2977
|
-
void:
|
|
2978
|
-
NEVER:
|
|
2938
|
+
coerce: On,
|
|
2939
|
+
any: Qr,
|
|
2940
|
+
array: nn,
|
|
2941
|
+
bigint: Jr,
|
|
2942
|
+
boolean: Dt,
|
|
2943
|
+
date: Yr,
|
|
2944
|
+
discriminatedUnion: dn,
|
|
2945
|
+
effect: Tt,
|
|
2946
|
+
enum: gn,
|
|
2947
|
+
function: hn,
|
|
2948
|
+
instanceof: Hr,
|
|
2949
|
+
intersection: cn,
|
|
2950
|
+
lazy: mn,
|
|
2951
|
+
literal: yn,
|
|
2952
|
+
map: fn,
|
|
2953
|
+
nan: Wr,
|
|
2954
|
+
nativeEnum: vn,
|
|
2955
|
+
never: tn,
|
|
2956
|
+
null: Xr,
|
|
2957
|
+
nullable: bn,
|
|
2958
|
+
number: Ft,
|
|
2959
|
+
object: sn,
|
|
2960
|
+
oboolean: En,
|
|
2961
|
+
onumber: Tn,
|
|
2962
|
+
optional: wn,
|
|
2963
|
+
ostring: Sn,
|
|
2964
|
+
pipeline: xn,
|
|
2965
|
+
preprocess: kn,
|
|
2966
|
+
promise: _n,
|
|
2967
|
+
record: ln,
|
|
2968
|
+
set: pn,
|
|
2969
|
+
strictObject: an,
|
|
2970
|
+
string: Mt,
|
|
2971
|
+
symbol: Gr,
|
|
2972
|
+
transformer: Tt,
|
|
2973
|
+
tuple: un,
|
|
2974
|
+
undefined: Kr,
|
|
2975
|
+
union: on,
|
|
2976
|
+
unknown: en,
|
|
2977
|
+
void: rn,
|
|
2978
|
+
NEVER: Nn,
|
|
2979
2979
|
ZodIssueCode: u,
|
|
2980
|
-
quotelessJson:
|
|
2980
|
+
quotelessJson: wr,
|
|
2981
2981
|
ZodError: P
|
|
2982
2982
|
});
|
|
2983
|
-
const
|
|
2983
|
+
const lt = m.object({
|
|
2984
2984
|
detail: m.string()
|
|
2985
2985
|
});
|
|
2986
|
-
function
|
|
2986
|
+
function Lt(t) {
|
|
2987
2987
|
if (!t)
|
|
2988
2988
|
return "Unknown error";
|
|
2989
2989
|
if (t instanceof Error) {
|
|
2990
|
-
const e =
|
|
2991
|
-
return e.success ? e.data.detail :
|
|
2990
|
+
const e = lt.safeParse(t.cause);
|
|
2991
|
+
return e.success ? e.data.detail : Rn(t.message);
|
|
2992
2992
|
}
|
|
2993
2993
|
if (typeof t == "object") {
|
|
2994
|
-
const e =
|
|
2994
|
+
const e = lt.safeParse(t);
|
|
2995
2995
|
if (e.success)
|
|
2996
2996
|
return e.data.detail;
|
|
2997
2997
|
}
|
|
@@ -3001,26 +3001,26 @@ var us = mr((ps, pt) => {
|
|
|
3001
3001
|
return String(t);
|
|
3002
3002
|
}
|
|
3003
3003
|
}
|
|
3004
|
-
function
|
|
3005
|
-
const e =
|
|
3004
|
+
function Rn(t) {
|
|
3005
|
+
const e = An(t);
|
|
3006
3006
|
if (!e)
|
|
3007
3007
|
return t;
|
|
3008
|
-
const r =
|
|
3008
|
+
const r = lt.safeParse(e);
|
|
3009
3009
|
return r.success ? r.data.detail : t;
|
|
3010
3010
|
}
|
|
3011
|
-
function
|
|
3011
|
+
function An(t) {
|
|
3012
3012
|
try {
|
|
3013
3013
|
return JSON.parse(t);
|
|
3014
3014
|
} catch {
|
|
3015
3015
|
return t;
|
|
3016
3016
|
}
|
|
3017
3017
|
}
|
|
3018
|
-
const
|
|
3019
|
-
function
|
|
3018
|
+
const Cn = 1e10, In = 1e3;
|
|
3019
|
+
function ze(t, e) {
|
|
3020
3020
|
const r = t.map((n) => `"${n}"`).join(", ");
|
|
3021
3021
|
return new Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`);
|
|
3022
3022
|
}
|
|
3023
|
-
function
|
|
3023
|
+
function Pn(t = {}) {
|
|
3024
3024
|
let e = {};
|
|
3025
3025
|
function r(v) {
|
|
3026
3026
|
e = v;
|
|
@@ -3028,7 +3028,7 @@ var us = mr((ps, pt) => {
|
|
|
3028
3028
|
let n = {};
|
|
3029
3029
|
function s(v) {
|
|
3030
3030
|
var T;
|
|
3031
|
-
n.unregisterHandler && n.unregisterHandler(), n = v, (T = n.registerHandler) == null || T.call(n,
|
|
3031
|
+
n.unregisterHandler && n.unregisterHandler(), n = v, (T = n.registerHandler) == null || T.call(n, gr);
|
|
3032
3032
|
}
|
|
3033
3033
|
let a;
|
|
3034
3034
|
function i(v) {
|
|
@@ -3046,11 +3046,11 @@ var us = mr((ps, pt) => {
|
|
|
3046
3046
|
return R(T, N);
|
|
3047
3047
|
};
|
|
3048
3048
|
}
|
|
3049
|
-
const { maxRequestTime: o =
|
|
3049
|
+
const { maxRequestTime: o = In } = t;
|
|
3050
3050
|
t.transport && s(t.transport), t.requestHandler && i(t.requestHandler), t._debugHooks && r(t._debugHooks);
|
|
3051
3051
|
let d = 0;
|
|
3052
3052
|
function c() {
|
|
3053
|
-
return d <=
|
|
3053
|
+
return d <= Cn ? ++d : d = 0;
|
|
3054
3054
|
}
|
|
3055
3055
|
const l = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
|
|
3056
3056
|
function S(v, ...T) {
|
|
@@ -3058,7 +3058,7 @@ var us = mr((ps, pt) => {
|
|
|
3058
3058
|
return new Promise((E, R) => {
|
|
3059
3059
|
var ce;
|
|
3060
3060
|
if (!n.send)
|
|
3061
|
-
throw
|
|
3061
|
+
throw ze(["send"], "make requests");
|
|
3062
3062
|
const F = c(), ee = {
|
|
3063
3063
|
type: "request",
|
|
3064
3064
|
id: F,
|
|
@@ -3073,11 +3073,11 @@ var us = mr((ps, pt) => {
|
|
|
3073
3073
|
const I = new Proxy(S, {
|
|
3074
3074
|
get: (v, T, N) => T in v ? Reflect.get(v, T, N) : (E) => S(T, E)
|
|
3075
3075
|
}), U = I;
|
|
3076
|
-
function
|
|
3076
|
+
function Ve(v, ...T) {
|
|
3077
3077
|
var R;
|
|
3078
3078
|
const N = T[0];
|
|
3079
3079
|
if (!n.send)
|
|
3080
|
-
throw
|
|
3080
|
+
throw ze(["send"], "send messages");
|
|
3081
3081
|
const E = {
|
|
3082
3082
|
type: "message",
|
|
3083
3083
|
id: v,
|
|
@@ -3085,34 +3085,34 @@ var us = mr((ps, pt) => {
|
|
|
3085
3085
|
};
|
|
3086
3086
|
(R = e.onSend) == null || R.call(e, E), n.send(E);
|
|
3087
3087
|
}
|
|
3088
|
-
const
|
|
3089
|
-
get: (v, T, N) => T in v ? Reflect.get(v, T, N) : (E) =>
|
|
3090
|
-
}),
|
|
3091
|
-
function
|
|
3088
|
+
const bt = new Proxy(Ve, {
|
|
3089
|
+
get: (v, T, N) => T in v ? Reflect.get(v, T, N) : (E) => Ve(T, E)
|
|
3090
|
+
}), kt = bt, Q = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Set();
|
|
3091
|
+
function mr(v, T) {
|
|
3092
3092
|
var N;
|
|
3093
3093
|
if (!n.registerHandler)
|
|
3094
|
-
throw
|
|
3094
|
+
throw ze(["registerHandler"], "register message listeners");
|
|
3095
3095
|
if (v === "*") {
|
|
3096
|
-
|
|
3096
|
+
st.add(T);
|
|
3097
3097
|
return;
|
|
3098
3098
|
}
|
|
3099
3099
|
Q.has(v) || Q.set(v, /* @__PURE__ */ new Set()), (N = Q.get(v)) == null || N.add(T);
|
|
3100
3100
|
}
|
|
3101
|
-
function
|
|
3101
|
+
function yr(v, T) {
|
|
3102
3102
|
var N, E;
|
|
3103
3103
|
if (v === "*") {
|
|
3104
|
-
|
|
3104
|
+
st.delete(T);
|
|
3105
3105
|
return;
|
|
3106
3106
|
}
|
|
3107
3107
|
(N = Q.get(v)) == null || N.delete(T), ((E = Q.get(v)) == null ? void 0 : E.size) === 0 && Q.delete(v);
|
|
3108
3108
|
}
|
|
3109
|
-
async function
|
|
3109
|
+
async function gr(v) {
|
|
3110
3110
|
var T, N;
|
|
3111
3111
|
if ((T = e.onReceive) == null || T.call(e, v), !("type" in v))
|
|
3112
3112
|
throw new Error("Message does not contain a type.");
|
|
3113
3113
|
if (v.type === "request") {
|
|
3114
3114
|
if (!n.send || !a)
|
|
3115
|
-
throw
|
|
3115
|
+
throw ze(["send", "requestHandler"], "handle requests");
|
|
3116
3116
|
const { id: E, method: R, params: F } = v;
|
|
3117
3117
|
let ee;
|
|
3118
3118
|
try {
|
|
@@ -3143,7 +3143,7 @@ var us = mr((ps, pt) => {
|
|
|
3143
3143
|
return;
|
|
3144
3144
|
}
|
|
3145
3145
|
if (v.type === "message") {
|
|
3146
|
-
for (const R of
|
|
3146
|
+
for (const R of st)
|
|
3147
3147
|
R(v.id, v.payload);
|
|
3148
3148
|
const E = Q.get(v.id);
|
|
3149
3149
|
if (!E)
|
|
@@ -3159,44 +3159,44 @@ var us = mr((ps, pt) => {
|
|
|
3159
3159
|
setRequestHandler: i,
|
|
3160
3160
|
request: I,
|
|
3161
3161
|
requestProxy: U,
|
|
3162
|
-
send:
|
|
3163
|
-
sendProxy:
|
|
3164
|
-
addMessageListener:
|
|
3165
|
-
removeMessageListener:
|
|
3166
|
-
proxy: { send:
|
|
3162
|
+
send: bt,
|
|
3163
|
+
sendProxy: kt,
|
|
3164
|
+
addMessageListener: mr,
|
|
3165
|
+
removeMessageListener: yr,
|
|
3166
|
+
proxy: { send: kt, request: U },
|
|
3167
3167
|
_setDebugHooks: r
|
|
3168
3168
|
};
|
|
3169
3169
|
}
|
|
3170
|
-
function
|
|
3171
|
-
return
|
|
3170
|
+
function jn(t) {
|
|
3171
|
+
return Pn(t);
|
|
3172
3172
|
}
|
|
3173
|
-
const
|
|
3174
|
-
function
|
|
3173
|
+
const Vt = "[transport-id]";
|
|
3174
|
+
function Zn(t, e) {
|
|
3175
3175
|
const { transportId: r } = e;
|
|
3176
|
-
return r != null ? { [
|
|
3176
|
+
return r != null ? { [Vt]: r, data: t } : t;
|
|
3177
3177
|
}
|
|
3178
|
-
function
|
|
3178
|
+
function $n(t, e) {
|
|
3179
3179
|
const { transportId: r, filter: n } = e, s = n == null ? void 0 : n();
|
|
3180
3180
|
if (r != null && s != null)
|
|
3181
3181
|
throw new Error("Cannot use both `transportId` and `filter` at the same time");
|
|
3182
3182
|
let a = t;
|
|
3183
3183
|
if (r) {
|
|
3184
|
-
if (t[
|
|
3184
|
+
if (t[Vt] !== r)
|
|
3185
3185
|
return [!0];
|
|
3186
3186
|
a = t.data;
|
|
3187
3187
|
}
|
|
3188
3188
|
return s === !1 ? [!0] : [!1, a];
|
|
3189
3189
|
}
|
|
3190
|
-
function
|
|
3190
|
+
function Mn(t, e = {}) {
|
|
3191
3191
|
const { transportId: r, filter: n, remotePort: s } = e, a = t, i = s ?? t;
|
|
3192
3192
|
let o;
|
|
3193
3193
|
return {
|
|
3194
3194
|
send(d) {
|
|
3195
|
-
i.postMessage(
|
|
3195
|
+
i.postMessage(Zn(d, { transportId: r }));
|
|
3196
3196
|
},
|
|
3197
3197
|
registerHandler(d) {
|
|
3198
3198
|
o = (c) => {
|
|
3199
|
-
const l = c.data, [b, S] =
|
|
3199
|
+
const l = c.data, [b, S] = $n(l, {
|
|
3200
3200
|
transportId: r,
|
|
3201
3201
|
filter: () => n == null ? void 0 : n(c)
|
|
3202
3202
|
});
|
|
@@ -3208,15 +3208,15 @@ var us = mr((ps, pt) => {
|
|
|
3208
3208
|
}
|
|
3209
3209
|
};
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3212
|
-
return
|
|
3211
|
+
function Fn(t) {
|
|
3212
|
+
return Mn(self, t);
|
|
3213
3213
|
}
|
|
3214
|
-
function
|
|
3214
|
+
function zt(t, e) {
|
|
3215
3215
|
if (!t)
|
|
3216
3216
|
throw new Error(e);
|
|
3217
3217
|
}
|
|
3218
|
-
const
|
|
3219
|
-
class
|
|
3218
|
+
const Dn = "marimo-transport";
|
|
3219
|
+
class Ln {
|
|
3220
3220
|
constructor(e) {
|
|
3221
3221
|
this.onMessage = e, this.started = !1, this.push = (r) => {
|
|
3222
3222
|
this.started ? this.onMessage(r) : this.buffer.push(r);
|
|
@@ -3225,7 +3225,21 @@ var us = mr((ps, pt) => {
|
|
|
3225
3225
|
}, this.buffer = [];
|
|
3226
3226
|
}
|
|
3227
3227
|
}
|
|
3228
|
-
const
|
|
3228
|
+
const be = {
|
|
3229
|
+
NOOP: () => {
|
|
3230
|
+
}
|
|
3231
|
+
}, Ut = (t, e) => {
|
|
3232
|
+
const r = `[${t}]`;
|
|
3233
|
+
return {
|
|
3234
|
+
debug: (...n) => e.debug(r, ...n),
|
|
3235
|
+
log: (...n) => e.log(r, ...n),
|
|
3236
|
+
warn: (...n) => e.warn(r, ...n),
|
|
3237
|
+
error: (...n) => e.error(r, ...n),
|
|
3238
|
+
trace: (...n) => e.trace(r, ...n),
|
|
3239
|
+
get: (n) => Ut(`${t}.${n}`, e),
|
|
3240
|
+
disabled: (n = !0) => n ? et : e
|
|
3241
|
+
};
|
|
3242
|
+
}, Qe = {
|
|
3229
3243
|
debug: (...t) => {
|
|
3230
3244
|
console.debug(...t);
|
|
3231
3245
|
},
|
|
@@ -3240,30 +3254,40 @@ var us = mr((ps, pt) => {
|
|
|
3240
3254
|
},
|
|
3241
3255
|
trace: (...t) => {
|
|
3242
3256
|
console.trace(...t);
|
|
3243
|
-
}
|
|
3257
|
+
},
|
|
3258
|
+
get: (t) => Ut(t, Qe),
|
|
3259
|
+
disabled: (t = !0) => t ? et : Qe
|
|
3260
|
+
}, et = {
|
|
3261
|
+
debug: () => be.NOOP,
|
|
3262
|
+
log: () => be.NOOP,
|
|
3263
|
+
warn: () => be.NOOP,
|
|
3264
|
+
error: () => be.NOOP,
|
|
3265
|
+
trace: () => be.NOOP,
|
|
3266
|
+
get: () => et,
|
|
3267
|
+
disabled: () => et
|
|
3244
3268
|
};
|
|
3245
|
-
function
|
|
3246
|
-
return typeof window < "u" && window.Logger ||
|
|
3269
|
+
function Vn() {
|
|
3270
|
+
return typeof window < "u" && window.Logger || Qe;
|
|
3247
3271
|
}
|
|
3248
|
-
const W =
|
|
3272
|
+
const W = Vn(), zn = [
|
|
3249
3273
|
"pip",
|
|
3250
3274
|
"uv",
|
|
3251
3275
|
"rye",
|
|
3252
3276
|
"poetry",
|
|
3253
3277
|
"pixi"
|
|
3254
|
-
],
|
|
3278
|
+
], qt = [
|
|
3255
3279
|
"normal",
|
|
3256
3280
|
"compact",
|
|
3257
3281
|
"medium",
|
|
3258
3282
|
"full",
|
|
3259
3283
|
"columns"
|
|
3260
|
-
],
|
|
3284
|
+
], Un = [
|
|
3261
3285
|
"auto",
|
|
3262
3286
|
"native",
|
|
3263
3287
|
"polars",
|
|
3264
3288
|
"lazy-polars",
|
|
3265
3289
|
"pandas"
|
|
3266
|
-
],
|
|
3290
|
+
], qn = m.object({
|
|
3267
3291
|
completion: m.object({
|
|
3268
3292
|
activate_on_typing: m.boolean().default(!0),
|
|
3269
3293
|
copilot: m.union([m.boolean(), m.enum(["github", "codeium", "custom"])]).default(!1).transform((t) => t === !0 ? "github" : t),
|
|
@@ -3293,10 +3317,10 @@ var us = mr((ps, pt) => {
|
|
|
3293
3317
|
cell_output: m.enum(["above", "below"]).default("above"),
|
|
3294
3318
|
dataframes: m.enum(["rich", "plain"]).default("rich"),
|
|
3295
3319
|
default_table_page_size: m.number().default(10),
|
|
3296
|
-
default_width: m.enum(
|
|
3320
|
+
default_width: m.enum(qt).default("medium").transform((t) => t === "normal" ? "compact" : t)
|
|
3297
3321
|
}).passthrough().default({}),
|
|
3298
3322
|
package_management: m.object({
|
|
3299
|
-
manager: m.enum(
|
|
3323
|
+
manager: m.enum(zn).default("pip")
|
|
3300
3324
|
}).passthrough().default({ manager: "pip" }),
|
|
3301
3325
|
ai: m.object({
|
|
3302
3326
|
rules: m.string().default(""),
|
|
@@ -3331,39 +3355,39 @@ var us = mr((ps, pt) => {
|
|
|
3331
3355
|
rules: "",
|
|
3332
3356
|
open_ai: {}
|
|
3333
3357
|
}
|
|
3334
|
-
}),
|
|
3358
|
+
}), Bn = m.string(), Hn = m.enum(Un).default("auto");
|
|
3335
3359
|
m.object({
|
|
3336
|
-
width: m.enum(
|
|
3337
|
-
app_title:
|
|
3360
|
+
width: m.enum(qt).default("medium").transform((t) => t === "normal" ? "compact" : t),
|
|
3361
|
+
app_title: Bn.nullish(),
|
|
3338
3362
|
css_file: m.string().nullish(),
|
|
3339
3363
|
html_head_file: m.string().nullish(),
|
|
3340
3364
|
auto_download: m.array(m.enum(["html", "markdown", "ipynb"])).default([]),
|
|
3341
|
-
sql_output:
|
|
3365
|
+
sql_output: Hn
|
|
3342
3366
|
}).default({ width: "medium", auto_download: [] });
|
|
3343
|
-
function
|
|
3344
|
-
return
|
|
3367
|
+
function Wn() {
|
|
3368
|
+
return qn.parse({});
|
|
3345
3369
|
}
|
|
3346
|
-
var
|
|
3370
|
+
var Jn = Object.defineProperty, x = (t, e) => Jn(t, "name", { value: e, configurable: !0 }), Bt = ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) {
|
|
3347
3371
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
3348
3372
|
throw new Error('Dynamic require of "' + t + '" is not supported');
|
|
3349
3373
|
});
|
|
3350
|
-
function
|
|
3374
|
+
function Ht(t) {
|
|
3351
3375
|
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
3352
3376
|
}
|
|
3353
|
-
x(
|
|
3377
|
+
x(Ht, "_isNumber");
|
|
3354
3378
|
function X(t) {
|
|
3355
3379
|
return t.charAt(0).toUpperCase() + t.substring(1);
|
|
3356
3380
|
}
|
|
3357
3381
|
x(X, "_capitalize");
|
|
3358
|
-
function
|
|
3382
|
+
function nt(t) {
|
|
3359
3383
|
return function() {
|
|
3360
3384
|
return this[t];
|
|
3361
3385
|
};
|
|
3362
3386
|
}
|
|
3363
|
-
x(
|
|
3364
|
-
var le = ["isConstructor", "isEval", "isNative", "isToplevel"], fe = ["columnNumber", "lineNumber"], pe = ["fileName", "functionName", "source"],
|
|
3387
|
+
x(nt, "_getter");
|
|
3388
|
+
var le = ["isConstructor", "isEval", "isNative", "isToplevel"], fe = ["columnNumber", "lineNumber"], pe = ["fileName", "functionName", "source"], Yn = ["args"], Gn = ["evalOrigin"], Ue = le.concat(fe, pe, Yn, Gn);
|
|
3365
3389
|
function j(t) {
|
|
3366
|
-
if (t) for (var e = 0; e <
|
|
3390
|
+
if (t) for (var e = 0; e < Ue.length; e++) t[Ue[e]] !== void 0 && this["set" + X(Ue[e])](t[Ue[e]]);
|
|
3367
3391
|
}
|
|
3368
3392
|
x(j, "StackFrame");
|
|
3369
3393
|
j.prototype = { getArgs: function() {
|
|
@@ -3386,26 +3410,26 @@ var us = mr((ps, pt) => {
|
|
|
3386
3410
|
if (a.indexOf("@") === 0) var i = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), o = i[1], d = i[2], c = i[3];
|
|
3387
3411
|
return new j({ functionName: n, args: s || void 0, fileName: o, lineNumber: d || void 0, columnNumber: c || void 0 });
|
|
3388
3412
|
}, "StackFrame$$fromString");
|
|
3389
|
-
for (te = 0; te < le.length; te++) j.prototype["get" + X(le[te])] =
|
|
3413
|
+
for (te = 0; te < le.length; te++) j.prototype["get" + X(le[te])] = nt(le[te]), j.prototype["set" + X(le[te])] = /* @__PURE__ */ function(t) {
|
|
3390
3414
|
return function(e) {
|
|
3391
3415
|
this[t] = !!e;
|
|
3392
3416
|
};
|
|
3393
3417
|
}(le[te]);
|
|
3394
3418
|
var te;
|
|
3395
|
-
for (re = 0; re < fe.length; re++) j.prototype["get" + X(fe[re])] =
|
|
3419
|
+
for (re = 0; re < fe.length; re++) j.prototype["get" + X(fe[re])] = nt(fe[re]), j.prototype["set" + X(fe[re])] = /* @__PURE__ */ function(t) {
|
|
3396
3420
|
return function(e) {
|
|
3397
|
-
if (!
|
|
3421
|
+
if (!Ht(e)) throw new TypeError(t + " must be a Number");
|
|
3398
3422
|
this[t] = Number(e);
|
|
3399
3423
|
};
|
|
3400
3424
|
}(fe[re]);
|
|
3401
3425
|
var re;
|
|
3402
|
-
for (ne = 0; ne < pe.length; ne++) j.prototype["get" + X(pe[ne])] =
|
|
3426
|
+
for (ne = 0; ne < pe.length; ne++) j.prototype["get" + X(pe[ne])] = nt(pe[ne]), j.prototype["set" + X(pe[ne])] = /* @__PURE__ */ function(t) {
|
|
3403
3427
|
return function(e) {
|
|
3404
3428
|
this[t] = String(e);
|
|
3405
3429
|
};
|
|
3406
3430
|
}(pe[ne]);
|
|
3407
|
-
var ne,
|
|
3408
|
-
function
|
|
3431
|
+
var ne, it = j;
|
|
3432
|
+
function Wt() {
|
|
3409
3433
|
var t = /^\s*at .*(\S+:\d+|\(native\))/m, e = /^(eval@)?(\[native code])?$/;
|
|
3410
3434
|
return { parse: x(function(r) {
|
|
3411
3435
|
if (r.stack && r.stack.match(t)) return this.parseV8OrIE(r);
|
|
@@ -3425,7 +3449,7 @@ var us = mr((ps, pt) => {
|
|
|
3425
3449
|
var a = s.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), i = a.match(/ (\(.+\)$)/);
|
|
3426
3450
|
a = i ? a.replace(i[0], "") : a;
|
|
3427
3451
|
var o = this.extractLocation(i ? i[1] : a), d = i && a || void 0, c = ["eval", "<anonymous>"].indexOf(o[0]) > -1 ? void 0 : o[0];
|
|
3428
|
-
return new
|
|
3452
|
+
return new it({ functionName: d, fileName: c, lineNumber: o[1], columnNumber: o[2], source: s });
|
|
3429
3453
|
}, this);
|
|
3430
3454
|
}, "ErrorStackParser$$parseV8OrIE"), parseFFOrSafari: x(function(r) {
|
|
3431
3455
|
var n = r.stack.split(`
|
|
@@ -3433,58 +3457,58 @@ var us = mr((ps, pt) => {
|
|
|
3433
3457
|
return !s.match(e);
|
|
3434
3458
|
}, this);
|
|
3435
3459
|
return n.map(function(s) {
|
|
3436
|
-
if (s.indexOf(" > eval") > -1 && (s = s.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), s.indexOf("@") === -1 && s.indexOf(":") === -1) return new
|
|
3460
|
+
if (s.indexOf(" > eval") > -1 && (s = s.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), s.indexOf("@") === -1 && s.indexOf(":") === -1) return new it({ functionName: s });
|
|
3437
3461
|
var a = /((.*".+"[^@]*)?[^@]*)(?:@)/, i = s.match(a), o = i && i[1] ? i[1] : void 0, d = this.extractLocation(s.replace(a, ""));
|
|
3438
|
-
return new
|
|
3462
|
+
return new it({ functionName: o, fileName: d[0], lineNumber: d[1], columnNumber: d[2], source: s });
|
|
3439
3463
|
}, this);
|
|
3440
3464
|
}, "ErrorStackParser$$parseFFOrSafari") };
|
|
3441
3465
|
}
|
|
3442
|
-
x(
|
|
3443
|
-
var
|
|
3466
|
+
x(Wt, "ErrorStackParser");
|
|
3467
|
+
var Kn = new Wt(), Xn = Kn, z = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, Jt = z && typeof yt < "u" && typeof yt.exports < "u" && typeof Bt < "u" && typeof __dirname < "u", Qn = z && !Jt, es = typeof Deno < "u", Yt = !z && !es, ts = Yt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", rs = Yt && typeof importScripts == "function" && typeof self == "object";
|
|
3444
3468
|
typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Safari") > -1;
|
|
3445
|
-
var
|
|
3446
|
-
async function
|
|
3447
|
-
if (!z || (
|
|
3448
|
-
let t =
|
|
3469
|
+
var Gt, ft, Kt, Et, vt;
|
|
3470
|
+
async function _t() {
|
|
3471
|
+
if (!z || (Gt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Et = await import("./__vite-browser-external-CPvbk0mb.js"), vt = await import("./__vite-browser-external-CPvbk0mb.js"), Kt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, ft = await import("./__vite-browser-external-CPvbk0mb.js"), wt = ft.sep, typeof Bt < "u")) return;
|
|
3472
|
+
let t = Et, e = await import("./__vite-browser-external-CPvbk0mb.js"), r = await import("./__vite-browser-external-CPvbk0mb.js"), n = await import("./__vite-browser-external-CPvbk0mb.js"), s = { fs: t, crypto: e, ws: r, child_process: n };
|
|
3449
3473
|
globalThis.require = function(a) {
|
|
3450
3474
|
return s[a];
|
|
3451
3475
|
};
|
|
3452
3476
|
}
|
|
3453
|
-
x(
|
|
3454
|
-
function
|
|
3455
|
-
return
|
|
3477
|
+
x(_t, "initNodeModules");
|
|
3478
|
+
function Xt(t, e) {
|
|
3479
|
+
return ft.resolve(e || ".", t);
|
|
3456
3480
|
}
|
|
3457
|
-
x(
|
|
3458
|
-
function
|
|
3481
|
+
x(Xt, "node_resolvePath");
|
|
3482
|
+
function Qt(t, e) {
|
|
3459
3483
|
return e === void 0 && (e = location), new URL(t, e).toString();
|
|
3460
3484
|
}
|
|
3461
|
-
x(
|
|
3462
|
-
var
|
|
3463
|
-
z ?
|
|
3464
|
-
var
|
|
3465
|
-
z || (
|
|
3466
|
-
function
|
|
3467
|
-
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary:
|
|
3485
|
+
x(Qt, "browser_resolvePath");
|
|
3486
|
+
var pt;
|
|
3487
|
+
z ? pt = Xt : pt = Qt;
|
|
3488
|
+
var wt;
|
|
3489
|
+
z || (wt = "/");
|
|
3490
|
+
function er(t, e) {
|
|
3491
|
+
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: vt.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
|
|
3468
3492
|
}
|
|
3469
|
-
x(
|
|
3470
|
-
function
|
|
3493
|
+
x(er, "node_getBinaryResponse");
|
|
3494
|
+
function tr(t, e) {
|
|
3471
3495
|
let r = new URL(t, location);
|
|
3472
3496
|
return { response: fetch(r, e ? { integrity: e } : {}) };
|
|
3473
3497
|
}
|
|
3474
|
-
x(
|
|
3475
|
-
var
|
|
3476
|
-
z ?
|
|
3477
|
-
async function
|
|
3478
|
-
let { response: r, binary: n } =
|
|
3498
|
+
x(tr, "browser_getBinaryResponse");
|
|
3499
|
+
var tt;
|
|
3500
|
+
z ? tt = er : tt = tr;
|
|
3501
|
+
async function rr(t, e) {
|
|
3502
|
+
let { response: r, binary: n } = tt(t, e);
|
|
3479
3503
|
if (n) return n;
|
|
3480
3504
|
let s = await r;
|
|
3481
3505
|
if (!s.ok) throw new Error(`Failed to load '${t}': request failed.`);
|
|
3482
3506
|
return new Uint8Array(await s.arrayBuffer());
|
|
3483
3507
|
}
|
|
3484
|
-
x(
|
|
3485
|
-
var
|
|
3486
|
-
if (
|
|
3487
|
-
else if (
|
|
3508
|
+
x(rr, "loadBinaryFile");
|
|
3509
|
+
var qe;
|
|
3510
|
+
if (ts) qe = x(async (t) => await import(t), "loadScript");
|
|
3511
|
+
else if (rs) qe = x(async (t) => {
|
|
3488
3512
|
try {
|
|
3489
3513
|
globalThis.importScripts(t);
|
|
3490
3514
|
} catch (e) {
|
|
@@ -3492,39 +3516,39 @@ var us = mr((ps, pt) => {
|
|
|
3492
3516
|
else throw e;
|
|
3493
3517
|
}
|
|
3494
3518
|
}, "loadScript");
|
|
3495
|
-
else if (z)
|
|
3519
|
+
else if (z) qe = nr;
|
|
3496
3520
|
else throw new Error("Cannot determine runtime environment");
|
|
3497
|
-
async function
|
|
3498
|
-
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ?
|
|
3521
|
+
async function nr(t) {
|
|
3522
|
+
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Kt.runInThisContext(await (await fetch(t)).text()) : await import(Gt.pathToFileURL(t).href);
|
|
3499
3523
|
}
|
|
3500
|
-
x(
|
|
3501
|
-
async function
|
|
3524
|
+
x(nr, "nodeLoadScript");
|
|
3525
|
+
async function sr(t) {
|
|
3502
3526
|
if (z) {
|
|
3503
|
-
await
|
|
3504
|
-
let e = await
|
|
3527
|
+
await _t();
|
|
3528
|
+
let e = await vt.readFile(t, { encoding: "utf8" });
|
|
3505
3529
|
return JSON.parse(e);
|
|
3506
3530
|
} else return await (await fetch(t)).json();
|
|
3507
3531
|
}
|
|
3508
|
-
x(
|
|
3509
|
-
async function
|
|
3510
|
-
if (
|
|
3532
|
+
x(sr, "loadLockFile");
|
|
3533
|
+
async function ar() {
|
|
3534
|
+
if (Jt) return __dirname;
|
|
3511
3535
|
let t;
|
|
3512
3536
|
try {
|
|
3513
3537
|
throw new Error();
|
|
3514
3538
|
} catch (n) {
|
|
3515
3539
|
t = n;
|
|
3516
3540
|
}
|
|
3517
|
-
let e =
|
|
3518
|
-
if (z && !e.startsWith("file://") && (e = `file://${e}`),
|
|
3541
|
+
let e = Xn.parse(t)[0].fileName;
|
|
3542
|
+
if (z && !e.startsWith("file://") && (e = `file://${e}`), Qn) {
|
|
3519
3543
|
let n = await import("./__vite-browser-external-CPvbk0mb.js");
|
|
3520
3544
|
return (await import("./__vite-browser-external-CPvbk0mb.js")).fileURLToPath(n.dirname(e));
|
|
3521
3545
|
}
|
|
3522
|
-
let r = e.lastIndexOf(
|
|
3546
|
+
let r = e.lastIndexOf(wt);
|
|
3523
3547
|
if (r === -1) throw new Error("Could not extract indexURL path from pyodide module location");
|
|
3524
3548
|
return e.slice(0, r);
|
|
3525
3549
|
}
|
|
3526
|
-
x(
|
|
3527
|
-
function
|
|
3550
|
+
x(ar, "calculateDirname");
|
|
3551
|
+
function ir(t) {
|
|
3528
3552
|
let e = t.FS, r = t.FS.filesystems.MEMFS, n = t.PATH, s = { DIR_MODE: 16895, FILE_MODE: 33279, mount: function(a) {
|
|
3529
3553
|
if (!a.opts.fileSystemHandle) throw new Error("opts.fileSystemHandle is required");
|
|
3530
3554
|
return r.mount.apply(null, arguments);
|
|
@@ -3552,7 +3576,7 @@ var us = mr((ps, pt) => {
|
|
|
3552
3576
|
}
|
|
3553
3577
|
return { type: "local", entries: i };
|
|
3554
3578
|
}, getRemoteSet: async (a) => {
|
|
3555
|
-
let i = /* @__PURE__ */ Object.create(null), o = await
|
|
3579
|
+
let i = /* @__PURE__ */ Object.create(null), o = await ns(a.opts.fileSystemHandle);
|
|
3556
3580
|
for (let [d, c] of o) d !== "." && (i[n.join2(a.mountpoint, d)] = { timestamp: c.kind === "file" ? new Date((await c.getFile()).lastModified) : /* @__PURE__ */ new Date(), mode: c.kind === "file" ? s.FILE_MODE : s.DIR_MODE });
|
|
3557
3581
|
return { type: "remote", entries: i, handles: o };
|
|
3558
3582
|
}, loadLocalEntry: (a) => {
|
|
@@ -3599,8 +3623,8 @@ var us = mr((ps, pt) => {
|
|
|
3599
3623
|
for (let S of c) {
|
|
3600
3624
|
let I = n.normalize(S.replace(a.mountpoint, "/")).substring(1);
|
|
3601
3625
|
if (o.type === "local") {
|
|
3602
|
-
let U = b.get(I),
|
|
3603
|
-
s.storeLocalEntry(S,
|
|
3626
|
+
let U = b.get(I), Ve = await s.loadRemoteEntry(U);
|
|
3627
|
+
s.storeLocalEntry(S, Ve);
|
|
3604
3628
|
} else {
|
|
3605
3629
|
let U = s.loadLocalEntry(S);
|
|
3606
3630
|
await s.storeRemoteEntry(b, I, U);
|
|
@@ -3614,8 +3638,8 @@ var us = mr((ps, pt) => {
|
|
|
3614
3638
|
} };
|
|
3615
3639
|
t.FS.filesystems.NATIVEFS_ASYNC = s;
|
|
3616
3640
|
}
|
|
3617
|
-
x(
|
|
3618
|
-
var
|
|
3641
|
+
x(ir, "initializeNativeFS");
|
|
3642
|
+
var ns = x(async (t) => {
|
|
3619
3643
|
let e = [];
|
|
3620
3644
|
async function r(s) {
|
|
3621
3645
|
for await (let a of s.values()) e.push(a), a.kind === "directory" && await r(a);
|
|
@@ -3629,14 +3653,14 @@ var us = mr((ps, pt) => {
|
|
|
3629
3653
|
}
|
|
3630
3654
|
return n;
|
|
3631
3655
|
}, "getFsHandles");
|
|
3632
|
-
function
|
|
3633
|
-
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun:
|
|
3656
|
+
function or(t) {
|
|
3657
|
+
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: fr(t), quit(r, n) {
|
|
3634
3658
|
throw e.exited = { status: r, toThrow: n }, n;
|
|
3635
|
-
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm:
|
|
3659
|
+
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: pr(t.indexURL) };
|
|
3636
3660
|
return e;
|
|
3637
3661
|
}
|
|
3638
|
-
x(
|
|
3639
|
-
function
|
|
3662
|
+
x(or, "createSettings");
|
|
3663
|
+
function dr(t) {
|
|
3640
3664
|
return function(e) {
|
|
3641
3665
|
let r = "/";
|
|
3642
3666
|
try {
|
|
@@ -3647,14 +3671,14 @@ var us = mr((ps, pt) => {
|
|
|
3647
3671
|
e.FS.chdir(t);
|
|
3648
3672
|
};
|
|
3649
3673
|
}
|
|
3650
|
-
x(
|
|
3651
|
-
function
|
|
3674
|
+
x(dr, "createHomeDirectory");
|
|
3675
|
+
function cr(t) {
|
|
3652
3676
|
return function(e) {
|
|
3653
3677
|
Object.assign(e.ENV, t);
|
|
3654
3678
|
};
|
|
3655
3679
|
}
|
|
3656
|
-
x(
|
|
3657
|
-
function
|
|
3680
|
+
x(cr, "setEnvironment");
|
|
3681
|
+
function ur(t) {
|
|
3658
3682
|
return t ? [async (e) => {
|
|
3659
3683
|
e.addRunDependency("fsInitHook");
|
|
3660
3684
|
try {
|
|
@@ -3664,9 +3688,9 @@ var us = mr((ps, pt) => {
|
|
|
3664
3688
|
}
|
|
3665
3689
|
}] : [];
|
|
3666
3690
|
}
|
|
3667
|
-
x(
|
|
3668
|
-
function
|
|
3669
|
-
let e =
|
|
3691
|
+
x(ur, "callFsInitHook");
|
|
3692
|
+
function lr(t) {
|
|
3693
|
+
let e = rr(t);
|
|
3670
3694
|
return async (r) => {
|
|
3671
3695
|
let n = r._py_version_major(), s = r._py_version_minor();
|
|
3672
3696
|
r.FS.mkdirTree("/lib"), r.API.sitePackages = `/lib/python${n}.${s}/site-packages`, r.FS.mkdirTree(r.API.sitePackages), r.addRunDependency("install-stdlib");
|
|
@@ -3680,15 +3704,15 @@ var us = mr((ps, pt) => {
|
|
|
3680
3704
|
}
|
|
3681
3705
|
};
|
|
3682
3706
|
}
|
|
3683
|
-
x(
|
|
3684
|
-
function
|
|
3707
|
+
x(lr, "installStdlib");
|
|
3708
|
+
function fr(t) {
|
|
3685
3709
|
let e;
|
|
3686
|
-
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...
|
|
3710
|
+
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...ur(t.fsInit), lr(e), dr(t.env.HOME), cr(t.env), ir];
|
|
3687
3711
|
}
|
|
3688
|
-
x(
|
|
3689
|
-
function
|
|
3712
|
+
x(fr, "getFileSystemInitializationFuncs");
|
|
3713
|
+
function pr(t) {
|
|
3690
3714
|
if (typeof WasmOffsetConverter < "u") return;
|
|
3691
|
-
let { binary: e, response: r } =
|
|
3715
|
+
let { binary: e, response: r } = tt(t + "pyodide.asm.wasm");
|
|
3692
3716
|
return function(n, s) {
|
|
3693
3717
|
return async function() {
|
|
3694
3718
|
try {
|
|
@@ -3702,19 +3726,19 @@ var us = mr((ps, pt) => {
|
|
|
3702
3726
|
}(), {};
|
|
3703
3727
|
};
|
|
3704
3728
|
}
|
|
3705
|
-
x(
|
|
3706
|
-
var
|
|
3707
|
-
async function
|
|
3729
|
+
x(pr, "getInstantiateWasmFunc");
|
|
3730
|
+
var ht = "0.27.5";
|
|
3731
|
+
async function mt(t = {}) {
|
|
3708
3732
|
var e, r;
|
|
3709
|
-
await
|
|
3710
|
-
let n = t.indexURL || await
|
|
3711
|
-
n =
|
|
3733
|
+
await _t();
|
|
3734
|
+
let n = t.indexURL || await ar();
|
|
3735
|
+
n = pt(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
|
|
3712
3736
|
let s = { fullStdLib: !1, jsglobals: globalThis, stdin: globalThis.prompt ? globalThis.prompt : void 0, lockFileURL: n + "pyodide-lock.json", args: [], env: {}, packageCacheDir: n, packages: [], enableRunUntilComplete: !1, checkAPIVersion: !0, BUILD_ID: "bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4" }, a = Object.assign(s, t);
|
|
3713
3737
|
(e = a.env).HOME ?? (e.HOME = "/home/pyodide"), (r = a.env).PYTHONINSPECT ?? (r.PYTHONINSPECT = "1");
|
|
3714
|
-
let i =
|
|
3715
|
-
if (o.lockFilePromise =
|
|
3738
|
+
let i = or(a), o = i.API;
|
|
3739
|
+
if (o.lockFilePromise = sr(a.lockFileURL), typeof _createPyodideModule != "function") {
|
|
3716
3740
|
let S = `${a.indexURL}pyodide.asm.js`;
|
|
3717
|
-
await
|
|
3741
|
+
await qe(S);
|
|
3718
3742
|
}
|
|
3719
3743
|
let d;
|
|
3720
3744
|
if (t._loadSnapshot) {
|
|
@@ -3723,7 +3747,7 @@ var us = mr((ps, pt) => {
|
|
|
3723
3747
|
}
|
|
3724
3748
|
let c = await _createPyodideModule(i);
|
|
3725
3749
|
if (i.exited) throw i.exited.toThrow;
|
|
3726
|
-
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !==
|
|
3750
|
+
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== ht && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${ht}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
|
|
3727
3751
|
c.locateFile = (S) => {
|
|
3728
3752
|
throw new Error("Didn't expect to load any more file_packager files!");
|
|
3729
3753
|
};
|
|
@@ -3732,43 +3756,43 @@ var us = mr((ps, pt) => {
|
|
|
3732
3756
|
let b = o.finalizeBootstrap(l, t._snapshotDeserializer);
|
|
3733
3757
|
return o.sys.path.insert(0, o.config.env.HOME), b.version.includes("dev") || o.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${b.version}/full/`), o._pyodide.set_excepthook(), await o.packageIndexReady, o.initializeStreams(a.stdin, a.stdout, a.stderr), b;
|
|
3734
3758
|
}
|
|
3735
|
-
x(
|
|
3736
|
-
function
|
|
3759
|
+
x(mt, "loadPyodide");
|
|
3760
|
+
function Ee(t) {
|
|
3737
3761
|
return t.FS;
|
|
3738
3762
|
}
|
|
3739
|
-
const
|
|
3740
|
-
NOTEBOOK_FILENAME:
|
|
3741
|
-
HOME_DIR:
|
|
3763
|
+
const Ot = (t) => new TextDecoder().decode(t), ke = "notebook.py", xe = "/marimo", se = {
|
|
3764
|
+
NOTEBOOK_FILENAME: ke,
|
|
3765
|
+
HOME_DIR: xe,
|
|
3742
3766
|
createHomeDir: (t) => {
|
|
3743
|
-
const e =
|
|
3767
|
+
const e = Ee(t);
|
|
3744
3768
|
try {
|
|
3745
|
-
e.mkdirTree(
|
|
3769
|
+
e.mkdirTree(xe);
|
|
3746
3770
|
} catch {
|
|
3747
3771
|
}
|
|
3748
|
-
e.chdir(
|
|
3772
|
+
e.chdir(xe);
|
|
3749
3773
|
},
|
|
3750
3774
|
mountFS: (t) => {
|
|
3751
|
-
|
|
3775
|
+
Ee(t).mount(t.FS.filesystems.IDBFS, { root: "." }, xe);
|
|
3752
3776
|
},
|
|
3753
3777
|
populateFilesToMemory: async (t) => {
|
|
3754
|
-
await
|
|
3778
|
+
await Nt(t, !0);
|
|
3755
3779
|
},
|
|
3756
3780
|
persistFilesToRemote: async (t) => {
|
|
3757
|
-
await
|
|
3781
|
+
await Nt(t, !1);
|
|
3758
3782
|
},
|
|
3759
3783
|
readNotebook: (t) => {
|
|
3760
|
-
const e =
|
|
3761
|
-
return
|
|
3784
|
+
const e = Ee(t), r = `${xe}/${ke}`;
|
|
3785
|
+
return Ot(e.readFile(r));
|
|
3762
3786
|
},
|
|
3763
3787
|
initNotebookCode: (t) => {
|
|
3764
|
-
const { pyodide: e, filename: r, code: n } = t, s =
|
|
3788
|
+
const { pyodide: e, filename: r, code: n } = t, s = Ee(e), a = (i) => {
|
|
3765
3789
|
try {
|
|
3766
|
-
return
|
|
3790
|
+
return Ot(s.readFile(i));
|
|
3767
3791
|
} catch {
|
|
3768
3792
|
return null;
|
|
3769
3793
|
}
|
|
3770
3794
|
};
|
|
3771
|
-
if (r && r !==
|
|
3795
|
+
if (r && r !== ke) {
|
|
3772
3796
|
const i = a(r);
|
|
3773
3797
|
if (i)
|
|
3774
3798
|
return {
|
|
@@ -3776,15 +3800,15 @@ var us = mr((ps, pt) => {
|
|
|
3776
3800
|
filename: r
|
|
3777
3801
|
};
|
|
3778
3802
|
}
|
|
3779
|
-
return s.writeFile(
|
|
3803
|
+
return s.writeFile(ke, n), {
|
|
3780
3804
|
code: n,
|
|
3781
|
-
filename:
|
|
3805
|
+
filename: ke
|
|
3782
3806
|
};
|
|
3783
3807
|
}
|
|
3784
3808
|
};
|
|
3785
|
-
function
|
|
3809
|
+
function Nt(t, e) {
|
|
3786
3810
|
return new Promise((r, n) => {
|
|
3787
|
-
|
|
3811
|
+
Ee(t).syncfs(e, (s) => {
|
|
3788
3812
|
if (s instanceof Error) {
|
|
3789
3813
|
n(s);
|
|
3790
3814
|
return;
|
|
@@ -3793,7 +3817,7 @@ var us = mr((ps, pt) => {
|
|
|
3793
3817
|
});
|
|
3794
3818
|
});
|
|
3795
3819
|
}
|
|
3796
|
-
class
|
|
3820
|
+
class ss {
|
|
3797
3821
|
constructor() {
|
|
3798
3822
|
this.spans = [];
|
|
3799
3823
|
}
|
|
@@ -3835,25 +3859,25 @@ var us = mr((ps, pt) => {
|
|
|
3835
3859
|
logSpans() {
|
|
3836
3860
|
}
|
|
3837
3861
|
}
|
|
3838
|
-
const he = new
|
|
3862
|
+
const he = new ss();
|
|
3839
3863
|
globalThis.t = he;
|
|
3840
|
-
const
|
|
3841
|
-
class
|
|
3864
|
+
const as = !1;
|
|
3865
|
+
class is {
|
|
3842
3866
|
constructor() {
|
|
3843
3867
|
this.pyodide = null;
|
|
3844
3868
|
}
|
|
3845
3869
|
get requirePyodide() {
|
|
3846
|
-
return
|
|
3870
|
+
return zt(this.pyodide, "Pyodide not loaded"), this.pyodide;
|
|
3847
3871
|
}
|
|
3848
3872
|
async bootstrap(e) {
|
|
3849
3873
|
return await this.loadPyodideAndPackages(e);
|
|
3850
3874
|
}
|
|
3851
3875
|
async loadPyodideAndPackages(e) {
|
|
3852
|
-
if (!
|
|
3876
|
+
if (!mt)
|
|
3853
3877
|
throw new Error("loadPyodide is not defined");
|
|
3854
3878
|
const r = he.startSpan("loadPyodide");
|
|
3855
3879
|
try {
|
|
3856
|
-
const n = await
|
|
3880
|
+
const n = await mt({
|
|
3857
3881
|
// Perf: These get loaded while pyodide is being bootstrapped
|
|
3858
3882
|
packages: [
|
|
3859
3883
|
"micropip",
|
|
@@ -3863,7 +3887,7 @@ var us = mr((ps, pt) => {
|
|
|
3863
3887
|
"narwhals",
|
|
3864
3888
|
"packaging"
|
|
3865
3889
|
],
|
|
3866
|
-
_makeSnapshot:
|
|
3890
|
+
_makeSnapshot: as,
|
|
3867
3891
|
lockFileURL: `https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,
|
|
3868
3892
|
// Without this, this fails in Firefox with
|
|
3869
3893
|
// `Could not extract indexURL path from pyodide module`
|
|
@@ -3952,7 +3976,7 @@ ${e}`;
|
|
|
3952
3976
|
}), a.end();
|
|
3953
3977
|
}
|
|
3954
3978
|
}
|
|
3955
|
-
class
|
|
3979
|
+
class os extends is {
|
|
3956
3980
|
async bootstrap(e) {
|
|
3957
3981
|
return await super.bootstrap(e);
|
|
3958
3982
|
}
|
|
@@ -3975,50 +3999,50 @@ ${e}`;
|
|
|
3975
3999
|
code: e.code,
|
|
3976
4000
|
filename: e.filename,
|
|
3977
4001
|
onMessage: e.onMessage,
|
|
3978
|
-
userConfig:
|
|
4002
|
+
userConfig: Wn()
|
|
3979
4003
|
});
|
|
3980
4004
|
}
|
|
3981
4005
|
}
|
|
3982
|
-
const
|
|
3983
|
-
function
|
|
3984
|
-
return t.includes("dev") &&
|
|
4006
|
+
const ds = !1;
|
|
4007
|
+
function cs(t) {
|
|
4008
|
+
return t.includes("dev") && ds ? "dev" : `v${ht}`;
|
|
3985
4009
|
}
|
|
3986
|
-
async function
|
|
3987
|
-
const t =
|
|
4010
|
+
async function us() {
|
|
4011
|
+
const t = fs(), e = cs(t);
|
|
3988
4012
|
try {
|
|
3989
|
-
self.controller = new
|
|
4013
|
+
self.controller = new os(), self.pyodide = await self.controller.bootstrap({
|
|
3990
4014
|
version: t,
|
|
3991
4015
|
pyodideVersion: e
|
|
3992
4016
|
});
|
|
3993
4017
|
} catch (r) {
|
|
3994
4018
|
W.error("Error bootstrapping", r), we.send.initializedError({
|
|
3995
|
-
error:
|
|
4019
|
+
error: Lt(r)
|
|
3996
4020
|
});
|
|
3997
4021
|
}
|
|
3998
4022
|
}
|
|
3999
|
-
const
|
|
4023
|
+
const Be = us(), hr = new Ln(
|
|
4000
4024
|
(t) => {
|
|
4001
4025
|
we.send.kernelMessage({ message: t });
|
|
4002
4026
|
}
|
|
4003
|
-
),
|
|
4027
|
+
), Rt = new _r(), ls = {
|
|
4004
4028
|
/**
|
|
4005
4029
|
* Start the session
|
|
4006
4030
|
*/
|
|
4007
4031
|
startSession: async (t) => {
|
|
4008
|
-
await
|
|
4032
|
+
await Be;
|
|
4009
4033
|
try {
|
|
4010
|
-
|
|
4034
|
+
zt(self.controller, "Controller not loaded");
|
|
4011
4035
|
const e = await self.controller.mountFilesystem({
|
|
4012
4036
|
code: t.code,
|
|
4013
4037
|
filename: `app-${t.appId}.py`
|
|
4014
4038
|
}), r = await self.controller.startSession({
|
|
4015
4039
|
...e,
|
|
4016
|
-
onMessage:
|
|
4040
|
+
onMessage: hr.push
|
|
4017
4041
|
});
|
|
4018
|
-
|
|
4042
|
+
Rt.resolve(r), we.send.initialized({});
|
|
4019
4043
|
} catch (e) {
|
|
4020
4044
|
we.send.initializedError({
|
|
4021
|
-
error:
|
|
4045
|
+
error: Lt(e)
|
|
4022
4046
|
});
|
|
4023
4047
|
}
|
|
4024
4048
|
},
|
|
@@ -4026,7 +4050,7 @@ ${e}`;
|
|
|
4026
4050
|
* Load packages
|
|
4027
4051
|
*/
|
|
4028
4052
|
loadPackages: async (t) => {
|
|
4029
|
-
await
|
|
4053
|
+
await Be, t.includes("mo.sql") && (t = `import pandas
|
|
4030
4054
|
${t}`, t = `import duckdb
|
|
4031
4055
|
${t}`, t = `import sqlglot
|
|
4032
4056
|
${t}`, t.includes("polars") && (t = `import pyarrow
|
|
@@ -4039,8 +4063,8 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
4039
4063
|
* Call a function on the bridge
|
|
4040
4064
|
*/
|
|
4041
4065
|
bridge: async (t) => {
|
|
4042
|
-
await
|
|
4043
|
-
const { functionName: e, payload: r } = t, n = await
|
|
4066
|
+
await Be;
|
|
4067
|
+
const { functionName: e, payload: r } = t, n = await Rt.promise, s = r == null ? null : typeof r == "string" ? r : JSON.stringify(r), a = s == null ? (
|
|
4044
4068
|
// @ts-expect-error ehh TypeScript
|
|
4045
4069
|
await n[e]()
|
|
4046
4070
|
) : (
|
|
@@ -4049,18 +4073,18 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
4049
4073
|
);
|
|
4050
4074
|
return typeof a == "string" ? JSON.parse(a) : a;
|
|
4051
4075
|
}
|
|
4052
|
-
}, we =
|
|
4053
|
-
transport:
|
|
4054
|
-
transportId:
|
|
4076
|
+
}, we = jn({
|
|
4077
|
+
transport: Fn({
|
|
4078
|
+
transportId: Dn
|
|
4055
4079
|
}),
|
|
4056
|
-
requestHandler:
|
|
4080
|
+
requestHandler: ls
|
|
4057
4081
|
});
|
|
4058
4082
|
we.send("ready", {});
|
|
4059
4083
|
we.addMessageListener("consumerReady", async () => {
|
|
4060
|
-
await
|
|
4084
|
+
await Be, hr.start();
|
|
4061
4085
|
});
|
|
4062
|
-
function
|
|
4086
|
+
function fs() {
|
|
4063
4087
|
return self.name;
|
|
4064
4088
|
}
|
|
4065
4089
|
});
|
|
4066
|
-
export default
|
|
4090
|
+
export default ps();
|