@synnaxlabs/client 0.20.0 → 0.21.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/client.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Tl = Object.defineProperty;
2
2
  var Ol = (r, e, t) => e in r ? Tl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var d = (r, e, t) => (Ol(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { z as u } from "zod";
4
+ import { z as c } from "zod";
5
5
  var xl = Object.defineProperty, Nl = (r, e, t) => e in r ? xl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, fe = (r, e, t) => (Nl(r, typeof e != "symbol" ? e + "" : e, t), t), Sl = Object.defineProperty, El = (r, e, t) => e in r ? Sl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, b = (r, e, t) => (El(r, typeof e != "symbol" ? e + "" : e, t), t), G;
6
6
  (function(r) {
7
7
  r.assertEqual = (n) => n;
@@ -133,10 +133,10 @@ let qe = class extends Error {
133
133
  else if (i.path.length === 0)
134
134
  s._errors.push(t(i));
135
135
  else {
136
- let o = s, c = 0;
137
- for (; c < i.path.length; ) {
138
- const l = i.path[c];
139
- c === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], c++;
136
+ let o = s, u = 0;
137
+ for (; u < i.path.length; ) {
138
+ const l = i.path[u];
139
+ u === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], u++;
140
140
  }
141
141
  }
142
142
  };
@@ -231,8 +231,8 @@ const un = (r) => {
231
231
  path: a
232
232
  };
233
233
  let o = "";
234
- const c = s.filter((l) => !!l).slice().reverse();
235
- for (const l of c)
234
+ const u = s.filter((l) => !!l).slice().reverse();
235
+ for (const l of u)
236
236
  o = l(i, { data: e, defaultError: o }).message;
237
237
  return {
238
238
  ...n,
@@ -425,7 +425,7 @@ let q = class {
425
425
  code: v.custom,
426
426
  ...s(n)
427
427
  });
428
- return typeof Promise < "u" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
428
+ return typeof Promise < "u" && i instanceof Promise ? i.then((u) => u ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
429
429
  });
430
430
  }
431
431
  refinement(e, t) {
@@ -1430,48 +1430,48 @@ let Me = class Ue extends q {
1430
1430
  }
1431
1431
  _parse(e) {
1432
1432
  if (this._getType(e) !== T.object) {
1433
- const c = this._getOrReturnCtx(e);
1434
- return N(c, {
1433
+ const u = this._getOrReturnCtx(e);
1434
+ return N(u, {
1435
1435
  code: v.invalid_type,
1436
1436
  expected: T.object,
1437
- received: c.parsedType
1437
+ received: u.parsedType
1438
1438
  }), D;
1439
1439
  }
1440
1440
  const { status: t, ctx: s } = this._processInputParams(e), { shape: n, keys: a } = this._getCached(), i = [];
1441
1441
  if (!(this._def.catchall instanceof Zt && this._def.unknownKeys === "strip"))
1442
- for (const c in s.data)
1443
- a.includes(c) || i.push(c);
1442
+ for (const u in s.data)
1443
+ a.includes(u) || i.push(u);
1444
1444
  const o = [];
1445
- for (const c of a) {
1446
- const l = n[c], h = s.data[c];
1445
+ for (const u of a) {
1446
+ const l = n[u], h = s.data[u];
1447
1447
  o.push({
1448
- key: { status: "valid", value: c },
1449
- value: l._parse(new nt(s, h, s.path, c)),
1450
- alwaysSet: c in s.data
1448
+ key: { status: "valid", value: u },
1449
+ value: l._parse(new nt(s, h, s.path, u)),
1450
+ alwaysSet: u in s.data
1451
1451
  });
1452
1452
  }
1453
1453
  if (this._def.catchall instanceof Zt) {
1454
- const c = this._def.unknownKeys;
1455
- if (c === "passthrough")
1454
+ const u = this._def.unknownKeys;
1455
+ if (u === "passthrough")
1456
1456
  for (const l of i)
1457
1457
  o.push({
1458
1458
  key: { status: "valid", value: l },
1459
1459
  value: { status: "valid", value: s.data[l] }
1460
1460
  });
1461
- else if (c === "strict")
1461
+ else if (u === "strict")
1462
1462
  i.length > 0 && (N(s, {
1463
1463
  code: v.unrecognized_keys,
1464
1464
  keys: i
1465
1465
  }), t.dirty());
1466
- else if (c !== "strip")
1466
+ else if (u !== "strip")
1467
1467
  throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1468
1468
  } else {
1469
- const c = this._def.catchall;
1469
+ const u = this._def.catchall;
1470
1470
  for (const l of i) {
1471
1471
  const h = s.data[l];
1472
1472
  o.push({
1473
1473
  key: { status: "valid", value: l },
1474
- value: c._parse(
1474
+ value: u._parse(
1475
1475
  new nt(s, h, s.path, l)
1476
1476
  //, ctx.child(key), value, getParsedType(value)
1477
1477
  ),
@@ -1480,17 +1480,17 @@ let Me = class Ue extends q {
1480
1480
  }
1481
1481
  }
1482
1482
  return s.common.async ? Promise.resolve().then(async () => {
1483
- const c = [];
1483
+ const u = [];
1484
1484
  for (const l of o) {
1485
1485
  const h = await l.key;
1486
- c.push({
1486
+ u.push({
1487
1487
  key: h,
1488
1488
  value: await l.value,
1489
1489
  alwaysSet: l.alwaysSet
1490
1490
  });
1491
1491
  }
1492
- return c;
1493
- }).then((c) => Ce.mergeObjectSync(t, c)) : Ce.mergeObjectSync(t, o);
1492
+ return u;
1493
+ }).then((u) => Ce.mergeObjectSync(t, u)) : Ce.mergeObjectSync(t, o);
1494
1494
  }
1495
1495
  get shape() {
1496
1496
  return this._def.shape();
@@ -1502,11 +1502,11 @@ let Me = class Ue extends q {
1502
1502
  ...e !== void 0 ? {
1503
1503
  errorMap: (t, s) => {
1504
1504
  var n, a, i, o;
1505
- const c = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
1505
+ const u = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
1506
1506
  return t.code === "unrecognized_keys" ? {
1507
- message: (o = Z.errToObj(e).message) !== null && o !== void 0 ? o : c
1507
+ message: (o = Z.errToObj(e).message) !== null && o !== void 0 ? o : u
1508
1508
  } : {
1509
- message: c
1509
+ message: u
1510
1510
  };
1511
1511
  }
1512
1512
  } : {}
@@ -1744,7 +1744,7 @@ class zr extends q {
1744
1744
  {
1745
1745
  let a;
1746
1746
  const i = [];
1747
- for (const c of s) {
1747
+ for (const u of s) {
1748
1748
  const l = {
1749
1749
  ...t,
1750
1750
  common: {
@@ -1752,7 +1752,7 @@ class zr extends q {
1752
1752
  issues: []
1753
1753
  },
1754
1754
  parent: null
1755
- }, h = c._parseSync({
1755
+ }, h = u._parseSync({
1756
1756
  data: t.data,
1757
1757
  path: t.path,
1758
1758
  parent: l
@@ -1763,7 +1763,7 @@ class zr extends q {
1763
1763
  }
1764
1764
  if (a)
1765
1765
  return t.common.issues.push(...a.ctx.common.issues), a.result;
1766
- const o = i.map((c) => new qe(c));
1766
+ const o = i.map((u) => new qe(u));
1767
1767
  return N(t, {
1768
1768
  code: v.invalid_union,
1769
1769
  unionErrors: o
@@ -1849,10 +1849,10 @@ function Ra(r, e) {
1849
1849
  if (t === T.object && s === T.object) {
1850
1850
  const n = G.objectKeys(e), a = G.objectKeys(r).filter((o) => n.indexOf(o) !== -1), i = { ...r, ...e };
1851
1851
  for (const o of a) {
1852
- const c = Ra(r[o], e[o]);
1853
- if (!c.valid)
1852
+ const u = Ra(r[o], e[o]);
1853
+ if (!u.valid)
1854
1854
  return { valid: !1 };
1855
- i[o] = c.data;
1855
+ i[o] = u.data;
1856
1856
  }
1857
1857
  return { valid: !0, data: i };
1858
1858
  } else if (t === T.array && s === T.array) {
@@ -1860,10 +1860,10 @@ function Ra(r, e) {
1860
1860
  return { valid: !1 };
1861
1861
  const n = [];
1862
1862
  for (let a = 0; a < r.length; a++) {
1863
- const i = r[a], o = e[a], c = Ra(i, o);
1864
- if (!c.valid)
1863
+ const i = r[a], o = e[a], u = Ra(i, o);
1864
+ if (!u.valid)
1865
1865
  return { valid: !1 };
1866
- n.push(c.data);
1866
+ n.push(u.data);
1867
1867
  }
1868
1868
  return { valid: !0, data: n };
1869
1869
  } else
@@ -2011,15 +2011,15 @@ let jo = class Pa extends q {
2011
2011
  expected: T.map,
2012
2012
  received: s.parsedType
2013
2013
  }), D;
2014
- const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, c], l) => ({
2014
+ const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, u], l) => ({
2015
2015
  key: n._parse(new nt(s, o, s.path, [l, "key"])),
2016
- value: a._parse(new nt(s, c, s.path, [l, "value"]))
2016
+ value: a._parse(new nt(s, u, s.path, [l, "value"]))
2017
2017
  }));
2018
2018
  if (s.common.async) {
2019
2019
  const o = /* @__PURE__ */ new Map();
2020
2020
  return Promise.resolve().then(async () => {
2021
- for (const c of i) {
2022
- const l = await c.key, h = await c.value;
2021
+ for (const u of i) {
2022
+ const l = await u.key, h = await u.value;
2023
2023
  if (l.status === "aborted" || h.status === "aborted")
2024
2024
  return D;
2025
2025
  (l.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(l.value, h.value);
@@ -2028,8 +2028,8 @@ let jo = class Pa extends q {
2028
2028
  });
2029
2029
  } else {
2030
2030
  const o = /* @__PURE__ */ new Map();
2031
- for (const c of i) {
2032
- const l = c.key, h = c.value;
2031
+ for (const u of i) {
2032
+ const l = u.key, h = u.value;
2033
2033
  if (l.status === "aborted" || h.status === "aborted")
2034
2034
  return D;
2035
2035
  (l.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(l.value, h.value);
@@ -2070,17 +2070,17 @@ let fn = class Ma extends q {
2070
2070
  message: n.maxSize.message
2071
2071
  }), t.dirty());
2072
2072
  const a = this._def.valueType;
2073
- function i(c) {
2073
+ function i(u) {
2074
2074
  const l = /* @__PURE__ */ new Set();
2075
- for (const h of c) {
2075
+ for (const h of u) {
2076
2076
  if (h.status === "aborted")
2077
2077
  return D;
2078
2078
  h.status === "dirty" && t.dirty(), l.add(h.value);
2079
2079
  }
2080
2080
  return { status: t.value, value: l };
2081
2081
  }
2082
- const o = [...s.data.values()].map((c, l) => a._parse(new nt(s, c, s.path, l)));
2083
- return s.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
2082
+ const o = [...s.data.values()].map((u, l) => a._parse(new nt(s, u, s.path, l)));
2083
+ return s.common.async ? Promise.all(o).then((u) => i(u)) : i(o);
2084
2084
  }
2085
2085
  min(e, t) {
2086
2086
  return new Ma({
@@ -2120,7 +2120,7 @@ let Ro = class Ls extends q {
2120
2120
  expected: T.function,
2121
2121
  received: t.parsedType
2122
2122
  }), D;
2123
- function s(o, c) {
2123
+ function s(o, u) {
2124
2124
  return un({
2125
2125
  data: o,
2126
2126
  path: t.path,
@@ -2132,11 +2132,11 @@ let Ro = class Ls extends q {
2132
2132
  ].filter((l) => !!l),
2133
2133
  issueData: {
2134
2134
  code: v.invalid_arguments,
2135
- argumentsError: c
2135
+ argumentsError: u
2136
2136
  }
2137
2137
  });
2138
2138
  }
2139
- function n(o, c) {
2139
+ function n(o, u) {
2140
2140
  return un({
2141
2141
  data: o,
2142
2142
  path: t.path,
@@ -2148,27 +2148,27 @@ let Ro = class Ls extends q {
2148
2148
  ].filter((l) => !!l),
2149
2149
  issueData: {
2150
2150
  code: v.invalid_return_type,
2151
- returnTypeError: c
2151
+ returnTypeError: u
2152
2152
  }
2153
2153
  });
2154
2154
  }
2155
2155
  const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
2156
2156
  if (this._def.returns instanceof vr) {
2157
2157
  const o = this;
2158
- return Ee(async function(...c) {
2159
- const l = new qe([]), h = await o._def.args.parseAsync(c, a).catch((se) => {
2160
- throw l.addIssue(s(c, se)), l;
2158
+ return Ee(async function(...u) {
2159
+ const l = new qe([]), h = await o._def.args.parseAsync(u, a).catch((X) => {
2160
+ throw l.addIssue(s(u, X)), l;
2161
2161
  }), k = await Reflect.apply(i, this, h);
2162
- return await o._def.returns._def.type.parseAsync(k, a).catch((se) => {
2163
- throw l.addIssue(n(k, se)), l;
2162
+ return await o._def.returns._def.type.parseAsync(k, a).catch((X) => {
2163
+ throw l.addIssue(n(k, X)), l;
2164
2164
  });
2165
2165
  });
2166
2166
  } else {
2167
2167
  const o = this;
2168
- return Ee(function(...c) {
2169
- const l = o._def.args.safeParse(c, a);
2168
+ return Ee(function(...u) {
2169
+ const l = o._def.args.safeParse(u, a);
2170
2170
  if (!l.success)
2171
- throw new qe([s(c, l.error)]);
2171
+ throw new qe([s(u, l.error)]);
2172
2172
  const h = Reflect.apply(i, this, l.data), k = o._def.returns.safeParse(h, a);
2173
2173
  if (!k.success)
2174
2174
  throw new qe([n(h, k.error)]);
@@ -2386,10 +2386,10 @@ let Ge = class extends q {
2386
2386
  }
2387
2387
  if (n.type === "refinement") {
2388
2388
  const i = (o) => {
2389
- const c = n.refinement(o, a);
2389
+ const u = n.refinement(o, a);
2390
2390
  if (s.common.async)
2391
- return Promise.resolve(c);
2392
- if (c instanceof Promise)
2391
+ return Promise.resolve(u);
2392
+ if (u instanceof Promise)
2393
2393
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2394
2394
  return o;
2395
2395
  };
@@ -2606,8 +2606,8 @@ gn.create = (r, e) => new gn({
2606
2606
  const Lo = (r, e = {}, t) => r ? gr.create().superRefine((s, n) => {
2607
2607
  var a, i;
2608
2608
  if (!r(s)) {
2609
- const o = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, c = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
2610
- n.addIssue({ code: "custom", ...l, fatal: c });
2609
+ const o = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, u = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
2610
+ n.addIssue({ code: "custom", ...l, fatal: u });
2611
2611
  }
2612
2612
  }) : gr.create(), ql = {
2613
2613
  object: Me.lazycreate
@@ -2885,8 +2885,8 @@ function Us(r, e) {
2885
2885
  if (lt.isValidObject(i))
2886
2886
  lt.belongToTypes(o, e.keepTypesOnRecursion) || (o = Us(i, e));
2887
2887
  else if (lt.isArrayObject(i)) {
2888
- var c = Us({ key: i }, e);
2889
- o = c.key;
2888
+ var u = Us({ key: i }, e);
2889
+ o = u.key;
2890
2890
  }
2891
2891
  return o;
2892
2892
  }))), t[a] = n;
@@ -2915,8 +2915,8 @@ function zs(r, e) {
2915
2915
  if (dt.isValidObject(i))
2916
2916
  dt.belongToTypes(o, e.keepTypesOnRecursion) || (o = zs(i, e));
2917
2917
  else if (dt.isArrayObject(i)) {
2918
- var c = zs({ key: i }, e);
2919
- o = c.key;
2918
+ var u = zs({ key: i }, e);
2919
+ o = u.key;
2920
2920
  }
2921
2921
  return o;
2922
2922
  }))), t[a] = n;
@@ -2945,8 +2945,8 @@ function Bs(r, e) {
2945
2945
  if (ht.isValidObject(i))
2946
2946
  ht.belongToTypes(o, e.keepTypesOnRecursion) || (o = Bs(i, e));
2947
2947
  else if (ht.isArrayObject(i)) {
2948
- var c = Bs({ key: i }, e);
2949
- o = c.key;
2948
+ var u = Bs({ key: i }, e);
2949
+ o = u.key;
2950
2950
  }
2951
2951
  return o;
2952
2952
  }))), t[a] = n;
@@ -2975,8 +2975,8 @@ function Vs(r, e) {
2975
2975
  if (pt.isValidObject(i))
2976
2976
  pt.belongToTypes(o, e.keepTypesOnRecursion) || (o = Vs(i, e));
2977
2977
  else if (pt.isArrayObject(i)) {
2978
- var c = Vs({ key: i }, e);
2979
- o = c.key;
2978
+ var u = Vs({ key: i }, e);
2979
+ o = u.key;
2980
2980
  }
2981
2981
  return o;
2982
2982
  }))), t[a] = n;
@@ -3005,8 +3005,8 @@ function qs(r, e) {
3005
3005
  if (ft.isValidObject(i))
3006
3006
  ft.belongToTypes(o, e.keepTypesOnRecursion) || (o = qs(i, e));
3007
3007
  else if (ft.isArrayObject(i)) {
3008
- var c = qs({ key: i }, e);
3009
- o = c.key;
3008
+ var u = qs({ key: i }, e);
3009
+ o = u.key;
3010
3010
  }
3011
3011
  return o;
3012
3012
  }))), t[a] = n;
@@ -3035,8 +3035,8 @@ function Ks(r, e) {
3035
3035
  if (mt.isValidObject(i))
3036
3036
  mt.belongToTypes(o, e.keepTypesOnRecursion) || (o = Ks(i, e));
3037
3037
  else if (mt.isArrayObject(i)) {
3038
- var c = Ks({ key: i }, e);
3039
- o = c.key;
3038
+ var u = Ks({ key: i }, e);
3039
+ o = u.key;
3040
3040
  }
3041
3041
  return o;
3042
3042
  }))), t[a] = n;
@@ -3180,10 +3180,10 @@ f.object({ offset: ro, scale: ro });
3180
3180
  const fh = (r) => (e, t, s, n) => t === "dimension" ? [e, s] : [e, n ? s - r : s + r], mh = (r) => (e, t, s, n) => [e, n ? s / r : s * r], yh = (r) => (e, t, s) => {
3181
3181
  if (e === null)
3182
3182
  return [r, s];
3183
- const { lower: n, upper: a } = e, { lower: i, upper: o } = r, c = a - n, l = o - i;
3183
+ const { lower: n, upper: a } = e, { lower: i, upper: o } = r, u = a - n, l = o - i;
3184
3184
  if (t === "dimension")
3185
- return [r, s * (l / c)];
3186
- const h = (s - n) * (l / c) + i;
3185
+ return [r, s * (l / u)];
3186
+ const h = (s - n) * (l / u) + i;
3187
3187
  return [r, h];
3188
3188
  }, gh = (r) => (e, t, s) => [r, s], vh = () => (r, e, t) => {
3189
3189
  if (r === null)
@@ -3362,7 +3362,7 @@ const mc = (r, e) => {
3362
3362
  );
3363
3363
  const s = r.valueOf() % t.valueOf();
3364
3364
  return r instanceof Ne ? new Ne(s) : new Se(s);
3365
- }, ne = class P {
3365
+ }, ae = class P {
3366
3366
  constructor(e, t = "UTC") {
3367
3367
  if (b(this, "value"), b(this, "encodeValue", !0), e == null)
3368
3368
  this.value = P.now().valueOf();
@@ -3391,8 +3391,8 @@ const mc = (r, e) => {
3391
3391
  const [s, n, a] = e.split(":");
3392
3392
  let i = "00", o = "00";
3393
3393
  a != null && ([i, o] = a.split("."));
3394
- let c = P.hours(parseInt(s ?? "00", 10)).add(P.minutes(parseInt(n ?? "00", 10))).add(P.seconds(parseInt(i ?? "00", 10))).add(P.milliseconds(parseInt(o ?? "00", 10)));
3395
- return t === "local" && (c = c.add(P.utcOffset)), c.valueOf();
3394
+ let u = P.hours(parseInt(s ?? "00", 10)).add(P.minutes(parseInt(n ?? "00", 10))).add(P.seconds(parseInt(i ?? "00", 10))).add(P.milliseconds(parseInt(o ?? "00", 10)));
3395
+ return t === "local" && (u = u.add(P.utcOffset)), u.valueOf();
3396
3396
  }
3397
3397
  static parseDateTimeString(e, t = "UTC") {
3398
3398
  if (!e.includes("/") && !e.includes("-"))
@@ -3642,25 +3642,25 @@ const mc = (r, e) => {
3642
3642
  return P.hours(e * 24);
3643
3643
  }
3644
3644
  };
3645
- b(ne, "NANOSECOND", ne.nanoseconds(1)), /** One microsecond after the unix epoch */
3646
- b(ne, "MICROSECOND", ne.microseconds(1)), /** One millisecond after the unix epoch */
3647
- b(ne, "MILLISECOND", ne.milliseconds(1)), /** One second after the unix epoch */
3648
- b(ne, "SECOND", ne.seconds(1)), /** One minute after the unix epoch */
3649
- b(ne, "MINUTE", ne.minutes(1)), /** One hour after the unix epoch */
3650
- b(ne, "HOUR", ne.hours(1)), /** One day after the unix epoch */
3651
- b(ne, "DAY", ne.days(1)), /** The maximum possible value for a timestamp */
3652
- b(ne, "MAX", new ne((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
3653
- b(ne, "MIN", new ne(0)), /** The unix epoch */
3654
- b(ne, "ZERO", new ne(0)), /** A zod schema for validating timestamps */
3655
- b(ne, "z", f.union([
3656
- f.object({ value: f.bigint() }).transform((r) => new ne(r.value)),
3657
- f.string().transform((r) => new ne(BigInt(r))),
3658
- f.instanceof(Number).transform((r) => new ne(r)),
3659
- f.number().transform((r) => new ne(r)),
3660
- f.instanceof(ne)
3645
+ b(ae, "NANOSECOND", ae.nanoseconds(1)), /** One microsecond after the unix epoch */
3646
+ b(ae, "MICROSECOND", ae.microseconds(1)), /** One millisecond after the unix epoch */
3647
+ b(ae, "MILLISECOND", ae.milliseconds(1)), /** One second after the unix epoch */
3648
+ b(ae, "SECOND", ae.seconds(1)), /** One minute after the unix epoch */
3649
+ b(ae, "MINUTE", ae.minutes(1)), /** One hour after the unix epoch */
3650
+ b(ae, "HOUR", ae.hours(1)), /** One day after the unix epoch */
3651
+ b(ae, "DAY", ae.days(1)), /** The maximum possible value for a timestamp */
3652
+ b(ae, "MAX", new ae((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
3653
+ b(ae, "MIN", new ae(0)), /** The unix epoch */
3654
+ b(ae, "ZERO", new ae(0)), /** A zod schema for validating timestamps */
3655
+ b(ae, "z", f.union([
3656
+ f.object({ value: f.bigint() }).transform((r) => new ae(r.value)),
3657
+ f.string().transform((r) => new ae(BigInt(r))),
3658
+ f.instanceof(Number).transform((r) => new ae(r)),
3659
+ f.number().transform((r) => new ae(r)),
3660
+ f.instanceof(ae)
3661
3661
  ]));
3662
- let Ne = ne;
3663
- const ae = class X {
3662
+ let Ne = ae;
3663
+ const ie = class Q {
3664
3664
  constructor(e) {
3665
3665
  b(this, "value"), b(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
3666
3666
  }
@@ -3671,52 +3671,52 @@ const ae = class X {
3671
3671
  return this.value;
3672
3672
  }
3673
3673
  lessThan(e) {
3674
- return this.valueOf() < new X(e).valueOf();
3674
+ return this.valueOf() < new Q(e).valueOf();
3675
3675
  }
3676
3676
  greaterThan(e) {
3677
- return this.valueOf() > new X(e).valueOf();
3677
+ return this.valueOf() > new Q(e).valueOf();
3678
3678
  }
3679
3679
  lessThanOrEqual(e) {
3680
- return this.valueOf() <= new X(e).valueOf();
3680
+ return this.valueOf() <= new Q(e).valueOf();
3681
3681
  }
3682
3682
  greaterThanOrEqual(e) {
3683
- return this.valueOf() >= new X(e).valueOf();
3683
+ return this.valueOf() >= new Q(e).valueOf();
3684
3684
  }
3685
3685
  remainder(e) {
3686
3686
  return mc(this, e);
3687
3687
  }
3688
3688
  truncate(e) {
3689
- return new X(
3689
+ return new Q(
3690
3690
  BigInt(Math.trunc(Number(this.valueOf() / e.valueOf()))) * e.valueOf()
3691
3691
  );
3692
3692
  }
3693
3693
  toString() {
3694
- const e = this.truncate(X.DAY), t = this.truncate(X.HOUR), s = this.truncate(X.MINUTE), n = this.truncate(X.SECOND), a = this.truncate(X.MILLISECOND), i = this.truncate(X.MICROSECOND), o = this.truncate(X.NANOSECOND), c = e, l = t.sub(e), h = s.sub(t), k = n.sub(s), se = a.sub(n), ye = i.sub(a), Re = o.sub(i);
3694
+ const e = this.truncate(Q.DAY), t = this.truncate(Q.HOUR), s = this.truncate(Q.MINUTE), n = this.truncate(Q.SECOND), a = this.truncate(Q.MILLISECOND), i = this.truncate(Q.MICROSECOND), o = this.truncate(Q.NANOSECOND), u = e, l = t.sub(e), h = s.sub(t), k = n.sub(s), X = a.sub(n), ye = i.sub(a), Re = o.sub(i);
3695
3695
  let de = "";
3696
- return c.isZero || (de += `${c.days}d `), l.isZero || (de += `${l.hours}h `), h.isZero || (de += `${h.minutes}m `), k.isZero || (de += `${k.seconds}s `), se.isZero || (de += `${se.milliseconds}ms `), ye.isZero || (de += `${ye.microseconds}µs `), Re.isZero || (de += `${Re.nanoseconds}ns`), de.trim();
3696
+ return u.isZero || (de += `${u.days}d `), l.isZero || (de += `${l.hours}h `), h.isZero || (de += `${h.minutes}m `), k.isZero || (de += `${k.seconds}s `), X.isZero || (de += `${X.milliseconds}ms `), ye.isZero || (de += `${ye.microseconds}µs `), Re.isZero || (de += `${Re.nanoseconds}ns`), de.trim();
3697
3697
  }
3698
3698
  /** @returns the decimal number of days in the timespan */
3699
3699
  get days() {
3700
- return Number(this.valueOf() / X.DAY.valueOf());
3700
+ return Number(this.valueOf() / Q.DAY.valueOf());
3701
3701
  }
3702
3702
  /** @returns the decimal number of hours in the timespan */
3703
3703
  get hours() {
3704
- return Number(this.valueOf() / X.HOUR.valueOf());
3704
+ return Number(this.valueOf() / Q.HOUR.valueOf());
3705
3705
  }
3706
3706
  /** @returns the decimal number of minutes in the timespan */
3707
3707
  get minutes() {
3708
- return Number(this.valueOf() / X.MINUTE.valueOf());
3708
+ return Number(this.valueOf() / Q.MINUTE.valueOf());
3709
3709
  }
3710
3710
  /** @returns The number of seconds in the TimeSpan. */
3711
3711
  get seconds() {
3712
- return Number(this.valueOf() / X.SECOND.valueOf());
3712
+ return Number(this.valueOf() / Q.SECOND.valueOf());
3713
3713
  }
3714
3714
  /** @returns The number of milliseconds in the TimeSpan. */
3715
3715
  get milliseconds() {
3716
- return Number(this.valueOf() / X.MILLISECOND.valueOf());
3716
+ return Number(this.valueOf() / Q.MILLISECOND.valueOf());
3717
3717
  }
3718
3718
  get microseconds() {
3719
- return Number(this.valueOf() / X.MICROSECOND.valueOf());
3719
+ return Number(this.valueOf() / Q.MICROSECOND.valueOf());
3720
3720
  }
3721
3721
  get nanoseconds() {
3722
3722
  return Number(this.valueOf());
@@ -3735,7 +3735,7 @@ const ae = class X {
3735
3735
  * @returns True if the TimeSpans are equal, false otherwise.
3736
3736
  */
3737
3737
  equals(e) {
3738
- return this.valueOf() === new X(e).valueOf();
3738
+ return this.valueOf() === new Q(e).valueOf();
3739
3739
  }
3740
3740
  /**
3741
3741
  * Adds a TimeSpan to the TimeSpan.
@@ -3743,7 +3743,7 @@ const ae = class X {
3743
3743
  * @returns A new TimeSpan representing the sum of the two TimeSpans.
3744
3744
  */
3745
3745
  add(e) {
3746
- return new X(this.valueOf() + new X(e).valueOf());
3746
+ return new Q(this.valueOf() + new Q(e).valueOf());
3747
3747
  }
3748
3748
  /**
3749
3749
  * Creates a TimeSpan representing the duration between the two timestamps.
@@ -3751,7 +3751,7 @@ const ae = class X {
3751
3751
  * @param other
3752
3752
  */
3753
3753
  sub(e) {
3754
- return new X(this.valueOf() - new X(e).valueOf());
3754
+ return new Q(this.valueOf() - new Q(e).valueOf());
3755
3755
  }
3756
3756
  /**
3757
3757
  * Creates a TimeSpan representing the given number of nanoseconds.
@@ -3760,7 +3760,7 @@ const ae = class X {
3760
3760
  * @returns A TimeSpan representing the given number of nanoseconds.
3761
3761
  */
3762
3762
  static nanoseconds(e = 1) {
3763
- return new X(e);
3763
+ return new Q(e);
3764
3764
  }
3765
3765
  /**
3766
3766
  * Creates a TimeSpan representing the given number of microseconds.
@@ -3769,7 +3769,7 @@ const ae = class X {
3769
3769
  * @returns A TimeSpan representing the given number of microseconds.
3770
3770
  */
3771
3771
  static microseconds(e = 1) {
3772
- return X.nanoseconds(e * 1e3);
3772
+ return Q.nanoseconds(e * 1e3);
3773
3773
  }
3774
3774
  /**
3775
3775
  * Creates a TimeSpan representing the given number of milliseconds.
@@ -3778,7 +3778,7 @@ const ae = class X {
3778
3778
  * @returns A TimeSpan representing the given number of milliseconds.
3779
3779
  */
3780
3780
  static milliseconds(e = 1) {
3781
- return X.microseconds(e * 1e3);
3781
+ return Q.microseconds(e * 1e3);
3782
3782
  }
3783
3783
  /**
3784
3784
  * Creates a TimeSpan representing the given number of seconds.
@@ -3787,7 +3787,7 @@ const ae = class X {
3787
3787
  * @returns A TimeSpan representing the given number of seconds.
3788
3788
  */
3789
3789
  static seconds(e = 1) {
3790
- return X.milliseconds(e * 1e3);
3790
+ return Q.milliseconds(e * 1e3);
3791
3791
  }
3792
3792
  /**
3793
3793
  * Creates a TimeSpan representing the given number of minutes.
@@ -3796,7 +3796,7 @@ const ae = class X {
3796
3796
  * @returns A TimeSpan representing the given number of minutes.
3797
3797
  */
3798
3798
  static minutes(e) {
3799
- return X.seconds(e.valueOf() * 60);
3799
+ return Q.seconds(e.valueOf() * 60);
3800
3800
  }
3801
3801
  /**
3802
3802
  * Creates a TimeSpan representing the given number of hours.
@@ -3805,7 +3805,7 @@ const ae = class X {
3805
3805
  * @returns A TimeSpan representing the given number of hours.
3806
3806
  */
3807
3807
  static hours(e) {
3808
- return X.minutes(e * 60);
3808
+ return Q.minutes(e * 60);
3809
3809
  }
3810
3810
  /**
3811
3811
  * Creates a TimeSpan representing the given number of days.
@@ -3814,27 +3814,27 @@ const ae = class X {
3814
3814
  * @returns A TimeSpan representing the given number of days.
3815
3815
  */
3816
3816
  static days(e) {
3817
- return X.hours(e * 24);
3818
- }
3819
- };
3820
- b(ae, "NANOSECOND", ae.nanoseconds(1)), /** A microsecond. */
3821
- b(ae, "MICROSECOND", ae.microseconds(1)), /** A millisecond. */
3822
- b(ae, "MILLISECOND", ae.milliseconds(1)), /** A second. */
3823
- b(ae, "SECOND", ae.seconds(1)), /** A minute. */
3824
- b(ae, "MINUTE", ae.minutes(1)), /** Represents an hour. */
3825
- b(ae, "HOUR", ae.hours(1)), /** Represents a day. */
3826
- b(ae, "DAY", ae.days(1)), /** The maximum possible value for a TimeSpan. */
3827
- b(ae, "MAX", new ae((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
3828
- b(ae, "MIN", new ae(0)), /** The zero value for a TimeSpan. */
3829
- b(ae, "ZERO", new ae(0)), /** A zod schema for validating and transforming timespans */
3830
- b(ae, "z", f.union([
3831
- f.object({ value: f.bigint() }).transform((r) => new ae(r.value)),
3832
- f.string().transform((r) => new ae(BigInt(r))),
3833
- f.instanceof(Number).transform((r) => new ae(r)),
3834
- f.number().transform((r) => new ae(r)),
3835
- f.instanceof(ae)
3817
+ return Q.hours(e * 24);
3818
+ }
3819
+ };
3820
+ b(ie, "NANOSECOND", ie.nanoseconds(1)), /** A microsecond. */
3821
+ b(ie, "MICROSECOND", ie.microseconds(1)), /** A millisecond. */
3822
+ b(ie, "MILLISECOND", ie.milliseconds(1)), /** A second. */
3823
+ b(ie, "SECOND", ie.seconds(1)), /** A minute. */
3824
+ b(ie, "MINUTE", ie.minutes(1)), /** Represents an hour. */
3825
+ b(ie, "HOUR", ie.hours(1)), /** Represents a day. */
3826
+ b(ie, "DAY", ie.days(1)), /** The maximum possible value for a TimeSpan. */
3827
+ b(ie, "MAX", new ie((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
3828
+ b(ie, "MIN", new ie(0)), /** The zero value for a TimeSpan. */
3829
+ b(ie, "ZERO", new ie(0)), /** A zod schema for validating and transforming timespans */
3830
+ b(ie, "z", f.union([
3831
+ f.object({ value: f.bigint() }).transform((r) => new ie(r.value)),
3832
+ f.string().transform((r) => new ie(BigInt(r))),
3833
+ f.instanceof(Number).transform((r) => new ie(r)),
3834
+ f.number().transform((r) => new ie(r)),
3835
+ f.instanceof(ie)
3836
3836
  ]));
3837
- let Se = ae;
3837
+ let Se = ie;
3838
3838
  const Rs = class Ws extends Number {
3839
3839
  constructor(e) {
3840
3840
  e instanceof Number ? super(e.valueOf()) : super(e);
@@ -4218,9 +4218,9 @@ const _e = class he extends Number {
4218
4218
  return this.valueOf() / he.TERABYTE.valueOf();
4219
4219
  }
4220
4220
  toString() {
4221
- const e = this.truncate(he.TERABYTE), t = this.truncate(he.GIGABYTE), s = this.truncate(he.MEGABYTE), n = this.truncate(he.KILOBYTE), a = this.truncate(he.BYTE), i = e, o = t.sub(e), c = s.sub(t), l = n.sub(s), h = a.sub(n);
4221
+ const e = this.truncate(he.TERABYTE), t = this.truncate(he.GIGABYTE), s = this.truncate(he.MEGABYTE), n = this.truncate(he.KILOBYTE), a = this.truncate(he.BYTE), i = e, o = t.sub(e), u = s.sub(t), l = n.sub(s), h = a.sub(n);
4222
4222
  let k = "";
4223
- return i.isZero || (k += `${i.terabytes}TB `), o.isZero || (k += `${o.gigabytes}GB `), c.isZero || (k += `${c.megabytes}MB `), l.isZero || (k += `${l.kilobytes}KB `), (!h.isZero || k === "") && (k += `${h.valueOf()}B`), k.trim();
4223
+ return i.isZero || (k += `${i.terabytes}TB `), o.isZero || (k += `${o.gigabytes}GB `), u.isZero || (k += `${u.megabytes}MB `), l.isZero || (k += `${l.kilobytes}KB `), (!h.isZero || k === "") && (k += `${h.valueOf()}B`), k.trim();
4224
4224
  }
4225
4225
  /**
4226
4226
  * Creates a Size from the given number of bytes.
@@ -4516,10 +4516,10 @@ let Ke = class extends Error {
4516
4516
  else if (i.path.length === 0)
4517
4517
  s._errors.push(t(i));
4518
4518
  else {
4519
- let o = s, c = 0;
4520
- for (; c < i.path.length; ) {
4521
- const l = i.path[c];
4522
- c === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], c++;
4519
+ let o = s, u = 0;
4520
+ for (; u < i.path.length; ) {
4521
+ const l = i.path[u];
4522
+ u === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], u++;
4523
4523
  }
4524
4524
  }
4525
4525
  };
@@ -4614,8 +4614,8 @@ const bn = (r) => {
4614
4614
  path: a
4615
4615
  };
4616
4616
  let o = "";
4617
- const c = s.filter((l) => !!l).slice().reverse();
4618
- for (const l of c)
4617
+ const u = s.filter((l) => !!l).slice().reverse();
4618
+ for (const l of u)
4619
4619
  o = l(i, { data: e, defaultError: o }).message;
4620
4620
  return {
4621
4621
  ...n,
@@ -4808,7 +4808,7 @@ let K = class {
4808
4808
  code: w.custom,
4809
4809
  ...s(n)
4810
4810
  });
4811
- return typeof Promise < "u" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
4811
+ return typeof Promise < "u" && i instanceof Promise ? i.then((u) => u ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
4812
4812
  });
4813
4813
  }
4814
4814
  refinement(e, t) {
@@ -5813,48 +5813,48 @@ class ue extends K {
5813
5813
  }
5814
5814
  _parse(e) {
5815
5815
  if (this._getType(e) !== O.object) {
5816
- const c = this._getOrReturnCtx(e);
5817
- return S(c, {
5816
+ const u = this._getOrReturnCtx(e);
5817
+ return S(u, {
5818
5818
  code: w.invalid_type,
5819
5819
  expected: O.object,
5820
- received: c.parsedType
5820
+ received: u.parsedType
5821
5821
  }), L;
5822
5822
  }
5823
5823
  const { status: t, ctx: s } = this._processInputParams(e), { shape: n, keys: a } = this._getCached(), i = [];
5824
5824
  if (!(this._def.catchall instanceof It && this._def.unknownKeys === "strip"))
5825
- for (const c in s.data)
5826
- a.includes(c) || i.push(c);
5825
+ for (const u in s.data)
5826
+ a.includes(u) || i.push(u);
5827
5827
  const o = [];
5828
- for (const c of a) {
5829
- const l = n[c], h = s.data[c];
5828
+ for (const u of a) {
5829
+ const l = n[u], h = s.data[u];
5830
5830
  o.push({
5831
- key: { status: "valid", value: c },
5832
- value: l._parse(new at(s, h, s.path, c)),
5833
- alwaysSet: c in s.data
5831
+ key: { status: "valid", value: u },
5832
+ value: l._parse(new at(s, h, s.path, u)),
5833
+ alwaysSet: u in s.data
5834
5834
  });
5835
5835
  }
5836
5836
  if (this._def.catchall instanceof It) {
5837
- const c = this._def.unknownKeys;
5838
- if (c === "passthrough")
5837
+ const u = this._def.unknownKeys;
5838
+ if (u === "passthrough")
5839
5839
  for (const l of i)
5840
5840
  o.push({
5841
5841
  key: { status: "valid", value: l },
5842
5842
  value: { status: "valid", value: s.data[l] }
5843
5843
  });
5844
- else if (c === "strict")
5844
+ else if (u === "strict")
5845
5845
  i.length > 0 && (S(s, {
5846
5846
  code: w.unrecognized_keys,
5847
5847
  keys: i
5848
5848
  }), t.dirty());
5849
- else if (c !== "strip")
5849
+ else if (u !== "strip")
5850
5850
  throw new Error("Internal ZodObject error: invalid unknownKeys value.");
5851
5851
  } else {
5852
- const c = this._def.catchall;
5852
+ const u = this._def.catchall;
5853
5853
  for (const l of i) {
5854
5854
  const h = s.data[l];
5855
5855
  o.push({
5856
5856
  key: { status: "valid", value: l },
5857
- value: c._parse(
5857
+ value: u._parse(
5858
5858
  new at(s, h, s.path, l)
5859
5859
  //, ctx.child(key), value, getParsedType(value)
5860
5860
  ),
@@ -5863,17 +5863,17 @@ class ue extends K {
5863
5863
  }
5864
5864
  }
5865
5865
  return s.common.async ? Promise.resolve().then(async () => {
5866
- const c = [];
5866
+ const u = [];
5867
5867
  for (const l of o) {
5868
5868
  const h = await l.key;
5869
- c.push({
5869
+ u.push({
5870
5870
  key: h,
5871
5871
  value: await l.value,
5872
5872
  alwaysSet: l.alwaysSet
5873
5873
  });
5874
5874
  }
5875
- return c;
5876
- }).then((c) => je.mergeObjectSync(t, c)) : je.mergeObjectSync(t, o);
5875
+ return u;
5876
+ }).then((u) => je.mergeObjectSync(t, u)) : je.mergeObjectSync(t, o);
5877
5877
  }
5878
5878
  get shape() {
5879
5879
  return this._def.shape();
@@ -5885,11 +5885,11 @@ class ue extends K {
5885
5885
  ...e !== void 0 ? {
5886
5886
  errorMap: (t, s) => {
5887
5887
  var n, a, i, o;
5888
- const c = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
5888
+ const u = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
5889
5889
  return t.code === "unrecognized_keys" ? {
5890
- message: (o = I.errToObj(e).message) !== null && o !== void 0 ? o : c
5890
+ message: (o = I.errToObj(e).message) !== null && o !== void 0 ? o : u
5891
5891
  } : {
5892
- message: c
5892
+ message: u
5893
5893
  };
5894
5894
  }
5895
5895
  } : {}
@@ -6127,7 +6127,7 @@ let es = class extends K {
6127
6127
  {
6128
6128
  let a;
6129
6129
  const i = [];
6130
- for (const c of s) {
6130
+ for (const u of s) {
6131
6131
  const l = {
6132
6132
  ...t,
6133
6133
  common: {
@@ -6135,7 +6135,7 @@ let es = class extends K {
6135
6135
  issues: []
6136
6136
  },
6137
6137
  parent: null
6138
- }, h = c._parseSync({
6138
+ }, h = u._parseSync({
6139
6139
  data: t.data,
6140
6140
  path: t.path,
6141
6141
  parent: l
@@ -6146,7 +6146,7 @@ let es = class extends K {
6146
6146
  }
6147
6147
  if (a)
6148
6148
  return t.common.issues.push(...a.ctx.common.issues), a.result;
6149
- const o = i.map((c) => new Ke(c));
6149
+ const o = i.map((u) => new Ke(u));
6150
6150
  return S(t, {
6151
6151
  code: w.invalid_union,
6152
6152
  unionErrors: o
@@ -6232,10 +6232,10 @@ function qa(r, e) {
6232
6232
  if (t === O.object && s === O.object) {
6233
6233
  const n = J.objectKeys(e), a = J.objectKeys(r).filter((o) => n.indexOf(o) !== -1), i = { ...r, ...e };
6234
6234
  for (const o of a) {
6235
- const c = qa(r[o], e[o]);
6236
- if (!c.valid)
6235
+ const u = qa(r[o], e[o]);
6236
+ if (!u.valid)
6237
6237
  return { valid: !1 };
6238
- i[o] = c.data;
6238
+ i[o] = u.data;
6239
6239
  }
6240
6240
  return { valid: !0, data: i };
6241
6241
  } else if (t === O.array && s === O.array) {
@@ -6243,10 +6243,10 @@ function qa(r, e) {
6243
6243
  return { valid: !1 };
6244
6244
  const n = [];
6245
6245
  for (let a = 0; a < r.length; a++) {
6246
- const i = r[a], o = e[a], c = qa(i, o);
6247
- if (!c.valid)
6246
+ const i = r[a], o = e[a], u = qa(i, o);
6247
+ if (!u.valid)
6248
6248
  return { valid: !1 };
6249
- n.push(c.data);
6249
+ n.push(u.data);
6250
6250
  }
6251
6251
  return { valid: !0, data: n };
6252
6252
  } else
@@ -6395,15 +6395,15 @@ let xn = class extends K {
6395
6395
  expected: O.map,
6396
6396
  received: s.parsedType
6397
6397
  }), L;
6398
- const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, c], l) => ({
6398
+ const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, u], l) => ({
6399
6399
  key: n._parse(new at(s, o, s.path, [l, "key"])),
6400
- value: a._parse(new at(s, c, s.path, [l, "value"]))
6400
+ value: a._parse(new at(s, u, s.path, [l, "value"]))
6401
6401
  }));
6402
6402
  if (s.common.async) {
6403
6403
  const o = /* @__PURE__ */ new Map();
6404
6404
  return Promise.resolve().then(async () => {
6405
- for (const c of i) {
6406
- const l = await c.key, h = await c.value;
6405
+ for (const u of i) {
6406
+ const l = await u.key, h = await u.value;
6407
6407
  if (l.status === "aborted" || h.status === "aborted")
6408
6408
  return L;
6409
6409
  (l.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(l.value, h.value);
@@ -6412,8 +6412,8 @@ let xn = class extends K {
6412
6412
  });
6413
6413
  } else {
6414
6414
  const o = /* @__PURE__ */ new Map();
6415
- for (const c of i) {
6416
- const l = c.key, h = c.value;
6415
+ for (const u of i) {
6416
+ const l = u.key, h = u.value;
6417
6417
  if (l.status === "aborted" || h.status === "aborted")
6418
6418
  return L;
6419
6419
  (l.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(l.value, h.value);
@@ -6454,17 +6454,17 @@ let Nn = class Ka extends K {
6454
6454
  message: n.maxSize.message
6455
6455
  }), t.dirty());
6456
6456
  const a = this._def.valueType;
6457
- function i(c) {
6457
+ function i(u) {
6458
6458
  const l = /* @__PURE__ */ new Set();
6459
- for (const h of c) {
6459
+ for (const h of u) {
6460
6460
  if (h.status === "aborted")
6461
6461
  return L;
6462
6462
  h.status === "dirty" && t.dirty(), l.add(h.value);
6463
6463
  }
6464
6464
  return { status: t.value, value: l };
6465
6465
  }
6466
- const o = [...s.data.values()].map((c, l) => a._parse(new at(s, c, s.path, l)));
6467
- return s.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
6466
+ const o = [...s.data.values()].map((u, l) => a._parse(new at(s, u, s.path, l)));
6467
+ return s.common.async ? Promise.all(o).then((u) => i(u)) : i(o);
6468
6468
  }
6469
6469
  min(e, t) {
6470
6470
  return new Ka({
@@ -6504,7 +6504,7 @@ let Nc = class Js extends K {
6504
6504
  expected: O.function,
6505
6505
  received: t.parsedType
6506
6506
  }), L;
6507
- function s(o, c) {
6507
+ function s(o, u) {
6508
6508
  return bn({
6509
6509
  data: o,
6510
6510
  path: t.path,
@@ -6516,11 +6516,11 @@ let Nc = class Js extends K {
6516
6516
  ].filter((l) => !!l),
6517
6517
  issueData: {
6518
6518
  code: w.invalid_arguments,
6519
- argumentsError: c
6519
+ argumentsError: u
6520
6520
  }
6521
6521
  });
6522
6522
  }
6523
- function n(o, c) {
6523
+ function n(o, u) {
6524
6524
  return bn({
6525
6525
  data: o,
6526
6526
  path: t.path,
@@ -6532,27 +6532,27 @@ let Nc = class Js extends K {
6532
6532
  ].filter((l) => !!l),
6533
6533
  issueData: {
6534
6534
  code: w.invalid_return_type,
6535
- returnTypeError: c
6535
+ returnTypeError: u
6536
6536
  }
6537
6537
  });
6538
6538
  }
6539
6539
  const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
6540
6540
  if (this._def.returns instanceof _r) {
6541
6541
  const o = this;
6542
- return Ze(async function(...c) {
6543
- const l = new Ke([]), h = await o._def.args.parseAsync(c, a).catch((se) => {
6544
- throw l.addIssue(s(c, se)), l;
6542
+ return Ze(async function(...u) {
6543
+ const l = new Ke([]), h = await o._def.args.parseAsync(u, a).catch((X) => {
6544
+ throw l.addIssue(s(u, X)), l;
6545
6545
  }), k = await Reflect.apply(i, this, h);
6546
- return await o._def.returns._def.type.parseAsync(k, a).catch((se) => {
6547
- throw l.addIssue(n(k, se)), l;
6546
+ return await o._def.returns._def.type.parseAsync(k, a).catch((X) => {
6547
+ throw l.addIssue(n(k, X)), l;
6548
6548
  });
6549
6549
  });
6550
6550
  } else {
6551
6551
  const o = this;
6552
- return Ze(function(...c) {
6553
- const l = o._def.args.safeParse(c, a);
6552
+ return Ze(function(...u) {
6553
+ const l = o._def.args.safeParse(u, a);
6554
6554
  if (!l.success)
6555
- throw new Ke([s(c, l.error)]);
6555
+ throw new Ke([s(u, l.error)]);
6556
6556
  const h = Reflect.apply(i, this, l.data), k = o._def.returns.safeParse(h, a);
6557
6557
  if (!k.success)
6558
6558
  throw new Ke([n(h, k.error)]);
@@ -6771,10 +6771,10 @@ let Je = class extends K {
6771
6771
  }
6772
6772
  if (n.type === "refinement") {
6773
6773
  const i = (o) => {
6774
- const c = n.refinement(o, a);
6774
+ const u = n.refinement(o, a);
6775
6775
  if (s.common.async)
6776
- return Promise.resolve(c);
6777
- if (c instanceof Promise)
6776
+ return Promise.resolve(u);
6777
+ if (u instanceof Promise)
6778
6778
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
6779
6779
  return o;
6780
6780
  };
@@ -6992,8 +6992,8 @@ Zn.create = (r, e) => new Zn({
6992
6992
  const Ic = (r, e = {}, t) => r ? wr.create().superRefine((s, n) => {
6993
6993
  var a, i;
6994
6994
  if (!r(s)) {
6995
- const o = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, c = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
6996
- n.addIssue({ code: "custom", ...l, fatal: c });
6995
+ const o = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, u = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
6996
+ n.addIssue({ code: "custom", ...l, fatal: u });
6997
6997
  }
6998
6998
  }) : wr.create(), Yh = {
6999
6999
  object: ue.lazycreate
@@ -7280,7 +7280,7 @@ class Rp extends Pc {
7280
7280
  let a = null;
7281
7281
  const i = this.endpoint.child(e), o = {};
7282
7282
  o.method = "POST", o.body = this.encoder.encode(t ?? {});
7283
- const [, c] = await this.executeMiddleware(
7283
+ const [, u] = await this.executeMiddleware(
7284
7284
  {
7285
7285
  target: i.toString(),
7286
7286
  protocol: this.endpoint.protocol,
@@ -7300,13 +7300,13 @@ class Rp extends Pc {
7300
7300
  let Re = ye;
7301
7301
  return Re.message === "Load failed" && (Re = new cs({ url: i })), [h, Re];
7302
7302
  }
7303
- const se = await k.arrayBuffer();
7303
+ const X = await k.arrayBuffer();
7304
7304
  if (k != null && k.ok)
7305
- return n != null && (a = this.encoder.decode(se, n)), [h, null];
7305
+ return n != null && (a = this.encoder.decode(X, n)), [h, null];
7306
7306
  try {
7307
7307
  if (k.status !== 400)
7308
7308
  return [h, new Error(k.statusText)];
7309
- const ye = this.encoder.decode(se, Ss), Re = vi(ye);
7309
+ const ye = this.encoder.decode(X, Ss), Re = vi(ye);
7310
7310
  return [h, Re];
7311
7311
  } catch (ye) {
7312
7312
  return [
@@ -7318,7 +7318,7 @@ class Rp extends Pc {
7318
7318
  }
7319
7319
  }
7320
7320
  );
7321
- return [a, c];
7321
+ return [a, u];
7322
7322
  }
7323
7323
  }
7324
7324
  const $ = async (r, e, t, s, n) => {
@@ -7400,9 +7400,9 @@ const Lp = "freighterctx", Up = 1e3, zp = 1001, Bp = [Up, zp], Vp = (r) => Bp.in
7400
7400
  const [, i] = await this.executeMiddleware(
7401
7401
  { target: e, protocol: "websocket", params: {}, role: "client" },
7402
7402
  async (o) => {
7403
- const c = n(this.buildURL(e, o)), l = { ...o, params: {} };
7404
- c.binaryType = Lc.MESSAGE_TYPE;
7405
- const h = await this.wrapSocket(c, t, s);
7403
+ const u = n(this.buildURL(e, o)), l = { ...o, params: {} };
7404
+ u.binaryType = Lc.MESSAGE_TYPE;
7405
+ const h = await this.wrapSocket(u, t, s);
7406
7406
  return h instanceof Error ? [l, h] : (a = h, [l, null]);
7407
7407
  }
7408
7408
  );
@@ -7434,7 +7434,7 @@ const Lp = "freighterctx", Up = 1e3, zp = 1001, Bp = [Up, zp], Vp = (r) => Bp.in
7434
7434
  fe(Dc, "MESSAGE_TYPE", "arraybuffer");
7435
7435
  let qp = Dc;
7436
7436
  var Kp = Object.defineProperty, Wp = (r, e, t) => e in r ? Kp(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, p = (r, e, t) => (Wp(r, typeof e != "symbol" ? e + "" : e, t), t);
7437
- let Fp = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Yp = (r = 21) => {
7437
+ let Fp = "_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", Yp = (r = 21) => {
7438
7438
  let e = "", t = r;
7439
7439
  for (; t--; )
7440
7440
  e += Fp[Math.random() * 64 | 0];
@@ -7595,10 +7595,10 @@ class We extends Error {
7595
7595
  else if (i.path.length === 0)
7596
7596
  s._errors.push(t(i));
7597
7597
  else {
7598
- let o = s, c = 0;
7599
- for (; c < i.path.length; ) {
7600
- const l = i.path[c];
7601
- c === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], c++;
7598
+ let o = s, u = 0;
7599
+ for (; u < i.path.length; ) {
7600
+ const l = i.path[u];
7601
+ u === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], u++;
7602
7602
  }
7603
7603
  }
7604
7604
  };
@@ -7693,8 +7693,8 @@ const $n = (r) => {
7693
7693
  path: a
7694
7694
  };
7695
7695
  let o = "";
7696
- const c = s.filter((l) => !!l).slice().reverse();
7697
- for (const l of c)
7696
+ const u = s.filter((l) => !!l).slice().reverse();
7697
+ for (const l of u)
7698
7698
  o = l(i, { data: e, defaultError: o }).message;
7699
7699
  return {
7700
7700
  ...n,
@@ -7887,7 +7887,7 @@ class W {
7887
7887
  code: _.custom,
7888
7888
  ...s(n)
7889
7889
  });
7890
- return typeof Promise < "u" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
7890
+ return typeof Promise < "u" && i instanceof Promise ? i.then((u) => u ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
7891
7891
  });
7892
7892
  }
7893
7893
  refinement(e, t) {
@@ -8892,48 +8892,48 @@ class le extends W {
8892
8892
  }
8893
8893
  _parse(e) {
8894
8894
  if (this._getType(e) !== x.object) {
8895
- const c = this._getOrReturnCtx(e);
8896
- return E(c, {
8895
+ const u = this._getOrReturnCtx(e);
8896
+ return E(u, {
8897
8897
  code: _.invalid_type,
8898
8898
  expected: x.object,
8899
- received: c.parsedType
8899
+ received: u.parsedType
8900
8900
  }), U;
8901
8901
  }
8902
8902
  const { status: t, ctx: s } = this._processInputParams(e), { shape: n, keys: a } = this._getCached(), i = [];
8903
8903
  if (!(this._def.catchall instanceof At && this._def.unknownKeys === "strip"))
8904
- for (const c in s.data)
8905
- a.includes(c) || i.push(c);
8904
+ for (const u in s.data)
8905
+ a.includes(u) || i.push(u);
8906
8906
  const o = [];
8907
- for (const c of a) {
8908
- const l = n[c], h = s.data[c];
8907
+ for (const u of a) {
8908
+ const l = n[u], h = s.data[u];
8909
8909
  o.push({
8910
- key: { status: "valid", value: c },
8911
- value: l._parse(new ot(s, h, s.path, c)),
8912
- alwaysSet: c in s.data
8910
+ key: { status: "valid", value: u },
8911
+ value: l._parse(new ot(s, h, s.path, u)),
8912
+ alwaysSet: u in s.data
8913
8913
  });
8914
8914
  }
8915
8915
  if (this._def.catchall instanceof At) {
8916
- const c = this._def.unknownKeys;
8917
- if (c === "passthrough")
8916
+ const u = this._def.unknownKeys;
8917
+ if (u === "passthrough")
8918
8918
  for (const l of i)
8919
8919
  o.push({
8920
8920
  key: { status: "valid", value: l },
8921
8921
  value: { status: "valid", value: s.data[l] }
8922
8922
  });
8923
- else if (c === "strict")
8923
+ else if (u === "strict")
8924
8924
  i.length > 0 && (E(s, {
8925
8925
  code: _.unrecognized_keys,
8926
8926
  keys: i
8927
8927
  }), t.dirty());
8928
- else if (c !== "strip")
8928
+ else if (u !== "strip")
8929
8929
  throw new Error("Internal ZodObject error: invalid unknownKeys value.");
8930
8930
  } else {
8931
- const c = this._def.catchall;
8931
+ const u = this._def.catchall;
8932
8932
  for (const l of i) {
8933
8933
  const h = s.data[l];
8934
8934
  o.push({
8935
8935
  key: { status: "valid", value: l },
8936
- value: c._parse(
8936
+ value: u._parse(
8937
8937
  new ot(s, h, s.path, l)
8938
8938
  //, ctx.child(key), value, getParsedType(value)
8939
8939
  ),
@@ -8942,17 +8942,17 @@ class le extends W {
8942
8942
  }
8943
8943
  }
8944
8944
  return s.common.async ? Promise.resolve().then(async () => {
8945
- const c = [];
8945
+ const u = [];
8946
8946
  for (const l of o) {
8947
8947
  const h = await l.key;
8948
- c.push({
8948
+ u.push({
8949
8949
  key: h,
8950
8950
  value: await l.value,
8951
8951
  alwaysSet: l.alwaysSet
8952
8952
  });
8953
8953
  }
8954
- return c;
8955
- }).then((c) => ke.mergeObjectSync(t, c)) : ke.mergeObjectSync(t, o);
8954
+ return u;
8955
+ }).then((u) => ke.mergeObjectSync(t, u)) : ke.mergeObjectSync(t, o);
8956
8956
  }
8957
8957
  get shape() {
8958
8958
  return this._def.shape();
@@ -8964,11 +8964,11 @@ class le extends W {
8964
8964
  ...e !== void 0 ? {
8965
8965
  errorMap: (t, s) => {
8966
8966
  var n, a, i, o;
8967
- const c = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
8967
+ const u = (i = (a = (n = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
8968
8968
  return t.code === "unrecognized_keys" ? {
8969
- message: (o = A.errToObj(e).message) !== null && o !== void 0 ? o : c
8969
+ message: (o = A.errToObj(e).message) !== null && o !== void 0 ? o : u
8970
8970
  } : {
8971
- message: c
8971
+ message: u
8972
8972
  };
8973
8973
  }
8974
8974
  } : {}
@@ -9206,7 +9206,7 @@ class fs extends W {
9206
9206
  {
9207
9207
  let a;
9208
9208
  const i = [];
9209
- for (const c of s) {
9209
+ for (const u of s) {
9210
9210
  const l = {
9211
9211
  ...t,
9212
9212
  common: {
@@ -9214,7 +9214,7 @@ class fs extends W {
9214
9214
  issues: []
9215
9215
  },
9216
9216
  parent: null
9217
- }, h = c._parseSync({
9217
+ }, h = u._parseSync({
9218
9218
  data: t.data,
9219
9219
  path: t.path,
9220
9220
  parent: l
@@ -9225,7 +9225,7 @@ class fs extends W {
9225
9225
  }
9226
9226
  if (a)
9227
9227
  return t.common.issues.push(...a.ctx.common.issues), a.result;
9228
- const o = i.map((c) => new We(c));
9228
+ const o = i.map((u) => new We(u));
9229
9229
  return E(t, {
9230
9230
  code: _.invalid_union,
9231
9231
  unionErrors: o
@@ -9311,10 +9311,10 @@ function Ja(r, e) {
9311
9311
  if (t === x.object && s === x.object) {
9312
9312
  const n = H.objectKeys(e), a = H.objectKeys(r).filter((o) => n.indexOf(o) !== -1), i = { ...r, ...e };
9313
9313
  for (const o of a) {
9314
- const c = Ja(r[o], e[o]);
9315
- if (!c.valid)
9314
+ const u = Ja(r[o], e[o]);
9315
+ if (!u.valid)
9316
9316
  return { valid: !1 };
9317
- i[o] = c.data;
9317
+ i[o] = u.data;
9318
9318
  }
9319
9319
  return { valid: !0, data: i };
9320
9320
  } else if (t === x.array && s === x.array) {
@@ -9322,10 +9322,10 @@ function Ja(r, e) {
9322
9322
  return { valid: !1 };
9323
9323
  const n = [];
9324
9324
  for (let a = 0; a < r.length; a++) {
9325
- const i = r[a], o = e[a], c = Ja(i, o);
9326
- if (!c.valid)
9325
+ const i = r[a], o = e[a], u = Ja(i, o);
9326
+ if (!u.valid)
9327
9327
  return { valid: !1 };
9328
- n.push(c.data);
9328
+ n.push(u.data);
9329
9329
  }
9330
9330
  return { valid: !0, data: n };
9331
9331
  } else
@@ -9474,15 +9474,15 @@ class Pn extends W {
9474
9474
  expected: x.map,
9475
9475
  received: s.parsedType
9476
9476
  }), U;
9477
- const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, c], l) => ({
9477
+ const n = this._def.keyType, a = this._def.valueType, i = [...s.data.entries()].map(([o, u], l) => ({
9478
9478
  key: n._parse(new ot(s, o, s.path, [l, "key"])),
9479
- value: a._parse(new ot(s, c, s.path, [l, "value"]))
9479
+ value: a._parse(new ot(s, u, s.path, [l, "value"]))
9480
9480
  }));
9481
9481
  if (s.common.async) {
9482
9482
  const o = /* @__PURE__ */ new Map();
9483
9483
  return Promise.resolve().then(async () => {
9484
- for (const c of i) {
9485
- const l = await c.key, h = await c.value;
9484
+ for (const u of i) {
9485
+ const l = await u.key, h = await u.value;
9486
9486
  if (l.status === "aborted" || h.status === "aborted")
9487
9487
  return U;
9488
9488
  (l.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(l.value, h.value);
@@ -9491,8 +9491,8 @@ class Pn extends W {
9491
9491
  });
9492
9492
  } else {
9493
9493
  const o = /* @__PURE__ */ new Map();
9494
- for (const c of i) {
9495
- const l = c.key, h = c.value;
9494
+ for (const u of i) {
9495
+ const l = u.key, h = u.value;
9496
9496
  if (l.status === "aborted" || h.status === "aborted")
9497
9497
  return U;
9498
9498
  (l.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(l.value, h.value);
@@ -9533,17 +9533,17 @@ class sr extends W {
9533
9533
  message: n.maxSize.message
9534
9534
  }), t.dirty());
9535
9535
  const a = this._def.valueType;
9536
- function i(c) {
9536
+ function i(u) {
9537
9537
  const l = /* @__PURE__ */ new Set();
9538
- for (const h of c) {
9538
+ for (const h of u) {
9539
9539
  if (h.status === "aborted")
9540
9540
  return U;
9541
9541
  h.status === "dirty" && t.dirty(), l.add(h.value);
9542
9542
  }
9543
9543
  return { status: t.value, value: l };
9544
9544
  }
9545
- const o = [...s.data.values()].map((c, l) => a._parse(new ot(s, c, s.path, l)));
9546
- return s.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
9545
+ const o = [...s.data.values()].map((u, l) => a._parse(new ot(s, u, s.path, l)));
9546
+ return s.common.async ? Promise.all(o).then((u) => i(u)) : i(o);
9547
9547
  }
9548
9548
  min(e, t) {
9549
9549
  return new sr({
@@ -9583,7 +9583,7 @@ class fr extends W {
9583
9583
  expected: x.function,
9584
9584
  received: t.parsedType
9585
9585
  }), U;
9586
- function s(o, c) {
9586
+ function s(o, u) {
9587
9587
  return $n({
9588
9588
  data: o,
9589
9589
  path: t.path,
@@ -9595,11 +9595,11 @@ class fr extends W {
9595
9595
  ].filter((l) => !!l),
9596
9596
  issueData: {
9597
9597
  code: _.invalid_arguments,
9598
- argumentsError: c
9598
+ argumentsError: u
9599
9599
  }
9600
9600
  });
9601
9601
  }
9602
- function n(o, c) {
9602
+ function n(o, u) {
9603
9603
  return $n({
9604
9604
  data: o,
9605
9605
  path: t.path,
@@ -9611,27 +9611,27 @@ class fr extends W {
9611
9611
  ].filter((l) => !!l),
9612
9612
  issueData: {
9613
9613
  code: _.invalid_return_type,
9614
- returnTypeError: c
9614
+ returnTypeError: u
9615
9615
  }
9616
9616
  });
9617
9617
  }
9618
9618
  const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
9619
9619
  if (this._def.returns instanceof kr) {
9620
9620
  const o = this;
9621
- return Ie(async function(...c) {
9622
- const l = new We([]), h = await o._def.args.parseAsync(c, a).catch((se) => {
9623
- throw l.addIssue(s(c, se)), l;
9621
+ return Ie(async function(...u) {
9622
+ const l = new We([]), h = await o._def.args.parseAsync(u, a).catch((X) => {
9623
+ throw l.addIssue(s(u, X)), l;
9624
9624
  }), k = await Reflect.apply(i, this, h);
9625
- return await o._def.returns._def.type.parseAsync(k, a).catch((se) => {
9626
- throw l.addIssue(n(k, se)), l;
9625
+ return await o._def.returns._def.type.parseAsync(k, a).catch((X) => {
9626
+ throw l.addIssue(n(k, X)), l;
9627
9627
  });
9628
9628
  });
9629
9629
  } else {
9630
9630
  const o = this;
9631
- return Ie(function(...c) {
9632
- const l = o._def.args.safeParse(c, a);
9631
+ return Ie(function(...u) {
9632
+ const l = o._def.args.safeParse(u, a);
9633
9633
  if (!l.success)
9634
- throw new We([s(c, l.error)]);
9634
+ throw new We([s(u, l.error)]);
9635
9635
  const h = Reflect.apply(i, this, l.data), k = o._def.returns.safeParse(h, a);
9636
9636
  if (!k.success)
9637
9637
  throw new We([n(h, k.error)]);
@@ -9850,10 +9850,10 @@ class He extends W {
9850
9850
  }
9851
9851
  if (n.type === "refinement") {
9852
9852
  const i = (o) => {
9853
- const c = n.refinement(o, a);
9853
+ const u = n.refinement(o, a);
9854
9854
  if (s.common.async)
9855
- return Promise.resolve(c);
9856
- if (c instanceof Promise)
9855
+ return Promise.resolve(u);
9856
+ if (u instanceof Promise)
9857
9857
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
9858
9858
  return o;
9859
9859
  };
@@ -10071,8 +10071,8 @@ Ln.create = (r, e) => new Ln({
10071
10071
  const qc = (r, e = {}, t) => r ? br.create().superRefine((s, n) => {
10072
10072
  var a, i;
10073
10073
  if (!r(s)) {
10074
- const o = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, c = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
10075
- n.addIssue({ code: "custom", ...l, fatal: c });
10074
+ const o = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, u = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
10075
+ n.addIssue({ code: "custom", ...l, fatal: u });
10076
10076
  }
10077
10077
  }) : br.create(), ff = {
10078
10078
  object: le.lazycreate
@@ -10350,8 +10350,8 @@ function Qs(r, e) {
10350
10350
  if (yt.isValidObject(i))
10351
10351
  yt.belongToTypes(o, e.keepTypesOnRecursion) || (o = Qs(i, e));
10352
10352
  else if (yt.isArrayObject(i)) {
10353
- var c = Qs({ key: i }, e);
10354
- o = c.key;
10353
+ var u = Qs({ key: i }, e);
10354
+ o = u.key;
10355
10355
  }
10356
10356
  return o;
10357
10357
  }))), t[a] = n;
@@ -10380,8 +10380,8 @@ function en(r, e) {
10380
10380
  if (gt.isValidObject(i))
10381
10381
  gt.belongToTypes(o, e.keepTypesOnRecursion) || (o = en(i, e));
10382
10382
  else if (gt.isArrayObject(i)) {
10383
- var c = en({ key: i }, e);
10384
- o = c.key;
10383
+ var u = en({ key: i }, e);
10384
+ o = u.key;
10385
10385
  }
10386
10386
  return o;
10387
10387
  }))), t[a] = n;
@@ -10410,8 +10410,8 @@ function tn(r, e) {
10410
10410
  if (vt.isValidObject(i))
10411
10411
  vt.belongToTypes(o, e.keepTypesOnRecursion) || (o = tn(i, e));
10412
10412
  else if (vt.isArrayObject(i)) {
10413
- var c = tn({ key: i }, e);
10414
- o = c.key;
10413
+ var u = tn({ key: i }, e);
10414
+ o = u.key;
10415
10415
  }
10416
10416
  return o;
10417
10417
  }))), t[a] = n;
@@ -10440,8 +10440,8 @@ function rn(r, e) {
10440
10440
  if (wt.isValidObject(i))
10441
10441
  wt.belongToTypes(o, e.keepTypesOnRecursion) || (o = rn(i, e));
10442
10442
  else if (wt.isArrayObject(i)) {
10443
- var c = rn({ key: i }, e);
10444
- o = c.key;
10443
+ var u = rn({ key: i }, e);
10444
+ o = u.key;
10445
10445
  }
10446
10446
  return o;
10447
10447
  }))), t[a] = n;
@@ -10470,8 +10470,8 @@ function sn(r, e) {
10470
10470
  if (_t.isValidObject(i))
10471
10471
  _t.belongToTypes(o, e.keepTypesOnRecursion) || (o = sn(i, e));
10472
10472
  else if (_t.isArrayObject(i)) {
10473
- var c = sn({ key: i }, e);
10474
- o = c.key;
10473
+ var u = sn({ key: i }, e);
10474
+ o = u.key;
10475
10475
  }
10476
10476
  return o;
10477
10477
  }))), t[a] = n;
@@ -10500,8 +10500,8 @@ function nn(r, e) {
10500
10500
  if (bt.isValidObject(i))
10501
10501
  bt.belongToTypes(o, e.keepTypesOnRecursion) || (o = nn(i, e));
10502
10502
  else if (bt.isArrayObject(i)) {
10503
- var c = nn({ key: i }, e);
10504
- o = c.key;
10503
+ var u = nn({ key: i }, e);
10504
+ o = u.key;
10505
10505
  }
10506
10506
  return o;
10507
10507
  }))), t[a] = n;
@@ -10645,10 +10645,10 @@ m.object({ offset: mo, scale: mo });
10645
10645
  const Dm = (r) => (e, t, s, n) => t === "dimension" ? [e, s] : [e, n ? s - r : s + r], Lm = (r) => (e, t, s, n) => [e, n ? s / r : s * r], Um = (r) => (e, t, s) => {
10646
10646
  if (e === null)
10647
10647
  return [r, s];
10648
- const { lower: n, upper: a } = e, { lower: i, upper: o } = r, c = a - n, l = o - i;
10648
+ const { lower: n, upper: a } = e, { lower: i, upper: o } = r, u = a - n, l = o - i;
10649
10649
  if (t === "dimension")
10650
- return [r, s * (l / c)];
10651
- const h = (s - n) * (l / c) + i;
10650
+ return [r, s * (l / u)];
10651
+ const h = (s - n) * (l / u) + i;
10652
10652
  return [r, h];
10653
10653
  }, zm = (r) => (e, t, s) => [r, s], Bm = () => (r, e, t) => {
10654
10654
  if (r === null)
@@ -10812,22 +10812,22 @@ const vo = class Tt {
10812
10812
  };
10813
10813
  p(vo, "IDENTITY", new vo());
10814
10814
  const _u = (r, e) => {
10815
- const t = new ee(e);
10815
+ const t = new te(e);
10816
10816
  if (![
10817
- ce.DAY,
10818
- ce.HOUR,
10819
- ce.MINUTE,
10820
- ce.SECOND,
10821
- ce.MILLISECOND,
10822
- ce.MICROSECOND,
10823
- ce.NANOSECOND
10817
+ ne.DAY,
10818
+ ne.HOUR,
10819
+ ne.MINUTE,
10820
+ ne.SECOND,
10821
+ ne.MILLISECOND,
10822
+ ne.MICROSECOND,
10823
+ ne.NANOSECOND
10824
10824
  ].some((n) => n.equals(t)))
10825
10825
  throw new Error(
10826
10826
  "Invalid argument for remainder. Must be an even TimeSpan or Timestamp"
10827
10827
  );
10828
10828
  const s = r.valueOf() % t.valueOf();
10829
- return r instanceof ee ? new ee(s) : new ce(s);
10830
- }, ie = class M {
10829
+ return r instanceof te ? new te(s) : new ne(s);
10830
+ }, oe = class M {
10831
10831
  constructor(e, t = "UTC") {
10832
10832
  if (p(this, "value"), p(this, "encodeValue", !0), e == null)
10833
10833
  this.value = M.now().valueOf();
@@ -10856,8 +10856,8 @@ const _u = (r, e) => {
10856
10856
  const [s, n, a] = e.split(":");
10857
10857
  let i = "00", o = "00";
10858
10858
  a != null && ([i, o] = a.split("."));
10859
- let c = M.hours(parseInt(s ?? "00", 10)).add(M.minutes(parseInt(n ?? "00", 10))).add(M.seconds(parseInt(i ?? "00", 10))).add(M.milliseconds(parseInt(o ?? "00", 10)));
10860
- return t === "local" && (c = c.add(M.utcOffset)), c.valueOf();
10859
+ let u = M.hours(parseInt(s ?? "00", 10)).add(M.minutes(parseInt(n ?? "00", 10))).add(M.seconds(parseInt(i ?? "00", 10))).add(M.milliseconds(parseInt(o ?? "00", 10)));
10860
+ return t === "local" && (u = u.add(M.utcOffset)), u.valueOf();
10861
10861
  }
10862
10862
  static parseDateTimeString(e, t = "UTC") {
10863
10863
  if (!e.includes("/") && !e.includes("-"))
@@ -10900,7 +10900,7 @@ const _u = (r, e) => {
10900
10900
  return `${s} ${n}`;
10901
10901
  }
10902
10902
  static get utcOffset() {
10903
- return new ce(
10903
+ return new ne(
10904
10904
  BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * M.MINUTE.valueOf()
10905
10905
  );
10906
10906
  }
@@ -11049,7 +11049,7 @@ const _u = (r, e) => {
11049
11049
  }
11050
11050
  /** @returns true if the day portion TimeStamp is today, false otherwise. */
11051
11051
  get isToday() {
11052
- return this.truncate(ce.DAY).equals(M.now().truncate(ce.DAY));
11052
+ return this.truncate(ne.DAY).equals(M.now().truncate(ne.DAY));
11053
11053
  }
11054
11054
  truncate(e) {
11055
11055
  return this.sub(this.remainder(e));
@@ -11107,25 +11107,25 @@ const _u = (r, e) => {
11107
11107
  return M.hours(e * 24);
11108
11108
  }
11109
11109
  };
11110
- p(ie, "NANOSECOND", ie.nanoseconds(1)), /** One microsecond after the unix epoch */
11111
- p(ie, "MICROSECOND", ie.microseconds(1)), /** One millisecond after the unix epoch */
11112
- p(ie, "MILLISECOND", ie.milliseconds(1)), /** One second after the unix epoch */
11113
- p(ie, "SECOND", ie.seconds(1)), /** One minute after the unix epoch */
11114
- p(ie, "MINUTE", ie.minutes(1)), /** One hour after the unix epoch */
11115
- p(ie, "HOUR", ie.hours(1)), /** One day after the unix epoch */
11116
- p(ie, "DAY", ie.days(1)), /** The maximum possible value for a timestamp */
11117
- p(ie, "MAX", new ie((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
11118
- p(ie, "MIN", new ie(0)), /** The unix epoch */
11119
- p(ie, "ZERO", new ie(0)), /** A zod schema for validating timestamps */
11120
- p(ie, "z", m.union([
11121
- m.object({ value: m.bigint() }).transform((r) => new ie(r.value)),
11122
- m.string().transform((r) => new ie(BigInt(r))),
11123
- m.instanceof(Number).transform((r) => new ie(r)),
11124
- m.number().transform((r) => new ie(r)),
11125
- m.instanceof(ie)
11110
+ p(oe, "NANOSECOND", oe.nanoseconds(1)), /** One microsecond after the unix epoch */
11111
+ p(oe, "MICROSECOND", oe.microseconds(1)), /** One millisecond after the unix epoch */
11112
+ p(oe, "MILLISECOND", oe.milliseconds(1)), /** One second after the unix epoch */
11113
+ p(oe, "SECOND", oe.seconds(1)), /** One minute after the unix epoch */
11114
+ p(oe, "MINUTE", oe.minutes(1)), /** One hour after the unix epoch */
11115
+ p(oe, "HOUR", oe.hours(1)), /** One day after the unix epoch */
11116
+ p(oe, "DAY", oe.days(1)), /** The maximum possible value for a timestamp */
11117
+ p(oe, "MAX", new oe((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
11118
+ p(oe, "MIN", new oe(0)), /** The unix epoch */
11119
+ p(oe, "ZERO", new oe(0)), /** A zod schema for validating timestamps */
11120
+ p(oe, "z", m.union([
11121
+ m.object({ value: m.bigint() }).transform((r) => new oe(r.value)),
11122
+ m.string().transform((r) => new oe(BigInt(r))),
11123
+ m.instanceof(Number).transform((r) => new oe(r)),
11124
+ m.number().transform((r) => new oe(r)),
11125
+ m.instanceof(oe)
11126
11126
  ]));
11127
- let ee = ie;
11128
- const oe = class Q {
11127
+ let te = oe;
11128
+ const ce = class ee {
11129
11129
  constructor(e) {
11130
11130
  p(this, "value"), p(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
11131
11131
  }
@@ -11136,52 +11136,52 @@ const oe = class Q {
11136
11136
  return this.value;
11137
11137
  }
11138
11138
  lessThan(e) {
11139
- return this.valueOf() < new Q(e).valueOf();
11139
+ return this.valueOf() < new ee(e).valueOf();
11140
11140
  }
11141
11141
  greaterThan(e) {
11142
- return this.valueOf() > new Q(e).valueOf();
11142
+ return this.valueOf() > new ee(e).valueOf();
11143
11143
  }
11144
11144
  lessThanOrEqual(e) {
11145
- return this.valueOf() <= new Q(e).valueOf();
11145
+ return this.valueOf() <= new ee(e).valueOf();
11146
11146
  }
11147
11147
  greaterThanOrEqual(e) {
11148
- return this.valueOf() >= new Q(e).valueOf();
11148
+ return this.valueOf() >= new ee(e).valueOf();
11149
11149
  }
11150
11150
  remainder(e) {
11151
11151
  return _u(this, e);
11152
11152
  }
11153
11153
  truncate(e) {
11154
- return new Q(
11154
+ return new ee(
11155
11155
  BigInt(Math.trunc(Number(this.valueOf() / e.valueOf()))) * e.valueOf()
11156
11156
  );
11157
11157
  }
11158
11158
  toString() {
11159
- const e = this.truncate(Q.DAY), t = this.truncate(Q.HOUR), s = this.truncate(Q.MINUTE), n = this.truncate(Q.SECOND), a = this.truncate(Q.MILLISECOND), i = this.truncate(Q.MICROSECOND), o = this.truncate(Q.NANOSECOND), c = e, l = t.sub(e), h = s.sub(t), k = n.sub(s), se = a.sub(n), ye = i.sub(a), Re = o.sub(i);
11159
+ const e = this.truncate(ee.DAY), t = this.truncate(ee.HOUR), s = this.truncate(ee.MINUTE), n = this.truncate(ee.SECOND), a = this.truncate(ee.MILLISECOND), i = this.truncate(ee.MICROSECOND), o = this.truncate(ee.NANOSECOND), u = e, l = t.sub(e), h = s.sub(t), k = n.sub(s), X = a.sub(n), ye = i.sub(a), Re = o.sub(i);
11160
11160
  let de = "";
11161
- return c.isZero || (de += `${c.days}d `), l.isZero || (de += `${l.hours}h `), h.isZero || (de += `${h.minutes}m `), k.isZero || (de += `${k.seconds}s `), se.isZero || (de += `${se.milliseconds}ms `), ye.isZero || (de += `${ye.microseconds}µs `), Re.isZero || (de += `${Re.nanoseconds}ns`), de.trim();
11161
+ return u.isZero || (de += `${u.days}d `), l.isZero || (de += `${l.hours}h `), h.isZero || (de += `${h.minutes}m `), k.isZero || (de += `${k.seconds}s `), X.isZero || (de += `${X.milliseconds}ms `), ye.isZero || (de += `${ye.microseconds}µs `), Re.isZero || (de += `${Re.nanoseconds}ns`), de.trim();
11162
11162
  }
11163
11163
  /** @returns the decimal number of days in the timespan */
11164
11164
  get days() {
11165
- return Number(this.valueOf() / Q.DAY.valueOf());
11165
+ return Number(this.valueOf() / ee.DAY.valueOf());
11166
11166
  }
11167
11167
  /** @returns the decimal number of hours in the timespan */
11168
11168
  get hours() {
11169
- return Number(this.valueOf() / Q.HOUR.valueOf());
11169
+ return Number(this.valueOf() / ee.HOUR.valueOf());
11170
11170
  }
11171
11171
  /** @returns the decimal number of minutes in the timespan */
11172
11172
  get minutes() {
11173
- return Number(this.valueOf() / Q.MINUTE.valueOf());
11173
+ return Number(this.valueOf() / ee.MINUTE.valueOf());
11174
11174
  }
11175
11175
  /** @returns The number of seconds in the TimeSpan. */
11176
11176
  get seconds() {
11177
- return Number(this.valueOf() / Q.SECOND.valueOf());
11177
+ return Number(this.valueOf() / ee.SECOND.valueOf());
11178
11178
  }
11179
11179
  /** @returns The number of milliseconds in the TimeSpan. */
11180
11180
  get milliseconds() {
11181
- return Number(this.valueOf() / Q.MILLISECOND.valueOf());
11181
+ return Number(this.valueOf() / ee.MILLISECOND.valueOf());
11182
11182
  }
11183
11183
  get microseconds() {
11184
- return Number(this.valueOf() / Q.MICROSECOND.valueOf());
11184
+ return Number(this.valueOf() / ee.MICROSECOND.valueOf());
11185
11185
  }
11186
11186
  get nanoseconds() {
11187
11187
  return Number(this.valueOf());
@@ -11200,7 +11200,7 @@ const oe = class Q {
11200
11200
  * @returns True if the TimeSpans are equal, false otherwise.
11201
11201
  */
11202
11202
  equals(e) {
11203
- return this.valueOf() === new Q(e).valueOf();
11203
+ return this.valueOf() === new ee(e).valueOf();
11204
11204
  }
11205
11205
  /**
11206
11206
  * Adds a TimeSpan to the TimeSpan.
@@ -11208,7 +11208,7 @@ const oe = class Q {
11208
11208
  * @returns A new TimeSpan representing the sum of the two TimeSpans.
11209
11209
  */
11210
11210
  add(e) {
11211
- return new Q(this.valueOf() + new Q(e).valueOf());
11211
+ return new ee(this.valueOf() + new ee(e).valueOf());
11212
11212
  }
11213
11213
  /**
11214
11214
  * Creates a TimeSpan representing the duration between the two timestamps.
@@ -11216,7 +11216,7 @@ const oe = class Q {
11216
11216
  * @param other
11217
11217
  */
11218
11218
  sub(e) {
11219
- return new Q(this.valueOf() - new Q(e).valueOf());
11219
+ return new ee(this.valueOf() - new ee(e).valueOf());
11220
11220
  }
11221
11221
  /**
11222
11222
  * Creates a TimeSpan representing the given number of nanoseconds.
@@ -11225,7 +11225,7 @@ const oe = class Q {
11225
11225
  * @returns A TimeSpan representing the given number of nanoseconds.
11226
11226
  */
11227
11227
  static nanoseconds(e = 1) {
11228
- return new Q(e);
11228
+ return new ee(e);
11229
11229
  }
11230
11230
  /**
11231
11231
  * Creates a TimeSpan representing the given number of microseconds.
@@ -11234,7 +11234,7 @@ const oe = class Q {
11234
11234
  * @returns A TimeSpan representing the given number of microseconds.
11235
11235
  */
11236
11236
  static microseconds(e = 1) {
11237
- return Q.nanoseconds(e * 1e3);
11237
+ return ee.nanoseconds(e * 1e3);
11238
11238
  }
11239
11239
  /**
11240
11240
  * Creates a TimeSpan representing the given number of milliseconds.
@@ -11243,7 +11243,7 @@ const oe = class Q {
11243
11243
  * @returns A TimeSpan representing the given number of milliseconds.
11244
11244
  */
11245
11245
  static milliseconds(e = 1) {
11246
- return Q.microseconds(e * 1e3);
11246
+ return ee.microseconds(e * 1e3);
11247
11247
  }
11248
11248
  /**
11249
11249
  * Creates a TimeSpan representing the given number of seconds.
@@ -11252,7 +11252,7 @@ const oe = class Q {
11252
11252
  * @returns A TimeSpan representing the given number of seconds.
11253
11253
  */
11254
11254
  static seconds(e = 1) {
11255
- return Q.milliseconds(e * 1e3);
11255
+ return ee.milliseconds(e * 1e3);
11256
11256
  }
11257
11257
  /**
11258
11258
  * Creates a TimeSpan representing the given number of minutes.
@@ -11261,7 +11261,7 @@ const oe = class Q {
11261
11261
  * @returns A TimeSpan representing the given number of minutes.
11262
11262
  */
11263
11263
  static minutes(e) {
11264
- return Q.seconds(e.valueOf() * 60);
11264
+ return ee.seconds(e.valueOf() * 60);
11265
11265
  }
11266
11266
  /**
11267
11267
  * Creates a TimeSpan representing the given number of hours.
@@ -11270,7 +11270,7 @@ const oe = class Q {
11270
11270
  * @returns A TimeSpan representing the given number of hours.
11271
11271
  */
11272
11272
  static hours(e) {
11273
- return Q.minutes(e * 60);
11273
+ return ee.minutes(e * 60);
11274
11274
  }
11275
11275
  /**
11276
11276
  * Creates a TimeSpan representing the given number of days.
@@ -11279,27 +11279,27 @@ const oe = class Q {
11279
11279
  * @returns A TimeSpan representing the given number of days.
11280
11280
  */
11281
11281
  static days(e) {
11282
- return Q.hours(e * 24);
11283
- }
11284
- };
11285
- p(oe, "NANOSECOND", oe.nanoseconds(1)), /** A microsecond. */
11286
- p(oe, "MICROSECOND", oe.microseconds(1)), /** A millisecond. */
11287
- p(oe, "MILLISECOND", oe.milliseconds(1)), /** A second. */
11288
- p(oe, "SECOND", oe.seconds(1)), /** A minute. */
11289
- p(oe, "MINUTE", oe.minutes(1)), /** Represents an hour. */
11290
- p(oe, "HOUR", oe.hours(1)), /** Represents a day. */
11291
- p(oe, "DAY", oe.days(1)), /** The maximum possible value for a TimeSpan. */
11292
- p(oe, "MAX", new oe((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
11293
- p(oe, "MIN", new oe(0)), /** The zero value for a TimeSpan. */
11294
- p(oe, "ZERO", new oe(0)), /** A zod schema for validating and transforming timespans */
11295
- p(oe, "z", m.union([
11296
- m.object({ value: m.bigint() }).transform((r) => new oe(r.value)),
11297
- m.string().transform((r) => new oe(BigInt(r))),
11298
- m.instanceof(Number).transform((r) => new oe(r)),
11299
- m.number().transform((r) => new oe(r)),
11300
- m.instanceof(oe)
11282
+ return ee.hours(e * 24);
11283
+ }
11284
+ };
11285
+ p(ce, "NANOSECOND", ce.nanoseconds(1)), /** A microsecond. */
11286
+ p(ce, "MICROSECOND", ce.microseconds(1)), /** A millisecond. */
11287
+ p(ce, "MILLISECOND", ce.milliseconds(1)), /** A second. */
11288
+ p(ce, "SECOND", ce.seconds(1)), /** A minute. */
11289
+ p(ce, "MINUTE", ce.minutes(1)), /** Represents an hour. */
11290
+ p(ce, "HOUR", ce.hours(1)), /** Represents a day. */
11291
+ p(ce, "DAY", ce.days(1)), /** The maximum possible value for a TimeSpan. */
11292
+ p(ce, "MAX", new ce((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
11293
+ p(ce, "MIN", new ce(0)), /** The zero value for a TimeSpan. */
11294
+ p(ce, "ZERO", new ce(0)), /** A zod schema for validating and transforming timespans */
11295
+ p(ce, "z", m.union([
11296
+ m.object({ value: m.bigint() }).transform((r) => new ce(r.value)),
11297
+ m.string().transform((r) => new ce(BigInt(r))),
11298
+ m.instanceof(Number).transform((r) => new ce(r)),
11299
+ m.number().transform((r) => new ce(r)),
11300
+ m.instanceof(ce)
11301
11301
  ]));
11302
- let ce = oe;
11302
+ let ne = ce;
11303
11303
  const Zr = class an extends Number {
11304
11304
  constructor(e) {
11305
11305
  e instanceof Number ? super(e.valueOf()) : super(e);
@@ -11318,7 +11318,7 @@ const Zr = class an extends Number {
11318
11318
  * @returns A TimeSpan representing the period of the Rate.
11319
11319
  */
11320
11320
  get period() {
11321
- return ce.seconds(1 / this.valueOf());
11321
+ return ne.seconds(1 / this.valueOf());
11322
11322
  }
11323
11323
  /**
11324
11324
  * Calculates the number of samples in the given TimeSpan at this rate.
@@ -11327,7 +11327,7 @@ const Zr = class an extends Number {
11327
11327
  * @returns The number of samples in the given TimeSpan at this rate.
11328
11328
  */
11329
11329
  sampleCount(e) {
11330
- return new ce(e).seconds * this.valueOf();
11330
+ return new ne(e).seconds * this.valueOf();
11331
11331
  }
11332
11332
  /**
11333
11333
  * Calculates the number of bytes in the given TimeSpan at this rate.
@@ -11346,7 +11346,7 @@ const Zr = class an extends Number {
11346
11346
  * @returns A TimeSpan that corresponds to the given number of samples.
11347
11347
  */
11348
11348
  span(e) {
11349
- return ce.seconds(e / this.valueOf());
11349
+ return ne.seconds(e / this.valueOf());
11350
11350
  }
11351
11351
  /**
11352
11352
  * Calculates a TimeSpan given the number of bytes at this rate.
@@ -11421,11 +11421,11 @@ const et = class on {
11421
11421
  * @param end - A TimeStamp representing the end of the range.
11422
11422
  */
11423
11423
  constructor(e, t) {
11424
- p(this, "start"), p(this, "end"), typeof e == "object" && "start" in e ? (this.start = new ee(e.start), this.end = new ee(e.end)) : (this.start = new ee(e), this.end = new ee(t));
11424
+ p(this, "start"), p(this, "end"), typeof e == "object" && "start" in e ? (this.start = new te(e.start), this.end = new te(e.end)) : (this.start = new te(e), this.end = new te(t));
11425
11425
  }
11426
11426
  /** @returns The TimeSpan occupied by the TimeRange. */
11427
11427
  get span() {
11428
- return new ce(this.end.valueOf() - this.start.valueOf());
11428
+ return new ne(this.end.valueOf() - this.start.valueOf());
11429
11429
  }
11430
11430
  /**
11431
11431
  * Checks if the timestamp is valid i.e. the start is before the end.
@@ -11495,11 +11495,11 @@ const et = class on {
11495
11495
  return e.start.after(this.start) && (t.start = e.start), e.start.after(this.end) && (t.end = e.start), e.end.before(this.end) && (t.end = e.end), e.end.before(this.start) && (t.start = e.end), t;
11496
11496
  }
11497
11497
  };
11498
- p(et, "MAX", new et(ee.MIN, ee.MAX)), /** The minimum possible time range. */
11499
- p(et, "MIN", new et(ee.MAX, ee.MIN)), /** A zero time range. */
11500
- p(et, "ZERO", new et(ee.ZERO, ee.ZERO)), /** A zod schema for validating and transforming time ranges */
11498
+ p(et, "MAX", new et(te.MIN, te.MAX)), /** The minimum possible time range. */
11499
+ p(et, "MIN", new et(te.MAX, te.MIN)), /** A zero time range. */
11500
+ p(et, "ZERO", new et(te.ZERO, te.ZERO)), /** A zod schema for validating and transforming time ranges */
11501
11501
  p(et, "z", m.union([
11502
- m.object({ start: ee.z, end: ee.z }).transform((r) => new et(r.start, r.end)),
11502
+ m.object({ start: te.z, end: te.z }).transform((r) => new et(r.start, r.end)),
11503
11503
  m.instanceof(et)
11504
11504
  ]));
11505
11505
  let Pe = et;
@@ -11647,7 +11647,7 @@ p(y, "z", m.union([
11647
11647
  m.string().transform((r) => new y(r)),
11648
11648
  m.instanceof(y)
11649
11649
  ]));
11650
- let re = y;
11650
+ let se = y;
11651
11651
  const be = class pe extends Number {
11652
11652
  constructor(e) {
11653
11653
  super(e.valueOf());
@@ -11685,9 +11685,9 @@ const be = class pe extends Number {
11685
11685
  return this.valueOf() / pe.TERABYTE.valueOf();
11686
11686
  }
11687
11687
  toString() {
11688
- const e = this.truncate(pe.TERABYTE), t = this.truncate(pe.GIGABYTE), s = this.truncate(pe.MEGABYTE), n = this.truncate(pe.KILOBYTE), a = this.truncate(pe.BYTE), i = e, o = t.sub(e), c = s.sub(t), l = n.sub(s), h = a.sub(n);
11688
+ const e = this.truncate(pe.TERABYTE), t = this.truncate(pe.GIGABYTE), s = this.truncate(pe.MEGABYTE), n = this.truncate(pe.KILOBYTE), a = this.truncate(pe.BYTE), i = e, o = t.sub(e), u = s.sub(t), l = n.sub(s), h = a.sub(n);
11689
11689
  let k = "";
11690
- return i.isZero || (k += `${i.terabytes}TB `), o.isZero || (k += `${o.gigabytes}GB `), c.isZero || (k += `${c.megabytes}MB `), l.isZero || (k += `${l.kilobytes}KB `), (!h.isZero || k === "") && (k += `${h.valueOf()}B`), k.trim();
11690
+ return i.isZero || (k += `${i.terabytes}TB `), o.isZero || (k += `${o.gigabytes}GB `), u.isZero || (k += `${u.megabytes}MB `), l.isZero || (k += `${l.kilobytes}KB `), (!h.isZero || k === "") && (k += `${h.valueOf()}B`), k.trim();
11691
11691
  }
11692
11692
  /**
11693
11693
  * Creates a Size from the given number of bytes.
@@ -11763,7 +11763,7 @@ m.union([
11763
11763
  ]);
11764
11764
  const bu = (r) => {
11765
11765
  const e = typeof r;
11766
- return e === "string" || e === "number" || e === "boolean" || e === "bigint" || r instanceof ee || r instanceof ce || r instanceof Date;
11766
+ return e === "string" || e === "number" || e === "boolean" || e === "bigint" || r instanceof te || r instanceof ne || r instanceof Date;
11767
11767
  }, qm = (r, e, t, s = 0) => r.usesBigInt && !e.usesBigInt ? Number(t) - Number(s) : !r.usesBigInt && e.usesBigInt ? BigInt(t) - BigInt(s) : Ir(t, -s), Km = (r) => r == null ? !1 : Array.isArray(r) || r instanceof ArrayBuffer || ArrayBuffer.isView(r) && !(r instanceof DataView) || r instanceof Ae ? !0 : bu(r), Ft = -1;
11768
11768
  class Ae {
11769
11769
  constructor(e) {
@@ -11775,55 +11775,55 @@ class Ae {
11775
11775
  glBufferUsage: a = "static",
11776
11776
  alignment: i = 0,
11777
11777
  key: o = Yp()
11778
- } = e, { data: c } = e;
11779
- if (c instanceof Ae) {
11780
- this.key = c.key, this.dataType = c.dataType, this.sampleOffset = c.sampleOffset, this.gl = c.gl, this._data = c._data, this._timeRange = c._timeRange, this.alignment = c.alignment, this._cachedMin = c._cachedMin, this._cachedMax = c._cachedMax, this.writePos = c.writePos, this._refCount = c._refCount, this._cachedLength = c._cachedLength;
11778
+ } = e, { data: u } = e;
11779
+ if (u instanceof Ae) {
11780
+ this.key = u.key, this.dataType = u.dataType, this.sampleOffset = u.sampleOffset, this.gl = u.gl, this._data = u._data, this._timeRange = u._timeRange, this.alignment = u.alignment, this._cachedMin = u._cachedMin, this._cachedMax = u._cachedMax, this.writePos = u.writePos, this._refCount = u._refCount, this._cachedLength = u._cachedLength;
11781
11781
  return;
11782
11782
  }
11783
- const l = bu(c), h = Array.isArray(c);
11783
+ const l = bu(u), h = Array.isArray(u);
11784
11784
  if (t != null)
11785
- this.dataType = new re(t);
11785
+ this.dataType = new se(t);
11786
11786
  else {
11787
- if (c instanceof ArrayBuffer)
11787
+ if (u instanceof ArrayBuffer)
11788
11788
  throw new Error(
11789
11789
  "cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
11790
11790
  );
11791
11791
  if (h || l) {
11792
- let k = c;
11792
+ let k = u;
11793
11793
  if (!l) {
11794
- if (c.length === 0)
11794
+ if (u.length === 0)
11795
11795
  throw new Error(
11796
11796
  "cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
11797
11797
  );
11798
- k = c[0];
11798
+ k = u[0];
11799
11799
  }
11800
11800
  if (typeof k == "string")
11801
- this.dataType = re.STRING;
11801
+ this.dataType = se.STRING;
11802
11802
  else if (typeof k == "number")
11803
- this.dataType = re.FLOAT64;
11803
+ this.dataType = se.FLOAT64;
11804
11804
  else if (typeof k == "bigint")
11805
- this.dataType = re.INT64;
11805
+ this.dataType = se.INT64;
11806
11806
  else if (typeof k == "boolean")
11807
- this.dataType = re.BOOLEAN;
11808
- else if (k instanceof ee || k instanceof Date || k instanceof ee)
11809
- this.dataType = re.TIMESTAMP;
11807
+ this.dataType = se.BOOLEAN;
11808
+ else if (k instanceof te || k instanceof Date || k instanceof te)
11809
+ this.dataType = se.TIMESTAMP;
11810
11810
  else if (typeof k == "object")
11811
- this.dataType = re.JSON;
11811
+ this.dataType = se.JSON;
11812
11812
  else
11813
11813
  throw new Error(
11814
11814
  `cannot infer data type of ${typeof k} when constructing a Series from a JS array`
11815
11815
  );
11816
11816
  } else
11817
- this.dataType = new re(c);
11817
+ this.dataType = new se(u);
11818
11818
  }
11819
11819
  if (!h && !l)
11820
- this._data = c;
11820
+ this._data = u;
11821
11821
  else {
11822
- let k = l ? [c] : c;
11823
- const se = k[0];
11824
- (se instanceof ee || se instanceof Date || se instanceof ce) && (k = k.map((ye) => new ee(ye).valueOf())), this.dataType.equals(re.STRING) ? (this._cachedLength = k.length, this._data = new TextEncoder().encode(k.join(`
11822
+ let k = l ? [u] : u;
11823
+ const X = k[0];
11824
+ (X instanceof te || X instanceof Date || X instanceof ne) && (k = k.map((ye) => new te(ye).valueOf())), this.dataType.equals(se.STRING) ? (this._cachedLength = k.length, this._data = new TextEncoder().encode(k.join(`
11825
11825
  `) + `
11826
- `)) : this.dataType.equals(re.JSON) ? (this._cachedLength = k.length, this._data = new TextEncoder().encode(
11826
+ `)) : this.dataType.equals(se.JSON) ? (this._cachedLength = k.length, this._data = new TextEncoder().encode(
11827
11827
  k.map((ye) => JSON.stringify(ye)).join(`
11828
11828
  `) + `
11829
11829
  `
@@ -11839,7 +11839,7 @@ class Ae {
11839
11839
  static alloc({ capacity: e, dataType: t, ...s }) {
11840
11840
  if (e === 0)
11841
11841
  throw new Error("[Series] - cannot allocate an array of length 0");
11842
- const n = new new re(t).Array(e), a = new Ae({
11842
+ const n = new new se(t).Array(e), a = new Ae({
11843
11843
  data: n.buffer,
11844
11844
  dataType: t,
11845
11845
  ...s
@@ -11850,7 +11850,7 @@ class Ae {
11850
11850
  const n = s.spanRange(t.span(e)), a = new BigInt64Array(e);
11851
11851
  for (let i = 0; i < e; i++)
11852
11852
  a[i] = BigInt(s.add(t.span(i)).valueOf());
11853
- return new Ae({ data: a, dataType: re.TIMESTAMP, timeRange: n });
11853
+ return new Ae({ data: a, dataType: se.TIMESTAMP, timeRange: n });
11854
11854
  }
11855
11855
  get refCount() {
11856
11856
  return this._refCount;
@@ -11859,7 +11859,7 @@ class Ae {
11859
11859
  const s = new TextEncoder().encode(e.join(`
11860
11860
  `) + `
11861
11861
  `);
11862
- return new Ae({ data: s, dataType: re.STRING, timeRange: t });
11862
+ return new Ae({ data: s, dataType: se.STRING, timeRange: t });
11863
11863
  }
11864
11864
  static fromJSON(e, t) {
11865
11865
  const s = new TextEncoder().encode(
@@ -11867,7 +11867,7 @@ class Ae {
11867
11867
  `) + `
11868
11868
  `
11869
11869
  );
11870
- return new Ae({ data: s, dataType: re.JSON, timeRange: t });
11870
+ return new Ae({ data: s, dataType: se.JSON, timeRange: t });
11871
11871
  }
11872
11872
  acquire(e) {
11873
11873
  this._refCount++, e != null && this.updateGLBuffer(e);
@@ -11906,15 +11906,15 @@ class Ae {
11906
11906
  return this.writePos === Ft ? this.underlyingData : new this.dataType.Array(this._data, 0, this.writePos);
11907
11907
  }
11908
11908
  toStrings() {
11909
- if (!this.dataType.equals(re.STRING))
11909
+ if (!this.dataType.equals(se.STRING))
11910
11910
  throw new Error("cannot convert non-string series to strings");
11911
11911
  return new TextDecoder().decode(this.buffer).split(`
11912
11912
  `).slice(0, -1);
11913
11913
  }
11914
11914
  toUUIDs() {
11915
- if (!this.dataType.equals(re.UUID))
11915
+ if (!this.dataType.equals(se.UUID))
11916
11916
  throw new Error("cannot convert non-uuid series to uuids");
11917
- const e = re.UUID.density.valueOf(), t = Array(this.length);
11917
+ const e = se.UUID.density.valueOf(), t = Array(this.length);
11918
11918
  for (let s = 0; s < this.length; s++) {
11919
11919
  const n = this.buffer.slice(s * e, (s + 1) * e), a = Array.from(new Uint8Array(n), (i) => i.toString(16).padStart(2, "0")).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/, "$1-$2-$3-$4-$5");
11920
11920
  t[s] = a;
@@ -11922,7 +11922,7 @@ class Ae {
11922
11922
  return t;
11923
11923
  }
11924
11924
  parseJSON(e) {
11925
- if (!this.dataType.equals(re.JSON))
11925
+ if (!this.dataType.equals(se.JSON))
11926
11926
  throw new Error("cannot convert non-string series to strings");
11927
11927
  return new TextDecoder().decode(this.buffer).split(`
11928
11928
  `).slice(0, -1).map((t) => e.parse(JSON.parse(t)));
@@ -11984,7 +11984,7 @@ class Ae {
11984
11984
  calcRawMax() {
11985
11985
  if (this.length === 0)
11986
11986
  return -1 / 0;
11987
- if (this.dataType.equals(re.TIMESTAMP))
11987
+ if (this.dataType.equals(se.TIMESTAMP))
11988
11988
  this._cachedMax = this.data[this.data.length - 1];
11989
11989
  else if (this.dataType.usesBigInt) {
11990
11990
  const e = this.data;
@@ -12004,7 +12004,7 @@ class Ae {
12004
12004
  calcRawMin() {
12005
12005
  if (this.length === 0)
12006
12006
  return 1 / 0;
12007
- if (this.dataType.equals(re.TIMESTAMP))
12007
+ if (this.dataType.equals(se.TIMESTAMP))
12008
12008
  this._cachedMin = this.data[0];
12009
12009
  else if (this.dataType.usesBigInt) {
12010
12010
  const e = this.data;
@@ -12070,7 +12070,7 @@ class Ae {
12070
12070
  return;
12071
12071
  }
12072
12072
  const a = this.data.slice(s, n);
12073
- return this.dataType.equals(re.STRING) ? new TextDecoder().decode(a) : JSON.parse(new TextDecoder().decode(a));
12073
+ return this.dataType.equals(se.STRING) ? new TextDecoder().decode(a) : JSON.parse(new TextDecoder().decode(a));
12074
12074
  }
12075
12075
  /**
12076
12076
  * @returns the index of the first sample that is greater than or equal to the given value.
@@ -12089,7 +12089,7 @@ class Ae {
12089
12089
  return t;
12090
12090
  }
12091
12091
  updateGLBuffer(e) {
12092
- if (this.gl.control = e, !this.dataType.equals(re.FLOAT32))
12092
+ if (this.gl.control = e, !this.dataType.equals(se.FLOAT32))
12093
12093
  throw new Error("Only FLOAT32 arrays can be used in WebGL");
12094
12094
  const { buffer: t, bufferUsage: s, prevBuffer: n } = this.gl;
12095
12095
  if (t == null && (this.gl.buffer = e.createBuffer()), this.writePos !== n)
@@ -12106,7 +12106,7 @@ class Ae {
12106
12106
  }
12107
12107
  as(e) {
12108
12108
  if (e === "string") {
12109
- if (!this.dataType.equals(re.STRING))
12109
+ if (!this.dataType.equals(se.STRING))
12110
12110
  throw new Error(
12111
12111
  `cannot convert series of type ${this.dataType.toString()} to string`
12112
12112
  );
@@ -12120,7 +12120,7 @@ class Ae {
12120
12120
  return this;
12121
12121
  }
12122
12122
  if (e === "bigint") {
12123
- if (!this.dataType.equals(re.INT64))
12123
+ if (!this.dataType.equals(se.INT64))
12124
12124
  throw new Error(
12125
12125
  `cannot convert series of type ${this.dataType.toString()} to bigint`
12126
12126
  );
@@ -12162,7 +12162,7 @@ class Ae {
12162
12162
  [Symbol.iterator]() {
12163
12163
  if (this.dataType.isVariable) {
12164
12164
  const e = new Wm(this);
12165
- return this.dataType.equals(re.JSON) ? new Fm(e) : e;
12165
+ return this.dataType.equals(se.JSON) ? new Fm(e) : e;
12166
12166
  }
12167
12167
  return new Ym(this);
12168
12168
  }
@@ -12251,14 +12251,14 @@ class Gm {
12251
12251
  this.series = e;
12252
12252
  }
12253
12253
  as(e) {
12254
- if (!new re(e).equals(this.dataType))
12254
+ if (!new se(e).equals(this.dataType))
12255
12255
  throw new Error(
12256
12256
  `cannot convert series of type ${this.dataType.toString()} to ${e.toString()}`
12257
12257
  );
12258
12258
  return this;
12259
12259
  }
12260
12260
  get dataType() {
12261
- return this.series.length === 0 ? re.UNKNOWN : this.series[0].dataType;
12261
+ return this.series.length === 0 ? se.UNKNOWN : this.series[0].dataType;
12262
12262
  }
12263
12263
  get timeRange() {
12264
12264
  return this.series.length === 0 ? Pe.ZERO : new Pe(
@@ -12372,7 +12372,7 @@ let ry = (cr = class {
12372
12372
  );
12373
12373
  }
12374
12374
  }, p(cr, "UNKNOWN", new cr({ host: "unknown", port: 0 })), cr);
12375
- const te = (r) => Array.isArray(r) ? r : [r];
12375
+ const re = (r) => Array.isArray(r) ? r : [r];
12376
12376
  class Su {
12377
12377
  constructor() {
12378
12378
  p(this, "contentType", "application/json"), p(this, "decoder"), this.decoder = new TextDecoder();
@@ -12411,25 +12411,25 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12411
12411
  m.object({
12412
12412
  version: ay
12413
12413
  });
12414
- const xr = u.number(), Zs = u.object({
12415
- name: u.string(),
12416
- key: u.number(),
12414
+ const xr = c.number(), Zs = c.object({
12415
+ name: c.string(),
12416
+ key: c.number(),
12417
12417
  rate: $i.z,
12418
- dataType: re.z,
12419
- leaseholder: u.number(),
12420
- index: u.number(),
12421
- isIndex: u.boolean(),
12422
- alias: u.string().optional()
12418
+ dataType: se.z,
12419
+ leaseholder: c.number(),
12420
+ index: c.number(),
12421
+ isIndex: c.boolean(),
12422
+ alias: c.string().optional()
12423
12423
  }), Zu = Zs.extend({
12424
- key: u.number().optional(),
12425
- leaseholder: u.number().optional(),
12426
- index: u.number().optional(),
12424
+ key: c.number().optional(),
12425
+ leaseholder: c.number().optional(),
12426
+ index: c.number().optional(),
12427
12427
  rate: $i.z.optional().default(0),
12428
- isIndex: u.boolean().optional()
12429
- }), iy = u.object({ channels: Zu.array() }), oy = u.object({ channels: Zs.array() }), cy = u.object({
12428
+ isIndex: c.boolean().optional()
12429
+ }), iy = c.object({ channels: Zu.array() }), oy = c.object({ channels: Zs.array() }), cy = c.object({
12430
12430
  keys: xr.array().optional(),
12431
- names: u.string().array().optional()
12432
- }), uy = u.object({}), ly = "/channel/create", dy = "/channel/delete";
12431
+ names: c.string().array().optional()
12432
+ }), uy = c.object({}), ly = "/channel/create", dy = "/channel/delete";
12433
12433
  let Iu = class {
12434
12434
  constructor(e) {
12435
12435
  d(this, "client");
@@ -12469,7 +12469,7 @@ var py = function(r, e, t, s) {
12469
12469
  i(k);
12470
12470
  }
12471
12471
  }
12472
- function c(h) {
12472
+ function u(h) {
12473
12473
  try {
12474
12474
  l(s.throw(h));
12475
12475
  } catch (k) {
@@ -12477,7 +12477,7 @@ var py = function(r, e, t, s) {
12477
12477
  }
12478
12478
  }
12479
12479
  function l(h) {
12480
- h.done ? a(h.value) : n(h.value).then(o, c);
12480
+ h.done ? a(h.value) : n(h.value).then(o, u);
12481
12481
  }
12482
12482
  l((s = s.apply(r, e || [])).next());
12483
12483
  });
@@ -12563,7 +12563,7 @@ var my = function(r, e, t, s) {
12563
12563
  i(k);
12564
12564
  }
12565
12565
  }
12566
- function c(h) {
12566
+ function u(h) {
12567
12567
  try {
12568
12568
  l(s.throw(h));
12569
12569
  } catch (k) {
@@ -12571,7 +12571,7 @@ var my = function(r, e, t, s) {
12571
12571
  }
12572
12572
  }
12573
12573
  function l(h) {
12574
- h.done ? a(h.value) : n(h.value).then(o, c);
12574
+ h.done ? a(h.value) : n(h.value).then(o, u);
12575
12575
  }
12576
12576
  l((s = s.apply(r, e || [])).next());
12577
12577
  });
@@ -12611,7 +12611,7 @@ class Kt extends Ns {
12611
12611
  }
12612
12612
  class $e extends Kt {
12613
12613
  constructor(t) {
12614
- var e = (...vb) => (super(...vb), d(this, "fields"), this);
12614
+ var e = (...wb) => (super(...wb), d(this, "fields"), this);
12615
12615
  typeof t == "string" ? (e(t), this.fields = []) : Array.isArray(t) ? (e(
12616
12616
  t.map((s) => `${s.field}: ${s.message}`).join(`
12617
12617
  `)
@@ -12648,7 +12648,7 @@ class by extends Kt {
12648
12648
  this.path = s;
12649
12649
  }
12650
12650
  }
12651
- class Z_ extends Kt {
12651
+ class I_ extends Kt {
12652
12652
  }
12653
12653
  const ky = (r) => {
12654
12654
  if (!r.type.startsWith(Ot))
@@ -12684,15 +12684,15 @@ const Oy = async (r, e) => {
12684
12684
  url: s.url
12685
12685
  })
12686
12686
  ] : [t, s];
12687
- }, xy = u.object({
12688
- leaseholder: u.number().optional(),
12689
- keys: u.number().array().optional(),
12690
- names: u.string().array().optional(),
12691
- search: u.string().optional(),
12692
- rangeKey: u.string().optional(),
12693
- limit: u.number().optional(),
12694
- offset: u.number().optional()
12695
- }), Ny = u.object({
12687
+ }, xy = c.object({
12688
+ leaseholder: c.number().optional(),
12689
+ keys: c.number().array().optional(),
12690
+ names: c.string().array().optional(),
12691
+ search: c.string().optional(),
12692
+ rangeKey: c.string().optional(),
12693
+ limit: c.number().optional(),
12694
+ offset: c.number().optional()
12695
+ }), Ny = c.object({
12696
12696
  channels: Zs.array()
12697
12697
  }), qn = class qn {
12698
12698
  constructor(e) {
@@ -12758,7 +12758,7 @@ class ji {
12758
12758
  }
12759
12759
  }
12760
12760
  const $t = (r) => {
12761
- let e = te(r).filter((s) => s !== 0), t = "keys";
12761
+ let e = re(r).filter((s) => s !== 0), t = "keys";
12762
12762
  return typeof e[0] == "string" && (isNaN(parseInt(e[0])) ? t = "names" : e = e.map((s) => parseInt(s))), {
12763
12763
  single: !Array.isArray(r),
12764
12764
  variant: t,
@@ -12824,7 +12824,7 @@ class ju {
12824
12824
  key: a = 0,
12825
12825
  isIndex: i = !1,
12826
12826
  index: o = 0,
12827
- frameClient: c,
12827
+ frameClient: u,
12828
12828
  alias: l
12829
12829
  }) {
12830
12830
  d(this, "_frameClient");
@@ -12867,7 +12867,7 @@ class ju {
12867
12867
  * should not be relied upon in the current version of Synnax.
12868
12868
  */
12869
12869
  d(this, "alias");
12870
- this.key = a, this.name = s, this.rate = new $i(t ?? 0), this.dataType = new re(e), this.leaseholder = n, this.index = o, this.isIndex = i, this.alias = l, this._frameClient = c ?? null;
12870
+ this.key = a, this.name = s, this.rate = new $i(t ?? 0), this.dataType = new se(e), this.leaseholder = n, this.index = o, this.isIndex = i, this.alias = l, this._frameClient = u ?? null;
12871
12871
  }
12872
12872
  get framer() {
12873
12873
  if (this._frameClient == null)
@@ -12920,10 +12920,10 @@ let Ru = class {
12920
12920
  }
12921
12921
  async create(e, t = {}) {
12922
12922
  const { retrieveIfNameExists: s = !1 } = t, n = !Array.isArray(e);
12923
- let a = te(e), i = [];
12923
+ let a = re(e), i = [];
12924
12924
  if (s) {
12925
- const o = await this.retriever.retrieve(a.map((l) => l.name)), c = new Set(o.map((l) => l.name));
12926
- a = a.filter((l) => !c.has(l.name)), i = this.sugar(o);
12925
+ const o = await this.retriever.retrieve(a.map((l) => l.name)), u = new Set(o.map((l) => l.name));
12926
+ a = a.filter((l) => !u.has(l.name)), i = this.sugar(o);
12927
12927
  }
12928
12928
  return i = i.concat(this.sugar(await this.writer.create(a))), n ? i[0] : i;
12929
12929
  }
@@ -12986,7 +12986,7 @@ class Sy {
12986
12986
  return await this.client.retrieve(e, this.rangeKey);
12987
12987
  }
12988
12988
  }
12989
- const A_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12989
+ const $_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12990
12990
  __proto__: null,
12991
12991
  CacheRetriever: ji,
12992
12992
  Channel: ju,
@@ -12999,9 +12999,9 @@ const A_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12999
12999
  newPayload: Zu,
13000
13000
  payload: Zs,
13001
13001
  retrieveRequired: Cu
13002
- }, Symbol.toStringTag, { value: "Module" })), Ey = u.object({
13003
- key: u.string(),
13004
- username: u.string()
13002
+ }, Symbol.toStringTag, { value: "Module" })), Ey = c.object({
13003
+ key: c.string(),
13004
+ username: c.string()
13005
13005
  }), Zy = (r) => async (e, t) => {
13006
13006
  try {
13007
13007
  const s = await r();
@@ -13010,11 +13010,11 @@ const A_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13010
13010
  return [e, s];
13011
13011
  }
13012
13012
  return await t(e);
13013
- }, Iy = u.object({
13014
- username: u.string(),
13015
- password: u.string()
13016
- }), Ay = u.object({
13017
- token: u.string(),
13013
+ }, Iy = c.object({
13014
+ username: c.string(),
13015
+ password: c.string()
13016
+ }), Ay = c.object({
13017
+ token: c.string(),
13018
13018
  user: Ey
13019
13019
  }), $y = "/auth/login";
13020
13020
  let Cy = class {
@@ -13048,13 +13048,13 @@ let Cy = class {
13048
13048
  });
13049
13049
  }
13050
13050
  };
13051
- const jy = ["disconnected", "connecting", "connected", "failed"], Pu = u.enum(jy), Mu = u.object({
13051
+ const jy = ["disconnected", "connecting", "connected", "failed"], Pu = c.enum(jy), Mu = c.object({
13052
13052
  status: Pu,
13053
- error: u.instanceof(Error).optional(),
13054
- message: u.string().optional(),
13055
- clusterKey: u.string()
13056
- }), Ry = u.object({
13057
- clusterKey: u.string()
13053
+ error: c.instanceof(Error).optional(),
13054
+ message: c.string().optional(),
13055
+ clusterKey: c.string()
13056
+ }), Ry = c.object({
13057
+ clusterKey: c.string()
13058
13058
  }), _o = {
13059
13059
  clusterKey: "",
13060
13060
  status: "disconnected",
@@ -13066,9 +13066,9 @@ const jy = ["disconnected", "connecting", "connected", "failed"], Pu = u.enum(jy
13066
13066
  * @param pollFreq - The frequency at which to poll the cluster for
13067
13067
  * connectivity information.
13068
13068
  */
13069
- constructor(e, t = ce.seconds(30), s) {
13069
+ constructor(e, t = ne.seconds(30), s) {
13070
13070
  d(this, "_state");
13071
- d(this, "pollFrequency", ce.seconds(30));
13071
+ d(this, "pollFrequency", ne.seconds(30));
13072
13072
  d(this, "client");
13073
13073
  d(this, "name");
13074
13074
  d(this, "interval");
@@ -13087,7 +13087,7 @@ const jy = ["disconnected", "connecting", "connected", "failed"], Pu = u.enum(jy
13087
13087
  var t;
13088
13088
  const e = this._state.status;
13089
13089
  try {
13090
- const [s, n] = await this.client.send(hr.ENDPOINT, {}, u.object({}), Ry);
13090
+ const [s, n] = await this.client.send(hr.ENDPOINT, {}, c.object({}), Ry);
13091
13091
  if (n != null)
13092
13092
  throw n;
13093
13093
  this._state.status = "connected", this._state.message = `Connected to ${this.name ?? "cluster"}`, this._state.clusterKey = s.clusterKey;
@@ -13112,16 +13112,16 @@ const jy = ["disconnected", "connecting", "connected", "failed"], Pu = u.enum(jy
13112
13112
  };
13113
13113
  d(hr, "ENDPOINT", "/connectivity/check"), d(hr, "DEFAULT", _o), d(hr, "connectionStateZ", Mu);
13114
13114
  let Ts = hr;
13115
- const C_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13115
+ const j_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
13116
13116
  __proto__: null,
13117
13117
  Checker: Ts,
13118
13118
  state: Mu,
13119
13119
  status: Pu
13120
13120
  }, Symbol.toStringTag, { value: "Module" })), bo = (r) => {
13121
- const e = te(r);
13121
+ const e = re(r);
13122
13122
  return e.length === 0 ? null : typeof e[0] == "number" || !isNaN(parseInt(e[0])) ? "key" : "name";
13123
13123
  }, ko = (r, e) => {
13124
- const t = te(r);
13124
+ const t = re(r);
13125
13125
  if (t.length === e.length)
13126
13126
  return;
13127
13127
  const s = bo(r);
@@ -13141,7 +13141,7 @@ class me {
13141
13141
  return;
13142
13142
  }
13143
13143
  if (e instanceof Map) {
13144
- e.forEach((n, a) => this.push(a, ...te(n)));
13144
+ e.forEach((n, a) => this.push(a, ...re(n)));
13145
13145
  return;
13146
13146
  }
13147
13147
  if (typeof e == "object" && !Array.isArray(e)) {
@@ -13152,14 +13152,14 @@ class me {
13152
13152
  Object.entries(e).forEach(([n, a]) => {
13153
13153
  const i = parseInt(n);
13154
13154
  if (isNaN(i))
13155
- this.push(n, ...te(a));
13155
+ this.push(n, ...re(a));
13156
13156
  else
13157
- return this.push(i, ...te(a));
13157
+ return this.push(i, ...re(a));
13158
13158
  });
13159
13159
  return;
13160
13160
  }
13161
13161
  if (Array.isArray(e) || ["string", "number"].includes(typeof e)) {
13162
- const n = te(t), a = te(e);
13162
+ const n = re(t), a = re(e);
13163
13163
  ko(a, n), n.forEach((i, o) => this.push(a[o], i));
13164
13164
  return;
13165
13165
  }
@@ -13260,7 +13260,7 @@ class me {
13260
13260
  if (e == null) {
13261
13261
  if (this.columns.length === 0)
13262
13262
  return Pe.ZERO;
13263
- const s = ee.min(...this.series.map((a) => a.timeRange.start)), n = ee.max(...this.series.map((a) => a.timeRange.end));
13263
+ const s = te.min(...this.series.map((a) => a.timeRange.start)), n = te.max(...this.series.map((a) => a.timeRange.end));
13264
13264
  return new Pe(s, n);
13265
13265
  }
13266
13266
  const t = this.get(e);
@@ -13354,22 +13354,22 @@ class me {
13354
13354
  return this.series.reduce((e, t) => e + t.length, 0);
13355
13355
  }
13356
13356
  }
13357
- const Du = u.object({
13357
+ const Du = c.object({
13358
13358
  timeRange: Pe.z.optional(),
13359
- alignment: u.number().optional(),
13360
- dataType: re.z,
13361
- data: u.string().transform(
13359
+ alignment: c.number().optional(),
13360
+ dataType: se.z,
13361
+ data: c.string().transform(
13362
13362
  (r) => new Uint8Array(
13363
13363
  atob(r).split("").map((e) => e.charCodeAt(0))
13364
13364
  ).buffer
13365
13365
  )
13366
- }), sa = u.object({
13367
- keys: u.union([
13368
- u.null().transform(() => []),
13369
- u.number().array().optional().default([])
13366
+ }), sa = c.object({
13367
+ keys: c.union([
13368
+ c.null().transform(() => []),
13369
+ c.number().array().optional().default([])
13370
13370
  ]),
13371
- series: u.union([
13372
- u.null().transform(() => []),
13371
+ series: c.union([
13372
+ c.null().transform(() => []),
13373
13373
  Du.array().optional().default([])
13374
13374
  ])
13375
13375
  }), Lu = (r) => {
@@ -13400,7 +13400,7 @@ class na {
13400
13400
  }
13401
13401
  const n = await this.retriever.retrieve(s), a = /* @__PURE__ */ new Map();
13402
13402
  this.adapter = a, s.forEach((i) => {
13403
- const o = n.find((c) => c.name === i);
13403
+ const o = n.find((u) => u.name === i);
13404
13404
  if (o == null)
13405
13405
  throw new Error(`Channel ${i} not found`);
13406
13406
  a.set(o.key, o.name);
@@ -13468,14 +13468,14 @@ class Ri {
13468
13468
  Received an array of channel names or keys but no array of series.
13469
13469
  `);
13470
13470
  const i = [], o = [];
13471
- for (let c = 0; c < e.length; c++) {
13472
- const l = await this.fetchChannel(e[c]);
13473
- if (c >= t.length)
13471
+ for (let u = 0; u < e.length; u++) {
13472
+ const l = await this.fetchChannel(e[u]);
13473
+ if (u >= t.length)
13474
13474
  throw new $e(`
13475
13475
  Received an array of channel names or keys but not enough series.
13476
13476
  `);
13477
13477
  const h = new Ae({
13478
- data: t[c],
13478
+ data: t[u],
13479
13479
  dataType: l.dataType
13480
13480
  });
13481
13481
  i.push(l.key), o.push(h);
@@ -13487,19 +13487,19 @@ class Ri {
13487
13487
  if (this.adapter == null)
13488
13488
  return i;
13489
13489
  let o = [];
13490
- return o = i.columns.map((c) => {
13490
+ return o = i.columns.map((u) => {
13491
13491
  var h;
13492
- const l = typeof c == "string" ? (h = this.adapter) == null ? void 0 : h.get(c) : c;
13492
+ const l = typeof u == "string" ? (h = this.adapter) == null ? void 0 : h.get(u) : u;
13493
13493
  if (l == null)
13494
13494
  throw new $e(`
13495
- Channel ${c} was not provided in the list of channels when opening the writer
13495
+ Channel ${u} was not provided in the list of channels when opening the writer
13496
13496
  `);
13497
13497
  return l;
13498
13498
  }), new me(o, i.series);
13499
13499
  }
13500
13500
  const s = [], n = [], a = Object.entries(e);
13501
13501
  for (let i = 0; i < a.length; i++) {
13502
- const [o, c] = a[i], l = await this.fetchChannel(o), h = new Ae({ data: c, dataType: l.dataType });
13502
+ const [o, u] = a[i], l = await this.fetchChannel(o), h = new Ae({ data: u, dataType: l.dataType });
13503
13503
  s.push(l.key), n.push(h);
13504
13504
  }
13505
13505
  return new me(s, n);
@@ -13546,18 +13546,18 @@ class Pi {
13546
13546
  throw t;
13547
13547
  }
13548
13548
  }
13549
- const Xa = new ce(-1);
13549
+ const Xa = new ne(-1);
13550
13550
  var Mi = /* @__PURE__ */ ((r) => (r[r.Open = 0] = "Open", r[r.Next = 1] = "Next", r[r.Prev = 2] = "Prev", r[r.SeekFirst = 3] = "SeekFirst", r[r.SeekLast = 4] = "SeekLast", r[r.SeekLE = 5] = "SeekLE", r[r.SeekGE = 6] = "SeekGE", r[r.Valid = 7] = "Valid", r[r.Error = 8] = "Error", r))(Mi || {}), zu = /* @__PURE__ */ ((r) => (r[r.None = 0] = "None", r[r.Ack = 1] = "Ack", r[r.Data = 2] = "Data", r))(zu || {});
13551
- const Py = u.object({
13552
- command: u.nativeEnum(Mi),
13553
- span: ce.z.optional(),
13551
+ const Py = c.object({
13552
+ command: c.nativeEnum(Mi),
13553
+ span: ne.z.optional(),
13554
13554
  bounds: Pe.z.optional(),
13555
- stamp: ee.z.optional(),
13556
- keys: u.number().array().optional()
13557
- }), My = u.object({
13558
- variant: u.nativeEnum(zu),
13559
- ack: u.boolean(),
13560
- command: u.nativeEnum(Mi),
13555
+ stamp: te.z.optional(),
13556
+ keys: c.number().array().optional()
13557
+ }), My = c.object({
13558
+ variant: c.nativeEnum(zu),
13559
+ ack: c.boolean(),
13560
+ command: c.nativeEnum(Mi),
13561
13561
  error: Ss.optional().nullable(),
13562
13562
  frame: sa.optional()
13563
13563
  }), $r = class $r {
@@ -13594,7 +13594,7 @@ const Py = u.object({
13594
13594
  * particular channel or the iterator has accumulated an error.
13595
13595
  */
13596
13596
  async next(e = Xa) {
13597
- return await this.execute({ command: 1, span: new ce(e) });
13597
+ return await this.execute({ command: 1, span: new ne(e) });
13598
13598
  }
13599
13599
  /**
13600
13600
  * Reads the previous time span of telemetry for each channel in the iterator.
@@ -13608,7 +13608,7 @@ const Py = u.object({
13608
13608
  * channel or the iterator has accumulated an error.
13609
13609
  */
13610
13610
  async prev(e = Xa) {
13611
- return await this.execute({ command: 2, span: new ce(e) });
13611
+ return await this.execute({ command: 2, span: new ne(e) });
13612
13612
  }
13613
13613
  /**
13614
13614
  * Seeks the iterator to the first segment in the time range, but does not read
@@ -13646,7 +13646,7 @@ const Py = u.object({
13646
13646
  * channel or has accumulated an error.
13647
13647
  */
13648
13648
  async seekLE(e) {
13649
- return await this.execute({ command: 5, stamp: new ee(e) });
13649
+ return await this.execute({ command: 5, stamp: new te(e) });
13650
13650
  }
13651
13651
  /**
13652
13652
  * Seeks the iterator to the first segment whose start is greater than or equal to
@@ -13657,7 +13657,7 @@ const Py = u.object({
13657
13657
  * channel or has accumulated an error.
13658
13658
  */
13659
13659
  async seekGE(e) {
13660
- return await this.execute({ command: 6, stamp: new ee(e) });
13660
+ return await this.execute({ command: 6, stamp: new te(e) });
13661
13661
  }
13662
13662
  /**
13663
13663
  * @returns true if the iterator value contains a valid segment, and fale otherwise.
@@ -13707,10 +13707,10 @@ class Dy {
13707
13707
  }
13708
13708
  }
13709
13709
  }
13710
- const Ly = u.object({
13711
- start: ee.z.optional(),
13712
- keys: u.number().array()
13713
- }), Uy = u.object({
13710
+ const Ly = c.object({
13711
+ start: te.z.optional(),
13712
+ keys: c.number().array()
13713
+ }), Uy = c.object({
13714
13714
  frame: sa,
13715
13715
  error: Ss.optional().nullable()
13716
13716
  }), zy = "/frame/stream";
@@ -13725,7 +13725,7 @@ class aa {
13725
13725
  }
13726
13726
  static async _open(e, t, { channels: s, from: n }) {
13727
13727
  const a = await na.open(e, s), i = await t.stream(zy, Ly, Uy), o = new aa(i, a);
13728
- return i.send({ start: new ee(n), keys: a.keys }), o;
13728
+ return i.send({ start: new te(n), keys: a.keys }), o;
13729
13729
  }
13730
13730
  async next() {
13731
13731
  try {
@@ -13749,18 +13749,18 @@ class aa {
13749
13749
  }
13750
13750
  const jt = class jt extends Number {
13751
13751
  };
13752
- d(jt, "Absolute", 255), d(jt, "Default", 1), d(jt, "z", u.union([
13753
- u.instanceof(jt),
13754
- u.number().int().min(0).max(255).transform((e) => new jt(e)),
13755
- u.instanceof(Number).transform((e) => new jt(e))
13752
+ d(jt, "Absolute", 255), d(jt, "Default", 1), d(jt, "z", c.union([
13753
+ c.instanceof(jt),
13754
+ c.number().int().min(0).max(255).transform((e) => new jt(e)),
13755
+ c.instanceof(Number).transform((e) => new jt(e))
13756
13756
  ]));
13757
13757
  let Or = jt;
13758
- const Di = u.object({
13759
- name: u.string(),
13760
- key: u.string()
13761
- }), By = u.object({
13758
+ const Di = c.object({
13759
+ name: c.string(),
13760
+ key: c.string()
13761
+ }), By = c.object({
13762
13762
  subject: Di,
13763
- resource: u.number(),
13763
+ resource: c.number(),
13764
13764
  authority: Or.z
13765
13765
  }), Vy = (...r) => (e) => e.filter((t) => {
13766
13766
  let s = !1;
@@ -13805,19 +13805,21 @@ class Li {
13805
13805
  }
13806
13806
  }
13807
13807
  var Ui = /* @__PURE__ */ ((r) => (r[r.Open = 0] = "Open", r[r.Write = 1] = "Write", r[r.Commit = 2] = "Commit", r[r.Error = 3] = "Error", r[r.SetAuthority = 4] = "SetAuthority", r[r.SetMode = 5] = "SetMode", r))(Ui || {}), Os = /* @__PURE__ */ ((r) => (r[r.PersistStream = 1] = "PersistStream", r[r.PersistOnly = 2] = "PersistOnly", r[r.StreamOnly = 3] = "StreamOnly", r))(Os || {});
13808
- const Ky = u.object({
13809
- start: ee.z.optional(),
13808
+ const Ky = new ne(-1), Wy = c.object({
13809
+ start: te.z.optional(),
13810
13810
  controlSubject: Di.optional(),
13811
- keys: u.number().array().optional(),
13811
+ keys: c.number().array().optional(),
13812
13812
  authorities: Or.z.array().optional(),
13813
- mode: u.nativeEnum(Os).optional()
13814
- }), Wy = u.object({
13815
- command: u.nativeEnum(Ui),
13816
- config: Ky.optional(),
13813
+ mode: c.nativeEnum(Os).optional(),
13814
+ enableAutoCommit: c.boolean().optional(),
13815
+ autoIndexPersistInterval: ne.z.optional()
13816
+ }), Fy = c.object({
13817
+ command: c.nativeEnum(Ui),
13818
+ config: Wy.optional(),
13817
13819
  frame: sa.optional()
13818
- }), Fy = u.object({
13819
- ack: u.boolean(),
13820
- command: u.nativeEnum(Ui),
13820
+ }), Yy = c.object({
13821
+ ack: c.boolean(),
13822
+ command: c.nativeEnum(Ui),
13821
13823
  error: Ss.optional().nullable()
13822
13824
  });
13823
13825
  var Ht;
@@ -13829,23 +13831,26 @@ let Bu = (Ht = class {
13829
13831
  }
13830
13832
  static async _open(e, t, {
13831
13833
  channels: s,
13832
- start: n = ee.now(),
13834
+ start: n = te.now(),
13833
13835
  authorities: a = Or.Absolute,
13834
13836
  controlSubject: i,
13835
- mode: o = 1
13836
- /* PersistStream */
13837
+ mode: o = 1,
13838
+ enableAutoCommit: u = !1,
13839
+ autoIndexPersistInterval: l = ne.SECOND
13837
13840
  }) {
13838
- const c = await Ri.open(e, s), l = await t.stream(Ht.ENDPOINT, Wy, Fy), h = new Ht(l, c);
13839
- return await h.execute({
13841
+ const h = await Ri.open(e, s), k = await t.stream(Ht.ENDPOINT, Fy, Yy), X = new Ht(k, h);
13842
+ return await X.execute({
13840
13843
  command: 0,
13841
13844
  config: {
13842
- start: new ee(n),
13843
- keys: c.keys,
13845
+ start: new te(n),
13846
+ keys: h.keys,
13844
13847
  controlSubject: i,
13845
- authorities: te(a),
13846
- mode: o
13848
+ authorities: re(a),
13849
+ mode: o,
13850
+ enableAutoCommit: u,
13851
+ autoIndexPersistInterval: l
13847
13852
  }
13848
- }), h;
13853
+ }), X;
13849
13854
  }
13850
13855
  /**
13851
13856
  * Writes the given frame to the database.
@@ -13947,9 +13952,8 @@ let Bu = (Ht = class {
13947
13952
  /**
13948
13953
  * Opens a new writer on the given channels.
13949
13954
  *
13950
- * @param keys - The keys of the channels to write to. A writer cannot write to
13951
- * a channel that is not in this list. See the {@link RecordWriter} documentation
13952
- * for more information.
13955
+ * @param config - The configuration for the created writer, see documentation for
13956
+ * writerConfig for more detail.
13953
13957
  * @returns a new {@link RecordWriter}.
13954
13958
  */
13955
13959
  async openWriter(e) {
@@ -14008,8 +14012,9 @@ let Bu = (Ht = class {
14008
14012
  return n;
14009
14013
  }
14010
14014
  };
14011
- const R_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14015
+ const P_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14012
14016
  __proto__: null,
14017
+ ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT: Ky,
14013
14018
  AUTO_SPAN: Xa,
14014
14019
  Client: Vu,
14015
14020
  Frame: me,
@@ -14030,20 +14035,20 @@ let qu = class {
14030
14035
  this.tasks = e, this.racks = t, this.devices = s;
14031
14036
  }
14032
14037
  };
14033
- const M_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14038
+ const D_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14034
14039
  __proto__: null,
14035
14040
  Client: qu
14036
- }, Symbol.toStringTag, { value: "Module" })), Is = u.number(), zi = u.object({
14041
+ }, Symbol.toStringTag, { value: "Module" })), Is = c.number(), zi = c.object({
14037
14042
  key: Is,
14038
- name: u.string()
14039
- }), Yy = zi.partial({ key: !0 }), Bi = u.string(), ia = u.object({
14043
+ name: c.string()
14044
+ }), Gy = zi.partial({ key: !0 }), Bi = c.string(), ia = c.object({
14040
14045
  key: Bi,
14041
14046
  rack: Is,
14042
- name: u.string(),
14043
- make: u.string(),
14044
- model: u.string(),
14045
- location: u.string(),
14046
- properties: u.string()
14047
+ name: c.string(),
14048
+ make: c.string(),
14049
+ model: c.string(),
14050
+ location: c.string(),
14051
+ properties: c.string()
14047
14052
  });
14048
14053
  class As {
14049
14054
  constructor(e, t, s, n) {
@@ -14083,7 +14088,7 @@ class As {
14083
14088
  return new As(a, n, t, s);
14084
14089
  }
14085
14090
  }
14086
- const Gy = "sy_device_set", Jy = "sy_device_delete";
14091
+ const Jy = "sy_device_set", Hy = "sy_device_delete";
14087
14092
  let Ku = class {
14088
14093
  constructor(e, t, s) {
14089
14094
  d(this, "retriever");
@@ -14095,7 +14100,7 @@ let Ku = class {
14095
14100
  return (await this.writer.create([e]))[0];
14096
14101
  }
14097
14102
  async retrieve(e) {
14098
- const t = await this.retriever.retrieve(te(e));
14103
+ const t = await this.retriever.retrieve(re(e));
14099
14104
  return Array.isArray(e) ? t : t[0];
14100
14105
  }
14101
14106
  async search(e) {
@@ -14110,18 +14115,18 @@ let Ku = class {
14110
14115
  async openDeviceTracker() {
14111
14116
  return await As.open(
14112
14117
  this.frameClient,
14113
- Gy,
14114
14118
  Jy,
14115
- Hy
14119
+ Hy,
14120
+ Xy
14116
14121
  );
14117
14122
  }
14118
14123
  };
14119
- const Hy = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, key: t, value: void 0 })) : e.parseJSON(ia).map((t) => ({ variant: r, key: t.key, value: t })), va = "/hardware/device/retrieve", wa = u.object({
14120
- search: u.string().optional(),
14121
- limit: u.number().optional(),
14122
- offset: u.number().optional(),
14124
+ const Xy = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, key: t, value: void 0 })) : e.parseJSON(ia).map((t) => ({ variant: r, key: t.key, value: t })), va = "/hardware/device/retrieve", wa = c.object({
14125
+ search: c.string().optional(),
14126
+ limit: c.number().optional(),
14127
+ offset: c.number().optional(),
14123
14128
  keys: Bi.array().optional()
14124
- }), _a = u.object({
14129
+ }), _a = c.object({
14125
14130
  devices: ia.array()
14126
14131
  });
14127
14132
  let Wu = class {
@@ -14130,22 +14135,34 @@ let Wu = class {
14130
14135
  this.client = e;
14131
14136
  }
14132
14137
  async search(e) {
14133
- return (await $(this.client, va, { keys: [e] }, wa, _a)).devices;
14138
+ return (await $(
14139
+ this.client,
14140
+ va,
14141
+ { keys: [e] },
14142
+ wa,
14143
+ _a
14144
+ )).devices;
14134
14145
  }
14135
14146
  async page(e, t) {
14136
- return (await $(this.client, va, { offset: e, limit: t }, wa, _a)).devices;
14147
+ return (await $(
14148
+ this.client,
14149
+ va,
14150
+ { offset: e, limit: t },
14151
+ wa,
14152
+ _a
14153
+ )).devices;
14137
14154
  }
14138
14155
  async retrieve(e) {
14139
14156
  return (await $(this.client, va, { keys: e }, wa, _a)).devices;
14140
14157
  }
14141
14158
  };
14142
- const Xy = "/hardware/device/create", Qy = "/hardware/device/delete", eg = u.object({
14159
+ const Qy = "/hardware/device/create", eg = "/hardware/device/delete", tg = c.object({
14143
14160
  devices: ia.array()
14144
- }), tg = u.object({
14161
+ }), rg = c.object({
14145
14162
  devices: ia.array()
14146
- }), rg = u.object({
14163
+ }), sg = c.object({
14147
14164
  keys: Bi.array()
14148
- }), sg = u.object({});
14165
+ }), ng = c.object({});
14149
14166
  let Fu = class {
14150
14167
  constructor(e) {
14151
14168
  d(this, "client");
@@ -14154,23 +14171,23 @@ let Fu = class {
14154
14171
  async create(e) {
14155
14172
  return (await $(
14156
14173
  this.client,
14157
- Xy,
14174
+ Qy,
14158
14175
  { devices: e },
14159
- eg,
14160
- tg
14176
+ tg,
14177
+ rg
14161
14178
  )).devices;
14162
14179
  }
14163
14180
  async delete(e) {
14164
14181
  await $(
14165
14182
  this.client,
14166
- Qy,
14183
+ eg,
14167
14184
  { keys: e },
14168
- rg,
14169
- sg
14185
+ sg,
14186
+ ng
14170
14187
  );
14171
14188
  }
14172
14189
  };
14173
- const z_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14190
+ const B_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14174
14191
  __proto__: null,
14175
14192
  Client: Ku,
14176
14193
  Retriever: Wu,
@@ -14198,7 +14215,7 @@ let Yu = class {
14198
14215
  return this.sugar(s);
14199
14216
  }
14200
14217
  async retrieve(e) {
14201
- const t = await this.retriever.retrieve(te(e));
14218
+ const t = await this.retriever.retrieve(re(e));
14202
14219
  return Array.isArray(e) ? this.sugar(t) : this.sugar(t)[0];
14203
14220
  }
14204
14221
  sugar(e) {
@@ -14228,13 +14245,13 @@ class Gu {
14228
14245
  await this.writer.delete([e]);
14229
14246
  }
14230
14247
  }
14231
- const ng = "/hardware/rack/create", ag = "/hardware/rack/delete", ig = u.object({
14232
- racks: Yy.array()
14233
- }), og = u.object({
14248
+ const ag = "/hardware/rack/create", ig = "/hardware/rack/delete", og = c.object({
14249
+ racks: Gy.array()
14250
+ }), cg = c.object({
14234
14251
  racks: zi.array()
14235
- }), cg = u.object({
14252
+ }), ug = c.object({
14236
14253
  keys: Is.array()
14237
- }), ug = u.object({});
14254
+ }), lg = c.object({});
14238
14255
  let Ju = class {
14239
14256
  constructor(e) {
14240
14257
  d(this, "client");
@@ -14243,28 +14260,28 @@ let Ju = class {
14243
14260
  async create(e) {
14244
14261
  return (await $(
14245
14262
  this.client,
14246
- ng,
14263
+ ag,
14247
14264
  { racks: e },
14248
- ig,
14249
- og
14265
+ og,
14266
+ cg
14250
14267
  )).racks;
14251
14268
  }
14252
14269
  async delete(e) {
14253
14270
  await $(
14254
14271
  this.client,
14255
- ag,
14272
+ ig,
14256
14273
  { keys: e },
14257
- cg,
14258
- ug
14274
+ ug,
14275
+ lg
14259
14276
  );
14260
14277
  }
14261
14278
  };
14262
- const ba = "/hardware/rack/retrieve", ka = u.object({
14279
+ const ba = "/hardware/rack/retrieve", ka = c.object({
14263
14280
  keys: Is.array().optional(),
14264
- search: u.string().optional(),
14265
- offset: u.number().optional(),
14266
- limit: u.number().optional()
14267
- }), Ta = u.object({
14281
+ search: c.string().optional(),
14282
+ offset: c.number().optional(),
14283
+ limit: c.number().optional()
14284
+ }), Ta = c.object({
14268
14285
  racks: zi.array()
14269
14286
  });
14270
14287
  let Hu = class {
@@ -14300,7 +14317,7 @@ let Hu = class {
14300
14317
  )).racks;
14301
14318
  }
14302
14319
  };
14303
- const K_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14320
+ const W_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14304
14321
  __proto__: null,
14305
14322
  Client: Yu,
14306
14323
  Rack: Gu,
@@ -14325,30 +14342,30 @@ let Xu = class {
14325
14342
  async retrieve(e) {
14326
14343
  const t = {};
14327
14344
  let s = !0;
14328
- typeof e == "number" ? t.rack = e : typeof e == "string" ? (s = !1, t.keys = [e]) : t.keys = te(e);
14345
+ typeof e == "number" ? t.rack = e : typeof e == "string" ? (s = !1, t.keys = [e]) : t.keys = re(e);
14329
14346
  const n = await this.retriever.retrieve(t);
14330
14347
  return s ? n : n[0];
14331
14348
  }
14332
14349
  };
14333
- const Vi = u.union([
14334
- u.string(),
14335
- u.bigint().transform((r) => r.toString()),
14336
- u.number().transform((r) => r.toString())
14337
- ]), qi = u.object({
14350
+ const Vi = c.union([
14351
+ c.string(),
14352
+ c.bigint().transform((r) => r.toString()),
14353
+ c.number().transform((r) => r.toString())
14354
+ ]), qi = c.object({
14338
14355
  key: Vi,
14339
- name: u.string(),
14340
- type: u.string(),
14341
- config: u.record(u.unknown()).or(u.string().transform((r) => JSON.parse(r)))
14342
- }), lg = qi.omit({ key: !0 }).extend({
14356
+ name: c.string(),
14357
+ type: c.string(),
14358
+ config: c.record(c.unknown()).or(c.string().transform((r) => JSON.parse(r)))
14359
+ }), dg = qi.omit({ key: !0 }).extend({
14343
14360
  key: Vi.transform((r) => r.toString()).optional(),
14344
- config: u.unknown().transform((r) => JSON.stringify(r))
14345
- }), Oa = u.object({
14361
+ config: c.unknown().transform((r) => JSON.stringify(r))
14362
+ }), Oa = c.object({
14346
14363
  rack: Is.optional(),
14347
- keys: u.string().array().optional(),
14348
- offset: u.number().optional(),
14349
- limit: u.number().optional()
14350
- }), xa = u.object({
14351
- tasks: u.union([qi.array(), u.null().transform(() => [])])
14364
+ keys: c.string().array().optional(),
14365
+ offset: c.number().optional(),
14366
+ limit: c.number().optional()
14367
+ }), xa = c.object({
14368
+ tasks: c.union([qi.array(), c.null().transform(() => [])])
14352
14369
  }), Na = "/hardware/task/retrieve";
14353
14370
  let Qu = class {
14354
14371
  constructor(e) {
@@ -14383,13 +14400,13 @@ let Qu = class {
14383
14400
  )).tasks;
14384
14401
  }
14385
14402
  };
14386
- const dg = "/hardware/task/create", hg = "/hardware/task/delete", pg = u.object({
14387
- tasks: lg.array()
14388
- }), fg = u.object({
14403
+ const hg = "/hardware/task/create", pg = "/hardware/task/delete", fg = c.object({
14404
+ tasks: dg.array()
14405
+ }), mg = c.object({
14389
14406
  tasks: qi.array()
14390
- }), mg = u.object({
14407
+ }), yg = c.object({
14391
14408
  keys: Vi.array()
14392
- }), yg = u.object({});
14409
+ }), gg = c.object({});
14393
14410
  let el = class {
14394
14411
  constructor(e) {
14395
14412
  d(this, "client");
@@ -14398,29 +14415,29 @@ let el = class {
14398
14415
  async create(e) {
14399
14416
  return (await $(
14400
14417
  this.client,
14401
- dg,
14418
+ hg,
14402
14419
  { tasks: e },
14403
- pg,
14404
- fg
14420
+ fg,
14421
+ mg
14405
14422
  )).tasks;
14406
14423
  }
14407
14424
  async delete(e) {
14408
14425
  await $(
14409
14426
  this.client,
14410
- hg,
14427
+ pg,
14411
14428
  { keys: e },
14412
- mg,
14413
- yg
14429
+ yg,
14430
+ gg
14414
14431
  );
14415
14432
  }
14416
14433
  };
14417
- const G_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14434
+ const J_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14418
14435
  __proto__: null,
14419
14436
  Client: Xu,
14420
14437
  Retriever: Qu,
14421
14438
  Writer: el
14422
14439
  }, Symbol.toStringTag, { value: "Module" }));
14423
- class gg {
14440
+ class vg {
14424
14441
  constructor(e, t) {
14425
14442
  d(this, "key");
14426
14443
  d(this, "name");
@@ -14433,33 +14450,33 @@ class gg {
14433
14450
  });
14434
14451
  }
14435
14452
  }
14436
- const vg = u.string().uuid(), wg = u.object({
14437
- key: vg,
14438
- name: u.string()
14439
- }), tl = u.union([
14440
- u.literal("label"),
14441
- u.literal("builtin"),
14442
- u.literal("cluster"),
14443
- u.literal("channel"),
14444
- u.literal("node"),
14445
- u.literal("group"),
14446
- u.literal("range"),
14447
- u.literal("range-alias"),
14448
- u.literal("user"),
14449
- u.literal("workspace"),
14450
- u.literal("pid"),
14451
- u.literal("lineplot"),
14452
- u.literal("rack")
14453
- ]), Ye = u.object({
14453
+ const wg = c.string().uuid(), _g = c.object({
14454
+ key: wg,
14455
+ name: c.string()
14456
+ }), tl = c.union([
14457
+ c.literal("label"),
14458
+ c.literal("builtin"),
14459
+ c.literal("cluster"),
14460
+ c.literal("channel"),
14461
+ c.literal("node"),
14462
+ c.literal("group"),
14463
+ c.literal("range"),
14464
+ c.literal("range-alias"),
14465
+ c.literal("user"),
14466
+ c.literal("workspace"),
14467
+ c.literal("pid"),
14468
+ c.literal("lineplot"),
14469
+ c.literal("rack")
14470
+ ]), Ye = c.object({
14454
14471
  type: tl,
14455
- key: u.string()
14456
- }), rl = u.string().transform((r) => {
14472
+ key: c.string()
14473
+ }), rl = c.string().transform((r) => {
14457
14474
  const [e, t] = r.split(":");
14458
14475
  return {
14459
14476
  type: e,
14460
14477
  key: t
14461
14478
  };
14462
- }), sl = u.union([rl, Ye]), pr = class pr {
14479
+ }), sl = c.union([rl, Ye]), pr = class pr {
14463
14480
  constructor(e) {
14464
14481
  d(this, "type");
14465
14482
  d(this, "key");
@@ -14481,65 +14498,65 @@ const vg = u.string().uuid(), wg = u.object({
14481
14498
  };
14482
14499
  }
14483
14500
  };
14484
- d(pr, "z", u.union([sl, u.instanceof(pr)]).transform((e) => new pr(e)));
14501
+ d(pr, "z", c.union([sl, c.instanceof(pr)]).transform((e) => new pr(e)));
14485
14502
  let we = pr;
14486
- const _g = new we({ type: "builtin", key: "root" }), nl = u.object({
14487
- type: u.number()
14488
- }), al = u.object({
14503
+ const bg = new we({ type: "builtin", key: "root" }), nl = c.object({
14504
+ type: c.number()
14505
+ }), al = c.object({
14489
14506
  type: tl,
14490
- fields: u.record(nl)
14491
- }), il = u.object({
14507
+ fields: c.record(nl)
14508
+ }), il = c.object({
14492
14509
  id: we.z,
14493
- name: u.string(),
14510
+ name: c.string(),
14494
14511
  schema: al.optional(),
14495
- data: u.record(u.unknown()).optional()
14512
+ data: c.record(c.unknown()).optional()
14496
14513
  }).transform((r) => ({
14497
14514
  key: r.id.toString(),
14498
14515
  ...r
14499
- })), bg = u.object({
14516
+ })), kg = c.object({
14500
14517
  from: we.z,
14501
- type: u.string(),
14518
+ type: c.string(),
14502
14519
  to: we.z
14503
14520
  }), Qa = (r) => {
14504
14521
  const [e, t, s] = r.split("->");
14505
14522
  return { from: new we(e), type: t, to: new we(s) };
14506
- }, kg = u.object({
14507
- group: wg
14508
- }), Tg = u.object({
14523
+ }, Tg = c.object({
14524
+ group: _g
14525
+ }), Og = c.object({
14509
14526
  parent: Ye,
14510
- name: u.string()
14511
- }), Og = u.object({
14512
- key: u.string(),
14513
- name: u.string()
14514
- }), xg = u.object({
14515
- keys: u.array(u.string())
14527
+ name: c.string()
14528
+ }), xg = c.object({
14529
+ key: c.string(),
14530
+ name: c.string()
14531
+ }), Ng = c.object({
14532
+ keys: c.array(c.string())
14516
14533
  });
14517
14534
  var st;
14518
- let Ng = (st = class {
14535
+ let Sg = (st = class {
14519
14536
  constructor(e) {
14520
14537
  d(this, "client");
14521
14538
  this.client = e;
14522
14539
  }
14523
14540
  async create(e, t) {
14524
- const [s, n] = await this.client.send(st.ENDPOINT, { parent: e, name: t }, Tg, kg);
14541
+ const [s, n] = await this.client.send(st.ENDPOINT, { parent: e, name: t }, Og, Tg);
14525
14542
  if (n != null)
14526
14543
  throw n;
14527
14544
  return s.group;
14528
14545
  }
14529
14546
  async rename(e, t) {
14530
- const s = { key: e, name: t }, [, n] = await this.client.send(st.ENDPOINT_RENAME, s, Og, u.object({}));
14547
+ const s = { key: e, name: t }, [, n] = await this.client.send(st.ENDPOINT_RENAME, s, xg, c.object({}));
14531
14548
  if (n != null)
14532
14549
  throw n;
14533
14550
  }
14534
14551
  async delete(e) {
14535
- const t = { keys: e }, [, s] = await this.client.send(st.ENDPOINT_DELETE, t, xg, u.object({}));
14552
+ const t = { keys: e }, [, s] = await this.client.send(st.ENDPOINT_DELETE, t, Ng, c.object({}));
14536
14553
  if (s != null)
14537
14554
  throw s;
14538
14555
  }
14539
- }, d(st, "ENDPOINT", "/ontology/create-group"), d(st, "ENDPOINT_RENAME", "/ontology/rename-group"), d(st, "ENDPOINT_DELETE", "/ontology/delete-group"), st), Sg = class {
14556
+ }, d(st, "ENDPOINT", "/ontology/create-group"), d(st, "ENDPOINT_RENAME", "/ontology/rename-group"), d(st, "ENDPOINT_DELETE", "/ontology/delete-group"), st), Eg = class {
14540
14557
  constructor(e) {
14541
14558
  d(this, "creator");
14542
- this.creator = new Ng(e);
14559
+ this.creator = new Sg(e);
14543
14560
  }
14544
14561
  async create(e, t) {
14545
14562
  return this.sugar(await this.creator.create(e, t));
@@ -14551,21 +14568,21 @@ let Ng = (st = class {
14551
14568
  return await this.creator.delete(e);
14552
14569
  }
14553
14570
  sugar(e) {
14554
- return new gg(e.name, e.key);
14571
+ return new vg(e.name, e.key);
14555
14572
  }
14556
14573
  };
14557
- const Eg = u.object({
14574
+ const Zg = c.object({
14558
14575
  ids: Ye.array().optional(),
14559
- children: u.boolean().optional(),
14560
- parents: u.boolean().optional(),
14561
- includeSchema: u.boolean().optional(),
14562
- includeFieldData: u.boolean().optional(),
14563
- term: u.string().optional()
14564
- }), Zg = u.object({
14576
+ children: c.boolean().optional(),
14577
+ parents: c.boolean().optional(),
14578
+ includeSchema: c.boolean().optional(),
14579
+ includeFieldData: c.boolean().optional(),
14580
+ term: c.string().optional()
14581
+ }), Ig = c.object({
14565
14582
  resources: il.array()
14566
14583
  });
14567
14584
  var mr;
14568
- let Ig = (mr = class {
14585
+ let Ag = (mr = class {
14569
14586
  constructor(e) {
14570
14587
  d(this, "client");
14571
14588
  this.client = e;
@@ -14575,14 +14592,14 @@ let Ig = (mr = class {
14575
14592
  }
14576
14593
  async retrieve(e, t = !0, s = !0) {
14577
14594
  return await this.execute({
14578
- ids: te(e).map((n) => new we(n).payload),
14595
+ ids: re(e).map((n) => new we(n).payload),
14579
14596
  includeFieldData: s,
14580
14597
  includeSchema: t
14581
14598
  });
14582
14599
  }
14583
14600
  async retrieveChildren(e, t = !0, s = !0) {
14584
14601
  return await this.execute({
14585
- ids: te(e).map((n) => new we(n).payload),
14602
+ ids: re(e).map((n) => new we(n).payload),
14586
14603
  children: !0,
14587
14604
  includeSchema: t,
14588
14605
  includeFieldData: s
@@ -14590,7 +14607,7 @@ let Ig = (mr = class {
14590
14607
  }
14591
14608
  async retrieveParents(e, t = !0, s = !0) {
14592
14609
  return await this.execute({
14593
- ids: te(e).map((n) => new we(n).payload),
14610
+ ids: re(e).map((n) => new we(n).payload),
14594
14611
  parents: !0,
14595
14612
  includeSchema: t,
14596
14613
  includeFieldData: s
@@ -14601,8 +14618,8 @@ let Ig = (mr = class {
14601
14618
  this.client,
14602
14619
  mr.ENDPOINT,
14603
14620
  e,
14604
- Eg,
14605
- Zg
14621
+ Zg,
14622
+ Ig
14606
14623
  )).resources;
14607
14624
  }
14608
14625
  }, d(mr, "ENDPOINT", "/ontology/retrieve"), mr);
@@ -14610,15 +14627,15 @@ const Sa = {
14610
14627
  ADD_CHILDREN: "/ontology/add-children",
14611
14628
  REMOVE_CHILDREN: "/ontology/remove-children",
14612
14629
  MOVE_CHILDREN: "/ontology/move-children"
14613
- }, To = u.object({
14630
+ }, To = c.object({
14614
14631
  id: Ye,
14615
14632
  children: Ye.array()
14616
- }), Ag = u.object({
14633
+ }), $g = c.object({
14617
14634
  from: Ye,
14618
14635
  to: Ye,
14619
14636
  children: Ye.array()
14620
14637
  });
14621
- let $g = class {
14638
+ let Cg = class {
14622
14639
  constructor(e) {
14623
14640
  d(this, "client");
14624
14641
  this.client = e;
@@ -14629,7 +14646,7 @@ let $g = class {
14629
14646
  Sa.ADD_CHILDREN,
14630
14647
  { id: e, children: t },
14631
14648
  To,
14632
- u.object({})
14649
+ c.object({})
14633
14650
  );
14634
14651
  }
14635
14652
  async removeChildren(e, ...t) {
@@ -14638,12 +14655,12 @@ let $g = class {
14638
14655
  Sa.REMOVE_CHILDREN,
14639
14656
  { id: e, children: t },
14640
14657
  To,
14641
- u.object({})
14658
+ c.object({})
14642
14659
  );
14643
14660
  }
14644
14661
  async moveChildren(e, t, ...s) {
14645
14662
  const n = { from: e, to: t, children: s };
14646
- await $(this.client, Sa.MOVE_CHILDREN, n, Ag, u.object({}));
14663
+ await $(this.client, Sa.MOVE_CHILDREN, n, $g, c.object({}));
14647
14664
  }
14648
14665
  };
14649
14666
  const Oo = "sy_ontology_resource_set", xo = "sy_ontology_resource_delete", No = "sy_ontology_relationship_set", So = "sy_ontology_relationship_delete";
@@ -14699,7 +14716,7 @@ class oa {
14699
14716
  }));
14700
14717
  } catch (n) {
14701
14718
  if (n instanceof ut)
14702
- return console.warn(n), [];
14719
+ return [];
14703
14720
  throw n;
14704
14721
  }
14705
14722
  }
@@ -14726,7 +14743,7 @@ let ol = class {
14726
14743
  d(this, "retriever");
14727
14744
  d(this, "writer");
14728
14745
  d(this, "framer");
14729
- this.retriever = new Ig(e), this.writer = new $g(e), this.groups = new Sg(e), this.framer = t;
14746
+ this.retriever = new Ag(e), this.writer = new Cg(e), this.groups = new Eg(e), this.framer = t;
14730
14747
  }
14731
14748
  async search(e) {
14732
14749
  return await this.retriever.search(e);
@@ -14765,31 +14782,31 @@ let ol = class {
14765
14782
  return await oa.open(this.framer, this.retriever);
14766
14783
  }
14767
14784
  };
14768
- const Q_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14785
+ const eb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14769
14786
  __proto__: null,
14770
14787
  ChangeTracker: oa,
14771
14788
  Client: ol,
14772
14789
  ID: we,
14773
- Root: _g,
14790
+ Root: bg,
14774
14791
  crudeIDZ: sl,
14775
14792
  idZ: Ye,
14776
14793
  parseRelationship: Qa,
14777
- relationshipSchemaZ: bg,
14794
+ relationshipSchemaZ: kg,
14778
14795
  resourceSchemaZ: il,
14779
14796
  schemaFieldZ: nl,
14780
14797
  schemaZ: al,
14781
14798
  stringIDZ: rl
14782
- }, Symbol.toStringTag, { value: "Module" })), Nr = u.string().uuid(), $s = u.object({
14799
+ }, Symbol.toStringTag, { value: "Module" })), Nr = c.string().uuid(), $s = c.object({
14783
14800
  key: Nr,
14784
- name: u.string().min(1),
14785
- color: u.string()
14786
- }), Cg = (r) => new we({ type: "label", key: r }), jg = u.object({
14801
+ name: c.string().min(1),
14802
+ color: c.string()
14803
+ }), jg = (r) => new we({ type: "label", key: r }), Rg = c.object({
14787
14804
  keys: Nr.array().optional(),
14788
14805
  for: Ye.optional(),
14789
- search: u.string().optional(),
14790
- offset: u.number().optional(),
14791
- limit: u.number().optional()
14792
- }), Rg = u.object({
14806
+ search: c.string().optional(),
14807
+ offset: c.number().optional(),
14808
+ limit: c.number().optional()
14809
+ }), Pg = c.object({
14793
14810
  labels: $s.array().optional().default([])
14794
14811
  });
14795
14812
  var yr;
@@ -14799,7 +14816,7 @@ let cl = (yr = class {
14799
14816
  this.client = e;
14800
14817
  }
14801
14818
  async retrieve(e) {
14802
- const t = te(e);
14819
+ const t = re(e);
14803
14820
  return await this.execute({ keys: t });
14804
14821
  }
14805
14822
  async retrieveFor(e) {
@@ -14815,24 +14832,24 @@ let cl = (yr = class {
14815
14832
  const [t, s] = await this.client.send(
14816
14833
  yr.ENDPOINT,
14817
14834
  e,
14818
- jg,
14819
- Rg
14835
+ Rg,
14836
+ Pg
14820
14837
  );
14821
14838
  if (s != null)
14822
14839
  throw s;
14823
14840
  return t.labels;
14824
14841
  }
14825
14842
  }, d(yr, "ENDPOINT", "/label/retrieve"), yr);
14826
- const ul = $s.extend({ key: Nr.optional() }), Pg = u.object({
14843
+ const ul = $s.extend({ key: Nr.optional() }), Mg = c.object({
14827
14844
  labels: ul.array()
14828
- }), Mg = u.object({
14845
+ }), Dg = c.object({
14829
14846
  labels: $s.array()
14830
- }), Dg = u.object({
14847
+ }), Lg = c.object({
14831
14848
  keys: Nr.array()
14832
- }), ll = u.object({
14849
+ }), ll = c.object({
14833
14850
  id: Ye,
14834
14851
  labels: Nr.array()
14835
- }), Lg = ll, Ea = u.object({}), Ug = "/label/create", zg = "/label/delete", Bg = "/label/set", Vg = "/label/remove";
14852
+ }), Ug = ll, Ea = c.object({}), zg = "/label/create", Bg = "/label/delete", Vg = "/label/set", qg = "/label/remove";
14836
14853
  let dl = class {
14837
14854
  constructor(e) {
14838
14855
  d(this, "client");
@@ -14841,25 +14858,25 @@ let dl = class {
14841
14858
  async create(e) {
14842
14859
  return (await $(
14843
14860
  this.client,
14844
- Ug,
14845
- { labels: te(e) },
14846
- Pg,
14847
- Mg
14861
+ zg,
14862
+ { labels: re(e) },
14863
+ Mg,
14864
+ Dg
14848
14865
  )).labels;
14849
14866
  }
14850
14867
  async delete(e) {
14851
14868
  await $(
14852
14869
  this.client,
14853
- zg,
14854
- { keys: te(e) },
14855
- Dg,
14870
+ Bg,
14871
+ { keys: re(e) },
14872
+ Lg,
14856
14873
  Ea
14857
14874
  );
14858
14875
  }
14859
14876
  async set(e, t) {
14860
14877
  await $(
14861
14878
  this.client,
14862
- Bg,
14879
+ Vg,
14863
14880
  { id: e, labels: t },
14864
14881
  ll,
14865
14882
  Ea
@@ -14868,14 +14885,14 @@ let dl = class {
14868
14885
  async remove(e, t) {
14869
14886
  await $(
14870
14887
  this.client,
14871
- Vg,
14888
+ qg,
14872
14889
  { id: e, labels: t },
14873
- Lg,
14890
+ Ug,
14874
14891
  Ea
14875
14892
  );
14876
14893
  }
14877
14894
  };
14878
- const qg = "sy_label_set", Kg = "sy_label_delete";
14895
+ const Kg = "sy_label_set", Wg = "sy_label_delete";
14879
14896
  let hl = class {
14880
14897
  constructor(e, t) {
14881
14898
  d(this, "retriever");
@@ -14912,20 +14929,20 @@ let hl = class {
14912
14929
  async openChangeTracker() {
14913
14930
  return await As.open(
14914
14931
  this.frameClient,
14915
- qg,
14916
14932
  Kg,
14917
- Wg
14933
+ Wg,
14934
+ Fg
14918
14935
  );
14919
14936
  }
14920
14937
  };
14921
- const Wg = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
14938
+ const Fg = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
14922
14939
  variant: r,
14923
14940
  key: t
14924
14941
  })) : e.parseJSON($s).map((t) => ({
14925
14942
  variant: r,
14926
14943
  key: t.key,
14927
14944
  value: t
14928
- })), rb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14945
+ })), sb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14929
14946
  __proto__: null,
14930
14947
  Client: hl,
14931
14948
  Retriever: cl,
@@ -14933,15 +14950,15 @@ const Wg = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
14933
14950
  keyZ: Nr,
14934
14951
  labelZ: $s,
14935
14952
  newLabelPayloadZ: ul,
14936
- ontologyID: Cg
14937
- }, Symbol.toStringTag, { value: "Module" })), Te = u.string().uuid(), Cs = u.object({
14953
+ ontologyID: jg
14954
+ }, Symbol.toStringTag, { value: "Module" })), Te = c.string().uuid(), Cs = c.object({
14938
14955
  key: Te,
14939
- name: u.string().min(1),
14956
+ name: c.string().min(1),
14940
14957
  timeRange: Pe.z
14941
14958
  }), pl = Cs.extend({
14942
- key: u.string().uuid().optional()
14959
+ key: c.string().uuid().optional()
14943
14960
  }), Ki = (r) => {
14944
- const e = te(r);
14961
+ const e = re(r);
14945
14962
  if (e.length === 0)
14946
14963
  throw new Error("Range params must not be empty");
14947
14964
  const t = Te.safeParse(e[0]).success;
@@ -14951,14 +14968,14 @@ const Wg = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
14951
14968
  normalized: e,
14952
14969
  actual: r
14953
14970
  };
14954
- }, Fg = u.object({}), Yg = u.object({
14971
+ }, Yg = c.object({}), Gg = c.object({
14955
14972
  range: Cs
14956
- }), Gg = u.object({
14973
+ }), Jg = c.object({
14957
14974
  range: Te
14958
- }), Jg = u.object({
14975
+ }), Hg = c.object({
14959
14976
  range: Te
14960
- }), Hg = u.object({}), Xg = "/range/set-active", Qg = "/range/retrieve-active", ev = "/range/clear-active";
14961
- class tv {
14977
+ }), Xg = c.object({}), Qg = "/range/set-active", ev = "/range/retrieve-active", tv = "/range/clear-active";
14978
+ class rv {
14962
14979
  constructor(e) {
14963
14980
  d(this, "client");
14964
14981
  this.client = e;
@@ -14966,18 +14983,18 @@ class tv {
14966
14983
  async setActive(e) {
14967
14984
  await $(
14968
14985
  this.client,
14969
- Xg,
14986
+ Qg,
14970
14987
  { range: e },
14971
- Gg,
14972
- Fg
14988
+ Jg,
14989
+ Yg
14973
14990
  );
14974
14991
  }
14975
14992
  async retrieveActive() {
14976
14993
  const [e, t] = await this.client.send(
14977
- Qg,
14994
+ ev,
14978
14995
  {},
14979
- u.object({}),
14980
- Yg
14996
+ c.object({}),
14997
+ Gg
14981
14998
  );
14982
14999
  if (t instanceof ut)
14983
15000
  return null;
@@ -14988,28 +15005,28 @@ class tv {
14988
15005
  async clearActive(e) {
14989
15006
  await $(
14990
15007
  this.client,
14991
- ev,
15008
+ tv,
14992
15009
  { range: e },
14993
- Jg,
14994
- Hg
15010
+ Hg,
15011
+ Xg
14995
15012
  );
14996
15013
  }
14997
15014
  }
14998
- const rv = "sy_range_alias_set", sv = "sy_range_alias_delete", nv = u.object({
15015
+ const sv = "sy_range_alias_set", nv = "sy_range_alias_delete", av = c.object({
14999
15016
  range: Te,
15000
- aliases: u.string().array()
15001
- }), av = u.object({
15002
- aliases: u.record(u.string(), xr)
15003
- }), iv = u.object({
15017
+ aliases: c.string().array()
15018
+ }), iv = c.object({
15019
+ aliases: c.record(c.string(), xr)
15020
+ }), ov = c.object({
15004
15021
  range: Te,
15005
- aliases: u.record(xr.or(u.string()), u.string())
15006
- }), ov = u.unknown(), cv = u.object({
15022
+ aliases: c.record(xr.or(c.string()), c.string())
15023
+ }), cv = c.unknown(), uv = c.object({
15007
15024
  range: Te,
15008
15025
  channels: xr.array()
15009
- }), uv = u.unknown(), lv = u.object({
15026
+ }), lv = c.unknown(), dv = c.object({
15010
15027
  range: Te
15011
- }), dv = u.object({
15012
- aliases: u.record(u.string(), u.string())
15028
+ }), hv = c.object({
15029
+ aliases: c.record(c.string(), c.string())
15013
15030
  }), rt = class rt {
15014
15031
  constructor(e, t, s) {
15015
15032
  d(this, "frameClient");
@@ -15036,8 +15053,8 @@ const rv = "sy_range_alias_set", sv = "sy_range_alias_delete", nv = u.object({
15036
15053
  this.client,
15037
15054
  rt.RESOLVE_ENDPOINT,
15038
15055
  { range: this.rangeKey, aliases: t },
15039
- nv,
15040
- av
15056
+ av,
15057
+ iv
15041
15058
  );
15042
15059
  return Object.entries(a.aliases).forEach(([i, o]) => this.cache.set(i, o)), s ? a.aliases[t[0]] : { ...n, ...a.aliases };
15043
15060
  }
@@ -15046,8 +15063,8 @@ const rv = "sy_range_alias_set", sv = "sy_range_alias_delete", nv = u.object({
15046
15063
  this.client,
15047
15064
  rt.SET_ENDPOINT,
15048
15065
  { range: this.rangeKey, aliases: e },
15049
- iv,
15050
- ov
15066
+ ov,
15067
+ cv
15051
15068
  );
15052
15069
  }
15053
15070
  async list() {
@@ -15055,8 +15072,8 @@ const rv = "sy_range_alias_set", sv = "sy_range_alias_delete", nv = u.object({
15055
15072
  this.client,
15056
15073
  rt.LIST_ENDPOINT,
15057
15074
  { range: this.rangeKey },
15058
- lv,
15059
- dv
15075
+ dv,
15076
+ hv
15060
15077
  )).aliases;
15061
15078
  }
15062
15079
  async delete(e) {
@@ -15064,44 +15081,44 @@ const rv = "sy_range_alias_set", sv = "sy_range_alias_delete", nv = u.object({
15064
15081
  this.client,
15065
15082
  rt.DELETE_ENDPOINT,
15066
15083
  { range: this.rangeKey, channels: e },
15067
- cv,
15068
- uv
15084
+ uv,
15085
+ lv
15069
15086
  );
15070
15087
  }
15071
15088
  async openChangeTracker() {
15072
15089
  return await As.open(
15073
15090
  this.frameClient,
15074
- rv,
15075
15091
  sv,
15076
- fv(this.rangeKey)
15092
+ nv,
15093
+ mv(this.rangeKey)
15077
15094
  );
15078
15095
  }
15079
15096
  };
15080
15097
  d(rt, "SET_ENDPOINT", "/range/alias/set"), d(rt, "RESOLVE_ENDPOINT", "/range/alias/resolve"), d(rt, "LIST_ENDPOINT", "/range/alias/list"), d(rt, "DELETE_ENDPOINT", "/range/alias/delete");
15081
15098
  let ei = rt;
15082
- const hv = u.object({
15099
+ const pv = c.object({
15083
15100
  range: Te,
15084
15101
  channel: xr,
15085
- alias: u.string()
15086
- }), pv = "---", fv = (r) => (e, t) => e === "delete" ? t.toStrings().filter((s) => s.split(pv)[0] === r).map((s) => ({
15102
+ alias: c.string()
15103
+ }), fv = "---", mv = (r) => (e, t) => e === "delete" ? t.toStrings().filter((s) => s.split(fv)[0] === r).map((s) => ({
15087
15104
  variant: e,
15088
15105
  key: s,
15089
15106
  value: void 0
15090
- })) : t.parseJSON(hv).map((s) => ({
15107
+ })) : t.parseJSON(pv).map((s) => ({
15091
15108
  variant: e,
15092
15109
  key: s.alias,
15093
15110
  value: s
15094
- })), mv = u.object({
15111
+ })), yv = c.object({
15095
15112
  range: Te,
15096
- keys: u.string().array()
15097
- }), yv = u.object({
15098
- pairs: u.record(u.string(), u.string())
15099
- }), gv = u.object({
15113
+ keys: c.string().array()
15114
+ }), gv = c.object({
15115
+ pairs: c.record(c.string(), c.string())
15116
+ }), vv = c.object({
15100
15117
  range: Te,
15101
- pairs: u.record(u.string(), u.string())
15102
- }), vv = u.object({
15118
+ pairs: c.record(c.string(), c.string())
15119
+ }), wv = c.object({
15103
15120
  range: Te,
15104
- keys: u.string().array()
15121
+ keys: c.string().array()
15105
15122
  }), Rt = class Rt {
15106
15123
  constructor(e, t) {
15107
15124
  d(this, "rangeKey");
@@ -15111,9 +15128,9 @@ const hv = u.object({
15111
15128
  async get(e) {
15112
15129
  const [t, s] = await this.client.send(
15113
15130
  Rt.GET_ENDPOINT,
15114
- { range: this.rangeKey, keys: te(e) },
15115
- mv,
15116
- yv
15131
+ { range: this.rangeKey, keys: re(e) },
15132
+ yv,
15133
+ gv
15117
15134
  );
15118
15135
  if (s != null)
15119
15136
  throw s;
@@ -15127,17 +15144,17 @@ const hv = u.object({
15127
15144
  range: this.rangeKey,
15128
15145
  pairs: xu(e) ? e : { [e]: t }
15129
15146
  },
15130
- gv,
15131
- u.unknown()
15147
+ vv,
15148
+ c.unknown()
15132
15149
  );
15133
15150
  }
15134
15151
  async delete(e) {
15135
15152
  await $(
15136
15153
  this.client,
15137
15154
  Rt.DELETE_ENDPOINT,
15138
- { range: this.rangeKey, keys: te(e) },
15139
- vv,
15140
- u.unknown()
15155
+ { range: this.rangeKey, keys: re(e) },
15156
+ wv,
15157
+ c.unknown()
15141
15158
  );
15142
15159
  }
15143
15160
  };
@@ -15145,7 +15162,7 @@ d(Rt, "GET_ENDPOINT", "/range/kv/get"), d(Rt, "SET_ENDPOINT", "/range/kv/set"),
15145
15162
  let ti = Rt;
15146
15163
  const Za = (r) => new we({ type: "range", key: r });
15147
15164
  class fl {
15148
- constructor(e, t = Pe.ZERO, s, n, a, i, o, c) {
15165
+ constructor(e, t = Pe.ZERO, s, n, a, i, o, u) {
15149
15166
  d(this, "key");
15150
15167
  d(this, "name");
15151
15168
  d(this, "kv");
@@ -15154,7 +15171,7 @@ class fl {
15154
15171
  d(this, "aliaser");
15155
15172
  d(this, "frameClient");
15156
15173
  d(this, "labelClient");
15157
- this.key = s, this.name = e, this.timeRange = t, this.frameClient = n, this.kv = a, this.aliaser = i, this.channels = o, this.labelClient = c;
15174
+ this.key = s, this.name = e, this.timeRange = t, this.frameClient = n, this.kv = a, this.aliaser = i, this.channels = o, this.labelClient = u;
15158
15175
  }
15159
15176
  async setAlias(e, t) {
15160
15177
  const s = await this.channels.retrieve(e);
@@ -15193,17 +15210,17 @@ let ml = class {
15193
15210
  d(this, "channels");
15194
15211
  d(this, "active");
15195
15212
  d(this, "labelClient");
15196
- this.frameClient = e, this.retriever = t, this.writer = s, this.unaryClient = n, this.channels = a, this.active = new tv(n), this.labelClient = i;
15213
+ this.frameClient = e, this.retriever = t, this.writer = s, this.unaryClient = n, this.channels = a, this.active = new rv(n), this.labelClient = i;
15197
15214
  }
15198
15215
  async create(e) {
15199
- const t = !Array.isArray(e), s = this.sugar(await this.writer.create(te(e)));
15216
+ const t = !Array.isArray(e), s = this.sugar(await this.writer.create(re(e)));
15200
15217
  return t ? s[0] : s;
15201
15218
  }
15202
15219
  async rename(e, t) {
15203
15220
  await this.writer.rename(e, t);
15204
15221
  }
15205
15222
  async delete(e) {
15206
- await this.writer.delete(te(e));
15223
+ await this.writer.delete(re(e));
15207
15224
  }
15208
15225
  async search(e) {
15209
15226
  return this.sugar(await this.retriever.search(e));
@@ -15244,16 +15261,16 @@ let ml = class {
15244
15261
  ));
15245
15262
  }
15246
15263
  };
15247
- const wv = u.object({
15264
+ const _v = c.object({
15248
15265
  ranges: Cs.array()
15249
- }), _v = u.object({
15266
+ }), bv = c.object({
15250
15267
  ranges: pl.array()
15251
- }), bv = u.object({
15268
+ }), kv = c.object({
15252
15269
  keys: Te.array()
15253
- }), kv = u.object({}), Tv = u.object({
15270
+ }), Tv = c.object({}), Ov = c.object({
15254
15271
  key: Te,
15255
- name: u.string()
15256
- }), Ov = u.object({}), xv = "/range/create", Nv = "/range/delete", Sv = "/range/rename";
15272
+ name: c.string()
15273
+ }), xv = c.object({}), Nv = "/range/create", Sv = "/range/delete", Ev = "/range/rename";
15257
15274
  let yl = class {
15258
15275
  constructor(e) {
15259
15276
  d(this, "client");
@@ -15262,37 +15279,37 @@ let yl = class {
15262
15279
  async rename(e, t) {
15263
15280
  await $(
15264
15281
  this.client,
15265
- Sv,
15282
+ Ev,
15266
15283
  { key: e, name: t },
15267
- Tv,
15268
- Ov
15284
+ Ov,
15285
+ xv
15269
15286
  );
15270
15287
  }
15271
15288
  async create(e) {
15272
15289
  return (await $(
15273
15290
  this.client,
15274
- xv,
15291
+ Nv,
15275
15292
  { ranges: e },
15276
- _v,
15277
- wv
15293
+ bv,
15294
+ _v
15278
15295
  )).ranges;
15279
15296
  }
15280
15297
  async delete(e) {
15281
15298
  await $(
15282
15299
  this.client,
15283
- Nv,
15300
+ Sv,
15284
15301
  { keys: e },
15285
- bv,
15286
- kv
15302
+ kv,
15303
+ Tv
15287
15304
  );
15288
15305
  }
15289
15306
  };
15290
- const Ev = u.object({
15307
+ const Zv = c.object({
15291
15308
  keys: Te.array().optional(),
15292
- names: u.array(u.string()).optional(),
15293
- term: u.string().optional()
15294
- }), Zv = u.object({
15295
- ranges: u.array(Cs)
15309
+ names: c.array(c.string()).optional(),
15310
+ term: c.string().optional()
15311
+ }), Iv = c.object({
15312
+ ranges: c.array(Cs)
15296
15313
  });
15297
15314
  let gl = class {
15298
15315
  constructor(e) {
@@ -15308,13 +15325,13 @@ let gl = class {
15308
15325
  return await this.execute({ term: e });
15309
15326
  }
15310
15327
  async execute(e) {
15311
- const [t, s] = await this.client.send(this.ENDPOINT, e, Ev, Zv);
15328
+ const [t, s] = await this.client.send(this.ENDPOINT, e, Zv, Iv);
15312
15329
  if (s != null)
15313
15330
  throw s;
15314
15331
  return t.ranges;
15315
15332
  }
15316
15333
  };
15317
- const ib = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15334
+ const ob = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15318
15335
  __proto__: null,
15319
15336
  Client: ml,
15320
15337
  Range: fl,
@@ -15324,14 +15341,14 @@ const ib = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15324
15341
  keyZ: Te,
15325
15342
  newPayloadZ: pl,
15326
15343
  payloadZ: Cs
15327
- }, Symbol.toStringTag, { value: "Module" })), Iv = "/api/v1/";
15328
- class Av {
15344
+ }, Symbol.toStringTag, { value: "Module" })), Av = "/api/v1/";
15345
+ class $v {
15329
15346
  constructor(e, t = !1) {
15330
15347
  d(this, "url");
15331
15348
  d(this, "unary");
15332
15349
  d(this, "stream");
15333
15350
  d(this, "secure");
15334
- this.secure = t, this.url = e.child(Iv);
15351
+ this.secure = t, this.url = e.child(Av);
15335
15352
  const s = new Eu.JSONEncoderDecoder();
15336
15353
  this.unary = new Rp(this.url, s, this.secure), this.stream = new qp(this.url, s, this.secure);
15337
15354
  }
@@ -15339,56 +15356,56 @@ class Av {
15339
15356
  this.unary.use(...e), this.stream.use(...e);
15340
15357
  }
15341
15358
  }
15342
- const Wt = u.string().uuid(), Wi = u.object({
15343
- name: u.string(),
15359
+ const Wt = c.string().uuid(), Wi = c.object({
15360
+ name: c.string(),
15344
15361
  key: Wt,
15345
- layout: Ci.or(u.string().transform((r) => JSON.parse(r)))
15362
+ layout: Ci.or(c.string().transform((r) => JSON.parse(r)))
15346
15363
  }), Fi = Wi.omit({ layout: !0 }).extend({
15347
- layout: u.string().transform((r) => JSON.parse(r))
15348
- }), Yi = u.string().uuid(), Gi = u.object({
15349
- key: u.string(),
15350
- name: u.string(),
15351
- data: Ci.or(u.string().transform((r) => JSON.parse(r)))
15352
- }), $v = u.object({
15353
- keys: u.string().array()
15354
- }), Cv = u.object({
15364
+ layout: c.string().transform((r) => JSON.parse(r))
15365
+ }), Yi = c.string().uuid(), Gi = c.object({
15366
+ key: c.string(),
15367
+ name: c.string(),
15368
+ data: Ci.or(c.string().transform((r) => JSON.parse(r)))
15369
+ }), Cv = c.object({
15370
+ keys: c.string().array()
15371
+ }), jv = c.object({
15355
15372
  linePlots: Gi.array()
15356
15373
  });
15357
- let jv = class {
15374
+ let Rv = class {
15358
15375
  constructor(e) {
15359
15376
  d(this, "ENDPOINT", "/workspace/lineplot/retrieve");
15360
15377
  d(this, "client");
15361
15378
  this.client = e;
15362
15379
  }
15363
15380
  async retrieve(e) {
15364
- const t = te(e);
15381
+ const t = re(e);
15365
15382
  return (await $(
15366
15383
  this.client,
15367
15384
  this.ENDPOINT,
15368
15385
  { keys: t },
15369
- $v,
15370
- Cv
15386
+ Cv,
15387
+ jv
15371
15388
  )).linePlots;
15372
15389
  }
15373
15390
  };
15374
- const Rv = Gi.partial({ key: !0 }).transform((r) => ({
15391
+ const Pv = Gi.partial({ key: !0 }).transform((r) => ({
15375
15392
  ...r,
15376
15393
  data: JSON.stringify(r.data)
15377
- })), Pv = u.object({
15394
+ })), Mv = c.object({
15378
15395
  workspace: Wt,
15379
- linePlots: Rv.array()
15380
- }), Mv = u.object({
15396
+ linePlots: Pv.array()
15397
+ }), Dv = c.object({
15381
15398
  linePlots: Gi.array()
15382
- }), Dv = u.object({
15399
+ }), Lv = c.object({
15383
15400
  keys: Yi.array()
15384
- }), Lv = u.object({}), Uv = u.object({
15401
+ }), Uv = c.object({}), zv = c.object({
15385
15402
  key: Yi,
15386
- name: u.string()
15387
- }), zv = u.object({}), Bv = u.object({
15403
+ name: c.string()
15404
+ }), Bv = c.object({}), Vv = c.object({
15388
15405
  key: Yi,
15389
- data: u.string()
15390
- }), Vv = u.object({}), qv = "/workspace/lineplot/create", Kv = "/workspace/lineplot/delete", Wv = "/workspace/lineplot/rename", Fv = "/workspace/lineplot/set-data";
15391
- let Yv = class {
15406
+ data: c.string()
15407
+ }), qv = c.object({}), Kv = "/workspace/lineplot/create", Wv = "/workspace/lineplot/delete", Fv = "/workspace/lineplot/rename", Yv = "/workspace/lineplot/set-data";
15408
+ let Gv = class {
15392
15409
  constructor(e) {
15393
15410
  d(this, "client");
15394
15411
  this.client = e;
@@ -15397,45 +15414,45 @@ let Yv = class {
15397
15414
  const s = { ...t, data: JSON.stringify(t.data) };
15398
15415
  return (await $(
15399
15416
  this.client,
15400
- qv,
15417
+ Kv,
15401
15418
  { workspace: e, linePlots: [s] },
15402
- Pv,
15403
- Mv
15419
+ Mv,
15420
+ Dv
15404
15421
  )).linePlots[0];
15405
15422
  }
15406
15423
  async delete(e) {
15407
- const t = te(e);
15424
+ const t = re(e);
15408
15425
  await $(
15409
15426
  this.client,
15410
- Kv,
15427
+ Wv,
15411
15428
  { keys: t },
15412
- Dv,
15413
- Lv
15429
+ Lv,
15430
+ Uv
15414
15431
  );
15415
15432
  }
15416
15433
  async rename(e, t) {
15417
15434
  await $(
15418
15435
  this.client,
15419
- Wv,
15436
+ Fv,
15420
15437
  { key: e, name: t },
15421
- Uv,
15422
- zv
15438
+ zv,
15439
+ Bv
15423
15440
  );
15424
15441
  }
15425
15442
  async setData(e, t) {
15426
15443
  await $(
15427
15444
  this.client,
15428
- Fv,
15445
+ Yv,
15429
15446
  { key: e, data: JSON.stringify(t) },
15430
- Bv,
15431
- Vv
15447
+ Vv,
15448
+ qv
15432
15449
  );
15433
15450
  }
15434
- }, Gv = class {
15451
+ }, Jv = class {
15435
15452
  constructor(e) {
15436
15453
  d(this, "writer");
15437
15454
  d(this, "retriever");
15438
- this.writer = new Yv(e), this.retriever = new jv(e);
15455
+ this.writer = new Gv(e), this.retriever = new Rv(e);
15439
15456
  }
15440
15457
  async create(e, t) {
15441
15458
  return await this.writer.create(e, t);
@@ -15454,22 +15471,22 @@ let Yv = class {
15454
15471
  await this.writer.delete(e);
15455
15472
  }
15456
15473
  };
15457
- const ca = u.string().uuid(), Jv = u.object({
15458
- key: u.string(),
15459
- name: u.string(),
15460
- data: Ci.or(u.string().transform((r) => JSON.parse(r))),
15461
- snapshot: u.boolean()
15462
- }), Ji = u.object({
15463
- key: u.string(),
15464
- name: u.string(),
15465
- snapshot: u.boolean(),
15466
- data: u.string().transform((r) => JSON.parse(r))
15467
- }), Hv = u.object({
15468
- keys: u.string().array()
15469
- }), Xv = u.object({
15474
+ const ca = c.string().uuid(), Hv = c.object({
15475
+ key: c.string(),
15476
+ name: c.string(),
15477
+ data: Ci.or(c.string().transform((r) => JSON.parse(r))),
15478
+ snapshot: c.boolean()
15479
+ }), Ji = c.object({
15480
+ key: c.string(),
15481
+ name: c.string(),
15482
+ snapshot: c.boolean(),
15483
+ data: c.string().transform((r) => JSON.parse(r))
15484
+ }), Xv = c.object({
15485
+ keys: c.string().array()
15486
+ }), Qv = c.object({
15470
15487
  pids: Ji.array()
15471
15488
  });
15472
- let Qv = class {
15489
+ let ew = class {
15473
15490
  constructor(e) {
15474
15491
  d(this, "ENDPOINT", "/workspace/pid/retrieve");
15475
15492
  d(this, "client");
@@ -15479,38 +15496,38 @@ let Qv = class {
15479
15496
  return (await $(
15480
15497
  this.client,
15481
15498
  this.ENDPOINT,
15482
- { keys: te(e) },
15483
- Hv,
15484
- Xv
15499
+ { keys: re(e) },
15500
+ Xv,
15501
+ Qv
15485
15502
  )).pids;
15486
15503
  }
15487
15504
  };
15488
- const ew = Jv.partial({ key: !0, snapshot: !0 }).transform((r) => ({
15505
+ const tw = Hv.partial({ key: !0, snapshot: !0 }).transform((r) => ({
15489
15506
  ...r,
15490
15507
  data: JSON.stringify(r.data)
15491
- })), tw = u.object({
15508
+ })), rw = c.object({
15492
15509
  workspace: Wt,
15493
- pids: ew.array()
15494
- }), rw = u.object({
15510
+ pids: tw.array()
15511
+ }), sw = c.object({
15495
15512
  pids: Ji.array()
15496
- }), sw = u.object({
15513
+ }), nw = c.object({
15497
15514
  keys: ca.array()
15498
- }), nw = u.object({}), aw = u.object({
15515
+ }), aw = c.object({}), iw = c.object({
15499
15516
  key: ca,
15500
- name: u.string()
15501
- }), Eo = u.object({}), iw = u.object({
15517
+ name: c.string()
15518
+ }), Eo = c.object({}), ow = c.object({
15502
15519
  key: ca,
15503
- data: u.string()
15520
+ data: c.string()
15504
15521
  });
15505
- u.object({});
15506
- const ow = u.object({
15522
+ c.object({});
15523
+ const cw = c.object({
15507
15524
  key: ca,
15508
- name: u.string(),
15509
- snapshot: u.boolean()
15510
- }), cw = u.object({
15525
+ name: c.string(),
15526
+ snapshot: c.boolean()
15527
+ }), uw = c.object({
15511
15528
  pid: Ji
15512
- }), uw = "/workspace/pid/create", lw = "/workspace/pid/delete", dw = "/workspace/pid/rename", hw = "/workspace/pid/set-data", pw = "/workspace/pid/copy";
15513
- let fw = class {
15529
+ }), lw = "/workspace/pid/create", dw = "/workspace/pid/delete", hw = "/workspace/pid/rename", pw = "/workspace/pid/set-data", fw = "/workspace/pid/copy";
15530
+ let mw = class {
15514
15531
  constructor(e) {
15515
15532
  d(this, "client");
15516
15533
  this.client = e;
@@ -15519,54 +15536,54 @@ let fw = class {
15519
15536
  const s = { ...t, data: JSON.stringify(t.data) };
15520
15537
  return (await $(
15521
15538
  this.client,
15522
- uw,
15539
+ lw,
15523
15540
  { workspace: e, pids: [s] },
15524
- tw,
15525
- rw
15541
+ rw,
15542
+ sw
15526
15543
  )).pids[0];
15527
15544
  }
15528
15545
  async copy(e, t, s) {
15529
15546
  return (await $(
15530
15547
  this.client,
15531
- pw,
15548
+ fw,
15532
15549
  { key: e, name: t, snapshot: s },
15533
- ow,
15534
- cw
15550
+ cw,
15551
+ uw
15535
15552
  )).pid;
15536
15553
  }
15537
15554
  async delete(e) {
15538
- const t = te(e);
15555
+ const t = re(e);
15539
15556
  await $(
15540
15557
  this.client,
15541
- lw,
15558
+ dw,
15542
15559
  { keys: t },
15543
- sw,
15544
- nw
15560
+ nw,
15561
+ aw
15545
15562
  );
15546
15563
  }
15547
15564
  async rename(e, t) {
15548
15565
  await $(
15549
15566
  this.client,
15550
- dw,
15567
+ hw,
15551
15568
  { key: e, name: t },
15552
- aw,
15569
+ iw,
15553
15570
  Eo
15554
15571
  );
15555
15572
  }
15556
15573
  async setData(e, t) {
15557
15574
  await $(
15558
15575
  this.client,
15559
- hw,
15576
+ pw,
15560
15577
  { key: e, data: JSON.stringify(t) },
15561
- iw,
15578
+ ow,
15562
15579
  Eo
15563
15580
  );
15564
15581
  }
15565
- }, mw = class {
15582
+ }, yw = class {
15566
15583
  constructor(e) {
15567
15584
  d(this, "writer");
15568
15585
  d(this, "retriever");
15569
- this.writer = new fw(e), this.retriever = new Qv(e);
15586
+ this.writer = new mw(e), this.retriever = new ew(e);
15570
15587
  }
15571
15588
  async create(e, t) {
15572
15589
  return await this.writer.create(e, t);
@@ -15588,13 +15605,13 @@ let fw = class {
15588
15605
  return await this.writer.copy(e, t, s);
15589
15606
  }
15590
15607
  };
15591
- const yw = u.object({
15608
+ const gw = c.object({
15592
15609
  keys: Wt.array().optional(),
15593
- search: u.string().optional(),
15594
- author: u.string().uuid().optional(),
15595
- offset: u.number().optional(),
15596
- limit: u.number().optional()
15597
- }), gw = u.object({
15610
+ search: c.string().optional(),
15611
+ author: c.string().uuid().optional(),
15612
+ offset: c.number().optional(),
15613
+ limit: c.number().optional()
15614
+ }), vw = c.object({
15598
15615
  workspaces: Fi.array()
15599
15616
  }), Kn = class Kn {
15600
15617
  constructor(e) {
@@ -15602,7 +15619,7 @@ const yw = u.object({
15602
15619
  this.client = e;
15603
15620
  }
15604
15621
  async retrieve(e) {
15605
- const t = te(e);
15622
+ const t = re(e);
15606
15623
  return await this.execute({ keys: t });
15607
15624
  }
15608
15625
  async retrieveByAuthor(e) {
@@ -15615,28 +15632,28 @@ const yw = u.object({
15615
15632
  return await this.execute({ offset: e, limit: t });
15616
15633
  }
15617
15634
  async execute(e) {
15618
- return (await $(this.client, Kn.ENDPOINT, e, yw, gw)).workspaces;
15635
+ return (await $(this.client, Kn.ENDPOINT, e, gw, vw)).workspaces;
15619
15636
  }
15620
15637
  };
15621
15638
  d(Kn, "ENDPOINT", "/workspace/retrieve");
15622
15639
  let ri = Kn;
15623
- const vw = Wi.partial({ key: !0 }).transform((r) => ({
15640
+ const ww = Wi.partial({ key: !0 }).transform((r) => ({
15624
15641
  ...r,
15625
15642
  layout: JSON.stringify(r.layout)
15626
- })), ww = u.object({
15627
- workspaces: vw.array()
15628
- }), _w = u.object({
15643
+ })), _w = c.object({
15644
+ workspaces: ww.array()
15645
+ }), bw = c.object({
15629
15646
  workspaces: Fi.array()
15630
- }), bw = u.object({
15647
+ }), kw = c.object({
15631
15648
  keys: Wt.array()
15632
- }), kw = u.object({}), Tw = u.object({
15649
+ }), Tw = c.object({}), Ow = c.object({
15633
15650
  key: Wt,
15634
- name: u.string()
15635
- }), Ow = u.object({}), xw = u.object({
15651
+ name: c.string()
15652
+ }), xw = c.object({}), Nw = c.object({
15636
15653
  key: Wt,
15637
- layout: u.string()
15638
- }), Nw = u.object({}), Sw = "/workspace/create", Ew = "/workspace/delete", Zw = "/workspace/rename", Iw = "/workspace/set-layout";
15639
- class Aw {
15654
+ layout: c.string()
15655
+ }), Sw = c.object({}), Ew = "/workspace/create", Zw = "/workspace/delete", Iw = "/workspace/rename", Aw = "/workspace/set-layout";
15656
+ class $w {
15640
15657
  constructor(e) {
15641
15658
  d(this, "client");
15642
15659
  this.client = e;
@@ -15644,37 +15661,37 @@ class Aw {
15644
15661
  async create(e) {
15645
15662
  return (await $(
15646
15663
  this.client,
15647
- Sw,
15648
- { workspaces: te(e) },
15649
- ww,
15650
- _w
15664
+ Ew,
15665
+ { workspaces: re(e) },
15666
+ _w,
15667
+ bw
15651
15668
  )).workspaces;
15652
15669
  }
15653
15670
  async delete(e) {
15654
15671
  await $(
15655
15672
  this.client,
15656
- Ew,
15657
- { keys: te(e) },
15658
- bw,
15659
- kw
15673
+ Zw,
15674
+ { keys: re(e) },
15675
+ kw,
15676
+ Tw
15660
15677
  );
15661
15678
  }
15662
15679
  async rename(e, t) {
15663
15680
  await $(
15664
15681
  this.client,
15665
- Zw,
15682
+ Iw,
15666
15683
  { key: e, name: t },
15667
- Tw,
15668
- Ow
15684
+ Ow,
15685
+ xw
15669
15686
  );
15670
15687
  }
15671
15688
  async setLayout(e, t) {
15672
15689
  await $(
15673
15690
  this.client,
15674
- Iw,
15691
+ Aw,
15675
15692
  { key: e, layout: JSON.stringify(t) },
15676
- xw,
15677
- Nw
15693
+ Nw,
15694
+ Sw
15678
15695
  );
15679
15696
  }
15680
15697
  }
@@ -15684,7 +15701,7 @@ class vl {
15684
15701
  d(this, "linePlot");
15685
15702
  d(this, "retriever");
15686
15703
  d(this, "writer");
15687
- this.pid = new mw(e), this.linePlot = new Gv(e), this.retriever = new ri(e), this.writer = new Aw(e);
15704
+ this.pid = new yw(e), this.linePlot = new Jv(e), this.retriever = new ri(e), this.writer = new $w(e);
15688
15705
  }
15689
15706
  async search(e) {
15690
15707
  return await this.retriever.search(e);
@@ -15713,22 +15730,22 @@ class vl {
15713
15730
  await this.writer.delete(e);
15714
15731
  }
15715
15732
  }
15716
- const pb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15733
+ const fb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15717
15734
  __proto__: null,
15718
15735
  Client: vl,
15719
15736
  keyZ: Wt,
15720
15737
  workspaceRemoteZ: Fi,
15721
15738
  workspaceZ: Wi
15722
- }, Symbol.toStringTag, { value: "Module" })), $w = u.object({
15723
- host: u.string().min(1),
15724
- port: u.number().or(u.string()),
15725
- username: u.string().optional(),
15726
- password: u.string().optional(),
15727
- connectivityPollFrequency: ce.z.default(ce.seconds(30)),
15728
- secure: u.boolean().optional().default(!1),
15729
- name: u.string().optional()
15739
+ }, Symbol.toStringTag, { value: "Module" })), Cw = c.object({
15740
+ host: c.string().min(1),
15741
+ port: c.number().or(c.string()),
15742
+ username: c.string().optional(),
15743
+ password: c.string().optional(),
15744
+ connectivityPollFrequency: ne.z.default(ne.seconds(30)),
15745
+ secure: c.boolean().optional().default(!1),
15746
+ name: c.string().optional()
15730
15747
  });
15731
- class Cw extends Vu {
15748
+ class jw extends Vu {
15732
15749
  /**
15733
15750
  * @param props.host - Hostname of a node in the cluster.
15734
15751
  * @param props.port - Port of the node in the cluster.
@@ -15745,7 +15762,7 @@ class Cw extends Vu {
15745
15762
  * the client from polling the cluster for connectivity information.
15746
15763
  */
15747
15764
  constructor(t) {
15748
- const s = $w.parse(t), { host: n, port: a, username: i, password: o, connectivityPollFrequency: c, secure: l } = s, h = new Av(new ry({ host: n, port: Number(a) }), l);
15765
+ const s = Cw.parse(t), { host: n, port: a, username: i, password: o, connectivityPollFrequency: u, secure: l } = s, h = new $v(new ry({ host: n, port: Number(a) }), l);
15749
15766
  h.use(Oy);
15750
15767
  let k;
15751
15768
  if (i != null && o != null) {
@@ -15755,10 +15772,10 @@ class Cw extends Vu {
15755
15772
  });
15756
15773
  h.use(kl.middleware());
15757
15774
  }
15758
- const se = new ji(
15775
+ const X = new ji(
15759
15776
  new ks(h.unary)
15760
15777
  ), ye = new Iu(h.unary);
15761
- super(h.stream, se);
15778
+ super(h.stream, X);
15762
15779
  d(this, "createdAt");
15763
15780
  d(this, "props");
15764
15781
  d(this, "ranges");
@@ -15770,9 +15787,9 @@ class Cw extends Vu {
15770
15787
  d(this, "labels");
15771
15788
  d(this, "hardware");
15772
15789
  d(this, "transport");
15773
- this.createdAt = ee.now(), this.props = s, this.auth = k, this.transport = h, this.channels = new Ru(this, se, h.unary, ye), this.connectivity = new Ts(
15790
+ this.createdAt = te.now(), this.props = s, this.auth = k, this.transport = h, this.channels = new Ru(this, X, h.unary, ye), this.connectivity = new Ts(
15774
15791
  h.unary,
15775
- c,
15792
+ u,
15776
15793
  s.name
15777
15794
  ), this.ontology = new ol(h.unary, this);
15778
15795
  const Re = new gl(h.unary), de = new yl(this.transport.unary);
@@ -15781,7 +15798,7 @@ class Cw extends Vu {
15781
15798
  Re,
15782
15799
  de,
15783
15800
  this.transport.unary,
15784
- se,
15801
+ X,
15785
15802
  this.labels
15786
15803
  ), this.workspaces = new vl(this.transport.unary);
15787
15804
  const wl = new Ku(
@@ -15801,8 +15818,8 @@ class Cw extends Vu {
15801
15818
  this.connectivity.stopChecking();
15802
15819
  }
15803
15820
  }
15804
- d(Cw, "connectivity", Ts);
15805
- const fb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15821
+ d(jw, "connectivity", Ts);
15822
+ const mb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15806
15823
  __proto__: null,
15807
15824
  Authority: Or,
15808
15825
  StateTracker: Li,
@@ -15815,8 +15832,8 @@ export {
15815
15832
  Au as AuthError,
15816
15833
  Or as Authority,
15817
15834
  ju as Channel,
15818
- Z_ as ContiguityError,
15819
- re as DataType,
15835
+ I_ as ContiguityError,
15836
+ se as DataType,
15820
15837
  xe as Density,
15821
15838
  me as Frame,
15822
15839
  gy as GeneralError,
@@ -15826,24 +15843,24 @@ export {
15826
15843
  $i as Rate,
15827
15844
  by as RouteError,
15828
15845
  Ae as Series,
15829
- Cw as Synnax,
15846
+ jw as Synnax,
15830
15847
  Pe as TimeRange,
15831
- ce as TimeSpan,
15832
- ee as TimeStamp,
15848
+ ne as TimeSpan,
15849
+ te as TimeStamp,
15833
15850
  Tr as UnexpectedError,
15834
15851
  $e as ValidationError,
15835
- A_ as channel,
15836
- C_ as connection,
15837
- fb as control,
15838
- z_ as device,
15839
- R_ as framer,
15840
- M_ as hardware,
15841
- rb as label,
15842
- Q_ as ontology,
15843
- K_ as rack,
15844
- ib as ranger,
15845
- $w as synnaxPropsZ,
15846
- G_ as task,
15847
- pb as workspace
15852
+ $_ as channel,
15853
+ j_ as connection,
15854
+ mb as control,
15855
+ B_ as device,
15856
+ P_ as framer,
15857
+ D_ as hardware,
15858
+ sb as label,
15859
+ eb as ontology,
15860
+ W_ as rack,
15861
+ ob as ranger,
15862
+ Cw as synnaxPropsZ,
15863
+ J_ as task,
15864
+ fb as workspace
15848
15865
  };
15849
15866
  //# sourceMappingURL=client.js.map