@telemetryos/sdk 1.6.1 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,48 +1,49 @@
1
- var w;
2
- (function(a) {
3
- a.assertEqual = (n) => n;
4
- function e(n) {
1
+ var b;
2
+ (function(n) {
3
+ n.assertEqual = (s) => {
4
+ };
5
+ function e(s) {
5
6
  }
6
- a.assertIs = e;
7
- function t(n) {
7
+ n.assertIs = e;
8
+ function t(s) {
8
9
  throw new Error();
9
10
  }
10
- a.assertNever = t, a.arrayToEnum = (n) => {
11
- const r = {};
12
- for (const i of n)
13
- r[i] = i;
14
- return r;
15
- }, a.getValidEnumValues = (n) => {
16
- const r = a.objectKeys(n).filter((o) => typeof n[n[o]] != "number"), i = {};
17
- for (const o of r)
18
- i[o] = n[o];
19
- return a.objectValues(i);
20
- }, a.objectValues = (n) => a.objectKeys(n).map(function(r) {
21
- return n[r];
22
- }), a.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
23
- const r = [];
24
- for (const i in n)
25
- Object.prototype.hasOwnProperty.call(n, i) && r.push(i);
26
- return r;
27
- }, a.find = (n, r) => {
28
- for (const i of n)
29
- if (r(i))
30
- return i;
31
- }, a.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && isFinite(n) && Math.floor(n) === n;
32
- function s(n, r = " | ") {
33
- return n.map((i) => typeof i == "string" ? `'${i}'` : i).join(r);
34
- }
35
- a.joinValues = s, a.jsonStringifyReplacer = (n, r) => typeof r == "bigint" ? r.toString() : r;
36
- })(w || (w = {}));
37
- var $e;
38
- (function(a) {
39
- a.mergeShapes = (e, t) => ({
11
+ n.assertNever = t, n.arrayToEnum = (s) => {
12
+ const i = {};
13
+ for (const r of s)
14
+ i[r] = r;
15
+ return i;
16
+ }, n.getValidEnumValues = (s) => {
17
+ const i = n.objectKeys(s).filter((o) => typeof s[s[o]] != "number"), r = {};
18
+ for (const o of i)
19
+ r[o] = s[o];
20
+ return n.objectValues(r);
21
+ }, n.objectValues = (s) => n.objectKeys(s).map(function(i) {
22
+ return s[i];
23
+ }), n.objectKeys = typeof Object.keys == "function" ? (s) => Object.keys(s) : (s) => {
24
+ const i = [];
25
+ for (const r in s)
26
+ Object.prototype.hasOwnProperty.call(s, r) && i.push(r);
27
+ return i;
28
+ }, n.find = (s, i) => {
29
+ for (const r of s)
30
+ if (i(r))
31
+ return r;
32
+ }, n.isInteger = typeof Number.isInteger == "function" ? (s) => Number.isInteger(s) : (s) => typeof s == "number" && Number.isFinite(s) && Math.floor(s) === s;
33
+ function a(s, i = " | ") {
34
+ return s.map((r) => typeof r == "string" ? `'${r}'` : r).join(i);
35
+ }
36
+ n.joinValues = a, n.jsonStringifyReplacer = (s, i) => typeof i == "bigint" ? i.toString() : i;
37
+ })(b || (b = {}));
38
+ var ye;
39
+ (function(n) {
40
+ n.mergeShapes = (e, t) => ({
40
41
  ...e,
41
42
  ...t
42
43
  // second overwrites first
43
44
  });
44
- })($e || ($e = {}));
45
- const h = w.arrayToEnum([
45
+ })(ye || (ye = {}));
46
+ const l = b.arrayToEnum([
46
47
  "string",
47
48
  "nan",
48
49
  "number",
@@ -63,28 +64,28 @@ const h = w.arrayToEnum([
63
64
  "never",
64
65
  "map",
65
66
  "set"
66
- ]), j = (a) => {
67
- switch (typeof a) {
67
+ ]), O = (n) => {
68
+ switch (typeof n) {
68
69
  case "undefined":
69
- return h.undefined;
70
+ return l.undefined;
70
71
  case "string":
71
- return h.string;
72
+ return l.string;
72
73
  case "number":
73
- return isNaN(a) ? h.nan : h.number;
74
+ return Number.isNaN(n) ? l.nan : l.number;
74
75
  case "boolean":
75
- return h.boolean;
76
+ return l.boolean;
76
77
  case "function":
77
- return h.function;
78
+ return l.function;
78
79
  case "bigint":
79
- return h.bigint;
80
+ return l.bigint;
80
81
  case "symbol":
81
- return h.symbol;
82
+ return l.symbol;
82
83
  case "object":
83
- return Array.isArray(a) ? h.array : a === null ? h.null : a.then && typeof a.then == "function" && a.catch && typeof a.catch == "function" ? h.promise : typeof Map < "u" && a instanceof Map ? h.map : typeof Set < "u" && a instanceof Set ? h.set : typeof Date < "u" && a instanceof Date ? h.date : h.object;
84
+ return Array.isArray(n) ? l.array : n === null ? l.null : n.then && typeof n.then == "function" && n.catch && typeof n.catch == "function" ? l.promise : typeof Map < "u" && n instanceof Map ? l.map : typeof Set < "u" && n instanceof Set ? l.set : typeof Date < "u" && n instanceof Date ? l.date : l.object;
84
85
  default:
85
- return h.unknown;
86
+ return l.unknown;
86
87
  }
87
- }, d = w.arrayToEnum([
88
+ }, d = b.arrayToEnum([
88
89
  "invalid_type",
89
90
  "invalid_literal",
90
91
  "custom",
@@ -101,87 +102,91 @@ const h = w.arrayToEnum([
101
102
  "invalid_intersection_types",
102
103
  "not_multiple_of",
103
104
  "not_finite"
104
- ]), rt = (a) => JSON.stringify(a, null, 2).replace(/"([^"]+)":/g, "$1:");
105
- let O = class Ue extends Error {
105
+ ]);
106
+ class C extends Error {
106
107
  get errors() {
107
108
  return this.issues;
108
109
  }
109
110
  constructor(e) {
110
- super(), this.issues = [], this.addIssue = (s) => {
111
- this.issues = [...this.issues, s];
112
- }, this.addIssues = (s = []) => {
113
- this.issues = [...this.issues, ...s];
111
+ super(), this.issues = [], this.addIssue = (a) => {
112
+ this.issues = [...this.issues, a];
113
+ }, this.addIssues = (a = []) => {
114
+ this.issues = [...this.issues, ...a];
114
115
  };
115
116
  const t = new.target.prototype;
116
117
  Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
117
118
  }
118
119
  format(e) {
119
- const t = e || function(r) {
120
- return r.message;
121
- }, s = { _errors: [] }, n = (r) => {
122
- for (const i of r.issues)
123
- if (i.code === "invalid_union")
124
- i.unionErrors.map(n);
125
- else if (i.code === "invalid_return_type")
126
- n(i.returnTypeError);
127
- else if (i.code === "invalid_arguments")
128
- n(i.argumentsError);
129
- else if (i.path.length === 0)
130
- s._errors.push(t(i));
120
+ const t = e || function(i) {
121
+ return i.message;
122
+ }, a = { _errors: [] }, s = (i) => {
123
+ for (const r of i.issues)
124
+ if (r.code === "invalid_union")
125
+ r.unionErrors.map(s);
126
+ else if (r.code === "invalid_return_type")
127
+ s(r.returnTypeError);
128
+ else if (r.code === "invalid_arguments")
129
+ s(r.argumentsError);
130
+ else if (r.path.length === 0)
131
+ a._errors.push(t(r));
131
132
  else {
132
- let o = s, c = 0;
133
- for (; c < i.path.length; ) {
134
- const u = i.path[c];
135
- c === i.path.length - 1 ? (o[u] = o[u] || { _errors: [] }, o[u]._errors.push(t(i))) : o[u] = o[u] || { _errors: [] }, o = o[u], c++;
133
+ let o = a, c = 0;
134
+ for (; c < r.path.length; ) {
135
+ const h = r.path[c];
136
+ c === r.path.length - 1 ? (o[h] = o[h] || { _errors: [] }, o[h]._errors.push(t(r))) : o[h] = o[h] || { _errors: [] }, o = o[h], c++;
136
137
  }
137
138
  }
138
139
  };
139
- return n(this), s;
140
+ return s(this), a;
140
141
  }
141
142
  static assert(e) {
142
- if (!(e instanceof Ue))
143
+ if (!(e instanceof C))
143
144
  throw new Error(`Not a ZodError: ${e}`);
144
145
  }
145
146
  toString() {
146
147
  return this.message;
147
148
  }
148
149
  get message() {
149
- return JSON.stringify(this.issues, w.jsonStringifyReplacer, 2);
150
+ return JSON.stringify(this.issues, b.jsonStringifyReplacer, 2);
150
151
  }
151
152
  get isEmpty() {
152
153
  return this.issues.length === 0;
153
154
  }
154
155
  flatten(e = (t) => t.message) {
155
- const t = {}, s = [];
156
- for (const n of this.issues)
157
- n.path.length > 0 ? (t[n.path[0]] = t[n.path[0]] || [], t[n.path[0]].push(e(n))) : s.push(e(n));
158
- return { formErrors: s, fieldErrors: t };
156
+ const t = {}, a = [];
157
+ for (const s of this.issues)
158
+ if (s.path.length > 0) {
159
+ const i = s.path[0];
160
+ t[i] = t[i] || [], t[i].push(e(s));
161
+ } else
162
+ a.push(e(s));
163
+ return { formErrors: a, fieldErrors: t };
159
164
  }
160
165
  get formErrors() {
161
166
  return this.flatten();
162
167
  }
163
- };
164
- O.create = (a) => new O(a);
165
- const H = (a, e) => {
168
+ }
169
+ C.create = (n) => new C(n);
170
+ const re = (n, e) => {
166
171
  let t;
167
- switch (a.code) {
172
+ switch (n.code) {
168
173
  case d.invalid_type:
169
- a.received === h.undefined ? t = "Required" : t = `Expected ${a.expected}, received ${a.received}`;
174
+ n.received === l.undefined ? t = "Required" : t = `Expected ${n.expected}, received ${n.received}`;
170
175
  break;
171
176
  case d.invalid_literal:
172
- t = `Invalid literal value, expected ${JSON.stringify(a.expected, w.jsonStringifyReplacer)}`;
177
+ t = `Invalid literal value, expected ${JSON.stringify(n.expected, b.jsonStringifyReplacer)}`;
173
178
  break;
174
179
  case d.unrecognized_keys:
175
- t = `Unrecognized key(s) in object: ${w.joinValues(a.keys, ", ")}`;
180
+ t = `Unrecognized key(s) in object: ${b.joinValues(n.keys, ", ")}`;
176
181
  break;
177
182
  case d.invalid_union:
178
183
  t = "Invalid input";
179
184
  break;
180
185
  case d.invalid_union_discriminator:
181
- t = `Invalid discriminator value. Expected ${w.joinValues(a.options)}`;
186
+ t = `Invalid discriminator value. Expected ${b.joinValues(n.options)}`;
182
187
  break;
183
188
  case d.invalid_enum_value:
184
- t = `Invalid enum value. Expected ${w.joinValues(a.options)}, received '${a.received}'`;
189
+ t = `Invalid enum value. Expected ${b.joinValues(n.options)}, received '${n.received}'`;
185
190
  break;
186
191
  case d.invalid_arguments:
187
192
  t = "Invalid function arguments";
@@ -193,13 +198,13 @@ const H = (a, e) => {
193
198
  t = "Invalid date";
194
199
  break;
195
200
  case d.invalid_string:
196
- typeof a.validation == "object" ? "includes" in a.validation ? (t = `Invalid input: must include "${a.validation.includes}"`, typeof a.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${a.validation.position}`)) : "startsWith" in a.validation ? t = `Invalid input: must start with "${a.validation.startsWith}"` : "endsWith" in a.validation ? t = `Invalid input: must end with "${a.validation.endsWith}"` : w.assertNever(a.validation) : a.validation !== "regex" ? t = `Invalid ${a.validation}` : t = "Invalid";
201
+ typeof n.validation == "object" ? "includes" in n.validation ? (t = `Invalid input: must include "${n.validation.includes}"`, typeof n.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${n.validation.position}`)) : "startsWith" in n.validation ? t = `Invalid input: must start with "${n.validation.startsWith}"` : "endsWith" in n.validation ? t = `Invalid input: must end with "${n.validation.endsWith}"` : b.assertNever(n.validation) : n.validation !== "regex" ? t = `Invalid ${n.validation}` : t = "Invalid";
197
202
  break;
198
203
  case d.too_small:
199
- a.type === "array" ? t = `Array must contain ${a.exact ? "exactly" : a.inclusive ? "at least" : "more than"} ${a.minimum} element(s)` : a.type === "string" ? t = `String must contain ${a.exact ? "exactly" : a.inclusive ? "at least" : "over"} ${a.minimum} character(s)` : a.type === "number" ? t = `Number must be ${a.exact ? "exactly equal to " : a.inclusive ? "greater than or equal to " : "greater than "}${a.minimum}` : a.type === "date" ? t = `Date must be ${a.exact ? "exactly equal to " : a.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(a.minimum))}` : t = "Invalid input";
204
+ n.type === "array" ? t = `Array must contain ${n.exact ? "exactly" : n.inclusive ? "at least" : "more than"} ${n.minimum} element(s)` : n.type === "string" ? t = `String must contain ${n.exact ? "exactly" : n.inclusive ? "at least" : "over"} ${n.minimum} character(s)` : n.type === "number" ? t = `Number must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${n.minimum}` : n.type === "bigint" ? t = `Number must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${n.minimum}` : n.type === "date" ? t = `Date must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(n.minimum))}` : t = "Invalid input";
200
205
  break;
201
206
  case d.too_big:
202
- a.type === "array" ? t = `Array must contain ${a.exact ? "exactly" : a.inclusive ? "at most" : "less than"} ${a.maximum} element(s)` : a.type === "string" ? t = `String must contain ${a.exact ? "exactly" : a.inclusive ? "at most" : "under"} ${a.maximum} character(s)` : a.type === "number" ? t = `Number must be ${a.exact ? "exactly" : a.inclusive ? "less than or equal to" : "less than"} ${a.maximum}` : a.type === "bigint" ? t = `BigInt must be ${a.exact ? "exactly" : a.inclusive ? "less than or equal to" : "less than"} ${a.maximum}` : a.type === "date" ? t = `Date must be ${a.exact ? "exactly" : a.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(a.maximum))}` : t = "Invalid input";
207
+ n.type === "array" ? t = `Array must contain ${n.exact ? "exactly" : n.inclusive ? "at most" : "less than"} ${n.maximum} element(s)` : n.type === "string" ? t = `String must contain ${n.exact ? "exactly" : n.inclusive ? "at most" : "under"} ${n.maximum} character(s)` : n.type === "number" ? t = `Number must be ${n.exact ? "exactly" : n.inclusive ? "less than or equal to" : "less than"} ${n.maximum}` : n.type === "bigint" ? t = `BigInt must be ${n.exact ? "exactly" : n.inclusive ? "less than or equal to" : "less than"} ${n.maximum}` : n.type === "date" ? t = `Date must be ${n.exact ? "exactly" : n.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(n.maximum))}` : t = "Invalid input";
203
208
  break;
204
209
  case d.custom:
205
210
  t = "Invalid input";
@@ -208,63 +213,60 @@ const H = (a, e) => {
208
213
  t = "Intersection results could not be merged";
209
214
  break;
210
215
  case d.not_multiple_of:
211
- t = `Number must be a multiple of ${a.multipleOf}`;
216
+ t = `Number must be a multiple of ${n.multipleOf}`;
212
217
  break;
213
218
  case d.not_finite:
214
219
  t = "Number must be finite";
215
220
  break;
216
221
  default:
217
- t = e.defaultError, w.assertNever(a);
222
+ t = e.defaultError, b.assertNever(n);
218
223
  }
219
224
  return { message: t };
220
225
  };
221
- let He = H;
222
- function ot(a) {
223
- He = a;
224
- }
225
- function ke() {
226
- return He;
227
- }
228
- const xe = (a) => {
229
- const { data: e, path: t, errorMaps: s, issueData: n } = a, r = [...t, ...n.path || []], i = {
230
- ...n,
231
- path: r
226
+ let Le = re;
227
+ function qe() {
228
+ return Le;
229
+ }
230
+ const De = (n) => {
231
+ const { data: e, path: t, errorMaps: a, issueData: s } = n, i = [...t, ...s.path || []], r = {
232
+ ...s,
233
+ path: i
232
234
  };
233
- if (n.message !== void 0)
235
+ if (s.message !== void 0)
234
236
  return {
235
- ...n,
236
- path: r,
237
- message: n.message
237
+ ...s,
238
+ path: i,
239
+ message: s.message
238
240
  };
239
241
  let o = "";
240
- const c = s.filter((u) => !!u).slice().reverse();
241
- for (const u of c)
242
- o = u(i, { data: e, defaultError: o }).message;
242
+ const c = a.filter((h) => !!h).slice().reverse();
243
+ for (const h of c)
244
+ o = h(r, { data: e, defaultError: o }).message;
243
245
  return {
244
- ...n,
245
- path: r,
246
+ ...s,
247
+ path: i,
246
248
  message: o
247
249
  };
248
- }, ct = [];
249
- function l(a, e) {
250
- const t = ke(), s = xe({
250
+ };
251
+ function u(n, e) {
252
+ const t = qe(), a = De({
251
253
  issueData: e,
252
- data: a.data,
253
- path: a.path,
254
+ data: n.data,
255
+ path: n.path,
254
256
  errorMaps: [
255
- a.common.contextualErrorMap,
257
+ n.common.contextualErrorMap,
256
258
  // contextual error map is first priority
257
- a.schemaErrorMap,
259
+ n.schemaErrorMap,
258
260
  // then schema-bound map if available
259
261
  t,
260
262
  // then global override map
261
- t === H ? void 0 : H
263
+ t === re ? void 0 : re
262
264
  // then global default map
263
- ].filter((n) => !!n)
265
+ ].filter((s) => !!s)
264
266
  });
265
- a.common.issues.push(s);
267
+ n.common.issues.push(a);
266
268
  }
267
- let S = class Ke {
269
+ let N = class je {
268
270
  constructor() {
269
271
  this.value = "valid";
270
272
  }
@@ -275,99 +277,89 @@ let S = class Ke {
275
277
  this.value !== "aborted" && (this.value = "aborted");
276
278
  }
277
279
  static mergeArray(e, t) {
278
- const s = [];
279
- for (const n of t) {
280
- if (n.status === "aborted")
281
- return y;
282
- n.status === "dirty" && e.dirty(), s.push(n.value);
280
+ const a = [];
281
+ for (const s of t) {
282
+ if (s.status === "aborted")
283
+ return _;
284
+ s.status === "dirty" && e.dirty(), a.push(s.value);
283
285
  }
284
- return { status: e.value, value: s };
286
+ return { status: e.value, value: a };
285
287
  }
286
288
  static async mergeObjectAsync(e, t) {
287
- const s = [];
288
- for (const n of t) {
289
- const r = await n.key, i = await n.value;
290
- s.push({
291
- key: r,
292
- value: i
289
+ const a = [];
290
+ for (const s of t) {
291
+ const i = await s.key, r = await s.value;
292
+ a.push({
293
+ key: i,
294
+ value: r
293
295
  });
294
296
  }
295
- return Ke.mergeObjectSync(e, s);
297
+ return je.mergeObjectSync(e, a);
296
298
  }
297
299
  static mergeObjectSync(e, t) {
298
- const s = {};
299
- for (const n of t) {
300
- const { key: r, value: i } = n;
301
- if (r.status === "aborted" || i.status === "aborted")
302
- return y;
303
- r.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof i.value < "u" || n.alwaysSet) && (s[r.value] = i.value);
300
+ const a = {};
301
+ for (const s of t) {
302
+ const { key: i, value: r } = s;
303
+ if (i.status === "aborted" || r.status === "aborted")
304
+ return _;
305
+ i.status === "dirty" && e.dirty(), r.status === "dirty" && e.dirty(), i.value !== "__proto__" && (typeof r.value < "u" || s.alwaysSet) && (a[i.value] = r.value);
304
306
  }
305
- return { status: e.value, value: s };
307
+ return { status: e.value, value: a };
306
308
  }
307
309
  };
308
- const y = Object.freeze({
310
+ const _ = Object.freeze({
309
311
  status: "aborted"
310
- }), Ze = (a) => ({ status: "dirty", value: a }), x = (a) => ({ status: "valid", value: a }), Pe = (a) => a.status === "aborted", Re = (a) => a.status === "dirty", q = (a) => a.status === "valid", G = (a) => typeof Promise < "u" && a instanceof Promise;
311
- function Se(a, e, t, s) {
312
- if (typeof e == "function" ? a !== e || !0 : !e.has(a)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
313
- return e.get(a);
314
- }
315
- function We(a, e, t, s, n) {
316
- if (typeof e == "function" ? a !== e || !0 : !e.has(a)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
317
- return e.set(a, t), t;
318
- }
312
+ }), ie = (n) => ({ status: "dirty", value: n }), x = (n) => ({ status: "valid", value: n }), ve = (n) => n.status === "aborted", be = (n) => n.status === "dirty", L = (n) => n.status === "valid", X = (n) => typeof Promise < "u" && n instanceof Promise;
319
313
  var p;
320
- (function(a) {
321
- a.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, a.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
314
+ (function(n) {
315
+ n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
322
316
  })(p || (p = {}));
323
- var J, Y;
324
- class I {
325
- constructor(e, t, s, n) {
326
- this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = n;
317
+ let $ = class {
318
+ constructor(e, t, a, s) {
319
+ this._cachedPath = [], this.parent = e, this.data = t, this._path = a, this._key = s;
327
320
  }
328
321
  get path() {
329
- return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
322
+ return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
330
323
  }
331
- }
332
- const ze = (a, e) => {
333
- if (q(e))
324
+ };
325
+ const we = (n, e) => {
326
+ if (L(e))
334
327
  return { success: !0, data: e.value };
335
- if (!a.common.issues.length)
328
+ if (!n.common.issues.length)
336
329
  throw new Error("Validation failed but no issues detected.");
337
330
  return {
338
331
  success: !1,
339
332
  get error() {
340
333
  if (this._error)
341
334
  return this._error;
342
- const t = new O(a.common.issues);
335
+ const t = new C(n.common.issues);
343
336
  return this._error = t, this._error;
344
337
  }
345
338
  };
346
339
  };
347
- function _(a) {
348
- if (!a)
340
+ function y(n) {
341
+ if (!n)
349
342
  return {};
350
- const { errorMap: e, invalid_type_error: t, required_error: s, description: n } = a;
351
- if (e && (t || s))
343
+ const { errorMap: e, invalid_type_error: t, required_error: a, description: s } = n;
344
+ if (e && (t || a))
352
345
  throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
353
- return e ? { errorMap: e, description: n } : { errorMap: (r, i) => {
354
- var o, c;
355
- const { message: u } = a;
356
- return r.code === "invalid_enum_value" ? { message: u ?? i.defaultError } : typeof i.data > "u" ? { message: (o = u ?? s) !== null && o !== void 0 ? o : i.defaultError } : r.code !== "invalid_type" ? { message: i.defaultError } : { message: (c = u ?? t) !== null && c !== void 0 ? c : i.defaultError };
357
- }, description: n };
346
+ return e ? { errorMap: e, description: s } : { errorMap: (i, r) => {
347
+ const { message: o } = n;
348
+ return i.code === "invalid_enum_value" ? { message: o ?? r.defaultError } : typeof r.data > "u" ? { message: o ?? a ?? r.defaultError } : i.code !== "invalid_type" ? { message: r.defaultError } : { message: o ?? t ?? r.defaultError };
349
+ }, description: s };
358
350
  }
359
- class v {
351
+ let v = class {
360
352
  get description() {
361
353
  return this._def.description;
362
354
  }
363
355
  _getType(e) {
364
- return j(e.data);
356
+ return O(e.data);
365
357
  }
366
358
  _getOrReturnCtx(e, t) {
367
359
  return t || {
368
360
  common: e.parent.common,
369
361
  data: e.data,
370
- parsedType: j(e.data),
362
+ parsedType: O(e.data),
371
363
  schemaErrorMap: this._def.errorMap,
372
364
  path: e.path,
373
365
  parent: e.parent
@@ -375,11 +367,11 @@ class v {
375
367
  }
376
368
  _processInputParams(e) {
377
369
  return {
378
- status: new S(),
370
+ status: new N(),
379
371
  ctx: {
380
372
  common: e.parent.common,
381
373
  data: e.data,
382
- parsedType: j(e.data),
374
+ parsedType: O(e.data),
383
375
  schemaErrorMap: this._def.errorMap,
384
376
  path: e.path,
385
377
  parent: e.parent
@@ -388,7 +380,7 @@ class v {
388
380
  }
389
381
  _parseSync(e) {
390
382
  const t = this._parse(e);
391
- if (G(t))
383
+ if (X(t))
392
384
  throw new Error("Synchronous parse encountered promise.");
393
385
  return t;
394
386
  }
@@ -397,30 +389,29 @@ class v {
397
389
  return Promise.resolve(t);
398
390
  }
399
391
  parse(e, t) {
400
- const s = this.safeParse(e, t);
401
- if (s.success)
402
- return s.data;
403
- throw s.error;
392
+ const a = this.safeParse(e, t);
393
+ if (a.success)
394
+ return a.data;
395
+ throw a.error;
404
396
  }
405
397
  safeParse(e, t) {
406
- var s;
407
- const n = {
398
+ const a = {
408
399
  common: {
409
400
  issues: [],
410
- async: (s = t == null ? void 0 : t.async) !== null && s !== void 0 ? s : !1,
401
+ async: (t == null ? void 0 : t.async) ?? !1,
411
402
  contextualErrorMap: t == null ? void 0 : t.errorMap
412
403
  },
413
404
  path: (t == null ? void 0 : t.path) || [],
414
405
  schemaErrorMap: this._def.errorMap,
415
406
  parent: null,
416
407
  data: e,
417
- parsedType: j(e)
418
- }, r = this._parseSync({ data: e, path: n.path, parent: n });
419
- return ze(n, r);
408
+ parsedType: O(e)
409
+ }, s = this._parseSync({ data: e, path: a.path, parent: a });
410
+ return we(a, s);
420
411
  }
421
412
  "~validate"(e) {
422
- var t, s;
423
- const n = {
413
+ var t, a;
414
+ const s = {
424
415
  common: {
425
416
  issues: [],
426
417
  async: !!this["~standard"].async
@@ -429,36 +420,36 @@ class v {
429
420
  schemaErrorMap: this._def.errorMap,
430
421
  parent: null,
431
422
  data: e,
432
- parsedType: j(e)
423
+ parsedType: O(e)
433
424
  };
434
425
  if (!this["~standard"].async)
435
426
  try {
436
- const r = this._parseSync({ data: e, path: [], parent: n });
437
- return q(r) ? {
438
- value: r.value
427
+ const i = this._parseSync({ data: e, path: [], parent: s });
428
+ return L(i) ? {
429
+ value: i.value
439
430
  } : {
440
- issues: n.common.issues
431
+ issues: s.common.issues
441
432
  };
442
- } catch (r) {
443
- !((s = (t = r == null ? void 0 : r.message) === null || t === void 0 ? void 0 : t.toLowerCase()) === null || s === void 0) && s.includes("encountered") && (this["~standard"].async = !0), n.common = {
433
+ } catch (i) {
434
+ (a = (t = i == null ? void 0 : i.message) == null ? void 0 : t.toLowerCase()) != null && a.includes("encountered") && (this["~standard"].async = !0), s.common = {
444
435
  issues: [],
445
436
  async: !0
446
437
  };
447
438
  }
448
- return this._parseAsync({ data: e, path: [], parent: n }).then((r) => q(r) ? {
449
- value: r.value
439
+ return this._parseAsync({ data: e, path: [], parent: s }).then((i) => L(i) ? {
440
+ value: i.value
450
441
  } : {
451
- issues: n.common.issues
442
+ issues: s.common.issues
452
443
  });
453
444
  }
454
445
  async parseAsync(e, t) {
455
- const s = await this.safeParseAsync(e, t);
456
- if (s.success)
457
- return s.data;
458
- throw s.error;
446
+ const a = await this.safeParseAsync(e, t);
447
+ if (a.success)
448
+ return a.data;
449
+ throw a.error;
459
450
  }
460
451
  async safeParseAsync(e, t) {
461
- const s = {
452
+ const a = {
462
453
  common: {
463
454
  issues: [],
464
455
  contextualErrorMap: t == null ? void 0 : t.errorMap,
@@ -468,27 +459,27 @@ class v {
468
459
  schemaErrorMap: this._def.errorMap,
469
460
  parent: null,
470
461
  data: e,
471
- parsedType: j(e)
472
- }, n = this._parse({ data: e, path: s.path, parent: s }), r = await (G(n) ? n : Promise.resolve(n));
473
- return ze(s, r);
462
+ parsedType: O(e)
463
+ }, s = this._parse({ data: e, path: a.path, parent: a }), i = await (X(s) ? s : Promise.resolve(s));
464
+ return we(a, i);
474
465
  }
475
466
  refine(e, t) {
476
- const s = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
477
- return this._refinement((n, r) => {
478
- const i = e(n), o = () => r.addIssue({
467
+ const a = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
468
+ return this._refinement((s, i) => {
469
+ const r = e(s), o = () => i.addIssue({
479
470
  code: d.custom,
480
- ...s(n)
471
+ ...a(s)
481
472
  });
482
- return typeof Promise < "u" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
473
+ return typeof Promise < "u" && r instanceof Promise ? r.then((c) => c ? !0 : (o(), !1)) : r ? !0 : (o(), !1);
483
474
  });
484
475
  }
485
476
  refinement(e, t) {
486
- return this._refinement((s, n) => e(s) ? !0 : (n.addIssue(typeof t == "function" ? t(s, n) : t), !1));
477
+ return this._refinement((a, s) => e(a) ? !0 : (s.addIssue(typeof t == "function" ? t(a, s) : t), !1));
487
478
  }
488
479
  _refinement(e) {
489
- return new A({
480
+ return new D({
490
481
  schema: this,
491
- typeName: m.ZodEffects,
482
+ typeName: f.ZodEffects,
492
483
  effect: { type: "refinement", refinement: e }
493
484
  });
494
485
  }
@@ -503,57 +494,57 @@ class v {
503
494
  };
504
495
  }
505
496
  optional() {
506
- return E.create(this, this._def);
497
+ return I.create(this, this._def);
507
498
  }
508
499
  nullable() {
509
- return M.create(this, this._def);
500
+ return V.create(this, this._def);
510
501
  }
511
502
  nullish() {
512
503
  return this.nullable().optional();
513
504
  }
514
505
  array() {
515
- return z.create(this);
506
+ return q.create(this);
516
507
  }
517
508
  promise() {
518
- return W.create(this, this._def);
509
+ return te.create(this, this._def);
519
510
  }
520
511
  or(e) {
521
- return ne.create([this, e], this._def);
512
+ return Q.create([this, e], this._def);
522
513
  }
523
514
  and(e) {
524
- return ie.create(this, e, this._def);
515
+ return ee.create(this, e, this._def);
525
516
  }
526
517
  transform(e) {
527
- return new A({
528
- ..._(this._def),
518
+ return new D({
519
+ ...y(this._def),
529
520
  schema: this,
530
- typeName: m.ZodEffects,
521
+ typeName: f.ZodEffects,
531
522
  effect: { type: "transform", transform: e }
532
523
  });
533
524
  }
534
525
  default(e) {
535
526
  const t = typeof e == "function" ? e : () => e;
536
- return new ue({
537
- ..._(this._def),
527
+ return new he({
528
+ ...y(this._def),
538
529
  innerType: this,
539
530
  defaultValue: t,
540
- typeName: m.ZodDefault
531
+ typeName: f.ZodDefault
541
532
  });
542
533
  }
543
534
  brand() {
544
- return new qe({
545
- typeName: m.ZodBranded,
535
+ return new ut({
536
+ typeName: f.ZodBranded,
546
537
  type: this,
547
- ..._(this._def)
538
+ ...y(this._def)
548
539
  });
549
540
  }
550
541
  catch(e) {
551
542
  const t = typeof e == "function" ? e : () => e;
552
- return new le({
553
- ..._(this._def),
543
+ return new pe({
544
+ ...y(this._def),
554
545
  innerType: this,
555
546
  catchValue: t,
556
- typeName: m.ZodCatch
547
+ typeName: f.ZodCatch
557
548
  });
558
549
  }
559
550
  describe(e) {
@@ -564,10 +555,10 @@ class v {
564
555
  });
565
556
  }
566
557
  pipe(e) {
567
- return fe.create(this, e);
558
+ return _e.create(this, e);
568
559
  }
569
560
  readonly() {
570
- return he.create(this);
561
+ return fe.create(this);
571
562
  }
572
563
  isOptional() {
573
564
  return this.safeParse(void 0).success;
@@ -575,204 +566,207 @@ class v {
575
566
  isNullable() {
576
567
  return this.safeParse(null).success;
577
568
  }
578
- }
579
- const dt = /^c[^\s-]{8,}$/i, ut = /^[0-9a-z]+$/, lt = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ht = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, pt = /^[a-z0-9_-]{21}$/i, ft = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, mt = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, yt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, gt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
580
- let je;
581
- const _t = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, vt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, wt = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, bt = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, kt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Je = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Zt = new RegExp(`^${Je}$`);
582
- function Ye(a) {
569
+ };
570
+ const Ve = /^c[^\s-]{8,}$/i, ze = /^[0-9a-z]+$/, Be = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ue = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, He = /^[a-z0-9_-]{21}$/i, Ke = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, We = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Je = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ge = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
571
+ let ne;
572
+ const Ye = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Xe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Qe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, et = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, tt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, at = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Pe = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", st = new RegExp(`^${Pe}$`);
573
+ function Re(n) {
583
574
  let e = "[0-5]\\d";
584
- a.precision ? e = `${e}\\.\\d{${a.precision}}` : a.precision == null && (e = `${e}(\\.\\d+)?`);
585
- const t = a.precision ? "+" : "?";
575
+ n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`);
576
+ const t = n.precision ? "+" : "?";
586
577
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
587
578
  }
588
- function St(a) {
589
- return new RegExp(`^${Ye(a)}$`);
579
+ function nt(n) {
580
+ return new RegExp(`^${Re(n)}$`);
590
581
  }
591
- function Ge(a) {
592
- let e = `${Je}T${Ye(a)}`;
582
+ function rt(n) {
583
+ let e = `${Pe}T${Re(n)}`;
593
584
  const t = [];
594
- return t.push(a.local ? "Z?" : "Z"), a.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
585
+ return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
595
586
  }
596
- function Tt(a, e) {
597
- return !!((e === "v4" || !e) && _t.test(a) || (e === "v6" || !e) && wt.test(a));
587
+ function it(n, e) {
588
+ return !!((e === "v4" || !e) && Ye.test(n) || (e === "v6" || !e) && Qe.test(n));
598
589
  }
599
- function Nt(a, e) {
600
- if (!ft.test(a))
590
+ function ot(n, e) {
591
+ if (!Ke.test(n))
601
592
  return !1;
602
593
  try {
603
- const [t] = a.split("."), s = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), n = JSON.parse(atob(s));
604
- return !(typeof n != "object" || n === null || !n.typ || !n.alg || e && n.alg !== e);
594
+ const [t] = n.split(".");
595
+ if (!t)
596
+ return !1;
597
+ const a = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), s = JSON.parse(atob(a));
598
+ return !(typeof s != "object" || s === null || "typ" in s && (s == null ? void 0 : s.typ) !== "JWT" || !s.alg || e && s.alg !== e);
605
599
  } catch {
606
600
  return !1;
607
601
  }
608
602
  }
609
- function Ct(a, e) {
610
- return !!((e === "v4" || !e) && vt.test(a) || (e === "v6" || !e) && bt.test(a));
603
+ function ct(n, e) {
604
+ return !!((e === "v4" || !e) && Xe.test(n) || (e === "v6" || !e) && et.test(n));
611
605
  }
612
- class C extends v {
606
+ class A extends v {
613
607
  _parse(e) {
614
- if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) {
615
- const n = this._getOrReturnCtx(e);
616
- return l(n, {
608
+ if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== l.string) {
609
+ const s = this._getOrReturnCtx(e);
610
+ return u(s, {
617
611
  code: d.invalid_type,
618
- expected: h.string,
619
- received: n.parsedType
620
- }), y;
612
+ expected: l.string,
613
+ received: s.parsedType
614
+ }), _;
621
615
  }
622
- const t = new S();
623
- let s;
624
- for (const n of this._def.checks)
625
- if (n.kind === "min")
626
- e.data.length < n.value && (s = this._getOrReturnCtx(e, s), l(s, {
616
+ const t = new N();
617
+ let a;
618
+ for (const s of this._def.checks)
619
+ if (s.kind === "min")
620
+ e.data.length < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
627
621
  code: d.too_small,
628
- minimum: n.value,
622
+ minimum: s.value,
629
623
  type: "string",
630
624
  inclusive: !0,
631
625
  exact: !1,
632
- message: n.message
626
+ message: s.message
633
627
  }), t.dirty());
634
- else if (n.kind === "max")
635
- e.data.length > n.value && (s = this._getOrReturnCtx(e, s), l(s, {
628
+ else if (s.kind === "max")
629
+ e.data.length > s.value && (a = this._getOrReturnCtx(e, a), u(a, {
636
630
  code: d.too_big,
637
- maximum: n.value,
631
+ maximum: s.value,
638
632
  type: "string",
639
633
  inclusive: !0,
640
634
  exact: !1,
641
- message: n.message
635
+ message: s.message
642
636
  }), t.dirty());
643
- else if (n.kind === "length") {
644
- const r = e.data.length > n.value, i = e.data.length < n.value;
645
- (r || i) && (s = this._getOrReturnCtx(e, s), r ? l(s, {
637
+ else if (s.kind === "length") {
638
+ const i = e.data.length > s.value, r = e.data.length < s.value;
639
+ (i || r) && (a = this._getOrReturnCtx(e, a), i ? u(a, {
646
640
  code: d.too_big,
647
- maximum: n.value,
641
+ maximum: s.value,
648
642
  type: "string",
649
643
  inclusive: !0,
650
644
  exact: !0,
651
- message: n.message
652
- }) : i && l(s, {
645
+ message: s.message
646
+ }) : r && u(a, {
653
647
  code: d.too_small,
654
- minimum: n.value,
648
+ minimum: s.value,
655
649
  type: "string",
656
650
  inclusive: !0,
657
651
  exact: !0,
658
- message: n.message
652
+ message: s.message
659
653
  }), t.dirty());
660
- } else if (n.kind === "email")
661
- yt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
654
+ } else if (s.kind === "email")
655
+ Je.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
662
656
  validation: "email",
663
657
  code: d.invalid_string,
664
- message: n.message
658
+ message: s.message
665
659
  }), t.dirty());
666
- else if (n.kind === "emoji")
667
- je || (je = new RegExp(gt, "u")), je.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
660
+ else if (s.kind === "emoji")
661
+ ne || (ne = new RegExp(Ge, "u")), ne.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
668
662
  validation: "emoji",
669
663
  code: d.invalid_string,
670
- message: n.message
664
+ message: s.message
671
665
  }), t.dirty());
672
- else if (n.kind === "uuid")
673
- ht.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
666
+ else if (s.kind === "uuid")
667
+ Ue.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
674
668
  validation: "uuid",
675
669
  code: d.invalid_string,
676
- message: n.message
670
+ message: s.message
677
671
  }), t.dirty());
678
- else if (n.kind === "nanoid")
679
- pt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
672
+ else if (s.kind === "nanoid")
673
+ He.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
680
674
  validation: "nanoid",
681
675
  code: d.invalid_string,
682
- message: n.message
676
+ message: s.message
683
677
  }), t.dirty());
684
- else if (n.kind === "cuid")
685
- dt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
678
+ else if (s.kind === "cuid")
679
+ Ve.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
686
680
  validation: "cuid",
687
681
  code: d.invalid_string,
688
- message: n.message
682
+ message: s.message
689
683
  }), t.dirty());
690
- else if (n.kind === "cuid2")
691
- ut.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
684
+ else if (s.kind === "cuid2")
685
+ ze.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
692
686
  validation: "cuid2",
693
687
  code: d.invalid_string,
694
- message: n.message
688
+ message: s.message
695
689
  }), t.dirty());
696
- else if (n.kind === "ulid")
697
- lt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
690
+ else if (s.kind === "ulid")
691
+ Be.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
698
692
  validation: "ulid",
699
693
  code: d.invalid_string,
700
- message: n.message
694
+ message: s.message
701
695
  }), t.dirty());
702
- else if (n.kind === "url")
696
+ else if (s.kind === "url")
703
697
  try {
704
698
  new URL(e.data);
705
699
  } catch {
706
- s = this._getOrReturnCtx(e, s), l(s, {
700
+ a = this._getOrReturnCtx(e, a), u(a, {
707
701
  validation: "url",
708
702
  code: d.invalid_string,
709
- message: n.message
703
+ message: s.message
710
704
  }), t.dirty();
711
705
  }
712
- else n.kind === "regex" ? (n.regex.lastIndex = 0, n.regex.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
706
+ else s.kind === "regex" ? (s.regex.lastIndex = 0, s.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
713
707
  validation: "regex",
714
708
  code: d.invalid_string,
715
- message: n.message
716
- }), t.dirty())) : n.kind === "trim" ? e.data = e.data.trim() : n.kind === "includes" ? e.data.includes(n.value, n.position) || (s = this._getOrReturnCtx(e, s), l(s, {
709
+ message: s.message
710
+ }), t.dirty())) : s.kind === "trim" ? e.data = e.data.trim() : s.kind === "includes" ? e.data.includes(s.value, s.position) || (a = this._getOrReturnCtx(e, a), u(a, {
717
711
  code: d.invalid_string,
718
- validation: { includes: n.value, position: n.position },
719
- message: n.message
720
- }), t.dirty()) : n.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : n.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : n.kind === "startsWith" ? e.data.startsWith(n.value) || (s = this._getOrReturnCtx(e, s), l(s, {
712
+ validation: { includes: s.value, position: s.position },
713
+ message: s.message
714
+ }), t.dirty()) : s.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : s.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : s.kind === "startsWith" ? e.data.startsWith(s.value) || (a = this._getOrReturnCtx(e, a), u(a, {
721
715
  code: d.invalid_string,
722
- validation: { startsWith: n.value },
723
- message: n.message
724
- }), t.dirty()) : n.kind === "endsWith" ? e.data.endsWith(n.value) || (s = this._getOrReturnCtx(e, s), l(s, {
716
+ validation: { startsWith: s.value },
717
+ message: s.message
718
+ }), t.dirty()) : s.kind === "endsWith" ? e.data.endsWith(s.value) || (a = this._getOrReturnCtx(e, a), u(a, {
725
719
  code: d.invalid_string,
726
- validation: { endsWith: n.value },
727
- message: n.message
728
- }), t.dirty()) : n.kind === "datetime" ? Ge(n).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
720
+ validation: { endsWith: s.value },
721
+ message: s.message
722
+ }), t.dirty()) : s.kind === "datetime" ? rt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
729
723
  code: d.invalid_string,
730
724
  validation: "datetime",
731
- message: n.message
732
- }), t.dirty()) : n.kind === "date" ? Zt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
725
+ message: s.message
726
+ }), t.dirty()) : s.kind === "date" ? st.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
733
727
  code: d.invalid_string,
734
728
  validation: "date",
735
- message: n.message
736
- }), t.dirty()) : n.kind === "time" ? St(n).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
729
+ message: s.message
730
+ }), t.dirty()) : s.kind === "time" ? nt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
737
731
  code: d.invalid_string,
738
732
  validation: "time",
739
- message: n.message
740
- }), t.dirty()) : n.kind === "duration" ? mt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
733
+ message: s.message
734
+ }), t.dirty()) : s.kind === "duration" ? We.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
741
735
  validation: "duration",
742
736
  code: d.invalid_string,
743
- message: n.message
744
- }), t.dirty()) : n.kind === "ip" ? Tt(e.data, n.version) || (s = this._getOrReturnCtx(e, s), l(s, {
737
+ message: s.message
738
+ }), t.dirty()) : s.kind === "ip" ? it(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
745
739
  validation: "ip",
746
740
  code: d.invalid_string,
747
- message: n.message
748
- }), t.dirty()) : n.kind === "jwt" ? Nt(e.data, n.alg) || (s = this._getOrReturnCtx(e, s), l(s, {
741
+ message: s.message
742
+ }), t.dirty()) : s.kind === "jwt" ? ot(e.data, s.alg) || (a = this._getOrReturnCtx(e, a), u(a, {
749
743
  validation: "jwt",
750
744
  code: d.invalid_string,
751
- message: n.message
752
- }), t.dirty()) : n.kind === "cidr" ? Ct(e.data, n.version) || (s = this._getOrReturnCtx(e, s), l(s, {
745
+ message: s.message
746
+ }), t.dirty()) : s.kind === "cidr" ? ct(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
753
747
  validation: "cidr",
754
748
  code: d.invalid_string,
755
- message: n.message
756
- }), t.dirty()) : n.kind === "base64" ? kt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
749
+ message: s.message
750
+ }), t.dirty()) : s.kind === "base64" ? tt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
757
751
  validation: "base64",
758
752
  code: d.invalid_string,
759
- message: n.message
760
- }), t.dirty()) : n.kind === "base64url" ? xt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
753
+ message: s.message
754
+ }), t.dirty()) : s.kind === "base64url" ? at.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
761
755
  validation: "base64url",
762
756
  code: d.invalid_string,
763
- message: n.message
764
- }), t.dirty()) : w.assertNever(n);
757
+ message: s.message
758
+ }), t.dirty()) : b.assertNever(s);
765
759
  return { status: t.value, value: e.data };
766
760
  }
767
- _regex(e, t, s) {
768
- return this.refinement((n) => e.test(n), {
761
+ _regex(e, t, a) {
762
+ return this.refinement((s) => e.test(s), {
769
763
  validation: t,
770
764
  code: d.invalid_string,
771
- ...p.errToObj(s)
765
+ ...p.errToObj(a)
772
766
  });
773
767
  }
774
768
  _addCheck(e) {
775
- return new C({
769
+ return new A({
776
770
  ...this._def,
777
771
  checks: [...this._def.checks, e]
778
772
  });
@@ -820,7 +814,6 @@ class C extends v {
820
814
  return this._addCheck({ kind: "cidr", ...p.errToObj(e) });
821
815
  }
822
816
  datetime(e) {
823
- var t, s;
824
817
  return typeof e == "string" ? this._addCheck({
825
818
  kind: "datetime",
826
819
  precision: null,
@@ -830,8 +823,8 @@ class C extends v {
830
823
  }) : this._addCheck({
831
824
  kind: "datetime",
832
825
  precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
833
- offset: (t = e == null ? void 0 : e.offset) !== null && t !== void 0 ? t : !1,
834
- local: (s = e == null ? void 0 : e.local) !== null && s !== void 0 ? s : !1,
826
+ offset: (e == null ? void 0 : e.offset) ?? !1,
827
+ local: (e == null ? void 0 : e.local) ?? !1,
835
828
  ...p.errToObj(e == null ? void 0 : e.message)
836
829
  });
837
830
  }
@@ -909,19 +902,19 @@ class C extends v {
909
902
  return this.min(1, p.errToObj(e));
910
903
  }
911
904
  trim() {
912
- return new C({
905
+ return new A({
913
906
  ...this._def,
914
907
  checks: [...this._def.checks, { kind: "trim" }]
915
908
  });
916
909
  }
917
910
  toLowerCase() {
918
- return new C({
911
+ return new A({
919
912
  ...this._def,
920
913
  checks: [...this._def.checks, { kind: "toLowerCase" }]
921
914
  });
922
915
  }
923
916
  toUpperCase() {
924
- return new C({
917
+ return new A({
925
918
  ...this._def,
926
919
  checks: [...this._def.checks, { kind: "toUpperCase" }]
927
920
  });
@@ -987,63 +980,60 @@ class C extends v {
987
980
  return e;
988
981
  }
989
982
  }
990
- C.create = (a) => {
991
- var e;
992
- return new C({
993
- checks: [],
994
- typeName: m.ZodString,
995
- coerce: (e = a == null ? void 0 : a.coerce) !== null && e !== void 0 ? e : !1,
996
- ..._(a)
997
- });
998
- };
999
- function Ot(a, e) {
1000
- const t = (a.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, r = parseInt(a.toFixed(n).replace(".", "")), i = parseInt(e.toFixed(n).replace(".", ""));
1001
- return r % i / Math.pow(10, n);
983
+ A.create = (n) => new A({
984
+ checks: [],
985
+ typeName: f.ZodString,
986
+ coerce: (n == null ? void 0 : n.coerce) ?? !1,
987
+ ...y(n)
988
+ });
989
+ function dt(n, e) {
990
+ const t = (n.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, s = t > a ? t : a, i = Number.parseInt(n.toFixed(s).replace(".", "")), r = Number.parseInt(e.toFixed(s).replace(".", ""));
991
+ return i % r / 10 ** s;
1002
992
  }
1003
- let X = class Me extends v {
993
+ let ke = class oe extends v {
1004
994
  constructor() {
1005
995
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1006
996
  }
1007
997
  _parse(e) {
1008
- if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== h.number) {
1009
- const n = this._getOrReturnCtx(e);
1010
- return l(n, {
998
+ if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== l.number) {
999
+ const s = this._getOrReturnCtx(e);
1000
+ return u(s, {
1011
1001
  code: d.invalid_type,
1012
- expected: h.number,
1013
- received: n.parsedType
1014
- }), y;
1002
+ expected: l.number,
1003
+ received: s.parsedType
1004
+ }), _;
1015
1005
  }
1016
1006
  let t;
1017
- const s = new S();
1018
- for (const n of this._def.checks)
1019
- n.kind === "int" ? w.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), l(t, {
1007
+ const a = new N();
1008
+ for (const s of this._def.checks)
1009
+ s.kind === "int" ? b.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1020
1010
  code: d.invalid_type,
1021
1011
  expected: "integer",
1022
1012
  received: "float",
1023
- message: n.message
1024
- }), s.dirty()) : n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (t = this._getOrReturnCtx(e, t), l(t, {
1013
+ message: s.message
1014
+ }), a.dirty()) : s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1025
1015
  code: d.too_small,
1026
- minimum: n.value,
1016
+ minimum: s.value,
1027
1017
  type: "number",
1028
- inclusive: n.inclusive,
1018
+ inclusive: s.inclusive,
1029
1019
  exact: !1,
1030
- message: n.message
1031
- }), s.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (t = this._getOrReturnCtx(e, t), l(t, {
1020
+ message: s.message
1021
+ }), a.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1032
1022
  code: d.too_big,
1033
- maximum: n.value,
1023
+ maximum: s.value,
1034
1024
  type: "number",
1035
- inclusive: n.inclusive,
1025
+ inclusive: s.inclusive,
1036
1026
  exact: !1,
1037
- message: n.message
1038
- }), s.dirty()) : n.kind === "multipleOf" ? Ot(e.data, n.value) !== 0 && (t = this._getOrReturnCtx(e, t), l(t, {
1027
+ message: s.message
1028
+ }), a.dirty()) : s.kind === "multipleOf" ? dt(e.data, s.value) !== 0 && (t = this._getOrReturnCtx(e, t), u(t, {
1039
1029
  code: d.not_multiple_of,
1040
- multipleOf: n.value,
1041
- message: n.message
1042
- }), s.dirty()) : n.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), l(t, {
1030
+ multipleOf: s.value,
1031
+ message: s.message
1032
+ }), a.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), u(t, {
1043
1033
  code: d.not_finite,
1044
- message: n.message
1045
- }), s.dirty()) : w.assertNever(n);
1046
- return { status: s.value, value: e.data };
1034
+ message: s.message
1035
+ }), a.dirty()) : b.assertNever(s);
1036
+ return { status: a.value, value: e.data };
1047
1037
  }
1048
1038
  gte(e, t) {
1049
1039
  return this.setLimit("min", e, !0, p.toString(t));
@@ -1057,22 +1047,22 @@ let X = class Me extends v {
1057
1047
  lt(e, t) {
1058
1048
  return this.setLimit("max", e, !1, p.toString(t));
1059
1049
  }
1060
- setLimit(e, t, s, n) {
1061
- return new Me({
1050
+ setLimit(e, t, a, s) {
1051
+ return new oe({
1062
1052
  ...this._def,
1063
1053
  checks: [
1064
1054
  ...this._def.checks,
1065
1055
  {
1066
1056
  kind: e,
1067
1057
  value: t,
1068
- inclusive: s,
1069
- message: p.toString(n)
1058
+ inclusive: a,
1059
+ message: p.toString(s)
1070
1060
  }
1071
1061
  ]
1072
1062
  });
1073
1063
  }
1074
1064
  _addCheck(e) {
1075
- return new Me({
1065
+ return new oe({
1076
1066
  ...this._def,
1077
1067
  checks: [...this._def.checks, e]
1078
1068
  });
@@ -1154,25 +1144,25 @@ let X = class Me extends v {
1154
1144
  return e;
1155
1145
  }
1156
1146
  get isInt() {
1157
- return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && w.isInteger(e.value));
1147
+ return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && b.isInteger(e.value));
1158
1148
  }
1159
1149
  get isFinite() {
1160
1150
  let e = null, t = null;
1161
- for (const s of this._def.checks) {
1162
- if (s.kind === "finite" || s.kind === "int" || s.kind === "multipleOf")
1151
+ for (const a of this._def.checks) {
1152
+ if (a.kind === "finite" || a.kind === "int" || a.kind === "multipleOf")
1163
1153
  return !0;
1164
- s.kind === "min" ? (t === null || s.value > t) && (t = s.value) : s.kind === "max" && (e === null || s.value < e) && (e = s.value);
1154
+ a.kind === "min" ? (t === null || a.value > t) && (t = a.value) : a.kind === "max" && (e === null || a.value < e) && (e = a.value);
1165
1155
  }
1166
1156
  return Number.isFinite(t) && Number.isFinite(e);
1167
1157
  }
1168
1158
  };
1169
- X.create = (a) => new X({
1159
+ ke.create = (n) => new ke({
1170
1160
  checks: [],
1171
- typeName: m.ZodNumber,
1172
- coerce: (a == null ? void 0 : a.coerce) || !1,
1173
- ..._(a)
1161
+ typeName: f.ZodNumber,
1162
+ coerce: (n == null ? void 0 : n.coerce) || !1,
1163
+ ...y(n)
1174
1164
  });
1175
- let Q = class Fe extends v {
1165
+ class U extends v {
1176
1166
  constructor() {
1177
1167
  super(...arguments), this.min = this.gte, this.max = this.lte;
1178
1168
  }
@@ -1183,37 +1173,37 @@ let Q = class Fe extends v {
1183
1173
  } catch {
1184
1174
  return this._getInvalidInput(e);
1185
1175
  }
1186
- if (this._getType(e) !== h.bigint)
1176
+ if (this._getType(e) !== l.bigint)
1187
1177
  return this._getInvalidInput(e);
1188
1178
  let t;
1189
- const s = new S();
1190
- for (const n of this._def.checks)
1191
- n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (t = this._getOrReturnCtx(e, t), l(t, {
1179
+ const a = new N();
1180
+ for (const s of this._def.checks)
1181
+ s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1192
1182
  code: d.too_small,
1193
1183
  type: "bigint",
1194
- minimum: n.value,
1195
- inclusive: n.inclusive,
1196
- message: n.message
1197
- }), s.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (t = this._getOrReturnCtx(e, t), l(t, {
1184
+ minimum: s.value,
1185
+ inclusive: s.inclusive,
1186
+ message: s.message
1187
+ }), a.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (t = this._getOrReturnCtx(e, t), u(t, {
1198
1188
  code: d.too_big,
1199
1189
  type: "bigint",
1200
- maximum: n.value,
1201
- inclusive: n.inclusive,
1202
- message: n.message
1203
- }), s.dirty()) : n.kind === "multipleOf" ? e.data % n.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), l(t, {
1190
+ maximum: s.value,
1191
+ inclusive: s.inclusive,
1192
+ message: s.message
1193
+ }), a.dirty()) : s.kind === "multipleOf" ? e.data % s.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), u(t, {
1204
1194
  code: d.not_multiple_of,
1205
- multipleOf: n.value,
1206
- message: n.message
1207
- }), s.dirty()) : w.assertNever(n);
1208
- return { status: s.value, value: e.data };
1195
+ multipleOf: s.value,
1196
+ message: s.message
1197
+ }), a.dirty()) : b.assertNever(s);
1198
+ return { status: a.value, value: e.data };
1209
1199
  }
1210
1200
  _getInvalidInput(e) {
1211
1201
  const t = this._getOrReturnCtx(e);
1212
- return l(t, {
1202
+ return u(t, {
1213
1203
  code: d.invalid_type,
1214
- expected: h.bigint,
1204
+ expected: l.bigint,
1215
1205
  received: t.parsedType
1216
- }), y;
1206
+ }), _;
1217
1207
  }
1218
1208
  gte(e, t) {
1219
1209
  return this.setLimit("min", e, !0, p.toString(t));
@@ -1227,22 +1217,22 @@ let Q = class Fe extends v {
1227
1217
  lt(e, t) {
1228
1218
  return this.setLimit("max", e, !1, p.toString(t));
1229
1219
  }
1230
- setLimit(e, t, s, n) {
1231
- return new Fe({
1220
+ setLimit(e, t, a, s) {
1221
+ return new U({
1232
1222
  ...this._def,
1233
1223
  checks: [
1234
1224
  ...this._def.checks,
1235
1225
  {
1236
1226
  kind: e,
1237
1227
  value: t,
1238
- inclusive: s,
1239
- message: p.toString(n)
1228
+ inclusive: a,
1229
+ message: p.toString(s)
1240
1230
  }
1241
1231
  ]
1242
1232
  });
1243
1233
  }
1244
1234
  _addCheck(e) {
1245
- return new Fe({
1235
+ return new U({
1246
1236
  ...this._def,
1247
1237
  checks: [...this._def.checks, e]
1248
1238
  });
@@ -1298,75 +1288,72 @@ let Q = class Fe extends v {
1298
1288
  t.kind === "max" && (e === null || t.value < e) && (e = t.value);
1299
1289
  return e;
1300
1290
  }
1301
- };
1302
- Q.create = (a) => {
1303
- var e;
1304
- return new Q({
1305
- checks: [],
1306
- typeName: m.ZodBigInt,
1307
- coerce: (e = a == null ? void 0 : a.coerce) !== null && e !== void 0 ? e : !1,
1308
- ..._(a)
1309
- });
1310
- };
1311
- class ee extends v {
1291
+ }
1292
+ U.create = (n) => new U({
1293
+ checks: [],
1294
+ typeName: f.ZodBigInt,
1295
+ coerce: (n == null ? void 0 : n.coerce) ?? !1,
1296
+ ...y(n)
1297
+ });
1298
+ class xe extends v {
1312
1299
  _parse(e) {
1313
- if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== h.boolean) {
1300
+ if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== l.boolean) {
1314
1301
  const t = this._getOrReturnCtx(e);
1315
- return l(t, {
1302
+ return u(t, {
1316
1303
  code: d.invalid_type,
1317
- expected: h.boolean,
1304
+ expected: l.boolean,
1318
1305
  received: t.parsedType
1319
- }), y;
1306
+ }), _;
1320
1307
  }
1321
1308
  return x(e.data);
1322
1309
  }
1323
1310
  }
1324
- ee.create = (a) => new ee({
1325
- typeName: m.ZodBoolean,
1326
- coerce: (a == null ? void 0 : a.coerce) || !1,
1327
- ..._(a)
1311
+ xe.create = (n) => new xe({
1312
+ typeName: f.ZodBoolean,
1313
+ coerce: (n == null ? void 0 : n.coerce) || !1,
1314
+ ...y(n)
1328
1315
  });
1329
- let te = class Xe extends v {
1316
+ let Se = class Fe extends v {
1330
1317
  _parse(e) {
1331
- if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== h.date) {
1332
- const n = this._getOrReturnCtx(e);
1333
- return l(n, {
1318
+ if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== l.date) {
1319
+ const s = this._getOrReturnCtx(e);
1320
+ return u(s, {
1334
1321
  code: d.invalid_type,
1335
- expected: h.date,
1336
- received: n.parsedType
1337
- }), y;
1322
+ expected: l.date,
1323
+ received: s.parsedType
1324
+ }), _;
1338
1325
  }
1339
- if (isNaN(e.data.getTime())) {
1340
- const n = this._getOrReturnCtx(e);
1341
- return l(n, {
1326
+ if (Number.isNaN(e.data.getTime())) {
1327
+ const s = this._getOrReturnCtx(e);
1328
+ return u(s, {
1342
1329
  code: d.invalid_date
1343
- }), y;
1330
+ }), _;
1344
1331
  }
1345
- const t = new S();
1346
- let s;
1347
- for (const n of this._def.checks)
1348
- n.kind === "min" ? e.data.getTime() < n.value && (s = this._getOrReturnCtx(e, s), l(s, {
1332
+ const t = new N();
1333
+ let a;
1334
+ for (const s of this._def.checks)
1335
+ s.kind === "min" ? e.data.getTime() < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
1349
1336
  code: d.too_small,
1350
- message: n.message,
1337
+ message: s.message,
1351
1338
  inclusive: !0,
1352
1339
  exact: !1,
1353
- minimum: n.value,
1340
+ minimum: s.value,
1354
1341
  type: "date"
1355
- }), t.dirty()) : n.kind === "max" ? e.data.getTime() > n.value && (s = this._getOrReturnCtx(e, s), l(s, {
1342
+ }), t.dirty()) : s.kind === "max" ? e.data.getTime() > s.value && (a = this._getOrReturnCtx(e, a), u(a, {
1356
1343
  code: d.too_big,
1357
- message: n.message,
1344
+ message: s.message,
1358
1345
  inclusive: !0,
1359
1346
  exact: !1,
1360
- maximum: n.value,
1347
+ maximum: s.value,
1361
1348
  type: "date"
1362
- }), t.dirty()) : w.assertNever(n);
1349
+ }), t.dirty()) : b.assertNever(s);
1363
1350
  return {
1364
1351
  status: t.value,
1365
1352
  value: new Date(e.data.getTime())
1366
1353
  };
1367
1354
  }
1368
1355
  _addCheck(e) {
1369
- return new Xe({
1356
+ return new Fe({
1370
1357
  ...this._def,
1371
1358
  checks: [...this._def.checks, e]
1372
1359
  });
@@ -1398,76 +1385,76 @@ let te = class Xe extends v {
1398
1385
  return e != null ? new Date(e) : null;
1399
1386
  }
1400
1387
  };
1401
- te.create = (a) => new te({
1388
+ Se.create = (n) => new Se({
1402
1389
  checks: [],
1403
- coerce: (a == null ? void 0 : a.coerce) || !1,
1404
- typeName: m.ZodDate,
1405
- ..._(a)
1390
+ coerce: (n == null ? void 0 : n.coerce) || !1,
1391
+ typeName: f.ZodDate,
1392
+ ...y(n)
1406
1393
  });
1407
- class Te extends v {
1394
+ class Ne extends v {
1408
1395
  _parse(e) {
1409
- if (this._getType(e) !== h.symbol) {
1396
+ if (this._getType(e) !== l.symbol) {
1410
1397
  const t = this._getOrReturnCtx(e);
1411
- return l(t, {
1398
+ return u(t, {
1412
1399
  code: d.invalid_type,
1413
- expected: h.symbol,
1400
+ expected: l.symbol,
1414
1401
  received: t.parsedType
1415
- }), y;
1402
+ }), _;
1416
1403
  }
1417
1404
  return x(e.data);
1418
1405
  }
1419
1406
  }
1420
- Te.create = (a) => new Te({
1421
- typeName: m.ZodSymbol,
1422
- ..._(a)
1407
+ Ne.create = (n) => new Ne({
1408
+ typeName: f.ZodSymbol,
1409
+ ...y(n)
1423
1410
  });
1424
- class se extends v {
1411
+ class Ce extends v {
1425
1412
  _parse(e) {
1426
- if (this._getType(e) !== h.undefined) {
1413
+ if (this._getType(e) !== l.undefined) {
1427
1414
  const t = this._getOrReturnCtx(e);
1428
- return l(t, {
1415
+ return u(t, {
1429
1416
  code: d.invalid_type,
1430
- expected: h.undefined,
1417
+ expected: l.undefined,
1431
1418
  received: t.parsedType
1432
- }), y;
1419
+ }), _;
1433
1420
  }
1434
1421
  return x(e.data);
1435
1422
  }
1436
1423
  }
1437
- se.create = (a) => new se({
1438
- typeName: m.ZodUndefined,
1439
- ..._(a)
1424
+ Ce.create = (n) => new Ce({
1425
+ typeName: f.ZodUndefined,
1426
+ ...y(n)
1440
1427
  });
1441
- class ae extends v {
1428
+ class Te extends v {
1442
1429
  _parse(e) {
1443
- if (this._getType(e) !== h.null) {
1430
+ if (this._getType(e) !== l.null) {
1444
1431
  const t = this._getOrReturnCtx(e);
1445
- return l(t, {
1432
+ return u(t, {
1446
1433
  code: d.invalid_type,
1447
- expected: h.null,
1434
+ expected: l.null,
1448
1435
  received: t.parsedType
1449
- }), y;
1436
+ }), _;
1450
1437
  }
1451
1438
  return x(e.data);
1452
1439
  }
1453
1440
  }
1454
- ae.create = (a) => new ae({
1455
- typeName: m.ZodNull,
1456
- ..._(a)
1441
+ Te.create = (n) => new Te({
1442
+ typeName: f.ZodNull,
1443
+ ...y(n)
1457
1444
  });
1458
- let K = class extends v {
1445
+ class ce extends v {
1459
1446
  constructor() {
1460
1447
  super(...arguments), this._any = !0;
1461
1448
  }
1462
1449
  _parse(e) {
1463
1450
  return x(e.data);
1464
1451
  }
1465
- };
1466
- K.create = (a) => new K({
1467
- typeName: m.ZodAny,
1468
- ..._(a)
1452
+ }
1453
+ ce.create = (n) => new ce({
1454
+ typeName: f.ZodAny,
1455
+ ...y(n)
1469
1456
  });
1470
- class L extends v {
1457
+ class Ze extends v {
1471
1458
  constructor() {
1472
1459
  super(...arguments), this._unknown = !0;
1473
1460
  }
@@ -1475,98 +1462,98 @@ class L extends v {
1475
1462
  return x(e.data);
1476
1463
  }
1477
1464
  }
1478
- L.create = (a) => new L({
1479
- typeName: m.ZodUnknown,
1480
- ..._(a)
1465
+ Ze.create = (n) => new Ze({
1466
+ typeName: f.ZodUnknown,
1467
+ ...y(n)
1481
1468
  });
1482
- class $ extends v {
1469
+ let E = class extends v {
1483
1470
  _parse(e) {
1484
1471
  const t = this._getOrReturnCtx(e);
1485
- return l(t, {
1472
+ return u(t, {
1486
1473
  code: d.invalid_type,
1487
- expected: h.never,
1474
+ expected: l.never,
1488
1475
  received: t.parsedType
1489
- }), y;
1476
+ }), _;
1490
1477
  }
1491
- }
1492
- $.create = (a) => new $({
1493
- typeName: m.ZodNever,
1494
- ..._(a)
1478
+ };
1479
+ E.create = (n) => new E({
1480
+ typeName: f.ZodNever,
1481
+ ...y(n)
1495
1482
  });
1496
- class Ne extends v {
1483
+ class Oe extends v {
1497
1484
  _parse(e) {
1498
- if (this._getType(e) !== h.undefined) {
1485
+ if (this._getType(e) !== l.undefined) {
1499
1486
  const t = this._getOrReturnCtx(e);
1500
- return l(t, {
1487
+ return u(t, {
1501
1488
  code: d.invalid_type,
1502
- expected: h.void,
1489
+ expected: l.void,
1503
1490
  received: t.parsedType
1504
- }), y;
1491
+ }), _;
1505
1492
  }
1506
1493
  return x(e.data);
1507
1494
  }
1508
1495
  }
1509
- Ne.create = (a) => new Ne({
1510
- typeName: m.ZodVoid,
1511
- ..._(a)
1496
+ Oe.create = (n) => new Oe({
1497
+ typeName: f.ZodVoid,
1498
+ ...y(n)
1512
1499
  });
1513
- let z = class we extends v {
1500
+ let q = class Y extends v {
1514
1501
  _parse(e) {
1515
- const { ctx: t, status: s } = this._processInputParams(e), n = this._def;
1516
- if (t.parsedType !== h.array)
1517
- return l(t, {
1502
+ const { ctx: t, status: a } = this._processInputParams(e), s = this._def;
1503
+ if (t.parsedType !== l.array)
1504
+ return u(t, {
1518
1505
  code: d.invalid_type,
1519
- expected: h.array,
1506
+ expected: l.array,
1520
1507
  received: t.parsedType
1521
- }), y;
1522
- if (n.exactLength !== null) {
1523
- const i = t.data.length > n.exactLength.value, o = t.data.length < n.exactLength.value;
1524
- (i || o) && (l(t, {
1525
- code: i ? d.too_big : d.too_small,
1526
- minimum: o ? n.exactLength.value : void 0,
1527
- maximum: i ? n.exactLength.value : void 0,
1508
+ }), _;
1509
+ if (s.exactLength !== null) {
1510
+ const r = t.data.length > s.exactLength.value, o = t.data.length < s.exactLength.value;
1511
+ (r || o) && (u(t, {
1512
+ code: r ? d.too_big : d.too_small,
1513
+ minimum: o ? s.exactLength.value : void 0,
1514
+ maximum: r ? s.exactLength.value : void 0,
1528
1515
  type: "array",
1529
1516
  inclusive: !0,
1530
1517
  exact: !0,
1531
- message: n.exactLength.message
1532
- }), s.dirty());
1518
+ message: s.exactLength.message
1519
+ }), a.dirty());
1533
1520
  }
1534
- if (n.minLength !== null && t.data.length < n.minLength.value && (l(t, {
1521
+ if (s.minLength !== null && t.data.length < s.minLength.value && (u(t, {
1535
1522
  code: d.too_small,
1536
- minimum: n.minLength.value,
1523
+ minimum: s.minLength.value,
1537
1524
  type: "array",
1538
1525
  inclusive: !0,
1539
1526
  exact: !1,
1540
- message: n.minLength.message
1541
- }), s.dirty()), n.maxLength !== null && t.data.length > n.maxLength.value && (l(t, {
1527
+ message: s.minLength.message
1528
+ }), a.dirty()), s.maxLength !== null && t.data.length > s.maxLength.value && (u(t, {
1542
1529
  code: d.too_big,
1543
- maximum: n.maxLength.value,
1530
+ maximum: s.maxLength.value,
1544
1531
  type: "array",
1545
1532
  inclusive: !0,
1546
1533
  exact: !1,
1547
- message: n.maxLength.message
1548
- }), s.dirty()), t.common.async)
1549
- return Promise.all([...t.data].map((i, o) => n.type._parseAsync(new I(t, i, t.path, o)))).then((i) => S.mergeArray(s, i));
1550
- const r = [...t.data].map((i, o) => n.type._parseSync(new I(t, i, t.path, o)));
1551
- return S.mergeArray(s, r);
1534
+ message: s.maxLength.message
1535
+ }), a.dirty()), t.common.async)
1536
+ return Promise.all([...t.data].map((r, o) => s.type._parseAsync(new $(t, r, t.path, o)))).then((r) => N.mergeArray(a, r));
1537
+ const i = [...t.data].map((r, o) => s.type._parseSync(new $(t, r, t.path, o)));
1538
+ return N.mergeArray(a, i);
1552
1539
  }
1553
1540
  get element() {
1554
1541
  return this._def.type;
1555
1542
  }
1556
1543
  min(e, t) {
1557
- return new we({
1544
+ return new Y({
1558
1545
  ...this._def,
1559
1546
  minLength: { value: e, message: p.toString(t) }
1560
1547
  });
1561
1548
  }
1562
1549
  max(e, t) {
1563
- return new we({
1550
+ return new Y({
1564
1551
  ...this._def,
1565
1552
  maxLength: { value: e, message: p.toString(t) }
1566
1553
  });
1567
1554
  }
1568
1555
  length(e, t) {
1569
- return new we({
1556
+ return new Y({
1570
1557
  ...this._def,
1571
1558
  exactLength: { value: e, message: p.toString(t) }
1572
1559
  });
@@ -1575,131 +1562,131 @@ let z = class we extends v {
1575
1562
  return this.min(1, e);
1576
1563
  }
1577
1564
  };
1578
- z.create = (a, e) => new z({
1579
- type: a,
1565
+ q.create = (n, e) => new q({
1566
+ type: n,
1580
1567
  minLength: null,
1581
1568
  maxLength: null,
1582
1569
  exactLength: null,
1583
- typeName: m.ZodArray,
1584
- ..._(e)
1570
+ typeName: f.ZodArray,
1571
+ ...y(e)
1585
1572
  });
1586
- function U(a) {
1587
- if (a instanceof T) {
1573
+ function M(n) {
1574
+ if (n instanceof T) {
1588
1575
  const e = {};
1589
- for (const t in a.shape) {
1590
- const s = a.shape[t];
1591
- e[t] = E.create(U(s));
1576
+ for (const t in n.shape) {
1577
+ const a = n.shape[t];
1578
+ e[t] = I.create(M(a));
1592
1579
  }
1593
1580
  return new T({
1594
- ...a._def,
1581
+ ...n._def,
1595
1582
  shape: () => e
1596
1583
  });
1597
- } else return a instanceof z ? new z({
1598
- ...a._def,
1599
- type: U(a.element)
1600
- }) : a instanceof E ? E.create(U(a.unwrap())) : a instanceof M ? M.create(U(a.unwrap())) : a instanceof R ? R.create(a.items.map((e) => U(e))) : a;
1584
+ } else return n instanceof q ? new q({
1585
+ ...n._def,
1586
+ type: M(n.element)
1587
+ }) : n instanceof I ? I.create(M(n.unwrap())) : n instanceof V ? V.create(M(n.unwrap())) : n instanceof R ? R.create(n.items.map((e) => M(e))) : n;
1601
1588
  }
1602
- let T = class N extends v {
1589
+ let T = class S extends v {
1603
1590
  constructor() {
1604
1591
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1605
1592
  }
1606
1593
  _getCached() {
1607
1594
  if (this._cached !== null)
1608
1595
  return this._cached;
1609
- const e = this._def.shape(), t = w.objectKeys(e);
1610
- return this._cached = { shape: e, keys: t };
1596
+ const e = this._def.shape(), t = b.objectKeys(e);
1597
+ return this._cached = { shape: e, keys: t }, this._cached;
1611
1598
  }
1612
1599
  _parse(e) {
1613
- if (this._getType(e) !== h.object) {
1600
+ if (this._getType(e) !== l.object) {
1614
1601
  const c = this._getOrReturnCtx(e);
1615
- return l(c, {
1602
+ return u(c, {
1616
1603
  code: d.invalid_type,
1617
- expected: h.object,
1604
+ expected: l.object,
1618
1605
  received: c.parsedType
1619
- }), y;
1606
+ }), _;
1620
1607
  }
1621
- const { status: t, ctx: s } = this._processInputParams(e), { shape: n, keys: r } = this._getCached(), i = [];
1622
- if (!(this._def.catchall instanceof $ && this._def.unknownKeys === "strip"))
1623
- for (const c in s.data)
1624
- r.includes(c) || i.push(c);
1608
+ const { status: t, ctx: a } = this._processInputParams(e), { shape: s, keys: i } = this._getCached(), r = [];
1609
+ if (!(this._def.catchall instanceof E && this._def.unknownKeys === "strip"))
1610
+ for (const c in a.data)
1611
+ i.includes(c) || r.push(c);
1625
1612
  const o = [];
1626
- for (const c of r) {
1627
- const u = n[c], f = s.data[c];
1613
+ for (const c of i) {
1614
+ const h = s[c], m = a.data[c];
1628
1615
  o.push({
1629
1616
  key: { status: "valid", value: c },
1630
- value: u._parse(new I(s, f, s.path, c)),
1631
- alwaysSet: c in s.data
1617
+ value: h._parse(new $(a, m, a.path, c)),
1618
+ alwaysSet: c in a.data
1632
1619
  });
1633
1620
  }
1634
- if (this._def.catchall instanceof $) {
1621
+ if (this._def.catchall instanceof E) {
1635
1622
  const c = this._def.unknownKeys;
1636
1623
  if (c === "passthrough")
1637
- for (const u of i)
1624
+ for (const h of r)
1638
1625
  o.push({
1639
- key: { status: "valid", value: u },
1640
- value: { status: "valid", value: s.data[u] }
1626
+ key: { status: "valid", value: h },
1627
+ value: { status: "valid", value: a.data[h] }
1641
1628
  });
1642
1629
  else if (c === "strict")
1643
- i.length > 0 && (l(s, {
1630
+ r.length > 0 && (u(a, {
1644
1631
  code: d.unrecognized_keys,
1645
- keys: i
1632
+ keys: r
1646
1633
  }), t.dirty());
1647
1634
  else if (c !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1648
1635
  } else {
1649
1636
  const c = this._def.catchall;
1650
- for (const u of i) {
1651
- const f = s.data[u];
1637
+ for (const h of r) {
1638
+ const m = a.data[h];
1652
1639
  o.push({
1653
- key: { status: "valid", value: u },
1640
+ key: { status: "valid", value: h },
1654
1641
  value: c._parse(
1655
- new I(s, f, s.path, u)
1642
+ new $(a, m, a.path, h)
1656
1643
  //, ctx.child(key), value, getParsedType(value)
1657
1644
  ),
1658
- alwaysSet: u in s.data
1645
+ alwaysSet: h in a.data
1659
1646
  });
1660
1647
  }
1661
1648
  }
1662
- return s.common.async ? Promise.resolve().then(async () => {
1649
+ return a.common.async ? Promise.resolve().then(async () => {
1663
1650
  const c = [];
1664
- for (const u of o) {
1665
- const f = await u.key, b = await u.value;
1651
+ for (const h of o) {
1652
+ const m = await h.key, w = await h.value;
1666
1653
  c.push({
1667
- key: f,
1668
- value: b,
1669
- alwaysSet: u.alwaysSet
1654
+ key: m,
1655
+ value: w,
1656
+ alwaysSet: h.alwaysSet
1670
1657
  });
1671
1658
  }
1672
1659
  return c;
1673
- }).then((c) => S.mergeObjectSync(t, c)) : S.mergeObjectSync(t, o);
1660
+ }).then((c) => N.mergeObjectSync(t, c)) : N.mergeObjectSync(t, o);
1674
1661
  }
1675
1662
  get shape() {
1676
1663
  return this._def.shape();
1677
1664
  }
1678
1665
  strict(e) {
1679
- return p.errToObj, new N({
1666
+ return p.errToObj, new S({
1680
1667
  ...this._def,
1681
1668
  unknownKeys: "strict",
1682
1669
  ...e !== void 0 ? {
1683
- errorMap: (t, s) => {
1684
- var n, r, i, o;
1685
- const c = (i = (r = (n = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(n, t, s).message) !== null && i !== void 0 ? i : s.defaultError;
1670
+ errorMap: (t, a) => {
1671
+ var s, i;
1672
+ const r = ((i = (s = this._def).errorMap) == null ? void 0 : i.call(s, t, a).message) ?? a.defaultError;
1686
1673
  return t.code === "unrecognized_keys" ? {
1687
- message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : c
1674
+ message: p.errToObj(e).message ?? r
1688
1675
  } : {
1689
- message: c
1676
+ message: r
1690
1677
  };
1691
1678
  }
1692
1679
  } : {}
1693
1680
  });
1694
1681
  }
1695
1682
  strip() {
1696
- return new N({
1683
+ return new S({
1697
1684
  ...this._def,
1698
1685
  unknownKeys: "strip"
1699
1686
  });
1700
1687
  }
1701
1688
  passthrough() {
1702
- return new N({
1689
+ return new S({
1703
1690
  ...this._def,
1704
1691
  unknownKeys: "passthrough"
1705
1692
  });
@@ -1722,7 +1709,7 @@ let T = class N extends v {
1722
1709
  // }) as any;
1723
1710
  // };
1724
1711
  extend(e) {
1725
- return new N({
1712
+ return new S({
1726
1713
  ...this._def,
1727
1714
  shape: () => ({
1728
1715
  ...this._def.shape(),
@@ -1736,14 +1723,14 @@ let T = class N extends v {
1736
1723
  * upgrade if you are experiencing issues.
1737
1724
  */
1738
1725
  merge(e) {
1739
- return new N({
1726
+ return new S({
1740
1727
  unknownKeys: e._def.unknownKeys,
1741
1728
  catchall: e._def.catchall,
1742
1729
  shape: () => ({
1743
1730
  ...this._def.shape(),
1744
1731
  ...e._def.shape()
1745
1732
  }),
1746
- typeName: m.ZodObject
1733
+ typeName: f.ZodObject
1747
1734
  });
1748
1735
  }
1749
1736
  // merge<
@@ -1806,25 +1793,25 @@ let T = class N extends v {
1806
1793
  // return merged;
1807
1794
  // }
1808
1795
  catchall(e) {
1809
- return new N({
1796
+ return new S({
1810
1797
  ...this._def,
1811
1798
  catchall: e
1812
1799
  });
1813
1800
  }
1814
1801
  pick(e) {
1815
1802
  const t = {};
1816
- return w.objectKeys(e).forEach((s) => {
1817
- e[s] && this.shape[s] && (t[s] = this.shape[s]);
1818
- }), new N({
1803
+ for (const a of b.objectKeys(e))
1804
+ e[a] && this.shape[a] && (t[a] = this.shape[a]);
1805
+ return new S({
1819
1806
  ...this._def,
1820
1807
  shape: () => t
1821
1808
  });
1822
1809
  }
1823
1810
  omit(e) {
1824
1811
  const t = {};
1825
- return w.objectKeys(this.shape).forEach((s) => {
1826
- e[s] || (t[s] = this.shape[s]);
1827
- }), new N({
1812
+ for (const a of b.objectKeys(this.shape))
1813
+ e[a] || (t[a] = this.shape[a]);
1814
+ return new S({
1828
1815
  ...this._def,
1829
1816
  shape: () => t
1830
1817
  });
@@ -1833,78 +1820,79 @@ let T = class N extends v {
1833
1820
  * @deprecated
1834
1821
  */
1835
1822
  deepPartial() {
1836
- return U(this);
1823
+ return M(this);
1837
1824
  }
1838
1825
  partial(e) {
1839
1826
  const t = {};
1840
- return w.objectKeys(this.shape).forEach((s) => {
1841
- const n = this.shape[s];
1842
- e && !e[s] ? t[s] = n : t[s] = n.optional();
1843
- }), new N({
1827
+ for (const a of b.objectKeys(this.shape)) {
1828
+ const s = this.shape[a];
1829
+ e && !e[a] ? t[a] = s : t[a] = s.optional();
1830
+ }
1831
+ return new S({
1844
1832
  ...this._def,
1845
1833
  shape: () => t
1846
1834
  });
1847
1835
  }
1848
1836
  required(e) {
1849
1837
  const t = {};
1850
- return w.objectKeys(this.shape).forEach((s) => {
1851
- if (e && !e[s])
1852
- t[s] = this.shape[s];
1838
+ for (const a of b.objectKeys(this.shape))
1839
+ if (e && !e[a])
1840
+ t[a] = this.shape[a];
1853
1841
  else {
1854
- let n = this.shape[s];
1855
- for (; n instanceof E; )
1856
- n = n._def.innerType;
1857
- t[s] = n;
1842
+ let s = this.shape[a];
1843
+ for (; s instanceof I; )
1844
+ s = s._def.innerType;
1845
+ t[a] = s;
1858
1846
  }
1859
- }), new N({
1847
+ return new S({
1860
1848
  ...this._def,
1861
1849
  shape: () => t
1862
1850
  });
1863
1851
  }
1864
1852
  keyof() {
1865
- return tt(w.objectKeys(this.shape));
1853
+ return Me(b.objectKeys(this.shape));
1866
1854
  }
1867
1855
  };
1868
- T.create = (a, e) => new T({
1869
- shape: () => a,
1856
+ T.create = (n, e) => new T({
1857
+ shape: () => n,
1870
1858
  unknownKeys: "strip",
1871
- catchall: $.create(),
1872
- typeName: m.ZodObject,
1873
- ..._(e)
1859
+ catchall: E.create(),
1860
+ typeName: f.ZodObject,
1861
+ ...y(e)
1874
1862
  });
1875
- T.strictCreate = (a, e) => new T({
1876
- shape: () => a,
1863
+ T.strictCreate = (n, e) => new T({
1864
+ shape: () => n,
1877
1865
  unknownKeys: "strict",
1878
- catchall: $.create(),
1879
- typeName: m.ZodObject,
1880
- ..._(e)
1866
+ catchall: E.create(),
1867
+ typeName: f.ZodObject,
1868
+ ...y(e)
1881
1869
  });
1882
- T.lazycreate = (a, e) => new T({
1883
- shape: a,
1870
+ T.lazycreate = (n, e) => new T({
1871
+ shape: n,
1884
1872
  unknownKeys: "strip",
1885
- catchall: $.create(),
1886
- typeName: m.ZodObject,
1887
- ..._(e)
1873
+ catchall: E.create(),
1874
+ typeName: f.ZodObject,
1875
+ ...y(e)
1888
1876
  });
1889
- class ne extends v {
1877
+ let Q = class extends v {
1890
1878
  _parse(e) {
1891
- const { ctx: t } = this._processInputParams(e), s = this._def.options;
1892
- function n(r) {
1893
- for (const o of r)
1879
+ const { ctx: t } = this._processInputParams(e), a = this._def.options;
1880
+ function s(i) {
1881
+ for (const o of i)
1894
1882
  if (o.result.status === "valid")
1895
1883
  return o.result;
1896
- for (const o of r)
1884
+ for (const o of i)
1897
1885
  if (o.result.status === "dirty")
1898
1886
  return t.common.issues.push(...o.ctx.common.issues), o.result;
1899
- const i = r.map((o) => new O(o.ctx.common.issues));
1900
- return l(t, {
1887
+ const r = i.map((o) => new C(o.ctx.common.issues));
1888
+ return u(t, {
1901
1889
  code: d.invalid_union,
1902
- unionErrors: i
1903
- }), y;
1890
+ unionErrors: r
1891
+ }), _;
1904
1892
  }
1905
1893
  if (t.common.async)
1906
- return Promise.all(s.map(async (r) => {
1907
- const i = {
1894
+ return Promise.all(a.map(async (i) => {
1895
+ const r = {
1908
1896
  ...t,
1909
1897
  common: {
1910
1898
  ...t.common,
@@ -1913,271 +1901,167 @@ class ne extends v {
1913
1901
  parent: null
1914
1902
  };
1915
1903
  return {
1916
- result: await r._parseAsync({
1904
+ result: await i._parseAsync({
1917
1905
  data: t.data,
1918
1906
  path: t.path,
1919
- parent: i
1907
+ parent: r
1920
1908
  }),
1921
- ctx: i
1909
+ ctx: r
1922
1910
  };
1923
- })).then(n);
1911
+ })).then(s);
1924
1912
  {
1925
- let r;
1926
- const i = [];
1927
- for (const c of s) {
1928
- const u = {
1913
+ let i;
1914
+ const r = [];
1915
+ for (const c of a) {
1916
+ const h = {
1929
1917
  ...t,
1930
1918
  common: {
1931
1919
  ...t.common,
1932
1920
  issues: []
1933
1921
  },
1934
1922
  parent: null
1935
- }, f = c._parseSync({
1923
+ }, m = c._parseSync({
1936
1924
  data: t.data,
1937
1925
  path: t.path,
1938
- parent: u
1926
+ parent: h
1939
1927
  });
1940
- if (f.status === "valid")
1941
- return f;
1942
- f.status === "dirty" && !r && (r = { result: f, ctx: u }), u.common.issues.length && i.push(u.common.issues);
1928
+ if (m.status === "valid")
1929
+ return m;
1930
+ m.status === "dirty" && !i && (i = { result: m, ctx: h }), h.common.issues.length && r.push(h.common.issues);
1943
1931
  }
1944
- if (r)
1945
- return t.common.issues.push(...r.ctx.common.issues), r.result;
1946
- const o = i.map((c) => new O(c));
1947
- return l(t, {
1932
+ if (i)
1933
+ return t.common.issues.push(...i.ctx.common.issues), i.result;
1934
+ const o = r.map((c) => new C(c));
1935
+ return u(t, {
1948
1936
  code: d.invalid_union,
1949
1937
  unionErrors: o
1950
- }), y;
1938
+ }), _;
1951
1939
  }
1952
1940
  }
1953
1941
  get options() {
1954
1942
  return this._def.options;
1955
1943
  }
1956
- }
1957
- ne.create = (a, e) => new ne({
1958
- options: a,
1959
- typeName: m.ZodUnion,
1960
- ..._(e)
1944
+ };
1945
+ Q.create = (n, e) => new Q({
1946
+ options: n,
1947
+ typeName: f.ZodUnion,
1948
+ ...y(e)
1961
1949
  });
1962
- const P = (a) => a instanceof oe ? P(a.schema) : a instanceof A ? P(a.innerType()) : a instanceof ce ? [a.value] : a instanceof pe ? a.options : a instanceof de ? w.objectValues(a.enum) : a instanceof ue ? P(a._def.innerType) : a instanceof se ? [void 0] : a instanceof ae ? [null] : a instanceof E ? [void 0, ...P(a.unwrap())] : a instanceof M ? [null, ...P(a.unwrap())] : a instanceof qe || a instanceof he ? P(a.unwrap()) : a instanceof le ? P(a._def.innerType) : [];
1963
- class Ae extends v {
1964
- _parse(e) {
1965
- const { ctx: t } = this._processInputParams(e);
1966
- if (t.parsedType !== h.object)
1967
- return l(t, {
1968
- code: d.invalid_type,
1969
- expected: h.object,
1970
- received: t.parsedType
1971
- }), y;
1972
- const s = this.discriminator, n = t.data[s], r = this.optionsMap.get(n);
1973
- return r ? t.common.async ? r._parseAsync({
1974
- data: t.data,
1975
- path: t.path,
1976
- parent: t
1977
- }) : r._parseSync({
1978
- data: t.data,
1979
- path: t.path,
1980
- parent: t
1981
- }) : (l(t, {
1982
- code: d.invalid_union_discriminator,
1983
- options: Array.from(this.optionsMap.keys()),
1984
- path: [s]
1985
- }), y);
1986
- }
1987
- get discriminator() {
1988
- return this._def.discriminator;
1989
- }
1990
- get options() {
1991
- return this._def.options;
1992
- }
1993
- get optionsMap() {
1994
- return this._def.optionsMap;
1995
- }
1996
- /**
1997
- * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
1998
- * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
1999
- * have a different value for each object in the union.
2000
- * @param discriminator the name of the discriminator property
2001
- * @param types an array of object schemas
2002
- * @param params
2003
- */
2004
- static create(e, t, s) {
2005
- const n = /* @__PURE__ */ new Map();
2006
- for (const r of t) {
2007
- const i = P(r.shape[e]);
2008
- if (!i.length)
2009
- throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
2010
- for (const o of i) {
2011
- if (n.has(o))
2012
- throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);
2013
- n.set(o, r);
2014
- }
2015
- }
2016
- return new Ae({
2017
- typeName: m.ZodDiscriminatedUnion,
2018
- discriminator: e,
2019
- options: t,
2020
- optionsMap: n,
2021
- ..._(s)
2022
- });
2023
- }
2024
- }
2025
- function De(a, e) {
2026
- const t = j(a), s = j(e);
2027
- if (a === e)
2028
- return { valid: !0, data: a };
2029
- if (t === h.object && s === h.object) {
2030
- const n = w.objectKeys(e), r = w.objectKeys(a).filter((o) => n.indexOf(o) !== -1), i = { ...a, ...e };
2031
- for (const o of r) {
2032
- const c = De(a[o], e[o]);
1950
+ function de(n, e) {
1951
+ const t = O(n), a = O(e);
1952
+ if (n === e)
1953
+ return { valid: !0, data: n };
1954
+ if (t === l.object && a === l.object) {
1955
+ const s = b.objectKeys(e), i = b.objectKeys(n).filter((o) => s.indexOf(o) !== -1), r = { ...n, ...e };
1956
+ for (const o of i) {
1957
+ const c = de(n[o], e[o]);
2033
1958
  if (!c.valid)
2034
1959
  return { valid: !1 };
2035
- i[o] = c.data;
1960
+ r[o] = c.data;
2036
1961
  }
2037
- return { valid: !0, data: i };
2038
- } else if (t === h.array && s === h.array) {
2039
- if (a.length !== e.length)
1962
+ return { valid: !0, data: r };
1963
+ } else if (t === l.array && a === l.array) {
1964
+ if (n.length !== e.length)
2040
1965
  return { valid: !1 };
2041
- const n = [];
2042
- for (let r = 0; r < a.length; r++) {
2043
- const i = a[r], o = e[r], c = De(i, o);
1966
+ const s = [];
1967
+ for (let i = 0; i < n.length; i++) {
1968
+ const r = n[i], o = e[i], c = de(r, o);
2044
1969
  if (!c.valid)
2045
1970
  return { valid: !1 };
2046
- n.push(c.data);
1971
+ s.push(c.data);
2047
1972
  }
2048
- return { valid: !0, data: n };
2049
- } else return t === h.date && s === h.date && +a == +e ? { valid: !0, data: a } : { valid: !1 };
1973
+ return { valid: !0, data: s };
1974
+ } else return t === l.date && a === l.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
2050
1975
  }
2051
- class ie extends v {
1976
+ let ee = class extends v {
2052
1977
  _parse(e) {
2053
- const { status: t, ctx: s } = this._processInputParams(e), n = (r, i) => {
2054
- if (Pe(r) || Pe(i))
2055
- return y;
2056
- const o = De(r.value, i.value);
2057
- return o.valid ? ((Re(r) || Re(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(s, {
1978
+ const { status: t, ctx: a } = this._processInputParams(e), s = (i, r) => {
1979
+ if (ve(i) || ve(r))
1980
+ return _;
1981
+ const o = de(i.value, r.value);
1982
+ return o.valid ? ((be(i) || be(r)) && t.dirty(), { status: t.value, value: o.data }) : (u(a, {
2058
1983
  code: d.invalid_intersection_types
2059
- }), y);
1984
+ }), _);
2060
1985
  };
2061
- return s.common.async ? Promise.all([
1986
+ return a.common.async ? Promise.all([
2062
1987
  this._def.left._parseAsync({
2063
- data: s.data,
2064
- path: s.path,
2065
- parent: s
1988
+ data: a.data,
1989
+ path: a.path,
1990
+ parent: a
2066
1991
  }),
2067
1992
  this._def.right._parseAsync({
2068
- data: s.data,
2069
- path: s.path,
2070
- parent: s
1993
+ data: a.data,
1994
+ path: a.path,
1995
+ parent: a
2071
1996
  })
2072
- ]).then(([r, i]) => n(r, i)) : n(this._def.left._parseSync({
2073
- data: s.data,
2074
- path: s.path,
2075
- parent: s
1997
+ ]).then(([i, r]) => s(i, r)) : s(this._def.left._parseSync({
1998
+ data: a.data,
1999
+ path: a.path,
2000
+ parent: a
2076
2001
  }), this._def.right._parseSync({
2077
- data: s.data,
2078
- path: s.path,
2079
- parent: s
2002
+ data: a.data,
2003
+ path: a.path,
2004
+ parent: a
2080
2005
  }));
2081
2006
  }
2082
- }
2083
- ie.create = (a, e, t) => new ie({
2084
- left: a,
2007
+ };
2008
+ ee.create = (n, e, t) => new ee({
2009
+ left: n,
2085
2010
  right: e,
2086
- typeName: m.ZodIntersection,
2087
- ..._(t)
2011
+ typeName: f.ZodIntersection,
2012
+ ...y(t)
2088
2013
  });
2089
- let R = class Qe extends v {
2014
+ class R extends v {
2090
2015
  _parse(e) {
2091
- const { status: t, ctx: s } = this._processInputParams(e);
2092
- if (s.parsedType !== h.array)
2093
- return l(s, {
2016
+ const { status: t, ctx: a } = this._processInputParams(e);
2017
+ if (a.parsedType !== l.array)
2018
+ return u(a, {
2094
2019
  code: d.invalid_type,
2095
- expected: h.array,
2096
- received: s.parsedType
2097
- }), y;
2098
- if (s.data.length < this._def.items.length)
2099
- return l(s, {
2020
+ expected: l.array,
2021
+ received: a.parsedType
2022
+ }), _;
2023
+ if (a.data.length < this._def.items.length)
2024
+ return u(a, {
2100
2025
  code: d.too_small,
2101
2026
  minimum: this._def.items.length,
2102
2027
  inclusive: !0,
2103
2028
  exact: !1,
2104
2029
  type: "array"
2105
- }), y;
2106
- !this._def.rest && s.data.length > this._def.items.length && (l(s, {
2030
+ }), _;
2031
+ !this._def.rest && a.data.length > this._def.items.length && (u(a, {
2107
2032
  code: d.too_big,
2108
2033
  maximum: this._def.items.length,
2109
2034
  inclusive: !0,
2110
2035
  exact: !1,
2111
2036
  type: "array"
2112
2037
  }), t.dirty());
2113
- const n = [...s.data].map((r, i) => {
2114
- const o = this._def.items[i] || this._def.rest;
2115
- return o ? o._parse(new I(s, r, s.path, i)) : null;
2116
- }).filter((r) => !!r);
2117
- return s.common.async ? Promise.all(n).then((r) => S.mergeArray(t, r)) : S.mergeArray(t, n);
2038
+ const s = [...a.data].map((i, r) => {
2039
+ const o = this._def.items[r] || this._def.rest;
2040
+ return o ? o._parse(new $(a, i, a.path, r)) : null;
2041
+ }).filter((i) => !!i);
2042
+ return a.common.async ? Promise.all(s).then((i) => N.mergeArray(t, i)) : N.mergeArray(t, s);
2118
2043
  }
2119
2044
  get items() {
2120
2045
  return this._def.items;
2121
2046
  }
2122
2047
  rest(e) {
2123
- return new Qe({
2048
+ return new R({
2124
2049
  ...this._def,
2125
2050
  rest: e
2126
2051
  });
2127
2052
  }
2128
- };
2129
- R.create = (a, e) => {
2130
- if (!Array.isArray(a))
2053
+ }
2054
+ R.create = (n, e) => {
2055
+ if (!Array.isArray(n))
2131
2056
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2132
2057
  return new R({
2133
- items: a,
2134
- typeName: m.ZodTuple,
2058
+ items: n,
2059
+ typeName: f.ZodTuple,
2135
2060
  rest: null,
2136
- ..._(e)
2061
+ ...y(e)
2137
2062
  });
2138
2063
  };
2139
- class re extends v {
2140
- get keySchema() {
2141
- return this._def.keyType;
2142
- }
2143
- get valueSchema() {
2144
- return this._def.valueType;
2145
- }
2146
- _parse(e) {
2147
- const { status: t, ctx: s } = this._processInputParams(e);
2148
- if (s.parsedType !== h.object)
2149
- return l(s, {
2150
- code: d.invalid_type,
2151
- expected: h.object,
2152
- received: s.parsedType
2153
- }), y;
2154
- const n = [], r = this._def.keyType, i = this._def.valueType;
2155
- for (const o in s.data)
2156
- n.push({
2157
- key: r._parse(new I(s, o, s.path, o)),
2158
- value: i._parse(new I(s, s.data[o], s.path, o)),
2159
- alwaysSet: o in s.data
2160
- });
2161
- return s.common.async ? S.mergeObjectAsync(t, n) : S.mergeObjectSync(t, n);
2162
- }
2163
- get element() {
2164
- return this._def.valueType;
2165
- }
2166
- static create(e, t, s) {
2167
- return t instanceof v ? new re({
2168
- keyType: e,
2169
- valueType: t,
2170
- typeName: m.ZodRecord,
2171
- ..._(s)
2172
- }) : new re({
2173
- keyType: C.create(),
2174
- valueType: e,
2175
- typeName: m.ZodRecord,
2176
- ..._(t)
2177
- });
2178
- }
2179
- }
2180
- class Ce extends v {
2064
+ class Ae extends v {
2181
2065
  get keySchema() {
2182
2066
  return this._def.keyType;
2183
2067
  }
@@ -2185,92 +2069,92 @@ class Ce extends v {
2185
2069
  return this._def.valueType;
2186
2070
  }
2187
2071
  _parse(e) {
2188
- const { status: t, ctx: s } = this._processInputParams(e);
2189
- if (s.parsedType !== h.map)
2190
- return l(s, {
2072
+ const { status: t, ctx: a } = this._processInputParams(e);
2073
+ if (a.parsedType !== l.map)
2074
+ return u(a, {
2191
2075
  code: d.invalid_type,
2192
- expected: h.map,
2193
- received: s.parsedType
2194
- }), y;
2195
- const n = this._def.keyType, r = this._def.valueType, i = [...s.data.entries()].map(([o, c], u) => ({
2196
- key: n._parse(new I(s, o, s.path, [u, "key"])),
2197
- value: r._parse(new I(s, c, s.path, [u, "value"]))
2076
+ expected: l.map,
2077
+ received: a.parsedType
2078
+ }), _;
2079
+ const s = this._def.keyType, i = this._def.valueType, r = [...a.data.entries()].map(([o, c], h) => ({
2080
+ key: s._parse(new $(a, o, a.path, [h, "key"])),
2081
+ value: i._parse(new $(a, c, a.path, [h, "value"]))
2198
2082
  }));
2199
- if (s.common.async) {
2083
+ if (a.common.async) {
2200
2084
  const o = /* @__PURE__ */ new Map();
2201
2085
  return Promise.resolve().then(async () => {
2202
- for (const c of i) {
2203
- const u = await c.key, f = await c.value;
2204
- if (u.status === "aborted" || f.status === "aborted")
2205
- return y;
2206
- (u.status === "dirty" || f.status === "dirty") && t.dirty(), o.set(u.value, f.value);
2086
+ for (const c of r) {
2087
+ const h = await c.key, m = await c.value;
2088
+ if (h.status === "aborted" || m.status === "aborted")
2089
+ return _;
2090
+ (h.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(h.value, m.value);
2207
2091
  }
2208
2092
  return { status: t.value, value: o };
2209
2093
  });
2210
2094
  } else {
2211
2095
  const o = /* @__PURE__ */ new Map();
2212
- for (const c of i) {
2213
- const u = c.key, f = c.value;
2214
- if (u.status === "aborted" || f.status === "aborted")
2215
- return y;
2216
- (u.status === "dirty" || f.status === "dirty") && t.dirty(), o.set(u.value, f.value);
2096
+ for (const c of r) {
2097
+ const h = c.key, m = c.value;
2098
+ if (h.status === "aborted" || m.status === "aborted")
2099
+ return _;
2100
+ (h.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(h.value, m.value);
2217
2101
  }
2218
2102
  return { status: t.value, value: o };
2219
2103
  }
2220
2104
  }
2221
2105
  }
2222
- Ce.create = (a, e, t) => new Ce({
2106
+ Ae.create = (n, e, t) => new Ae({
2223
2107
  valueType: e,
2224
- keyType: a,
2225
- typeName: m.ZodMap,
2226
- ..._(t)
2108
+ keyType: n,
2109
+ typeName: f.ZodMap,
2110
+ ...y(t)
2227
2111
  });
2228
- class V extends v {
2112
+ class H extends v {
2229
2113
  _parse(e) {
2230
- const { status: t, ctx: s } = this._processInputParams(e);
2231
- if (s.parsedType !== h.set)
2232
- return l(s, {
2114
+ const { status: t, ctx: a } = this._processInputParams(e);
2115
+ if (a.parsedType !== l.set)
2116
+ return u(a, {
2233
2117
  code: d.invalid_type,
2234
- expected: h.set,
2235
- received: s.parsedType
2236
- }), y;
2237
- const n = this._def;
2238
- n.minSize !== null && s.data.size < n.minSize.value && (l(s, {
2118
+ expected: l.set,
2119
+ received: a.parsedType
2120
+ }), _;
2121
+ const s = this._def;
2122
+ s.minSize !== null && a.data.size < s.minSize.value && (u(a, {
2239
2123
  code: d.too_small,
2240
- minimum: n.minSize.value,
2124
+ minimum: s.minSize.value,
2241
2125
  type: "set",
2242
2126
  inclusive: !0,
2243
2127
  exact: !1,
2244
- message: n.minSize.message
2245
- }), t.dirty()), n.maxSize !== null && s.data.size > n.maxSize.value && (l(s, {
2128
+ message: s.minSize.message
2129
+ }), t.dirty()), s.maxSize !== null && a.data.size > s.maxSize.value && (u(a, {
2246
2130
  code: d.too_big,
2247
- maximum: n.maxSize.value,
2131
+ maximum: s.maxSize.value,
2248
2132
  type: "set",
2249
2133
  inclusive: !0,
2250
2134
  exact: !1,
2251
- message: n.maxSize.message
2135
+ message: s.maxSize.message
2252
2136
  }), t.dirty());
2253
- const r = this._def.valueType;
2254
- function i(c) {
2255
- const u = /* @__PURE__ */ new Set();
2256
- for (const f of c) {
2257
- if (f.status === "aborted")
2258
- return y;
2259
- f.status === "dirty" && t.dirty(), u.add(f.value);
2137
+ const i = this._def.valueType;
2138
+ function r(c) {
2139
+ const h = /* @__PURE__ */ new Set();
2140
+ for (const m of c) {
2141
+ if (m.status === "aborted")
2142
+ return _;
2143
+ m.status === "dirty" && t.dirty(), h.add(m.value);
2260
2144
  }
2261
- return { status: t.value, value: u };
2145
+ return { status: t.value, value: h };
2262
2146
  }
2263
- const o = [...s.data.values()].map((c, u) => r._parse(new I(s, c, s.path, u)));
2264
- return s.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
2147
+ const o = [...a.data.values()].map((c, h) => i._parse(new $(a, c, a.path, h)));
2148
+ return a.common.async ? Promise.all(o).then((c) => r(c)) : r(o);
2265
2149
  }
2266
2150
  min(e, t) {
2267
- return new V({
2151
+ return new H({
2268
2152
  ...this._def,
2269
2153
  minSize: { value: e, message: p.toString(t) }
2270
2154
  });
2271
2155
  }
2272
2156
  max(e, t) {
2273
- return new V({
2157
+ return new H({
2274
2158
  ...this._def,
2275
2159
  maxSize: { value: e, message: p.toString(t) }
2276
2160
  });
@@ -2282,115 +2166,14 @@ class V extends v {
2282
2166
  return this.min(1, e);
2283
2167
  }
2284
2168
  }
2285
- V.create = (a, e) => new V({
2286
- valueType: a,
2169
+ H.create = (n, e) => new H({
2170
+ valueType: n,
2287
2171
  minSize: null,
2288
2172
  maxSize: null,
2289
- typeName: m.ZodSet,
2290
- ..._(e)
2173
+ typeName: f.ZodSet,
2174
+ ...y(e)
2291
2175
  });
2292
- let et = class be extends v {
2293
- constructor() {
2294
- super(...arguments), this.validate = this.implement;
2295
- }
2296
- _parse(e) {
2297
- const { ctx: t } = this._processInputParams(e);
2298
- if (t.parsedType !== h.function)
2299
- return l(t, {
2300
- code: d.invalid_type,
2301
- expected: h.function,
2302
- received: t.parsedType
2303
- }), y;
2304
- function s(o, c) {
2305
- return xe({
2306
- data: o,
2307
- path: t.path,
2308
- errorMaps: [
2309
- t.common.contextualErrorMap,
2310
- t.schemaErrorMap,
2311
- ke(),
2312
- H
2313
- ].filter((u) => !!u),
2314
- issueData: {
2315
- code: d.invalid_arguments,
2316
- argumentsError: c
2317
- }
2318
- });
2319
- }
2320
- function n(o, c) {
2321
- return xe({
2322
- data: o,
2323
- path: t.path,
2324
- errorMaps: [
2325
- t.common.contextualErrorMap,
2326
- t.schemaErrorMap,
2327
- ke(),
2328
- H
2329
- ].filter((u) => !!u),
2330
- issueData: {
2331
- code: d.invalid_return_type,
2332
- returnTypeError: c
2333
- }
2334
- });
2335
- }
2336
- const r = { errorMap: t.common.contextualErrorMap }, i = t.data;
2337
- if (this._def.returns instanceof W) {
2338
- const o = this;
2339
- return x(async function(...c) {
2340
- const u = new O([]), f = await o._def.args.parseAsync(c, r).catch((Z) => {
2341
- throw u.addIssue(s(c, Z)), u;
2342
- }), b = await Reflect.apply(i, this, f);
2343
- return await o._def.returns._def.type.parseAsync(b, r).catch((Z) => {
2344
- throw u.addIssue(n(b, Z)), u;
2345
- });
2346
- });
2347
- } else {
2348
- const o = this;
2349
- return x(function(...c) {
2350
- const u = o._def.args.safeParse(c, r);
2351
- if (!u.success)
2352
- throw new O([s(c, u.error)]);
2353
- const f = Reflect.apply(i, this, u.data), b = o._def.returns.safeParse(f, r);
2354
- if (!b.success)
2355
- throw new O([n(f, b.error)]);
2356
- return b.data;
2357
- });
2358
- }
2359
- }
2360
- parameters() {
2361
- return this._def.args;
2362
- }
2363
- returnType() {
2364
- return this._def.returns;
2365
- }
2366
- args(...e) {
2367
- return new be({
2368
- ...this._def,
2369
- args: R.create(e).rest(L.create())
2370
- });
2371
- }
2372
- returns(e) {
2373
- return new be({
2374
- ...this._def,
2375
- returns: e
2376
- });
2377
- }
2378
- implement(e) {
2379
- return this.parse(e);
2380
- }
2381
- strictImplement(e) {
2382
- return this.parse(e);
2383
- }
2384
- static create(e, t, s) {
2385
- return new be({
2386
- args: e || R.create([]).rest(L.create()),
2387
- returns: t || L.create(),
2388
- typeName: m.ZodFunction,
2389
- ..._(s)
2390
- });
2391
- }
2392
- };
2393
- class oe extends v {
2176
+ class Ie extends v {
2394
2177
  get schema() {
2395
2178
  return this._def.getter();
2396
2179
  }
@@ -2399,59 +2182,56 @@ class oe extends v {
2399
2182
  return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
2400
2183
  }
2401
2184
  }
2402
- oe.create = (a, e) => new oe({
2403
- getter: a,
2404
- typeName: m.ZodLazy,
2405
- ..._(e)
2185
+ Ie.create = (n, e) => new Ie({
2186
+ getter: n,
2187
+ typeName: f.ZodLazy,
2188
+ ...y(e)
2406
2189
  });
2407
- class ce extends v {
2190
+ let ue = class extends v {
2408
2191
  _parse(e) {
2409
2192
  if (e.data !== this._def.value) {
2410
2193
  const t = this._getOrReturnCtx(e);
2411
- return l(t, {
2194
+ return u(t, {
2412
2195
  received: t.data,
2413
2196
  code: d.invalid_literal,
2414
2197
  expected: this._def.value
2415
- }), y;
2198
+ }), _;
2416
2199
  }
2417
2200
  return { status: "valid", value: e.data };
2418
2201
  }
2419
2202
  get value() {
2420
2203
  return this._def.value;
2421
2204
  }
2422
- }
2423
- ce.create = (a, e) => new ce({
2424
- value: a,
2425
- typeName: m.ZodLiteral,
2426
- ..._(e)
2205
+ };
2206
+ ue.create = (n, e) => new ue({
2207
+ value: n,
2208
+ typeName: f.ZodLiteral,
2209
+ ...y(e)
2427
2210
  });
2428
- function tt(a, e) {
2429
- return new pe({
2430
- values: a,
2431
- typeName: m.ZodEnum,
2432
- ..._(e)
2211
+ function Me(n, e) {
2212
+ return new me({
2213
+ values: n,
2214
+ typeName: f.ZodEnum,
2215
+ ...y(e)
2433
2216
  });
2434
2217
  }
2435
- let pe = class Le extends v {
2436
- constructor() {
2437
- super(...arguments), J.set(this, void 0);
2438
- }
2218
+ let me = class le extends v {
2439
2219
  _parse(e) {
2440
2220
  if (typeof e.data != "string") {
2441
- const t = this._getOrReturnCtx(e), s = this._def.values;
2442
- return l(t, {
2443
- expected: w.joinValues(s),
2221
+ const t = this._getOrReturnCtx(e), a = this._def.values;
2222
+ return u(t, {
2223
+ expected: b.joinValues(a),
2444
2224
  received: t.parsedType,
2445
2225
  code: d.invalid_type
2446
- }), y;
2226
+ }), _;
2447
2227
  }
2448
- if (Se(this, J) || We(this, J, new Set(this._def.values)), !Se(this, J).has(e.data)) {
2449
- const t = this._getOrReturnCtx(e), s = this._def.values;
2450
- return l(t, {
2228
+ if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(e.data)) {
2229
+ const t = this._getOrReturnCtx(e), a = this._def.values;
2230
+ return u(t, {
2451
2231
  received: t.data,
2452
2232
  code: d.invalid_enum_value,
2453
- options: s
2454
- }), y;
2233
+ options: a
2234
+ }), _;
2455
2235
  }
2456
2236
  return x(e.data);
2457
2237
  }
@@ -2477,41 +2257,37 @@ let pe = class Le extends v {
2477
2257
  return e;
2478
2258
  }
2479
2259
  extract(e, t = this._def) {
2480
- return Le.create(e, {
2260
+ return le.create(e, {
2481
2261
  ...this._def,
2482
2262
  ...t
2483
2263
  });
2484
2264
  }
2485
2265
  exclude(e, t = this._def) {
2486
- return Le.create(this.options.filter((s) => !e.includes(s)), {
2266
+ return le.create(this.options.filter((a) => !e.includes(a)), {
2487
2267
  ...this._def,
2488
2268
  ...t
2489
2269
  });
2490
2270
  }
2491
2271
  };
2492
- J = /* @__PURE__ */ new WeakMap();
2493
- pe.create = tt;
2494
- class de extends v {
2495
- constructor() {
2496
- super(...arguments), Y.set(this, void 0);
2497
- }
2272
+ me.create = Me;
2273
+ class $e extends v {
2498
2274
  _parse(e) {
2499
- const t = w.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
2500
- if (s.parsedType !== h.string && s.parsedType !== h.number) {
2501
- const n = w.objectValues(t);
2502
- return l(s, {
2503
- expected: w.joinValues(n),
2504
- received: s.parsedType,
2275
+ const t = b.getValidEnumValues(this._def.values), a = this._getOrReturnCtx(e);
2276
+ if (a.parsedType !== l.string && a.parsedType !== l.number) {
2277
+ const s = b.objectValues(t);
2278
+ return u(a, {
2279
+ expected: b.joinValues(s),
2280
+ received: a.parsedType,
2505
2281
  code: d.invalid_type
2506
- }), y;
2282
+ }), _;
2507
2283
  }
2508
- if (Se(this, Y) || We(this, Y, new Set(w.getValidEnumValues(this._def.values))), !Se(this, Y).has(e.data)) {
2509
- const n = w.objectValues(t);
2510
- return l(s, {
2511
- received: s.data,
2284
+ if (this._cache || (this._cache = new Set(b.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
2285
+ const s = b.objectValues(t);
2286
+ return u(a, {
2287
+ received: a.data,
2512
2288
  code: d.invalid_enum_value,
2513
- options: n
2514
- }), y;
2289
+ options: s
2290
+ }), _;
2515
2291
  }
2516
2292
  return x(e.data);
2517
2293
  }
@@ -2519,157 +2295,159 @@ class de extends v {
2519
2295
  return this._def.values;
2520
2296
  }
2521
2297
  }
2522
- Y = /* @__PURE__ */ new WeakMap();
2523
- de.create = (a, e) => new de({
2524
- values: a,
2525
- typeName: m.ZodNativeEnum,
2526
- ..._(e)
2298
+ $e.create = (n, e) => new $e({
2299
+ values: n,
2300
+ typeName: f.ZodNativeEnum,
2301
+ ...y(e)
2527
2302
  });
2528
- class W extends v {
2303
+ let te = class extends v {
2529
2304
  unwrap() {
2530
2305
  return this._def.type;
2531
2306
  }
2532
2307
  _parse(e) {
2533
2308
  const { ctx: t } = this._processInputParams(e);
2534
- if (t.parsedType !== h.promise && t.common.async === !1)
2535
- return l(t, {
2309
+ if (t.parsedType !== l.promise && t.common.async === !1)
2310
+ return u(t, {
2536
2311
  code: d.invalid_type,
2537
- expected: h.promise,
2312
+ expected: l.promise,
2538
2313
  received: t.parsedType
2539
- }), y;
2540
- const s = t.parsedType === h.promise ? t.data : Promise.resolve(t.data);
2541
- return x(s.then((n) => this._def.type.parseAsync(n, {
2314
+ }), _;
2315
+ const a = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
2316
+ return x(a.then((s) => this._def.type.parseAsync(s, {
2542
2317
  path: t.path,
2543
2318
  errorMap: t.common.contextualErrorMap
2544
2319
  })));
2545
2320
  }
2546
- }
2547
- W.create = (a, e) => new W({
2548
- type: a,
2549
- typeName: m.ZodPromise,
2550
- ..._(e)
2321
+ };
2322
+ te.create = (n, e) => new te({
2323
+ type: n,
2324
+ typeName: f.ZodPromise,
2325
+ ...y(e)
2551
2326
  });
2552
- let A = class extends v {
2327
+ class D extends v {
2553
2328
  innerType() {
2554
2329
  return this._def.schema;
2555
2330
  }
2556
2331
  sourceType() {
2557
- return this._def.schema._def.typeName === m.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2332
+ return this._def.schema._def.typeName === f.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2558
2333
  }
2559
2334
  _parse(e) {
2560
- const { status: t, ctx: s } = this._processInputParams(e), n = this._def.effect || null, r = {
2561
- addIssue: (i) => {
2562
- l(s, i), i.fatal ? t.abort() : t.dirty();
2335
+ const { status: t, ctx: a } = this._processInputParams(e), s = this._def.effect || null, i = {
2336
+ addIssue: (r) => {
2337
+ u(a, r), r.fatal ? t.abort() : t.dirty();
2563
2338
  },
2564
2339
  get path() {
2565
- return s.path;
2340
+ return a.path;
2566
2341
  }
2567
2342
  };
2568
- if (r.addIssue = r.addIssue.bind(r), n.type === "preprocess") {
2569
- const i = n.transform(s.data, r);
2570
- if (s.common.async)
2571
- return Promise.resolve(i).then(async (o) => {
2343
+ if (i.addIssue = i.addIssue.bind(i), s.type === "preprocess") {
2344
+ const r = s.transform(a.data, i);
2345
+ if (a.common.async)
2346
+ return Promise.resolve(r).then(async (o) => {
2572
2347
  if (t.value === "aborted")
2573
- return y;
2348
+ return _;
2574
2349
  const c = await this._def.schema._parseAsync({
2575
2350
  data: o,
2576
- path: s.path,
2577
- parent: s
2351
+ path: a.path,
2352
+ parent: a
2578
2353
  });
2579
- return c.status === "aborted" ? y : c.status === "dirty" || t.value === "dirty" ? Ze(c.value) : c;
2354
+ return c.status === "aborted" ? _ : c.status === "dirty" || t.value === "dirty" ? ie(c.value) : c;
2580
2355
  });
2581
2356
  {
2582
2357
  if (t.value === "aborted")
2583
- return y;
2358
+ return _;
2584
2359
  const o = this._def.schema._parseSync({
2585
- data: i,
2586
- path: s.path,
2587
- parent: s
2360
+ data: r,
2361
+ path: a.path,
2362
+ parent: a
2588
2363
  });
2589
- return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ? Ze(o.value) : o;
2364
+ return o.status === "aborted" ? _ : o.status === "dirty" || t.value === "dirty" ? ie(o.value) : o;
2590
2365
  }
2591
2366
  }
2592
- if (n.type === "refinement") {
2593
- const i = (o) => {
2594
- const c = n.refinement(o, r);
2595
- if (s.common.async)
2367
+ if (s.type === "refinement") {
2368
+ const r = (o) => {
2369
+ const c = s.refinement(o, i);
2370
+ if (a.common.async)
2596
2371
  return Promise.resolve(c);
2597
2372
  if (c instanceof Promise)
2598
2373
  throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
2599
2374
  return o;
2600
2375
  };
2601
- if (s.common.async === !1) {
2376
+ if (a.common.async === !1) {
2602
2377
  const o = this._def.schema._parseSync({
2603
- data: s.data,
2604
- path: s.path,
2605
- parent: s
2378
+ data: a.data,
2379
+ path: a.path,
2380
+ parent: a
2606
2381
  });
2607
- return o.status === "aborted" ? y : (o.status === "dirty" && t.dirty(), i(o.value), { status: t.value, value: o.value });
2382
+ return o.status === "aborted" ? _ : (o.status === "dirty" && t.dirty(), r(o.value), { status: t.value, value: o.value });
2608
2383
  } else
2609
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => o.status === "aborted" ? y : (o.status === "dirty" && t.dirty(), i(o.value).then(() => ({ status: t.value, value: o.value }))));
2384
+ return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((o) => o.status === "aborted" ? _ : (o.status === "dirty" && t.dirty(), r(o.value).then(() => ({ status: t.value, value: o.value }))));
2610
2385
  }
2611
- if (n.type === "transform")
2612
- if (s.common.async === !1) {
2613
- const i = this._def.schema._parseSync({
2614
- data: s.data,
2615
- path: s.path,
2616
- parent: s
2386
+ if (s.type === "transform")
2387
+ if (a.common.async === !1) {
2388
+ const r = this._def.schema._parseSync({
2389
+ data: a.data,
2390
+ path: a.path,
2391
+ parent: a
2617
2392
  });
2618
- if (!q(i))
2619
- return i;
2620
- const o = n.transform(i.value, r);
2393
+ if (!L(r))
2394
+ return _;
2395
+ const o = s.transform(r.value, i);
2621
2396
  if (o instanceof Promise)
2622
2397
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2623
2398
  return { status: t.value, value: o };
2624
2399
  } else
2625
- return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((i) => q(i) ? Promise.resolve(n.transform(i.value, r)).then((o) => ({ status: t.value, value: o })) : i);
2626
- w.assertNever(n);
2400
+ return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((r) => L(r) ? Promise.resolve(s.transform(r.value, i)).then((o) => ({
2401
+ status: t.value,
2402
+ value: o
2403
+ })) : _);
2404
+ b.assertNever(s);
2627
2405
  }
2628
- };
2629
- A.create = (a, e, t) => new A({
2630
- schema: a,
2631
- typeName: m.ZodEffects,
2406
+ }
2407
+ D.create = (n, e, t) => new D({
2408
+ schema: n,
2409
+ typeName: f.ZodEffects,
2632
2410
  effect: e,
2633
- ..._(t)
2411
+ ...y(t)
2634
2412
  });
2635
- A.createWithPreprocess = (a, e, t) => new A({
2413
+ D.createWithPreprocess = (n, e, t) => new D({
2636
2414
  schema: e,
2637
- effect: { type: "preprocess", transform: a },
2638
- typeName: m.ZodEffects,
2639
- ..._(t)
2415
+ effect: { type: "preprocess", transform: n },
2416
+ typeName: f.ZodEffects,
2417
+ ...y(t)
2640
2418
  });
2641
- let E = class extends v {
2419
+ let I = class extends v {
2642
2420
  _parse(e) {
2643
- return this._getType(e) === h.undefined ? x(void 0) : this._def.innerType._parse(e);
2421
+ return this._getType(e) === l.undefined ? x(void 0) : this._def.innerType._parse(e);
2644
2422
  }
2645
2423
  unwrap() {
2646
2424
  return this._def.innerType;
2647
2425
  }
2648
2426
  };
2649
- E.create = (a, e) => new E({
2650
- innerType: a,
2651
- typeName: m.ZodOptional,
2652
- ..._(e)
2427
+ I.create = (n, e) => new I({
2428
+ innerType: n,
2429
+ typeName: f.ZodOptional,
2430
+ ...y(e)
2653
2431
  });
2654
- let M = class extends v {
2432
+ let V = class extends v {
2655
2433
  _parse(e) {
2656
- return this._getType(e) === h.null ? x(null) : this._def.innerType._parse(e);
2434
+ return this._getType(e) === l.null ? x(null) : this._def.innerType._parse(e);
2657
2435
  }
2658
2436
  unwrap() {
2659
2437
  return this._def.innerType;
2660
2438
  }
2661
2439
  };
2662
- M.create = (a, e) => new M({
2663
- innerType: a,
2664
- typeName: m.ZodNullable,
2665
- ..._(e)
2440
+ V.create = (n, e) => new V({
2441
+ innerType: n,
2442
+ typeName: f.ZodNullable,
2443
+ ...y(e)
2666
2444
  });
2667
- class ue extends v {
2445
+ class he extends v {
2668
2446
  _parse(e) {
2669
2447
  const { ctx: t } = this._processInputParams(e);
2670
- let s = t.data;
2671
- return t.parsedType === h.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({
2672
- data: s,
2448
+ let a = t.data;
2449
+ return t.parsedType === l.undefined && (a = this._def.defaultValue()), this._def.innerType._parse({
2450
+ data: a,
2673
2451
  path: t.path,
2674
2452
  parent: t
2675
2453
  });
@@ -2678,42 +2456,42 @@ class ue extends v {
2678
2456
  return this._def.innerType;
2679
2457
  }
2680
2458
  }
2681
- ue.create = (a, e) => new ue({
2682
- innerType: a,
2683
- typeName: m.ZodDefault,
2459
+ he.create = (n, e) => new he({
2460
+ innerType: n,
2461
+ typeName: f.ZodDefault,
2684
2462
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2685
- ..._(e)
2463
+ ...y(e)
2686
2464
  });
2687
- class le extends v {
2465
+ class pe extends v {
2688
2466
  _parse(e) {
2689
- const { ctx: t } = this._processInputParams(e), s = {
2467
+ const { ctx: t } = this._processInputParams(e), a = {
2690
2468
  ...t,
2691
2469
  common: {
2692
2470
  ...t.common,
2693
2471
  issues: []
2694
2472
  }
2695
- }, n = this._def.innerType._parse({
2696
- data: s.data,
2697
- path: s.path,
2473
+ }, s = this._def.innerType._parse({
2474
+ data: a.data,
2475
+ path: a.path,
2698
2476
  parent: {
2699
- ...s
2477
+ ...a
2700
2478
  }
2701
2479
  });
2702
- return G(n) ? n.then((r) => ({
2480
+ return X(s) ? s.then((i) => ({
2703
2481
  status: "valid",
2704
- value: r.status === "valid" ? r.value : this._def.catchValue({
2482
+ value: i.status === "valid" ? i.value : this._def.catchValue({
2705
2483
  get error() {
2706
- return new O(s.common.issues);
2484
+ return new C(a.common.issues);
2707
2485
  },
2708
- input: s.data
2486
+ input: a.data
2709
2487
  })
2710
2488
  })) : {
2711
2489
  status: "valid",
2712
- value: n.status === "valid" ? n.value : this._def.catchValue({
2490
+ value: s.status === "valid" ? s.value : this._def.catchValue({
2713
2491
  get error() {
2714
- return new O(s.common.issues);
2492
+ return new C(a.common.issues);
2715
2493
  },
2716
- input: s.data
2494
+ input: a.data
2717
2495
  })
2718
2496
  };
2719
2497
  }
@@ -2721,35 +2499,34 @@ class le extends v {
2721
2499
  return this._def.innerType;
2722
2500
  }
2723
2501
  }
2724
- le.create = (a, e) => new le({
2725
- innerType: a,
2726
- typeName: m.ZodCatch,
2502
+ pe.create = (n, e) => new pe({
2503
+ innerType: n,
2504
+ typeName: f.ZodCatch,
2727
2505
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2728
- ..._(e)
2506
+ ...y(e)
2729
2507
  });
2730
- class Oe extends v {
2508
+ class Ee extends v {
2731
2509
  _parse(e) {
2732
- if (this._getType(e) !== h.nan) {
2510
+ if (this._getType(e) !== l.nan) {
2733
2511
  const t = this._getOrReturnCtx(e);
2734
- return l(t, {
2512
+ return u(t, {
2735
2513
  code: d.invalid_type,
2736
- expected: h.nan,
2514
+ expected: l.nan,
2737
2515
  received: t.parsedType
2738
- }), y;
2516
+ }), _;
2739
2517
  }
2740
2518
  return { status: "valid", value: e.data };
2741
2519
  }
2742
2520
  }
2743
- Oe.create = (a) => new Oe({
2744
- typeName: m.ZodNaN,
2745
- ..._(a)
2521
+ Ee.create = (n) => new Ee({
2522
+ typeName: f.ZodNaN,
2523
+ ...y(n)
2746
2524
  });
2747
- const At = Symbol("zod_brand");
2748
- class qe extends v {
2525
+ class ut extends v {
2749
2526
  _parse(e) {
2750
- const { ctx: t } = this._processInputParams(e), s = t.data;
2527
+ const { ctx: t } = this._processInputParams(e), a = t.data;
2751
2528
  return this._def.type._parse({
2752
- data: s,
2529
+ data: a,
2753
2530
  path: t.path,
2754
2531
  parent: t
2755
2532
  });
@@ -2758,221 +2535,80 @@ class qe extends v {
2758
2535
  return this._def.type;
2759
2536
  }
2760
2537
  }
2761
- class fe extends v {
2538
+ class _e extends v {
2762
2539
  _parse(e) {
2763
- const { status: t, ctx: s } = this._processInputParams(e);
2764
- if (s.common.async)
2540
+ const { status: t, ctx: a } = this._processInputParams(e);
2541
+ if (a.common.async)
2765
2542
  return (async () => {
2766
- const n = await this._def.in._parseAsync({
2767
- data: s.data,
2768
- path: s.path,
2769
- parent: s
2543
+ const s = await this._def.in._parseAsync({
2544
+ data: a.data,
2545
+ path: a.path,
2546
+ parent: a
2770
2547
  });
2771
- return n.status === "aborted" ? y : n.status === "dirty" ? (t.dirty(), Ze(n.value)) : this._def.out._parseAsync({
2772
- data: n.value,
2773
- path: s.path,
2774
- parent: s
2548
+ return s.status === "aborted" ? _ : s.status === "dirty" ? (t.dirty(), ie(s.value)) : this._def.out._parseAsync({
2549
+ data: s.value,
2550
+ path: a.path,
2551
+ parent: a
2775
2552
  });
2776
2553
  })();
2777
2554
  {
2778
- const n = this._def.in._parseSync({
2779
- data: s.data,
2780
- path: s.path,
2781
- parent: s
2555
+ const s = this._def.in._parseSync({
2556
+ data: a.data,
2557
+ path: a.path,
2558
+ parent: a
2782
2559
  });
2783
- return n.status === "aborted" ? y : n.status === "dirty" ? (t.dirty(), {
2560
+ return s.status === "aborted" ? _ : s.status === "dirty" ? (t.dirty(), {
2784
2561
  status: "dirty",
2785
- value: n.value
2562
+ value: s.value
2786
2563
  }) : this._def.out._parseSync({
2787
- data: n.value,
2788
- path: s.path,
2789
- parent: s
2564
+ data: s.value,
2565
+ path: a.path,
2566
+ parent: a
2790
2567
  });
2791
2568
  }
2792
2569
  }
2793
2570
  static create(e, t) {
2794
- return new fe({
2571
+ return new _e({
2795
2572
  in: e,
2796
2573
  out: t,
2797
- typeName: m.ZodPipeline
2574
+ typeName: f.ZodPipeline
2798
2575
  });
2799
2576
  }
2800
2577
  }
2801
- class he extends v {
2578
+ class fe extends v {
2802
2579
  _parse(e) {
2803
- const t = this._def.innerType._parse(e), s = (n) => (q(n) && (n.value = Object.freeze(n.value)), n);
2804
- return G(t) ? t.then((n) => s(n)) : s(t);
2580
+ const t = this._def.innerType._parse(e), a = (s) => (L(s) && (s.value = Object.freeze(s.value)), s);
2581
+ return X(t) ? t.then((s) => a(s)) : a(t);
2805
2582
  }
2806
2583
  unwrap() {
2807
2584
  return this._def.innerType;
2808
2585
  }
2809
2586
  }
2810
- he.create = (a, e) => new he({
2811
- innerType: a,
2812
- typeName: m.ZodReadonly,
2813
- ..._(e)
2814
- });
2815
- function Ve(a, e) {
2816
- const t = typeof a == "function" ? a(e) : typeof a == "string" ? { message: a } : a;
2817
- return typeof t == "string" ? { message: t } : t;
2818
- }
2819
- function st(a, e = {}, t) {
2820
- return a ? K.create().superRefine((s, n) => {
2821
- var r, i;
2822
- const o = a(s);
2823
- if (o instanceof Promise)
2824
- return o.then((c) => {
2825
- var u, f;
2826
- if (!c) {
2827
- const b = Ve(e, s), Z = (f = (u = b.fatal) !== null && u !== void 0 ? u : t) !== null && f !== void 0 ? f : !0;
2828
- n.addIssue({ code: "custom", ...b, fatal: Z });
2829
- }
2830
- });
2831
- if (!o) {
2832
- const c = Ve(e, s), u = (i = (r = c.fatal) !== null && r !== void 0 ? r : t) !== null && i !== void 0 ? i : !0;
2833
- n.addIssue({ code: "custom", ...c, fatal: u });
2834
- }
2835
- }) : K.create();
2836
- }
2837
- const Et = {
2838
- object: T.lazycreate
2839
- };
2840
- var m;
2841
- (function(a) {
2842
- a.ZodString = "ZodString", a.ZodNumber = "ZodNumber", a.ZodNaN = "ZodNaN", a.ZodBigInt = "ZodBigInt", a.ZodBoolean = "ZodBoolean", a.ZodDate = "ZodDate", a.ZodSymbol = "ZodSymbol", a.ZodUndefined = "ZodUndefined", a.ZodNull = "ZodNull", a.ZodAny = "ZodAny", a.ZodUnknown = "ZodUnknown", a.ZodNever = "ZodNever", a.ZodVoid = "ZodVoid", a.ZodArray = "ZodArray", a.ZodObject = "ZodObject", a.ZodUnion = "ZodUnion", a.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", a.ZodIntersection = "ZodIntersection", a.ZodTuple = "ZodTuple", a.ZodRecord = "ZodRecord", a.ZodMap = "ZodMap", a.ZodSet = "ZodSet", a.ZodFunction = "ZodFunction", a.ZodLazy = "ZodLazy", a.ZodLiteral = "ZodLiteral", a.ZodEnum = "ZodEnum", a.ZodEffects = "ZodEffects", a.ZodNativeEnum = "ZodNativeEnum", a.ZodOptional = "ZodOptional", a.ZodNullable = "ZodNullable", a.ZodDefault = "ZodDefault", a.ZodCatch = "ZodCatch", a.ZodPromise = "ZodPromise", a.ZodBranded = "ZodBranded", a.ZodPipeline = "ZodPipeline", a.ZodReadonly = "ZodReadonly";
2843
- })(m || (m = {}));
2844
- const It = (a, e = {
2845
- message: `Input not instance of ${a.name}`
2846
- }) => st((t) => t instanceof a, e), at = C.create, nt = X.create, jt = Oe.create, $t = Q.create, it = ee.create, Pt = te.create, Rt = Te.create, Mt = se.create, Ft = ae.create, Dt = K.create, Lt = L.create, qt = $.create, zt = Ne.create, Vt = z.create, Bt = T.create, Ut = T.strictCreate, Ht = ne.create, Kt = Ae.create, Wt = ie.create, Jt = R.create, Yt = re.create, Gt = Ce.create, Xt = V.create, Qt = et.create, es = oe.create, ts = ce.create, ss = pe.create, as = de.create, ns = W.create, Be = A.create, is = E.create, rs = M.create, os = A.createWithPreprocess, cs = fe.create, ds = () => at().optional(), us = () => nt().optional(), ls = () => it().optional(), hs = {
2847
- string: (a) => C.create({ ...a, coerce: !0 }),
2848
- number: (a) => X.create({ ...a, coerce: !0 }),
2849
- boolean: (a) => ee.create({
2850
- ...a,
2851
- coerce: !0
2852
- }),
2853
- bigint: (a) => Q.create({ ...a, coerce: !0 }),
2854
- date: (a) => te.create({ ...a, coerce: !0 })
2855
- }, ps = y;
2856
- var me = /* @__PURE__ */ Object.freeze({
2857
- __proto__: null,
2858
- defaultErrorMap: H,
2859
- setErrorMap: ot,
2860
- getErrorMap: ke,
2861
- makeIssue: xe,
2862
- EMPTY_PATH: ct,
2863
- addIssueToContext: l,
2864
- ParseStatus: S,
2865
- INVALID: y,
2866
- DIRTY: Ze,
2867
- OK: x,
2868
- isAborted: Pe,
2869
- isDirty: Re,
2870
- isValid: q,
2871
- isAsync: G,
2872
- get util() {
2873
- return w;
2874
- },
2875
- get objectUtil() {
2876
- return $e;
2877
- },
2878
- ZodParsedType: h,
2879
- getParsedType: j,
2880
- ZodType: v,
2881
- datetimeRegex: Ge,
2882
- ZodString: C,
2883
- ZodNumber: X,
2884
- ZodBigInt: Q,
2885
- ZodBoolean: ee,
2886
- ZodDate: te,
2887
- ZodSymbol: Te,
2888
- ZodUndefined: se,
2889
- ZodNull: ae,
2890
- ZodAny: K,
2891
- ZodUnknown: L,
2892
- ZodNever: $,
2893
- ZodVoid: Ne,
2894
- ZodArray: z,
2895
- ZodObject: T,
2896
- ZodUnion: ne,
2897
- ZodDiscriminatedUnion: Ae,
2898
- ZodIntersection: ie,
2899
- ZodTuple: R,
2900
- ZodRecord: re,
2901
- ZodMap: Ce,
2902
- ZodSet: V,
2903
- ZodFunction: et,
2904
- ZodLazy: oe,
2905
- ZodLiteral: ce,
2906
- ZodEnum: pe,
2907
- ZodNativeEnum: de,
2908
- ZodPromise: W,
2909
- ZodEffects: A,
2910
- ZodTransformer: A,
2911
- ZodOptional: E,
2912
- ZodNullable: M,
2913
- ZodDefault: ue,
2914
- ZodCatch: le,
2915
- ZodNaN: Oe,
2916
- BRAND: At,
2917
- ZodBranded: qe,
2918
- ZodPipeline: fe,
2919
- ZodReadonly: he,
2920
- custom: st,
2921
- Schema: v,
2922
- ZodSchema: v,
2923
- late: Et,
2924
- get ZodFirstPartyTypeKind() {
2925
- return m;
2926
- },
2927
- coerce: hs,
2928
- any: Dt,
2929
- array: Vt,
2930
- bigint: $t,
2931
- boolean: it,
2932
- date: Pt,
2933
- discriminatedUnion: Kt,
2934
- effect: Be,
2935
- enum: ss,
2936
- function: Qt,
2937
- instanceof: It,
2938
- intersection: Wt,
2939
- lazy: es,
2940
- literal: ts,
2941
- map: Gt,
2942
- nan: jt,
2943
- nativeEnum: as,
2944
- never: qt,
2945
- null: Ft,
2946
- nullable: rs,
2947
- number: nt,
2948
- object: Bt,
2949
- oboolean: ls,
2950
- onumber: us,
2951
- optional: is,
2952
- ostring: ds,
2953
- pipeline: cs,
2954
- preprocess: os,
2955
- promise: ns,
2956
- record: Yt,
2957
- set: Xt,
2958
- strictObject: Ut,
2959
- string: at,
2960
- symbol: Rt,
2961
- transformer: Be,
2962
- tuple: Jt,
2963
- undefined: Mt,
2964
- union: Ht,
2965
- unknown: Lt,
2966
- void: zt,
2967
- NEVER: ps,
2968
- ZodIssueCode: d,
2969
- quotelessJson: rt,
2970
- ZodError: O
2587
+ fe.create = (n, e) => new fe({
2588
+ innerType: n,
2589
+ typeName: f.ZodReadonly,
2590
+ ...y(e)
2971
2591
  });
2972
- const fs = "1.6.1", ms = {
2973
- version: fs
2592
+ var f;
2593
+ (function(n) {
2594
+ n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
2595
+ })(f || (f = {}));
2596
+ const lt = A.create, ht = ce.create;
2597
+ E.create;
2598
+ q.create;
2599
+ const pt = T.create;
2600
+ Q.create;
2601
+ ee.create;
2602
+ R.create;
2603
+ const ft = ue.create;
2604
+ me.create;
2605
+ te.create;
2606
+ I.create;
2607
+ V.create;
2608
+ const mt = "1.7.1", _t = {
2609
+ version: mt
2974
2610
  };
2975
- class ys {
2611
+ class gt {
2976
2612
  constructor(e) {
2977
2613
  this._client = e;
2978
2614
  }
@@ -2991,7 +2627,7 @@ class ys {
2991
2627
  return e.account;
2992
2628
  }
2993
2629
  }
2994
- class gs {
2630
+ class yt {
2995
2631
  constructor(e) {
2996
2632
  this._client = e;
2997
2633
  }
@@ -3088,7 +2724,7 @@ class gs {
3088
2724
  this._client._messageInterceptors.set(e, t);
3089
2725
  }
3090
2726
  }
3091
- class _s {
2727
+ class vt {
3092
2728
  constructor(e) {
3093
2729
  this._client = e;
3094
2730
  }
@@ -3112,26 +2748,21 @@ class _s {
3112
2748
  return e.deviceInformation;
3113
2749
  }
3114
2750
  }
3115
- function vs(a, e = console.error) {
3116
- a().catch(e);
3117
- }
3118
- class ws {
2751
+ class bt {
3119
2752
  constructor(e) {
3120
2753
  this._client = e;
3121
2754
  }
3122
2755
  async getColorScheme() {
3123
2756
  return (await this._client.request("environment.getColorScheme", {})).colorScheme;
3124
2757
  }
3125
- subscribeColorScheme(e) {
3126
- vs(async () => {
3127
- this._client.on("environment.colorSchemeChanged", e), e(await this.getColorScheme());
3128
- });
2758
+ async subscribeColorScheme(e) {
2759
+ return (await this._client.subscribe("environment.subscribeColorScheme", {}, e)).success;
3129
2760
  }
3130
- unsubscribeColorScheme(e) {
3131
- this._client.off("environment.colorSchemeChanged", e);
2761
+ async unsubscribeColorScheme(e) {
2762
+ return (await this._client.unsubscribe("environment.unsubscribeColorScheme", {}, e)).success;
3132
2763
  }
3133
2764
  }
3134
- class bs {
2765
+ class wt {
3135
2766
  constructor(e) {
3136
2767
  this._client = e;
3137
2768
  }
@@ -3177,14 +2808,14 @@ class bs {
3177
2808
  })).content;
3178
2809
  }
3179
2810
  }
3180
- class ks {
2811
+ class kt {
3181
2812
  constructor(e) {
3182
2813
  this._client = e;
3183
2814
  }
3184
2815
  async fetch(e, t) {
3185
- var s;
3186
- let n;
3187
- typeof e == "string" ? n = e : e instanceof URL ? n = e.toString() : (n = e.url, t || (t = {
2816
+ var a;
2817
+ let s;
2818
+ typeof e == "string" ? s = e : e instanceof URL ? s = e.toString() : (s = e.url, t || (t = {
3188
2819
  method: e.method,
3189
2820
  headers: e.headers,
3190
2821
  body: e.body,
@@ -3194,39 +2825,39 @@ class ks {
3194
2825
  referrer: e.referrer,
3195
2826
  integrity: e.integrity
3196
2827
  }));
3197
- let r = {};
3198
- t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((f, b) => {
3199
- r[b] = f;
3200
- }) : Array.isArray(t.headers) ? t.headers.forEach(([f, b]) => {
3201
- r[f] = b;
3202
- }) : r = t.headers);
3203
- const i = await this._client.request("proxy.fetch", {
3204
- url: n,
2828
+ let i = {};
2829
+ t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((m, w) => {
2830
+ i[w] = m;
2831
+ }) : Array.isArray(t.headers) ? t.headers.forEach(([m, w]) => {
2832
+ i[m] = w;
2833
+ }) : i = t.headers);
2834
+ const r = await this._client.request("proxy.fetch", {
2835
+ url: s,
3205
2836
  method: (t == null ? void 0 : t.method) || "GET",
3206
- headers: r,
3207
- body: (s = t == null ? void 0 : t.body) !== null && s !== void 0 ? s : null
2837
+ headers: i,
2838
+ body: (a = t == null ? void 0 : t.body) !== null && a !== void 0 ? a : null
3208
2839
  });
3209
- if (!i.success)
3210
- throw new TypeError(i.errorMessage, {
3211
- cause: i.errorCause ? Error(i.errorCause) : void 0
2840
+ if (!r.success)
2841
+ throw new TypeError(r.errorMessage, {
2842
+ cause: r.errorCause ? Error(r.errorCause) : void 0
3212
2843
  });
3213
- const o = new Headers(i.headers), c = {
3214
- status: i.status,
3215
- statusText: i.statusText,
2844
+ const o = new Headers(r.headers), c = {
2845
+ status: r.status,
2846
+ statusText: r.statusText,
3216
2847
  headers: o
3217
2848
  };
3218
- let u = null;
3219
- if (i.body !== null && i.body !== void 0)
3220
- if (i.bodyType === "binary") {
3221
- const f = atob(i.body), b = new Uint8Array(f.length);
3222
- for (let Z = 0; Z < f.length; Z++)
3223
- b[Z] = f.charCodeAt(Z);
3224
- u = b;
3225
- } else i.bodyType === "text" ? u = i.body : i.bodyType === "json" && (u = JSON.stringify(i.body));
3226
- return new Response(u, c);
3227
- }
3228
- }
3229
- class xs {
2849
+ let h = null;
2850
+ if (r.body !== null && r.body !== void 0)
2851
+ if (r.bodyType === "binary") {
2852
+ const m = atob(r.body), w = new Uint8Array(m.length);
2853
+ for (let Z = 0; Z < m.length; Z++)
2854
+ w[Z] = m.charCodeAt(Z);
2855
+ h = w;
2856
+ } else r.bodyType === "text" ? h = r.body : r.bodyType === "json" && (h = JSON.stringify(r.body));
2857
+ return new Response(h, c);
2858
+ }
2859
+ }
2860
+ class xt {
3230
2861
  constructor(e) {
3231
2862
  this._client = e;
3232
2863
  }
@@ -3240,7 +2871,7 @@ class xs {
3240
2871
  * @returns A StoreSlice instance for the application scope
3241
2872
  */
3242
2873
  get application() {
3243
- return new ye("application", "", this._client);
2874
+ return new K("application", "", this._client);
3244
2875
  }
3245
2876
  /**
3246
2877
  * Provides access to the instance store scope.
@@ -3254,7 +2885,7 @@ class xs {
3254
2885
  * @returns A StoreSlice instance for the instance scope
3255
2886
  */
3256
2887
  get instance() {
3257
- return new ye("instance", this._client.applicationInstance, this._client);
2888
+ return new K("instance", this._client.applicationInstance, this._client);
3258
2889
  }
3259
2890
  /**
3260
2891
  * Provides access to the device store scope.
@@ -3269,7 +2900,7 @@ class xs {
3269
2900
  * @returns A StoreSlice instance for the device scope
3270
2901
  */
3271
2902
  get device() {
3272
- return new ye("device", this._client.applicationInstance, this._client);
2903
+ return new K("device", this._client.applicationInstance, this._client);
3273
2904
  }
3274
2905
  /**
3275
2906
  * Provides access to the shared store scope with a specified namespace.
@@ -3285,12 +2916,12 @@ class xs {
3285
2916
  * @returns A StoreSlice instance for the specified shared namespace
3286
2917
  */
3287
2918
  shared(e) {
3288
- return new ye("shared", e, this._client);
2919
+ return new K("shared", e, this._client);
3289
2920
  }
3290
2921
  }
3291
- class ye {
3292
- constructor(e, t, s) {
3293
- this._kind = e, this._namespace = t, this._client = s;
2922
+ class K {
2923
+ constructor(e, t, a) {
2924
+ this._kind = e, this._namespace = t, this._client = a;
3294
2925
  }
3295
2926
  /**
3296
2927
  * Saves a value in the store.
@@ -3382,7 +3013,7 @@ class ye {
3382
3013
  })).success;
3383
3014
  }
3384
3015
  }
3385
- class Zs {
3016
+ class St {
3386
3017
  constructor(e) {
3387
3018
  this._client = e;
3388
3019
  }
@@ -3405,7 +3036,7 @@ class Zs {
3405
3036
  return e.user;
3406
3037
  }
3407
3038
  }
3408
- class Ss {
3039
+ class Nt {
3409
3040
  constructor(e) {
3410
3041
  this._client = e;
3411
3042
  }
@@ -3481,15 +3112,15 @@ class Ss {
3481
3112
  return t.forecast;
3482
3113
  }
3483
3114
  }
3484
- function ge(a) {
3485
- return { ...a, type: "client" };
3115
+ function W(n) {
3116
+ return { ...n, type: "client" };
3486
3117
  }
3487
- const Ts = me.object({
3488
- type: me.literal("bridge"),
3489
- name: me.string(),
3490
- data: me.any()
3118
+ const Ct = pt({
3119
+ type: ft("bridge"),
3120
+ name: lt(),
3121
+ data: ht()
3491
3122
  });
3492
- class Ns {
3123
+ class Tt {
3493
3124
  /**
3494
3125
  * Creates a new RootSettingsNavigation API instance.
3495
3126
  *
@@ -3513,11 +3144,11 @@ class Ns {
3513
3144
  */
3514
3145
  async setRootSettingsNavigation(e) {
3515
3146
  var t;
3516
- const s = this._store.shared("root-settings-navigation"), n = (t = await s.get("navigation")) !== null && t !== void 0 ? t : {}, r = this._store._client._applicationSpecifier;
3517
- n[r] = {
3518
- applicationSpecifier: r,
3147
+ const a = this._store.shared("root-settings-navigation"), s = (t = await a.get("navigation")) !== null && t !== void 0 ? t : {}, i = this._store._client._applicationSpecifier;
3148
+ s[i] = {
3149
+ applicationSpecifier: i,
3519
3150
  entries: e.entries
3520
- }, s.set("navigation", n);
3151
+ }, a.set("navigation", s);
3521
3152
  }
3522
3153
  /**
3523
3154
  * Retrieves the current navigation entries for this root application.
@@ -3529,8 +3160,8 @@ class Ns {
3529
3160
  */
3530
3161
  async getRootSettingsNavigation() {
3531
3162
  var e;
3532
- const t = (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {}, s = this._store._client._applicationSpecifier;
3533
- return t[s];
3163
+ const t = (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {}, a = this._store._client._applicationSpecifier;
3164
+ return t[a];
3534
3165
  }
3535
3166
  /**
3536
3167
  * Retrieves the navigation entries for all root applications.
@@ -3546,8 +3177,11 @@ class Ns {
3546
3177
  return (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {};
3547
3178
  }
3548
3179
  }
3549
- const B = 1e3 * 30;
3550
- class Cs {
3180
+ const F = 1e3 * 30, ge = typeof window > "u" && typeof self < "u", B = ge ? self : window;
3181
+ function z(n) {
3182
+ ge ? self.postMessage(n) : B.parent.postMessage(n, "*");
3183
+ }
3184
+ class Zt {
3551
3185
  /**
3552
3186
  * Creates a new Client instance for communicating with the TelemetryOS platform.
3553
3187
  *
@@ -3573,7 +3207,7 @@ class Cs {
3573
3207
  * @returns An Accounts instance bound to this client
3574
3208
  */
3575
3209
  get accounts() {
3576
- return new ys(this);
3210
+ return new gt(this);
3577
3211
  }
3578
3212
  /**
3579
3213
  * Provides access to the users API for retrieving TelemetryOS user information.
@@ -3587,7 +3221,7 @@ class Cs {
3587
3221
  * @returns A Users instance bound to this client
3588
3222
  */
3589
3223
  get users() {
3590
- return new Zs(this);
3224
+ return new St(this);
3591
3225
  }
3592
3226
  /**
3593
3227
  * Provides access to the store API for data persistence with multiple storage scopes.
@@ -3601,7 +3235,7 @@ class Cs {
3601
3235
  * @returns A Store instance bound to this client
3602
3236
  */
3603
3237
  get store() {
3604
- return new xs(this);
3238
+ return new xt(this);
3605
3239
  }
3606
3240
  /**
3607
3241
  * Provides access to the applications API for discovering other TelemetryOS applications.
@@ -3615,7 +3249,7 @@ class Cs {
3615
3249
  * @returns An Applications instance bound to this client
3616
3250
  */
3617
3251
  get applications() {
3618
- return new gs(this);
3252
+ return new yt(this);
3619
3253
  }
3620
3254
  /**
3621
3255
  * Provides access to the media API for working with content hosted on the TelemetryOS platform.
@@ -3630,7 +3264,7 @@ class Cs {
3630
3264
  * @returns A Media instance bound to this client
3631
3265
  */
3632
3266
  get media() {
3633
- return new bs(this);
3267
+ return new wt(this);
3634
3268
  }
3635
3269
  /**
3636
3270
  * Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
@@ -3644,7 +3278,7 @@ class Cs {
3644
3278
  * @returns A Proxy instance bound to this client
3645
3279
  */
3646
3280
  get proxy() {
3647
- return new ks(this);
3281
+ return new kt(this);
3648
3282
  }
3649
3283
  /**
3650
3284
  * Provides access to the devices API for interacting with the current device.
@@ -3659,7 +3293,7 @@ class Cs {
3659
3293
  * @returns A Devices instance bound to this client
3660
3294
  */
3661
3295
  get devices() {
3662
- return new _s(this);
3296
+ return new vt(this);
3663
3297
  }
3664
3298
  /**
3665
3299
  * Provides access to the root settings navigation API for TelemetryOS administration UI integration.
@@ -3677,7 +3311,7 @@ class Cs {
3677
3311
  * @throws {Error} If used by an application not mounted at the 'rootSettingsNavigation' mount point
3678
3312
  */
3679
3313
  get rootSettingsNavigation() {
3680
- return new Ns(this.store);
3314
+ return new Tt(this.store);
3681
3315
  }
3682
3316
  /**
3683
3317
  * Provides access to the weather API for retrieving weather data.
@@ -3691,7 +3325,7 @@ class Cs {
3691
3325
  * @returns A Weather instance bound to this client
3692
3326
  */
3693
3327
  get weather() {
3694
- return new Ss(this);
3328
+ return new Nt(this);
3695
3329
  }
3696
3330
  /**
3697
3331
  * Provides access to the environment API for accessing environment settings.
@@ -3705,7 +3339,7 @@ class Cs {
3705
3339
  * @returns An Environment instance bound to this client
3706
3340
  */
3707
3341
  get environment() {
3708
- return new ws(this);
3342
+ return new bt(this);
3709
3343
  }
3710
3344
  get applicationName() {
3711
3345
  return this._applicationName;
@@ -3732,46 +3366,47 @@ class Cs {
3732
3366
  * of creating and binding their own Client instances.
3733
3367
  */
3734
3368
  bind() {
3735
- var e, t, s;
3736
- const n = new URL(window.location.href), r = n.searchParams;
3737
- if (this._applicationInstance = (e = r.get("applicationInstance")) !== null && e !== void 0 ? e : "", !this._applicationInstance)
3369
+ var e, t, a;
3370
+ const s = new URL(B.location.href), i = s.searchParams;
3371
+ if (this._applicationInstance = (e = i.get("applicationInstance")) !== null && e !== void 0 ? e : "", !this._applicationInstance)
3738
3372
  throw new Error("Missing applicationInstance query parameter");
3739
- if (this._applicationSpecifier = (t = r.get("applicationSpecifier")) !== null && t !== void 0 ? t : "", !this._applicationSpecifier) {
3740
- const i = n.hostname.split(".");
3741
- this._applicationSpecifier = (s = i[0]) !== null && s !== void 0 ? s : "";
3373
+ if (this._applicationSpecifier = (t = i.get("applicationSpecifier")) !== null && t !== void 0 ? t : "", !this._applicationSpecifier) {
3374
+ const r = s.hostname.split(".");
3375
+ this._applicationSpecifier = (a = r[0]) !== null && a !== void 0 ? a : "";
3742
3376
  }
3743
3377
  if (!this._applicationSpecifier || this._applicationSpecifier.length !== 40)
3744
3378
  throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);
3745
- this._windowMessageHandler = (i) => {
3746
- if (i.source === window || !i.data || !("type" in i.data) || i.data.type !== "client" && i.data.type !== "bridge")
3379
+ this._windowMessageHandler = (r) => {
3380
+ if (r.source === B || !r.data || !("type" in r.data) || r.data.type !== "client" && r.data.type !== "bridge")
3747
3381
  return;
3748
3382
  let o;
3749
- if (i.data.type === "client") {
3750
- const c = this._messageInterceptors.get(i.data.name);
3383
+ if (r.data.type === "client") {
3384
+ const c = this._messageInterceptors.get(r.data.name);
3751
3385
  if (!c) {
3752
- window.parent.postMessage(i.data, "*");
3386
+ z(r.data);
3753
3387
  return;
3754
3388
  }
3755
- o = { ...c(i.data.data), type: "bridge" };
3389
+ o = { ...c(r.data.data), type: "bridge" };
3756
3390
  }
3757
3391
  if (!o) {
3758
- const c = Ts.safeParse(i.data);
3392
+ const c = Ct.safeParse(r.data);
3759
3393
  if (!c.success)
3760
3394
  return;
3761
3395
  o = c.data;
3762
- const u = this._onHandlers.get(o.name), f = this._onceHandlers.get(o.name);
3763
- if (u)
3764
- for (const b of u)
3765
- b(o.data);
3766
- if (f) {
3767
- for (const b of f)
3768
- b(o.data);
3396
+ const h = this._onHandlers.get(o.name), m = this._onceHandlers.get(o.name);
3397
+ if (h)
3398
+ for (const w of h)
3399
+ w(o.data);
3400
+ if (m) {
3401
+ for (const w of m)
3402
+ w(o.data);
3769
3403
  this._onceHandlers.delete(o.name);
3770
3404
  }
3771
3405
  }
3772
- for (let c = 0; c < window.frames.length; c += 1)
3773
- window.frames[c].postMessage(o, "*");
3774
- }, window.addEventListener("message", this._windowMessageHandler);
3406
+ if (!ge)
3407
+ for (let c = 0; c < window.frames.length; c += 1)
3408
+ window.frames[c].postMessage(o, "*");
3409
+ }, B.addEventListener("message", this._windowMessageHandler);
3775
3410
  }
3776
3411
  /**
3777
3412
  * Removes the message event listener and cleans up resources.
@@ -3787,7 +3422,7 @@ class Cs {
3787
3422
  * of managing their own Client instances.
3788
3423
  */
3789
3424
  unbind() {
3790
- this._windowMessageHandler && window.removeEventListener("message", this._windowMessageHandler);
3425
+ this._windowMessageHandler && B.removeEventListener("message", this._windowMessageHandler);
3791
3426
  }
3792
3427
  /**
3793
3428
  * Sends a one-way message to the TelemetryOS platform.
@@ -3803,15 +3438,15 @@ class Cs {
3803
3438
  * @param data The data payload to include with the message
3804
3439
  */
3805
3440
  send(e, t) {
3806
- const s = ge({
3807
- telemetrySdkVersion: ve,
3441
+ const a = W({
3442
+ telemetrySdkVersion: G,
3808
3443
  applicationName: this._applicationName,
3809
3444
  applicationSpecifier: this._applicationSpecifier,
3810
3445
  applicationInstance: this._applicationInstance,
3811
3446
  name: e,
3812
3447
  data: t
3813
3448
  });
3814
- window.parent.postMessage(s, "*");
3449
+ z(a);
3815
3450
  }
3816
3451
  /**
3817
3452
  * Sends a message to the TelemetryOS platform and waits for a response.
@@ -3831,96 +3466,96 @@ class Cs {
3831
3466
  * @throws {Error} If the request times out
3832
3467
  */
3833
3468
  request(e, t) {
3834
- const s = _e(), n = ge({
3835
- telemetrySdkVersion: ve,
3469
+ const a = J(), s = W({
3470
+ telemetrySdkVersion: G,
3836
3471
  applicationName: this._applicationName,
3837
3472
  applicationSpecifier: this._applicationSpecifier,
3838
3473
  applicationInstance: this._applicationInstance,
3839
3474
  name: e,
3840
3475
  data: t,
3841
- responseName: s
3476
+ responseName: a
3842
3477
  });
3843
- window.parent.postMessage(n, "*");
3844
- let r = !1, i;
3845
- const o = new Promise((u, f) => {
3846
- const b = new Error(`${e} message request with response name of ${s} timed out after ${B}`);
3478
+ z(s);
3479
+ let i = !1, r;
3480
+ const o = new Promise((h, m) => {
3481
+ const w = new Error(`${e} message request with response name of ${a} timed out after ${F}`);
3847
3482
  setTimeout(() => {
3848
- r = !0, this.off(s, i), f(b);
3849
- }, B);
3850
- }), c = new Promise((u) => {
3851
- i = (f) => {
3852
- r || u(f);
3853
- }, this.once(s, u);
3483
+ i = !0, this.off(a, r), m(w);
3484
+ }, F);
3485
+ }), c = new Promise((h) => {
3486
+ r = (m) => {
3487
+ i || h(m);
3488
+ }, this.once(a, h);
3854
3489
  });
3855
3490
  return Promise.race([o, c]);
3856
3491
  }
3857
- async subscribe(e, t, s) {
3858
- let n, r;
3859
- typeof t == "function" ? r = t : (n = t, r = s);
3860
- const i = _e(), o = _e();
3492
+ async subscribe(e, t, a) {
3493
+ let s, i;
3494
+ typeof t == "function" ? i = t : (s = t, i = a);
3495
+ const r = J(), o = J();
3861
3496
  let c = this._subscriptionNamesBySubjectName.get(e);
3862
- c || (c = [], this._subscriptionNamesBySubjectName.set(e, c)), c.push(i), this._subscriptionNamesByHandler.set(r, i), this.on(i, r);
3863
- const u = ge({
3864
- telemetrySdkVersion: ve,
3497
+ c || (c = [], this._subscriptionNamesBySubjectName.set(e, c)), c.push(r), this._subscriptionNamesByHandler.set(i, r), this.on(r, i);
3498
+ const h = W({
3499
+ telemetrySdkVersion: G,
3865
3500
  applicationName: this._applicationName,
3866
3501
  applicationSpecifier: this._applicationSpecifier,
3867
3502
  applicationInstance: this._applicationInstance,
3868
3503
  name: e,
3869
- data: n,
3504
+ data: s,
3870
3505
  responseName: o,
3871
- subscriptionName: i
3506
+ subscriptionName: r
3872
3507
  });
3873
- window.parent.postMessage(u, "*");
3874
- let f = !1, b;
3875
- const Z = new Promise((F, D) => {
3876
- const Ie = new Error(`${e} subscribe request with subscription name of ${i} and response name of ${o} timed out after ${B}`);
3508
+ z(h);
3509
+ let m = !1, w;
3510
+ const Z = new Promise((j, P) => {
3511
+ const se = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${F}`);
3877
3512
  setTimeout(() => {
3878
- f = !0, this.off(o, b), D(Ie);
3879
- }, B);
3880
- }), Ee = new Promise((F) => {
3881
- b = (D) => {
3882
- f || F(D);
3883
- }, this.on(o, F);
3884
- });
3885
- return Promise.race([Z, Ee]);
3886
- }
3887
- async unsubscribe(e, t, s) {
3888
- let n, r;
3889
- typeof t == "function" ? r = t : (n = t, r = s);
3890
- const i = _e();
3513
+ m = !0, this.off(o, w), P(se);
3514
+ }, F);
3515
+ }), ae = new Promise((j) => {
3516
+ w = (P) => {
3517
+ m || j(P);
3518
+ }, this.on(o, j);
3519
+ });
3520
+ return Promise.race([Z, ae]);
3521
+ }
3522
+ async unsubscribe(e, t, a) {
3523
+ let s, i;
3524
+ typeof t == "function" ? i = t : (s = t, i = a);
3525
+ const r = J();
3891
3526
  let o = [];
3892
- if (r) {
3893
- const c = this._subscriptionNamesByHandler.get(r);
3527
+ if (i) {
3528
+ const c = this._subscriptionNamesByHandler.get(i);
3894
3529
  if (!c)
3895
3530
  return { success: !1 };
3896
- o = [c], this._subscriptionNamesByHandler.delete(r);
3531
+ o = [c], this._subscriptionNamesByHandler.delete(i);
3897
3532
  } else if (!this._subscriptionNamesBySubjectName.get(e))
3898
3533
  return { success: !1 };
3899
3534
  for await (const c of o) {
3900
- this.off(c, r);
3901
- const u = ge({
3902
- telemetrySdkVersion: ve,
3535
+ this.off(c, i);
3536
+ const h = W({
3537
+ telemetrySdkVersion: G,
3903
3538
  applicationInstance: this._applicationInstance,
3904
3539
  applicationName: this._applicationName,
3905
3540
  applicationSpecifier: this._applicationSpecifier,
3906
3541
  name: e,
3907
- data: n,
3908
- responseName: i,
3542
+ data: s,
3543
+ responseName: r,
3909
3544
  unsubscribeName: c
3910
3545
  });
3911
- window.parent.postMessage(u, "*");
3912
- let f = !1, b;
3913
- const Z = new Promise((F, D) => {
3914
- const Ie = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${i} timed out after ${B}`);
3546
+ z(h);
3547
+ let m = !1, w;
3548
+ const Z = new Promise((j, P) => {
3549
+ const se = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${F}`);
3915
3550
  setTimeout(() => {
3916
- f = !0, this.off(i, b), D(Ie);
3917
- }, B);
3918
- }), Ee = new Promise((F) => {
3919
- b = (D) => {
3920
- f || F(D);
3921
- }, this.once(i, F);
3551
+ m = !0, this.off(r, w), P(se);
3552
+ }, F);
3553
+ }), ae = new Promise((j) => {
3554
+ w = (P) => {
3555
+ m || j(P);
3556
+ }, this.once(r, j);
3922
3557
  });
3923
- if (!(await Promise.race([Z, Ee])).success)
3558
+ if (!(await Promise.race([Z, ae])).success)
3924
3559
  return { success: !1 };
3925
3560
  }
3926
3561
  return { success: !0 };
@@ -3943,9 +3578,9 @@ class Cs {
3943
3578
  * @param handler The callback function to execute when messages are received
3944
3579
  */
3945
3580
  on(e, t) {
3946
- var s;
3947
- const n = (s = this._onHandlers.get(e)) !== null && s !== void 0 ? s : [];
3948
- n.length === 0 && this._onHandlers.set(e, n), n.push(t);
3581
+ var a;
3582
+ const s = (a = this._onHandlers.get(e)) !== null && a !== void 0 ? a : [];
3583
+ s.length === 0 && this._onHandlers.set(e, s), s.push(t);
3949
3584
  }
3950
3585
  /**
3951
3586
  * Registers a one-time handler for a specific message type.
@@ -3962,9 +3597,9 @@ class Cs {
3962
3597
  * @param handler The callback function to execute when the message is received
3963
3598
  */
3964
3599
  once(e, t) {
3965
- var s;
3966
- const n = (s = this._onceHandlers.get(e)) !== null && s !== void 0 ? s : [];
3967
- n.length === 0 && this._onceHandlers.set(e, n), n.push(t);
3600
+ var a;
3601
+ const s = (a = this._onceHandlers.get(e)) !== null && a !== void 0 ? a : [];
3602
+ s.length === 0 && this._onceHandlers.set(e, s), s.push(t);
3968
3603
  }
3969
3604
  /**
3970
3605
  * Removes previously registered message handlers.
@@ -3982,26 +3617,26 @@ class Cs {
3982
3617
  * all handlers for this message type will be removed.
3983
3618
  */
3984
3619
  off(e, t) {
3985
- const s = this._onHandlers.get(e), n = this._onceHandlers.get(e);
3986
- if (!(!s && !n)) {
3987
- if (s) {
3988
- for (let r = 0; r < s.length; r += 1)
3989
- t && s[r] !== t || (s.splice(r, 1), r -= 1);
3990
- s.length === 0 && this._onHandlers.delete(e);
3620
+ const a = this._onHandlers.get(e), s = this._onceHandlers.get(e);
3621
+ if (!(!a && !s)) {
3622
+ if (a) {
3623
+ for (let i = 0; i < a.length; i += 1)
3624
+ t && a[i] !== t || (a.splice(i, 1), i -= 1);
3625
+ a.length === 0 && this._onHandlers.delete(e);
3991
3626
  }
3992
- if (n) {
3993
- for (let r = 0; r < n.length; r += 1)
3994
- t && n[r] !== t || (n.splice(r, 1), r -= 1);
3995
- n.length === 0 && this._onceHandlers.delete(e);
3627
+ if (s) {
3628
+ for (let i = 0; i < s.length; i += 1)
3629
+ t && s[i] !== t || (s.splice(i, 1), i -= 1);
3630
+ s.length === 0 && this._onceHandlers.delete(e);
3996
3631
  }
3997
3632
  }
3998
3633
  }
3999
3634
  }
4000
- function _e() {
3635
+ function J() {
4001
3636
  return Math.random().toString(36).slice(2, 9);
4002
3637
  }
4003
- const ve = ms.version;
4004
- class Os {
3638
+ const G = _t.version;
3639
+ class Ot {
4005
3640
  constructor(e) {
4006
3641
  this._client = e;
4007
3642
  }
@@ -4050,7 +3685,7 @@ class Os {
4050
3685
  return !0;
4051
3686
  }
4052
3687
  }
4053
- class As {
3688
+ class At {
4054
3689
  constructor(e) {
4055
3690
  this._client = e;
4056
3691
  }
@@ -4106,112 +3741,113 @@ class As {
4106
3741
  return !0;
4107
3742
  }
4108
3743
  }
4109
- class Es extends Cs {
3744
+ class It extends Zt {
4110
3745
  get playlist() {
4111
- return new As(this);
3746
+ return new At(this);
4112
3747
  }
4113
3748
  get overrides() {
4114
- return new Os(this);
3749
+ return new Ot(this);
4115
3750
  }
4116
3751
  }
4117
3752
  let g = null;
4118
- function Rs() {
3753
+ function Dt() {
4119
3754
  return g;
4120
3755
  }
4121
- function Ms(a) {
4122
- g = new Es(a), g.bind();
3756
+ function Vt(n) {
3757
+ g = new It(n), g.bind();
4123
3758
  }
4124
- function Fs() {
3759
+ function zt() {
4125
3760
  g == null || g.unbind(), g = null;
4126
3761
  }
4127
- function Ds(...a) {
4128
- return k(g), g.on(...a);
3762
+ function Bt(...n) {
3763
+ return k(g), g.on(...n);
4129
3764
  }
4130
- function Ls(...a) {
4131
- return k(g), g.once(...a);
3765
+ function Ut(...n) {
3766
+ return k(g), g.once(...n);
4132
3767
  }
4133
- function qs(...a) {
4134
- return k(g), g.off(...a);
3768
+ function Ht(...n) {
3769
+ return k(g), g.off(...n);
4135
3770
  }
4136
- function zs(...a) {
4137
- return k(g), g.send(...a);
3771
+ function Kt(...n) {
3772
+ return k(g), g.send(...n);
4138
3773
  }
4139
- function Vs(...a) {
4140
- return k(g), g.request(...a);
3774
+ function Wt(...n) {
3775
+ return k(g), g.request(...n);
4141
3776
  }
4142
- function Bs(...a) {
4143
- return k(g), g.subscribe(...a);
3777
+ function Jt(...n) {
3778
+ return k(g), g.subscribe(...n);
4144
3779
  }
4145
- function Us(...a) {
4146
- return k(g), g.unsubscribe(...a);
3780
+ function Gt(...n) {
3781
+ return k(g), g.unsubscribe(...n);
4147
3782
  }
4148
- function Hs() {
3783
+ function Yt() {
4149
3784
  return k(g), g.store;
4150
3785
  }
4151
- function Ks() {
3786
+ function Xt() {
4152
3787
  return k(g), g.applications;
4153
3788
  }
4154
- function Ws() {
3789
+ function Qt() {
4155
3790
  return k(g), g.media;
4156
3791
  }
4157
- function Js() {
3792
+ function ea() {
4158
3793
  return k(g), g.accounts;
4159
3794
  }
4160
- function Ys() {
3795
+ function ta() {
4161
3796
  return k(g), g.users;
4162
3797
  }
4163
- function Gs() {
3798
+ function aa() {
4164
3799
  return k(g), g.devices;
4165
3800
  }
4166
- function Xs() {
3801
+ function sa() {
4167
3802
  return k(g), g.proxy;
4168
3803
  }
4169
- function Qs() {
3804
+ function na() {
4170
3805
  return k(g), g.weather;
4171
3806
  }
4172
- function ea() {
3807
+ function ra() {
4173
3808
  return k(g), g.environment;
4174
3809
  }
4175
- function ta() {
3810
+ function ia() {
4176
3811
  return k(g), g.playlist;
4177
3812
  }
4178
- function sa() {
3813
+ function oa() {
4179
3814
  return k(g), g.overrides;
4180
3815
  }
4181
- function k(a) {
4182
- if (!a)
3816
+ function k(n) {
3817
+ if (!n)
4183
3818
  throw new Error("SDK is not configured");
4184
3819
  }
4185
3820
  export {
4186
- ys as Accounts,
4187
- gs as Applications,
4188
- _s as Devices,
4189
- ws as Environment,
4190
- bs as Media,
4191
- ks as Proxy,
4192
- xs as Store,
4193
- Zs as Users,
4194
- Ss as Weather,
4195
- Js as accounts,
4196
- Ks as applications,
4197
- Ms as configure,
4198
- Fs as destroy,
4199
- Gs as devices,
4200
- ea as environment,
4201
- Rs as globalClient,
4202
- Ws as media,
4203
- qs as off,
4204
- Ds as on,
4205
- Ls as once,
4206
- sa as overrides,
4207
- ta as playlist,
4208
- Xs as proxy,
4209
- Vs as request,
4210
- zs as send,
4211
- Hs as store,
4212
- Bs as subscribe,
4213
- ve as telemetrySdkVersion,
4214
- Us as unsubscribe,
4215
- Ys as users,
4216
- Qs as weather
3821
+ gt as Accounts,
3822
+ yt as Applications,
3823
+ vt as Devices,
3824
+ bt as Environment,
3825
+ wt as Media,
3826
+ kt as Proxy,
3827
+ xt as Store,
3828
+ K as StoreSlice,
3829
+ St as Users,
3830
+ Nt as Weather,
3831
+ ea as accounts,
3832
+ Xt as applications,
3833
+ Vt as configure,
3834
+ zt as destroy,
3835
+ aa as devices,
3836
+ ra as environment,
3837
+ Dt as globalClient,
3838
+ Qt as media,
3839
+ Ht as off,
3840
+ Bt as on,
3841
+ Ut as once,
3842
+ oa as overrides,
3843
+ ia as playlist,
3844
+ sa as proxy,
3845
+ Wt as request,
3846
+ Kt as send,
3847
+ Yt as store,
3848
+ Jt as subscribe,
3849
+ G as telemetrySdkVersion,
3850
+ Gt as unsubscribe,
3851
+ ta as users,
3852
+ na as weather
4217
3853
  };