@telemetryos/sdk 1.12.0 → 1.13.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.
package/dist/index.js CHANGED
@@ -223,11 +223,11 @@ const ae = (a, e) => {
223
223
  }
224
224
  return { message: t };
225
225
  };
226
- let qe = ae;
227
- function Me() {
228
- return qe;
226
+ let Fe = ae;
227
+ function qe() {
228
+ return Fe;
229
229
  }
230
- const Le = (a) => {
230
+ const Me = (a) => {
231
231
  const { data: e, path: t, errorMaps: s, issueData: n } = a, r = [...t, ...n.path || []], i = {
232
232
  ...n,
233
233
  path: r
@@ -249,7 +249,7 @@ const Le = (a) => {
249
249
  };
250
250
  };
251
251
  function d(a, e) {
252
- const t = Me(), s = Le({
252
+ const t = qe(), s = Me({
253
253
  issueData: e,
254
254
  data: a.data,
255
255
  path: a.path,
@@ -266,7 +266,7 @@ function d(a, e) {
266
266
  });
267
267
  a.common.issues.push(s);
268
268
  }
269
- let C = class $e {
269
+ class x {
270
270
  constructor() {
271
271
  this.value = "valid";
272
272
  }
@@ -294,7 +294,7 @@ let C = class $e {
294
294
  value: i
295
295
  });
296
296
  }
297
- return $e.mergeObjectSync(e, s);
297
+ return x.mergeObjectSync(e, s);
298
298
  }
299
299
  static mergeObjectSync(e, t) {
300
300
  const s = {};
@@ -306,10 +306,10 @@ let C = class $e {
306
306
  }
307
307
  return { status: e.value, value: s };
308
308
  }
309
- };
309
+ }
310
310
  const _ = Object.freeze({
311
311
  status: "aborted"
312
- }), re = (a) => ({ status: "dirty", value: a }), x = (a) => ({ status: "valid", value: a }), ye = (a) => a.status === "aborted", ve = (a) => a.status === "dirty", L = (a) => a.status === "valid", Y = (a) => typeof Promise < "u" && a instanceof Promise;
312
+ }), ie = (a) => ({ status: "dirty", value: a }), S = (a) => ({ status: "valid", value: a }), ye = (a) => a.status === "aborted", ve = (a) => a.status === "dirty", L = (a) => a.status === "valid", Y = (a) => typeof Promise < "u" && a instanceof Promise;
313
313
  var p;
314
314
  (function(a) {
315
315
  a.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, a.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
@@ -367,7 +367,7 @@ let v = class {
367
367
  }
368
368
  _processInputParams(e) {
369
369
  return {
370
- status: new C(),
370
+ status: new x(),
371
371
  ctx: {
372
372
  common: e.parent.common,
373
373
  data: e.data,
@@ -494,10 +494,10 @@ let v = class {
494
494
  };
495
495
  }
496
496
  optional() {
497
- return E.create(this, this._def);
497
+ return I.create(this, this._def);
498
498
  }
499
499
  nullable() {
500
- return V.create(this, this._def);
500
+ return H.create(this, this._def);
501
501
  }
502
502
  nullish() {
503
503
  return this.nullable().optional();
@@ -532,7 +532,7 @@ let v = class {
532
532
  });
533
533
  }
534
534
  brand() {
535
- return new ut({
535
+ return new ct({
536
536
  typeName: m.ZodBranded,
537
537
  type: this,
538
538
  ...y(this._def)
@@ -567,28 +567,28 @@ let v = class {
567
567
  return this.safeParse(null).success;
568
568
  }
569
569
  };
570
- const De = /^c[^\s-]{8,}$/i, Ve = /^[0-9a-z]+$/, ze = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Be = /^[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, Ue = /^[a-z0-9_-]{21}$/i, He = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ke = /^[-+]?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)?)??$/, We = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Je = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
570
+ const Le = /^c[^\s-]{8,}$/i, De = /^[0-9a-z]+$/, He = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ve = /^[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, ze = /^[a-z0-9_-]{21}$/i, Be = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ue = /^[-+]?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)?)??$/, Ke = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, We = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
571
571
  let ne;
572
- const Qe = /^(?:(?: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])$/, Ge = /^(?:(?: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])$/, Ye = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Xe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, et = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, tt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, je = "((\\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])))", st = new RegExp(`^${je}$`);
573
- function Pe(a) {
572
+ const Je = /^(?:(?: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])$/, Qe = /^(?:(?: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])$/, Ge = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ye = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Xe = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, et = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, $e = "((\\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])))", tt = new RegExp(`^${$e}$`);
573
+ function je(a) {
574
574
  let e = "[0-5]\\d";
575
575
  a.precision ? e = `${e}\\.\\d{${a.precision}}` : a.precision == null && (e = `${e}(\\.\\d+)?`);
576
576
  const t = a.precision ? "+" : "?";
577
577
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
578
578
  }
579
- function nt(a) {
580
- return new RegExp(`^${Pe(a)}$`);
579
+ function st(a) {
580
+ return new RegExp(`^${je(a)}$`);
581
581
  }
582
- function at(a) {
583
- let e = `${je}T${Pe(a)}`;
582
+ function nt(a) {
583
+ let e = `${$e}T${je(a)}`;
584
584
  const t = [];
585
585
  return t.push(a.local ? "Z?" : "Z"), a.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
586
586
  }
587
- function rt(a, e) {
588
- return !!((e === "v4" || !e) && Qe.test(a) || (e === "v6" || !e) && Ye.test(a));
587
+ function at(a, e) {
588
+ return !!((e === "v4" || !e) && Je.test(a) || (e === "v6" || !e) && Ge.test(a));
589
589
  }
590
590
  function it(a, e) {
591
- if (!He.test(a))
591
+ if (!Be.test(a))
592
592
  return !1;
593
593
  try {
594
594
  const [t] = a.split(".");
@@ -600,10 +600,10 @@ function it(a, e) {
600
600
  return !1;
601
601
  }
602
602
  }
603
- function ot(a, e) {
604
- return !!((e === "v4" || !e) && Ge.test(a) || (e === "v6" || !e) && Xe.test(a));
603
+ function rt(a, e) {
604
+ return !!((e === "v4" || !e) && Qe.test(a) || (e === "v6" || !e) && Ye.test(a));
605
605
  }
606
- class I extends v {
606
+ class E extends v {
607
607
  _parse(e) {
608
608
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== l.string) {
609
609
  const n = this._getOrReturnCtx(e);
@@ -613,7 +613,7 @@ class I extends v {
613
613
  received: n.parsedType
614
614
  }), _;
615
615
  }
616
- const t = new C();
616
+ const t = new x();
617
617
  let s;
618
618
  for (const n of this._def.checks)
619
619
  if (n.kind === "min")
@@ -652,43 +652,43 @@ class I extends v {
652
652
  message: n.message
653
653
  }), t.dirty());
654
654
  } else if (n.kind === "email")
655
- We.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
655
+ Ke.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
656
656
  validation: "email",
657
657
  code: u.invalid_string,
658
658
  message: n.message
659
659
  }), t.dirty());
660
660
  else if (n.kind === "emoji")
661
- ne || (ne = new RegExp(Je, "u")), ne.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
661
+ ne || (ne = new RegExp(We, "u")), ne.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
662
662
  validation: "emoji",
663
663
  code: u.invalid_string,
664
664
  message: n.message
665
665
  }), t.dirty());
666
666
  else if (n.kind === "uuid")
667
- Be.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
667
+ Ve.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
668
668
  validation: "uuid",
669
669
  code: u.invalid_string,
670
670
  message: n.message
671
671
  }), t.dirty());
672
672
  else if (n.kind === "nanoid")
673
- Ue.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
673
+ ze.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
674
674
  validation: "nanoid",
675
675
  code: u.invalid_string,
676
676
  message: n.message
677
677
  }), t.dirty());
678
678
  else if (n.kind === "cuid")
679
- De.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
679
+ Le.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
680
680
  validation: "cuid",
681
681
  code: u.invalid_string,
682
682
  message: n.message
683
683
  }), t.dirty());
684
684
  else if (n.kind === "cuid2")
685
- Ve.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
685
+ De.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
686
686
  validation: "cuid2",
687
687
  code: u.invalid_string,
688
688
  message: n.message
689
689
  }), t.dirty());
690
690
  else if (n.kind === "ulid")
691
- ze.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
691
+ He.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
692
692
  validation: "ulid",
693
693
  code: u.invalid_string,
694
694
  message: n.message
@@ -719,23 +719,23 @@ class I extends v {
719
719
  code: u.invalid_string,
720
720
  validation: { endsWith: n.value },
721
721
  message: n.message
722
- }), t.dirty()) : n.kind === "datetime" ? at(n).test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
722
+ }), t.dirty()) : n.kind === "datetime" ? nt(n).test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
723
723
  code: u.invalid_string,
724
724
  validation: "datetime",
725
725
  message: n.message
726
- }), t.dirty()) : n.kind === "date" ? st.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
726
+ }), t.dirty()) : n.kind === "date" ? tt.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
727
727
  code: u.invalid_string,
728
728
  validation: "date",
729
729
  message: n.message
730
- }), t.dirty()) : n.kind === "time" ? nt(n).test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
730
+ }), t.dirty()) : n.kind === "time" ? st(n).test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
731
731
  code: u.invalid_string,
732
732
  validation: "time",
733
733
  message: n.message
734
- }), t.dirty()) : n.kind === "duration" ? Ke.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
734
+ }), t.dirty()) : n.kind === "duration" ? Ue.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
735
735
  validation: "duration",
736
736
  code: u.invalid_string,
737
737
  message: n.message
738
- }), t.dirty()) : n.kind === "ip" ? rt(e.data, n.version) || (s = this._getOrReturnCtx(e, s), d(s, {
738
+ }), t.dirty()) : n.kind === "ip" ? at(e.data, n.version) || (s = this._getOrReturnCtx(e, s), d(s, {
739
739
  validation: "ip",
740
740
  code: u.invalid_string,
741
741
  message: n.message
@@ -743,15 +743,15 @@ class I extends v {
743
743
  validation: "jwt",
744
744
  code: u.invalid_string,
745
745
  message: n.message
746
- }), t.dirty()) : n.kind === "cidr" ? ot(e.data, n.version) || (s = this._getOrReturnCtx(e, s), d(s, {
746
+ }), t.dirty()) : n.kind === "cidr" ? rt(e.data, n.version) || (s = this._getOrReturnCtx(e, s), d(s, {
747
747
  validation: "cidr",
748
748
  code: u.invalid_string,
749
749
  message: n.message
750
- }), t.dirty()) : n.kind === "base64" ? et.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
750
+ }), t.dirty()) : n.kind === "base64" ? Xe.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
751
751
  validation: "base64",
752
752
  code: u.invalid_string,
753
753
  message: n.message
754
- }), t.dirty()) : n.kind === "base64url" ? tt.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
754
+ }), t.dirty()) : n.kind === "base64url" ? et.test(e.data) || (s = this._getOrReturnCtx(e, s), d(s, {
755
755
  validation: "base64url",
756
756
  code: u.invalid_string,
757
757
  message: n.message
@@ -766,7 +766,7 @@ class I extends v {
766
766
  });
767
767
  }
768
768
  _addCheck(e) {
769
- return new I({
769
+ return new E({
770
770
  ...this._def,
771
771
  checks: [...this._def.checks, e]
772
772
  });
@@ -902,19 +902,19 @@ class I extends v {
902
902
  return this.min(1, p.errToObj(e));
903
903
  }
904
904
  trim() {
905
- return new I({
905
+ return new E({
906
906
  ...this._def,
907
907
  checks: [...this._def.checks, { kind: "trim" }]
908
908
  });
909
909
  }
910
910
  toLowerCase() {
911
- return new I({
911
+ return new E({
912
912
  ...this._def,
913
913
  checks: [...this._def.checks, { kind: "toLowerCase" }]
914
914
  });
915
915
  }
916
916
  toUpperCase() {
917
- return new I({
917
+ return new E({
918
918
  ...this._def,
919
919
  checks: [...this._def.checks, { kind: "toUpperCase" }]
920
920
  });
@@ -980,17 +980,17 @@ class I extends v {
980
980
  return e;
981
981
  }
982
982
  }
983
- I.create = (a) => new I({
983
+ E.create = (a) => new E({
984
984
  checks: [],
985
985
  typeName: m.ZodString,
986
986
  coerce: (a == null ? void 0 : a.coerce) ?? !1,
987
987
  ...y(a)
988
988
  });
989
- function ct(a, e) {
989
+ function ot(a, e) {
990
990
  const t = (a.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, r = Number.parseInt(a.toFixed(n).replace(".", "")), i = Number.parseInt(e.toFixed(n).replace(".", ""));
991
991
  return r % i / 10 ** n;
992
992
  }
993
- let we = class ie extends v {
993
+ let we = class re extends v {
994
994
  constructor() {
995
995
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
996
996
  }
@@ -1004,7 +1004,7 @@ let we = class ie extends v {
1004
1004
  }), _;
1005
1005
  }
1006
1006
  let t;
1007
- const s = new C();
1007
+ const s = new x();
1008
1008
  for (const n of this._def.checks)
1009
1009
  n.kind === "int" ? b.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), d(t, {
1010
1010
  code: u.invalid_type,
@@ -1025,7 +1025,7 @@ let we = class ie extends v {
1025
1025
  inclusive: n.inclusive,
1026
1026
  exact: !1,
1027
1027
  message: n.message
1028
- }), s.dirty()) : n.kind === "multipleOf" ? ct(e.data, n.value) !== 0 && (t = this._getOrReturnCtx(e, t), d(t, {
1028
+ }), s.dirty()) : n.kind === "multipleOf" ? ot(e.data, n.value) !== 0 && (t = this._getOrReturnCtx(e, t), d(t, {
1029
1029
  code: u.not_multiple_of,
1030
1030
  multipleOf: n.value,
1031
1031
  message: n.message
@@ -1048,7 +1048,7 @@ let we = class ie extends v {
1048
1048
  return this.setLimit("max", e, !1, p.toString(t));
1049
1049
  }
1050
1050
  setLimit(e, t, s, n) {
1051
- return new ie({
1051
+ return new re({
1052
1052
  ...this._def,
1053
1053
  checks: [
1054
1054
  ...this._def.checks,
@@ -1062,7 +1062,7 @@ let we = class ie extends v {
1062
1062
  });
1063
1063
  }
1064
1064
  _addCheck(e) {
1065
- return new ie({
1065
+ return new re({
1066
1066
  ...this._def,
1067
1067
  checks: [...this._def.checks, e]
1068
1068
  });
@@ -1162,7 +1162,7 @@ we.create = (a) => new we({
1162
1162
  coerce: (a == null ? void 0 : a.coerce) || !1,
1163
1163
  ...y(a)
1164
1164
  });
1165
- class H extends v {
1165
+ class U extends v {
1166
1166
  constructor() {
1167
1167
  super(...arguments), this.min = this.gte, this.max = this.lte;
1168
1168
  }
@@ -1176,7 +1176,7 @@ class H extends v {
1176
1176
  if (this._getType(e) !== l.bigint)
1177
1177
  return this._getInvalidInput(e);
1178
1178
  let t;
1179
- const s = new C();
1179
+ const s = new x();
1180
1180
  for (const n of this._def.checks)
1181
1181
  n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (t = this._getOrReturnCtx(e, t), d(t, {
1182
1182
  code: u.too_small,
@@ -1218,7 +1218,7 @@ class H extends v {
1218
1218
  return this.setLimit("max", e, !1, p.toString(t));
1219
1219
  }
1220
1220
  setLimit(e, t, s, n) {
1221
- return new H({
1221
+ return new U({
1222
1222
  ...this._def,
1223
1223
  checks: [
1224
1224
  ...this._def.checks,
@@ -1232,7 +1232,7 @@ class H extends v {
1232
1232
  });
1233
1233
  }
1234
1234
  _addCheck(e) {
1235
- return new H({
1235
+ return new U({
1236
1236
  ...this._def,
1237
1237
  checks: [...this._def.checks, e]
1238
1238
  });
@@ -1289,7 +1289,7 @@ class H extends v {
1289
1289
  return e;
1290
1290
  }
1291
1291
  }
1292
- H.create = (a) => new H({
1292
+ U.create = (a) => new U({
1293
1293
  checks: [],
1294
1294
  typeName: m.ZodBigInt,
1295
1295
  coerce: (a == null ? void 0 : a.coerce) ?? !1,
@@ -1305,7 +1305,7 @@ class ke extends v {
1305
1305
  received: t.parsedType
1306
1306
  }), _;
1307
1307
  }
1308
- return x(e.data);
1308
+ return S(e.data);
1309
1309
  }
1310
1310
  }
1311
1311
  ke.create = (a) => new ke({
@@ -1313,7 +1313,7 @@ ke.create = (a) => new ke({
1313
1313
  coerce: (a == null ? void 0 : a.coerce) || !1,
1314
1314
  ...y(a)
1315
1315
  });
1316
- let xe = class Fe extends v {
1316
+ let xe = class Pe extends v {
1317
1317
  _parse(e) {
1318
1318
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== l.date) {
1319
1319
  const n = this._getOrReturnCtx(e);
@@ -1329,7 +1329,7 @@ let xe = class Fe extends v {
1329
1329
  code: u.invalid_date
1330
1330
  }), _;
1331
1331
  }
1332
- const t = new C();
1332
+ const t = new x();
1333
1333
  let s;
1334
1334
  for (const n of this._def.checks)
1335
1335
  n.kind === "min" ? e.data.getTime() < n.value && (s = this._getOrReturnCtx(e, s), d(s, {
@@ -1353,7 +1353,7 @@ let xe = class Fe extends v {
1353
1353
  };
1354
1354
  }
1355
1355
  _addCheck(e) {
1356
- return new Fe({
1356
+ return new Pe({
1357
1357
  ...this._def,
1358
1358
  checks: [...this._def.checks, e]
1359
1359
  });
@@ -1401,14 +1401,14 @@ class Se extends v {
1401
1401
  received: t.parsedType
1402
1402
  }), _;
1403
1403
  }
1404
- return x(e.data);
1404
+ return S(e.data);
1405
1405
  }
1406
1406
  }
1407
1407
  Se.create = (a) => new Se({
1408
1408
  typeName: m.ZodSymbol,
1409
1409
  ...y(a)
1410
1410
  });
1411
- class Ne extends v {
1411
+ class Ce extends v {
1412
1412
  _parse(e) {
1413
1413
  if (this._getType(e) !== l.undefined) {
1414
1414
  const t = this._getOrReturnCtx(e);
@@ -1418,14 +1418,14 @@ class Ne extends v {
1418
1418
  received: t.parsedType
1419
1419
  }), _;
1420
1420
  }
1421
- return x(e.data);
1421
+ return S(e.data);
1422
1422
  }
1423
1423
  }
1424
- Ne.create = (a) => new Ne({
1424
+ Ce.create = (a) => new Ce({
1425
1425
  typeName: m.ZodUndefined,
1426
1426
  ...y(a)
1427
1427
  });
1428
- class Ce extends v {
1428
+ class Ne extends v {
1429
1429
  _parse(e) {
1430
1430
  if (this._getType(e) !== l.null) {
1431
1431
  const t = this._getOrReturnCtx(e);
@@ -1435,10 +1435,10 @@ class Ce extends v {
1435
1435
  received: t.parsedType
1436
1436
  }), _;
1437
1437
  }
1438
- return x(e.data);
1438
+ return S(e.data);
1439
1439
  }
1440
1440
  }
1441
- Ce.create = (a) => new Ce({
1441
+ Ne.create = (a) => new Ne({
1442
1442
  typeName: m.ZodNull,
1443
1443
  ...y(a)
1444
1444
  });
@@ -1447,7 +1447,7 @@ class oe extends v {
1447
1447
  super(...arguments), this._any = !0;
1448
1448
  }
1449
1449
  _parse(e) {
1450
- return x(e.data);
1450
+ return S(e.data);
1451
1451
  }
1452
1452
  }
1453
1453
  oe.create = (a) => new oe({
@@ -1459,7 +1459,7 @@ class Te extends v {
1459
1459
  super(...arguments), this._unknown = !0;
1460
1460
  }
1461
1461
  _parse(e) {
1462
- return x(e.data);
1462
+ return S(e.data);
1463
1463
  }
1464
1464
  }
1465
1465
  Te.create = (a) => new Te({
@@ -1490,7 +1490,7 @@ class Ze extends v {
1490
1490
  received: t.parsedType
1491
1491
  }), _;
1492
1492
  }
1493
- return x(e.data);
1493
+ return S(e.data);
1494
1494
  }
1495
1495
  }
1496
1496
  Ze.create = (a) => new Ze({
@@ -1533,9 +1533,9 @@ class T extends v {
1533
1533
  exact: !1,
1534
1534
  message: n.maxLength.message
1535
1535
  }), s.dirty()), t.common.async)
1536
- return Promise.all([...t.data].map((i, o) => n.type._parseAsync(new $(t, i, t.path, o)))).then((i) => C.mergeArray(s, i));
1536
+ return Promise.all([...t.data].map((i, o) => n.type._parseAsync(new $(t, i, t.path, o)))).then((i) => x.mergeArray(s, i));
1537
1537
  const r = [...t.data].map((i, o) => n.type._parseSync(new $(t, i, t.path, o)));
1538
- return C.mergeArray(s, r);
1538
+ return x.mergeArray(s, r);
1539
1539
  }
1540
1540
  get element() {
1541
1541
  return this._def.type;
@@ -1575,7 +1575,7 @@ function M(a) {
1575
1575
  const e = {};
1576
1576
  for (const t in a.shape) {
1577
1577
  const s = a.shape[t];
1578
- e[t] = E.create(M(s));
1578
+ e[t] = I.create(M(s));
1579
1579
  }
1580
1580
  return new O({
1581
1581
  ...a._def,
@@ -1584,7 +1584,7 @@ function M(a) {
1584
1584
  } else return a instanceof T ? new T({
1585
1585
  ...a._def,
1586
1586
  type: M(a.element)
1587
- }) : a instanceof E ? E.create(M(a.unwrap())) : a instanceof V ? V.create(M(a.unwrap())) : a instanceof q ? q.create(a.items.map((e) => M(e))) : a;
1587
+ }) : a instanceof I ? I.create(M(a.unwrap())) : a instanceof H ? H.create(M(a.unwrap())) : a instanceof q ? q.create(a.items.map((e) => M(e))) : a;
1588
1588
  }
1589
1589
  let O = class N extends v {
1590
1590
  constructor() {
@@ -1657,7 +1657,7 @@ let O = class N extends v {
1657
1657
  });
1658
1658
  }
1659
1659
  return c;
1660
- }).then((c) => C.mergeObjectSync(t, c)) : C.mergeObjectSync(t, o);
1660
+ }).then((c) => x.mergeObjectSync(t, c)) : x.mergeObjectSync(t, o);
1661
1661
  }
1662
1662
  get shape() {
1663
1663
  return this._def.shape();
@@ -1840,7 +1840,7 @@ let O = class N extends v {
1840
1840
  t[s] = this.shape[s];
1841
1841
  else {
1842
1842
  let n = this.shape[s];
1843
- for (; n instanceof E; )
1843
+ for (; n instanceof I; )
1844
1844
  n = n._def.innerType;
1845
1845
  t[s] = n;
1846
1846
  }
@@ -2039,7 +2039,7 @@ class q extends v {
2039
2039
  const o = this._def.items[i] || this._def.rest;
2040
2040
  return o ? o._parse(new $(s, r, s.path, i)) : null;
2041
2041
  }).filter((r) => !!r);
2042
- return s.common.async ? Promise.all(n).then((r) => C.mergeArray(t, r)) : C.mergeArray(t, n);
2042
+ return s.common.async ? Promise.all(n).then((r) => x.mergeArray(t, r)) : x.mergeArray(t, n);
2043
2043
  }
2044
2044
  get items() {
2045
2045
  return this._def.items;
@@ -2233,7 +2233,7 @@ let fe = class de extends v {
2233
2233
  options: s
2234
2234
  }), _;
2235
2235
  }
2236
- return x(e.data);
2236
+ return S(e.data);
2237
2237
  }
2238
2238
  get options() {
2239
2239
  return this._def.values;
@@ -2270,7 +2270,7 @@ let fe = class de extends v {
2270
2270
  }
2271
2271
  };
2272
2272
  fe.create = Re;
2273
- class Ie extends v {
2273
+ class Ee extends v {
2274
2274
  _parse(e) {
2275
2275
  const t = b.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
2276
2276
  if (s.parsedType !== l.string && s.parsedType !== l.number) {
@@ -2289,13 +2289,13 @@ class Ie extends v {
2289
2289
  options: n
2290
2290
  }), _;
2291
2291
  }
2292
- return x(e.data);
2292
+ return S(e.data);
2293
2293
  }
2294
2294
  get enum() {
2295
2295
  return this._def.values;
2296
2296
  }
2297
2297
  }
2298
- Ie.create = (a, e) => new Ie({
2298
+ Ee.create = (a, e) => new Ee({
2299
2299
  values: a,
2300
2300
  typeName: m.ZodNativeEnum,
2301
2301
  ...y(e)
@@ -2313,7 +2313,7 @@ let te = class extends v {
2313
2313
  received: t.parsedType
2314
2314
  }), _;
2315
2315
  const s = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
2316
- return x(s.then((n) => this._def.type.parseAsync(n, {
2316
+ return S(s.then((n) => this._def.type.parseAsync(n, {
2317
2317
  path: t.path,
2318
2318
  errorMap: t.common.contextualErrorMap
2319
2319
  })));
@@ -2351,7 +2351,7 @@ let D = class extends v {
2351
2351
  path: s.path,
2352
2352
  parent: s
2353
2353
  });
2354
- return c.status === "aborted" ? _ : c.status === "dirty" || t.value === "dirty" ? re(c.value) : c;
2354
+ return c.status === "aborted" ? _ : c.status === "dirty" || t.value === "dirty" ? ie(c.value) : c;
2355
2355
  });
2356
2356
  {
2357
2357
  if (t.value === "aborted")
@@ -2361,7 +2361,7 @@ let D = class extends v {
2361
2361
  path: s.path,
2362
2362
  parent: s
2363
2363
  });
2364
- return o.status === "aborted" ? _ : o.status === "dirty" || t.value === "dirty" ? re(o.value) : o;
2364
+ return o.status === "aborted" ? _ : o.status === "dirty" || t.value === "dirty" ? ie(o.value) : o;
2365
2365
  }
2366
2366
  }
2367
2367
  if (n.type === "refinement") {
@@ -2416,28 +2416,28 @@ D.createWithPreprocess = (a, e, t) => new D({
2416
2416
  typeName: m.ZodEffects,
2417
2417
  ...y(t)
2418
2418
  });
2419
- let E = class extends v {
2419
+ let I = class extends v {
2420
2420
  _parse(e) {
2421
- return this._getType(e) === l.undefined ? x(void 0) : this._def.innerType._parse(e);
2421
+ return this._getType(e) === l.undefined ? S(void 0) : this._def.innerType._parse(e);
2422
2422
  }
2423
2423
  unwrap() {
2424
2424
  return this._def.innerType;
2425
2425
  }
2426
2426
  };
2427
- E.create = (a, e) => new E({
2427
+ I.create = (a, e) => new I({
2428
2428
  innerType: a,
2429
2429
  typeName: m.ZodOptional,
2430
2430
  ...y(e)
2431
2431
  });
2432
- let V = class extends v {
2432
+ let H = class extends v {
2433
2433
  _parse(e) {
2434
- return this._getType(e) === l.null ? x(null) : this._def.innerType._parse(e);
2434
+ return this._getType(e) === l.null ? S(null) : this._def.innerType._parse(e);
2435
2435
  }
2436
2436
  unwrap() {
2437
2437
  return this._def.innerType;
2438
2438
  }
2439
2439
  };
2440
- V.create = (a, e) => new V({
2440
+ H.create = (a, e) => new H({
2441
2441
  innerType: a,
2442
2442
  typeName: m.ZodNullable,
2443
2443
  ...y(e)
@@ -2505,7 +2505,7 @@ he.create = (a, e) => new he({
2505
2505
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2506
2506
  ...y(e)
2507
2507
  });
2508
- class Ee extends v {
2508
+ class Ie extends v {
2509
2509
  _parse(e) {
2510
2510
  if (this._getType(e) !== l.nan) {
2511
2511
  const t = this._getOrReturnCtx(e);
@@ -2518,11 +2518,11 @@ class Ee extends v {
2518
2518
  return { status: "valid", value: e.data };
2519
2519
  }
2520
2520
  }
2521
- Ee.create = (a) => new Ee({
2521
+ Ie.create = (a) => new Ie({
2522
2522
  typeName: m.ZodNaN,
2523
2523
  ...y(a)
2524
2524
  });
2525
- class ut extends v {
2525
+ class ct extends v {
2526
2526
  _parse(e) {
2527
2527
  const { ctx: t } = this._processInputParams(e), s = t.data;
2528
2528
  return this._def.type._parse({
@@ -2545,7 +2545,7 @@ class me extends v {
2545
2545
  path: s.path,
2546
2546
  parent: s
2547
2547
  });
2548
- return n.status === "aborted" ? _ : n.status === "dirty" ? (t.dirty(), re(n.value)) : this._def.out._parseAsync({
2548
+ return n.status === "aborted" ? _ : n.status === "dirty" ? (t.dirty(), ie(n.value)) : this._def.out._parseAsync({
2549
2549
  data: n.value,
2550
2550
  path: s.path,
2551
2551
  parent: s
@@ -2575,7 +2575,7 @@ class me extends v {
2575
2575
  });
2576
2576
  }
2577
2577
  }
2578
- class pe extends v {
2578
+ let pe = class extends v {
2579
2579
  _parse(e) {
2580
2580
  const t = this._def.innerType._parse(e), s = (n) => (L(n) && (n.value = Object.freeze(n.value)), n);
2581
2581
  return Y(t) ? t.then((n) => s(n)) : s(t);
@@ -2583,7 +2583,7 @@ class pe extends v {
2583
2583
  unwrap() {
2584
2584
  return this._def.innerType;
2585
2585
  }
2586
- }
2586
+ };
2587
2587
  pe.create = (a, e) => new pe({
2588
2588
  innerType: a,
2589
2589
  typeName: m.ZodReadonly,
@@ -2593,22 +2593,22 @@ var m;
2593
2593
  (function(a) {
2594
2594
  a.ZodString = "ZodString", a.ZodNumber = "ZodNumber", a.ZodNaN = "ZodNaN", a.ZodBigInt = "ZodBigInt", a.ZodBoolean = "ZodBoolean", a.ZodDate = "ZodDate", a.ZodSymbol = "ZodSymbol", a.ZodUndefined = "ZodUndefined", a.ZodNull = "ZodNull", a.ZodAny = "ZodAny", a.ZodUnknown = "ZodUnknown", a.ZodNever = "ZodNever", a.ZodVoid = "ZodVoid", a.ZodArray = "ZodArray", a.ZodObject = "ZodObject", a.ZodUnion = "ZodUnion", a.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", a.ZodIntersection = "ZodIntersection", a.ZodTuple = "ZodTuple", a.ZodRecord = "ZodRecord", a.ZodMap = "ZodMap", a.ZodSet = "ZodSet", a.ZodFunction = "ZodFunction", a.ZodLazy = "ZodLazy", a.ZodLiteral = "ZodLiteral", a.ZodEnum = "ZodEnum", a.ZodEffects = "ZodEffects", a.ZodNativeEnum = "ZodNativeEnum", a.ZodOptional = "ZodOptional", a.ZodNullable = "ZodNullable", a.ZodDefault = "ZodDefault", a.ZodCatch = "ZodCatch", a.ZodPromise = "ZodPromise", a.ZodBranded = "ZodBranded", a.ZodPipeline = "ZodPipeline", a.ZodReadonly = "ZodReadonly";
2595
2595
  })(m || (m = {}));
2596
- const dt = I.create, lt = oe.create;
2596
+ const ut = E.create, dt = oe.create;
2597
2597
  j.create;
2598
2598
  T.create;
2599
- const ht = O.create;
2599
+ const lt = O.create;
2600
2600
  X.create;
2601
2601
  ee.create;
2602
2602
  q.create;
2603
- const pt = ue.create;
2603
+ const ht = ue.create;
2604
2604
  fe.create;
2605
2605
  te.create;
2606
- E.create;
2607
- V.create;
2608
- const ft = "1.12.0", mt = {
2609
- version: ft
2606
+ I.create;
2607
+ H.create;
2608
+ const pt = "1.13.0", ft = {
2609
+ version: pt
2610
2610
  };
2611
- class _t {
2611
+ class mt {
2612
2612
  constructor(e) {
2613
2613
  this._client = e;
2614
2614
  }
@@ -2627,7 +2627,7 @@ class _t {
2627
2627
  return e.account;
2628
2628
  }
2629
2629
  }
2630
- class gt {
2630
+ class _t {
2631
2631
  constructor(e) {
2632
2632
  this._client = e;
2633
2633
  }
@@ -2722,7 +2722,7 @@ class gt {
2722
2722
  this._client._messageInterceptors.set(e, t);
2723
2723
  }
2724
2724
  }
2725
- class yt {
2725
+ class gt {
2726
2726
  constructor(e) {
2727
2727
  this._client = e;
2728
2728
  }
@@ -2766,7 +2766,7 @@ class yt {
2766
2766
  return e.capabilities;
2767
2767
  }
2768
2768
  }
2769
- class vt {
2769
+ class yt {
2770
2770
  constructor(e) {
2771
2771
  this._client = e;
2772
2772
  }
@@ -2780,7 +2780,7 @@ class vt {
2780
2780
  return (await this._client.unsubscribe("environment.unsubscribeColorScheme", {}, e)).success;
2781
2781
  }
2782
2782
  }
2783
- class bt {
2783
+ class vt {
2784
2784
  constructor(e) {
2785
2785
  this._client = e;
2786
2786
  }
@@ -2839,7 +2839,7 @@ class bt {
2839
2839
  })).selection;
2840
2840
  }
2841
2841
  }
2842
- class wt {
2842
+ class bt {
2843
2843
  constructor(e) {
2844
2844
  this._client = e;
2845
2845
  }
@@ -2881,14 +2881,14 @@ class wt {
2881
2881
  if (i.body !== null && i.body !== void 0)
2882
2882
  if (i.bodyType === "binary") {
2883
2883
  const g = atob(i.body), w = new Uint8Array(g.length);
2884
- for (let S = 0; S < g.length; S++)
2885
- w[S] = g.charCodeAt(S);
2884
+ for (let C = 0; C < g.length; C++)
2885
+ w[C] = g.charCodeAt(C);
2886
2886
  h = w;
2887
2887
  } else i.bodyType === "text" ? h = i.body : i.bodyType === "json" && (h = JSON.stringify(i.body));
2888
2888
  return new Response(h, c);
2889
2889
  }
2890
2890
  }
2891
- class kt {
2891
+ class wt {
2892
2892
  constructor(e) {
2893
2893
  this._client = e;
2894
2894
  }
@@ -3044,7 +3044,7 @@ class W {
3044
3044
  })).success;
3045
3045
  }
3046
3046
  }
3047
- class xt {
3047
+ class kt {
3048
3048
  constructor(e) {
3049
3049
  this._client = e;
3050
3050
  }
@@ -3067,7 +3067,7 @@ class xt {
3067
3067
  return e.user;
3068
3068
  }
3069
3069
  }
3070
- class St {
3070
+ class xt {
3071
3071
  constructor(e) {
3072
3072
  this._client = e;
3073
3073
  }
@@ -3210,7 +3210,7 @@ class St {
3210
3210
  return t;
3211
3211
  }
3212
3212
  }
3213
- class Nt {
3213
+ class St {
3214
3214
  constructor(e) {
3215
3215
  this._client = e;
3216
3216
  }
@@ -3321,13 +3321,33 @@ class Ct {
3321
3321
  }, t)).success;
3322
3322
  }
3323
3323
  }
3324
+ class Nt {
3325
+ constructor(e) {
3326
+ this._originalPushState = null, this._originalReplaceState = null, this._popstateHandler = null, this._backHandler = null, this._forwardHandler = null, this._client = e;
3327
+ }
3328
+ bind() {
3329
+ typeof window > "u" || this._originalPushState || (this._originalPushState = history.pushState.bind(history), history.pushState = (...e) => {
3330
+ this._originalPushState(...e), this._sendLocationChanged();
3331
+ }, this._originalReplaceState = history.replaceState.bind(history), history.replaceState = (...e) => {
3332
+ this._originalReplaceState(...e), this._sendLocationChanged();
3333
+ }, this._popstateHandler = () => this._sendLocationChanged(), window.addEventListener("popstate", this._popstateHandler), this._backHandler = () => history.back(), this._forwardHandler = () => history.forward(), this._client.on("navigation.back", this._backHandler), this._client.on("navigation.forward", this._forwardHandler), this._sendLocationChanged());
3334
+ }
3335
+ unbind() {
3336
+ typeof window > "u" || (this._originalPushState && (history.pushState = this._originalPushState, this._originalPushState = null), this._originalReplaceState && (history.replaceState = this._originalReplaceState, this._originalReplaceState = null), this._popstateHandler && (window.removeEventListener("popstate", this._popstateHandler), this._popstateHandler = null), this._backHandler && (this._client.off("navigation.back", this._backHandler), this._backHandler = null), this._forwardHandler && (this._client.off("navigation.forward", this._forwardHandler), this._forwardHandler = null));
3337
+ }
3338
+ _sendLocationChanged() {
3339
+ this._client.send("navigation.locationChanged", {
3340
+ pathname: window.location.pathname
3341
+ });
3342
+ }
3343
+ }
3324
3344
  function J(a) {
3325
3345
  return { ...a, type: "client" };
3326
3346
  }
3327
- const Tt = ht({
3328
- type: pt("bridge"),
3329
- name: dt(),
3330
- data: lt()
3347
+ const Tt = lt({
3348
+ type: ht("bridge"),
3349
+ name: ut(),
3350
+ data: dt()
3331
3351
  });
3332
3352
  class Zt {
3333
3353
  /**
@@ -3386,9 +3406,9 @@ class Zt {
3386
3406
  return (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {};
3387
3407
  }
3388
3408
  }
3389
- const z = 1e3 * 30, _e = typeof window > "u" && typeof self < "u", U = _e ? self : window;
3390
- function B(a) {
3391
- _e ? self.postMessage(a) : U.parent.postMessage(a, "*");
3409
+ const V = 1e3 * 30, _e = typeof window > "u" && typeof self < "u", B = _e ? self : window;
3410
+ function z(a) {
3411
+ _e ? self.postMessage(a) : B.parent.postMessage(a, "*");
3392
3412
  }
3393
3413
  class Ot {
3394
3414
  /**
@@ -3402,7 +3422,7 @@ class Ot {
3402
3422
  * in your application's telemetry.config.json file
3403
3423
  */
3404
3424
  constructor(e) {
3405
- this._applicationName = e, this._applicationInstance = "", this._applicationSpecifier = "", this._messageInterceptors = /* @__PURE__ */ new Map(), this._onHandlers = /* @__PURE__ */ new Map(), this._onceHandlers = /* @__PURE__ */ new Map(), this._subscriptionNamesByHandler = /* @__PURE__ */ new Map(), this._subscriptionNamesBySubjectName = /* @__PURE__ */ new Map();
3425
+ this._applicationName = e, this._applicationInstance = "", this._applicationSpecifier = "", this._navigation = new Nt(this), this._messageInterceptors = /* @__PURE__ */ new Map(), this._onHandlers = /* @__PURE__ */ new Map(), this._onceHandlers = /* @__PURE__ */ new Map(), this._subscriptionNamesByHandler = /* @__PURE__ */ new Map(), this._subscriptionNamesBySubjectName = /* @__PURE__ */ new Map();
3406
3426
  }
3407
3427
  /**
3408
3428
  * Provides access to the accounts API for retrieving TelemetryOS account information.
@@ -3416,7 +3436,7 @@ class Ot {
3416
3436
  * @returns An Accounts instance bound to this client
3417
3437
  */
3418
3438
  get accounts() {
3419
- return new _t(this);
3439
+ return new mt(this);
3420
3440
  }
3421
3441
  /**
3422
3442
  * Provides access to the users API for retrieving TelemetryOS user information.
@@ -3430,7 +3450,7 @@ class Ot {
3430
3450
  * @returns A Users instance bound to this client
3431
3451
  */
3432
3452
  get users() {
3433
- return new xt(this);
3453
+ return new kt(this);
3434
3454
  }
3435
3455
  /**
3436
3456
  * Provides access to the store API for data persistence with multiple storage scopes.
@@ -3444,7 +3464,7 @@ class Ot {
3444
3464
  * @returns A Store instance bound to this client
3445
3465
  */
3446
3466
  get store() {
3447
- return new kt(this);
3467
+ return new wt(this);
3448
3468
  }
3449
3469
  /**
3450
3470
  * Provides access to the applications API for discovering other TelemetryOS applications.
@@ -3458,7 +3478,7 @@ class Ot {
3458
3478
  * @returns An Applications instance bound to this client
3459
3479
  */
3460
3480
  get applications() {
3461
- return new gt(this);
3481
+ return new _t(this);
3462
3482
  }
3463
3483
  /**
3464
3484
  * Provides access to the media API for working with content hosted on the TelemetryOS platform.
@@ -3473,7 +3493,7 @@ class Ot {
3473
3493
  * @returns A Media instance bound to this client
3474
3494
  */
3475
3495
  get media() {
3476
- return new bt(this);
3496
+ return new vt(this);
3477
3497
  }
3478
3498
  /**
3479
3499
  * Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
@@ -3487,7 +3507,7 @@ class Ot {
3487
3507
  * @returns A Proxy instance bound to this client
3488
3508
  */
3489
3509
  get proxy() {
3490
- return new wt(this);
3510
+ return new bt(this);
3491
3511
  }
3492
3512
  /**
3493
3513
  * Provides access to the devices API for interacting with the current device.
@@ -3502,7 +3522,7 @@ class Ot {
3502
3522
  * @returns A Devices instance bound to this client
3503
3523
  */
3504
3524
  get devices() {
3505
- return new yt(this);
3525
+ return new gt(this);
3506
3526
  }
3507
3527
  /**
3508
3528
  * Provides access to the root settings navigation API for TelemetryOS administration UI integration.
@@ -3534,7 +3554,7 @@ class Ot {
3534
3554
  * @returns A Weather instance bound to this client
3535
3555
  */
3536
3556
  get weather() {
3537
- return new St(this);
3557
+ return new xt(this);
3538
3558
  }
3539
3559
  /**
3540
3560
  * Provides access to the currency API for retrieving currency exchange rates.
@@ -3548,7 +3568,7 @@ class Ot {
3548
3568
  * @returns A Currency instance bound to this client
3549
3569
  */
3550
3570
  get currency() {
3551
- return new Nt(this);
3571
+ return new St(this);
3552
3572
  }
3553
3573
  /**
3554
3574
  * Provides access to the environment API for accessing environment settings.
@@ -3562,7 +3582,7 @@ class Ot {
3562
3582
  * @returns An Environment instance bound to this client
3563
3583
  */
3564
3584
  get environment() {
3565
- return new vt(this);
3585
+ return new yt(this);
3566
3586
  }
3567
3587
  get mqtt() {
3568
3588
  return new Ct(this);
@@ -3593,7 +3613,7 @@ class Ot {
3593
3613
  */
3594
3614
  bind() {
3595
3615
  var e, t, s;
3596
- const n = new URL(U.location.href), r = n.searchParams;
3616
+ const n = new URL(B.location.href), r = n.searchParams;
3597
3617
  if (this._applicationInstance = (e = r.get("applicationInstance")) !== null && e !== void 0 ? e : "", !this._applicationInstance)
3598
3618
  throw new Error("Missing applicationInstance query parameter");
3599
3619
  if (this._applicationSpecifier = (t = r.get("applicationSpecifier")) !== null && t !== void 0 ? t : "", !this._applicationSpecifier) {
@@ -3603,16 +3623,20 @@ class Ot {
3603
3623
  if (!this._applicationSpecifier || this._applicationSpecifier.length !== 40)
3604
3624
  throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);
3605
3625
  this._windowMessageHandler = (i) => {
3606
- if (i.source === U || !i.data || typeof i.data != "object" || !("type" in i.data) || i.data.type !== "client" && i.data.type !== "bridge")
3626
+ if (i.source === B || !i.data || typeof i.data != "object" || !("type" in i.data) || i.data.type !== "client" && i.data.type !== "bridge")
3607
3627
  return;
3608
3628
  let o;
3609
3629
  if (i.data.type === "client") {
3610
3630
  const c = this._messageInterceptors.get(i.data.name);
3611
3631
  if (!c) {
3612
- B(i.data);
3632
+ z(i.data);
3613
3633
  return;
3614
3634
  }
3615
- o = { ...c(i.data.data), type: "bridge" };
3635
+ o = {
3636
+ ...c(i.data.data),
3637
+ type: "bridge",
3638
+ ...i.data.responseName ? { name: i.data.responseName } : {}
3639
+ };
3616
3640
  }
3617
3641
  if (!o) {
3618
3642
  const c = Tt.safeParse(i.data);
@@ -3632,7 +3656,7 @@ class Ot {
3632
3656
  if (!_e)
3633
3657
  for (let c = 0; c < window.frames.length; c += 1)
3634
3658
  window.frames[c].postMessage(o, "*");
3635
- }, U.addEventListener("message", this._windowMessageHandler);
3659
+ }, B.addEventListener("message", this._windowMessageHandler), this._navigation.bind();
3636
3660
  }
3637
3661
  /**
3638
3662
  * Removes the message event listener and cleans up resources.
@@ -3648,7 +3672,7 @@ class Ot {
3648
3672
  * of managing their own Client instances.
3649
3673
  */
3650
3674
  unbind() {
3651
- this._windowMessageHandler && U.removeEventListener("message", this._windowMessageHandler);
3675
+ this._windowMessageHandler && (this._navigation.unbind(), B.removeEventListener("message", this._windowMessageHandler));
3652
3676
  }
3653
3677
  /**
3654
3678
  * Sends a one-way message to the TelemetryOS platform.
@@ -3672,7 +3696,7 @@ class Ot {
3672
3696
  name: e,
3673
3697
  data: t
3674
3698
  });
3675
- B(s);
3699
+ z(s);
3676
3700
  }
3677
3701
  /**
3678
3702
  * Sends a message to the TelemetryOS platform and waits for a response.
@@ -3704,20 +3728,20 @@ class Ot {
3704
3728
  data: t,
3705
3729
  responseName: r
3706
3730
  });
3707
- B(i);
3708
- const o = (n = s == null ? void 0 : s.timeout) !== null && n !== void 0 ? n : z;
3731
+ z(i);
3732
+ const o = (n = s == null ? void 0 : s.timeout) !== null && n !== void 0 ? n : V;
3709
3733
  let c = !1, h;
3710
- const g = new Promise((S) => {
3734
+ const g = new Promise((C) => {
3711
3735
  h = (P) => {
3712
- c || S(P);
3736
+ c || C(P);
3713
3737
  }, this.once(r, h);
3714
3738
  });
3715
3739
  if (o === 0)
3716
3740
  return g;
3717
- const w = new Promise((S, P) => {
3718
- const F = new Error(`${e} message request with response name of ${r} timed out after ${o}`);
3741
+ const w = new Promise((C, P) => {
3742
+ const R = new Error(`${e} message request with response name of ${r} timed out after ${o}`);
3719
3743
  setTimeout(() => {
3720
- c = !0, this.off(r, h), P(F);
3744
+ c = !0, this.off(r, h), P(R);
3721
3745
  }, o);
3722
3746
  });
3723
3747
  return Promise.race([w, g]);
@@ -3738,19 +3762,19 @@ class Ot {
3738
3762
  responseName: o,
3739
3763
  subscriptionName: i
3740
3764
  });
3741
- B(h);
3765
+ z(h);
3742
3766
  let g = !1, w;
3743
- const S = new Promise((F, R) => {
3744
- const se = new Error(`${e} subscribe request with subscription name of ${i} and response name of ${o} timed out after ${z}`);
3767
+ const C = new Promise((R, F) => {
3768
+ const se = new Error(`${e} subscribe request with subscription name of ${i} and response name of ${o} timed out after ${V}`);
3745
3769
  setTimeout(() => {
3746
- g = !0, this.off(o, w), R(se);
3747
- }, z);
3748
- }), P = new Promise((F) => {
3749
- w = (R) => {
3750
- g || F(R);
3770
+ g = !0, this.off(o, w), F(se);
3771
+ }, V);
3772
+ }), P = new Promise((R) => {
3773
+ w = (F) => {
3774
+ g || R(F);
3751
3775
  }, this.once(o, w);
3752
3776
  });
3753
- return Promise.race([S, P]);
3777
+ return Promise.race([C, P]);
3754
3778
  }
3755
3779
  async unsubscribe(e, t, s) {
3756
3780
  let n, r;
@@ -3776,19 +3800,19 @@ class Ot {
3776
3800
  responseName: i,
3777
3801
  unsubscribeName: c
3778
3802
  });
3779
- B(h);
3803
+ z(h);
3780
3804
  let g = !1, w;
3781
- const S = new Promise((F, R) => {
3782
- const se = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${i} timed out after ${z}`);
3805
+ const C = new Promise((R, F) => {
3806
+ const se = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${i} timed out after ${V}`);
3783
3807
  setTimeout(() => {
3784
- g = !0, this.off(i, w), R(se);
3785
- }, z);
3786
- }), P = new Promise((F) => {
3787
- w = (R) => {
3788
- g || F(R);
3808
+ g = !0, this.off(i, w), F(se);
3809
+ }, V);
3810
+ }), P = new Promise((R) => {
3811
+ w = (F) => {
3812
+ g || R(F);
3789
3813
  }, this.once(i, w);
3790
3814
  });
3791
- if (!(await Promise.race([S, P])).success)
3815
+ if (!(await Promise.race([C, P])).success)
3792
3816
  return { success: !1 };
3793
3817
  }
3794
3818
  return { success: !0 };
@@ -3868,7 +3892,7 @@ class Ot {
3868
3892
  function Q() {
3869
3893
  return Math.random().toString(36).slice(2, 9);
3870
3894
  }
3871
- const G = mt.version;
3895
+ const G = ft.version;
3872
3896
  class At {
3873
3897
  constructor(e) {
3874
3898
  this._client = e;
@@ -3918,7 +3942,7 @@ class At {
3918
3942
  return !0;
3919
3943
  }
3920
3944
  }
3921
- class It {
3945
+ class Et {
3922
3946
  constructor(e) {
3923
3947
  this._client = e;
3924
3948
  }
@@ -3951,19 +3975,18 @@ class It {
3951
3975
  /**
3952
3976
  * Sets the display duration for the current page.
3953
3977
  *
3954
- * This allows the embedded application to dynamically adjust how long
3955
- * the current page is displayed before advancing to the next page.
3978
+ * The timer starts from the moment of this call, not from page start.
3956
3979
  *
3957
- * @param duration The duration in milliseconds
3980
+ * @param duration The duration in seconds
3958
3981
  * @returns A promise that resolves to true if successful
3959
3982
  * @example
3960
3983
  * // Set page duration to 10 seconds
3961
- * await playlist().setDuration(10000);
3984
+ * await playlist().setDuration(10);
3962
3985
  *
3963
3986
  * @example
3964
3987
  * // Extend duration based on content
3965
3988
  * if (hasMoreContent) {
3966
- * await playlist().setDuration(30000); // 30 seconds
3989
+ * await playlist().setDuration(30); // 30 seconds
3967
3990
  * }
3968
3991
  */
3969
3992
  async setDuration(e) {
@@ -3973,10 +3996,26 @@ class It {
3973
3996
  throw new Error("Failed to set page duration");
3974
3997
  return !0;
3975
3998
  }
3999
+ /**
4000
+ * Gets the predefined page duration from the playlist.
4001
+ *
4002
+ * Returns the original page.duration as configured in the playlist,
4003
+ * not the remaining time or any value altered via setDuration.
4004
+ *
4005
+ * @returns A promise that resolves to { success: boolean, duration: number } in seconds, or 0 if undefined
4006
+ * @example
4007
+ * const { duration } = await playlist().getDuration();
4008
+ */
4009
+ async getDuration() {
4010
+ const e = await this._client.request("playlist.getDuration", {});
4011
+ if (!e.success)
4012
+ throw new Error("Failed to get page duration");
4013
+ return { success: !0, duration: e.duration };
4014
+ }
3976
4015
  }
3977
- class Et extends Ot {
4016
+ class It extends Ot {
3978
4017
  get playlist() {
3979
- return new It(this);
4018
+ return new Et(this);
3980
4019
  }
3981
4020
  get overrides() {
3982
4021
  return new At(this);
@@ -3987,69 +4026,69 @@ function Bt() {
3987
4026
  return f;
3988
4027
  }
3989
4028
  function Ut(a) {
3990
- f = new Et(a), f.bind();
4029
+ f = new It(a), f.bind();
3991
4030
  }
3992
- function Ht() {
4031
+ function Kt() {
3993
4032
  f == null || f.unbind(), f = null;
3994
4033
  }
3995
- function Kt(...a) {
4034
+ function Wt(...a) {
3996
4035
  return k(f), f.on(...a);
3997
4036
  }
3998
- function Wt(...a) {
4037
+ function Jt(...a) {
3999
4038
  return k(f), f.once(...a);
4000
4039
  }
4001
- function Jt(...a) {
4040
+ function Qt(...a) {
4002
4041
  return k(f), f.off(...a);
4003
4042
  }
4004
- function Qt(...a) {
4043
+ function Gt(...a) {
4005
4044
  return k(f), f.send(...a);
4006
4045
  }
4007
- function Gt(...a) {
4046
+ function Yt(...a) {
4008
4047
  return k(f), f.request(...a);
4009
4048
  }
4010
- function Yt(...a) {
4049
+ function Xt(...a) {
4011
4050
  return k(f), f.subscribe(...a);
4012
4051
  }
4013
- function Xt(...a) {
4052
+ function es(...a) {
4014
4053
  return k(f), f.unsubscribe(...a);
4015
4054
  }
4016
- function es() {
4055
+ function ts() {
4017
4056
  return k(f), f.store;
4018
4057
  }
4019
- function ts() {
4058
+ function ss() {
4020
4059
  return k(f), f.applications;
4021
4060
  }
4022
- function ss() {
4061
+ function ns() {
4023
4062
  return k(f), f.media;
4024
4063
  }
4025
- function ns() {
4064
+ function as() {
4026
4065
  return k(f), f.accounts;
4027
4066
  }
4028
- function as() {
4067
+ function is() {
4029
4068
  return k(f), f.users;
4030
4069
  }
4031
4070
  function rs() {
4032
4071
  return k(f), f.devices;
4033
4072
  }
4034
- function is() {
4073
+ function os() {
4035
4074
  return k(f), f.proxy;
4036
4075
  }
4037
- function os() {
4076
+ function cs() {
4038
4077
  return k(f), f.weather;
4039
4078
  }
4040
- function cs() {
4079
+ function us() {
4041
4080
  return k(f), f.currency;
4042
4081
  }
4043
- function us() {
4082
+ function ds() {
4044
4083
  return k(f), f.environment;
4045
4084
  }
4046
- function ds() {
4085
+ function ls() {
4047
4086
  return k(f), f.playlist;
4048
4087
  }
4049
- function ls() {
4088
+ function hs() {
4050
4089
  return k(f), f.overrides;
4051
4090
  }
4052
- function hs() {
4091
+ function ps() {
4053
4092
  return k(f), f.mqtt;
4054
4093
  }
4055
4094
  function k(a) {
@@ -4057,40 +4096,40 @@ function k(a) {
4057
4096
  throw new Error("SDK is not configured");
4058
4097
  }
4059
4098
  export {
4060
- _t as Accounts,
4061
- gt as Applications,
4062
- Nt as Currency,
4063
- yt as Devices,
4064
- vt as Environment,
4065
- bt as Media,
4099
+ mt as Accounts,
4100
+ _t as Applications,
4101
+ St as Currency,
4102
+ gt as Devices,
4103
+ yt as Environment,
4104
+ vt as Media,
4066
4105
  Ct as Mqtt,
4067
- wt as Proxy,
4068
- kt as Store,
4106
+ bt as Proxy,
4107
+ wt as Store,
4069
4108
  W as StoreSlice,
4070
- xt as Users,
4071
- St as Weather,
4072
- ns as accounts,
4073
- ts as applications,
4109
+ kt as Users,
4110
+ xt as Weather,
4111
+ as as accounts,
4112
+ ss as applications,
4074
4113
  Ut as configure,
4075
- cs as currency,
4076
- Ht as destroy,
4114
+ us as currency,
4115
+ Kt as destroy,
4077
4116
  rs as devices,
4078
- us as environment,
4117
+ ds as environment,
4079
4118
  Bt as globalClient,
4080
- ss as media,
4081
- hs as mqtt,
4082
- Jt as off,
4083
- Kt as on,
4084
- Wt as once,
4085
- ls as overrides,
4086
- ds as playlist,
4087
- is as proxy,
4088
- Gt as request,
4089
- Qt as send,
4090
- es as store,
4091
- Yt as subscribe,
4119
+ ns as media,
4120
+ ps as mqtt,
4121
+ Qt as off,
4122
+ Wt as on,
4123
+ Jt as once,
4124
+ hs as overrides,
4125
+ ls as playlist,
4126
+ os as proxy,
4127
+ Yt as request,
4128
+ Gt as send,
4129
+ ts as store,
4130
+ Xt as subscribe,
4092
4131
  G as telemetrySdkVersion,
4093
- Xt as unsubscribe,
4094
- as as users,
4095
- os as weather
4132
+ es as unsubscribe,
4133
+ is as users,
4134
+ cs as weather
4096
4135
  };