@authhero/adapter-interfaces 0.2.0 → 0.2.2

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.
@@ -1,35 +1,35 @@
1
- function ct(t, e) {
1
+ function lt(t, e) {
2
2
  var n = {};
3
3
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
4
4
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
5
- for (var s = 0, r = Object.getOwnPropertySymbols(t); s < r.length; s++)
6
- e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[s]) && (n[r[s]] = t[r[s]]);
5
+ for (var a = 0, r = Object.getOwnPropertySymbols(t); a < r.length; a++)
6
+ e.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[a]) && (n[r[a]] = t[r[a]]);
7
7
  return n;
8
8
  }
9
- function lt(t, e) {
9
+ function ut(t, e) {
10
10
  var n;
11
11
  return ((n = t == null ? void 0 : t._def) === null || n === void 0 ? void 0 : n.typeName) === e;
12
12
  }
13
13
  function J(t, e) {
14
14
  const n = t.ZodType.prototype[e];
15
15
  t.ZodType.prototype[e] = function(...r) {
16
- const s = n.apply(this, r);
17
- return s._def.openapi = this._def.openapi, s;
16
+ const a = n.apply(this, r);
17
+ return a._def.openapi = this._def.openapi, a;
18
18
  };
19
19
  }
20
- function ut(t) {
20
+ function pt(t) {
21
21
  if (typeof t.ZodType.prototype.openapi < "u")
22
22
  return;
23
- t.ZodType.prototype.openapi = function(s, i) {
23
+ t.ZodType.prototype.openapi = function(a, i) {
24
24
  var o, d, u, l, m, x;
25
- const z = typeof s == "string" ? i : s, B = z ?? {}, { param: $e } = B, it = ct(B, ["param"]), De = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof s == "string" ? { refId: s } : void 0), Ue = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), it), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || $e ? {
25
+ const z = typeof a == "string" ? i : a, B = z ?? {}, { param: $e } = B, ot = lt(B, ["param"]), De = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof a == "string" ? { refId: a } : void 0), Ue = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), ot), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || $e ? {
26
26
  param: Object.assign(Object.assign({}, (x = (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata) === null || x === void 0 ? void 0 : x.param), $e)
27
27
  } : void 0), Ve = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(De).length > 0 ? { _internal: De } : void 0), Object.keys(Ue).length > 0 ? { metadata: Ue } : void 0) }));
28
- if (lt(this, "ZodObject")) {
29
- const ot = this.extend;
30
- Ve.extend = function(...dt) {
28
+ if (ut(this, "ZodObject")) {
29
+ const dt = this.extend;
30
+ Ve.extend = function(...ct) {
31
31
  var xe, we, Se, Te, Oe, Ee;
32
- const Ce = ot.apply(this, dt);
32
+ const Ce = dt.apply(this, ct);
33
33
  return Ce._def.openapi = {
34
34
  _internal: {
35
35
  extendedFrom: !((we = (xe = this._def.openapi) === null || xe === void 0 ? void 0 : xe._internal) === null || we === void 0) && we.refId ? { refId: (Te = (Se = this._def.openapi) === null || Se === void 0 ? void 0 : Se._internal) === null || Te === void 0 ? void 0 : Te.refId, schema: this } : (Oe = this._def.openapi) === null || Oe === void 0 ? void 0 : Oe._internal.extendedFrom
@@ -42,68 +42,68 @@ function ut(t) {
42
42
  }, J(t, "optional"), J(t, "nullable"), J(t, "default"), J(t, "transform"), J(t, "refine");
43
43
  const e = t.ZodObject.prototype.deepPartial;
44
44
  t.ZodObject.prototype.deepPartial = function() {
45
- const s = this._def.shape(), i = e.apply(this), o = i._def.shape();
45
+ const a = this._def.shape(), i = e.apply(this), o = i._def.shape();
46
46
  return Object.entries(o).forEach(([d, u]) => {
47
47
  var l, m;
48
- u._def.openapi = (m = (l = s[d]) === null || l === void 0 ? void 0 : l._def) === null || m === void 0 ? void 0 : m.openapi;
48
+ u._def.openapi = (m = (l = a[d]) === null || l === void 0 ? void 0 : l._def) === null || m === void 0 ? void 0 : m.openapi;
49
49
  }), i._def.openapi = void 0, i;
50
50
  };
51
51
  const n = t.ZodObject.prototype.pick;
52
- t.ZodObject.prototype.pick = function(...s) {
53
- const i = n.apply(this, s);
52
+ t.ZodObject.prototype.pick = function(...a) {
53
+ const i = n.apply(this, a);
54
54
  return i._def.openapi = void 0, i;
55
55
  };
56
56
  const r = t.ZodObject.prototype.omit;
57
- t.ZodObject.prototype.omit = function(...s) {
58
- const i = r.apply(this, s);
57
+ t.ZodObject.prototype.omit = function(...a) {
58
+ const i = r.apply(this, a);
59
59
  return i._def.openapi = void 0, i;
60
60
  };
61
61
  }
62
62
  new Set(".\\+*[^]$()");
63
63
  var b;
64
64
  (function(t) {
65
- t.assertEqual = (s) => s;
66
- function e(s) {
65
+ t.assertEqual = (a) => a;
66
+ function e(a) {
67
67
  }
68
68
  t.assertIs = e;
69
- function n(s) {
69
+ function n(a) {
70
70
  throw new Error();
71
71
  }
72
- t.assertNever = n, t.arrayToEnum = (s) => {
72
+ t.assertNever = n, t.arrayToEnum = (a) => {
73
73
  const i = {};
74
- for (const o of s)
74
+ for (const o of a)
75
75
  i[o] = o;
76
76
  return i;
77
- }, t.getValidEnumValues = (s) => {
78
- const i = t.objectKeys(s).filter((d) => typeof s[s[d]] != "number"), o = {};
77
+ }, t.getValidEnumValues = (a) => {
78
+ const i = t.objectKeys(a).filter((d) => typeof a[a[d]] != "number"), o = {};
79
79
  for (const d of i)
80
- o[d] = s[d];
80
+ o[d] = a[d];
81
81
  return t.objectValues(o);
82
- }, t.objectValues = (s) => t.objectKeys(s).map(function(i) {
83
- return s[i];
84
- }), t.objectKeys = typeof Object.keys == "function" ? (s) => Object.keys(s) : (s) => {
82
+ }, t.objectValues = (a) => t.objectKeys(a).map(function(i) {
83
+ return a[i];
84
+ }), t.objectKeys = typeof Object.keys == "function" ? (a) => Object.keys(a) : (a) => {
85
85
  const i = [];
86
- for (const o in s)
87
- Object.prototype.hasOwnProperty.call(s, o) && i.push(o);
86
+ for (const o in a)
87
+ Object.prototype.hasOwnProperty.call(a, o) && i.push(o);
88
88
  return i;
89
- }, t.find = (s, i) => {
90
- for (const o of s)
89
+ }, t.find = (a, i) => {
90
+ for (const o of a)
91
91
  if (i(o))
92
92
  return o;
93
- }, t.isInteger = typeof Number.isInteger == "function" ? (s) => Number.isInteger(s) : (s) => typeof s == "number" && isFinite(s) && Math.floor(s) === s;
94
- function r(s, i = " | ") {
95
- return s.map((o) => typeof o == "string" ? `'${o}'` : o).join(i);
93
+ }, t.isInteger = typeof Number.isInteger == "function" ? (a) => Number.isInteger(a) : (a) => typeof a == "number" && isFinite(a) && Math.floor(a) === a;
94
+ function r(a, i = " | ") {
95
+ return a.map((o) => typeof o == "string" ? `'${o}'` : o).join(i);
96
96
  }
97
- t.joinValues = r, t.jsonStringifyReplacer = (s, i) => typeof i == "bigint" ? i.toString() : i;
97
+ t.joinValues = r, t.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
98
98
  })(b || (b = {}));
99
- var je;
99
+ var Ze;
100
100
  (function(t) {
101
101
  t.mergeShapes = (e, n) => ({
102
102
  ...e,
103
103
  ...n
104
104
  // second overwrites first
105
105
  });
106
- })(je || (je = {}));
106
+ })(Ze || (Ze = {}));
107
107
  const f = b.arrayToEnum([
108
108
  "string",
109
109
  "nan",
@@ -163,7 +163,7 @@ const f = b.arrayToEnum([
163
163
  "invalid_intersection_types",
164
164
  "not_multiple_of",
165
165
  "not_finite"
166
- ]), pt = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
166
+ ]), ft = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
167
167
  class T extends Error {
168
168
  constructor(e) {
169
169
  super(), this.issues = [], this.addIssue = (r) => {
@@ -180,14 +180,14 @@ class T extends Error {
180
180
  format(e) {
181
181
  const n = e || function(i) {
182
182
  return i.message;
183
- }, r = { _errors: [] }, s = (i) => {
183
+ }, r = { _errors: [] }, a = (i) => {
184
184
  for (const o of i.issues)
185
185
  if (o.code === "invalid_union")
186
- o.unionErrors.map(s);
186
+ o.unionErrors.map(a);
187
187
  else if (o.code === "invalid_return_type")
188
- s(o.returnTypeError);
188
+ a(o.returnTypeError);
189
189
  else if (o.code === "invalid_arguments")
190
- s(o.argumentsError);
190
+ a(o.argumentsError);
191
191
  else if (o.path.length === 0)
192
192
  r._errors.push(n(o));
193
193
  else {
@@ -198,7 +198,7 @@ class T extends Error {
198
198
  }
199
199
  }
200
200
  };
201
- return s(this), r;
201
+ return a(this), r;
202
202
  }
203
203
  static assert(e) {
204
204
  if (!(e instanceof T))
@@ -215,8 +215,8 @@ class T extends Error {
215
215
  }
216
216
  flatten(e = (n) => n.message) {
217
217
  const n = {}, r = [];
218
- for (const s of this.issues)
219
- s.path.length > 0 ? (n[s.path[0]] = n[s.path[0]] || [], n[s.path[0]].push(e(s))) : r.push(e(s));
218
+ for (const a of this.issues)
219
+ a.path.length > 0 ? (n[a.path[0]] = n[a.path[0]] || [], n[a.path[0]].push(e(a))) : r.push(e(a));
220
220
  return { formErrors: r, fieldErrors: n };
221
221
  }
222
222
  get formErrors() {
@@ -281,33 +281,33 @@ const H = (t, e) => {
281
281
  return { message: n };
282
282
  };
283
283
  let Be = H;
284
- function ft(t) {
284
+ function ht(t) {
285
285
  Be = t;
286
286
  }
287
287
  function he() {
288
288
  return Be;
289
289
  }
290
290
  const me = (t) => {
291
- const { data: e, path: n, errorMaps: r, issueData: s } = t, i = [...n, ...s.path || []], o = {
292
- ...s,
291
+ const { data: e, path: n, errorMaps: r, issueData: a } = t, i = [...n, ...a.path || []], o = {
292
+ ...a,
293
293
  path: i
294
294
  };
295
- if (s.message !== void 0)
295
+ if (a.message !== void 0)
296
296
  return {
297
- ...s,
297
+ ...a,
298
298
  path: i,
299
- message: s.message
299
+ message: a.message
300
300
  };
301
301
  let d = "";
302
302
  const u = r.filter((l) => !!l).slice().reverse();
303
303
  for (const l of u)
304
304
  d = l(o, { data: e, defaultError: d }).message;
305
305
  return {
306
- ...s,
306
+ ...a,
307
307
  path: i,
308
308
  message: d
309
309
  };
310
- }, ht = [];
310
+ }, mt = [];
311
311
  function p(t, e) {
312
312
  const n = he(), r = me({
313
313
  issueData: e,
@@ -319,7 +319,7 @@ function p(t, e) {
319
319
  n,
320
320
  n === H ? void 0 : H
321
321
  // then global default map
322
- ].filter((s) => !!s)
322
+ ].filter((a) => !!a)
323
323
  });
324
324
  t.common.issues.push(r);
325
325
  }
@@ -335,17 +335,17 @@ class w {
335
335
  }
336
336
  static mergeArray(e, n) {
337
337
  const r = [];
338
- for (const s of n) {
339
- if (s.status === "aborted")
338
+ for (const a of n) {
339
+ if (a.status === "aborted")
340
340
  return g;
341
- s.status === "dirty" && e.dirty(), r.push(s.value);
341
+ a.status === "dirty" && e.dirty(), r.push(a.value);
342
342
  }
343
343
  return { status: e.value, value: r };
344
344
  }
345
345
  static async mergeObjectAsync(e, n) {
346
346
  const r = [];
347
- for (const s of n) {
348
- const i = await s.key, o = await s.value;
347
+ for (const a of n) {
348
+ const i = await a.key, o = await a.value;
349
349
  r.push({
350
350
  key: i,
351
351
  value: o
@@ -355,11 +355,11 @@ class w {
355
355
  }
356
356
  static mergeObjectSync(e, n) {
357
357
  const r = {};
358
- for (const s of n) {
359
- const { key: i, value: o } = s;
358
+ for (const a of n) {
359
+ const { key: i, value: o } = a;
360
360
  if (i.status === "aborted" || o.status === "aborted")
361
361
  return g;
362
- i.status === "dirty" && e.dirty(), o.status === "dirty" && e.dirty(), i.value !== "__proto__" && (typeof o.value < "u" || s.alwaysSet) && (r[i.value] = o.value);
362
+ i.status === "dirty" && e.dirty(), o.status === "dirty" && e.dirty(), i.value !== "__proto__" && (typeof o.value < "u" || a.alwaysSet) && (r[i.value] = o.value);
363
363
  }
364
364
  return { status: e.value, value: r };
365
365
  }
@@ -371,8 +371,8 @@ function _e(t, e, n, r) {
371
371
  if (typeof e == "function" ? t !== e || !r : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
372
372
  return e.get(t);
373
373
  }
374
- function We(t, e, n, r, s) {
375
- if (typeof e == "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
374
+ function We(t, e, n, r, a) {
375
+ if (typeof e == "function" ? t !== e || !a : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
376
376
  return e.set(t, n), n;
377
377
  }
378
378
  var h;
@@ -380,9 +380,9 @@ var h;
380
380
  t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
381
381
  })(h || (h = {}));
382
382
  var F, X;
383
- class j {
384
- constructor(e, n, r, s) {
385
- this._cachedPath = [], this.parent = e, this.data = n, this._path = r, this._key = s;
383
+ class Z {
384
+ constructor(e, n, r, a) {
385
+ this._cachedPath = [], this.parent = e, this.data = n, this._path = r, this._key = a;
386
386
  }
387
387
  get path() {
388
388
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
@@ -406,14 +406,14 @@ const Le = (t, e) => {
406
406
  function y(t) {
407
407
  if (!t)
408
408
  return {};
409
- const { errorMap: e, invalid_type_error: n, required_error: r, description: s } = t;
409
+ const { errorMap: e, invalid_type_error: n, required_error: r, description: a } = t;
410
410
  if (e && (n || r))
411
411
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
412
- return e ? { errorMap: e, description: s } : { errorMap: (o, d) => {
412
+ return e ? { errorMap: e, description: a } : { errorMap: (o, d) => {
413
413
  var u, l;
414
414
  const { message: m } = t;
415
415
  return o.code === "invalid_enum_value" ? { message: m ?? d.defaultError } : typeof d.data > "u" ? { message: (u = m ?? r) !== null && u !== void 0 ? u : d.defaultError } : o.code !== "invalid_type" ? { message: d.defaultError } : { message: (l = m ?? n) !== null && l !== void 0 ? l : d.defaultError };
416
- }, description: s };
416
+ }, description: a };
417
417
  }
418
418
  class v {
419
419
  constructor(e) {
@@ -466,7 +466,7 @@ class v {
466
466
  }
467
467
  safeParse(e, n) {
468
468
  var r;
469
- const s = {
469
+ const a = {
470
470
  common: {
471
471
  issues: [],
472
472
  async: (r = n == null ? void 0 : n.async) !== null && r !== void 0 ? r : !1,
@@ -477,8 +477,8 @@ class v {
477
477
  parent: null,
478
478
  data: e,
479
479
  parsedType: A(e)
480
- }, i = this._parseSync({ data: e, path: s.path, parent: s });
481
- return Le(s, i);
480
+ }, i = this._parseSync({ data: e, path: a.path, parent: a });
481
+ return Le(a, i);
482
482
  }
483
483
  async parseAsync(e, n) {
484
484
  const r = await this.safeParseAsync(e, n);
@@ -498,21 +498,21 @@ class v {
498
498
  parent: null,
499
499
  data: e,
500
500
  parsedType: A(e)
501
- }, s = this._parse({ data: e, path: r.path, parent: r }), i = await (ee(s) ? s : Promise.resolve(s));
501
+ }, a = this._parse({ data: e, path: r.path, parent: r }), i = await (ee(a) ? a : Promise.resolve(a));
502
502
  return Le(r, i);
503
503
  }
504
504
  refine(e, n) {
505
- const r = (s) => typeof n == "string" || typeof n > "u" ? { message: n } : typeof n == "function" ? n(s) : n;
506
- return this._refinement((s, i) => {
507
- const o = e(s), d = () => i.addIssue({
505
+ const r = (a) => typeof n == "string" || typeof n > "u" ? { message: n } : typeof n == "function" ? n(a) : n;
506
+ return this._refinement((a, i) => {
507
+ const o = e(a), d = () => i.addIssue({
508
508
  code: c.custom,
509
- ...r(s)
509
+ ...r(a)
510
510
  });
511
511
  return typeof Promise < "u" && o instanceof Promise ? o.then((u) => u ? !0 : (d(), !1)) : o ? !0 : (d(), !1);
512
512
  });
513
513
  }
514
514
  refinement(e, n) {
515
- return this._refinement((r, s) => e(r) ? !0 : (s.addIssue(typeof n == "function" ? n(r, s) : n), !1));
515
+ return this._refinement((r, a) => e(r) ? !0 : (a.addIssue(typeof n == "function" ? n(r, a) : n), !1));
516
516
  }
517
517
  _refinement(e) {
518
518
  return new C({
@@ -525,7 +525,7 @@ class v {
525
525
  return this._refinement(e);
526
526
  }
527
527
  optional() {
528
- return Z.create(this, this._def);
528
+ return j.create(this, this._def);
529
529
  }
530
530
  nullable() {
531
531
  return D.create(this, this._def);
@@ -537,7 +537,7 @@ class v {
537
537
  return E.create(this, this._def);
538
538
  }
539
539
  promise() {
540
- return K.create(this, this._def);
540
+ return Y.create(this, this._def);
541
541
  }
542
542
  or(e) {
543
543
  return se.create([this, e], this._def);
@@ -598,14 +598,14 @@ class v {
598
598
  return this.safeParse(null).success;
599
599
  }
600
600
  }
601
- const mt = /^c[^\s-]{8,}$/i, _t = /^[0-9a-z]+$/, gt = /^[0-9A-HJKMNP-TV-Z]{26}$/, yt = /^[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, vt = /^[a-z0-9_-]{21}$/i, bt = /^[-+]?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)?)??$/, kt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, xt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
602
- let Ze;
603
- const wt = /^(?:(?: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])$/, St = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Tt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, qe = "((\\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])))", Ot = new RegExp(`^${qe}$`);
601
+ const _t = /^c[^\s-]{8,}$/i, gt = /^[0-9a-z]+$/, yt = /^[0-9A-HJKMNP-TV-Z]{26}$/, vt = /^[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, bt = /^[a-z0-9_-]{21}$/i, kt = /^[-+]?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)?)??$/, xt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, wt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
602
+ let je;
603
+ const St = /^(?:(?: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])$/, Tt = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Ot = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, qe = "((\\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])))", Et = new RegExp(`^${qe}$`);
604
604
  function Ge(t) {
605
605
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
606
606
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
607
607
  }
608
- function Et(t) {
608
+ function Ct(t) {
609
609
  return new RegExp(`^${Ge(t)}$`);
610
610
  }
611
611
  function He(t) {
@@ -613,8 +613,8 @@ function He(t) {
613
613
  const n = [];
614
614
  return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
615
615
  }
616
- function Ct(t, e) {
617
- return !!((e === "v4" || !e) && wt.test(t) || (e === "v6" || !e) && St.test(t));
616
+ function jt(t, e) {
617
+ return !!((e === "v4" || !e) && St.test(t) || (e === "v6" || !e) && Tt.test(t));
618
618
  }
619
619
  class O extends v {
620
620
  _parse(e) {
@@ -627,10 +627,10 @@ class O extends v {
627
627
  }), g;
628
628
  }
629
629
  const r = new w();
630
- let s;
630
+ let a;
631
631
  for (const i of this._def.checks)
632
632
  if (i.kind === "min")
633
- e.data.length < i.value && (s = this._getOrReturnCtx(e, s), p(s, {
633
+ e.data.length < i.value && (a = this._getOrReturnCtx(e, a), p(a, {
634
634
  code: c.too_small,
635
635
  minimum: i.value,
636
636
  type: "string",
@@ -639,7 +639,7 @@ class O extends v {
639
639
  message: i.message
640
640
  }), r.dirty());
641
641
  else if (i.kind === "max")
642
- e.data.length > i.value && (s = this._getOrReturnCtx(e, s), p(s, {
642
+ e.data.length > i.value && (a = this._getOrReturnCtx(e, a), p(a, {
643
643
  code: c.too_big,
644
644
  maximum: i.value,
645
645
  type: "string",
@@ -649,14 +649,14 @@ class O extends v {
649
649
  }), r.dirty());
650
650
  else if (i.kind === "length") {
651
651
  const o = e.data.length > i.value, d = e.data.length < i.value;
652
- (o || d) && (s = this._getOrReturnCtx(e, s), o ? p(s, {
652
+ (o || d) && (a = this._getOrReturnCtx(e, a), o ? p(a, {
653
653
  code: c.too_big,
654
654
  maximum: i.value,
655
655
  type: "string",
656
656
  inclusive: !0,
657
657
  exact: !0,
658
658
  message: i.message
659
- }) : d && p(s, {
659
+ }) : d && p(a, {
660
660
  code: c.too_small,
661
661
  minimum: i.value,
662
662
  type: "string",
@@ -665,43 +665,43 @@ class O extends v {
665
665
  message: i.message
666
666
  }), r.dirty());
667
667
  } else if (i.kind === "email")
668
- kt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
668
+ xt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
669
669
  validation: "email",
670
670
  code: c.invalid_string,
671
671
  message: i.message
672
672
  }), r.dirty());
673
673
  else if (i.kind === "emoji")
674
- Ze || (Ze = new RegExp(xt, "u")), Ze.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
674
+ je || (je = new RegExp(wt, "u")), je.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
675
675
  validation: "emoji",
676
676
  code: c.invalid_string,
677
677
  message: i.message
678
678
  }), r.dirty());
679
679
  else if (i.kind === "uuid")
680
- yt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
680
+ vt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
681
681
  validation: "uuid",
682
682
  code: c.invalid_string,
683
683
  message: i.message
684
684
  }), r.dirty());
685
685
  else if (i.kind === "nanoid")
686
- vt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
686
+ bt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
687
687
  validation: "nanoid",
688
688
  code: c.invalid_string,
689
689
  message: i.message
690
690
  }), r.dirty());
691
691
  else if (i.kind === "cuid")
692
- mt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
692
+ _t.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
693
693
  validation: "cuid",
694
694
  code: c.invalid_string,
695
695
  message: i.message
696
696
  }), r.dirty());
697
697
  else if (i.kind === "cuid2")
698
- _t.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
698
+ gt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
699
699
  validation: "cuid2",
700
700
  code: c.invalid_string,
701
701
  message: i.message
702
702
  }), r.dirty());
703
703
  else if (i.kind === "ulid")
704
- gt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
704
+ yt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
705
705
  validation: "ulid",
706
706
  code: c.invalid_string,
707
707
  message: i.message
@@ -710,49 +710,49 @@ class O extends v {
710
710
  try {
711
711
  new URL(e.data);
712
712
  } catch {
713
- s = this._getOrReturnCtx(e, s), p(s, {
713
+ a = this._getOrReturnCtx(e, a), p(a, {
714
714
  validation: "url",
715
715
  code: c.invalid_string,
716
716
  message: i.message
717
717
  }), r.dirty();
718
718
  }
719
- else i.kind === "regex" ? (i.regex.lastIndex = 0, i.regex.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
719
+ else i.kind === "regex" ? (i.regex.lastIndex = 0, i.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
720
720
  validation: "regex",
721
721
  code: c.invalid_string,
722
722
  message: i.message
723
- }), r.dirty())) : i.kind === "trim" ? e.data = e.data.trim() : i.kind === "includes" ? e.data.includes(i.value, i.position) || (s = this._getOrReturnCtx(e, s), p(s, {
723
+ }), r.dirty())) : i.kind === "trim" ? e.data = e.data.trim() : i.kind === "includes" ? e.data.includes(i.value, i.position) || (a = this._getOrReturnCtx(e, a), p(a, {
724
724
  code: c.invalid_string,
725
725
  validation: { includes: i.value, position: i.position },
726
726
  message: i.message
727
- }), r.dirty()) : i.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : i.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : i.kind === "startsWith" ? e.data.startsWith(i.value) || (s = this._getOrReturnCtx(e, s), p(s, {
727
+ }), r.dirty()) : i.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : i.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : i.kind === "startsWith" ? e.data.startsWith(i.value) || (a = this._getOrReturnCtx(e, a), p(a, {
728
728
  code: c.invalid_string,
729
729
  validation: { startsWith: i.value },
730
730
  message: i.message
731
- }), r.dirty()) : i.kind === "endsWith" ? e.data.endsWith(i.value) || (s = this._getOrReturnCtx(e, s), p(s, {
731
+ }), r.dirty()) : i.kind === "endsWith" ? e.data.endsWith(i.value) || (a = this._getOrReturnCtx(e, a), p(a, {
732
732
  code: c.invalid_string,
733
733
  validation: { endsWith: i.value },
734
734
  message: i.message
735
- }), r.dirty()) : i.kind === "datetime" ? He(i).test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
735
+ }), r.dirty()) : i.kind === "datetime" ? He(i).test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
736
736
  code: c.invalid_string,
737
737
  validation: "datetime",
738
738
  message: i.message
739
- }), r.dirty()) : i.kind === "date" ? Ot.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
739
+ }), r.dirty()) : i.kind === "date" ? Et.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
740
740
  code: c.invalid_string,
741
741
  validation: "date",
742
742
  message: i.message
743
- }), r.dirty()) : i.kind === "time" ? Et(i).test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
743
+ }), r.dirty()) : i.kind === "time" ? Ct(i).test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
744
744
  code: c.invalid_string,
745
745
  validation: "time",
746
746
  message: i.message
747
- }), r.dirty()) : i.kind === "duration" ? bt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
747
+ }), r.dirty()) : i.kind === "duration" ? kt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
748
748
  validation: "duration",
749
749
  code: c.invalid_string,
750
750
  message: i.message
751
- }), r.dirty()) : i.kind === "ip" ? Ct(e.data, i.version) || (s = this._getOrReturnCtx(e, s), p(s, {
751
+ }), r.dirty()) : i.kind === "ip" ? jt(e.data, i.version) || (a = this._getOrReturnCtx(e, a), p(a, {
752
752
  validation: "ip",
753
753
  code: c.invalid_string,
754
754
  message: i.message
755
- }), r.dirty()) : i.kind === "base64" ? Tt.test(e.data) || (s = this._getOrReturnCtx(e, s), p(s, {
755
+ }), r.dirty()) : i.kind === "base64" ? Ot.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
756
756
  validation: "base64",
757
757
  code: c.invalid_string,
758
758
  message: i.message
@@ -760,7 +760,7 @@ class O extends v {
760
760
  return { status: r.value, value: e.data };
761
761
  }
762
762
  _regex(e, n, r) {
763
- return this.refinement((s) => e.test(s), {
763
+ return this.refinement((a) => e.test(a), {
764
764
  validation: n,
765
765
  code: c.invalid_string,
766
766
  ...h.errToObj(r)
@@ -975,8 +975,8 @@ O.create = (t) => {
975
975
  });
976
976
  };
977
977
  function Zt(t, e) {
978
- const n = (t.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, s = n > r ? n : r, i = parseInt(t.toFixed(s).replace(".", "")), o = parseInt(e.toFixed(s).replace(".", ""));
979
- return i % o / Math.pow(10, s);
978
+ const n = (t.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, a = n > r ? n : r, i = parseInt(t.toFixed(a).replace(".", "")), o = parseInt(e.toFixed(a).replace(".", ""));
979
+ return i % o / Math.pow(10, a);
980
980
  }
981
981
  class P extends v {
982
982
  constructor() {
@@ -992,36 +992,36 @@ class P extends v {
992
992
  }), g;
993
993
  }
994
994
  let r;
995
- const s = new w();
995
+ const a = new w();
996
996
  for (const i of this._def.checks)
997
997
  i.kind === "int" ? b.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), p(r, {
998
998
  code: c.invalid_type,
999
999
  expected: "integer",
1000
1000
  received: "float",
1001
1001
  message: i.message
1002
- }), s.dirty()) : i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1002
+ }), a.dirty()) : i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1003
1003
  code: c.too_small,
1004
1004
  minimum: i.value,
1005
1005
  type: "number",
1006
1006
  inclusive: i.inclusive,
1007
1007
  exact: !1,
1008
1008
  message: i.message
1009
- }), s.dirty()) : i.kind === "max" ? (i.inclusive ? e.data > i.value : e.data >= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1009
+ }), a.dirty()) : i.kind === "max" ? (i.inclusive ? e.data > i.value : e.data >= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1010
1010
  code: c.too_big,
1011
1011
  maximum: i.value,
1012
1012
  type: "number",
1013
1013
  inclusive: i.inclusive,
1014
1014
  exact: !1,
1015
1015
  message: i.message
1016
- }), s.dirty()) : i.kind === "multipleOf" ? Zt(e.data, i.value) !== 0 && (r = this._getOrReturnCtx(e, r), p(r, {
1016
+ }), a.dirty()) : i.kind === "multipleOf" ? Zt(e.data, i.value) !== 0 && (r = this._getOrReturnCtx(e, r), p(r, {
1017
1017
  code: c.not_multiple_of,
1018
1018
  multipleOf: i.value,
1019
1019
  message: i.message
1020
- }), s.dirty()) : i.kind === "finite" ? Number.isFinite(e.data) || (r = this._getOrReturnCtx(e, r), p(r, {
1020
+ }), a.dirty()) : i.kind === "finite" ? Number.isFinite(e.data) || (r = this._getOrReturnCtx(e, r), p(r, {
1021
1021
  code: c.not_finite,
1022
1022
  message: i.message
1023
- }), s.dirty()) : b.assertNever(i);
1024
- return { status: s.value, value: e.data };
1023
+ }), a.dirty()) : b.assertNever(i);
1024
+ return { status: a.value, value: e.data };
1025
1025
  }
1026
1026
  gte(e, n) {
1027
1027
  return this.setLimit("min", e, !0, h.toString(n));
@@ -1035,7 +1035,7 @@ class P extends v {
1035
1035
  lt(e, n) {
1036
1036
  return this.setLimit("max", e, !1, h.toString(n));
1037
1037
  }
1038
- setLimit(e, n, r, s) {
1038
+ setLimit(e, n, r, a) {
1039
1039
  return new P({
1040
1040
  ...this._def,
1041
1041
  checks: [
@@ -1044,7 +1044,7 @@ class P extends v {
1044
1044
  kind: e,
1045
1045
  value: n,
1046
1046
  inclusive: r,
1047
- message: h.toString(s)
1047
+ message: h.toString(a)
1048
1048
  }
1049
1049
  ]
1050
1050
  });
@@ -1164,7 +1164,7 @@ class M extends v {
1164
1164
  }), g;
1165
1165
  }
1166
1166
  let r;
1167
- const s = new w();
1167
+ const a = new w();
1168
1168
  for (const i of this._def.checks)
1169
1169
  i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1170
1170
  code: c.too_small,
@@ -1172,18 +1172,18 @@ class M extends v {
1172
1172
  minimum: i.value,
1173
1173
  inclusive: i.inclusive,
1174
1174
  message: i.message
1175
- }), s.dirty()) : i.kind === "max" ? (i.inclusive ? e.data > i.value : e.data >= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1175
+ }), a.dirty()) : i.kind === "max" ? (i.inclusive ? e.data > i.value : e.data >= i.value) && (r = this._getOrReturnCtx(e, r), p(r, {
1176
1176
  code: c.too_big,
1177
1177
  type: "bigint",
1178
1178
  maximum: i.value,
1179
1179
  inclusive: i.inclusive,
1180
1180
  message: i.message
1181
- }), s.dirty()) : i.kind === "multipleOf" ? e.data % i.value !== BigInt(0) && (r = this._getOrReturnCtx(e, r), p(r, {
1181
+ }), a.dirty()) : i.kind === "multipleOf" ? e.data % i.value !== BigInt(0) && (r = this._getOrReturnCtx(e, r), p(r, {
1182
1182
  code: c.not_multiple_of,
1183
1183
  multipleOf: i.value,
1184
1184
  message: i.message
1185
- }), s.dirty()) : b.assertNever(i);
1186
- return { status: s.value, value: e.data };
1185
+ }), a.dirty()) : b.assertNever(i);
1186
+ return { status: a.value, value: e.data };
1187
1187
  }
1188
1188
  gte(e, n) {
1189
1189
  return this.setLimit("min", e, !0, h.toString(n));
@@ -1197,7 +1197,7 @@ class M extends v {
1197
1197
  lt(e, n) {
1198
1198
  return this.setLimit("max", e, !1, h.toString(n));
1199
1199
  }
1200
- setLimit(e, n, r, s) {
1200
+ setLimit(e, n, r, a) {
1201
1201
  return new M({
1202
1202
  ...this._def,
1203
1203
  checks: [
@@ -1206,7 +1206,7 @@ class M extends v {
1206
1206
  kind: e,
1207
1207
  value: n,
1208
1208
  inclusive: r,
1209
- message: h.toString(s)
1209
+ message: h.toString(a)
1210
1210
  }
1211
1211
  ]
1212
1212
  });
@@ -1313,16 +1313,16 @@ class V extends v {
1313
1313
  }), g;
1314
1314
  }
1315
1315
  const r = new w();
1316
- let s;
1316
+ let a;
1317
1317
  for (const i of this._def.checks)
1318
- i.kind === "min" ? e.data.getTime() < i.value && (s = this._getOrReturnCtx(e, s), p(s, {
1318
+ i.kind === "min" ? e.data.getTime() < i.value && (a = this._getOrReturnCtx(e, a), p(a, {
1319
1319
  code: c.too_small,
1320
1320
  message: i.message,
1321
1321
  inclusive: !0,
1322
1322
  exact: !1,
1323
1323
  minimum: i.value,
1324
1324
  type: "date"
1325
- }), r.dirty()) : i.kind === "max" ? e.data.getTime() > i.value && (s = this._getOrReturnCtx(e, s), p(s, {
1325
+ }), r.dirty()) : i.kind === "max" ? e.data.getTime() > i.value && (a = this._getOrReturnCtx(e, a), p(a, {
1326
1326
  code: c.too_big,
1327
1327
  message: i.message,
1328
1328
  inclusive: !0,
@@ -1425,7 +1425,7 @@ re.create = (t) => new re({
1425
1425
  typeName: _.ZodNull,
1426
1426
  ...y(t)
1427
1427
  });
1428
- class Y extends v {
1428
+ class K extends v {
1429
1429
  constructor() {
1430
1430
  super(...arguments), this._any = !0;
1431
1431
  }
@@ -1433,7 +1433,7 @@ class Y extends v {
1433
1433
  return S(e.data);
1434
1434
  }
1435
1435
  }
1436
- Y.create = (t) => new Y({
1436
+ K.create = (t) => new K({
1437
1437
  typeName: _.ZodAny,
1438
1438
  ...y(t)
1439
1439
  });
@@ -1482,42 +1482,42 @@ ye.create = (t) => new ye({
1482
1482
  });
1483
1483
  class E extends v {
1484
1484
  _parse(e) {
1485
- const { ctx: n, status: r } = this._processInputParams(e), s = this._def;
1485
+ const { ctx: n, status: r } = this._processInputParams(e), a = this._def;
1486
1486
  if (n.parsedType !== f.array)
1487
1487
  return p(n, {
1488
1488
  code: c.invalid_type,
1489
1489
  expected: f.array,
1490
1490
  received: n.parsedType
1491
1491
  }), g;
1492
- if (s.exactLength !== null) {
1493
- const o = n.data.length > s.exactLength.value, d = n.data.length < s.exactLength.value;
1492
+ if (a.exactLength !== null) {
1493
+ const o = n.data.length > a.exactLength.value, d = n.data.length < a.exactLength.value;
1494
1494
  (o || d) && (p(n, {
1495
1495
  code: o ? c.too_big : c.too_small,
1496
- minimum: d ? s.exactLength.value : void 0,
1497
- maximum: o ? s.exactLength.value : void 0,
1496
+ minimum: d ? a.exactLength.value : void 0,
1497
+ maximum: o ? a.exactLength.value : void 0,
1498
1498
  type: "array",
1499
1499
  inclusive: !0,
1500
1500
  exact: !0,
1501
- message: s.exactLength.message
1501
+ message: a.exactLength.message
1502
1502
  }), r.dirty());
1503
1503
  }
1504
- if (s.minLength !== null && n.data.length < s.minLength.value && (p(n, {
1504
+ if (a.minLength !== null && n.data.length < a.minLength.value && (p(n, {
1505
1505
  code: c.too_small,
1506
- minimum: s.minLength.value,
1506
+ minimum: a.minLength.value,
1507
1507
  type: "array",
1508
1508
  inclusive: !0,
1509
1509
  exact: !1,
1510
- message: s.minLength.message
1511
- }), r.dirty()), s.maxLength !== null && n.data.length > s.maxLength.value && (p(n, {
1510
+ message: a.minLength.message
1511
+ }), r.dirty()), a.maxLength !== null && n.data.length > a.maxLength.value && (p(n, {
1512
1512
  code: c.too_big,
1513
- maximum: s.maxLength.value,
1513
+ maximum: a.maxLength.value,
1514
1514
  type: "array",
1515
1515
  inclusive: !0,
1516
1516
  exact: !1,
1517
- message: s.maxLength.message
1517
+ message: a.maxLength.message
1518
1518
  }), r.dirty()), n.common.async)
1519
- return Promise.all([...n.data].map((o, d) => s.type._parseAsync(new j(n, o, n.path, d)))).then((o) => w.mergeArray(r, o));
1520
- const i = [...n.data].map((o, d) => s.type._parseSync(new j(n, o, n.path, d)));
1519
+ return Promise.all([...n.data].map((o, d) => a.type._parseAsync(new Z(n, o, n.path, d)))).then((o) => w.mergeArray(r, o));
1520
+ const i = [...n.data].map((o, d) => a.type._parseSync(new Z(n, o, n.path, d)));
1521
1521
  return w.mergeArray(r, i);
1522
1522
  }
1523
1523
  get element() {
@@ -1558,7 +1558,7 @@ function W(t) {
1558
1558
  const e = {};
1559
1559
  for (const n in t.shape) {
1560
1560
  const r = t.shape[n];
1561
- e[n] = Z.create(W(r));
1561
+ e[n] = j.create(W(r));
1562
1562
  }
1563
1563
  return new k({
1564
1564
  ...t._def,
@@ -1567,7 +1567,7 @@ function W(t) {
1567
1567
  } else return t instanceof E ? new E({
1568
1568
  ...t._def,
1569
1569
  type: W(t.element)
1570
- }) : t instanceof Z ? Z.create(W(t.unwrap())) : t instanceof D ? D.create(W(t.unwrap())) : t instanceof N ? N.create(t.items.map((e) => W(e))) : t;
1570
+ }) : t instanceof j ? j.create(W(t.unwrap())) : t instanceof D ? D.create(W(t.unwrap())) : t instanceof N ? N.create(t.items.map((e) => W(e))) : t;
1571
1571
  }
1572
1572
  class k extends v {
1573
1573
  constructor() {
@@ -1588,17 +1588,17 @@ class k extends v {
1588
1588
  received: l.parsedType
1589
1589
  }), g;
1590
1590
  }
1591
- const { status: r, ctx: s } = this._processInputParams(e), { shape: i, keys: o } = this._getCached(), d = [];
1591
+ const { status: r, ctx: a } = this._processInputParams(e), { shape: i, keys: o } = this._getCached(), d = [];
1592
1592
  if (!(this._def.catchall instanceof R && this._def.unknownKeys === "strip"))
1593
- for (const l in s.data)
1593
+ for (const l in a.data)
1594
1594
  o.includes(l) || d.push(l);
1595
1595
  const u = [];
1596
1596
  for (const l of o) {
1597
- const m = i[l], x = s.data[l];
1597
+ const m = i[l], x = a.data[l];
1598
1598
  u.push({
1599
1599
  key: { status: "valid", value: l },
1600
- value: m._parse(new j(s, x, s.path, l)),
1601
- alwaysSet: l in s.data
1600
+ value: m._parse(new Z(a, x, a.path, l)),
1601
+ alwaysSet: l in a.data
1602
1602
  });
1603
1603
  }
1604
1604
  if (this._def.catchall instanceof R) {
@@ -1607,10 +1607,10 @@ class k extends v {
1607
1607
  for (const m of d)
1608
1608
  u.push({
1609
1609
  key: { status: "valid", value: m },
1610
- value: { status: "valid", value: s.data[m] }
1610
+ value: { status: "valid", value: a.data[m] }
1611
1611
  });
1612
1612
  else if (l === "strict")
1613
- d.length > 0 && (p(s, {
1613
+ d.length > 0 && (p(a, {
1614
1614
  code: c.unrecognized_keys,
1615
1615
  keys: d
1616
1616
  }), r.dirty());
@@ -1618,18 +1618,18 @@ class k extends v {
1618
1618
  } else {
1619
1619
  const l = this._def.catchall;
1620
1620
  for (const m of d) {
1621
- const x = s.data[m];
1621
+ const x = a.data[m];
1622
1622
  u.push({
1623
1623
  key: { status: "valid", value: m },
1624
1624
  value: l._parse(
1625
- new j(s, x, s.path, m)
1625
+ new Z(a, x, a.path, m)
1626
1626
  //, ctx.child(key), value, getParsedType(value)
1627
1627
  ),
1628
- alwaysSet: m in s.data
1628
+ alwaysSet: m in a.data
1629
1629
  });
1630
1630
  }
1631
1631
  }
1632
- return s.common.async ? Promise.resolve().then(async () => {
1632
+ return a.common.async ? Promise.resolve().then(async () => {
1633
1633
  const l = [];
1634
1634
  for (const m of u) {
1635
1635
  const x = await m.key, z = await m.value;
@@ -1651,8 +1651,8 @@ class k extends v {
1651
1651
  unknownKeys: "strict",
1652
1652
  ...e !== void 0 ? {
1653
1653
  errorMap: (n, r) => {
1654
- var s, i, o, d;
1655
- const u = (o = (i = (s = this._def).errorMap) === null || i === void 0 ? void 0 : i.call(s, n, r).message) !== null && o !== void 0 ? o : r.defaultError;
1654
+ var a, i, o, d;
1655
+ const u = (o = (i = (a = this._def).errorMap) === null || i === void 0 ? void 0 : i.call(a, n, r).message) !== null && o !== void 0 ? o : r.defaultError;
1656
1656
  return n.code === "unrecognized_keys" ? {
1657
1657
  message: (d = h.errToObj(e).message) !== null && d !== void 0 ? d : u
1658
1658
  } : {
@@ -1808,8 +1808,8 @@ class k extends v {
1808
1808
  partial(e) {
1809
1809
  const n = {};
1810
1810
  return b.objectKeys(this.shape).forEach((r) => {
1811
- const s = this.shape[r];
1812
- e && !e[r] ? n[r] = s : n[r] = s.optional();
1811
+ const a = this.shape[r];
1812
+ e && !e[r] ? n[r] = a : n[r] = a.optional();
1813
1813
  }), new k({
1814
1814
  ...this._def,
1815
1815
  shape: () => n
@@ -1822,7 +1822,7 @@ class k extends v {
1822
1822
  n[r] = this.shape[r];
1823
1823
  else {
1824
1824
  let i = this.shape[r];
1825
- for (; i instanceof Z; )
1825
+ for (; i instanceof j; )
1826
1826
  i = i._def.innerType;
1827
1827
  n[r] = i;
1828
1828
  }
@@ -1832,7 +1832,7 @@ class k extends v {
1832
1832
  });
1833
1833
  }
1834
1834
  keyof() {
1835
- return Ye(b.objectKeys(this.shape));
1835
+ return Ke(b.objectKeys(this.shape));
1836
1836
  }
1837
1837
  }
1838
1838
  k.create = (t, e) => new k({
@@ -1859,7 +1859,7 @@ k.lazycreate = (t, e) => new k({
1859
1859
  class se extends v {
1860
1860
  _parse(e) {
1861
1861
  const { ctx: n } = this._processInputParams(e), r = this._def.options;
1862
- function s(i) {
1862
+ function a(i) {
1863
1863
  for (const d of i)
1864
1864
  if (d.result.status === "valid")
1865
1865
  return d.result;
@@ -1890,7 +1890,7 @@ class se extends v {
1890
1890
  }),
1891
1891
  ctx: o
1892
1892
  };
1893
- })).then(s);
1893
+ })).then(a);
1894
1894
  {
1895
1895
  let i;
1896
1896
  const o = [];
@@ -1929,7 +1929,7 @@ se.create = (t, e) => new se({
1929
1929
  typeName: _.ZodUnion,
1930
1930
  ...y(e)
1931
1931
  });
1932
- const I = (t) => t instanceof oe ? I(t.schema) : t instanceof C ? I(t.innerType()) : t instanceof de ? [t.value] : t instanceof $ ? t.options : t instanceof ce ? b.objectValues(t.enum) : t instanceof le ? I(t._def.innerType) : t instanceof ne ? [void 0] : t instanceof re ? [null] : t instanceof Z ? [void 0, ...I(t.unwrap())] : t instanceof D ? [null, ...I(t.unwrap())] : t instanceof Ae || t instanceof pe ? I(t.unwrap()) : t instanceof ue ? I(t._def.innerType) : [];
1932
+ const I = (t) => t instanceof oe ? I(t.schema) : t instanceof C ? I(t.innerType()) : t instanceof de ? [t.value] : t instanceof $ ? t.options : t instanceof ce ? b.objectValues(t.enum) : t instanceof le ? I(t._def.innerType) : t instanceof ne ? [void 0] : t instanceof re ? [null] : t instanceof j ? [void 0, ...I(t.unwrap())] : t instanceof D ? [null, ...I(t.unwrap())] : t instanceof Ae || t instanceof pe ? I(t.unwrap()) : t instanceof ue ? I(t._def.innerType) : [];
1933
1933
  class ke extends v {
1934
1934
  _parse(e) {
1935
1935
  const { ctx: n } = this._processInputParams(e);
@@ -1939,7 +1939,7 @@ class ke extends v {
1939
1939
  expected: f.object,
1940
1940
  received: n.parsedType
1941
1941
  }), g;
1942
- const r = this.discriminator, s = n.data[r], i = this.optionsMap.get(s);
1942
+ const r = this.discriminator, a = n.data[r], i = this.optionsMap.get(a);
1943
1943
  return i ? n.common.async ? i._parseAsync({
1944
1944
  data: n.data,
1945
1945
  path: n.path,
@@ -1972,22 +1972,22 @@ class ke extends v {
1972
1972
  * @param params
1973
1973
  */
1974
1974
  static create(e, n, r) {
1975
- const s = /* @__PURE__ */ new Map();
1975
+ const a = /* @__PURE__ */ new Map();
1976
1976
  for (const i of n) {
1977
1977
  const o = I(i.shape[e]);
1978
1978
  if (!o.length)
1979
1979
  throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
1980
1980
  for (const d of o) {
1981
- if (s.has(d))
1981
+ if (a.has(d))
1982
1982
  throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);
1983
- s.set(d, i);
1983
+ a.set(d, i);
1984
1984
  }
1985
1985
  }
1986
1986
  return new ke({
1987
1987
  typeName: _.ZodDiscriminatedUnion,
1988
1988
  discriminator: e,
1989
1989
  options: n,
1990
- optionsMap: s,
1990
+ optionsMap: a,
1991
1991
  ...y(r)
1992
1992
  });
1993
1993
  }
@@ -1997,7 +1997,7 @@ function Re(t, e) {
1997
1997
  if (t === e)
1998
1998
  return { valid: !0, data: t };
1999
1999
  if (n === f.object && r === f.object) {
2000
- const s = b.objectKeys(e), i = b.objectKeys(t).filter((d) => s.indexOf(d) !== -1), o = { ...t, ...e };
2000
+ const a = b.objectKeys(e), i = b.objectKeys(t).filter((d) => a.indexOf(d) !== -1), o = { ...t, ...e };
2001
2001
  for (const d of i) {
2002
2002
  const u = Re(t[d], e[d]);
2003
2003
  if (!u.valid)
@@ -2008,19 +2008,19 @@ function Re(t, e) {
2008
2008
  } else if (n === f.array && r === f.array) {
2009
2009
  if (t.length !== e.length)
2010
2010
  return { valid: !1 };
2011
- const s = [];
2011
+ const a = [];
2012
2012
  for (let i = 0; i < t.length; i++) {
2013
2013
  const o = t[i], d = e[i], u = Re(o, d);
2014
2014
  if (!u.valid)
2015
2015
  return { valid: !1 };
2016
- s.push(u.data);
2016
+ a.push(u.data);
2017
2017
  }
2018
- return { valid: !0, data: s };
2018
+ return { valid: !0, data: a };
2019
2019
  } else return n === f.date && r === f.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
2020
2020
  }
2021
2021
  class ae extends v {
2022
2022
  _parse(e) {
2023
- const { status: n, ctx: r } = this._processInputParams(e), s = (i, o) => {
2023
+ const { status: n, ctx: r } = this._processInputParams(e), a = (i, o) => {
2024
2024
  if (Ne(i) || Ne(o))
2025
2025
  return g;
2026
2026
  const d = Re(i.value, o.value);
@@ -2039,7 +2039,7 @@ class ae extends v {
2039
2039
  path: r.path,
2040
2040
  parent: r
2041
2041
  })
2042
- ]).then(([i, o]) => s(i, o)) : s(this._def.left._parseSync({
2042
+ ]).then(([i, o]) => a(i, o)) : a(this._def.left._parseSync({
2043
2043
  data: r.data,
2044
2044
  path: r.path,
2045
2045
  parent: r
@@ -2082,7 +2082,7 @@ class N extends v {
2082
2082
  }), n.dirty());
2083
2083
  const i = [...r.data].map((o, d) => {
2084
2084
  const u = this._def.items[d] || this._def.rest;
2085
- return u ? u._parse(new j(r, o, r.path, d)) : null;
2085
+ return u ? u._parse(new Z(r, o, r.path, d)) : null;
2086
2086
  }).filter((o) => !!o);
2087
2087
  return r.common.async ? Promise.all(i).then((o) => w.mergeArray(n, o)) : w.mergeArray(n, i);
2088
2088
  }
@@ -2121,14 +2121,14 @@ class ie extends v {
2121
2121
  expected: f.object,
2122
2122
  received: r.parsedType
2123
2123
  }), g;
2124
- const s = [], i = this._def.keyType, o = this._def.valueType;
2124
+ const a = [], i = this._def.keyType, o = this._def.valueType;
2125
2125
  for (const d in r.data)
2126
- s.push({
2127
- key: i._parse(new j(r, d, r.path, d)),
2128
- value: o._parse(new j(r, r.data[d], r.path, d)),
2126
+ a.push({
2127
+ key: i._parse(new Z(r, d, r.path, d)),
2128
+ value: o._parse(new Z(r, r.data[d], r.path, d)),
2129
2129
  alwaysSet: d in r.data
2130
2130
  });
2131
- return r.common.async ? w.mergeObjectAsync(n, s) : w.mergeObjectSync(n, s);
2131
+ return r.common.async ? w.mergeObjectAsync(n, a) : w.mergeObjectSync(n, a);
2132
2132
  }
2133
2133
  get element() {
2134
2134
  return this._def.valueType;
@@ -2162,9 +2162,9 @@ class ve extends v {
2162
2162
  expected: f.map,
2163
2163
  received: r.parsedType
2164
2164
  }), g;
2165
- const s = this._def.keyType, i = this._def.valueType, o = [...r.data.entries()].map(([d, u], l) => ({
2166
- key: s._parse(new j(r, d, r.path, [l, "key"])),
2167
- value: i._parse(new j(r, u, r.path, [l, "value"]))
2165
+ const a = this._def.keyType, i = this._def.valueType, o = [...r.data.entries()].map(([d, u], l) => ({
2166
+ key: a._parse(new Z(r, d, r.path, [l, "key"])),
2167
+ value: i._parse(new Z(r, u, r.path, [l, "value"]))
2168
2168
  }));
2169
2169
  if (r.common.async) {
2170
2170
  const d = /* @__PURE__ */ new Map();
@@ -2204,21 +2204,21 @@ class L extends v {
2204
2204
  expected: f.set,
2205
2205
  received: r.parsedType
2206
2206
  }), g;
2207
- const s = this._def;
2208
- s.minSize !== null && r.data.size < s.minSize.value && (p(r, {
2207
+ const a = this._def;
2208
+ a.minSize !== null && r.data.size < a.minSize.value && (p(r, {
2209
2209
  code: c.too_small,
2210
- minimum: s.minSize.value,
2210
+ minimum: a.minSize.value,
2211
2211
  type: "set",
2212
2212
  inclusive: !0,
2213
2213
  exact: !1,
2214
- message: s.minSize.message
2215
- }), n.dirty()), s.maxSize !== null && r.data.size > s.maxSize.value && (p(r, {
2214
+ message: a.minSize.message
2215
+ }), n.dirty()), a.maxSize !== null && r.data.size > a.maxSize.value && (p(r, {
2216
2216
  code: c.too_big,
2217
- maximum: s.maxSize.value,
2217
+ maximum: a.maxSize.value,
2218
2218
  type: "set",
2219
2219
  inclusive: !0,
2220
2220
  exact: !1,
2221
- message: s.maxSize.message
2221
+ message: a.maxSize.message
2222
2222
  }), n.dirty());
2223
2223
  const i = this._def.valueType;
2224
2224
  function o(u) {
@@ -2230,7 +2230,7 @@ class L extends v {
2230
2230
  }
2231
2231
  return { status: n.value, value: l };
2232
2232
  }
2233
- const d = [...r.data.values()].map((u, l) => i._parse(new j(r, u, r.path, l)));
2233
+ const d = [...r.data.values()].map((u, l) => i._parse(new Z(r, u, r.path, l)));
2234
2234
  return r.common.async ? Promise.all(d).then((u) => o(u)) : o(d);
2235
2235
  }
2236
2236
  min(e, n) {
@@ -2287,7 +2287,7 @@ class G extends v {
2287
2287
  }
2288
2288
  });
2289
2289
  }
2290
- function s(d, u) {
2290
+ function a(d, u) {
2291
2291
  return me({
2292
2292
  data: d,
2293
2293
  path: n.path,
@@ -2304,14 +2304,14 @@ class G extends v {
2304
2304
  });
2305
2305
  }
2306
2306
  const i = { errorMap: n.common.contextualErrorMap }, o = n.data;
2307
- if (this._def.returns instanceof K) {
2307
+ if (this._def.returns instanceof Y) {
2308
2308
  const d = this;
2309
2309
  return S(async function(...u) {
2310
2310
  const l = new T([]), m = await d._def.args.parseAsync(u, i).catch((B) => {
2311
2311
  throw l.addIssue(r(u, B)), l;
2312
2312
  }), x = await Reflect.apply(o, this, m);
2313
2313
  return await d._def.returns._def.type.parseAsync(x, i).catch((B) => {
2314
- throw l.addIssue(s(x, B)), l;
2314
+ throw l.addIssue(a(x, B)), l;
2315
2315
  });
2316
2316
  });
2317
2317
  } else {
@@ -2322,7 +2322,7 @@ class G extends v {
2322
2322
  throw new T([r(u, l.error)]);
2323
2323
  const m = Reflect.apply(o, this, l.data), x = d._def.returns.safeParse(m, i);
2324
2324
  if (!x.success)
2325
- throw new T([s(m, x.error)]);
2325
+ throw new T([a(m, x.error)]);
2326
2326
  return x.data;
2327
2327
  });
2328
2328
  }
@@ -2395,7 +2395,7 @@ de.create = (t, e) => new de({
2395
2395
  typeName: _.ZodLiteral,
2396
2396
  ...y(e)
2397
2397
  });
2398
- function Ye(t, e) {
2398
+ function Ke(t, e) {
2399
2399
  return new $({
2400
2400
  values: t,
2401
2401
  typeName: _.ZodEnum,
@@ -2460,7 +2460,7 @@ class $ extends v {
2460
2460
  }
2461
2461
  }
2462
2462
  F = /* @__PURE__ */ new WeakMap();
2463
- $.create = Ye;
2463
+ $.create = Ke;
2464
2464
  class ce extends v {
2465
2465
  constructor() {
2466
2466
  super(...arguments), X.set(this, void 0);
@@ -2468,19 +2468,19 @@ class ce extends v {
2468
2468
  _parse(e) {
2469
2469
  const n = b.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
2470
2470
  if (r.parsedType !== f.string && r.parsedType !== f.number) {
2471
- const s = b.objectValues(n);
2471
+ const a = b.objectValues(n);
2472
2472
  return p(r, {
2473
- expected: b.joinValues(s),
2473
+ expected: b.joinValues(a),
2474
2474
  received: r.parsedType,
2475
2475
  code: c.invalid_type
2476
2476
  }), g;
2477
2477
  }
2478
2478
  if (_e(this, X) || We(this, X, new Set(b.getValidEnumValues(this._def.values))), !_e(this, X).has(e.data)) {
2479
- const s = b.objectValues(n);
2479
+ const a = b.objectValues(n);
2480
2480
  return p(r, {
2481
2481
  received: r.data,
2482
2482
  code: c.invalid_enum_value,
2483
- options: s
2483
+ options: a
2484
2484
  }), g;
2485
2485
  }
2486
2486
  return S(e.data);
@@ -2495,7 +2495,7 @@ ce.create = (t, e) => new ce({
2495
2495
  typeName: _.ZodNativeEnum,
2496
2496
  ...y(e)
2497
2497
  });
2498
- class K extends v {
2498
+ class Y extends v {
2499
2499
  unwrap() {
2500
2500
  return this._def.type;
2501
2501
  }
@@ -2508,13 +2508,13 @@ class K extends v {
2508
2508
  received: n.parsedType
2509
2509
  }), g;
2510
2510
  const r = n.parsedType === f.promise ? n.data : Promise.resolve(n.data);
2511
- return S(r.then((s) => this._def.type.parseAsync(s, {
2511
+ return S(r.then((a) => this._def.type.parseAsync(a, {
2512
2512
  path: n.path,
2513
2513
  errorMap: n.common.contextualErrorMap
2514
2514
  })));
2515
2515
  }
2516
2516
  }
2517
- K.create = (t, e) => new K({
2517
+ Y.create = (t, e) => new Y({
2518
2518
  type: t,
2519
2519
  typeName: _.ZodPromise,
2520
2520
  ...y(e)
@@ -2527,7 +2527,7 @@ class C extends v {
2527
2527
  return this._def.schema._def.typeName === _.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2528
2528
  }
2529
2529
  _parse(e) {
2530
- const { status: n, ctx: r } = this._processInputParams(e), s = this._def.effect || null, i = {
2530
+ const { status: n, ctx: r } = this._processInputParams(e), a = this._def.effect || null, i = {
2531
2531
  addIssue: (o) => {
2532
2532
  p(r, o), o.fatal ? n.abort() : n.dirty();
2533
2533
  },
@@ -2535,8 +2535,8 @@ class C extends v {
2535
2535
  return r.path;
2536
2536
  }
2537
2537
  };
2538
- if (i.addIssue = i.addIssue.bind(i), s.type === "preprocess") {
2539
- const o = s.transform(r.data, i);
2538
+ if (i.addIssue = i.addIssue.bind(i), a.type === "preprocess") {
2539
+ const o = a.transform(r.data, i);
2540
2540
  if (r.common.async)
2541
2541
  return Promise.resolve(o).then(async (d) => {
2542
2542
  if (n.value === "aborted")
@@ -2559,9 +2559,9 @@ class C extends v {
2559
2559
  return d.status === "aborted" ? g : d.status === "dirty" || n.value === "dirty" ? q(d.value) : d;
2560
2560
  }
2561
2561
  }
2562
- if (s.type === "refinement") {
2562
+ if (a.type === "refinement") {
2563
2563
  const o = (d) => {
2564
- const u = s.refinement(d, i);
2564
+ const u = a.refinement(d, i);
2565
2565
  if (r.common.async)
2566
2566
  return Promise.resolve(u);
2567
2567
  if (u instanceof Promise)
@@ -2578,7 +2578,7 @@ class C extends v {
2578
2578
  } else
2579
2579
  return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((d) => d.status === "aborted" ? g : (d.status === "dirty" && n.dirty(), o(d.value).then(() => ({ status: n.value, value: d.value }))));
2580
2580
  }
2581
- if (s.type === "transform")
2581
+ if (a.type === "transform")
2582
2582
  if (r.common.async === !1) {
2583
2583
  const o = this._def.schema._parseSync({
2584
2584
  data: r.data,
@@ -2587,13 +2587,13 @@ class C extends v {
2587
2587
  });
2588
2588
  if (!Q(o))
2589
2589
  return o;
2590
- const d = s.transform(o.value, i);
2590
+ const d = a.transform(o.value, i);
2591
2591
  if (d instanceof Promise)
2592
2592
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2593
2593
  return { status: n.value, value: d };
2594
2594
  } else
2595
- return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((o) => Q(o) ? Promise.resolve(s.transform(o.value, i)).then((d) => ({ status: n.value, value: d })) : o);
2596
- b.assertNever(s);
2595
+ return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((o) => Q(o) ? Promise.resolve(a.transform(o.value, i)).then((d) => ({ status: n.value, value: d })) : o);
2596
+ b.assertNever(a);
2597
2597
  }
2598
2598
  }
2599
2599
  C.create = (t, e, n) => new C({
@@ -2608,7 +2608,7 @@ C.createWithPreprocess = (t, e, n) => new C({
2608
2608
  typeName: _.ZodEffects,
2609
2609
  ...y(n)
2610
2610
  });
2611
- class Z extends v {
2611
+ class j extends v {
2612
2612
  _parse(e) {
2613
2613
  return this._getType(e) === f.undefined ? S(void 0) : this._def.innerType._parse(e);
2614
2614
  }
@@ -2616,7 +2616,7 @@ class Z extends v {
2616
2616
  return this._def.innerType;
2617
2617
  }
2618
2618
  }
2619
- Z.create = (t, e) => new Z({
2619
+ j.create = (t, e) => new j({
2620
2620
  innerType: t,
2621
2621
  typeName: _.ZodOptional,
2622
2622
  ...y(e)
@@ -2662,14 +2662,14 @@ class ue extends v {
2662
2662
  ...n.common,
2663
2663
  issues: []
2664
2664
  }
2665
- }, s = this._def.innerType._parse({
2665
+ }, a = this._def.innerType._parse({
2666
2666
  data: r.data,
2667
2667
  path: r.path,
2668
2668
  parent: {
2669
2669
  ...r
2670
2670
  }
2671
2671
  });
2672
- return ee(s) ? s.then((i) => ({
2672
+ return ee(a) ? a.then((i) => ({
2673
2673
  status: "valid",
2674
2674
  value: i.status === "valid" ? i.value : this._def.catchValue({
2675
2675
  get error() {
@@ -2679,7 +2679,7 @@ class ue extends v {
2679
2679
  })
2680
2680
  })) : {
2681
2681
  status: "valid",
2682
- value: s.status === "valid" ? s.value : this._def.catchValue({
2682
+ value: a.status === "valid" ? a.value : this._def.catchValue({
2683
2683
  get error() {
2684
2684
  return new T(r.common.issues);
2685
2685
  },
@@ -2714,7 +2714,7 @@ be.create = (t) => new be({
2714
2714
  typeName: _.ZodNaN,
2715
2715
  ...y(t)
2716
2716
  });
2717
- const jt = Symbol("zod_brand");
2717
+ const Nt = Symbol("zod_brand");
2718
2718
  class Ae extends v {
2719
2719
  _parse(e) {
2720
2720
  const { ctx: n } = this._processInputParams(e), r = n.data;
@@ -2745,16 +2745,16 @@ class fe extends v {
2745
2745
  });
2746
2746
  })();
2747
2747
  {
2748
- const s = this._def.in._parseSync({
2748
+ const a = this._def.in._parseSync({
2749
2749
  data: r.data,
2750
2750
  path: r.path,
2751
2751
  parent: r
2752
2752
  });
2753
- return s.status === "aborted" ? g : s.status === "dirty" ? (n.dirty(), {
2753
+ return a.status === "aborted" ? g : a.status === "dirty" ? (n.dirty(), {
2754
2754
  status: "dirty",
2755
- value: s.value
2755
+ value: a.value
2756
2756
  }) : this._def.out._parseSync({
2757
- data: s.value,
2757
+ data: a.value,
2758
2758
  path: r.path,
2759
2759
  parent: r
2760
2760
  });
@@ -2770,8 +2770,8 @@ class fe extends v {
2770
2770
  }
2771
2771
  class pe extends v {
2772
2772
  _parse(e) {
2773
- const n = this._def.innerType._parse(e), r = (s) => (Q(s) && (s.value = Object.freeze(s.value)), s);
2774
- return ee(n) ? n.then((s) => r(s)) : r(n);
2773
+ const n = this._def.innerType._parse(e), r = (a) => (Q(a) && (a.value = Object.freeze(a.value)), a);
2774
+ return ee(n) ? n.then((a) => r(a)) : r(n);
2775
2775
  }
2776
2776
  unwrap() {
2777
2777
  return this._def.innerType;
@@ -2782,25 +2782,25 @@ pe.create = (t, e) => new pe({
2782
2782
  typeName: _.ZodReadonly,
2783
2783
  ...y(e)
2784
2784
  });
2785
- function Ke(t, e = {}, n) {
2786
- return t ? Y.create().superRefine((r, s) => {
2785
+ function Ye(t, e = {}, n) {
2786
+ return t ? K.create().superRefine((r, a) => {
2787
2787
  var i, o;
2788
2788
  if (!t(r)) {
2789
2789
  const d = typeof e == "function" ? e(r) : typeof e == "string" ? { message: e } : e, u = (o = (i = d.fatal) !== null && i !== void 0 ? i : n) !== null && o !== void 0 ? o : !0, l = typeof d == "string" ? { message: d } : d;
2790
- s.addIssue({ code: "custom", ...l, fatal: u });
2790
+ a.addIssue({ code: "custom", ...l, fatal: u });
2791
2791
  }
2792
- }) : Y.create();
2792
+ }) : K.create();
2793
2793
  }
2794
- const Nt = {
2794
+ const It = {
2795
2795
  object: k.lazycreate
2796
2796
  };
2797
2797
  var _;
2798
2798
  (function(t) {
2799
2799
  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";
2800
2800
  })(_ || (_ = {}));
2801
- const It = (t, e = {
2801
+ const Rt = (t, e = {
2802
2802
  message: `Input not instance of ${t.name}`
2803
- }) => Ke((n) => n instanceof t, e), Je = O.create, Fe = P.create, Rt = be.create, At = M.create, Xe = te.create, Pt = V.create, Mt = ge.create, $t = ne.create, Dt = re.create, Ut = Y.create, Vt = U.create, Lt = R.create, zt = ye.create, Bt = E.create, Wt = k.create, qt = k.strictCreate, Gt = se.create, Ht = ke.create, Yt = ae.create, Kt = N.create, Jt = ie.create, Ft = ve.create, Xt = L.create, Qt = G.create, en = oe.create, tn = de.create, nn = $.create, rn = ce.create, sn = K.create, ze = C.create, an = Z.create, on = D.create, dn = C.createWithPreprocess, cn = fe.create, ln = () => Je().optional(), un = () => Fe().optional(), pn = () => Xe().optional(), fn = {
2803
+ }) => Ye((n) => n instanceof t, e), Je = O.create, Fe = P.create, At = be.create, Pt = M.create, Xe = te.create, Mt = V.create, $t = ge.create, Dt = ne.create, Ut = re.create, Vt = K.create, Lt = U.create, zt = R.create, Bt = ye.create, Wt = E.create, qt = k.create, Gt = k.strictCreate, Ht = se.create, Kt = ke.create, Yt = ae.create, Jt = N.create, Ft = ie.create, Xt = ve.create, Qt = L.create, en = G.create, tn = oe.create, nn = de.create, rn = $.create, sn = ce.create, an = Y.create, ze = C.create, on = j.create, dn = D.create, cn = C.createWithPreprocess, ln = fe.create, un = () => Je().optional(), pn = () => Fe().optional(), fn = () => Xe().optional(), hn = {
2804
2804
  string: (t) => O.create({ ...t, coerce: !0 }),
2805
2805
  number: (t) => P.create({ ...t, coerce: !0 }),
2806
2806
  boolean: (t) => te.create({
@@ -2809,14 +2809,14 @@ const It = (t, e = {
2809
2809
  }),
2810
2810
  bigint: (t) => M.create({ ...t, coerce: !0 }),
2811
2811
  date: (t) => V.create({ ...t, coerce: !0 })
2812
- }, hn = g;
2813
- var a = /* @__PURE__ */ Object.freeze({
2812
+ }, mn = g;
2813
+ var s = /* @__PURE__ */ Object.freeze({
2814
2814
  __proto__: null,
2815
2815
  defaultErrorMap: H,
2816
- setErrorMap: ft,
2816
+ setErrorMap: ht,
2817
2817
  getErrorMap: he,
2818
2818
  makeIssue: me,
2819
- EMPTY_PATH: ht,
2819
+ EMPTY_PATH: mt,
2820
2820
  addIssueToContext: p,
2821
2821
  ParseStatus: w,
2822
2822
  INVALID: g,
@@ -2830,7 +2830,7 @@ var a = /* @__PURE__ */ Object.freeze({
2830
2830
  return b;
2831
2831
  },
2832
2832
  get objectUtil() {
2833
- return je;
2833
+ return Ze;
2834
2834
  },
2835
2835
  ZodParsedType: f,
2836
2836
  getParsedType: A,
@@ -2844,7 +2844,7 @@ var a = /* @__PURE__ */ Object.freeze({
2844
2844
  ZodSymbol: ge,
2845
2845
  ZodUndefined: ne,
2846
2846
  ZodNull: re,
2847
- ZodAny: Y,
2847
+ ZodAny: K,
2848
2848
  ZodUnknown: U,
2849
2849
  ZodNever: R,
2850
2850
  ZodVoid: ye,
@@ -2862,290 +2862,133 @@ var a = /* @__PURE__ */ Object.freeze({
2862
2862
  ZodLiteral: de,
2863
2863
  ZodEnum: $,
2864
2864
  ZodNativeEnum: ce,
2865
- ZodPromise: K,
2865
+ ZodPromise: Y,
2866
2866
  ZodEffects: C,
2867
2867
  ZodTransformer: C,
2868
- ZodOptional: Z,
2868
+ ZodOptional: j,
2869
2869
  ZodNullable: D,
2870
2870
  ZodDefault: le,
2871
2871
  ZodCatch: ue,
2872
2872
  ZodNaN: be,
2873
- BRAND: jt,
2873
+ BRAND: Nt,
2874
2874
  ZodBranded: Ae,
2875
2875
  ZodPipeline: fe,
2876
2876
  ZodReadonly: pe,
2877
- custom: Ke,
2877
+ custom: Ye,
2878
2878
  Schema: v,
2879
2879
  ZodSchema: v,
2880
- late: Nt,
2880
+ late: It,
2881
2881
  get ZodFirstPartyTypeKind() {
2882
2882
  return _;
2883
2883
  },
2884
- coerce: fn,
2885
- any: Ut,
2886
- array: Bt,
2887
- bigint: At,
2884
+ coerce: hn,
2885
+ any: Vt,
2886
+ array: Wt,
2887
+ bigint: Pt,
2888
2888
  boolean: Xe,
2889
- date: Pt,
2890
- discriminatedUnion: Ht,
2889
+ date: Mt,
2890
+ discriminatedUnion: Kt,
2891
2891
  effect: ze,
2892
- enum: nn,
2893
- function: Qt,
2894
- instanceof: It,
2892
+ enum: rn,
2893
+ function: en,
2894
+ instanceof: Rt,
2895
2895
  intersection: Yt,
2896
- lazy: en,
2897
- literal: tn,
2898
- map: Ft,
2899
- nan: Rt,
2900
- nativeEnum: rn,
2901
- never: Lt,
2902
- null: Dt,
2903
- nullable: on,
2896
+ lazy: tn,
2897
+ literal: nn,
2898
+ map: Xt,
2899
+ nan: At,
2900
+ nativeEnum: sn,
2901
+ never: zt,
2902
+ null: Ut,
2903
+ nullable: dn,
2904
2904
  number: Fe,
2905
- object: Wt,
2906
- oboolean: pn,
2907
- onumber: un,
2908
- optional: an,
2909
- ostring: ln,
2910
- pipeline: cn,
2911
- preprocess: dn,
2912
- promise: sn,
2913
- record: Jt,
2914
- set: Xt,
2915
- strictObject: qt,
2905
+ object: qt,
2906
+ oboolean: fn,
2907
+ onumber: pn,
2908
+ optional: on,
2909
+ ostring: un,
2910
+ pipeline: ln,
2911
+ preprocess: cn,
2912
+ promise: an,
2913
+ record: Ft,
2914
+ set: Qt,
2915
+ strictObject: Gt,
2916
2916
  string: Je,
2917
- symbol: Mt,
2917
+ symbol: $t,
2918
2918
  transformer: ze,
2919
- tuple: Kt,
2920
- undefined: $t,
2921
- union: Gt,
2922
- unknown: Vt,
2923
- void: zt,
2924
- NEVER: hn,
2919
+ tuple: Jt,
2920
+ undefined: Dt,
2921
+ union: Ht,
2922
+ unknown: Lt,
2923
+ void: Bt,
2924
+ NEVER: mn,
2925
2925
  ZodIssueCode: c,
2926
- quotelessJson: pt,
2926
+ quotelessJson: ft,
2927
2927
  ZodError: T
2928
2928
  });
2929
- ut(a);
2930
- const mn = a.object({
2931
- id: a.string(),
2932
- name: a.string(),
2933
- allowed_web_origins: a.string().transform((t) => t === null ? "" : t).default(""),
2934
- allowed_callback_urls: a.string().transform((t) => t === null ? "" : t).default(""),
2935
- allowed_logout_urls: a.string().transform((t) => t === null ? "" : t).default(""),
2936
- email_validation: a.enum(["enabled", "disabled", "enforced"]).default("enforced"),
2937
- client_secret: a.string().default(""),
2938
- disable_sign_ups: a.boolean().default(!1)
2939
- }), Zn = a.object({
2940
- created_at: a.string().transform((t) => t === null ? "" : t),
2941
- updated_at: a.string().transform((t) => t === null ? "" : t)
2942
- }).extend(mn.shape);
2943
- var Qe = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(Qe || {}), et = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t))(et || {}), tt = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(tt || {});
2944
- const _n = a.object({
2945
- client_id: a.string(),
2946
- vendor_id: a.string().optional(),
2947
- response_type: a.nativeEnum(Qe).optional(),
2948
- response_mode: a.nativeEnum(et).optional(),
2949
- redirect_uri: a.string().optional(),
2950
- audience: a.string().optional(),
2951
- state: a.string().optional(),
2952
- nonce: a.string().optional(),
2953
- scope: a.string().optional(),
2954
- code_challenge_method: a.nativeEnum(tt).optional(),
2955
- code_challenge: a.string().optional(),
2956
- username: a.string().optional()
2957
- }), jn = a.object({
2958
- authParams: _n,
2959
- nonce: a.string().optional(),
2960
- code: a.string(),
2961
- user_id: a.string(),
2962
- created_at: a.string(),
2963
- expires_at: a.string(),
2964
- used_at: a.string().optional()
2965
- });
2966
- var nt = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t))(nt || {});
2967
- const Pe = a.nativeEnum(nt), Nn = a.object({
2968
- grant_type: Pe.refine(
2969
- (t) => t === "authorization_code"
2970
- /* AuthorizationCode */
2971
- ),
2972
- code: a.string(),
2973
- client_secret: a.string(),
2974
- client_id: a.string()
2975
- }), In = a.object({
2976
- grant_type: Pe.refine(
2977
- (t) => t === "authorization_code"
2978
- /* AuthorizationCode */
2979
- ),
2980
- code: a.string(),
2981
- code_verifier: a.string(),
2982
- client_id: a.string().optional(),
2983
- redirect_uri: a.string()
2984
- }), Rn = a.object({
2985
- grant_type: Pe.refine(
2986
- (t) => t === "client_credentials"
2987
- /* ClientCredential */
2988
- ),
2989
- scope: a.string().optional(),
2990
- client_secret: a.string(),
2991
- client_id: a.string(),
2992
- audience: a.string().optional()
2993
- });
2994
- a.object({
2995
- access_token: a.string(),
2996
- id_token: a.string().optional(),
2997
- scope: a.string().optional(),
2998
- state: a.string().optional(),
2999
- refresh_token: a.string().optional(),
3000
- token_type: a.string(),
3001
- expires_in: a.number()
3002
- });
3003
- a.object({
3004
- code: a.string(),
3005
- state: a.string().optional()
3006
- });
3007
- const gn = a.object({
3008
- id: a.string().optional(),
3009
- name: a.string(),
3010
- client_id: a.string().optional(),
3011
- client_secret: a.string().optional(),
3012
- authorization_endpoint: a.string().optional(),
3013
- response_type: a.custom().optional(),
3014
- response_mode: a.custom().optional(),
3015
- private_key: a.string().optional(),
3016
- kid: a.string().optional(),
3017
- team_id: a.string().optional(),
3018
- token_endpoint: a.string().optional(),
3019
- token_exchange_basic_auth: a.boolean().optional(),
3020
- userinfo_endpoint: a.string().optional(),
3021
- scope: a.string().optional()
3022
- }), rt = a.object({
3023
- id: a.string(),
3024
- created_at: a.string().transform((t) => t === null ? "" : t),
3025
- updated_at: a.string().transform((t) => t === null ? "" : t)
3026
- }).extend(gn.shape), yn = a.object({
3027
- domain: a.string(),
3028
- dkim_private_key: a.string().optional(),
3029
- dkim_public_key: a.string().optional(),
3030
- email_api_key: a.string().optional(),
3031
- email_service: a.union([a.literal("mailgun"), a.literal("mailchannels")]).optional()
3032
- }), st = a.object({
3033
- id: a.string(),
3034
- name: a.string(),
3035
- domains: a.array(yn),
3036
- allowed_callback_urls: a.array(a.string()),
3037
- allowed_logout_urls: a.array(a.string()),
3038
- allowed_web_origins: a.array(a.string()),
3039
- email_validation: a.union([
3040
- a.literal("enabled"),
3041
- a.literal("disabled"),
3042
- a.literal("enforced")
3043
- ]),
3044
- tenant_id: a.string(),
3045
- client_secret: a.string(),
3046
- disable_sign_ups: a.boolean(),
3047
- tenant: a.object({
3048
- name: a.string(),
3049
- audience: a.string().optional(),
3050
- logo: a.string().optional(),
3051
- primary_color: a.string().optional(),
3052
- secondary_color: a.string().optional(),
3053
- sender_email: a.string(),
3054
- sender_name: a.string(),
3055
- support_url: a.string().optional(),
3056
- language: a.string().length(2).optional()
3057
- })
3058
- }), An = st.extend({
3059
- connections: a.array(rt)
3060
- }), Pn = st.extend({
3061
- connections: a.array(rt.partial())
3062
- }), Mn = a.object({
3063
- private_key: a.string(),
3064
- public_key: a.string(),
3065
- kid: a.string(),
3066
- created_at: a.string(),
3067
- revoked_at: a.string().optional()
3068
- }), $n = a.object({
3069
- kid: a.string().openapi({ description: "The key id of the signing key" }),
3070
- cert: a.string().openapi({ description: "The public certificate of the signing key" }),
3071
- fingerprint: a.string().openapi({ description: "The cert fingerprint" }),
3072
- thumbprint: a.string().openapi({ description: "The cert thumbprint" }),
3073
- pkcs7: a.string().optional().openapi({
3074
- description: "The public certificate of the signing key in pkcs7 format"
3075
- }),
3076
- current: a.boolean().optional().openapi({ description: "True if the key is the current key" }),
3077
- next: a.boolean().optional().openapi({ description: "True if the key is the next key" }),
3078
- previous: a.boolean().optional().openapi({ description: "True if the key is the previous key" }),
3079
- current_since: a.string().optional().openapi({
3080
- description: "The date and time when the key became the current key"
3081
- }),
3082
- current_until: a.string().optional().openapi({
3083
- description: "The date and time when the current key was rotated"
3084
- }),
3085
- revoked: a.boolean().optional().openapi({ description: "True if the key is revoked" }),
3086
- revoked_at: a.string().optional().openapi({ description: "The date and time when the key was revoked" })
3087
- }), Me = a.object({
3088
- created_at: a.string(),
3089
- updated_at: a.string()
3090
- }), vn = a.object({
3091
- email: a.string().optional(),
3092
- email_verified: a.boolean().optional(),
3093
- name: a.string().optional(),
3094
- username: a.string().optional(),
3095
- given_name: a.string().optional(),
3096
- phone_number: a.string().optional(),
3097
- phone_verified: a.boolean().optional(),
3098
- family_name: a.string().optional()
3099
- }).catchall(a.any()), bn = a.object({
3100
- connection: a.string(),
3101
- user_id: a.string(),
3102
- provider: a.string(),
3103
- isSocial: a.boolean(),
3104
- access_token: a.string().optional(),
3105
- access_token_secret: a.string().optional(),
3106
- refresh_token: a.string().optional(),
3107
- profileData: vn.optional()
3108
- }), at = a.object({
3109
- email: a.string().optional(),
3110
- username: a.string().optional(),
3111
- given_name: a.string().optional(),
3112
- family_name: a.string().optional(),
3113
- nickname: a.string().optional(),
3114
- name: a.string().optional(),
3115
- picture: a.string().optional(),
3116
- locale: a.string().optional(),
3117
- linked_to: a.string().optional(),
3118
- profileData: a.string().optional(),
3119
- user_id: a.string().optional()
3120
- }), kn = at.extend({
3121
- email_verified: a.boolean().default(!1),
3122
- verify_email: a.boolean().optional(),
3123
- last_ip: a.string().optional(),
3124
- last_login: a.string().optional(),
3125
- user_id: a.string().optional(),
3126
- provider: a.string().default("email"),
3127
- connection: a.string().default("email")
3128
- }), xn = kn.extend(Me.shape).extend({
3129
- user_id: a.string(),
2929
+ pt(s);
2930
+ const In = s.object({
2931
+ start: s.number(),
2932
+ limit: s.number(),
2933
+ length: s.number()
2934
+ }), Pe = s.object({
2935
+ created_at: s.string(),
2936
+ updated_at: s.string()
2937
+ }), _n = s.object({
2938
+ email: s.string().optional(),
2939
+ email_verified: s.boolean().optional(),
2940
+ name: s.string().optional(),
2941
+ username: s.string().optional(),
2942
+ given_name: s.string().optional(),
2943
+ phone_number: s.string().optional(),
2944
+ phone_verified: s.boolean().optional(),
2945
+ family_name: s.string().optional()
2946
+ }).catchall(s.any()), gn = s.object({
2947
+ connection: s.string(),
2948
+ user_id: s.string(),
2949
+ provider: s.string(),
2950
+ isSocial: s.boolean(),
2951
+ access_token: s.string().optional(),
2952
+ access_token_secret: s.string().optional(),
2953
+ refresh_token: s.string().optional(),
2954
+ profileData: _n.optional()
2955
+ }), Qe = s.object({
2956
+ email: s.string().optional(),
2957
+ username: s.string().optional(),
2958
+ given_name: s.string().optional(),
2959
+ family_name: s.string().optional(),
2960
+ nickname: s.string().optional(),
2961
+ name: s.string().optional(),
2962
+ picture: s.string().optional(),
2963
+ locale: s.string().optional(),
2964
+ linked_to: s.string().optional(),
2965
+ profileData: s.string().optional(),
2966
+ user_id: s.string().optional()
2967
+ }), yn = Qe.extend({
2968
+ email_verified: s.boolean().default(!1),
2969
+ verify_email: s.boolean().optional(),
2970
+ last_ip: s.string().optional(),
2971
+ last_login: s.string().optional(),
2972
+ user_id: s.string().optional(),
2973
+ provider: s.string().default("email"),
2974
+ connection: s.string().default("email")
2975
+ }), vn = yn.extend(Pe.shape).extend({
2976
+ user_id: s.string(),
3130
2977
  // TODO: this not might be correct if you use the username
3131
- email: a.string(),
3132
- is_social: a.boolean(),
3133
- login_count: a.number(),
3134
- identities: a.array(bn).optional()
3135
- }), Dn = xn, Un = a.object({
3136
- start: a.number(),
3137
- limit: a.number(),
3138
- length: a.number()
3139
- }), Vn = at.extend({
3140
- email: a.string(),
3141
- login_count: a.number(),
3142
- multifactor: a.array(a.string()).optional(),
3143
- last_ip: a.string().optional(),
3144
- last_login: a.string().optional(),
3145
- user_id: a.string()
3146
- }).catchall(a.any());
3147
- var wn = /* @__PURE__ */ ((t) => (t.SUCCESS_API_OPERATION = "sapi", t.SUCCESS_SILENT_AUTH = "ssa", t.FAILED_SILENT_AUTH = "fsa", t.SUCCESS_SIGNUP = "ss", t.FAILED_SIGNUP = "fs", t.SUCCESS_LOGIN = "s", t.FAILED_LOGIN = "f", t.FAILED_LOGIN_INCORRECT_PASSWORD = "fp", t.SUCCESS_LOGOUT = "slo", t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa", t.FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa", t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft", t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft", t.CODE_LINK_SENT = "cls", t.NOT_IMPLEMENTED_1 = "seccft", t))(wn || {});
3148
- const Sn = a.enum([
2978
+ email: s.string(),
2979
+ is_social: s.boolean(),
2980
+ login_count: s.number(),
2981
+ identities: s.array(gn).optional()
2982
+ }), Rn = vn, An = Qe.extend({
2983
+ email: s.string(),
2984
+ login_count: s.number(),
2985
+ multifactor: s.array(s.string()).optional(),
2986
+ last_ip: s.string().optional(),
2987
+ last_login: s.string().optional(),
2988
+ user_id: s.string()
2989
+ }).catchall(s.any());
2990
+ var bn = /* @__PURE__ */ ((t) => (t.SUCCESS_API_OPERATION = "sapi", t.SUCCESS_SILENT_AUTH = "ssa", t.FAILED_SILENT_AUTH = "fsa", t.SUCCESS_SIGNUP = "ss", t.FAILED_SIGNUP = "fs", t.SUCCESS_LOGIN = "s", t.FAILED_LOGIN = "f", t.FAILED_LOGIN_INCORRECT_PASSWORD = "fp", t.SUCCESS_LOGOUT = "slo", t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa", t.FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa", t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft", t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft", t.CODE_LINK_SENT = "cls", t.NOT_IMPLEMENTED_1 = "seccft", t))(bn || {});
2991
+ const kn = s.enum([
3149
2992
  "sapi",
3150
2993
  // SUCCESS_API_OPERATION
3151
2994
  "ssa",
@@ -3177,132 +3020,346 @@ const Sn = a.enum([
3177
3020
  "seacft",
3178
3021
  // SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN
3179
3022
  "serft"
3180
- ]), Tn = a.object({
3181
- name: a.string(),
3182
- version: a.string(),
3183
- env: a.object({
3184
- node: a.string().optional()
3023
+ ]), xn = s.object({
3024
+ name: s.string(),
3025
+ version: s.string(),
3026
+ env: s.object({
3027
+ node: s.string().optional()
3185
3028
  }).optional()
3186
- }), Ln = a.object({
3187
- type: Sn,
3188
- date: a.string(),
3189
- description: a.string().optional(),
3190
- log_id: a.string().optional(),
3191
- _id: a.string().optional(),
3192
- ip: a.string(),
3193
- user_agent: a.string(),
3194
- details: a.any().optional(),
3029
+ }), Pn = s.object({
3030
+ type: kn,
3031
+ date: s.string(),
3032
+ description: s.string().optional(),
3033
+ log_id: s.string().optional(),
3034
+ _id: s.string().optional(),
3035
+ ip: s.string(),
3036
+ user_agent: s.string(),
3037
+ details: s.any().optional(),
3195
3038
  // Using z.any() as a placeholder for "details" type
3196
- isMobile: a.boolean(),
3197
- user_id: a.string().optional(),
3198
- user_name: a.string().optional(),
3199
- connection: a.string().optional(),
3200
- connection_id: a.string().optional(),
3201
- client_id: a.string().optional(),
3202
- client_name: a.string().optional(),
3203
- audience: a.string().optional(),
3204
- scope: a.array(a.string()).optional(),
3205
- strategy: a.string().optional(),
3206
- strategy_type: a.string().optional(),
3207
- hostname: a.string().optional(),
3208
- auth0_client: Tn.optional()
3209
- }), zn = a.object({
3210
- colors: a.object({
3211
- primary: a.string(),
3212
- page_background: a.object({
3213
- type: a.string().optional(),
3214
- start: a.string().optional(),
3215
- end: a.string().optional(),
3216
- angle_deg: a.number().optional()
3039
+ isMobile: s.boolean(),
3040
+ user_id: s.string().optional(),
3041
+ user_name: s.string().optional(),
3042
+ connection: s.string().optional(),
3043
+ connection_id: s.string().optional(),
3044
+ client_id: s.string().optional(),
3045
+ client_name: s.string().optional(),
3046
+ audience: s.string().optional(),
3047
+ scope: s.array(s.string()).optional(),
3048
+ strategy: s.string().optional(),
3049
+ strategy_type: s.string().optional(),
3050
+ hostname: s.string().optional(),
3051
+ auth0_client: xn.optional()
3052
+ }), wn = s.object({
3053
+ id: s.string(),
3054
+ name: s.string(),
3055
+ allowed_web_origins: s.string().transform((t) => t === null ? "" : t).default(""),
3056
+ allowed_callback_urls: s.string().transform((t) => t === null ? "" : t).default(""),
3057
+ allowed_logout_urls: s.string().transform((t) => t === null ? "" : t).default(""),
3058
+ email_validation: s.enum(["enabled", "disabled", "enforced"]).default("enforced"),
3059
+ client_secret: s.string().default(""),
3060
+ disable_sign_ups: s.boolean().default(!1)
3061
+ }), Mn = s.object({
3062
+ created_at: s.string().transform((t) => t === null ? "" : t),
3063
+ updated_at: s.string().transform((t) => t === null ? "" : t)
3064
+ }).extend(wn.shape);
3065
+ var et = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(et || {}), tt = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t))(tt || {}), nt = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(nt || {});
3066
+ const rt = s.object({
3067
+ client_id: s.string(),
3068
+ vendor_id: s.string().optional(),
3069
+ response_type: s.nativeEnum(et).optional(),
3070
+ response_mode: s.nativeEnum(tt).optional(),
3071
+ redirect_uri: s.string().optional(),
3072
+ audience: s.string().optional(),
3073
+ state: s.string().optional(),
3074
+ nonce: s.string().optional(),
3075
+ scope: s.string().optional(),
3076
+ code_challenge_method: s.nativeEnum(nt).optional(),
3077
+ code_challenge: s.string().optional(),
3078
+ username: s.string().optional()
3079
+ }), $n = s.object({
3080
+ authParams: rt,
3081
+ nonce: s.string().optional(),
3082
+ code: s.string(),
3083
+ user_id: s.string(),
3084
+ created_at: s.string(),
3085
+ expires_at: s.string(),
3086
+ used_at: s.string().optional()
3087
+ }), Dn = s.object({
3088
+ colors: s.object({
3089
+ primary: s.string(),
3090
+ page_background: s.object({
3091
+ type: s.string().optional(),
3092
+ start: s.string().optional(),
3093
+ end: s.string().optional(),
3094
+ angle_deg: s.number().optional()
3217
3095
  }).optional()
3218
3096
  }).optional(),
3219
- logo_url: a.string().optional(),
3220
- favicon_url: a.string().optional(),
3221
- font: a.object({
3222
- url: a.string()
3097
+ logo_url: s.string().optional(),
3098
+ favicon_url: s.string().optional(),
3099
+ font: s.object({
3100
+ url: s.string()
3223
3101
  }).optional()
3224
- }), On = a.object({
3225
- domain: a.string(),
3226
- dkim_private_key: a.string().optional(),
3227
- dkim_public_key: a.string().optional(),
3228
- email_api_key: a.string().optional(),
3229
- email_service: a.enum(["mailgun", "mailchannels"])
3230
- }), Bn = Me.extend({
3102
+ }), Sn = s.object({
3103
+ id: s.string().optional(),
3104
+ name: s.string(),
3105
+ client_id: s.string().optional(),
3106
+ client_secret: s.string().optional(),
3107
+ authorization_endpoint: s.string().optional(),
3108
+ response_type: s.custom().optional(),
3109
+ response_mode: s.custom().optional(),
3110
+ private_key: s.string().optional(),
3111
+ kid: s.string().optional(),
3112
+ team_id: s.string().optional(),
3113
+ token_endpoint: s.string().optional(),
3114
+ token_exchange_basic_auth: s.boolean().optional(),
3115
+ userinfo_endpoint: s.string().optional(),
3116
+ scope: s.string().optional()
3117
+ }), st = s.object({
3118
+ id: s.string(),
3119
+ created_at: s.string().transform((t) => t === null ? "" : t),
3120
+ updated_at: s.string().transform((t) => t === null ? "" : t)
3121
+ }).extend(Sn.shape), Tn = s.object({
3122
+ domain: s.string(),
3123
+ dkim_private_key: s.string().optional(),
3124
+ dkim_public_key: s.string().optional(),
3125
+ email_api_key: s.string().optional(),
3126
+ email_service: s.union([s.literal("mailgun"), s.literal("mailchannels")]).optional()
3127
+ }), at = s.object({
3128
+ id: s.string(),
3129
+ name: s.string(),
3130
+ domains: s.array(Tn),
3131
+ allowed_callback_urls: s.array(s.string()),
3132
+ allowed_logout_urls: s.array(s.string()),
3133
+ allowed_web_origins: s.array(s.string()),
3134
+ email_validation: s.union([
3135
+ s.literal("enabled"),
3136
+ s.literal("disabled"),
3137
+ s.literal("enforced")
3138
+ ]),
3139
+ tenant_id: s.string(),
3140
+ client_secret: s.string(),
3141
+ disable_sign_ups: s.boolean(),
3142
+ tenant: s.object({
3143
+ name: s.string(),
3144
+ audience: s.string().optional(),
3145
+ logo: s.string().optional(),
3146
+ primary_color: s.string().optional(),
3147
+ secondary_color: s.string().optional(),
3148
+ sender_email: s.string(),
3149
+ sender_name: s.string(),
3150
+ support_url: s.string().optional(),
3151
+ language: s.string().length(2).optional()
3152
+ })
3153
+ }), Un = at.extend({
3154
+ connections: s.array(st)
3155
+ }), Vn = at.extend({
3156
+ connections: s.array(st.partial())
3157
+ }), On = s.object({
3158
+ domain: s.string(),
3159
+ dkim_private_key: s.string().optional(),
3160
+ dkim_public_key: s.string().optional(),
3161
+ email_api_key: s.string().optional(),
3162
+ email_service: s.enum(["mailgun", "mailchannels"])
3163
+ }), Ln = Pe.extend({
3231
3164
  ...On.shape,
3232
- id: a.string()
3233
- }), En = a.object({
3234
- trigger_id: a.enum(["post-user-registration", "post-user-login"]),
3235
- enabled: a.boolean().default(!1),
3236
- url: a.string(),
3237
- hook_id: a.string().optional()
3238
- }), Wn = En.extend({
3239
- ...Me.shape,
3240
- hook_id: a.string()
3241
- }), Cn = a.object({
3242
- name: a.string(),
3243
- audience: a.string(),
3244
- sender_email: a.string().email(),
3245
- sender_name: a.string(),
3246
- support_url: a.string().url().optional(),
3247
- logo: a.string().url().optional(),
3248
- primary_color: a.string().optional(),
3249
- secondary_color: a.string().optional(),
3250
- language: a.string().optional()
3251
- }), qn = Cn.extend({
3252
- created_at: a.string().transform((t) => t === null ? "" : t),
3253
- updated_at: a.string().transform((t) => t === null ? "" : t)
3254
- }), Gn = a.object({
3255
- logoUrl: a.string(),
3256
- loginBackgroundImage: a.string().nullish(),
3257
- style: a.object({
3258
- primaryColor: a.string(),
3259
- buttonTextColor: a.string(),
3260
- primaryHoverColor: a.string()
3165
+ id: s.string()
3166
+ }), En = s.object({
3167
+ trigger_id: s.enum(["post-user-registration", "post-user-login"]),
3168
+ enabled: s.boolean().default(!1),
3169
+ url: s.string(),
3170
+ hook_id: s.string().optional()
3171
+ }), zn = En.extend({
3172
+ ...Pe.shape,
3173
+ hook_id: s.string()
3174
+ }), Cn = s.object({
3175
+ alg: s.string(),
3176
+ e: s.string(),
3177
+ kid: s.string(),
3178
+ kty: s.string(),
3179
+ n: s.string(),
3180
+ use: s.string().optional()
3181
+ }), Bn = s.object({
3182
+ keys: s.array(Cn)
3183
+ }), Wn = s.object({
3184
+ issuer: s.string(),
3185
+ authorization_endpoint: s.string(),
3186
+ token_endpoint: s.string(),
3187
+ device_authorization_endpoint: s.string(),
3188
+ userinfo_endpoint: s.string(),
3189
+ mfa_challenge_endpoint: s.string(),
3190
+ jwks_uri: s.string(),
3191
+ registration_endpoint: s.string(),
3192
+ revocation_endpoint: s.string(),
3193
+ scopes_supported: s.array(s.string()),
3194
+ response_types_supported: s.array(s.string()),
3195
+ code_challenge_methods_supported: s.array(s.string()),
3196
+ response_modes_supported: s.array(s.string()),
3197
+ subject_types_supported: s.array(s.string()),
3198
+ id_token_signing_alg_values_supported: s.array(s.string()),
3199
+ token_endpoint_auth_methods_supported: s.array(s.string()),
3200
+ claims_supported: s.array(s.string()),
3201
+ request_uri_parameter_supported: s.boolean(),
3202
+ request_parameter_supported: s.boolean(),
3203
+ token_endpoint_auth_signing_alg_values_supported: s.array(s.string())
3204
+ }), jn = s.object({
3205
+ session_id: s.string(),
3206
+ client_id: s.string(),
3207
+ expires_at: s.string(),
3208
+ used_at: s.string(),
3209
+ deleted_at: s.string().optional(),
3210
+ user_id: s.string()
3211
+ });
3212
+ s.object({
3213
+ created_at: s.string(),
3214
+ ...jn.shape
3215
+ });
3216
+ const qn = s.object({
3217
+ private_key: s.string(),
3218
+ public_key: s.string(),
3219
+ kid: s.string(),
3220
+ created_at: s.string(),
3221
+ revoked_at: s.string().optional()
3222
+ }), Gn = s.object({
3223
+ kid: s.string().openapi({ description: "The key id of the signing key" }),
3224
+ cert: s.string().openapi({ description: "The public certificate of the signing key" }),
3225
+ fingerprint: s.string().openapi({ description: "The cert fingerprint" }),
3226
+ thumbprint: s.string().openapi({ description: "The cert thumbprint" }),
3227
+ pkcs7: s.string().optional().openapi({
3228
+ description: "The public certificate of the signing key in pkcs7 format"
3229
+ }),
3230
+ current: s.boolean().optional().openapi({ description: "True if the key is the current key" }),
3231
+ next: s.boolean().optional().openapi({ description: "True if the key is the next key" }),
3232
+ previous: s.boolean().optional().openapi({ description: "True if the key is the previous key" }),
3233
+ current_since: s.string().optional().openapi({
3234
+ description: "The date and time when the key became the current key"
3235
+ }),
3236
+ current_until: s.string().optional().openapi({
3237
+ description: "The date and time when the current key was rotated"
3238
+ }),
3239
+ revoked: s.boolean().optional().openapi({ description: "True if the key is revoked" }),
3240
+ revoked_at: s.string().optional().openapi({ description: "The date and time when the key was revoked" })
3241
+ }), Zn = s.object({
3242
+ name: s.string(),
3243
+ audience: s.string(),
3244
+ sender_email: s.string().email(),
3245
+ sender_name: s.string(),
3246
+ support_url: s.string().url().optional(),
3247
+ logo: s.string().url().optional(),
3248
+ primary_color: s.string().optional(),
3249
+ secondary_color: s.string().optional(),
3250
+ language: s.string().optional()
3251
+ }), Hn = Zn.extend({
3252
+ created_at: s.string().transform((t) => t === null ? "" : t),
3253
+ updated_at: s.string().transform((t) => t === null ? "" : t)
3254
+ }), Kn = s.object({
3255
+ logoUrl: s.string(),
3256
+ loginBackgroundImage: s.string().nullish(),
3257
+ style: s.object({
3258
+ primaryColor: s.string(),
3259
+ buttonTextColor: s.string(),
3260
+ primaryHoverColor: s.string()
3261
3261
  }),
3262
- supportEmail: a.string().nullable(),
3263
- supportUrl: a.string().nullable(),
3264
- name: a.string(),
3265
- showGreyishBackground: a.boolean().optional(),
3266
- termsAndConditionsUrl: a.string().nullable(),
3267
- companyName: a.string().optional(),
3268
- checkoutHideSocial: a.boolean().optional(),
3269
- siteUrl: a.string().nullable(),
3270
- manageSubscriptionsUrl: a.string().optional()
3271
- }), Hn = "tmp";
3262
+ supportEmail: s.string().nullable(),
3263
+ supportUrl: s.string().nullable(),
3264
+ name: s.string(),
3265
+ showGreyishBackground: s.boolean().optional(),
3266
+ termsAndConditionsUrl: s.string().nullable(),
3267
+ companyName: s.string().optional(),
3268
+ checkoutHideSocial: s.boolean().optional(),
3269
+ siteUrl: s.string().nullable(),
3270
+ manageSubscriptionsUrl: s.string().optional()
3271
+ });
3272
+ var it = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t))(it || {});
3273
+ const Me = s.nativeEnum(it), Yn = s.object({
3274
+ grant_type: Me.refine(
3275
+ (t) => t === "authorization_code"
3276
+ /* AuthorizationCode */
3277
+ ),
3278
+ code: s.string(),
3279
+ client_secret: s.string(),
3280
+ client_id: s.string()
3281
+ }), Jn = s.object({
3282
+ grant_type: Me.refine(
3283
+ (t) => t === "authorization_code"
3284
+ /* AuthorizationCode */
3285
+ ),
3286
+ code: s.string(),
3287
+ code_verifier: s.string(),
3288
+ client_id: s.string().optional(),
3289
+ redirect_uri: s.string()
3290
+ }), Fn = s.object({
3291
+ grant_type: Me.refine(
3292
+ (t) => t === "client_credentials"
3293
+ /* ClientCredential */
3294
+ ),
3295
+ scope: s.string().optional(),
3296
+ client_secret: s.string(),
3297
+ client_id: s.string(),
3298
+ audience: s.string().optional()
3299
+ });
3300
+ s.object({
3301
+ access_token: s.string(),
3302
+ id_token: s.string().optional(),
3303
+ scope: s.string().optional(),
3304
+ state: s.string().optional(),
3305
+ refresh_token: s.string().optional(),
3306
+ token_type: s.string(),
3307
+ expires_in: s.number()
3308
+ });
3309
+ s.object({
3310
+ code: s.string(),
3311
+ state: s.string().optional()
3312
+ });
3313
+ const Nn = s.object({
3314
+ id: s.string(),
3315
+ expires_at: s.string(),
3316
+ auth0Client: s.string().optional(),
3317
+ authParams: rt
3318
+ }), Xn = s.object({
3319
+ ...Nn.shape,
3320
+ created_at: s.string(),
3321
+ updated_at: s.string()
3322
+ }), Qn = "tmp";
3272
3323
  export {
3273
- Tn as Auth0Client,
3274
- et as AuthorizationResponseMode,
3275
- Qe as AuthorizationResponseType,
3276
- An as ClientSchema,
3277
- tt as CodeChallengeMethod,
3278
- nt as GrantType,
3279
- wn as LogTypes,
3280
- Pn as PartialClientSchema,
3281
- mn as applicationInsertSchema,
3282
- Zn as applicationSchema,
3283
- Dn as auth0UserResponseSchema,
3284
- _n as authParamsSchema,
3285
- jn as authenticationCodeSchema,
3286
- Nn as authorizationCodeGrantTypeParamsSchema,
3287
- at as baseUserSchema,
3288
- zn as brandingSchema,
3289
- Mn as certificateSchema,
3290
- Rn as clientCredentialGrantTypeParamsSchema,
3291
- gn as connectionInsertSchema,
3292
- rt as connectionSchema,
3324
+ xn as Auth0Client,
3325
+ tt as AuthorizationResponseMode,
3326
+ et as AuthorizationResponseType,
3327
+ Un as ClientSchema,
3328
+ nt as CodeChallengeMethod,
3329
+ it as GrantType,
3330
+ bn as LogTypes,
3331
+ Vn as PartialClientSchema,
3332
+ wn as applicationInsertSchema,
3333
+ Mn as applicationSchema,
3334
+ Rn as auth0UserResponseSchema,
3335
+ rt as authParamsSchema,
3336
+ $n as authenticationCodeSchema,
3337
+ Yn as authorizationCodeGrantTypeParamsSchema,
3338
+ Qe as baseUserSchema,
3339
+ Dn as brandingSchema,
3340
+ qn as certificateSchema,
3341
+ Fn as clientCredentialGrantTypeParamsSchema,
3342
+ Sn as connectionInsertSchema,
3343
+ st as connectionSchema,
3293
3344
  On as domainInsertSchema,
3294
- Bn as domainSchema,
3345
+ Ln as domainSchema,
3295
3346
  En as hookInsertSchema,
3296
- Wn as hookSchema,
3297
- Ln as logSchema,
3298
- In as pkceAuthorizationCodeGrantTypeParamsSchema,
3299
- $n as signingKeySchema,
3300
- Cn as tenantInsertSchema,
3301
- qn as tenantSchema,
3302
- Hn as tmp,
3303
- Un as totalsSchema,
3304
- kn as userInsertSchema,
3305
- Vn as userResponseSchema,
3306
- xn as userSchema,
3307
- Gn as vendorSettingsSchema
3347
+ zn as hookSchema,
3348
+ Bn as jwksKeySchema,
3349
+ Cn as jwksSchema,
3350
+ Pn as logSchema,
3351
+ Wn as openIDConfigurationSchema,
3352
+ Jn as pkceAuthorizationCodeGrantTypeParamsSchema,
3353
+ jn as sessionInsertSchema,
3354
+ Gn as signingKeySchema,
3355
+ Zn as tenantInsertSchema,
3356
+ Hn as tenantSchema,
3357
+ Qn as tmp,
3358
+ In as totalsSchema,
3359
+ Nn as universalLoginSessionInsertSchema,
3360
+ Xn as universalLoginSessionSchema,
3361
+ yn as userInsertSchema,
3362
+ An as userResponseSchema,
3363
+ vn as userSchema,
3364
+ Kn as vendorSettingsSchema
3308
3365
  };