@resconet/qp-bridge 1.0.0 → 1.1.0-alpha.29
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/README.md +24 -0
- package/index.js +1 -1
- package/index.mjs +323 -303
- package/lib/qp-bridge-types.d.ts +19 -0
- package/lib/qp-bridge.d.ts +10 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -11,12 +11,12 @@ for (let t = 0; t < 256; ++t)
|
|
|
11
11
|
function tt(t, e = 0) {
|
|
12
12
|
return k[t[e + 0]] + k[t[e + 1]] + k[t[e + 2]] + k[t[e + 3]] + "-" + k[t[e + 4]] + k[t[e + 5]] + "-" + k[t[e + 6]] + k[t[e + 7]] + "-" + k[t[e + 8]] + k[t[e + 9]] + "-" + k[t[e + 10]] + k[t[e + 11]] + k[t[e + 12]] + k[t[e + 13]] + k[t[e + 14]] + k[t[e + 15]];
|
|
13
13
|
}
|
|
14
|
-
const st = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
14
|
+
const st = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), je = {
|
|
15
15
|
randomUUID: st
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
17
|
+
function $e(t, e, s) {
|
|
18
|
+
if (je.randomUUID && !e && !t)
|
|
19
|
+
return je.randomUUID();
|
|
20
20
|
t = t || {};
|
|
21
21
|
const n = t.random || (t.rng || et)();
|
|
22
22
|
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, tt(n);
|
|
@@ -152,10 +152,10 @@ class E extends Error {
|
|
|
152
152
|
else if (i.path.length === 0)
|
|
153
153
|
n._errors.push(s(i));
|
|
154
154
|
else {
|
|
155
|
-
let o = n,
|
|
156
|
-
for (;
|
|
157
|
-
const
|
|
158
|
-
|
|
155
|
+
let o = n, d = 0;
|
|
156
|
+
for (; d < i.path.length; ) {
|
|
157
|
+
const u = i.path[d];
|
|
158
|
+
d === i.path.length - 1 ? (o[u] = o[u] || { _errors: [] }, o[u]._errors.push(s(i))) : o[u] = o[u] || { _errors: [] }, o = o[u], d++;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
};
|
|
@@ -241,12 +241,12 @@ const Y = (t, e) => {
|
|
|
241
241
|
}
|
|
242
242
|
return { message: s };
|
|
243
243
|
};
|
|
244
|
-
let
|
|
244
|
+
let Ue = Y;
|
|
245
245
|
function rt(t) {
|
|
246
|
-
|
|
246
|
+
Ue = t;
|
|
247
247
|
}
|
|
248
248
|
function _e() {
|
|
249
|
-
return
|
|
249
|
+
return Ue;
|
|
250
250
|
}
|
|
251
251
|
const xe = (t) => {
|
|
252
252
|
const { data: e, path: s, errorMaps: n, issueData: r } = t, a = [...s, ...r.path || []], i = {
|
|
@@ -260,9 +260,9 @@ const xe = (t) => {
|
|
|
260
260
|
message: r.message
|
|
261
261
|
};
|
|
262
262
|
let o = "";
|
|
263
|
-
const
|
|
264
|
-
for (const
|
|
265
|
-
o =
|
|
263
|
+
const d = n.filter((u) => !!u).slice().reverse();
|
|
264
|
+
for (const u of d)
|
|
265
|
+
o = u(i, { data: e, defaultError: o }).message;
|
|
266
266
|
return {
|
|
267
267
|
...r,
|
|
268
268
|
path: a,
|
|
@@ -333,7 +333,7 @@ function be(t, e, s, n) {
|
|
|
333
333
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
334
334
|
return e.get(t);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Le(t, e, s, n, r) {
|
|
337
337
|
if (typeof e == "function" ? t !== e || !r : !e.has(t))
|
|
338
338
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
339
339
|
return e.set(t, s), s;
|
|
@@ -351,7 +351,7 @@ class O {
|
|
|
351
351
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const Pe = (t, e) => {
|
|
355
355
|
if (se(e))
|
|
356
356
|
return { success: !0, data: e.value };
|
|
357
357
|
if (!t.common.issues.length)
|
|
@@ -373,9 +373,9 @@ function v(t) {
|
|
|
373
373
|
if (e && (s || n))
|
|
374
374
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
375
375
|
return e ? { errorMap: e, description: r } : { errorMap: (i, o) => {
|
|
376
|
-
var
|
|
376
|
+
var d, u;
|
|
377
377
|
const { message: g } = t;
|
|
378
|
-
return i.code === "invalid_enum_value" ? { message: g ?? o.defaultError } : typeof o.data > "u" ? { message: (
|
|
378
|
+
return i.code === "invalid_enum_value" ? { message: g ?? o.defaultError } : typeof o.data > "u" ? { message: (d = g ?? n) !== null && d !== void 0 ? d : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (u = g ?? s) !== null && u !== void 0 ? u : o.defaultError };
|
|
379
379
|
}, description: r };
|
|
380
380
|
}
|
|
381
381
|
class _ {
|
|
@@ -441,7 +441,7 @@ class _ {
|
|
|
441
441
|
data: e,
|
|
442
442
|
parsedType: q(e)
|
|
443
443
|
}, a = this._parseSync({ data: e, path: r.path, parent: r });
|
|
444
|
-
return
|
|
444
|
+
return Pe(r, a);
|
|
445
445
|
}
|
|
446
446
|
async parseAsync(e, s) {
|
|
447
447
|
const n = await this.safeParseAsync(e, s);
|
|
@@ -462,7 +462,7 @@ class _ {
|
|
|
462
462
|
data: e,
|
|
463
463
|
parsedType: q(e)
|
|
464
464
|
}, r = this._parse({ data: e, path: n.path, parent: n }), a = await (ne(r) ? r : Promise.resolve(r));
|
|
465
|
-
return
|
|
465
|
+
return Pe(n, a);
|
|
466
466
|
}
|
|
467
467
|
refine(e, s) {
|
|
468
468
|
const n = (r) => typeof s == "string" || typeof s > "u" ? { message: s } : typeof s == "function" ? s(r) : s;
|
|
@@ -471,14 +471,14 @@ class _ {
|
|
|
471
471
|
code: c.custom,
|
|
472
472
|
...n(r)
|
|
473
473
|
});
|
|
474
|
-
return typeof Promise < "u" && i instanceof Promise ? i.then((
|
|
474
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((d) => d ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
refinement(e, s) {
|
|
478
478
|
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof s == "function" ? s(n, r) : s), !1));
|
|
479
479
|
}
|
|
480
480
|
_refinement(e) {
|
|
481
|
-
return new
|
|
481
|
+
return new M({
|
|
482
482
|
schema: this,
|
|
483
483
|
typeName: m.ZodEffects,
|
|
484
484
|
effect: { type: "refinement", refinement: e }
|
|
@@ -497,7 +497,7 @@ class _ {
|
|
|
497
497
|
return this.nullable().optional();
|
|
498
498
|
}
|
|
499
499
|
array() {
|
|
500
|
-
return
|
|
500
|
+
return N.create(this, this._def);
|
|
501
501
|
}
|
|
502
502
|
promise() {
|
|
503
503
|
return X.create(this, this._def);
|
|
@@ -509,7 +509,7 @@ class _ {
|
|
|
509
509
|
return ce.create(this, e, this._def);
|
|
510
510
|
}
|
|
511
511
|
transform(e) {
|
|
512
|
-
return new
|
|
512
|
+
return new M({
|
|
513
513
|
...v(this._def),
|
|
514
514
|
schema: this,
|
|
515
515
|
typeName: m.ZodEffects,
|
|
@@ -561,25 +561,25 @@ class _ {
|
|
|
561
561
|
return this.safeParse(null).success;
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
const it = /^c[^\s-]{8,}$/i, ot = /^[0-9a-z]+$/, ct = /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
564
|
+
const it = /^c[^\s-]{8,}$/i, ot = /^[0-9a-z]+$/, ct = /^[0-9A-HJKMNP-TV-Z]{26}$/, ut = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, dt = /^[a-z0-9_-]{21}$/i, lt = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ft = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ht = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
565
565
|
let Ce;
|
|
566
|
-
const pt = /^(?:(?: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])$/, mt = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, gt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
567
|
-
function
|
|
566
|
+
const pt = /^(?:(?: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])$/, mt = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, gt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ve = "((\\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])))", yt = new RegExp(`^${Ve}$`);
|
|
567
|
+
function De(t) {
|
|
568
568
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
569
569
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
570
570
|
}
|
|
571
571
|
function vt(t) {
|
|
572
|
-
return new RegExp(`^${
|
|
572
|
+
return new RegExp(`^${De(t)}$`);
|
|
573
573
|
}
|
|
574
|
-
function
|
|
575
|
-
let e = `${
|
|
574
|
+
function Be(t) {
|
|
575
|
+
let e = `${Ve}T${De(t)}`;
|
|
576
576
|
const s = [];
|
|
577
577
|
return s.push(t.local ? "Z?" : "Z"), t.offset && s.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${s.join("|")})`, new RegExp(`^${e}$`);
|
|
578
578
|
}
|
|
579
579
|
function _t(t, e) {
|
|
580
580
|
return !!((e === "v4" || !e) && pt.test(t) || (e === "v6" || !e) && mt.test(t));
|
|
581
581
|
}
|
|
582
|
-
class
|
|
582
|
+
class Z extends _ {
|
|
583
583
|
_parse(e) {
|
|
584
584
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
|
|
585
585
|
const a = this._getOrReturnCtx(e);
|
|
@@ -640,13 +640,13 @@ class C extends _ {
|
|
|
640
640
|
message: a.message
|
|
641
641
|
}), n.dirty());
|
|
642
642
|
else if (a.kind === "uuid")
|
|
643
|
-
|
|
643
|
+
ut.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
644
644
|
validation: "uuid",
|
|
645
645
|
code: c.invalid_string,
|
|
646
646
|
message: a.message
|
|
647
647
|
}), n.dirty());
|
|
648
648
|
else if (a.kind === "nanoid")
|
|
649
|
-
|
|
649
|
+
dt.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
650
650
|
validation: "nanoid",
|
|
651
651
|
code: c.invalid_string,
|
|
652
652
|
message: a.message
|
|
@@ -696,7 +696,7 @@ class C extends _ {
|
|
|
696
696
|
code: c.invalid_string,
|
|
697
697
|
validation: { endsWith: a.value },
|
|
698
698
|
message: a.message
|
|
699
|
-
}), n.dirty()) : a.kind === "datetime" ?
|
|
699
|
+
}), n.dirty()) : a.kind === "datetime" ? Be(a).test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
700
700
|
code: c.invalid_string,
|
|
701
701
|
validation: "datetime",
|
|
702
702
|
message: a.message
|
|
@@ -731,7 +731,7 @@ class C extends _ {
|
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
_addCheck(e) {
|
|
734
|
-
return new
|
|
734
|
+
return new Z({
|
|
735
735
|
...this._def,
|
|
736
736
|
checks: [...this._def.checks, e]
|
|
737
737
|
});
|
|
@@ -857,19 +857,19 @@ class C extends _ {
|
|
|
857
857
|
return this.min(1, p.errToObj(e));
|
|
858
858
|
}
|
|
859
859
|
trim() {
|
|
860
|
-
return new
|
|
860
|
+
return new Z({
|
|
861
861
|
...this._def,
|
|
862
862
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
865
|
toLowerCase() {
|
|
866
|
-
return new
|
|
866
|
+
return new Z({
|
|
867
867
|
...this._def,
|
|
868
868
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
871
|
toUpperCase() {
|
|
872
|
-
return new
|
|
872
|
+
return new Z({
|
|
873
873
|
...this._def,
|
|
874
874
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
875
875
|
});
|
|
@@ -929,9 +929,9 @@ class C extends _ {
|
|
|
929
929
|
return e;
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
|
|
932
|
+
Z.create = (t) => {
|
|
933
933
|
var e;
|
|
934
|
-
return new
|
|
934
|
+
return new Z({
|
|
935
935
|
checks: [],
|
|
936
936
|
typeName: m.ZodString,
|
|
937
937
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
|
|
@@ -1444,7 +1444,7 @@ ke.create = (t) => new ke({
|
|
|
1444
1444
|
typeName: m.ZodVoid,
|
|
1445
1445
|
...v(t)
|
|
1446
1446
|
});
|
|
1447
|
-
class
|
|
1447
|
+
class N extends _ {
|
|
1448
1448
|
_parse(e) {
|
|
1449
1449
|
const { ctx: s, status: n } = this._processInputParams(e), r = this._def;
|
|
1450
1450
|
if (s.parsedType !== f.array)
|
|
@@ -1488,19 +1488,19 @@ class Z extends _ {
|
|
|
1488
1488
|
return this._def.type;
|
|
1489
1489
|
}
|
|
1490
1490
|
min(e, s) {
|
|
1491
|
-
return new
|
|
1491
|
+
return new N({
|
|
1492
1492
|
...this._def,
|
|
1493
1493
|
minLength: { value: e, message: p.toString(s) }
|
|
1494
1494
|
});
|
|
1495
1495
|
}
|
|
1496
1496
|
max(e, s) {
|
|
1497
|
-
return new
|
|
1497
|
+
return new N({
|
|
1498
1498
|
...this._def,
|
|
1499
1499
|
maxLength: { value: e, message: p.toString(s) }
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
1502
|
length(e, s) {
|
|
1503
|
-
return new
|
|
1503
|
+
return new N({
|
|
1504
1504
|
...this._def,
|
|
1505
1505
|
exactLength: { value: e, message: p.toString(s) }
|
|
1506
1506
|
});
|
|
@@ -1509,7 +1509,7 @@ class Z extends _ {
|
|
|
1509
1509
|
return this.min(1, e);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
|
|
1512
|
+
N.create = (t, e) => new N({
|
|
1513
1513
|
type: t,
|
|
1514
1514
|
minLength: null,
|
|
1515
1515
|
maxLength: null,
|
|
@@ -1529,7 +1529,7 @@ function Q(t) {
|
|
|
1529
1529
|
shape: () => e
|
|
1530
1530
|
});
|
|
1531
1531
|
} else
|
|
1532
|
-
return t instanceof
|
|
1532
|
+
return t instanceof N ? new N({
|
|
1533
1533
|
...t._def,
|
|
1534
1534
|
type: Q(t.element)
|
|
1535
1535
|
}) : t instanceof I ? I.create(Q(t.unwrap())) : t instanceof V ? V.create(Q(t.unwrap())) : t instanceof A ? A.create(t.items.map((e) => Q(e))) : t;
|
|
@@ -1546,48 +1546,48 @@ class b extends _ {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
_parse(e) {
|
|
1548
1548
|
if (this._getType(e) !== f.object) {
|
|
1549
|
-
const
|
|
1550
|
-
return l(
|
|
1549
|
+
const u = this._getOrReturnCtx(e);
|
|
1550
|
+
return l(u, {
|
|
1551
1551
|
code: c.invalid_type,
|
|
1552
1552
|
expected: f.object,
|
|
1553
|
-
received:
|
|
1553
|
+
received: u.parsedType
|
|
1554
1554
|
}), y;
|
|
1555
1555
|
}
|
|
1556
1556
|
const { status: n, ctx: r } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), o = [];
|
|
1557
1557
|
if (!(this._def.catchall instanceof P && this._def.unknownKeys === "strip"))
|
|
1558
|
-
for (const
|
|
1559
|
-
i.includes(
|
|
1560
|
-
const
|
|
1561
|
-
for (const
|
|
1562
|
-
const g = a[
|
|
1563
|
-
|
|
1564
|
-
key: { status: "valid", value:
|
|
1565
|
-
value: g._parse(new O(r, R, r.path,
|
|
1566
|
-
alwaysSet:
|
|
1558
|
+
for (const u in r.data)
|
|
1559
|
+
i.includes(u) || o.push(u);
|
|
1560
|
+
const d = [];
|
|
1561
|
+
for (const u of i) {
|
|
1562
|
+
const g = a[u], R = r.data[u];
|
|
1563
|
+
d.push({
|
|
1564
|
+
key: { status: "valid", value: u },
|
|
1565
|
+
value: g._parse(new O(r, R, r.path, u)),
|
|
1566
|
+
alwaysSet: u in r.data
|
|
1567
1567
|
});
|
|
1568
1568
|
}
|
|
1569
1569
|
if (this._def.catchall instanceof P) {
|
|
1570
|
-
const
|
|
1571
|
-
if (
|
|
1570
|
+
const u = this._def.unknownKeys;
|
|
1571
|
+
if (u === "passthrough")
|
|
1572
1572
|
for (const g of o)
|
|
1573
|
-
|
|
1573
|
+
d.push({
|
|
1574
1574
|
key: { status: "valid", value: g },
|
|
1575
1575
|
value: { status: "valid", value: r.data[g] }
|
|
1576
1576
|
});
|
|
1577
|
-
else if (
|
|
1577
|
+
else if (u === "strict")
|
|
1578
1578
|
o.length > 0 && (l(r, {
|
|
1579
1579
|
code: c.unrecognized_keys,
|
|
1580
1580
|
keys: o
|
|
1581
1581
|
}), n.dirty());
|
|
1582
|
-
else if (
|
|
1582
|
+
else if (u !== "strip")
|
|
1583
1583
|
throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1584
1584
|
} else {
|
|
1585
|
-
const
|
|
1585
|
+
const u = this._def.catchall;
|
|
1586
1586
|
for (const g of o) {
|
|
1587
1587
|
const R = r.data[g];
|
|
1588
|
-
|
|
1588
|
+
d.push({
|
|
1589
1589
|
key: { status: "valid", value: g },
|
|
1590
|
-
value:
|
|
1590
|
+
value: u._parse(
|
|
1591
1591
|
new O(r, R, r.path, g)
|
|
1592
1592
|
//, ctx.child(key), value, getParsedType(value)
|
|
1593
1593
|
),
|
|
@@ -1596,17 +1596,17 @@ class b extends _ {
|
|
|
1596
1596
|
}
|
|
1597
1597
|
}
|
|
1598
1598
|
return r.common.async ? Promise.resolve().then(async () => {
|
|
1599
|
-
const
|
|
1600
|
-
for (const g of
|
|
1599
|
+
const u = [];
|
|
1600
|
+
for (const g of d) {
|
|
1601
1601
|
const R = await g.key, D = await g.value;
|
|
1602
|
-
|
|
1602
|
+
u.push({
|
|
1603
1603
|
key: R,
|
|
1604
1604
|
value: D,
|
|
1605
1605
|
alwaysSet: g.alwaysSet
|
|
1606
1606
|
});
|
|
1607
1607
|
}
|
|
1608
|
-
return
|
|
1609
|
-
}).then((
|
|
1608
|
+
return u;
|
|
1609
|
+
}).then((u) => S.mergeObjectSync(n, u)) : S.mergeObjectSync(n, d);
|
|
1610
1610
|
}
|
|
1611
1611
|
get shape() {
|
|
1612
1612
|
return this._def.shape();
|
|
@@ -1618,11 +1618,11 @@ class b extends _ {
|
|
|
1618
1618
|
...e !== void 0 ? {
|
|
1619
1619
|
errorMap: (s, n) => {
|
|
1620
1620
|
var r, a, i, o;
|
|
1621
|
-
const
|
|
1621
|
+
const d = (i = (a = (r = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(r, s, n).message) !== null && i !== void 0 ? i : n.defaultError;
|
|
1622
1622
|
return s.code === "unrecognized_keys" ? {
|
|
1623
|
-
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o :
|
|
1623
|
+
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : d
|
|
1624
1624
|
} : {
|
|
1625
|
-
message:
|
|
1625
|
+
message: d
|
|
1626
1626
|
};
|
|
1627
1627
|
}
|
|
1628
1628
|
} : {}
|
|
@@ -1798,7 +1798,7 @@ class b extends _ {
|
|
|
1798
1798
|
});
|
|
1799
1799
|
}
|
|
1800
1800
|
keyof() {
|
|
1801
|
-
return
|
|
1801
|
+
return ze(x.objectKeys(this.shape));
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
1804
|
b.create = (t, e) => new b({
|
|
@@ -1860,26 +1860,26 @@ class oe extends _ {
|
|
|
1860
1860
|
{
|
|
1861
1861
|
let a;
|
|
1862
1862
|
const i = [];
|
|
1863
|
-
for (const
|
|
1864
|
-
const
|
|
1863
|
+
for (const d of n) {
|
|
1864
|
+
const u = {
|
|
1865
1865
|
...s,
|
|
1866
1866
|
common: {
|
|
1867
1867
|
...s.common,
|
|
1868
1868
|
issues: []
|
|
1869
1869
|
},
|
|
1870
1870
|
parent: null
|
|
1871
|
-
}, g =
|
|
1871
|
+
}, g = d._parseSync({
|
|
1872
1872
|
data: s.data,
|
|
1873
1873
|
path: s.path,
|
|
1874
|
-
parent:
|
|
1874
|
+
parent: u
|
|
1875
1875
|
});
|
|
1876
1876
|
if (g.status === "valid")
|
|
1877
1877
|
return g;
|
|
1878
|
-
g.status === "dirty" && !a && (a = { result: g, ctx:
|
|
1878
|
+
g.status === "dirty" && !a && (a = { result: g, ctx: u }), u.common.issues.length && i.push(u.common.issues);
|
|
1879
1879
|
}
|
|
1880
1880
|
if (a)
|
|
1881
1881
|
return s.common.issues.push(...a.ctx.common.issues), a.result;
|
|
1882
|
-
const o = i.map((
|
|
1882
|
+
const o = i.map((d) => new E(d));
|
|
1883
1883
|
return l(s, {
|
|
1884
1884
|
code: c.invalid_union,
|
|
1885
1885
|
unionErrors: o
|
|
@@ -1895,7 +1895,7 @@ oe.create = (t, e) => new oe({
|
|
|
1895
1895
|
typeName: m.ZodUnion,
|
|
1896
1896
|
...v(e)
|
|
1897
1897
|
});
|
|
1898
|
-
const j = (t) => t instanceof
|
|
1898
|
+
const j = (t) => t instanceof de ? j(t.schema) : t instanceof M ? j(t.innerType()) : t instanceof le ? [t.value] : t instanceof L ? t.options : t instanceof fe ? x.objectValues(t.enum) : t instanceof he ? j(t._def.innerType) : t instanceof ae ? [void 0] : t instanceof ie ? [null] : t instanceof I ? [void 0, ...j(t.unwrap())] : t instanceof V ? [null, ...j(t.unwrap())] : t instanceof Oe || t instanceof me ? j(t.unwrap()) : t instanceof pe ? j(t._def.innerType) : [];
|
|
1899
1899
|
class Re extends _ {
|
|
1900
1900
|
_parse(e) {
|
|
1901
1901
|
const { ctx: s } = this._processInputParams(e);
|
|
@@ -1965,10 +1965,10 @@ function Ie(t, e) {
|
|
|
1965
1965
|
if (s === f.object && n === f.object) {
|
|
1966
1966
|
const r = x.objectKeys(e), a = x.objectKeys(t).filter((o) => r.indexOf(o) !== -1), i = { ...t, ...e };
|
|
1967
1967
|
for (const o of a) {
|
|
1968
|
-
const
|
|
1969
|
-
if (!
|
|
1968
|
+
const d = Ie(t[o], e[o]);
|
|
1969
|
+
if (!d.valid)
|
|
1970
1970
|
return { valid: !1 };
|
|
1971
|
-
i[o] =
|
|
1971
|
+
i[o] = d.data;
|
|
1972
1972
|
}
|
|
1973
1973
|
return { valid: !0, data: i };
|
|
1974
1974
|
} else if (s === f.array && n === f.array) {
|
|
@@ -1976,10 +1976,10 @@ function Ie(t, e) {
|
|
|
1976
1976
|
return { valid: !1 };
|
|
1977
1977
|
const r = [];
|
|
1978
1978
|
for (let a = 0; a < t.length; a++) {
|
|
1979
|
-
const i = t[a], o = e[a],
|
|
1980
|
-
if (!
|
|
1979
|
+
const i = t[a], o = e[a], d = Ie(i, o);
|
|
1980
|
+
if (!d.valid)
|
|
1981
1981
|
return { valid: !1 };
|
|
1982
|
-
r.push(
|
|
1982
|
+
r.push(d.data);
|
|
1983
1983
|
}
|
|
1984
1984
|
return { valid: !0, data: r };
|
|
1985
1985
|
} else
|
|
@@ -2048,8 +2048,8 @@ class A extends _ {
|
|
|
2048
2048
|
type: "array"
|
|
2049
2049
|
}), s.dirty());
|
|
2050
2050
|
const a = [...n.data].map((i, o) => {
|
|
2051
|
-
const
|
|
2052
|
-
return
|
|
2051
|
+
const d = this._def.items[o] || this._def.rest;
|
|
2052
|
+
return d ? d._parse(new O(n, i, n.path, o)) : null;
|
|
2053
2053
|
}).filter((i) => !!i);
|
|
2054
2054
|
return n.common.async ? Promise.all(a).then((i) => S.mergeArray(s, i)) : S.mergeArray(s, a);
|
|
2055
2055
|
}
|
|
@@ -2073,7 +2073,7 @@ A.create = (t, e) => {
|
|
|
2073
2073
|
...v(e)
|
|
2074
2074
|
});
|
|
2075
2075
|
};
|
|
2076
|
-
class
|
|
2076
|
+
class ue extends _ {
|
|
2077
2077
|
get keySchema() {
|
|
2078
2078
|
return this._def.keyType;
|
|
2079
2079
|
}
|
|
@@ -2101,13 +2101,13 @@ class de extends _ {
|
|
|
2101
2101
|
return this._def.valueType;
|
|
2102
2102
|
}
|
|
2103
2103
|
static create(e, s, n) {
|
|
2104
|
-
return s instanceof _ ? new
|
|
2104
|
+
return s instanceof _ ? new ue({
|
|
2105
2105
|
keyType: e,
|
|
2106
2106
|
valueType: s,
|
|
2107
2107
|
typeName: m.ZodRecord,
|
|
2108
2108
|
...v(n)
|
|
2109
|
-
}) : new
|
|
2110
|
-
keyType:
|
|
2109
|
+
}) : new ue({
|
|
2110
|
+
keyType: Z.create(),
|
|
2111
2111
|
valueType: e,
|
|
2112
2112
|
typeName: m.ZodRecord,
|
|
2113
2113
|
...v(s)
|
|
@@ -2129,28 +2129,28 @@ class Se extends _ {
|
|
|
2129
2129
|
expected: f.map,
|
|
2130
2130
|
received: n.parsedType
|
|
2131
2131
|
}), y;
|
|
2132
|
-
const r = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o,
|
|
2133
|
-
key: r._parse(new O(n, o, n.path, [
|
|
2134
|
-
value: a._parse(new O(n,
|
|
2132
|
+
const r = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o, d], u) => ({
|
|
2133
|
+
key: r._parse(new O(n, o, n.path, [u, "key"])),
|
|
2134
|
+
value: a._parse(new O(n, d, n.path, [u, "value"]))
|
|
2135
2135
|
}));
|
|
2136
2136
|
if (n.common.async) {
|
|
2137
2137
|
const o = /* @__PURE__ */ new Map();
|
|
2138
2138
|
return Promise.resolve().then(async () => {
|
|
2139
|
-
for (const
|
|
2140
|
-
const
|
|
2141
|
-
if (
|
|
2139
|
+
for (const d of i) {
|
|
2140
|
+
const u = await d.key, g = await d.value;
|
|
2141
|
+
if (u.status === "aborted" || g.status === "aborted")
|
|
2142
2142
|
return y;
|
|
2143
|
-
(
|
|
2143
|
+
(u.status === "dirty" || g.status === "dirty") && s.dirty(), o.set(u.value, g.value);
|
|
2144
2144
|
}
|
|
2145
2145
|
return { status: s.value, value: o };
|
|
2146
2146
|
});
|
|
2147
2147
|
} else {
|
|
2148
2148
|
const o = /* @__PURE__ */ new Map();
|
|
2149
|
-
for (const
|
|
2150
|
-
const
|
|
2151
|
-
if (
|
|
2149
|
+
for (const d of i) {
|
|
2150
|
+
const u = d.key, g = d.value;
|
|
2151
|
+
if (u.status === "aborted" || g.status === "aborted")
|
|
2152
2152
|
return y;
|
|
2153
|
-
(
|
|
2153
|
+
(u.status === "dirty" || g.status === "dirty") && s.dirty(), o.set(u.value, g.value);
|
|
2154
2154
|
}
|
|
2155
2155
|
return { status: s.value, value: o };
|
|
2156
2156
|
}
|
|
@@ -2188,17 +2188,17 @@ class G extends _ {
|
|
|
2188
2188
|
message: r.maxSize.message
|
|
2189
2189
|
}), s.dirty());
|
|
2190
2190
|
const a = this._def.valueType;
|
|
2191
|
-
function i(
|
|
2192
|
-
const
|
|
2193
|
-
for (const g of
|
|
2191
|
+
function i(d) {
|
|
2192
|
+
const u = /* @__PURE__ */ new Set();
|
|
2193
|
+
for (const g of d) {
|
|
2194
2194
|
if (g.status === "aborted")
|
|
2195
2195
|
return y;
|
|
2196
|
-
g.status === "dirty" && s.dirty(),
|
|
2196
|
+
g.status === "dirty" && s.dirty(), u.add(g.value);
|
|
2197
2197
|
}
|
|
2198
|
-
return { status: s.value, value:
|
|
2198
|
+
return { status: s.value, value: u };
|
|
2199
2199
|
}
|
|
2200
|
-
const o = [...n.data.values()].map((
|
|
2201
|
-
return n.common.async ? Promise.all(o).then((
|
|
2200
|
+
const o = [...n.data.values()].map((d, u) => a._parse(new O(n, d, n.path, u)));
|
|
2201
|
+
return n.common.async ? Promise.all(o).then((d) => i(d)) : i(o);
|
|
2202
2202
|
}
|
|
2203
2203
|
min(e, s) {
|
|
2204
2204
|
return new G({
|
|
@@ -2238,7 +2238,7 @@ class H extends _ {
|
|
|
2238
2238
|
expected: f.function,
|
|
2239
2239
|
received: s.parsedType
|
|
2240
2240
|
}), y;
|
|
2241
|
-
function n(o,
|
|
2241
|
+
function n(o, d) {
|
|
2242
2242
|
return xe({
|
|
2243
2243
|
data: o,
|
|
2244
2244
|
path: s.path,
|
|
@@ -2247,14 +2247,14 @@ class H extends _ {
|
|
|
2247
2247
|
s.schemaErrorMap,
|
|
2248
2248
|
_e(),
|
|
2249
2249
|
Y
|
|
2250
|
-
].filter((
|
|
2250
|
+
].filter((u) => !!u),
|
|
2251
2251
|
issueData: {
|
|
2252
2252
|
code: c.invalid_arguments,
|
|
2253
|
-
argumentsError:
|
|
2253
|
+
argumentsError: d
|
|
2254
2254
|
}
|
|
2255
2255
|
});
|
|
2256
2256
|
}
|
|
2257
|
-
function r(o,
|
|
2257
|
+
function r(o, d) {
|
|
2258
2258
|
return xe({
|
|
2259
2259
|
data: o,
|
|
2260
2260
|
path: s.path,
|
|
@@ -2263,31 +2263,31 @@ class H extends _ {
|
|
|
2263
2263
|
s.schemaErrorMap,
|
|
2264
2264
|
_e(),
|
|
2265
2265
|
Y
|
|
2266
|
-
].filter((
|
|
2266
|
+
].filter((u) => !!u),
|
|
2267
2267
|
issueData: {
|
|
2268
2268
|
code: c.invalid_return_type,
|
|
2269
|
-
returnTypeError:
|
|
2269
|
+
returnTypeError: d
|
|
2270
2270
|
}
|
|
2271
2271
|
});
|
|
2272
2272
|
}
|
|
2273
2273
|
const a = { errorMap: s.common.contextualErrorMap }, i = s.data;
|
|
2274
2274
|
if (this._def.returns instanceof X) {
|
|
2275
2275
|
const o = this;
|
|
2276
|
-
return T(async function(...
|
|
2277
|
-
const
|
|
2278
|
-
throw
|
|
2276
|
+
return T(async function(...d) {
|
|
2277
|
+
const u = new E([]), g = await o._def.args.parseAsync(d, a).catch((Ee) => {
|
|
2278
|
+
throw u.addIssue(n(d, Ee)), u;
|
|
2279
2279
|
}), R = await Reflect.apply(i, this, g);
|
|
2280
2280
|
return await o._def.returns._def.type.parseAsync(R, a).catch((Ee) => {
|
|
2281
|
-
throw
|
|
2281
|
+
throw u.addIssue(r(R, Ee)), u;
|
|
2282
2282
|
});
|
|
2283
2283
|
});
|
|
2284
2284
|
} else {
|
|
2285
2285
|
const o = this;
|
|
2286
|
-
return T(function(...
|
|
2287
|
-
const
|
|
2288
|
-
if (!
|
|
2289
|
-
throw new E([n(
|
|
2290
|
-
const g = Reflect.apply(i, this,
|
|
2286
|
+
return T(function(...d) {
|
|
2287
|
+
const u = o._def.args.safeParse(d, a);
|
|
2288
|
+
if (!u.success)
|
|
2289
|
+
throw new E([n(d, u.error)]);
|
|
2290
|
+
const g = Reflect.apply(i, this, u.data), R = o._def.returns.safeParse(g, a);
|
|
2291
2291
|
if (!R.success)
|
|
2292
2292
|
throw new E([r(g, R.error)]);
|
|
2293
2293
|
return R.data;
|
|
@@ -2327,7 +2327,7 @@ class H extends _ {
|
|
|
2327
2327
|
});
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
class
|
|
2330
|
+
class de extends _ {
|
|
2331
2331
|
get schema() {
|
|
2332
2332
|
return this._def.getter();
|
|
2333
2333
|
}
|
|
@@ -2336,7 +2336,7 @@ class ue extends _ {
|
|
|
2336
2336
|
return this._def.getter()._parse({ data: s.data, path: s.path, parent: s });
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
|
-
|
|
2339
|
+
de.create = (t, e) => new de({
|
|
2340
2340
|
getter: t,
|
|
2341
2341
|
typeName: m.ZodLazy,
|
|
2342
2342
|
...v(e)
|
|
@@ -2362,7 +2362,7 @@ le.create = (t, e) => new le({
|
|
|
2362
2362
|
typeName: m.ZodLiteral,
|
|
2363
2363
|
...v(e)
|
|
2364
2364
|
});
|
|
2365
|
-
function
|
|
2365
|
+
function ze(t, e) {
|
|
2366
2366
|
return new L({
|
|
2367
2367
|
values: t,
|
|
2368
2368
|
typeName: m.ZodEnum,
|
|
@@ -2382,7 +2382,7 @@ class L extends _ {
|
|
|
2382
2382
|
code: c.invalid_type
|
|
2383
2383
|
}), y;
|
|
2384
2384
|
}
|
|
2385
|
-
if (be(this, F) ||
|
|
2385
|
+
if (be(this, F) || Le(this, F, new Set(this._def.values)), !be(this, F).has(e.data)) {
|
|
2386
2386
|
const s = this._getOrReturnCtx(e), n = this._def.values;
|
|
2387
2387
|
return l(s, {
|
|
2388
2388
|
received: s.data,
|
|
@@ -2427,7 +2427,7 @@ class L extends _ {
|
|
|
2427
2427
|
}
|
|
2428
2428
|
}
|
|
2429
2429
|
F = /* @__PURE__ */ new WeakMap();
|
|
2430
|
-
L.create =
|
|
2430
|
+
L.create = ze;
|
|
2431
2431
|
class fe extends _ {
|
|
2432
2432
|
constructor() {
|
|
2433
2433
|
super(...arguments), ee.set(this, void 0);
|
|
@@ -2442,7 +2442,7 @@ class fe extends _ {
|
|
|
2442
2442
|
code: c.invalid_type
|
|
2443
2443
|
}), y;
|
|
2444
2444
|
}
|
|
2445
|
-
if (be(this, ee) ||
|
|
2445
|
+
if (be(this, ee) || Le(this, ee, new Set(x.getValidEnumValues(this._def.values))), !be(this, ee).has(e.data)) {
|
|
2446
2446
|
const r = x.objectValues(s);
|
|
2447
2447
|
return l(n, {
|
|
2448
2448
|
received: n.data,
|
|
@@ -2486,7 +2486,7 @@ X.create = (t, e) => new X({
|
|
|
2486
2486
|
typeName: m.ZodPromise,
|
|
2487
2487
|
...v(e)
|
|
2488
2488
|
});
|
|
2489
|
-
class
|
|
2489
|
+
class M extends _ {
|
|
2490
2490
|
innerType() {
|
|
2491
2491
|
return this._def.schema;
|
|
2492
2492
|
}
|
|
@@ -2508,12 +2508,12 @@ class N extends _ {
|
|
|
2508
2508
|
return Promise.resolve(i).then(async (o) => {
|
|
2509
2509
|
if (s.value === "aborted")
|
|
2510
2510
|
return y;
|
|
2511
|
-
const
|
|
2511
|
+
const d = await this._def.schema._parseAsync({
|
|
2512
2512
|
data: o,
|
|
2513
2513
|
path: n.path,
|
|
2514
2514
|
parent: n
|
|
2515
2515
|
});
|
|
2516
|
-
return
|
|
2516
|
+
return d.status === "aborted" ? y : d.status === "dirty" || s.value === "dirty" ? W(d.value) : d;
|
|
2517
2517
|
});
|
|
2518
2518
|
{
|
|
2519
2519
|
if (s.value === "aborted")
|
|
@@ -2528,10 +2528,10 @@ class N extends _ {
|
|
|
2528
2528
|
}
|
|
2529
2529
|
if (r.type === "refinement") {
|
|
2530
2530
|
const i = (o) => {
|
|
2531
|
-
const
|
|
2531
|
+
const d = r.refinement(o, a);
|
|
2532
2532
|
if (n.common.async)
|
|
2533
|
-
return Promise.resolve(
|
|
2534
|
-
if (
|
|
2533
|
+
return Promise.resolve(d);
|
|
2534
|
+
if (d instanceof Promise)
|
|
2535
2535
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2536
2536
|
return o;
|
|
2537
2537
|
};
|
|
@@ -2563,13 +2563,13 @@ class N extends _ {
|
|
|
2563
2563
|
x.assertNever(r);
|
|
2564
2564
|
}
|
|
2565
2565
|
}
|
|
2566
|
-
|
|
2566
|
+
M.create = (t, e, s) => new M({
|
|
2567
2567
|
schema: t,
|
|
2568
2568
|
typeName: m.ZodEffects,
|
|
2569
2569
|
effect: e,
|
|
2570
2570
|
...v(s)
|
|
2571
2571
|
});
|
|
2572
|
-
|
|
2572
|
+
M.createWithPreprocess = (t, e, s) => new M({
|
|
2573
2573
|
schema: e,
|
|
2574
2574
|
effect: { type: "preprocess", transform: t },
|
|
2575
2575
|
typeName: m.ZodEffects,
|
|
@@ -2749,12 +2749,12 @@ me.create = (t, e) => new me({
|
|
|
2749
2749
|
typeName: m.ZodReadonly,
|
|
2750
2750
|
...v(e)
|
|
2751
2751
|
});
|
|
2752
|
-
function
|
|
2752
|
+
function Ge(t, e = {}, s) {
|
|
2753
2753
|
return t ? J.create().superRefine((n, r) => {
|
|
2754
2754
|
var a, i;
|
|
2755
2755
|
if (!t(n)) {
|
|
2756
|
-
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e,
|
|
2757
|
-
r.addIssue({ code: "custom", ...
|
|
2756
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, d = (i = (a = o.fatal) !== null && a !== void 0 ? a : s) !== null && i !== void 0 ? i : !0, u = typeof o == "string" ? { message: o } : o;
|
|
2757
|
+
r.addIssue({ code: "custom", ...u, fatal: d });
|
|
2758
2758
|
}
|
|
2759
2759
|
}) : J.create();
|
|
2760
2760
|
}
|
|
@@ -2767,8 +2767,8 @@ var m;
|
|
|
2767
2767
|
})(m || (m = {}));
|
|
2768
2768
|
const kt = (t, e = {
|
|
2769
2769
|
message: `Input not instance of ${t.name}`
|
|
2770
|
-
}) =>
|
|
2771
|
-
string: (t) =>
|
|
2770
|
+
}) => Ge((s) => s instanceof t, e), Qe = Z.create, We = $.create, St = Te.create, Tt = U.create, He = re.create, Rt = z.create, Et = we.create, Ct = ae.create, Zt = ie.create, Nt = J.create, Mt = B.create, It = P.create, Ot = ke.create, At = N.create, jt = b.create, Pt = b.strictCreate, qt = oe.create, $t = Re.create, Ut = ce.create, Lt = A.create, Vt = ue.create, Dt = Se.create, Bt = G.create, zt = H.create, Gt = de.create, Qt = le.create, Wt = L.create, Ht = fe.create, Yt = X.create, qe = M.create, Jt = I.create, Xt = V.create, Kt = M.createWithPreprocess, Ft = ge.create, es = () => Qe().optional(), ts = () => We().optional(), ss = () => He().optional(), ns = {
|
|
2771
|
+
string: (t) => Z.create({ ...t, coerce: !0 }),
|
|
2772
2772
|
number: (t) => $.create({ ...t, coerce: !0 }),
|
|
2773
2773
|
boolean: (t) => re.create({
|
|
2774
2774
|
...t,
|
|
@@ -2802,8 +2802,8 @@ var h = /* @__PURE__ */ Object.freeze({
|
|
|
2802
2802
|
ZodParsedType: f,
|
|
2803
2803
|
getParsedType: q,
|
|
2804
2804
|
ZodType: _,
|
|
2805
|
-
datetimeRegex:
|
|
2806
|
-
ZodString:
|
|
2805
|
+
datetimeRegex: Be,
|
|
2806
|
+
ZodString: Z,
|
|
2807
2807
|
ZodNumber: $,
|
|
2808
2808
|
ZodBigInt: U,
|
|
2809
2809
|
ZodBoolean: re,
|
|
@@ -2815,23 +2815,23 @@ var h = /* @__PURE__ */ Object.freeze({
|
|
|
2815
2815
|
ZodUnknown: B,
|
|
2816
2816
|
ZodNever: P,
|
|
2817
2817
|
ZodVoid: ke,
|
|
2818
|
-
ZodArray:
|
|
2818
|
+
ZodArray: N,
|
|
2819
2819
|
ZodObject: b,
|
|
2820
2820
|
ZodUnion: oe,
|
|
2821
2821
|
ZodDiscriminatedUnion: Re,
|
|
2822
2822
|
ZodIntersection: ce,
|
|
2823
2823
|
ZodTuple: A,
|
|
2824
|
-
ZodRecord:
|
|
2824
|
+
ZodRecord: ue,
|
|
2825
2825
|
ZodMap: Se,
|
|
2826
2826
|
ZodSet: G,
|
|
2827
2827
|
ZodFunction: H,
|
|
2828
|
-
ZodLazy:
|
|
2828
|
+
ZodLazy: de,
|
|
2829
2829
|
ZodLiteral: le,
|
|
2830
2830
|
ZodEnum: L,
|
|
2831
2831
|
ZodNativeEnum: fe,
|
|
2832
2832
|
ZodPromise: X,
|
|
2833
|
-
ZodEffects:
|
|
2834
|
-
ZodTransformer:
|
|
2833
|
+
ZodEffects: M,
|
|
2834
|
+
ZodTransformer: M,
|
|
2835
2835
|
ZodOptional: I,
|
|
2836
2836
|
ZodNullable: V,
|
|
2837
2837
|
ZodDefault: he,
|
|
@@ -2841,7 +2841,7 @@ var h = /* @__PURE__ */ Object.freeze({
|
|
|
2841
2841
|
ZodBranded: Oe,
|
|
2842
2842
|
ZodPipeline: ge,
|
|
2843
2843
|
ZodReadonly: me,
|
|
2844
|
-
custom:
|
|
2844
|
+
custom: Ge,
|
|
2845
2845
|
Schema: _,
|
|
2846
2846
|
ZodSchema: _,
|
|
2847
2847
|
late: wt,
|
|
@@ -2852,10 +2852,10 @@ var h = /* @__PURE__ */ Object.freeze({
|
|
|
2852
2852
|
any: Nt,
|
|
2853
2853
|
array: At,
|
|
2854
2854
|
bigint: Tt,
|
|
2855
|
-
boolean:
|
|
2855
|
+
boolean: He,
|
|
2856
2856
|
date: Rt,
|
|
2857
2857
|
discriminatedUnion: $t,
|
|
2858
|
-
effect:
|
|
2858
|
+
effect: qe,
|
|
2859
2859
|
enum: Wt,
|
|
2860
2860
|
function: zt,
|
|
2861
2861
|
instanceof: kt,
|
|
@@ -2868,7 +2868,7 @@ var h = /* @__PURE__ */ Object.freeze({
|
|
|
2868
2868
|
never: It,
|
|
2869
2869
|
null: Zt,
|
|
2870
2870
|
nullable: Xt,
|
|
2871
|
-
number:
|
|
2871
|
+
number: We,
|
|
2872
2872
|
object: jt,
|
|
2873
2873
|
oboolean: ss,
|
|
2874
2874
|
onumber: ts,
|
|
@@ -2880,9 +2880,9 @@ var h = /* @__PURE__ */ Object.freeze({
|
|
|
2880
2880
|
record: Vt,
|
|
2881
2881
|
set: Bt,
|
|
2882
2882
|
strictObject: Pt,
|
|
2883
|
-
string:
|
|
2883
|
+
string: Qe,
|
|
2884
2884
|
symbol: Et,
|
|
2885
|
-
transformer:
|
|
2885
|
+
transformer: qe,
|
|
2886
2886
|
tuple: Lt,
|
|
2887
2887
|
undefined: Ct,
|
|
2888
2888
|
union: qt,
|
|
@@ -2905,7 +2905,7 @@ const w = h.object({
|
|
|
2905
2905
|
}), is = w.extend({
|
|
2906
2906
|
status: h.literal("error"),
|
|
2907
2907
|
message: h.string()
|
|
2908
|
-
}),
|
|
2908
|
+
}), Ye = h.object({
|
|
2909
2909
|
semanticColor: h.string().optional(),
|
|
2910
2910
|
label: h.string(),
|
|
2911
2911
|
description: h.string(),
|
|
@@ -2914,20 +2914,20 @@ const w = h.object({
|
|
|
2914
2914
|
hidden: h.boolean(),
|
|
2915
2915
|
errorMessage: h.string().optional(),
|
|
2916
2916
|
answer: h.unknown().optional()
|
|
2917
|
-
}), os =
|
|
2917
|
+
}), os = Ye.partial(), cs = h.object({
|
|
2918
2918
|
id: h.string().uuid(),
|
|
2919
2919
|
name: h.string(),
|
|
2920
2920
|
mimeType: h.string(),
|
|
2921
2921
|
blobUrl: h.string()
|
|
2922
|
-
}),
|
|
2922
|
+
}), Ae = h.record(h.unknown()), Je = h.object({
|
|
2923
2923
|
label: h.string(),
|
|
2924
2924
|
hidden: h.boolean(),
|
|
2925
2925
|
collapsed: h.boolean()
|
|
2926
|
-
}),
|
|
2926
|
+
}), us = Je.partial(), ds = w.extend({
|
|
2927
2927
|
action: h.literal("getQuestion"),
|
|
2928
2928
|
question: h.string()
|
|
2929
2929
|
}), ls = K.extend({
|
|
2930
|
-
question:
|
|
2930
|
+
question: Ye
|
|
2931
2931
|
}), fs = w.extend({
|
|
2932
2932
|
action: h.literal("setQuestion"),
|
|
2933
2933
|
question: h.string(),
|
|
@@ -2944,7 +2944,7 @@ const w = h.object({
|
|
|
2944
2944
|
}), ys = w.extend({
|
|
2945
2945
|
action: h.literal("setGroup"),
|
|
2946
2946
|
group: h.string(),
|
|
2947
|
-
groupData:
|
|
2947
|
+
groupData: us
|
|
2948
2948
|
}), vs = w.extend({
|
|
2949
2949
|
action: h.literal("setAnswer"),
|
|
2950
2950
|
question: h.string(),
|
|
@@ -2964,109 +2964,115 @@ const w = h.object({
|
|
|
2964
2964
|
action: h.literal("fetchEntities"),
|
|
2965
2965
|
fetchXml: h.string()
|
|
2966
2966
|
}), Ts = K.extend({
|
|
2967
|
-
entities: h.array(
|
|
2967
|
+
entities: h.array(Ae)
|
|
2968
2968
|
}), Rs = w.extend({
|
|
2969
2969
|
action: h.literal("getEntityById"),
|
|
2970
2970
|
entityName: h.string(),
|
|
2971
2971
|
entityId: h.string()
|
|
2972
2972
|
}), Es = K.extend({
|
|
2973
|
-
entity:
|
|
2973
|
+
entity: Ae
|
|
2974
2974
|
}), Cs = w.extend({
|
|
2975
|
+
action: h.literal("saveEntity"),
|
|
2976
|
+
entity: Ae
|
|
2977
|
+
}), Zs = w.extend({
|
|
2975
2978
|
action: h.literal("repeatGroup"),
|
|
2976
2979
|
parentGroupName: h.string(),
|
|
2977
2980
|
groupIndex: h.number()
|
|
2978
|
-
}),
|
|
2981
|
+
}), Ns = w.extend({
|
|
2979
2982
|
action: h.literal("addNewGroup"),
|
|
2980
2983
|
groupName: h.string()
|
|
2981
|
-
}),
|
|
2984
|
+
}), Ms = w.extend({
|
|
2982
2985
|
action: h.literal("deleteGroup"),
|
|
2983
2986
|
parentGroupName: h.string(),
|
|
2984
2987
|
groupIndex: h.number()
|
|
2985
2988
|
});
|
|
2986
|
-
function
|
|
2989
|
+
function Hs(t) {
|
|
2987
2990
|
return cs.safeParse(t).success;
|
|
2988
2991
|
}
|
|
2989
|
-
function
|
|
2992
|
+
function Is(t) {
|
|
2990
2993
|
return as.safeParse(t).success;
|
|
2991
2994
|
}
|
|
2992
2995
|
function Xe(t) {
|
|
2993
2996
|
return w.safeParse(t).success;
|
|
2994
2997
|
}
|
|
2995
|
-
function
|
|
2998
|
+
function Os(t) {
|
|
2996
2999
|
return K.safeParse(t).success;
|
|
2997
3000
|
}
|
|
2998
|
-
function
|
|
3001
|
+
function As(t) {
|
|
2999
3002
|
return is.safeParse(t).success;
|
|
3000
3003
|
}
|
|
3001
|
-
function
|
|
3002
|
-
return
|
|
3004
|
+
function Ys(t) {
|
|
3005
|
+
return ds.safeParse(t).success;
|
|
3003
3006
|
}
|
|
3004
|
-
function
|
|
3007
|
+
function js(t) {
|
|
3005
3008
|
return ls.safeParse(t).success;
|
|
3006
3009
|
}
|
|
3007
|
-
function
|
|
3010
|
+
function Js(t) {
|
|
3008
3011
|
return vs.safeParse(t).success;
|
|
3009
3012
|
}
|
|
3010
|
-
function
|
|
3013
|
+
function Xs(t) {
|
|
3011
3014
|
return fs.safeParse(t).success;
|
|
3012
3015
|
}
|
|
3013
|
-
function
|
|
3016
|
+
function Ks(t) {
|
|
3014
3017
|
return ys.safeParse(t).success;
|
|
3015
3018
|
}
|
|
3016
|
-
function
|
|
3019
|
+
function Fs(t) {
|
|
3017
3020
|
return hs.safeParse(t).success;
|
|
3018
3021
|
}
|
|
3019
|
-
function
|
|
3022
|
+
function Ps(t) {
|
|
3020
3023
|
return ps.safeParse(t).success;
|
|
3021
3024
|
}
|
|
3022
|
-
function
|
|
3025
|
+
function en(t) {
|
|
3023
3026
|
return ms.safeParse(t).success;
|
|
3024
3027
|
}
|
|
3025
|
-
function
|
|
3028
|
+
function qs(t) {
|
|
3026
3029
|
return gs.safeParse(t).success;
|
|
3027
3030
|
}
|
|
3028
|
-
function
|
|
3031
|
+
function $s(t) {
|
|
3029
3032
|
return _s.safeParse(t).success;
|
|
3030
3033
|
}
|
|
3031
|
-
function
|
|
3034
|
+
function Us(t) {
|
|
3032
3035
|
return xs.safeParse(t).success;
|
|
3033
3036
|
}
|
|
3034
|
-
function
|
|
3037
|
+
function tn(t) {
|
|
3035
3038
|
return bs.safeParse(t).success;
|
|
3036
3039
|
}
|
|
3037
|
-
function
|
|
3040
|
+
function sn(t) {
|
|
3038
3041
|
return ws.safeParse(t).success;
|
|
3039
3042
|
}
|
|
3040
|
-
function
|
|
3043
|
+
function nn(t) {
|
|
3041
3044
|
return ks.safeParse(t).success;
|
|
3042
3045
|
}
|
|
3043
|
-
function
|
|
3044
|
-
return
|
|
3046
|
+
function rn(t) {
|
|
3047
|
+
return $s(t) || Us(t);
|
|
3045
3048
|
}
|
|
3046
|
-
function
|
|
3049
|
+
function Ls(t, e) {
|
|
3047
3050
|
return !Xe(t) || t.id !== e || !("status" in t);
|
|
3048
3051
|
}
|
|
3049
|
-
function
|
|
3052
|
+
function an(t) {
|
|
3050
3053
|
return Ss.safeParse(t).success;
|
|
3051
3054
|
}
|
|
3052
|
-
function
|
|
3055
|
+
function Vs(t) {
|
|
3053
3056
|
return Ts.safeParse(t).success;
|
|
3054
3057
|
}
|
|
3055
|
-
function
|
|
3058
|
+
function on(t) {
|
|
3056
3059
|
return Rs.safeParse(t).success;
|
|
3057
3060
|
}
|
|
3058
|
-
function
|
|
3061
|
+
function Ds(t) {
|
|
3059
3062
|
return Es.safeParse(t).success;
|
|
3060
3063
|
}
|
|
3061
|
-
function
|
|
3064
|
+
function cn(t) {
|
|
3062
3065
|
return Cs.safeParse(t).success;
|
|
3063
3066
|
}
|
|
3064
|
-
function
|
|
3067
|
+
function un(t) {
|
|
3065
3068
|
return Zs.safeParse(t).success;
|
|
3066
3069
|
}
|
|
3067
3070
|
function dn(t) {
|
|
3068
3071
|
return Ns.safeParse(t).success;
|
|
3069
3072
|
}
|
|
3073
|
+
function ln(t) {
|
|
3074
|
+
return Ms.safeParse(t).success;
|
|
3075
|
+
}
|
|
3070
3076
|
function Ke(t) {
|
|
3071
3077
|
if (t instanceof File || t instanceof Blob)
|
|
3072
3078
|
return URL.createObjectURL(t);
|
|
@@ -3074,10 +3080,10 @@ function Ke(t) {
|
|
|
3074
3080
|
if (/^data:/.test(t)) {
|
|
3075
3081
|
const a = t.match(/^data:([^;]+);base64,(.*)$/);
|
|
3076
3082
|
if (a) {
|
|
3077
|
-
const i = a[1], o = a[2],
|
|
3078
|
-
for (let D = 0; D <
|
|
3079
|
-
g[D] =
|
|
3080
|
-
const R = new Blob([
|
|
3083
|
+
const i = a[1], o = a[2], d = atob(o), u = new ArrayBuffer(d.length), g = new Uint8Array(u);
|
|
3084
|
+
for (let D = 0; D < d.length; D++)
|
|
3085
|
+
g[D] = d.charCodeAt(D);
|
|
3086
|
+
const R = new Blob([u], { type: i });
|
|
3081
3087
|
return URL.createObjectURL(R);
|
|
3082
3088
|
}
|
|
3083
3089
|
throw new Error("Invalid data URL format. Only base64 data URLs are supported.");
|
|
@@ -3094,15 +3100,15 @@ function Ke(t) {
|
|
|
3094
3100
|
}
|
|
3095
3101
|
throw new Error("Unsupported content type for blobUrl");
|
|
3096
3102
|
}
|
|
3097
|
-
function
|
|
3103
|
+
function fn(t, e, s, n) {
|
|
3098
3104
|
return {
|
|
3099
|
-
id: n ??
|
|
3105
|
+
id: n ?? $e(),
|
|
3100
3106
|
name: t,
|
|
3101
3107
|
mimeType: e,
|
|
3102
3108
|
blobUrl: Ke(s)
|
|
3103
3109
|
};
|
|
3104
3110
|
}
|
|
3105
|
-
function
|
|
3111
|
+
function hn(t, e) {
|
|
3106
3112
|
let s = t.blobUrl;
|
|
3107
3113
|
return e.content !== void 0 && (s = Ke(e.content)), {
|
|
3108
3114
|
...t,
|
|
@@ -3110,48 +3116,48 @@ function ln(t, e) {
|
|
|
3110
3116
|
blobUrl: s
|
|
3111
3117
|
};
|
|
3112
3118
|
}
|
|
3113
|
-
window.addEventListener("message",
|
|
3114
|
-
async function
|
|
3115
|
-
await
|
|
3119
|
+
window.addEventListener("message", Bs);
|
|
3120
|
+
async function pn(t, e) {
|
|
3121
|
+
await C({
|
|
3116
3122
|
type: "qp-bridge",
|
|
3117
3123
|
action: "setAnswer",
|
|
3118
3124
|
question: t,
|
|
3119
3125
|
answer: e
|
|
3120
3126
|
});
|
|
3121
3127
|
}
|
|
3122
|
-
async function
|
|
3123
|
-
return await
|
|
3128
|
+
async function mn(t) {
|
|
3129
|
+
return await zs({
|
|
3124
3130
|
type: "qp-bridge",
|
|
3125
3131
|
action: "getQuestion",
|
|
3126
3132
|
question: t
|
|
3127
3133
|
});
|
|
3128
3134
|
}
|
|
3129
|
-
async function
|
|
3130
|
-
await
|
|
3135
|
+
async function gn(t, e) {
|
|
3136
|
+
await C({
|
|
3131
3137
|
type: "qp-bridge",
|
|
3132
3138
|
action: "setQuestion",
|
|
3133
3139
|
question: t,
|
|
3134
3140
|
questionData: e
|
|
3135
3141
|
});
|
|
3136
3142
|
}
|
|
3137
|
-
async function
|
|
3138
|
-
return await
|
|
3143
|
+
async function yn(t) {
|
|
3144
|
+
return await Gs({
|
|
3139
3145
|
type: "qp-bridge",
|
|
3140
3146
|
action: "getGroup",
|
|
3141
3147
|
group: t
|
|
3142
3148
|
});
|
|
3143
3149
|
}
|
|
3144
|
-
async function
|
|
3145
|
-
await
|
|
3150
|
+
async function vn(t, e) {
|
|
3151
|
+
await C({
|
|
3146
3152
|
type: "qp-bridge",
|
|
3147
3153
|
action: "setGroup",
|
|
3148
3154
|
group: t,
|
|
3149
3155
|
groupData: e
|
|
3150
3156
|
});
|
|
3151
3157
|
}
|
|
3152
|
-
function
|
|
3158
|
+
function _n(t) {
|
|
3153
3159
|
const e = (s) => {
|
|
3154
|
-
|
|
3160
|
+
Is(s.data) && t(s.data.question, s.data.answer);
|
|
3155
3161
|
};
|
|
3156
3162
|
return window.addEventListener("message", e), {
|
|
3157
3163
|
cancelSubscription: () => {
|
|
@@ -3159,41 +3165,41 @@ function yn(t) {
|
|
|
3159
3165
|
}
|
|
3160
3166
|
};
|
|
3161
3167
|
}
|
|
3162
|
-
async function
|
|
3163
|
-
await
|
|
3168
|
+
async function xn(t) {
|
|
3169
|
+
await C({
|
|
3164
3170
|
type: "qp-bridge",
|
|
3165
3171
|
action: "busyIndicatorStart"
|
|
3166
3172
|
});
|
|
3167
3173
|
try {
|
|
3168
3174
|
return await t();
|
|
3169
3175
|
} finally {
|
|
3170
|
-
await
|
|
3176
|
+
await C({
|
|
3171
3177
|
type: "qp-bridge",
|
|
3172
3178
|
action: "busyIndicatorEnd"
|
|
3173
3179
|
});
|
|
3174
3180
|
}
|
|
3175
3181
|
}
|
|
3176
|
-
async function
|
|
3177
|
-
await
|
|
3182
|
+
async function bn() {
|
|
3183
|
+
await C({
|
|
3178
3184
|
type: "qp-bridge",
|
|
3179
3185
|
action: "saveQuestionnaire"
|
|
3180
3186
|
});
|
|
3181
3187
|
}
|
|
3182
|
-
async function
|
|
3183
|
-
await
|
|
3188
|
+
async function wn() {
|
|
3189
|
+
await C({
|
|
3184
3190
|
type: "qp-bridge",
|
|
3185
3191
|
action: "completeAndCloseQuestionnaire"
|
|
3186
3192
|
});
|
|
3187
3193
|
}
|
|
3188
|
-
async function
|
|
3189
|
-
await
|
|
3194
|
+
async function kn(t) {
|
|
3195
|
+
await C({
|
|
3190
3196
|
type: "qp-bridge",
|
|
3191
3197
|
action: "executeCustomCommand",
|
|
3192
3198
|
commandName: t
|
|
3193
3199
|
});
|
|
3194
3200
|
}
|
|
3195
3201
|
const te = [];
|
|
3196
|
-
function
|
|
3202
|
+
function Sn(t) {
|
|
3197
3203
|
return te.includes(t) || te.push(t), {
|
|
3198
3204
|
cancelSubscription: () => {
|
|
3199
3205
|
const e = te.indexOf(t);
|
|
@@ -3201,9 +3207,9 @@ function wn(t) {
|
|
|
3201
3207
|
}
|
|
3202
3208
|
};
|
|
3203
3209
|
}
|
|
3204
|
-
async function
|
|
3210
|
+
async function Bs(t) {
|
|
3205
3211
|
try {
|
|
3206
|
-
if (
|
|
3212
|
+
if (qs(t.data)) {
|
|
3207
3213
|
const e = await Promise.all(te.map((n) => n())), s = {
|
|
3208
3214
|
type: "qp-bridge",
|
|
3209
3215
|
status: "success",
|
|
@@ -3222,38 +3228,48 @@ async function Ds(t) {
|
|
|
3222
3228
|
window.parent.postMessage(s, "*");
|
|
3223
3229
|
}
|
|
3224
3230
|
}
|
|
3225
|
-
async function
|
|
3226
|
-
return await
|
|
3231
|
+
async function Tn(t) {
|
|
3232
|
+
return await Qs({
|
|
3227
3233
|
type: "qp-bridge",
|
|
3228
3234
|
action: "fetchEntities",
|
|
3229
3235
|
fetchXml: t
|
|
3230
3236
|
});
|
|
3231
3237
|
}
|
|
3232
|
-
async function
|
|
3233
|
-
return await
|
|
3238
|
+
async function Rn(t, e) {
|
|
3239
|
+
return await Ws({
|
|
3234
3240
|
type: "qp-bridge",
|
|
3235
3241
|
action: "getEntityById",
|
|
3236
3242
|
entityName: t,
|
|
3237
3243
|
entityId: e
|
|
3238
3244
|
});
|
|
3239
3245
|
}
|
|
3240
|
-
|
|
3241
|
-
|
|
3246
|
+
function En() {
|
|
3247
|
+
return { isNew: !0 };
|
|
3248
|
+
}
|
|
3249
|
+
async function Cn(t) {
|
|
3250
|
+
await C({
|
|
3251
|
+
type: "qp-bridge",
|
|
3252
|
+
action: "saveEntity",
|
|
3253
|
+
entity: t
|
|
3254
|
+
});
|
|
3255
|
+
}
|
|
3256
|
+
async function Zn(t, e) {
|
|
3257
|
+
await C({
|
|
3242
3258
|
type: "qp-bridge",
|
|
3243
3259
|
action: "repeatGroup",
|
|
3244
3260
|
parentGroupName: t,
|
|
3245
3261
|
groupIndex: e
|
|
3246
3262
|
});
|
|
3247
3263
|
}
|
|
3248
|
-
async function
|
|
3249
|
-
await
|
|
3264
|
+
async function Nn(t) {
|
|
3265
|
+
await C({
|
|
3250
3266
|
type: "qp-bridge",
|
|
3251
3267
|
action: "addNewGroup",
|
|
3252
3268
|
groupName: t
|
|
3253
3269
|
});
|
|
3254
3270
|
}
|
|
3255
|
-
async function
|
|
3256
|
-
await
|
|
3271
|
+
async function Mn(t, e) {
|
|
3272
|
+
await C({
|
|
3257
3273
|
type: "qp-bridge",
|
|
3258
3274
|
action: "deleteGroup",
|
|
3259
3275
|
parentGroupName: t,
|
|
@@ -3262,106 +3278,110 @@ async function En(t, e) {
|
|
|
3262
3278
|
}
|
|
3263
3279
|
async function ye(t, e) {
|
|
3264
3280
|
return new Promise((s, n) => {
|
|
3265
|
-
const r =
|
|
3266
|
-
if (
|
|
3281
|
+
const r = $e(), a = (i) => {
|
|
3282
|
+
if (Ls(i.data, r))
|
|
3267
3283
|
return;
|
|
3268
3284
|
const o = e(i.data);
|
|
3269
|
-
o.success ? s(o.data) :
|
|
3285
|
+
o.success ? s(o.data) : As(i.data) ? n(new Error(i.data.message)) : n(new Error("Unknown message received")), window.removeEventListener("message", a);
|
|
3270
3286
|
};
|
|
3271
3287
|
window.addEventListener("message", a), window.parent.postMessage({ ...t, id: r }, "*");
|
|
3272
3288
|
});
|
|
3273
3289
|
}
|
|
3274
|
-
async function Bs(t) {
|
|
3275
|
-
return ye(t, (e) => As(e) ? { success: !0, data: e.question } : { success: !1 });
|
|
3276
|
-
}
|
|
3277
3290
|
async function zs(t) {
|
|
3278
|
-
return ye(t, (e) => js(e) ? { success: !0, data: e.
|
|
3279
|
-
}
|
|
3280
|
-
function M(t) {
|
|
3281
|
-
return ye(t, (e) => Is(e) ? { success: !0, data: void 0 } : { success: !1 });
|
|
3291
|
+
return ye(t, (e) => js(e) ? { success: !0, data: e.question } : { success: !1 });
|
|
3282
3292
|
}
|
|
3283
3293
|
async function Gs(t) {
|
|
3284
|
-
return ye(t, (e) =>
|
|
3294
|
+
return ye(t, (e) => Ps(e) ? { success: !0, data: e.group } : { success: !1 });
|
|
3295
|
+
}
|
|
3296
|
+
function C(t) {
|
|
3297
|
+
return ye(t, (e) => Os(e) ? { success: !0, data: void 0 } : { success: !1 });
|
|
3285
3298
|
}
|
|
3286
3299
|
async function Qs(t) {
|
|
3287
|
-
return ye(t, (e) => Vs(e) ? { success: !0, data: e.
|
|
3300
|
+
return ye(t, (e) => Vs(e) ? { success: !0, data: e.entities } : { success: !1 });
|
|
3301
|
+
}
|
|
3302
|
+
async function Ws(t) {
|
|
3303
|
+
return ye(t, (e) => Ds(e) ? { success: !0, data: e.entity } : { success: !1 });
|
|
3288
3304
|
}
|
|
3289
3305
|
export {
|
|
3290
|
-
|
|
3291
|
-
|
|
3306
|
+
Nn as addNewGroup,
|
|
3307
|
+
Ns as addNewGroupRequestMessageSchema,
|
|
3292
3308
|
xs as busyIndicatorEndRequestMessageSchema,
|
|
3293
3309
|
_s as busyIndicatorStartRequestMessageSchema,
|
|
3294
3310
|
gs as canSaveRequestMessageSchema,
|
|
3295
3311
|
ms as canSaveSuccessResponseMessageSchema,
|
|
3296
|
-
|
|
3312
|
+
wn as completeAndCloseQuestionnaire,
|
|
3297
3313
|
ws as completeAndCloseQuestionnaireRequestMessageSchema,
|
|
3298
|
-
|
|
3299
|
-
En as
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3314
|
+
fn as createMediaItem,
|
|
3315
|
+
En as createNewEntity,
|
|
3316
|
+
Mn as deleteGroup,
|
|
3317
|
+
Ms as deleteGroupRequestMessageSchema,
|
|
3318
|
+
Ae as entitySchema,
|
|
3319
|
+
kn as executeCustomCommand,
|
|
3303
3320
|
ks as executeCustomCommandRequestMessageSchema,
|
|
3304
|
-
|
|
3321
|
+
Tn as fetchEntities,
|
|
3305
3322
|
Ss as fetchEntitiesRequestMessageSchema,
|
|
3306
3323
|
Ts as fetchEntitiesSuccessResponseMessageSchema,
|
|
3307
|
-
|
|
3324
|
+
Rn as getEntityById,
|
|
3308
3325
|
Rs as getEntityByIdRequestMessageSchema,
|
|
3309
3326
|
Es as getEntityByIdSuccessResponseMessageSchema,
|
|
3310
|
-
|
|
3327
|
+
yn as getGroup,
|
|
3311
3328
|
hs as getGroupRequestMessageSchema,
|
|
3312
3329
|
ps as getGroupSuccessResponseMessageSchema,
|
|
3313
|
-
|
|
3314
|
-
|
|
3330
|
+
mn as getQuestion,
|
|
3331
|
+
ds as getQuestionRequestMessageSchema,
|
|
3315
3332
|
ls as getQuestionSuccessResponseMessageSchema,
|
|
3316
|
-
|
|
3333
|
+
us as groupOptionalScheme,
|
|
3317
3334
|
Je as groupSchema,
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3335
|
+
dn as isAddNewGroupRequestMessage,
|
|
3336
|
+
Us as isBusyIndicatorEndRequestMessage,
|
|
3337
|
+
$s as isBusyIndicatorStartRequestMessage,
|
|
3338
|
+
qs as isCanSaveRequestMessage,
|
|
3339
|
+
en as isCanSaveSuccessResponseMessage,
|
|
3340
|
+
sn as isCompleteAndCloseQuestionnaireRequestMessage,
|
|
3341
|
+
ln as isDeleteGroupRequestMessage,
|
|
3342
|
+
As as isErrorMessage,
|
|
3343
|
+
nn as isExecuteCustomCommandRequestMessage,
|
|
3344
|
+
an as isFetchEntitiesRequestMessage,
|
|
3345
|
+
Vs as isFetchEntitiesSuccessResponseMessage,
|
|
3346
|
+
on as isGetEntityByIdRequestMessage,
|
|
3347
|
+
Ds as isGetEntityByIdSuccessResponseMessage,
|
|
3348
|
+
Fs as isGetGroupRequestMessage,
|
|
3349
|
+
Ps as isGetGroupSuccessResponseMessage,
|
|
3350
|
+
Ys as isGetQuestionRequestMessage,
|
|
3351
|
+
js as isGetQuestionSuccessResponseMessage,
|
|
3352
|
+
Hs as isMediaItem,
|
|
3353
|
+
Ls as isNotRelevantMessage,
|
|
3354
|
+
Is as isOnAnswerChangeMessage,
|
|
3338
3355
|
Xe as isQpBridgeMessage,
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3356
|
+
un as isRepeatGroupRequestMessage,
|
|
3357
|
+
cn as isSaveEntityRequestMessage,
|
|
3358
|
+
tn as isSaveQuestionnaireRequestMessage,
|
|
3359
|
+
Js as isSetAnswerRequestMessage,
|
|
3360
|
+
Ks as isSetGroupRequestMessage,
|
|
3361
|
+
Xs as isSetQuestionRequestMessage,
|
|
3362
|
+
Os as isSuccessMessage,
|
|
3363
|
+
rn as isWithBusyIndicatorRequestMessage,
|
|
3346
3364
|
cs as mediaItemSchema,
|
|
3347
|
-
|
|
3365
|
+
_n as onAnswerChange,
|
|
3348
3366
|
as as onAnswerChangeMessageSchema,
|
|
3349
|
-
|
|
3367
|
+
Sn as onSave,
|
|
3350
3368
|
w as qpBridgeMessageSchema,
|
|
3351
3369
|
os as questionOptionalScheme,
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3370
|
+
Ye as questionSchema,
|
|
3371
|
+
Zn as repeatGroup,
|
|
3372
|
+
Zs as repeatGroupRequestMessageSchema,
|
|
3355
3373
|
is as responseErrorMessageSchema,
|
|
3356
3374
|
K as responseSuccessMessageSchema,
|
|
3357
|
-
|
|
3375
|
+
Cn as saveEntity,
|
|
3376
|
+
Cs as saveEntityRequestMessageSchema,
|
|
3377
|
+
bn as saveQuestionnaire,
|
|
3358
3378
|
bs as saveQuestionnaireRequestMessageSchema,
|
|
3359
|
-
|
|
3379
|
+
pn as setAnswer,
|
|
3360
3380
|
vs as setAnswerRequestMessageSchema,
|
|
3361
|
-
|
|
3381
|
+
vn as setGroup,
|
|
3362
3382
|
ys as setGroupRequestMessageSchema,
|
|
3363
|
-
|
|
3383
|
+
gn as setQuestion,
|
|
3364
3384
|
fs as setQuestionRequestMessageSchema,
|
|
3365
|
-
|
|
3366
|
-
|
|
3385
|
+
hn as updateMediaItem,
|
|
3386
|
+
xn as withBusyIndicator
|
|
3367
3387
|
};
|