@marimo-team/islands 0.13.16-dev3 → 0.13.16-dev4

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.
Files changed (85) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DaX7qzkh.js → ConnectedDataExplorerComponent-W-BOfG8M.js} +1495 -1496
  2. package/dist/{VegaLite-DqttTZoC.js → VegaLite-C9hsmU75.js} +12483 -12485
  3. package/dist/{_baseUniq-C7BPwQHe.js → _baseUniq-JsDeIdvj.js} +13 -13
  4. package/dist/{any-language-editor-DUew9Rp9.js → any-language-editor-BzZqDQm_.js} +2 -2
  5. package/dist/{architectureDiagram-IEHRJDOE-a3lDrXQx.js → architectureDiagram-IEHRJDOE-DnNsdc8e.js} +1800 -1800
  6. package/dist/asn1-jKiBa2Ya.js +10 -10
  7. package/dist/assets/{save-worker-9HEtFDM0.js → save-worker-DwN_qfSx.js} +695 -702
  8. package/dist/assets/{worker-BGGm0KYZ.js → worker-BzMPE1Lq.js} +732 -739
  9. package/dist/assets/{worker-BNsqBj5w.js → worker-ISYYr8IB.js} +726 -732
  10. package/dist/blockDiagram-JOT3LUYC-C_KEbscf.js +2249 -0
  11. package/dist/{c4Diagram-VJAJSXHY-iO9Wy6JM.js → c4Diagram-VJAJSXHY-B7trZ6_H.js} +401 -400
  12. package/dist/{channel-DcjC1CFM.js → channel-CwUzkjN9.js} +1 -1
  13. package/dist/chunk-4BMEZGHF-C4_0qa8X.js +9 -0
  14. package/dist/chunk-A2AXSNBT-DApfdN4z.js +1373 -0
  15. package/dist/chunk-AEK57VVT-D_rUaIu3.js +1416 -0
  16. package/dist/{chunk-D6G4REZN-Dlv_YHcf.js → chunk-D6G4REZN-BJurAONC.js} +2 -2
  17. package/dist/{chunk-RZ5BOZE2-D8w7Mlj9.js → chunk-RZ5BOZE2-ChOs68Hz.js} +8 -8
  18. package/dist/chunk-XZIHB7SX-CGbScEEe.js +16 -0
  19. package/dist/{classDiagram-GIVACNV2-B9RHXsFh.js → classDiagram-GIVACNV2-CqVjeibK.js} +2 -2
  20. package/dist/{classDiagram-v2-COTLJTTW-B9RHXsFh.js → classDiagram-v2-COTLJTTW-CqVjeibK.js} +2 -2
  21. package/dist/clojure-CCKyeQKf.js +2 -2
  22. package/dist/{clone-D3N_odGc.js → clone-BPHB9gtw.js} +1 -1
  23. package/dist/css-bIlmDBTK.js +19 -19
  24. package/dist/{cytoscape.esm-DAyNQ0qu.js → cytoscape.esm-CCQ3SVU1.js} +2301 -2301
  25. package/dist/dagre-OKDRZEBW-EJUR9APO.js +447 -0
  26. package/dist/{data-editor-DYnEMVel.js → data-editor-CvujN_l-.js} +5785 -5795
  27. package/dist/{diagram-SSKATNLV-B7sCpaam.js → diagram-SSKATNLV-Bs-Zy3OO.js} +13 -13
  28. package/dist/{diagram-VNBRO52H-D5XB9Rqn.js → diagram-VNBRO52H-rhV7IJ0T.js} +3 -3
  29. package/dist/{erDiagram-Q7BY3M3F-Bc4bVsl5.js → erDiagram-Q7BY3M3F-DwuCpdOL.js} +263 -262
  30. package/dist/flowDiagram-4HSFHLVR-CpbGvx3R.js +1623 -0
  31. package/dist/{ganttDiagram-APWFNJXF-DX7O4yzu.js → ganttDiagram-APWFNJXF-B9ih7Ggj.js} +45 -45
  32. package/dist/gitGraphDiagram-7IBYFJ6S-tTFS2NlF.js +712 -0
  33. package/dist/{graph-3qoxqlMi.js → graph-DiSBbvS5.js} +9 -9
  34. package/dist/{index-ClcExt8M.js → index-BZo5-DOE.js} +99 -98
  35. package/dist/{index-DSv7cBZ6.js → index-CmU7bpCv.js} +4 -4
  36. package/dist/{index-DMwlOrYW.js → index-KrnLhU30.js} +9 -9
  37. package/dist/{index-DarPCnb9.js → index-TeAlNqJE.js} +28 -28
  38. package/dist/{infoDiagram-PH2N3AL5-Hpz-dZTP.js → infoDiagram-PH2N3AL5-COt3b362.js} +3 -3
  39. package/dist/javascript-WMWNx-Vj.js +47 -47
  40. package/dist/{journeyDiagram-U35MCT3I-D8lBbVPX.js → journeyDiagram-U35MCT3I-Civ2cUVg.js} +18 -18
  41. package/dist/kanban-definition-NDS4AKOZ-QxhTc8lo.js +719 -0
  42. package/dist/{katex-9tX9hjoM.js → katex-CUSbq6rG.js} +2180 -2180
  43. package/dist/{layout-BQ5ygFMS.js → layout-B0SQ1LdD.js} +27 -27
  44. package/dist/{linear-DEKTCzK7.js → linear-Bn_UtFyT.js} +2 -2
  45. package/dist/main-ClxYr2BI.js +169878 -0
  46. package/dist/main.js +1 -1
  47. package/dist/mermaid-M3c3q4Qd.js +14517 -0
  48. package/dist/{mhchem-L5-rce7L.js → mhchem-Db_f2n8C.js} +30 -30
  49. package/dist/{min-BVLo0atX.js → min-C0Jzc_ko.js} +2 -2
  50. package/dist/{mindmap-definition-ALO5MXBD-CJrYaVvo.js → mindmap-definition-ALO5MXBD-BW8IbhiG.js} +359 -359
  51. package/dist/mllike-BSnXJBGA.js +7 -7
  52. package/dist/{pieDiagram-IB7DONF6-Dctceo_p.js → pieDiagram-IB7DONF6-DIa7m5Au.js} +34 -34
  53. package/dist/pug-BqUR2bBq.js +35 -35
  54. package/dist/python-B5QdSKoL.js +18 -18
  55. package/dist/quadrantDiagram-7GDLP6J5-D1HtkiJK.js +1025 -0
  56. package/dist/{radar-MK3ICKWK-C1HW1I3s.js → radar-MK3ICKWK-Dm3jRuoE.js} +2555 -2554
  57. package/dist/{react-plotly-Cb9GFlJK.js → react-plotly-CJ3A7ju0.js} +6595 -6597
  58. package/dist/{requirementDiagram-KVF5MWMF-B1hXsRKm.js → requirementDiagram-KVF5MWMF-b-q1aUEu.js} +251 -250
  59. package/dist/rpm-IznJm2Xc.js +9 -9
  60. package/dist/{sankeyDiagram-QLVOVGJD-C4Wft0rG.js → sankeyDiagram-QLVOVGJD-Bo4y0LBQ.js} +339 -338
  61. package/dist/{sequenceDiagram-X6HHIX6F-DuI3MtaO.js → sequenceDiagram-X6HHIX6F-DMq4wla5.js} +822 -821
  62. package/dist/{slides-component-CtHXOtAT.js → slides-component-Cyh202Vq.js} +280 -280
  63. package/dist/sql-mMre1Bo3.js +9 -9
  64. package/dist/{stateDiagram-DGXRK772-BA90keZx.js → stateDiagram-DGXRK772-D_y0WAcv.js} +17 -17
  65. package/dist/{stateDiagram-v2-YXO3MK2T-BAYgRopg.js → stateDiagram-v2-YXO3MK2T-CHK5LNw7.js} +2 -2
  66. package/dist/style.css +1 -1
  67. package/dist/{time-CSFHw3Jv.js → time-YVQKuiUR.js} +2 -2
  68. package/dist/{timeline-definition-BDJGKUSR-Blc0sOvC.js → timeline-definition-BDJGKUSR-DH63_P4w.js} +261 -261
  69. package/dist/timer-BYwnU4DF.js +378 -378
  70. package/dist/ttcn-cfg-Bac_acMi.js +9 -9
  71. package/dist/{vega-component-BhqCtGzK.js → vega-component-CUFBFMjm.js} +82 -82
  72. package/dist/{xychartDiagram-VJFVF3MP-zwhLbXXB.js → xychartDiagram-VJFVF3MP-3NU7tduZ.js} +472 -471
  73. package/package.json +1 -1
  74. package/dist/blockDiagram-JOT3LUYC-CKFyxt0d.js +0 -2248
  75. package/dist/chunk-4BMEZGHF-lIaJqjDq.js +0 -9
  76. package/dist/chunk-A2AXSNBT-Cvv8kb-T.js +0 -1372
  77. package/dist/chunk-AEK57VVT-B-uzYNYV.js +0 -1415
  78. package/dist/chunk-XZIHB7SX-eF6XymTt.js +0 -15
  79. package/dist/dagre-OKDRZEBW-9GOkw9EI.js +0 -447
  80. package/dist/flowDiagram-4HSFHLVR-O0PMfC8B.js +0 -1622
  81. package/dist/gitGraphDiagram-7IBYFJ6S-Bq1HYszu.js +0 -712
  82. package/dist/kanban-definition-NDS4AKOZ-BjHkwf3p.js +0 -719
  83. package/dist/main-CtGDFKVm.js +0 -156521
  84. package/dist/mermaid-dkwEEzHU.js +0 -11991
  85. package/dist/quadrantDiagram-7GDLP6J5-BCGXIJXJ.js +0 -1024
@@ -1,6 +1,6 @@
1
- var wr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
2
- var us = wr((hs, gt) => {
3
- class kr {
1
+ var _r = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
2
+ var ls = _r((ps, mt) => {
3
+ class wr {
4
4
  constructor() {
5
5
  this.status = "pending", this.promise = new Promise((e, r) => {
6
6
  this.reject = (n) => {
@@ -11,13 +11,13 @@ var us = wr((hs, gt) => {
11
11
  });
12
12
  }
13
13
  }
14
- function Se(t) {
14
+ function be(t) {
15
15
  return t.FS;
16
16
  }
17
- const ke = {
17
+ const _e = {
18
18
  NOOP: () => {
19
19
  }
20
- }, Ct = (t, e) => {
20
+ }, Pt = (t, e) => {
21
21
  const r = `[${t}]`;
22
22
  return {
23
23
  debug: (...n) => e.debug(r, ...n),
@@ -25,10 +25,10 @@ var us = wr((hs, gt) => {
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) => Ct(`${t}.${n}`, e),
29
- disabled: (n = !0) => n ? He : e
28
+ get: (n) => Pt(`${t}.${n}`, e),
29
+ disabled: (n = !0) => n ? Ue : e
30
30
  };
31
- }, Be = {
31
+ }, qe = {
32
32
  debug: (...t) => {
33
33
  console.debug(...t);
34
34
  },
@@ -44,53 +44,53 @@ var us = wr((hs, gt) => {
44
44
  trace: (...t) => {
45
45
  console.trace(...t);
46
46
  },
47
- get: (t) => Ct(t, Be),
48
- disabled: (t = !0) => t ? He : Be
49
- }, He = {
50
- debug: () => ke.NOOP,
51
- log: () => ke.NOOP,
52
- warn: () => ke.NOOP,
53
- error: () => ke.NOOP,
54
- trace: () => ke.NOOP,
55
- get: () => He,
56
- disabled: () => He
47
+ get: (t) => Pt(t, qe),
48
+ disabled: (t = !0) => t ? Ue : qe
49
+ }, Ue = {
50
+ debug: () => _e.NOOP,
51
+ log: () => _e.NOOP,
52
+ warn: () => _e.NOOP,
53
+ error: () => _e.NOOP,
54
+ trace: () => _e.NOOP,
55
+ get: () => Ue,
56
+ disabled: () => Ue
57
57
  };
58
- function br() {
59
- return typeof window < "u" && window.Logger || Be;
58
+ function kr() {
59
+ return typeof window < "u" && window.Logger || qe;
60
60
  }
61
- const Y = br(), ot = (t) => new TextDecoder().decode(t), be = "notebook.py", xe = "/marimo", ie = {
62
- NOTEBOOK_FILENAME: be,
63
- HOME_DIR: xe,
61
+ const Y = kr(), at = (t) => new TextDecoder().decode(t), we = "notebook.py", ke = "/marimo", ae = {
62
+ NOTEBOOK_FILENAME: we,
63
+ HOME_DIR: ke,
64
64
  createHomeDir: (t) => {
65
- const e = Se(t);
65
+ const e = be(t);
66
66
  try {
67
- e.mkdirTree(xe);
67
+ e.mkdirTree(ke);
68
68
  } catch {
69
69
  }
70
- e.chdir(xe);
70
+ e.chdir(ke);
71
71
  },
72
72
  mountFS: (t) => {
73
- Se(t).mount(t.FS.filesystems.IDBFS, { root: "." }, xe);
73
+ be(t).mount(t.FS.filesystems.IDBFS, { root: "." }, ke);
74
74
  },
75
75
  populateFilesToMemory: async (t) => {
76
- await St(t, !0);
76
+ await xt(t, !0);
77
77
  },
78
78
  persistFilesToRemote: async (t) => {
79
- await St(t, !1);
79
+ await xt(t, !1);
80
80
  },
81
81
  readNotebook: (t) => {
82
- const e = Se(t), r = `${xe}/${be}`;
83
- return ot(e.readFile(r));
82
+ const e = be(t), r = `${ke}/${we}`;
83
+ return at(e.readFile(r));
84
84
  },
85
85
  initNotebookCode: (t) => {
86
- const { pyodide: e, filename: r, code: n } = t, s = Se(e), a = (i) => {
86
+ const { pyodide: e, filename: r, code: n } = t, s = be(e), a = (i) => {
87
87
  try {
88
- return ot(s.readFile(i));
88
+ return at(s.readFile(i));
89
89
  } catch {
90
90
  return null;
91
91
  }
92
92
  };
93
- if (r && r !== be) {
93
+ if (r && r !== we) {
94
94
  const i = a(r);
95
95
  if (i)
96
96
  return {
@@ -98,15 +98,15 @@ var us = wr((hs, gt) => {
98
98
  filename: r
99
99
  };
100
100
  }
101
- return s.writeFile(be, n), {
101
+ return s.writeFile(we, n), {
102
102
  code: n,
103
- filename: be
103
+ filename: we
104
104
  };
105
105
  }
106
106
  };
107
- function St(t, e) {
107
+ function xt(t, e) {
108
108
  return new Promise((r, n) => {
109
- Se(t).syncfs(e, (s) => {
109
+ be(t).syncfs(e, (s) => {
110
110
  if (s instanceof Error) {
111
111
  n(s);
112
112
  return;
@@ -115,7 +115,7 @@ var us = wr((hs, gt) => {
115
115
  });
116
116
  });
117
117
  }
118
- class xr {
118
+ class br {
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 us = wr((hs, gt) => {
160
160
  }
161
161
  t.joinValues = n, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
162
162
  })(k || (k = {}));
163
- var ct;
163
+ var it;
164
164
  (function(t) {
165
165
  t.mergeShapes = (e, r) => ({
166
166
  ...e,
167
167
  ...r
168
168
  // second overwrites first
169
169
  });
170
- })(ct || (ct = {}));
170
+ })(it || (it = {}));
171
171
  const p = k.arrayToEnum([
172
172
  "string",
173
173
  "nan",
@@ -189,7 +189,7 @@ var us = wr((hs, gt) => {
189
189
  "never",
190
190
  "map",
191
191
  "set"
192
- ]), H = (t) => {
192
+ ]), B = (t) => {
193
193
  switch (typeof t) {
194
194
  case "undefined":
195
195
  return p.undefined;
@@ -227,8 +227,8 @@ var us = wr((hs, gt) => {
227
227
  "invalid_intersection_types",
228
228
  "not_multiple_of",
229
229
  "not_finite"
230
- ]), Sr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
231
- class I extends Error {
230
+ ]), xr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
231
+ class C extends Error {
232
232
  get errors() {
233
233
  return this.issues;
234
234
  }
@@ -265,7 +265,7 @@ var us = wr((hs, gt) => {
265
265
  return s(this), n;
266
266
  }
267
267
  static assert(e) {
268
- if (!(e instanceof I))
268
+ if (!(e instanceof C))
269
269
  throw new Error(`Not a ZodError: ${e}`);
270
270
  }
271
271
  toString() {
@@ -287,8 +287,8 @@ var us = wr((hs, gt) => {
287
287
  return this.flatten();
288
288
  }
289
289
  }
290
- I.create = (t) => new I(t);
291
- const ve = (t, e) => {
290
+ C.create = (t) => new C(t);
291
+ const ye = (t, e) => {
292
292
  let r;
293
293
  switch (t.code) {
294
294
  case l.invalid_type:
@@ -344,14 +344,14 @@ var us = wr((hs, gt) => {
344
344
  }
345
345
  return { message: r };
346
346
  };
347
- let It = ve;
348
- function Tr(t) {
349
- It = t;
347
+ let Ct = ye;
348
+ function Sr(t) {
349
+ Ct = t;
350
350
  }
351
- function We() {
352
- return It;
351
+ function Be() {
352
+ return Ct;
353
353
  }
354
- const Je = (t) => {
354
+ const He = (t) => {
355
355
  const { data: e, path: r, errorMaps: n, issueData: s } = t, a = [...r, ...s.path || []], i = {
356
356
  ...s,
357
357
  path: a
@@ -371,9 +371,9 @@ var us = wr((hs, gt) => {
371
371
  path: a,
372
372
  message: o
373
373
  };
374
- }, Er = [];
374
+ }, Tr = [];
375
375
  function f(t, e) {
376
- const r = We(), n = Je({
376
+ const r = Be(), n = He({
377
377
  issueData: e,
378
378
  data: t.data,
379
379
  path: t.path,
@@ -384,13 +384,13 @@ var us = wr((hs, gt) => {
384
384
  // then schema-bound map if available
385
385
  r,
386
386
  // then global override map
387
- r === ve ? void 0 : ve
387
+ r === ye ? void 0 : ye
388
388
  // then global default map
389
389
  ].filter((s) => !!s)
390
390
  });
391
391
  t.common.issues.push(n);
392
392
  }
393
- class R {
393
+ class O {
394
394
  constructor() {
395
395
  this.value = "valid";
396
396
  }
@@ -418,7 +418,7 @@ var us = wr((hs, gt) => {
418
418
  value: i
419
419
  });
420
420
  }
421
- return R.mergeObjectSync(e, n);
421
+ return O.mergeObjectSync(e, n);
422
422
  }
423
423
  static mergeObjectSync(e, r) {
424
424
  const n = {};
@@ -433,21 +433,21 @@ var us = wr((hs, gt) => {
433
433
  }
434
434
  const y = Object.freeze({
435
435
  status: "aborted"
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
- function Ye(t, e, r, n) {
436
+ }), he = (t) => ({ status: "dirty", value: t }), A = (t) => ({ status: "valid", value: t }), ot = (t) => t.status === "aborted", ct = (t) => t.status === "dirty", oe = (t) => t.status === "valid", Te = (t) => typeof Promise < "u" && t instanceof Promise;
437
+ function We(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);
440
440
  }
441
- function Zt(t, e, r, n, s) {
441
+ function It(t, e, r, n, s) {
442
442
  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");
443
443
  return e.set(t, r), r;
444
444
  }
445
445
  var h;
446
446
  (function(t) {
447
- t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
447
+ t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e?.message;
448
448
  })(h || (h = {}));
449
- var Te, Ee;
450
- class V {
449
+ var xe, Se;
450
+ class D {
451
451
  constructor(e, r, n, s) {
452
452
  this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = s;
453
453
  }
@@ -455,8 +455,8 @@ var us = wr((hs, gt) => {
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 Tt = (t, e) => {
459
- if (ce(e))
458
+ const St = (t, e) => {
459
+ if (oe(e))
460
460
  return { success: !0, data: e.value };
461
461
  if (!t.common.issues.length)
462
462
  throw new Error("Validation failed but no issues detected.");
@@ -465,7 +465,7 @@ var us = wr((hs, gt) => {
465
465
  get error() {
466
466
  if (this._error)
467
467
  return this._error;
468
- const r = new I(t.common.issues);
468
+ const r = new C(t.common.issues);
469
469
  return this._error = r, this._error;
470
470
  }
471
471
  };
@@ -487,13 +487,13 @@ var us = wr((hs, gt) => {
487
487
  return this._def.description;
488
488
  }
489
489
  _getType(e) {
490
- return H(e.data);
490
+ return B(e.data);
491
491
  }
492
492
  _getOrReturnCtx(e, r) {
493
493
  return r || {
494
494
  common: e.parent.common,
495
495
  data: e.data,
496
- parsedType: H(e.data),
496
+ parsedType: B(e.data),
497
497
  schemaErrorMap: this._def.errorMap,
498
498
  path: e.path,
499
499
  parent: e.parent
@@ -501,11 +501,11 @@ var us = wr((hs, gt) => {
501
501
  }
502
502
  _processInputParams(e) {
503
503
  return {
504
- status: new R(),
504
+ status: new O(),
505
505
  ctx: {
506
506
  common: e.parent.common,
507
507
  data: e.data,
508
- parsedType: H(e.data),
508
+ parsedType: B(e.data),
509
509
  schemaErrorMap: this._def.errorMap,
510
510
  path: e.path,
511
511
  parent: e.parent
@@ -514,7 +514,7 @@ var us = wr((hs, gt) => {
514
514
  }
515
515
  _parseSync(e) {
516
516
  const r = this._parse(e);
517
- if (Oe(r))
517
+ if (Te(r))
518
518
  throw new Error("Synchronous parse encountered promise.");
519
519
  return r;
520
520
  }
@@ -533,16 +533,16 @@ var us = wr((hs, gt) => {
533
533
  const s = {
534
534
  common: {
535
535
  issues: [],
536
- async: (n = r == null ? void 0 : r.async) !== null && n !== void 0 ? n : !1,
537
- contextualErrorMap: r == null ? void 0 : r.errorMap
536
+ async: (n = r?.async) !== null && n !== void 0 ? n : !1,
537
+ contextualErrorMap: r?.errorMap
538
538
  },
539
- path: (r == null ? void 0 : r.path) || [],
539
+ path: r?.path || [],
540
540
  schemaErrorMap: this._def.errorMap,
541
541
  parent: null,
542
542
  data: e,
543
- parsedType: H(e)
543
+ parsedType: B(e)
544
544
  }, a = this._parseSync({ data: e, path: s.path, parent: s });
545
- return Tt(s, a);
545
+ return St(s, a);
546
546
  }
547
547
  "~validate"(e) {
548
548
  var r, n;
@@ -555,23 +555,23 @@ var us = wr((hs, gt) => {
555
555
  schemaErrorMap: this._def.errorMap,
556
556
  parent: null,
557
557
  data: e,
558
- parsedType: H(e)
558
+ parsedType: B(e)
559
559
  };
560
560
  if (!this["~standard"].async)
561
561
  try {
562
562
  const a = this._parseSync({ data: e, path: [], parent: s });
563
- return ce(a) ? {
563
+ return oe(a) ? {
564
564
  value: a.value
565
565
  } : {
566
566
  issues: s.common.issues
567
567
  };
568
568
  } catch (a) {
569
- !((n = (r = a == null ? void 0 : a.message) === null || r === void 0 ? void 0 : r.toLowerCase()) === null || n === void 0) && n.includes("encountered") && (this["~standard"].async = !0), s.common = {
569
+ !((n = (r = a?.message) === null || r === void 0 ? void 0 : r.toLowerCase()) === null || n === void 0) && n.includes("encountered") && (this["~standard"].async = !0), s.common = {
570
570
  issues: [],
571
571
  async: !0
572
572
  };
573
573
  }
574
- return this._parseAsync({ data: e, path: [], parent: s }).then((a) => ce(a) ? {
574
+ return this._parseAsync({ data: e, path: [], parent: s }).then((a) => oe(a) ? {
575
575
  value: a.value
576
576
  } : {
577
577
  issues: s.common.issues
@@ -587,16 +587,16 @@ var us = wr((hs, gt) => {
587
587
  const n = {
588
588
  common: {
589
589
  issues: [],
590
- contextualErrorMap: r == null ? void 0 : r.errorMap,
590
+ contextualErrorMap: r?.errorMap,
591
591
  async: !0
592
592
  },
593
- path: (r == null ? void 0 : r.path) || [],
593
+ path: r?.path || [],
594
594
  schemaErrorMap: this._def.errorMap,
595
595
  parent: null,
596
596
  data: e,
597
- parsedType: H(e)
598
- }, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Oe(s) ? s : Promise.resolve(s));
599
- return Tt(n, a);
597
+ parsedType: B(e)
598
+ }, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Te(s) ? s : Promise.resolve(s));
599
+ return St(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;
@@ -612,7 +612,7 @@ var us = wr((hs, gt) => {
612
612
  return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1));
613
613
  }
614
614
  _refinement(e) {
615
- return new F({
615
+ return new $({
616
616
  schema: this,
617
617
  typeName: m.ZodEffects,
618
618
  effect: { type: "refinement", refinement: e }
@@ -629,7 +629,7 @@ var us = wr((hs, gt) => {
629
629
  };
630
630
  }
631
631
  optional() {
632
- return D.create(this, this._def);
632
+ return L.create(this, this._def);
633
633
  }
634
634
  nullable() {
635
635
  return Q.create(this, this._def);
@@ -638,19 +638,19 @@ var us = wr((hs, gt) => {
638
638
  return this.nullable().optional();
639
639
  }
640
640
  array() {
641
- return $.create(this);
641
+ return j.create(this);
642
642
  }
643
643
  promise() {
644
- return we.create(this, this._def);
644
+ return ve.create(this, this._def);
645
645
  }
646
646
  or(e) {
647
- return Pe.create([this, e], this._def);
647
+ return Re.create([this, e], this._def);
648
648
  }
649
649
  and(e) {
650
- return Ce.create(this, e, this._def);
650
+ return Ae.create(this, e, this._def);
651
651
  }
652
652
  transform(e) {
653
- return new F({
653
+ return new $({
654
654
  ...v(this._def),
655
655
  schema: this,
656
656
  typeName: m.ZodEffects,
@@ -659,7 +659,7 @@ var us = wr((hs, gt) => {
659
659
  }
660
660
  default(e) {
661
661
  const r = typeof e == "function" ? e : () => e;
662
- return new Fe({
662
+ return new je({
663
663
  ...v(this._def),
664
664
  innerType: this,
665
665
  defaultValue: r,
@@ -667,7 +667,7 @@ var us = wr((hs, gt) => {
667
667
  });
668
668
  }
669
669
  brand() {
670
- return new vt({
670
+ return new yt({
671
671
  typeName: m.ZodBranded,
672
672
  type: this,
673
673
  ...v(this._def)
@@ -675,7 +675,7 @@ var us = wr((hs, gt) => {
675
675
  }
676
676
  catch(e) {
677
677
  const r = typeof e == "function" ? e : () => e;
678
- return new Me({
678
+ return new $e({
679
679
  ...v(this._def),
680
680
  innerType: this,
681
681
  catchValue: r,
@@ -690,10 +690,10 @@ var us = wr((hs, gt) => {
690
690
  });
691
691
  }
692
692
  pipe(e) {
693
- return De.create(this, e);
693
+ return Me.create(this, e);
694
694
  }
695
695
  readonly() {
696
- return Le.create(this);
696
+ return Fe.create(this);
697
697
  }
698
698
  isOptional() {
699
699
  return this.safeParse(void 0).success;
@@ -702,26 +702,26 @@ var us = wr((hs, gt) => {
702
702
  return this.safeParse(null).success;
703
703
  }
704
704
  }
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
- function $t(t) {
705
+ const Er = /^c[^\s-]{8,}$/i, Or = /^[0-9a-z]+$/, Nr = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Rr = /^[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, Ar = /^[a-z0-9_-]{21}$/i, Pr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Cr = /^[-+]?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)?)??$/, Ir = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Zr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
706
+ let nt;
707
+ const jr = /^(?:(?: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])$/, $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])\/(3[0-2]|[12]?[0-9])$/, Fr = /^(([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]))$/, 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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Lr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Dr = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Zt = "((\\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])))", Vr = new RegExp(`^${Zt}$`);
708
+ function jt(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 qr(t) {
713
- return new RegExp(`^${$t(t)}$`);
712
+ function zr(t) {
713
+ return new RegExp(`^${jt(t)}$`);
714
714
  }
715
- function Ft(t) {
716
- let e = `${jt}T${$t(t)}`;
715
+ function $t(t) {
716
+ let e = `${Zt}T${jt(t)}`;
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 Ur(t, e) {
721
- return !!((e === "v4" || !e) && $r.test(t) || (e === "v6" || !e) && Mr.test(t));
720
+ function qr(t, e) {
721
+ return !!((e === "v4" || !e) && jr.test(t) || (e === "v6" || !e) && Fr.test(t));
722
722
  }
723
- function Br(t, e) {
724
- if (!Cr.test(t))
723
+ function Ur(t, e) {
724
+ if (!Pr.test(t))
725
725
  return !1;
726
726
  try {
727
727
  const [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(n));
@@ -730,10 +730,10 @@ var us = wr((hs, gt) => {
730
730
  return !1;
731
731
  }
732
732
  }
733
- function Hr(t, e) {
734
- return !!((e === "v4" || !e) && Fr.test(t) || (e === "v6" || !e) && Lr.test(t));
733
+ function Br(t, e) {
734
+ return !!((e === "v4" || !e) && $r.test(t) || (e === "v6" || !e) && Mr.test(t));
735
735
  }
736
- class j extends _ {
736
+ class Z extends _ {
737
737
  _parse(e) {
738
738
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== p.string) {
739
739
  const a = this._getOrReturnCtx(e);
@@ -743,7 +743,7 @@ var us = wr((hs, gt) => {
743
743
  received: a.parsedType
744
744
  }), y;
745
745
  }
746
- const n = new R();
746
+ const n = new O();
747
747
  let s;
748
748
  for (const a of this._def.checks)
749
749
  if (a.kind === "min")
@@ -782,43 +782,43 @@ var us = wr((hs, gt) => {
782
782
  message: a.message
783
783
  }), n.dirty());
784
784
  } else if (a.kind === "email")
785
- Zr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
785
+ Ir.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
- at || (at = new RegExp(jr, "u")), at.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
791
+ nt || (nt = new RegExp(Zr, "u")), nt.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
- Ar.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
797
+ Rr.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
- Pr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
803
+ Ar.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
- Or.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
809
+ Er.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
- Nr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
815
+ Or.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
- Rr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
821
+ Nr.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
@@ -849,39 +849,39 @@ var us = wr((hs, gt) => {
849
849
  code: l.invalid_string,
850
850
  validation: { endsWith: a.value },
851
851
  message: a.message
852
- }), n.dirty()) : a.kind === "datetime" ? Ft(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
852
+ }), n.dirty()) : a.kind === "datetime" ? $t(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
853
853
  code: l.invalid_string,
854
854
  validation: "datetime",
855
855
  message: a.message
856
- }), n.dirty()) : a.kind === "date" ? zr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
856
+ }), n.dirty()) : a.kind === "date" ? Vr.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" ? qr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
860
+ }), n.dirty()) : a.kind === "time" ? zr(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
864
- }), n.dirty()) : a.kind === "duration" ? Ir.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
864
+ }), n.dirty()) : a.kind === "duration" ? Cr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
865
865
  validation: "duration",
866
866
  code: l.invalid_string,
867
867
  message: a.message
868
- }), n.dirty()) : a.kind === "ip" ? Ur(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
868
+ }), n.dirty()) : a.kind === "ip" ? qr(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" ? Br(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
872
+ }), n.dirty()) : a.kind === "jwt" ? Ur(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" ? Hr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
876
+ }), n.dirty()) : a.kind === "cidr" ? Br(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" ? Dr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
880
+ }), n.dirty()) : a.kind === "base64" ? Lr.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" ? Vr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
884
+ }), n.dirty()) : a.kind === "base64url" ? Dr.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
@@ -896,7 +896,7 @@ var us = wr((hs, gt) => {
896
896
  });
897
897
  }
898
898
  _addCheck(e) {
899
- return new j({
899
+ return new Z({
900
900
  ...this._def,
901
901
  checks: [...this._def.checks, e]
902
902
  });
@@ -953,10 +953,10 @@ var us = wr((hs, gt) => {
953
953
  message: e
954
954
  }) : this._addCheck({
955
955
  kind: "datetime",
956
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
957
- offset: (r = e == null ? void 0 : e.offset) !== null && r !== void 0 ? r : !1,
958
- local: (n = e == null ? void 0 : e.local) !== null && n !== void 0 ? n : !1,
959
- ...h.errToObj(e == null ? void 0 : e.message)
956
+ precision: typeof e?.precision > "u" ? null : e?.precision,
957
+ offset: (r = e?.offset) !== null && r !== void 0 ? r : !1,
958
+ local: (n = e?.local) !== null && n !== void 0 ? n : !1,
959
+ ...h.errToObj(e?.message)
960
960
  });
961
961
  }
962
962
  date(e) {
@@ -969,8 +969,8 @@ var us = wr((hs, gt) => {
969
969
  message: e
970
970
  }) : this._addCheck({
971
971
  kind: "time",
972
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
973
- ...h.errToObj(e == null ? void 0 : e.message)
972
+ precision: typeof e?.precision > "u" ? null : e?.precision,
973
+ ...h.errToObj(e?.message)
974
974
  });
975
975
  }
976
976
  duration(e) {
@@ -987,8 +987,8 @@ var us = wr((hs, gt) => {
987
987
  return this._addCheck({
988
988
  kind: "includes",
989
989
  value: e,
990
- position: r == null ? void 0 : r.position,
991
- ...h.errToObj(r == null ? void 0 : r.message)
990
+ position: r?.position,
991
+ ...h.errToObj(r?.message)
992
992
  });
993
993
  }
994
994
  startsWith(e, r) {
@@ -1033,19 +1033,19 @@ var us = wr((hs, gt) => {
1033
1033
  return this.min(1, h.errToObj(e));
1034
1034
  }
1035
1035
  trim() {
1036
- return new j({
1036
+ return new Z({
1037
1037
  ...this._def,
1038
1038
  checks: [...this._def.checks, { kind: "trim" }]
1039
1039
  });
1040
1040
  }
1041
1041
  toLowerCase() {
1042
- return new j({
1042
+ return new Z({
1043
1043
  ...this._def,
1044
1044
  checks: [...this._def.checks, { kind: "toLowerCase" }]
1045
1045
  });
1046
1046
  }
1047
1047
  toUpperCase() {
1048
- return new j({
1048
+ return new Z({
1049
1049
  ...this._def,
1050
1050
  checks: [...this._def.checks, { kind: "toUpperCase" }]
1051
1051
  });
@@ -1111,16 +1111,16 @@ var us = wr((hs, gt) => {
1111
1111
  return e;
1112
1112
  }
1113
1113
  }
1114
- j.create = (t) => {
1114
+ Z.create = (t) => {
1115
1115
  var e;
1116
- return new j({
1116
+ return new Z({
1117
1117
  checks: [],
1118
1118
  typeName: m.ZodString,
1119
- coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
1119
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
1120
1120
  ...v(t)
1121
1121
  });
1122
1122
  };
1123
- function Wr(t, e) {
1123
+ function Hr(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
  }
@@ -1138,7 +1138,7 @@ var us = wr((hs, gt) => {
1138
1138
  }), y;
1139
1139
  }
1140
1140
  let n;
1141
- const s = new R();
1141
+ const s = new O();
1142
1142
  for (const a of this._def.checks)
1143
1143
  a.kind === "int" ? k.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), f(n, {
1144
1144
  code: l.invalid_type,
@@ -1159,7 +1159,7 @@ var us = wr((hs, gt) => {
1159
1159
  inclusive: a.inclusive,
1160
1160
  exact: !1,
1161
1161
  message: a.message
1162
- }), s.dirty()) : a.kind === "multipleOf" ? Wr(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
1162
+ }), s.dirty()) : a.kind === "multipleOf" ? Hr(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
@@ -1293,7 +1293,7 @@ var us = wr((hs, gt) => {
1293
1293
  K.create = (t) => new K({
1294
1294
  checks: [],
1295
1295
  typeName: m.ZodNumber,
1296
- coerce: (t == null ? void 0 : t.coerce) || !1,
1296
+ coerce: t?.coerce || !1,
1297
1297
  ...v(t)
1298
1298
  });
1299
1299
  class G extends _ {
@@ -1310,7 +1310,7 @@ var us = wr((hs, gt) => {
1310
1310
  if (this._getType(e) !== p.bigint)
1311
1311
  return this._getInvalidInput(e);
1312
1312
  let n;
1313
- const s = new R();
1313
+ const s = new O();
1314
1314
  for (const a of this._def.checks)
1315
1315
  a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (n = this._getOrReturnCtx(e, n), f(n, {
1316
1316
  code: l.too_small,
@@ -1428,11 +1428,11 @@ var us = wr((hs, gt) => {
1428
1428
  return new G({
1429
1429
  checks: [],
1430
1430
  typeName: m.ZodBigInt,
1431
- coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
1431
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
1432
1432
  ...v(t)
1433
1433
  });
1434
1434
  };
1435
- class Ne extends _ {
1435
+ class Ee extends _ {
1436
1436
  _parse(e) {
1437
1437
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
1438
1438
  const n = this._getOrReturnCtx(e);
@@ -1442,15 +1442,15 @@ var us = wr((hs, gt) => {
1442
1442
  received: n.parsedType
1443
1443
  }), y;
1444
1444
  }
1445
- return P(e.data);
1445
+ return A(e.data);
1446
1446
  }
1447
1447
  }
1448
- Ne.create = (t) => new Ne({
1448
+ Ee.create = (t) => new Ee({
1449
1449
  typeName: m.ZodBoolean,
1450
- coerce: (t == null ? void 0 : t.coerce) || !1,
1450
+ coerce: t?.coerce || !1,
1451
1451
  ...v(t)
1452
1452
  });
1453
- class de extends _ {
1453
+ class ce extends _ {
1454
1454
  _parse(e) {
1455
1455
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== p.date) {
1456
1456
  const a = this._getOrReturnCtx(e);
@@ -1466,7 +1466,7 @@ var us = wr((hs, gt) => {
1466
1466
  code: l.invalid_date
1467
1467
  }), y;
1468
1468
  }
1469
- const n = new R();
1469
+ const n = new O();
1470
1470
  let s;
1471
1471
  for (const a of this._def.checks)
1472
1472
  a.kind === "min" ? e.data.getTime() < a.value && (s = this._getOrReturnCtx(e, s), f(s, {
@@ -1490,7 +1490,7 @@ var us = wr((hs, gt) => {
1490
1490
  };
1491
1491
  }
1492
1492
  _addCheck(e) {
1493
- return new de({
1493
+ return new ce({
1494
1494
  ...this._def,
1495
1495
  checks: [...this._def.checks, e]
1496
1496
  });
@@ -1522,13 +1522,13 @@ var us = wr((hs, gt) => {
1522
1522
  return e != null ? new Date(e) : null;
1523
1523
  }
1524
1524
  }
1525
- de.create = (t) => new de({
1525
+ ce.create = (t) => new ce({
1526
1526
  checks: [],
1527
- coerce: (t == null ? void 0 : t.coerce) || !1,
1527
+ coerce: t?.coerce || !1,
1528
1528
  typeName: m.ZodDate,
1529
1529
  ...v(t)
1530
1530
  });
1531
- class Ke extends _ {
1531
+ class Je extends _ {
1532
1532
  _parse(e) {
1533
1533
  if (this._getType(e) !== p.symbol) {
1534
1534
  const n = this._getOrReturnCtx(e);
@@ -1538,14 +1538,14 @@ var us = wr((hs, gt) => {
1538
1538
  received: n.parsedType
1539
1539
  }), y;
1540
1540
  }
1541
- return P(e.data);
1541
+ return A(e.data);
1542
1542
  }
1543
1543
  }
1544
- Ke.create = (t) => new Ke({
1544
+ Je.create = (t) => new Je({
1545
1545
  typeName: m.ZodSymbol,
1546
1546
  ...v(t)
1547
1547
  });
1548
- class Re extends _ {
1548
+ class Oe extends _ {
1549
1549
  _parse(e) {
1550
1550
  if (this._getType(e) !== p.undefined) {
1551
1551
  const n = this._getOrReturnCtx(e);
@@ -1555,14 +1555,14 @@ var us = wr((hs, gt) => {
1555
1555
  received: n.parsedType
1556
1556
  }), y;
1557
1557
  }
1558
- return P(e.data);
1558
+ return A(e.data);
1559
1559
  }
1560
1560
  }
1561
- Re.create = (t) => new Re({
1561
+ Oe.create = (t) => new Oe({
1562
1562
  typeName: m.ZodUndefined,
1563
1563
  ...v(t)
1564
1564
  });
1565
- class Ae extends _ {
1565
+ class Ne extends _ {
1566
1566
  _parse(e) {
1567
1567
  if (this._getType(e) !== p.null) {
1568
1568
  const n = this._getOrReturnCtx(e);
@@ -1572,38 +1572,38 @@ var us = wr((hs, gt) => {
1572
1572
  received: n.parsedType
1573
1573
  }), y;
1574
1574
  }
1575
- return P(e.data);
1575
+ return A(e.data);
1576
1576
  }
1577
1577
  }
1578
- Ae.create = (t) => new Ae({
1578
+ Ne.create = (t) => new Ne({
1579
1579
  typeName: m.ZodNull,
1580
1580
  ...v(t)
1581
1581
  });
1582
- class _e extends _ {
1582
+ class ge extends _ {
1583
1583
  constructor() {
1584
1584
  super(...arguments), this._any = !0;
1585
1585
  }
1586
1586
  _parse(e) {
1587
- return P(e.data);
1587
+ return A(e.data);
1588
1588
  }
1589
1589
  }
1590
- _e.create = (t) => new _e({
1590
+ ge.create = (t) => new ge({
1591
1591
  typeName: m.ZodAny,
1592
1592
  ...v(t)
1593
1593
  });
1594
- class oe extends _ {
1594
+ class ie extends _ {
1595
1595
  constructor() {
1596
1596
  super(...arguments), this._unknown = !0;
1597
1597
  }
1598
1598
  _parse(e) {
1599
- return P(e.data);
1599
+ return A(e.data);
1600
1600
  }
1601
1601
  }
1602
- oe.create = (t) => new oe({
1602
+ ie.create = (t) => new ie({
1603
1603
  typeName: m.ZodUnknown,
1604
1604
  ...v(t)
1605
1605
  });
1606
- class J extends _ {
1606
+ class W extends _ {
1607
1607
  _parse(e) {
1608
1608
  const r = this._getOrReturnCtx(e);
1609
1609
  return f(r, {
@@ -1613,11 +1613,11 @@ var us = wr((hs, gt) => {
1613
1613
  }), y;
1614
1614
  }
1615
1615
  }
1616
- J.create = (t) => new J({
1616
+ W.create = (t) => new W({
1617
1617
  typeName: m.ZodNever,
1618
1618
  ...v(t)
1619
1619
  });
1620
- class Ge extends _ {
1620
+ class Ye extends _ {
1621
1621
  _parse(e) {
1622
1622
  if (this._getType(e) !== p.undefined) {
1623
1623
  const n = this._getOrReturnCtx(e);
@@ -1627,14 +1627,14 @@ var us = wr((hs, gt) => {
1627
1627
  received: n.parsedType
1628
1628
  }), y;
1629
1629
  }
1630
- return P(e.data);
1630
+ return A(e.data);
1631
1631
  }
1632
1632
  }
1633
- Ge.create = (t) => new Ge({
1633
+ Ye.create = (t) => new Ye({
1634
1634
  typeName: m.ZodVoid,
1635
1635
  ...v(t)
1636
1636
  });
1637
- class $ extends _ {
1637
+ class j extends _ {
1638
1638
  _parse(e) {
1639
1639
  const { ctx: r, status: n } = this._processInputParams(e), s = this._def;
1640
1640
  if (r.parsedType !== p.array)
@@ -1670,27 +1670,27 @@ var us = wr((hs, gt) => {
1670
1670
  exact: !1,
1671
1671
  message: s.maxLength.message
1672
1672
  }), n.dirty()), r.common.async)
1673
- return Promise.all([...r.data].map((i, o) => s.type._parseAsync(new V(r, i, r.path, o)))).then((i) => R.mergeArray(n, i));
1674
- const a = [...r.data].map((i, o) => s.type._parseSync(new V(r, i, r.path, o)));
1675
- return R.mergeArray(n, a);
1673
+ return Promise.all([...r.data].map((i, o) => s.type._parseAsync(new D(r, i, r.path, o)))).then((i) => O.mergeArray(n, i));
1674
+ const a = [...r.data].map((i, o) => s.type._parseSync(new D(r, i, r.path, o)));
1675
+ return O.mergeArray(n, a);
1676
1676
  }
1677
1677
  get element() {
1678
1678
  return this._def.type;
1679
1679
  }
1680
1680
  min(e, r) {
1681
- return new $({
1681
+ return new j({
1682
1682
  ...this._def,
1683
1683
  minLength: { value: e, message: h.toString(r) }
1684
1684
  });
1685
1685
  }
1686
1686
  max(e, r) {
1687
- return new $({
1687
+ return new j({
1688
1688
  ...this._def,
1689
1689
  maxLength: { value: e, message: h.toString(r) }
1690
1690
  });
1691
1691
  }
1692
1692
  length(e, r) {
1693
- return new $({
1693
+ return new j({
1694
1694
  ...this._def,
1695
1695
  exactLength: { value: e, message: h.toString(r) }
1696
1696
  });
@@ -1699,7 +1699,7 @@ var us = wr((hs, gt) => {
1699
1699
  return this.min(1, e);
1700
1700
  }
1701
1701
  }
1702
- $.create = (t, e) => new $({
1702
+ j.create = (t, e) => new j({
1703
1703
  type: t,
1704
1704
  minLength: null,
1705
1705
  maxLength: null,
@@ -1707,23 +1707,23 @@ var us = wr((hs, gt) => {
1707
1707
  typeName: m.ZodArray,
1708
1708
  ...v(e)
1709
1709
  });
1710
- function fe(t) {
1711
- if (t instanceof E) {
1710
+ function le(t) {
1711
+ if (t instanceof T) {
1712
1712
  const e = {};
1713
1713
  for (const r in t.shape) {
1714
1714
  const n = t.shape[r];
1715
- e[r] = D.create(fe(n));
1715
+ e[r] = L.create(le(n));
1716
1716
  }
1717
- return new E({
1717
+ return new T({
1718
1718
  ...t._def,
1719
1719
  shape: () => e
1720
1720
  });
1721
- } else return t instanceof $ ? new $({
1721
+ } else return t instanceof j ? new j({
1722
1722
  ...t._def,
1723
- type: fe(t.element)
1724
- }) : t instanceof D ? D.create(fe(t.unwrap())) : t instanceof Q ? Q.create(fe(t.unwrap())) : t instanceof z ? z.create(t.items.map((e) => fe(e))) : t;
1723
+ type: le(t.element)
1724
+ }) : t instanceof L ? L.create(le(t.unwrap())) : t instanceof Q ? Q.create(le(t.unwrap())) : t instanceof V ? V.create(t.items.map((e) => le(e))) : t;
1725
1725
  }
1726
- class E extends _ {
1726
+ class T extends _ {
1727
1727
  constructor() {
1728
1728
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1729
1729
  }
@@ -1743,7 +1743,7 @@ var us = wr((hs, gt) => {
1743
1743
  }), y;
1744
1744
  }
1745
1745
  const { status: n, ctx: s } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), o = [];
1746
- if (!(this._def.catchall instanceof J && this._def.unknownKeys === "strip"))
1746
+ if (!(this._def.catchall instanceof W && this._def.unknownKeys === "strip"))
1747
1747
  for (const d in s.data)
1748
1748
  i.includes(d) || o.push(d);
1749
1749
  const c = [];
@@ -1751,11 +1751,11 @@ var us = wr((hs, gt) => {
1751
1751
  const u = a[d], w = s.data[d];
1752
1752
  c.push({
1753
1753
  key: { status: "valid", value: d },
1754
- value: u._parse(new V(s, w, s.path, d)),
1754
+ value: u._parse(new D(s, w, s.path, d)),
1755
1755
  alwaysSet: d in s.data
1756
1756
  });
1757
1757
  }
1758
- if (this._def.catchall instanceof J) {
1758
+ if (this._def.catchall instanceof W) {
1759
1759
  const d = this._def.unknownKeys;
1760
1760
  if (d === "passthrough")
1761
1761
  for (const u of o)
@@ -1776,7 +1776,7 @@ var us = wr((hs, gt) => {
1776
1776
  c.push({
1777
1777
  key: { status: "valid", value: u },
1778
1778
  value: d._parse(
1779
- new V(s, w, s.path, u)
1779
+ new D(s, w, s.path, u)
1780
1780
  //, ctx.child(key), value, getParsedType(value)
1781
1781
  ),
1782
1782
  alwaysSet: u in s.data
@@ -1794,13 +1794,13 @@ var us = wr((hs, gt) => {
1794
1794
  });
1795
1795
  }
1796
1796
  return d;
1797
- }).then((d) => R.mergeObjectSync(n, d)) : R.mergeObjectSync(n, c);
1797
+ }).then((d) => O.mergeObjectSync(n, d)) : O.mergeObjectSync(n, c);
1798
1798
  }
1799
1799
  get shape() {
1800
1800
  return this._def.shape();
1801
1801
  }
1802
1802
  strict(e) {
1803
- return h.errToObj, new E({
1803
+ return h.errToObj, new T({
1804
1804
  ...this._def,
1805
1805
  unknownKeys: "strict",
1806
1806
  ...e !== void 0 ? {
@@ -1817,13 +1817,13 @@ var us = wr((hs, gt) => {
1817
1817
  });
1818
1818
  }
1819
1819
  strip() {
1820
- return new E({
1820
+ return new T({
1821
1821
  ...this._def,
1822
1822
  unknownKeys: "strip"
1823
1823
  });
1824
1824
  }
1825
1825
  passthrough() {
1826
- return new E({
1826
+ return new T({
1827
1827
  ...this._def,
1828
1828
  unknownKeys: "passthrough"
1829
1829
  });
@@ -1846,7 +1846,7 @@ var us = wr((hs, gt) => {
1846
1846
  // }) as any;
1847
1847
  // };
1848
1848
  extend(e) {
1849
- return new E({
1849
+ return new T({
1850
1850
  ...this._def,
1851
1851
  shape: () => ({
1852
1852
  ...this._def.shape(),
@@ -1860,7 +1860,7 @@ var us = wr((hs, gt) => {
1860
1860
  * upgrade if you are experiencing issues.
1861
1861
  */
1862
1862
  merge(e) {
1863
- return new E({
1863
+ return new T({
1864
1864
  unknownKeys: e._def.unknownKeys,
1865
1865
  catchall: e._def.catchall,
1866
1866
  shape: () => ({
@@ -1930,7 +1930,7 @@ var us = wr((hs, gt) => {
1930
1930
  // return merged;
1931
1931
  // }
1932
1932
  catchall(e) {
1933
- return new E({
1933
+ return new T({
1934
1934
  ...this._def,
1935
1935
  catchall: e
1936
1936
  });
@@ -1939,7 +1939,7 @@ var us = wr((hs, gt) => {
1939
1939
  const r = {};
1940
1940
  return k.objectKeys(e).forEach((n) => {
1941
1941
  e[n] && this.shape[n] && (r[n] = this.shape[n]);
1942
- }), new E({
1942
+ }), new T({
1943
1943
  ...this._def,
1944
1944
  shape: () => r
1945
1945
  });
@@ -1948,7 +1948,7 @@ var us = wr((hs, gt) => {
1948
1948
  const r = {};
1949
1949
  return k.objectKeys(this.shape).forEach((n) => {
1950
1950
  e[n] || (r[n] = this.shape[n]);
1951
- }), new E({
1951
+ }), new T({
1952
1952
  ...this._def,
1953
1953
  shape: () => r
1954
1954
  });
@@ -1957,14 +1957,14 @@ var us = wr((hs, gt) => {
1957
1957
  * @deprecated
1958
1958
  */
1959
1959
  deepPartial() {
1960
- return fe(this);
1960
+ return le(this);
1961
1961
  }
1962
1962
  partial(e) {
1963
1963
  const r = {};
1964
1964
  return k.objectKeys(this.shape).forEach((n) => {
1965
1965
  const s = this.shape[n];
1966
1966
  e && !e[n] ? r[n] = s : r[n] = s.optional();
1967
- }), new E({
1967
+ }), new T({
1968
1968
  ...this._def,
1969
1969
  shape: () => r
1970
1970
  });
@@ -1976,41 +1976,41 @@ var us = wr((hs, gt) => {
1976
1976
  r[n] = this.shape[n];
1977
1977
  else {
1978
1978
  let a = this.shape[n];
1979
- for (; a instanceof D; )
1979
+ for (; a instanceof L; )
1980
1980
  a = a._def.innerType;
1981
1981
  r[n] = a;
1982
1982
  }
1983
- }), new E({
1983
+ }), new T({
1984
1984
  ...this._def,
1985
1985
  shape: () => r
1986
1986
  });
1987
1987
  }
1988
1988
  keyof() {
1989
- return Mt(k.objectKeys(this.shape));
1989
+ return Ft(k.objectKeys(this.shape));
1990
1990
  }
1991
1991
  }
1992
- E.create = (t, e) => new E({
1992
+ T.create = (t, e) => new T({
1993
1993
  shape: () => t,
1994
1994
  unknownKeys: "strip",
1995
- catchall: J.create(),
1995
+ catchall: W.create(),
1996
1996
  typeName: m.ZodObject,
1997
1997
  ...v(e)
1998
1998
  });
1999
- E.strictCreate = (t, e) => new E({
1999
+ T.strictCreate = (t, e) => new T({
2000
2000
  shape: () => t,
2001
2001
  unknownKeys: "strict",
2002
- catchall: J.create(),
2002
+ catchall: W.create(),
2003
2003
  typeName: m.ZodObject,
2004
2004
  ...v(e)
2005
2005
  });
2006
- E.lazycreate = (t, e) => new E({
2006
+ T.lazycreate = (t, e) => new T({
2007
2007
  shape: t,
2008
2008
  unknownKeys: "strip",
2009
- catchall: J.create(),
2009
+ catchall: W.create(),
2010
2010
  typeName: m.ZodObject,
2011
2011
  ...v(e)
2012
2012
  });
2013
- class Pe extends _ {
2013
+ class Re 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 us = wr((hs, gt) => {
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 I(o.ctx.common.issues));
2023
+ const i = a.map((o) => new C(o.ctx.common.issues));
2024
2024
  return f(r, {
2025
2025
  code: l.invalid_union,
2026
2026
  unionErrors: i
@@ -2067,7 +2067,7 @@ var us = wr((hs, gt) => {
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 I(c));
2070
+ const o = i.map((c) => new C(c));
2071
2071
  return f(r, {
2072
2072
  code: l.invalid_union,
2073
2073
  unionErrors: o
@@ -2078,13 +2078,13 @@ var us = wr((hs, gt) => {
2078
2078
  return this._def.options;
2079
2079
  }
2080
2080
  }
2081
- Pe.create = (t, e) => new Pe({
2081
+ Re.create = (t, e) => new Re({
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 vt || t instanceof Le ? B(t.unwrap()) : t instanceof Me ? B(t._def.innerType) : [];
2087
- class rt extends _ {
2086
+ const U = (t) => t instanceof Ce ? U(t.schema) : t instanceof $ ? U(t.innerType()) : t instanceof Ie ? [t.value] : t instanceof X ? t.options : t instanceof Ze ? k.objectValues(t.enum) : t instanceof je ? U(t._def.innerType) : t instanceof Oe ? [void 0] : t instanceof Ne ? [null] : t instanceof L ? [void 0, ...U(t.unwrap())] : t instanceof Q ? [null, ...U(t.unwrap())] : t instanceof yt || t instanceof Fe ? U(t.unwrap()) : t instanceof $e ? U(t._def.innerType) : [];
2087
+ class et extends _ {
2088
2088
  _parse(e) {
2089
2089
  const { ctx: r } = this._processInputParams(e);
2090
2090
  if (r.parsedType !== p.object)
@@ -2128,7 +2128,7 @@ var us = wr((hs, gt) => {
2128
2128
  static create(e, r, n) {
2129
2129
  const s = /* @__PURE__ */ new Map();
2130
2130
  for (const a of r) {
2131
- const i = B(a.shape[e]);
2131
+ const i = U(a.shape[e]);
2132
2132
  if (!i.length)
2133
2133
  throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
2134
2134
  for (const o of i) {
@@ -2137,7 +2137,7 @@ var us = wr((hs, gt) => {
2137
2137
  s.set(o, a);
2138
2138
  }
2139
2139
  }
2140
- return new rt({
2140
+ return new et({
2141
2141
  typeName: m.ZodDiscriminatedUnion,
2142
2142
  discriminator: e,
2143
2143
  options: r,
@@ -2146,14 +2146,14 @@ var us = wr((hs, gt) => {
2146
2146
  });
2147
2147
  }
2148
2148
  }
2149
- function ut(t, e) {
2150
- const r = H(t), n = H(e);
2149
+ function dt(t, e) {
2150
+ const r = B(t), n = B(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 = ut(t[o], e[o]);
2156
+ const c = dt(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 us = wr((hs, gt) => {
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 = ut(i, o);
2167
+ const i = t[a], o = e[a], c = dt(i, o);
2168
2168
  if (!c.valid)
2169
2169
  return { valid: !1 };
2170
2170
  s.push(c.data);
@@ -2172,13 +2172,13 @@ var us = wr((hs, gt) => {
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 Ce extends _ {
2175
+ class Ae extends _ {
2176
2176
  _parse(e) {
2177
2177
  const { status: r, ctx: n } = this._processInputParams(e), s = (a, i) => {
2178
- if (dt(a) || dt(i))
2178
+ if (ot(a) || ot(i))
2179
2179
  return y;
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, {
2180
+ const o = dt(a.value, i.value);
2181
+ return o.valid ? ((ct(a) || ct(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
2182
2182
  code: l.invalid_intersection_types
2183
2183
  }), y);
2184
2184
  };
@@ -2204,13 +2204,13 @@ var us = wr((hs, gt) => {
2204
2204
  }));
2205
2205
  }
2206
2206
  }
2207
- Ce.create = (t, e, r) => new Ce({
2207
+ Ae.create = (t, e, r) => new Ae({
2208
2208
  left: t,
2209
2209
  right: e,
2210
2210
  typeName: m.ZodIntersection,
2211
2211
  ...v(r)
2212
2212
  });
2213
- class z extends _ {
2213
+ class V extends _ {
2214
2214
  _parse(e) {
2215
2215
  const { status: r, ctx: n } = this._processInputParams(e);
2216
2216
  if (n.parsedType !== p.array)
@@ -2236,31 +2236,31 @@ var us = wr((hs, gt) => {
2236
2236
  }), r.dirty());
2237
2237
  const a = [...n.data].map((i, o) => {
2238
2238
  const c = this._def.items[o] || this._def.rest;
2239
- return c ? c._parse(new V(n, i, n.path, o)) : null;
2239
+ return c ? c._parse(new D(n, i, n.path, o)) : null;
2240
2240
  }).filter((i) => !!i);
2241
- return n.common.async ? Promise.all(a).then((i) => R.mergeArray(r, i)) : R.mergeArray(r, a);
2241
+ return n.common.async ? Promise.all(a).then((i) => O.mergeArray(r, i)) : O.mergeArray(r, a);
2242
2242
  }
2243
2243
  get items() {
2244
2244
  return this._def.items;
2245
2245
  }
2246
2246
  rest(e) {
2247
- return new z({
2247
+ return new V({
2248
2248
  ...this._def,
2249
2249
  rest: e
2250
2250
  });
2251
2251
  }
2252
2252
  }
2253
- z.create = (t, e) => {
2253
+ V.create = (t, e) => {
2254
2254
  if (!Array.isArray(t))
2255
2255
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2256
- return new z({
2256
+ return new V({
2257
2257
  items: t,
2258
2258
  typeName: m.ZodTuple,
2259
2259
  rest: null,
2260
2260
  ...v(e)
2261
2261
  });
2262
2262
  };
2263
- class Ie extends _ {
2263
+ class Pe extends _ {
2264
2264
  get keySchema() {
2265
2265
  return this._def.keyType;
2266
2266
  }
@@ -2278,30 +2278,30 @@ var us = wr((hs, gt) => {
2278
2278
  const s = [], a = this._def.keyType, i = this._def.valueType;
2279
2279
  for (const o in n.data)
2280
2280
  s.push({
2281
- key: a._parse(new V(n, o, n.path, o)),
2282
- value: i._parse(new V(n, n.data[o], n.path, o)),
2281
+ key: a._parse(new D(n, o, n.path, o)),
2282
+ value: i._parse(new D(n, n.data[o], n.path, o)),
2283
2283
  alwaysSet: o in n.data
2284
2284
  });
2285
- return n.common.async ? R.mergeObjectAsync(r, s) : R.mergeObjectSync(r, s);
2285
+ return n.common.async ? O.mergeObjectAsync(r, s) : O.mergeObjectSync(r, s);
2286
2286
  }
2287
2287
  get element() {
2288
2288
  return this._def.valueType;
2289
2289
  }
2290
2290
  static create(e, r, n) {
2291
- return r instanceof _ ? new Ie({
2291
+ return r instanceof _ ? new Pe({
2292
2292
  keyType: e,
2293
2293
  valueType: r,
2294
2294
  typeName: m.ZodRecord,
2295
2295
  ...v(n)
2296
- }) : new Ie({
2297
- keyType: j.create(),
2296
+ }) : new Pe({
2297
+ keyType: Z.create(),
2298
2298
  valueType: e,
2299
2299
  typeName: m.ZodRecord,
2300
2300
  ...v(r)
2301
2301
  });
2302
2302
  }
2303
2303
  }
2304
- class Xe extends _ {
2304
+ class Ke extends _ {
2305
2305
  get keySchema() {
2306
2306
  return this._def.keyType;
2307
2307
  }
@@ -2317,8 +2317,8 @@ var us = wr((hs, gt) => {
2317
2317
  received: n.parsedType
2318
2318
  }), y;
2319
2319
  const s = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o, c], d) => ({
2320
- key: s._parse(new V(n, o, n.path, [d, "key"])),
2321
- value: a._parse(new V(n, c, n.path, [d, "value"]))
2320
+ key: s._parse(new D(n, o, n.path, [d, "key"])),
2321
+ value: a._parse(new D(n, c, n.path, [d, "value"]))
2322
2322
  }));
2323
2323
  if (n.common.async) {
2324
2324
  const o = /* @__PURE__ */ new Map();
@@ -2343,13 +2343,13 @@ var us = wr((hs, gt) => {
2343
2343
  }
2344
2344
  }
2345
2345
  }
2346
- Xe.create = (t, e, r) => new Xe({
2346
+ Ke.create = (t, e, r) => new Ke({
2347
2347
  valueType: e,
2348
2348
  keyType: t,
2349
2349
  typeName: m.ZodMap,
2350
2350
  ...v(r)
2351
2351
  });
2352
- class le extends _ {
2352
+ class de extends _ {
2353
2353
  _parse(e) {
2354
2354
  const { status: r, ctx: n } = this._processInputParams(e);
2355
2355
  if (n.parsedType !== p.set)
@@ -2384,17 +2384,17 @@ var us = wr((hs, gt) => {
2384
2384
  }
2385
2385
  return { status: r.value, value: d };
2386
2386
  }
2387
- const o = [...n.data.values()].map((c, d) => a._parse(new V(n, c, n.path, d)));
2387
+ const o = [...n.data.values()].map((c, d) => a._parse(new D(n, c, n.path, d)));
2388
2388
  return n.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
2389
2389
  }
2390
2390
  min(e, r) {
2391
- return new le({
2391
+ return new de({
2392
2392
  ...this._def,
2393
2393
  minSize: { value: e, message: h.toString(r) }
2394
2394
  });
2395
2395
  }
2396
2396
  max(e, r) {
2397
- return new le({
2397
+ return new de({
2398
2398
  ...this._def,
2399
2399
  maxSize: { value: e, message: h.toString(r) }
2400
2400
  });
@@ -2406,14 +2406,14 @@ var us = wr((hs, gt) => {
2406
2406
  return this.min(1, e);
2407
2407
  }
2408
2408
  }
2409
- le.create = (t, e) => new le({
2409
+ de.create = (t, e) => new de({
2410
2410
  valueType: t,
2411
2411
  minSize: null,
2412
2412
  maxSize: null,
2413
2413
  typeName: m.ZodSet,
2414
2414
  ...v(e)
2415
2415
  });
2416
- class ge extends _ {
2416
+ class me extends _ {
2417
2417
  constructor() {
2418
2418
  super(...arguments), this.validate = this.implement;
2419
2419
  }
@@ -2426,14 +2426,14 @@ var us = wr((hs, gt) => {
2426
2426
  received: r.parsedType
2427
2427
  }), y;
2428
2428
  function n(o, c) {
2429
- return Je({
2429
+ return He({
2430
2430
  data: o,
2431
2431
  path: r.path,
2432
2432
  errorMaps: [
2433
2433
  r.common.contextualErrorMap,
2434
2434
  r.schemaErrorMap,
2435
- We(),
2436
- ve
2435
+ Be(),
2436
+ ye
2437
2437
  ].filter((d) => !!d),
2438
2438
  issueData: {
2439
2439
  code: l.invalid_arguments,
@@ -2442,14 +2442,14 @@ var us = wr((hs, gt) => {
2442
2442
  });
2443
2443
  }
2444
2444
  function s(o, c) {
2445
- return Je({
2445
+ return He({
2446
2446
  data: o,
2447
2447
  path: r.path,
2448
2448
  errorMaps: [
2449
2449
  r.common.contextualErrorMap,
2450
2450
  r.schemaErrorMap,
2451
- We(),
2452
- ve
2451
+ Be(),
2452
+ ye
2453
2453
  ].filter((d) => !!d),
2454
2454
  issueData: {
2455
2455
  code: l.invalid_return_type,
@@ -2458,25 +2458,25 @@ var us = wr((hs, gt) => {
2458
2458
  });
2459
2459
  }
2460
2460
  const a = { errorMap: r.common.contextualErrorMap }, i = r.data;
2461
- if (this._def.returns instanceof we) {
2461
+ if (this._def.returns instanceof ve) {
2462
2462
  const o = this;
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;
2463
+ return A(async function(...c) {
2464
+ const d = new C([]), u = await o._def.args.parseAsync(c, a).catch((P) => {
2465
+ throw d.addIssue(n(c, P)), d;
2466
2466
  }), w = await Reflect.apply(i, this, u);
2467
- return await o._def.returns._def.type.parseAsync(w, a).catch((C) => {
2468
- throw d.addIssue(s(w, C)), d;
2467
+ return await o._def.returns._def.type.parseAsync(w, a).catch((P) => {
2468
+ throw d.addIssue(s(w, P)), d;
2469
2469
  });
2470
2470
  });
2471
2471
  } else {
2472
2472
  const o = this;
2473
- return P(function(...c) {
2473
+ return A(function(...c) {
2474
2474
  const d = o._def.args.safeParse(c, a);
2475
2475
  if (!d.success)
2476
- throw new I([n(c, d.error)]);
2476
+ throw new C([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 I([s(u, w.error)]);
2479
+ throw new C([s(u, w.error)]);
2480
2480
  return w.data;
2481
2481
  });
2482
2482
  }
@@ -2488,13 +2488,13 @@ var us = wr((hs, gt) => {
2488
2488
  return this._def.returns;
2489
2489
  }
2490
2490
  args(...e) {
2491
- return new ge({
2491
+ return new me({
2492
2492
  ...this._def,
2493
- args: z.create(e).rest(oe.create())
2493
+ args: V.create(e).rest(ie.create())
2494
2494
  });
2495
2495
  }
2496
2496
  returns(e) {
2497
- return new ge({
2497
+ return new me({
2498
2498
  ...this._def,
2499
2499
  returns: e
2500
2500
  });
@@ -2506,15 +2506,15 @@ var us = wr((hs, gt) => {
2506
2506
  return this.parse(e);
2507
2507
  }
2508
2508
  static create(e, r, n) {
2509
- return new ge({
2510
- args: e || z.create([]).rest(oe.create()),
2511
- returns: r || oe.create(),
2509
+ return new me({
2510
+ args: e || V.create([]).rest(ie.create()),
2511
+ returns: r || ie.create(),
2512
2512
  typeName: m.ZodFunction,
2513
2513
  ...v(n)
2514
2514
  });
2515
2515
  }
2516
2516
  }
2517
- class Ze extends _ {
2517
+ class Ce extends _ {
2518
2518
  get schema() {
2519
2519
  return this._def.getter();
2520
2520
  }
@@ -2523,12 +2523,12 @@ var us = wr((hs, gt) => {
2523
2523
  return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
2524
2524
  }
2525
2525
  }
2526
- Ze.create = (t, e) => new Ze({
2526
+ Ce.create = (t, e) => new Ce({
2527
2527
  getter: t,
2528
2528
  typeName: m.ZodLazy,
2529
2529
  ...v(e)
2530
2530
  });
2531
- class je extends _ {
2531
+ class Ie extends _ {
2532
2532
  _parse(e) {
2533
2533
  if (e.data !== this._def.value) {
2534
2534
  const r = this._getOrReturnCtx(e);
@@ -2544,12 +2544,12 @@ var us = wr((hs, gt) => {
2544
2544
  return this._def.value;
2545
2545
  }
2546
2546
  }
2547
- je.create = (t, e) => new je({
2547
+ Ie.create = (t, e) => new Ie({
2548
2548
  value: t,
2549
2549
  typeName: m.ZodLiteral,
2550
2550
  ...v(e)
2551
2551
  });
2552
- function Mt(t, e) {
2552
+ function Ft(t, e) {
2553
2553
  return new X({
2554
2554
  values: t,
2555
2555
  typeName: m.ZodEnum,
@@ -2558,7 +2558,7 @@ var us = wr((hs, gt) => {
2558
2558
  }
2559
2559
  class X extends _ {
2560
2560
  constructor() {
2561
- super(...arguments), Te.set(this, void 0);
2561
+ super(...arguments), xe.set(this, void 0);
2562
2562
  }
2563
2563
  _parse(e) {
2564
2564
  if (typeof e.data != "string") {
@@ -2569,7 +2569,7 @@ var us = wr((hs, gt) => {
2569
2569
  code: l.invalid_type
2570
2570
  }), y;
2571
2571
  }
2572
- if (Ye(this, Te) || Zt(this, Te, new Set(this._def.values)), !Ye(this, Te).has(e.data)) {
2572
+ if (We(this, xe) || It(this, xe, new Set(this._def.values)), !We(this, xe).has(e.data)) {
2573
2573
  const r = this._getOrReturnCtx(e), n = this._def.values;
2574
2574
  return f(r, {
2575
2575
  received: r.data,
@@ -2577,7 +2577,7 @@ var us = wr((hs, gt) => {
2577
2577
  options: n
2578
2578
  }), y;
2579
2579
  }
2580
- return P(e.data);
2580
+ return A(e.data);
2581
2581
  }
2582
2582
  get options() {
2583
2583
  return this._def.values;
@@ -2613,11 +2613,11 @@ var us = wr((hs, gt) => {
2613
2613
  });
2614
2614
  }
2615
2615
  }
2616
- Te = /* @__PURE__ */ new WeakMap();
2617
- X.create = Mt;
2618
- class $e extends _ {
2616
+ xe = /* @__PURE__ */ new WeakMap();
2617
+ X.create = Ft;
2618
+ class Ze extends _ {
2619
2619
  constructor() {
2620
- super(...arguments), Ee.set(this, void 0);
2620
+ super(...arguments), Se.set(this, void 0);
2621
2621
  }
2622
2622
  _parse(e) {
2623
2623
  const r = k.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
@@ -2629,7 +2629,7 @@ var us = wr((hs, gt) => {
2629
2629
  code: l.invalid_type
2630
2630
  }), y;
2631
2631
  }
2632
- if (Ye(this, Ee) || Zt(this, Ee, new Set(k.getValidEnumValues(this._def.values))), !Ye(this, Ee).has(e.data)) {
2632
+ if (We(this, Se) || It(this, Se, new Set(k.getValidEnumValues(this._def.values))), !We(this, Se).has(e.data)) {
2633
2633
  const s = k.objectValues(r);
2634
2634
  return f(n, {
2635
2635
  received: n.data,
@@ -2637,19 +2637,19 @@ var us = wr((hs, gt) => {
2637
2637
  options: s
2638
2638
  }), y;
2639
2639
  }
2640
- return P(e.data);
2640
+ return A(e.data);
2641
2641
  }
2642
2642
  get enum() {
2643
2643
  return this._def.values;
2644
2644
  }
2645
2645
  }
2646
- Ee = /* @__PURE__ */ new WeakMap();
2647
- $e.create = (t, e) => new $e({
2646
+ Se = /* @__PURE__ */ new WeakMap();
2647
+ Ze.create = (t, e) => new Ze({
2648
2648
  values: t,
2649
2649
  typeName: m.ZodNativeEnum,
2650
2650
  ...v(e)
2651
2651
  });
2652
- class we extends _ {
2652
+ class ve extends _ {
2653
2653
  unwrap() {
2654
2654
  return this._def.type;
2655
2655
  }
@@ -2662,18 +2662,18 @@ var us = wr((hs, gt) => {
2662
2662
  received: r.parsedType
2663
2663
  }), y;
2664
2664
  const n = r.parsedType === p.promise ? r.data : Promise.resolve(r.data);
2665
- return P(n.then((s) => this._def.type.parseAsync(s, {
2665
+ return A(n.then((s) => this._def.type.parseAsync(s, {
2666
2666
  path: r.path,
2667
2667
  errorMap: r.common.contextualErrorMap
2668
2668
  })));
2669
2669
  }
2670
2670
  }
2671
- we.create = (t, e) => new we({
2671
+ ve.create = (t, e) => new ve({
2672
2672
  type: t,
2673
2673
  typeName: m.ZodPromise,
2674
2674
  ...v(e)
2675
2675
  });
2676
- class F extends _ {
2676
+ class $ extends _ {
2677
2677
  innerType() {
2678
2678
  return this._def.schema;
2679
2679
  }
@@ -2700,7 +2700,7 @@ var us = wr((hs, gt) => {
2700
2700
  path: n.path,
2701
2701
  parent: n
2702
2702
  });
2703
- return c.status === "aborted" ? y : c.status === "dirty" || r.value === "dirty" ? ye(c.value) : c;
2703
+ return c.status === "aborted" ? y : c.status === "dirty" || r.value === "dirty" ? he(c.value) : c;
2704
2704
  });
2705
2705
  {
2706
2706
  if (r.value === "aborted")
@@ -2710,7 +2710,7 @@ var us = wr((hs, gt) => {
2710
2710
  path: n.path,
2711
2711
  parent: n
2712
2712
  });
2713
- return o.status === "aborted" ? y : o.status === "dirty" || r.value === "dirty" ? ye(o.value) : o;
2713
+ return o.status === "aborted" ? y : o.status === "dirty" || r.value === "dirty" ? he(o.value) : o;
2714
2714
  }
2715
2715
  }
2716
2716
  if (s.type === "refinement") {
@@ -2739,45 +2739,45 @@ var us = wr((hs, gt) => {
2739
2739
  path: n.path,
2740
2740
  parent: n
2741
2741
  });
2742
- if (!ce(i))
2742
+ if (!oe(i))
2743
2743
  return i;
2744
2744
  const o = s.transform(i.value, a);
2745
2745
  if (o instanceof Promise)
2746
2746
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2747
2747
  return { status: r.value, value: o };
2748
2748
  } else
2749
- return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => ce(i) ? Promise.resolve(s.transform(i.value, a)).then((o) => ({ status: r.value, value: o })) : i);
2749
+ return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => oe(i) ? Promise.resolve(s.transform(i.value, a)).then((o) => ({ status: r.value, value: o })) : i);
2750
2750
  k.assertNever(s);
2751
2751
  }
2752
2752
  }
2753
- F.create = (t, e, r) => new F({
2753
+ $.create = (t, e, r) => new $({
2754
2754
  schema: t,
2755
2755
  typeName: m.ZodEffects,
2756
2756
  effect: e,
2757
2757
  ...v(r)
2758
2758
  });
2759
- F.createWithPreprocess = (t, e, r) => new F({
2759
+ $.createWithPreprocess = (t, e, r) => new $({
2760
2760
  schema: e,
2761
2761
  effect: { type: "preprocess", transform: t },
2762
2762
  typeName: m.ZodEffects,
2763
2763
  ...v(r)
2764
2764
  });
2765
- class D extends _ {
2765
+ class L extends _ {
2766
2766
  _parse(e) {
2767
- return this._getType(e) === p.undefined ? P(void 0) : this._def.innerType._parse(e);
2767
+ return this._getType(e) === p.undefined ? A(void 0) : this._def.innerType._parse(e);
2768
2768
  }
2769
2769
  unwrap() {
2770
2770
  return this._def.innerType;
2771
2771
  }
2772
2772
  }
2773
- D.create = (t, e) => new D({
2773
+ L.create = (t, e) => new L({
2774
2774
  innerType: t,
2775
2775
  typeName: m.ZodOptional,
2776
2776
  ...v(e)
2777
2777
  });
2778
2778
  class Q extends _ {
2779
2779
  _parse(e) {
2780
- return this._getType(e) === p.null ? P(null) : this._def.innerType._parse(e);
2780
+ return this._getType(e) === p.null ? A(null) : this._def.innerType._parse(e);
2781
2781
  }
2782
2782
  unwrap() {
2783
2783
  return this._def.innerType;
@@ -2788,7 +2788,7 @@ var us = wr((hs, gt) => {
2788
2788
  typeName: m.ZodNullable,
2789
2789
  ...v(e)
2790
2790
  });
2791
- class Fe extends _ {
2791
+ class je extends _ {
2792
2792
  _parse(e) {
2793
2793
  const { ctx: r } = this._processInputParams(e);
2794
2794
  let n = r.data;
@@ -2802,13 +2802,13 @@ var us = wr((hs, gt) => {
2802
2802
  return this._def.innerType;
2803
2803
  }
2804
2804
  }
2805
- Fe.create = (t, e) => new Fe({
2805
+ je.create = (t, e) => new je({
2806
2806
  innerType: t,
2807
2807
  typeName: m.ZodDefault,
2808
2808
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2809
2809
  ...v(e)
2810
2810
  });
2811
- class Me extends _ {
2811
+ class $e extends _ {
2812
2812
  _parse(e) {
2813
2813
  const { ctx: r } = this._processInputParams(e), n = {
2814
2814
  ...r,
@@ -2823,11 +2823,11 @@ var us = wr((hs, gt) => {
2823
2823
  ...n
2824
2824
  }
2825
2825
  });
2826
- return Oe(s) ? s.then((a) => ({
2826
+ return Te(s) ? s.then((a) => ({
2827
2827
  status: "valid",
2828
2828
  value: a.status === "valid" ? a.value : this._def.catchValue({
2829
2829
  get error() {
2830
- return new I(n.common.issues);
2830
+ return new C(n.common.issues);
2831
2831
  },
2832
2832
  input: n.data
2833
2833
  })
@@ -2835,7 +2835,7 @@ var us = wr((hs, gt) => {
2835
2835
  status: "valid",
2836
2836
  value: s.status === "valid" ? s.value : this._def.catchValue({
2837
2837
  get error() {
2838
- return new I(n.common.issues);
2838
+ return new C(n.common.issues);
2839
2839
  },
2840
2840
  input: n.data
2841
2841
  })
@@ -2845,13 +2845,13 @@ var us = wr((hs, gt) => {
2845
2845
  return this._def.innerType;
2846
2846
  }
2847
2847
  }
2848
- Me.create = (t, e) => new Me({
2848
+ $e.create = (t, e) => new $e({
2849
2849
  innerType: t,
2850
2850
  typeName: m.ZodCatch,
2851
2851
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2852
2852
  ...v(e)
2853
2853
  });
2854
- class Qe extends _ {
2854
+ class Ge extends _ {
2855
2855
  _parse(e) {
2856
2856
  if (this._getType(e) !== p.nan) {
2857
2857
  const n = this._getOrReturnCtx(e);
@@ -2864,12 +2864,12 @@ var us = wr((hs, gt) => {
2864
2864
  return { status: "valid", value: e.data };
2865
2865
  }
2866
2866
  }
2867
- Qe.create = (t) => new Qe({
2867
+ Ge.create = (t) => new Ge({
2868
2868
  typeName: m.ZodNaN,
2869
2869
  ...v(t)
2870
2870
  });
2871
- const Jr = Symbol("zod_brand");
2872
- class vt extends _ {
2871
+ const Wr = Symbol("zod_brand");
2872
+ class yt extends _ {
2873
2873
  _parse(e) {
2874
2874
  const { ctx: r } = this._processInputParams(e), n = r.data;
2875
2875
  return this._def.type._parse({
@@ -2882,7 +2882,7 @@ var us = wr((hs, gt) => {
2882
2882
  return this._def.type;
2883
2883
  }
2884
2884
  }
2885
- class De extends _ {
2885
+ class Me extends _ {
2886
2886
  _parse(e) {
2887
2887
  const { status: r, ctx: n } = this._processInputParams(e);
2888
2888
  if (n.common.async)
@@ -2892,7 +2892,7 @@ var us = wr((hs, gt) => {
2892
2892
  path: n.path,
2893
2893
  parent: n
2894
2894
  });
2895
- return a.status === "aborted" ? y : a.status === "dirty" ? (r.dirty(), ye(a.value)) : this._def.out._parseAsync({
2895
+ return a.status === "aborted" ? y : a.status === "dirty" ? (r.dirty(), he(a.value)) : this._def.out._parseAsync({
2896
2896
  data: a.value,
2897
2897
  path: n.path,
2898
2898
  parent: n
@@ -2915,201 +2915,201 @@ var us = wr((hs, gt) => {
2915
2915
  }
2916
2916
  }
2917
2917
  static create(e, r) {
2918
- return new De({
2918
+ return new Me({
2919
2919
  in: e,
2920
2920
  out: r,
2921
2921
  typeName: m.ZodPipeline
2922
2922
  });
2923
2923
  }
2924
2924
  }
2925
- class Le extends _ {
2925
+ class Fe extends _ {
2926
2926
  _parse(e) {
2927
- const r = this._def.innerType._parse(e), n = (s) => (ce(s) && (s.value = Object.freeze(s.value)), s);
2928
- return Oe(r) ? r.then((s) => n(s)) : n(r);
2927
+ const r = this._def.innerType._parse(e), n = (s) => (oe(s) && (s.value = Object.freeze(s.value)), s);
2928
+ return Te(r) ? r.then((s) => n(s)) : n(r);
2929
2929
  }
2930
2930
  unwrap() {
2931
2931
  return this._def.innerType;
2932
2932
  }
2933
2933
  }
2934
- Le.create = (t, e) => new Le({
2934
+ Fe.create = (t, e) => new Fe({
2935
2935
  innerType: t,
2936
2936
  typeName: m.ZodReadonly,
2937
2937
  ...v(e)
2938
2938
  });
2939
- function Et(t, e) {
2939
+ function Tt(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
  }
2943
- function Lt(t, e = {}, r) {
2944
- return t ? _e.create().superRefine((n, s) => {
2943
+ function Mt(t, e = {}, r) {
2944
+ return t ? ge.create().superRefine((n, s) => {
2945
2945
  var a, i;
2946
2946
  const o = t(n);
2947
2947
  if (o instanceof Promise)
2948
2948
  return o.then((c) => {
2949
2949
  var d, u;
2950
2950
  if (!c) {
2951
- const w = Et(e, n), x = (u = (d = w.fatal) !== null && d !== void 0 ? d : r) !== null && u !== void 0 ? u : !0;
2951
+ const w = Tt(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 = Et(e, n), d = (i = (a = c.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
2956
+ const c = Tt(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
- }) : _e.create();
2959
+ }) : ge.create();
2960
2960
  }
2961
- const Yr = {
2962
- object: E.lazycreate
2961
+ const Jr = {
2962
+ object: T.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 Kr = (t, e = {
2968
+ const Yr = (t, e = {
2969
2969
  message: `Input not instance of ${t.name}`
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
- string: (t) => j.create({ ...t, coerce: !0 }),
2970
+ }) => Mt((r) => r instanceof t, e), Lt = Z.create, Dt = K.create, Kr = Ge.create, Gr = G.create, Vt = Ee.create, Xr = ce.create, Qr = Je.create, en = Oe.create, tn = Ne.create, rn = ge.create, nn = ie.create, sn = W.create, an = Ye.create, on = j.create, cn = T.create, dn = T.strictCreate, ln = Re.create, un = et.create, fn = Ae.create, pn = V.create, hn = Pe.create, mn = Ke.create, yn = de.create, gn = me.create, vn = Ce.create, _n = Ie.create, wn = X.create, kn = Ze.create, bn = ve.create, Et = $.create, xn = L.create, Sn = Q.create, Tn = $.createWithPreprocess, En = Me.create, On = () => Lt().optional(), Nn = () => Dt().optional(), Rn = () => Vt().optional(), An = {
2971
+ string: (t) => Z.create({ ...t, coerce: !0 }),
2972
2972
  number: (t) => K.create({ ...t, coerce: !0 }),
2973
- boolean: (t) => Ne.create({
2973
+ boolean: (t) => Ee.create({
2974
2974
  ...t,
2975
2975
  coerce: !0
2976
2976
  }),
2977
2977
  bigint: (t) => G.create({ ...t, coerce: !0 }),
2978
- date: (t) => de.create({ ...t, coerce: !0 })
2979
- }, Cn = y;
2980
- var et = /* @__PURE__ */ Object.freeze({
2978
+ date: (t) => ce.create({ ...t, coerce: !0 })
2979
+ }, Pn = y;
2980
+ var Xe = /* @__PURE__ */ Object.freeze({
2981
2981
  __proto__: null,
2982
- defaultErrorMap: ve,
2983
- setErrorMap: Tr,
2984
- getErrorMap: We,
2985
- makeIssue: Je,
2986
- EMPTY_PATH: Er,
2982
+ defaultErrorMap: ye,
2983
+ setErrorMap: Sr,
2984
+ getErrorMap: Be,
2985
+ makeIssue: He,
2986
+ EMPTY_PATH: Tr,
2987
2987
  addIssueToContext: f,
2988
- ParseStatus: R,
2988
+ ParseStatus: O,
2989
2989
  INVALID: y,
2990
- DIRTY: ye,
2991
- OK: P,
2992
- isAborted: dt,
2993
- isDirty: lt,
2994
- isValid: ce,
2995
- isAsync: Oe,
2990
+ DIRTY: he,
2991
+ OK: A,
2992
+ isAborted: ot,
2993
+ isDirty: ct,
2994
+ isValid: oe,
2995
+ isAsync: Te,
2996
2996
  get util() {
2997
2997
  return k;
2998
2998
  },
2999
2999
  get objectUtil() {
3000
- return ct;
3000
+ return it;
3001
3001
  },
3002
3002
  ZodParsedType: p,
3003
- getParsedType: H,
3003
+ getParsedType: B,
3004
3004
  ZodType: _,
3005
- datetimeRegex: Ft,
3006
- ZodString: j,
3005
+ datetimeRegex: $t,
3006
+ ZodString: Z,
3007
3007
  ZodNumber: K,
3008
3008
  ZodBigInt: G,
3009
- ZodBoolean: Ne,
3010
- ZodDate: de,
3011
- ZodSymbol: Ke,
3012
- ZodUndefined: Re,
3013
- ZodNull: Ae,
3014
- ZodAny: _e,
3015
- ZodUnknown: oe,
3016
- ZodNever: J,
3017
- ZodVoid: Ge,
3018
- ZodArray: $,
3019
- ZodObject: E,
3020
- ZodUnion: Pe,
3021
- ZodDiscriminatedUnion: rt,
3022
- ZodIntersection: Ce,
3023
- ZodTuple: z,
3024
- ZodRecord: Ie,
3025
- ZodMap: Xe,
3026
- ZodSet: le,
3027
- ZodFunction: ge,
3028
- ZodLazy: Ze,
3029
- ZodLiteral: je,
3009
+ ZodBoolean: Ee,
3010
+ ZodDate: ce,
3011
+ ZodSymbol: Je,
3012
+ ZodUndefined: Oe,
3013
+ ZodNull: Ne,
3014
+ ZodAny: ge,
3015
+ ZodUnknown: ie,
3016
+ ZodNever: W,
3017
+ ZodVoid: Ye,
3018
+ ZodArray: j,
3019
+ ZodObject: T,
3020
+ ZodUnion: Re,
3021
+ ZodDiscriminatedUnion: et,
3022
+ ZodIntersection: Ae,
3023
+ ZodTuple: V,
3024
+ ZodRecord: Pe,
3025
+ ZodMap: Ke,
3026
+ ZodSet: de,
3027
+ ZodFunction: me,
3028
+ ZodLazy: Ce,
3029
+ ZodLiteral: Ie,
3030
3030
  ZodEnum: X,
3031
- ZodNativeEnum: $e,
3032
- ZodPromise: we,
3033
- ZodEffects: F,
3034
- ZodTransformer: F,
3035
- ZodOptional: D,
3031
+ ZodNativeEnum: Ze,
3032
+ ZodPromise: ve,
3033
+ ZodEffects: $,
3034
+ ZodTransformer: $,
3035
+ ZodOptional: L,
3036
3036
  ZodNullable: Q,
3037
- ZodDefault: Fe,
3038
- ZodCatch: Me,
3039
- ZodNaN: Qe,
3040
- BRAND: Jr,
3041
- ZodBranded: vt,
3042
- ZodPipeline: De,
3043
- ZodReadonly: Le,
3044
- custom: Lt,
3037
+ ZodDefault: je,
3038
+ ZodCatch: $e,
3039
+ ZodNaN: Ge,
3040
+ BRAND: Wr,
3041
+ ZodBranded: yt,
3042
+ ZodPipeline: Me,
3043
+ ZodReadonly: Fe,
3044
+ custom: Mt,
3045
3045
  Schema: _,
3046
3046
  ZodSchema: _,
3047
- late: Yr,
3047
+ late: Jr,
3048
3048
  get ZodFirstPartyTypeKind() {
3049
3049
  return m;
3050
3050
  },
3051
- coerce: Pn,
3052
- any: nn,
3053
- array: cn,
3054
- bigint: Xr,
3055
- boolean: zt,
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
- number: Vt,
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
- string: Dt,
3084
- symbol: en,
3085
- transformer: Ot,
3086
- tuple: hn,
3087
- undefined: tn,
3088
- union: un,
3089
- unknown: sn,
3090
- void: on,
3091
- NEVER: Cn,
3051
+ coerce: An,
3052
+ any: rn,
3053
+ array: on,
3054
+ bigint: Gr,
3055
+ boolean: Vt,
3056
+ date: Xr,
3057
+ discriminatedUnion: un,
3058
+ effect: Et,
3059
+ enum: wn,
3060
+ function: gn,
3061
+ instanceof: Yr,
3062
+ intersection: fn,
3063
+ lazy: vn,
3064
+ literal: _n,
3065
+ map: mn,
3066
+ nan: Kr,
3067
+ nativeEnum: kn,
3068
+ never: sn,
3069
+ null: tn,
3070
+ nullable: Sn,
3071
+ number: Dt,
3072
+ object: cn,
3073
+ oboolean: Rn,
3074
+ onumber: Nn,
3075
+ optional: xn,
3076
+ ostring: On,
3077
+ pipeline: En,
3078
+ preprocess: Tn,
3079
+ promise: bn,
3080
+ record: hn,
3081
+ set: yn,
3082
+ strictObject: dn,
3083
+ string: Lt,
3084
+ symbol: Qr,
3085
+ transformer: Et,
3086
+ tuple: pn,
3087
+ undefined: en,
3088
+ union: ln,
3089
+ unknown: nn,
3090
+ void: an,
3091
+ NEVER: Pn,
3092
3092
  ZodIssueCode: l,
3093
- quotelessJson: Sr,
3094
- ZodError: I
3093
+ quotelessJson: xr,
3094
+ ZodError: C
3095
3095
  });
3096
- const ft = et.object({
3097
- detail: et.string()
3098
- }), qt = et.object({
3099
- error: et.string()
3096
+ const lt = Xe.object({
3097
+ detail: Xe.string()
3098
+ }), zt = Xe.object({
3099
+ error: Xe.string()
3100
3100
  });
3101
- function Ut(t) {
3101
+ function qt(t) {
3102
3102
  if (!t)
3103
3103
  return "Unknown error";
3104
3104
  if (t instanceof Error) {
3105
- const e = ft.safeParse(t.cause);
3106
- return e.success ? e.data.detail : In(t.message);
3105
+ const e = lt.safeParse(t.cause);
3106
+ return e.success ? e.data.detail : Cn(t.message);
3107
3107
  }
3108
3108
  if (typeof t == "object") {
3109
- const e = ft.safeParse(t);
3109
+ const e = lt.safeParse(t);
3110
3110
  if (e.success)
3111
3111
  return e.data.detail;
3112
- const r = qt.safeParse(t);
3112
+ const r = zt.safeParse(t);
3113
3113
  if (r.success)
3114
3114
  return r.data.error;
3115
3115
  }
@@ -3119,37 +3119,36 @@ var us = wr((hs, gt) => {
3119
3119
  return String(t);
3120
3120
  }
3121
3121
  }
3122
- function In(t) {
3123
- const e = Zn(t);
3122
+ function Cn(t) {
3123
+ const e = In(t);
3124
3124
  if (!e)
3125
3125
  return t;
3126
- const r = ft.safeParse(e);
3126
+ const r = lt.safeParse(e);
3127
3127
  if (r.success)
3128
3128
  return r.data.detail;
3129
- const n = qt.safeParse(e);
3129
+ const n = zt.safeParse(e);
3130
3130
  return n.success ? n.data.error : t;
3131
3131
  }
3132
- function Zn(t) {
3132
+ function In(t) {
3133
3133
  try {
3134
3134
  return JSON.parse(t);
3135
3135
  } catch {
3136
3136
  return t;
3137
3137
  }
3138
3138
  }
3139
- const jn = 1e10, $n = 1e3;
3140
- function ze(t, e) {
3139
+ const Zn = 1e10, jn = 1e3;
3140
+ function De(t, e) {
3141
3141
  const r = t.map((n) => `"${n}"`).join(", ");
3142
3142
  return new Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`);
3143
3143
  }
3144
- function Fn(t = {}) {
3144
+ function $n(t = {}) {
3145
3145
  let e = {};
3146
3146
  function r(g) {
3147
3147
  e = g;
3148
3148
  }
3149
3149
  let n = {};
3150
3150
  function s(g) {
3151
- var S;
3152
- n.unregisterHandler && n.unregisterHandler(), n = g, (S = n.registerHandler) == null || S.call(n, _r);
3151
+ n.unregisterHandler && n.unregisterHandler(), n = g, n.registerHandler?.(vr);
3153
3152
  }
3154
3153
  let a;
3155
3154
  function i(g) {
@@ -3157,120 +3156,115 @@ var us = wr((hs, gt) => {
3157
3156
  a = g;
3158
3157
  return;
3159
3158
  }
3160
- a = (S, O) => {
3161
- const T = g[S];
3162
- if (T)
3163
- return T(O);
3164
- const N = g._;
3165
- if (!N)
3159
+ a = (S, E) => {
3160
+ const N = g[S];
3161
+ if (N)
3162
+ return N(E);
3163
+ const F = g._;
3164
+ if (!F)
3166
3165
  throw new Error(`The requested method has no handler: ${S}`);
3167
- return N(S, O);
3166
+ return F(S, E);
3168
3167
  };
3169
3168
  }
3170
- const { maxRequestTime: o = $n } = t;
3169
+ const { maxRequestTime: o = jn } = t;
3171
3170
  t.transport && s(t.transport), t.requestHandler && i(t.requestHandler), t._debugHooks && r(t._debugHooks);
3172
3171
  let c = 0;
3173
3172
  function d() {
3174
- return c <= jn ? ++c : c = 0;
3173
+ return c <= Zn ? ++c : c = 0;
3175
3174
  }
3176
3175
  const u = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
3177
3176
  function x(g, ...S) {
3178
- const O = S[0];
3179
- return new Promise((T, N) => {
3180
- var ue;
3177
+ const E = S[0];
3178
+ return new Promise((N, F) => {
3181
3179
  if (!n.send)
3182
- throw ze(["send"], "make requests");
3183
- const M = d(), re = {
3180
+ throw De(["send"], "make requests");
3181
+ const J = d(), bt = {
3184
3182
  type: "request",
3185
- id: M,
3183
+ id: J,
3186
3184
  method: g,
3187
- params: O
3185
+ params: E
3188
3186
  };
3189
- u.set(M, { resolve: T, reject: N }), o !== 1 / 0 && w.set(M, setTimeout(() => {
3190
- w.delete(M), N(new Error("RPC request timed out."));
3191
- }, o)), (ue = e.onSend) == null || ue.call(e, re), n.send(re);
3187
+ u.set(J, { resolve: N, reject: F }), o !== 1 / 0 && w.set(J, setTimeout(() => {
3188
+ w.delete(J), F(new Error("RPC request timed out."));
3189
+ }, o)), e.onSend?.(bt), n.send(bt);
3192
3190
  });
3193
3191
  }
3194
- const C = new Proxy(x, {
3195
- get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) => x(S, T)
3196
- }), U = C;
3197
- function Ve(g, ...S) {
3198
- var N;
3199
- const O = S[0];
3192
+ const P = new Proxy(x, {
3193
+ get: (g, S, E) => S in g ? Reflect.get(g, S, E) : (N) => x(S, N)
3194
+ }), q = P;
3195
+ function Le(g, ...S) {
3196
+ const E = S[0];
3200
3197
  if (!n.send)
3201
- throw ze(["send"], "send messages");
3202
- const T = {
3198
+ throw De(["send"], "send messages");
3199
+ const N = {
3203
3200
  type: "message",
3204
3201
  id: g,
3205
- payload: O
3202
+ payload: E
3206
3203
  };
3207
- (N = e.onSend) == null || N.call(e, T), n.send(T);
3204
+ e.onSend?.(N), n.send(N);
3208
3205
  }
3209
- const bt = new Proxy(Ve, {
3210
- get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) => Ve(S, T)
3211
- }), xt = bt, te = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Set();
3212
- function gr(g, S) {
3213
- var O;
3206
+ const wt = new Proxy(Le, {
3207
+ get: (g, S, E) => S in g ? Reflect.get(g, S, E) : (N) => Le(S, N)
3208
+ }), kt = wt, te = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Set();
3209
+ function yr(g, S) {
3214
3210
  if (!n.registerHandler)
3215
- throw ze(["registerHandler"], "register message listeners");
3211
+ throw De(["registerHandler"], "register message listeners");
3216
3212
  if (g === "*") {
3217
- st.add(S);
3213
+ rt.add(S);
3218
3214
  return;
3219
3215
  }
3220
- te.has(g) || te.set(g, /* @__PURE__ */ new Set()), (O = te.get(g)) == null || O.add(S);
3216
+ te.has(g) || te.set(g, /* @__PURE__ */ new Set()), te.get(g)?.add(S);
3221
3217
  }
3222
- function vr(g, S) {
3223
- var O, T;
3218
+ function gr(g, S) {
3224
3219
  if (g === "*") {
3225
- st.delete(S);
3220
+ rt.delete(S);
3226
3221
  return;
3227
3222
  }
3228
- (O = te.get(g)) == null || O.delete(S), ((T = te.get(g)) == null ? void 0 : T.size) === 0 && te.delete(g);
3223
+ te.get(g)?.delete(S), te.get(g)?.size === 0 && te.delete(g);
3229
3224
  }
3230
- async function _r(g) {
3231
- var S, O;
3232
- if ((S = e.onReceive) == null || S.call(e, g), !("type" in g))
3225
+ async function vr(g) {
3226
+ if (e.onReceive?.(g), !("type" in g))
3233
3227
  throw new Error("Message does not contain a type.");
3234
3228
  if (g.type === "request") {
3235
3229
  if (!n.send || !a)
3236
- throw ze(["send", "requestHandler"], "handle requests");
3237
- const { id: T, method: N, params: M } = g;
3238
- let re;
3230
+ throw De(["send", "requestHandler"], "handle requests");
3231
+ const { id: S, method: E, params: N } = g;
3232
+ let F;
3239
3233
  try {
3240
- re = {
3234
+ F = {
3241
3235
  type: "response",
3242
- id: T,
3236
+ id: S,
3243
3237
  success: !0,
3244
- payload: await a(N, M)
3238
+ payload: await a(E, N)
3245
3239
  };
3246
- } catch (ue) {
3247
- if (!(ue instanceof Error))
3248
- throw ue;
3249
- re = {
3240
+ } catch (J) {
3241
+ if (!(J instanceof Error))
3242
+ throw J;
3243
+ F = {
3250
3244
  type: "response",
3251
- id: T,
3245
+ id: S,
3252
3246
  success: !1,
3253
- error: ue.message
3247
+ error: J.message
3254
3248
  };
3255
3249
  }
3256
- (O = e.onSend) == null || O.call(e, re), n.send(re);
3250
+ e.onSend?.(F), n.send(F);
3257
3251
  return;
3258
3252
  }
3259
3253
  if (g.type === "response") {
3260
- const T = w.get(g.id);
3261
- T != null && clearTimeout(T);
3262
- const { resolve: N, reject: M } = u.get(g.id) ?? {};
3263
- g.success ? N == null || N(g.payload) : M == null || M(new Error(g.error));
3254
+ const S = w.get(g.id);
3255
+ S != null && clearTimeout(S);
3256
+ const { resolve: E, reject: N } = u.get(g.id) ?? {};
3257
+ g.success ? E?.(g.payload) : N?.(new Error(g.error));
3264
3258
  return;
3265
3259
  }
3266
3260
  if (g.type === "message") {
3267
- for (const N of st)
3268
- N(g.id, g.payload);
3269
- const T = te.get(g.id);
3270
- if (!T)
3261
+ for (const E of rt)
3262
+ E(g.id, g.payload);
3263
+ const S = te.get(g.id);
3264
+ if (!S)
3271
3265
  return;
3272
- for (const N of T)
3273
- N(g.payload);
3266
+ for (const E of S)
3267
+ E(g.payload);
3274
3268
  return;
3275
3269
  }
3276
3270
  throw new Error(`Unexpected RPC message type: ${g.type}`);
@@ -3278,48 +3272,48 @@ var us = wr((hs, gt) => {
3278
3272
  return {
3279
3273
  setTransport: s,
3280
3274
  setRequestHandler: i,
3281
- request: C,
3282
- requestProxy: U,
3283
- send: bt,
3284
- sendProxy: xt,
3285
- addMessageListener: gr,
3286
- removeMessageListener: vr,
3287
- proxy: { send: xt, request: U },
3275
+ request: P,
3276
+ requestProxy: q,
3277
+ send: wt,
3278
+ sendProxy: kt,
3279
+ addMessageListener: yr,
3280
+ removeMessageListener: gr,
3281
+ proxy: { send: kt, request: q },
3288
3282
  _setDebugHooks: r
3289
3283
  };
3290
3284
  }
3291
- function Mn(t) {
3292
- return Fn(t);
3285
+ function Fn(t) {
3286
+ return $n(t);
3293
3287
  }
3294
- const Bt = "[transport-id]";
3295
- function Ln(t, e) {
3288
+ const Ut = "[transport-id]";
3289
+ function Mn(t, e) {
3296
3290
  const { transportId: r } = e;
3297
- return r != null ? { [Bt]: r, data: t } : t;
3291
+ return r != null ? { [Ut]: r, data: t } : t;
3298
3292
  }
3299
- function Dn(t, e) {
3300
- const { transportId: r, filter: n } = e, s = n == null ? void 0 : n();
3293
+ function Ln(t, e) {
3294
+ const { transportId: r, filter: n } = e, s = n?.();
3301
3295
  if (r != null && s != null)
3302
3296
  throw new Error("Cannot use both `transportId` and `filter` at the same time");
3303
3297
  let a = t;
3304
3298
  if (r) {
3305
- if (t[Bt] !== r)
3299
+ if (t[Ut] !== r)
3306
3300
  return [!0];
3307
3301
  a = t.data;
3308
3302
  }
3309
3303
  return s === !1 ? [!0] : [!1, a];
3310
3304
  }
3311
- function Vn(t, e = {}) {
3305
+ function Dn(t, e = {}) {
3312
3306
  const { transportId: r, filter: n, remotePort: s } = e, a = t, i = s ?? t;
3313
3307
  let o;
3314
3308
  return {
3315
3309
  send(c) {
3316
- i.postMessage(Ln(c, { transportId: r }));
3310
+ i.postMessage(Mn(c, { transportId: r }));
3317
3311
  },
3318
3312
  registerHandler(c) {
3319
3313
  o = (d) => {
3320
- const u = d.data, [w, x] = Dn(u, {
3314
+ const u = d.data, [w, x] = Ln(u, {
3321
3315
  transportId: r,
3322
- filter: () => n == null ? void 0 : n(d)
3316
+ filter: () => n?.(d)
3323
3317
  });
3324
3318
  w || c(x);
3325
3319
  }, a.addEventListener("message", o);
@@ -3329,38 +3323,38 @@ var us = wr((hs, gt) => {
3329
3323
  }
3330
3324
  };
3331
3325
  }
3332
- function zn(t) {
3333
- return Vn(self, t);
3326
+ function Vn(t) {
3327
+ return Dn(self, t);
3334
3328
  }
3335
- const qn = "marimo-transport";
3336
- function Ht(t, e) {
3329
+ const zn = "marimo-transport";
3330
+ function Bt(t, e) {
3337
3331
  if (!t)
3338
3332
  throw new Error(e);
3339
3333
  }
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) {
3334
+ var qn = Object.defineProperty, b = (t, e) => qn(t, "name", { value: e, configurable: !0 }), Ht = ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) {
3341
3335
  if (typeof require < "u") return require.apply(this, arguments);
3342
3336
  throw new Error('Dynamic require of "' + t + '" is not supported');
3343
3337
  });
3344
- function Jt(t) {
3338
+ function Wt(t) {
3345
3339
  return !isNaN(parseFloat(t)) && isFinite(t);
3346
3340
  }
3347
- b(Jt, "_isNumber");
3341
+ b(Wt, "_isNumber");
3348
3342
  function ee(t) {
3349
3343
  return t.charAt(0).toUpperCase() + t.substring(1);
3350
3344
  }
3351
3345
  b(ee, "_capitalize");
3352
- function nt(t) {
3346
+ function tt(t) {
3353
3347
  return function() {
3354
3348
  return this[t];
3355
3349
  };
3356
3350
  }
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);
3359
- function Z(t) {
3360
- if (t) for (var e = 0; e < qe.length; e++) t[qe[e]] !== void 0 && this["set" + ee(qe[e])](t[qe[e]]);
3351
+ b(tt, "_getter");
3352
+ var ue = ["isConstructor", "isEval", "isNative", "isToplevel"], fe = ["columnNumber", "lineNumber"], pe = ["fileName", "functionName", "source"], Un = ["args"], Bn = ["evalOrigin"], Ve = ue.concat(fe, pe, Un, Bn);
3353
+ function I(t) {
3354
+ if (t) for (var e = 0; e < Ve.length; e++) t[Ve[e]] !== void 0 && this["set" + ee(Ve[e])](t[Ve[e]]);
3361
3355
  }
3362
- b(Z, "StackFrame");
3363
- Z.prototype = { getArgs: function() {
3356
+ b(I, "StackFrame");
3357
+ I.prototype = { getArgs: function() {
3364
3358
  return this.args;
3365
3359
  }, setArgs: function(t) {
3366
3360
  if (Object.prototype.toString.call(t) !== "[object Array]") throw new TypeError("Args must be an Array");
@@ -3368,38 +3362,38 @@ var us = wr((hs, gt) => {
3368
3362
  }, getEvalOrigin: function() {
3369
3363
  return this.evalOrigin;
3370
3364
  }, setEvalOrigin: function(t) {
3371
- if (t instanceof Z) this.evalOrigin = t;
3372
- else if (t instanceof Object) this.evalOrigin = new Z(t);
3365
+ if (t instanceof I) this.evalOrigin = t;
3366
+ else if (t instanceof Object) this.evalOrigin = new I(t);
3373
3367
  else throw new TypeError("Eval Origin must be an Object or StackFrame");
3374
3368
  }, toString: function() {
3375
3369
  var t = this.getFileName() || "", e = this.getLineNumber() || "", r = this.getColumnNumber() || "", n = this.getFunctionName() || "";
3376
3370
  return this.getIsEval() ? t ? "[eval] (" + t + ":" + e + ":" + r + ")" : "[eval]:" + e + ":" + r : n ? n + " (" + t + ":" + e + ":" + r + ")" : t + ":" + e + ":" + r;
3377
3371
  } };
3378
- Z.fromString = b(function(t) {
3372
+ I.fromString = b(function(t) {
3379
3373
  var e = t.indexOf("("), r = t.lastIndexOf(")"), n = t.substring(0, e), s = t.substring(e + 1, r).split(","), a = t.substring(r + 1);
3380
3374
  if (a.indexOf("@") === 0) var i = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), o = i[1], c = i[2], d = i[3];
3381
- return new Z({ functionName: n, args: s || void 0, fileName: o, lineNumber: c || void 0, columnNumber: d || void 0 });
3375
+ return new I({ functionName: n, args: s || void 0, fileName: o, lineNumber: c || void 0, columnNumber: d || void 0 });
3382
3376
  }, "StackFrame$$fromString");
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) {
3377
+ for (re = 0; re < ue.length; re++) I.prototype["get" + ee(ue[re])] = tt(ue[re]), I.prototype["set" + ee(ue[re])] = /* @__PURE__ */ function(t) {
3384
3378
  return function(e) {
3385
3379
  this[t] = !!e;
3386
3380
  };
3387
- }(pe[ne]);
3388
- var ne;
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) {
3381
+ }(ue[re]);
3382
+ var re;
3383
+ for (ne = 0; ne < fe.length; ne++) I.prototype["get" + ee(fe[ne])] = tt(fe[ne]), I.prototype["set" + ee(fe[ne])] = /* @__PURE__ */ function(t) {
3390
3384
  return function(e) {
3391
- if (!Jt(e)) throw new TypeError(t + " must be a Number");
3385
+ if (!Wt(e)) throw new TypeError(t + " must be a Number");
3392
3386
  this[t] = Number(e);
3393
3387
  };
3394
- }(he[se]);
3395
- var se;
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) {
3388
+ }(fe[ne]);
3389
+ var ne;
3390
+ for (se = 0; se < pe.length; se++) I.prototype["get" + ee(pe[se])] = tt(pe[se]), I.prototype["set" + ee(pe[se])] = /* @__PURE__ */ function(t) {
3397
3391
  return function(e) {
3398
3392
  this[t] = String(e);
3399
3393
  };
3400
- }(me[ae]);
3401
- var ae, it = Z;
3402
- function Yt() {
3394
+ }(pe[se]);
3395
+ var se, st = I;
3396
+ function Jt() {
3403
3397
  var t = /^\s*at .*(\S+:\d+|\(native\))/m, e = /^(eval@)?(\[native code])?$/;
3404
3398
  return { parse: b(function(r) {
3405
3399
  if (r.stack && r.stack.match(t)) return this.parseV8OrIE(r);
@@ -3419,7 +3413,7 @@ var us = wr((hs, gt) => {
3419
3413
  var a = s.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), i = a.match(/ (\(.+\)$)/);
3420
3414
  a = i ? a.replace(i[0], "") : a;
3421
3415
  var o = this.extractLocation(i ? i[1] : a), c = i && a || void 0, d = ["eval", "<anonymous>"].indexOf(o[0]) > -1 ? void 0 : o[0];
3422
- return new it({ functionName: c, fileName: d, lineNumber: o[1], columnNumber: o[2], source: s });
3416
+ return new st({ functionName: c, fileName: d, lineNumber: o[1], columnNumber: o[2], source: s });
3423
3417
  }, this);
3424
3418
  }, "ErrorStackParser$$parseV8OrIE"), parseFFOrSafari: b(function(r) {
3425
3419
  var n = r.stack.split(`
@@ -3427,58 +3421,58 @@ var us = wr((hs, gt) => {
3427
3421
  return !s.match(e);
3428
3422
  }, this);
3429
3423
  return n.map(function(s) {
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 });
3424
+ 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 st({ functionName: s });
3431
3425
  var a = /((.*".+"[^@]*)?[^@]*)(?:@)/, i = s.match(a), o = i && i[1] ? i[1] : void 0, c = this.extractLocation(s.replace(a, ""));
3432
- return new it({ functionName: o, fileName: c[0], lineNumber: c[1], columnNumber: c[2], source: s });
3426
+ return new st({ functionName: o, fileName: c[0], lineNumber: c[1], columnNumber: c[2], source: s });
3433
3427
  }, this);
3434
3428
  }, "ErrorStackParser$$parseFFOrSafari") };
3435
3429
  }
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
+ b(Jt, "ErrorStackParser");
3431
+ var Hn = new Jt(), Wn = Hn, z = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, Yt = z && typeof mt < "u" && typeof mt.exports < "u" && typeof Ht < "u" && typeof __dirname < "u", Jn = z && !Yt, Yn = typeof Deno < "u", Kt = !z && !Yn, Kn = Kt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", Gn = Kt && typeof importScripts == "function" && typeof self == "object";
3438
3432
  typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Safari") > -1;
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;
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 };
3433
+ var Gt, ut, Xt, Ot, gt;
3434
+ async function vt() {
3435
+ if (!z || (Gt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Ot = await import("./__vite-browser-external-CPvbk0mb.js"), gt = await import("./__vite-browser-external-CPvbk0mb.js"), Xt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, ut = await import("./__vite-browser-external-CPvbk0mb.js"), _t = ut.sep, typeof Ht < "u")) return;
3436
+ let t = Ot, 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 };
3443
3437
  globalThis.require = function(a) {
3444
3438
  return s[a];
3445
3439
  };
3446
3440
  }
3447
- b(wt, "initNodeModules");
3441
+ b(vt, "initNodeModules");
3442
+ function Qt(t, e) {
3443
+ return ut.resolve(e || ".", t);
3444
+ }
3445
+ b(Qt, "node_resolvePath");
3448
3446
  function er(t, e) {
3449
- return pt.resolve(e || ".", t);
3447
+ return e === void 0 && (e = location), new URL(t, e).toString();
3450
3448
  }
3451
- b(er, "node_resolvePath");
3449
+ b(er, "browser_resolvePath");
3450
+ var ft;
3451
+ z ? ft = Qt : ft = er;
3452
+ var _t;
3453
+ z || (_t = "/");
3452
3454
  function tr(t, e) {
3453
- return e === void 0 && (e = location), new URL(t, e).toString();
3455
+ return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: gt.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
3454
3456
  }
3455
- b(tr, "browser_resolvePath");
3456
- var ht;
3457
- q ? ht = er : ht = tr;
3458
- var kt;
3459
- q || (kt = "/");
3457
+ b(tr, "node_getBinaryResponse");
3460
3458
  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) {
3465
3459
  let r = new URL(t, location);
3466
3460
  return { response: fetch(r, e ? { integrity: e } : {}) };
3467
3461
  }
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);
3462
+ b(rr, "browser_getBinaryResponse");
3463
+ var Qe;
3464
+ z ? Qe = tr : Qe = rr;
3465
+ async function nr(t, e) {
3466
+ let { response: r, binary: n } = Qe(t, e);
3473
3467
  if (n) return n;
3474
3468
  let s = await r;
3475
3469
  if (!s.ok) throw new Error(`Failed to load '${t}': request failed.`);
3476
3470
  return new Uint8Array(await s.arrayBuffer());
3477
3471
  }
3478
- b(sr, "loadBinaryFile");
3479
- var Ue;
3480
- if (Gn) Ue = b(async (t) => await import(t), "loadScript");
3481
- else if (Xn) Ue = b(async (t) => {
3472
+ b(nr, "loadBinaryFile");
3473
+ var ze;
3474
+ if (Kn) ze = b(async (t) => await import(t), "loadScript");
3475
+ else if (Gn) ze = b(async (t) => {
3482
3476
  try {
3483
3477
  globalThis.importScripts(t);
3484
3478
  } catch (e) {
@@ -3486,39 +3480,39 @@ var us = wr((hs, gt) => {
3486
3480
  else throw e;
3487
3481
  }
3488
3482
  }, "loadScript");
3489
- else if (q) Ue = ar;
3483
+ else if (z) ze = sr;
3490
3484
  else throw new Error("Cannot determine runtime environment");
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);
3485
+ async function sr(t) {
3486
+ t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Xt.runInThisContext(await (await fetch(t)).text()) : await import(Gt.pathToFileURL(t).href);
3493
3487
  }
3494
- b(ar, "nodeLoadScript");
3495
- async function ir(t) {
3496
- if (q) {
3497
- await wt();
3498
- let e = await _t.readFile(t, { encoding: "utf8" });
3488
+ b(sr, "nodeLoadScript");
3489
+ async function ar(t) {
3490
+ if (z) {
3491
+ await vt();
3492
+ let e = await gt.readFile(t, { encoding: "utf8" });
3499
3493
  return JSON.parse(e);
3500
3494
  } else return await (await fetch(t)).json();
3501
3495
  }
3502
- b(ir, "loadLockFile");
3503
- async function or() {
3504
- if (Kt) return __dirname;
3496
+ b(ar, "loadLockFile");
3497
+ async function ir() {
3498
+ if (Yt) return __dirname;
3505
3499
  let t;
3506
3500
  try {
3507
3501
  throw new Error();
3508
3502
  } catch (n) {
3509
3503
  t = n;
3510
3504
  }
3511
- let e = Jn.parse(t)[0].fileName;
3512
- if (q && !e.startsWith("file://") && (e = `file://${e}`), Yn) {
3505
+ let e = Wn.parse(t)[0].fileName;
3506
+ if (z && !e.startsWith("file://") && (e = `file://${e}`), Jn) {
3513
3507
  let n = await import("./__vite-browser-external-CPvbk0mb.js");
3514
3508
  return (await import("./__vite-browser-external-CPvbk0mb.js")).fileURLToPath(n.dirname(e));
3515
3509
  }
3516
- let r = e.lastIndexOf(kt);
3510
+ let r = e.lastIndexOf(_t);
3517
3511
  if (r === -1) throw new Error("Could not extract indexURL path from pyodide module location");
3518
3512
  return e.slice(0, r);
3519
3513
  }
3520
- b(or, "calculateDirname");
3521
- function cr(t) {
3514
+ b(ir, "calculateDirname");
3515
+ function or(t) {
3522
3516
  let e = t.FS, r = t.FS.filesystems.MEMFS, n = t.PATH, s = { DIR_MODE: 16895, FILE_MODE: 33279, mount: function(a) {
3523
3517
  if (!a.opts.fileSystemHandle) throw new Error("opts.fileSystemHandle is required");
3524
3518
  return r.mount.apply(null, arguments);
@@ -3546,7 +3540,7 @@ var us = wr((hs, gt) => {
3546
3540
  }
3547
3541
  return { type: "local", entries: i };
3548
3542
  }, getRemoteSet: async (a) => {
3549
- let i = /* @__PURE__ */ Object.create(null), o = await Qn(a.opts.fileSystemHandle);
3543
+ let i = /* @__PURE__ */ Object.create(null), o = await Xn(a.opts.fileSystemHandle);
3550
3544
  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 });
3551
3545
  return { type: "remote", entries: i, handles: o };
3552
3546
  }, loadLocalEntry: (a) => {
@@ -3582,8 +3576,8 @@ var us = wr((hs, gt) => {
3582
3576
  }, reconcile: async (a, i, o) => {
3583
3577
  let c = 0, d = [];
3584
3578
  Object.keys(i.entries).forEach(function(x) {
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
+ let P = i.entries[x], q = o.entries[x];
3580
+ (!q || e.isFile(P.mode) && P.timestamp.getTime() > q.timestamp.getTime()) && (d.push(x), c++);
3587
3581
  }), d.sort();
3588
3582
  let u = [];
3589
3583
  if (Object.keys(o.entries).forEach(function(x) {
@@ -3591,25 +3585,25 @@ var us = wr((hs, gt) => {
3591
3585
  }), u.sort().reverse(), !c) return;
3592
3586
  let w = i.type === "remote" ? i.handles : o.handles;
3593
3587
  for (let x of d) {
3594
- let C = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
3588
+ let P = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
3595
3589
  if (o.type === "local") {
3596
- let U = w.get(C), Ve = await s.loadRemoteEntry(U);
3597
- s.storeLocalEntry(x, Ve);
3590
+ let q = w.get(P), Le = await s.loadRemoteEntry(q);
3591
+ s.storeLocalEntry(x, Le);
3598
3592
  } else {
3599
- let U = s.loadLocalEntry(x);
3600
- await s.storeRemoteEntry(w, C, U);
3593
+ let q = s.loadLocalEntry(x);
3594
+ await s.storeRemoteEntry(w, P, q);
3601
3595
  }
3602
3596
  }
3603
3597
  for (let x of u) if (o.type === "local") s.removeLocalEntry(x);
3604
3598
  else {
3605
- let C = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
3606
- await s.removeRemoteEntry(w, C);
3599
+ let P = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
3600
+ await s.removeRemoteEntry(w, P);
3607
3601
  }
3608
3602
  } };
3609
3603
  t.FS.filesystems.NATIVEFS_ASYNC = s;
3610
3604
  }
3611
- b(cr, "initializeNativeFS");
3612
- var Qn = b(async (t) => {
3605
+ b(or, "initializeNativeFS");
3606
+ var Xn = b(async (t) => {
3613
3607
  let e = [];
3614
3608
  async function r(s) {
3615
3609
  for await (let a of s.values()) e.push(a), a.kind === "directory" && await r(a);
@@ -3623,14 +3617,14 @@ var us = wr((hs, gt) => {
3623
3617
  }
3624
3618
  return n;
3625
3619
  }, "getFsHandles");
3626
- function dr(t) {
3627
- let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: hr(t), quit(r, n) {
3620
+ function cr(t) {
3621
+ let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: pr(t), quit(r, n) {
3628
3622
  throw e.exited = { status: r, toThrow: n }, n;
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) };
3623
+ }, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: hr(t.indexURL) };
3630
3624
  return e;
3631
3625
  }
3632
- b(dr, "createSettings");
3633
- function lr(t) {
3626
+ b(cr, "createSettings");
3627
+ function dr(t) {
3634
3628
  return function(e) {
3635
3629
  let r = "/";
3636
3630
  try {
@@ -3641,14 +3635,14 @@ var us = wr((hs, gt) => {
3641
3635
  e.FS.chdir(t);
3642
3636
  };
3643
3637
  }
3644
- b(lr, "createHomeDirectory");
3645
- function ur(t) {
3638
+ b(dr, "createHomeDirectory");
3639
+ function lr(t) {
3646
3640
  return function(e) {
3647
3641
  Object.assign(e.ENV, t);
3648
3642
  };
3649
3643
  }
3650
- b(ur, "setEnvironment");
3651
- function fr(t) {
3644
+ b(lr, "setEnvironment");
3645
+ function ur(t) {
3652
3646
  return t ? [async (e) => {
3653
3647
  e.addRunDependency("fsInitHook");
3654
3648
  try {
@@ -3658,9 +3652,9 @@ var us = wr((hs, gt) => {
3658
3652
  }
3659
3653
  }] : [];
3660
3654
  }
3661
- b(fr, "callFsInitHook");
3662
- function pr(t) {
3663
- let e = sr(t);
3655
+ b(ur, "callFsInitHook");
3656
+ function fr(t) {
3657
+ let e = nr(t);
3664
3658
  return async (r) => {
3665
3659
  let n = r._py_version_major(), s = r._py_version_minor();
3666
3660
  r.FS.mkdirTree("/lib"), r.API.sitePackages = `/lib/python${n}.${s}/site-packages`, r.FS.mkdirTree(r.API.sitePackages), r.addRunDependency("install-stdlib");
@@ -3674,15 +3668,15 @@ var us = wr((hs, gt) => {
3674
3668
  }
3675
3669
  };
3676
3670
  }
3677
- b(pr, "installStdlib");
3678
- function hr(t) {
3671
+ b(fr, "installStdlib");
3672
+ function pr(t) {
3679
3673
  let e;
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];
3674
+ return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...ur(t.fsInit), fr(e), dr(t.env.HOME), lr(t.env), or];
3681
3675
  }
3682
- b(hr, "getFileSystemInitializationFuncs");
3683
- function mr(t) {
3676
+ b(pr, "getFileSystemInitializationFuncs");
3677
+ function hr(t) {
3684
3678
  if (typeof WasmOffsetConverter < "u") return;
3685
- let { binary: e, response: r } = tt(t + "pyodide.asm.wasm");
3679
+ let { binary: e, response: r } = Qe(t + "pyodide.asm.wasm");
3686
3680
  return function(n, s) {
3687
3681
  return async function() {
3688
3682
  try {
@@ -3696,19 +3690,19 @@ var us = wr((hs, gt) => {
3696
3690
  }(), {};
3697
3691
  };
3698
3692
  }
3699
- b(mr, "getInstantiateWasmFunc");
3700
- var mt = "0.27.5";
3701
- async function yt(t = {}) {
3693
+ b(hr, "getInstantiateWasmFunc");
3694
+ var pt = "0.27.5";
3695
+ async function ht(t = {}) {
3702
3696
  var e, r;
3703
- await wt();
3704
- let n = t.indexURL || await or();
3705
- n = ht(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
3697
+ await vt();
3698
+ let n = t.indexURL || await ir();
3699
+ n = ft(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
3706
3700
  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);
3707
3701
  (e = a.env).HOME ?? (e.HOME = "/home/pyodide"), (r = a.env).PYTHONINSPECT ?? (r.PYTHONINSPECT = "1");
3708
- let i = dr(a), o = i.API;
3709
- if (o.lockFilePromise = ir(a.lockFileURL), typeof _createPyodideModule != "function") {
3702
+ let i = cr(a), o = i.API;
3703
+ if (o.lockFilePromise = ar(a.lockFileURL), typeof _createPyodideModule != "function") {
3710
3704
  let x = `${a.indexURL}pyodide.asm.js`;
3711
- await Ue(x);
3705
+ await ze(x);
3712
3706
  }
3713
3707
  let c;
3714
3708
  if (t._loadSnapshot) {
@@ -3717,7 +3711,7 @@ var us = wr((hs, gt) => {
3717
3711
  }
3718
3712
  let d = await _createPyodideModule(i);
3719
3713
  if (i.exited) throw i.exited.toThrow;
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.`);
3714
+ if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== pt && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${pt}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
3721
3715
  d.locateFile = (x) => {
3722
3716
  throw new Error("Didn't expect to load any more file_packager files!");
3723
3717
  };
@@ -3726,12 +3720,12 @@ var us = wr((hs, gt) => {
3726
3720
  let w = o.finalizeBootstrap(u, t._snapshotDeserializer);
3727
3721
  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;
3728
3722
  }
3729
- b(yt, "loadPyodide");
3730
- const es = !1;
3731
- function ts(t) {
3732
- return t.includes("dev") && es ? "dev" : `v${mt}`;
3723
+ b(ht, "loadPyodide");
3724
+ const Qn = !1;
3725
+ function es(t) {
3726
+ return t.includes("dev") && Qn ? "dev" : `v${pt}`;
3733
3727
  }
3734
- class rs {
3728
+ class ts {
3735
3729
  constructor() {
3736
3730
  this.spans = [];
3737
3731
  }
@@ -3773,31 +3767,31 @@ var us = wr((hs, gt) => {
3773
3767
  logSpans() {
3774
3768
  }
3775
3769
  }
3776
- const A = new rs();
3777
- globalThis.t = A;
3778
- function ns(t) {
3770
+ const R = new ts();
3771
+ globalThis.t = R;
3772
+ function rs(t) {
3779
3773
  let e, r = !1;
3780
3774
  return function(...n) {
3781
3775
  return r || (r = !0, e = t.apply(this, n)), e;
3782
3776
  };
3783
3777
  }
3784
- const ss = !1;
3785
- class as {
3778
+ const ns = !1;
3779
+ class ss {
3786
3780
  constructor() {
3787
3781
  this.pyodide = null;
3788
3782
  }
3789
3783
  get requirePyodide() {
3790
- return Ht(this.pyodide, "Pyodide not loaded"), this.pyodide;
3784
+ return Bt(this.pyodide, "Pyodide not loaded"), this.pyodide;
3791
3785
  }
3792
3786
  async bootstrap(e) {
3793
3787
  return await this.loadPyodideAndPackages(e);
3794
3788
  }
3795
3789
  async loadPyodideAndPackages(e) {
3796
- if (!yt)
3790
+ if (!ht)
3797
3791
  throw new Error("loadPyodide is not defined");
3798
- const r = A.startSpan("loadPyodide");
3792
+ const r = R.startSpan("loadPyodide");
3799
3793
  try {
3800
- const n = await yt({
3794
+ const n = await ht({
3801
3795
  // Perf: These get loaded while pyodide is being bootstrapped
3802
3796
  packages: [
3803
3797
  "micropip",
@@ -3807,7 +3801,7 @@ var us = wr((hs, gt) => {
3807
3801
  "narwhals",
3808
3802
  "packaging"
3809
3803
  ],
3810
- _makeSnapshot: ss,
3804
+ _makeSnapshot: ns,
3811
3805
  lockFileURL: `https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,
3812
3806
  // Without this, this fails in Firefox with
3813
3807
  // `Could not extract indexURL path from pyodide module`
@@ -3820,8 +3814,8 @@ var us = wr((hs, gt) => {
3820
3814
  }
3821
3815
  }
3822
3816
  async mountFilesystem(e) {
3823
- const r = A.startSpan("mountFilesystem");
3824
- return ie.createHomeDir(this.requirePyodide), ie.mountFS(this.requirePyodide), await ie.populateFilesToMemory(this.requirePyodide), r.end("ok"), ie.initNotebookCode({
3817
+ const r = R.startSpan("mountFilesystem");
3818
+ return ae.createHomeDir(this.requirePyodide), ae.mountFS(this.requirePyodide), await ae.populateFilesToMemory(this.requirePyodide), r.end("ok"), ae.initNotebookCode({
3825
3819
  pyodide: this.requirePyodide,
3826
3820
  code: e.code,
3827
3821
  filename: e.filename
@@ -3832,7 +3826,7 @@ var us = wr((hs, gt) => {
3832
3826
  self.messenger = {
3833
3827
  callback: s
3834
3828
  }, self.query_params = a, self.user_config = i;
3835
- const o = A.startSpan("startSession.runPython"), c = n || ie.NOTEBOOK_FILENAME, [d, u, w] = this.requirePyodide.runPython(
3829
+ const o = R.startSpan("startSession.runPython"), c = n || ae.NOTEBOOK_FILENAME, [d, u, w] = this.requirePyodide.runPython(
3836
3830
  `
3837
3831
  print("[py] Starting marimo...")
3838
3832
  import asyncio
@@ -3875,11 +3869,11 @@ ${e}`, e = `import jedi
3875
3869
  ${e}`, e = `import pyodide_http
3876
3870
  ${e}`;
3877
3871
  const s = [...r];
3878
- let a = A.startSpan("pyodide.loadPackage");
3872
+ let a = R.startSpan("pyodide.loadPackage");
3879
3873
  await n.loadPackagesFromImports(e, {
3880
3874
  errorCallback: Y.error,
3881
3875
  messageCallback: Y.log
3882
- }), a.end(), a = A.startSpan("micropip.install");
3876
+ }), a.end(), a = R.startSpan("micropip.install");
3883
3877
  const i = s.filter(
3884
3878
  (o) => !n.loadedPackages[o]
3885
3879
  );
@@ -3896,86 +3890,85 @@ ${e}`;
3896
3890
  }), a.end();
3897
3891
  }
3898
3892
  }
3899
- async function is(t) {
3893
+ async function as(t) {
3900
3894
  try {
3901
3895
  return await import(
3902
3896
  /* @vite-ignore */
3903
3897
  `/wasm/controller.js?version=${t}`
3904
3898
  );
3905
3899
  } catch {
3906
- return new as();
3900
+ return new ss();
3907
3901
  }
3908
3902
  }
3909
- const Rt = A.startSpan("worker:init");
3910
- async function os() {
3903
+ const Nt = R.startSpan("worker:init");
3904
+ async function is() {
3911
3905
  try {
3912
- const t = ls(), e = ts(t), r = await A.wrapAsync(is)(t);
3913
- self.controller = r, W.send.initializingMessage({
3906
+ const t = ds(), e = es(t), r = await R.wrapAsync(as)(t);
3907
+ self.controller = r, H.send.initializingMessage({
3914
3908
  message: "Loading marimo..."
3915
- }), self.pyodide = await A.wrapAsync(r.bootstrap.bind(r))({
3909
+ }), self.pyodide = await R.wrapAsync(r.bootstrap.bind(r))({
3916
3910
  version: t,
3917
3911
  pyodideVersion: e
3918
3912
  });
3919
3913
  } catch (t) {
3920
- Y.error("Error bootstrapping", t), W.send.initializedError({
3921
- error: Ut(t)
3914
+ Y.error("Error bootstrapping", t), H.send.initializedError({
3915
+ error: qt(t)
3922
3916
  });
3923
3917
  }
3924
3918
  }
3925
- const yr = new xr(
3919
+ const mr = new br(
3926
3920
  (t) => {
3927
- W.send.kernelMessage({ message: t });
3921
+ H.send.kernelMessage({ message: t });
3928
3922
  }
3929
- ), At = new kr();
3930
- let Pt = !1;
3931
- const cs = {
3923
+ ), Rt = new wr();
3924
+ let At = !1;
3925
+ const os = {
3932
3926
  /**
3933
3927
  * Start the session
3934
3928
  */
3935
3929
  startSession: async (t) => {
3936
- var e, r;
3937
- if (await L, Pt) {
3930
+ if (await M, At) {
3938
3931
  Y.warn("Session already started");
3939
3932
  return;
3940
3933
  }
3941
- Pt = !0;
3934
+ At = !0;
3942
3935
  try {
3943
- Ht(self.controller, "Controller not loaded"), await ((r = (e = self.controller).mountFilesystem) == null ? void 0 : r.call(e, {
3936
+ Bt(self.controller, "Controller not loaded"), await self.controller.mountFilesystem?.({
3944
3937
  code: t.code,
3945
3938
  filename: t.filename
3946
- }));
3947
- const n = A.wrapAsync(
3939
+ });
3940
+ const e = R.wrapAsync(
3948
3941
  self.controller.startSession.bind(self.controller)
3949
- ), s = ns(() => {
3950
- W.send.initializingMessage({
3942
+ ), r = rs(() => {
3943
+ H.send.initializingMessage({
3951
3944
  message: "Initializing notebook..."
3952
- }), W.send.initialized({});
3945
+ }), H.send.initialized({});
3953
3946
  });
3954
- W.send.initializingMessage({
3947
+ H.send.initializingMessage({
3955
3948
  message: "Loading notebook and dependencies..."
3956
3949
  });
3957
- const a = await n({
3950
+ const n = await e({
3958
3951
  code: t.code,
3959
3952
  filename: t.filename,
3960
3953
  queryParameters: t.queryParameters,
3961
3954
  userConfig: t.userConfig,
3962
- onMessage: (i) => {
3963
- s(), yr.push(i);
3955
+ onMessage: (s) => {
3956
+ r(), mr.push(s);
3964
3957
  }
3965
3958
  });
3966
- At.resolve(a), Rt.end("ok");
3967
- } catch (n) {
3968
- W.send.initializedError({
3969
- error: Ut(n)
3970
- }), Rt.end("error");
3959
+ Rt.resolve(n), Nt.end("ok");
3960
+ } catch (e) {
3961
+ H.send.initializedError({
3962
+ error: qt(e)
3963
+ }), Nt.end("error");
3971
3964
  }
3972
3965
  },
3973
3966
  /**
3974
3967
  * Load packages
3975
3968
  */
3976
3969
  loadPackages: async (t) => {
3977
- const e = A.startSpan("loadPackages");
3978
- await L, t.includes("mo.sql") && (t = `import pandas
3970
+ const e = R.startSpan("loadPackages");
3971
+ await M, t.includes("mo.sql") && (t = `import pandas
3979
3972
  ${t}`, t = `import duckdb
3980
3973
  ${t}`, t = `import sqlglot
3981
3974
  ${t}`, t.includes("polars") && (t = `import pyarrow
@@ -3988,19 +3981,19 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
3988
3981
  * Read a file
3989
3982
  */
3990
3983
  readFile: async (t) => {
3991
- const e = A.startSpan("readFile");
3992
- await L;
3993
- const r = ot(self.pyodide.FS.readFile(t));
3984
+ const e = R.startSpan("readFile");
3985
+ await M;
3986
+ const r = at(self.pyodide.FS.readFile(t));
3994
3987
  return e.end(), r;
3995
3988
  },
3996
3989
  /**
3997
3990
  * Set the interrupt buffer
3998
3991
  */
3999
3992
  setInterruptBuffer: async (t) => {
4000
- await L, self.pyodide.setInterruptBuffer(t);
3993
+ await M, self.pyodide.setInterruptBuffer(t);
4001
3994
  },
4002
3995
  addPackage: async (t) => {
4003
- await L;
3996
+ await M;
4004
3997
  const { package: e } = t, r = e.split(" ").map((s) => s.trim()), n = await self.pyodide.runPythonAsync(`
4005
3998
  import micropip
4006
3999
  import json
@@ -4015,7 +4008,7 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4015
4008
  return JSON.parse(n);
4016
4009
  },
4017
4010
  removePackage: async (t) => {
4018
- await L;
4011
+ await M;
4019
4012
  const { package: e } = t, r = await self.pyodide.runPythonAsync(`
4020
4013
  import micropip
4021
4014
  import json
@@ -4030,8 +4023,8 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4030
4023
  return JSON.parse(r);
4031
4024
  },
4032
4025
  listPackages: async () => {
4033
- const t = A.startSpan("listPackages");
4034
- await L;
4026
+ const t = R.startSpan("listPackages");
4027
+ await M;
4035
4028
  const e = await self.pyodide.runPythonAsync(`
4036
4029
  import json
4037
4030
  import micropip
@@ -4051,19 +4044,19 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4051
4044
  * Save the notebook
4052
4045
  */
4053
4046
  saveNotebook: async (t) => {
4054
- await L, await self.pyodide.runPython(`
4047
+ await M, await self.pyodide.runPython(`
4055
4048
  from marimo._pyodide.bootstrap import save_file
4056
4049
  save_file
4057
- `)(JSON.stringify(t), ie.NOTEBOOK_FILENAME);
4050
+ `)(JSON.stringify(t), ae.NOTEBOOK_FILENAME);
4058
4051
  },
4059
4052
  /**
4060
4053
  * Call a function on the bridge
4061
4054
  */
4062
4055
  bridge: async (t) => {
4063
- const e = A.startSpan("bridge", {
4056
+ const e = R.startSpan("bridge", {
4064
4057
  functionName: t.functionName
4065
4058
  });
4066
- await L;
4059
+ await M;
4067
4060
  const { functionName: r, payload: n } = t;
4068
4061
  r === "format" && await self.pyodide.runPythonAsync(`
4069
4062
  import micropip
@@ -4080,26 +4073,26 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4080
4073
  except ModuleNotFoundError:
4081
4074
  await micropip.install("pyyaml")
4082
4075
  `);
4083
- const s = await At.promise, a = n == null ? null : typeof n == "string" ? n : JSON.stringify(n), i = a == null ? (
4076
+ const s = await Rt.promise, a = n == null ? null : typeof n == "string" ? n : JSON.stringify(n), i = a == null ? (
4084
4077
  // @ts-expect-error ehh TypeScript
4085
4078
  await s[r]()
4086
4079
  ) : (
4087
4080
  // @ts-expect-error ehh TypeScript
4088
4081
  await s[r](a)
4089
4082
  );
4090
- return ds.has(r) && ie.persistFilesToRemote(self.pyodide), e.end(), typeof i == "string" ? JSON.parse(i) : i;
4083
+ return cs.has(r) && ae.persistFilesToRemote(self.pyodide), e.end(), typeof i == "string" ? JSON.parse(i) : i;
4091
4084
  }
4092
- }, W = Mn({
4093
- transport: zn({
4094
- transportId: qn
4085
+ }, H = Fn({
4086
+ transport: Vn({
4087
+ transportId: zn
4095
4088
  }),
4096
- requestHandler: cs
4089
+ requestHandler: os
4097
4090
  });
4098
- W.send("ready", {});
4099
- W.addMessageListener("consumerReady", async () => {
4100
- await L, yr.start();
4091
+ H.send("ready", {});
4092
+ H.addMessageListener("consumerReady", async () => {
4093
+ await M, mr.start();
4101
4094
  });
4102
- const ds = /* @__PURE__ */ new Set([
4095
+ const cs = /* @__PURE__ */ new Set([
4103
4096
  "save",
4104
4097
  "save_app_config",
4105
4098
  "rename_file",
@@ -4108,9 +4101,9 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4108
4101
  "move_file_or_directory",
4109
4102
  "update_file"
4110
4103
  ]);
4111
- function ls() {
4104
+ function ds() {
4112
4105
  return self.name;
4113
4106
  }
4114
- const L = A.wrapAsync(os)();
4107
+ const M = R.wrapAsync(is)();
4115
4108
  });
4116
- export default us();
4109
+ export default ls();