@authhero/kysely-adapter 0.9.7 → 0.11.0

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.
@@ -59,7 +59,7 @@ function Xn(n, e) {
59
59
  var t;
60
60
  return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
61
61
  }
62
- function Qe(n, e) {
62
+ function He(n, e) {
63
63
  const t = n.ZodType.prototype[e];
64
64
  n.ZodType.prototype[e] = function(...s) {
65
65
  const r = t.apply(this, s);
@@ -71,14 +71,14 @@ function es(n) {
71
71
  return;
72
72
  n.ZodType.prototype.openapi = function(r, a) {
73
73
  var o, c, d, u, l, j;
74
- const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e = Gn(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), $e), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
74
+ const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, Re = Gn(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), Re), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
75
75
  param: Object.assign(Object.assign({}, (j = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || j === void 0 ? void 0 : j.param), ie)
76
76
  } : void 0), de = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(oe).length > 0 ? { _internal: oe } : void 0), Object.keys(ce).length > 0 ? { metadata: ce } : void 0) }));
77
77
  if (Xn(this, "ZodObject")) {
78
- const Pe = this.extend;
79
- de.extend = function(...De) {
78
+ const $e = this.extend;
79
+ de.extend = function(...Pe) {
80
80
  var K, H, Q, ue, xe, Te;
81
- const Oe = Pe.apply(this, De);
81
+ const Oe = $e.apply(this, Pe);
82
82
  return Oe._def.openapi = {
83
83
  _internal: {
84
84
  extendedFrom: !((H = (K = this._def.openapi) === null || K === void 0 ? void 0 : K._internal) === null || H === void 0) && H.refId ? { refId: (ue = (Q = this._def.openapi) === null || Q === void 0 ? void 0 : Q._internal) === null || ue === void 0 ? void 0 : ue.refId, schema: this } : (xe = this._def.openapi) === null || xe === void 0 ? void 0 : xe._internal.extendedFrom
@@ -88,7 +88,7 @@ function es(n) {
88
88
  };
89
89
  }
90
90
  return de;
91
- }, Qe(n, "optional"), Qe(n, "nullable"), Qe(n, "default"), Qe(n, "transform"), Qe(n, "refine");
91
+ }, He(n, "optional"), He(n, "nullable"), He(n, "default"), He(n, "transform"), He(n, "refine");
92
92
  const e = n.ZodObject.prototype.deepPartial;
93
93
  n.ZodObject.prototype.deepPartial = function() {
94
94
  const r = this._def.shape(), a = e.apply(this), o = a._def.shape();
@@ -273,7 +273,7 @@ class L extends Error {
273
273
  }
274
274
  }
275
275
  L.create = (n) => new L(n);
276
- const Be = (n, e) => {
276
+ const ze = (n, e) => {
277
277
  let t;
278
278
  switch (n.code) {
279
279
  case p.invalid_type:
@@ -329,12 +329,12 @@ const Be = (n, e) => {
329
329
  }
330
330
  return { message: t };
331
331
  };
332
- let bn = Be;
332
+ let wn = ze;
333
333
  function ns(n) {
334
- bn = n;
334
+ wn = n;
335
335
  }
336
336
  function Et() {
337
- return bn;
337
+ return wn;
338
338
  }
339
339
  const At = (n) => {
340
340
  const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
@@ -366,7 +366,7 @@ function f(n, e) {
366
366
  n.common.contextualErrorMap,
367
367
  n.schemaErrorMap,
368
368
  t,
369
- t === Be ? void 0 : Be
369
+ t === ze ? void 0 : ze
370
370
  // then global default map
371
371
  ].filter((r) => !!r)
372
372
  });
@@ -415,12 +415,12 @@ class $ {
415
415
  }
416
416
  const x = Object.freeze({
417
417
  status: "aborted"
418
- }), Rt = (n) => ({ status: "dirty", value: n }), D = (n) => ({ status: "valid", value: n }), en = (n) => n.status === "aborted", tn = (n) => n.status === "dirty", nt = (n) => n.status === "valid", st = (n) => typeof Promise < "u" && n instanceof Promise;
418
+ }), Rt = (n) => ({ status: "dirty", value: n }), D = (n) => ({ status: "valid", value: n }), en = (n) => n.status === "aborted", tn = (n) => n.status === "dirty", tt = (n) => n.status === "valid", nt = (n) => typeof Promise < "u" && n instanceof Promise;
419
419
  function $t(n, e, t, s) {
420
420
  if (typeof e == "function" ? n !== e || !s : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
421
421
  return e.get(n);
422
422
  }
423
- function kn(n, e, t, s, r) {
423
+ function bn(n, e, t, s, r) {
424
424
  if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
425
425
  return e.set(n, t), t;
426
426
  }
@@ -428,7 +428,7 @@ var y;
428
428
  (function(n) {
429
429
  n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
430
430
  })(y || (y = {}));
431
- var Ge, Xe;
431
+ var Ye, Ge;
432
432
  class X {
433
433
  constructor(e, t, s, r) {
434
434
  this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = r;
@@ -437,8 +437,8 @@ class X {
437
437
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
438
438
  }
439
439
  }
440
- const fn = (n, e) => {
441
- if (nt(e))
440
+ const hn = (n, e) => {
441
+ if (tt(e))
442
442
  return { success: !0, data: e.value };
443
443
  if (!n.common.issues.length)
444
444
  throw new Error("Validation failed but no issues detected.");
@@ -499,7 +499,7 @@ class S {
499
499
  }
500
500
  _parseSync(e) {
501
501
  const t = this._parse(e);
502
- if (st(t))
502
+ if (nt(t))
503
503
  throw new Error("Synchronous parse encountered promise.");
504
504
  return t;
505
505
  }
@@ -527,7 +527,7 @@ class S {
527
527
  data: e,
528
528
  parsedType: pe(e)
529
529
  }, a = this._parseSync({ data: e, path: r.path, parent: r });
530
- return fn(r, a);
530
+ return hn(r, a);
531
531
  }
532
532
  async parseAsync(e, t) {
533
533
  const s = await this.safeParseAsync(e, t);
@@ -547,8 +547,8 @@ class S {
547
547
  parent: null,
548
548
  data: e,
549
549
  parsedType: pe(e)
550
- }, r = this._parse({ data: e, path: s.path, parent: s }), a = await (st(r) ? r : Promise.resolve(r));
551
- return fn(s, a);
550
+ }, r = this._parse({ data: e, path: s.path, parent: s }), a = await (nt(r) ? r : Promise.resolve(r));
551
+ return hn(s, a);
552
552
  }
553
553
  refine(e, t) {
554
554
  const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
@@ -586,13 +586,13 @@ class S {
586
586
  return B.create(this, this._def);
587
587
  }
588
588
  promise() {
589
- return qe.create(this, this._def);
589
+ return We.create(this, this._def);
590
590
  }
591
591
  or(e) {
592
- return ot.create([this, e], this._def);
592
+ return it.create([this, e], this._def);
593
593
  }
594
594
  and(e) {
595
- return ct.create(this, e, this._def);
595
+ return ot.create(this, e, this._def);
596
596
  }
597
597
  transform(e) {
598
598
  return new q({
@@ -604,7 +604,7 @@ class S {
604
604
  }
605
605
  default(e) {
606
606
  const t = typeof e == "function" ? e : () => e;
607
- return new ht({
607
+ return new pt({
608
608
  ...T(this._def),
609
609
  innerType: this,
610
610
  defaultValue: t,
@@ -620,7 +620,7 @@ class S {
620
620
  }
621
621
  catch(e) {
622
622
  const t = typeof e == "function" ? e : () => e;
623
- return new ft({
623
+ return new ht({
624
624
  ...T(this._def),
625
625
  innerType: this,
626
626
  catchValue: t,
@@ -635,10 +635,10 @@ class S {
635
635
  });
636
636
  }
637
637
  pipe(e) {
638
- return Ct.create(this, e);
638
+ return Nt.create(this, e);
639
639
  }
640
640
  readonly() {
641
- return mt.create(this);
641
+ return ft.create(this);
642
642
  }
643
643
  isOptional() {
644
644
  return this.safeParse(void 0).success;
@@ -649,16 +649,16 @@ class S {
649
649
  }
650
650
  const rs = /^c[^\s-]{8,}$/i, as = /^[0-9a-z]+$/, is = /^[0-9A-HJKMNP-TV-Z]{26}$/, os = /^[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, cs = /^[a-z0-9_-]{21}$/i, ds = /^[-+]?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)?)??$/, us = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ls = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
651
651
  let Qt;
652
- const ps = /^(?:(?: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])$/, hs = /^(([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})))$/, fs = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xn = "((\\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])))", ms = new RegExp(`^${xn}$`);
653
- function Tn(n) {
652
+ const ps = /^(?:(?: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])$/, hs = /^(([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})))$/, fs = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, kn = "((\\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])))", ms = new RegExp(`^${kn}$`);
653
+ function xn(n) {
654
654
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
655
655
  return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
656
656
  }
657
657
  function _s(n) {
658
- return new RegExp(`^${Tn(n)}$`);
658
+ return new RegExp(`^${xn(n)}$`);
659
659
  }
660
- function On(n) {
661
- let e = `${xn}T${Tn(n)}`;
660
+ function Tn(n) {
661
+ let e = `${kn}T${xn(n)}`;
662
662
  const t = [];
663
663
  return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
664
664
  }
@@ -781,7 +781,7 @@ class F extends S {
781
781
  code: p.invalid_string,
782
782
  validation: { endsWith: r.value },
783
783
  message: r.message
784
- }), t.dirty()) : r.kind === "datetime" ? On(r).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
784
+ }), t.dirty()) : r.kind === "datetime" ? Tn(r).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
785
785
  code: p.invalid_string,
786
786
  validation: "datetime",
787
787
  message: r.message
@@ -1327,7 +1327,7 @@ me.create = (n) => {
1327
1327
  ...T(n)
1328
1328
  });
1329
1329
  };
1330
- class rt extends S {
1330
+ class st extends S {
1331
1331
  _parse(e) {
1332
1332
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== _.boolean) {
1333
1333
  const t = this._getOrReturnCtx(e);
@@ -1340,7 +1340,7 @@ class rt extends S {
1340
1340
  return D(e.data);
1341
1341
  }
1342
1342
  }
1343
- rt.create = (n) => new rt({
1343
+ st.create = (n) => new st({
1344
1344
  typeName: w.ZodBoolean,
1345
1345
  coerce: (n == null ? void 0 : n.coerce) || !1,
1346
1346
  ...T(n)
@@ -1440,7 +1440,7 @@ Pt.create = (n) => new Pt({
1440
1440
  typeName: w.ZodSymbol,
1441
1441
  ...T(n)
1442
1442
  });
1443
- class at extends S {
1443
+ class rt extends S {
1444
1444
  _parse(e) {
1445
1445
  if (this._getType(e) !== _.undefined) {
1446
1446
  const t = this._getOrReturnCtx(e);
@@ -1453,11 +1453,11 @@ class at extends S {
1453
1453
  return D(e.data);
1454
1454
  }
1455
1455
  }
1456
- at.create = (n) => new at({
1456
+ rt.create = (n) => new rt({
1457
1457
  typeName: w.ZodUndefined,
1458
1458
  ...T(n)
1459
1459
  });
1460
- class it extends S {
1460
+ class at extends S {
1461
1461
  _parse(e) {
1462
1462
  if (this._getType(e) !== _.null) {
1463
1463
  const t = this._getOrReturnCtx(e);
@@ -1470,11 +1470,11 @@ class it extends S {
1470
1470
  return D(e.data);
1471
1471
  }
1472
1472
  }
1473
- it.create = (n) => new it({
1473
+ at.create = (n) => new at({
1474
1474
  typeName: w.ZodNull,
1475
1475
  ...T(n)
1476
1476
  });
1477
- class We extends S {
1477
+ class Be extends S {
1478
1478
  constructor() {
1479
1479
  super(...arguments), this._any = !0;
1480
1480
  }
@@ -1482,7 +1482,7 @@ class We extends S {
1482
1482
  return D(e.data);
1483
1483
  }
1484
1484
  }
1485
- We.create = (n) => new We({
1485
+ Be.create = (n) => new Be({
1486
1486
  typeName: w.ZodAny,
1487
1487
  ...T(n)
1488
1488
  });
@@ -1602,12 +1602,12 @@ B.create = (n, e) => new B({
1602
1602
  typeName: w.ZodArray,
1603
1603
  ...T(e)
1604
1604
  });
1605
- function Le(n) {
1605
+ function Me(n) {
1606
1606
  if (n instanceof I) {
1607
1607
  const e = {};
1608
1608
  for (const t in n.shape) {
1609
1609
  const s = n.shape[t];
1610
- e[t] = Y.create(Le(s));
1610
+ e[t] = Y.create(Me(s));
1611
1611
  }
1612
1612
  return new I({
1613
1613
  ...n._def,
@@ -1615,8 +1615,8 @@ function Le(n) {
1615
1615
  });
1616
1616
  } else return n instanceof B ? new B({
1617
1617
  ...n._def,
1618
- type: Le(n.element)
1619
- }) : n instanceof Y ? Y.create(Le(n.unwrap())) : n instanceof ge ? ge.create(Le(n.unwrap())) : n instanceof ee ? ee.create(n.items.map((e) => Le(e))) : n;
1618
+ type: Me(n.element)
1619
+ }) : n instanceof Y ? Y.create(Me(n.unwrap())) : n instanceof ge ? ge.create(Me(n.unwrap())) : n instanceof ee ? ee.create(n.items.map((e) => Me(e))) : n;
1620
1620
  }
1621
1621
  class I extends S {
1622
1622
  constructor() {
@@ -1852,7 +1852,7 @@ class I extends S {
1852
1852
  * @deprecated
1853
1853
  */
1854
1854
  deepPartial() {
1855
- return Le(this);
1855
+ return Me(this);
1856
1856
  }
1857
1857
  partial(e) {
1858
1858
  const t = {};
@@ -1881,7 +1881,7 @@ class I extends S {
1881
1881
  });
1882
1882
  }
1883
1883
  keyof() {
1884
- return Sn(N.objectKeys(this.shape));
1884
+ return On(N.objectKeys(this.shape));
1885
1885
  }
1886
1886
  }
1887
1887
  I.create = (n, e) => new I({
@@ -1905,7 +1905,7 @@ I.lazycreate = (n, e) => new I({
1905
1905
  typeName: w.ZodObject,
1906
1906
  ...T(e)
1907
1907
  });
1908
- class ot extends S {
1908
+ class it extends S {
1909
1909
  _parse(e) {
1910
1910
  const { ctx: t } = this._processInputParams(e), s = this._def.options;
1911
1911
  function r(a) {
@@ -1973,12 +1973,12 @@ class ot extends S {
1973
1973
  return this._def.options;
1974
1974
  }
1975
1975
  }
1976
- ot.create = (n, e) => new ot({
1976
+ it.create = (n, e) => new it({
1977
1977
  options: n,
1978
1978
  typeName: w.ZodUnion,
1979
1979
  ...T(e)
1980
1980
  });
1981
- const le = (n) => n instanceof ut ? le(n.schema) : n instanceof q ? le(n.innerType()) : n instanceof lt ? [n.value] : n instanceof _e ? n.options : n instanceof pt ? N.objectValues(n.enum) : n instanceof ht ? le(n._def.innerType) : n instanceof at ? [void 0] : n instanceof it ? [null] : n instanceof Y ? [void 0, ...le(n.unwrap())] : n instanceof ge ? [null, ...le(n.unwrap())] : n instanceof cn || n instanceof mt ? le(n.unwrap()) : n instanceof ft ? le(n._def.innerType) : [];
1981
+ const le = (n) => n instanceof dt ? le(n.schema) : n instanceof q ? le(n.innerType()) : n instanceof ut ? [n.value] : n instanceof _e ? n.options : n instanceof lt ? N.objectValues(n.enum) : n instanceof pt ? le(n._def.innerType) : n instanceof rt ? [void 0] : n instanceof at ? [null] : n instanceof Y ? [void 0, ...le(n.unwrap())] : n instanceof ge ? [null, ...le(n.unwrap())] : n instanceof cn || n instanceof ft ? le(n.unwrap()) : n instanceof ht ? le(n._def.innerType) : [];
1982
1982
  class Jt extends S {
1983
1983
  _parse(e) {
1984
1984
  const { ctx: t } = this._processInputParams(e);
@@ -2067,7 +2067,7 @@ function nn(n, e) {
2067
2067
  return { valid: !0, data: r };
2068
2068
  } else return t === _.date && s === _.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
2069
2069
  }
2070
- class ct extends S {
2070
+ class ot extends S {
2071
2071
  _parse(e) {
2072
2072
  const { status: t, ctx: s } = this._processInputParams(e), r = (a, o) => {
2073
2073
  if (en(a) || en(o))
@@ -2099,7 +2099,7 @@ class ct extends S {
2099
2099
  }));
2100
2100
  }
2101
2101
  }
2102
- ct.create = (n, e, t) => new ct({
2102
+ ot.create = (n, e, t) => new ot({
2103
2103
  left: n,
2104
2104
  right: e,
2105
2105
  typeName: w.ZodIntersection,
@@ -2155,7 +2155,7 @@ ee.create = (n, e) => {
2155
2155
  ...T(e)
2156
2156
  });
2157
2157
  };
2158
- class dt extends S {
2158
+ class ct extends S {
2159
2159
  get keySchema() {
2160
2160
  return this._def.keyType;
2161
2161
  }
@@ -2183,12 +2183,12 @@ class dt extends S {
2183
2183
  return this._def.valueType;
2184
2184
  }
2185
2185
  static create(e, t, s) {
2186
- return t instanceof S ? new dt({
2186
+ return t instanceof S ? new ct({
2187
2187
  keyType: e,
2188
2188
  valueType: t,
2189
2189
  typeName: w.ZodRecord,
2190
2190
  ...T(s)
2191
- }) : new dt({
2191
+ }) : new ct({
2192
2192
  keyType: F.create(),
2193
2193
  valueType: e,
2194
2194
  typeName: w.ZodRecord,
@@ -2308,7 +2308,7 @@ Ne.create = (n, e) => new Ne({
2308
2308
  typeName: w.ZodSet,
2309
2309
  ...T(e)
2310
2310
  });
2311
- class Fe extends S {
2311
+ class Ue extends S {
2312
2312
  constructor() {
2313
2313
  super(...arguments), this.validate = this.implement;
2314
2314
  }
@@ -2328,7 +2328,7 @@ class Fe extends S {
2328
2328
  t.common.contextualErrorMap,
2329
2329
  t.schemaErrorMap,
2330
2330
  Et(),
2331
- Be
2331
+ ze
2332
2332
  ].filter((u) => !!u),
2333
2333
  issueData: {
2334
2334
  code: p.invalid_arguments,
@@ -2344,7 +2344,7 @@ class Fe extends S {
2344
2344
  t.common.contextualErrorMap,
2345
2345
  t.schemaErrorMap,
2346
2346
  Et(),
2347
- Be
2347
+ ze
2348
2348
  ].filter((u) => !!u),
2349
2349
  issueData: {
2350
2350
  code: p.invalid_return_type,
@@ -2353,7 +2353,7 @@ class Fe extends S {
2353
2353
  });
2354
2354
  }
2355
2355
  const a = { errorMap: t.common.contextualErrorMap }, o = t.data;
2356
- if (this._def.returns instanceof qe) {
2356
+ if (this._def.returns instanceof We) {
2357
2357
  const c = this;
2358
2358
  return D(async function(...d) {
2359
2359
  const u = new L([]), l = await c._def.args.parseAsync(d, a).catch((A) => {
@@ -2383,13 +2383,13 @@ class Fe extends S {
2383
2383
  return this._def.returns;
2384
2384
  }
2385
2385
  args(...e) {
2386
- return new Fe({
2386
+ return new Ue({
2387
2387
  ...this._def,
2388
2388
  args: ee.create(e).rest(Se.create())
2389
2389
  });
2390
2390
  }
2391
2391
  returns(e) {
2392
- return new Fe({
2392
+ return new Ue({
2393
2393
  ...this._def,
2394
2394
  returns: e
2395
2395
  });
@@ -2401,7 +2401,7 @@ class Fe extends S {
2401
2401
  return this.parse(e);
2402
2402
  }
2403
2403
  static create(e, t, s) {
2404
- return new Fe({
2404
+ return new Ue({
2405
2405
  args: e || ee.create([]).rest(Se.create()),
2406
2406
  returns: t || Se.create(),
2407
2407
  typeName: w.ZodFunction,
@@ -2409,7 +2409,7 @@ class Fe extends S {
2409
2409
  });
2410
2410
  }
2411
2411
  }
2412
- class ut extends S {
2412
+ class dt extends S {
2413
2413
  get schema() {
2414
2414
  return this._def.getter();
2415
2415
  }
@@ -2418,12 +2418,12 @@ class ut extends S {
2418
2418
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2419
2419
  }
2420
2420
  }
2421
- ut.create = (n, e) => new ut({
2421
+ dt.create = (n, e) => new dt({
2422
2422
  getter: n,
2423
2423
  typeName: w.ZodLazy,
2424
2424
  ...T(e)
2425
2425
  });
2426
- class lt extends S {
2426
+ class ut extends S {
2427
2427
  _parse(e) {
2428
2428
  if (e.data !== this._def.value) {
2429
2429
  const t = this._getOrReturnCtx(e);
@@ -2439,12 +2439,12 @@ class lt extends S {
2439
2439
  return this._def.value;
2440
2440
  }
2441
2441
  }
2442
- lt.create = (n, e) => new lt({
2442
+ ut.create = (n, e) => new ut({
2443
2443
  value: n,
2444
2444
  typeName: w.ZodLiteral,
2445
2445
  ...T(e)
2446
2446
  });
2447
- function Sn(n, e) {
2447
+ function On(n, e) {
2448
2448
  return new _e({
2449
2449
  values: n,
2450
2450
  typeName: w.ZodEnum,
@@ -2453,7 +2453,7 @@ function Sn(n, e) {
2453
2453
  }
2454
2454
  class _e extends S {
2455
2455
  constructor() {
2456
- super(...arguments), Ge.set(this, void 0);
2456
+ super(...arguments), Ye.set(this, void 0);
2457
2457
  }
2458
2458
  _parse(e) {
2459
2459
  if (typeof e.data != "string") {
@@ -2464,7 +2464,7 @@ class _e extends S {
2464
2464
  code: p.invalid_type
2465
2465
  }), x;
2466
2466
  }
2467
- if ($t(this, Ge) || kn(this, Ge, new Set(this._def.values)), !$t(this, Ge).has(e.data)) {
2467
+ if ($t(this, Ye) || bn(this, Ye, new Set(this._def.values)), !$t(this, Ye).has(e.data)) {
2468
2468
  const t = this._getOrReturnCtx(e), s = this._def.values;
2469
2469
  return f(t, {
2470
2470
  received: t.data,
@@ -2508,11 +2508,11 @@ class _e extends S {
2508
2508
  });
2509
2509
  }
2510
2510
  }
2511
- Ge = /* @__PURE__ */ new WeakMap();
2512
- _e.create = Sn;
2513
- class pt extends S {
2511
+ Ye = /* @__PURE__ */ new WeakMap();
2512
+ _e.create = On;
2513
+ class lt extends S {
2514
2514
  constructor() {
2515
- super(...arguments), Xe.set(this, void 0);
2515
+ super(...arguments), Ge.set(this, void 0);
2516
2516
  }
2517
2517
  _parse(e) {
2518
2518
  const t = N.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
@@ -2524,7 +2524,7 @@ class pt extends S {
2524
2524
  code: p.invalid_type
2525
2525
  }), x;
2526
2526
  }
2527
- if ($t(this, Xe) || kn(this, Xe, new Set(N.getValidEnumValues(this._def.values))), !$t(this, Xe).has(e.data)) {
2527
+ if ($t(this, Ge) || bn(this, Ge, new Set(N.getValidEnumValues(this._def.values))), !$t(this, Ge).has(e.data)) {
2528
2528
  const r = N.objectValues(t);
2529
2529
  return f(s, {
2530
2530
  received: s.data,
@@ -2538,13 +2538,13 @@ class pt extends S {
2538
2538
  return this._def.values;
2539
2539
  }
2540
2540
  }
2541
- Xe = /* @__PURE__ */ new WeakMap();
2542
- pt.create = (n, e) => new pt({
2541
+ Ge = /* @__PURE__ */ new WeakMap();
2542
+ lt.create = (n, e) => new lt({
2543
2543
  values: n,
2544
2544
  typeName: w.ZodNativeEnum,
2545
2545
  ...T(e)
2546
2546
  });
2547
- class qe extends S {
2547
+ class We extends S {
2548
2548
  unwrap() {
2549
2549
  return this._def.type;
2550
2550
  }
@@ -2563,7 +2563,7 @@ class qe extends S {
2563
2563
  })));
2564
2564
  }
2565
2565
  }
2566
- qe.create = (n, e) => new qe({
2566
+ We.create = (n, e) => new We({
2567
2567
  type: n,
2568
2568
  typeName: w.ZodPromise,
2569
2569
  ...T(e)
@@ -2634,14 +2634,14 @@ class q extends S {
2634
2634
  path: s.path,
2635
2635
  parent: s
2636
2636
  });
2637
- if (!nt(o))
2637
+ if (!tt(o))
2638
2638
  return o;
2639
2639
  const c = r.transform(o.value, a);
2640
2640
  if (c instanceof Promise)
2641
2641
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2642
2642
  return { status: t.value, value: c };
2643
2643
  } else
2644
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => nt(o) ? Promise.resolve(r.transform(o.value, a)).then((c) => ({ status: t.value, value: c })) : o);
2644
+ return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => tt(o) ? Promise.resolve(r.transform(o.value, a)).then((c) => ({ status: t.value, value: c })) : o);
2645
2645
  N.assertNever(r);
2646
2646
  }
2647
2647
  }
@@ -2683,7 +2683,7 @@ ge.create = (n, e) => new ge({
2683
2683
  typeName: w.ZodNullable,
2684
2684
  ...T(e)
2685
2685
  });
2686
- class ht extends S {
2686
+ class pt extends S {
2687
2687
  _parse(e) {
2688
2688
  const { ctx: t } = this._processInputParams(e);
2689
2689
  let s = t.data;
@@ -2697,13 +2697,13 @@ class ht extends S {
2697
2697
  return this._def.innerType;
2698
2698
  }
2699
2699
  }
2700
- ht.create = (n, e) => new ht({
2700
+ pt.create = (n, e) => new pt({
2701
2701
  innerType: n,
2702
2702
  typeName: w.ZodDefault,
2703
2703
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2704
2704
  ...T(e)
2705
2705
  });
2706
- class ft extends S {
2706
+ class ht extends S {
2707
2707
  _parse(e) {
2708
2708
  const { ctx: t } = this._processInputParams(e), s = {
2709
2709
  ...t,
@@ -2718,7 +2718,7 @@ class ft extends S {
2718
2718
  ...s
2719
2719
  }
2720
2720
  });
2721
- return st(r) ? r.then((a) => ({
2721
+ return nt(r) ? r.then((a) => ({
2722
2722
  status: "valid",
2723
2723
  value: a.status === "valid" ? a.value : this._def.catchValue({
2724
2724
  get error() {
@@ -2740,7 +2740,7 @@ class ft extends S {
2740
2740
  return this._def.innerType;
2741
2741
  }
2742
2742
  }
2743
- ft.create = (n, e) => new ft({
2743
+ ht.create = (n, e) => new ht({
2744
2744
  innerType: n,
2745
2745
  typeName: w.ZodCatch,
2746
2746
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
@@ -2777,7 +2777,7 @@ class cn extends S {
2777
2777
  return this._def.type;
2778
2778
  }
2779
2779
  }
2780
- class Ct extends S {
2780
+ class Nt extends S {
2781
2781
  _parse(e) {
2782
2782
  const { status: t, ctx: s } = this._processInputParams(e);
2783
2783
  if (s.common.async)
@@ -2810,35 +2810,35 @@ class Ct extends S {
2810
2810
  }
2811
2811
  }
2812
2812
  static create(e, t) {
2813
- return new Ct({
2813
+ return new Nt({
2814
2814
  in: e,
2815
2815
  out: t,
2816
2816
  typeName: w.ZodPipeline
2817
2817
  });
2818
2818
  }
2819
2819
  }
2820
- class mt extends S {
2820
+ class ft extends S {
2821
2821
  _parse(e) {
2822
- const t = this._def.innerType._parse(e), s = (r) => (nt(r) && (r.value = Object.freeze(r.value)), r);
2823
- return st(t) ? t.then((r) => s(r)) : s(t);
2822
+ const t = this._def.innerType._parse(e), s = (r) => (tt(r) && (r.value = Object.freeze(r.value)), r);
2823
+ return nt(t) ? t.then((r) => s(r)) : s(t);
2824
2824
  }
2825
2825
  unwrap() {
2826
2826
  return this._def.innerType;
2827
2827
  }
2828
2828
  }
2829
- mt.create = (n, e) => new mt({
2829
+ ft.create = (n, e) => new ft({
2830
2830
  innerType: n,
2831
2831
  typeName: w.ZodReadonly,
2832
2832
  ...T(e)
2833
2833
  });
2834
- function Zn(n, e = {}, t) {
2835
- return n ? We.create().superRefine((s, r) => {
2834
+ function Sn(n, e = {}, t) {
2835
+ return n ? Be.create().superRefine((s, r) => {
2836
2836
  var a, o;
2837
2837
  if (!n(s)) {
2838
2838
  const c = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, d = (o = (a = c.fatal) !== null && a !== void 0 ? a : t) !== null && o !== void 0 ? o : !0, u = typeof c == "string" ? { message: c } : c;
2839
2839
  r.addIssue({ code: "custom", ...u, fatal: d });
2840
2840
  }
2841
- }) : We.create();
2841
+ }) : Be.create();
2842
2842
  }
2843
2843
  const ws = {
2844
2844
  object: I.lazycreate
@@ -2849,10 +2849,10 @@ var w;
2849
2849
  })(w || (w = {}));
2850
2850
  const bs = (n, e = {
2851
2851
  message: `Input not instance of ${n.name}`
2852
- }) => Zn((t) => t instanceof n, e), jn = F.create, Nn = fe.create, ks = Lt.create, xs = me.create, Cn = rt.create, Ts = je.create, Os = Pt.create, Ss = at.create, Zs = it.create, js = We.create, Ns = Se.create, Cs = re.create, Is = Dt.create, Es = B.create, As = I.create, Rs = I.strictCreate, $s = ot.create, Ps = Jt.create, Ds = ct.create, Ms = ee.create, Ls = dt.create, Vs = Mt.create, Us = Ne.create, Fs = Fe.create, zs = ut.create, Bs = lt.create, Ws = _e.create, qs = pt.create, Js = qe.create, mn = q.create, Ks = Y.create, Hs = ge.create, Qs = q.createWithPreprocess, Ys = Ct.create, Gs = () => jn().optional(), Xs = () => Nn().optional(), er = () => Cn().optional(), tr = {
2852
+ }) => Sn((t) => t instanceof n, e), Zn = F.create, jn = fe.create, ks = Lt.create, xs = me.create, Nn = st.create, Ts = je.create, Os = Pt.create, Ss = rt.create, Zs = at.create, js = Be.create, Ns = Se.create, Cs = re.create, Is = Dt.create, Es = B.create, As = I.create, Rs = I.strictCreate, $s = it.create, Ps = Jt.create, Ds = ot.create, Ms = ee.create, Ls = ct.create, Vs = Mt.create, Us = Ne.create, Fs = Ue.create, zs = dt.create, Bs = ut.create, Ws = _e.create, qs = lt.create, Js = We.create, fn = q.create, Ks = Y.create, Hs = ge.create, Qs = q.createWithPreprocess, Ys = Nt.create, Gs = () => Zn().optional(), Xs = () => jn().optional(), er = () => Nn().optional(), tr = {
2853
2853
  string: (n) => F.create({ ...n, coerce: !0 }),
2854
2854
  number: (n) => fe.create({ ...n, coerce: !0 }),
2855
- boolean: (n) => rt.create({
2855
+ boolean: (n) => st.create({
2856
2856
  ...n,
2857
2857
  coerce: !0
2858
2858
  }),
@@ -2861,7 +2861,7 @@ const bs = (n, e = {
2861
2861
  }, nr = x;
2862
2862
  var i = /* @__PURE__ */ Object.freeze({
2863
2863
  __proto__: null,
2864
- defaultErrorMap: Be,
2864
+ defaultErrorMap: ze,
2865
2865
  setErrorMap: ns,
2866
2866
  getErrorMap: Et,
2867
2867
  makeIssue: At,
@@ -2873,8 +2873,8 @@ var i = /* @__PURE__ */ Object.freeze({
2873
2873
  OK: D,
2874
2874
  isAborted: en,
2875
2875
  isDirty: tn,
2876
- isValid: nt,
2877
- isAsync: st,
2876
+ isValid: tt,
2877
+ isAsync: nt,
2878
2878
  get util() {
2879
2879
  return N;
2880
2880
  },
@@ -2884,46 +2884,46 @@ var i = /* @__PURE__ */ Object.freeze({
2884
2884
  ZodParsedType: _,
2885
2885
  getParsedType: pe,
2886
2886
  ZodType: S,
2887
- datetimeRegex: On,
2887
+ datetimeRegex: Tn,
2888
2888
  ZodString: F,
2889
2889
  ZodNumber: fe,
2890
2890
  ZodBigInt: me,
2891
- ZodBoolean: rt,
2891
+ ZodBoolean: st,
2892
2892
  ZodDate: je,
2893
2893
  ZodSymbol: Pt,
2894
- ZodUndefined: at,
2895
- ZodNull: it,
2896
- ZodAny: We,
2894
+ ZodUndefined: rt,
2895
+ ZodNull: at,
2896
+ ZodAny: Be,
2897
2897
  ZodUnknown: Se,
2898
2898
  ZodNever: re,
2899
2899
  ZodVoid: Dt,
2900
2900
  ZodArray: B,
2901
2901
  ZodObject: I,
2902
- ZodUnion: ot,
2902
+ ZodUnion: it,
2903
2903
  ZodDiscriminatedUnion: Jt,
2904
- ZodIntersection: ct,
2904
+ ZodIntersection: ot,
2905
2905
  ZodTuple: ee,
2906
- ZodRecord: dt,
2906
+ ZodRecord: ct,
2907
2907
  ZodMap: Mt,
2908
2908
  ZodSet: Ne,
2909
- ZodFunction: Fe,
2910
- ZodLazy: ut,
2911
- ZodLiteral: lt,
2909
+ ZodFunction: Ue,
2910
+ ZodLazy: dt,
2911
+ ZodLiteral: ut,
2912
2912
  ZodEnum: _e,
2913
- ZodNativeEnum: pt,
2914
- ZodPromise: qe,
2913
+ ZodNativeEnum: lt,
2914
+ ZodPromise: We,
2915
2915
  ZodEffects: q,
2916
2916
  ZodTransformer: q,
2917
2917
  ZodOptional: Y,
2918
2918
  ZodNullable: ge,
2919
- ZodDefault: ht,
2920
- ZodCatch: ft,
2919
+ ZodDefault: pt,
2920
+ ZodCatch: ht,
2921
2921
  ZodNaN: Lt,
2922
2922
  BRAND: vs,
2923
2923
  ZodBranded: cn,
2924
- ZodPipeline: Ct,
2925
- ZodReadonly: mt,
2926
- custom: Zn,
2924
+ ZodPipeline: Nt,
2925
+ ZodReadonly: ft,
2926
+ custom: Sn,
2927
2927
  Schema: S,
2928
2928
  ZodSchema: S,
2929
2929
  late: ws,
@@ -2934,10 +2934,10 @@ var i = /* @__PURE__ */ Object.freeze({
2934
2934
  any: js,
2935
2935
  array: Es,
2936
2936
  bigint: xs,
2937
- boolean: Cn,
2937
+ boolean: Nn,
2938
2938
  date: Ts,
2939
2939
  discriminatedUnion: Ps,
2940
- effect: mn,
2940
+ effect: fn,
2941
2941
  enum: Ws,
2942
2942
  function: Fs,
2943
2943
  instanceof: bs,
@@ -2950,7 +2950,7 @@ var i = /* @__PURE__ */ Object.freeze({
2950
2950
  never: Cs,
2951
2951
  null: Zs,
2952
2952
  nullable: Hs,
2953
- number: Nn,
2953
+ number: jn,
2954
2954
  object: As,
2955
2955
  oboolean: er,
2956
2956
  onumber: Xs,
@@ -2962,9 +2962,9 @@ var i = /* @__PURE__ */ Object.freeze({
2962
2962
  record: Ls,
2963
2963
  set: Us,
2964
2964
  strictObject: Rs,
2965
- string: jn,
2965
+ string: Zn,
2966
2966
  symbol: Os,
2967
- transformer: mn,
2967
+ transformer: fn,
2968
2968
  tuple: Ms,
2969
2969
  undefined: Ss,
2970
2970
  union: $s,
@@ -3002,7 +3002,7 @@ const dn = i.object({
3002
3002
  access_token_secret: i.string().optional(),
3003
3003
  refresh_token: i.string().optional(),
3004
3004
  profileData: sr.optional()
3005
- }), In = i.object({
3005
+ }), Cn = i.object({
3006
3006
  email: i.string().optional(),
3007
3007
  username: i.string().optional(),
3008
3008
  given_name: i.string().optional(),
@@ -3014,7 +3014,7 @@ const dn = i.object({
3014
3014
  linked_to: i.string().optional(),
3015
3015
  profileData: i.string().optional(),
3016
3016
  user_id: i.string().optional()
3017
- }), ar = In.extend({
3017
+ }), ar = Cn.extend({
3018
3018
  email_verified: i.boolean().default(!1),
3019
3019
  verify_email: i.boolean().optional(),
3020
3020
  last_ip: i.string().optional(),
@@ -3031,7 +3031,7 @@ ar.extend(dn.shape).extend({
3031
3031
  login_count: i.number(),
3032
3032
  identities: i.array(rr).optional()
3033
3033
  });
3034
- In.extend({
3034
+ Cn.extend({
3035
3035
  email: i.string(),
3036
3036
  login_count: i.number(),
3037
3037
  multifactor: i.array(i.string()).optional(),
@@ -3098,18 +3098,18 @@ const cr = i.object({
3098
3098
  updated_at: i.string().transform((n) => n === null ? "" : n),
3099
3099
  ...dr.shape
3100
3100
  });
3101
- var En = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.TOKEN_ID_TOKEN = "token id_token", n.CODE = "code", n))(En || {}), An = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n.SAML_POST = "saml_post", n))(An || {}), Rn = /* @__PURE__ */ ((n) => (n.S265 = "S256", n.plain = "plain", n))(Rn || {});
3101
+ var In = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.TOKEN_ID_TOKEN = "token id_token", n.CODE = "code", n))(In || {}), En = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n.SAML_POST = "saml_post", n))(En || {}), An = /* @__PURE__ */ ((n) => (n.S265 = "S256", n.plain = "plain", n))(An || {});
3102
3102
  const lr = i.object({
3103
3103
  client_id: i.string(),
3104
3104
  vendor_id: i.string().optional(),
3105
- response_type: i.nativeEnum(En).optional(),
3106
- response_mode: i.nativeEnum(An).optional(),
3105
+ response_type: i.nativeEnum(In).optional(),
3106
+ response_mode: i.nativeEnum(En).optional(),
3107
3107
  redirect_uri: i.string().optional(),
3108
3108
  audience: i.string().optional(),
3109
3109
  state: i.string().optional(),
3110
3110
  nonce: i.string().optional(),
3111
3111
  scope: i.string().optional(),
3112
- code_challenge_method: i.nativeEnum(Rn).optional(),
3112
+ code_challenge_method: i.nativeEnum(An).optional(),
3113
3113
  code_challenge: i.string().optional(),
3114
3114
  username: i.string().optional()
3115
3115
  });
@@ -3150,23 +3150,14 @@ const pr = i.object({
3150
3150
  client_id: i.string().optional(),
3151
3151
  client_secret: i.string().optional(),
3152
3152
  app_secret: i.string().optional(),
3153
- scope: i.string().optional()
3153
+ scope: i.string().optional(),
3154
+ authorization_endpoint: i.string().default("").optional(),
3155
+ token_endpoint: i.string().default("").optional()
3154
3156
  }).default({}).optional(),
3155
3157
  enabled_clients: i.array(i.string()).default([]).optional(),
3156
- authorization_endpoint: i.string().default("").optional(),
3157
3158
  response_type: i.custom().optional(),
3158
- response_mode: i.custom().optional(),
3159
- // Deprecated
3160
- client_id: i.string().optional(),
3161
- client_secret: i.string().optional(),
3162
- private_key: i.string().optional(),
3163
- kid: i.string().optional(),
3164
- team_id: i.string().optional(),
3165
- token_endpoint: i.string().optional(),
3166
- token_exchange_basic_auth: i.boolean().optional(),
3167
- userinfo_endpoint: i.string().optional(),
3168
- scope: i.string().optional()
3169
- }), $n = i.object({
3159
+ response_mode: i.custom().optional()
3160
+ }), Rn = i.object({
3170
3161
  id: i.string(),
3171
3162
  created_at: i.string().transform((n) => n === null ? "" : n),
3172
3163
  updated_at: i.string().transform((n) => n === null ? "" : n)
@@ -3215,7 +3206,7 @@ i.object({
3215
3206
  ...ur.shape,
3216
3207
  domains: i.array(mr),
3217
3208
  tenant: fr,
3218
- connections: i.array($n)
3209
+ connections: i.array(Rn)
3219
3210
  });
3220
3211
  const _r = i.enum([
3221
3212
  "password_reset",
@@ -3450,8 +3441,8 @@ i.object({
3450
3441
  revoked: i.boolean().optional().openapi({ description: "True if the key is revoked" }),
3451
3442
  revoked_at: i.string().optional().openapi({ description: "The date and time when the key was revoked" })
3452
3443
  });
3453
- var Pn = /* @__PURE__ */ ((n) => (n.RefreshToken = "refresh_token", n.AuthorizationCode = "authorization_code", n.ClientCredential = "client_credentials", n.Passwordless = "passwordless", n.Password = "password", n))(Pn || {});
3454
- const un = i.nativeEnum(Pn);
3444
+ var $n = /* @__PURE__ */ ((n) => (n.RefreshToken = "refresh_token", n.AuthorizationCode = "authorization_code", n.ClientCredential = "client_credentials", n.Passwordless = "passwordless", n.Password = "password", n))($n || {});
3445
+ const un = i.nativeEnum($n);
3455
3446
  i.object({
3456
3447
  grant_type: un.refine(
3457
3448
  (n) => n === "authorization_code"
@@ -3524,19 +3515,19 @@ const jr = i.object({
3524
3515
  success: i.string(),
3525
3516
  widget_background: i.string(),
3526
3517
  widget_border: i.string()
3527
- }), Me = i.object({
3518
+ }), De = i.object({
3528
3519
  bold: i.boolean(),
3529
3520
  size: i.number()
3530
3521
  }), Cr = i.object({
3531
- body_text: Me,
3532
- buttons_text: Me,
3522
+ body_text: De,
3523
+ buttons_text: De,
3533
3524
  font_url: i.string(),
3534
- input_labels: Me,
3535
- links: Me,
3525
+ input_labels: De,
3526
+ links: De,
3536
3527
  links_style: i.enum(["normal"]),
3537
3528
  reference_text_size: i.number(),
3538
- subtitle: Me,
3539
- title: Me
3529
+ subtitle: De,
3530
+ title: De
3540
3531
  }), Ir = i.object({
3541
3532
  background_color: i.string(),
3542
3533
  background_image_url: i.string(),
@@ -3570,7 +3561,7 @@ function ln(n) {
3570
3561
  throw new Error(`Invalid user_id: ${n}`);
3571
3562
  return { connection: e, id: t };
3572
3563
  }
3573
- function Dn(n) {
3564
+ function Pn(n) {
3574
3565
  let e = {};
3575
3566
  try {
3576
3567
  e = JSON.parse(n.profileData || "{}");
@@ -3609,7 +3600,7 @@ function $r(n) {
3609
3600
  user_id: ln(s.user_id).id,
3610
3601
  isSocial: !!s.is_social
3611
3602
  },
3612
- ...r.map(Dn)
3603
+ ...r.map(Pn)
3613
3604
  ]
3614
3605
  };
3615
3606
  return R(c);
@@ -3677,7 +3668,7 @@ function Pr(n) {
3677
3668
  user_id: ln(l.user_id).id,
3678
3669
  isSocial: !!l.is_social
3679
3670
  },
3680
- ...j.map(Dn)
3671
+ ...j.map(Pn)
3681
3672
  ]
3682
3673
  });
3683
3674
  }), { count: u } = await s.select((l) => l.fn.countAll().as("count")).executeTakeFirstOrThrow();
@@ -3791,7 +3782,7 @@ function Kr(n) {
3791
3782
  remove: Jr(n)
3792
3783
  };
3793
3784
  }
3794
- function _n(n) {
3785
+ function mn(n) {
3795
3786
  return n ? JSON.stringify(n) : void 0;
3796
3787
  }
3797
3788
  const Hr = 1024;
@@ -3810,12 +3801,12 @@ function Qr(n) {
3810
3801
  isMobile: t.isMobile ? 1 : 0,
3811
3802
  tenant_id: e,
3812
3803
  scope: (a = t.scope) == null ? void 0 : a.join(","),
3813
- auth0_client: _n(t.auth0_client),
3814
- details: (o = _n(t.details)) == null ? void 0 : o.substring(0, 8192)
3804
+ auth0_client: mn(t.auth0_client),
3805
+ details: (o = mn(t.details)) == null ? void 0 : o.substring(0, 8192)
3815
3806
  }).execute(), s;
3816
3807
  };
3817
3808
  }
3818
- function gn(n) {
3809
+ function _n(n) {
3819
3810
  if (!n)
3820
3811
  return "";
3821
3812
  try {
@@ -3824,13 +3815,13 @@ function gn(n) {
3824
3815
  return n;
3825
3816
  }
3826
3817
  }
3827
- function Mn(n) {
3818
+ function Dn(n) {
3828
3819
  return {
3829
3820
  ...n,
3830
3821
  client_id: n.client_id,
3831
3822
  client_name: "",
3832
- auth0_client: gn(n.auth0_client),
3833
- details: gn(n.details),
3823
+ auth0_client: _n(n.auth0_client),
3824
+ details: _n(n.details),
3834
3825
  isMobile: !!n.isMobile,
3835
3826
  scope: n.scope ? n.scope.split(",") : void 0,
3836
3827
  log_id: n.id,
@@ -3852,7 +3843,7 @@ function Yr(n) {
3852
3843
  r = r.offset(t.page * t.per_page).limit(t.per_page);
3853
3844
  const a = await r.selectAll().execute(), { count: o } = await s.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
3854
3845
  return {
3855
- logs: a.map(Mn),
3846
+ logs: a.map(Dn),
3856
3847
  start: t.page * t.per_page,
3857
3848
  limit: t.per_page,
3858
3849
  length: ke(o)
@@ -3862,7 +3853,7 @@ function Yr(n) {
3862
3853
  function Gr(n) {
3863
3854
  return async (e, t) => {
3864
3855
  const s = await n.selectFrom("logs").where("logs.tenant_id", "=", e).where("logs.id", "=", t).selectAll().executeTakeFirst();
3865
- return s ? Mn(s) : null;
3856
+ return s ? Dn(s) : null;
3866
3857
  };
3867
3858
  }
3868
3859
  function Xr(n) {
@@ -4133,7 +4124,23 @@ function Ta(n) {
4133
4124
  update: xa(n)
4134
4125
  };
4135
4126
  }
4136
- function Oa(n, e) {
4127
+ function Oa(n) {
4128
+ return async (e, t) => {
4129
+ const s = {
4130
+ id: Ae(),
4131
+ ...t,
4132
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
4133
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
4134
+ };
4135
+ return await n.insertInto("connections").values({
4136
+ ...s,
4137
+ // The connection options will have many different properties depending on the strategy
4138
+ options: JSON.stringify(s.options || {}),
4139
+ tenant_id: e
4140
+ }).execute(), s;
4141
+ };
4142
+ }
4143
+ function Sa(n, e) {
4137
4144
  var t = {};
4138
4145
  for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
4139
4146
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -4141,30 +4148,30 @@ function Oa(n, e) {
4141
4148
  e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
4142
4149
  return t;
4143
4150
  }
4144
- function Sa(n, e) {
4151
+ function Za(n, e) {
4145
4152
  var t;
4146
4153
  return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
4147
4154
  }
4148
- function Ye(n, e) {
4155
+ function Qe(n, e) {
4149
4156
  const t = n.ZodType.prototype[e];
4150
4157
  n.ZodType.prototype[e] = function(...s) {
4151
4158
  const r = t.apply(this, s);
4152
4159
  return r._def.openapi = this._def.openapi, r;
4153
4160
  };
4154
4161
  }
4155
- function Za(n) {
4162
+ function ja(n) {
4156
4163
  if (typeof n.ZodType.prototype.openapi < "u")
4157
4164
  return;
4158
4165
  n.ZodType.prototype.openapi = function(r, a) {
4159
4166
  var o, c, d, u, l, j;
4160
- const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, $e = Oa(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), $e), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
4167
+ const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, Re = Sa(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), Re), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
4161
4168
  param: Object.assign(Object.assign({}, (j = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || j === void 0 ? void 0 : j.param), ie)
4162
4169
  } : void 0), de = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(oe).length > 0 ? { _internal: oe } : void 0), Object.keys(ce).length > 0 ? { metadata: ce } : void 0) }));
4163
- if (Sa(this, "ZodObject")) {
4164
- const Pe = this.extend;
4165
- de.extend = function(...De) {
4170
+ if (Za(this, "ZodObject")) {
4171
+ const $e = this.extend;
4172
+ de.extend = function(...Pe) {
4166
4173
  var K, H, Q, ue, xe, Te;
4167
- const Oe = Pe.apply(this, De);
4174
+ const Oe = $e.apply(this, Pe);
4168
4175
  return Oe._def.openapi = {
4169
4176
  _internal: {
4170
4177
  extendedFrom: !((H = (K = this._def.openapi) === null || K === void 0 ? void 0 : K._internal) === null || H === void 0) && H.refId ? { refId: (ue = (Q = this._def.openapi) === null || Q === void 0 ? void 0 : Q._internal) === null || ue === void 0 ? void 0 : ue.refId, schema: this } : (xe = this._def.openapi) === null || xe === void 0 ? void 0 : xe._internal.extendedFrom
@@ -4174,7 +4181,7 @@ function Za(n) {
4174
4181
  };
4175
4182
  }
4176
4183
  return de;
4177
- }, Ye(n, "optional"), Ye(n, "nullable"), Ye(n, "default"), Ye(n, "transform"), Ye(n, "refine");
4184
+ }, Qe(n, "optional"), Qe(n, "nullable"), Qe(n, "default"), Qe(n, "transform"), Qe(n, "refine");
4178
4185
  const e = n.ZodObject.prototype.deepPartial;
4179
4186
  n.ZodObject.prototype.deepPartial = function() {
4180
4187
  const r = this._def.shape(), a = e.apply(this), o = a._def.shape();
@@ -4298,7 +4305,7 @@ const g = C.arrayToEnum([
4298
4305
  "invalid_intersection_types",
4299
4306
  "not_multiple_of",
4300
4307
  "not_finite"
4301
- ]), ja = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
4308
+ ]), Na = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
4302
4309
  class V extends Error {
4303
4310
  constructor(e) {
4304
4311
  super(), this.issues = [], this.addIssue = (s) => {
@@ -4359,7 +4366,7 @@ class V extends Error {
4359
4366
  }
4360
4367
  }
4361
4368
  V.create = (n) => new V(n);
4362
- const Je = (n, e) => {
4369
+ const qe = (n, e) => {
4363
4370
  let t;
4364
4371
  switch (n.code) {
4365
4372
  case h.invalid_type:
@@ -4415,12 +4422,12 @@ const Je = (n, e) => {
4415
4422
  }
4416
4423
  return { message: t };
4417
4424
  };
4418
- let Ln = Je;
4419
- function Na(n) {
4420
- Ln = n;
4425
+ let Mn = qe;
4426
+ function Ca(n) {
4427
+ Mn = n;
4421
4428
  }
4422
4429
  function Vt() {
4423
- return Ln;
4430
+ return Mn;
4424
4431
  }
4425
4432
  const Ut = (n) => {
4426
4433
  const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = {
@@ -4442,7 +4449,7 @@ const Ut = (n) => {
4442
4449
  path: a,
4443
4450
  message: c
4444
4451
  };
4445
- }, Ca = [];
4452
+ }, Ia = [];
4446
4453
  function m(n, e) {
4447
4454
  const t = Vt(), s = Ut({
4448
4455
  issueData: e,
@@ -4452,7 +4459,7 @@ function m(n, e) {
4452
4459
  n.common.contextualErrorMap,
4453
4460
  n.schemaErrorMap,
4454
4461
  t,
4455
- t === Je ? void 0 : Je
4462
+ t === qe ? void 0 : qe
4456
4463
  // then global default map
4457
4464
  ].filter((r) => !!r)
4458
4465
  });
@@ -4501,12 +4508,12 @@ class P {
4501
4508
  }
4502
4509
  const k = Object.freeze({
4503
4510
  status: "aborted"
4504
- }), Ue = (n) => ({ status: "dirty", value: n }), M = (n) => ({ status: "valid", value: n }), rn = (n) => n.status === "aborted", an = (n) => n.status === "dirty", _t = (n) => n.status === "valid", gt = (n) => typeof Promise < "u" && n instanceof Promise;
4511
+ }), Ve = (n) => ({ status: "dirty", value: n }), M = (n) => ({ status: "valid", value: n }), rn = (n) => n.status === "aborted", an = (n) => n.status === "dirty", mt = (n) => n.status === "valid", _t = (n) => typeof Promise < "u" && n instanceof Promise;
4505
4512
  function Ft(n, e, t, s) {
4506
4513
  if (typeof e == "function" ? n !== e || !s : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4507
4514
  return e.get(n);
4508
4515
  }
4509
- function Vn(n, e, t, s, r) {
4516
+ function Ln(n, e, t, s, r) {
4510
4517
  if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
4511
4518
  return e.set(n, t), t;
4512
4519
  }
@@ -4514,7 +4521,7 @@ var v;
4514
4521
  (function(n) {
4515
4522
  n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
4516
4523
  })(v || (v = {}));
4517
- var et, tt;
4524
+ var Xe, et;
4518
4525
  class te {
4519
4526
  constructor(e, t, s, r) {
4520
4527
  this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = r;
@@ -4523,8 +4530,8 @@ class te {
4523
4530
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
4524
4531
  }
4525
4532
  }
4526
- const yn = (n, e) => {
4527
- if (_t(e))
4533
+ const gn = (n, e) => {
4534
+ if (mt(e))
4528
4535
  return { success: !0, data: e.value };
4529
4536
  if (!n.common.issues.length)
4530
4537
  throw new Error("Validation failed but no issues detected.");
@@ -4585,7 +4592,7 @@ class Z {
4585
4592
  }
4586
4593
  _parseSync(e) {
4587
4594
  const t = this._parse(e);
4588
- if (gt(t))
4595
+ if (_t(t))
4589
4596
  throw new Error("Synchronous parse encountered promise.");
4590
4597
  return t;
4591
4598
  }
@@ -4613,7 +4620,7 @@ class Z {
4613
4620
  data: e,
4614
4621
  parsedType: he(e)
4615
4622
  }, a = this._parseSync({ data: e, path: r.path, parent: r });
4616
- return yn(r, a);
4623
+ return gn(r, a);
4617
4624
  }
4618
4625
  async parseAsync(e, t) {
4619
4626
  const s = await this.safeParseAsync(e, t);
@@ -4633,8 +4640,8 @@ class Z {
4633
4640
  parent: null,
4634
4641
  data: e,
4635
4642
  parsedType: he(e)
4636
- }, r = this._parse({ data: e, path: s.path, parent: s }), a = await (gt(r) ? r : Promise.resolve(r));
4637
- return yn(s, a);
4643
+ }, r = this._parse({ data: e, path: s.path, parent: s }), a = await (_t(r) ? r : Promise.resolve(r));
4644
+ return gn(s, a);
4638
4645
  }
4639
4646
  refine(e, t) {
4640
4647
  const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
@@ -4672,13 +4679,13 @@ class Z {
4672
4679
  return W.create(this, this._def);
4673
4680
  }
4674
4681
  promise() {
4675
- return He.create(this, this._def);
4682
+ return Ke.create(this, this._def);
4676
4683
  }
4677
4684
  or(e) {
4678
- return bt.create([this, e], this._def);
4685
+ return wt.create([this, e], this._def);
4679
4686
  }
4680
4687
  and(e) {
4681
- return kt.create(this, e, this._def);
4688
+ return bt.create(this, e, this._def);
4682
4689
  }
4683
4690
  transform(e) {
4684
4691
  return new J({
@@ -4690,7 +4697,7 @@ class Z {
4690
4697
  }
4691
4698
  default(e) {
4692
4699
  const t = typeof e == "function" ? e : () => e;
4693
- return new Zt({
4700
+ return new St({
4694
4701
  ...O(this._def),
4695
4702
  innerType: this,
4696
4703
  defaultValue: t,
@@ -4706,7 +4713,7 @@ class Z {
4706
4713
  }
4707
4714
  catch(e) {
4708
4715
  const t = typeof e == "function" ? e : () => e;
4709
- return new jt({
4716
+ return new Zt({
4710
4717
  ...O(this._def),
4711
4718
  innerType: this,
4712
4719
  catchValue: t,
@@ -4721,10 +4728,10 @@ class Z {
4721
4728
  });
4722
4729
  }
4723
4730
  pipe(e) {
4724
- return It.create(this, e);
4731
+ return Ct.create(this, e);
4725
4732
  }
4726
4733
  readonly() {
4727
- return Nt.create(this);
4734
+ return jt.create(this);
4728
4735
  }
4729
4736
  isOptional() {
4730
4737
  return this.safeParse(void 0).success;
@@ -4733,23 +4740,23 @@ class Z {
4733
4740
  return this.safeParse(null).success;
4734
4741
  }
4735
4742
  }
4736
- const Ia = /^c[^\s-]{8,}$/i, Ea = /^[0-9a-z]+$/, Aa = /^[0-9A-HJKMNP-TV-Z]{26}$/, Ra = /^[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, $a = /^[a-z0-9_-]{21}$/i, Pa = /^[-+]?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)?)??$/, Da = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ma = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
4743
+ const Ea = /^c[^\s-]{8,}$/i, Aa = /^[0-9a-z]+$/, Ra = /^[0-9A-HJKMNP-TV-Z]{26}$/, $a = /^[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, Pa = /^[a-z0-9_-]{21}$/i, Da = /^[-+]?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)?)??$/, Ma = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, La = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
4737
4744
  let Yt;
4738
- const La = /^(?:(?: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])$/, Va = /^(([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})))$/, Ua = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Un = "((\\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])))", Fa = new RegExp(`^${Un}$`);
4739
- function Fn(n) {
4745
+ const Va = /^(?:(?: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])$/, Ua = /^(([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})))$/, Fa = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Vn = "((\\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])))", za = new RegExp(`^${Vn}$`);
4746
+ function Un(n) {
4740
4747
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
4741
4748
  return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
4742
4749
  }
4743
- function za(n) {
4744
- return new RegExp(`^${Fn(n)}$`);
4750
+ function Ba(n) {
4751
+ return new RegExp(`^${Un(n)}$`);
4745
4752
  }
4746
- function zn(n) {
4747
- let e = `${Un}T${Fn(n)}`;
4753
+ function Fn(n) {
4754
+ let e = `${Vn}T${Un(n)}`;
4748
4755
  const t = [];
4749
4756
  return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
4750
4757
  }
4751
- function Ba(n, e) {
4752
- return !!((e === "v4" || !e) && La.test(n) || (e === "v6" || !e) && Va.test(n));
4758
+ function Wa(n, e) {
4759
+ return !!((e === "v4" || !e) && Va.test(n) || (e === "v6" || !e) && Ua.test(n));
4753
4760
  }
4754
4761
  class z extends Z {
4755
4762
  _parse(e) {
@@ -4800,43 +4807,43 @@ class z extends Z {
4800
4807
  message: a.message
4801
4808
  }), s.dirty());
4802
4809
  } else if (a.kind === "email")
4803
- Da.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4810
+ Ma.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4804
4811
  validation: "email",
4805
4812
  code: h.invalid_string,
4806
4813
  message: a.message
4807
4814
  }), s.dirty());
4808
4815
  else if (a.kind === "emoji")
4809
- Yt || (Yt = new RegExp(Ma, "u")), Yt.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4816
+ Yt || (Yt = new RegExp(La, "u")), Yt.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4810
4817
  validation: "emoji",
4811
4818
  code: h.invalid_string,
4812
4819
  message: a.message
4813
4820
  }), s.dirty());
4814
4821
  else if (a.kind === "uuid")
4815
- Ra.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4822
+ $a.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4816
4823
  validation: "uuid",
4817
4824
  code: h.invalid_string,
4818
4825
  message: a.message
4819
4826
  }), s.dirty());
4820
4827
  else if (a.kind === "nanoid")
4821
- $a.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4828
+ Pa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4822
4829
  validation: "nanoid",
4823
4830
  code: h.invalid_string,
4824
4831
  message: a.message
4825
4832
  }), s.dirty());
4826
4833
  else if (a.kind === "cuid")
4827
- Ia.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4834
+ Ea.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4828
4835
  validation: "cuid",
4829
4836
  code: h.invalid_string,
4830
4837
  message: a.message
4831
4838
  }), s.dirty());
4832
4839
  else if (a.kind === "cuid2")
4833
- Ea.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4840
+ Aa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4834
4841
  validation: "cuid2",
4835
4842
  code: h.invalid_string,
4836
4843
  message: a.message
4837
4844
  }), s.dirty());
4838
4845
  else if (a.kind === "ulid")
4839
- Aa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4846
+ Ra.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4840
4847
  validation: "ulid",
4841
4848
  code: h.invalid_string,
4842
4849
  message: a.message
@@ -4867,27 +4874,27 @@ class z extends Z {
4867
4874
  code: h.invalid_string,
4868
4875
  validation: { endsWith: a.value },
4869
4876
  message: a.message
4870
- }), s.dirty()) : a.kind === "datetime" ? zn(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4877
+ }), s.dirty()) : a.kind === "datetime" ? Fn(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4871
4878
  code: h.invalid_string,
4872
4879
  validation: "datetime",
4873
4880
  message: a.message
4874
- }), s.dirty()) : a.kind === "date" ? Fa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4881
+ }), s.dirty()) : a.kind === "date" ? za.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4875
4882
  code: h.invalid_string,
4876
4883
  validation: "date",
4877
4884
  message: a.message
4878
- }), s.dirty()) : a.kind === "time" ? za(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4885
+ }), s.dirty()) : a.kind === "time" ? Ba(a).test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4879
4886
  code: h.invalid_string,
4880
4887
  validation: "time",
4881
4888
  message: a.message
4882
- }), s.dirty()) : a.kind === "duration" ? Pa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4889
+ }), s.dirty()) : a.kind === "duration" ? Da.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4883
4890
  validation: "duration",
4884
4891
  code: h.invalid_string,
4885
4892
  message: a.message
4886
- }), s.dirty()) : a.kind === "ip" ? Ba(e.data, a.version) || (r = this._getOrReturnCtx(e, r), m(r, {
4893
+ }), s.dirty()) : a.kind === "ip" ? Wa(e.data, a.version) || (r = this._getOrReturnCtx(e, r), m(r, {
4887
4894
  validation: "ip",
4888
4895
  code: h.invalid_string,
4889
4896
  message: a.message
4890
- }), s.dirty()) : a.kind === "base64" ? Ua.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4897
+ }), s.dirty()) : a.kind === "base64" ? Fa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
4891
4898
  validation: "base64",
4892
4899
  code: h.invalid_string,
4893
4900
  message: a.message
@@ -5109,7 +5116,7 @@ z.create = (n) => {
5109
5116
  ...O(n)
5110
5117
  });
5111
5118
  };
5112
- function Wa(n, e) {
5119
+ function qa(n, e) {
5113
5120
  const t = (n.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, r = t > s ? t : s, a = parseInt(n.toFixed(r).replace(".", "")), o = parseInt(e.toFixed(r).replace(".", ""));
5114
5121
  return a % o / Math.pow(10, r);
5115
5122
  }
@@ -5148,7 +5155,7 @@ class ye extends Z {
5148
5155
  inclusive: a.inclusive,
5149
5156
  exact: !1,
5150
5157
  message: a.message
5151
- }), r.dirty()) : a.kind === "multipleOf" ? Wa(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), m(s, {
5158
+ }), r.dirty()) : a.kind === "multipleOf" ? qa(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), m(s, {
5152
5159
  code: h.not_multiple_of,
5153
5160
  multipleOf: a.value,
5154
5161
  message: a.message
@@ -5413,7 +5420,7 @@ ve.create = (n) => {
5413
5420
  ...O(n)
5414
5421
  });
5415
5422
  };
5416
- class yt extends Z {
5423
+ class gt extends Z {
5417
5424
  _parse(e) {
5418
5425
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== g.boolean) {
5419
5426
  const s = this._getOrReturnCtx(e);
@@ -5426,7 +5433,7 @@ class yt extends Z {
5426
5433
  return M(e.data);
5427
5434
  }
5428
5435
  }
5429
- yt.create = (n) => new yt({
5436
+ gt.create = (n) => new gt({
5430
5437
  typeName: b.ZodBoolean,
5431
5438
  coerce: (n == null ? void 0 : n.coerce) || !1,
5432
5439
  ...O(n)
@@ -5526,7 +5533,7 @@ zt.create = (n) => new zt({
5526
5533
  typeName: b.ZodSymbol,
5527
5534
  ...O(n)
5528
5535
  });
5529
- class vt extends Z {
5536
+ class yt extends Z {
5530
5537
  _parse(e) {
5531
5538
  if (this._getType(e) !== g.undefined) {
5532
5539
  const s = this._getOrReturnCtx(e);
@@ -5539,11 +5546,11 @@ class vt extends Z {
5539
5546
  return M(e.data);
5540
5547
  }
5541
5548
  }
5542
- vt.create = (n) => new vt({
5549
+ yt.create = (n) => new yt({
5543
5550
  typeName: b.ZodUndefined,
5544
5551
  ...O(n)
5545
5552
  });
5546
- class wt extends Z {
5553
+ class vt extends Z {
5547
5554
  _parse(e) {
5548
5555
  if (this._getType(e) !== g.null) {
5549
5556
  const s = this._getOrReturnCtx(e);
@@ -5556,11 +5563,11 @@ class wt extends Z {
5556
5563
  return M(e.data);
5557
5564
  }
5558
5565
  }
5559
- wt.create = (n) => new wt({
5566
+ vt.create = (n) => new vt({
5560
5567
  typeName: b.ZodNull,
5561
5568
  ...O(n)
5562
5569
  });
5563
- class Ke extends Z {
5570
+ class Je extends Z {
5564
5571
  constructor() {
5565
5572
  super(...arguments), this._any = !0;
5566
5573
  }
@@ -5568,7 +5575,7 @@ class Ke extends Z {
5568
5575
  return M(e.data);
5569
5576
  }
5570
5577
  }
5571
- Ke.create = (n) => new Ke({
5578
+ Je.create = (n) => new Je({
5572
5579
  typeName: b.ZodAny,
5573
5580
  ...O(n)
5574
5581
  });
@@ -5688,12 +5695,12 @@ W.create = (n, e) => new W({
5688
5695
  typeName: b.ZodArray,
5689
5696
  ...O(e)
5690
5697
  });
5691
- function Ve(n) {
5698
+ function Le(n) {
5692
5699
  if (n instanceof E) {
5693
5700
  const e = {};
5694
5701
  for (const t in n.shape) {
5695
5702
  const s = n.shape[t];
5696
- e[t] = G.create(Ve(s));
5703
+ e[t] = G.create(Le(s));
5697
5704
  }
5698
5705
  return new E({
5699
5706
  ...n._def,
@@ -5701,8 +5708,8 @@ function Ve(n) {
5701
5708
  });
5702
5709
  } else return n instanceof W ? new W({
5703
5710
  ...n._def,
5704
- type: Ve(n.element)
5705
- }) : n instanceof G ? G.create(Ve(n.unwrap())) : n instanceof be ? be.create(Ve(n.unwrap())) : n instanceof ne ? ne.create(n.items.map((e) => Ve(e))) : n;
5711
+ type: Le(n.element)
5712
+ }) : n instanceof G ? G.create(Le(n.unwrap())) : n instanceof be ? be.create(Le(n.unwrap())) : n instanceof ne ? ne.create(n.items.map((e) => Le(e))) : n;
5706
5713
  }
5707
5714
  class E extends Z {
5708
5715
  constructor() {
@@ -5938,7 +5945,7 @@ class E extends Z {
5938
5945
  * @deprecated
5939
5946
  */
5940
5947
  deepPartial() {
5941
- return Ve(this);
5948
+ return Le(this);
5942
5949
  }
5943
5950
  partial(e) {
5944
5951
  const t = {};
@@ -5967,7 +5974,7 @@ class E extends Z {
5967
5974
  });
5968
5975
  }
5969
5976
  keyof() {
5970
- return Bn(C.objectKeys(this.shape));
5977
+ return zn(C.objectKeys(this.shape));
5971
5978
  }
5972
5979
  }
5973
5980
  E.create = (n, e) => new E({
@@ -5991,7 +5998,7 @@ E.lazycreate = (n, e) => new E({
5991
5998
  typeName: b.ZodObject,
5992
5999
  ...O(e)
5993
6000
  });
5994
- class bt extends Z {
6001
+ class wt extends Z {
5995
6002
  _parse(e) {
5996
6003
  const { ctx: t } = this._processInputParams(e), s = this._def.options;
5997
6004
  function r(a) {
@@ -6059,12 +6066,12 @@ class bt extends Z {
6059
6066
  return this._def.options;
6060
6067
  }
6061
6068
  }
6062
- bt.create = (n, e) => new bt({
6069
+ wt.create = (n, e) => new wt({
6063
6070
  options: n,
6064
6071
  typeName: b.ZodUnion,
6065
6072
  ...O(e)
6066
6073
  });
6067
- const se = (n) => n instanceof Tt ? se(n.schema) : n instanceof J ? se(n.innerType()) : n instanceof Ot ? [n.value] : n instanceof we ? n.options : n instanceof St ? C.objectValues(n.enum) : n instanceof Zt ? se(n._def.innerType) : n instanceof vt ? [void 0] : n instanceof wt ? [null] : n instanceof G ? [void 0, ...se(n.unwrap())] : n instanceof be ? [null, ...se(n.unwrap())] : n instanceof pn || n instanceof Nt ? se(n.unwrap()) : n instanceof jt ? se(n._def.innerType) : [];
6074
+ const se = (n) => n instanceof xt ? se(n.schema) : n instanceof J ? se(n.innerType()) : n instanceof Tt ? [n.value] : n instanceof we ? n.options : n instanceof Ot ? C.objectValues(n.enum) : n instanceof St ? se(n._def.innerType) : n instanceof yt ? [void 0] : n instanceof vt ? [null] : n instanceof G ? [void 0, ...se(n.unwrap())] : n instanceof be ? [null, ...se(n.unwrap())] : n instanceof pn || n instanceof jt ? se(n.unwrap()) : n instanceof Zt ? se(n._def.innerType) : [];
6068
6075
  class Kt extends Z {
6069
6076
  _parse(e) {
6070
6077
  const { ctx: t } = this._processInputParams(e);
@@ -6153,7 +6160,7 @@ function on(n, e) {
6153
6160
  return { valid: !0, data: r };
6154
6161
  } else return t === g.date && s === g.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
6155
6162
  }
6156
- class kt extends Z {
6163
+ class bt extends Z {
6157
6164
  _parse(e) {
6158
6165
  const { status: t, ctx: s } = this._processInputParams(e), r = (a, o) => {
6159
6166
  if (rn(a) || rn(o))
@@ -6185,7 +6192,7 @@ class kt extends Z {
6185
6192
  }));
6186
6193
  }
6187
6194
  }
6188
- kt.create = (n, e, t) => new kt({
6195
+ bt.create = (n, e, t) => new bt({
6189
6196
  left: n,
6190
6197
  right: e,
6191
6198
  typeName: b.ZodIntersection,
@@ -6241,7 +6248,7 @@ ne.create = (n, e) => {
6241
6248
  ...O(e)
6242
6249
  });
6243
6250
  };
6244
- class xt extends Z {
6251
+ class kt extends Z {
6245
6252
  get keySchema() {
6246
6253
  return this._def.keyType;
6247
6254
  }
@@ -6269,12 +6276,12 @@ class xt extends Z {
6269
6276
  return this._def.valueType;
6270
6277
  }
6271
6278
  static create(e, t, s) {
6272
- return t instanceof Z ? new xt({
6279
+ return t instanceof Z ? new kt({
6273
6280
  keyType: e,
6274
6281
  valueType: t,
6275
6282
  typeName: b.ZodRecord,
6276
6283
  ...O(s)
6277
- }) : new xt({
6284
+ }) : new kt({
6278
6285
  keyType: z.create(),
6279
6286
  valueType: e,
6280
6287
  typeName: b.ZodRecord,
@@ -6394,7 +6401,7 @@ Ie.create = (n, e) => new Ie({
6394
6401
  typeName: b.ZodSet,
6395
6402
  ...O(e)
6396
6403
  });
6397
- class ze extends Z {
6404
+ class Fe extends Z {
6398
6405
  constructor() {
6399
6406
  super(...arguments), this.validate = this.implement;
6400
6407
  }
@@ -6414,7 +6421,7 @@ class ze extends Z {
6414
6421
  t.common.contextualErrorMap,
6415
6422
  t.schemaErrorMap,
6416
6423
  Vt(),
6417
- Je
6424
+ qe
6418
6425
  ].filter((u) => !!u),
6419
6426
  issueData: {
6420
6427
  code: h.invalid_arguments,
@@ -6430,7 +6437,7 @@ class ze extends Z {
6430
6437
  t.common.contextualErrorMap,
6431
6438
  t.schemaErrorMap,
6432
6439
  Vt(),
6433
- Je
6440
+ qe
6434
6441
  ].filter((u) => !!u),
6435
6442
  issueData: {
6436
6443
  code: h.invalid_return_type,
@@ -6439,7 +6446,7 @@ class ze extends Z {
6439
6446
  });
6440
6447
  }
6441
6448
  const a = { errorMap: t.common.contextualErrorMap }, o = t.data;
6442
- if (this._def.returns instanceof He) {
6449
+ if (this._def.returns instanceof Ke) {
6443
6450
  const c = this;
6444
6451
  return M(async function(...d) {
6445
6452
  const u = new V([]), l = await c._def.args.parseAsync(d, a).catch((U) => {
@@ -6469,13 +6476,13 @@ class ze extends Z {
6469
6476
  return this._def.returns;
6470
6477
  }
6471
6478
  args(...e) {
6472
- return new ze({
6479
+ return new Fe({
6473
6480
  ...this._def,
6474
6481
  args: ne.create(e).rest(Ze.create())
6475
6482
  });
6476
6483
  }
6477
6484
  returns(e) {
6478
- return new ze({
6485
+ return new Fe({
6479
6486
  ...this._def,
6480
6487
  returns: e
6481
6488
  });
@@ -6487,7 +6494,7 @@ class ze extends Z {
6487
6494
  return this.parse(e);
6488
6495
  }
6489
6496
  static create(e, t, s) {
6490
- return new ze({
6497
+ return new Fe({
6491
6498
  args: e || ne.create([]).rest(Ze.create()),
6492
6499
  returns: t || Ze.create(),
6493
6500
  typeName: b.ZodFunction,
@@ -6495,7 +6502,7 @@ class ze extends Z {
6495
6502
  });
6496
6503
  }
6497
6504
  }
6498
- class Tt extends Z {
6505
+ class xt extends Z {
6499
6506
  get schema() {
6500
6507
  return this._def.getter();
6501
6508
  }
@@ -6504,12 +6511,12 @@ class Tt extends Z {
6504
6511
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
6505
6512
  }
6506
6513
  }
6507
- Tt.create = (n, e) => new Tt({
6514
+ xt.create = (n, e) => new xt({
6508
6515
  getter: n,
6509
6516
  typeName: b.ZodLazy,
6510
6517
  ...O(e)
6511
6518
  });
6512
- class Ot extends Z {
6519
+ class Tt extends Z {
6513
6520
  _parse(e) {
6514
6521
  if (e.data !== this._def.value) {
6515
6522
  const t = this._getOrReturnCtx(e);
@@ -6525,12 +6532,12 @@ class Ot extends Z {
6525
6532
  return this._def.value;
6526
6533
  }
6527
6534
  }
6528
- Ot.create = (n, e) => new Ot({
6535
+ Tt.create = (n, e) => new Tt({
6529
6536
  value: n,
6530
6537
  typeName: b.ZodLiteral,
6531
6538
  ...O(e)
6532
6539
  });
6533
- function Bn(n, e) {
6540
+ function zn(n, e) {
6534
6541
  return new we({
6535
6542
  values: n,
6536
6543
  typeName: b.ZodEnum,
@@ -6539,7 +6546,7 @@ function Bn(n, e) {
6539
6546
  }
6540
6547
  class we extends Z {
6541
6548
  constructor() {
6542
- super(...arguments), et.set(this, void 0);
6549
+ super(...arguments), Xe.set(this, void 0);
6543
6550
  }
6544
6551
  _parse(e) {
6545
6552
  if (typeof e.data != "string") {
@@ -6550,7 +6557,7 @@ class we extends Z {
6550
6557
  code: h.invalid_type
6551
6558
  }), k;
6552
6559
  }
6553
- if (Ft(this, et) || Vn(this, et, new Set(this._def.values)), !Ft(this, et).has(e.data)) {
6560
+ if (Ft(this, Xe) || Ln(this, Xe, new Set(this._def.values)), !Ft(this, Xe).has(e.data)) {
6554
6561
  const t = this._getOrReturnCtx(e), s = this._def.values;
6555
6562
  return m(t, {
6556
6563
  received: t.data,
@@ -6594,11 +6601,11 @@ class we extends Z {
6594
6601
  });
6595
6602
  }
6596
6603
  }
6597
- et = /* @__PURE__ */ new WeakMap();
6598
- we.create = Bn;
6599
- class St extends Z {
6604
+ Xe = /* @__PURE__ */ new WeakMap();
6605
+ we.create = zn;
6606
+ class Ot extends Z {
6600
6607
  constructor() {
6601
- super(...arguments), tt.set(this, void 0);
6608
+ super(...arguments), et.set(this, void 0);
6602
6609
  }
6603
6610
  _parse(e) {
6604
6611
  const t = C.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
@@ -6610,7 +6617,7 @@ class St extends Z {
6610
6617
  code: h.invalid_type
6611
6618
  }), k;
6612
6619
  }
6613
- if (Ft(this, tt) || Vn(this, tt, new Set(C.getValidEnumValues(this._def.values))), !Ft(this, tt).has(e.data)) {
6620
+ if (Ft(this, et) || Ln(this, et, new Set(C.getValidEnumValues(this._def.values))), !Ft(this, et).has(e.data)) {
6614
6621
  const r = C.objectValues(t);
6615
6622
  return m(s, {
6616
6623
  received: s.data,
@@ -6624,13 +6631,13 @@ class St extends Z {
6624
6631
  return this._def.values;
6625
6632
  }
6626
6633
  }
6627
- tt = /* @__PURE__ */ new WeakMap();
6628
- St.create = (n, e) => new St({
6634
+ et = /* @__PURE__ */ new WeakMap();
6635
+ Ot.create = (n, e) => new Ot({
6629
6636
  values: n,
6630
6637
  typeName: b.ZodNativeEnum,
6631
6638
  ...O(e)
6632
6639
  });
6633
- class He extends Z {
6640
+ class Ke extends Z {
6634
6641
  unwrap() {
6635
6642
  return this._def.type;
6636
6643
  }
@@ -6649,7 +6656,7 @@ class He extends Z {
6649
6656
  })));
6650
6657
  }
6651
6658
  }
6652
- He.create = (n, e) => new He({
6659
+ Ke.create = (n, e) => new Ke({
6653
6660
  type: n,
6654
6661
  typeName: b.ZodPromise,
6655
6662
  ...O(e)
@@ -6681,7 +6688,7 @@ class J extends Z {
6681
6688
  path: s.path,
6682
6689
  parent: s
6683
6690
  });
6684
- return d.status === "aborted" ? k : d.status === "dirty" || t.value === "dirty" ? Ue(d.value) : d;
6691
+ return d.status === "aborted" ? k : d.status === "dirty" || t.value === "dirty" ? Ve(d.value) : d;
6685
6692
  });
6686
6693
  {
6687
6694
  if (t.value === "aborted")
@@ -6691,7 +6698,7 @@ class J extends Z {
6691
6698
  path: s.path,
6692
6699
  parent: s
6693
6700
  });
6694
- return c.status === "aborted" ? k : c.status === "dirty" || t.value === "dirty" ? Ue(c.value) : c;
6701
+ return c.status === "aborted" ? k : c.status === "dirty" || t.value === "dirty" ? Ve(c.value) : c;
6695
6702
  }
6696
6703
  }
6697
6704
  if (r.type === "refinement") {
@@ -6720,14 +6727,14 @@ class J extends Z {
6720
6727
  path: s.path,
6721
6728
  parent: s
6722
6729
  });
6723
- if (!_t(o))
6730
+ if (!mt(o))
6724
6731
  return o;
6725
6732
  const c = r.transform(o.value, a);
6726
6733
  if (c instanceof Promise)
6727
6734
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
6728
6735
  return { status: t.value, value: c };
6729
6736
  } else
6730
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => _t(o) ? Promise.resolve(r.transform(o.value, a)).then((c) => ({ status: t.value, value: c })) : o);
6737
+ return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => mt(o) ? Promise.resolve(r.transform(o.value, a)).then((c) => ({ status: t.value, value: c })) : o);
6731
6738
  C.assertNever(r);
6732
6739
  }
6733
6740
  }
@@ -6769,7 +6776,7 @@ be.create = (n, e) => new be({
6769
6776
  typeName: b.ZodNullable,
6770
6777
  ...O(e)
6771
6778
  });
6772
- class Zt extends Z {
6779
+ class St extends Z {
6773
6780
  _parse(e) {
6774
6781
  const { ctx: t } = this._processInputParams(e);
6775
6782
  let s = t.data;
@@ -6783,13 +6790,13 @@ class Zt extends Z {
6783
6790
  return this._def.innerType;
6784
6791
  }
6785
6792
  }
6786
- Zt.create = (n, e) => new Zt({
6793
+ St.create = (n, e) => new St({
6787
6794
  innerType: n,
6788
6795
  typeName: b.ZodDefault,
6789
6796
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
6790
6797
  ...O(e)
6791
6798
  });
6792
- class jt extends Z {
6799
+ class Zt extends Z {
6793
6800
  _parse(e) {
6794
6801
  const { ctx: t } = this._processInputParams(e), s = {
6795
6802
  ...t,
@@ -6804,7 +6811,7 @@ class jt extends Z {
6804
6811
  ...s
6805
6812
  }
6806
6813
  });
6807
- return gt(r) ? r.then((a) => ({
6814
+ return _t(r) ? r.then((a) => ({
6808
6815
  status: "valid",
6809
6816
  value: a.status === "valid" ? a.value : this._def.catchValue({
6810
6817
  get error() {
@@ -6826,7 +6833,7 @@ class jt extends Z {
6826
6833
  return this._def.innerType;
6827
6834
  }
6828
6835
  }
6829
- jt.create = (n, e) => new jt({
6836
+ Zt.create = (n, e) => new Zt({
6830
6837
  innerType: n,
6831
6838
  typeName: b.ZodCatch,
6832
6839
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
@@ -6849,7 +6856,7 @@ qt.create = (n) => new qt({
6849
6856
  typeName: b.ZodNaN,
6850
6857
  ...O(n)
6851
6858
  });
6852
- const qa = Symbol("zod_brand");
6859
+ const Ja = Symbol("zod_brand");
6853
6860
  class pn extends Z {
6854
6861
  _parse(e) {
6855
6862
  const { ctx: t } = this._processInputParams(e), s = t.data;
@@ -6863,7 +6870,7 @@ class pn extends Z {
6863
6870
  return this._def.type;
6864
6871
  }
6865
6872
  }
6866
- class It extends Z {
6873
+ class Ct extends Z {
6867
6874
  _parse(e) {
6868
6875
  const { status: t, ctx: s } = this._processInputParams(e);
6869
6876
  if (s.common.async)
@@ -6873,7 +6880,7 @@ class It extends Z {
6873
6880
  path: s.path,
6874
6881
  parent: s
6875
6882
  });
6876
- return a.status === "aborted" ? k : a.status === "dirty" ? (t.dirty(), Ue(a.value)) : this._def.out._parseAsync({
6883
+ return a.status === "aborted" ? k : a.status === "dirty" ? (t.dirty(), Ve(a.value)) : this._def.out._parseAsync({
6877
6884
  data: a.value,
6878
6885
  path: s.path,
6879
6886
  parent: s
@@ -6896,71 +6903,71 @@ class It extends Z {
6896
6903
  }
6897
6904
  }
6898
6905
  static create(e, t) {
6899
- return new It({
6906
+ return new Ct({
6900
6907
  in: e,
6901
6908
  out: t,
6902
6909
  typeName: b.ZodPipeline
6903
6910
  });
6904
6911
  }
6905
6912
  }
6906
- class Nt extends Z {
6913
+ class jt extends Z {
6907
6914
  _parse(e) {
6908
- const t = this._def.innerType._parse(e), s = (r) => (_t(r) && (r.value = Object.freeze(r.value)), r);
6909
- return gt(t) ? t.then((r) => s(r)) : s(t);
6915
+ const t = this._def.innerType._parse(e), s = (r) => (mt(r) && (r.value = Object.freeze(r.value)), r);
6916
+ return _t(t) ? t.then((r) => s(r)) : s(t);
6910
6917
  }
6911
6918
  unwrap() {
6912
6919
  return this._def.innerType;
6913
6920
  }
6914
6921
  }
6915
- Nt.create = (n, e) => new Nt({
6922
+ jt.create = (n, e) => new jt({
6916
6923
  innerType: n,
6917
6924
  typeName: b.ZodReadonly,
6918
6925
  ...O(e)
6919
6926
  });
6920
- function Wn(n, e = {}, t) {
6921
- return n ? Ke.create().superRefine((s, r) => {
6927
+ function Bn(n, e = {}, t) {
6928
+ return n ? Je.create().superRefine((s, r) => {
6922
6929
  var a, o;
6923
6930
  if (!n(s)) {
6924
6931
  const c = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, d = (o = (a = c.fatal) !== null && a !== void 0 ? a : t) !== null && o !== void 0 ? o : !0, u = typeof c == "string" ? { message: c } : c;
6925
6932
  r.addIssue({ code: "custom", ...u, fatal: d });
6926
6933
  }
6927
- }) : Ke.create();
6934
+ }) : Je.create();
6928
6935
  }
6929
- const Ja = {
6936
+ const Ka = {
6930
6937
  object: E.lazycreate
6931
6938
  };
6932
6939
  var b;
6933
6940
  (function(n) {
6934
6941
  n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
6935
6942
  })(b || (b = {}));
6936
- const Ka = (n, e = {
6943
+ const Ha = (n, e = {
6937
6944
  message: `Input not instance of ${n.name}`
6938
- }) => Wn((t) => t instanceof n, e), qn = z.create, Jn = ye.create, Ha = qt.create, Qa = ve.create, Kn = yt.create, Ya = Ce.create, Ga = zt.create, Xa = vt.create, ei = wt.create, ti = Ke.create, ni = Ze.create, si = ae.create, ri = Bt.create, ai = W.create, ii = E.create, oi = E.strictCreate, ci = bt.create, di = Kt.create, ui = kt.create, li = ne.create, pi = xt.create, hi = Wt.create, fi = Ie.create, mi = ze.create, _i = Tt.create, gi = Ot.create, yi = we.create, vi = St.create, wi = He.create, vn = J.create, bi = G.create, ki = be.create, xi = J.createWithPreprocess, Ti = It.create, Oi = () => qn().optional(), Si = () => Jn().optional(), Zi = () => Kn().optional(), ji = {
6945
+ }) => Bn((t) => t instanceof n, e), Wn = z.create, qn = ye.create, Qa = qt.create, Ya = ve.create, Jn = gt.create, Ga = Ce.create, Xa = zt.create, ei = yt.create, ti = vt.create, ni = Je.create, si = Ze.create, ri = ae.create, ai = Bt.create, ii = W.create, oi = E.create, ci = E.strictCreate, di = wt.create, ui = Kt.create, li = bt.create, pi = ne.create, hi = kt.create, fi = Wt.create, mi = Ie.create, _i = Fe.create, gi = xt.create, yi = Tt.create, vi = we.create, wi = Ot.create, bi = Ke.create, yn = J.create, ki = G.create, xi = be.create, Ti = J.createWithPreprocess, Oi = Ct.create, Si = () => Wn().optional(), Zi = () => qn().optional(), ji = () => Jn().optional(), Ni = {
6939
6946
  string: (n) => z.create({ ...n, coerce: !0 }),
6940
6947
  number: (n) => ye.create({ ...n, coerce: !0 }),
6941
- boolean: (n) => yt.create({
6948
+ boolean: (n) => gt.create({
6942
6949
  ...n,
6943
6950
  coerce: !0
6944
6951
  }),
6945
6952
  bigint: (n) => ve.create({ ...n, coerce: !0 }),
6946
6953
  date: (n) => Ce.create({ ...n, coerce: !0 })
6947
- }, Ni = k;
6948
- var Ci = /* @__PURE__ */ Object.freeze({
6954
+ }, Ci = k;
6955
+ var Ii = /* @__PURE__ */ Object.freeze({
6949
6956
  __proto__: null,
6950
- defaultErrorMap: Je,
6951
- setErrorMap: Na,
6957
+ defaultErrorMap: qe,
6958
+ setErrorMap: Ca,
6952
6959
  getErrorMap: Vt,
6953
6960
  makeIssue: Ut,
6954
- EMPTY_PATH: Ca,
6961
+ EMPTY_PATH: Ia,
6955
6962
  addIssueToContext: m,
6956
6963
  ParseStatus: P,
6957
6964
  INVALID: k,
6958
- DIRTY: Ue,
6965
+ DIRTY: Ve,
6959
6966
  OK: M,
6960
6967
  isAborted: rn,
6961
6968
  isDirty: an,
6962
- isValid: _t,
6963
- isAsync: gt,
6969
+ isValid: mt,
6970
+ isAsync: _t,
6964
6971
  get util() {
6965
6972
  return C;
6966
6973
  },
@@ -6970,107 +6977,107 @@ var Ci = /* @__PURE__ */ Object.freeze({
6970
6977
  ZodParsedType: g,
6971
6978
  getParsedType: he,
6972
6979
  ZodType: Z,
6973
- datetimeRegex: zn,
6980
+ datetimeRegex: Fn,
6974
6981
  ZodString: z,
6975
6982
  ZodNumber: ye,
6976
6983
  ZodBigInt: ve,
6977
- ZodBoolean: yt,
6984
+ ZodBoolean: gt,
6978
6985
  ZodDate: Ce,
6979
6986
  ZodSymbol: zt,
6980
- ZodUndefined: vt,
6981
- ZodNull: wt,
6982
- ZodAny: Ke,
6987
+ ZodUndefined: yt,
6988
+ ZodNull: vt,
6989
+ ZodAny: Je,
6983
6990
  ZodUnknown: Ze,
6984
6991
  ZodNever: ae,
6985
6992
  ZodVoid: Bt,
6986
6993
  ZodArray: W,
6987
6994
  ZodObject: E,
6988
- ZodUnion: bt,
6995
+ ZodUnion: wt,
6989
6996
  ZodDiscriminatedUnion: Kt,
6990
- ZodIntersection: kt,
6997
+ ZodIntersection: bt,
6991
6998
  ZodTuple: ne,
6992
- ZodRecord: xt,
6999
+ ZodRecord: kt,
6993
7000
  ZodMap: Wt,
6994
7001
  ZodSet: Ie,
6995
- ZodFunction: ze,
6996
- ZodLazy: Tt,
6997
- ZodLiteral: Ot,
7002
+ ZodFunction: Fe,
7003
+ ZodLazy: xt,
7004
+ ZodLiteral: Tt,
6998
7005
  ZodEnum: we,
6999
- ZodNativeEnum: St,
7000
- ZodPromise: He,
7006
+ ZodNativeEnum: Ot,
7007
+ ZodPromise: Ke,
7001
7008
  ZodEffects: J,
7002
7009
  ZodTransformer: J,
7003
7010
  ZodOptional: G,
7004
7011
  ZodNullable: be,
7005
- ZodDefault: Zt,
7006
- ZodCatch: jt,
7012
+ ZodDefault: St,
7013
+ ZodCatch: Zt,
7007
7014
  ZodNaN: qt,
7008
- BRAND: qa,
7015
+ BRAND: Ja,
7009
7016
  ZodBranded: pn,
7010
- ZodPipeline: It,
7011
- ZodReadonly: Nt,
7012
- custom: Wn,
7017
+ ZodPipeline: Ct,
7018
+ ZodReadonly: jt,
7019
+ custom: Bn,
7013
7020
  Schema: Z,
7014
7021
  ZodSchema: Z,
7015
- late: Ja,
7022
+ late: Ka,
7016
7023
  get ZodFirstPartyTypeKind() {
7017
7024
  return b;
7018
7025
  },
7019
- coerce: ji,
7020
- any: ti,
7021
- array: ai,
7022
- bigint: Qa,
7023
- boolean: Kn,
7024
- date: Ya,
7025
- discriminatedUnion: di,
7026
- effect: vn,
7027
- enum: yi,
7028
- function: mi,
7029
- instanceof: Ka,
7030
- intersection: ui,
7031
- lazy: _i,
7032
- literal: gi,
7033
- map: hi,
7034
- nan: Ha,
7035
- nativeEnum: vi,
7036
- never: si,
7037
- null: ei,
7038
- nullable: ki,
7039
- number: Jn,
7040
- object: ii,
7041
- oboolean: Zi,
7042
- onumber: Si,
7043
- optional: bi,
7044
- ostring: Oi,
7045
- pipeline: Ti,
7046
- preprocess: xi,
7047
- promise: wi,
7048
- record: pi,
7049
- set: fi,
7050
- strictObject: oi,
7051
- string: qn,
7052
- symbol: Ga,
7053
- transformer: vn,
7054
- tuple: li,
7055
- undefined: Xa,
7056
- union: ci,
7057
- unknown: ni,
7058
- void: ri,
7059
- NEVER: Ni,
7026
+ coerce: Ni,
7027
+ any: ni,
7028
+ array: ii,
7029
+ bigint: Ya,
7030
+ boolean: Jn,
7031
+ date: Ga,
7032
+ discriminatedUnion: ui,
7033
+ effect: yn,
7034
+ enum: vi,
7035
+ function: _i,
7036
+ instanceof: Ha,
7037
+ intersection: li,
7038
+ lazy: gi,
7039
+ literal: yi,
7040
+ map: fi,
7041
+ nan: Qa,
7042
+ nativeEnum: wi,
7043
+ never: ri,
7044
+ null: ti,
7045
+ nullable: xi,
7046
+ number: qn,
7047
+ object: oi,
7048
+ oboolean: ji,
7049
+ onumber: Zi,
7050
+ optional: ki,
7051
+ ostring: Si,
7052
+ pipeline: Oi,
7053
+ preprocess: Ti,
7054
+ promise: bi,
7055
+ record: hi,
7056
+ set: mi,
7057
+ strictObject: ci,
7058
+ string: Wn,
7059
+ symbol: Xa,
7060
+ transformer: yn,
7061
+ tuple: pi,
7062
+ undefined: ei,
7063
+ union: di,
7064
+ unknown: si,
7065
+ void: ai,
7066
+ NEVER: Ci,
7060
7067
  ZodIssueCode: h,
7061
- quotelessJson: ja,
7068
+ quotelessJson: Na,
7062
7069
  ZodError: V
7063
7070
  });
7064
- Za(Ci);
7065
- function Re(n, e = "", t = {}) {
7071
+ ja(Ii);
7072
+ function It(n, e = "", t = {}) {
7066
7073
  for (let s in n)
7067
7074
  if (Object.prototype.hasOwnProperty.call(n, s)) {
7068
7075
  const r = e ? `${e}_${s}` : s;
7069
- typeof n[s] == "object" && n[s] !== null && !Array.isArray(n[s]) ? Re(n[s], r, t) : t[r] = n[s];
7076
+ typeof n[s] == "object" && n[s] !== null && !Array.isArray(n[s]) ? It(n[s], r, t) : t[r] = n[s];
7070
7077
  }
7071
7078
  return t;
7072
7079
  }
7073
- function hn(n, e) {
7080
+ function Kn(n, e) {
7074
7081
  const t = {};
7075
7082
  for (const [s, r] of Object.entries(n)) {
7076
7083
  const a = e.find(
@@ -7088,17 +7095,6 @@ function hn(n, e) {
7088
7095
  }
7089
7096
  return t;
7090
7097
  }
7091
- function Ii(n) {
7092
- return async (e, t) => {
7093
- const s = {
7094
- id: Ae(),
7095
- ...t,
7096
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
7097
- updated_at: (/* @__PURE__ */ new Date()).toISOString()
7098
- };
7099
- return await n.insertInto("connections").values({ ...Re(s), tenant_id: e }).execute(), s;
7100
- };
7101
- }
7102
7098
  function Ei(n) {
7103
7099
  return async (e, t) => {
7104
7100
  let s = n.selectFrom("connections").where("connections.tenant_id", "=", e);
@@ -7106,7 +7102,7 @@ function Ei(n) {
7106
7102
  const a = await s.offset(t.page * t.per_page).limit(t.per_page).selectAll().execute(), { count: o } = await s.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
7107
7103
  return {
7108
7104
  connections: a.map(
7109
- (c) => R(hn(c, ["options"]))
7105
+ (c) => R(Kn(c, ["options"]))
7110
7106
  ),
7111
7107
  start: t.page * t.per_page,
7112
7108
  limit: t.per_page,
@@ -7120,7 +7116,10 @@ function Ai(n) {
7120
7116
  function Ri(n) {
7121
7117
  return async (e, t) => {
7122
7118
  const s = await n.selectFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).selectAll().executeTakeFirst();
7123
- return s ? R(hn(s, ["options"])) : null;
7119
+ return s ? R({
7120
+ ...s,
7121
+ options: JSON.parse(s.options)
7122
+ }) : null;
7124
7123
  };
7125
7124
  }
7126
7125
  function $i(n) {
@@ -7129,12 +7128,15 @@ function $i(n) {
7129
7128
  ...s,
7130
7129
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
7131
7130
  };
7132
- return await n.updateTable("connections").set(Re(r)).where("connections.id", "=", t).where("connections.tenant_id", "=", e).execute(), !0;
7131
+ return await n.updateTable("connections").set({
7132
+ ...r,
7133
+ options: r.options ? JSON.stringify(r.options) : void 0
7134
+ }).where("connections.id", "=", t).where("connections.tenant_id", "=", e).execute(), !0;
7133
7135
  };
7134
7136
  }
7135
7137
  function Pi(n) {
7136
7138
  return {
7137
- create: Ii(n),
7139
+ create: Oa(n),
7138
7140
  get: Ri(n),
7139
7141
  list: Ei(n),
7140
7142
  remove: Ai(n),
@@ -7154,7 +7156,7 @@ function Di(n) {
7154
7156
  return {
7155
7157
  ...t,
7156
7158
  connections: r.map(
7157
- (c) => $n.parse(R(c))
7159
+ (c) => Rn.parse(R(c))
7158
7160
  ),
7159
7161
  domains: a,
7160
7162
  addons: t.addons ? JSON.parse(t.addons) : {},
@@ -7251,7 +7253,7 @@ function Wi(n) {
7251
7253
  }
7252
7254
  function qi(n) {
7253
7255
  return async (e, t) => {
7254
- var o, c, d, u, l, j, A, U, ie, $e, oe, ce, de, Pe, De, K, H, Q;
7256
+ var o, c, d, u, l, j, A, U, ie, Re, oe, ce, de, $e, Pe, K, H, Q;
7255
7257
  const { colors: s, font: r, ...a } = t;
7256
7258
  try {
7257
7259
  await n.insertInto("branding").values({
@@ -7268,9 +7270,9 @@ function qi(n) {
7268
7270
  await n.updateTable("branding").set({
7269
7271
  ...a,
7270
7272
  colors_primary: s == null ? void 0 : s.primary,
7271
- colors_page_background_type: (oe = ($e = t.colors) == null ? void 0 : $e.page_background) == null ? void 0 : oe.type,
7273
+ colors_page_background_type: (oe = (Re = t.colors) == null ? void 0 : Re.page_background) == null ? void 0 : oe.type,
7272
7274
  colors_page_background_start: (de = (ce = t.colors) == null ? void 0 : ce.page_background) == null ? void 0 : de.start,
7273
- colors_page_background_end: (De = (Pe = t.colors) == null ? void 0 : Pe.page_background) == null ? void 0 : De.end,
7275
+ colors_page_background_end: (Pe = ($e = t.colors) == null ? void 0 : $e.page_background) == null ? void 0 : Pe.end,
7274
7276
  colors_page_background_angle_dev: (H = (K = t.colors) == null ? void 0 : K.page_background) == null ? void 0 : H.angle_deg,
7275
7277
  font_url: (Q = t.font) == null ? void 0 : Q.url
7276
7278
  }).where("tenant_id", "=", e).execute();
@@ -7352,7 +7354,7 @@ function eo(n) {
7352
7354
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
7353
7355
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
7354
7356
  };
7355
- return await n.insertInto("themes").values({ ...Re(s), tenant_id: e }).execute(), s;
7357
+ return await n.insertInto("themes").values({ ...It(s), tenant_id: e }).execute(), s;
7356
7358
  };
7357
7359
  }
7358
7360
  function to(n) {
@@ -7366,7 +7368,7 @@ function no(n) {
7366
7368
  }
7367
7369
  function so(n) {
7368
7370
  return async (e, t, s) => {
7369
- const r = Re({
7371
+ const r = It({
7370
7372
  ...s,
7371
7373
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
7372
7374
  });
@@ -7385,7 +7387,7 @@ function ao(n) {
7385
7387
  return async (e, t) => {
7386
7388
  const s = (/* @__PURE__ */ new Date()).toISOString(), r = await n.selectFrom("logins").where("logins.expires_at", ">", s).where("logins.login_id", "=", t).selectAll().executeTakeFirst();
7387
7389
  return r ? xr.parse(
7388
- hn(R(r), ["authParams"])
7390
+ Kn(R(r), ["authParams"])
7389
7391
  ) : null;
7390
7392
  };
7391
7393
  }
@@ -7397,11 +7399,11 @@ function io(n) {
7397
7399
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
7398
7400
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
7399
7401
  };
7400
- return await n.insertInto("logins").values({ ...Re(s), tenant_id: e }).execute(), s;
7402
+ return await n.insertInto("logins").values({ ...It(s), tenant_id: e }).execute(), s;
7401
7403
  };
7402
7404
  }
7403
7405
  function oo(n) {
7404
- return async (e, t, s) => (await n.updateTable("logins").set(Re(s)).where("logins.login_id", "=", t).where("logins.tenant_id", "=", e).execute()).length === 1;
7406
+ return async (e, t, s) => (await n.updateTable("logins").set(It(s)).where("logins.login_id", "=", t).where("logins.tenant_id", "=", e).execute()).length === 1;
7405
7407
  }
7406
7408
  function co(n) {
7407
7409
  return async (e, t) => (await n.deleteFrom("logins").where("logins.tenant_id", "=", e).where("logins.login_id", "=", t).execute()).length > 0;
@@ -7425,7 +7427,7 @@ function lo(n) {
7425
7427
  });
7426
7428
  };
7427
7429
  }
7428
- function wn(n) {
7430
+ function vn(n) {
7429
7431
  return R({
7430
7432
  ...n,
7431
7433
  webauthn_platform_first_factor: n.webauthn_platform_first_factor ? !!n.webauthn_platform_first_factor : void 0,
@@ -7439,11 +7441,11 @@ function po(n) {
7439
7441
  try {
7440
7442
  const s = Rr.parse(t);
7441
7443
  await n.insertInto("prompt_settings").values({
7442
- ...wn(s),
7444
+ ...vn(s),
7443
7445
  tenant_id: e
7444
7446
  }).execute();
7445
7447
  } catch {
7446
- await n.updateTable("prompt_settings").set(wn(t)).where("tenant_id", "=", e).execute();
7448
+ await n.updateTable("prompt_settings").set(vn(t)).where("tenant_id", "=", e).execute();
7447
7449
  }
7448
7450
  };
7449
7451
  }