@jsdev_ninja/core 0.10.3 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.es.js CHANGED
@@ -101,7 +101,7 @@ const h = b.arrayToEnum([
101
101
  "invalid_intersection_types",
102
102
  "not_multiple_of",
103
103
  "not_finite"
104
- ]), qe = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
104
+ ]), Je = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
105
105
  class S extends Error {
106
106
  get errors() {
107
107
  return this.issues;
@@ -219,7 +219,7 @@ const J = (r, e) => {
219
219
  return { message: t };
220
220
  };
221
221
  let Pe = J;
222
- function Je(r) {
222
+ function Ye(r) {
223
223
  Pe = r;
224
224
  }
225
225
  function pe() {
@@ -245,7 +245,7 @@ const ye = (r) => {
245
245
  path: a,
246
246
  message: o
247
247
  };
248
- }, Ye = [];
248
+ }, He = [];
249
249
  function l(r, e) {
250
250
  const t = pe(), n = ye({
251
251
  issueData: e,
@@ -576,14 +576,14 @@ class _ {
576
576
  return this.safeParse(null).success;
577
577
  }
578
578
  }
579
- const He = /^c[^\s-]{8,}$/i, Ge = /^[0-9a-z]+$/, Qe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Xe = /^[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, Ke = /^[a-z0-9_-]{21}$/i, et = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, tt = /^[-+]?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)?)??$/, rt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, nt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
579
+ const Ge = /^c[^\s-]{8,}$/i, Qe = /^[0-9a-z]+$/, Xe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ke = /^[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, et = /^[a-z0-9_-]{21}$/i, tt = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, rt = /^[-+]?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)?)??$/, nt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, st = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
580
580
  let Te;
581
- const st = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]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2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, dt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ct = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Me = "((\\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])))", ut = new RegExp(`^${Me}$`);
581
+ const at = /^(?:(?: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])$/, it = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, ot = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}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4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ct = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ut = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Me = "((\\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])))", lt = new RegExp(`^${Me}$`);
582
582
  function Ve(r) {
583
583
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
584
584
  return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
585
585
  }
586
- function lt(r) {
586
+ function ft(r) {
587
587
  return new RegExp(`^${Ve(r)}$`);
588
588
  }
589
589
  function De(r) {
@@ -591,11 +591,11 @@ function De(r) {
591
591
  const t = [];
592
592
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
593
593
  }
594
- function ft(r, e) {
595
- return !!((e === "v4" || !e) && st.test(r) || (e === "v6" || !e) && it.test(r));
596
- }
597
594
  function ht(r, e) {
598
- if (!et.test(r))
595
+ return !!((e === "v4" || !e) && at.test(r) || (e === "v6" || !e) && ot.test(r));
596
+ }
597
+ function mt(r, e) {
598
+ if (!tt.test(r))
599
599
  return !1;
600
600
  try {
601
601
  const [t] = r.split("."), n = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), s = JSON.parse(atob(n));
@@ -604,8 +604,8 @@ function ht(r, e) {
604
604
  return !1;
605
605
  }
606
606
  }
607
- function mt(r, e) {
608
- return !!((e === "v4" || !e) && at.test(r) || (e === "v6" || !e) && ot.test(r));
607
+ function pt(r, e) {
608
+ return !!((e === "v4" || !e) && it.test(r) || (e === "v6" || !e) && dt.test(r));
609
609
  }
610
610
  class C extends _ {
611
611
  _parse(e) {
@@ -656,43 +656,43 @@ class C extends _ {
656
656
  message: a.message
657
657
  }), n.dirty());
658
658
  } else if (a.kind === "email")
659
- rt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
659
+ nt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
660
660
  validation: "email",
661
661
  code: c.invalid_string,
662
662
  message: a.message
663
663
  }), n.dirty());
664
664
  else if (a.kind === "emoji")
665
- Te || (Te = new RegExp(nt, "u")), Te.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
665
+ Te || (Te = new RegExp(st, "u")), Te.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
666
666
  validation: "emoji",
667
667
  code: c.invalid_string,
668
668
  message: a.message
669
669
  }), n.dirty());
670
670
  else if (a.kind === "uuid")
671
- Xe.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
671
+ Ke.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
672
672
  validation: "uuid",
673
673
  code: c.invalid_string,
674
674
  message: a.message
675
675
  }), n.dirty());
676
676
  else if (a.kind === "nanoid")
677
- Ke.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
677
+ et.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
678
678
  validation: "nanoid",
679
679
  code: c.invalid_string,
680
680
  message: a.message
681
681
  }), n.dirty());
682
682
  else if (a.kind === "cuid")
683
- He.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
683
+ Ge.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
684
684
  validation: "cuid",
685
685
  code: c.invalid_string,
686
686
  message: a.message
687
687
  }), n.dirty());
688
688
  else if (a.kind === "cuid2")
689
- Ge.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
689
+ Qe.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
690
690
  validation: "cuid2",
691
691
  code: c.invalid_string,
692
692
  message: a.message
693
693
  }), n.dirty());
694
694
  else if (a.kind === "ulid")
695
- Qe.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
695
+ Xe.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
696
696
  validation: "ulid",
697
697
  code: c.invalid_string,
698
698
  message: a.message
@@ -727,35 +727,35 @@ class C extends _ {
727
727
  code: c.invalid_string,
728
728
  validation: "datetime",
729
729
  message: a.message
730
- }), n.dirty()) : a.kind === "date" ? ut.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
730
+ }), n.dirty()) : a.kind === "date" ? lt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
731
731
  code: c.invalid_string,
732
732
  validation: "date",
733
733
  message: a.message
734
- }), n.dirty()) : a.kind === "time" ? lt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
734
+ }), n.dirty()) : a.kind === "time" ? ft(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
735
735
  code: c.invalid_string,
736
736
  validation: "time",
737
737
  message: a.message
738
- }), n.dirty()) : a.kind === "duration" ? tt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
738
+ }), n.dirty()) : a.kind === "duration" ? rt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
739
739
  validation: "duration",
740
740
  code: c.invalid_string,
741
741
  message: a.message
742
- }), n.dirty()) : a.kind === "ip" ? ft(e.data, a.version) || (s = this._getOrReturnCtx(e, s), l(s, {
742
+ }), n.dirty()) : a.kind === "ip" ? ht(e.data, a.version) || (s = this._getOrReturnCtx(e, s), l(s, {
743
743
  validation: "ip",
744
744
  code: c.invalid_string,
745
745
  message: a.message
746
- }), n.dirty()) : a.kind === "jwt" ? ht(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), l(s, {
746
+ }), n.dirty()) : a.kind === "jwt" ? mt(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), l(s, {
747
747
  validation: "jwt",
748
748
  code: c.invalid_string,
749
749
  message: a.message
750
- }), n.dirty()) : a.kind === "cidr" ? mt(e.data, a.version) || (s = this._getOrReturnCtx(e, s), l(s, {
750
+ }), n.dirty()) : a.kind === "cidr" ? pt(e.data, a.version) || (s = this._getOrReturnCtx(e, s), l(s, {
751
751
  validation: "cidr",
752
752
  code: c.invalid_string,
753
753
  message: a.message
754
- }), n.dirty()) : a.kind === "base64" ? dt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
754
+ }), n.dirty()) : a.kind === "base64" ? ct.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
755
755
  validation: "base64",
756
756
  code: c.invalid_string,
757
757
  message: a.message
758
- }), n.dirty()) : a.kind === "base64url" ? ct.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
758
+ }), n.dirty()) : a.kind === "base64url" ? ut.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
759
759
  validation: "base64url",
760
760
  code: c.invalid_string,
761
761
  message: a.message
@@ -994,7 +994,7 @@ C.create = (r) => {
994
994
  ...v(r)
995
995
  });
996
996
  };
997
- function pt(r, e) {
997
+ function yt(r, e) {
998
998
  const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = t > n ? t : n, a = parseInt(r.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
999
999
  return a % i / Math.pow(10, s);
1000
1000
  }
@@ -1033,7 +1033,7 @@ class $ extends _ {
1033
1033
  inclusive: a.inclusive,
1034
1034
  exact: !1,
1035
1035
  message: a.message
1036
- }), s.dirty()) : a.kind === "multipleOf" ? pt(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), l(n, {
1036
+ }), s.dirty()) : a.kind === "multipleOf" ? yt(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), l(n, {
1037
1037
  code: c.not_multiple_of,
1038
1038
  multipleOf: a.value,
1039
1039
  message: a.message
@@ -2742,7 +2742,7 @@ xe.create = (r) => new xe({
2742
2742
  typeName: y.ZodNaN,
2743
2743
  ...v(r)
2744
2744
  });
2745
- const yt = Symbol("zod_brand");
2745
+ const gt = Symbol("zod_brand");
2746
2746
  class Ie extends _ {
2747
2747
  _parse(e) {
2748
2748
  const { ctx: t } = this._processInputParams(e), n = t.data;
@@ -2832,16 +2832,16 @@ function ze(r, e = {}, t) {
2832
2832
  }
2833
2833
  }) : Y.create();
2834
2834
  }
2835
- const gt = {
2835
+ const vt = {
2836
2836
  object: x.lazycreate
2837
2837
  };
2838
2838
  var y;
2839
2839
  (function(r) {
2840
2840
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
2841
2841
  })(y || (y = {}));
2842
- const vt = (r, e = {
2842
+ const _t = (r, e = {
2843
2843
  message: `Input not instance of ${r.name}`
2844
- }) => ze((t) => t instanceof r, e), Ue = C.create, Fe = $.create, _t = xe.create, bt = M.create, Be = te.create, xt = U.create, kt = ve.create, wt = re.create, Tt = ne.create, Zt = Y.create, St = L.create, Ct = P.create, At = _e.create, It = A.create, Nt = x.create, Ot = x.strictCreate, jt = se.create, Et = ke.create, Rt = ae.create, Pt = j.create, $t = ie.create, Mt = be.create, Vt = F.create, Dt = q.create, Lt = oe.create, zt = de.create, Ut = V.create, Ft = ce.create, Bt = H.create, Re = I.create, Wt = N.create, qt = D.create, Jt = I.createWithPreprocess, Yt = he.create, Ht = () => Ue().optional(), Gt = () => Fe().optional(), Qt = () => Be().optional(), Xt = {
2844
+ }) => ze((t) => t instanceof r, e), Ue = C.create, Fe = $.create, bt = xe.create, xt = M.create, Be = te.create, kt = U.create, wt = ve.create, Tt = re.create, Zt = ne.create, St = Y.create, Ct = L.create, At = P.create, It = _e.create, Nt = A.create, Ot = x.create, jt = x.strictCreate, Et = se.create, Rt = ke.create, Pt = ae.create, $t = j.create, Mt = ie.create, Vt = be.create, Dt = F.create, Lt = q.create, zt = oe.create, Ut = de.create, Ft = V.create, Bt = ce.create, Wt = H.create, Re = I.create, qt = N.create, Jt = D.create, Yt = I.createWithPreprocess, Ht = he.create, Gt = () => Ue().optional(), Qt = () => Fe().optional(), Xt = () => Be().optional(), Kt = {
2845
2845
  string: (r) => C.create({ ...r, coerce: !0 }),
2846
2846
  number: (r) => $.create({ ...r, coerce: !0 }),
2847
2847
  boolean: (r) => te.create({
@@ -2850,14 +2850,14 @@ const vt = (r, e = {
2850
2850
  }),
2851
2851
  bigint: (r) => M.create({ ...r, coerce: !0 }),
2852
2852
  date: (r) => U.create({ ...r, coerce: !0 })
2853
- }, Kt = g;
2853
+ }, er = g;
2854
2854
  var d = /* @__PURE__ */ Object.freeze({
2855
2855
  __proto__: null,
2856
2856
  defaultErrorMap: J,
2857
- setErrorMap: Je,
2857
+ setErrorMap: Ye,
2858
2858
  getErrorMap: pe,
2859
2859
  makeIssue: ye,
2860
- EMPTY_PATH: Ye,
2860
+ EMPTY_PATH: He,
2861
2861
  addIssueToContext: l,
2862
2862
  ParseStatus: w,
2863
2863
  INVALID: g,
@@ -2911,63 +2911,63 @@ var d = /* @__PURE__ */ Object.freeze({
2911
2911
  ZodDefault: ue,
2912
2912
  ZodCatch: le,
2913
2913
  ZodNaN: xe,
2914
- BRAND: yt,
2914
+ BRAND: gt,
2915
2915
  ZodBranded: Ie,
2916
2916
  ZodPipeline: he,
2917
2917
  ZodReadonly: fe,
2918
2918
  custom: ze,
2919
2919
  Schema: _,
2920
2920
  ZodSchema: _,
2921
- late: gt,
2921
+ late: vt,
2922
2922
  get ZodFirstPartyTypeKind() {
2923
2923
  return y;
2924
2924
  },
2925
- coerce: Xt,
2926
- any: Zt,
2927
- array: It,
2928
- bigint: bt,
2925
+ coerce: Kt,
2926
+ any: St,
2927
+ array: Nt,
2928
+ bigint: xt,
2929
2929
  boolean: Be,
2930
- date: xt,
2931
- discriminatedUnion: Et,
2930
+ date: kt,
2931
+ discriminatedUnion: Rt,
2932
2932
  effect: Re,
2933
- enum: Ut,
2934
- function: Dt,
2935
- instanceof: vt,
2936
- intersection: Rt,
2937
- lazy: Lt,
2938
- literal: zt,
2939
- map: Mt,
2940
- nan: _t,
2941
- nativeEnum: Ft,
2942
- never: Ct,
2943
- null: Tt,
2944
- nullable: qt,
2933
+ enum: Ft,
2934
+ function: Lt,
2935
+ instanceof: _t,
2936
+ intersection: Pt,
2937
+ lazy: zt,
2938
+ literal: Ut,
2939
+ map: Vt,
2940
+ nan: bt,
2941
+ nativeEnum: Bt,
2942
+ never: At,
2943
+ null: Zt,
2944
+ nullable: Jt,
2945
2945
  number: Fe,
2946
- object: Nt,
2947
- oboolean: Qt,
2948
- onumber: Gt,
2949
- optional: Wt,
2950
- ostring: Ht,
2951
- pipeline: Yt,
2952
- preprocess: Jt,
2953
- promise: Bt,
2954
- record: $t,
2955
- set: Vt,
2956
- strictObject: Ot,
2946
+ object: Ot,
2947
+ oboolean: Xt,
2948
+ onumber: Qt,
2949
+ optional: qt,
2950
+ ostring: Gt,
2951
+ pipeline: Ht,
2952
+ preprocess: Yt,
2953
+ promise: Wt,
2954
+ record: Mt,
2955
+ set: Dt,
2956
+ strictObject: jt,
2957
2957
  string: Ue,
2958
- symbol: kt,
2958
+ symbol: wt,
2959
2959
  transformer: Re,
2960
- tuple: Pt,
2961
- undefined: wt,
2962
- union: jt,
2963
- unknown: St,
2964
- void: At,
2965
- NEVER: Kt,
2960
+ tuple: $t,
2961
+ undefined: Tt,
2962
+ union: Et,
2963
+ unknown: Ct,
2964
+ void: It,
2965
+ NEVER: er,
2966
2966
  ZodIssueCode: c,
2967
- quotelessJson: qe,
2967
+ quotelessJson: Je,
2968
2968
  ZodError: S
2969
2969
  });
2970
- const k = d.string().min(1, { message: "שדה חובה" }), ar = d.string().regex(/^\d+$/, "Must be a numeric string"), er = d.object({
2970
+ const k = d.string().min(1, { message: "שדה חובה" }), ir = d.string().regex(/^\d+$/, "Must be a numeric string"), tr = d.object({
2971
2971
  country: k,
2972
2972
  city: k,
2973
2973
  street: k,
@@ -2978,7 +2978,7 @@ const k = d.string().min(1, { message: "שדה חובה" }), ar = d.string().reg
2978
2978
  }), K = d.object({
2979
2979
  lang: d.enum(["he"]),
2980
2980
  value: d.string()
2981
- }), ir = d.array(K), We = d.object({
2981
+ }), or = d.array(K), We = d.object({
2982
2982
  id: d.string().min(1),
2983
2983
  companyId: d.string().min(1),
2984
2984
  storeId: d.string().min(1),
@@ -2988,7 +2988,7 @@ const k = d.string().min(1, { message: "שדה חובה" }), ar = d.string().reg
2988
2988
  depth: d.number()
2989
2989
  }), Ne = We.extend({
2990
2990
  children: d.lazy(() => Ne.array())
2991
- }), or = We.extend({
2991
+ }), dr = We.extend({
2992
2992
  index: d.number(),
2993
2993
  depth: d.number(),
2994
2994
  collapsed: d.boolean().optional(),
@@ -3045,9 +3045,9 @@ const k = d.string().min(1, { message: "שדה חובה" }), ar = d.string().reg
3045
3045
  }),
3046
3046
  // @deprecated
3047
3047
  categoryNames: d.array(d.string())
3048
- }), dr = Oe.extend({
3048
+ }), cr = Oe.extend({
3049
3049
  image: d.instanceof(File).optional()
3050
- }), cr = d.object({
3050
+ }), ur = d.object({
3051
3051
  type: d.literal("Cart"),
3052
3052
  id: d.string().uuid(),
3053
3053
  companyId: d.string().uuid(),
@@ -3060,18 +3060,18 @@ const k = d.string().min(1, { message: "שדה חובה" }), ar = d.string().reg
3060
3060
  amount: d.number().int().positive({ message: "Quantity must be a positive integer." })
3061
3061
  })
3062
3062
  )
3063
- }), ur = d.object({
3063
+ }), lr = d.object({
3064
3064
  id: d.string(),
3065
3065
  name: d.string(),
3066
3066
  websiteDomains: d.array(d.string())
3067
- }), lr = d.object({
3067
+ }), fr = d.object({
3068
3068
  type: d.literal("FavoriteProduct"),
3069
3069
  id: d.string().uuid(),
3070
3070
  companyId: d.string().uuid(),
3071
3071
  storeId: d.string().uuid(),
3072
3072
  userId: d.string().uuid(),
3073
3073
  productId: d.string().uuid()
3074
- }), tr = d.object({
3074
+ }), qe = d.enum(["default", "delayed"]), rr = d.object({
3075
3075
  type: d.literal("Profile"),
3076
3076
  id: k,
3077
3077
  companyId: k,
@@ -3081,12 +3081,13 @@ const k = d.string().min(1, { message: "שדה חובה" }), ar = d.string().reg
3081
3081
  displayName: k,
3082
3082
  email: d.string().email(),
3083
3083
  phoneNumber: k.optional(),
3084
- address: er.optional(),
3084
+ address: tr.optional(),
3085
3085
  isAnonymous: d.boolean(),
3086
3086
  createdDate: d.number(),
3087
- lastActivityDate: d.number()
3087
+ lastActivityDate: d.number(),
3088
+ paymentType: qe
3088
3089
  });
3089
- function fr() {
3090
+ function hr() {
3090
3091
  return {
3091
3092
  type: "Profile",
3092
3093
  id: "",
@@ -3108,10 +3109,11 @@ function fr() {
3108
3109
  },
3109
3110
  createdDate: 0,
3110
3111
  lastActivityDate: 0,
3111
- isAnonymous: !0
3112
+ isAnonymous: !0,
3113
+ paymentType: qe.Values.default
3112
3114
  };
3113
3115
  }
3114
- const hr = d.object({
3116
+ const mr = d.object({
3115
3117
  type: d.literal("Order"),
3116
3118
  id: k,
3117
3119
  companyId: k,
@@ -3147,7 +3149,7 @@ const hr = d.object({
3147
3149
  date: d.number(),
3148
3150
  deliveryDate: d.number().optional(),
3149
3151
  createdAt: d.number().optional(),
3150
- client: tr.required({})
3152
+ client: rr.required({})
3151
3153
  });
3152
3154
  d.object({
3153
3155
  id: d.string(),
@@ -3157,12 +3159,13 @@ d.object({
3157
3159
  logoUrl: d.string(),
3158
3160
  tenantId: d.string(),
3159
3161
  // firebase auth tenantId
3160
- paymentType: d.enum(["external", "j5"])
3162
+ paymentType: d.enum(["external", "j5"]),
3163
+ allowAnonymousClients: d.boolean()
3161
3164
  });
3162
- const rr = {
3165
+ const nr = {
3163
3166
  stores: "STORES",
3164
3167
  companies: "COMPANIES"
3165
- }, nr = {
3168
+ }, sr = {
3166
3169
  products: "products",
3167
3170
  profiles: "profiles",
3168
3171
  cart: "cart",
@@ -3172,9 +3175,9 @@ const rr = {
3172
3175
  favorites: "favorites",
3173
3176
  payments: "payments",
3174
3177
  settings: "settings"
3175
- }, sr = {
3176
- systemCollections: rr,
3177
- storeCollections: nr,
3178
+ }, ar = {
3179
+ systemCollections: nr,
3180
+ storeCollections: sr,
3178
3181
  // for client
3179
3182
  getPath: ({
3180
3183
  companyId: r,
@@ -3184,26 +3187,27 @@ const rr = {
3184
3187
  }) => `${r}/${e}/${t}${n ? `/${n}` : ""}`,
3185
3188
  // for backend
3186
3189
  getDocPath: (r) => `{companyId}/{storeId}/${r}/{id}`
3187
- }, mr = {
3188
- firestore: sr
3190
+ }, pr = {
3191
+ firestore: ar
3189
3192
  };
3190
3193
  export {
3191
- er as AddressSchema,
3194
+ tr as AddressSchema,
3192
3195
  We as BaseCategorySchema,
3193
- cr as CartSchema,
3196
+ ur as CartSchema,
3194
3197
  Ne as CategorySchema,
3195
- ur as CompanySchema,
3196
- lr as FavoriteProductSchema,
3197
- mr as FirebaseAPI,
3198
+ lr as CompanySchema,
3199
+ fr as FavoriteProductSchema,
3200
+ pr as FirebaseAPI,
3198
3201
  K as LocaleSchema,
3199
- ir as LocaleValueSchema,
3200
- dr as NewProductSchema,
3201
- hr as OrderSchema,
3202
+ or as LocaleValueSchema,
3203
+ cr as NewProductSchema,
3204
+ mr as OrderSchema,
3202
3205
  Oe as ProductSchema,
3203
- tr as ProfileSchema,
3204
- or as TFlattenCategorySchema,
3205
- fr as createEmptyProfile,
3206
+ qe as ProfilePaymentTypeSchema,
3207
+ rr as ProfileSchema,
3208
+ dr as TFlattenCategorySchema,
3209
+ hr as createEmptyProfile,
3206
3210
  k as notEmptyTextSchema,
3207
- ar as numericTextSchema
3211
+ ir as numericTextSchema
3208
3212
  };
3209
3213
  //# sourceMappingURL=core.es.js.map