@marimo-team/islands 0.13.11-dev9 → 0.13.12-dev0
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-DNFNhFao.js → ConnectedDataExplorerComponent-FNbGSvi8.js} +2 -2
- package/dist/{VegaLite-DKhvOxhd.js → VegaLite-B3o5ox9T.js} +3 -3
- package/dist/{_baseUniq-Cnmb3ubw.js → _baseUniq-DtgA5XPY.js} +54 -54
- package/dist/{any-language-editor-DDfK2m6u.js → any-language-editor-8d2qvq0F.js} +1 -1
- package/dist/{architectureDiagram-IEHRJDOE-BJKDueJ9.js → architectureDiagram-IEHRJDOE-CB6bOsZM.js} +5 -5
- package/dist/assets/{save-worker-BPdUArx2.js → save-worker-9HEtFDM0.js} +286 -278
- package/dist/assets/{worker-ClUJakx7.js → worker-BGGm0KYZ.js} +343 -335
- package/dist/assets/{worker-C7cQgmFi.js → worker-e6AF4zgJ.js} +221 -213
- package/dist/{blockDiagram-JOT3LUYC-DhMhm8Xe.js → blockDiagram-JOT3LUYC-t44G8uzR.js} +4 -4
- package/dist/{c4Diagram-VJAJSXHY-DIvwawx4.js → c4Diagram-VJAJSXHY-CST113S2.js} +2 -2
- package/dist/{channel-TMoqPr80.js → channel-Bwf01f3R.js} +1 -1
- package/dist/{chunk-4BMEZGHF-DnSQqNNW.js → chunk-4BMEZGHF-C9AAA_rW.js} +1 -1
- package/dist/{chunk-A2AXSNBT-Dq3BgLsK.js → chunk-A2AXSNBT-BwmTl1_u.js} +2 -2
- package/dist/{chunk-AEK57VVT-CwaeaYJL.js → chunk-AEK57VVT-B8tLbxDM.js} +2 -2
- package/dist/{chunk-D6G4REZN-BOTOoqo0.js → chunk-D6G4REZN-BAMJhwxD.js} +1 -1
- package/dist/{chunk-RZ5BOZE2-CVxHuaLv.js → chunk-RZ5BOZE2-4pJ3_scN.js} +1 -1
- package/dist/{chunk-XZIHB7SX-DNNYFdyl.js → chunk-XZIHB7SX-Cx0pSget.js} +1 -1
- package/dist/{classDiagram-GIVACNV2-uTqqFExw.js → classDiagram-GIVACNV2-gz-oy0MW.js} +2 -2
- package/dist/{classDiagram-v2-COTLJTTW-uTqqFExw.js → classDiagram-v2-COTLJTTW-gz-oy0MW.js} +2 -2
- package/dist/{clone-CDpSWalN.js → clone-dnzW62XO.js} +1 -1
- package/dist/{dagre-OKDRZEBW-JNTKltpU.js → dagre-OKDRZEBW-CXolCKwF.js} +6 -6
- package/dist/{data-editor-D3fd2FeE.js → data-editor-DgNYCz0Q.js} +1 -1
- package/dist/{diagram-SSKATNLV-CTMqjD6s.js → diagram-SSKATNLV-U-H97Xtz.js} +3 -3
- package/dist/{diagram-VNBRO52H-DSee8eIJ.js → diagram-VNBRO52H-esuvkFar.js} +3 -3
- package/dist/{erDiagram-Q7BY3M3F-CyV9O6sy.js → erDiagram-Q7BY3M3F-FytgjBzQ.js} +3 -3
- package/dist/{flowDiagram-4HSFHLVR-2u7K98LJ.js → flowDiagram-4HSFHLVR-CCo-m8L6.js} +3 -3
- package/dist/{ganttDiagram-APWFNJXF-BB8Zg5Y4.js → ganttDiagram-APWFNJXF-C8agL4qD.js} +55 -55
- package/dist/{gitGraphDiagram-7IBYFJ6S-aYU1F4wa.js → gitGraphDiagram-7IBYFJ6S-BJiSpnCC.js} +4 -4
- package/dist/{graph-l3qinZrG.js → graph-C9ZqAPxA.js} +3 -3
- package/dist/{index-B9NppCsQ.js → index-BD-RvQwV.js} +3 -3
- package/dist/{index-CY7Dqfcn.js → index-BKbHLeTh.js} +1 -1
- package/dist/{index-R1DxFaFx.js → index-CaoFhmu4.js} +1 -1
- package/dist/{index-DrK53x_G.js → index-D-xHZTYe.js} +1 -1
- package/dist/{infoDiagram-PH2N3AL5-D1ZvUr5q.js → infoDiagram-PH2N3AL5-C53SsZF9.js} +2 -2
- package/dist/{journeyDiagram-U35MCT3I-Cv7KahYc.js → journeyDiagram-U35MCT3I-CCegkd26.js} +2 -2
- package/dist/{kanban-definition-NDS4AKOZ-Bwsom9hq.js → kanban-definition-NDS4AKOZ-DFlPdoaw.js} +1 -1
- package/dist/{layout-B7xmxBzS.js → layout-CNfguXUJ.js} +51 -51
- package/dist/{linear-Z-9vruHe.js → linear-CNsS8TrU.js} +32 -32
- package/dist/{main-BqO9_FY3.js → main-g8NhKoTu.js} +31433 -31024
- package/dist/main.js +1 -1
- package/dist/{mermaid-DfXzT8eM.js → mermaid-CtQrLDj5.js} +28 -28
- package/dist/min-DxFsVG0s.js +80 -0
- package/dist/{mindmap-definition-ALO5MXBD-0DD2ibro.js → mindmap-definition-ALO5MXBD-DODIWOcX.js} +2 -2
- package/dist/{pieDiagram-IB7DONF6-DLEMxUEw.js → pieDiagram-IB7DONF6-idZ3yXbW.js} +3 -3
- package/dist/{quadrantDiagram-7GDLP6J5-DdXTrGLY.js → quadrantDiagram-7GDLP6J5-CsqzLGmr.js} +2 -2
- package/dist/{radar-MK3ICKWK-BHmvEDfD.js → radar-MK3ICKWK-CP2VGUCO.js} +11 -11
- package/dist/{react-plotly-DBvyHI0-.js → react-plotly-Q_pQo456.js} +1 -1
- package/dist/{requirementDiagram-KVF5MWMF-CdmrpKf0.js → requirementDiagram-KVF5MWMF-D7NXQSqV.js} +2 -2
- package/dist/{sankeyDiagram-QLVOVGJD-BiZAVzWW.js → sankeyDiagram-QLVOVGJD-aml_jM75.js} +1 -1
- package/dist/{sequenceDiagram-X6HHIX6F-Cj_aORDs.js → sequenceDiagram-X6HHIX6F-81wcdr36.js} +3 -3
- package/dist/{slides-component-B5CgdIYY.js → slides-component-Or7SgqNJ.js} +1 -1
- package/dist/{stateDiagram-DGXRK772-D4DF1dAO.js → stateDiagram-DGXRK772-4X0GNAMA.js} +4 -4
- package/dist/{stateDiagram-v2-YXO3MK2T-DRog8-R0.js → stateDiagram-v2-YXO3MK2T-aAVlUYKE.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-BBAeUx5g.js → time-DL1wn8El.js} +2 -2
- package/dist/{timeline-definition-BDJGKUSR-CgE2J3r1.js → timeline-definition-BDJGKUSR-Br4M07XC.js} +1 -1
- package/dist/{vega-component-DJbPN8Ym.js → vega-component-0d4DZiso.js} +2 -2
- package/dist/{xychartDiagram-VJFVF3MP-B-qILb0h.js → xychartDiagram-VJFVF3MP-C_0y0XwM.js} +2 -2
- package/package.json +2 -2
- package/dist/min-C88XdK-I.js +0 -85
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
class
|
|
1
|
+
var wr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var us = wr((hs, gt) => {
|
|
3
|
+
class kr {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.status = "pending", this.promise = new Promise((e, r) => {
|
|
6
6
|
this.reject = (n) => {
|
|
@@ -17,7 +17,7 @@ var ls = _r((ps, yt) => {
|
|
|
17
17
|
const ke = {
|
|
18
18
|
NOOP: () => {
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, Ct = (t, e) => {
|
|
21
21
|
const r = `[${t}]`;
|
|
22
22
|
return {
|
|
23
23
|
debug: (...n) => e.debug(r, ...n),
|
|
@@ -25,7 +25,7 @@ var ls = _r((ps, yt) => {
|
|
|
25
25
|
warn: (...n) => e.warn(r, ...n),
|
|
26
26
|
error: (...n) => e.error(r, ...n),
|
|
27
27
|
trace: (...n) => e.trace(r, ...n),
|
|
28
|
-
get: (n) =>
|
|
28
|
+
get: (n) => Ct(`${t}.${n}`, e),
|
|
29
29
|
disabled: (n = !0) => n ? He : e
|
|
30
30
|
};
|
|
31
31
|
}, Be = {
|
|
@@ -44,7 +44,7 @@ var ls = _r((ps, yt) => {
|
|
|
44
44
|
trace: (...t) => {
|
|
45
45
|
console.trace(...t);
|
|
46
46
|
},
|
|
47
|
-
get: (t) =>
|
|
47
|
+
get: (t) => Ct(t, Be),
|
|
48
48
|
disabled: (t = !0) => t ? He : Be
|
|
49
49
|
}, He = {
|
|
50
50
|
debug: () => ke.NOOP,
|
|
@@ -55,10 +55,10 @@ var ls = _r((ps, yt) => {
|
|
|
55
55
|
get: () => He,
|
|
56
56
|
disabled: () => He
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function br() {
|
|
59
59
|
return typeof window < "u" && window.Logger || Be;
|
|
60
60
|
}
|
|
61
|
-
const Y =
|
|
61
|
+
const Y = br(), ot = (t) => new TextDecoder().decode(t), be = "notebook.py", xe = "/marimo", ie = {
|
|
62
62
|
NOTEBOOK_FILENAME: be,
|
|
63
63
|
HOME_DIR: xe,
|
|
64
64
|
createHomeDir: (t) => {
|
|
@@ -73,19 +73,19 @@ var ls = _r((ps, yt) => {
|
|
|
73
73
|
Se(t).mount(t.FS.filesystems.IDBFS, { root: "." }, xe);
|
|
74
74
|
},
|
|
75
75
|
populateFilesToMemory: async (t) => {
|
|
76
|
-
await
|
|
76
|
+
await St(t, !0);
|
|
77
77
|
},
|
|
78
78
|
persistFilesToRemote: async (t) => {
|
|
79
|
-
await
|
|
79
|
+
await St(t, !1);
|
|
80
80
|
},
|
|
81
81
|
readNotebook: (t) => {
|
|
82
82
|
const e = Se(t), r = `${xe}/${be}`;
|
|
83
|
-
return
|
|
83
|
+
return ot(e.readFile(r));
|
|
84
84
|
},
|
|
85
85
|
initNotebookCode: (t) => {
|
|
86
86
|
const { pyodide: e, filename: r, code: n } = t, s = Se(e), a = (i) => {
|
|
87
87
|
try {
|
|
88
|
-
return
|
|
88
|
+
return ot(s.readFile(i));
|
|
89
89
|
} catch {
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
@@ -104,7 +104,7 @@ var ls = _r((ps, yt) => {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
function
|
|
107
|
+
function St(t, e) {
|
|
108
108
|
return new Promise((r, n) => {
|
|
109
109
|
Se(t).syncfs(e, (s) => {
|
|
110
110
|
if (s instanceof Error) {
|
|
@@ -115,7 +115,7 @@ var ls = _r((ps, yt) => {
|
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
class
|
|
118
|
+
class xr {
|
|
119
119
|
constructor(e) {
|
|
120
120
|
this.onMessage = e, this.started = !1, this.push = (r) => {
|
|
121
121
|
this.started ? this.onMessage(r) : this.buffer.push(r);
|
|
@@ -160,14 +160,14 @@ var ls = _r((ps, yt) => {
|
|
|
160
160
|
}
|
|
161
161
|
t.joinValues = n, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
|
|
162
162
|
})(k || (k = {}));
|
|
163
|
-
var
|
|
163
|
+
var ct;
|
|
164
164
|
(function(t) {
|
|
165
165
|
t.mergeShapes = (e, r) => ({
|
|
166
166
|
...e,
|
|
167
167
|
...r
|
|
168
168
|
// second overwrites first
|
|
169
169
|
});
|
|
170
|
-
})(
|
|
170
|
+
})(ct || (ct = {}));
|
|
171
171
|
const p = k.arrayToEnum([
|
|
172
172
|
"string",
|
|
173
173
|
"nan",
|
|
@@ -227,8 +227,8 @@ var ls = _r((ps, yt) => {
|
|
|
227
227
|
"invalid_intersection_types",
|
|
228
228
|
"not_multiple_of",
|
|
229
229
|
"not_finite"
|
|
230
|
-
]),
|
|
231
|
-
class
|
|
230
|
+
]), Sr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
231
|
+
class I extends Error {
|
|
232
232
|
get errors() {
|
|
233
233
|
return this.issues;
|
|
234
234
|
}
|
|
@@ -265,7 +265,7 @@ var ls = _r((ps, yt) => {
|
|
|
265
265
|
return s(this), n;
|
|
266
266
|
}
|
|
267
267
|
static assert(e) {
|
|
268
|
-
if (!(e instanceof
|
|
268
|
+
if (!(e instanceof I))
|
|
269
269
|
throw new Error(`Not a ZodError: ${e}`);
|
|
270
270
|
}
|
|
271
271
|
toString() {
|
|
@@ -287,7 +287,7 @@ var ls = _r((ps, yt) => {
|
|
|
287
287
|
return this.flatten();
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
I.create = (t) => new I(t);
|
|
291
291
|
const ve = (t, e) => {
|
|
292
292
|
let r;
|
|
293
293
|
switch (t.code) {
|
|
@@ -344,12 +344,12 @@ var ls = _r((ps, yt) => {
|
|
|
344
344
|
}
|
|
345
345
|
return { message: r };
|
|
346
346
|
};
|
|
347
|
-
let
|
|
348
|
-
function
|
|
349
|
-
|
|
347
|
+
let It = ve;
|
|
348
|
+
function Tr(t) {
|
|
349
|
+
It = t;
|
|
350
350
|
}
|
|
351
351
|
function We() {
|
|
352
|
-
return
|
|
352
|
+
return It;
|
|
353
353
|
}
|
|
354
354
|
const Je = (t) => {
|
|
355
355
|
const { data: e, path: r, errorMaps: n, issueData: s } = t, a = [...r, ...s.path || []], i = {
|
|
@@ -371,7 +371,7 @@ var ls = _r((ps, yt) => {
|
|
|
371
371
|
path: a,
|
|
372
372
|
message: o
|
|
373
373
|
};
|
|
374
|
-
},
|
|
374
|
+
}, Er = [];
|
|
375
375
|
function f(t, e) {
|
|
376
376
|
const r = We(), n = Je({
|
|
377
377
|
issueData: e,
|
|
@@ -433,7 +433,7 @@ var ls = _r((ps, yt) => {
|
|
|
433
433
|
}
|
|
434
434
|
const y = Object.freeze({
|
|
435
435
|
status: "aborted"
|
|
436
|
-
}), ye = (t) => ({ status: "dirty", value: t }),
|
|
436
|
+
}), ye = (t) => ({ status: "dirty", value: t }), P = (t) => ({ status: "valid", value: t }), dt = (t) => t.status === "aborted", lt = (t) => t.status === "dirty", ce = (t) => t.status === "valid", Oe = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
437
437
|
function Ye(t, e, r, n) {
|
|
438
438
|
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");
|
|
439
439
|
return e.get(t);
|
|
@@ -455,7 +455,7 @@ var ls = _r((ps, yt) => {
|
|
|
455
455
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
const
|
|
458
|
+
const Tt = (t, e) => {
|
|
459
459
|
if (ce(e))
|
|
460
460
|
return { success: !0, data: e.value };
|
|
461
461
|
if (!t.common.issues.length)
|
|
@@ -465,7 +465,7 @@ var ls = _r((ps, yt) => {
|
|
|
465
465
|
get error() {
|
|
466
466
|
if (this._error)
|
|
467
467
|
return this._error;
|
|
468
|
-
const r = new
|
|
468
|
+
const r = new I(t.common.issues);
|
|
469
469
|
return this._error = r, this._error;
|
|
470
470
|
}
|
|
471
471
|
};
|
|
@@ -542,7 +542,7 @@ var ls = _r((ps, yt) => {
|
|
|
542
542
|
data: e,
|
|
543
543
|
parsedType: H(e)
|
|
544
544
|
}, a = this._parseSync({ data: e, path: s.path, parent: s });
|
|
545
|
-
return
|
|
545
|
+
return Tt(s, a);
|
|
546
546
|
}
|
|
547
547
|
"~validate"(e) {
|
|
548
548
|
var r, n;
|
|
@@ -596,7 +596,7 @@ var ls = _r((ps, yt) => {
|
|
|
596
596
|
data: e,
|
|
597
597
|
parsedType: H(e)
|
|
598
598
|
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Oe(s) ? s : Promise.resolve(s));
|
|
599
|
-
return
|
|
599
|
+
return Tt(n, a);
|
|
600
600
|
}
|
|
601
601
|
refine(e, r) {
|
|
602
602
|
const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
|
|
@@ -644,10 +644,10 @@ var ls = _r((ps, yt) => {
|
|
|
644
644
|
return we.create(this, this._def);
|
|
645
645
|
}
|
|
646
646
|
or(e) {
|
|
647
|
-
return
|
|
647
|
+
return Pe.create([this, e], this._def);
|
|
648
648
|
}
|
|
649
649
|
and(e) {
|
|
650
|
-
return
|
|
650
|
+
return Ce.create(this, e, this._def);
|
|
651
651
|
}
|
|
652
652
|
transform(e) {
|
|
653
653
|
return new F({
|
|
@@ -667,7 +667,7 @@ var ls = _r((ps, yt) => {
|
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
669
|
brand() {
|
|
670
|
-
return new
|
|
670
|
+
return new vt({
|
|
671
671
|
typeName: m.ZodBranded,
|
|
672
672
|
type: this,
|
|
673
673
|
...v(this._def)
|
|
@@ -702,14 +702,14 @@ var ls = _r((ps, yt) => {
|
|
|
702
702
|
return this.safeParse(null).success;
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
const
|
|
706
|
-
let
|
|
707
|
-
const
|
|
705
|
+
const Or = /^c[^\s-]{8,}$/i, Nr = /^[0-9a-z]+$/, Rr = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ar = /^[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, Pr = /^[a-z0-9_-]{21}$/i, Cr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ir = /^[-+]?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)?)??$/, Zr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, jr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
706
|
+
let at;
|
|
707
|
+
const $r = /^(?:(?: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])$/, Fr = /^(?:(?: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])$/, Mr = /^(([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]))$/, Lr = /^(([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])$/, Dr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Vr = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, jt = "((\\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])))", zr = new RegExp(`^${jt}$`);
|
|
708
708
|
function $t(t) {
|
|
709
709
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
710
710
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function qr(t) {
|
|
713
713
|
return new RegExp(`^${$t(t)}$`);
|
|
714
714
|
}
|
|
715
715
|
function Ft(t) {
|
|
@@ -717,10 +717,10 @@ var ls = _r((ps, yt) => {
|
|
|
717
717
|
const r = [];
|
|
718
718
|
return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
719
719
|
}
|
|
720
|
-
function qr(t, e) {
|
|
721
|
-
return !!((e === "v4" || !e) && jr.test(t) || (e === "v6" || !e) && Fr.test(t));
|
|
722
|
-
}
|
|
723
720
|
function Ur(t, e) {
|
|
721
|
+
return !!((e === "v4" || !e) && $r.test(t) || (e === "v6" || !e) && Mr.test(t));
|
|
722
|
+
}
|
|
723
|
+
function Br(t, e) {
|
|
724
724
|
if (!Cr.test(t))
|
|
725
725
|
return !1;
|
|
726
726
|
try {
|
|
@@ -730,8 +730,8 @@ var ls = _r((ps, yt) => {
|
|
|
730
730
|
return !1;
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return !!((e === "v4" || !e) &&
|
|
733
|
+
function Hr(t, e) {
|
|
734
|
+
return !!((e === "v4" || !e) && Fr.test(t) || (e === "v6" || !e) && Lr.test(t));
|
|
735
735
|
}
|
|
736
736
|
class j extends _ {
|
|
737
737
|
_parse(e) {
|
|
@@ -782,43 +782,43 @@ var ls = _r((ps, yt) => {
|
|
|
782
782
|
message: a.message
|
|
783
783
|
}), n.dirty());
|
|
784
784
|
} else if (a.kind === "email")
|
|
785
|
-
|
|
785
|
+
Zr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
786
786
|
validation: "email",
|
|
787
787
|
code: l.invalid_string,
|
|
788
788
|
message: a.message
|
|
789
789
|
}), n.dirty());
|
|
790
790
|
else if (a.kind === "emoji")
|
|
791
|
-
|
|
791
|
+
at || (at = new RegExp(jr, "u")), at.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
792
792
|
validation: "emoji",
|
|
793
793
|
code: l.invalid_string,
|
|
794
794
|
message: a.message
|
|
795
795
|
}), n.dirty());
|
|
796
796
|
else if (a.kind === "uuid")
|
|
797
|
-
|
|
797
|
+
Ar.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
798
798
|
validation: "uuid",
|
|
799
799
|
code: l.invalid_string,
|
|
800
800
|
message: a.message
|
|
801
801
|
}), n.dirty());
|
|
802
802
|
else if (a.kind === "nanoid")
|
|
803
|
-
|
|
803
|
+
Pr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
804
804
|
validation: "nanoid",
|
|
805
805
|
code: l.invalid_string,
|
|
806
806
|
message: a.message
|
|
807
807
|
}), n.dirty());
|
|
808
808
|
else if (a.kind === "cuid")
|
|
809
|
-
|
|
809
|
+
Or.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
810
810
|
validation: "cuid",
|
|
811
811
|
code: l.invalid_string,
|
|
812
812
|
message: a.message
|
|
813
813
|
}), n.dirty());
|
|
814
814
|
else if (a.kind === "cuid2")
|
|
815
|
-
|
|
815
|
+
Nr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
816
816
|
validation: "cuid2",
|
|
817
817
|
code: l.invalid_string,
|
|
818
818
|
message: a.message
|
|
819
819
|
}), n.dirty());
|
|
820
820
|
else if (a.kind === "ulid")
|
|
821
|
-
|
|
821
|
+
Rr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
822
822
|
validation: "ulid",
|
|
823
823
|
code: l.invalid_string,
|
|
824
824
|
message: a.message
|
|
@@ -853,11 +853,11 @@ var ls = _r((ps, yt) => {
|
|
|
853
853
|
code: l.invalid_string,
|
|
854
854
|
validation: "datetime",
|
|
855
855
|
message: a.message
|
|
856
|
-
}), n.dirty()) : a.kind === "date" ?
|
|
856
|
+
}), n.dirty()) : a.kind === "date" ? zr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
857
857
|
code: l.invalid_string,
|
|
858
858
|
validation: "date",
|
|
859
859
|
message: a.message
|
|
860
|
-
}), n.dirty()) : a.kind === "time" ?
|
|
860
|
+
}), n.dirty()) : a.kind === "time" ? qr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
861
861
|
code: l.invalid_string,
|
|
862
862
|
validation: "time",
|
|
863
863
|
message: a.message
|
|
@@ -865,23 +865,23 @@ var ls = _r((ps, yt) => {
|
|
|
865
865
|
validation: "duration",
|
|
866
866
|
code: l.invalid_string,
|
|
867
867
|
message: a.message
|
|
868
|
-
}), n.dirty()) : a.kind === "ip" ?
|
|
868
|
+
}), n.dirty()) : a.kind === "ip" ? Ur(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
869
869
|
validation: "ip",
|
|
870
870
|
code: l.invalid_string,
|
|
871
871
|
message: a.message
|
|
872
|
-
}), n.dirty()) : a.kind === "jwt" ?
|
|
872
|
+
}), n.dirty()) : a.kind === "jwt" ? Br(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
873
873
|
validation: "jwt",
|
|
874
874
|
code: l.invalid_string,
|
|
875
875
|
message: a.message
|
|
876
|
-
}), n.dirty()) : a.kind === "cidr" ?
|
|
876
|
+
}), n.dirty()) : a.kind === "cidr" ? Hr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
877
877
|
validation: "cidr",
|
|
878
878
|
code: l.invalid_string,
|
|
879
879
|
message: a.message
|
|
880
|
-
}), n.dirty()) : a.kind === "base64" ?
|
|
880
|
+
}), n.dirty()) : a.kind === "base64" ? Dr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
881
881
|
validation: "base64",
|
|
882
882
|
code: l.invalid_string,
|
|
883
883
|
message: a.message
|
|
884
|
-
}), n.dirty()) : a.kind === "base64url" ?
|
|
884
|
+
}), n.dirty()) : a.kind === "base64url" ? Vr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
885
885
|
validation: "base64url",
|
|
886
886
|
code: l.invalid_string,
|
|
887
887
|
message: a.message
|
|
@@ -1120,7 +1120,7 @@ var ls = _r((ps, yt) => {
|
|
|
1120
1120
|
...v(t)
|
|
1121
1121
|
});
|
|
1122
1122
|
};
|
|
1123
|
-
function
|
|
1123
|
+
function Wr(t, e) {
|
|
1124
1124
|
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(".", ""));
|
|
1125
1125
|
return a % i / Math.pow(10, s);
|
|
1126
1126
|
}
|
|
@@ -1159,7 +1159,7 @@ var ls = _r((ps, yt) => {
|
|
|
1159
1159
|
inclusive: a.inclusive,
|
|
1160
1160
|
exact: !1,
|
|
1161
1161
|
message: a.message
|
|
1162
|
-
}), s.dirty()) : a.kind === "multipleOf" ?
|
|
1162
|
+
}), s.dirty()) : a.kind === "multipleOf" ? Wr(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
1163
1163
|
code: l.not_multiple_of,
|
|
1164
1164
|
multipleOf: a.value,
|
|
1165
1165
|
message: a.message
|
|
@@ -1442,7 +1442,7 @@ var ls = _r((ps, yt) => {
|
|
|
1442
1442
|
received: n.parsedType
|
|
1443
1443
|
}), y;
|
|
1444
1444
|
}
|
|
1445
|
-
return
|
|
1445
|
+
return P(e.data);
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
1448
|
Ne.create = (t) => new Ne({
|
|
@@ -1538,7 +1538,7 @@ var ls = _r((ps, yt) => {
|
|
|
1538
1538
|
received: n.parsedType
|
|
1539
1539
|
}), y;
|
|
1540
1540
|
}
|
|
1541
|
-
return
|
|
1541
|
+
return P(e.data);
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
Ke.create = (t) => new Ke({
|
|
@@ -1555,7 +1555,7 @@ var ls = _r((ps, yt) => {
|
|
|
1555
1555
|
received: n.parsedType
|
|
1556
1556
|
}), y;
|
|
1557
1557
|
}
|
|
1558
|
-
return
|
|
1558
|
+
return P(e.data);
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
1561
|
Re.create = (t) => new Re({
|
|
@@ -1572,7 +1572,7 @@ var ls = _r((ps, yt) => {
|
|
|
1572
1572
|
received: n.parsedType
|
|
1573
1573
|
}), y;
|
|
1574
1574
|
}
|
|
1575
|
-
return
|
|
1575
|
+
return P(e.data);
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
Ae.create = (t) => new Ae({
|
|
@@ -1584,7 +1584,7 @@ var ls = _r((ps, yt) => {
|
|
|
1584
1584
|
super(...arguments), this._any = !0;
|
|
1585
1585
|
}
|
|
1586
1586
|
_parse(e) {
|
|
1587
|
-
return
|
|
1587
|
+
return P(e.data);
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
1590
|
_e.create = (t) => new _e({
|
|
@@ -1596,7 +1596,7 @@ var ls = _r((ps, yt) => {
|
|
|
1596
1596
|
super(...arguments), this._unknown = !0;
|
|
1597
1597
|
}
|
|
1598
1598
|
_parse(e) {
|
|
1599
|
-
return
|
|
1599
|
+
return P(e.data);
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
1602
|
oe.create = (t) => new oe({
|
|
@@ -1627,7 +1627,7 @@ var ls = _r((ps, yt) => {
|
|
|
1627
1627
|
received: n.parsedType
|
|
1628
1628
|
}), y;
|
|
1629
1629
|
}
|
|
1630
|
-
return
|
|
1630
|
+
return P(e.data);
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
1633
|
Ge.create = (t) => new Ge({
|
|
@@ -2010,7 +2010,7 @@ var ls = _r((ps, yt) => {
|
|
|
2010
2010
|
typeName: m.ZodObject,
|
|
2011
2011
|
...v(e)
|
|
2012
2012
|
});
|
|
2013
|
-
class
|
|
2013
|
+
class Pe extends _ {
|
|
2014
2014
|
_parse(e) {
|
|
2015
2015
|
const { ctx: r } = this._processInputParams(e), n = this._def.options;
|
|
2016
2016
|
function s(a) {
|
|
@@ -2020,7 +2020,7 @@ var ls = _r((ps, yt) => {
|
|
|
2020
2020
|
for (const o of a)
|
|
2021
2021
|
if (o.result.status === "dirty")
|
|
2022
2022
|
return r.common.issues.push(...o.ctx.common.issues), o.result;
|
|
2023
|
-
const i = a.map((o) => new
|
|
2023
|
+
const i = a.map((o) => new I(o.ctx.common.issues));
|
|
2024
2024
|
return f(r, {
|
|
2025
2025
|
code: l.invalid_union,
|
|
2026
2026
|
unionErrors: i
|
|
@@ -2067,7 +2067,7 @@ var ls = _r((ps, yt) => {
|
|
|
2067
2067
|
}
|
|
2068
2068
|
if (a)
|
|
2069
2069
|
return r.common.issues.push(...a.ctx.common.issues), a.result;
|
|
2070
|
-
const o = i.map((c) => new
|
|
2070
|
+
const o = i.map((c) => new I(c));
|
|
2071
2071
|
return f(r, {
|
|
2072
2072
|
code: l.invalid_union,
|
|
2073
2073
|
unionErrors: o
|
|
@@ -2078,13 +2078,13 @@ var ls = _r((ps, yt) => {
|
|
|
2078
2078
|
return this._def.options;
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
|
-
|
|
2081
|
+
Pe.create = (t, e) => new Pe({
|
|
2082
2082
|
options: t,
|
|
2083
2083
|
typeName: m.ZodUnion,
|
|
2084
2084
|
...v(e)
|
|
2085
2085
|
});
|
|
2086
|
-
const B = (t) => t instanceof Ze ? B(t.schema) : t instanceof F ? B(t.innerType()) : t instanceof je ? [t.value] : t instanceof X ? t.options : t instanceof $e ? k.objectValues(t.enum) : t instanceof Fe ? B(t._def.innerType) : t instanceof Re ? [void 0] : t instanceof Ae ? [null] : t instanceof D ? [void 0, ...B(t.unwrap())] : t instanceof Q ? [null, ...B(t.unwrap())] : t instanceof
|
|
2087
|
-
class
|
|
2086
|
+
const B = (t) => t instanceof Ze ? B(t.schema) : t instanceof F ? B(t.innerType()) : t instanceof je ? [t.value] : t instanceof X ? t.options : t instanceof $e ? k.objectValues(t.enum) : t instanceof Fe ? B(t._def.innerType) : t instanceof Re ? [void 0] : t instanceof Ae ? [null] : t instanceof D ? [void 0, ...B(t.unwrap())] : t instanceof Q ? [null, ...B(t.unwrap())] : t instanceof vt || t instanceof Le ? B(t.unwrap()) : t instanceof Me ? B(t._def.innerType) : [];
|
|
2087
|
+
class rt extends _ {
|
|
2088
2088
|
_parse(e) {
|
|
2089
2089
|
const { ctx: r } = this._processInputParams(e);
|
|
2090
2090
|
if (r.parsedType !== p.object)
|
|
@@ -2137,7 +2137,7 @@ var ls = _r((ps, yt) => {
|
|
|
2137
2137
|
s.set(o, a);
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
|
-
return new
|
|
2140
|
+
return new rt({
|
|
2141
2141
|
typeName: m.ZodDiscriminatedUnion,
|
|
2142
2142
|
discriminator: e,
|
|
2143
2143
|
options: r,
|
|
@@ -2146,14 +2146,14 @@ var ls = _r((ps, yt) => {
|
|
|
2146
2146
|
});
|
|
2147
2147
|
}
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2149
|
+
function ut(t, e) {
|
|
2150
2150
|
const r = H(t), n = H(e);
|
|
2151
2151
|
if (t === e)
|
|
2152
2152
|
return { valid: !0, data: t };
|
|
2153
2153
|
if (r === p.object && n === p.object) {
|
|
2154
2154
|
const s = k.objectKeys(e), a = k.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
|
|
2155
2155
|
for (const o of a) {
|
|
2156
|
-
const c =
|
|
2156
|
+
const c = ut(t[o], e[o]);
|
|
2157
2157
|
if (!c.valid)
|
|
2158
2158
|
return { valid: !1 };
|
|
2159
2159
|
i[o] = c.data;
|
|
@@ -2164,7 +2164,7 @@ var ls = _r((ps, yt) => {
|
|
|
2164
2164
|
return { valid: !1 };
|
|
2165
2165
|
const s = [];
|
|
2166
2166
|
for (let a = 0; a < t.length; a++) {
|
|
2167
|
-
const i = t[a], o = e[a], c =
|
|
2167
|
+
const i = t[a], o = e[a], c = ut(i, o);
|
|
2168
2168
|
if (!c.valid)
|
|
2169
2169
|
return { valid: !1 };
|
|
2170
2170
|
s.push(c.data);
|
|
@@ -2172,13 +2172,13 @@ var ls = _r((ps, yt) => {
|
|
|
2172
2172
|
return { valid: !0, data: s };
|
|
2173
2173
|
} else return r === p.date && n === p.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
2174
2174
|
}
|
|
2175
|
-
class
|
|
2175
|
+
class Ce extends _ {
|
|
2176
2176
|
_parse(e) {
|
|
2177
2177
|
const { status: r, ctx: n } = this._processInputParams(e), s = (a, i) => {
|
|
2178
|
-
if (
|
|
2178
|
+
if (dt(a) || dt(i))
|
|
2179
2179
|
return y;
|
|
2180
|
-
const o =
|
|
2181
|
-
return o.valid ? ((
|
|
2180
|
+
const o = ut(a.value, i.value);
|
|
2181
|
+
return o.valid ? ((lt(a) || lt(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
|
|
2182
2182
|
code: l.invalid_intersection_types
|
|
2183
2183
|
}), y);
|
|
2184
2184
|
};
|
|
@@ -2204,7 +2204,7 @@ var ls = _r((ps, yt) => {
|
|
|
2204
2204
|
}));
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
|
-
|
|
2207
|
+
Ce.create = (t, e, r) => new Ce({
|
|
2208
2208
|
left: t,
|
|
2209
2209
|
right: e,
|
|
2210
2210
|
typeName: m.ZodIntersection,
|
|
@@ -2260,7 +2260,7 @@ var ls = _r((ps, yt) => {
|
|
|
2260
2260
|
...v(e)
|
|
2261
2261
|
});
|
|
2262
2262
|
};
|
|
2263
|
-
class
|
|
2263
|
+
class Ie extends _ {
|
|
2264
2264
|
get keySchema() {
|
|
2265
2265
|
return this._def.keyType;
|
|
2266
2266
|
}
|
|
@@ -2288,12 +2288,12 @@ var ls = _r((ps, yt) => {
|
|
|
2288
2288
|
return this._def.valueType;
|
|
2289
2289
|
}
|
|
2290
2290
|
static create(e, r, n) {
|
|
2291
|
-
return r instanceof _ ? new
|
|
2291
|
+
return r instanceof _ ? new Ie({
|
|
2292
2292
|
keyType: e,
|
|
2293
2293
|
valueType: r,
|
|
2294
2294
|
typeName: m.ZodRecord,
|
|
2295
2295
|
...v(n)
|
|
2296
|
-
}) : new
|
|
2296
|
+
}) : new Ie({
|
|
2297
2297
|
keyType: j.create(),
|
|
2298
2298
|
valueType: e,
|
|
2299
2299
|
typeName: m.ZodRecord,
|
|
@@ -2460,23 +2460,23 @@ var ls = _r((ps, yt) => {
|
|
|
2460
2460
|
const a = { errorMap: r.common.contextualErrorMap }, i = r.data;
|
|
2461
2461
|
if (this._def.returns instanceof we) {
|
|
2462
2462
|
const o = this;
|
|
2463
|
-
return
|
|
2464
|
-
const d = new
|
|
2465
|
-
throw d.addIssue(n(c,
|
|
2463
|
+
return P(async function(...c) {
|
|
2464
|
+
const d = new I([]), u = await o._def.args.parseAsync(c, a).catch((C) => {
|
|
2465
|
+
throw d.addIssue(n(c, C)), d;
|
|
2466
2466
|
}), w = await Reflect.apply(i, this, u);
|
|
2467
|
-
return await o._def.returns._def.type.parseAsync(w, a).catch((
|
|
2468
|
-
throw d.addIssue(s(w,
|
|
2467
|
+
return await o._def.returns._def.type.parseAsync(w, a).catch((C) => {
|
|
2468
|
+
throw d.addIssue(s(w, C)), d;
|
|
2469
2469
|
});
|
|
2470
2470
|
});
|
|
2471
2471
|
} else {
|
|
2472
2472
|
const o = this;
|
|
2473
|
-
return
|
|
2473
|
+
return P(function(...c) {
|
|
2474
2474
|
const d = o._def.args.safeParse(c, a);
|
|
2475
2475
|
if (!d.success)
|
|
2476
|
-
throw new
|
|
2476
|
+
throw new I([n(c, d.error)]);
|
|
2477
2477
|
const u = Reflect.apply(i, this, d.data), w = o._def.returns.safeParse(u, a);
|
|
2478
2478
|
if (!w.success)
|
|
2479
|
-
throw new
|
|
2479
|
+
throw new I([s(u, w.error)]);
|
|
2480
2480
|
return w.data;
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
@@ -2577,7 +2577,7 @@ var ls = _r((ps, yt) => {
|
|
|
2577
2577
|
options: n
|
|
2578
2578
|
}), y;
|
|
2579
2579
|
}
|
|
2580
|
-
return
|
|
2580
|
+
return P(e.data);
|
|
2581
2581
|
}
|
|
2582
2582
|
get options() {
|
|
2583
2583
|
return this._def.values;
|
|
@@ -2637,7 +2637,7 @@ var ls = _r((ps, yt) => {
|
|
|
2637
2637
|
options: s
|
|
2638
2638
|
}), y;
|
|
2639
2639
|
}
|
|
2640
|
-
return
|
|
2640
|
+
return P(e.data);
|
|
2641
2641
|
}
|
|
2642
2642
|
get enum() {
|
|
2643
2643
|
return this._def.values;
|
|
@@ -2662,7 +2662,7 @@ var ls = _r((ps, yt) => {
|
|
|
2662
2662
|
received: r.parsedType
|
|
2663
2663
|
}), y;
|
|
2664
2664
|
const n = r.parsedType === p.promise ? r.data : Promise.resolve(r.data);
|
|
2665
|
-
return
|
|
2665
|
+
return P(n.then((s) => this._def.type.parseAsync(s, {
|
|
2666
2666
|
path: r.path,
|
|
2667
2667
|
errorMap: r.common.contextualErrorMap
|
|
2668
2668
|
})));
|
|
@@ -2764,7 +2764,7 @@ var ls = _r((ps, yt) => {
|
|
|
2764
2764
|
});
|
|
2765
2765
|
class D extends _ {
|
|
2766
2766
|
_parse(e) {
|
|
2767
|
-
return this._getType(e) === p.undefined ?
|
|
2767
|
+
return this._getType(e) === p.undefined ? P(void 0) : this._def.innerType._parse(e);
|
|
2768
2768
|
}
|
|
2769
2769
|
unwrap() {
|
|
2770
2770
|
return this._def.innerType;
|
|
@@ -2777,7 +2777,7 @@ var ls = _r((ps, yt) => {
|
|
|
2777
2777
|
});
|
|
2778
2778
|
class Q extends _ {
|
|
2779
2779
|
_parse(e) {
|
|
2780
|
-
return this._getType(e) === p.null ?
|
|
2780
|
+
return this._getType(e) === p.null ? P(null) : this._def.innerType._parse(e);
|
|
2781
2781
|
}
|
|
2782
2782
|
unwrap() {
|
|
2783
2783
|
return this._def.innerType;
|
|
@@ -2827,7 +2827,7 @@ var ls = _r((ps, yt) => {
|
|
|
2827
2827
|
status: "valid",
|
|
2828
2828
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2829
2829
|
get error() {
|
|
2830
|
-
return new
|
|
2830
|
+
return new I(n.common.issues);
|
|
2831
2831
|
},
|
|
2832
2832
|
input: n.data
|
|
2833
2833
|
})
|
|
@@ -2835,7 +2835,7 @@ var ls = _r((ps, yt) => {
|
|
|
2835
2835
|
status: "valid",
|
|
2836
2836
|
value: s.status === "valid" ? s.value : this._def.catchValue({
|
|
2837
2837
|
get error() {
|
|
2838
|
-
return new
|
|
2838
|
+
return new I(n.common.issues);
|
|
2839
2839
|
},
|
|
2840
2840
|
input: n.data
|
|
2841
2841
|
})
|
|
@@ -2868,8 +2868,8 @@ var ls = _r((ps, yt) => {
|
|
|
2868
2868
|
typeName: m.ZodNaN,
|
|
2869
2869
|
...v(t)
|
|
2870
2870
|
});
|
|
2871
|
-
const
|
|
2872
|
-
class
|
|
2871
|
+
const Jr = Symbol("zod_brand");
|
|
2872
|
+
class vt extends _ {
|
|
2873
2873
|
_parse(e) {
|
|
2874
2874
|
const { ctx: r } = this._processInputParams(e), n = r.data;
|
|
2875
2875
|
return this._def.type._parse({
|
|
@@ -2936,7 +2936,7 @@ var ls = _r((ps, yt) => {
|
|
|
2936
2936
|
typeName: m.ZodReadonly,
|
|
2937
2937
|
...v(e)
|
|
2938
2938
|
});
|
|
2939
|
-
function
|
|
2939
|
+
function Et(t, e) {
|
|
2940
2940
|
const r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
2941
2941
|
return typeof r == "string" ? { message: r } : r;
|
|
2942
2942
|
}
|
|
@@ -2948,26 +2948,26 @@ var ls = _r((ps, yt) => {
|
|
|
2948
2948
|
return o.then((c) => {
|
|
2949
2949
|
var d, u;
|
|
2950
2950
|
if (!c) {
|
|
2951
|
-
const w =
|
|
2951
|
+
const w = Et(e, n), x = (u = (d = w.fatal) !== null && d !== void 0 ? d : r) !== null && u !== void 0 ? u : !0;
|
|
2952
2952
|
s.addIssue({ code: "custom", ...w, fatal: x });
|
|
2953
2953
|
}
|
|
2954
2954
|
});
|
|
2955
2955
|
if (!o) {
|
|
2956
|
-
const c =
|
|
2956
|
+
const c = Et(e, n), d = (i = (a = c.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
|
|
2957
2957
|
s.addIssue({ code: "custom", ...c, fatal: d });
|
|
2958
2958
|
}
|
|
2959
2959
|
}) : _e.create();
|
|
2960
2960
|
}
|
|
2961
|
-
const
|
|
2961
|
+
const Yr = {
|
|
2962
2962
|
object: E.lazycreate
|
|
2963
2963
|
};
|
|
2964
2964
|
var m;
|
|
2965
2965
|
(function(t) {
|
|
2966
2966
|
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";
|
|
2967
2967
|
})(m || (m = {}));
|
|
2968
|
-
const
|
|
2968
|
+
const Kr = (t, e = {
|
|
2969
2969
|
message: `Input not instance of ${t.name}`
|
|
2970
|
-
}) => Lt((r) => r instanceof t, e), Dt = j.create, Vt = K.create,
|
|
2970
|
+
}) => Lt((r) => r instanceof t, e), Dt = j.create, Vt = K.create, Gr = Qe.create, Xr = G.create, zt = Ne.create, Qr = de.create, en = Ke.create, tn = Re.create, rn = Ae.create, nn = _e.create, sn = oe.create, an = J.create, on = Ge.create, cn = $.create, dn = E.create, ln = E.strictCreate, un = Pe.create, fn = rt.create, pn = Ce.create, hn = z.create, mn = Ie.create, yn = Xe.create, gn = le.create, vn = ge.create, _n = Ze.create, wn = je.create, kn = X.create, bn = $e.create, xn = we.create, Ot = F.create, Sn = D.create, Tn = Q.create, En = F.createWithPreprocess, On = De.create, Nn = () => Dt().optional(), Rn = () => Vt().optional(), An = () => zt().optional(), Pn = {
|
|
2971
2971
|
string: (t) => j.create({ ...t, coerce: !0 }),
|
|
2972
2972
|
number: (t) => K.create({ ...t, coerce: !0 }),
|
|
2973
2973
|
boolean: (t) => Ne.create({
|
|
@@ -2977,27 +2977,27 @@ var ls = _r((ps, yt) => {
|
|
|
2977
2977
|
bigint: (t) => G.create({ ...t, coerce: !0 }),
|
|
2978
2978
|
date: (t) => de.create({ ...t, coerce: !0 })
|
|
2979
2979
|
}, Cn = y;
|
|
2980
|
-
var
|
|
2980
|
+
var et = /* @__PURE__ */ Object.freeze({
|
|
2981
2981
|
__proto__: null,
|
|
2982
2982
|
defaultErrorMap: ve,
|
|
2983
|
-
setErrorMap:
|
|
2983
|
+
setErrorMap: Tr,
|
|
2984
2984
|
getErrorMap: We,
|
|
2985
2985
|
makeIssue: Je,
|
|
2986
|
-
EMPTY_PATH:
|
|
2986
|
+
EMPTY_PATH: Er,
|
|
2987
2987
|
addIssueToContext: f,
|
|
2988
2988
|
ParseStatus: R,
|
|
2989
2989
|
INVALID: y,
|
|
2990
2990
|
DIRTY: ye,
|
|
2991
|
-
OK:
|
|
2992
|
-
isAborted:
|
|
2993
|
-
isDirty:
|
|
2991
|
+
OK: P,
|
|
2992
|
+
isAborted: dt,
|
|
2993
|
+
isDirty: lt,
|
|
2994
2994
|
isValid: ce,
|
|
2995
2995
|
isAsync: Oe,
|
|
2996
2996
|
get util() {
|
|
2997
2997
|
return k;
|
|
2998
2998
|
},
|
|
2999
2999
|
get objectUtil() {
|
|
3000
|
-
return
|
|
3000
|
+
return ct;
|
|
3001
3001
|
},
|
|
3002
3002
|
ZodParsedType: p,
|
|
3003
3003
|
getParsedType: H,
|
|
@@ -3017,11 +3017,11 @@ var ls = _r((ps, yt) => {
|
|
|
3017
3017
|
ZodVoid: Ge,
|
|
3018
3018
|
ZodArray: $,
|
|
3019
3019
|
ZodObject: E,
|
|
3020
|
-
ZodUnion:
|
|
3021
|
-
ZodDiscriminatedUnion:
|
|
3022
|
-
ZodIntersection:
|
|
3020
|
+
ZodUnion: Pe,
|
|
3021
|
+
ZodDiscriminatedUnion: rt,
|
|
3022
|
+
ZodIntersection: Ce,
|
|
3023
3023
|
ZodTuple: z,
|
|
3024
|
-
ZodRecord:
|
|
3024
|
+
ZodRecord: Ie,
|
|
3025
3025
|
ZodMap: Xe,
|
|
3026
3026
|
ZodSet: le,
|
|
3027
3027
|
ZodFunction: ge,
|
|
@@ -3037,76 +3037,81 @@ var ls = _r((ps, yt) => {
|
|
|
3037
3037
|
ZodDefault: Fe,
|
|
3038
3038
|
ZodCatch: Me,
|
|
3039
3039
|
ZodNaN: Qe,
|
|
3040
|
-
BRAND:
|
|
3041
|
-
ZodBranded:
|
|
3040
|
+
BRAND: Jr,
|
|
3041
|
+
ZodBranded: vt,
|
|
3042
3042
|
ZodPipeline: De,
|
|
3043
3043
|
ZodReadonly: Le,
|
|
3044
3044
|
custom: Lt,
|
|
3045
3045
|
Schema: _,
|
|
3046
3046
|
ZodSchema: _,
|
|
3047
|
-
late:
|
|
3047
|
+
late: Yr,
|
|
3048
3048
|
get ZodFirstPartyTypeKind() {
|
|
3049
3049
|
return m;
|
|
3050
3050
|
},
|
|
3051
|
-
coerce:
|
|
3052
|
-
any:
|
|
3053
|
-
array:
|
|
3054
|
-
bigint:
|
|
3051
|
+
coerce: Pn,
|
|
3052
|
+
any: nn,
|
|
3053
|
+
array: cn,
|
|
3054
|
+
bigint: Xr,
|
|
3055
3055
|
boolean: zt,
|
|
3056
|
-
date:
|
|
3057
|
-
discriminatedUnion:
|
|
3058
|
-
effect:
|
|
3059
|
-
enum:
|
|
3060
|
-
function:
|
|
3061
|
-
instanceof:
|
|
3062
|
-
intersection:
|
|
3063
|
-
lazy:
|
|
3064
|
-
literal:
|
|
3065
|
-
map:
|
|
3066
|
-
nan:
|
|
3067
|
-
nativeEnum:
|
|
3068
|
-
never:
|
|
3069
|
-
null:
|
|
3070
|
-
nullable:
|
|
3056
|
+
date: Qr,
|
|
3057
|
+
discriminatedUnion: fn,
|
|
3058
|
+
effect: Ot,
|
|
3059
|
+
enum: kn,
|
|
3060
|
+
function: vn,
|
|
3061
|
+
instanceof: Kr,
|
|
3062
|
+
intersection: pn,
|
|
3063
|
+
lazy: _n,
|
|
3064
|
+
literal: wn,
|
|
3065
|
+
map: yn,
|
|
3066
|
+
nan: Gr,
|
|
3067
|
+
nativeEnum: bn,
|
|
3068
|
+
never: an,
|
|
3069
|
+
null: rn,
|
|
3070
|
+
nullable: Tn,
|
|
3071
3071
|
number: Vt,
|
|
3072
|
-
object:
|
|
3073
|
-
oboolean:
|
|
3074
|
-
onumber:
|
|
3075
|
-
optional:
|
|
3076
|
-
ostring:
|
|
3077
|
-
pipeline:
|
|
3078
|
-
preprocess:
|
|
3079
|
-
promise:
|
|
3080
|
-
record:
|
|
3081
|
-
set:
|
|
3082
|
-
strictObject:
|
|
3072
|
+
object: dn,
|
|
3073
|
+
oboolean: An,
|
|
3074
|
+
onumber: Rn,
|
|
3075
|
+
optional: Sn,
|
|
3076
|
+
ostring: Nn,
|
|
3077
|
+
pipeline: On,
|
|
3078
|
+
preprocess: En,
|
|
3079
|
+
promise: xn,
|
|
3080
|
+
record: mn,
|
|
3081
|
+
set: gn,
|
|
3082
|
+
strictObject: ln,
|
|
3083
3083
|
string: Dt,
|
|
3084
|
-
symbol:
|
|
3085
|
-
transformer:
|
|
3086
|
-
tuple:
|
|
3087
|
-
undefined:
|
|
3088
|
-
union:
|
|
3089
|
-
unknown:
|
|
3090
|
-
void:
|
|
3084
|
+
symbol: en,
|
|
3085
|
+
transformer: Ot,
|
|
3086
|
+
tuple: hn,
|
|
3087
|
+
undefined: tn,
|
|
3088
|
+
union: un,
|
|
3089
|
+
unknown: sn,
|
|
3090
|
+
void: on,
|
|
3091
3091
|
NEVER: Cn,
|
|
3092
3092
|
ZodIssueCode: l,
|
|
3093
|
-
quotelessJson:
|
|
3094
|
-
ZodError:
|
|
3093
|
+
quotelessJson: Sr,
|
|
3094
|
+
ZodError: I
|
|
3095
3095
|
});
|
|
3096
|
-
const
|
|
3097
|
-
detail:
|
|
3096
|
+
const ft = et.object({
|
|
3097
|
+
detail: et.string()
|
|
3098
|
+
}), qt = et.object({
|
|
3099
|
+
error: et.string()
|
|
3098
3100
|
});
|
|
3099
|
-
function
|
|
3101
|
+
function Ut(t) {
|
|
3100
3102
|
if (!t)
|
|
3101
3103
|
return "Unknown error";
|
|
3102
3104
|
if (t instanceof Error) {
|
|
3103
|
-
const e =
|
|
3105
|
+
const e = ft.safeParse(t.cause);
|
|
3104
3106
|
return e.success ? e.data.detail : In(t.message);
|
|
3105
3107
|
}
|
|
3106
3108
|
if (typeof t == "object") {
|
|
3107
|
-
const e =
|
|
3109
|
+
const e = ft.safeParse(t);
|
|
3108
3110
|
if (e.success)
|
|
3109
3111
|
return e.data.detail;
|
|
3112
|
+
const r = qt.safeParse(t);
|
|
3113
|
+
if (r.success)
|
|
3114
|
+
return r.data.error;
|
|
3110
3115
|
}
|
|
3111
3116
|
try {
|
|
3112
3117
|
return JSON.stringify(t);
|
|
@@ -3115,25 +3120,28 @@ var ls = _r((ps, yt) => {
|
|
|
3115
3120
|
}
|
|
3116
3121
|
}
|
|
3117
3122
|
function In(t) {
|
|
3118
|
-
const e =
|
|
3123
|
+
const e = Zn(t);
|
|
3119
3124
|
if (!e)
|
|
3120
3125
|
return t;
|
|
3121
|
-
const r =
|
|
3122
|
-
|
|
3126
|
+
const r = ft.safeParse(e);
|
|
3127
|
+
if (r.success)
|
|
3128
|
+
return r.data.detail;
|
|
3129
|
+
const n = qt.safeParse(e);
|
|
3130
|
+
return n.success ? n.data.error : t;
|
|
3123
3131
|
}
|
|
3124
|
-
function
|
|
3132
|
+
function Zn(t) {
|
|
3125
3133
|
try {
|
|
3126
3134
|
return JSON.parse(t);
|
|
3127
3135
|
} catch {
|
|
3128
3136
|
return t;
|
|
3129
3137
|
}
|
|
3130
3138
|
}
|
|
3131
|
-
const
|
|
3139
|
+
const jn = 1e10, $n = 1e3;
|
|
3132
3140
|
function ze(t, e) {
|
|
3133
3141
|
const r = t.map((n) => `"${n}"`).join(", ");
|
|
3134
3142
|
return new Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`);
|
|
3135
3143
|
}
|
|
3136
|
-
function
|
|
3144
|
+
function Fn(t = {}) {
|
|
3137
3145
|
let e = {};
|
|
3138
3146
|
function r(g) {
|
|
3139
3147
|
e = g;
|
|
@@ -3141,7 +3149,7 @@ var ls = _r((ps, yt) => {
|
|
|
3141
3149
|
let n = {};
|
|
3142
3150
|
function s(g) {
|
|
3143
3151
|
var S;
|
|
3144
|
-
n.unregisterHandler && n.unregisterHandler(), n = g, (S = n.registerHandler) == null || S.call(n,
|
|
3152
|
+
n.unregisterHandler && n.unregisterHandler(), n = g, (S = n.registerHandler) == null || S.call(n, _r);
|
|
3145
3153
|
}
|
|
3146
3154
|
let a;
|
|
3147
3155
|
function i(g) {
|
|
@@ -3159,11 +3167,11 @@ var ls = _r((ps, yt) => {
|
|
|
3159
3167
|
return N(S, O);
|
|
3160
3168
|
};
|
|
3161
3169
|
}
|
|
3162
|
-
const { maxRequestTime: o =
|
|
3170
|
+
const { maxRequestTime: o = $n } = t;
|
|
3163
3171
|
t.transport && s(t.transport), t.requestHandler && i(t.requestHandler), t._debugHooks && r(t._debugHooks);
|
|
3164
3172
|
let c = 0;
|
|
3165
3173
|
function d() {
|
|
3166
|
-
return c <=
|
|
3174
|
+
return c <= jn ? ++c : c = 0;
|
|
3167
3175
|
}
|
|
3168
3176
|
const u = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
|
|
3169
3177
|
function x(g, ...S) {
|
|
@@ -3183,9 +3191,9 @@ var ls = _r((ps, yt) => {
|
|
|
3183
3191
|
}, o)), (ue = e.onSend) == null || ue.call(e, re), n.send(re);
|
|
3184
3192
|
});
|
|
3185
3193
|
}
|
|
3186
|
-
const
|
|
3194
|
+
const C = new Proxy(x, {
|
|
3187
3195
|
get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) => x(S, T)
|
|
3188
|
-
}), U =
|
|
3196
|
+
}), U = C;
|
|
3189
3197
|
function Ve(g, ...S) {
|
|
3190
3198
|
var N;
|
|
3191
3199
|
const O = S[0];
|
|
@@ -3198,28 +3206,28 @@ var ls = _r((ps, yt) => {
|
|
|
3198
3206
|
};
|
|
3199
3207
|
(N = e.onSend) == null || N.call(e, T), n.send(T);
|
|
3200
3208
|
}
|
|
3201
|
-
const
|
|
3209
|
+
const bt = new Proxy(Ve, {
|
|
3202
3210
|
get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) => Ve(S, T)
|
|
3203
|
-
}),
|
|
3204
|
-
function
|
|
3211
|
+
}), xt = bt, te = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Set();
|
|
3212
|
+
function gr(g, S) {
|
|
3205
3213
|
var O;
|
|
3206
3214
|
if (!n.registerHandler)
|
|
3207
3215
|
throw ze(["registerHandler"], "register message listeners");
|
|
3208
3216
|
if (g === "*") {
|
|
3209
|
-
|
|
3217
|
+
st.add(S);
|
|
3210
3218
|
return;
|
|
3211
3219
|
}
|
|
3212
3220
|
te.has(g) || te.set(g, /* @__PURE__ */ new Set()), (O = te.get(g)) == null || O.add(S);
|
|
3213
3221
|
}
|
|
3214
|
-
function
|
|
3222
|
+
function vr(g, S) {
|
|
3215
3223
|
var O, T;
|
|
3216
3224
|
if (g === "*") {
|
|
3217
|
-
|
|
3225
|
+
st.delete(S);
|
|
3218
3226
|
return;
|
|
3219
3227
|
}
|
|
3220
3228
|
(O = te.get(g)) == null || O.delete(S), ((T = te.get(g)) == null ? void 0 : T.size) === 0 && te.delete(g);
|
|
3221
3229
|
}
|
|
3222
|
-
async function
|
|
3230
|
+
async function _r(g) {
|
|
3223
3231
|
var S, O;
|
|
3224
3232
|
if ((S = e.onReceive) == null || S.call(e, g), !("type" in g))
|
|
3225
3233
|
throw new Error("Message does not contain a type.");
|
|
@@ -3256,7 +3264,7 @@ var ls = _r((ps, yt) => {
|
|
|
3256
3264
|
return;
|
|
3257
3265
|
}
|
|
3258
3266
|
if (g.type === "message") {
|
|
3259
|
-
for (const N of
|
|
3267
|
+
for (const N of st)
|
|
3260
3268
|
N(g.id, g.payload);
|
|
3261
3269
|
const T = te.get(g.id);
|
|
3262
3270
|
if (!T)
|
|
@@ -3270,46 +3278,46 @@ var ls = _r((ps, yt) => {
|
|
|
3270
3278
|
return {
|
|
3271
3279
|
setTransport: s,
|
|
3272
3280
|
setRequestHandler: i,
|
|
3273
|
-
request:
|
|
3281
|
+
request: C,
|
|
3274
3282
|
requestProxy: U,
|
|
3275
|
-
send:
|
|
3276
|
-
sendProxy:
|
|
3277
|
-
addMessageListener:
|
|
3278
|
-
removeMessageListener:
|
|
3279
|
-
proxy: { send:
|
|
3283
|
+
send: bt,
|
|
3284
|
+
sendProxy: xt,
|
|
3285
|
+
addMessageListener: gr,
|
|
3286
|
+
removeMessageListener: vr,
|
|
3287
|
+
proxy: { send: xt, request: U },
|
|
3280
3288
|
_setDebugHooks: r
|
|
3281
3289
|
};
|
|
3282
3290
|
}
|
|
3283
|
-
function
|
|
3284
|
-
return
|
|
3291
|
+
function Mn(t) {
|
|
3292
|
+
return Fn(t);
|
|
3285
3293
|
}
|
|
3286
|
-
const
|
|
3287
|
-
function
|
|
3294
|
+
const Bt = "[transport-id]";
|
|
3295
|
+
function Ln(t, e) {
|
|
3288
3296
|
const { transportId: r } = e;
|
|
3289
|
-
return r != null ? { [
|
|
3297
|
+
return r != null ? { [Bt]: r, data: t } : t;
|
|
3290
3298
|
}
|
|
3291
|
-
function
|
|
3299
|
+
function Dn(t, e) {
|
|
3292
3300
|
const { transportId: r, filter: n } = e, s = n == null ? void 0 : n();
|
|
3293
3301
|
if (r != null && s != null)
|
|
3294
3302
|
throw new Error("Cannot use both `transportId` and `filter` at the same time");
|
|
3295
3303
|
let a = t;
|
|
3296
3304
|
if (r) {
|
|
3297
|
-
if (t[
|
|
3305
|
+
if (t[Bt] !== r)
|
|
3298
3306
|
return [!0];
|
|
3299
3307
|
a = t.data;
|
|
3300
3308
|
}
|
|
3301
3309
|
return s === !1 ? [!0] : [!1, a];
|
|
3302
3310
|
}
|
|
3303
|
-
function
|
|
3311
|
+
function Vn(t, e = {}) {
|
|
3304
3312
|
const { transportId: r, filter: n, remotePort: s } = e, a = t, i = s ?? t;
|
|
3305
3313
|
let o;
|
|
3306
3314
|
return {
|
|
3307
3315
|
send(c) {
|
|
3308
|
-
i.postMessage(
|
|
3316
|
+
i.postMessage(Ln(c, { transportId: r }));
|
|
3309
3317
|
},
|
|
3310
3318
|
registerHandler(c) {
|
|
3311
3319
|
o = (d) => {
|
|
3312
|
-
const u = d.data, [w, x] =
|
|
3320
|
+
const u = d.data, [w, x] = Dn(u, {
|
|
3313
3321
|
transportId: r,
|
|
3314
3322
|
filter: () => n == null ? void 0 : n(d)
|
|
3315
3323
|
});
|
|
@@ -3321,33 +3329,33 @@ var ls = _r((ps, yt) => {
|
|
|
3321
3329
|
}
|
|
3322
3330
|
};
|
|
3323
3331
|
}
|
|
3324
|
-
function
|
|
3325
|
-
return
|
|
3332
|
+
function zn(t) {
|
|
3333
|
+
return Vn(self, t);
|
|
3326
3334
|
}
|
|
3327
|
-
const
|
|
3328
|
-
function
|
|
3335
|
+
const qn = "marimo-transport";
|
|
3336
|
+
function Ht(t, e) {
|
|
3329
3337
|
if (!t)
|
|
3330
3338
|
throw new Error(e);
|
|
3331
3339
|
}
|
|
3332
|
-
var
|
|
3340
|
+
var Un = Object.defineProperty, b = (t, e) => Un(t, "name", { value: e, configurable: !0 }), Wt = ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) {
|
|
3333
3341
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
3334
3342
|
throw new Error('Dynamic require of "' + t + '" is not supported');
|
|
3335
3343
|
});
|
|
3336
|
-
function
|
|
3344
|
+
function Jt(t) {
|
|
3337
3345
|
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
3338
3346
|
}
|
|
3339
|
-
b(
|
|
3347
|
+
b(Jt, "_isNumber");
|
|
3340
3348
|
function ee(t) {
|
|
3341
3349
|
return t.charAt(0).toUpperCase() + t.substring(1);
|
|
3342
3350
|
}
|
|
3343
3351
|
b(ee, "_capitalize");
|
|
3344
|
-
function
|
|
3352
|
+
function nt(t) {
|
|
3345
3353
|
return function() {
|
|
3346
3354
|
return this[t];
|
|
3347
3355
|
};
|
|
3348
3356
|
}
|
|
3349
|
-
b(
|
|
3350
|
-
var pe = ["isConstructor", "isEval", "isNative", "isToplevel"], he = ["columnNumber", "lineNumber"], me = ["fileName", "functionName", "source"],
|
|
3357
|
+
b(nt, "_getter");
|
|
3358
|
+
var pe = ["isConstructor", "isEval", "isNative", "isToplevel"], he = ["columnNumber", "lineNumber"], me = ["fileName", "functionName", "source"], Bn = ["args"], Hn = ["evalOrigin"], qe = pe.concat(he, me, Bn, Hn);
|
|
3351
3359
|
function Z(t) {
|
|
3352
3360
|
if (t) for (var e = 0; e < qe.length; e++) t[qe[e]] !== void 0 && this["set" + ee(qe[e])](t[qe[e]]);
|
|
3353
3361
|
}
|
|
@@ -3372,26 +3380,26 @@ var ls = _r((ps, yt) => {
|
|
|
3372
3380
|
if (a.indexOf("@") === 0) var i = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), o = i[1], c = i[2], d = i[3];
|
|
3373
3381
|
return new Z({ functionName: n, args: s || void 0, fileName: o, lineNumber: c || void 0, columnNumber: d || void 0 });
|
|
3374
3382
|
}, "StackFrame$$fromString");
|
|
3375
|
-
for (ne = 0; ne < pe.length; ne++) Z.prototype["get" + ee(pe[ne])] =
|
|
3383
|
+
for (ne = 0; ne < pe.length; ne++) Z.prototype["get" + ee(pe[ne])] = nt(pe[ne]), Z.prototype["set" + ee(pe[ne])] = /* @__PURE__ */ function(t) {
|
|
3376
3384
|
return function(e) {
|
|
3377
3385
|
this[t] = !!e;
|
|
3378
3386
|
};
|
|
3379
3387
|
}(pe[ne]);
|
|
3380
3388
|
var ne;
|
|
3381
|
-
for (se = 0; se < he.length; se++) Z.prototype["get" + ee(he[se])] =
|
|
3389
|
+
for (se = 0; se < he.length; se++) Z.prototype["get" + ee(he[se])] = nt(he[se]), Z.prototype["set" + ee(he[se])] = /* @__PURE__ */ function(t) {
|
|
3382
3390
|
return function(e) {
|
|
3383
|
-
if (!
|
|
3391
|
+
if (!Jt(e)) throw new TypeError(t + " must be a Number");
|
|
3384
3392
|
this[t] = Number(e);
|
|
3385
3393
|
};
|
|
3386
3394
|
}(he[se]);
|
|
3387
3395
|
var se;
|
|
3388
|
-
for (ae = 0; ae < me.length; ae++) Z.prototype["get" + ee(me[ae])] =
|
|
3396
|
+
for (ae = 0; ae < me.length; ae++) Z.prototype["get" + ee(me[ae])] = nt(me[ae]), Z.prototype["set" + ee(me[ae])] = /* @__PURE__ */ function(t) {
|
|
3389
3397
|
return function(e) {
|
|
3390
3398
|
this[t] = String(e);
|
|
3391
3399
|
};
|
|
3392
3400
|
}(me[ae]);
|
|
3393
|
-
var ae,
|
|
3394
|
-
function
|
|
3401
|
+
var ae, it = Z;
|
|
3402
|
+
function Yt() {
|
|
3395
3403
|
var t = /^\s*at .*(\S+:\d+|\(native\))/m, e = /^(eval@)?(\[native code])?$/;
|
|
3396
3404
|
return { parse: b(function(r) {
|
|
3397
3405
|
if (r.stack && r.stack.match(t)) return this.parseV8OrIE(r);
|
|
@@ -3411,7 +3419,7 @@ var ls = _r((ps, yt) => {
|
|
|
3411
3419
|
var a = s.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), i = a.match(/ (\(.+\)$)/);
|
|
3412
3420
|
a = i ? a.replace(i[0], "") : a;
|
|
3413
3421
|
var o = this.extractLocation(i ? i[1] : a), c = i && a || void 0, d = ["eval", "<anonymous>"].indexOf(o[0]) > -1 ? void 0 : o[0];
|
|
3414
|
-
return new
|
|
3422
|
+
return new it({ functionName: c, fileName: d, lineNumber: o[1], columnNumber: o[2], source: s });
|
|
3415
3423
|
}, this);
|
|
3416
3424
|
}, "ErrorStackParser$$parseV8OrIE"), parseFFOrSafari: b(function(r) {
|
|
3417
3425
|
var n = r.stack.split(`
|
|
@@ -3419,58 +3427,58 @@ var ls = _r((ps, yt) => {
|
|
|
3419
3427
|
return !s.match(e);
|
|
3420
3428
|
}, this);
|
|
3421
3429
|
return n.map(function(s) {
|
|
3422
|
-
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
|
|
3430
|
+
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 });
|
|
3423
3431
|
var a = /((.*".+"[^@]*)?[^@]*)(?:@)/, i = s.match(a), o = i && i[1] ? i[1] : void 0, c = this.extractLocation(s.replace(a, ""));
|
|
3424
|
-
return new
|
|
3432
|
+
return new it({ functionName: o, fileName: c[0], lineNumber: c[1], columnNumber: c[2], source: s });
|
|
3425
3433
|
}, this);
|
|
3426
3434
|
}, "ErrorStackParser$$parseFFOrSafari") };
|
|
3427
3435
|
}
|
|
3428
|
-
b(
|
|
3429
|
-
var
|
|
3436
|
+
b(Yt, "ErrorStackParser");
|
|
3437
|
+
var Wn = new Yt(), Jn = Wn, q = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, Kt = q && typeof gt < "u" && typeof gt.exports < "u" && typeof Wt < "u" && typeof __dirname < "u", Yn = q && !Kt, Kn = typeof Deno < "u", Gt = !q && !Kn, Gn = Gt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", Xn = Gt && typeof importScripts == "function" && typeof self == "object";
|
|
3430
3438
|
typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Safari") > -1;
|
|
3431
|
-
var
|
|
3432
|
-
async function
|
|
3433
|
-
if (!q || (
|
|
3439
|
+
var Xt, pt, Qt, Nt, _t;
|
|
3440
|
+
async function wt() {
|
|
3441
|
+
if (!q || (Xt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Nt = await import("./__vite-browser-external-CPvbk0mb.js"), _t = await import("./__vite-browser-external-CPvbk0mb.js"), Qt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, pt = await import("./__vite-browser-external-CPvbk0mb.js"), kt = pt.sep, typeof Wt < "u")) return;
|
|
3434
3442
|
let t = Nt, 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 };
|
|
3435
3443
|
globalThis.require = function(a) {
|
|
3436
3444
|
return s[a];
|
|
3437
3445
|
};
|
|
3438
3446
|
}
|
|
3439
|
-
b(
|
|
3440
|
-
function Qt(t, e) {
|
|
3441
|
-
return ft.resolve(e || ".", t);
|
|
3442
|
-
}
|
|
3443
|
-
b(Qt, "node_resolvePath");
|
|
3447
|
+
b(wt, "initNodeModules");
|
|
3444
3448
|
function er(t, e) {
|
|
3445
|
-
return
|
|
3449
|
+
return pt.resolve(e || ".", t);
|
|
3446
3450
|
}
|
|
3447
|
-
b(er, "
|
|
3448
|
-
var pt;
|
|
3449
|
-
q ? pt = Qt : pt = er;
|
|
3450
|
-
var wt;
|
|
3451
|
-
q || (wt = "/");
|
|
3451
|
+
b(er, "node_resolvePath");
|
|
3452
3452
|
function tr(t, e) {
|
|
3453
|
-
return
|
|
3453
|
+
return e === void 0 && (e = location), new URL(t, e).toString();
|
|
3454
3454
|
}
|
|
3455
|
-
b(tr, "
|
|
3455
|
+
b(tr, "browser_resolvePath");
|
|
3456
|
+
var ht;
|
|
3457
|
+
q ? ht = er : ht = tr;
|
|
3458
|
+
var kt;
|
|
3459
|
+
q || (kt = "/");
|
|
3456
3460
|
function rr(t, e) {
|
|
3461
|
+
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: _t.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
|
|
3462
|
+
}
|
|
3463
|
+
b(rr, "node_getBinaryResponse");
|
|
3464
|
+
function nr(t, e) {
|
|
3457
3465
|
let r = new URL(t, location);
|
|
3458
3466
|
return { response: fetch(r, e ? { integrity: e } : {}) };
|
|
3459
3467
|
}
|
|
3460
|
-
b(
|
|
3461
|
-
var
|
|
3462
|
-
q ?
|
|
3463
|
-
async function
|
|
3464
|
-
let { response: r, binary: n } =
|
|
3468
|
+
b(nr, "browser_getBinaryResponse");
|
|
3469
|
+
var tt;
|
|
3470
|
+
q ? tt = rr : tt = nr;
|
|
3471
|
+
async function sr(t, e) {
|
|
3472
|
+
let { response: r, binary: n } = tt(t, e);
|
|
3465
3473
|
if (n) return n;
|
|
3466
3474
|
let s = await r;
|
|
3467
3475
|
if (!s.ok) throw new Error(`Failed to load '${t}': request failed.`);
|
|
3468
3476
|
return new Uint8Array(await s.arrayBuffer());
|
|
3469
3477
|
}
|
|
3470
|
-
b(
|
|
3478
|
+
b(sr, "loadBinaryFile");
|
|
3471
3479
|
var Ue;
|
|
3472
|
-
if (
|
|
3473
|
-
else if (
|
|
3480
|
+
if (Gn) Ue = b(async (t) => await import(t), "loadScript");
|
|
3481
|
+
else if (Xn) Ue = b(async (t) => {
|
|
3474
3482
|
try {
|
|
3475
3483
|
globalThis.importScripts(t);
|
|
3476
3484
|
} catch (e) {
|
|
@@ -3478,39 +3486,39 @@ var ls = _r((ps, yt) => {
|
|
|
3478
3486
|
else throw e;
|
|
3479
3487
|
}
|
|
3480
3488
|
}, "loadScript");
|
|
3481
|
-
else if (q) Ue =
|
|
3489
|
+
else if (q) Ue = ar;
|
|
3482
3490
|
else throw new Error("Cannot determine runtime environment");
|
|
3483
|
-
async function sr(t) {
|
|
3484
|
-
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Xt.runInThisContext(await (await fetch(t)).text()) : await import(Gt.pathToFileURL(t).href);
|
|
3485
|
-
}
|
|
3486
|
-
b(sr, "nodeLoadScript");
|
|
3487
3491
|
async function ar(t) {
|
|
3492
|
+
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Qt.runInThisContext(await (await fetch(t)).text()) : await import(Xt.pathToFileURL(t).href);
|
|
3493
|
+
}
|
|
3494
|
+
b(ar, "nodeLoadScript");
|
|
3495
|
+
async function ir(t) {
|
|
3488
3496
|
if (q) {
|
|
3489
|
-
await
|
|
3490
|
-
let e = await
|
|
3497
|
+
await wt();
|
|
3498
|
+
let e = await _t.readFile(t, { encoding: "utf8" });
|
|
3491
3499
|
return JSON.parse(e);
|
|
3492
3500
|
} else return await (await fetch(t)).json();
|
|
3493
3501
|
}
|
|
3494
|
-
b(
|
|
3495
|
-
async function
|
|
3496
|
-
if (
|
|
3502
|
+
b(ir, "loadLockFile");
|
|
3503
|
+
async function or() {
|
|
3504
|
+
if (Kt) return __dirname;
|
|
3497
3505
|
let t;
|
|
3498
3506
|
try {
|
|
3499
3507
|
throw new Error();
|
|
3500
3508
|
} catch (n) {
|
|
3501
3509
|
t = n;
|
|
3502
3510
|
}
|
|
3503
|
-
let e =
|
|
3504
|
-
if (q && !e.startsWith("file://") && (e = `file://${e}`),
|
|
3511
|
+
let e = Jn.parse(t)[0].fileName;
|
|
3512
|
+
if (q && !e.startsWith("file://") && (e = `file://${e}`), Yn) {
|
|
3505
3513
|
let n = await import("./__vite-browser-external-CPvbk0mb.js");
|
|
3506
3514
|
return (await import("./__vite-browser-external-CPvbk0mb.js")).fileURLToPath(n.dirname(e));
|
|
3507
3515
|
}
|
|
3508
|
-
let r = e.lastIndexOf(
|
|
3516
|
+
let r = e.lastIndexOf(kt);
|
|
3509
3517
|
if (r === -1) throw new Error("Could not extract indexURL path from pyodide module location");
|
|
3510
3518
|
return e.slice(0, r);
|
|
3511
3519
|
}
|
|
3512
|
-
b(
|
|
3513
|
-
function
|
|
3520
|
+
b(or, "calculateDirname");
|
|
3521
|
+
function cr(t) {
|
|
3514
3522
|
let e = t.FS, r = t.FS.filesystems.MEMFS, n = t.PATH, s = { DIR_MODE: 16895, FILE_MODE: 33279, mount: function(a) {
|
|
3515
3523
|
if (!a.opts.fileSystemHandle) throw new Error("opts.fileSystemHandle is required");
|
|
3516
3524
|
return r.mount.apply(null, arguments);
|
|
@@ -3538,7 +3546,7 @@ var ls = _r((ps, yt) => {
|
|
|
3538
3546
|
}
|
|
3539
3547
|
return { type: "local", entries: i };
|
|
3540
3548
|
}, getRemoteSet: async (a) => {
|
|
3541
|
-
let i = /* @__PURE__ */ Object.create(null), o = await
|
|
3549
|
+
let i = /* @__PURE__ */ Object.create(null), o = await Qn(a.opts.fileSystemHandle);
|
|
3542
3550
|
for (let [c, d] of o) c !== "." && (i[n.join2(a.mountpoint, c)] = { timestamp: d.kind === "file" ? new Date((await d.getFile()).lastModified) : /* @__PURE__ */ new Date(), mode: d.kind === "file" ? s.FILE_MODE : s.DIR_MODE });
|
|
3543
3551
|
return { type: "remote", entries: i, handles: o };
|
|
3544
3552
|
}, loadLocalEntry: (a) => {
|
|
@@ -3574,8 +3582,8 @@ var ls = _r((ps, yt) => {
|
|
|
3574
3582
|
}, reconcile: async (a, i, o) => {
|
|
3575
3583
|
let c = 0, d = [];
|
|
3576
3584
|
Object.keys(i.entries).forEach(function(x) {
|
|
3577
|
-
let
|
|
3578
|
-
(!U || e.isFile(
|
|
3585
|
+
let C = i.entries[x], U = o.entries[x];
|
|
3586
|
+
(!U || e.isFile(C.mode) && C.timestamp.getTime() > U.timestamp.getTime()) && (d.push(x), c++);
|
|
3579
3587
|
}), d.sort();
|
|
3580
3588
|
let u = [];
|
|
3581
3589
|
if (Object.keys(o.entries).forEach(function(x) {
|
|
@@ -3583,25 +3591,25 @@ var ls = _r((ps, yt) => {
|
|
|
3583
3591
|
}), u.sort().reverse(), !c) return;
|
|
3584
3592
|
let w = i.type === "remote" ? i.handles : o.handles;
|
|
3585
3593
|
for (let x of d) {
|
|
3586
|
-
let
|
|
3594
|
+
let C = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
|
|
3587
3595
|
if (o.type === "local") {
|
|
3588
|
-
let U = w.get(
|
|
3596
|
+
let U = w.get(C), Ve = await s.loadRemoteEntry(U);
|
|
3589
3597
|
s.storeLocalEntry(x, Ve);
|
|
3590
3598
|
} else {
|
|
3591
3599
|
let U = s.loadLocalEntry(x);
|
|
3592
|
-
await s.storeRemoteEntry(w,
|
|
3600
|
+
await s.storeRemoteEntry(w, C, U);
|
|
3593
3601
|
}
|
|
3594
3602
|
}
|
|
3595
3603
|
for (let x of u) if (o.type === "local") s.removeLocalEntry(x);
|
|
3596
3604
|
else {
|
|
3597
|
-
let
|
|
3598
|
-
await s.removeRemoteEntry(w,
|
|
3605
|
+
let C = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
|
|
3606
|
+
await s.removeRemoteEntry(w, C);
|
|
3599
3607
|
}
|
|
3600
3608
|
} };
|
|
3601
3609
|
t.FS.filesystems.NATIVEFS_ASYNC = s;
|
|
3602
3610
|
}
|
|
3603
|
-
b(
|
|
3604
|
-
var
|
|
3611
|
+
b(cr, "initializeNativeFS");
|
|
3612
|
+
var Qn = b(async (t) => {
|
|
3605
3613
|
let e = [];
|
|
3606
3614
|
async function r(s) {
|
|
3607
3615
|
for await (let a of s.values()) e.push(a), a.kind === "directory" && await r(a);
|
|
@@ -3615,14 +3623,14 @@ var ls = _r((ps, yt) => {
|
|
|
3615
3623
|
}
|
|
3616
3624
|
return n;
|
|
3617
3625
|
}, "getFsHandles");
|
|
3618
|
-
function
|
|
3619
|
-
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun:
|
|
3626
|
+
function dr(t) {
|
|
3627
|
+
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: hr(t), quit(r, n) {
|
|
3620
3628
|
throw e.exited = { status: r, toThrow: n }, n;
|
|
3621
|
-
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm:
|
|
3629
|
+
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: mr(t.indexURL) };
|
|
3622
3630
|
return e;
|
|
3623
3631
|
}
|
|
3624
|
-
b(
|
|
3625
|
-
function
|
|
3632
|
+
b(dr, "createSettings");
|
|
3633
|
+
function lr(t) {
|
|
3626
3634
|
return function(e) {
|
|
3627
3635
|
let r = "/";
|
|
3628
3636
|
try {
|
|
@@ -3633,14 +3641,14 @@ var ls = _r((ps, yt) => {
|
|
|
3633
3641
|
e.FS.chdir(t);
|
|
3634
3642
|
};
|
|
3635
3643
|
}
|
|
3636
|
-
b(
|
|
3637
|
-
function
|
|
3644
|
+
b(lr, "createHomeDirectory");
|
|
3645
|
+
function ur(t) {
|
|
3638
3646
|
return function(e) {
|
|
3639
3647
|
Object.assign(e.ENV, t);
|
|
3640
3648
|
};
|
|
3641
3649
|
}
|
|
3642
|
-
b(
|
|
3643
|
-
function
|
|
3650
|
+
b(ur, "setEnvironment");
|
|
3651
|
+
function fr(t) {
|
|
3644
3652
|
return t ? [async (e) => {
|
|
3645
3653
|
e.addRunDependency("fsInitHook");
|
|
3646
3654
|
try {
|
|
@@ -3650,9 +3658,9 @@ var ls = _r((ps, yt) => {
|
|
|
3650
3658
|
}
|
|
3651
3659
|
}] : [];
|
|
3652
3660
|
}
|
|
3653
|
-
b(
|
|
3654
|
-
function
|
|
3655
|
-
let e =
|
|
3661
|
+
b(fr, "callFsInitHook");
|
|
3662
|
+
function pr(t) {
|
|
3663
|
+
let e = sr(t);
|
|
3656
3664
|
return async (r) => {
|
|
3657
3665
|
let n = r._py_version_major(), s = r._py_version_minor();
|
|
3658
3666
|
r.FS.mkdirTree("/lib"), r.API.sitePackages = `/lib/python${n}.${s}/site-packages`, r.FS.mkdirTree(r.API.sitePackages), r.addRunDependency("install-stdlib");
|
|
@@ -3666,15 +3674,15 @@ var ls = _r((ps, yt) => {
|
|
|
3666
3674
|
}
|
|
3667
3675
|
};
|
|
3668
3676
|
}
|
|
3669
|
-
b(
|
|
3670
|
-
function
|
|
3677
|
+
b(pr, "installStdlib");
|
|
3678
|
+
function hr(t) {
|
|
3671
3679
|
let e;
|
|
3672
|
-
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...
|
|
3680
|
+
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...fr(t.fsInit), pr(e), lr(t.env.HOME), ur(t.env), cr];
|
|
3673
3681
|
}
|
|
3674
|
-
b(
|
|
3675
|
-
function
|
|
3682
|
+
b(hr, "getFileSystemInitializationFuncs");
|
|
3683
|
+
function mr(t) {
|
|
3676
3684
|
if (typeof WasmOffsetConverter < "u") return;
|
|
3677
|
-
let { binary: e, response: r } =
|
|
3685
|
+
let { binary: e, response: r } = tt(t + "pyodide.asm.wasm");
|
|
3678
3686
|
return function(n, s) {
|
|
3679
3687
|
return async function() {
|
|
3680
3688
|
try {
|
|
@@ -3688,17 +3696,17 @@ var ls = _r((ps, yt) => {
|
|
|
3688
3696
|
}(), {};
|
|
3689
3697
|
};
|
|
3690
3698
|
}
|
|
3691
|
-
b(
|
|
3692
|
-
var
|
|
3693
|
-
async function
|
|
3699
|
+
b(mr, "getInstantiateWasmFunc");
|
|
3700
|
+
var mt = "0.27.5";
|
|
3701
|
+
async function yt(t = {}) {
|
|
3694
3702
|
var e, r;
|
|
3695
|
-
await
|
|
3696
|
-
let n = t.indexURL || await
|
|
3697
|
-
n =
|
|
3703
|
+
await wt();
|
|
3704
|
+
let n = t.indexURL || await or();
|
|
3705
|
+
n = ht(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
|
|
3698
3706
|
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);
|
|
3699
3707
|
(e = a.env).HOME ?? (e.HOME = "/home/pyodide"), (r = a.env).PYTHONINSPECT ?? (r.PYTHONINSPECT = "1");
|
|
3700
|
-
let i =
|
|
3701
|
-
if (o.lockFilePromise =
|
|
3708
|
+
let i = dr(a), o = i.API;
|
|
3709
|
+
if (o.lockFilePromise = ir(a.lockFileURL), typeof _createPyodideModule != "function") {
|
|
3702
3710
|
let x = `${a.indexURL}pyodide.asm.js`;
|
|
3703
3711
|
await Ue(x);
|
|
3704
3712
|
}
|
|
@@ -3709,7 +3717,7 @@ var ls = _r((ps, yt) => {
|
|
|
3709
3717
|
}
|
|
3710
3718
|
let d = await _createPyodideModule(i);
|
|
3711
3719
|
if (i.exited) throw i.exited.toThrow;
|
|
3712
|
-
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !==
|
|
3720
|
+
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== mt && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${mt}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
|
|
3713
3721
|
d.locateFile = (x) => {
|
|
3714
3722
|
throw new Error("Didn't expect to load any more file_packager files!");
|
|
3715
3723
|
};
|
|
@@ -3718,12 +3726,12 @@ var ls = _r((ps, yt) => {
|
|
|
3718
3726
|
let w = o.finalizeBootstrap(u, t._snapshotDeserializer);
|
|
3719
3727
|
return o.sys.path.insert(0, o.config.env.HOME), w.version.includes("dev") || o.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${w.version}/full/`), o._pyodide.set_excepthook(), await o.packageIndexReady, o.initializeStreams(a.stdin, a.stdout, a.stderr), w;
|
|
3720
3728
|
}
|
|
3721
|
-
b(
|
|
3722
|
-
const
|
|
3723
|
-
function
|
|
3724
|
-
return t.includes("dev") &&
|
|
3729
|
+
b(yt, "loadPyodide");
|
|
3730
|
+
const es = !1;
|
|
3731
|
+
function ts(t) {
|
|
3732
|
+
return t.includes("dev") && es ? "dev" : `v${mt}`;
|
|
3725
3733
|
}
|
|
3726
|
-
class
|
|
3734
|
+
class rs {
|
|
3727
3735
|
constructor() {
|
|
3728
3736
|
this.spans = [];
|
|
3729
3737
|
}
|
|
@@ -3765,31 +3773,31 @@ var ls = _r((ps, yt) => {
|
|
|
3765
3773
|
logSpans() {
|
|
3766
3774
|
}
|
|
3767
3775
|
}
|
|
3768
|
-
const A = new
|
|
3776
|
+
const A = new rs();
|
|
3769
3777
|
globalThis.t = A;
|
|
3770
|
-
function
|
|
3778
|
+
function ns(t) {
|
|
3771
3779
|
let e, r = !1;
|
|
3772
3780
|
return function(...n) {
|
|
3773
3781
|
return r || (r = !0, e = t.apply(this, n)), e;
|
|
3774
3782
|
};
|
|
3775
3783
|
}
|
|
3776
|
-
const
|
|
3777
|
-
class
|
|
3784
|
+
const ss = !1;
|
|
3785
|
+
class as {
|
|
3778
3786
|
constructor() {
|
|
3779
3787
|
this.pyodide = null;
|
|
3780
3788
|
}
|
|
3781
3789
|
get requirePyodide() {
|
|
3782
|
-
return
|
|
3790
|
+
return Ht(this.pyodide, "Pyodide not loaded"), this.pyodide;
|
|
3783
3791
|
}
|
|
3784
3792
|
async bootstrap(e) {
|
|
3785
3793
|
return await this.loadPyodideAndPackages(e);
|
|
3786
3794
|
}
|
|
3787
3795
|
async loadPyodideAndPackages(e) {
|
|
3788
|
-
if (!
|
|
3796
|
+
if (!yt)
|
|
3789
3797
|
throw new Error("loadPyodide is not defined");
|
|
3790
3798
|
const r = A.startSpan("loadPyodide");
|
|
3791
3799
|
try {
|
|
3792
|
-
const n = await
|
|
3800
|
+
const n = await yt({
|
|
3793
3801
|
// Perf: These get loaded while pyodide is being bootstrapped
|
|
3794
3802
|
packages: [
|
|
3795
3803
|
"micropip",
|
|
@@ -3799,7 +3807,7 @@ var ls = _r((ps, yt) => {
|
|
|
3799
3807
|
"narwhals",
|
|
3800
3808
|
"packaging"
|
|
3801
3809
|
],
|
|
3802
|
-
_makeSnapshot:
|
|
3810
|
+
_makeSnapshot: ss,
|
|
3803
3811
|
lockFileURL: `https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,
|
|
3804
3812
|
// Without this, this fails in Firefox with
|
|
3805
3813
|
// `Could not extract indexURL path from pyodide module`
|
|
@@ -3888,20 +3896,20 @@ ${e}`;
|
|
|
3888
3896
|
}), a.end();
|
|
3889
3897
|
}
|
|
3890
3898
|
}
|
|
3891
|
-
async function
|
|
3899
|
+
async function is(t) {
|
|
3892
3900
|
try {
|
|
3893
3901
|
return await import(
|
|
3894
3902
|
/* @vite-ignore */
|
|
3895
3903
|
`/wasm/controller.js?version=${t}`
|
|
3896
3904
|
);
|
|
3897
3905
|
} catch {
|
|
3898
|
-
return new
|
|
3906
|
+
return new as();
|
|
3899
3907
|
}
|
|
3900
3908
|
}
|
|
3901
3909
|
const Rt = A.startSpan("worker:init");
|
|
3902
|
-
async function
|
|
3910
|
+
async function os() {
|
|
3903
3911
|
try {
|
|
3904
|
-
const t =
|
|
3912
|
+
const t = ls(), e = ts(t), r = await A.wrapAsync(is)(t);
|
|
3905
3913
|
self.controller = r, W.send.initializingMessage({
|
|
3906
3914
|
message: "Loading marimo..."
|
|
3907
3915
|
}), self.pyodide = await A.wrapAsync(r.bootstrap.bind(r))({
|
|
@@ -3910,35 +3918,35 @@ ${e}`;
|
|
|
3910
3918
|
});
|
|
3911
3919
|
} catch (t) {
|
|
3912
3920
|
Y.error("Error bootstrapping", t), W.send.initializedError({
|
|
3913
|
-
error:
|
|
3921
|
+
error: Ut(t)
|
|
3914
3922
|
});
|
|
3915
3923
|
}
|
|
3916
3924
|
}
|
|
3917
|
-
const
|
|
3925
|
+
const yr = new xr(
|
|
3918
3926
|
(t) => {
|
|
3919
3927
|
W.send.kernelMessage({ message: t });
|
|
3920
3928
|
}
|
|
3921
|
-
), At = new
|
|
3922
|
-
let
|
|
3923
|
-
const
|
|
3929
|
+
), At = new kr();
|
|
3930
|
+
let Pt = !1;
|
|
3931
|
+
const cs = {
|
|
3924
3932
|
/**
|
|
3925
3933
|
* Start the session
|
|
3926
3934
|
*/
|
|
3927
3935
|
startSession: async (t) => {
|
|
3928
3936
|
var e, r;
|
|
3929
|
-
if (await L,
|
|
3937
|
+
if (await L, Pt) {
|
|
3930
3938
|
Y.warn("Session already started");
|
|
3931
3939
|
return;
|
|
3932
3940
|
}
|
|
3933
|
-
|
|
3941
|
+
Pt = !0;
|
|
3934
3942
|
try {
|
|
3935
|
-
|
|
3943
|
+
Ht(self.controller, "Controller not loaded"), await ((r = (e = self.controller).mountFilesystem) == null ? void 0 : r.call(e, {
|
|
3936
3944
|
code: t.code,
|
|
3937
3945
|
filename: t.filename
|
|
3938
3946
|
}));
|
|
3939
3947
|
const n = A.wrapAsync(
|
|
3940
3948
|
self.controller.startSession.bind(self.controller)
|
|
3941
|
-
), s =
|
|
3949
|
+
), s = ns(() => {
|
|
3942
3950
|
W.send.initializingMessage({
|
|
3943
3951
|
message: "Initializing notebook..."
|
|
3944
3952
|
}), W.send.initialized({});
|
|
@@ -3952,13 +3960,13 @@ ${e}`;
|
|
|
3952
3960
|
queryParameters: t.queryParameters,
|
|
3953
3961
|
userConfig: t.userConfig,
|
|
3954
3962
|
onMessage: (i) => {
|
|
3955
|
-
s(),
|
|
3963
|
+
s(), yr.push(i);
|
|
3956
3964
|
}
|
|
3957
3965
|
});
|
|
3958
3966
|
At.resolve(a), Rt.end("ok");
|
|
3959
3967
|
} catch (n) {
|
|
3960
3968
|
W.send.initializedError({
|
|
3961
|
-
error:
|
|
3969
|
+
error: Ut(n)
|
|
3962
3970
|
}), Rt.end("error");
|
|
3963
3971
|
}
|
|
3964
3972
|
},
|
|
@@ -3982,7 +3990,7 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
3982
3990
|
readFile: async (t) => {
|
|
3983
3991
|
const e = A.startSpan("readFile");
|
|
3984
3992
|
await L;
|
|
3985
|
-
const r =
|
|
3993
|
+
const r = ot(self.pyodide.FS.readFile(t));
|
|
3986
3994
|
return e.end(), r;
|
|
3987
3995
|
},
|
|
3988
3996
|
/**
|
|
@@ -4079,19 +4087,19 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
4079
4087
|
// @ts-expect-error ehh TypeScript
|
|
4080
4088
|
await s[r](a)
|
|
4081
4089
|
);
|
|
4082
|
-
return
|
|
4090
|
+
return ds.has(r) && ie.persistFilesToRemote(self.pyodide), e.end(), typeof i == "string" ? JSON.parse(i) : i;
|
|
4083
4091
|
}
|
|
4084
|
-
}, W =
|
|
4085
|
-
transport:
|
|
4086
|
-
transportId:
|
|
4092
|
+
}, W = Mn({
|
|
4093
|
+
transport: zn({
|
|
4094
|
+
transportId: qn
|
|
4087
4095
|
}),
|
|
4088
|
-
requestHandler:
|
|
4096
|
+
requestHandler: cs
|
|
4089
4097
|
});
|
|
4090
4098
|
W.send("ready", {});
|
|
4091
4099
|
W.addMessageListener("consumerReady", async () => {
|
|
4092
|
-
await L,
|
|
4100
|
+
await L, yr.start();
|
|
4093
4101
|
});
|
|
4094
|
-
const
|
|
4102
|
+
const ds = /* @__PURE__ */ new Set([
|
|
4095
4103
|
"save",
|
|
4096
4104
|
"save_app_config",
|
|
4097
4105
|
"rename_file",
|
|
@@ -4100,9 +4108,9 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
4100
4108
|
"move_file_or_directory",
|
|
4101
4109
|
"update_file"
|
|
4102
4110
|
]);
|
|
4103
|
-
function
|
|
4111
|
+
function ls() {
|
|
4104
4112
|
return self.name;
|
|
4105
4113
|
}
|
|
4106
|
-
const L = A.wrapAsync(
|
|
4114
|
+
const L = A.wrapAsync(os)();
|
|
4107
4115
|
});
|
|
4108
|
-
export default
|
|
4116
|
+
export default us();
|