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

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-DJ_5A9Jv.js} +1495 -1496
  2. package/dist/{VegaLite-DqttTZoC.js → VegaLite-BIF3TJ1l.js} +12483 -12485
  3. package/dist/{_baseUniq-C7BPwQHe.js → _baseUniq-CpsCwtZj.js} +13 -13
  4. package/dist/{any-language-editor-DUew9Rp9.js → any-language-editor-4KxmO39C.js} +2 -2
  5. package/dist/{architectureDiagram-IEHRJDOE-a3lDrXQx.js → architectureDiagram-IEHRJDOE-DX0ceJYG.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-BS_FxZ0q.js +2249 -0
  11. package/dist/{c4Diagram-VJAJSXHY-iO9Wy6JM.js → c4Diagram-VJAJSXHY-B-UF7GzG.js} +401 -400
  12. package/dist/{channel-DcjC1CFM.js → channel-BPCXF0Uj.js} +1 -1
  13. package/dist/chunk-4BMEZGHF-DJOdatJ0.js +9 -0
  14. package/dist/chunk-A2AXSNBT-D9hxcFjS.js +1373 -0
  15. package/dist/chunk-AEK57VVT-BLFZVxwJ.js +1416 -0
  16. package/dist/{chunk-D6G4REZN-Dlv_YHcf.js → chunk-D6G4REZN-CICr2kpO.js} +2 -2
  17. package/dist/{chunk-RZ5BOZE2-D8w7Mlj9.js → chunk-RZ5BOZE2-DItbbReI.js} +8 -8
  18. package/dist/chunk-XZIHB7SX-TOPO0Fuc.js +16 -0
  19. package/dist/{classDiagram-GIVACNV2-B9RHXsFh.js → classDiagram-GIVACNV2-7MVpfZSz.js} +2 -2
  20. package/dist/{classDiagram-v2-COTLJTTW-B9RHXsFh.js → classDiagram-v2-COTLJTTW-7MVpfZSz.js} +2 -2
  21. package/dist/clojure-CCKyeQKf.js +2 -2
  22. package/dist/{clone-D3N_odGc.js → clone-DBH40z6e.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-rdJpJuUR.js +447 -0
  26. package/dist/{data-editor-DYnEMVel.js → data-editor-C6WuNzbJ.js} +5785 -5795
  27. package/dist/{diagram-SSKATNLV-B7sCpaam.js → diagram-SSKATNLV-gmsovYbf.js} +13 -13
  28. package/dist/{diagram-VNBRO52H-D5XB9Rqn.js → diagram-VNBRO52H-BFlwgyKt.js} +3 -3
  29. package/dist/{erDiagram-Q7BY3M3F-Bc4bVsl5.js → erDiagram-Q7BY3M3F-B6eG3pRD.js} +263 -262
  30. package/dist/flowDiagram-4HSFHLVR-Dg1wLRaw.js +1623 -0
  31. package/dist/{ganttDiagram-APWFNJXF-DX7O4yzu.js → ganttDiagram-APWFNJXF-DldqqVyx.js} +45 -45
  32. package/dist/gitGraphDiagram-7IBYFJ6S-Aim5p7Qf.js +712 -0
  33. package/dist/{graph-3qoxqlMi.js → graph-BHINt7Kf.js} +9 -9
  34. package/dist/{index-DMwlOrYW.js → index-A7tDI8LX.js} +9 -9
  35. package/dist/{index-DarPCnb9.js → index-BsCms8nF.js} +28 -28
  36. package/dist/{index-ClcExt8M.js → index-C1ncc3VE.js} +99 -98
  37. package/dist/{index-DSv7cBZ6.js → index-D0gh4lwc.js} +4 -4
  38. package/dist/{infoDiagram-PH2N3AL5-Hpz-dZTP.js → infoDiagram-PH2N3AL5-1m_6u4Y7.js} +3 -3
  39. package/dist/javascript-WMWNx-Vj.js +47 -47
  40. package/dist/{journeyDiagram-U35MCT3I-D8lBbVPX.js → journeyDiagram-U35MCT3I-CDL6jqeI.js} +18 -18
  41. package/dist/kanban-definition-NDS4AKOZ-RImoTsfS.js +719 -0
  42. package/dist/{katex-9tX9hjoM.js → katex-CUSbq6rG.js} +2180 -2180
  43. package/dist/{layout-BQ5ygFMS.js → layout-J5I1wvdv.js} +27 -27
  44. package/dist/{linear-DEKTCzK7.js → linear-Dq58HS87.js} +2 -2
  45. package/dist/main-uEwF8nEn.js +169878 -0
  46. package/dist/main.js +1 -1
  47. package/dist/mermaid-DmrTKCuO.js +14517 -0
  48. package/dist/{mhchem-L5-rce7L.js → mhchem-Db_f2n8C.js} +30 -30
  49. package/dist/{min-BVLo0atX.js → min-BHctwg9m.js} +2 -2
  50. package/dist/{mindmap-definition-ALO5MXBD-CJrYaVvo.js → mindmap-definition-ALO5MXBD-B28ZjQu_.js} +359 -359
  51. package/dist/mllike-BSnXJBGA.js +7 -7
  52. package/dist/{pieDiagram-IB7DONF6-Dctceo_p.js → pieDiagram-IB7DONF6-CcxQe-PK.js} +34 -34
  53. package/dist/pug-BqUR2bBq.js +35 -35
  54. package/dist/python-B5QdSKoL.js +18 -18
  55. package/dist/quadrantDiagram-7GDLP6J5-BmMQ4ybr.js +1025 -0
  56. package/dist/{radar-MK3ICKWK-C1HW1I3s.js → radar-MK3ICKWK-B2DbWDNQ.js} +2555 -2554
  57. package/dist/{react-plotly-Cb9GFlJK.js → react-plotly-CcEhICmT.js} +6595 -6597
  58. package/dist/{requirementDiagram-KVF5MWMF-B1hXsRKm.js → requirementDiagram-KVF5MWMF-C4IlZoRQ.js} +251 -250
  59. package/dist/rpm-IznJm2Xc.js +9 -9
  60. package/dist/{sankeyDiagram-QLVOVGJD-C4Wft0rG.js → sankeyDiagram-QLVOVGJD-CBnLihZQ.js} +339 -338
  61. package/dist/{sequenceDiagram-X6HHIX6F-DuI3MtaO.js → sequenceDiagram-X6HHIX6F-CWgBOzA1.js} +822 -821
  62. package/dist/{slides-component-CtHXOtAT.js → slides-component-DWhXV4tT.js} +280 -280
  63. package/dist/sql-mMre1Bo3.js +9 -9
  64. package/dist/{stateDiagram-DGXRK772-BA90keZx.js → stateDiagram-DGXRK772-BLnrEsRS.js} +17 -17
  65. package/dist/{stateDiagram-v2-YXO3MK2T-BAYgRopg.js → stateDiagram-v2-YXO3MK2T-CyEclGku.js} +2 -2
  66. package/dist/style.css +1 -1
  67. package/dist/{time-CSFHw3Jv.js → time-C9O7-c-W.js} +2 -2
  68. package/dist/{timeline-definition-BDJGKUSR-Blc0sOvC.js → timeline-definition-BDJGKUSR-Dr8Ki3tj.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-BiVYrHRN.js} +82 -82
  72. package/dist/{xychartDiagram-VJFVF3MP-zwhLbXXB.js → xychartDiagram-VJFVF3MP-CwfDeBLj.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,5 +1,5 @@
1
- var wr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
2
- var hs = wr((gs, yt) => {
1
+ var _r = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
2
+ var ps = _r((ys, ht) => {
3
3
  class br {
4
4
  constructor() {
5
5
  this.status = "pending", this.promise = new Promise((e, r) => {
@@ -47,14 +47,14 @@ var hs = wr((gs, yt) => {
47
47
  }
48
48
  t.joinValues = n, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
49
49
  })(k || (k = {}));
50
- var ot;
50
+ var at;
51
51
  (function(t) {
52
52
  t.mergeShapes = (e, r) => ({
53
53
  ...e,
54
54
  ...r
55
55
  // second overwrites first
56
56
  });
57
- })(ot || (ot = {}));
57
+ })(at || (at = {}));
58
58
  const p = k.arrayToEnum([
59
59
  "string",
60
60
  "nan",
@@ -76,7 +76,7 @@ var hs = wr((gs, yt) => {
76
76
  "never",
77
77
  "map",
78
78
  "set"
79
- ]), B = (t) => {
79
+ ]), U = (t) => {
80
80
  switch (typeof t) {
81
81
  case "undefined":
82
82
  return p.undefined;
@@ -114,8 +114,8 @@ var hs = wr((gs, yt) => {
114
114
  "invalid_intersection_types",
115
115
  "not_multiple_of",
116
116
  "not_finite"
117
- ]), kr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
118
- class P extends Error {
117
+ ]), wr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
118
+ class I extends Error {
119
119
  get errors() {
120
120
  return this.issues;
121
121
  }
@@ -152,7 +152,7 @@ var hs = wr((gs, yt) => {
152
152
  return s(this), n;
153
153
  }
154
154
  static assert(e) {
155
- if (!(e instanceof P))
155
+ if (!(e instanceof I))
156
156
  throw new Error(`Not a ZodError: ${e}`);
157
157
  }
158
158
  toString() {
@@ -174,8 +174,8 @@ var hs = wr((gs, yt) => {
174
174
  return this.flatten();
175
175
  }
176
176
  }
177
- P.create = (t) => new P(t);
178
- const ge = (t, e) => {
177
+ I.create = (t) => new I(t);
178
+ const me = (t, e) => {
179
179
  let r;
180
180
  switch (t.code) {
181
181
  case u.invalid_type:
@@ -231,14 +231,14 @@ var hs = wr((gs, yt) => {
231
231
  }
232
232
  return { message: r };
233
233
  };
234
- let At = ge;
235
- function xr(t) {
236
- At = t;
234
+ let Rt = me;
235
+ function kr(t) {
236
+ Rt = t;
237
237
  }
238
- function He() {
239
- return At;
238
+ function Ue() {
239
+ return Rt;
240
240
  }
241
- const We = (t) => {
241
+ const He = (t) => {
242
242
  const { data: e, path: r, errorMaps: n, issueData: s } = t, a = [...r, ...s.path || []], i = {
243
243
  ...s,
244
244
  path: a
@@ -258,9 +258,9 @@ var hs = wr((gs, yt) => {
258
258
  path: a,
259
259
  message: o
260
260
  };
261
- }, Sr = [];
261
+ }, xr = [];
262
262
  function f(t, e) {
263
- const r = He(), n = We({
263
+ const r = Ue(), n = He({
264
264
  issueData: e,
265
265
  data: t.data,
266
266
  path: t.path,
@@ -271,13 +271,13 @@ var hs = wr((gs, yt) => {
271
271
  // then schema-bound map if available
272
272
  r,
273
273
  // then global override map
274
- r === ge ? void 0 : ge
274
+ r === me ? void 0 : me
275
275
  // then global default map
276
276
  ].filter((s) => !!s)
277
277
  });
278
278
  t.common.issues.push(n);
279
279
  }
280
- class A {
280
+ class N {
281
281
  constructor() {
282
282
  this.value = "valid";
283
283
  }
@@ -305,7 +305,7 @@ var hs = wr((gs, yt) => {
305
305
  value: i
306
306
  });
307
307
  }
308
- return A.mergeObjectSync(e, n);
308
+ return N.mergeObjectSync(e, n);
309
309
  }
310
310
  static mergeObjectSync(e, r) {
311
311
  const n = {};
@@ -320,21 +320,21 @@ var hs = wr((gs, yt) => {
320
320
  }
321
321
  const g = Object.freeze({
322
322
  status: "aborted"
323
- }), me = (t) => ({ status: "dirty", value: t }), C = (t) => ({ status: "valid", value: t }), dt = (t) => t.status === "aborted", ct = (t) => t.status === "dirty", ie = (t) => t.status === "valid", Oe = (t) => typeof Promise < "u" && t instanceof Promise;
324
- function Je(t, e, r, n) {
323
+ }), pe = (t) => ({ status: "dirty", value: t }), A = (t) => ({ status: "valid", value: t }), it = (t) => t.status === "aborted", ot = (t) => t.status === "dirty", ae = (t) => t.status === "valid", Te = (t) => typeof Promise < "u" && t instanceof Promise;
324
+ function Be(t, e, r, n) {
325
325
  if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
326
326
  return e.get(t);
327
327
  }
328
- function Ct(t, e, r, n, s) {
328
+ function At(t, e, r, n, s) {
329
329
  if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
330
330
  return e.set(t, r), r;
331
331
  }
332
332
  var m;
333
333
  (function(t) {
334
- t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
334
+ t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e?.message;
335
335
  })(m || (m = {}));
336
- var Se, Te;
337
- class L {
336
+ var ke, xe;
337
+ class D {
338
338
  constructor(e, r, n, s) {
339
339
  this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = s;
340
340
  }
@@ -342,8 +342,8 @@ var hs = wr((gs, yt) => {
342
342
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
343
343
  }
344
344
  }
345
- const xt = (t, e) => {
346
- if (ie(e))
345
+ const kt = (t, e) => {
346
+ if (ae(e))
347
347
  return { success: !0, data: e.value };
348
348
  if (!t.common.issues.length)
349
349
  throw new Error("Validation failed but no issues detected.");
@@ -352,7 +352,7 @@ var hs = wr((gs, yt) => {
352
352
  get error() {
353
353
  if (this._error)
354
354
  return this._error;
355
- const r = new P(t.common.issues);
355
+ const r = new I(t.common.issues);
356
356
  return this._error = r, this._error;
357
357
  }
358
358
  };
@@ -369,18 +369,18 @@ var hs = wr((gs, yt) => {
369
369
  return i.code === "invalid_enum_value" ? { message: l ?? o.defaultError } : typeof o.data > "u" ? { message: (d = l ?? n) !== null && d !== void 0 ? d : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (c = l ?? r) !== null && c !== void 0 ? c : o.defaultError };
370
370
  }, description: s };
371
371
  }
372
- class w {
372
+ class b {
373
373
  get description() {
374
374
  return this._def.description;
375
375
  }
376
376
  _getType(e) {
377
- return B(e.data);
377
+ return U(e.data);
378
378
  }
379
379
  _getOrReturnCtx(e, r) {
380
380
  return r || {
381
381
  common: e.parent.common,
382
382
  data: e.data,
383
- parsedType: B(e.data),
383
+ parsedType: U(e.data),
384
384
  schemaErrorMap: this._def.errorMap,
385
385
  path: e.path,
386
386
  parent: e.parent
@@ -388,11 +388,11 @@ var hs = wr((gs, yt) => {
388
388
  }
389
389
  _processInputParams(e) {
390
390
  return {
391
- status: new A(),
391
+ status: new N(),
392
392
  ctx: {
393
393
  common: e.parent.common,
394
394
  data: e.data,
395
- parsedType: B(e.data),
395
+ parsedType: U(e.data),
396
396
  schemaErrorMap: this._def.errorMap,
397
397
  path: e.path,
398
398
  parent: e.parent
@@ -401,7 +401,7 @@ var hs = wr((gs, yt) => {
401
401
  }
402
402
  _parseSync(e) {
403
403
  const r = this._parse(e);
404
- if (Oe(r))
404
+ if (Te(r))
405
405
  throw new Error("Synchronous parse encountered promise.");
406
406
  return r;
407
407
  }
@@ -420,16 +420,16 @@ var hs = wr((gs, yt) => {
420
420
  const s = {
421
421
  common: {
422
422
  issues: [],
423
- async: (n = r == null ? void 0 : r.async) !== null && n !== void 0 ? n : !1,
424
- contextualErrorMap: r == null ? void 0 : r.errorMap
423
+ async: (n = r?.async) !== null && n !== void 0 ? n : !1,
424
+ contextualErrorMap: r?.errorMap
425
425
  },
426
- path: (r == null ? void 0 : r.path) || [],
426
+ path: r?.path || [],
427
427
  schemaErrorMap: this._def.errorMap,
428
428
  parent: null,
429
429
  data: e,
430
- parsedType: B(e)
430
+ parsedType: U(e)
431
431
  }, a = this._parseSync({ data: e, path: s.path, parent: s });
432
- return xt(s, a);
432
+ return kt(s, a);
433
433
  }
434
434
  "~validate"(e) {
435
435
  var r, n;
@@ -442,23 +442,23 @@ var hs = wr((gs, yt) => {
442
442
  schemaErrorMap: this._def.errorMap,
443
443
  parent: null,
444
444
  data: e,
445
- parsedType: B(e)
445
+ parsedType: U(e)
446
446
  };
447
447
  if (!this["~standard"].async)
448
448
  try {
449
449
  const a = this._parseSync({ data: e, path: [], parent: s });
450
- return ie(a) ? {
450
+ return ae(a) ? {
451
451
  value: a.value
452
452
  } : {
453
453
  issues: s.common.issues
454
454
  };
455
455
  } catch (a) {
456
- !((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 = {
456
+ !((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 = {
457
457
  issues: [],
458
458
  async: !0
459
459
  };
460
460
  }
461
- return this._parseAsync({ data: e, path: [], parent: s }).then((a) => ie(a) ? {
461
+ return this._parseAsync({ data: e, path: [], parent: s }).then((a) => ae(a) ? {
462
462
  value: a.value
463
463
  } : {
464
464
  issues: s.common.issues
@@ -474,16 +474,16 @@ var hs = wr((gs, yt) => {
474
474
  const n = {
475
475
  common: {
476
476
  issues: [],
477
- contextualErrorMap: r == null ? void 0 : r.errorMap,
477
+ contextualErrorMap: r?.errorMap,
478
478
  async: !0
479
479
  },
480
- path: (r == null ? void 0 : r.path) || [],
480
+ path: r?.path || [],
481
481
  schemaErrorMap: this._def.errorMap,
482
482
  parent: null,
483
483
  data: e,
484
- parsedType: B(e)
485
- }, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Oe(s) ? s : Promise.resolve(s));
486
- return xt(n, a);
484
+ parsedType: U(e)
485
+ }, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Te(s) ? s : Promise.resolve(s));
486
+ return kt(n, a);
487
487
  }
488
488
  refine(e, r) {
489
489
  const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
@@ -499,7 +499,7 @@ var hs = wr((gs, yt) => {
499
499
  return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1));
500
500
  }
501
501
  _refinement(e) {
502
- return new M({
502
+ return new $({
503
503
  schema: this,
504
504
  typeName: y.ZodEffects,
505
505
  effect: { type: "refinement", refinement: e }
@@ -516,7 +516,7 @@ var hs = wr((gs, yt) => {
516
516
  };
517
517
  }
518
518
  optional() {
519
- return D.create(this, this._def);
519
+ return F.create(this, this._def);
520
520
  }
521
521
  nullable() {
522
522
  return K.create(this, this._def);
@@ -525,19 +525,19 @@ var hs = wr((gs, yt) => {
525
525
  return this.nullable().optional();
526
526
  }
527
527
  array() {
528
- return $.create(this);
528
+ return Z.create(this);
529
529
  }
530
530
  promise() {
531
- return _e.create(this, this._def);
531
+ return ge.create(this, this._def);
532
532
  }
533
533
  or(e) {
534
- return Ce.create([this, e], this._def);
534
+ return Re.create([this, e], this._def);
535
535
  }
536
536
  and(e) {
537
- return Ie.create(this, e, this._def);
537
+ return Ae.create(this, e, this._def);
538
538
  }
539
539
  transform(e) {
540
- return new M({
540
+ return new $({
541
541
  ..._(this._def),
542
542
  schema: this,
543
543
  typeName: y.ZodEffects,
@@ -546,7 +546,7 @@ var hs = wr((gs, yt) => {
546
546
  }
547
547
  default(e) {
548
548
  const r = typeof e == "function" ? e : () => e;
549
- return new Me({
549
+ return new Ze({
550
550
  ..._(this._def),
551
551
  innerType: this,
552
552
  defaultValue: r,
@@ -554,7 +554,7 @@ var hs = wr((gs, yt) => {
554
554
  });
555
555
  }
556
556
  brand() {
557
- return new gt({
557
+ return new mt({
558
558
  typeName: y.ZodBranded,
559
559
  type: this,
560
560
  ..._(this._def)
@@ -562,7 +562,7 @@ var hs = wr((gs, yt) => {
562
562
  }
563
563
  catch(e) {
564
564
  const r = typeof e == "function" ? e : () => e;
565
- return new Fe({
565
+ return new $e({
566
566
  ..._(this._def),
567
567
  innerType: this,
568
568
  catchValue: r,
@@ -577,10 +577,10 @@ var hs = wr((gs, yt) => {
577
577
  });
578
578
  }
579
579
  pipe(e) {
580
- return Le.create(this, e);
580
+ return Fe.create(this, e);
581
581
  }
582
582
  readonly() {
583
- return De.create(this);
583
+ return Me.create(this);
584
584
  }
585
585
  isOptional() {
586
586
  return this.safeParse(void 0).success;
@@ -589,26 +589,26 @@ var hs = wr((gs, yt) => {
589
589
  return this.safeParse(null).success;
590
590
  }
591
591
  }
592
- const Tr = /^c[^\s-]{8,}$/i, Er = /^[0-9a-z]+$/, Or = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Nr = /^[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, Rr = /^[a-z0-9_-]{21}$/i, Ar = /^[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, Pr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
593
- let at;
594
- 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])$/, Zr = /^(?:(?: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])$/, $r = /^(([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])$/, Fr = /^([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}(=)?))?$/, It = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Lr = new RegExp(`^${It}$`);
595
- function Pt(t) {
592
+ const Sr = /^c[^\s-]{8,}$/i, Tr = /^[0-9a-z]+$/, Er = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Or = /^[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, Nr = /^[a-z0-9_-]{21}$/i, Rr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ar = /^[-+]?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)?)??$/, Cr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ir = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
593
+ let nt;
594
+ const Pr = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, 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])\/(3[0-2]|[12]?[0-9])$/, Zr = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, $r = /^(([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])$/, Mr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Fr = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ct = "((\\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])))", Dr = new RegExp(`^${Ct}$`);
595
+ function It(t) {
596
596
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
597
597
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
598
598
  }
599
- function Vr(t) {
600
- return new RegExp(`^${Pt(t)}$`);
599
+ function Lr(t) {
600
+ return new RegExp(`^${It(t)}$`);
601
601
  }
602
- function jt(t) {
603
- let e = `${It}T${Pt(t)}`;
602
+ function Pt(t) {
603
+ let e = `${Ct}T${It(t)}`;
604
604
  const r = [];
605
605
  return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
606
606
  }
607
- function zr(t, e) {
608
- return !!((e === "v4" || !e) && jr.test(t) || (e === "v6" || !e) && $r.test(t));
607
+ function Vr(t, e) {
608
+ return !!((e === "v4" || !e) && Pr.test(t) || (e === "v6" || !e) && Zr.test(t));
609
609
  }
610
- function qr(t, e) {
611
- if (!Ar.test(t))
610
+ function zr(t, e) {
611
+ if (!Rr.test(t))
612
612
  return !1;
613
613
  try {
614
614
  const [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(n));
@@ -617,10 +617,10 @@ var hs = wr((gs, yt) => {
617
617
  return !1;
618
618
  }
619
619
  }
620
- function Ur(t, e) {
621
- return !!((e === "v4" || !e) && Zr.test(t) || (e === "v6" || !e) && Mr.test(t));
620
+ function qr(t, e) {
621
+ return !!((e === "v4" || !e) && jr.test(t) || (e === "v6" || !e) && $r.test(t));
622
622
  }
623
- class Z extends w {
623
+ class j extends b {
624
624
  _parse(e) {
625
625
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== p.string) {
626
626
  const a = this._getOrReturnCtx(e);
@@ -630,7 +630,7 @@ var hs = wr((gs, yt) => {
630
630
  received: a.parsedType
631
631
  }), g;
632
632
  }
633
- const n = new A();
633
+ const n = new N();
634
634
  let s;
635
635
  for (const a of this._def.checks)
636
636
  if (a.kind === "min")
@@ -669,43 +669,43 @@ var hs = wr((gs, yt) => {
669
669
  message: a.message
670
670
  }), n.dirty());
671
671
  } else if (a.kind === "email")
672
- Ir.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
672
+ Cr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
673
673
  validation: "email",
674
674
  code: u.invalid_string,
675
675
  message: a.message
676
676
  }), n.dirty());
677
677
  else if (a.kind === "emoji")
678
- at || (at = new RegExp(Pr, "u")), at.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
678
+ nt || (nt = new RegExp(Ir, "u")), nt.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
679
679
  validation: "emoji",
680
680
  code: u.invalid_string,
681
681
  message: a.message
682
682
  }), n.dirty());
683
683
  else if (a.kind === "uuid")
684
- Nr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
684
+ Or.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
685
685
  validation: "uuid",
686
686
  code: u.invalid_string,
687
687
  message: a.message
688
688
  }), n.dirty());
689
689
  else if (a.kind === "nanoid")
690
- Rr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
690
+ Nr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
691
691
  validation: "nanoid",
692
692
  code: u.invalid_string,
693
693
  message: a.message
694
694
  }), n.dirty());
695
695
  else if (a.kind === "cuid")
696
- Tr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
696
+ Sr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
697
697
  validation: "cuid",
698
698
  code: u.invalid_string,
699
699
  message: a.message
700
700
  }), n.dirty());
701
701
  else if (a.kind === "cuid2")
702
- Er.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
702
+ Tr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
703
703
  validation: "cuid2",
704
704
  code: u.invalid_string,
705
705
  message: a.message
706
706
  }), n.dirty());
707
707
  else if (a.kind === "ulid")
708
- Or.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
708
+ Er.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
709
709
  validation: "ulid",
710
710
  code: u.invalid_string,
711
711
  message: a.message
@@ -736,39 +736,39 @@ var hs = wr((gs, yt) => {
736
736
  code: u.invalid_string,
737
737
  validation: { endsWith: a.value },
738
738
  message: a.message
739
- }), n.dirty()) : a.kind === "datetime" ? jt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
739
+ }), n.dirty()) : a.kind === "datetime" ? Pt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
740
740
  code: u.invalid_string,
741
741
  validation: "datetime",
742
742
  message: a.message
743
- }), n.dirty()) : a.kind === "date" ? Lr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
743
+ }), n.dirty()) : a.kind === "date" ? Dr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
744
744
  code: u.invalid_string,
745
745
  validation: "date",
746
746
  message: a.message
747
- }), n.dirty()) : a.kind === "time" ? Vr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
747
+ }), n.dirty()) : a.kind === "time" ? Lr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
748
748
  code: u.invalid_string,
749
749
  validation: "time",
750
750
  message: a.message
751
- }), n.dirty()) : a.kind === "duration" ? Cr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
751
+ }), n.dirty()) : a.kind === "duration" ? Ar.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
752
752
  validation: "duration",
753
753
  code: u.invalid_string,
754
754
  message: a.message
755
- }), n.dirty()) : a.kind === "ip" ? zr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
755
+ }), n.dirty()) : a.kind === "ip" ? Vr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
756
756
  validation: "ip",
757
757
  code: u.invalid_string,
758
758
  message: a.message
759
- }), n.dirty()) : a.kind === "jwt" ? qr(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
759
+ }), n.dirty()) : a.kind === "jwt" ? zr(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
760
760
  validation: "jwt",
761
761
  code: u.invalid_string,
762
762
  message: a.message
763
- }), n.dirty()) : a.kind === "cidr" ? Ur(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
763
+ }), n.dirty()) : a.kind === "cidr" ? qr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
764
764
  validation: "cidr",
765
765
  code: u.invalid_string,
766
766
  message: a.message
767
- }), n.dirty()) : a.kind === "base64" ? Fr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
767
+ }), n.dirty()) : a.kind === "base64" ? Mr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
768
768
  validation: "base64",
769
769
  code: u.invalid_string,
770
770
  message: a.message
771
- }), n.dirty()) : a.kind === "base64url" ? Dr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
771
+ }), n.dirty()) : a.kind === "base64url" ? Fr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
772
772
  validation: "base64url",
773
773
  code: u.invalid_string,
774
774
  message: a.message
@@ -783,7 +783,7 @@ var hs = wr((gs, yt) => {
783
783
  });
784
784
  }
785
785
  _addCheck(e) {
786
- return new Z({
786
+ return new j({
787
787
  ...this._def,
788
788
  checks: [...this._def.checks, e]
789
789
  });
@@ -840,10 +840,10 @@ var hs = wr((gs, yt) => {
840
840
  message: e
841
841
  }) : this._addCheck({
842
842
  kind: "datetime",
843
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
844
- offset: (r = e == null ? void 0 : e.offset) !== null && r !== void 0 ? r : !1,
845
- local: (n = e == null ? void 0 : e.local) !== null && n !== void 0 ? n : !1,
846
- ...m.errToObj(e == null ? void 0 : e.message)
843
+ precision: typeof e?.precision > "u" ? null : e?.precision,
844
+ offset: (r = e?.offset) !== null && r !== void 0 ? r : !1,
845
+ local: (n = e?.local) !== null && n !== void 0 ? n : !1,
846
+ ...m.errToObj(e?.message)
847
847
  });
848
848
  }
849
849
  date(e) {
@@ -856,8 +856,8 @@ var hs = wr((gs, yt) => {
856
856
  message: e
857
857
  }) : this._addCheck({
858
858
  kind: "time",
859
- precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
860
- ...m.errToObj(e == null ? void 0 : e.message)
859
+ precision: typeof e?.precision > "u" ? null : e?.precision,
860
+ ...m.errToObj(e?.message)
861
861
  });
862
862
  }
863
863
  duration(e) {
@@ -874,8 +874,8 @@ var hs = wr((gs, yt) => {
874
874
  return this._addCheck({
875
875
  kind: "includes",
876
876
  value: e,
877
- position: r == null ? void 0 : r.position,
878
- ...m.errToObj(r == null ? void 0 : r.message)
877
+ position: r?.position,
878
+ ...m.errToObj(r?.message)
879
879
  });
880
880
  }
881
881
  startsWith(e, r) {
@@ -920,19 +920,19 @@ var hs = wr((gs, yt) => {
920
920
  return this.min(1, m.errToObj(e));
921
921
  }
922
922
  trim() {
923
- return new Z({
923
+ return new j({
924
924
  ...this._def,
925
925
  checks: [...this._def.checks, { kind: "trim" }]
926
926
  });
927
927
  }
928
928
  toLowerCase() {
929
- return new Z({
929
+ return new j({
930
930
  ...this._def,
931
931
  checks: [...this._def.checks, { kind: "toLowerCase" }]
932
932
  });
933
933
  }
934
934
  toUpperCase() {
935
- return new Z({
935
+ return new j({
936
936
  ...this._def,
937
937
  checks: [...this._def.checks, { kind: "toUpperCase" }]
938
938
  });
@@ -998,20 +998,20 @@ var hs = wr((gs, yt) => {
998
998
  return e;
999
999
  }
1000
1000
  }
1001
- Z.create = (t) => {
1001
+ j.create = (t) => {
1002
1002
  var e;
1003
- return new Z({
1003
+ return new j({
1004
1004
  checks: [],
1005
1005
  typeName: y.ZodString,
1006
- coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
1006
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
1007
1007
  ..._(t)
1008
1008
  });
1009
1009
  };
1010
- function Br(t, e) {
1010
+ function Ur(t, e) {
1011
1011
  const r = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = r > n ? r : n, a = parseInt(t.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
1012
1012
  return a % i / Math.pow(10, s);
1013
1013
  }
1014
- class J extends w {
1014
+ class J extends b {
1015
1015
  constructor() {
1016
1016
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1017
1017
  }
@@ -1025,7 +1025,7 @@ var hs = wr((gs, yt) => {
1025
1025
  }), g;
1026
1026
  }
1027
1027
  let n;
1028
- const s = new A();
1028
+ const s = new N();
1029
1029
  for (const a of this._def.checks)
1030
1030
  a.kind === "int" ? k.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), f(n, {
1031
1031
  code: u.invalid_type,
@@ -1046,7 +1046,7 @@ var hs = wr((gs, yt) => {
1046
1046
  inclusive: a.inclusive,
1047
1047
  exact: !1,
1048
1048
  message: a.message
1049
- }), s.dirty()) : a.kind === "multipleOf" ? Br(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
1049
+ }), s.dirty()) : a.kind === "multipleOf" ? Ur(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
1050
1050
  code: u.not_multiple_of,
1051
1051
  multipleOf: a.value,
1052
1052
  message: a.message
@@ -1180,10 +1180,10 @@ var hs = wr((gs, yt) => {
1180
1180
  J.create = (t) => new J({
1181
1181
  checks: [],
1182
1182
  typeName: y.ZodNumber,
1183
- coerce: (t == null ? void 0 : t.coerce) || !1,
1183
+ coerce: t?.coerce || !1,
1184
1184
  ..._(t)
1185
1185
  });
1186
- class Y extends w {
1186
+ class Y extends b {
1187
1187
  constructor() {
1188
1188
  super(...arguments), this.min = this.gte, this.max = this.lte;
1189
1189
  }
@@ -1197,7 +1197,7 @@ var hs = wr((gs, yt) => {
1197
1197
  if (this._getType(e) !== p.bigint)
1198
1198
  return this._getInvalidInput(e);
1199
1199
  let n;
1200
- const s = new A();
1200
+ const s = new N();
1201
1201
  for (const a of this._def.checks)
1202
1202
  a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (n = this._getOrReturnCtx(e, n), f(n, {
1203
1203
  code: u.too_small,
@@ -1315,11 +1315,11 @@ var hs = wr((gs, yt) => {
1315
1315
  return new Y({
1316
1316
  checks: [],
1317
1317
  typeName: y.ZodBigInt,
1318
- coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
1318
+ coerce: (e = t?.coerce) !== null && e !== void 0 ? e : !1,
1319
1319
  ..._(t)
1320
1320
  });
1321
1321
  };
1322
- class Ne extends w {
1322
+ class Ee extends b {
1323
1323
  _parse(e) {
1324
1324
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
1325
1325
  const n = this._getOrReturnCtx(e);
@@ -1329,15 +1329,15 @@ var hs = wr((gs, yt) => {
1329
1329
  received: n.parsedType
1330
1330
  }), g;
1331
1331
  }
1332
- return C(e.data);
1332
+ return A(e.data);
1333
1333
  }
1334
1334
  }
1335
- Ne.create = (t) => new Ne({
1335
+ Ee.create = (t) => new Ee({
1336
1336
  typeName: y.ZodBoolean,
1337
- coerce: (t == null ? void 0 : t.coerce) || !1,
1337
+ coerce: t?.coerce || !1,
1338
1338
  ..._(t)
1339
1339
  });
1340
- class oe extends w {
1340
+ class ie extends b {
1341
1341
  _parse(e) {
1342
1342
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== p.date) {
1343
1343
  const a = this._getOrReturnCtx(e);
@@ -1353,7 +1353,7 @@ var hs = wr((gs, yt) => {
1353
1353
  code: u.invalid_date
1354
1354
  }), g;
1355
1355
  }
1356
- const n = new A();
1356
+ const n = new N();
1357
1357
  let s;
1358
1358
  for (const a of this._def.checks)
1359
1359
  a.kind === "min" ? e.data.getTime() < a.value && (s = this._getOrReturnCtx(e, s), f(s, {
@@ -1377,7 +1377,7 @@ var hs = wr((gs, yt) => {
1377
1377
  };
1378
1378
  }
1379
1379
  _addCheck(e) {
1380
- return new oe({
1380
+ return new ie({
1381
1381
  ...this._def,
1382
1382
  checks: [...this._def.checks, e]
1383
1383
  });
@@ -1409,13 +1409,13 @@ var hs = wr((gs, yt) => {
1409
1409
  return e != null ? new Date(e) : null;
1410
1410
  }
1411
1411
  }
1412
- oe.create = (t) => new oe({
1412
+ ie.create = (t) => new ie({
1413
1413
  checks: [],
1414
- coerce: (t == null ? void 0 : t.coerce) || !1,
1414
+ coerce: t?.coerce || !1,
1415
1415
  typeName: y.ZodDate,
1416
1416
  ..._(t)
1417
1417
  });
1418
- class Ye extends w {
1418
+ class We extends b {
1419
1419
  _parse(e) {
1420
1420
  if (this._getType(e) !== p.symbol) {
1421
1421
  const n = this._getOrReturnCtx(e);
@@ -1425,14 +1425,14 @@ var hs = wr((gs, yt) => {
1425
1425
  received: n.parsedType
1426
1426
  }), g;
1427
1427
  }
1428
- return C(e.data);
1428
+ return A(e.data);
1429
1429
  }
1430
1430
  }
1431
- Ye.create = (t) => new Ye({
1431
+ We.create = (t) => new We({
1432
1432
  typeName: y.ZodSymbol,
1433
1433
  ..._(t)
1434
1434
  });
1435
- class Re extends w {
1435
+ class Oe extends b {
1436
1436
  _parse(e) {
1437
1437
  if (this._getType(e) !== p.undefined) {
1438
1438
  const n = this._getOrReturnCtx(e);
@@ -1442,14 +1442,14 @@ var hs = wr((gs, yt) => {
1442
1442
  received: n.parsedType
1443
1443
  }), g;
1444
1444
  }
1445
- return C(e.data);
1445
+ return A(e.data);
1446
1446
  }
1447
1447
  }
1448
- Re.create = (t) => new Re({
1448
+ Oe.create = (t) => new Oe({
1449
1449
  typeName: y.ZodUndefined,
1450
1450
  ..._(t)
1451
1451
  });
1452
- class Ae extends w {
1452
+ class Ne extends b {
1453
1453
  _parse(e) {
1454
1454
  if (this._getType(e) !== p.null) {
1455
1455
  const n = this._getOrReturnCtx(e);
@@ -1459,38 +1459,38 @@ var hs = wr((gs, yt) => {
1459
1459
  received: n.parsedType
1460
1460
  }), g;
1461
1461
  }
1462
- return C(e.data);
1462
+ return A(e.data);
1463
1463
  }
1464
1464
  }
1465
- Ae.create = (t) => new Ae({
1465
+ Ne.create = (t) => new Ne({
1466
1466
  typeName: y.ZodNull,
1467
1467
  ..._(t)
1468
1468
  });
1469
- class ve extends w {
1469
+ class ye extends b {
1470
1470
  constructor() {
1471
1471
  super(...arguments), this._any = !0;
1472
1472
  }
1473
1473
  _parse(e) {
1474
- return C(e.data);
1474
+ return A(e.data);
1475
1475
  }
1476
1476
  }
1477
- ve.create = (t) => new ve({
1477
+ ye.create = (t) => new ye({
1478
1478
  typeName: y.ZodAny,
1479
1479
  ..._(t)
1480
1480
  });
1481
- class ae extends w {
1481
+ class se extends b {
1482
1482
  constructor() {
1483
1483
  super(...arguments), this._unknown = !0;
1484
1484
  }
1485
1485
  _parse(e) {
1486
- return C(e.data);
1486
+ return A(e.data);
1487
1487
  }
1488
1488
  }
1489
- ae.create = (t) => new ae({
1489
+ se.create = (t) => new se({
1490
1490
  typeName: y.ZodUnknown,
1491
1491
  ..._(t)
1492
1492
  });
1493
- class H extends w {
1493
+ class H extends b {
1494
1494
  _parse(e) {
1495
1495
  const r = this._getOrReturnCtx(e);
1496
1496
  return f(r, {
@@ -1504,7 +1504,7 @@ var hs = wr((gs, yt) => {
1504
1504
  typeName: y.ZodNever,
1505
1505
  ..._(t)
1506
1506
  });
1507
- class Ge extends w {
1507
+ class Je extends b {
1508
1508
  _parse(e) {
1509
1509
  if (this._getType(e) !== p.undefined) {
1510
1510
  const n = this._getOrReturnCtx(e);
@@ -1514,14 +1514,14 @@ var hs = wr((gs, yt) => {
1514
1514
  received: n.parsedType
1515
1515
  }), g;
1516
1516
  }
1517
- return C(e.data);
1517
+ return A(e.data);
1518
1518
  }
1519
1519
  }
1520
- Ge.create = (t) => new Ge({
1520
+ Je.create = (t) => new Je({
1521
1521
  typeName: y.ZodVoid,
1522
1522
  ..._(t)
1523
1523
  });
1524
- class $ extends w {
1524
+ class Z extends b {
1525
1525
  _parse(e) {
1526
1526
  const { ctx: r, status: n } = this._processInputParams(e), s = this._def;
1527
1527
  if (r.parsedType !== p.array)
@@ -1557,27 +1557,27 @@ var hs = wr((gs, yt) => {
1557
1557
  exact: !1,
1558
1558
  message: s.maxLength.message
1559
1559
  }), n.dirty()), r.common.async)
1560
- return Promise.all([...r.data].map((i, o) => s.type._parseAsync(new L(r, i, r.path, o)))).then((i) => A.mergeArray(n, i));
1561
- const a = [...r.data].map((i, o) => s.type._parseSync(new L(r, i, r.path, o)));
1562
- return A.mergeArray(n, a);
1560
+ return Promise.all([...r.data].map((i, o) => s.type._parseAsync(new D(r, i, r.path, o)))).then((i) => N.mergeArray(n, i));
1561
+ const a = [...r.data].map((i, o) => s.type._parseSync(new D(r, i, r.path, o)));
1562
+ return N.mergeArray(n, a);
1563
1563
  }
1564
1564
  get element() {
1565
1565
  return this._def.type;
1566
1566
  }
1567
1567
  min(e, r) {
1568
- return new $({
1568
+ return new Z({
1569
1569
  ...this._def,
1570
1570
  minLength: { value: e, message: m.toString(r) }
1571
1571
  });
1572
1572
  }
1573
1573
  max(e, r) {
1574
- return new $({
1574
+ return new Z({
1575
1575
  ...this._def,
1576
1576
  maxLength: { value: e, message: m.toString(r) }
1577
1577
  });
1578
1578
  }
1579
1579
  length(e, r) {
1580
- return new $({
1580
+ return new Z({
1581
1581
  ...this._def,
1582
1582
  exactLength: { value: e, message: m.toString(r) }
1583
1583
  });
@@ -1586,7 +1586,7 @@ var hs = wr((gs, yt) => {
1586
1586
  return this.min(1, e);
1587
1587
  }
1588
1588
  }
1589
- $.create = (t, e) => new $({
1589
+ Z.create = (t, e) => new Z({
1590
1590
  type: t,
1591
1591
  minLength: null,
1592
1592
  maxLength: null,
@@ -1594,23 +1594,23 @@ var hs = wr((gs, yt) => {
1594
1594
  typeName: y.ZodArray,
1595
1595
  ..._(e)
1596
1596
  });
1597
- function ue(t) {
1598
- if (t instanceof O) {
1597
+ function de(t) {
1598
+ if (t instanceof E) {
1599
1599
  const e = {};
1600
1600
  for (const r in t.shape) {
1601
1601
  const n = t.shape[r];
1602
- e[r] = D.create(ue(n));
1602
+ e[r] = F.create(de(n));
1603
1603
  }
1604
- return new O({
1604
+ return new E({
1605
1605
  ...t._def,
1606
1606
  shape: () => e
1607
1607
  });
1608
- } else return t instanceof $ ? new $({
1608
+ } else return t instanceof Z ? new Z({
1609
1609
  ...t._def,
1610
- type: ue(t.element)
1611
- }) : t instanceof D ? D.create(ue(t.unwrap())) : t instanceof K ? K.create(ue(t.unwrap())) : t instanceof V ? V.create(t.items.map((e) => ue(e))) : t;
1610
+ type: de(t.element)
1611
+ }) : t instanceof F ? F.create(de(t.unwrap())) : t instanceof K ? K.create(de(t.unwrap())) : t instanceof L ? L.create(t.items.map((e) => de(e))) : t;
1612
1612
  }
1613
- class O extends w {
1613
+ class E extends b {
1614
1614
  constructor() {
1615
1615
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1616
1616
  }
@@ -1635,10 +1635,10 @@ var hs = wr((gs, yt) => {
1635
1635
  i.includes(c) || o.push(c);
1636
1636
  const d = [];
1637
1637
  for (const c of i) {
1638
- const l = a[c], b = s.data[c];
1638
+ const l = a[c], w = s.data[c];
1639
1639
  d.push({
1640
1640
  key: { status: "valid", value: c },
1641
- value: l._parse(new L(s, b, s.path, c)),
1641
+ value: l._parse(new D(s, w, s.path, c)),
1642
1642
  alwaysSet: c in s.data
1643
1643
  });
1644
1644
  }
@@ -1659,11 +1659,11 @@ var hs = wr((gs, yt) => {
1659
1659
  } else {
1660
1660
  const c = this._def.catchall;
1661
1661
  for (const l of o) {
1662
- const b = s.data[l];
1662
+ const w = s.data[l];
1663
1663
  d.push({
1664
1664
  key: { status: "valid", value: l },
1665
1665
  value: c._parse(
1666
- new L(s, b, s.path, l)
1666
+ new D(s, w, s.path, l)
1667
1667
  //, ctx.child(key), value, getParsedType(value)
1668
1668
  ),
1669
1669
  alwaysSet: l in s.data
@@ -1673,21 +1673,21 @@ var hs = wr((gs, yt) => {
1673
1673
  return s.common.async ? Promise.resolve().then(async () => {
1674
1674
  const c = [];
1675
1675
  for (const l of d) {
1676
- const b = await l.key, S = await l.value;
1676
+ const w = await l.key, S = await l.value;
1677
1677
  c.push({
1678
- key: b,
1678
+ key: w,
1679
1679
  value: S,
1680
1680
  alwaysSet: l.alwaysSet
1681
1681
  });
1682
1682
  }
1683
1683
  return c;
1684
- }).then((c) => A.mergeObjectSync(n, c)) : A.mergeObjectSync(n, d);
1684
+ }).then((c) => N.mergeObjectSync(n, c)) : N.mergeObjectSync(n, d);
1685
1685
  }
1686
1686
  get shape() {
1687
1687
  return this._def.shape();
1688
1688
  }
1689
1689
  strict(e) {
1690
- return m.errToObj, new O({
1690
+ return m.errToObj, new E({
1691
1691
  ...this._def,
1692
1692
  unknownKeys: "strict",
1693
1693
  ...e !== void 0 ? {
@@ -1704,13 +1704,13 @@ var hs = wr((gs, yt) => {
1704
1704
  });
1705
1705
  }
1706
1706
  strip() {
1707
- return new O({
1707
+ return new E({
1708
1708
  ...this._def,
1709
1709
  unknownKeys: "strip"
1710
1710
  });
1711
1711
  }
1712
1712
  passthrough() {
1713
- return new O({
1713
+ return new E({
1714
1714
  ...this._def,
1715
1715
  unknownKeys: "passthrough"
1716
1716
  });
@@ -1733,7 +1733,7 @@ var hs = wr((gs, yt) => {
1733
1733
  // }) as any;
1734
1734
  // };
1735
1735
  extend(e) {
1736
- return new O({
1736
+ return new E({
1737
1737
  ...this._def,
1738
1738
  shape: () => ({
1739
1739
  ...this._def.shape(),
@@ -1747,7 +1747,7 @@ var hs = wr((gs, yt) => {
1747
1747
  * upgrade if you are experiencing issues.
1748
1748
  */
1749
1749
  merge(e) {
1750
- return new O({
1750
+ return new E({
1751
1751
  unknownKeys: e._def.unknownKeys,
1752
1752
  catchall: e._def.catchall,
1753
1753
  shape: () => ({
@@ -1817,7 +1817,7 @@ var hs = wr((gs, yt) => {
1817
1817
  // return merged;
1818
1818
  // }
1819
1819
  catchall(e) {
1820
- return new O({
1820
+ return new E({
1821
1821
  ...this._def,
1822
1822
  catchall: e
1823
1823
  });
@@ -1826,7 +1826,7 @@ var hs = wr((gs, yt) => {
1826
1826
  const r = {};
1827
1827
  return k.objectKeys(e).forEach((n) => {
1828
1828
  e[n] && this.shape[n] && (r[n] = this.shape[n]);
1829
- }), new O({
1829
+ }), new E({
1830
1830
  ...this._def,
1831
1831
  shape: () => r
1832
1832
  });
@@ -1835,7 +1835,7 @@ var hs = wr((gs, yt) => {
1835
1835
  const r = {};
1836
1836
  return k.objectKeys(this.shape).forEach((n) => {
1837
1837
  e[n] || (r[n] = this.shape[n]);
1838
- }), new O({
1838
+ }), new E({
1839
1839
  ...this._def,
1840
1840
  shape: () => r
1841
1841
  });
@@ -1844,14 +1844,14 @@ var hs = wr((gs, yt) => {
1844
1844
  * @deprecated
1845
1845
  */
1846
1846
  deepPartial() {
1847
- return ue(this);
1847
+ return de(this);
1848
1848
  }
1849
1849
  partial(e) {
1850
1850
  const r = {};
1851
1851
  return k.objectKeys(this.shape).forEach((n) => {
1852
1852
  const s = this.shape[n];
1853
1853
  e && !e[n] ? r[n] = s : r[n] = s.optional();
1854
- }), new O({
1854
+ }), new E({
1855
1855
  ...this._def,
1856
1856
  shape: () => r
1857
1857
  });
@@ -1863,41 +1863,41 @@ var hs = wr((gs, yt) => {
1863
1863
  r[n] = this.shape[n];
1864
1864
  else {
1865
1865
  let a = this.shape[n];
1866
- for (; a instanceof D; )
1866
+ for (; a instanceof F; )
1867
1867
  a = a._def.innerType;
1868
1868
  r[n] = a;
1869
1869
  }
1870
- }), new O({
1870
+ }), new E({
1871
1871
  ...this._def,
1872
1872
  shape: () => r
1873
1873
  });
1874
1874
  }
1875
1875
  keyof() {
1876
- return Zt(k.objectKeys(this.shape));
1876
+ return jt(k.objectKeys(this.shape));
1877
1877
  }
1878
1878
  }
1879
- O.create = (t, e) => new O({
1879
+ E.create = (t, e) => new E({
1880
1880
  shape: () => t,
1881
1881
  unknownKeys: "strip",
1882
1882
  catchall: H.create(),
1883
1883
  typeName: y.ZodObject,
1884
1884
  ..._(e)
1885
1885
  });
1886
- O.strictCreate = (t, e) => new O({
1886
+ E.strictCreate = (t, e) => new E({
1887
1887
  shape: () => t,
1888
1888
  unknownKeys: "strict",
1889
1889
  catchall: H.create(),
1890
1890
  typeName: y.ZodObject,
1891
1891
  ..._(e)
1892
1892
  });
1893
- O.lazycreate = (t, e) => new O({
1893
+ E.lazycreate = (t, e) => new E({
1894
1894
  shape: t,
1895
1895
  unknownKeys: "strip",
1896
1896
  catchall: H.create(),
1897
1897
  typeName: y.ZodObject,
1898
1898
  ..._(e)
1899
1899
  });
1900
- class Ce extends w {
1900
+ class Re extends b {
1901
1901
  _parse(e) {
1902
1902
  const { ctx: r } = this._processInputParams(e), n = this._def.options;
1903
1903
  function s(a) {
@@ -1907,7 +1907,7 @@ var hs = wr((gs, yt) => {
1907
1907
  for (const o of a)
1908
1908
  if (o.result.status === "dirty")
1909
1909
  return r.common.issues.push(...o.ctx.common.issues), o.result;
1910
- const i = a.map((o) => new P(o.ctx.common.issues));
1910
+ const i = a.map((o) => new I(o.ctx.common.issues));
1911
1911
  return f(r, {
1912
1912
  code: u.invalid_union,
1913
1913
  unionErrors: i
@@ -1954,7 +1954,7 @@ var hs = wr((gs, yt) => {
1954
1954
  }
1955
1955
  if (a)
1956
1956
  return r.common.issues.push(...a.ctx.common.issues), a.result;
1957
- const o = i.map((d) => new P(d));
1957
+ const o = i.map((d) => new I(d));
1958
1958
  return f(r, {
1959
1959
  code: u.invalid_union,
1960
1960
  unionErrors: o
@@ -1965,13 +1965,13 @@ var hs = wr((gs, yt) => {
1965
1965
  return this._def.options;
1966
1966
  }
1967
1967
  }
1968
- Ce.create = (t, e) => new Ce({
1968
+ Re.create = (t, e) => new Re({
1969
1969
  options: t,
1970
1970
  typeName: y.ZodUnion,
1971
1971
  ..._(e)
1972
1972
  });
1973
- const U = (t) => t instanceof je ? U(t.schema) : t instanceof M ? U(t.innerType()) : t instanceof Ze ? [t.value] : t instanceof G ? t.options : t instanceof $e ? k.objectValues(t.enum) : t instanceof Me ? U(t._def.innerType) : t instanceof Re ? [void 0] : t instanceof Ae ? [null] : t instanceof D ? [void 0, ...U(t.unwrap())] : t instanceof K ? [null, ...U(t.unwrap())] : t instanceof gt || t instanceof De ? U(t.unwrap()) : t instanceof Fe ? U(t._def.innerType) : [];
1974
- class rt extends w {
1973
+ const q = (t) => t instanceof Ie ? q(t.schema) : t instanceof $ ? q(t.innerType()) : t instanceof Pe ? [t.value] : t instanceof G ? t.options : t instanceof je ? k.objectValues(t.enum) : t instanceof Ze ? q(t._def.innerType) : t instanceof Oe ? [void 0] : t instanceof Ne ? [null] : t instanceof F ? [void 0, ...q(t.unwrap())] : t instanceof K ? [null, ...q(t.unwrap())] : t instanceof mt || t instanceof Me ? q(t.unwrap()) : t instanceof $e ? q(t._def.innerType) : [];
1974
+ class et extends b {
1975
1975
  _parse(e) {
1976
1976
  const { ctx: r } = this._processInputParams(e);
1977
1977
  if (r.parsedType !== p.object)
@@ -2015,7 +2015,7 @@ var hs = wr((gs, yt) => {
2015
2015
  static create(e, r, n) {
2016
2016
  const s = /* @__PURE__ */ new Map();
2017
2017
  for (const a of r) {
2018
- const i = U(a.shape[e]);
2018
+ const i = q(a.shape[e]);
2019
2019
  if (!i.length)
2020
2020
  throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
2021
2021
  for (const o of i) {
@@ -2024,7 +2024,7 @@ var hs = wr((gs, yt) => {
2024
2024
  s.set(o, a);
2025
2025
  }
2026
2026
  }
2027
- return new rt({
2027
+ return new et({
2028
2028
  typeName: y.ZodDiscriminatedUnion,
2029
2029
  discriminator: e,
2030
2030
  options: r,
@@ -2033,14 +2033,14 @@ var hs = wr((gs, yt) => {
2033
2033
  });
2034
2034
  }
2035
2035
  }
2036
- function ut(t, e) {
2037
- const r = B(t), n = B(e);
2036
+ function dt(t, e) {
2037
+ const r = U(t), n = U(e);
2038
2038
  if (t === e)
2039
2039
  return { valid: !0, data: t };
2040
2040
  if (r === p.object && n === p.object) {
2041
2041
  const s = k.objectKeys(e), a = k.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
2042
2042
  for (const o of a) {
2043
- const d = ut(t[o], e[o]);
2043
+ const d = dt(t[o], e[o]);
2044
2044
  if (!d.valid)
2045
2045
  return { valid: !1 };
2046
2046
  i[o] = d.data;
@@ -2051,7 +2051,7 @@ var hs = wr((gs, yt) => {
2051
2051
  return { valid: !1 };
2052
2052
  const s = [];
2053
2053
  for (let a = 0; a < t.length; a++) {
2054
- const i = t[a], o = e[a], d = ut(i, o);
2054
+ const i = t[a], o = e[a], d = dt(i, o);
2055
2055
  if (!d.valid)
2056
2056
  return { valid: !1 };
2057
2057
  s.push(d.data);
@@ -2059,13 +2059,13 @@ var hs = wr((gs, yt) => {
2059
2059
  return { valid: !0, data: s };
2060
2060
  } else return r === p.date && n === p.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
2061
2061
  }
2062
- class Ie extends w {
2062
+ class Ae extends b {
2063
2063
  _parse(e) {
2064
2064
  const { status: r, ctx: n } = this._processInputParams(e), s = (a, i) => {
2065
- if (dt(a) || dt(i))
2065
+ if (it(a) || it(i))
2066
2066
  return g;
2067
- const o = ut(a.value, i.value);
2068
- return o.valid ? ((ct(a) || ct(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
2067
+ const o = dt(a.value, i.value);
2068
+ return o.valid ? ((ot(a) || ot(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
2069
2069
  code: u.invalid_intersection_types
2070
2070
  }), g);
2071
2071
  };
@@ -2091,13 +2091,13 @@ var hs = wr((gs, yt) => {
2091
2091
  }));
2092
2092
  }
2093
2093
  }
2094
- Ie.create = (t, e, r) => new Ie({
2094
+ Ae.create = (t, e, r) => new Ae({
2095
2095
  left: t,
2096
2096
  right: e,
2097
2097
  typeName: y.ZodIntersection,
2098
2098
  ..._(r)
2099
2099
  });
2100
- class V extends w {
2100
+ class L extends b {
2101
2101
  _parse(e) {
2102
2102
  const { status: r, ctx: n } = this._processInputParams(e);
2103
2103
  if (n.parsedType !== p.array)
@@ -2123,31 +2123,31 @@ var hs = wr((gs, yt) => {
2123
2123
  }), r.dirty());
2124
2124
  const a = [...n.data].map((i, o) => {
2125
2125
  const d = this._def.items[o] || this._def.rest;
2126
- return d ? d._parse(new L(n, i, n.path, o)) : null;
2126
+ return d ? d._parse(new D(n, i, n.path, o)) : null;
2127
2127
  }).filter((i) => !!i);
2128
- return n.common.async ? Promise.all(a).then((i) => A.mergeArray(r, i)) : A.mergeArray(r, a);
2128
+ return n.common.async ? Promise.all(a).then((i) => N.mergeArray(r, i)) : N.mergeArray(r, a);
2129
2129
  }
2130
2130
  get items() {
2131
2131
  return this._def.items;
2132
2132
  }
2133
2133
  rest(e) {
2134
- return new V({
2134
+ return new L({
2135
2135
  ...this._def,
2136
2136
  rest: e
2137
2137
  });
2138
2138
  }
2139
2139
  }
2140
- V.create = (t, e) => {
2140
+ L.create = (t, e) => {
2141
2141
  if (!Array.isArray(t))
2142
2142
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2143
- return new V({
2143
+ return new L({
2144
2144
  items: t,
2145
2145
  typeName: y.ZodTuple,
2146
2146
  rest: null,
2147
2147
  ..._(e)
2148
2148
  });
2149
2149
  };
2150
- class Pe extends w {
2150
+ class Ce extends b {
2151
2151
  get keySchema() {
2152
2152
  return this._def.keyType;
2153
2153
  }
@@ -2165,30 +2165,30 @@ var hs = wr((gs, yt) => {
2165
2165
  const s = [], a = this._def.keyType, i = this._def.valueType;
2166
2166
  for (const o in n.data)
2167
2167
  s.push({
2168
- key: a._parse(new L(n, o, n.path, o)),
2169
- value: i._parse(new L(n, n.data[o], n.path, o)),
2168
+ key: a._parse(new D(n, o, n.path, o)),
2169
+ value: i._parse(new D(n, n.data[o], n.path, o)),
2170
2170
  alwaysSet: o in n.data
2171
2171
  });
2172
- return n.common.async ? A.mergeObjectAsync(r, s) : A.mergeObjectSync(r, s);
2172
+ return n.common.async ? N.mergeObjectAsync(r, s) : N.mergeObjectSync(r, s);
2173
2173
  }
2174
2174
  get element() {
2175
2175
  return this._def.valueType;
2176
2176
  }
2177
2177
  static create(e, r, n) {
2178
- return r instanceof w ? new Pe({
2178
+ return r instanceof b ? new Ce({
2179
2179
  keyType: e,
2180
2180
  valueType: r,
2181
2181
  typeName: y.ZodRecord,
2182
2182
  ..._(n)
2183
- }) : new Pe({
2184
- keyType: Z.create(),
2183
+ }) : new Ce({
2184
+ keyType: j.create(),
2185
2185
  valueType: e,
2186
2186
  typeName: y.ZodRecord,
2187
2187
  ..._(r)
2188
2188
  });
2189
2189
  }
2190
2190
  }
2191
- class Ke extends w {
2191
+ class Ye extends b {
2192
2192
  get keySchema() {
2193
2193
  return this._def.keyType;
2194
2194
  }
@@ -2204,8 +2204,8 @@ var hs = wr((gs, yt) => {
2204
2204
  received: n.parsedType
2205
2205
  }), g;
2206
2206
  const s = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o, d], c) => ({
2207
- key: s._parse(new L(n, o, n.path, [c, "key"])),
2208
- value: a._parse(new L(n, d, n.path, [c, "value"]))
2207
+ key: s._parse(new D(n, o, n.path, [c, "key"])),
2208
+ value: a._parse(new D(n, d, n.path, [c, "value"]))
2209
2209
  }));
2210
2210
  if (n.common.async) {
2211
2211
  const o = /* @__PURE__ */ new Map();
@@ -2230,13 +2230,13 @@ var hs = wr((gs, yt) => {
2230
2230
  }
2231
2231
  }
2232
2232
  }
2233
- Ke.create = (t, e, r) => new Ke({
2233
+ Ye.create = (t, e, r) => new Ye({
2234
2234
  valueType: e,
2235
2235
  keyType: t,
2236
2236
  typeName: y.ZodMap,
2237
2237
  ..._(r)
2238
2238
  });
2239
- class de extends w {
2239
+ class oe extends b {
2240
2240
  _parse(e) {
2241
2241
  const { status: r, ctx: n } = this._processInputParams(e);
2242
2242
  if (n.parsedType !== p.set)
@@ -2271,17 +2271,17 @@ var hs = wr((gs, yt) => {
2271
2271
  }
2272
2272
  return { status: r.value, value: c };
2273
2273
  }
2274
- const o = [...n.data.values()].map((d, c) => a._parse(new L(n, d, n.path, c)));
2274
+ const o = [...n.data.values()].map((d, c) => a._parse(new D(n, d, n.path, c)));
2275
2275
  return n.common.async ? Promise.all(o).then((d) => i(d)) : i(o);
2276
2276
  }
2277
2277
  min(e, r) {
2278
- return new de({
2278
+ return new oe({
2279
2279
  ...this._def,
2280
2280
  minSize: { value: e, message: m.toString(r) }
2281
2281
  });
2282
2282
  }
2283
2283
  max(e, r) {
2284
- return new de({
2284
+ return new oe({
2285
2285
  ...this._def,
2286
2286
  maxSize: { value: e, message: m.toString(r) }
2287
2287
  });
@@ -2293,14 +2293,14 @@ var hs = wr((gs, yt) => {
2293
2293
  return this.min(1, e);
2294
2294
  }
2295
2295
  }
2296
- de.create = (t, e) => new de({
2296
+ oe.create = (t, e) => new oe({
2297
2297
  valueType: t,
2298
2298
  minSize: null,
2299
2299
  maxSize: null,
2300
2300
  typeName: y.ZodSet,
2301
2301
  ..._(e)
2302
2302
  });
2303
- class ye extends w {
2303
+ class he extends b {
2304
2304
  constructor() {
2305
2305
  super(...arguments), this.validate = this.implement;
2306
2306
  }
@@ -2313,14 +2313,14 @@ var hs = wr((gs, yt) => {
2313
2313
  received: r.parsedType
2314
2314
  }), g;
2315
2315
  function n(o, d) {
2316
- return We({
2316
+ return He({
2317
2317
  data: o,
2318
2318
  path: r.path,
2319
2319
  errorMaps: [
2320
2320
  r.common.contextualErrorMap,
2321
2321
  r.schemaErrorMap,
2322
- He(),
2323
- ge
2322
+ Ue(),
2323
+ me
2324
2324
  ].filter((c) => !!c),
2325
2325
  issueData: {
2326
2326
  code: u.invalid_arguments,
@@ -2329,14 +2329,14 @@ var hs = wr((gs, yt) => {
2329
2329
  });
2330
2330
  }
2331
2331
  function s(o, d) {
2332
- return We({
2332
+ return He({
2333
2333
  data: o,
2334
2334
  path: r.path,
2335
2335
  errorMaps: [
2336
2336
  r.common.contextualErrorMap,
2337
2337
  r.schemaErrorMap,
2338
- He(),
2339
- ge
2338
+ Ue(),
2339
+ me
2340
2340
  ].filter((c) => !!c),
2341
2341
  issueData: {
2342
2342
  code: u.invalid_return_type,
@@ -2345,26 +2345,26 @@ var hs = wr((gs, yt) => {
2345
2345
  });
2346
2346
  }
2347
2347
  const a = { errorMap: r.common.contextualErrorMap }, i = r.data;
2348
- if (this._def.returns instanceof _e) {
2348
+ if (this._def.returns instanceof ge) {
2349
2349
  const o = this;
2350
- return C(async function(...d) {
2351
- const c = new P([]), l = await o._def.args.parseAsync(d, a).catch((I) => {
2352
- throw c.addIssue(n(d, I)), c;
2353
- }), b = await Reflect.apply(i, this, l);
2354
- return await o._def.returns._def.type.parseAsync(b, a).catch((I) => {
2355
- throw c.addIssue(s(b, I)), c;
2350
+ return A(async function(...d) {
2351
+ const c = new I([]), l = await o._def.args.parseAsync(d, a).catch((C) => {
2352
+ throw c.addIssue(n(d, C)), c;
2353
+ }), w = await Reflect.apply(i, this, l);
2354
+ return await o._def.returns._def.type.parseAsync(w, a).catch((C) => {
2355
+ throw c.addIssue(s(w, C)), c;
2356
2356
  });
2357
2357
  });
2358
2358
  } else {
2359
2359
  const o = this;
2360
- return C(function(...d) {
2360
+ return A(function(...d) {
2361
2361
  const c = o._def.args.safeParse(d, a);
2362
2362
  if (!c.success)
2363
- throw new P([n(d, c.error)]);
2364
- const l = Reflect.apply(i, this, c.data), b = o._def.returns.safeParse(l, a);
2365
- if (!b.success)
2366
- throw new P([s(l, b.error)]);
2367
- return b.data;
2363
+ throw new I([n(d, c.error)]);
2364
+ const l = Reflect.apply(i, this, c.data), w = o._def.returns.safeParse(l, a);
2365
+ if (!w.success)
2366
+ throw new I([s(l, w.error)]);
2367
+ return w.data;
2368
2368
  });
2369
2369
  }
2370
2370
  }
@@ -2375,13 +2375,13 @@ var hs = wr((gs, yt) => {
2375
2375
  return this._def.returns;
2376
2376
  }
2377
2377
  args(...e) {
2378
- return new ye({
2378
+ return new he({
2379
2379
  ...this._def,
2380
- args: V.create(e).rest(ae.create())
2380
+ args: L.create(e).rest(se.create())
2381
2381
  });
2382
2382
  }
2383
2383
  returns(e) {
2384
- return new ye({
2384
+ return new he({
2385
2385
  ...this._def,
2386
2386
  returns: e
2387
2387
  });
@@ -2393,15 +2393,15 @@ var hs = wr((gs, yt) => {
2393
2393
  return this.parse(e);
2394
2394
  }
2395
2395
  static create(e, r, n) {
2396
- return new ye({
2397
- args: e || V.create([]).rest(ae.create()),
2398
- returns: r || ae.create(),
2396
+ return new he({
2397
+ args: e || L.create([]).rest(se.create()),
2398
+ returns: r || se.create(),
2399
2399
  typeName: y.ZodFunction,
2400
2400
  ..._(n)
2401
2401
  });
2402
2402
  }
2403
2403
  }
2404
- class je extends w {
2404
+ class Ie extends b {
2405
2405
  get schema() {
2406
2406
  return this._def.getter();
2407
2407
  }
@@ -2410,12 +2410,12 @@ var hs = wr((gs, yt) => {
2410
2410
  return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
2411
2411
  }
2412
2412
  }
2413
- je.create = (t, e) => new je({
2413
+ Ie.create = (t, e) => new Ie({
2414
2414
  getter: t,
2415
2415
  typeName: y.ZodLazy,
2416
2416
  ..._(e)
2417
2417
  });
2418
- class Ze extends w {
2418
+ class Pe extends b {
2419
2419
  _parse(e) {
2420
2420
  if (e.data !== this._def.value) {
2421
2421
  const r = this._getOrReturnCtx(e);
@@ -2431,21 +2431,21 @@ var hs = wr((gs, yt) => {
2431
2431
  return this._def.value;
2432
2432
  }
2433
2433
  }
2434
- Ze.create = (t, e) => new Ze({
2434
+ Pe.create = (t, e) => new Pe({
2435
2435
  value: t,
2436
2436
  typeName: y.ZodLiteral,
2437
2437
  ..._(e)
2438
2438
  });
2439
- function Zt(t, e) {
2439
+ function jt(t, e) {
2440
2440
  return new G({
2441
2441
  values: t,
2442
2442
  typeName: y.ZodEnum,
2443
2443
  ..._(e)
2444
2444
  });
2445
2445
  }
2446
- class G extends w {
2446
+ class G extends b {
2447
2447
  constructor() {
2448
- super(...arguments), Se.set(this, void 0);
2448
+ super(...arguments), ke.set(this, void 0);
2449
2449
  }
2450
2450
  _parse(e) {
2451
2451
  if (typeof e.data != "string") {
@@ -2456,7 +2456,7 @@ var hs = wr((gs, yt) => {
2456
2456
  code: u.invalid_type
2457
2457
  }), g;
2458
2458
  }
2459
- if (Je(this, Se) || Ct(this, Se, new Set(this._def.values)), !Je(this, Se).has(e.data)) {
2459
+ if (Be(this, ke) || At(this, ke, new Set(this._def.values)), !Be(this, ke).has(e.data)) {
2460
2460
  const r = this._getOrReturnCtx(e), n = this._def.values;
2461
2461
  return f(r, {
2462
2462
  received: r.data,
@@ -2464,7 +2464,7 @@ var hs = wr((gs, yt) => {
2464
2464
  options: n
2465
2465
  }), g;
2466
2466
  }
2467
- return C(e.data);
2467
+ return A(e.data);
2468
2468
  }
2469
2469
  get options() {
2470
2470
  return this._def.values;
@@ -2500,11 +2500,11 @@ var hs = wr((gs, yt) => {
2500
2500
  });
2501
2501
  }
2502
2502
  }
2503
- Se = /* @__PURE__ */ new WeakMap();
2504
- G.create = Zt;
2505
- class $e extends w {
2503
+ ke = /* @__PURE__ */ new WeakMap();
2504
+ G.create = jt;
2505
+ class je extends b {
2506
2506
  constructor() {
2507
- super(...arguments), Te.set(this, void 0);
2507
+ super(...arguments), xe.set(this, void 0);
2508
2508
  }
2509
2509
  _parse(e) {
2510
2510
  const r = k.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
@@ -2516,7 +2516,7 @@ var hs = wr((gs, yt) => {
2516
2516
  code: u.invalid_type
2517
2517
  }), g;
2518
2518
  }
2519
- if (Je(this, Te) || Ct(this, Te, new Set(k.getValidEnumValues(this._def.values))), !Je(this, Te).has(e.data)) {
2519
+ if (Be(this, xe) || At(this, xe, new Set(k.getValidEnumValues(this._def.values))), !Be(this, xe).has(e.data)) {
2520
2520
  const s = k.objectValues(r);
2521
2521
  return f(n, {
2522
2522
  received: n.data,
@@ -2524,19 +2524,19 @@ var hs = wr((gs, yt) => {
2524
2524
  options: s
2525
2525
  }), g;
2526
2526
  }
2527
- return C(e.data);
2527
+ return A(e.data);
2528
2528
  }
2529
2529
  get enum() {
2530
2530
  return this._def.values;
2531
2531
  }
2532
2532
  }
2533
- Te = /* @__PURE__ */ new WeakMap();
2534
- $e.create = (t, e) => new $e({
2533
+ xe = /* @__PURE__ */ new WeakMap();
2534
+ je.create = (t, e) => new je({
2535
2535
  values: t,
2536
2536
  typeName: y.ZodNativeEnum,
2537
2537
  ..._(e)
2538
2538
  });
2539
- class _e extends w {
2539
+ class ge extends b {
2540
2540
  unwrap() {
2541
2541
  return this._def.type;
2542
2542
  }
@@ -2549,18 +2549,18 @@ var hs = wr((gs, yt) => {
2549
2549
  received: r.parsedType
2550
2550
  }), g;
2551
2551
  const n = r.parsedType === p.promise ? r.data : Promise.resolve(r.data);
2552
- return C(n.then((s) => this._def.type.parseAsync(s, {
2552
+ return A(n.then((s) => this._def.type.parseAsync(s, {
2553
2553
  path: r.path,
2554
2554
  errorMap: r.common.contextualErrorMap
2555
2555
  })));
2556
2556
  }
2557
2557
  }
2558
- _e.create = (t, e) => new _e({
2558
+ ge.create = (t, e) => new ge({
2559
2559
  type: t,
2560
2560
  typeName: y.ZodPromise,
2561
2561
  ..._(e)
2562
2562
  });
2563
- class M extends w {
2563
+ class $ extends b {
2564
2564
  innerType() {
2565
2565
  return this._def.schema;
2566
2566
  }
@@ -2587,7 +2587,7 @@ var hs = wr((gs, yt) => {
2587
2587
  path: n.path,
2588
2588
  parent: n
2589
2589
  });
2590
- return d.status === "aborted" ? g : d.status === "dirty" || r.value === "dirty" ? me(d.value) : d;
2590
+ return d.status === "aborted" ? g : d.status === "dirty" || r.value === "dirty" ? pe(d.value) : d;
2591
2591
  });
2592
2592
  {
2593
2593
  if (r.value === "aborted")
@@ -2597,7 +2597,7 @@ var hs = wr((gs, yt) => {
2597
2597
  path: n.path,
2598
2598
  parent: n
2599
2599
  });
2600
- return o.status === "aborted" ? g : o.status === "dirty" || r.value === "dirty" ? me(o.value) : o;
2600
+ return o.status === "aborted" ? g : o.status === "dirty" || r.value === "dirty" ? pe(o.value) : o;
2601
2601
  }
2602
2602
  }
2603
2603
  if (s.type === "refinement") {
@@ -2626,45 +2626,45 @@ var hs = wr((gs, yt) => {
2626
2626
  path: n.path,
2627
2627
  parent: n
2628
2628
  });
2629
- if (!ie(i))
2629
+ if (!ae(i))
2630
2630
  return i;
2631
2631
  const o = s.transform(i.value, a);
2632
2632
  if (o instanceof Promise)
2633
2633
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2634
2634
  return { status: r.value, value: o };
2635
2635
  } else
2636
- return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => ie(i) ? Promise.resolve(s.transform(i.value, a)).then((o) => ({ status: r.value, value: o })) : i);
2636
+ return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => ae(i) ? Promise.resolve(s.transform(i.value, a)).then((o) => ({ status: r.value, value: o })) : i);
2637
2637
  k.assertNever(s);
2638
2638
  }
2639
2639
  }
2640
- M.create = (t, e, r) => new M({
2640
+ $.create = (t, e, r) => new $({
2641
2641
  schema: t,
2642
2642
  typeName: y.ZodEffects,
2643
2643
  effect: e,
2644
2644
  ..._(r)
2645
2645
  });
2646
- M.createWithPreprocess = (t, e, r) => new M({
2646
+ $.createWithPreprocess = (t, e, r) => new $({
2647
2647
  schema: e,
2648
2648
  effect: { type: "preprocess", transform: t },
2649
2649
  typeName: y.ZodEffects,
2650
2650
  ..._(r)
2651
2651
  });
2652
- class D extends w {
2652
+ class F extends b {
2653
2653
  _parse(e) {
2654
- return this._getType(e) === p.undefined ? C(void 0) : this._def.innerType._parse(e);
2654
+ return this._getType(e) === p.undefined ? A(void 0) : this._def.innerType._parse(e);
2655
2655
  }
2656
2656
  unwrap() {
2657
2657
  return this._def.innerType;
2658
2658
  }
2659
2659
  }
2660
- D.create = (t, e) => new D({
2660
+ F.create = (t, e) => new F({
2661
2661
  innerType: t,
2662
2662
  typeName: y.ZodOptional,
2663
2663
  ..._(e)
2664
2664
  });
2665
- class K extends w {
2665
+ class K extends b {
2666
2666
  _parse(e) {
2667
- return this._getType(e) === p.null ? C(null) : this._def.innerType._parse(e);
2667
+ return this._getType(e) === p.null ? A(null) : this._def.innerType._parse(e);
2668
2668
  }
2669
2669
  unwrap() {
2670
2670
  return this._def.innerType;
@@ -2675,7 +2675,7 @@ var hs = wr((gs, yt) => {
2675
2675
  typeName: y.ZodNullable,
2676
2676
  ..._(e)
2677
2677
  });
2678
- class Me extends w {
2678
+ class Ze extends b {
2679
2679
  _parse(e) {
2680
2680
  const { ctx: r } = this._processInputParams(e);
2681
2681
  let n = r.data;
@@ -2689,13 +2689,13 @@ var hs = wr((gs, yt) => {
2689
2689
  return this._def.innerType;
2690
2690
  }
2691
2691
  }
2692
- Me.create = (t, e) => new Me({
2692
+ Ze.create = (t, e) => new Ze({
2693
2693
  innerType: t,
2694
2694
  typeName: y.ZodDefault,
2695
2695
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2696
2696
  ..._(e)
2697
2697
  });
2698
- class Fe extends w {
2698
+ class $e extends b {
2699
2699
  _parse(e) {
2700
2700
  const { ctx: r } = this._processInputParams(e), n = {
2701
2701
  ...r,
@@ -2710,11 +2710,11 @@ var hs = wr((gs, yt) => {
2710
2710
  ...n
2711
2711
  }
2712
2712
  });
2713
- return Oe(s) ? s.then((a) => ({
2713
+ return Te(s) ? s.then((a) => ({
2714
2714
  status: "valid",
2715
2715
  value: a.status === "valid" ? a.value : this._def.catchValue({
2716
2716
  get error() {
2717
- return new P(n.common.issues);
2717
+ return new I(n.common.issues);
2718
2718
  },
2719
2719
  input: n.data
2720
2720
  })
@@ -2722,7 +2722,7 @@ var hs = wr((gs, yt) => {
2722
2722
  status: "valid",
2723
2723
  value: s.status === "valid" ? s.value : this._def.catchValue({
2724
2724
  get error() {
2725
- return new P(n.common.issues);
2725
+ return new I(n.common.issues);
2726
2726
  },
2727
2727
  input: n.data
2728
2728
  })
@@ -2732,13 +2732,13 @@ var hs = wr((gs, yt) => {
2732
2732
  return this._def.innerType;
2733
2733
  }
2734
2734
  }
2735
- Fe.create = (t, e) => new Fe({
2735
+ $e.create = (t, e) => new $e({
2736
2736
  innerType: t,
2737
2737
  typeName: y.ZodCatch,
2738
2738
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2739
2739
  ..._(e)
2740
2740
  });
2741
- class Xe extends w {
2741
+ class Ge extends b {
2742
2742
  _parse(e) {
2743
2743
  if (this._getType(e) !== p.nan) {
2744
2744
  const n = this._getOrReturnCtx(e);
@@ -2751,12 +2751,12 @@ var hs = wr((gs, yt) => {
2751
2751
  return { status: "valid", value: e.data };
2752
2752
  }
2753
2753
  }
2754
- Xe.create = (t) => new Xe({
2754
+ Ge.create = (t) => new Ge({
2755
2755
  typeName: y.ZodNaN,
2756
2756
  ..._(t)
2757
2757
  });
2758
2758
  const Hr = Symbol("zod_brand");
2759
- class gt extends w {
2759
+ class mt extends b {
2760
2760
  _parse(e) {
2761
2761
  const { ctx: r } = this._processInputParams(e), n = r.data;
2762
2762
  return this._def.type._parse({
@@ -2769,7 +2769,7 @@ var hs = wr((gs, yt) => {
2769
2769
  return this._def.type;
2770
2770
  }
2771
2771
  }
2772
- class Le extends w {
2772
+ class Fe extends b {
2773
2773
  _parse(e) {
2774
2774
  const { status: r, ctx: n } = this._processInputParams(e);
2775
2775
  if (n.common.async)
@@ -2779,7 +2779,7 @@ var hs = wr((gs, yt) => {
2779
2779
  path: n.path,
2780
2780
  parent: n
2781
2781
  });
2782
- return a.status === "aborted" ? g : a.status === "dirty" ? (r.dirty(), me(a.value)) : this._def.out._parseAsync({
2782
+ return a.status === "aborted" ? g : a.status === "dirty" ? (r.dirty(), pe(a.value)) : this._def.out._parseAsync({
2783
2783
  data: a.value,
2784
2784
  path: n.path,
2785
2785
  parent: n
@@ -2802,201 +2802,201 @@ var hs = wr((gs, yt) => {
2802
2802
  }
2803
2803
  }
2804
2804
  static create(e, r) {
2805
- return new Le({
2805
+ return new Fe({
2806
2806
  in: e,
2807
2807
  out: r,
2808
2808
  typeName: y.ZodPipeline
2809
2809
  });
2810
2810
  }
2811
2811
  }
2812
- class De extends w {
2812
+ class Me extends b {
2813
2813
  _parse(e) {
2814
- const r = this._def.innerType._parse(e), n = (s) => (ie(s) && (s.value = Object.freeze(s.value)), s);
2815
- return Oe(r) ? r.then((s) => n(s)) : n(r);
2814
+ const r = this._def.innerType._parse(e), n = (s) => (ae(s) && (s.value = Object.freeze(s.value)), s);
2815
+ return Te(r) ? r.then((s) => n(s)) : n(r);
2816
2816
  }
2817
2817
  unwrap() {
2818
2818
  return this._def.innerType;
2819
2819
  }
2820
2820
  }
2821
- De.create = (t, e) => new De({
2821
+ Me.create = (t, e) => new Me({
2822
2822
  innerType: t,
2823
2823
  typeName: y.ZodReadonly,
2824
2824
  ..._(e)
2825
2825
  });
2826
- function St(t, e) {
2826
+ function xt(t, e) {
2827
2827
  const r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
2828
2828
  return typeof r == "string" ? { message: r } : r;
2829
2829
  }
2830
- function $t(t, e = {}, r) {
2831
- return t ? ve.create().superRefine((n, s) => {
2830
+ function Zt(t, e = {}, r) {
2831
+ return t ? ye.create().superRefine((n, s) => {
2832
2832
  var a, i;
2833
2833
  const o = t(n);
2834
2834
  if (o instanceof Promise)
2835
2835
  return o.then((d) => {
2836
2836
  var c, l;
2837
2837
  if (!d) {
2838
- const b = St(e, n), S = (l = (c = b.fatal) !== null && c !== void 0 ? c : r) !== null && l !== void 0 ? l : !0;
2839
- s.addIssue({ code: "custom", ...b, fatal: S });
2838
+ const w = xt(e, n), S = (l = (c = w.fatal) !== null && c !== void 0 ? c : r) !== null && l !== void 0 ? l : !0;
2839
+ s.addIssue({ code: "custom", ...w, fatal: S });
2840
2840
  }
2841
2841
  });
2842
2842
  if (!o) {
2843
- const d = St(e, n), c = (i = (a = d.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
2843
+ const d = xt(e, n), c = (i = (a = d.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
2844
2844
  s.addIssue({ code: "custom", ...d, fatal: c });
2845
2845
  }
2846
- }) : ve.create();
2846
+ }) : ye.create();
2847
2847
  }
2848
- const Wr = {
2849
- object: O.lazycreate
2848
+ const Br = {
2849
+ object: E.lazycreate
2850
2850
  };
2851
2851
  var y;
2852
2852
  (function(t) {
2853
2853
  t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
2854
2854
  })(y || (y = {}));
2855
- const Jr = (t, e = {
2855
+ const Wr = (t, e = {
2856
2856
  message: `Input not instance of ${t.name}`
2857
- }) => $t((r) => r instanceof t, e), Mt = Z.create, Ft = J.create, Yr = Xe.create, Gr = Y.create, Dt = Ne.create, Kr = oe.create, Xr = Ye.create, Qr = Re.create, en = Ae.create, tn = ve.create, rn = ae.create, nn = H.create, sn = Ge.create, an = $.create, on = O.create, dn = O.strictCreate, cn = Ce.create, un = rt.create, ln = Ie.create, fn = V.create, pn = Pe.create, hn = Ke.create, mn = de.create, yn = ye.create, gn = je.create, vn = Ze.create, _n = G.create, wn = $e.create, bn = _e.create, Tt = M.create, kn = D.create, xn = K.create, Sn = M.createWithPreprocess, Tn = Le.create, En = () => Mt().optional(), On = () => Ft().optional(), Nn = () => Dt().optional(), Rn = {
2858
- string: (t) => Z.create({ ...t, coerce: !0 }),
2857
+ }) => Zt((r) => r instanceof t, e), $t = j.create, Mt = J.create, Jr = Ge.create, Yr = Y.create, Ft = Ee.create, Gr = ie.create, Kr = We.create, Xr = Oe.create, Qr = Ne.create, en = ye.create, tn = se.create, rn = H.create, nn = Je.create, sn = Z.create, an = E.create, on = E.strictCreate, dn = Re.create, cn = et.create, un = Ae.create, ln = L.create, fn = Ce.create, pn = Ye.create, hn = oe.create, mn = he.create, yn = Ie.create, gn = Pe.create, vn = G.create, _n = je.create, bn = ge.create, St = $.create, wn = F.create, kn = K.create, xn = $.createWithPreprocess, Sn = Fe.create, Tn = () => $t().optional(), En = () => Mt().optional(), On = () => Ft().optional(), Nn = {
2858
+ string: (t) => j.create({ ...t, coerce: !0 }),
2859
2859
  number: (t) => J.create({ ...t, coerce: !0 }),
2860
- boolean: (t) => Ne.create({
2860
+ boolean: (t) => Ee.create({
2861
2861
  ...t,
2862
2862
  coerce: !0
2863
2863
  }),
2864
2864
  bigint: (t) => Y.create({ ...t, coerce: !0 }),
2865
- date: (t) => oe.create({ ...t, coerce: !0 })
2866
- }, An = g;
2865
+ date: (t) => ie.create({ ...t, coerce: !0 })
2866
+ }, Rn = g;
2867
2867
  var h = /* @__PURE__ */ Object.freeze({
2868
2868
  __proto__: null,
2869
- defaultErrorMap: ge,
2870
- setErrorMap: xr,
2871
- getErrorMap: He,
2872
- makeIssue: We,
2873
- EMPTY_PATH: Sr,
2869
+ defaultErrorMap: me,
2870
+ setErrorMap: kr,
2871
+ getErrorMap: Ue,
2872
+ makeIssue: He,
2873
+ EMPTY_PATH: xr,
2874
2874
  addIssueToContext: f,
2875
- ParseStatus: A,
2875
+ ParseStatus: N,
2876
2876
  INVALID: g,
2877
- DIRTY: me,
2878
- OK: C,
2879
- isAborted: dt,
2880
- isDirty: ct,
2881
- isValid: ie,
2882
- isAsync: Oe,
2877
+ DIRTY: pe,
2878
+ OK: A,
2879
+ isAborted: it,
2880
+ isDirty: ot,
2881
+ isValid: ae,
2882
+ isAsync: Te,
2883
2883
  get util() {
2884
2884
  return k;
2885
2885
  },
2886
2886
  get objectUtil() {
2887
- return ot;
2887
+ return at;
2888
2888
  },
2889
2889
  ZodParsedType: p,
2890
- getParsedType: B,
2891
- ZodType: w,
2892
- datetimeRegex: jt,
2893
- ZodString: Z,
2890
+ getParsedType: U,
2891
+ ZodType: b,
2892
+ datetimeRegex: Pt,
2893
+ ZodString: j,
2894
2894
  ZodNumber: J,
2895
2895
  ZodBigInt: Y,
2896
- ZodBoolean: Ne,
2897
- ZodDate: oe,
2898
- ZodSymbol: Ye,
2899
- ZodUndefined: Re,
2900
- ZodNull: Ae,
2901
- ZodAny: ve,
2902
- ZodUnknown: ae,
2896
+ ZodBoolean: Ee,
2897
+ ZodDate: ie,
2898
+ ZodSymbol: We,
2899
+ ZodUndefined: Oe,
2900
+ ZodNull: Ne,
2901
+ ZodAny: ye,
2902
+ ZodUnknown: se,
2903
2903
  ZodNever: H,
2904
- ZodVoid: Ge,
2905
- ZodArray: $,
2906
- ZodObject: O,
2907
- ZodUnion: Ce,
2908
- ZodDiscriminatedUnion: rt,
2909
- ZodIntersection: Ie,
2910
- ZodTuple: V,
2911
- ZodRecord: Pe,
2912
- ZodMap: Ke,
2913
- ZodSet: de,
2914
- ZodFunction: ye,
2915
- ZodLazy: je,
2916
- ZodLiteral: Ze,
2904
+ ZodVoid: Je,
2905
+ ZodArray: Z,
2906
+ ZodObject: E,
2907
+ ZodUnion: Re,
2908
+ ZodDiscriminatedUnion: et,
2909
+ ZodIntersection: Ae,
2910
+ ZodTuple: L,
2911
+ ZodRecord: Ce,
2912
+ ZodMap: Ye,
2913
+ ZodSet: oe,
2914
+ ZodFunction: he,
2915
+ ZodLazy: Ie,
2916
+ ZodLiteral: Pe,
2917
2917
  ZodEnum: G,
2918
- ZodNativeEnum: $e,
2919
- ZodPromise: _e,
2920
- ZodEffects: M,
2921
- ZodTransformer: M,
2922
- ZodOptional: D,
2918
+ ZodNativeEnum: je,
2919
+ ZodPromise: ge,
2920
+ ZodEffects: $,
2921
+ ZodTransformer: $,
2922
+ ZodOptional: F,
2923
2923
  ZodNullable: K,
2924
- ZodDefault: Me,
2925
- ZodCatch: Fe,
2926
- ZodNaN: Xe,
2924
+ ZodDefault: Ze,
2925
+ ZodCatch: $e,
2926
+ ZodNaN: Ge,
2927
2927
  BRAND: Hr,
2928
- ZodBranded: gt,
2929
- ZodPipeline: Le,
2930
- ZodReadonly: De,
2931
- custom: $t,
2932
- Schema: w,
2933
- ZodSchema: w,
2934
- late: Wr,
2928
+ ZodBranded: mt,
2929
+ ZodPipeline: Fe,
2930
+ ZodReadonly: Me,
2931
+ custom: Zt,
2932
+ Schema: b,
2933
+ ZodSchema: b,
2934
+ late: Br,
2935
2935
  get ZodFirstPartyTypeKind() {
2936
2936
  return y;
2937
2937
  },
2938
- coerce: Rn,
2939
- any: tn,
2940
- array: an,
2941
- bigint: Gr,
2942
- boolean: Dt,
2943
- date: Kr,
2944
- discriminatedUnion: un,
2945
- effect: Tt,
2946
- enum: _n,
2947
- function: yn,
2948
- instanceof: Jr,
2949
- intersection: ln,
2950
- lazy: gn,
2951
- literal: vn,
2952
- map: hn,
2953
- nan: Yr,
2954
- nativeEnum: wn,
2955
- never: nn,
2956
- null: en,
2957
- nullable: xn,
2958
- number: Ft,
2959
- object: on,
2960
- oboolean: Nn,
2961
- onumber: On,
2962
- optional: kn,
2963
- ostring: En,
2964
- pipeline: Tn,
2965
- preprocess: Sn,
2938
+ coerce: Nn,
2939
+ any: en,
2940
+ array: sn,
2941
+ bigint: Yr,
2942
+ boolean: Ft,
2943
+ date: Gr,
2944
+ discriminatedUnion: cn,
2945
+ effect: St,
2946
+ enum: vn,
2947
+ function: mn,
2948
+ instanceof: Wr,
2949
+ intersection: un,
2950
+ lazy: yn,
2951
+ literal: gn,
2952
+ map: pn,
2953
+ nan: Jr,
2954
+ nativeEnum: _n,
2955
+ never: rn,
2956
+ null: Qr,
2957
+ nullable: kn,
2958
+ number: Mt,
2959
+ object: an,
2960
+ oboolean: On,
2961
+ onumber: En,
2962
+ optional: wn,
2963
+ ostring: Tn,
2964
+ pipeline: Sn,
2965
+ preprocess: xn,
2966
2966
  promise: bn,
2967
- record: pn,
2968
- set: mn,
2969
- strictObject: dn,
2970
- string: Mt,
2971
- symbol: Xr,
2972
- transformer: Tt,
2973
- tuple: fn,
2974
- undefined: Qr,
2975
- union: cn,
2976
- unknown: rn,
2977
- void: sn,
2978
- NEVER: An,
2967
+ record: fn,
2968
+ set: hn,
2969
+ strictObject: on,
2970
+ string: $t,
2971
+ symbol: Kr,
2972
+ transformer: St,
2973
+ tuple: ln,
2974
+ undefined: Xr,
2975
+ union: dn,
2976
+ unknown: tn,
2977
+ void: nn,
2978
+ NEVER: Rn,
2979
2979
  ZodIssueCode: u,
2980
- quotelessJson: kr,
2981
- ZodError: P
2980
+ quotelessJson: wr,
2981
+ ZodError: I
2982
2982
  });
2983
- const lt = h.object({
2983
+ const ct = h.object({
2984
2984
  detail: h.string()
2985
- }), Lt = h.object({
2985
+ }), Dt = h.object({
2986
2986
  error: h.string()
2987
2987
  });
2988
- function Vt(t) {
2988
+ function Lt(t) {
2989
2989
  if (!t)
2990
2990
  return "Unknown error";
2991
2991
  if (t instanceof Error) {
2992
- const e = lt.safeParse(t.cause);
2993
- return e.success ? e.data.detail : Cn(t.message);
2992
+ const e = ct.safeParse(t.cause);
2993
+ return e.success ? e.data.detail : An(t.message);
2994
2994
  }
2995
2995
  if (typeof t == "object") {
2996
- const e = lt.safeParse(t);
2996
+ const e = ct.safeParse(t);
2997
2997
  if (e.success)
2998
2998
  return e.data.detail;
2999
- const r = Lt.safeParse(t);
2999
+ const r = Dt.safeParse(t);
3000
3000
  if (r.success)
3001
3001
  return r.data.error;
3002
3002
  }
@@ -3006,37 +3006,36 @@ var hs = wr((gs, yt) => {
3006
3006
  return String(t);
3007
3007
  }
3008
3008
  }
3009
- function Cn(t) {
3010
- const e = In(t);
3009
+ function An(t) {
3010
+ const e = Cn(t);
3011
3011
  if (!e)
3012
3012
  return t;
3013
- const r = lt.safeParse(e);
3013
+ const r = ct.safeParse(e);
3014
3014
  if (r.success)
3015
3015
  return r.data.detail;
3016
- const n = Lt.safeParse(e);
3016
+ const n = Dt.safeParse(e);
3017
3017
  return n.success ? n.data.error : t;
3018
3018
  }
3019
- function In(t) {
3019
+ function Cn(t) {
3020
3020
  try {
3021
3021
  return JSON.parse(t);
3022
3022
  } catch {
3023
3023
  return t;
3024
3024
  }
3025
3025
  }
3026
- const Pn = 1e10, jn = 1e3;
3027
- function ze(t, e) {
3026
+ const In = 1e10, Pn = 1e3;
3027
+ function Le(t, e) {
3028
3028
  const r = t.map((n) => `"${n}"`).join(", ");
3029
3029
  return new Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`);
3030
3030
  }
3031
- function Zn(t = {}) {
3031
+ function jn(t = {}) {
3032
3032
  let e = {};
3033
3033
  function r(v) {
3034
3034
  e = v;
3035
3035
  }
3036
3036
  let n = {};
3037
3037
  function s(v) {
3038
- var T;
3039
- n.unregisterHandler && n.unregisterHandler(), n = v, (T = n.registerHandler) == null || T.call(n, _r);
3038
+ n.unregisterHandler && n.unregisterHandler(), n = v, n.registerHandler?.(vr);
3040
3039
  }
3041
3040
  let a;
3042
3041
  function i(v) {
@@ -3044,120 +3043,115 @@ var hs = wr((gs, yt) => {
3044
3043
  a = v;
3045
3044
  return;
3046
3045
  }
3047
- a = (T, N) => {
3048
- const E = v[T];
3049
- if (E)
3050
- return E(N);
3051
- const R = v._;
3052
- if (!R)
3046
+ a = (T, O) => {
3047
+ const R = v[T];
3048
+ if (R)
3049
+ return R(O);
3050
+ const M = v._;
3051
+ if (!M)
3053
3052
  throw new Error(`The requested method has no handler: ${T}`);
3054
- return R(T, N);
3053
+ return M(T, O);
3055
3054
  };
3056
3055
  }
3057
- const { maxRequestTime: o = jn } = t;
3056
+ const { maxRequestTime: o = Pn } = t;
3058
3057
  t.transport && s(t.transport), t.requestHandler && i(t.requestHandler), t._debugHooks && r(t._debugHooks);
3059
3058
  let d = 0;
3060
3059
  function c() {
3061
- return d <= Pn ? ++d : d = 0;
3060
+ return d <= In ? ++d : d = 0;
3062
3061
  }
3063
- const l = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
3062
+ const l = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
3064
3063
  function S(v, ...T) {
3065
- const N = T[0];
3066
- return new Promise((E, R) => {
3067
- var ce;
3064
+ const O = T[0];
3065
+ return new Promise((R, M) => {
3068
3066
  if (!n.send)
3069
- throw ze(["send"], "make requests");
3070
- const F = c(), ee = {
3067
+ throw Le(["send"], "make requests");
3068
+ const B = c(), wt = {
3071
3069
  type: "request",
3072
- id: F,
3070
+ id: B,
3073
3071
  method: v,
3074
- params: N
3072
+ params: O
3075
3073
  };
3076
- l.set(F, { resolve: E, reject: R }), o !== 1 / 0 && b.set(F, setTimeout(() => {
3077
- b.delete(F), R(new Error("RPC request timed out."));
3078
- }, o)), (ce = e.onSend) == null || ce.call(e, ee), n.send(ee);
3074
+ l.set(B, { resolve: R, reject: M }), o !== 1 / 0 && w.set(B, setTimeout(() => {
3075
+ w.delete(B), M(new Error("RPC request timed out."));
3076
+ }, o)), e.onSend?.(wt), n.send(wt);
3079
3077
  });
3080
3078
  }
3081
- const I = new Proxy(S, {
3082
- get: (v, T, N) => T in v ? Reflect.get(v, T, N) : (E) => S(T, E)
3083
- }), q = I;
3084
- function Ve(v, ...T) {
3085
- var R;
3086
- const N = T[0];
3079
+ const C = new Proxy(S, {
3080
+ get: (v, T, O) => T in v ? Reflect.get(v, T, O) : (R) => S(T, R)
3081
+ }), z = C;
3082
+ function De(v, ...T) {
3083
+ const O = T[0];
3087
3084
  if (!n.send)
3088
- throw ze(["send"], "send messages");
3089
- const E = {
3085
+ throw Le(["send"], "send messages");
3086
+ const R = {
3090
3087
  type: "message",
3091
3088
  id: v,
3092
- payload: N
3089
+ payload: O
3093
3090
  };
3094
- (R = e.onSend) == null || R.call(e, E), n.send(E);
3091
+ e.onSend?.(R), n.send(R);
3095
3092
  }
3096
- const bt = new Proxy(Ve, {
3097
- get: (v, T, N) => T in v ? Reflect.get(v, T, N) : (E) => Ve(T, E)
3098
- }), kt = bt, Q = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Set();
3099
- function gr(v, T) {
3100
- var N;
3093
+ const _t = new Proxy(De, {
3094
+ get: (v, T, O) => T in v ? Reflect.get(v, T, O) : (R) => De(T, R)
3095
+ }), bt = _t, Q = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Set();
3096
+ function yr(v, T) {
3101
3097
  if (!n.registerHandler)
3102
- throw ze(["registerHandler"], "register message listeners");
3098
+ throw Le(["registerHandler"], "register message listeners");
3103
3099
  if (v === "*") {
3104
- st.add(T);
3100
+ rt.add(T);
3105
3101
  return;
3106
3102
  }
3107
- Q.has(v) || Q.set(v, /* @__PURE__ */ new Set()), (N = Q.get(v)) == null || N.add(T);
3103
+ Q.has(v) || Q.set(v, /* @__PURE__ */ new Set()), Q.get(v)?.add(T);
3108
3104
  }
3109
- function vr(v, T) {
3110
- var N, E;
3105
+ function gr(v, T) {
3111
3106
  if (v === "*") {
3112
- st.delete(T);
3107
+ rt.delete(T);
3113
3108
  return;
3114
3109
  }
3115
- (N = Q.get(v)) == null || N.delete(T), ((E = Q.get(v)) == null ? void 0 : E.size) === 0 && Q.delete(v);
3110
+ Q.get(v)?.delete(T), Q.get(v)?.size === 0 && Q.delete(v);
3116
3111
  }
3117
- async function _r(v) {
3118
- var T, N;
3119
- if ((T = e.onReceive) == null || T.call(e, v), !("type" in v))
3112
+ async function vr(v) {
3113
+ if (e.onReceive?.(v), !("type" in v))
3120
3114
  throw new Error("Message does not contain a type.");
3121
3115
  if (v.type === "request") {
3122
3116
  if (!n.send || !a)
3123
- throw ze(["send", "requestHandler"], "handle requests");
3124
- const { id: E, method: R, params: F } = v;
3125
- let ee;
3117
+ throw Le(["send", "requestHandler"], "handle requests");
3118
+ const { id: T, method: O, params: R } = v;
3119
+ let M;
3126
3120
  try {
3127
- ee = {
3121
+ M = {
3128
3122
  type: "response",
3129
- id: E,
3123
+ id: T,
3130
3124
  success: !0,
3131
- payload: await a(R, F)
3125
+ payload: await a(O, R)
3132
3126
  };
3133
- } catch (ce) {
3134
- if (!(ce instanceof Error))
3135
- throw ce;
3136
- ee = {
3127
+ } catch (B) {
3128
+ if (!(B instanceof Error))
3129
+ throw B;
3130
+ M = {
3137
3131
  type: "response",
3138
- id: E,
3132
+ id: T,
3139
3133
  success: !1,
3140
- error: ce.message
3134
+ error: B.message
3141
3135
  };
3142
3136
  }
3143
- (N = e.onSend) == null || N.call(e, ee), n.send(ee);
3137
+ e.onSend?.(M), n.send(M);
3144
3138
  return;
3145
3139
  }
3146
3140
  if (v.type === "response") {
3147
- const E = b.get(v.id);
3148
- E != null && clearTimeout(E);
3149
- const { resolve: R, reject: F } = l.get(v.id) ?? {};
3150
- v.success ? R == null || R(v.payload) : F == null || F(new Error(v.error));
3141
+ const T = w.get(v.id);
3142
+ T != null && clearTimeout(T);
3143
+ const { resolve: O, reject: R } = l.get(v.id) ?? {};
3144
+ v.success ? O?.(v.payload) : R?.(new Error(v.error));
3151
3145
  return;
3152
3146
  }
3153
3147
  if (v.type === "message") {
3154
- for (const R of st)
3155
- R(v.id, v.payload);
3156
- const E = Q.get(v.id);
3157
- if (!E)
3148
+ for (const O of rt)
3149
+ O(v.id, v.payload);
3150
+ const T = Q.get(v.id);
3151
+ if (!T)
3158
3152
  return;
3159
- for (const R of E)
3160
- R(v.payload);
3153
+ for (const O of T)
3154
+ O(v.payload);
3161
3155
  return;
3162
3156
  }
3163
3157
  throw new Error(`Unexpected RPC message type: ${v.type}`);
@@ -3165,50 +3159,50 @@ var hs = wr((gs, yt) => {
3165
3159
  return {
3166
3160
  setTransport: s,
3167
3161
  setRequestHandler: i,
3168
- request: I,
3169
- requestProxy: q,
3170
- send: bt,
3171
- sendProxy: kt,
3172
- addMessageListener: gr,
3173
- removeMessageListener: vr,
3174
- proxy: { send: kt, request: q },
3162
+ request: C,
3163
+ requestProxy: z,
3164
+ send: _t,
3165
+ sendProxy: bt,
3166
+ addMessageListener: yr,
3167
+ removeMessageListener: gr,
3168
+ proxy: { send: bt, request: z },
3175
3169
  _setDebugHooks: r
3176
3170
  };
3177
3171
  }
3178
- function $n(t) {
3179
- return Zn(t);
3172
+ function Zn(t) {
3173
+ return jn(t);
3180
3174
  }
3181
- const zt = "[transport-id]";
3182
- function Mn(t, e) {
3175
+ const Vt = "[transport-id]";
3176
+ function $n(t, e) {
3183
3177
  const { transportId: r } = e;
3184
- return r != null ? { [zt]: r, data: t } : t;
3178
+ return r != null ? { [Vt]: r, data: t } : t;
3185
3179
  }
3186
- function Fn(t, e) {
3187
- const { transportId: r, filter: n } = e, s = n == null ? void 0 : n();
3180
+ function Mn(t, e) {
3181
+ const { transportId: r, filter: n } = e, s = n?.();
3188
3182
  if (r != null && s != null)
3189
3183
  throw new Error("Cannot use both `transportId` and `filter` at the same time");
3190
3184
  let a = t;
3191
3185
  if (r) {
3192
- if (t[zt] !== r)
3186
+ if (t[Vt] !== r)
3193
3187
  return [!0];
3194
3188
  a = t.data;
3195
3189
  }
3196
3190
  return s === !1 ? [!0] : [!1, a];
3197
3191
  }
3198
- function Dn(t, e = {}) {
3192
+ function Fn(t, e = {}) {
3199
3193
  const { transportId: r, filter: n, remotePort: s } = e, a = t, i = s ?? t;
3200
3194
  let o;
3201
3195
  return {
3202
3196
  send(d) {
3203
- i.postMessage(Mn(d, { transportId: r }));
3197
+ i.postMessage($n(d, { transportId: r }));
3204
3198
  },
3205
3199
  registerHandler(d) {
3206
3200
  o = (c) => {
3207
- const l = c.data, [b, S] = Fn(l, {
3201
+ const l = c.data, [w, S] = Mn(l, {
3208
3202
  transportId: r,
3209
- filter: () => n == null ? void 0 : n(c)
3203
+ filter: () => n?.(c)
3210
3204
  });
3211
- b || d(S);
3205
+ w || d(S);
3212
3206
  }, a.addEventListener("message", o);
3213
3207
  },
3214
3208
  unregisterHandler() {
@@ -3216,15 +3210,15 @@ var hs = wr((gs, yt) => {
3216
3210
  }
3217
3211
  };
3218
3212
  }
3219
- function Ln(t) {
3220
- return Dn(self, t);
3213
+ function Dn(t) {
3214
+ return Fn(self, t);
3221
3215
  }
3222
- function qt(t, e) {
3216
+ function zt(t, e) {
3223
3217
  if (!t)
3224
3218
  throw new Error(e);
3225
3219
  }
3226
- const Vn = "marimo-transport";
3227
- class zn {
3220
+ const Ln = "marimo-transport";
3221
+ class Vn {
3228
3222
  constructor(e) {
3229
3223
  this.onMessage = e, this.started = !1, this.push = (r) => {
3230
3224
  this.started ? this.onMessage(r) : this.buffer.push(r);
@@ -3233,10 +3227,10 @@ var hs = wr((gs, yt) => {
3233
3227
  }, this.buffer = [];
3234
3228
  }
3235
3229
  }
3236
- const be = {
3230
+ const _e = {
3237
3231
  NOOP: () => {
3238
3232
  }
3239
- }, Ut = (t, e) => {
3233
+ }, qt = (t, e) => {
3240
3234
  const r = `[${t}]`;
3241
3235
  return {
3242
3236
  debug: (...n) => e.debug(r, ...n),
@@ -3244,10 +3238,10 @@ var hs = wr((gs, yt) => {
3244
3238
  warn: (...n) => e.warn(r, ...n),
3245
3239
  error: (...n) => e.error(r, ...n),
3246
3240
  trace: (...n) => e.trace(r, ...n),
3247
- get: (n) => Ut(`${t}.${n}`, e),
3248
- disabled: (n = !0) => n ? et : e
3241
+ get: (n) => qt(`${t}.${n}`, e),
3242
+ disabled: (n = !0) => n ? Xe : e
3249
3243
  };
3250
- }, Qe = {
3244
+ }, Ke = {
3251
3245
  debug: (...t) => {
3252
3246
  console.debug(...t);
3253
3247
  },
@@ -3263,27 +3257,27 @@ var hs = wr((gs, yt) => {
3263
3257
  trace: (...t) => {
3264
3258
  console.trace(...t);
3265
3259
  },
3266
- get: (t) => Ut(t, Qe),
3267
- disabled: (t = !0) => t ? et : Qe
3268
- }, et = {
3269
- debug: () => be.NOOP,
3270
- log: () => be.NOOP,
3271
- warn: () => be.NOOP,
3272
- error: () => be.NOOP,
3273
- trace: () => be.NOOP,
3274
- get: () => et,
3275
- disabled: () => et
3260
+ get: (t) => qt(t, Ke),
3261
+ disabled: (t = !0) => t ? Xe : Ke
3262
+ }, Xe = {
3263
+ debug: () => _e.NOOP,
3264
+ log: () => _e.NOOP,
3265
+ warn: () => _e.NOOP,
3266
+ error: () => _e.NOOP,
3267
+ trace: () => _e.NOOP,
3268
+ get: () => Xe,
3269
+ disabled: () => Xe
3276
3270
  };
3277
- function qn() {
3278
- return typeof window < "u" && window.Logger || Qe;
3271
+ function zn() {
3272
+ return typeof window < "u" && window.Logger || Ke;
3279
3273
  }
3280
- const W = qn(), Un = [
3274
+ const W = zn(), qn = [
3281
3275
  "pip",
3282
3276
  "uv",
3283
3277
  "rye",
3284
3278
  "poetry",
3285
3279
  "pixi"
3286
- ], Bt = [
3280
+ ], Ut = [
3287
3281
  "normal",
3288
3282
  "compact",
3289
3283
  "medium",
@@ -3295,7 +3289,7 @@ var hs = wr((gs, yt) => {
3295
3289
  "polars",
3296
3290
  "lazy-polars",
3297
3291
  "pandas"
3298
- ], Bn = h.object({
3292
+ ], Un = h.object({
3299
3293
  completion: h.object({
3300
3294
  activate_on_typing: h.boolean().default(!0),
3301
3295
  copilot: h.union([h.boolean(), h.enum(["github", "codeium", "custom"])]).default(!1).transform((t) => t === !0 ? "github" : t),
@@ -3326,10 +3320,10 @@ var hs = wr((gs, yt) => {
3326
3320
  cell_output: h.enum(["above", "below"]).default("above"),
3327
3321
  dataframes: h.enum(["rich", "plain"]).default("rich"),
3328
3322
  default_table_page_size: h.number().default(10),
3329
- default_width: h.enum(Bt).default("medium").transform((t) => t === "normal" ? "compact" : t)
3323
+ default_width: h.enum(Ut).default("medium").transform((t) => t === "normal" ? "compact" : t)
3330
3324
  }).passthrough().default({}),
3331
3325
  package_management: h.object({
3332
- manager: h.enum(Un).default("pip")
3326
+ manager: h.enum(qn).default("pip")
3333
3327
  }).passthrough().default({ manager: "pip" }),
3334
3328
  ai: h.object({
3335
3329
  rules: h.string().default(""),
@@ -3370,42 +3364,42 @@ var hs = wr((gs, yt) => {
3370
3364
  rules: "",
3371
3365
  open_ai: {}
3372
3366
  }
3373
- }), Hn = h.string(), Wn = h.enum(Ht).default("auto");
3367
+ }), Hn = h.string(), Bn = h.enum(Ht).default("auto");
3374
3368
  h.object({
3375
- width: h.enum(Bt).default("medium").transform((t) => t === "normal" ? "compact" : t),
3369
+ width: h.enum(Ut).default("medium").transform((t) => t === "normal" ? "compact" : t),
3376
3370
  app_title: Hn.nullish(),
3377
3371
  css_file: h.string().nullish(),
3378
3372
  html_head_file: h.string().nullish(),
3379
3373
  auto_download: h.array(h.enum(["html", "markdown", "ipynb"])).default([]),
3380
- sql_output: Wn
3374
+ sql_output: Bn
3381
3375
  }).default({ width: "medium", auto_download: [] });
3382
- function Jn() {
3383
- return Bn.parse({});
3376
+ function Wn() {
3377
+ return Un.parse({});
3384
3378
  }
3385
- var Yn = Object.defineProperty, x = (t, e) => Yn(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) {
3379
+ var Jn = Object.defineProperty, x = (t, e) => Jn(t, "name", { value: e, configurable: !0 }), Bt = ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) {
3386
3380
  if (typeof require < "u") return require.apply(this, arguments);
3387
3381
  throw new Error('Dynamic require of "' + t + '" is not supported');
3388
3382
  });
3389
- function Jt(t) {
3383
+ function Wt(t) {
3390
3384
  return !isNaN(parseFloat(t)) && isFinite(t);
3391
3385
  }
3392
- x(Jt, "_isNumber");
3386
+ x(Wt, "_isNumber");
3393
3387
  function X(t) {
3394
3388
  return t.charAt(0).toUpperCase() + t.substring(1);
3395
3389
  }
3396
3390
  x(X, "_capitalize");
3397
- function nt(t) {
3391
+ function tt(t) {
3398
3392
  return function() {
3399
3393
  return this[t];
3400
3394
  };
3401
3395
  }
3402
- x(nt, "_getter");
3403
- var le = ["isConstructor", "isEval", "isNative", "isToplevel"], fe = ["columnNumber", "lineNumber"], pe = ["fileName", "functionName", "source"], Gn = ["args"], Kn = ["evalOrigin"], qe = le.concat(fe, pe, Gn, Kn);
3404
- function j(t) {
3405
- if (t) for (var e = 0; e < qe.length; e++) t[qe[e]] !== void 0 && this["set" + X(qe[e])](t[qe[e]]);
3396
+ x(tt, "_getter");
3397
+ var ce = ["isConstructor", "isEval", "isNative", "isToplevel"], ue = ["columnNumber", "lineNumber"], le = ["fileName", "functionName", "source"], Yn = ["args"], Gn = ["evalOrigin"], Ve = ce.concat(ue, le, Yn, Gn);
3398
+ function P(t) {
3399
+ if (t) for (var e = 0; e < Ve.length; e++) t[Ve[e]] !== void 0 && this["set" + X(Ve[e])](t[Ve[e]]);
3406
3400
  }
3407
- x(j, "StackFrame");
3408
- j.prototype = { getArgs: function() {
3401
+ x(P, "StackFrame");
3402
+ P.prototype = { getArgs: function() {
3409
3403
  return this.args;
3410
3404
  }, setArgs: function(t) {
3411
3405
  if (Object.prototype.toString.call(t) !== "[object Array]") throw new TypeError("Args must be an Array");
@@ -3413,38 +3407,38 @@ var hs = wr((gs, yt) => {
3413
3407
  }, getEvalOrigin: function() {
3414
3408
  return this.evalOrigin;
3415
3409
  }, setEvalOrigin: function(t) {
3416
- if (t instanceof j) this.evalOrigin = t;
3417
- else if (t instanceof Object) this.evalOrigin = new j(t);
3410
+ if (t instanceof P) this.evalOrigin = t;
3411
+ else if (t instanceof Object) this.evalOrigin = new P(t);
3418
3412
  else throw new TypeError("Eval Origin must be an Object or StackFrame");
3419
3413
  }, toString: function() {
3420
3414
  var t = this.getFileName() || "", e = this.getLineNumber() || "", r = this.getColumnNumber() || "", n = this.getFunctionName() || "";
3421
3415
  return this.getIsEval() ? t ? "[eval] (" + t + ":" + e + ":" + r + ")" : "[eval]:" + e + ":" + r : n ? n + " (" + t + ":" + e + ":" + r + ")" : t + ":" + e + ":" + r;
3422
3416
  } };
3423
- j.fromString = x(function(t) {
3417
+ P.fromString = x(function(t) {
3424
3418
  var e = t.indexOf("("), r = t.lastIndexOf(")"), n = t.substring(0, e), s = t.substring(e + 1, r).split(","), a = t.substring(r + 1);
3425
3419
  if (a.indexOf("@") === 0) var i = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), o = i[1], d = i[2], c = i[3];
3426
- return new j({ functionName: n, args: s || void 0, fileName: o, lineNumber: d || void 0, columnNumber: c || void 0 });
3420
+ return new P({ functionName: n, args: s || void 0, fileName: o, lineNumber: d || void 0, columnNumber: c || void 0 });
3427
3421
  }, "StackFrame$$fromString");
3428
- for (te = 0; te < le.length; te++) j.prototype["get" + X(le[te])] = nt(le[te]), j.prototype["set" + X(le[te])] = /* @__PURE__ */ function(t) {
3422
+ for (ee = 0; ee < ce.length; ee++) P.prototype["get" + X(ce[ee])] = tt(ce[ee]), P.prototype["set" + X(ce[ee])] = /* @__PURE__ */ function(t) {
3429
3423
  return function(e) {
3430
3424
  this[t] = !!e;
3431
3425
  };
3432
- }(le[te]);
3433
- var te;
3434
- for (re = 0; re < fe.length; re++) j.prototype["get" + X(fe[re])] = nt(fe[re]), j.prototype["set" + X(fe[re])] = /* @__PURE__ */ function(t) {
3426
+ }(ce[ee]);
3427
+ var ee;
3428
+ for (te = 0; te < ue.length; te++) P.prototype["get" + X(ue[te])] = tt(ue[te]), P.prototype["set" + X(ue[te])] = /* @__PURE__ */ function(t) {
3435
3429
  return function(e) {
3436
- if (!Jt(e)) throw new TypeError(t + " must be a Number");
3430
+ if (!Wt(e)) throw new TypeError(t + " must be a Number");
3437
3431
  this[t] = Number(e);
3438
3432
  };
3439
- }(fe[re]);
3440
- var re;
3441
- for (ne = 0; ne < pe.length; ne++) j.prototype["get" + X(pe[ne])] = nt(pe[ne]), j.prototype["set" + X(pe[ne])] = /* @__PURE__ */ function(t) {
3433
+ }(ue[te]);
3434
+ var te;
3435
+ for (re = 0; re < le.length; re++) P.prototype["get" + X(le[re])] = tt(le[re]), P.prototype["set" + X(le[re])] = /* @__PURE__ */ function(t) {
3442
3436
  return function(e) {
3443
3437
  this[t] = String(e);
3444
3438
  };
3445
- }(pe[ne]);
3446
- var ne, it = j;
3447
- function Yt() {
3439
+ }(le[re]);
3440
+ var re, st = P;
3441
+ function Jt() {
3448
3442
  var t = /^\s*at .*(\S+:\d+|\(native\))/m, e = /^(eval@)?(\[native code])?$/;
3449
3443
  return { parse: x(function(r) {
3450
3444
  if (r.stack && r.stack.match(t)) return this.parseV8OrIE(r);
@@ -3464,7 +3458,7 @@ var hs = wr((gs, yt) => {
3464
3458
  var a = s.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), i = a.match(/ (\(.+\)$)/);
3465
3459
  a = i ? a.replace(i[0], "") : a;
3466
3460
  var o = this.extractLocation(i ? i[1] : a), d = i && a || void 0, c = ["eval", "<anonymous>"].indexOf(o[0]) > -1 ? void 0 : o[0];
3467
- return new it({ functionName: d, fileName: c, lineNumber: o[1], columnNumber: o[2], source: s });
3461
+ return new st({ functionName: d, fileName: c, lineNumber: o[1], columnNumber: o[2], source: s });
3468
3462
  }, this);
3469
3463
  }, "ErrorStackParser$$parseV8OrIE"), parseFFOrSafari: x(function(r) {
3470
3464
  var n = r.stack.split(`
@@ -3472,58 +3466,58 @@ var hs = wr((gs, yt) => {
3472
3466
  return !s.match(e);
3473
3467
  }, this);
3474
3468
  return n.map(function(s) {
3475
- 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 });
3469
+ 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 });
3476
3470
  var a = /((.*".+"[^@]*)?[^@]*)(?:@)/, i = s.match(a), o = i && i[1] ? i[1] : void 0, d = this.extractLocation(s.replace(a, ""));
3477
- return new it({ functionName: o, fileName: d[0], lineNumber: d[1], columnNumber: d[2], source: s });
3471
+ return new st({ functionName: o, fileName: d[0], lineNumber: d[1], columnNumber: d[2], source: s });
3478
3472
  }, this);
3479
3473
  }, "ErrorStackParser$$parseFFOrSafari") };
3480
3474
  }
3481
- x(Yt, "ErrorStackParser");
3482
- var Xn = new Yt(), Qn = Xn, z = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, Gt = z && typeof yt < "u" && typeof yt.exports < "u" && typeof Wt < "u" && typeof __dirname < "u", es = z && !Gt, ts = typeof Deno < "u", Kt = !z && !ts, rs = Kt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", ns = Kt && typeof importScripts == "function" && typeof self == "object";
3475
+ x(Jt, "ErrorStackParser");
3476
+ var Kn = new Jt(), Xn = Kn, V = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, Yt = V && typeof ht < "u" && typeof ht.exports < "u" && typeof Bt < "u" && typeof __dirname < "u", Qn = V && !Yt, es = typeof Deno < "u", Gt = !V && !es, ts = Gt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", rs = Gt && typeof importScripts == "function" && typeof self == "object";
3483
3477
  typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Safari") > -1;
3484
- var Xt, ft, Qt, Et, vt;
3485
- async function _t() {
3486
- if (!z || (Xt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Et = await import("./__vite-browser-external-CPvbk0mb.js"), vt = await import("./__vite-browser-external-CPvbk0mb.js"), Qt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, ft = await import("./__vite-browser-external-CPvbk0mb.js"), wt = ft.sep, typeof Wt < "u")) return;
3487
- let t = Et, e = await import("./__vite-browser-external-CPvbk0mb.js"), r = await import("./__vite-browser-external-CPvbk0mb.js"), n = await import("./__vite-browser-external-CPvbk0mb.js"), s = { fs: t, crypto: e, ws: r, child_process: n };
3478
+ var Kt, ut, Xt, Tt, yt;
3479
+ async function gt() {
3480
+ if (!V || (Kt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Tt = await import("./__vite-browser-external-CPvbk0mb.js"), yt = await import("./__vite-browser-external-CPvbk0mb.js"), Xt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, ut = await import("./__vite-browser-external-CPvbk0mb.js"), vt = ut.sep, typeof Bt < "u")) return;
3481
+ let t = Tt, 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 };
3488
3482
  globalThis.require = function(a) {
3489
3483
  return s[a];
3490
3484
  };
3491
3485
  }
3492
- x(_t, "initNodeModules");
3486
+ x(gt, "initNodeModules");
3487
+ function Qt(t, e) {
3488
+ return ut.resolve(e || ".", t);
3489
+ }
3490
+ x(Qt, "node_resolvePath");
3493
3491
  function er(t, e) {
3494
- return ft.resolve(e || ".", t);
3492
+ return e === void 0 && (e = location), new URL(t, e).toString();
3495
3493
  }
3496
- x(er, "node_resolvePath");
3494
+ x(er, "browser_resolvePath");
3495
+ var lt;
3496
+ V ? lt = Qt : lt = er;
3497
+ var vt;
3498
+ V || (vt = "/");
3497
3499
  function tr(t, e) {
3498
- return e === void 0 && (e = location), new URL(t, e).toString();
3500
+ return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: yt.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
3499
3501
  }
3500
- x(tr, "browser_resolvePath");
3501
- var pt;
3502
- z ? pt = er : pt = tr;
3503
- var wt;
3504
- z || (wt = "/");
3502
+ x(tr, "node_getBinaryResponse");
3505
3503
  function rr(t, e) {
3506
- return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: vt.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
3507
- }
3508
- x(rr, "node_getBinaryResponse");
3509
- function nr(t, e) {
3510
3504
  let r = new URL(t, location);
3511
3505
  return { response: fetch(r, e ? { integrity: e } : {}) };
3512
3506
  }
3513
- x(nr, "browser_getBinaryResponse");
3514
- var tt;
3515
- z ? tt = rr : tt = nr;
3516
- async function sr(t, e) {
3517
- let { response: r, binary: n } = tt(t, e);
3507
+ x(rr, "browser_getBinaryResponse");
3508
+ var Qe;
3509
+ V ? Qe = tr : Qe = rr;
3510
+ async function nr(t, e) {
3511
+ let { response: r, binary: n } = Qe(t, e);
3518
3512
  if (n) return n;
3519
3513
  let s = await r;
3520
3514
  if (!s.ok) throw new Error(`Failed to load '${t}': request failed.`);
3521
3515
  return new Uint8Array(await s.arrayBuffer());
3522
3516
  }
3523
- x(sr, "loadBinaryFile");
3524
- var Ue;
3525
- if (rs) Ue = x(async (t) => await import(t), "loadScript");
3526
- else if (ns) Ue = x(async (t) => {
3517
+ x(nr, "loadBinaryFile");
3518
+ var ze;
3519
+ if (ts) ze = x(async (t) => await import(t), "loadScript");
3520
+ else if (rs) ze = x(async (t) => {
3527
3521
  try {
3528
3522
  globalThis.importScripts(t);
3529
3523
  } catch (e) {
@@ -3531,46 +3525,46 @@ var hs = wr((gs, yt) => {
3531
3525
  else throw e;
3532
3526
  }
3533
3527
  }, "loadScript");
3534
- else if (z) Ue = ar;
3528
+ else if (V) ze = sr;
3535
3529
  else throw new Error("Cannot determine runtime environment");
3536
- async function ar(t) {
3537
- t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Qt.runInThisContext(await (await fetch(t)).text()) : await import(Xt.pathToFileURL(t).href);
3530
+ async function sr(t) {
3531
+ t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Xt.runInThisContext(await (await fetch(t)).text()) : await import(Kt.pathToFileURL(t).href);
3538
3532
  }
3539
- x(ar, "nodeLoadScript");
3540
- async function ir(t) {
3541
- if (z) {
3542
- await _t();
3543
- let e = await vt.readFile(t, { encoding: "utf8" });
3533
+ x(sr, "nodeLoadScript");
3534
+ async function ar(t) {
3535
+ if (V) {
3536
+ await gt();
3537
+ let e = await yt.readFile(t, { encoding: "utf8" });
3544
3538
  return JSON.parse(e);
3545
3539
  } else return await (await fetch(t)).json();
3546
3540
  }
3547
- x(ir, "loadLockFile");
3548
- async function or() {
3549
- if (Gt) return __dirname;
3541
+ x(ar, "loadLockFile");
3542
+ async function ir() {
3543
+ if (Yt) return __dirname;
3550
3544
  let t;
3551
3545
  try {
3552
3546
  throw new Error();
3553
3547
  } catch (n) {
3554
3548
  t = n;
3555
3549
  }
3556
- let e = Qn.parse(t)[0].fileName;
3557
- if (z && !e.startsWith("file://") && (e = `file://${e}`), es) {
3550
+ let e = Xn.parse(t)[0].fileName;
3551
+ if (V && !e.startsWith("file://") && (e = `file://${e}`), Qn) {
3558
3552
  let n = await import("./__vite-browser-external-CPvbk0mb.js");
3559
3553
  return (await import("./__vite-browser-external-CPvbk0mb.js")).fileURLToPath(n.dirname(e));
3560
3554
  }
3561
- let r = e.lastIndexOf(wt);
3555
+ let r = e.lastIndexOf(vt);
3562
3556
  if (r === -1) throw new Error("Could not extract indexURL path from pyodide module location");
3563
3557
  return e.slice(0, r);
3564
3558
  }
3565
- x(or, "calculateDirname");
3566
- function dr(t) {
3559
+ x(ir, "calculateDirname");
3560
+ function or(t) {
3567
3561
  let e = t.FS, r = t.FS.filesystems.MEMFS, n = t.PATH, s = { DIR_MODE: 16895, FILE_MODE: 33279, mount: function(a) {
3568
3562
  if (!a.opts.fileSystemHandle) throw new Error("opts.fileSystemHandle is required");
3569
3563
  return r.mount.apply(null, arguments);
3570
3564
  }, syncfs: async (a, i, o) => {
3571
3565
  try {
3572
- let d = s.getLocalSet(a), c = await s.getRemoteSet(a), l = i ? c : d, b = i ? d : c;
3573
- await s.reconcile(a, l, b), o(null);
3566
+ let d = s.getLocalSet(a), c = await s.getRemoteSet(a), l = i ? c : d, w = i ? d : c;
3567
+ await s.reconcile(a, l, w), o(null);
3574
3568
  } catch (d) {
3575
3569
  o(d);
3576
3570
  }
@@ -3581,17 +3575,17 @@ var hs = wr((gs, yt) => {
3581
3575
  }
3582
3576
  x(o, "isRealDir");
3583
3577
  function d(l) {
3584
- return (b) => n.join2(l, b);
3578
+ return (w) => n.join2(l, w);
3585
3579
  }
3586
3580
  x(d, "toAbsolute");
3587
3581
  let c = e.readdir(a.mountpoint).filter(o).map(d(a.mountpoint));
3588
3582
  for (; c.length; ) {
3589
- let l = c.pop(), b = e.stat(l);
3590
- e.isDir(b.mode) && c.push.apply(c, e.readdir(l).filter(o).map(d(l))), i[l] = { timestamp: b.mtime, mode: b.mode };
3583
+ let l = c.pop(), w = e.stat(l);
3584
+ e.isDir(w.mode) && c.push.apply(c, e.readdir(l).filter(o).map(d(l))), i[l] = { timestamp: w.mtime, mode: w.mode };
3591
3585
  }
3592
3586
  return { type: "local", entries: i };
3593
3587
  }, getRemoteSet: async (a) => {
3594
- let i = /* @__PURE__ */ Object.create(null), o = await ss(a.opts.fileSystemHandle);
3588
+ let i = /* @__PURE__ */ Object.create(null), o = await ns(a.opts.fileSystemHandle);
3595
3589
  for (let [d, c] of o) d !== "." && (i[n.join2(a.mountpoint, d)] = { timestamp: c.kind === "file" ? new Date((await c.getFile()).lastModified) : /* @__PURE__ */ new Date(), mode: c.kind === "file" ? s.FILE_MODE : s.DIR_MODE });
3596
3590
  return { type: "remote", entries: i, handles: o };
3597
3591
  }, loadLocalEntry: (a) => {
@@ -3627,34 +3621,34 @@ var hs = wr((gs, yt) => {
3627
3621
  }, reconcile: async (a, i, o) => {
3628
3622
  let d = 0, c = [];
3629
3623
  Object.keys(i.entries).forEach(function(S) {
3630
- let I = i.entries[S], q = o.entries[S];
3631
- (!q || e.isFile(I.mode) && I.timestamp.getTime() > q.timestamp.getTime()) && (c.push(S), d++);
3624
+ let C = i.entries[S], z = o.entries[S];
3625
+ (!z || e.isFile(C.mode) && C.timestamp.getTime() > z.timestamp.getTime()) && (c.push(S), d++);
3632
3626
  }), c.sort();
3633
3627
  let l = [];
3634
3628
  if (Object.keys(o.entries).forEach(function(S) {
3635
3629
  i.entries[S] || (l.push(S), d++);
3636
3630
  }), l.sort().reverse(), !d) return;
3637
- let b = i.type === "remote" ? i.handles : o.handles;
3631
+ let w = i.type === "remote" ? i.handles : o.handles;
3638
3632
  for (let S of c) {
3639
- let I = n.normalize(S.replace(a.mountpoint, "/")).substring(1);
3633
+ let C = n.normalize(S.replace(a.mountpoint, "/")).substring(1);
3640
3634
  if (o.type === "local") {
3641
- let q = b.get(I), Ve = await s.loadRemoteEntry(q);
3642
- s.storeLocalEntry(S, Ve);
3635
+ let z = w.get(C), De = await s.loadRemoteEntry(z);
3636
+ s.storeLocalEntry(S, De);
3643
3637
  } else {
3644
- let q = s.loadLocalEntry(S);
3645
- await s.storeRemoteEntry(b, I, q);
3638
+ let z = s.loadLocalEntry(S);
3639
+ await s.storeRemoteEntry(w, C, z);
3646
3640
  }
3647
3641
  }
3648
3642
  for (let S of l) if (o.type === "local") s.removeLocalEntry(S);
3649
3643
  else {
3650
- let I = n.normalize(S.replace(a.mountpoint, "/")).substring(1);
3651
- await s.removeRemoteEntry(b, I);
3644
+ let C = n.normalize(S.replace(a.mountpoint, "/")).substring(1);
3645
+ await s.removeRemoteEntry(w, C);
3652
3646
  }
3653
3647
  } };
3654
3648
  t.FS.filesystems.NATIVEFS_ASYNC = s;
3655
3649
  }
3656
- x(dr, "initializeNativeFS");
3657
- var ss = x(async (t) => {
3650
+ x(or, "initializeNativeFS");
3651
+ var ns = x(async (t) => {
3658
3652
  let e = [];
3659
3653
  async function r(s) {
3660
3654
  for await (let a of s.values()) e.push(a), a.kind === "directory" && await r(a);
@@ -3668,14 +3662,14 @@ var hs = wr((gs, yt) => {
3668
3662
  }
3669
3663
  return n;
3670
3664
  }, "getFsHandles");
3671
- function cr(t) {
3672
- let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: hr(t), quit(r, n) {
3665
+ function dr(t) {
3666
+ let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: pr(t), quit(r, n) {
3673
3667
  throw e.exited = { status: r, toThrow: n }, n;
3674
- }, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: mr(t.indexURL) };
3668
+ }, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: hr(t.indexURL) };
3675
3669
  return e;
3676
3670
  }
3677
- x(cr, "createSettings");
3678
- function ur(t) {
3671
+ x(dr, "createSettings");
3672
+ function cr(t) {
3679
3673
  return function(e) {
3680
3674
  let r = "/";
3681
3675
  try {
@@ -3686,14 +3680,14 @@ var hs = wr((gs, yt) => {
3686
3680
  e.FS.chdir(t);
3687
3681
  };
3688
3682
  }
3689
- x(ur, "createHomeDirectory");
3690
- function lr(t) {
3683
+ x(cr, "createHomeDirectory");
3684
+ function ur(t) {
3691
3685
  return function(e) {
3692
3686
  Object.assign(e.ENV, t);
3693
3687
  };
3694
3688
  }
3695
- x(lr, "setEnvironment");
3696
- function fr(t) {
3689
+ x(ur, "setEnvironment");
3690
+ function lr(t) {
3697
3691
  return t ? [async (e) => {
3698
3692
  e.addRunDependency("fsInitHook");
3699
3693
  try {
@@ -3703,9 +3697,9 @@ var hs = wr((gs, yt) => {
3703
3697
  }
3704
3698
  }] : [];
3705
3699
  }
3706
- x(fr, "callFsInitHook");
3707
- function pr(t) {
3708
- let e = sr(t);
3700
+ x(lr, "callFsInitHook");
3701
+ function fr(t) {
3702
+ let e = nr(t);
3709
3703
  return async (r) => {
3710
3704
  let n = r._py_version_major(), s = r._py_version_minor();
3711
3705
  r.FS.mkdirTree("/lib"), r.API.sitePackages = `/lib/python${n}.${s}/site-packages`, r.FS.mkdirTree(r.API.sitePackages), r.addRunDependency("install-stdlib");
@@ -3719,15 +3713,15 @@ var hs = wr((gs, yt) => {
3719
3713
  }
3720
3714
  };
3721
3715
  }
3722
- x(pr, "installStdlib");
3723
- function hr(t) {
3716
+ x(fr, "installStdlib");
3717
+ function pr(t) {
3724
3718
  let e;
3725
- return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...fr(t.fsInit), pr(e), ur(t.env.HOME), lr(t.env), dr];
3719
+ return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...lr(t.fsInit), fr(e), cr(t.env.HOME), ur(t.env), or];
3726
3720
  }
3727
- x(hr, "getFileSystemInitializationFuncs");
3728
- function mr(t) {
3721
+ x(pr, "getFileSystemInitializationFuncs");
3722
+ function hr(t) {
3729
3723
  if (typeof WasmOffsetConverter < "u") return;
3730
- let { binary: e, response: r } = tt(t + "pyodide.asm.wasm");
3724
+ let { binary: e, response: r } = Qe(t + "pyodide.asm.wasm");
3731
3725
  return function(n, s) {
3732
3726
  return async function() {
3733
3727
  try {
@@ -3741,19 +3735,19 @@ var hs = wr((gs, yt) => {
3741
3735
  }(), {};
3742
3736
  };
3743
3737
  }
3744
- x(mr, "getInstantiateWasmFunc");
3745
- var ht = "0.27.5";
3746
- async function mt(t = {}) {
3738
+ x(hr, "getInstantiateWasmFunc");
3739
+ var ft = "0.27.5";
3740
+ async function pt(t = {}) {
3747
3741
  var e, r;
3748
- await _t();
3749
- let n = t.indexURL || await or();
3750
- n = pt(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
3742
+ await gt();
3743
+ let n = t.indexURL || await ir();
3744
+ n = lt(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
3751
3745
  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);
3752
3746
  (e = a.env).HOME ?? (e.HOME = "/home/pyodide"), (r = a.env).PYTHONINSPECT ?? (r.PYTHONINSPECT = "1");
3753
- let i = cr(a), o = i.API;
3754
- if (o.lockFilePromise = ir(a.lockFileURL), typeof _createPyodideModule != "function") {
3747
+ let i = dr(a), o = i.API;
3748
+ if (o.lockFilePromise = ar(a.lockFileURL), typeof _createPyodideModule != "function") {
3755
3749
  let S = `${a.indexURL}pyodide.asm.js`;
3756
- await Ue(S);
3750
+ await ze(S);
3757
3751
  }
3758
3752
  let d;
3759
3753
  if (t._loadSnapshot) {
@@ -3762,52 +3756,52 @@ var hs = wr((gs, yt) => {
3762
3756
  }
3763
3757
  let c = await _createPyodideModule(i);
3764
3758
  if (i.exited) throw i.exited.toThrow;
3765
- if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== ht && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${ht}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
3759
+ if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== ft && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${ft}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
3766
3760
  c.locateFile = (S) => {
3767
3761
  throw new Error("Didn't expect to load any more file_packager files!");
3768
3762
  };
3769
3763
  let l;
3770
3764
  d && (l = o.restoreSnapshot(d));
3771
- let b = o.finalizeBootstrap(l, t._snapshotDeserializer);
3772
- return o.sys.path.insert(0, o.config.env.HOME), b.version.includes("dev") || o.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${b.version}/full/`), o._pyodide.set_excepthook(), await o.packageIndexReady, o.initializeStreams(a.stdin, a.stdout, a.stderr), b;
3765
+ let w = o.finalizeBootstrap(l, t._snapshotDeserializer);
3766
+ 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;
3773
3767
  }
3774
- x(mt, "loadPyodide");
3775
- function Ee(t) {
3768
+ x(pt, "loadPyodide");
3769
+ function Se(t) {
3776
3770
  return t.FS;
3777
3771
  }
3778
- const Ot = (t) => new TextDecoder().decode(t), ke = "notebook.py", xe = "/marimo", se = {
3779
- NOTEBOOK_FILENAME: ke,
3780
- HOME_DIR: xe,
3772
+ const Et = (t) => new TextDecoder().decode(t), be = "notebook.py", we = "/marimo", ne = {
3773
+ NOTEBOOK_FILENAME: be,
3774
+ HOME_DIR: we,
3781
3775
  createHomeDir: (t) => {
3782
- const e = Ee(t);
3776
+ const e = Se(t);
3783
3777
  try {
3784
- e.mkdirTree(xe);
3778
+ e.mkdirTree(we);
3785
3779
  } catch {
3786
3780
  }
3787
- e.chdir(xe);
3781
+ e.chdir(we);
3788
3782
  },
3789
3783
  mountFS: (t) => {
3790
- Ee(t).mount(t.FS.filesystems.IDBFS, { root: "." }, xe);
3784
+ Se(t).mount(t.FS.filesystems.IDBFS, { root: "." }, we);
3791
3785
  },
3792
3786
  populateFilesToMemory: async (t) => {
3793
- await Nt(t, !0);
3787
+ await Ot(t, !0);
3794
3788
  },
3795
3789
  persistFilesToRemote: async (t) => {
3796
- await Nt(t, !1);
3790
+ await Ot(t, !1);
3797
3791
  },
3798
3792
  readNotebook: (t) => {
3799
- const e = Ee(t), r = `${xe}/${ke}`;
3800
- return Ot(e.readFile(r));
3793
+ const e = Se(t), r = `${we}/${be}`;
3794
+ return Et(e.readFile(r));
3801
3795
  },
3802
3796
  initNotebookCode: (t) => {
3803
- const { pyodide: e, filename: r, code: n } = t, s = Ee(e), a = (i) => {
3797
+ const { pyodide: e, filename: r, code: n } = t, s = Se(e), a = (i) => {
3804
3798
  try {
3805
- return Ot(s.readFile(i));
3799
+ return Et(s.readFile(i));
3806
3800
  } catch {
3807
3801
  return null;
3808
3802
  }
3809
3803
  };
3810
- if (r && r !== ke) {
3804
+ if (r && r !== be) {
3811
3805
  const i = a(r);
3812
3806
  if (i)
3813
3807
  return {
@@ -3815,15 +3809,15 @@ var hs = wr((gs, yt) => {
3815
3809
  filename: r
3816
3810
  };
3817
3811
  }
3818
- return s.writeFile(ke, n), {
3812
+ return s.writeFile(be, n), {
3819
3813
  code: n,
3820
- filename: ke
3814
+ filename: be
3821
3815
  };
3822
3816
  }
3823
3817
  };
3824
- function Nt(t, e) {
3818
+ function Ot(t, e) {
3825
3819
  return new Promise((r, n) => {
3826
- Ee(t).syncfs(e, (s) => {
3820
+ Se(t).syncfs(e, (s) => {
3827
3821
  if (s instanceof Error) {
3828
3822
  n(s);
3829
3823
  return;
@@ -3832,7 +3826,7 @@ var hs = wr((gs, yt) => {
3832
3826
  });
3833
3827
  });
3834
3828
  }
3835
- class as {
3829
+ class ss {
3836
3830
  constructor() {
3837
3831
  this.spans = [];
3838
3832
  }
@@ -3874,25 +3868,25 @@ var hs = wr((gs, yt) => {
3874
3868
  logSpans() {
3875
3869
  }
3876
3870
  }
3877
- const he = new as();
3878
- globalThis.t = he;
3879
- const is = !1;
3880
- class os {
3871
+ const fe = new ss();
3872
+ globalThis.t = fe;
3873
+ const as = !1;
3874
+ class is {
3881
3875
  constructor() {
3882
3876
  this.pyodide = null;
3883
3877
  }
3884
3878
  get requirePyodide() {
3885
- return qt(this.pyodide, "Pyodide not loaded"), this.pyodide;
3879
+ return zt(this.pyodide, "Pyodide not loaded"), this.pyodide;
3886
3880
  }
3887
3881
  async bootstrap(e) {
3888
3882
  return await this.loadPyodideAndPackages(e);
3889
3883
  }
3890
3884
  async loadPyodideAndPackages(e) {
3891
- if (!mt)
3885
+ if (!pt)
3892
3886
  throw new Error("loadPyodide is not defined");
3893
- const r = he.startSpan("loadPyodide");
3887
+ const r = fe.startSpan("loadPyodide");
3894
3888
  try {
3895
- const n = await mt({
3889
+ const n = await pt({
3896
3890
  // Perf: These get loaded while pyodide is being bootstrapped
3897
3891
  packages: [
3898
3892
  "micropip",
@@ -3902,7 +3896,7 @@ var hs = wr((gs, yt) => {
3902
3896
  "narwhals",
3903
3897
  "packaging"
3904
3898
  ],
3905
- _makeSnapshot: is,
3899
+ _makeSnapshot: as,
3906
3900
  lockFileURL: `https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,
3907
3901
  // Without this, this fails in Firefox with
3908
3902
  // `Could not extract indexURL path from pyodide module`
@@ -3915,8 +3909,8 @@ var hs = wr((gs, yt) => {
3915
3909
  }
3916
3910
  }
3917
3911
  async mountFilesystem(e) {
3918
- const r = he.startSpan("mountFilesystem");
3919
- return se.createHomeDir(this.requirePyodide), se.mountFS(this.requirePyodide), await se.populateFilesToMemory(this.requirePyodide), r.end("ok"), se.initNotebookCode({
3912
+ const r = fe.startSpan("mountFilesystem");
3913
+ return ne.createHomeDir(this.requirePyodide), ne.mountFS(this.requirePyodide), await ne.populateFilesToMemory(this.requirePyodide), r.end("ok"), ne.initNotebookCode({
3920
3914
  pyodide: this.requirePyodide,
3921
3915
  code: e.code,
3922
3916
  filename: e.filename
@@ -3927,7 +3921,7 @@ var hs = wr((gs, yt) => {
3927
3921
  self.messenger = {
3928
3922
  callback: s
3929
3923
  }, self.query_params = a, self.user_config = i;
3930
- const o = he.startSpan("startSession.runPython"), d = n || se.NOTEBOOK_FILENAME, [c, l, b] = this.requirePyodide.runPython(
3924
+ const o = fe.startSpan("startSession.runPython"), d = n || ne.NOTEBOOK_FILENAME, [c, l, w] = this.requirePyodide.runPython(
3931
3925
  `
3932
3926
  print("[py] Starting marimo...")
3933
3927
  import asyncio
@@ -3955,7 +3949,7 @@ var hs = wr((gs, yt) => {
3955
3949
  bridge, init, packages`
3956
3950
  );
3957
3951
  o.end();
3958
- const S = new Set(b.toJs());
3952
+ const S = new Set(w.toJs());
3959
3953
  return this.loadNotebookDeps(r, S).then(() => l(i.runtime.auto_instantiate)), c;
3960
3954
  }
3961
3955
  async loadNotebookDeps(e, r) {
@@ -3970,11 +3964,11 @@ ${e}`, e = `import jedi
3970
3964
  ${e}`, e = `import pyodide_http
3971
3965
  ${e}`;
3972
3966
  const s = [...r];
3973
- let a = he.startSpan("pyodide.loadPackage");
3967
+ let a = fe.startSpan("pyodide.loadPackage");
3974
3968
  await n.loadPackagesFromImports(e, {
3975
3969
  errorCallback: W.error,
3976
3970
  messageCallback: W.log
3977
- }), a.end(), a = he.startSpan("micropip.install");
3971
+ }), a.end(), a = fe.startSpan("micropip.install");
3978
3972
  const i = s.filter(
3979
3973
  (o) => !n.loadedPackages[o]
3980
3974
  );
@@ -3991,14 +3985,14 @@ ${e}`;
3991
3985
  }), a.end();
3992
3986
  }
3993
3987
  }
3994
- class ds extends os {
3988
+ class os extends is {
3995
3989
  async bootstrap(e) {
3996
3990
  return await super.bootstrap(e);
3997
3991
  }
3998
3992
  async mountFilesystem(e) {
3999
3993
  const { code: r, filename: n } = e;
4000
3994
  try {
4001
- return se.createHomeDir(this.requirePyodide), se.initNotebookCode({
3995
+ return ne.createHomeDir(this.requirePyodide), ne.initNotebookCode({
4002
3996
  pyodide: this.requirePyodide,
4003
3997
  code: r,
4004
3998
  filename: n
@@ -4014,50 +4008,50 @@ ${e}`;
4014
4008
  code: e.code,
4015
4009
  filename: e.filename,
4016
4010
  onMessage: e.onMessage,
4017
- userConfig: Jn()
4011
+ userConfig: Wn()
4018
4012
  });
4019
4013
  }
4020
4014
  }
4021
- const cs = !1;
4022
- function us(t) {
4023
- return t.includes("dev") && cs ? "dev" : `v${ht}`;
4015
+ const ds = !1;
4016
+ function cs(t) {
4017
+ return t.includes("dev") && ds ? "dev" : `v${ft}`;
4024
4018
  }
4025
- async function ls() {
4026
- const t = ps(), e = us(t);
4019
+ async function us() {
4020
+ const t = fs(), e = cs(t);
4027
4021
  try {
4028
- self.controller = new ds(), self.pyodide = await self.controller.bootstrap({
4022
+ self.controller = new os(), self.pyodide = await self.controller.bootstrap({
4029
4023
  version: t,
4030
4024
  pyodideVersion: e
4031
4025
  });
4032
4026
  } catch (r) {
4033
- W.error("Error bootstrapping", r), we.send.initializedError({
4034
- error: Vt(r)
4027
+ W.error("Error bootstrapping", r), ve.send.initializedError({
4028
+ error: Lt(r)
4035
4029
  });
4036
4030
  }
4037
4031
  }
4038
- const Be = ls(), yr = new zn(
4032
+ const qe = us(), mr = new Vn(
4039
4033
  (t) => {
4040
- we.send.kernelMessage({ message: t });
4034
+ ve.send.kernelMessage({ message: t });
4041
4035
  }
4042
- ), Rt = new br(), fs = {
4036
+ ), Nt = new br(), ls = {
4043
4037
  /**
4044
4038
  * Start the session
4045
4039
  */
4046
4040
  startSession: async (t) => {
4047
- await Be;
4041
+ await qe;
4048
4042
  try {
4049
- qt(self.controller, "Controller not loaded");
4043
+ zt(self.controller, "Controller not loaded");
4050
4044
  const e = await self.controller.mountFilesystem({
4051
4045
  code: t.code,
4052
4046
  filename: `app-${t.appId}.py`
4053
4047
  }), r = await self.controller.startSession({
4054
4048
  ...e,
4055
- onMessage: yr.push
4049
+ onMessage: mr.push
4056
4050
  });
4057
- Rt.resolve(r), we.send.initialized({});
4051
+ Nt.resolve(r), ve.send.initialized({});
4058
4052
  } catch (e) {
4059
- we.send.initializedError({
4060
- error: Vt(e)
4053
+ ve.send.initializedError({
4054
+ error: Lt(e)
4061
4055
  });
4062
4056
  }
4063
4057
  },
@@ -4065,7 +4059,7 @@ ${e}`;
4065
4059
  * Load packages
4066
4060
  */
4067
4061
  loadPackages: async (t) => {
4068
- await Be, t.includes("mo.sql") && (t = `import pandas
4062
+ await qe, t.includes("mo.sql") && (t = `import pandas
4069
4063
  ${t}`, t = `import duckdb
4070
4064
  ${t}`, t = `import sqlglot
4071
4065
  ${t}`, t.includes("polars") && (t = `import pyarrow
@@ -4078,8 +4072,8 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4078
4072
  * Call a function on the bridge
4079
4073
  */
4080
4074
  bridge: async (t) => {
4081
- await Be;
4082
- const { functionName: e, payload: r } = t, n = await Rt.promise, s = r == null ? null : typeof r == "string" ? r : JSON.stringify(r), a = s == null ? (
4075
+ await qe;
4076
+ const { functionName: e, payload: r } = t, n = await Nt.promise, s = r == null ? null : typeof r == "string" ? r : JSON.stringify(r), a = s == null ? (
4083
4077
  // @ts-expect-error ehh TypeScript
4084
4078
  await n[e]()
4085
4079
  ) : (
@@ -4088,18 +4082,18 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
4088
4082
  );
4089
4083
  return typeof a == "string" ? JSON.parse(a) : a;
4090
4084
  }
4091
- }, we = $n({
4092
- transport: Ln({
4093
- transportId: Vn
4085
+ }, ve = Zn({
4086
+ transport: Dn({
4087
+ transportId: Ln
4094
4088
  }),
4095
- requestHandler: fs
4089
+ requestHandler: ls
4096
4090
  });
4097
- we.send("ready", {});
4098
- we.addMessageListener("consumerReady", async () => {
4099
- await Be, yr.start();
4091
+ ve.send("ready", {});
4092
+ ve.addMessageListener("consumerReady", async () => {
4093
+ await qe, mr.start();
4100
4094
  });
4101
- function ps() {
4095
+ function fs() {
4102
4096
  return self.name;
4103
4097
  }
4104
4098
  });
4105
- export default hs();
4099
+ export default ps();