@telemetryos/root-sdk 1.16.1 → 1.17.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
@@ -1,4 +1,4 @@
1
- const He = "1.16.1", Le = {
1
+ const He = "1.17.0", Le = {
2
2
  version: He
3
3
  };
4
4
  class De {
@@ -195,7 +195,7 @@ class ze {
195
195
  });
196
196
  }
197
197
  }
198
- var b;
198
+ var w;
199
199
  (function(i) {
200
200
  i.assertEqual = (n) => {
201
201
  };
@@ -231,7 +231,7 @@ var b;
231
231
  return n.map((r) => typeof r == "string" ? `'${r}'` : r).join(a);
232
232
  }
233
233
  i.joinValues = s, i.jsonStringifyReplacer = (n, a) => typeof a == "bigint" ? a.toString() : a;
234
- })(b || (b = {}));
234
+ })(w || (w = {}));
235
235
  var ye;
236
236
  (function(i) {
237
237
  i.mergeShapes = (e, t) => ({
@@ -240,7 +240,7 @@ var ye;
240
240
  // second overwrites first
241
241
  });
242
242
  })(ye || (ye = {}));
243
- const h = b.arrayToEnum([
243
+ const h = w.arrayToEnum([
244
244
  "string",
245
245
  "nan",
246
246
  "number",
@@ -261,7 +261,7 @@ const h = b.arrayToEnum([
261
261
  "never",
262
262
  "map",
263
263
  "set"
264
- ]), A = (i) => {
264
+ ]), O = (i) => {
265
265
  switch (typeof i) {
266
266
  case "undefined":
267
267
  return h.undefined;
@@ -282,7 +282,7 @@ const h = b.arrayToEnum([
282
282
  default:
283
283
  return h.unknown;
284
284
  }
285
- }, d = b.arrayToEnum([
285
+ }, d = w.arrayToEnum([
286
286
  "invalid_type",
287
287
  "invalid_literal",
288
288
  "custom",
@@ -300,7 +300,7 @@ const h = b.arrayToEnum([
300
300
  "not_multiple_of",
301
301
  "not_finite"
302
302
  ]);
303
- class N extends Error {
303
+ class Z extends Error {
304
304
  get errors() {
305
305
  return this.issues;
306
306
  }
@@ -337,14 +337,14 @@ class N extends Error {
337
337
  return n(this), s;
338
338
  }
339
339
  static assert(e) {
340
- if (!(e instanceof N))
340
+ if (!(e instanceof Z))
341
341
  throw new Error(`Not a ZodError: ${e}`);
342
342
  }
343
343
  toString() {
344
344
  return this.message;
345
345
  }
346
346
  get message() {
347
- return JSON.stringify(this.issues, b.jsonStringifyReplacer, 2);
347
+ return JSON.stringify(this.issues, w.jsonStringifyReplacer, 2);
348
348
  }
349
349
  get isEmpty() {
350
350
  return this.issues.length === 0;
@@ -363,7 +363,7 @@ class N extends Error {
363
363
  return this.flatten();
364
364
  }
365
365
  }
366
- N.create = (i) => new N(i);
366
+ Z.create = (i) => new Z(i);
367
367
  const de = (i, e) => {
368
368
  let t;
369
369
  switch (i.code) {
@@ -371,19 +371,19 @@ const de = (i, e) => {
371
371
  i.received === h.undefined ? t = "Required" : t = `Expected ${i.expected}, received ${i.received}`;
372
372
  break;
373
373
  case d.invalid_literal:
374
- t = `Invalid literal value, expected ${JSON.stringify(i.expected, b.jsonStringifyReplacer)}`;
374
+ t = `Invalid literal value, expected ${JSON.stringify(i.expected, w.jsonStringifyReplacer)}`;
375
375
  break;
376
376
  case d.unrecognized_keys:
377
- t = `Unrecognized key(s) in object: ${b.joinValues(i.keys, ", ")}`;
377
+ t = `Unrecognized key(s) in object: ${w.joinValues(i.keys, ", ")}`;
378
378
  break;
379
379
  case d.invalid_union:
380
380
  t = "Invalid input";
381
381
  break;
382
382
  case d.invalid_union_discriminator:
383
- t = `Invalid discriminator value. Expected ${b.joinValues(i.options)}`;
383
+ t = `Invalid discriminator value. Expected ${w.joinValues(i.options)}`;
384
384
  break;
385
385
  case d.invalid_enum_value:
386
- t = `Invalid enum value. Expected ${b.joinValues(i.options)}, received '${i.received}'`;
386
+ t = `Invalid enum value. Expected ${w.joinValues(i.options)}, received '${i.received}'`;
387
387
  break;
388
388
  case d.invalid_arguments:
389
389
  t = "Invalid function arguments";
@@ -395,7 +395,7 @@ const de = (i, e) => {
395
395
  t = "Invalid date";
396
396
  break;
397
397
  case d.invalid_string:
398
- typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` : b.assertNever(i.validation) : i.validation !== "regex" ? t = `Invalid ${i.validation}` : t = "Invalid";
398
+ typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` : w.assertNever(i.validation) : i.validation !== "regex" ? t = `Invalid ${i.validation}` : t = "Invalid";
399
399
  break;
400
400
  case d.too_small:
401
401
  i.type === "array" ? t = `Array must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "more than"} ${i.minimum} element(s)` : i.type === "string" ? t = `String must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "over"} ${i.minimum} character(s)` : i.type === "number" ? t = `Number must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${i.minimum}` : i.type === "bigint" ? t = `Number must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${i.minimum}` : i.type === "date" ? t = `Date must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(i.minimum))}` : t = "Invalid input";
@@ -416,7 +416,7 @@ const de = (i, e) => {
416
416
  t = "Number must be finite";
417
417
  break;
418
418
  default:
419
- t = e.defaultError, b.assertNever(i);
419
+ t = e.defaultError, w.assertNever(i);
420
420
  }
421
421
  return { message: t };
422
422
  };
@@ -511,7 +511,7 @@ var p;
511
511
  (function(i) {
512
512
  i.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, i.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
513
513
  })(p || (p = {}));
514
- class $ {
514
+ class P {
515
515
  constructor(e, t, s, n) {
516
516
  this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = n;
517
517
  }
@@ -529,7 +529,7 @@ const we = (i, e) => {
529
529
  get error() {
530
530
  if (this._error)
531
531
  return this._error;
532
- const t = new N(i.common.issues);
532
+ const t = new Z(i.common.issues);
533
533
  return this._error = t, this._error;
534
534
  }
535
535
  };
@@ -545,18 +545,18 @@ function y(i) {
545
545
  return a.code === "invalid_enum_value" ? { message: o ?? r.defaultError } : typeof r.data > "u" ? { message: o ?? s ?? r.defaultError } : a.code !== "invalid_type" ? { message: r.defaultError } : { message: o ?? t ?? r.defaultError };
546
546
  }, description: n };
547
547
  }
548
- class v {
548
+ class b {
549
549
  get description() {
550
550
  return this._def.description;
551
551
  }
552
552
  _getType(e) {
553
- return A(e.data);
553
+ return O(e.data);
554
554
  }
555
555
  _getOrReturnCtx(e, t) {
556
556
  return t || {
557
557
  common: e.parent.common,
558
558
  data: e.data,
559
- parsedType: A(e.data),
559
+ parsedType: O(e.data),
560
560
  schemaErrorMap: this._def.errorMap,
561
561
  path: e.path,
562
562
  parent: e.parent
@@ -568,7 +568,7 @@ class v {
568
568
  ctx: {
569
569
  common: e.parent.common,
570
570
  data: e.data,
571
- parsedType: A(e.data),
571
+ parsedType: O(e.data),
572
572
  schemaErrorMap: this._def.errorMap,
573
573
  path: e.path,
574
574
  parent: e.parent
@@ -602,7 +602,7 @@ class v {
602
602
  schemaErrorMap: this._def.errorMap,
603
603
  parent: null,
604
604
  data: e,
605
- parsedType: A(e)
605
+ parsedType: O(e)
606
606
  }, n = this._parseSync({ data: e, path: s.path, parent: s });
607
607
  return we(s, n);
608
608
  }
@@ -617,7 +617,7 @@ class v {
617
617
  schemaErrorMap: this._def.errorMap,
618
618
  parent: null,
619
619
  data: e,
620
- parsedType: A(e)
620
+ parsedType: O(e)
621
621
  };
622
622
  if (!this["~standard"].async)
623
623
  try {
@@ -656,7 +656,7 @@ class v {
656
656
  schemaErrorMap: this._def.errorMap,
657
657
  parent: null,
658
658
  data: e,
659
- parsedType: A(e)
659
+ parsedType: O(e)
660
660
  }, n = this._parse({ data: e, path: s.path, parent: s }), a = await (se(n) ? n : Promise.resolve(n));
661
661
  return we(s, a);
662
662
  }
@@ -691,7 +691,7 @@ class v {
691
691
  };
692
692
  }
693
693
  optional() {
694
- return E.create(this, this._def);
694
+ return $.create(this, this._def);
695
695
  }
696
696
  nullable() {
697
697
  return D.create(this, this._def);
@@ -800,7 +800,7 @@ function pt(i, e) {
800
800
  function ft(i, e) {
801
801
  return !!((e === "v4" || !e) && it.test(i) || (e === "v6" || !e) && rt.test(i));
802
802
  }
803
- class O extends v {
803
+ class E extends b {
804
804
  _parse(e) {
805
805
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) {
806
806
  const n = this._getOrReturnCtx(e);
@@ -952,7 +952,7 @@ class O extends v {
952
952
  validation: "base64url",
953
953
  code: d.invalid_string,
954
954
  message: n.message
955
- }), t.dirty()) : b.assertNever(n);
955
+ }), t.dirty()) : w.assertNever(n);
956
956
  return { status: t.value, value: e.data };
957
957
  }
958
958
  _regex(e, t, s) {
@@ -963,7 +963,7 @@ class O extends v {
963
963
  });
964
964
  }
965
965
  _addCheck(e) {
966
- return new O({
966
+ return new E({
967
967
  ...this._def,
968
968
  checks: [...this._def.checks, e]
969
969
  });
@@ -1099,19 +1099,19 @@ class O extends v {
1099
1099
  return this.min(1, p.errToObj(e));
1100
1100
  }
1101
1101
  trim() {
1102
- return new O({
1102
+ return new E({
1103
1103
  ...this._def,
1104
1104
  checks: [...this._def.checks, { kind: "trim" }]
1105
1105
  });
1106
1106
  }
1107
1107
  toLowerCase() {
1108
- return new O({
1108
+ return new E({
1109
1109
  ...this._def,
1110
1110
  checks: [...this._def.checks, { kind: "toLowerCase" }]
1111
1111
  });
1112
1112
  }
1113
1113
  toUpperCase() {
1114
- return new O({
1114
+ return new E({
1115
1115
  ...this._def,
1116
1116
  checks: [...this._def.checks, { kind: "toUpperCase" }]
1117
1117
  });
@@ -1177,7 +1177,7 @@ class O extends v {
1177
1177
  return e;
1178
1178
  }
1179
1179
  }
1180
- O.create = (i) => new O({
1180
+ E.create = (i) => new E({
1181
1181
  checks: [],
1182
1182
  typeName: _.ZodString,
1183
1183
  coerce: (i == null ? void 0 : i.coerce) ?? !1,
@@ -1187,7 +1187,7 @@ function mt(i, e) {
1187
1187
  const t = (i.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, a = Number.parseInt(i.toFixed(n).replace(".", "")), r = Number.parseInt(e.toFixed(n).replace(".", ""));
1188
1188
  return a % r / 10 ** n;
1189
1189
  }
1190
- class J extends v {
1190
+ class J extends b {
1191
1191
  constructor() {
1192
1192
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1193
1193
  }
@@ -1203,7 +1203,7 @@ class J extends v {
1203
1203
  let t;
1204
1204
  const s = new T();
1205
1205
  for (const n of this._def.checks)
1206
- n.kind === "int" ? b.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1206
+ n.kind === "int" ? w.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1207
1207
  code: d.invalid_type,
1208
1208
  expected: "integer",
1209
1209
  received: "float",
@@ -1229,7 +1229,7 @@ class J extends v {
1229
1229
  }), s.dirty()) : n.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1230
1230
  code: d.not_finite,
1231
1231
  message: n.message
1232
- }), s.dirty()) : b.assertNever(n);
1232
+ }), s.dirty()) : w.assertNever(n);
1233
1233
  return { status: s.value, value: e.data };
1234
1234
  }
1235
1235
  gte(e, t) {
@@ -1341,7 +1341,7 @@ class J extends v {
1341
1341
  return e;
1342
1342
  }
1343
1343
  get isInt() {
1344
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && b.isInteger(e.value));
1344
+ return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && w.isInteger(e.value));
1345
1345
  }
1346
1346
  get isFinite() {
1347
1347
  let e = null, t = null;
@@ -1359,7 +1359,7 @@ J.create = (i) => new J({
1359
1359
  coerce: (i == null ? void 0 : i.coerce) || !1,
1360
1360
  ...y(i)
1361
1361
  });
1362
- class Q extends v {
1362
+ class Q extends b {
1363
1363
  constructor() {
1364
1364
  super(...arguments), this.min = this.gte, this.max = this.lte;
1365
1365
  }
@@ -1391,7 +1391,7 @@ class Q extends v {
1391
1391
  code: d.not_multiple_of,
1392
1392
  multipleOf: n.value,
1393
1393
  message: n.message
1394
- }), s.dirty()) : b.assertNever(n);
1394
+ }), s.dirty()) : w.assertNever(n);
1395
1395
  return { status: s.value, value: e.data };
1396
1396
  }
1397
1397
  _getInvalidInput(e) {
@@ -1492,7 +1492,7 @@ Q.create = (i) => new Q({
1492
1492
  coerce: (i == null ? void 0 : i.coerce) ?? !1,
1493
1493
  ...y(i)
1494
1494
  });
1495
- class ke extends v {
1495
+ class ke extends b {
1496
1496
  _parse(e) {
1497
1497
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== h.boolean) {
1498
1498
  const t = this._getOrReturnCtx(e);
@@ -1510,7 +1510,7 @@ ke.create = (i) => new ke({
1510
1510
  coerce: (i == null ? void 0 : i.coerce) || !1,
1511
1511
  ...y(i)
1512
1512
  });
1513
- class ne extends v {
1513
+ class ne extends b {
1514
1514
  _parse(e) {
1515
1515
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== h.date) {
1516
1516
  const n = this._getOrReturnCtx(e);
@@ -1543,7 +1543,7 @@ class ne extends v {
1543
1543
  exact: !1,
1544
1544
  maximum: n.value,
1545
1545
  type: "date"
1546
- }), t.dirty()) : b.assertNever(n);
1546
+ }), t.dirty()) : w.assertNever(n);
1547
1547
  return {
1548
1548
  status: t.value,
1549
1549
  value: new Date(e.data.getTime())
@@ -1588,7 +1588,7 @@ ne.create = (i) => new ne({
1588
1588
  typeName: _.ZodDate,
1589
1589
  ...y(i)
1590
1590
  });
1591
- class xe extends v {
1591
+ class xe extends b {
1592
1592
  _parse(e) {
1593
1593
  if (this._getType(e) !== h.symbol) {
1594
1594
  const t = this._getOrReturnCtx(e);
@@ -1605,7 +1605,7 @@ xe.create = (i) => new xe({
1605
1605
  typeName: _.ZodSymbol,
1606
1606
  ...y(i)
1607
1607
  });
1608
- class Se extends v {
1608
+ class Se extends b {
1609
1609
  _parse(e) {
1610
1610
  if (this._getType(e) !== h.undefined) {
1611
1611
  const t = this._getOrReturnCtx(e);
@@ -1622,7 +1622,7 @@ Se.create = (i) => new Se({
1622
1622
  typeName: _.ZodUndefined,
1623
1623
  ...y(i)
1624
1624
  });
1625
- class Te extends v {
1625
+ class Te extends b {
1626
1626
  _parse(e) {
1627
1627
  if (this._getType(e) !== h.null) {
1628
1628
  const t = this._getOrReturnCtx(e);
@@ -1639,7 +1639,7 @@ Te.create = (i) => new Te({
1639
1639
  typeName: _.ZodNull,
1640
1640
  ...y(i)
1641
1641
  });
1642
- class le extends v {
1642
+ class le extends b {
1643
1643
  constructor() {
1644
1644
  super(...arguments), this._any = !0;
1645
1645
  }
@@ -1651,7 +1651,7 @@ le.create = (i) => new le({
1651
1651
  typeName: _.ZodAny,
1652
1652
  ...y(i)
1653
1653
  });
1654
- class Ce extends v {
1654
+ class Ce extends b {
1655
1655
  constructor() {
1656
1656
  super(...arguments), this._unknown = !0;
1657
1657
  }
@@ -1663,7 +1663,7 @@ Ce.create = (i) => new Ce({
1663
1663
  typeName: _.ZodUnknown,
1664
1664
  ...y(i)
1665
1665
  });
1666
- class P extends v {
1666
+ class j extends b {
1667
1667
  _parse(e) {
1668
1668
  const t = this._getOrReturnCtx(e);
1669
1669
  return u(t, {
@@ -1673,11 +1673,11 @@ class P extends v {
1673
1673
  }), g;
1674
1674
  }
1675
1675
  }
1676
- P.create = (i) => new P({
1676
+ j.create = (i) => new j({
1677
1677
  typeName: _.ZodNever,
1678
1678
  ...y(i)
1679
1679
  });
1680
- class Ie extends v {
1680
+ class Ie extends b {
1681
1681
  _parse(e) {
1682
1682
  if (this._getType(e) !== h.undefined) {
1683
1683
  const t = this._getOrReturnCtx(e);
@@ -1694,7 +1694,7 @@ Ie.create = (i) => new Ie({
1694
1694
  typeName: _.ZodVoid,
1695
1695
  ...y(i)
1696
1696
  });
1697
- class I extends v {
1697
+ class I extends b {
1698
1698
  _parse(e) {
1699
1699
  const { ctx: t, status: s } = this._processInputParams(e), n = this._def;
1700
1700
  if (t.parsedType !== h.array)
@@ -1730,8 +1730,8 @@ class I extends v {
1730
1730
  exact: !1,
1731
1731
  message: n.maxLength.message
1732
1732
  }), s.dirty()), t.common.async)
1733
- return Promise.all([...t.data].map((r, o) => n.type._parseAsync(new $(t, r, t.path, o)))).then((r) => T.mergeArray(s, r));
1734
- const a = [...t.data].map((r, o) => n.type._parseSync(new $(t, r, t.path, o)));
1733
+ return Promise.all([...t.data].map((r, o) => n.type._parseAsync(new P(t, r, t.path, o)))).then((r) => T.mergeArray(s, r));
1734
+ const a = [...t.data].map((r, o) => n.type._parseSync(new P(t, r, t.path, o)));
1735
1735
  return T.mergeArray(s, a);
1736
1736
  }
1737
1737
  get element() {
@@ -1768,29 +1768,29 @@ I.create = (i, e) => new I({
1768
1768
  ...y(e)
1769
1769
  });
1770
1770
  function M(i) {
1771
- if (i instanceof k) {
1771
+ if (i instanceof x) {
1772
1772
  const e = {};
1773
1773
  for (const t in i.shape) {
1774
1774
  const s = i.shape[t];
1775
- e[t] = E.create(M(s));
1775
+ e[t] = $.create(M(s));
1776
1776
  }
1777
- return new k({
1777
+ return new x({
1778
1778
  ...i._def,
1779
1779
  shape: () => e
1780
1780
  });
1781
1781
  } else return i instanceof I ? new I({
1782
1782
  ...i._def,
1783
1783
  type: M(i.element)
1784
- }) : i instanceof E ? E.create(M(i.unwrap())) : i instanceof D ? D.create(M(i.unwrap())) : i instanceof R ? R.create(i.items.map((e) => M(e))) : i;
1784
+ }) : i instanceof $ ? $.create(M(i.unwrap())) : i instanceof D ? D.create(M(i.unwrap())) : i instanceof R ? R.create(i.items.map((e) => M(e))) : i;
1785
1785
  }
1786
- class k extends v {
1786
+ class x extends b {
1787
1787
  constructor() {
1788
1788
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1789
1789
  }
1790
1790
  _getCached() {
1791
1791
  if (this._cached !== null)
1792
1792
  return this._cached;
1793
- const e = this._def.shape(), t = b.objectKeys(e);
1793
+ const e = this._def.shape(), t = w.objectKeys(e);
1794
1794
  return this._cached = { shape: e, keys: t }, this._cached;
1795
1795
  }
1796
1796
  _parse(e) {
@@ -1803,7 +1803,7 @@ class k extends v {
1803
1803
  }), g;
1804
1804
  }
1805
1805
  const { status: t, ctx: s } = this._processInputParams(e), { shape: n, keys: a } = this._getCached(), r = [];
1806
- if (!(this._def.catchall instanceof P && this._def.unknownKeys === "strip"))
1806
+ if (!(this._def.catchall instanceof j && this._def.unknownKeys === "strip"))
1807
1807
  for (const c in s.data)
1808
1808
  a.includes(c) || r.push(c);
1809
1809
  const o = [];
@@ -1811,11 +1811,11 @@ class k extends v {
1811
1811
  const l = n[c], f = s.data[c];
1812
1812
  o.push({
1813
1813
  key: { status: "valid", value: c },
1814
- value: l._parse(new $(s, f, s.path, c)),
1814
+ value: l._parse(new P(s, f, s.path, c)),
1815
1815
  alwaysSet: c in s.data
1816
1816
  });
1817
1817
  }
1818
- if (this._def.catchall instanceof P) {
1818
+ if (this._def.catchall instanceof j) {
1819
1819
  const c = this._def.unknownKeys;
1820
1820
  if (c === "passthrough")
1821
1821
  for (const l of r)
@@ -1836,7 +1836,7 @@ class k extends v {
1836
1836
  o.push({
1837
1837
  key: { status: "valid", value: l },
1838
1838
  value: c._parse(
1839
- new $(s, f, s.path, l)
1839
+ new P(s, f, s.path, l)
1840
1840
  //, ctx.child(key), value, getParsedType(value)
1841
1841
  ),
1842
1842
  alwaysSet: l in s.data
@@ -1846,10 +1846,10 @@ class k extends v {
1846
1846
  return s.common.async ? Promise.resolve().then(async () => {
1847
1847
  const c = [];
1848
1848
  for (const l of o) {
1849
- const f = await l.key, w = await l.value;
1849
+ const f = await l.key, v = await l.value;
1850
1850
  c.push({
1851
1851
  key: f,
1852
- value: w,
1852
+ value: v,
1853
1853
  alwaysSet: l.alwaysSet
1854
1854
  });
1855
1855
  }
@@ -1860,7 +1860,7 @@ class k extends v {
1860
1860
  return this._def.shape();
1861
1861
  }
1862
1862
  strict(e) {
1863
- return p.errToObj, new k({
1863
+ return p.errToObj, new x({
1864
1864
  ...this._def,
1865
1865
  unknownKeys: "strict",
1866
1866
  ...e !== void 0 ? {
@@ -1877,13 +1877,13 @@ class k extends v {
1877
1877
  });
1878
1878
  }
1879
1879
  strip() {
1880
- return new k({
1880
+ return new x({
1881
1881
  ...this._def,
1882
1882
  unknownKeys: "strip"
1883
1883
  });
1884
1884
  }
1885
1885
  passthrough() {
1886
- return new k({
1886
+ return new x({
1887
1887
  ...this._def,
1888
1888
  unknownKeys: "passthrough"
1889
1889
  });
@@ -1906,7 +1906,7 @@ class k extends v {
1906
1906
  // }) as any;
1907
1907
  // };
1908
1908
  extend(e) {
1909
- return new k({
1909
+ return new x({
1910
1910
  ...this._def,
1911
1911
  shape: () => ({
1912
1912
  ...this._def.shape(),
@@ -1920,7 +1920,7 @@ class k extends v {
1920
1920
  * upgrade if you are experiencing issues.
1921
1921
  */
1922
1922
  merge(e) {
1923
- return new k({
1923
+ return new x({
1924
1924
  unknownKeys: e._def.unknownKeys,
1925
1925
  catchall: e._def.catchall,
1926
1926
  shape: () => ({
@@ -1990,25 +1990,25 @@ class k extends v {
1990
1990
  // return merged;
1991
1991
  // }
1992
1992
  catchall(e) {
1993
- return new k({
1993
+ return new x({
1994
1994
  ...this._def,
1995
1995
  catchall: e
1996
1996
  });
1997
1997
  }
1998
1998
  pick(e) {
1999
1999
  const t = {};
2000
- for (const s of b.objectKeys(e))
2000
+ for (const s of w.objectKeys(e))
2001
2001
  e[s] && this.shape[s] && (t[s] = this.shape[s]);
2002
- return new k({
2002
+ return new x({
2003
2003
  ...this._def,
2004
2004
  shape: () => t
2005
2005
  });
2006
2006
  }
2007
2007
  omit(e) {
2008
2008
  const t = {};
2009
- for (const s of b.objectKeys(this.shape))
2009
+ for (const s of w.objectKeys(this.shape))
2010
2010
  e[s] || (t[s] = this.shape[s]);
2011
- return new k({
2011
+ return new x({
2012
2012
  ...this._def,
2013
2013
  shape: () => t
2014
2014
  });
@@ -2021,57 +2021,57 @@ class k extends v {
2021
2021
  }
2022
2022
  partial(e) {
2023
2023
  const t = {};
2024
- for (const s of b.objectKeys(this.shape)) {
2024
+ for (const s of w.objectKeys(this.shape)) {
2025
2025
  const n = this.shape[s];
2026
2026
  e && !e[s] ? t[s] = n : t[s] = n.optional();
2027
2027
  }
2028
- return new k({
2028
+ return new x({
2029
2029
  ...this._def,
2030
2030
  shape: () => t
2031
2031
  });
2032
2032
  }
2033
2033
  required(e) {
2034
2034
  const t = {};
2035
- for (const s of b.objectKeys(this.shape))
2035
+ for (const s of w.objectKeys(this.shape))
2036
2036
  if (e && !e[s])
2037
2037
  t[s] = this.shape[s];
2038
2038
  else {
2039
2039
  let n = this.shape[s];
2040
- for (; n instanceof E; )
2040
+ for (; n instanceof $; )
2041
2041
  n = n._def.innerType;
2042
2042
  t[s] = n;
2043
2043
  }
2044
- return new k({
2044
+ return new x({
2045
2045
  ...this._def,
2046
2046
  shape: () => t
2047
2047
  });
2048
2048
  }
2049
2049
  keyof() {
2050
- return Pe(b.objectKeys(this.shape));
2050
+ return Pe(w.objectKeys(this.shape));
2051
2051
  }
2052
2052
  }
2053
- k.create = (i, e) => new k({
2053
+ x.create = (i, e) => new x({
2054
2054
  shape: () => i,
2055
2055
  unknownKeys: "strip",
2056
- catchall: P.create(),
2056
+ catchall: j.create(),
2057
2057
  typeName: _.ZodObject,
2058
2058
  ...y(e)
2059
2059
  });
2060
- k.strictCreate = (i, e) => new k({
2060
+ x.strictCreate = (i, e) => new x({
2061
2061
  shape: () => i,
2062
2062
  unknownKeys: "strict",
2063
- catchall: P.create(),
2063
+ catchall: j.create(),
2064
2064
  typeName: _.ZodObject,
2065
2065
  ...y(e)
2066
2066
  });
2067
- k.lazycreate = (i, e) => new k({
2067
+ x.lazycreate = (i, e) => new x({
2068
2068
  shape: i,
2069
2069
  unknownKeys: "strip",
2070
- catchall: P.create(),
2070
+ catchall: j.create(),
2071
2071
  typeName: _.ZodObject,
2072
2072
  ...y(e)
2073
2073
  });
2074
- class ie extends v {
2074
+ class ie extends b {
2075
2075
  _parse(e) {
2076
2076
  const { ctx: t } = this._processInputParams(e), s = this._def.options;
2077
2077
  function n(a) {
@@ -2081,7 +2081,7 @@ class ie extends v {
2081
2081
  for (const o of a)
2082
2082
  if (o.result.status === "dirty")
2083
2083
  return t.common.issues.push(...o.ctx.common.issues), o.result;
2084
- const r = a.map((o) => new N(o.ctx.common.issues));
2084
+ const r = a.map((o) => new Z(o.ctx.common.issues));
2085
2085
  return u(t, {
2086
2086
  code: d.invalid_union,
2087
2087
  unionErrors: r
@@ -2128,7 +2128,7 @@ class ie extends v {
2128
2128
  }
2129
2129
  if (a)
2130
2130
  return t.common.issues.push(...a.ctx.common.issues), a.result;
2131
- const o = r.map((c) => new N(c));
2131
+ const o = r.map((c) => new Z(c));
2132
2132
  return u(t, {
2133
2133
  code: d.invalid_union,
2134
2134
  unionErrors: o
@@ -2145,11 +2145,11 @@ ie.create = (i, e) => new ie({
2145
2145
  ...y(e)
2146
2146
  });
2147
2147
  function he(i, e) {
2148
- const t = A(i), s = A(e);
2148
+ const t = O(i), s = O(e);
2149
2149
  if (i === e)
2150
2150
  return { valid: !0, data: i };
2151
2151
  if (t === h.object && s === h.object) {
2152
- const n = b.objectKeys(e), a = b.objectKeys(i).filter((o) => n.indexOf(o) !== -1), r = { ...i, ...e };
2152
+ const n = w.objectKeys(e), a = w.objectKeys(i).filter((o) => n.indexOf(o) !== -1), r = { ...i, ...e };
2153
2153
  for (const o of a) {
2154
2154
  const c = he(i[o], e[o]);
2155
2155
  if (!c.valid)
@@ -2170,7 +2170,7 @@ function he(i, e) {
2170
2170
  return { valid: !0, data: n };
2171
2171
  } else return t === h.date && s === h.date && +i == +e ? { valid: !0, data: i } : { valid: !1 };
2172
2172
  }
2173
- class ae extends v {
2173
+ class ae extends b {
2174
2174
  _parse(e) {
2175
2175
  const { status: t, ctx: s } = this._processInputParams(e), n = (a, r) => {
2176
2176
  if (ve(a) || ve(r))
@@ -2208,7 +2208,7 @@ ae.create = (i, e, t) => new ae({
2208
2208
  typeName: _.ZodIntersection,
2209
2209
  ...y(t)
2210
2210
  });
2211
- class R extends v {
2211
+ class R extends b {
2212
2212
  _parse(e) {
2213
2213
  const { status: t, ctx: s } = this._processInputParams(e);
2214
2214
  if (s.parsedType !== h.array)
@@ -2234,7 +2234,7 @@ class R extends v {
2234
2234
  }), t.dirty());
2235
2235
  const n = [...s.data].map((a, r) => {
2236
2236
  const o = this._def.items[r] || this._def.rest;
2237
- return o ? o._parse(new $(s, a, s.path, r)) : null;
2237
+ return o ? o._parse(new P(s, a, s.path, r)) : null;
2238
2238
  }).filter((a) => !!a);
2239
2239
  return s.common.async ? Promise.all(n).then((a) => T.mergeArray(t, a)) : T.mergeArray(t, n);
2240
2240
  }
@@ -2258,7 +2258,7 @@ R.create = (i, e) => {
2258
2258
  ...y(e)
2259
2259
  });
2260
2260
  };
2261
- class Ne extends v {
2261
+ class Ne extends b {
2262
2262
  get keySchema() {
2263
2263
  return this._def.keyType;
2264
2264
  }
@@ -2274,8 +2274,8 @@ class Ne extends v {
2274
2274
  received: s.parsedType
2275
2275
  }), g;
2276
2276
  const n = this._def.keyType, a = this._def.valueType, r = [...s.data.entries()].map(([o, c], l) => ({
2277
- key: n._parse(new $(s, o, s.path, [l, "key"])),
2278
- value: a._parse(new $(s, c, s.path, [l, "value"]))
2277
+ key: n._parse(new P(s, o, s.path, [l, "key"])),
2278
+ value: a._parse(new P(s, c, s.path, [l, "value"]))
2279
2279
  }));
2280
2280
  if (s.common.async) {
2281
2281
  const o = /* @__PURE__ */ new Map();
@@ -2306,7 +2306,7 @@ Ne.create = (i, e, t) => new Ne({
2306
2306
  typeName: _.ZodMap,
2307
2307
  ...y(t)
2308
2308
  });
2309
- class G extends v {
2309
+ class G extends b {
2310
2310
  _parse(e) {
2311
2311
  const { status: t, ctx: s } = this._processInputParams(e);
2312
2312
  if (s.parsedType !== h.set)
@@ -2341,7 +2341,7 @@ class G extends v {
2341
2341
  }
2342
2342
  return { status: t.value, value: l };
2343
2343
  }
2344
- const o = [...s.data.values()].map((c, l) => a._parse(new $(s, c, s.path, l)));
2344
+ const o = [...s.data.values()].map((c, l) => a._parse(new P(s, c, s.path, l)));
2345
2345
  return s.common.async ? Promise.all(o).then((c) => r(c)) : r(o);
2346
2346
  }
2347
2347
  min(e, t) {
@@ -2370,7 +2370,7 @@ G.create = (i, e) => new G({
2370
2370
  typeName: _.ZodSet,
2371
2371
  ...y(e)
2372
2372
  });
2373
- class Ze extends v {
2373
+ class Ze extends b {
2374
2374
  get schema() {
2375
2375
  return this._def.getter();
2376
2376
  }
@@ -2384,7 +2384,7 @@ Ze.create = (i, e) => new Ze({
2384
2384
  typeName: _.ZodLazy,
2385
2385
  ...y(e)
2386
2386
  });
2387
- class pe extends v {
2387
+ class pe extends b {
2388
2388
  _parse(e) {
2389
2389
  if (e.data !== this._def.value) {
2390
2390
  const t = this._getOrReturnCtx(e);
@@ -2412,12 +2412,12 @@ function Pe(i, e) {
2412
2412
  ...y(e)
2413
2413
  });
2414
2414
  }
2415
- class H extends v {
2415
+ class H extends b {
2416
2416
  _parse(e) {
2417
2417
  if (typeof e.data != "string") {
2418
2418
  const t = this._getOrReturnCtx(e), s = this._def.values;
2419
2419
  return u(t, {
2420
- expected: b.joinValues(s),
2420
+ expected: w.joinValues(s),
2421
2421
  received: t.parsedType,
2422
2422
  code: d.invalid_type
2423
2423
  }), g;
@@ -2467,19 +2467,19 @@ class H extends v {
2467
2467
  }
2468
2468
  }
2469
2469
  H.create = Pe;
2470
- class Ae extends v {
2470
+ class Ae extends b {
2471
2471
  _parse(e) {
2472
- const t = b.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
2472
+ const t = w.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
2473
2473
  if (s.parsedType !== h.string && s.parsedType !== h.number) {
2474
- const n = b.objectValues(t);
2474
+ const n = w.objectValues(t);
2475
2475
  return u(s, {
2476
- expected: b.joinValues(n),
2476
+ expected: w.joinValues(n),
2477
2477
  received: s.parsedType,
2478
2478
  code: d.invalid_type
2479
2479
  }), g;
2480
2480
  }
2481
- if (this._cache || (this._cache = new Set(b.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
2482
- const n = b.objectValues(t);
2481
+ if (this._cache || (this._cache = new Set(w.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
2482
+ const n = w.objectValues(t);
2483
2483
  return u(s, {
2484
2484
  received: s.data,
2485
2485
  code: d.invalid_enum_value,
@@ -2497,7 +2497,7 @@ Ae.create = (i, e) => new Ae({
2497
2497
  typeName: _.ZodNativeEnum,
2498
2498
  ...y(e)
2499
2499
  });
2500
- class re extends v {
2500
+ class re extends b {
2501
2501
  unwrap() {
2502
2502
  return this._def.type;
2503
2503
  }
@@ -2521,7 +2521,7 @@ re.create = (i, e) => new re({
2521
2521
  typeName: _.ZodPromise,
2522
2522
  ...y(e)
2523
2523
  });
2524
- class L extends v {
2524
+ class L extends b {
2525
2525
  innerType() {
2526
2526
  return this._def.schema;
2527
2527
  }
@@ -2598,7 +2598,7 @@ class L extends v {
2598
2598
  status: t.value,
2599
2599
  value: o
2600
2600
  })) : g);
2601
- b.assertNever(n);
2601
+ w.assertNever(n);
2602
2602
  }
2603
2603
  }
2604
2604
  L.create = (i, e, t) => new L({
@@ -2613,7 +2613,7 @@ L.createWithPreprocess = (i, e, t) => new L({
2613
2613
  typeName: _.ZodEffects,
2614
2614
  ...y(t)
2615
2615
  });
2616
- class E extends v {
2616
+ class $ extends b {
2617
2617
  _parse(e) {
2618
2618
  return this._getType(e) === h.undefined ? C(void 0) : this._def.innerType._parse(e);
2619
2619
  }
@@ -2621,12 +2621,12 @@ class E extends v {
2621
2621
  return this._def.innerType;
2622
2622
  }
2623
2623
  }
2624
- E.create = (i, e) => new E({
2624
+ $.create = (i, e) => new $({
2625
2625
  innerType: i,
2626
2626
  typeName: _.ZodOptional,
2627
2627
  ...y(e)
2628
2628
  });
2629
- class D extends v {
2629
+ class D extends b {
2630
2630
  _parse(e) {
2631
2631
  return this._getType(e) === h.null ? C(null) : this._def.innerType._parse(e);
2632
2632
  }
@@ -2639,7 +2639,7 @@ D.create = (i, e) => new D({
2639
2639
  typeName: _.ZodNullable,
2640
2640
  ...y(e)
2641
2641
  });
2642
- class fe extends v {
2642
+ class fe extends b {
2643
2643
  _parse(e) {
2644
2644
  const { ctx: t } = this._processInputParams(e);
2645
2645
  let s = t.data;
@@ -2659,7 +2659,7 @@ fe.create = (i, e) => new fe({
2659
2659
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2660
2660
  ...y(e)
2661
2661
  });
2662
- class me extends v {
2662
+ class me extends b {
2663
2663
  _parse(e) {
2664
2664
  const { ctx: t } = this._processInputParams(e), s = {
2665
2665
  ...t,
@@ -2678,7 +2678,7 @@ class me extends v {
2678
2678
  status: "valid",
2679
2679
  value: a.status === "valid" ? a.value : this._def.catchValue({
2680
2680
  get error() {
2681
- return new N(s.common.issues);
2681
+ return new Z(s.common.issues);
2682
2682
  },
2683
2683
  input: s.data
2684
2684
  })
@@ -2686,7 +2686,7 @@ class me extends v {
2686
2686
  status: "valid",
2687
2687
  value: n.status === "valid" ? n.value : this._def.catchValue({
2688
2688
  get error() {
2689
- return new N(s.common.issues);
2689
+ return new Z(s.common.issues);
2690
2690
  },
2691
2691
  input: s.data
2692
2692
  })
@@ -2702,7 +2702,7 @@ me.create = (i, e) => new me({
2702
2702
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2703
2703
  ...y(e)
2704
2704
  });
2705
- class Oe extends v {
2705
+ class Oe extends b {
2706
2706
  _parse(e) {
2707
2707
  if (this._getType(e) !== h.nan) {
2708
2708
  const t = this._getOrReturnCtx(e);
@@ -2719,7 +2719,7 @@ Oe.create = (i) => new Oe({
2719
2719
  typeName: _.ZodNaN,
2720
2720
  ...y(i)
2721
2721
  });
2722
- class _t extends v {
2722
+ class _t extends b {
2723
2723
  _parse(e) {
2724
2724
  const { ctx: t } = this._processInputParams(e), s = t.data;
2725
2725
  return this._def.type._parse({
@@ -2732,7 +2732,7 @@ class _t extends v {
2732
2732
  return this._def.type;
2733
2733
  }
2734
2734
  }
2735
- class ge extends v {
2735
+ class ge extends b {
2736
2736
  _parse(e) {
2737
2737
  const { status: t, ctx: s } = this._processInputParams(e);
2738
2738
  if (s.common.async)
@@ -2772,7 +2772,7 @@ class ge extends v {
2772
2772
  });
2773
2773
  }
2774
2774
  }
2775
- class _e extends v {
2775
+ class _e extends b {
2776
2776
  _parse(e) {
2777
2777
  const t = this._def.innerType._parse(e), s = (n) => (q(n) && (n.value = Object.freeze(n.value)), n);
2778
2778
  return se(t) ? t.then((n) => s(n)) : s(t);
@@ -2790,20 +2790,20 @@ var _;
2790
2790
  (function(i) {
2791
2791
  i.ZodString = "ZodString", i.ZodNumber = "ZodNumber", i.ZodNaN = "ZodNaN", i.ZodBigInt = "ZodBigInt", i.ZodBoolean = "ZodBoolean", i.ZodDate = "ZodDate", i.ZodSymbol = "ZodSymbol", i.ZodUndefined = "ZodUndefined", i.ZodNull = "ZodNull", i.ZodAny = "ZodAny", i.ZodUnknown = "ZodUnknown", i.ZodNever = "ZodNever", i.ZodVoid = "ZodVoid", i.ZodArray = "ZodArray", i.ZodObject = "ZodObject", i.ZodUnion = "ZodUnion", i.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", i.ZodIntersection = "ZodIntersection", i.ZodTuple = "ZodTuple", i.ZodRecord = "ZodRecord", i.ZodMap = "ZodMap", i.ZodSet = "ZodSet", i.ZodFunction = "ZodFunction", i.ZodLazy = "ZodLazy", i.ZodLiteral = "ZodLiteral", i.ZodEnum = "ZodEnum", i.ZodEffects = "ZodEffects", i.ZodNativeEnum = "ZodNativeEnum", i.ZodOptional = "ZodOptional", i.ZodNullable = "ZodNullable", i.ZodDefault = "ZodDefault", i.ZodCatch = "ZodCatch", i.ZodPromise = "ZodPromise", i.ZodBranded = "ZodBranded", i.ZodPipeline = "ZodPipeline", i.ZodReadonly = "ZodReadonly";
2792
2792
  })(_ || (_ = {}));
2793
- const Z = O.create, je = le.create;
2794
- P.create;
2793
+ const A = E.create, je = le.create;
2794
+ j.create;
2795
2795
  I.create;
2796
- const Re = k.create;
2796
+ const Re = x.create;
2797
2797
  ie.create;
2798
2798
  ae.create;
2799
2799
  R.create;
2800
2800
  const Fe = pe.create, gt = H.create;
2801
2801
  re.create;
2802
- E.create;
2802
+ $.create;
2803
2803
  D.create;
2804
2804
  const yt = Re({
2805
2805
  type: Fe("bridge"),
2806
- name: Z(),
2806
+ name: A(),
2807
2807
  data: je()
2808
2808
  });
2809
2809
  function jt(i) {
@@ -2811,15 +2811,15 @@ function jt(i) {
2811
2811
  }
2812
2812
  const vt = Re({
2813
2813
  type: Fe("client"),
2814
- telemetrySdkVersion: Z(),
2815
- applicationSpecifier: Z(),
2816
- applicationInstance: Z(),
2814
+ telemetrySdkVersion: A(),
2815
+ applicationSpecifier: A(),
2816
+ applicationInstance: A(),
2817
2817
  runtime: gt(["window", "worker"]),
2818
- name: Z(),
2818
+ name: A(),
2819
2819
  data: je(),
2820
- responseName: Z().optional(),
2821
- subscriptionName: Z().optional(),
2822
- unsubscribeName: Z().optional()
2820
+ responseName: A().optional(),
2821
+ subscriptionName: A().optional(),
2822
+ unsubscribeName: A().optional()
2823
2823
  });
2824
2824
  function Y(i) {
2825
2825
  return { ...i, type: "client" };
@@ -3076,10 +3076,10 @@ class xt {
3076
3076
  integrity: e.integrity
3077
3077
  }));
3078
3078
  let a = {};
3079
- t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((f, w) => {
3080
- a[w] = f;
3081
- }) : Array.isArray(t.headers) ? t.headers.forEach(([f, w]) => {
3082
- a[f] = w;
3079
+ t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((f, v) => {
3080
+ a[v] = f;
3081
+ }) : Array.isArray(t.headers) ? t.headers.forEach(([f, v]) => {
3082
+ a[f] = v;
3083
3083
  }) : a = t.headers);
3084
3084
  const r = await this._client.request("proxy.fetch", {
3085
3085
  url: n,
@@ -3099,10 +3099,10 @@ class xt {
3099
3099
  let l = null;
3100
3100
  if (r.body !== null && r.body !== void 0)
3101
3101
  if (r.bodyType === "binary") {
3102
- const f = atob(r.body), w = new Uint8Array(f.length);
3103
- for (let S = 0; S < f.length; S++)
3104
- w[S] = f.charCodeAt(S);
3105
- l = w;
3102
+ const f = atob(r.body), v = new Uint8Array(f.length);
3103
+ for (let k = 0; k < f.length; k++)
3104
+ v[k] = f.charCodeAt(k);
3105
+ l = v;
3106
3106
  } else r.bodyType === "text" ? l = r.body : r.bodyType === "json" && (l = JSON.stringify(r.body));
3107
3107
  return new Response(l, c);
3108
3108
  }
@@ -3659,23 +3659,23 @@ class At {
3659
3659
  if (r.data.type === "client") {
3660
3660
  const c = vt.safeParse(r.data);
3661
3661
  if (!c.success) {
3662
- const S = r.data;
3663
- S && typeof S == "object" && S.type === "client" && console.warn("[sdk-client] Received a message that looks like a client message but failed schema validation. This may indicate a version mismatch between the SDK and the host environment.", c.error.issues);
3662
+ const k = r.data;
3663
+ k && typeof k == "object" && k.type === "client" && console.warn("[sdk-client] Received a message that looks like a client message but failed schema validation. This may indicate a version mismatch between the SDK and the host environment.", c.error.issues);
3664
3664
  return;
3665
3665
  }
3666
3666
  const l = c.data, f = this._messageInterceptors.get(l.name);
3667
3667
  if (!f)
3668
3668
  return U(l);
3669
- let w;
3669
+ let v;
3670
3670
  try {
3671
- w = f(l);
3672
- } catch (S) {
3673
- console.error(`Error in interceptor for message ${l.name}:`, S);
3671
+ v = f(l);
3672
+ } catch (k) {
3673
+ console.error(`Error in interceptor for message ${l.name}:`, k);
3674
3674
  }
3675
- if (!w)
3675
+ if (!v)
3676
3676
  return;
3677
3677
  o = {
3678
- ...w,
3678
+ ...v,
3679
3679
  type: "bridge",
3680
3680
  ...r.data.responseName ? { name: r.data.responseName } : {}
3681
3681
  };
@@ -3683,18 +3683,18 @@ class At {
3683
3683
  if (!o) {
3684
3684
  const c = yt.safeParse(r.data);
3685
3685
  if (!c.success) {
3686
- const w = r.data;
3687
- w && typeof w == "object" && w.type === "bridge" && console.warn("[sdk-client] Received a message that looks like a bridge message but failed schema validation. This may indicate a version mismatch between the SDK and the host environment.", c.error.issues);
3686
+ const v = r.data;
3687
+ v && typeof v == "object" && v.type === "bridge" && console.warn("[sdk-client] Received a message that looks like a bridge message but failed schema validation. This may indicate a version mismatch between the SDK and the host environment.", c.error.issues);
3688
3688
  return;
3689
3689
  }
3690
3690
  o = c.data;
3691
3691
  const l = this._onHandlers.get(o.name), f = this._onceHandlers.get(o.name);
3692
3692
  if (l)
3693
- for (const w of l)
3694
- w(o.data);
3693
+ for (const v of l)
3694
+ v(o.data);
3695
3695
  if (f) {
3696
- for (const w of f)
3697
- w(o.data);
3696
+ for (const v of f)
3697
+ v(o.data);
3698
3698
  this._onceHandlers.delete(o.name);
3699
3699
  }
3700
3700
  }
@@ -3778,20 +3778,20 @@ class At {
3778
3778
  U(r);
3779
3779
  const o = (n = s == null ? void 0 : s.timeout) !== null && n !== void 0 ? n : B;
3780
3780
  let c = !1, l;
3781
- const f = new Promise((S) => {
3782
- l = (j) => {
3783
- c || S(j);
3781
+ const f = new Promise((k) => {
3782
+ l = (N) => {
3783
+ c || k(N);
3784
3784
  }, this.once(a, l);
3785
3785
  });
3786
3786
  if (o === 0)
3787
3787
  return f;
3788
- const w = new Promise((S, j) => {
3788
+ const v = new Promise((k, N) => {
3789
3789
  const V = new Error(`${e} message request with response name of ${a} timed out after ${o}`);
3790
3790
  setTimeout(() => {
3791
- c = !0, this.off(a, l), j(V);
3791
+ c = !0, this.off(a, l), N(V);
3792
3792
  }, o);
3793
3793
  });
3794
- return Promise.race([w, f]);
3794
+ return Promise.race([v, f]);
3795
3795
  }
3796
3796
  async subscribe(e, t, s) {
3797
3797
  let n, a;
@@ -3810,18 +3810,18 @@ class At {
3810
3810
  subscriptionName: r
3811
3811
  });
3812
3812
  U(l);
3813
- let f = !1, w;
3814
- const S = new Promise((V, F) => {
3813
+ let f = !1, v;
3814
+ const k = new Promise((V, F) => {
3815
3815
  const z = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${B}`);
3816
3816
  setTimeout(() => {
3817
- f = !0, this.off(o, w), F(z);
3817
+ f = !0, this.off(o, v), F(z);
3818
3818
  }, B);
3819
- }), j = new Promise((V) => {
3820
- w = (F) => {
3819
+ }), N = new Promise((V) => {
3820
+ v = (F) => {
3821
3821
  f || V(F);
3822
- }, this.once(o, w);
3822
+ }, this.once(o, v);
3823
3823
  });
3824
- return Promise.race([S, j]);
3824
+ return Promise.race([k, N]);
3825
3825
  }
3826
3826
  async unsubscribe(e, t, s) {
3827
3827
  let n, a;
@@ -3848,18 +3848,18 @@ class At {
3848
3848
  unsubscribeName: c
3849
3849
  });
3850
3850
  U(l);
3851
- let f = !1, w;
3852
- const S = new Promise((F, z) => {
3851
+ let f = !1, v;
3852
+ const k = new Promise((F, z) => {
3853
3853
  const qe = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${B}`);
3854
3854
  setTimeout(() => {
3855
- f = !0, this.off(r, w), z(qe);
3855
+ f = !0, this.off(r, v), z(qe);
3856
3856
  }, B);
3857
- }), j = new Promise((F) => {
3858
- w = (z) => {
3857
+ }), N = new Promise((F) => {
3858
+ v = (z) => {
3859
3859
  f || F(z);
3860
- }, this.once(r, w);
3860
+ }, this.once(r, v);
3861
3861
  });
3862
- if (!(await Promise.race([S, j])).success)
3862
+ if (!(await Promise.race([k, N])).success)
3863
3863
  return { success: !1 };
3864
3864
  }
3865
3865
  return { success: !0 };
@@ -4021,20 +4021,20 @@ class $t {
4021
4021
  *
4022
4022
  * @returns A promise resolving to the iframe element or null
4023
4023
  */
4024
- async frame() {
4025
- return new Promise((e) => {
4024
+ async frame(e) {
4025
+ return new Promise((t) => {
4026
4026
  if (this._iframe)
4027
- return e(this._iframe);
4027
+ return t(this._iframe);
4028
4028
  if (this._status === "ready")
4029
- return this._iframe = this._buildIframe(), e(this._iframe);
4030
- let t;
4031
- const s = (n) => {
4032
- if (n === "ready")
4033
- return t(), this._iframe = this._buildIframe(), e(this._iframe);
4034
- if (n === "unloaded")
4035
- return t(), e(null);
4029
+ return this._iframe = this._buildIframe(e), t(this._iframe);
4030
+ let s;
4031
+ const n = (a) => {
4032
+ if (a === "ready")
4033
+ return s(), this._iframe = this._buildIframe(e), t(this._iframe);
4034
+ if (a === "unloaded")
4035
+ return s(), t(null);
4036
4036
  };
4037
- t = this.onStatus(s);
4037
+ s = this.onStatus(n);
4038
4038
  });
4039
4039
  }
4040
4040
  /**
@@ -4048,15 +4048,18 @@ class $t {
4048
4048
  this._onStatusHandlers.delete(e);
4049
4049
  };
4050
4050
  }
4051
- _buildIframe() {
4052
- var e, t;
4053
- const s = (t = (e = this._application) === null || e === void 0 ? void 0 : e.versions) === null || t === void 0 ? void 0 : t[0], n = s == null ? void 0 : s.baseUrl;
4054
- if (!n)
4051
+ _buildIframe(e) {
4052
+ var t, s, n, a, r, o;
4053
+ const c = (s = (t = this._application) === null || t === void 0 ? void 0 : t.versions) === null || s === void 0 ? void 0 : s[0], l = c == null ? void 0 : c.baseUrl;
4054
+ if (!l)
4055
4055
  return console.error(`No baseUrl for dependency ${this._specifier}:${this._instanceId}`), null;
4056
- const a = new URL(n);
4057
- a.searchParams.set("applicationSpecifier", this._specifier), a.searchParams.set("applicationInstance", this._instanceId), a.searchParams.set("deviceId", this._store._client.deviceId);
4058
- const r = document.createElement("iframe");
4059
- return r.src = a.toString(), r;
4056
+ const f = new URL(l), v = (o = (n = e == null ? void 0 : e.path) !== null && n !== void 0 ? n : (r = (a = c == null ? void 0 : c.mountPoints) === null || a === void 0 ? void 0 : a.find((N) => N.name === (e == null ? void 0 : e.mountPoint))) === null || r === void 0 ? void 0 : r.path) !== null && o !== void 0 ? o : (
4057
+ // TODO: Replace with a blob URL placeholder when no mount point is found
4058
+ "/"
4059
+ );
4060
+ f.pathname = v.startsWith("/") ? v : `/${v}`, f.searchParams.set("applicationSpecifier", this._specifier), f.searchParams.set("applicationInstance", this._instanceId), f.searchParams.set("deviceId", this._store._client.deviceId);
4061
+ const k = document.createElement("iframe");
4062
+ return k.src = f.toString(), k;
4060
4063
  }
4061
4064
  /**
4062
4065
  * Resets the iframe by clearing it, requesting the host to clean up
@@ -4118,63 +4121,63 @@ function Pt() {
4118
4121
  m == null || m.unbind(), m = null;
4119
4122
  }
4120
4123
  function Mt(...i) {
4121
- return x(m), m.on(...i);
4124
+ return S(m), m.on(...i);
4122
4125
  }
4123
4126
  function qt(...i) {
4124
- return x(m), m.once(...i);
4127
+ return S(m), m.once(...i);
4125
4128
  }
4126
4129
  function Ht(...i) {
4127
- return x(m), m.off(...i);
4130
+ return S(m), m.off(...i);
4128
4131
  }
4129
4132
  function Lt(...i) {
4130
- return x(m), m.send(...i);
4133
+ return S(m), m.send(...i);
4131
4134
  }
4132
4135
  function Dt(...i) {
4133
- return x(m), m.request(...i);
4136
+ return S(m), m.request(...i);
4134
4137
  }
4135
4138
  function Vt(...i) {
4136
- return x(m), m.subscribe(...i);
4139
+ return S(m), m.subscribe(...i);
4137
4140
  }
4138
4141
  function zt(...i) {
4139
- return x(m), m.unsubscribe(...i);
4142
+ return S(m), m.unsubscribe(...i);
4140
4143
  }
4141
4144
  function Bt() {
4142
- return x(m), m.store;
4145
+ return S(m), m.store;
4143
4146
  }
4144
4147
  function Ut() {
4145
- return x(m), m.applications;
4148
+ return S(m), m.applications;
4146
4149
  }
4147
4150
  function Kt() {
4148
- return x(m), m.media;
4151
+ return S(m), m.media;
4149
4152
  }
4150
4153
  function Wt() {
4151
- return x(m), m.accounts;
4154
+ return S(m), m.accounts;
4152
4155
  }
4153
4156
  function Jt() {
4154
- return x(m), m.users;
4157
+ return S(m), m.users;
4155
4158
  }
4156
4159
  function Qt() {
4157
- return x(m), m.devices;
4160
+ return S(m), m.devices;
4158
4161
  }
4159
4162
  function Gt() {
4160
- return x(m), m.proxy;
4163
+ return S(m), m.proxy;
4161
4164
  }
4162
4165
  function Yt() {
4163
- return x(m), m.rootSettingsNavigation;
4166
+ return S(m), m.rootSettingsNavigation;
4164
4167
  }
4165
4168
  function Xt() {
4166
- return x(m), m.weather;
4169
+ return S(m), m.weather;
4167
4170
  }
4168
4171
  function es() {
4169
- return x(m), m.currency;
4172
+ return S(m), m.currency;
4170
4173
  }
4171
4174
  function ts() {
4172
- return x(m), m.environment;
4175
+ return S(m), m.environment;
4173
4176
  }
4174
4177
  function ss() {
4175
- return x(m), m.mqtt;
4178
+ return S(m), m.mqtt;
4176
4179
  }
4177
- function x(i) {
4180
+ function S(i) {
4178
4181
  if (!i)
4179
4182
  throw new Error("SDK is not configured");
4180
4183
  }