@clockworkdog/cogs-client 3.0.0-alpha.16 → 3.0.0-alpha.17
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/browser/index.mjs +955 -875
- package/dist/browser/index.umd.js +9 -9
- package/dist/state-based/MediaClipManager.d.ts +3 -4
- package/dist/state-based/MediaClipManager.js +165 -81
- package/dist/types/MediaSchema.d.ts +6 -2
- package/dist/types/MediaSchema.js +2 -0
- package/dist/utils/device.d.ts +2 -0
- package/dist/utils/device.js +4 -0
- package/dist/utils/getStateAtTime.d.ts +12 -2
- package/dist/utils/getStateAtTime.js +1 -1
- package/dist/utils/modulo.d.ts +6 -0
- package/dist/utils/modulo.js +17 -0
- package/package.json +2 -2
package/dist/browser/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var lt = /* @__PURE__ */ ((e) => (e.Setup = "setup", e.Preshow = "pre-show", e.InProgress = "in progress", e.Finished = "finished", e))(lt || {});
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -13,21 +13,21 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var
|
|
17
|
-
return
|
|
16
|
+
var ve = function(e, t) {
|
|
17
|
+
return ve = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
18
18
|
n.__proto__ = r;
|
|
19
19
|
} || function(n, r) {
|
|
20
20
|
for (var o in r) r.hasOwnProperty(o) && (n[o] = r[o]);
|
|
21
|
-
},
|
|
21
|
+
}, ve(e, t);
|
|
22
22
|
};
|
|
23
|
-
function
|
|
24
|
-
|
|
23
|
+
function ht(e, t) {
|
|
24
|
+
ve(e, t);
|
|
25
25
|
function n() {
|
|
26
26
|
this.constructor = e;
|
|
27
27
|
}
|
|
28
28
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Vt(e) {
|
|
31
31
|
var t = typeof Symbol == "function" && e[Symbol.iterator], n = 0;
|
|
32
32
|
return t ? t.call(e) : {
|
|
33
33
|
next: function() {
|
|
@@ -35,7 +35,7 @@ function jt(e) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Wt(e, t) {
|
|
39
39
|
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
40
40
|
if (!n) return e;
|
|
41
41
|
var r = n.call(e), o, s = [], i;
|
|
@@ -52,12 +52,12 @@ function Ut(e, t) {
|
|
|
52
52
|
}
|
|
53
53
|
return s;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Gt() {
|
|
56
56
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
57
|
-
e = e.concat(
|
|
57
|
+
e = e.concat(Wt(arguments[t]));
|
|
58
58
|
return e;
|
|
59
59
|
}
|
|
60
|
-
var
|
|
60
|
+
var dt = (
|
|
61
61
|
/** @class */
|
|
62
62
|
/* @__PURE__ */ function() {
|
|
63
63
|
function e(t, n) {
|
|
@@ -65,27 +65,27 @@ var ct = (
|
|
|
65
65
|
}
|
|
66
66
|
return e;
|
|
67
67
|
}()
|
|
68
|
-
),
|
|
68
|
+
), Bt = (
|
|
69
69
|
/** @class */
|
|
70
70
|
function(e) {
|
|
71
|
-
|
|
71
|
+
ht(t, e);
|
|
72
72
|
function t(n, r) {
|
|
73
73
|
var o = e.call(this, "error", r) || this;
|
|
74
74
|
return o.message = n.message, o.error = n, o;
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
77
|
-
}(
|
|
78
|
-
),
|
|
77
|
+
}(dt)
|
|
78
|
+
), Jt = (
|
|
79
79
|
/** @class */
|
|
80
80
|
function(e) {
|
|
81
|
-
|
|
81
|
+
ht(t, e);
|
|
82
82
|
function t(n, r, o) {
|
|
83
83
|
n === void 0 && (n = 1e3), r === void 0 && (r = "");
|
|
84
84
|
var s = e.call(this, "close", o) || this;
|
|
85
85
|
return s.wasClean = !0, s.code = n, s.reason = r, s;
|
|
86
86
|
}
|
|
87
87
|
return t;
|
|
88
|
-
}(
|
|
88
|
+
}(dt)
|
|
89
89
|
);
|
|
90
90
|
/*!
|
|
91
91
|
* Reconnecting WebSocket
|
|
@@ -93,12 +93,12 @@ var ct = (
|
|
|
93
93
|
* https://github.com/pladaria/reconnecting-websocket
|
|
94
94
|
* License MIT
|
|
95
95
|
*/
|
|
96
|
-
var
|
|
96
|
+
var Ht = function() {
|
|
97
97
|
if (typeof WebSocket < "u")
|
|
98
98
|
return WebSocket;
|
|
99
|
-
},
|
|
99
|
+
}, Yt = function(e) {
|
|
100
100
|
return typeof e < "u" && !!e && e.CLOSING === 2;
|
|
101
|
-
},
|
|
101
|
+
}, D = {
|
|
102
102
|
maxReconnectionDelay: 1e4,
|
|
103
103
|
minReconnectionDelay: 1e3 + Math.random() * 4e3,
|
|
104
104
|
minUptime: 5e3,
|
|
@@ -106,7 +106,7 @@ var Wt = function() {
|
|
|
106
106
|
connectionTimeout: 4e3,
|
|
107
107
|
maxRetries: 1 / 0,
|
|
108
108
|
maxEnqueuedMessages: 1 / 0
|
|
109
|
-
},
|
|
109
|
+
}, qt = (
|
|
110
110
|
/** @class */
|
|
111
111
|
function() {
|
|
112
112
|
function e(t, n, r) {
|
|
@@ -118,7 +118,7 @@ var Wt = function() {
|
|
|
118
118
|
close: []
|
|
119
119
|
}, this._retryCount = -1, this._shouldReconnect = !0, this._connectLock = !1, this._binaryType = "blob", this._closeCalled = !1, this._messageQueue = [], this.onclose = null, this.onerror = null, this.onmessage = null, this.onopen = null, this._handleOpen = function(s) {
|
|
120
120
|
o._debug("open event");
|
|
121
|
-
var i = o._options.minUptime, c = i === void 0 ?
|
|
121
|
+
var i = o._options.minUptime, c = i === void 0 ? D.minUptime : i;
|
|
122
122
|
clearTimeout(o._connectTimeout), o._uptimeTimeout = setTimeout(function() {
|
|
123
123
|
return o._acceptOpen();
|
|
124
124
|
}, c), o._ws.binaryType = o._binaryType, o._messageQueue.forEach(function(a) {
|
|
@@ -276,7 +276,7 @@ var Wt = function() {
|
|
|
276
276
|
if (this._ws && this._ws.readyState === this.OPEN)
|
|
277
277
|
this._debug("send", t), this._ws.send(t);
|
|
278
278
|
else {
|
|
279
|
-
var n = this._options.maxEnqueuedMessages, r = n === void 0 ?
|
|
279
|
+
var n = this._options.maxEnqueuedMessages, r = n === void 0 ? D.maxEnqueuedMessages : n;
|
|
280
280
|
this._messageQueue.length < r && (this._debug("enqueue", t), this._messageQueue.push(t));
|
|
281
281
|
}
|
|
282
282
|
}, e.prototype.addEventListener = function(t, n) {
|
|
@@ -285,7 +285,7 @@ var Wt = function() {
|
|
|
285
285
|
var n, r, o = this._listeners[t.type];
|
|
286
286
|
if (o)
|
|
287
287
|
try {
|
|
288
|
-
for (var s =
|
|
288
|
+
for (var s = Vt(o), i = s.next(); !i.done; i = s.next()) {
|
|
289
289
|
var c = i.value;
|
|
290
290
|
this._callEventListener(t, c);
|
|
291
291
|
}
|
|
@@ -306,9 +306,9 @@ var Wt = function() {
|
|
|
306
306
|
}, e.prototype._debug = function() {
|
|
307
307
|
for (var t = [], n = 0; n < arguments.length; n++)
|
|
308
308
|
t[n] = arguments[n];
|
|
309
|
-
this._options.debug && console.log.apply(console,
|
|
309
|
+
this._options.debug && console.log.apply(console, Gt(["RWS>"], t));
|
|
310
310
|
}, e.prototype._getNextDelay = function() {
|
|
311
|
-
var t = this._options, n = t.reconnectionDelayGrowFactor, r = n === void 0 ?
|
|
311
|
+
var t = this._options, n = t.reconnectionDelayGrowFactor, r = n === void 0 ? D.reconnectionDelayGrowFactor : n, o = t.minReconnectionDelay, s = o === void 0 ? D.minReconnectionDelay : o, i = t.maxReconnectionDelay, c = i === void 0 ? D.maxReconnectionDelay : i, a = 0;
|
|
312
312
|
return this._retryCount > 0 && (a = s * Math.pow(r, this._retryCount - 1), a > c && (a = c)), this._debug("next delay", a), a;
|
|
313
313
|
}, e.prototype._wait = function() {
|
|
314
314
|
var t = this;
|
|
@@ -330,12 +330,12 @@ var Wt = function() {
|
|
|
330
330
|
var t = this;
|
|
331
331
|
if (!(this._connectLock || !this._shouldReconnect)) {
|
|
332
332
|
this._connectLock = !0;
|
|
333
|
-
var n = this._options, r = n.maxRetries, o = r === void 0 ?
|
|
333
|
+
var n = this._options, r = n.maxRetries, o = r === void 0 ? D.maxRetries : r, s = n.connectionTimeout, i = s === void 0 ? D.connectionTimeout : s, c = n.WebSocket, a = c === void 0 ? Ht() : c;
|
|
334
334
|
if (this._retryCount >= o) {
|
|
335
335
|
this._debug("max retries reached", this._retryCount, ">=", o);
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !
|
|
338
|
+
if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !Yt(a))
|
|
339
339
|
throw Error("No valid WebSocket class provided");
|
|
340
340
|
this._wait().then(function() {
|
|
341
341
|
return t._getNextUrl(t._url);
|
|
@@ -346,12 +346,12 @@ var Wt = function() {
|
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
}, e.prototype._handleTimeout = function() {
|
|
349
|
-
this._debug("timeout event"), this._handleError(new
|
|
349
|
+
this._debug("timeout event"), this._handleError(new Bt(Error("TIMEOUT"), this));
|
|
350
350
|
}, e.prototype._disconnect = function(t, n) {
|
|
351
351
|
if (t === void 0 && (t = 1e3), this._clearTimeouts(), !!this._ws) {
|
|
352
352
|
this._removeListeners();
|
|
353
353
|
try {
|
|
354
|
-
this._ws.close(t, n), this._handleClose(new
|
|
354
|
+
this._ws.close(t, n), this._handleClose(new Jt(t, n, this));
|
|
355
355
|
} catch {
|
|
356
356
|
}
|
|
357
357
|
}
|
|
@@ -368,16 +368,16 @@ var Wt = function() {
|
|
|
368
368
|
}, e;
|
|
369
369
|
}()
|
|
370
370
|
);
|
|
371
|
-
const
|
|
372
|
-
function
|
|
371
|
+
const ft = 12095;
|
|
372
|
+
function Xt(e) {
|
|
373
373
|
const t = typeof window < "u" ? window.location : void 0, n = `/assets/${encodeURIComponent(e)}`;
|
|
374
|
-
return `${t?.protocol}//${t?.hostname}:${
|
|
374
|
+
return `${t?.protocol}//${t?.hostname}:${ft}${n}`;
|
|
375
375
|
}
|
|
376
|
-
async function
|
|
376
|
+
async function hc(e) {
|
|
377
377
|
const t = await fetch(e);
|
|
378
378
|
return URL.createObjectURL(new Blob([await t.arrayBuffer()]));
|
|
379
379
|
}
|
|
380
|
-
class
|
|
380
|
+
class Qt {
|
|
381
381
|
_items;
|
|
382
382
|
#e = new EventTarget();
|
|
383
383
|
constructor(t) {
|
|
@@ -385,8 +385,8 @@ class Bt {
|
|
|
385
385
|
}
|
|
386
386
|
handleDataStoreItemsMessage(t) {
|
|
387
387
|
this._items = { ...this._items, ...t.items }, Object.entries(t.items).forEach(([n, r]) => {
|
|
388
|
-
this.dispatchEvent(new
|
|
389
|
-
}), this.dispatchEvent(new
|
|
388
|
+
this.dispatchEvent(new Re(n, r));
|
|
389
|
+
}), this.dispatchEvent(new Ne(t.items));
|
|
390
390
|
}
|
|
391
391
|
get items() {
|
|
392
392
|
return this._items;
|
|
@@ -396,8 +396,8 @@ class Bt {
|
|
|
396
396
|
}
|
|
397
397
|
setItems(t) {
|
|
398
398
|
return this._items = { ...this._items, ...t }, Object.entries(t).forEach(([n, r]) => {
|
|
399
|
-
this.dispatchEvent(new
|
|
400
|
-
}), this.dispatchEvent(new
|
|
399
|
+
this.dispatchEvent(new Re(n, r));
|
|
400
|
+
}), this.dispatchEvent(new Ne(t)), this;
|
|
401
401
|
}
|
|
402
402
|
// Type-safe listeners
|
|
403
403
|
addEventListener(t, n, r) {
|
|
@@ -410,20 +410,20 @@ class Bt {
|
|
|
410
410
|
this.#e.dispatchEvent(t);
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Re extends Event {
|
|
414
414
|
constructor(t, n) {
|
|
415
415
|
super("item"), this.key = t, this.value = n;
|
|
416
416
|
}
|
|
417
417
|
_cogsConnectionEventType = "item";
|
|
418
418
|
}
|
|
419
|
-
class
|
|
419
|
+
class Ne extends Event {
|
|
420
420
|
constructor(t) {
|
|
421
421
|
super("items"), this.items = t;
|
|
422
422
|
}
|
|
423
423
|
_cogsConnectionEventType = "item";
|
|
424
424
|
}
|
|
425
425
|
const Y = globalThis.Date;
|
|
426
|
-
function
|
|
426
|
+
function en(e) {
|
|
427
427
|
const t = e - Y.now();
|
|
428
428
|
function n(...o) {
|
|
429
429
|
return o.length === 0 ? new Y(n.now()) : new Y(...o);
|
|
@@ -433,30 +433,30 @@ function Yt(e) {
|
|
|
433
433
|
return Y.now() + t;
|
|
434
434
|
}, globalThis.Date = n;
|
|
435
435
|
}
|
|
436
|
-
let
|
|
437
|
-
function
|
|
438
|
-
return ++
|
|
436
|
+
let tn = 0;
|
|
437
|
+
function nn() {
|
|
438
|
+
return ++tn;
|
|
439
439
|
}
|
|
440
|
-
const
|
|
441
|
-
function
|
|
440
|
+
const rn = 5, on = 1e4;
|
|
441
|
+
function sn({ interval: e, send: t, onChange: n = en, syncSampleSize: r = rn, syncRequestTimeout: o = on }) {
|
|
442
442
|
const s = {};
|
|
443
443
|
async function i() {
|
|
444
444
|
const h = [];
|
|
445
445
|
for (let m = 0; m < r; m++) {
|
|
446
|
-
const k = new Promise((
|
|
447
|
-
const
|
|
448
|
-
t({ timesync: { id:
|
|
449
|
-
const S = (z,
|
|
450
|
-
s[
|
|
446
|
+
const k = new Promise((I) => {
|
|
447
|
+
const H = nn(), de = Date.now(), fe = performance.now();
|
|
448
|
+
t({ timesync: { id: H } });
|
|
449
|
+
const S = (z, N) => I({ sentAt: fe, receivedAt: z, serverNow: N, clientNow: de });
|
|
450
|
+
s[H] = { complete: S }, setTimeout(() => I(null), o);
|
|
451
451
|
});
|
|
452
452
|
h.push(k), await k;
|
|
453
453
|
}
|
|
454
|
-
const
|
|
454
|
+
const f = (await Promise.all(h)).filter((m) => m !== null), d = cn(f);
|
|
455
455
|
isNaN(d) || n(Date.now() + d);
|
|
456
456
|
}
|
|
457
457
|
const c = (h) => {
|
|
458
|
-
const
|
|
459
|
-
d && d.complete(
|
|
458
|
+
const f = performance.now(), d = s[h.timesync.id];
|
|
459
|
+
d && d.complete(f, h.timesync.now);
|
|
460
460
|
};
|
|
461
461
|
i();
|
|
462
462
|
const a = setInterval(i, e);
|
|
@@ -467,30 +467,30 @@ function en({ interval: e, send: t, onChange: n = Yt, syncSampleSize: r = Xt, sy
|
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function cn(e) {
|
|
471
471
|
return e.map(({ sentAt: t, receivedAt: n, clientNow: r, serverNow: o }) => {
|
|
472
472
|
const s = (n - t) / 2;
|
|
473
473
|
return o - r - s;
|
|
474
474
|
}).reduce((t, n) => t + n, 0) / e.length;
|
|
475
475
|
}
|
|
476
|
-
class
|
|
477
|
-
constructor(t, { hostname: n = document.location.hostname, port: r =
|
|
478
|
-
this.manifest = t, this.currentState = { ...o }, this.store = new
|
|
479
|
-
const { useReconnectingWebsocket: i, path: c, pathParams: a } =
|
|
476
|
+
class dc {
|
|
477
|
+
constructor(t, { hostname: n = document.location.hostname, port: r = ft } = {}, o, s) {
|
|
478
|
+
this.manifest = t, this.currentState = { ...o }, this.store = new Qt(s ?? {});
|
|
479
|
+
const { useReconnectingWebsocket: i, path: c, pathParams: a } = un(document.location.href);
|
|
480
480
|
this.urlParams = new URLSearchParams(a), this.urlParams.set("screenWidth", window.screen.width.toString()), this.urlParams.set("screenHeight", window.screen.height.toString()), this.urlParams.set("screenPixelRatio", window.devicePixelRatio.toString());
|
|
481
481
|
const l = `ws://${n}:${r}${c}?${this.urlParams}`;
|
|
482
|
-
this.websocket = i ? new
|
|
482
|
+
this.websocket = i ? new qt(l) : new WebSocket(l);
|
|
483
483
|
let h;
|
|
484
484
|
this.websocket.onopen = () => {
|
|
485
|
-
this.currentConfig = {}, this.currentState = {}, this.dispatchEvent(new
|
|
485
|
+
this.currentConfig = {}, this.currentState = {}, this.dispatchEvent(new an()), this.setState(this.currentState), h = sn({
|
|
486
486
|
interval: 6e4,
|
|
487
|
-
send: (
|
|
488
|
-
this.websocket.send(JSON.stringify(
|
|
487
|
+
send: (f) => {
|
|
488
|
+
this.websocket.send(JSON.stringify(f));
|
|
489
489
|
}
|
|
490
490
|
});
|
|
491
|
-
}, this.websocket.addEventListener("message", ({ data:
|
|
491
|
+
}, this.websocket.addEventListener("message", ({ data: f }) => {
|
|
492
492
|
try {
|
|
493
|
-
const d = JSON.parse(
|
|
493
|
+
const d = JSON.parse(f);
|
|
494
494
|
if (typeof d == "object" && d !== null && "timesync" in d) {
|
|
495
495
|
const m = d;
|
|
496
496
|
h?.receive(m);
|
|
@@ -499,18 +499,18 @@ class ec {
|
|
|
499
499
|
console.error(d);
|
|
500
500
|
}
|
|
501
501
|
}), this.websocket.onclose = () => {
|
|
502
|
-
h?.destroy(), this.dispatchEvent(new
|
|
503
|
-
}, this.websocket.addEventListener("message", ({ data:
|
|
502
|
+
h?.destroy(), this.dispatchEvent(new ln());
|
|
503
|
+
}, this.websocket.addEventListener("message", ({ data: f }) => {
|
|
504
504
|
try {
|
|
505
|
-
const d = JSON.parse(
|
|
505
|
+
const d = JSON.parse(f);
|
|
506
506
|
try {
|
|
507
507
|
if (d.config)
|
|
508
|
-
this.currentConfig = d.config, this.dispatchEvent(new
|
|
508
|
+
this.currentConfig = d.config, this.dispatchEvent(new dn(this.currentConfig));
|
|
509
509
|
else if (d.updates)
|
|
510
|
-
this.currentState = { ...this.currentState, ...d.updates }, this.dispatchEvent(new
|
|
510
|
+
this.currentState = { ...this.currentState, ...d.updates }, this.dispatchEvent(new fn(d.updates));
|
|
511
511
|
else if (d.event && d.event.key)
|
|
512
512
|
this.dispatchEvent(
|
|
513
|
-
new
|
|
513
|
+
new pn(d.event.key, d.event.value)
|
|
514
514
|
);
|
|
515
515
|
else if (typeof d.message == "object") {
|
|
516
516
|
const m = d.message;
|
|
@@ -523,37 +523,37 @@ class ec {
|
|
|
523
523
|
};
|
|
524
524
|
break;
|
|
525
525
|
case "show_phase":
|
|
526
|
-
this._showPhase = m.phase, this.dispatchEvent(new
|
|
526
|
+
this._showPhase = m.phase, this.dispatchEvent(new _n(m.phase));
|
|
527
527
|
break;
|
|
528
528
|
case "media_config_update":
|
|
529
529
|
this._mediaConfig = m;
|
|
530
530
|
for (const k of ["preferOptimizedAudio", "preferOptimizedVideo", "preferOptimizedImages"])
|
|
531
531
|
m[k] ? this.urlParams.set(k, "true") : this.urlParams.delete(k);
|
|
532
|
-
this.dispatchEvent(new
|
|
532
|
+
this.dispatchEvent(new mn(m));
|
|
533
533
|
break;
|
|
534
534
|
case "data_store_items":
|
|
535
535
|
this.store.handleDataStoreItemsMessage(m);
|
|
536
536
|
break;
|
|
537
537
|
}
|
|
538
|
-
this.dispatchEvent(new
|
|
538
|
+
this.dispatchEvent(new hn(m));
|
|
539
539
|
}
|
|
540
540
|
} catch (m) {
|
|
541
|
-
console.warn("Error handling data",
|
|
541
|
+
console.warn("Error handling data", f, m);
|
|
542
542
|
}
|
|
543
543
|
} catch (d) {
|
|
544
|
-
console.error("Unable to parse incoming data from server",
|
|
544
|
+
console.error("Unable to parse incoming data from server", f, d);
|
|
545
545
|
}
|
|
546
|
-
}), this.store.addEventListener("items", (
|
|
547
|
-
this.sendDataStoreItems(
|
|
546
|
+
}), this.store.addEventListener("items", (f) => {
|
|
547
|
+
this.sendDataStoreItems(f.items);
|
|
548
548
|
});
|
|
549
549
|
{
|
|
550
|
-
const
|
|
550
|
+
const f = async () => {
|
|
551
551
|
if (navigator.mediaDevices) {
|
|
552
552
|
const d = (await navigator.mediaDevices.enumerateDevices()).filter(({ kind: m }) => m === "audiooutput");
|
|
553
553
|
this.sendAudioOutputs(d), this.audioOutputs = d;
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
|
-
this.eventTarget.addEventListener("open",
|
|
556
|
+
this.eventTarget.addEventListener("open", f), navigator.mediaDevices?.addEventListener("devicechange", f), f();
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
websocket;
|
|
@@ -568,7 +568,7 @@ class ec {
|
|
|
568
568
|
get state() {
|
|
569
569
|
return { ...this.currentState };
|
|
570
570
|
}
|
|
571
|
-
_showPhase =
|
|
571
|
+
_showPhase = lt.Setup;
|
|
572
572
|
get showPhase() {
|
|
573
573
|
return this._showPhase;
|
|
574
574
|
}
|
|
@@ -584,7 +584,7 @@ class ec {
|
|
|
584
584
|
* Return asset URLs using the information about the client and server support for HTTP/2
|
|
585
585
|
*/
|
|
586
586
|
getAssetUrl(t) {
|
|
587
|
-
return `${
|
|
587
|
+
return `${Xt(t)}?${this.urlParams?.toString() ?? ""}`;
|
|
588
588
|
}
|
|
589
589
|
/**
|
|
590
590
|
* Cached audio outputs use to look up the device/sink ID when a different device label is requested
|
|
@@ -649,7 +649,7 @@ class ec {
|
|
|
649
649
|
this.eventTarget.dispatchEvent(t);
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function un(e) {
|
|
653
653
|
const t = new URL(e), n = new URLSearchParams(t.searchParams), r = n.get("local_id"), o = n.get("simulator") === "true", s = n.get("display") ?? "", i = t.pathname.startsWith("/plugin/") ? decodeURIComponent(t.pathname.split("/")[2]) : void 0;
|
|
654
654
|
if (r) {
|
|
655
655
|
const c = n.get("t") ?? "";
|
|
@@ -685,49 +685,49 @@ function nn(e) {
|
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class an extends Event {
|
|
689
689
|
_cogsConnectionEventType = "open";
|
|
690
690
|
constructor() {
|
|
691
691
|
super("open");
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
class
|
|
694
|
+
class ln extends Event {
|
|
695
695
|
_cogsConnectionEventType = "close";
|
|
696
696
|
constructor() {
|
|
697
697
|
super("close");
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
class
|
|
700
|
+
class hn extends Event {
|
|
701
701
|
constructor(t) {
|
|
702
702
|
super("message"), this.message = t;
|
|
703
703
|
}
|
|
704
704
|
_cogsConnectionEventType = "message";
|
|
705
705
|
}
|
|
706
|
-
class
|
|
706
|
+
class dn extends Event {
|
|
707
707
|
constructor(t) {
|
|
708
708
|
super("config"), this.config = t;
|
|
709
709
|
}
|
|
710
710
|
_cogsConnectionEventType = "config";
|
|
711
711
|
}
|
|
712
|
-
class
|
|
712
|
+
class fn extends Event {
|
|
713
713
|
constructor(t) {
|
|
714
714
|
super("state"), this.state = t;
|
|
715
715
|
}
|
|
716
716
|
_cogsConnectionEventType = "state";
|
|
717
717
|
}
|
|
718
|
-
class
|
|
718
|
+
class pn extends Event {
|
|
719
719
|
constructor(t, n) {
|
|
720
720
|
super("event"), this.name = t, this.value = n;
|
|
721
721
|
}
|
|
722
722
|
_cogsConnectionEventType = "event";
|
|
723
723
|
}
|
|
724
|
-
class
|
|
724
|
+
class mn extends Event {
|
|
725
725
|
constructor(t) {
|
|
726
726
|
super("mediaConfig"), this.mediaConfig = t;
|
|
727
727
|
}
|
|
728
728
|
_cogsConnectionEventType = "mediaConfig";
|
|
729
729
|
}
|
|
730
|
-
class
|
|
730
|
+
class _n extends Event {
|
|
731
731
|
constructor(t) {
|
|
732
732
|
super("showPhase"), this.showPhase = t;
|
|
733
733
|
}
|
|
@@ -747,8 +747,8 @@ function u(e, t, n) {
|
|
|
747
747
|
return;
|
|
748
748
|
c._zod.traits.add(e), t(c, a);
|
|
749
749
|
const l = i.prototype, h = Object.keys(l);
|
|
750
|
-
for (let
|
|
751
|
-
const d = h[
|
|
750
|
+
for (let f = 0; f < h.length; f++) {
|
|
751
|
+
const d = h[f];
|
|
752
752
|
d in c || (c[d] = l[d].bind(c));
|
|
753
753
|
}
|
|
754
754
|
}
|
|
@@ -768,28 +768,28 @@ function u(e, t, n) {
|
|
|
768
768
|
value: (c) => n?.Parent && c instanceof n.Parent ? !0 : c?._zod?.traits?.has(e)
|
|
769
769
|
}), Object.defineProperty(i, "name", { value: e }), i;
|
|
770
770
|
}
|
|
771
|
-
class
|
|
771
|
+
class F extends Error {
|
|
772
772
|
constructor() {
|
|
773
773
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
|
-
class
|
|
776
|
+
class pt extends Error {
|
|
777
777
|
constructor(t) {
|
|
778
778
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
const
|
|
782
|
-
function
|
|
783
|
-
return
|
|
781
|
+
const mt = {};
|
|
782
|
+
function C(e) {
|
|
783
|
+
return mt;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function gn(e) {
|
|
786
786
|
const t = Object.values(e).filter((r) => typeof r == "number");
|
|
787
787
|
return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function be(e, t) {
|
|
790
790
|
return typeof t == "bigint" ? t.toString() : t;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function ke(e) {
|
|
793
793
|
return {
|
|
794
794
|
get value() {
|
|
795
795
|
{
|
|
@@ -799,14 +799,14 @@ function be(e) {
|
|
|
799
799
|
}
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Ee(e) {
|
|
803
803
|
return e == null;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function ze(e) {
|
|
806
806
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
807
807
|
return e.slice(t, n);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function vn(e, t) {
|
|
810
810
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
811
811
|
let o = (r.split(".")[1] || "").length;
|
|
812
812
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -816,13 +816,13 @@ function fn(e, t) {
|
|
|
816
816
|
const s = n > o ? n : o, i = Number.parseInt(e.toFixed(s).replace(".", "")), c = Number.parseInt(t.toFixed(s).replace(".", ""));
|
|
817
817
|
return i % c / 10 ** s;
|
|
818
818
|
}
|
|
819
|
-
const
|
|
819
|
+
const De = Symbol("evaluating");
|
|
820
820
|
function _(e, t, n) {
|
|
821
821
|
let r;
|
|
822
822
|
Object.defineProperty(e, t, {
|
|
823
823
|
get() {
|
|
824
|
-
if (r !==
|
|
825
|
-
return r === void 0 && (r =
|
|
824
|
+
if (r !== De)
|
|
825
|
+
return r === void 0 && (r = De, r = n()), r;
|
|
826
826
|
},
|
|
827
827
|
set(o) {
|
|
828
828
|
Object.defineProperty(e, t, {
|
|
@@ -833,7 +833,7 @@ function _(e, t, n) {
|
|
|
833
833
|
configurable: !0
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function j(e, t, n) {
|
|
837
837
|
Object.defineProperty(e, t, {
|
|
838
838
|
value: n,
|
|
839
839
|
writable: !0,
|
|
@@ -849,18 +849,18 @@ function L(...e) {
|
|
|
849
849
|
}
|
|
850
850
|
return Object.defineProperties({}, t);
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function xe(e) {
|
|
853
853
|
return JSON.stringify(e);
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function bn(e) {
|
|
856
856
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const _t = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
859
859
|
};
|
|
860
|
-
function
|
|
860
|
+
function oe(e) {
|
|
861
861
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
862
862
|
}
|
|
863
|
-
const
|
|
863
|
+
const wn = ke(() => {
|
|
864
864
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
865
865
|
return !1;
|
|
866
866
|
try {
|
|
@@ -870,27 +870,27 @@ const mn = be(() => {
|
|
|
870
870
|
return !1;
|
|
871
871
|
}
|
|
872
872
|
});
|
|
873
|
-
function
|
|
874
|
-
if (
|
|
873
|
+
function K(e) {
|
|
874
|
+
if (oe(e) === !1)
|
|
875
875
|
return !1;
|
|
876
876
|
const t = e.constructor;
|
|
877
877
|
if (t === void 0 || typeof t != "function")
|
|
878
878
|
return !0;
|
|
879
879
|
const n = t.prototype;
|
|
880
|
-
return !(
|
|
880
|
+
return !(oe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
881
881
|
}
|
|
882
|
-
function
|
|
883
|
-
return
|
|
882
|
+
function gt(e) {
|
|
883
|
+
return K(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
884
884
|
}
|
|
885
|
-
const
|
|
885
|
+
const yn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
886
886
|
function V(e) {
|
|
887
887
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function R(e, t, n) {
|
|
890
890
|
const r = new e._zod.constr(t ?? e._zod.def);
|
|
891
891
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function p(e) {
|
|
894
894
|
const t = e;
|
|
895
895
|
if (!t)
|
|
896
896
|
return {};
|
|
@@ -903,17 +903,17 @@ function f(e) {
|
|
|
903
903
|
}
|
|
904
904
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function kn(e) {
|
|
907
907
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
908
908
|
}
|
|
909
|
-
const
|
|
909
|
+
const En = {
|
|
910
910
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
911
911
|
int32: [-2147483648, 2147483647],
|
|
912
912
|
uint32: [0, 4294967295],
|
|
913
913
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
914
914
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
915
915
|
};
|
|
916
|
-
function
|
|
916
|
+
function zn(e, t) {
|
|
917
917
|
const n = e._zod.def, r = L(e._zod.def, {
|
|
918
918
|
get shape() {
|
|
919
919
|
const o = {};
|
|
@@ -922,13 +922,13 @@ function bn(e, t) {
|
|
|
922
922
|
throw new Error(`Unrecognized key: "${s}"`);
|
|
923
923
|
t[s] && (o[s] = n.shape[s]);
|
|
924
924
|
}
|
|
925
|
-
return
|
|
925
|
+
return j(this, "shape", o), o;
|
|
926
926
|
},
|
|
927
927
|
checks: []
|
|
928
928
|
});
|
|
929
|
-
return
|
|
929
|
+
return R(e, r);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function $n(e, t) {
|
|
932
932
|
const n = e._zod.def, r = L(e._zod.def, {
|
|
933
933
|
get shape() {
|
|
934
934
|
const o = { ...e._zod.def.shape };
|
|
@@ -937,14 +937,14 @@ function yn(e, t) {
|
|
|
937
937
|
throw new Error(`Unrecognized key: "${s}"`);
|
|
938
938
|
t[s] && delete o[s];
|
|
939
939
|
}
|
|
940
|
-
return
|
|
940
|
+
return j(this, "shape", o), o;
|
|
941
941
|
},
|
|
942
942
|
checks: []
|
|
943
943
|
});
|
|
944
|
-
return
|
|
944
|
+
return R(e, r);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
if (!
|
|
946
|
+
function Zn(e, t) {
|
|
947
|
+
if (!K(t))
|
|
948
948
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
949
949
|
const n = e._zod.def.checks;
|
|
950
950
|
if (n && n.length > 0)
|
|
@@ -952,30 +952,30 @@ function wn(e, t) {
|
|
|
952
952
|
const o = L(e._zod.def, {
|
|
953
953
|
get shape() {
|
|
954
954
|
const s = { ...e._zod.def.shape, ...t };
|
|
955
|
-
return
|
|
955
|
+
return j(this, "shape", s), s;
|
|
956
956
|
},
|
|
957
957
|
checks: []
|
|
958
958
|
});
|
|
959
|
-
return
|
|
959
|
+
return R(e, o);
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
if (!
|
|
961
|
+
function Sn(e, t) {
|
|
962
|
+
if (!K(t))
|
|
963
963
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
964
964
|
const n = {
|
|
965
965
|
...e._zod.def,
|
|
966
966
|
get shape() {
|
|
967
967
|
const r = { ...e._zod.def.shape, ...t };
|
|
968
|
-
return
|
|
968
|
+
return j(this, "shape", r), r;
|
|
969
969
|
},
|
|
970
970
|
checks: e._zod.def.checks
|
|
971
971
|
};
|
|
972
|
-
return
|
|
972
|
+
return R(e, n);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function On(e, t) {
|
|
975
975
|
const n = L(e._zod.def, {
|
|
976
976
|
get shape() {
|
|
977
977
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
978
|
-
return
|
|
978
|
+
return j(this, "shape", r), r;
|
|
979
979
|
},
|
|
980
980
|
get catchall() {
|
|
981
981
|
return t._zod.def.catchall;
|
|
@@ -983,9 +983,9 @@ function En(e, t) {
|
|
|
983
983
|
checks: []
|
|
984
984
|
// delete existing checks
|
|
985
985
|
});
|
|
986
|
-
return
|
|
986
|
+
return R(e, n);
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function Tn(e, t, n) {
|
|
989
989
|
const r = L(t._zod.def, {
|
|
990
990
|
get shape() {
|
|
991
991
|
const o = t._zod.def.shape, s = { ...o };
|
|
@@ -1004,13 +1004,13 @@ function zn(e, t, n) {
|
|
|
1004
1004
|
type: "optional",
|
|
1005
1005
|
innerType: o[i]
|
|
1006
1006
|
}) : o[i];
|
|
1007
|
-
return
|
|
1007
|
+
return j(this, "shape", s), s;
|
|
1008
1008
|
},
|
|
1009
1009
|
checks: []
|
|
1010
1010
|
});
|
|
1011
|
-
return
|
|
1011
|
+
return R(t, r);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function In(e, t, n) {
|
|
1014
1014
|
const r = L(t._zod.def, {
|
|
1015
1015
|
get shape() {
|
|
1016
1016
|
const o = t._zod.def.shape, s = { ...o };
|
|
@@ -1029,13 +1029,13 @@ function $n(e, t, n) {
|
|
|
1029
1029
|
type: "nonoptional",
|
|
1030
1030
|
innerType: o[i]
|
|
1031
1031
|
});
|
|
1032
|
-
return
|
|
1032
|
+
return j(this, "shape", s), s;
|
|
1033
1033
|
},
|
|
1034
1034
|
checks: []
|
|
1035
1035
|
});
|
|
1036
|
-
return
|
|
1036
|
+
return R(t, r);
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function M(e, t = 0) {
|
|
1039
1039
|
if (e.aborted === !0)
|
|
1040
1040
|
return !0;
|
|
1041
1041
|
for (let n = t; n < e.issues.length; n++)
|
|
@@ -1049,21 +1049,21 @@ function x(e, t) {
|
|
|
1049
1049
|
return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function X(e) {
|
|
1053
1053
|
return typeof e == "string" ? e : e?.message;
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function A(e, t, n) {
|
|
1056
1056
|
const r = { ...e, path: e.path ?? [] };
|
|
1057
1057
|
if (!e.message) {
|
|
1058
|
-
const o =
|
|
1058
|
+
const o = X(e.inst?._zod.def?.error?.(e)) ?? X(t?.error?.(e)) ?? X(n.customError?.(e)) ?? X(n.localeError?.(e)) ?? "Invalid input";
|
|
1059
1059
|
r.message = o;
|
|
1060
1060
|
}
|
|
1061
1061
|
return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function $e(e) {
|
|
1064
1064
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function q(...e) {
|
|
1067
1067
|
const [t, n, r] = e;
|
|
1068
1068
|
return typeof t == "string" ? {
|
|
1069
1069
|
message: t,
|
|
@@ -1072,25 +1072,25 @@ function H(...e) {
|
|
|
1072
1072
|
inst: r
|
|
1073
1073
|
} : { ...t };
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1075
|
+
const vt = (e, t) => {
|
|
1076
1076
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
1077
1077
|
value: e._zod,
|
|
1078
1078
|
enumerable: !1
|
|
1079
1079
|
}), Object.defineProperty(e, "issues", {
|
|
1080
1080
|
value: t,
|
|
1081
1081
|
enumerable: !1
|
|
1082
|
-
}), e.message = JSON.stringify(t,
|
|
1082
|
+
}), e.message = JSON.stringify(t, be, 2), Object.defineProperty(e, "toString", {
|
|
1083
1083
|
value: () => e.message,
|
|
1084
1084
|
enumerable: !1
|
|
1085
1085
|
});
|
|
1086
|
-
},
|
|
1087
|
-
function
|
|
1086
|
+
}, bt = /* @__PURE__ */ u("$ZodError", vt), wt = /* @__PURE__ */ u("$ZodError", vt, { Parent: Error });
|
|
1087
|
+
function Pn(e, t = (n) => n.message) {
|
|
1088
1088
|
const n = {}, r = [];
|
|
1089
1089
|
for (const o of e.issues)
|
|
1090
1090
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
1091
1091
|
return { formErrors: r, fieldErrors: n };
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function Cn(e, t = (n) => n.message) {
|
|
1094
1094
|
const n = { _errors: [] }, r = (o) => {
|
|
1095
1095
|
for (const s of o.issues)
|
|
1096
1096
|
if (s.code === "invalid_union" && s.errors.length)
|
|
@@ -1111,81 +1111,81 @@ function Sn(e, t = (n) => n.message) {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
return r(e), n;
|
|
1113
1113
|
}
|
|
1114
|
-
const
|
|
1114
|
+
const Ze = (e) => (t, n, r, o) => {
|
|
1115
1115
|
const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
|
|
1116
1116
|
if (i instanceof Promise)
|
|
1117
|
-
throw new
|
|
1117
|
+
throw new F();
|
|
1118
1118
|
if (i.issues.length) {
|
|
1119
|
-
const c = new (o?.Err ?? e)(i.issues.map((a) =>
|
|
1120
|
-
throw
|
|
1119
|
+
const c = new (o?.Err ?? e)(i.issues.map((a) => A(a, s, C())));
|
|
1120
|
+
throw _t(c, o?.callee), c;
|
|
1121
1121
|
}
|
|
1122
1122
|
return i.value;
|
|
1123
|
-
},
|
|
1123
|
+
}, Se = (e) => async (t, n, r, o) => {
|
|
1124
1124
|
const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1125
1125
|
let i = t._zod.run({ value: n, issues: [] }, s);
|
|
1126
1126
|
if (i instanceof Promise && (i = await i), i.issues.length) {
|
|
1127
|
-
const c = new (o?.Err ?? e)(i.issues.map((a) =>
|
|
1128
|
-
throw
|
|
1127
|
+
const c = new (o?.Err ?? e)(i.issues.map((a) => A(a, s, C())));
|
|
1128
|
+
throw _t(c, o?.callee), c;
|
|
1129
1129
|
}
|
|
1130
1130
|
return i.value;
|
|
1131
|
-
},
|
|
1131
|
+
}, ue = (e) => (t, n, r) => {
|
|
1132
1132
|
const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
|
|
1133
1133
|
if (s instanceof Promise)
|
|
1134
|
-
throw new
|
|
1134
|
+
throw new F();
|
|
1135
1135
|
return s.issues.length ? {
|
|
1136
1136
|
success: !1,
|
|
1137
|
-
error: new (e ??
|
|
1137
|
+
error: new (e ?? bt)(s.issues.map((i) => A(i, o, C())))
|
|
1138
1138
|
} : { success: !0, data: s.value };
|
|
1139
|
-
},
|
|
1139
|
+
}, An = /* @__PURE__ */ ue(wt), ae = (e) => async (t, n, r) => {
|
|
1140
1140
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
1141
1141
|
let s = t._zod.run({ value: n, issues: [] }, o);
|
|
1142
1142
|
return s instanceof Promise && (s = await s), s.issues.length ? {
|
|
1143
1143
|
success: !1,
|
|
1144
|
-
error: new e(s.issues.map((i) =>
|
|
1144
|
+
error: new e(s.issues.map((i) => A(i, o, C())))
|
|
1145
1145
|
} : { success: !0, data: s.value };
|
|
1146
|
-
},
|
|
1146
|
+
}, Rn = /* @__PURE__ */ ae(wt), Nn = (e) => (t, n, r) => {
|
|
1147
1147
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1148
|
-
return
|
|
1149
|
-
},
|
|
1148
|
+
return Ze(e)(t, n, o);
|
|
1149
|
+
}, Dn = (e) => (t, n, r) => Ze(e)(t, n, r), xn = (e) => async (t, n, r) => {
|
|
1150
1150
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1151
|
-
return
|
|
1152
|
-
},
|
|
1151
|
+
return Se(e)(t, n, o);
|
|
1152
|
+
}, jn = (e) => async (t, n, r) => Se(e)(t, n, r), Ln = (e) => (t, n, r) => {
|
|
1153
1153
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1154
|
-
return
|
|
1155
|
-
},
|
|
1154
|
+
return ue(e)(t, n, o);
|
|
1155
|
+
}, Un = (e) => (t, n, r) => ue(e)(t, n, r), Mn = (e) => async (t, n, r) => {
|
|
1156
1156
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
1157
|
-
return
|
|
1158
|
-
},
|
|
1159
|
-
function
|
|
1160
|
-
return new RegExp(
|
|
1157
|
+
return ae(e)(t, n, o);
|
|
1158
|
+
}, Fn = (e) => async (t, n, r) => ae(e)(t, n, r), Kn = /^[cC][^\s-]{8,}$/, Vn = /^[0-9a-z]+$/, Wn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Gn = /^[0-9a-vA-V]{20}$/, Bn = /^[A-Za-z0-9]{27}$/, Jn = /^[a-zA-Z0-9_-]{21}$/, Hn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Yn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, je = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, qn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Xn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1159
|
+
function Qn() {
|
|
1160
|
+
return new RegExp(Xn, "u");
|
|
1161
1161
|
}
|
|
1162
|
-
const
|
|
1163
|
-
function
|
|
1162
|
+
const er = /^(?:(?: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])$/, tr = /^(([0-9a-fA-F]{1,4}:){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}|:))$/, nr = /^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/, rr = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, or = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, yt = /^[A-Za-z0-9_-]*$/, sr = /^\+(?:[0-9]){6,14}[0-9]$/, kt = "(?:(?:\\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])))", ir = /* @__PURE__ */ new RegExp(`^${kt}$`);
|
|
1163
|
+
function Et(e) {
|
|
1164
1164
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
1165
1165
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1168
|
-
return new RegExp(`^${
|
|
1167
|
+
function cr(e) {
|
|
1168
|
+
return new RegExp(`^${Et(e)}$`);
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1171
|
-
const t =
|
|
1170
|
+
function ur(e) {
|
|
1171
|
+
const t = Et({ precision: e.precision }), n = ["Z"];
|
|
1172
1172
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
1173
1173
|
const r = `${t}(?:${n.join("|")})`;
|
|
1174
|
-
return new RegExp(`^${
|
|
1174
|
+
return new RegExp(`^${kt}T(?:${r})$`);
|
|
1175
1175
|
}
|
|
1176
|
-
const
|
|
1176
|
+
const ar = (e) => {
|
|
1177
1177
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
1178
1178
|
return new RegExp(`^${t}$`);
|
|
1179
|
-
},
|
|
1179
|
+
}, lr = /^-?\d+$/, hr = /^-?\d+(?:\.\d+)?/, dr = /^(?:true|false)$/i, fr = /^null$/i, pr = /^[^A-Z]*$/, mr = /^[^a-z]*$/, E = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
1180
1180
|
var n;
|
|
1181
1181
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
1182
|
-
}),
|
|
1182
|
+
}), zt = {
|
|
1183
1183
|
number: "number",
|
|
1184
1184
|
bigint: "bigint",
|
|
1185
1185
|
object: "date"
|
|
1186
|
-
},
|
|
1186
|
+
}, $t = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
|
|
1187
1187
|
E.init(e, t);
|
|
1188
|
-
const n =
|
|
1188
|
+
const n = zt[typeof t.value];
|
|
1189
1189
|
e._zod.onattach.push((r) => {
|
|
1190
1190
|
const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
1191
1191
|
t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
|
|
@@ -1200,9 +1200,9 @@ const or = (e) => {
|
|
|
1200
1200
|
continue: !t.abort
|
|
1201
1201
|
});
|
|
1202
1202
|
};
|
|
1203
|
-
}),
|
|
1203
|
+
}), Zt = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
|
|
1204
1204
|
E.init(e, t);
|
|
1205
|
-
const n =
|
|
1205
|
+
const n = zt[typeof t.value];
|
|
1206
1206
|
e._zod.onattach.push((r) => {
|
|
1207
1207
|
const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
1208
1208
|
t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
|
|
@@ -1217,14 +1217,14 @@ const or = (e) => {
|
|
|
1217
1217
|
continue: !t.abort
|
|
1218
1218
|
});
|
|
1219
1219
|
};
|
|
1220
|
-
}),
|
|
1220
|
+
}), _r = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
|
|
1221
1221
|
E.init(e, t), e._zod.onattach.push((n) => {
|
|
1222
1222
|
var r;
|
|
1223
1223
|
(r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
|
|
1224
1224
|
}), e._zod.check = (n) => {
|
|
1225
1225
|
if (typeof n.value != typeof t.value)
|
|
1226
1226
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
1227
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
1227
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : vn(n.value, t.value) === 0) || n.issues.push({
|
|
1228
1228
|
origin: typeof n.value,
|
|
1229
1229
|
code: "not_multiple_of",
|
|
1230
1230
|
divisor: t.value,
|
|
@@ -1233,12 +1233,12 @@ const or = (e) => {
|
|
|
1233
1233
|
continue: !t.abort
|
|
1234
1234
|
});
|
|
1235
1235
|
};
|
|
1236
|
-
}),
|
|
1236
|
+
}), gr = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
|
|
1237
1237
|
E.init(e, t), t.format = t.format || "float64";
|
|
1238
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] =
|
|
1238
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = En[t.format];
|
|
1239
1239
|
e._zod.onattach.push((i) => {
|
|
1240
1240
|
const c = i._zod.bag;
|
|
1241
|
-
c.format = t.format, c.minimum = o, c.maximum = s, n && (c.pattern =
|
|
1241
|
+
c.format = t.format, c.minimum = o, c.maximum = s, n && (c.pattern = lr);
|
|
1242
1242
|
}), e._zod.check = (i) => {
|
|
1243
1243
|
const c = i.value;
|
|
1244
1244
|
if (n) {
|
|
@@ -1290,11 +1290,11 @@ const or = (e) => {
|
|
|
1290
1290
|
inst: e
|
|
1291
1291
|
});
|
|
1292
1292
|
};
|
|
1293
|
-
}),
|
|
1293
|
+
}), vr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
|
|
1294
1294
|
var n;
|
|
1295
1295
|
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
1296
1296
|
const o = r.value;
|
|
1297
|
-
return !
|
|
1297
|
+
return !Ee(o) && o.length !== void 0;
|
|
1298
1298
|
}), e._zod.onattach.push((r) => {
|
|
1299
1299
|
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
1300
1300
|
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
@@ -1302,7 +1302,7 @@ const or = (e) => {
|
|
|
1302
1302
|
const o = r.value;
|
|
1303
1303
|
if (o.length <= t.maximum)
|
|
1304
1304
|
return;
|
|
1305
|
-
const i =
|
|
1305
|
+
const i = $e(o);
|
|
1306
1306
|
r.issues.push({
|
|
1307
1307
|
origin: i,
|
|
1308
1308
|
code: "too_big",
|
|
@@ -1313,11 +1313,11 @@ const or = (e) => {
|
|
|
1313
1313
|
continue: !t.abort
|
|
1314
1314
|
});
|
|
1315
1315
|
};
|
|
1316
|
-
}),
|
|
1316
|
+
}), br = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
1317
1317
|
var n;
|
|
1318
1318
|
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
1319
1319
|
const o = r.value;
|
|
1320
|
-
return !
|
|
1320
|
+
return !Ee(o) && o.length !== void 0;
|
|
1321
1321
|
}), e._zod.onattach.push((r) => {
|
|
1322
1322
|
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
1323
1323
|
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
@@ -1325,7 +1325,7 @@ const or = (e) => {
|
|
|
1325
1325
|
const o = r.value;
|
|
1326
1326
|
if (o.length >= t.minimum)
|
|
1327
1327
|
return;
|
|
1328
|
-
const i =
|
|
1328
|
+
const i = $e(o);
|
|
1329
1329
|
r.issues.push({
|
|
1330
1330
|
origin: i,
|
|
1331
1331
|
code: "too_small",
|
|
@@ -1336,11 +1336,11 @@ const or = (e) => {
|
|
|
1336
1336
|
continue: !t.abort
|
|
1337
1337
|
});
|
|
1338
1338
|
};
|
|
1339
|
-
}),
|
|
1339
|
+
}), wr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
1340
1340
|
var n;
|
|
1341
1341
|
E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
1342
1342
|
const o = r.value;
|
|
1343
|
-
return !
|
|
1343
|
+
return !Ee(o) && o.length !== void 0;
|
|
1344
1344
|
}), e._zod.onattach.push((r) => {
|
|
1345
1345
|
const o = r._zod.bag;
|
|
1346
1346
|
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
@@ -1348,7 +1348,7 @@ const or = (e) => {
|
|
|
1348
1348
|
const o = r.value, s = o.length;
|
|
1349
1349
|
if (s === t.length)
|
|
1350
1350
|
return;
|
|
1351
|
-
const i =
|
|
1351
|
+
const i = $e(o), c = s > t.length;
|
|
1352
1352
|
r.issues.push({
|
|
1353
1353
|
origin: i,
|
|
1354
1354
|
...c ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -1359,7 +1359,7 @@ const or = (e) => {
|
|
|
1359
1359
|
continue: !t.abort
|
|
1360
1360
|
});
|
|
1361
1361
|
};
|
|
1362
|
-
}),
|
|
1362
|
+
}), le = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
|
|
1363
1363
|
var n, r;
|
|
1364
1364
|
E.init(e, t), e._zod.onattach.push((o) => {
|
|
1365
1365
|
const s = o._zod.bag;
|
|
@@ -1376,8 +1376,8 @@ const or = (e) => {
|
|
|
1376
1376
|
});
|
|
1377
1377
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
1378
1378
|
});
|
|
1379
|
-
}),
|
|
1380
|
-
|
|
1379
|
+
}), yr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
|
|
1380
|
+
le.init(e, t), e._zod.check = (n) => {
|
|
1381
1381
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
1382
1382
|
origin: "string",
|
|
1383
1383
|
code: "invalid_format",
|
|
@@ -1388,11 +1388,11 @@ const or = (e) => {
|
|
|
1388
1388
|
continue: !t.abort
|
|
1389
1389
|
});
|
|
1390
1390
|
};
|
|
1391
|
-
}),
|
|
1392
|
-
t.pattern ?? (t.pattern =
|
|
1393
|
-
}),
|
|
1394
|
-
t.pattern ?? (t.pattern =
|
|
1395
|
-
}),
|
|
1391
|
+
}), kr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
|
|
1392
|
+
t.pattern ?? (t.pattern = pr), le.init(e, t);
|
|
1393
|
+
}), Er = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
1394
|
+
t.pattern ?? (t.pattern = mr), le.init(e, t);
|
|
1395
|
+
}), zr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
1396
1396
|
E.init(e, t);
|
|
1397
1397
|
const n = V(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
1398
1398
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
@@ -1409,7 +1409,7 @@ const or = (e) => {
|
|
|
1409
1409
|
continue: !t.abort
|
|
1410
1410
|
});
|
|
1411
1411
|
};
|
|
1412
|
-
}),
|
|
1412
|
+
}), $r = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
|
|
1413
1413
|
E.init(e, t);
|
|
1414
1414
|
const n = new RegExp(`^${V(t.prefix)}.*`);
|
|
1415
1415
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
@@ -1426,7 +1426,7 @@ const or = (e) => {
|
|
|
1426
1426
|
continue: !t.abort
|
|
1427
1427
|
});
|
|
1428
1428
|
};
|
|
1429
|
-
}),
|
|
1429
|
+
}), Zr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
|
|
1430
1430
|
E.init(e, t);
|
|
1431
1431
|
const n = new RegExp(`.*${V(t.suffix)}$`);
|
|
1432
1432
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
@@ -1443,12 +1443,12 @@ const or = (e) => {
|
|
|
1443
1443
|
continue: !t.abort
|
|
1444
1444
|
});
|
|
1445
1445
|
};
|
|
1446
|
-
}),
|
|
1446
|
+
}), Sr = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
|
|
1447
1447
|
E.init(e, t), e._zod.check = (n) => {
|
|
1448
1448
|
n.value = t.tx(n.value);
|
|
1449
1449
|
};
|
|
1450
1450
|
});
|
|
1451
|
-
class
|
|
1451
|
+
class Or {
|
|
1452
1452
|
constructor(t = []) {
|
|
1453
1453
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
1454
1454
|
}
|
|
@@ -1471,13 +1471,13 @@ class kr {
|
|
|
1471
1471
|
`));
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
const
|
|
1474
|
+
const Tr = {
|
|
1475
1475
|
major: 4,
|
|
1476
1476
|
minor: 1,
|
|
1477
1477
|
patch: 13
|
|
1478
1478
|
}, g = /* @__PURE__ */ u("$ZodType", (e, t) => {
|
|
1479
1479
|
var n;
|
|
1480
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
1480
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Tr;
|
|
1481
1481
|
const r = [...e._zod.def.checks ?? []];
|
|
1482
1482
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
1483
1483
|
for (const o of r)
|
|
@@ -1489,34 +1489,34 @@ const Er = {
|
|
|
1489
1489
|
});
|
|
1490
1490
|
else {
|
|
1491
1491
|
const o = (i, c, a) => {
|
|
1492
|
-
let l =
|
|
1493
|
-
for (const
|
|
1494
|
-
if (
|
|
1495
|
-
if (!
|
|
1492
|
+
let l = M(i), h;
|
|
1493
|
+
for (const f of c) {
|
|
1494
|
+
if (f._zod.def.when) {
|
|
1495
|
+
if (!f._zod.def.when(i))
|
|
1496
1496
|
continue;
|
|
1497
1497
|
} else if (l)
|
|
1498
1498
|
continue;
|
|
1499
|
-
const d = i.issues.length, m =
|
|
1499
|
+
const d = i.issues.length, m = f._zod.check(i);
|
|
1500
1500
|
if (m instanceof Promise && a?.async === !1)
|
|
1501
|
-
throw new
|
|
1501
|
+
throw new F();
|
|
1502
1502
|
if (h || m instanceof Promise)
|
|
1503
1503
|
h = (h ?? Promise.resolve()).then(async () => {
|
|
1504
|
-
await m, i.issues.length !== d && (l || (l =
|
|
1504
|
+
await m, i.issues.length !== d && (l || (l = M(i, d)));
|
|
1505
1505
|
});
|
|
1506
1506
|
else {
|
|
1507
1507
|
if (i.issues.length === d)
|
|
1508
1508
|
continue;
|
|
1509
|
-
l || (l =
|
|
1509
|
+
l || (l = M(i, d));
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
return h ? h.then(() => i) : i;
|
|
1513
1513
|
}, s = (i, c, a) => {
|
|
1514
|
-
if (
|
|
1514
|
+
if (M(i))
|
|
1515
1515
|
return i.aborted = !0, i;
|
|
1516
1516
|
const l = o(c, r, a);
|
|
1517
1517
|
if (l instanceof Promise) {
|
|
1518
1518
|
if (a.async === !1)
|
|
1519
|
-
throw new
|
|
1519
|
+
throw new F();
|
|
1520
1520
|
return l.then((h) => e._zod.parse(h, a));
|
|
1521
1521
|
}
|
|
1522
1522
|
return e._zod.parse(l, a);
|
|
@@ -1531,7 +1531,7 @@ const Er = {
|
|
|
1531
1531
|
const a = e._zod.parse(i, c);
|
|
1532
1532
|
if (a instanceof Promise) {
|
|
1533
1533
|
if (c.async === !1)
|
|
1534
|
-
throw new
|
|
1534
|
+
throw new F();
|
|
1535
1535
|
return a.then((l) => o(l, r, c));
|
|
1536
1536
|
}
|
|
1537
1537
|
return o(a, r, c);
|
|
@@ -1540,17 +1540,17 @@ const Er = {
|
|
|
1540
1540
|
e["~standard"] = {
|
|
1541
1541
|
validate: (o) => {
|
|
1542
1542
|
try {
|
|
1543
|
-
const s =
|
|
1543
|
+
const s = An(e, o);
|
|
1544
1544
|
return s.success ? { value: s.data } : { issues: s.error?.issues };
|
|
1545
1545
|
} catch {
|
|
1546
|
-
return
|
|
1546
|
+
return Rn(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
|
|
1547
1547
|
}
|
|
1548
1548
|
},
|
|
1549
1549
|
vendor: "zod",
|
|
1550
1550
|
version: 1
|
|
1551
1551
|
};
|
|
1552
|
-
}),
|
|
1553
|
-
g.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
1552
|
+
}), Oe = /* @__PURE__ */ u("$ZodString", (e, t) => {
|
|
1553
|
+
g.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? ar(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1554
1554
|
if (t.coerce)
|
|
1555
1555
|
try {
|
|
1556
1556
|
n.value = String(n.value);
|
|
@@ -1564,10 +1564,10 @@ const Er = {
|
|
|
1564
1564
|
}), n;
|
|
1565
1565
|
};
|
|
1566
1566
|
}), b = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
|
|
1567
|
-
|
|
1568
|
-
}),
|
|
1569
|
-
t.pattern ?? (t.pattern =
|
|
1570
|
-
}),
|
|
1567
|
+
le.init(e, t), Oe.init(e, t);
|
|
1568
|
+
}), Ir = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
|
|
1569
|
+
t.pattern ?? (t.pattern = Yn), b.init(e, t);
|
|
1570
|
+
}), Pr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
|
|
1571
1571
|
if (t.version) {
|
|
1572
1572
|
const r = {
|
|
1573
1573
|
v1: 1,
|
|
@@ -1581,13 +1581,13 @@ const Er = {
|
|
|
1581
1581
|
}[t.version];
|
|
1582
1582
|
if (r === void 0)
|
|
1583
1583
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
1584
|
-
t.pattern ?? (t.pattern =
|
|
1584
|
+
t.pattern ?? (t.pattern = je(r));
|
|
1585
1585
|
} else
|
|
1586
|
-
t.pattern ?? (t.pattern =
|
|
1586
|
+
t.pattern ?? (t.pattern = je());
|
|
1587
1587
|
b.init(e, t);
|
|
1588
|
-
}),
|
|
1589
|
-
t.pattern ?? (t.pattern =
|
|
1590
|
-
}),
|
|
1588
|
+
}), Cr = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
|
|
1589
|
+
t.pattern ?? (t.pattern = qn), b.init(e, t);
|
|
1590
|
+
}), Ar = /* @__PURE__ */ u("$ZodURL", (e, t) => {
|
|
1591
1591
|
b.init(e, t), e._zod.check = (n) => {
|
|
1592
1592
|
try {
|
|
1593
1593
|
const r = n.value.trim(), o = new URL(r);
|
|
@@ -1619,32 +1619,32 @@ const Er = {
|
|
|
1619
1619
|
});
|
|
1620
1620
|
}
|
|
1621
1621
|
};
|
|
1622
|
-
}),
|
|
1623
|
-
t.pattern ?? (t.pattern =
|
|
1624
|
-
}),
|
|
1622
|
+
}), Rr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
|
|
1623
|
+
t.pattern ?? (t.pattern = Qn()), b.init(e, t);
|
|
1624
|
+
}), Nr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
|
|
1625
|
+
t.pattern ?? (t.pattern = Jn), b.init(e, t);
|
|
1626
|
+
}), Dr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
|
|
1627
|
+
t.pattern ?? (t.pattern = Kn), b.init(e, t);
|
|
1628
|
+
}), xr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
1625
1629
|
t.pattern ?? (t.pattern = Vn), b.init(e, t);
|
|
1626
|
-
}),
|
|
1627
|
-
t.pattern ?? (t.pattern = Ln), b.init(e, t);
|
|
1628
|
-
}), Pr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
1629
|
-
t.pattern ?? (t.pattern = jn), b.init(e, t);
|
|
1630
|
-
}), Cr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
|
|
1631
|
-
t.pattern ?? (t.pattern = Un), b.init(e, t);
|
|
1632
|
-
}), Ar = /* @__PURE__ */ u("$ZodXID", (e, t) => {
|
|
1633
|
-
t.pattern ?? (t.pattern = Mn), b.init(e, t);
|
|
1634
|
-
}), Rr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
|
|
1635
|
-
t.pattern ?? (t.pattern = Fn), b.init(e, t);
|
|
1636
|
-
}), Nr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
|
|
1637
|
-
t.pattern ?? (t.pattern = rr(t)), b.init(e, t);
|
|
1638
|
-
}), xr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
|
|
1639
|
-
t.pattern ?? (t.pattern = tr), b.init(e, t);
|
|
1640
|
-
}), Dr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
|
|
1641
|
-
t.pattern ?? (t.pattern = nr(t)), b.init(e, t);
|
|
1642
|
-
}), Lr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
1630
|
+
}), jr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
|
|
1643
1631
|
t.pattern ?? (t.pattern = Wn), b.init(e, t);
|
|
1644
|
-
}),
|
|
1645
|
-
t.pattern ?? (t.pattern =
|
|
1646
|
-
}), Ur = /* @__PURE__ */ u("$
|
|
1647
|
-
t.pattern ?? (t.pattern =
|
|
1632
|
+
}), Lr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
|
|
1633
|
+
t.pattern ?? (t.pattern = Gn), b.init(e, t);
|
|
1634
|
+
}), Ur = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
|
|
1635
|
+
t.pattern ?? (t.pattern = Bn), b.init(e, t);
|
|
1636
|
+
}), Mr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
|
|
1637
|
+
t.pattern ?? (t.pattern = ur(t)), b.init(e, t);
|
|
1638
|
+
}), Fr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
|
|
1639
|
+
t.pattern ?? (t.pattern = ir), b.init(e, t);
|
|
1640
|
+
}), Kr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
|
|
1641
|
+
t.pattern ?? (t.pattern = cr(t)), b.init(e, t);
|
|
1642
|
+
}), Vr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
1643
|
+
t.pattern ?? (t.pattern = Hn), b.init(e, t);
|
|
1644
|
+
}), Wr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
|
|
1645
|
+
t.pattern ?? (t.pattern = er), b.init(e, t), e._zod.bag.format = "ipv4";
|
|
1646
|
+
}), Gr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
|
|
1647
|
+
t.pattern ?? (t.pattern = tr), b.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1648
1648
|
try {
|
|
1649
1649
|
new URL(`http://[${n.value}]`);
|
|
1650
1650
|
} catch {
|
|
@@ -1657,10 +1657,10 @@ const Er = {
|
|
|
1657
1657
|
});
|
|
1658
1658
|
}
|
|
1659
1659
|
};
|
|
1660
|
-
}),
|
|
1661
|
-
t.pattern ?? (t.pattern =
|
|
1662
|
-
}),
|
|
1663
|
-
t.pattern ?? (t.pattern =
|
|
1660
|
+
}), Br = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
|
|
1661
|
+
t.pattern ?? (t.pattern = nr), b.init(e, t);
|
|
1662
|
+
}), Jr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
|
|
1663
|
+
t.pattern ?? (t.pattern = rr), b.init(e, t), e._zod.check = (n) => {
|
|
1664
1664
|
const r = n.value.split("/");
|
|
1665
1665
|
try {
|
|
1666
1666
|
if (r.length !== 2)
|
|
@@ -1685,7 +1685,7 @@ const Er = {
|
|
|
1685
1685
|
}
|
|
1686
1686
|
};
|
|
1687
1687
|
});
|
|
1688
|
-
function
|
|
1688
|
+
function St(e) {
|
|
1689
1689
|
if (e === "")
|
|
1690
1690
|
return !0;
|
|
1691
1691
|
if (e.length % 4 !== 0)
|
|
@@ -1696,9 +1696,9 @@ function kt(e) {
|
|
|
1696
1696
|
return !1;
|
|
1697
1697
|
}
|
|
1698
1698
|
}
|
|
1699
|
-
const
|
|
1700
|
-
t.pattern ?? (t.pattern =
|
|
1701
|
-
|
|
1699
|
+
const Hr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
1700
|
+
t.pattern ?? (t.pattern = or), b.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1701
|
+
St(n.value) || n.issues.push({
|
|
1702
1702
|
code: "invalid_format",
|
|
1703
1703
|
format: "base64",
|
|
1704
1704
|
input: n.value,
|
|
@@ -1707,15 +1707,15 @@ const Vr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
|
1707
1707
|
});
|
|
1708
1708
|
};
|
|
1709
1709
|
});
|
|
1710
|
-
function
|
|
1711
|
-
if (!
|
|
1710
|
+
function Yr(e) {
|
|
1711
|
+
if (!yt.test(e))
|
|
1712
1712
|
return !1;
|
|
1713
1713
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
1714
|
-
return
|
|
1714
|
+
return St(n);
|
|
1715
1715
|
}
|
|
1716
|
-
const
|
|
1717
|
-
t.pattern ?? (t.pattern =
|
|
1718
|
-
|
|
1716
|
+
const qr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
1717
|
+
t.pattern ?? (t.pattern = yt), b.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1718
|
+
Yr(n.value) || n.issues.push({
|
|
1719
1719
|
code: "invalid_format",
|
|
1720
1720
|
format: "base64url",
|
|
1721
1721
|
input: n.value,
|
|
@@ -1723,10 +1723,10 @@ const Kr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
|
1723
1723
|
continue: !t.abort
|
|
1724
1724
|
});
|
|
1725
1725
|
};
|
|
1726
|
-
}),
|
|
1727
|
-
t.pattern ?? (t.pattern =
|
|
1726
|
+
}), Xr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
|
|
1727
|
+
t.pattern ?? (t.pattern = sr), b.init(e, t);
|
|
1728
1728
|
});
|
|
1729
|
-
function
|
|
1729
|
+
function Qr(e, t = null) {
|
|
1730
1730
|
try {
|
|
1731
1731
|
const n = e.split(".");
|
|
1732
1732
|
if (n.length !== 3)
|
|
@@ -1740,9 +1740,9 @@ function Jr(e, t = null) {
|
|
|
1740
1740
|
return !1;
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
const
|
|
1743
|
+
const eo = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
1744
1744
|
b.init(e, t), e._zod.check = (n) => {
|
|
1745
|
-
|
|
1745
|
+
Qr(n.value, t.alg) || n.issues.push({
|
|
1746
1746
|
code: "invalid_format",
|
|
1747
1747
|
format: "jwt",
|
|
1748
1748
|
input: n.value,
|
|
@@ -1750,8 +1750,8 @@ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1750
1750
|
continue: !t.abort
|
|
1751
1751
|
});
|
|
1752
1752
|
};
|
|
1753
|
-
}),
|
|
1754
|
-
g.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
1753
|
+
}), Ot = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
|
|
1754
|
+
g.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? hr, e._zod.parse = (n, r) => {
|
|
1755
1755
|
if (t.coerce)
|
|
1756
1756
|
try {
|
|
1757
1757
|
n.value = Number(n.value);
|
|
@@ -1769,10 +1769,25 @@ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1769
1769
|
...s ? { received: s } : {}
|
|
1770
1770
|
}), n;
|
|
1771
1771
|
};
|
|
1772
|
-
}),
|
|
1773
|
-
|
|
1774
|
-
}),
|
|
1775
|
-
g.init(e, t), e._zod.pattern =
|
|
1772
|
+
}), to = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
|
|
1773
|
+
gr.init(e, t), Ot.init(e, t);
|
|
1774
|
+
}), no = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
|
|
1775
|
+
g.init(e, t), e._zod.pattern = dr, e._zod.parse = (n, r) => {
|
|
1776
|
+
if (t.coerce)
|
|
1777
|
+
try {
|
|
1778
|
+
n.value = !!n.value;
|
|
1779
|
+
} catch {
|
|
1780
|
+
}
|
|
1781
|
+
const o = n.value;
|
|
1782
|
+
return typeof o == "boolean" || n.issues.push({
|
|
1783
|
+
expected: "boolean",
|
|
1784
|
+
code: "invalid_type",
|
|
1785
|
+
input: o,
|
|
1786
|
+
inst: e
|
|
1787
|
+
}), n;
|
|
1788
|
+
};
|
|
1789
|
+
}), ro = /* @__PURE__ */ u("$ZodNull", (e, t) => {
|
|
1790
|
+
g.init(e, t), e._zod.pattern = fr, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, r) => {
|
|
1776
1791
|
const o = n.value;
|
|
1777
1792
|
return o === null || n.issues.push({
|
|
1778
1793
|
expected: "null",
|
|
@@ -1781,9 +1796,9 @@ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1781
1796
|
inst: e
|
|
1782
1797
|
}), n;
|
|
1783
1798
|
};
|
|
1784
|
-
}),
|
|
1799
|
+
}), oo = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
|
|
1785
1800
|
g.init(e, t), e._zod.parse = (n) => n;
|
|
1786
|
-
}),
|
|
1801
|
+
}), so = /* @__PURE__ */ u("$ZodNever", (e, t) => {
|
|
1787
1802
|
g.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
1788
1803
|
expected: "never",
|
|
1789
1804
|
code: "invalid_type",
|
|
@@ -1791,10 +1806,10 @@ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1791
1806
|
inst: e
|
|
1792
1807
|
}), n);
|
|
1793
1808
|
});
|
|
1794
|
-
function
|
|
1809
|
+
function Le(e, t, n) {
|
|
1795
1810
|
e.issues.length && t.issues.push(...x(n, e.issues)), t.value[n] = e.value;
|
|
1796
1811
|
}
|
|
1797
|
-
const
|
|
1812
|
+
const io = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
1798
1813
|
g.init(e, t), e._zod.parse = (n, r) => {
|
|
1799
1814
|
const o = n.value;
|
|
1800
1815
|
if (!Array.isArray(o))
|
|
@@ -1811,20 +1826,20 @@ const Qr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
|
1811
1826
|
value: c,
|
|
1812
1827
|
issues: []
|
|
1813
1828
|
}, r);
|
|
1814
|
-
a instanceof Promise ? s.push(a.then((l) =>
|
|
1829
|
+
a instanceof Promise ? s.push(a.then((l) => Le(l, n, i))) : Le(a, n, i);
|
|
1815
1830
|
}
|
|
1816
1831
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
1817
1832
|
};
|
|
1818
1833
|
});
|
|
1819
|
-
function
|
|
1834
|
+
function se(e, t, n, r) {
|
|
1820
1835
|
e.issues.length && t.issues.push(...x(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1821
1836
|
}
|
|
1822
|
-
function
|
|
1837
|
+
function Tt(e) {
|
|
1823
1838
|
const t = Object.keys(e.shape);
|
|
1824
1839
|
for (const r of t)
|
|
1825
1840
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
1826
1841
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
1827
|
-
const n =
|
|
1842
|
+
const n = kn(e.shape);
|
|
1828
1843
|
return {
|
|
1829
1844
|
...e,
|
|
1830
1845
|
keys: t,
|
|
@@ -1833,7 +1848,7 @@ function zt(e) {
|
|
|
1833
1848
|
optionalKeys: new Set(n)
|
|
1834
1849
|
};
|
|
1835
1850
|
}
|
|
1836
|
-
function
|
|
1851
|
+
function It(e, t, n, r, o, s) {
|
|
1837
1852
|
const i = [], c = o.keySet, a = o.catchall._zod, l = a.def.type;
|
|
1838
1853
|
for (const h in t) {
|
|
1839
1854
|
if (c.has(h))
|
|
@@ -1842,8 +1857,8 @@ function $t(e, t, n, r, o, s) {
|
|
|
1842
1857
|
i.push(h);
|
|
1843
1858
|
continue;
|
|
1844
1859
|
}
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1860
|
+
const f = a.run({ value: t[h], issues: [] }, r);
|
|
1861
|
+
f instanceof Promise ? e.push(f.then((d) => se(d, n, h, t))) : se(f, n, h, t);
|
|
1847
1862
|
}
|
|
1848
1863
|
return i.length && n.issues.push({
|
|
1849
1864
|
code: "unrecognized_keys",
|
|
@@ -1852,7 +1867,7 @@ function $t(e, t, n, r, o, s) {
|
|
|
1852
1867
|
inst: s
|
|
1853
1868
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1854
1869
|
}
|
|
1855
|
-
const
|
|
1870
|
+
const co = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
1856
1871
|
if (g.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1857
1872
|
const c = t.shape;
|
|
1858
1873
|
Object.defineProperty(t, "shape", {
|
|
@@ -1864,20 +1879,20 @@ const eo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1864
1879
|
}
|
|
1865
1880
|
});
|
|
1866
1881
|
}
|
|
1867
|
-
const r =
|
|
1882
|
+
const r = ke(() => Tt(t));
|
|
1868
1883
|
_(e._zod, "propValues", () => {
|
|
1869
1884
|
const c = t.shape, a = {};
|
|
1870
1885
|
for (const l in c) {
|
|
1871
1886
|
const h = c[l]._zod;
|
|
1872
1887
|
if (h.values) {
|
|
1873
1888
|
a[l] ?? (a[l] = /* @__PURE__ */ new Set());
|
|
1874
|
-
for (const
|
|
1875
|
-
a[l].add(
|
|
1889
|
+
for (const f of h.values)
|
|
1890
|
+
a[l].add(f);
|
|
1876
1891
|
}
|
|
1877
1892
|
}
|
|
1878
1893
|
return a;
|
|
1879
1894
|
});
|
|
1880
|
-
const o =
|
|
1895
|
+
const o = oe, s = t.catchall;
|
|
1881
1896
|
let i;
|
|
1882
1897
|
e._zod.parse = (c, a) => {
|
|
1883
1898
|
i ?? (i = r.value);
|
|
@@ -1890,58 +1905,58 @@ const eo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1890
1905
|
inst: e
|
|
1891
1906
|
}), c;
|
|
1892
1907
|
c.value = {};
|
|
1893
|
-
const h = [],
|
|
1908
|
+
const h = [], f = i.shape;
|
|
1894
1909
|
for (const d of i.keys) {
|
|
1895
|
-
const k =
|
|
1896
|
-
k instanceof Promise ? h.push(k.then((
|
|
1910
|
+
const k = f[d]._zod.run({ value: l[d], issues: [] }, a);
|
|
1911
|
+
k instanceof Promise ? h.push(k.then((I) => se(I, c, d, l))) : se(k, c, d, l);
|
|
1897
1912
|
}
|
|
1898
|
-
return s ?
|
|
1913
|
+
return s ? It(h, l, c, a, r.value, e) : h.length ? Promise.all(h).then(() => c) : c;
|
|
1899
1914
|
};
|
|
1900
|
-
}),
|
|
1901
|
-
|
|
1902
|
-
const n = e._zod.parse, r =
|
|
1903
|
-
const m = new
|
|
1904
|
-
const z =
|
|
1915
|
+
}), uo = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
|
|
1916
|
+
co.init(e, t);
|
|
1917
|
+
const n = e._zod.parse, r = ke(() => Tt(t)), o = (d) => {
|
|
1918
|
+
const m = new Or(["shape", "payload", "ctx"]), k = r.value, I = (S) => {
|
|
1919
|
+
const z = xe(S);
|
|
1905
1920
|
return `shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`;
|
|
1906
1921
|
};
|
|
1907
1922
|
m.write("const input = payload.value;");
|
|
1908
|
-
const
|
|
1909
|
-
let
|
|
1923
|
+
const H = /* @__PURE__ */ Object.create(null);
|
|
1924
|
+
let de = 0;
|
|
1910
1925
|
for (const S of k.keys)
|
|
1911
|
-
|
|
1926
|
+
H[S] = `key_${de++}`;
|
|
1912
1927
|
m.write("const newResult = {};");
|
|
1913
1928
|
for (const S of k.keys) {
|
|
1914
|
-
const z =
|
|
1915
|
-
m.write(`const ${z} = ${
|
|
1929
|
+
const z = H[S], N = xe(S);
|
|
1930
|
+
m.write(`const ${z} = ${I(S)};`), m.write(`
|
|
1916
1931
|
if (${z}.issues.length) {
|
|
1917
1932
|
payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
|
|
1918
1933
|
...iss,
|
|
1919
|
-
path: iss.path ? [${
|
|
1934
|
+
path: iss.path ? [${N}, ...iss.path] : [${N}]
|
|
1920
1935
|
})));
|
|
1921
1936
|
}
|
|
1922
1937
|
|
|
1923
1938
|
|
|
1924
1939
|
if (${z}.value === undefined) {
|
|
1925
|
-
if (${
|
|
1926
|
-
newResult[${
|
|
1940
|
+
if (${N} in input) {
|
|
1941
|
+
newResult[${N}] = undefined;
|
|
1927
1942
|
}
|
|
1928
1943
|
} else {
|
|
1929
|
-
newResult[${
|
|
1944
|
+
newResult[${N}] = ${z}.value;
|
|
1930
1945
|
}
|
|
1931
1946
|
|
|
1932
1947
|
`);
|
|
1933
1948
|
}
|
|
1934
1949
|
m.write("payload.value = newResult;"), m.write("return payload;");
|
|
1935
|
-
const
|
|
1936
|
-
return (S, z) =>
|
|
1950
|
+
const fe = m.compile();
|
|
1951
|
+
return (S, z) => fe(d, S, z);
|
|
1937
1952
|
};
|
|
1938
1953
|
let s;
|
|
1939
|
-
const i =
|
|
1940
|
-
let
|
|
1954
|
+
const i = oe, c = !mt.jitless, l = c && wn.value, h = t.catchall;
|
|
1955
|
+
let f;
|
|
1941
1956
|
e._zod.parse = (d, m) => {
|
|
1942
|
-
|
|
1957
|
+
f ?? (f = r.value);
|
|
1943
1958
|
const k = d.value;
|
|
1944
|
-
return i(k) ? c && l && m?.async === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), d = s(d, m), h ?
|
|
1959
|
+
return i(k) ? c && l && m?.async === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), d = s(d, m), h ? It([], k, d, m, f, e) : d) : n(d, m) : (d.issues.push({
|
|
1945
1960
|
expected: "object",
|
|
1946
1961
|
code: "invalid_type",
|
|
1947
1962
|
input: k,
|
|
@@ -1949,26 +1964,26 @@ const eo = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1949
1964
|
}), d);
|
|
1950
1965
|
};
|
|
1951
1966
|
});
|
|
1952
|
-
function
|
|
1967
|
+
function Ue(e, t, n, r) {
|
|
1953
1968
|
for (const s of e)
|
|
1954
1969
|
if (s.issues.length === 0)
|
|
1955
1970
|
return t.value = s.value, t;
|
|
1956
|
-
const o = e.filter((s) => !
|
|
1971
|
+
const o = e.filter((s) => !M(s));
|
|
1957
1972
|
return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
|
|
1958
1973
|
code: "invalid_union",
|
|
1959
1974
|
input: t.value,
|
|
1960
1975
|
inst: n,
|
|
1961
|
-
errors: e.map((s) => s.issues.map((i) =>
|
|
1976
|
+
errors: e.map((s) => s.issues.map((i) => A(i, r, C())))
|
|
1962
1977
|
}), t);
|
|
1963
1978
|
}
|
|
1964
|
-
const
|
|
1979
|
+
const ao = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
1965
1980
|
g.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
|
|
1966
1981
|
if (t.options.every((o) => o._zod.values))
|
|
1967
1982
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
1968
1983
|
}), _(e._zod, "pattern", () => {
|
|
1969
1984
|
if (t.options.every((o) => o._zod.pattern)) {
|
|
1970
1985
|
const o = t.options.map((s) => s._zod.pattern);
|
|
1971
|
-
return new RegExp(`^(${o.map((s) =>
|
|
1986
|
+
return new RegExp(`^(${o.map((s) => ze(s.source)).join("|")})$`);
|
|
1972
1987
|
}
|
|
1973
1988
|
});
|
|
1974
1989
|
const n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -1990,23 +2005,23 @@ const no = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
|
1990
2005
|
c.push(l);
|
|
1991
2006
|
}
|
|
1992
2007
|
}
|
|
1993
|
-
return i ? Promise.all(c).then((a) =>
|
|
2008
|
+
return i ? Promise.all(c).then((a) => Ue(a, o, e, s)) : Ue(c, o, e, s);
|
|
1994
2009
|
};
|
|
1995
|
-
}),
|
|
2010
|
+
}), lo = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1996
2011
|
g.init(e, t), e._zod.parse = (n, r) => {
|
|
1997
2012
|
const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
|
|
1998
|
-
return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) =>
|
|
2013
|
+
return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) => Me(n, a, l)) : Me(n, s, i);
|
|
1999
2014
|
};
|
|
2000
2015
|
});
|
|
2001
|
-
function
|
|
2016
|
+
function we(e, t) {
|
|
2002
2017
|
if (e === t)
|
|
2003
2018
|
return { valid: !0, data: e };
|
|
2004
2019
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
2005
2020
|
return { valid: !0, data: e };
|
|
2006
|
-
if (
|
|
2021
|
+
if (K(e) && K(t)) {
|
|
2007
2022
|
const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
|
|
2008
2023
|
for (const s of r) {
|
|
2009
|
-
const i =
|
|
2024
|
+
const i = we(e[s], t[s]);
|
|
2010
2025
|
if (!i.valid)
|
|
2011
2026
|
return {
|
|
2012
2027
|
valid: !1,
|
|
@@ -2021,7 +2036,7 @@ function ge(e, t) {
|
|
|
2021
2036
|
return { valid: !1, mergeErrorPath: [] };
|
|
2022
2037
|
const n = [];
|
|
2023
2038
|
for (let r = 0; r < e.length; r++) {
|
|
2024
|
-
const o = e[r], s = t[r], i =
|
|
2039
|
+
const o = e[r], s = t[r], i = we(o, s);
|
|
2025
2040
|
if (!i.valid)
|
|
2026
2041
|
return {
|
|
2027
2042
|
valid: !1,
|
|
@@ -2033,15 +2048,15 @@ function ge(e, t) {
|
|
|
2033
2048
|
}
|
|
2034
2049
|
return { valid: !1, mergeErrorPath: [] };
|
|
2035
2050
|
}
|
|
2036
|
-
function
|
|
2037
|
-
if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues),
|
|
2051
|
+
function Me(e, t, n) {
|
|
2052
|
+
if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), M(e))
|
|
2038
2053
|
return e;
|
|
2039
|
-
const r =
|
|
2054
|
+
const r = we(t.value, n.value);
|
|
2040
2055
|
if (!r.valid)
|
|
2041
2056
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
2042
2057
|
return e.value = r.data, e;
|
|
2043
2058
|
}
|
|
2044
|
-
const
|
|
2059
|
+
const ho = /* @__PURE__ */ u("$ZodTuple", (e, t) => {
|
|
2045
2060
|
g.init(e, t);
|
|
2046
2061
|
const n = t.items;
|
|
2047
2062
|
e._zod.parse = (r, o) => {
|
|
@@ -2056,8 +2071,8 @@ const oo = /* @__PURE__ */ u("$ZodTuple", (e, t) => {
|
|
|
2056
2071
|
r.value = [];
|
|
2057
2072
|
const i = [], c = [...n].reverse().findIndex((h) => h._zod.optin !== "optional"), a = c === -1 ? 0 : n.length - c;
|
|
2058
2073
|
if (!t.rest) {
|
|
2059
|
-
const h = s.length > n.length,
|
|
2060
|
-
if (h ||
|
|
2074
|
+
const h = s.length > n.length, f = s.length < a - 1;
|
|
2075
|
+
if (h || f)
|
|
2061
2076
|
return r.issues.push({
|
|
2062
2077
|
...h ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
|
|
2063
2078
|
input: s,
|
|
@@ -2069,33 +2084,33 @@ const oo = /* @__PURE__ */ u("$ZodTuple", (e, t) => {
|
|
|
2069
2084
|
for (const h of n) {
|
|
2070
2085
|
if (l++, l >= s.length && l >= a)
|
|
2071
2086
|
continue;
|
|
2072
|
-
const
|
|
2087
|
+
const f = h._zod.run({
|
|
2073
2088
|
value: s[l],
|
|
2074
2089
|
issues: []
|
|
2075
2090
|
}, o);
|
|
2076
|
-
|
|
2091
|
+
f instanceof Promise ? i.push(f.then((d) => Q(d, r, l))) : Q(f, r, l);
|
|
2077
2092
|
}
|
|
2078
2093
|
if (t.rest) {
|
|
2079
2094
|
const h = s.slice(n.length);
|
|
2080
|
-
for (const
|
|
2095
|
+
for (const f of h) {
|
|
2081
2096
|
l++;
|
|
2082
2097
|
const d = t.rest._zod.run({
|
|
2083
|
-
value:
|
|
2098
|
+
value: f,
|
|
2084
2099
|
issues: []
|
|
2085
2100
|
}, o);
|
|
2086
|
-
d instanceof Promise ? i.push(d.then((m) =>
|
|
2101
|
+
d instanceof Promise ? i.push(d.then((m) => Q(m, r, l))) : Q(d, r, l);
|
|
2087
2102
|
}
|
|
2088
2103
|
}
|
|
2089
2104
|
return i.length ? Promise.all(i).then(() => r) : r;
|
|
2090
2105
|
};
|
|
2091
2106
|
});
|
|
2092
|
-
function
|
|
2107
|
+
function Q(e, t, n) {
|
|
2093
2108
|
e.issues.length && t.issues.push(...x(n, e.issues)), t.value[n] = e.value;
|
|
2094
2109
|
}
|
|
2095
|
-
const
|
|
2110
|
+
const fo = /* @__PURE__ */ u("$ZodRecord", (e, t) => {
|
|
2096
2111
|
g.init(e, t), e._zod.parse = (n, r) => {
|
|
2097
2112
|
const o = n.value;
|
|
2098
|
-
if (!
|
|
2113
|
+
if (!K(o))
|
|
2099
2114
|
return n.issues.push({
|
|
2100
2115
|
expected: "record",
|
|
2101
2116
|
code: "invalid_type",
|
|
@@ -2110,8 +2125,8 @@ const so = /* @__PURE__ */ u("$ZodRecord", (e, t) => {
|
|
|
2110
2125
|
if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
|
|
2111
2126
|
c.add(typeof l == "number" ? l.toString() : l);
|
|
2112
2127
|
const h = t.valueType._zod.run({ value: o[l], issues: [] }, r);
|
|
2113
|
-
h instanceof Promise ? s.push(h.then((
|
|
2114
|
-
|
|
2128
|
+
h instanceof Promise ? s.push(h.then((f) => {
|
|
2129
|
+
f.issues.length && n.issues.push(...x(l, f.issues)), n.value[l] = f.value;
|
|
2115
2130
|
})) : (h.issues.length && n.issues.push(...x(l, h.issues)), n.value[l] = h.value);
|
|
2116
2131
|
}
|
|
2117
2132
|
let a;
|
|
@@ -2135,7 +2150,7 @@ const so = /* @__PURE__ */ u("$ZodRecord", (e, t) => {
|
|
|
2135
2150
|
n.issues.push({
|
|
2136
2151
|
code: "invalid_key",
|
|
2137
2152
|
origin: "record",
|
|
2138
|
-
issues: a.issues.map((h) =>
|
|
2153
|
+
issues: a.issues.map((h) => A(h, r, C())),
|
|
2139
2154
|
input: c,
|
|
2140
2155
|
path: [c],
|
|
2141
2156
|
inst: e
|
|
@@ -2150,10 +2165,10 @@ const so = /* @__PURE__ */ u("$ZodRecord", (e, t) => {
|
|
|
2150
2165
|
}
|
|
2151
2166
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
2152
2167
|
};
|
|
2153
|
-
}),
|
|
2168
|
+
}), po = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
2154
2169
|
g.init(e, t);
|
|
2155
|
-
const n =
|
|
2156
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
2170
|
+
const n = gn(t.entries), r = new Set(n);
|
|
2171
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => yn.has(typeof o)).map((o) => typeof o == "string" ? V(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
|
|
2157
2172
|
const i = o.value;
|
|
2158
2173
|
return r.has(i) || o.issues.push({
|
|
2159
2174
|
code: "invalid_value",
|
|
@@ -2162,7 +2177,7 @@ const so = /* @__PURE__ */ u("$ZodRecord", (e, t) => {
|
|
|
2162
2177
|
inst: e
|
|
2163
2178
|
}), o;
|
|
2164
2179
|
};
|
|
2165
|
-
}),
|
|
2180
|
+
}), mo = /* @__PURE__ */ u("$ZodLiteral", (e, t) => {
|
|
2166
2181
|
if (g.init(e, t), t.values.length === 0)
|
|
2167
2182
|
throw new Error("Cannot create literal schema with no valid values");
|
|
2168
2183
|
const n = new Set(t.values);
|
|
@@ -2175,62 +2190,62 @@ const so = /* @__PURE__ */ u("$ZodRecord", (e, t) => {
|
|
|
2175
2190
|
inst: e
|
|
2176
2191
|
}), r;
|
|
2177
2192
|
};
|
|
2178
|
-
}),
|
|
2193
|
+
}), _o = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
|
|
2179
2194
|
g.init(e, t), e._zod.parse = (n, r) => {
|
|
2180
2195
|
if (r.direction === "backward")
|
|
2181
|
-
throw new
|
|
2196
|
+
throw new pt(e.constructor.name);
|
|
2182
2197
|
const o = t.transform(n.value, n);
|
|
2183
2198
|
if (r.async)
|
|
2184
2199
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
|
|
2185
2200
|
if (o instanceof Promise)
|
|
2186
|
-
throw new
|
|
2201
|
+
throw new F();
|
|
2187
2202
|
return n.value = o, n;
|
|
2188
2203
|
};
|
|
2189
2204
|
});
|
|
2190
|
-
function
|
|
2205
|
+
function Fe(e, t) {
|
|
2191
2206
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
2192
2207
|
}
|
|
2193
|
-
const
|
|
2208
|
+
const go = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
2194
2209
|
g.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
|
|
2195
2210
|
const n = t.innerType._zod.pattern;
|
|
2196
|
-
return n ? new RegExp(`^(${
|
|
2211
|
+
return n ? new RegExp(`^(${ze(n.source)})?$`) : void 0;
|
|
2197
2212
|
}), e._zod.parse = (n, r) => {
|
|
2198
2213
|
if (t.innerType._zod.optin === "optional") {
|
|
2199
2214
|
const o = t.innerType._zod.run(n, r);
|
|
2200
|
-
return o instanceof Promise ? o.then((s) =>
|
|
2215
|
+
return o instanceof Promise ? o.then((s) => Fe(s, n.value)) : Fe(o, n.value);
|
|
2201
2216
|
}
|
|
2202
2217
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
2203
2218
|
};
|
|
2204
|
-
}),
|
|
2219
|
+
}), vo = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
2205
2220
|
g.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
|
|
2206
2221
|
const n = t.innerType._zod.pattern;
|
|
2207
|
-
return n ? new RegExp(`^(${
|
|
2222
|
+
return n ? new RegExp(`^(${ze(n.source)}|null)$`) : void 0;
|
|
2208
2223
|
}), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
2209
|
-
}),
|
|
2224
|
+
}), bo = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
|
|
2210
2225
|
g.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
2211
2226
|
if (r.direction === "backward")
|
|
2212
2227
|
return t.innerType._zod.run(n, r);
|
|
2213
2228
|
if (n.value === void 0)
|
|
2214
2229
|
return n.value = t.defaultValue, n;
|
|
2215
2230
|
const o = t.innerType._zod.run(n, r);
|
|
2216
|
-
return o instanceof Promise ? o.then((s) =>
|
|
2231
|
+
return o instanceof Promise ? o.then((s) => Ke(s, t)) : Ke(o, t);
|
|
2217
2232
|
};
|
|
2218
2233
|
});
|
|
2219
|
-
function
|
|
2234
|
+
function Ke(e, t) {
|
|
2220
2235
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
2221
2236
|
}
|
|
2222
|
-
const
|
|
2237
|
+
const wo = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
2223
2238
|
g.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
2224
|
-
}),
|
|
2239
|
+
}), yo = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
2225
2240
|
g.init(e, t), _(e._zod, "values", () => {
|
|
2226
2241
|
const n = t.innerType._zod.values;
|
|
2227
2242
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
2228
2243
|
}), e._zod.parse = (n, r) => {
|
|
2229
2244
|
const o = t.innerType._zod.run(n, r);
|
|
2230
|
-
return o instanceof Promise ? o.then((s) =>
|
|
2245
|
+
return o instanceof Promise ? o.then((s) => Ve(s, e)) : Ve(o, e);
|
|
2231
2246
|
};
|
|
2232
2247
|
});
|
|
2233
|
-
function
|
|
2248
|
+
function Ve(e, t) {
|
|
2234
2249
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
2235
2250
|
code: "invalid_type",
|
|
2236
2251
|
expected: "nonoptional",
|
|
@@ -2238,7 +2253,7 @@ function Me(e, t) {
|
|
|
2238
2253
|
inst: t
|
|
2239
2254
|
}), e;
|
|
2240
2255
|
}
|
|
2241
|
-
const
|
|
2256
|
+
const ko = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
2242
2257
|
g.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
2243
2258
|
if (r.direction === "backward")
|
|
2244
2259
|
return t.innerType._zod.run(n, r);
|
|
@@ -2246,50 +2261,50 @@ const mo = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
|
2246
2261
|
return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
|
|
2247
2262
|
...n,
|
|
2248
2263
|
error: {
|
|
2249
|
-
issues: s.issues.map((i) =>
|
|
2264
|
+
issues: s.issues.map((i) => A(i, r, C()))
|
|
2250
2265
|
},
|
|
2251
2266
|
input: n.value
|
|
2252
2267
|
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
2253
2268
|
...n,
|
|
2254
2269
|
error: {
|
|
2255
|
-
issues: o.issues.map((s) =>
|
|
2270
|
+
issues: o.issues.map((s) => A(s, r, C()))
|
|
2256
2271
|
},
|
|
2257
2272
|
input: n.value
|
|
2258
2273
|
}), n.issues = []), n);
|
|
2259
2274
|
};
|
|
2260
|
-
}),
|
|
2275
|
+
}), Eo = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
2261
2276
|
g.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
2262
2277
|
if (r.direction === "backward") {
|
|
2263
2278
|
const s = t.out._zod.run(n, r);
|
|
2264
|
-
return s instanceof Promise ? s.then((i) =>
|
|
2279
|
+
return s instanceof Promise ? s.then((i) => ee(i, t.in, r)) : ee(s, t.in, r);
|
|
2265
2280
|
}
|
|
2266
2281
|
const o = t.in._zod.run(n, r);
|
|
2267
|
-
return o instanceof Promise ? o.then((s) =>
|
|
2282
|
+
return o instanceof Promise ? o.then((s) => ee(s, t.out, r)) : ee(o, t.out, r);
|
|
2268
2283
|
};
|
|
2269
2284
|
});
|
|
2270
|
-
function
|
|
2285
|
+
function ee(e, t, n) {
|
|
2271
2286
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
2272
2287
|
}
|
|
2273
|
-
const
|
|
2288
|
+
const zo = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
2274
2289
|
g.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
2275
2290
|
if (r.direction === "backward")
|
|
2276
2291
|
return t.innerType._zod.run(n, r);
|
|
2277
2292
|
const o = t.innerType._zod.run(n, r);
|
|
2278
|
-
return o instanceof Promise ? o.then(
|
|
2293
|
+
return o instanceof Promise ? o.then(We) : We(o);
|
|
2279
2294
|
};
|
|
2280
2295
|
});
|
|
2281
|
-
function
|
|
2296
|
+
function We(e) {
|
|
2282
2297
|
return e.value = Object.freeze(e.value), e;
|
|
2283
2298
|
}
|
|
2284
|
-
const
|
|
2299
|
+
const $o = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
2285
2300
|
E.init(e, t), g.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
2286
2301
|
const r = n.value, o = t.fn(r);
|
|
2287
2302
|
if (o instanceof Promise)
|
|
2288
|
-
return o.then((s) =>
|
|
2289
|
-
|
|
2303
|
+
return o.then((s) => Ge(s, n, r, e));
|
|
2304
|
+
Ge(o, n, r, e);
|
|
2290
2305
|
};
|
|
2291
2306
|
});
|
|
2292
|
-
function
|
|
2307
|
+
function Ge(e, t, n, r) {
|
|
2293
2308
|
if (!e) {
|
|
2294
2309
|
const o = {
|
|
2295
2310
|
code: "custom",
|
|
@@ -2301,11 +2316,11 @@ function Ve(e, t, n, r) {
|
|
|
2301
2316
|
continue: !r._zod.def.abort
|
|
2302
2317
|
// params: inst._zod.def.params,
|
|
2303
2318
|
};
|
|
2304
|
-
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(
|
|
2319
|
+
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(q(o));
|
|
2305
2320
|
}
|
|
2306
2321
|
}
|
|
2307
|
-
var
|
|
2308
|
-
class
|
|
2322
|
+
var Be;
|
|
2323
|
+
class Zo {
|
|
2309
2324
|
constructor() {
|
|
2310
2325
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2311
2326
|
}
|
|
@@ -2339,219 +2354,219 @@ class bo {
|
|
|
2339
2354
|
return this._map.has(t);
|
|
2340
2355
|
}
|
|
2341
2356
|
}
|
|
2342
|
-
function
|
|
2343
|
-
return new
|
|
2357
|
+
function So() {
|
|
2358
|
+
return new Zo();
|
|
2344
2359
|
}
|
|
2345
|
-
(
|
|
2346
|
-
const
|
|
2347
|
-
function
|
|
2360
|
+
(Be = globalThis).__zod_globalRegistry ?? (Be.__zod_globalRegistry = So());
|
|
2361
|
+
const te = globalThis.__zod_globalRegistry;
|
|
2362
|
+
function Oo(e, t) {
|
|
2348
2363
|
return new e({
|
|
2349
2364
|
type: "string",
|
|
2350
|
-
...
|
|
2365
|
+
...p(t)
|
|
2351
2366
|
});
|
|
2352
2367
|
}
|
|
2353
|
-
function
|
|
2368
|
+
function To(e, t) {
|
|
2354
2369
|
return new e({
|
|
2355
2370
|
type: "string",
|
|
2356
2371
|
format: "email",
|
|
2357
2372
|
check: "string_format",
|
|
2358
2373
|
abort: !1,
|
|
2359
|
-
...
|
|
2374
|
+
...p(t)
|
|
2360
2375
|
});
|
|
2361
2376
|
}
|
|
2362
|
-
function
|
|
2377
|
+
function Je(e, t) {
|
|
2363
2378
|
return new e({
|
|
2364
2379
|
type: "string",
|
|
2365
2380
|
format: "guid",
|
|
2366
2381
|
check: "string_format",
|
|
2367
2382
|
abort: !1,
|
|
2368
|
-
...
|
|
2383
|
+
...p(t)
|
|
2369
2384
|
});
|
|
2370
2385
|
}
|
|
2371
|
-
function
|
|
2386
|
+
function Io(e, t) {
|
|
2372
2387
|
return new e({
|
|
2373
2388
|
type: "string",
|
|
2374
2389
|
format: "uuid",
|
|
2375
2390
|
check: "string_format",
|
|
2376
2391
|
abort: !1,
|
|
2377
|
-
...
|
|
2392
|
+
...p(t)
|
|
2378
2393
|
});
|
|
2379
2394
|
}
|
|
2380
|
-
function
|
|
2395
|
+
function Po(e, t) {
|
|
2381
2396
|
return new e({
|
|
2382
2397
|
type: "string",
|
|
2383
2398
|
format: "uuid",
|
|
2384
2399
|
check: "string_format",
|
|
2385
2400
|
abort: !1,
|
|
2386
2401
|
version: "v4",
|
|
2387
|
-
...
|
|
2402
|
+
...p(t)
|
|
2388
2403
|
});
|
|
2389
2404
|
}
|
|
2390
|
-
function
|
|
2405
|
+
function Co(e, t) {
|
|
2391
2406
|
return new e({
|
|
2392
2407
|
type: "string",
|
|
2393
2408
|
format: "uuid",
|
|
2394
2409
|
check: "string_format",
|
|
2395
2410
|
abort: !1,
|
|
2396
2411
|
version: "v6",
|
|
2397
|
-
...
|
|
2412
|
+
...p(t)
|
|
2398
2413
|
});
|
|
2399
2414
|
}
|
|
2400
|
-
function
|
|
2415
|
+
function Ao(e, t) {
|
|
2401
2416
|
return new e({
|
|
2402
2417
|
type: "string",
|
|
2403
2418
|
format: "uuid",
|
|
2404
2419
|
check: "string_format",
|
|
2405
2420
|
abort: !1,
|
|
2406
2421
|
version: "v7",
|
|
2407
|
-
...
|
|
2422
|
+
...p(t)
|
|
2408
2423
|
});
|
|
2409
2424
|
}
|
|
2410
|
-
function
|
|
2425
|
+
function Ro(e, t) {
|
|
2411
2426
|
return new e({
|
|
2412
2427
|
type: "string",
|
|
2413
2428
|
format: "url",
|
|
2414
2429
|
check: "string_format",
|
|
2415
2430
|
abort: !1,
|
|
2416
|
-
...
|
|
2431
|
+
...p(t)
|
|
2417
2432
|
});
|
|
2418
2433
|
}
|
|
2419
|
-
function
|
|
2434
|
+
function No(e, t) {
|
|
2420
2435
|
return new e({
|
|
2421
2436
|
type: "string",
|
|
2422
2437
|
format: "emoji",
|
|
2423
2438
|
check: "string_format",
|
|
2424
2439
|
abort: !1,
|
|
2425
|
-
...
|
|
2440
|
+
...p(t)
|
|
2426
2441
|
});
|
|
2427
2442
|
}
|
|
2428
|
-
function
|
|
2443
|
+
function Do(e, t) {
|
|
2429
2444
|
return new e({
|
|
2430
2445
|
type: "string",
|
|
2431
2446
|
format: "nanoid",
|
|
2432
2447
|
check: "string_format",
|
|
2433
2448
|
abort: !1,
|
|
2434
|
-
...
|
|
2449
|
+
...p(t)
|
|
2435
2450
|
});
|
|
2436
2451
|
}
|
|
2437
|
-
function
|
|
2452
|
+
function xo(e, t) {
|
|
2438
2453
|
return new e({
|
|
2439
2454
|
type: "string",
|
|
2440
2455
|
format: "cuid",
|
|
2441
2456
|
check: "string_format",
|
|
2442
2457
|
abort: !1,
|
|
2443
|
-
...
|
|
2458
|
+
...p(t)
|
|
2444
2459
|
});
|
|
2445
2460
|
}
|
|
2446
|
-
function
|
|
2461
|
+
function jo(e, t) {
|
|
2447
2462
|
return new e({
|
|
2448
2463
|
type: "string",
|
|
2449
2464
|
format: "cuid2",
|
|
2450
2465
|
check: "string_format",
|
|
2451
2466
|
abort: !1,
|
|
2452
|
-
...
|
|
2467
|
+
...p(t)
|
|
2453
2468
|
});
|
|
2454
2469
|
}
|
|
2455
|
-
function
|
|
2470
|
+
function Lo(e, t) {
|
|
2456
2471
|
return new e({
|
|
2457
2472
|
type: "string",
|
|
2458
2473
|
format: "ulid",
|
|
2459
2474
|
check: "string_format",
|
|
2460
2475
|
abort: !1,
|
|
2461
|
-
...
|
|
2476
|
+
...p(t)
|
|
2462
2477
|
});
|
|
2463
2478
|
}
|
|
2464
|
-
function
|
|
2479
|
+
function Uo(e, t) {
|
|
2465
2480
|
return new e({
|
|
2466
2481
|
type: "string",
|
|
2467
2482
|
format: "xid",
|
|
2468
2483
|
check: "string_format",
|
|
2469
2484
|
abort: !1,
|
|
2470
|
-
...
|
|
2485
|
+
...p(t)
|
|
2471
2486
|
});
|
|
2472
2487
|
}
|
|
2473
|
-
function
|
|
2488
|
+
function Mo(e, t) {
|
|
2474
2489
|
return new e({
|
|
2475
2490
|
type: "string",
|
|
2476
2491
|
format: "ksuid",
|
|
2477
2492
|
check: "string_format",
|
|
2478
2493
|
abort: !1,
|
|
2479
|
-
...
|
|
2494
|
+
...p(t)
|
|
2480
2495
|
});
|
|
2481
2496
|
}
|
|
2482
|
-
function
|
|
2497
|
+
function Fo(e, t) {
|
|
2483
2498
|
return new e({
|
|
2484
2499
|
type: "string",
|
|
2485
2500
|
format: "ipv4",
|
|
2486
2501
|
check: "string_format",
|
|
2487
2502
|
abort: !1,
|
|
2488
|
-
...
|
|
2503
|
+
...p(t)
|
|
2489
2504
|
});
|
|
2490
2505
|
}
|
|
2491
|
-
function
|
|
2506
|
+
function Ko(e, t) {
|
|
2492
2507
|
return new e({
|
|
2493
2508
|
type: "string",
|
|
2494
2509
|
format: "ipv6",
|
|
2495
2510
|
check: "string_format",
|
|
2496
2511
|
abort: !1,
|
|
2497
|
-
...
|
|
2512
|
+
...p(t)
|
|
2498
2513
|
});
|
|
2499
2514
|
}
|
|
2500
|
-
function
|
|
2515
|
+
function Vo(e, t) {
|
|
2501
2516
|
return new e({
|
|
2502
2517
|
type: "string",
|
|
2503
2518
|
format: "cidrv4",
|
|
2504
2519
|
check: "string_format",
|
|
2505
2520
|
abort: !1,
|
|
2506
|
-
...
|
|
2521
|
+
...p(t)
|
|
2507
2522
|
});
|
|
2508
2523
|
}
|
|
2509
|
-
function
|
|
2524
|
+
function Wo(e, t) {
|
|
2510
2525
|
return new e({
|
|
2511
2526
|
type: "string",
|
|
2512
2527
|
format: "cidrv6",
|
|
2513
2528
|
check: "string_format",
|
|
2514
2529
|
abort: !1,
|
|
2515
|
-
...
|
|
2530
|
+
...p(t)
|
|
2516
2531
|
});
|
|
2517
2532
|
}
|
|
2518
|
-
function
|
|
2533
|
+
function Go(e, t) {
|
|
2519
2534
|
return new e({
|
|
2520
2535
|
type: "string",
|
|
2521
2536
|
format: "base64",
|
|
2522
2537
|
check: "string_format",
|
|
2523
2538
|
abort: !1,
|
|
2524
|
-
...
|
|
2539
|
+
...p(t)
|
|
2525
2540
|
});
|
|
2526
2541
|
}
|
|
2527
|
-
function
|
|
2542
|
+
function Bo(e, t) {
|
|
2528
2543
|
return new e({
|
|
2529
2544
|
type: "string",
|
|
2530
2545
|
format: "base64url",
|
|
2531
2546
|
check: "string_format",
|
|
2532
2547
|
abort: !1,
|
|
2533
|
-
...
|
|
2548
|
+
...p(t)
|
|
2534
2549
|
});
|
|
2535
2550
|
}
|
|
2536
|
-
function
|
|
2551
|
+
function Jo(e, t) {
|
|
2537
2552
|
return new e({
|
|
2538
2553
|
type: "string",
|
|
2539
2554
|
format: "e164",
|
|
2540
2555
|
check: "string_format",
|
|
2541
2556
|
abort: !1,
|
|
2542
|
-
...
|
|
2557
|
+
...p(t)
|
|
2543
2558
|
});
|
|
2544
2559
|
}
|
|
2545
|
-
function
|
|
2560
|
+
function Ho(e, t) {
|
|
2546
2561
|
return new e({
|
|
2547
2562
|
type: "string",
|
|
2548
2563
|
format: "jwt",
|
|
2549
2564
|
check: "string_format",
|
|
2550
2565
|
abort: !1,
|
|
2551
|
-
...
|
|
2566
|
+
...p(t)
|
|
2552
2567
|
});
|
|
2553
2568
|
}
|
|
2554
|
-
function
|
|
2569
|
+
function Yo(e, t) {
|
|
2555
2570
|
return new e({
|
|
2556
2571
|
type: "string",
|
|
2557
2572
|
format: "datetime",
|
|
@@ -2559,273 +2574,279 @@ function Vo(e, t) {
|
|
|
2559
2574
|
offset: !1,
|
|
2560
2575
|
local: !1,
|
|
2561
2576
|
precision: null,
|
|
2562
|
-
...
|
|
2577
|
+
...p(t)
|
|
2563
2578
|
});
|
|
2564
2579
|
}
|
|
2565
|
-
function
|
|
2580
|
+
function qo(e, t) {
|
|
2566
2581
|
return new e({
|
|
2567
2582
|
type: "string",
|
|
2568
2583
|
format: "date",
|
|
2569
2584
|
check: "string_format",
|
|
2570
|
-
...
|
|
2585
|
+
...p(t)
|
|
2571
2586
|
});
|
|
2572
2587
|
}
|
|
2573
|
-
function
|
|
2588
|
+
function Xo(e, t) {
|
|
2574
2589
|
return new e({
|
|
2575
2590
|
type: "string",
|
|
2576
2591
|
format: "time",
|
|
2577
2592
|
check: "string_format",
|
|
2578
2593
|
precision: null,
|
|
2579
|
-
...
|
|
2594
|
+
...p(t)
|
|
2580
2595
|
});
|
|
2581
2596
|
}
|
|
2582
|
-
function
|
|
2597
|
+
function Qo(e, t) {
|
|
2583
2598
|
return new e({
|
|
2584
2599
|
type: "string",
|
|
2585
2600
|
format: "duration",
|
|
2586
2601
|
check: "string_format",
|
|
2587
|
-
...
|
|
2602
|
+
...p(t)
|
|
2588
2603
|
});
|
|
2589
2604
|
}
|
|
2590
|
-
function
|
|
2605
|
+
function es(e, t) {
|
|
2591
2606
|
return new e({
|
|
2592
2607
|
type: "number",
|
|
2593
2608
|
checks: [],
|
|
2594
|
-
...
|
|
2609
|
+
...p(t)
|
|
2595
2610
|
});
|
|
2596
2611
|
}
|
|
2597
|
-
function
|
|
2612
|
+
function ts(e, t) {
|
|
2598
2613
|
return new e({
|
|
2599
2614
|
type: "number",
|
|
2600
2615
|
check: "number_format",
|
|
2601
2616
|
abort: !1,
|
|
2602
2617
|
format: "safeint",
|
|
2603
|
-
...
|
|
2618
|
+
...p(t)
|
|
2604
2619
|
});
|
|
2605
2620
|
}
|
|
2606
|
-
function
|
|
2621
|
+
function ns(e, t) {
|
|
2622
|
+
return new e({
|
|
2623
|
+
type: "boolean",
|
|
2624
|
+
...p(t)
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
function rs(e, t) {
|
|
2607
2628
|
return new e({
|
|
2608
2629
|
type: "null",
|
|
2609
|
-
...
|
|
2630
|
+
...p(t)
|
|
2610
2631
|
});
|
|
2611
2632
|
}
|
|
2612
|
-
function
|
|
2633
|
+
function os(e) {
|
|
2613
2634
|
return new e({
|
|
2614
2635
|
type: "unknown"
|
|
2615
2636
|
});
|
|
2616
2637
|
}
|
|
2617
|
-
function
|
|
2638
|
+
function ss(e, t) {
|
|
2618
2639
|
return new e({
|
|
2619
2640
|
type: "never",
|
|
2620
|
-
...
|
|
2641
|
+
...p(t)
|
|
2621
2642
|
});
|
|
2622
2643
|
}
|
|
2623
|
-
function
|
|
2624
|
-
return new
|
|
2644
|
+
function He(e, t) {
|
|
2645
|
+
return new $t({
|
|
2625
2646
|
check: "less_than",
|
|
2626
|
-
...
|
|
2647
|
+
...p(t),
|
|
2627
2648
|
value: e,
|
|
2628
2649
|
inclusive: !1
|
|
2629
2650
|
});
|
|
2630
2651
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return new
|
|
2652
|
+
function pe(e, t) {
|
|
2653
|
+
return new $t({
|
|
2633
2654
|
check: "less_than",
|
|
2634
|
-
...
|
|
2655
|
+
...p(t),
|
|
2635
2656
|
value: e,
|
|
2636
2657
|
inclusive: !0
|
|
2637
2658
|
});
|
|
2638
2659
|
}
|
|
2639
|
-
function
|
|
2640
|
-
return new
|
|
2660
|
+
function Ye(e, t) {
|
|
2661
|
+
return new Zt({
|
|
2641
2662
|
check: "greater_than",
|
|
2642
|
-
...
|
|
2663
|
+
...p(t),
|
|
2643
2664
|
value: e,
|
|
2644
2665
|
inclusive: !1
|
|
2645
2666
|
});
|
|
2646
2667
|
}
|
|
2647
|
-
function
|
|
2648
|
-
return new
|
|
2668
|
+
function me(e, t) {
|
|
2669
|
+
return new Zt({
|
|
2649
2670
|
check: "greater_than",
|
|
2650
|
-
...
|
|
2671
|
+
...p(t),
|
|
2651
2672
|
value: e,
|
|
2652
2673
|
inclusive: !0
|
|
2653
2674
|
});
|
|
2654
2675
|
}
|
|
2655
|
-
function
|
|
2656
|
-
return new
|
|
2676
|
+
function qe(e, t) {
|
|
2677
|
+
return new _r({
|
|
2657
2678
|
check: "multiple_of",
|
|
2658
|
-
...
|
|
2679
|
+
...p(t),
|
|
2659
2680
|
value: e
|
|
2660
2681
|
});
|
|
2661
2682
|
}
|
|
2662
|
-
function
|
|
2663
|
-
return new
|
|
2683
|
+
function Pt(e, t) {
|
|
2684
|
+
return new vr({
|
|
2664
2685
|
check: "max_length",
|
|
2665
|
-
...
|
|
2686
|
+
...p(t),
|
|
2666
2687
|
maximum: e
|
|
2667
2688
|
});
|
|
2668
2689
|
}
|
|
2669
|
-
function
|
|
2670
|
-
return new
|
|
2690
|
+
function ie(e, t) {
|
|
2691
|
+
return new br({
|
|
2671
2692
|
check: "min_length",
|
|
2672
|
-
...
|
|
2693
|
+
...p(t),
|
|
2673
2694
|
minimum: e
|
|
2674
2695
|
});
|
|
2675
2696
|
}
|
|
2676
|
-
function
|
|
2677
|
-
return new
|
|
2697
|
+
function Ct(e, t) {
|
|
2698
|
+
return new wr({
|
|
2678
2699
|
check: "length_equals",
|
|
2679
|
-
...
|
|
2700
|
+
...p(t),
|
|
2680
2701
|
length: e
|
|
2681
2702
|
});
|
|
2682
2703
|
}
|
|
2683
|
-
function
|
|
2684
|
-
return new
|
|
2704
|
+
function is(e, t) {
|
|
2705
|
+
return new yr({
|
|
2685
2706
|
check: "string_format",
|
|
2686
2707
|
format: "regex",
|
|
2687
|
-
...
|
|
2708
|
+
...p(t),
|
|
2688
2709
|
pattern: e
|
|
2689
2710
|
});
|
|
2690
2711
|
}
|
|
2691
|
-
function
|
|
2692
|
-
return new
|
|
2712
|
+
function cs(e) {
|
|
2713
|
+
return new kr({
|
|
2693
2714
|
check: "string_format",
|
|
2694
2715
|
format: "lowercase",
|
|
2695
|
-
...
|
|
2716
|
+
...p(e)
|
|
2696
2717
|
});
|
|
2697
2718
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return new
|
|
2719
|
+
function us(e) {
|
|
2720
|
+
return new Er({
|
|
2700
2721
|
check: "string_format",
|
|
2701
2722
|
format: "uppercase",
|
|
2702
|
-
...
|
|
2723
|
+
...p(e)
|
|
2703
2724
|
});
|
|
2704
2725
|
}
|
|
2705
|
-
function
|
|
2706
|
-
return new
|
|
2726
|
+
function as(e, t) {
|
|
2727
|
+
return new zr({
|
|
2707
2728
|
check: "string_format",
|
|
2708
2729
|
format: "includes",
|
|
2709
|
-
...
|
|
2730
|
+
...p(t),
|
|
2710
2731
|
includes: e
|
|
2711
2732
|
});
|
|
2712
2733
|
}
|
|
2713
|
-
function
|
|
2714
|
-
return new
|
|
2734
|
+
function ls(e, t) {
|
|
2735
|
+
return new $r({
|
|
2715
2736
|
check: "string_format",
|
|
2716
2737
|
format: "starts_with",
|
|
2717
|
-
...
|
|
2738
|
+
...p(t),
|
|
2718
2739
|
prefix: e
|
|
2719
2740
|
});
|
|
2720
2741
|
}
|
|
2721
|
-
function
|
|
2722
|
-
return new
|
|
2742
|
+
function hs(e, t) {
|
|
2743
|
+
return new Zr({
|
|
2723
2744
|
check: "string_format",
|
|
2724
2745
|
format: "ends_with",
|
|
2725
|
-
...
|
|
2746
|
+
...p(t),
|
|
2726
2747
|
suffix: e
|
|
2727
2748
|
});
|
|
2728
2749
|
}
|
|
2729
2750
|
function J(e) {
|
|
2730
|
-
return new
|
|
2751
|
+
return new Sr({
|
|
2731
2752
|
check: "overwrite",
|
|
2732
2753
|
tx: e
|
|
2733
2754
|
});
|
|
2734
2755
|
}
|
|
2735
|
-
function
|
|
2756
|
+
function ds(e) {
|
|
2736
2757
|
return J((t) => t.normalize(e));
|
|
2737
2758
|
}
|
|
2738
|
-
function
|
|
2759
|
+
function fs() {
|
|
2739
2760
|
return J((e) => e.trim());
|
|
2740
2761
|
}
|
|
2741
|
-
function
|
|
2762
|
+
function ps() {
|
|
2742
2763
|
return J((e) => e.toLowerCase());
|
|
2743
2764
|
}
|
|
2744
|
-
function
|
|
2765
|
+
function ms() {
|
|
2745
2766
|
return J((e) => e.toUpperCase());
|
|
2746
2767
|
}
|
|
2747
|
-
function
|
|
2748
|
-
return J((e) =>
|
|
2768
|
+
function _s() {
|
|
2769
|
+
return J((e) => bn(e));
|
|
2749
2770
|
}
|
|
2750
|
-
function
|
|
2771
|
+
function gs(e, t, n) {
|
|
2751
2772
|
return new e({
|
|
2752
2773
|
type: "array",
|
|
2753
2774
|
element: t,
|
|
2754
2775
|
// get element() {
|
|
2755
2776
|
// return element;
|
|
2756
2777
|
// },
|
|
2757
|
-
...
|
|
2778
|
+
...p(n)
|
|
2758
2779
|
});
|
|
2759
2780
|
}
|
|
2760
|
-
function
|
|
2781
|
+
function vs(e, t, n) {
|
|
2761
2782
|
return new e({
|
|
2762
2783
|
type: "custom",
|
|
2763
2784
|
check: "custom",
|
|
2764
2785
|
fn: t,
|
|
2765
|
-
...
|
|
2786
|
+
...p(n)
|
|
2766
2787
|
});
|
|
2767
2788
|
}
|
|
2768
|
-
function
|
|
2769
|
-
const t =
|
|
2789
|
+
function bs(e) {
|
|
2790
|
+
const t = ws((n) => (n.addIssue = (r) => {
|
|
2770
2791
|
if (typeof r == "string")
|
|
2771
|
-
n.issues.push(
|
|
2792
|
+
n.issues.push(q(r, n.value, t._zod.def));
|
|
2772
2793
|
else {
|
|
2773
2794
|
const o = r;
|
|
2774
|
-
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(
|
|
2795
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(q(o));
|
|
2775
2796
|
}
|
|
2776
2797
|
}, e(n.value, n)));
|
|
2777
2798
|
return t;
|
|
2778
2799
|
}
|
|
2779
|
-
function
|
|
2800
|
+
function ws(e, t) {
|
|
2780
2801
|
const n = new E({
|
|
2781
2802
|
check: "custom",
|
|
2782
|
-
...
|
|
2803
|
+
...p(t)
|
|
2783
2804
|
});
|
|
2784
2805
|
return n._zod.check = e, n;
|
|
2785
2806
|
}
|
|
2786
|
-
const
|
|
2787
|
-
|
|
2807
|
+
const ys = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
|
|
2808
|
+
Mr.init(e, t), y.init(e, t);
|
|
2788
2809
|
});
|
|
2789
|
-
function
|
|
2790
|
-
return
|
|
2810
|
+
function ks(e) {
|
|
2811
|
+
return Yo(ys, e);
|
|
2791
2812
|
}
|
|
2792
|
-
const
|
|
2793
|
-
|
|
2813
|
+
const Es = /* @__PURE__ */ u("ZodISODate", (e, t) => {
|
|
2814
|
+
Fr.init(e, t), y.init(e, t);
|
|
2794
2815
|
});
|
|
2795
|
-
function
|
|
2796
|
-
return
|
|
2816
|
+
function zs(e) {
|
|
2817
|
+
return qo(Es, e);
|
|
2797
2818
|
}
|
|
2798
|
-
const
|
|
2799
|
-
|
|
2819
|
+
const $s = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
|
|
2820
|
+
Kr.init(e, t), y.init(e, t);
|
|
2800
2821
|
});
|
|
2801
|
-
function
|
|
2802
|
-
return
|
|
2822
|
+
function Zs(e) {
|
|
2823
|
+
return Xo($s, e);
|
|
2803
2824
|
}
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2825
|
+
const Ss = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
|
|
2826
|
+
Vr.init(e, t), y.init(e, t);
|
|
2806
2827
|
});
|
|
2807
|
-
function
|
|
2808
|
-
return
|
|
2828
|
+
function Os(e) {
|
|
2829
|
+
return Qo(Ss, e);
|
|
2809
2830
|
}
|
|
2810
|
-
const
|
|
2811
|
-
|
|
2831
|
+
const Ts = (e, t) => {
|
|
2832
|
+
bt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2812
2833
|
format: {
|
|
2813
|
-
value: (n) =>
|
|
2834
|
+
value: (n) => Cn(e, n)
|
|
2814
2835
|
// enumerable: false,
|
|
2815
2836
|
},
|
|
2816
2837
|
flatten: {
|
|
2817
|
-
value: (n) =>
|
|
2838
|
+
value: (n) => Pn(e, n)
|
|
2818
2839
|
// enumerable: false,
|
|
2819
2840
|
},
|
|
2820
2841
|
addIssue: {
|
|
2821
2842
|
value: (n) => {
|
|
2822
|
-
e.issues.push(n), e.message = JSON.stringify(e.issues,
|
|
2843
|
+
e.issues.push(n), e.message = JSON.stringify(e.issues, be, 2);
|
|
2823
2844
|
}
|
|
2824
2845
|
// enumerable: false,
|
|
2825
2846
|
},
|
|
2826
2847
|
addIssues: {
|
|
2827
2848
|
value: (n) => {
|
|
2828
|
-
e.issues.push(...n), e.message = JSON.stringify(e.issues,
|
|
2849
|
+
e.issues.push(...n), e.message = JSON.stringify(e.issues, be, 2);
|
|
2829
2850
|
}
|
|
2830
2851
|
// enumerable: false,
|
|
2831
2852
|
},
|
|
@@ -2836,173 +2857,179 @@ const ws = (e, t) => {
|
|
|
2836
2857
|
// enumerable: false,
|
|
2837
2858
|
}
|
|
2838
2859
|
});
|
|
2839
|
-
}, Z = /* @__PURE__ */ u("ZodError",
|
|
2860
|
+
}, Z = /* @__PURE__ */ u("ZodError", Ts, {
|
|
2840
2861
|
Parent: Error
|
|
2841
|
-
}),
|
|
2862
|
+
}), Is = /* @__PURE__ */ Ze(Z), Ps = /* @__PURE__ */ Se(Z), Cs = /* @__PURE__ */ ue(Z), As = /* @__PURE__ */ ae(Z), Rs = /* @__PURE__ */ Nn(Z), Ns = /* @__PURE__ */ Dn(Z), Ds = /* @__PURE__ */ xn(Z), xs = /* @__PURE__ */ jn(Z), js = /* @__PURE__ */ Ln(Z), Ls = /* @__PURE__ */ Un(Z), Us = /* @__PURE__ */ Mn(Z), Ms = /* @__PURE__ */ Fn(Z), w = /* @__PURE__ */ u("ZodType", (e, t) => (g.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(L(t, {
|
|
2842
2863
|
checks: [
|
|
2843
2864
|
...t.checks ?? [],
|
|
2844
2865
|
...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
2845
2866
|
]
|
|
2846
|
-
})), e.clone = (n, r) =>
|
|
2867
|
+
})), e.clone = (n, r) => R(e, n, r), e.brand = () => e, e.register = (n, r) => (n.add(e, r), e), e.parse = (n, r) => Is(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Cs(e, n, r), e.parseAsync = async (n, r) => Ps(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => As(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Rs(e, n, r), e.decode = (n, r) => Ns(e, n, r), e.encodeAsync = async (n, r) => Ds(e, n, r), e.decodeAsync = async (n, r) => xs(e, n, r), e.safeEncode = (n, r) => js(e, n, r), e.safeDecode = (n, r) => Ls(e, n, r), e.safeEncodeAsync = async (n, r) => Us(e, n, r), e.safeDecodeAsync = async (n, r) => Ms(e, n, r), e.refine = (n, r) => e.check(ji(n, r)), e.superRefine = (n) => e.check(Li(n)), e.overwrite = (n) => e.check(J(n)), e.optional = () => tt(e), e.nullable = () => nt(e), e.nullish = () => tt(nt(e)), e.nonoptional = (n) => Pi(e, n), e.array = () => pi(e), e.or = (n) => U([e, n]), e.and = (n) => vi(e, n), e.transform = (n) => rt(e, $i(n)), e.default = (n) => Oi(e, n), e.prefault = (n) => Ii(e, n), e.catch = (n) => Ai(e, n), e.pipe = (n) => rt(e, n), e.readonly = () => Di(e), e.describe = (n) => {
|
|
2847
2868
|
const r = e.clone();
|
|
2848
|
-
return
|
|
2869
|
+
return te.add(r, { description: n }), r;
|
|
2849
2870
|
}, Object.defineProperty(e, "description", {
|
|
2850
2871
|
get() {
|
|
2851
|
-
return
|
|
2872
|
+
return te.get(e)?.description;
|
|
2852
2873
|
},
|
|
2853
2874
|
configurable: !0
|
|
2854
2875
|
}), e.meta = (...n) => {
|
|
2855
2876
|
if (n.length === 0)
|
|
2856
|
-
return
|
|
2877
|
+
return te.get(e);
|
|
2857
2878
|
const r = e.clone();
|
|
2858
|
-
return
|
|
2859
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
2860
|
-
|
|
2879
|
+
return te.add(r, n[0]), r;
|
|
2880
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), At = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
2881
|
+
Oe.init(e, t), w.init(e, t);
|
|
2861
2882
|
const n = e._zod.bag;
|
|
2862
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(
|
|
2863
|
-
}),
|
|
2864
|
-
|
|
2883
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(is(...r)), e.includes = (...r) => e.check(as(...r)), e.startsWith = (...r) => e.check(ls(...r)), e.endsWith = (...r) => e.check(hs(...r)), e.min = (...r) => e.check(ie(...r)), e.max = (...r) => e.check(Pt(...r)), e.length = (...r) => e.check(Ct(...r)), e.nonempty = (...r) => e.check(ie(1, ...r)), e.lowercase = (r) => e.check(cs(r)), e.uppercase = (r) => e.check(us(r)), e.trim = () => e.check(fs()), e.normalize = (...r) => e.check(ds(...r)), e.toLowerCase = () => e.check(ps()), e.toUpperCase = () => e.check(ms()), e.slugify = () => e.check(_s());
|
|
2884
|
+
}), Fs = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2885
|
+
Oe.init(e, t), At.init(e, t), e.email = (n) => e.check(To(Ks, n)), e.url = (n) => e.check(Ro(Vs, n)), e.jwt = (n) => e.check(Ho(si, n)), e.emoji = (n) => e.check(No(Ws, n)), e.guid = (n) => e.check(Je(Xe, n)), e.uuid = (n) => e.check(Io(ne, n)), e.uuidv4 = (n) => e.check(Po(ne, n)), e.uuidv6 = (n) => e.check(Co(ne, n)), e.uuidv7 = (n) => e.check(Ao(ne, n)), e.nanoid = (n) => e.check(Do(Gs, n)), e.guid = (n) => e.check(Je(Xe, n)), e.cuid = (n) => e.check(xo(Bs, n)), e.cuid2 = (n) => e.check(jo(Js, n)), e.ulid = (n) => e.check(Lo(Hs, n)), e.base64 = (n) => e.check(Go(ni, n)), e.base64url = (n) => e.check(Bo(ri, n)), e.xid = (n) => e.check(Uo(Ys, n)), e.ksuid = (n) => e.check(Mo(qs, n)), e.ipv4 = (n) => e.check(Fo(Xs, n)), e.ipv6 = (n) => e.check(Ko(Qs, n)), e.cidrv4 = (n) => e.check(Vo(ei, n)), e.cidrv6 = (n) => e.check(Wo(ti, n)), e.e164 = (n) => e.check(Jo(oi, n)), e.datetime = (n) => e.check(ks(n)), e.date = (n) => e.check(zs(n)), e.time = (n) => e.check(Zs(n)), e.duration = (n) => e.check(Os(n));
|
|
2865
2886
|
});
|
|
2866
2887
|
function W(e) {
|
|
2867
|
-
return
|
|
2868
|
-
}
|
|
2869
|
-
const
|
|
2870
|
-
b.init(e, t),
|
|
2871
|
-
}),
|
|
2872
|
-
|
|
2873
|
-
}),
|
|
2874
|
-
|
|
2875
|
-
}),
|
|
2876
|
-
|
|
2877
|
-
}),
|
|
2878
|
-
|
|
2879
|
-
}),
|
|
2880
|
-
|
|
2881
|
-
}),
|
|
2882
|
-
|
|
2883
|
-
}),
|
|
2884
|
-
|
|
2885
|
-
}),
|
|
2886
|
-
|
|
2887
|
-
}),
|
|
2888
|
-
|
|
2889
|
-
}),
|
|
2890
|
-
|
|
2891
|
-
}),
|
|
2892
|
-
|
|
2893
|
-
}),
|
|
2894
|
-
|
|
2895
|
-
}),
|
|
2896
|
-
|
|
2897
|
-
}),
|
|
2898
|
-
|
|
2899
|
-
}),
|
|
2900
|
-
|
|
2901
|
-
}),
|
|
2902
|
-
|
|
2903
|
-
}),
|
|
2904
|
-
|
|
2905
|
-
}),
|
|
2906
|
-
|
|
2907
|
-
}),
|
|
2908
|
-
|
|
2909
|
-
}),
|
|
2910
|
-
|
|
2888
|
+
return Oo(Fs, e);
|
|
2889
|
+
}
|
|
2890
|
+
const y = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
2891
|
+
b.init(e, t), At.init(e, t);
|
|
2892
|
+
}), Ks = /* @__PURE__ */ u("ZodEmail", (e, t) => {
|
|
2893
|
+
Cr.init(e, t), y.init(e, t);
|
|
2894
|
+
}), Xe = /* @__PURE__ */ u("ZodGUID", (e, t) => {
|
|
2895
|
+
Ir.init(e, t), y.init(e, t);
|
|
2896
|
+
}), ne = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
2897
|
+
Pr.init(e, t), y.init(e, t);
|
|
2898
|
+
}), Vs = /* @__PURE__ */ u("ZodURL", (e, t) => {
|
|
2899
|
+
Ar.init(e, t), y.init(e, t);
|
|
2900
|
+
}), Ws = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
|
|
2901
|
+
Rr.init(e, t), y.init(e, t);
|
|
2902
|
+
}), Gs = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
|
|
2903
|
+
Nr.init(e, t), y.init(e, t);
|
|
2904
|
+
}), Bs = /* @__PURE__ */ u("ZodCUID", (e, t) => {
|
|
2905
|
+
Dr.init(e, t), y.init(e, t);
|
|
2906
|
+
}), Js = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
|
|
2907
|
+
xr.init(e, t), y.init(e, t);
|
|
2908
|
+
}), Hs = /* @__PURE__ */ u("ZodULID", (e, t) => {
|
|
2909
|
+
jr.init(e, t), y.init(e, t);
|
|
2910
|
+
}), Ys = /* @__PURE__ */ u("ZodXID", (e, t) => {
|
|
2911
|
+
Lr.init(e, t), y.init(e, t);
|
|
2912
|
+
}), qs = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
|
|
2913
|
+
Ur.init(e, t), y.init(e, t);
|
|
2914
|
+
}), Xs = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
|
|
2915
|
+
Wr.init(e, t), y.init(e, t);
|
|
2916
|
+
}), Qs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
2917
|
+
Gr.init(e, t), y.init(e, t);
|
|
2918
|
+
}), ei = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
2919
|
+
Br.init(e, t), y.init(e, t);
|
|
2920
|
+
}), ti = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
2921
|
+
Jr.init(e, t), y.init(e, t);
|
|
2922
|
+
}), ni = /* @__PURE__ */ u("ZodBase64", (e, t) => {
|
|
2923
|
+
Hr.init(e, t), y.init(e, t);
|
|
2924
|
+
}), ri = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
|
|
2925
|
+
qr.init(e, t), y.init(e, t);
|
|
2926
|
+
}), oi = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
2927
|
+
Xr.init(e, t), y.init(e, t);
|
|
2928
|
+
}), si = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
2929
|
+
eo.init(e, t), y.init(e, t);
|
|
2930
|
+
}), Rt = /* @__PURE__ */ u("ZodNumber", (e, t) => {
|
|
2931
|
+
Ot.init(e, t), w.init(e, t), e.gt = (r, o) => e.check(Ye(r, o)), e.gte = (r, o) => e.check(me(r, o)), e.min = (r, o) => e.check(me(r, o)), e.lt = (r, o) => e.check(He(r, o)), e.lte = (r, o) => e.check(pe(r, o)), e.max = (r, o) => e.check(pe(r, o)), e.int = (r) => e.check(Qe(r)), e.safe = (r) => e.check(Qe(r)), e.positive = (r) => e.check(Ye(0, r)), e.nonnegative = (r) => e.check(me(0, r)), e.negative = (r) => e.check(He(0, r)), e.nonpositive = (r) => e.check(pe(0, r)), e.multipleOf = (r, o) => e.check(qe(r, o)), e.step = (r, o) => e.check(qe(r, o)), e.finite = () => e;
|
|
2911
2932
|
const n = e._zod.bag;
|
|
2912
2933
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2913
2934
|
});
|
|
2914
2935
|
function $(e) {
|
|
2915
|
-
return
|
|
2936
|
+
return es(Rt, e);
|
|
2916
2937
|
}
|
|
2917
|
-
const
|
|
2918
|
-
|
|
2938
|
+
const ii = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
|
|
2939
|
+
to.init(e, t), Rt.init(e, t);
|
|
2919
2940
|
});
|
|
2920
|
-
function
|
|
2921
|
-
return
|
|
2941
|
+
function Qe(e) {
|
|
2942
|
+
return ts(ii, e);
|
|
2922
2943
|
}
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2944
|
+
const ci = /* @__PURE__ */ u("ZodBoolean", (e, t) => {
|
|
2945
|
+
no.init(e, t), w.init(e, t);
|
|
2925
2946
|
});
|
|
2926
|
-
function
|
|
2927
|
-
return
|
|
2947
|
+
function Nt(e) {
|
|
2948
|
+
return ns(ci, e);
|
|
2928
2949
|
}
|
|
2929
|
-
const
|
|
2930
|
-
|
|
2950
|
+
const ui = /* @__PURE__ */ u("ZodNull", (e, t) => {
|
|
2951
|
+
ro.init(e, t), w.init(e, t);
|
|
2931
2952
|
});
|
|
2932
|
-
function
|
|
2933
|
-
return
|
|
2953
|
+
function ai(e) {
|
|
2954
|
+
return rs(ui, e);
|
|
2934
2955
|
}
|
|
2935
|
-
const
|
|
2936
|
-
|
|
2956
|
+
const li = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
|
|
2957
|
+
oo.init(e, t), w.init(e, t);
|
|
2937
2958
|
});
|
|
2938
|
-
function
|
|
2939
|
-
return
|
|
2959
|
+
function et() {
|
|
2960
|
+
return os(li);
|
|
2940
2961
|
}
|
|
2941
|
-
const
|
|
2942
|
-
|
|
2962
|
+
const hi = /* @__PURE__ */ u("ZodNever", (e, t) => {
|
|
2963
|
+
so.init(e, t), w.init(e, t);
|
|
2943
2964
|
});
|
|
2944
|
-
function
|
|
2945
|
-
return
|
|
2965
|
+
function di(e) {
|
|
2966
|
+
return ss(hi, e);
|
|
2946
2967
|
}
|
|
2947
|
-
const
|
|
2948
|
-
|
|
2968
|
+
const fi = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
2969
|
+
io.init(e, t), w.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ie(n, r)), e.nonempty = (n) => e.check(ie(1, n)), e.max = (n, r) => e.check(Pt(n, r)), e.length = (n, r) => e.check(Ct(n, r)), e.unwrap = () => e.element;
|
|
2970
|
+
});
|
|
2971
|
+
function pi(e, t) {
|
|
2972
|
+
return gs(fi, e, t);
|
|
2973
|
+
}
|
|
2974
|
+
const mi = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
2975
|
+
uo.init(e, t), w.init(e, t), _(e, "shape", () => t.shape), e.keyof = () => ki(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: et() }), e.loose = () => e.clone({ ...e._zod.def, catchall: et() }), e.strict = () => e.clone({ ...e._zod.def, catchall: di() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Zn(e, n), e.safeExtend = (n) => Sn(e, n), e.merge = (n) => On(e, n), e.pick = (n) => zn(e, n), e.omit = (n) => $n(e, n), e.partial = (...n) => Tn(Dt, e, n[0]), e.required = (...n) => In(xt, e, n[0]);
|
|
2949
2976
|
});
|
|
2950
2977
|
function v(e, t) {
|
|
2951
2978
|
const n = {
|
|
2952
2979
|
type: "object",
|
|
2953
2980
|
shape: e ?? {},
|
|
2954
|
-
...
|
|
2981
|
+
...p(t)
|
|
2955
2982
|
};
|
|
2956
|
-
return new
|
|
2983
|
+
return new mi(n);
|
|
2957
2984
|
}
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2985
|
+
const _i = /* @__PURE__ */ u("ZodUnion", (e, t) => {
|
|
2986
|
+
ao.init(e, t), w.init(e, t), e.options = t.options;
|
|
2960
2987
|
});
|
|
2961
|
-
function
|
|
2962
|
-
return new
|
|
2988
|
+
function U(e, t) {
|
|
2989
|
+
return new _i({
|
|
2963
2990
|
type: "union",
|
|
2964
2991
|
options: e,
|
|
2965
|
-
...
|
|
2992
|
+
...p(t)
|
|
2966
2993
|
});
|
|
2967
2994
|
}
|
|
2968
|
-
const
|
|
2969
|
-
|
|
2995
|
+
const gi = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
|
|
2996
|
+
lo.init(e, t), w.init(e, t);
|
|
2970
2997
|
});
|
|
2971
|
-
function
|
|
2972
|
-
return new
|
|
2998
|
+
function vi(e, t) {
|
|
2999
|
+
return new gi({
|
|
2973
3000
|
type: "intersection",
|
|
2974
3001
|
left: e,
|
|
2975
3002
|
right: t
|
|
2976
3003
|
});
|
|
2977
3004
|
}
|
|
2978
|
-
const
|
|
2979
|
-
|
|
3005
|
+
const bi = /* @__PURE__ */ u("ZodTuple", (e, t) => {
|
|
3006
|
+
ho.init(e, t), w.init(e, t), e.rest = (n) => e.clone({
|
|
2980
3007
|
...e._zod.def,
|
|
2981
3008
|
rest: n
|
|
2982
3009
|
});
|
|
2983
3010
|
});
|
|
2984
3011
|
function T(e, t, n) {
|
|
2985
3012
|
const r = t instanceof g, o = r ? n : t, s = r ? t : null;
|
|
2986
|
-
return new
|
|
3013
|
+
return new bi({
|
|
2987
3014
|
type: "tuple",
|
|
2988
3015
|
items: e,
|
|
2989
3016
|
rest: s,
|
|
2990
|
-
...
|
|
3017
|
+
...p(o)
|
|
2991
3018
|
});
|
|
2992
3019
|
}
|
|
2993
|
-
const
|
|
2994
|
-
|
|
3020
|
+
const wi = /* @__PURE__ */ u("ZodRecord", (e, t) => {
|
|
3021
|
+
fo.init(e, t), w.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
2995
3022
|
});
|
|
2996
|
-
function
|
|
2997
|
-
return new
|
|
3023
|
+
function yi(e, t, n) {
|
|
3024
|
+
return new wi({
|
|
2998
3025
|
type: "record",
|
|
2999
3026
|
keyType: e,
|
|
3000
3027
|
valueType: t,
|
|
3001
|
-
...
|
|
3028
|
+
...p(n)
|
|
3002
3029
|
});
|
|
3003
3030
|
}
|
|
3004
|
-
const
|
|
3005
|
-
|
|
3031
|
+
const ye = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
3032
|
+
po.init(e, t), w.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3006
3033
|
const n = new Set(Object.keys(t.entries));
|
|
3007
3034
|
e.extract = (r, o) => {
|
|
3008
3035
|
const s = {};
|
|
@@ -3011,10 +3038,10 @@ const ve = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
|
3011
3038
|
s[i] = t.entries[i];
|
|
3012
3039
|
else
|
|
3013
3040
|
throw new Error(`Key ${i} not found in enum`);
|
|
3014
|
-
return new
|
|
3041
|
+
return new ye({
|
|
3015
3042
|
...t,
|
|
3016
3043
|
checks: [],
|
|
3017
|
-
...
|
|
3044
|
+
...p(o),
|
|
3018
3045
|
entries: s
|
|
3019
3046
|
});
|
|
3020
3047
|
}, e.exclude = (r, o) => {
|
|
@@ -3024,24 +3051,24 @@ const ve = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
|
3024
3051
|
delete s[i];
|
|
3025
3052
|
else
|
|
3026
3053
|
throw new Error(`Key ${i} not found in enum`);
|
|
3027
|
-
return new
|
|
3054
|
+
return new ye({
|
|
3028
3055
|
...t,
|
|
3029
3056
|
checks: [],
|
|
3030
|
-
...
|
|
3057
|
+
...p(o),
|
|
3031
3058
|
entries: s
|
|
3032
3059
|
});
|
|
3033
3060
|
};
|
|
3034
3061
|
});
|
|
3035
|
-
function
|
|
3062
|
+
function ki(e, t) {
|
|
3036
3063
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
3037
|
-
return new
|
|
3064
|
+
return new ye({
|
|
3038
3065
|
type: "enum",
|
|
3039
3066
|
entries: n,
|
|
3040
|
-
...
|
|
3067
|
+
...p(t)
|
|
3041
3068
|
});
|
|
3042
3069
|
}
|
|
3043
|
-
const
|
|
3044
|
-
|
|
3070
|
+
const Ei = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
|
|
3071
|
+
mo.init(e, t), w.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
3045
3072
|
get() {
|
|
3046
3073
|
if (t.values.length > 1)
|
|
3047
3074
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -3049,260 +3076,262 @@ const pi = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
|
|
|
3049
3076
|
}
|
|
3050
3077
|
});
|
|
3051
3078
|
});
|
|
3052
|
-
function
|
|
3053
|
-
return new
|
|
3079
|
+
function P(e, t) {
|
|
3080
|
+
return new Ei({
|
|
3054
3081
|
type: "literal",
|
|
3055
3082
|
values: Array.isArray(e) ? e : [e],
|
|
3056
|
-
...
|
|
3083
|
+
...p(t)
|
|
3057
3084
|
});
|
|
3058
3085
|
}
|
|
3059
|
-
const
|
|
3060
|
-
|
|
3086
|
+
const zi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
|
|
3087
|
+
_o.init(e, t), w.init(e, t), e._zod.parse = (n, r) => {
|
|
3061
3088
|
if (r.direction === "backward")
|
|
3062
|
-
throw new
|
|
3089
|
+
throw new pt(e.constructor.name);
|
|
3063
3090
|
n.addIssue = (s) => {
|
|
3064
3091
|
if (typeof s == "string")
|
|
3065
|
-
n.issues.push(
|
|
3092
|
+
n.issues.push(q(s, n.value, t));
|
|
3066
3093
|
else {
|
|
3067
3094
|
const i = s;
|
|
3068
|
-
i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(
|
|
3095
|
+
i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(q(i));
|
|
3069
3096
|
}
|
|
3070
3097
|
};
|
|
3071
3098
|
const o = t.transform(n.value, n);
|
|
3072
3099
|
return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
|
|
3073
3100
|
};
|
|
3074
3101
|
});
|
|
3075
|
-
function
|
|
3076
|
-
return new
|
|
3102
|
+
function $i(e) {
|
|
3103
|
+
return new zi({
|
|
3077
3104
|
type: "transform",
|
|
3078
3105
|
transform: e
|
|
3079
3106
|
});
|
|
3080
3107
|
}
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3108
|
+
const Dt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
|
|
3109
|
+
go.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3083
3110
|
});
|
|
3084
|
-
function
|
|
3085
|
-
return new
|
|
3111
|
+
function tt(e) {
|
|
3112
|
+
return new Dt({
|
|
3086
3113
|
type: "optional",
|
|
3087
3114
|
innerType: e
|
|
3088
3115
|
});
|
|
3089
3116
|
}
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3117
|
+
const Zi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
3118
|
+
vo.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3092
3119
|
});
|
|
3093
|
-
function
|
|
3094
|
-
return new
|
|
3120
|
+
function nt(e) {
|
|
3121
|
+
return new Zi({
|
|
3095
3122
|
type: "nullable",
|
|
3096
3123
|
innerType: e
|
|
3097
3124
|
});
|
|
3098
3125
|
}
|
|
3099
|
-
const
|
|
3100
|
-
|
|
3126
|
+
const Si = /* @__PURE__ */ u("ZodDefault", (e, t) => {
|
|
3127
|
+
bo.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3101
3128
|
});
|
|
3102
|
-
function
|
|
3103
|
-
return new
|
|
3129
|
+
function Oi(e, t) {
|
|
3130
|
+
return new Si({
|
|
3104
3131
|
type: "default",
|
|
3105
3132
|
innerType: e,
|
|
3106
3133
|
get defaultValue() {
|
|
3107
|
-
return typeof t == "function" ? t() :
|
|
3134
|
+
return typeof t == "function" ? t() : gt(t);
|
|
3108
3135
|
}
|
|
3109
3136
|
});
|
|
3110
3137
|
}
|
|
3111
|
-
const
|
|
3112
|
-
|
|
3138
|
+
const Ti = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
|
|
3139
|
+
wo.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3113
3140
|
});
|
|
3114
|
-
function
|
|
3115
|
-
return new
|
|
3141
|
+
function Ii(e, t) {
|
|
3142
|
+
return new Ti({
|
|
3116
3143
|
type: "prefault",
|
|
3117
3144
|
innerType: e,
|
|
3118
3145
|
get defaultValue() {
|
|
3119
|
-
return typeof t == "function" ? t() :
|
|
3146
|
+
return typeof t == "function" ? t() : gt(t);
|
|
3120
3147
|
}
|
|
3121
3148
|
});
|
|
3122
3149
|
}
|
|
3123
|
-
const
|
|
3124
|
-
|
|
3150
|
+
const xt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
|
|
3151
|
+
yo.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3125
3152
|
});
|
|
3126
|
-
function
|
|
3127
|
-
return new
|
|
3153
|
+
function Pi(e, t) {
|
|
3154
|
+
return new xt({
|
|
3128
3155
|
type: "nonoptional",
|
|
3129
3156
|
innerType: e,
|
|
3130
|
-
...
|
|
3157
|
+
...p(t)
|
|
3131
3158
|
});
|
|
3132
3159
|
}
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3160
|
+
const Ci = /* @__PURE__ */ u("ZodCatch", (e, t) => {
|
|
3161
|
+
ko.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3135
3162
|
});
|
|
3136
|
-
function
|
|
3137
|
-
return new
|
|
3163
|
+
function Ai(e, t) {
|
|
3164
|
+
return new Ci({
|
|
3138
3165
|
type: "catch",
|
|
3139
3166
|
innerType: e,
|
|
3140
3167
|
catchValue: typeof t == "function" ? t : () => t
|
|
3141
3168
|
});
|
|
3142
3169
|
}
|
|
3143
|
-
const
|
|
3144
|
-
|
|
3170
|
+
const Ri = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
3171
|
+
Eo.init(e, t), w.init(e, t), e.in = t.in, e.out = t.out;
|
|
3145
3172
|
});
|
|
3146
|
-
function
|
|
3147
|
-
return new
|
|
3173
|
+
function rt(e, t) {
|
|
3174
|
+
return new Ri({
|
|
3148
3175
|
type: "pipe",
|
|
3149
3176
|
in: e,
|
|
3150
3177
|
out: t
|
|
3151
3178
|
// ...util.normalizeParams(params),
|
|
3152
3179
|
});
|
|
3153
3180
|
}
|
|
3154
|
-
const
|
|
3155
|
-
|
|
3181
|
+
const Ni = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
|
|
3182
|
+
zo.init(e, t), w.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3156
3183
|
});
|
|
3157
|
-
function
|
|
3158
|
-
return new
|
|
3184
|
+
function Di(e) {
|
|
3185
|
+
return new Ni({
|
|
3159
3186
|
type: "readonly",
|
|
3160
3187
|
innerType: e
|
|
3161
3188
|
});
|
|
3162
3189
|
}
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3190
|
+
const xi = /* @__PURE__ */ u("ZodCustom", (e, t) => {
|
|
3191
|
+
$o.init(e, t), w.init(e, t);
|
|
3165
3192
|
});
|
|
3166
|
-
function
|
|
3167
|
-
return
|
|
3193
|
+
function ji(e, t = {}) {
|
|
3194
|
+
return vs(xi, e, t);
|
|
3168
3195
|
}
|
|
3169
|
-
function
|
|
3170
|
-
return
|
|
3196
|
+
function Li(e) {
|
|
3197
|
+
return bs(e);
|
|
3171
3198
|
}
|
|
3172
|
-
const
|
|
3199
|
+
const he = v({
|
|
3173
3200
|
t: $().gte(0),
|
|
3174
3201
|
rate: $().gte(0)
|
|
3175
|
-
}),
|
|
3202
|
+
}), G = v({
|
|
3176
3203
|
opacity: $().gte(0).lte(1),
|
|
3177
3204
|
zIndex: $().default(0)
|
|
3178
|
-
}),
|
|
3205
|
+
}), B = v({
|
|
3179
3206
|
volume: $().gte(0).lte(1)
|
|
3180
|
-
}),
|
|
3181
|
-
type:
|
|
3207
|
+
}), Ui = v({
|
|
3208
|
+
type: P("image"),
|
|
3182
3209
|
file: W(),
|
|
3183
|
-
fit:
|
|
3184
|
-
}),
|
|
3185
|
-
type:
|
|
3210
|
+
fit: U([P("contain"), P("cover"), P("none")])
|
|
3211
|
+
}), Mi = v({
|
|
3212
|
+
type: P("audio"),
|
|
3186
3213
|
file: W(),
|
|
3187
|
-
audioOutput: W()
|
|
3188
|
-
|
|
3189
|
-
|
|
3214
|
+
audioOutput: W(),
|
|
3215
|
+
enablePlaybackRateAdjustment: Nt()
|
|
3216
|
+
}), Fi = v({
|
|
3217
|
+
type: P("video"),
|
|
3190
3218
|
file: W(),
|
|
3191
3219
|
audioOutput: W(),
|
|
3192
|
-
|
|
3193
|
-
|
|
3220
|
+
enablePlaybackRateAdjustment: Nt(),
|
|
3221
|
+
fit: U([P("contain"), P("cover"), P("none")])
|
|
3222
|
+
}), Te = T([$(), ai()]), Ki = T([
|
|
3194
3223
|
$(),
|
|
3195
3224
|
v({
|
|
3196
3225
|
set: v({
|
|
3197
|
-
...
|
|
3226
|
+
...G.shape
|
|
3198
3227
|
}).partial()
|
|
3199
3228
|
}).partial()
|
|
3200
|
-
]),
|
|
3229
|
+
]), Vi = T([
|
|
3201
3230
|
$(),
|
|
3202
3231
|
v({
|
|
3203
3232
|
set: v({
|
|
3204
|
-
...
|
|
3233
|
+
...G.shape
|
|
3205
3234
|
}).partial(),
|
|
3206
3235
|
lerp: v({
|
|
3207
|
-
...
|
|
3236
|
+
...G.shape
|
|
3208
3237
|
}).partial()
|
|
3209
3238
|
}).partial()
|
|
3210
|
-
]),
|
|
3239
|
+
]), Wi = T([
|
|
3211
3240
|
$(),
|
|
3212
3241
|
v({
|
|
3213
3242
|
set: v({
|
|
3214
|
-
...
|
|
3215
|
-
...
|
|
3243
|
+
...he.shape,
|
|
3244
|
+
...B.shape
|
|
3216
3245
|
}).partial()
|
|
3217
3246
|
}).partial()
|
|
3218
|
-
]),
|
|
3247
|
+
]), Gi = T([
|
|
3219
3248
|
$(),
|
|
3220
3249
|
v({
|
|
3221
3250
|
set: v({
|
|
3222
|
-
...
|
|
3223
|
-
...
|
|
3251
|
+
...he.shape,
|
|
3252
|
+
...B.shape
|
|
3224
3253
|
}).partial(),
|
|
3225
3254
|
lerp: v({
|
|
3226
|
-
...
|
|
3255
|
+
...B.shape
|
|
3227
3256
|
}).partial()
|
|
3228
3257
|
}).partial()
|
|
3229
|
-
]),
|
|
3258
|
+
]), Bi = T([
|
|
3230
3259
|
$(),
|
|
3231
3260
|
v({
|
|
3232
3261
|
set: v({
|
|
3233
|
-
...
|
|
3234
|
-
...
|
|
3235
|
-
...
|
|
3262
|
+
...he.shape,
|
|
3263
|
+
...B.shape,
|
|
3264
|
+
...G.shape
|
|
3236
3265
|
}).partial()
|
|
3237
3266
|
}).partial()
|
|
3238
|
-
]),
|
|
3267
|
+
]), Ji = T([
|
|
3239
3268
|
$(),
|
|
3240
3269
|
v({
|
|
3241
3270
|
set: v({
|
|
3242
|
-
...
|
|
3243
|
-
...
|
|
3244
|
-
...
|
|
3271
|
+
...he.shape,
|
|
3272
|
+
...B.shape,
|
|
3273
|
+
...G.shape
|
|
3245
3274
|
}).partial(),
|
|
3246
3275
|
lerp: v({
|
|
3247
|
-
...
|
|
3248
|
-
...
|
|
3276
|
+
...B.shape,
|
|
3277
|
+
...G.shape
|
|
3249
3278
|
}).partial()
|
|
3250
3279
|
}).partial()
|
|
3251
|
-
]),
|
|
3252
|
-
...
|
|
3253
|
-
keyframes: T([
|
|
3254
|
-
}),
|
|
3255
|
-
...
|
|
3256
|
-
keyframes: T([
|
|
3257
|
-
}),
|
|
3258
|
-
...
|
|
3259
|
-
keyframes: T([
|
|
3260
|
-
}),
|
|
3280
|
+
]), Hi = v({
|
|
3281
|
+
...Ui.shape,
|
|
3282
|
+
keyframes: T([Vi], U([Ki, Te]))
|
|
3283
|
+
}), Yi = v({
|
|
3284
|
+
...Mi.shape,
|
|
3285
|
+
keyframes: T([Gi], U([Wi, Te]))
|
|
3286
|
+
}), qi = v({
|
|
3287
|
+
...Fi.shape,
|
|
3288
|
+
keyframes: T([Ji], U([Bi, Te]))
|
|
3289
|
+
}), Xi = yi(W(), U([Hi, Yi, qi])), jt = {
|
|
3261
3290
|
opacity: 1,
|
|
3262
3291
|
zIndex: 0
|
|
3263
|
-
},
|
|
3292
|
+
}, Ie = {
|
|
3264
3293
|
t: 0,
|
|
3265
3294
|
rate: 1,
|
|
3266
3295
|
volume: 1
|
|
3267
|
-
},
|
|
3296
|
+
}, Lt = {
|
|
3268
3297
|
t: 0,
|
|
3269
3298
|
rate: 1,
|
|
3270
3299
|
volume: 1,
|
|
3271
3300
|
opacity: 1,
|
|
3272
3301
|
zIndex: 0
|
|
3273
|
-
},
|
|
3302
|
+
}, fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3274
3303
|
__proto__: null,
|
|
3275
|
-
MediaSurfaceStateSchema:
|
|
3276
|
-
defaultAudioOptions:
|
|
3277
|
-
defaultImageOptions:
|
|
3278
|
-
defaultVideoOptions:
|
|
3304
|
+
MediaSurfaceStateSchema: Xi,
|
|
3305
|
+
defaultAudioOptions: Ie,
|
|
3306
|
+
defaultImageOptions: jt,
|
|
3307
|
+
defaultVideoOptions: Lt
|
|
3279
3308
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3280
|
-
function
|
|
3309
|
+
function Pe(e, t) {
|
|
3281
3310
|
if (!e.keyframes.filter((r) => r[1] === null).some((r) => r[0] <= t))
|
|
3282
3311
|
switch (e.type) {
|
|
3283
3312
|
case "image": {
|
|
3284
3313
|
if (e.keyframes[0][0] > t)
|
|
3285
3314
|
return;
|
|
3286
|
-
const o = e.keyframes.filter((i) => i[1] !== null), s =
|
|
3287
|
-
return { ...
|
|
3315
|
+
const o = e.keyframes.filter((i) => i[1] !== null), s = _e(o, t);
|
|
3316
|
+
return { ...jt, ...s };
|
|
3288
3317
|
}
|
|
3289
3318
|
case "audio": {
|
|
3290
|
-
const r = e.keyframes.filter((i) => i[1] !== null), o =
|
|
3319
|
+
const r = e.keyframes.filter((i) => i[1] !== null), o = ot(r, t);
|
|
3291
3320
|
if (!o)
|
|
3292
3321
|
return;
|
|
3293
|
-
const s =
|
|
3294
|
-
return { ...
|
|
3322
|
+
const s = _e(r, t);
|
|
3323
|
+
return { ...Ie, ...s, ...o };
|
|
3295
3324
|
}
|
|
3296
3325
|
case "video": {
|
|
3297
|
-
const r = e.keyframes.filter((i) => i[1] !== null), o =
|
|
3326
|
+
const r = e.keyframes.filter((i) => i[1] !== null), o = ot(r, t);
|
|
3298
3327
|
if (!o)
|
|
3299
3328
|
return;
|
|
3300
|
-
const s =
|
|
3301
|
-
return { ...
|
|
3329
|
+
const s = _e(r, t);
|
|
3330
|
+
return { ...Lt, ...s, ...o };
|
|
3302
3331
|
}
|
|
3303
3332
|
}
|
|
3304
3333
|
}
|
|
3305
|
-
function
|
|
3334
|
+
function _e(e, t) {
|
|
3306
3335
|
const n = {};
|
|
3307
3336
|
for (const [o, s] of e)
|
|
3308
3337
|
o <= t ? (Object.entries(s.lerp ?? {}).forEach(([i, c]) => {
|
|
@@ -3330,23 +3359,23 @@ function fe(e, t) {
|
|
|
3330
3359
|
}
|
|
3331
3360
|
), r;
|
|
3332
3361
|
}
|
|
3333
|
-
function
|
|
3362
|
+
function ot(e, t) {
|
|
3334
3363
|
const n = e[0];
|
|
3335
3364
|
if (!n || n[0] > t)
|
|
3336
3365
|
return;
|
|
3337
|
-
let r = 0, { t: o, rate: s } =
|
|
3366
|
+
let r = 0, { t: o, rate: s } = Ie;
|
|
3338
3367
|
for (const [l, h] of e) {
|
|
3339
3368
|
if (l > t) break;
|
|
3340
|
-
const { set:
|
|
3341
|
-
if (!
|
|
3342
|
-
const { t: d, rate: m } =
|
|
3369
|
+
const { set: f } = h;
|
|
3370
|
+
if (!f) continue;
|
|
3371
|
+
const { t: d, rate: m } = f;
|
|
3343
3372
|
if (d !== void 0) {
|
|
3344
3373
|
r = l, o = d, m !== void 0 && (s = m);
|
|
3345
3374
|
continue;
|
|
3346
3375
|
}
|
|
3347
3376
|
if (m !== void 0) {
|
|
3348
|
-
const
|
|
3349
|
-
r = l, o +=
|
|
3377
|
+
const I = (l - r) * s;
|
|
3378
|
+
r = l, o += I, s = m;
|
|
3350
3379
|
}
|
|
3351
3380
|
}
|
|
3352
3381
|
const c = (t - r) * s, a = o + c;
|
|
@@ -3355,7 +3384,14 @@ function tt(e, t) {
|
|
|
3355
3384
|
t: a
|
|
3356
3385
|
};
|
|
3357
3386
|
}
|
|
3358
|
-
const
|
|
3387
|
+
const Qi = typeof navigator < "u" && typeof navigator.standalone < "u", ec = "GestureEvent" in window;
|
|
3388
|
+
function ce(e, t) {
|
|
3389
|
+
return (e % t + t) % t;
|
|
3390
|
+
}
|
|
3391
|
+
function tc(e, t, n) {
|
|
3392
|
+
return e = ce(e, n), t = ce(t, n), Math.abs(e - t) < n / 2 ? e - t : e < t ? e + n - t : e - (t + n);
|
|
3393
|
+
}
|
|
3394
|
+
const ge = (e) => {
|
|
3359
3395
|
try {
|
|
3360
3396
|
const { pathname: t } = new URL(e, window.location.href);
|
|
3361
3397
|
return t;
|
|
@@ -3363,7 +3399,7 @@ const pe = (e) => {
|
|
|
3363
3399
|
return;
|
|
3364
3400
|
}
|
|
3365
3401
|
};
|
|
3366
|
-
class
|
|
3402
|
+
class Ce {
|
|
3367
3403
|
constructor(t, n, r, o, s, i) {
|
|
3368
3404
|
this.surfaceElement = t, this.clipElement = n, this.constructAssetURL = o, this.getAudioOutput = s, this.mediaPreloader = i, this._state = r;
|
|
3369
3405
|
}
|
|
@@ -3376,102 +3412,158 @@ class Oe {
|
|
|
3376
3412
|
}
|
|
3377
3413
|
timeout;
|
|
3378
3414
|
loop = async () => {
|
|
3379
|
-
clearTimeout(this.timeout), this.isConnected() ? (this.update(), this.timeout = setTimeout(this.loop,
|
|
3415
|
+
clearTimeout(this.timeout), this.isConnected() ? (this.update(), this.timeout = setTimeout(this.loop, Ft)) : this.destroy();
|
|
3380
3416
|
};
|
|
3381
3417
|
}
|
|
3382
|
-
function
|
|
3418
|
+
function Ae(e, t, n, r, o) {
|
|
3383
3419
|
let s;
|
|
3384
|
-
const i = r(n.file), c =
|
|
3420
|
+
const i = r(n.file), c = ge(i);
|
|
3385
3421
|
switch (n.type) {
|
|
3386
3422
|
case "image":
|
|
3387
|
-
s = e instanceof HTMLImageElement ? e : document.createElement("img"),
|
|
3423
|
+
s = e instanceof HTMLImageElement ? e : document.createElement("img"), ge(s.src) !== c && (s.src = i);
|
|
3388
3424
|
break;
|
|
3389
3425
|
case "audio":
|
|
3390
3426
|
case "video": {
|
|
3391
3427
|
if (e !== void 0) {
|
|
3392
|
-
const a =
|
|
3428
|
+
const a = ge(e.src);
|
|
3393
3429
|
e.tagName.toLowerCase() === n.type && a !== void 0 && a === c && (s = e);
|
|
3394
3430
|
}
|
|
3395
|
-
s || (s = o.getElement(n.file, n.type));
|
|
3431
|
+
s || (s = o.getElement(n.file, n.type)), s instanceof HTMLVideoElement && !s.playsInline && (s.playsInline = !0);
|
|
3396
3432
|
break;
|
|
3397
3433
|
}
|
|
3398
3434
|
}
|
|
3399
3435
|
return (t.children.length !== 1 || t.childNodes[0] !== s) && t.replaceChildren(s), s.style.position = "absolute", s.style.width = "100%", s.style.height = "100%", s;
|
|
3400
3436
|
}
|
|
3401
|
-
function
|
|
3437
|
+
function Ut(e, t, n) {
|
|
3402
3438
|
const r = String(t.opacity);
|
|
3403
3439
|
e.style.opacity !== r && (e.style.opacity = r);
|
|
3404
3440
|
const o = Math.round(t.zIndex ?? 0);
|
|
3405
3441
|
parseInt(e.style.zIndex) !== o && (e.style.zIndex = String(o)), e.style.objectFit !== n && (e.style.objectFit = n);
|
|
3406
3442
|
}
|
|
3407
|
-
function
|
|
3443
|
+
function Mt(e, t, n, r) {
|
|
3408
3444
|
const o = t.volume * r;
|
|
3409
|
-
if (
|
|
3445
|
+
if (Qi)
|
|
3446
|
+
o === 0 && !e.muted ? e.muted = !0 : o > 0 && e.muted && (e.muted = !1);
|
|
3447
|
+
else if (e.muted && (e.muted = !1), e.volume !== o && (e.volume = o), e.sinkId !== n)
|
|
3410
3448
|
try {
|
|
3411
3449
|
e.setSinkId(n).catch(() => {
|
|
3412
3450
|
});
|
|
3413
3451
|
} catch {
|
|
3414
3452
|
}
|
|
3415
3453
|
}
|
|
3416
|
-
const
|
|
3417
|
-
function
|
|
3418
|
-
return Math.sign(e) * Math.pow(Math.abs(e) /
|
|
3419
|
-
}
|
|
3420
|
-
function
|
|
3421
|
-
|
|
3422
|
-
})
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3454
|
+
const st = 2e3, nc = 1e3, it = 100, ct = 50, Ft = 5, re = 1e3, rc = 10, oc = 5, sc = 0.3, ic = 0.1;
|
|
3455
|
+
function cc(e) {
|
|
3456
|
+
return Math.sign(e) * Math.pow(Math.abs(e) / re, sc) * ic;
|
|
3457
|
+
}
|
|
3458
|
+
function O(e, t) {
|
|
3459
|
+
e.playbackRate !== t && (e.playbackRate = t), e.paused && e.play().catch(() => {
|
|
3460
|
+
});
|
|
3461
|
+
}
|
|
3462
|
+
function Kt(e, t, n, r, o) {
|
|
3463
|
+
const s = o && !ec;
|
|
3464
|
+
let i = !1;
|
|
3465
|
+
if (e.duration) {
|
|
3466
|
+
const h = n.filter(([f, d]) => f > t.t && (d?.set?.t !== void 0 || d?.set?.rate !== void 0))[0];
|
|
3467
|
+
if (h?.[1]?.set?.t === 0) {
|
|
3468
|
+
const f = (e.duration - t.t) / t.rate, d = h[0] - t.t;
|
|
3469
|
+
i = Math.abs(f - d) <= oc, e.loop !== i && (e.loop = i);
|
|
3427
3470
|
}
|
|
3428
3471
|
}
|
|
3429
|
-
const
|
|
3472
|
+
const c = e.currentTime * 1e3, a = i && e.duration !== void 0 ? tc(c, t.t, e.duration * 1e3) : c - t.t, l = Math.abs(a);
|
|
3430
3473
|
switch (!0) {
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3474
|
+
/**
|
|
3475
|
+
* Seek ahead behavior
|
|
3476
|
+
* When playbackRate adjustment is not enabled we will seek ahead and try to prepare to play.
|
|
3477
|
+
* We'll make sure everything is buffered and ready, then wait until we're on time.
|
|
3478
|
+
* We'll try to press play once and leave it to continue.
|
|
3479
|
+
*/
|
|
3480
|
+
case (!s && r.state === "idle" && t.rate > 0 && l > st): {
|
|
3481
|
+
const h = (t.t + t.rate * nc) / 1e3;
|
|
3482
|
+
return e.duration !== void 0 && h > e.duration && !i ? { state: "idle" } : (O(e, 0), e.currentTime = i ? ce(h, e.duration * 1e3) : h, { state: "seeking-ahead" });
|
|
3439
3483
|
}
|
|
3440
|
-
case (r.state === "
|
|
3441
|
-
return
|
|
3442
|
-
case (r.state === "
|
|
3443
|
-
return { state: "
|
|
3444
|
-
case r.state === "
|
|
3484
|
+
case (r.state === "seeking-ahead" && e.seeking === !0):
|
|
3485
|
+
return { state: "seeking-ahead" };
|
|
3486
|
+
case (r.state === "seeking-ahead" && e.seeking === !1):
|
|
3487
|
+
return O(e, 0), { state: "seeked-ahead" };
|
|
3488
|
+
case (r.state === "seeked-ahead" && a < -it):
|
|
3489
|
+
return O(e, t.rate), console.warn("Failed to seek ahead in time"), { state: "idle" };
|
|
3490
|
+
case (r.state === "seeked-ahead" && l <= it):
|
|
3491
|
+
return O(e, t.rate), { state: "idle" };
|
|
3492
|
+
case (r.state === "seeked-ahead" && l > st * 1.5):
|
|
3493
|
+
return console.warn("Failed to seek ahead"), { state: "idle" };
|
|
3494
|
+
case r.state === "seeked-ahead":
|
|
3495
|
+
return { state: "seeked-ahead" };
|
|
3496
|
+
/**
|
|
3497
|
+
* Time synchronization behavior
|
|
3498
|
+
* When playbackRate adjustment is enabled we will address small deviations in time by ramping speed up and down.
|
|
3499
|
+
* We address larger deviations with a seek, hoping to land close enough so we can finely adjust with playbackRate.
|
|
3500
|
+
*/
|
|
3501
|
+
// Start intercept
|
|
3502
|
+
case (s && r.state === "idle" && t.rate > 0 && l > ct && l <= re): {
|
|
3503
|
+
const h = cc(a), f = Math.max(0, t.rate - h);
|
|
3504
|
+
return O(e, f), { state: "intercepting" };
|
|
3505
|
+
}
|
|
3506
|
+
// Perfectly intercepted
|
|
3507
|
+
case (r.state === "intercepting" && l <= Ft):
|
|
3508
|
+
return O(e, t.rate), { state: "idle" };
|
|
3509
|
+
// Intercept went too far
|
|
3510
|
+
case (r.state === "intercepting" && Math.sign(a) === Math.sign(e.playbackRate - t.rate)):
|
|
3511
|
+
return O(e, t.rate), { state: "idle" };
|
|
3512
|
+
// We're still on course
|
|
3513
|
+
case (r.state === "intercepting" && l < re * 2):
|
|
3445
3514
|
return { state: "intercepting" };
|
|
3446
|
-
|
|
3515
|
+
// We're way off track
|
|
3516
|
+
case r.state === "intercepting":
|
|
3517
|
+
return O(e, t.rate), { state: "idle" };
|
|
3518
|
+
/**
|
|
3519
|
+
* Time synchronization behavior
|
|
3520
|
+
* When playbackRate adjustment is enabled we will address small deviations in time by ramping speed up and down.
|
|
3521
|
+
* We address larger deviations with a seek, hoping to land close enough so we can finely adjust with playbackRate.
|
|
3522
|
+
*/
|
|
3523
|
+
case (s && r.state === "idle" && l > re): {
|
|
3524
|
+
const h = (t.t + t.rate * rc) / 1e3;
|
|
3525
|
+
return e.currentTime = i ? ce(h, e.duration * 1e3) : h, O(e, t.rate), { state: "seeking" };
|
|
3526
|
+
}
|
|
3527
|
+
case (r.state === "seeking" && e.seeking):
|
|
3447
3528
|
return { state: "seeking" };
|
|
3529
|
+
case (r.state === "seeking" && !e.seeking):
|
|
3530
|
+
return { state: "idle" };
|
|
3531
|
+
/**
|
|
3532
|
+
* Idle behavior
|
|
3533
|
+
*/
|
|
3534
|
+
case r.state === "idle":
|
|
3535
|
+
return O(e, t.rate), t.rate === 0 && l > ct && (e.currentTime = t.t / 1e3), { state: "idle" };
|
|
3536
|
+
/**
|
|
3537
|
+
* If none of the above conditions are met, we should exit the behavior.
|
|
3538
|
+
* For example: we are intercepting but the media has now been paused
|
|
3539
|
+
*/
|
|
3448
3540
|
default:
|
|
3449
|
-
return
|
|
3541
|
+
return { state: "idle" };
|
|
3450
3542
|
}
|
|
3451
3543
|
}
|
|
3452
|
-
class
|
|
3544
|
+
class uc extends Ce {
|
|
3453
3545
|
imageElement;
|
|
3454
3546
|
update() {
|
|
3455
|
-
const t =
|
|
3456
|
-
t ? this.imageElement =
|
|
3547
|
+
const t = Pe(this._state, Date.now());
|
|
3548
|
+
t ? this.imageElement = Ae(
|
|
3457
3549
|
this.imageElement,
|
|
3458
3550
|
this.clipElement,
|
|
3459
3551
|
this._state,
|
|
3460
3552
|
this.constructAssetURL,
|
|
3461
3553
|
this.mediaPreloader
|
|
3462
|
-
) : this.imageElement && this.destroy(), !(!t || !this.imageElement) &&
|
|
3554
|
+
) : this.imageElement && this.destroy(), !(!t || !this.imageElement) && Ut(this.imageElement, t, this._state.fit);
|
|
3463
3555
|
}
|
|
3464
3556
|
destroy() {
|
|
3465
3557
|
this.imageElement && (this.imageElement.remove(), this.imageElement.src = "", this.imageElement = void 0);
|
|
3466
3558
|
}
|
|
3467
3559
|
}
|
|
3468
|
-
class
|
|
3560
|
+
class ut extends Ce {
|
|
3469
3561
|
syncState = { state: "idle" };
|
|
3470
3562
|
audioElement;
|
|
3471
3563
|
volume = 1;
|
|
3472
3564
|
update() {
|
|
3473
|
-
const t =
|
|
3474
|
-
if (t ? this.audioElement =
|
|
3565
|
+
const t = Pe(this._state, Date.now());
|
|
3566
|
+
if (t ? this.audioElement = Ae(
|
|
3475
3567
|
this.audioElement,
|
|
3476
3568
|
this.clipElement,
|
|
3477
3569
|
this._state,
|
|
@@ -3479,33 +3571,27 @@ class rt extends Oe {
|
|
|
3479
3571
|
this.mediaPreloader
|
|
3480
3572
|
) : this.destroy(), !t || !this.audioElement) return;
|
|
3481
3573
|
const n = this.getAudioOutput(this._state.audioOutput);
|
|
3482
|
-
|
|
3483
|
-
const r =
|
|
3574
|
+
Mt(this.audioElement, t, n, this.volume);
|
|
3575
|
+
const r = Kt(
|
|
3484
3576
|
this.audioElement,
|
|
3485
3577
|
t,
|
|
3486
3578
|
this._state.keyframes,
|
|
3487
3579
|
this.syncState,
|
|
3488
|
-
this._state.
|
|
3580
|
+
this._state.enablePlaybackRateAdjustment
|
|
3489
3581
|
);
|
|
3490
|
-
this.syncState
|
|
3491
|
-
"seeked",
|
|
3492
|
-
() => {
|
|
3493
|
-
this.syncState = { state: "idle" };
|
|
3494
|
-
},
|
|
3495
|
-
{ passive: !0, once: !0 }
|
|
3496
|
-
), this.syncState = r;
|
|
3582
|
+
this.syncState = r;
|
|
3497
3583
|
}
|
|
3498
3584
|
destroy() {
|
|
3499
3585
|
this.audioElement && (this.audioElement.pause(), this.audioElement.remove(), this.audioElement.volume = 0, this.audioElement.currentTime = 0, this.mediaPreloader.releaseElement(this.audioElement)), this.audioElement = void 0;
|
|
3500
3586
|
}
|
|
3501
3587
|
}
|
|
3502
|
-
class
|
|
3588
|
+
class at extends Ce {
|
|
3503
3589
|
syncState = { state: "idle" };
|
|
3504
3590
|
videoElement;
|
|
3505
3591
|
volume = 1;
|
|
3506
3592
|
update() {
|
|
3507
|
-
const t =
|
|
3508
|
-
if (t ? this.videoElement =
|
|
3593
|
+
const t = Pe(this._state, Date.now());
|
|
3594
|
+
if (t ? this.videoElement = Ae(
|
|
3509
3595
|
this.videoElement,
|
|
3510
3596
|
this.clipElement,
|
|
3511
3597
|
this._state,
|
|
@@ -3513,27 +3599,21 @@ class ot extends Oe {
|
|
|
3513
3599
|
this.mediaPreloader
|
|
3514
3600
|
) : this.destroy(), !t || !this.videoElement) return;
|
|
3515
3601
|
const n = this.getAudioOutput(this._state.audioOutput);
|
|
3516
|
-
|
|
3517
|
-
const r =
|
|
3602
|
+
Ut(this.videoElement, t, this._state.fit), Mt(this.videoElement, t, n, this.volume);
|
|
3603
|
+
const r = Kt(
|
|
3518
3604
|
this.videoElement,
|
|
3519
3605
|
t,
|
|
3520
3606
|
this._state.keyframes,
|
|
3521
3607
|
this.syncState,
|
|
3522
|
-
this._state.
|
|
3608
|
+
this._state.enablePlaybackRateAdjustment
|
|
3523
3609
|
);
|
|
3524
|
-
this.syncState
|
|
3525
|
-
"seeked",
|
|
3526
|
-
() => {
|
|
3527
|
-
this.syncState = { state: "idle" };
|
|
3528
|
-
},
|
|
3529
|
-
{ passive: !0, once: !0 }
|
|
3530
|
-
), this.syncState = r;
|
|
3610
|
+
this.syncState = r;
|
|
3531
3611
|
}
|
|
3532
3612
|
destroy() {
|
|
3533
3613
|
this.videoElement && (this.videoElement.pause(), this.videoElement.remove(), this.videoElement.volume = 0, this.videoElement.currentTime = 0, this.mediaPreloader.releaseElement(this.videoElement)), this.videoElement = void 0;
|
|
3534
3614
|
}
|
|
3535
3615
|
}
|
|
3536
|
-
class
|
|
3616
|
+
class ac {
|
|
3537
3617
|
_state;
|
|
3538
3618
|
_elements = {};
|
|
3539
3619
|
_constructAssetURL;
|
|
@@ -3594,9 +3674,9 @@ class qi {
|
|
|
3594
3674
|
});
|
|
3595
3675
|
}
|
|
3596
3676
|
}
|
|
3597
|
-
const
|
|
3598
|
-
class
|
|
3599
|
-
constructor(t, n, r, o = new
|
|
3677
|
+
const lc = "data-clip-id";
|
|
3678
|
+
class pc {
|
|
3679
|
+
constructor(t, n, r, o = new ac(t)) {
|
|
3600
3680
|
this.constructAssetUrl = t, this.getAudioOutput = n, this.mediaPreloader = o, this._element = document.createElement("div"), this._element.className = "surface-manager", this._element.style.width = "100%", this._element.style.height = "100%", this._state = r || {}, this.update();
|
|
3601
3681
|
}
|
|
3602
3682
|
_state = {};
|
|
@@ -3609,7 +3689,7 @@ class nc {
|
|
|
3609
3689
|
}
|
|
3610
3690
|
set volume(t) {
|
|
3611
3691
|
this._volume = t, Object.values(this.resources).forEach(({ manager: n }) => {
|
|
3612
|
-
(n instanceof
|
|
3692
|
+
(n instanceof ut || n instanceof at) && (n.volume = t);
|
|
3613
3693
|
});
|
|
3614
3694
|
}
|
|
3615
3695
|
_element;
|
|
@@ -3627,7 +3707,7 @@ class nc {
|
|
|
3627
3707
|
return r.element;
|
|
3628
3708
|
{
|
|
3629
3709
|
const o = document.createElement("div");
|
|
3630
|
-
return o.setAttribute(
|
|
3710
|
+
return o.setAttribute(lc, n), this.resources[n] = { element: o }, o;
|
|
3631
3711
|
}
|
|
3632
3712
|
});
|
|
3633
3713
|
this._element.replaceChildren(...t), Object.keys(this._state).toSorted().forEach((n) => {
|
|
@@ -3639,7 +3719,7 @@ class nc {
|
|
|
3639
3719
|
else
|
|
3640
3720
|
switch (r.type) {
|
|
3641
3721
|
case "image":
|
|
3642
|
-
o.manager = new
|
|
3722
|
+
o.manager = new uc(
|
|
3643
3723
|
this._element,
|
|
3644
3724
|
o.element,
|
|
3645
3725
|
r,
|
|
@@ -3649,7 +3729,7 @@ class nc {
|
|
|
3649
3729
|
), o.manager.loop();
|
|
3650
3730
|
break;
|
|
3651
3731
|
case "audio": {
|
|
3652
|
-
const s = new
|
|
3732
|
+
const s = new ut(
|
|
3653
3733
|
this._element,
|
|
3654
3734
|
o.element,
|
|
3655
3735
|
r,
|
|
@@ -3661,7 +3741,7 @@ class nc {
|
|
|
3661
3741
|
break;
|
|
3662
3742
|
}
|
|
3663
3743
|
case "video": {
|
|
3664
|
-
const s = new
|
|
3744
|
+
const s = new at(
|
|
3665
3745
|
this._element,
|
|
3666
3746
|
o.element,
|
|
3667
3747
|
r,
|
|
@@ -3676,26 +3756,26 @@ class nc {
|
|
|
3676
3756
|
});
|
|
3677
3757
|
}
|
|
3678
3758
|
}
|
|
3679
|
-
const
|
|
3759
|
+
const mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3680
3760
|
__proto__: null
|
|
3681
3761
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3682
3762
|
export {
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3763
|
+
dn as CogsConfigChangedEvent,
|
|
3764
|
+
dc as CogsConnection,
|
|
3765
|
+
ln as CogsConnectionCloseEvent,
|
|
3766
|
+
an as CogsConnectionOpenEvent,
|
|
3767
|
+
pn as CogsIncomingEvent,
|
|
3768
|
+
mn as CogsMediaConfigChangedEvent,
|
|
3769
|
+
hn as CogsMessageEvent,
|
|
3770
|
+
_n as CogsShowPhaseChangedEvent,
|
|
3771
|
+
fn as CogsStateChangedEvent,
|
|
3772
|
+
Re as DataStoreItemEvent,
|
|
3773
|
+
Ne as DataStoreItemsEvent,
|
|
3774
|
+
mc as ManifestTypes,
|
|
3775
|
+
ac as MediaPreloader,
|
|
3776
|
+
fc as MediaSchema,
|
|
3777
|
+
pc as SurfaceManager,
|
|
3778
|
+
Xt as assetUrl,
|
|
3779
|
+
Pe as getStateAtTime,
|
|
3780
|
+
hc as preloadUrl
|
|
3701
3781
|
};
|