@bymos/agentkit-sdk 0.6.1 → 0.6.2
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/agentkit-widget.iife.js +65 -7
- package/agentkit-widget.js +308 -246
- package/index.cjs +62 -4
- package/index.js +195 -133
- package/package.json +1 -1
package/agentkit-widget.js
CHANGED
|
@@ -58,7 +58,7 @@ var x = R.arrayToEnum([
|
|
|
58
58
|
"never",
|
|
59
59
|
"map",
|
|
60
60
|
"set"
|
|
61
|
-
]),
|
|
61
|
+
]), be = (e) => {
|
|
62
62
|
switch (typeof e) {
|
|
63
63
|
case "undefined":
|
|
64
64
|
return x.undefined;
|
|
@@ -96,7 +96,7 @@ var x = R.arrayToEnum([
|
|
|
96
96
|
"invalid_intersection_types",
|
|
97
97
|
"not_multiple_of",
|
|
98
98
|
"not_finite"
|
|
99
|
-
]),
|
|
99
|
+
]), oe = class yn extends Error {
|
|
100
100
|
get errors() {
|
|
101
101
|
return this.issues;
|
|
102
102
|
}
|
|
@@ -128,7 +128,7 @@ var x = R.arrayToEnum([
|
|
|
128
128
|
return a(this), n;
|
|
129
129
|
}
|
|
130
130
|
static assert(t) {
|
|
131
|
-
if (!(t instanceof
|
|
131
|
+
if (!(t instanceof yn)) throw new Error(`Not a ZodError: ${t}`);
|
|
132
132
|
}
|
|
133
133
|
toString() {
|
|
134
134
|
return this.message;
|
|
@@ -154,7 +154,7 @@ var x = R.arrayToEnum([
|
|
|
154
154
|
return this.flatten();
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
oe.create = (e) => new oe(e);
|
|
158
158
|
var De = (e, t) => {
|
|
159
159
|
let r;
|
|
160
160
|
switch (e.code) {
|
|
@@ -236,7 +236,7 @@ var Ut = (e) => {
|
|
|
236
236
|
message: o
|
|
237
237
|
};
|
|
238
238
|
};
|
|
239
|
-
function
|
|
239
|
+
function b(e, t) {
|
|
240
240
|
const r = zt(), n = Ut({
|
|
241
241
|
issueData: t,
|
|
242
242
|
data: e.data,
|
|
@@ -304,7 +304,7 @@ var K = class xn {
|
|
|
304
304
|
(function(e) {
|
|
305
305
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t?.message;
|
|
306
306
|
})(w || (w = {}));
|
|
307
|
-
var
|
|
307
|
+
var le = class {
|
|
308
308
|
constructor(e, t, r, n) {
|
|
309
309
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = r, this._key = n;
|
|
310
310
|
}
|
|
@@ -321,7 +321,7 @@ var oe = class {
|
|
|
321
321
|
success: !1,
|
|
322
322
|
get error() {
|
|
323
323
|
if (this._error) return this._error;
|
|
324
|
-
const r = new
|
|
324
|
+
const r = new oe(e.common.issues);
|
|
325
325
|
return this._error = r, this._error;
|
|
326
326
|
}
|
|
327
327
|
};
|
|
@@ -346,13 +346,13 @@ var E = class {
|
|
|
346
346
|
return this._def.description;
|
|
347
347
|
}
|
|
348
348
|
_getType(e) {
|
|
349
|
-
return
|
|
349
|
+
return be(e.data);
|
|
350
350
|
}
|
|
351
351
|
_getOrReturnCtx(e, t) {
|
|
352
352
|
return t || {
|
|
353
353
|
common: e.parent.common,
|
|
354
354
|
data: e.data,
|
|
355
|
-
parsedType:
|
|
355
|
+
parsedType: be(e.data),
|
|
356
356
|
schemaErrorMap: this._def.errorMap,
|
|
357
357
|
path: e.path,
|
|
358
358
|
parent: e.parent
|
|
@@ -364,7 +364,7 @@ var E = class {
|
|
|
364
364
|
ctx: {
|
|
365
365
|
common: e.parent.common,
|
|
366
366
|
data: e.data,
|
|
367
|
-
parsedType:
|
|
367
|
+
parsedType: be(e.data),
|
|
368
368
|
schemaErrorMap: this._def.errorMap,
|
|
369
369
|
path: e.path,
|
|
370
370
|
parent: e.parent
|
|
@@ -396,7 +396,7 @@ var E = class {
|
|
|
396
396
|
schemaErrorMap: this._def.errorMap,
|
|
397
397
|
parent: null,
|
|
398
398
|
data: e,
|
|
399
|
-
parsedType:
|
|
399
|
+
parsedType: be(e)
|
|
400
400
|
};
|
|
401
401
|
return Tr(r, this._parseSync({
|
|
402
402
|
data: e,
|
|
@@ -414,7 +414,7 @@ var E = class {
|
|
|
414
414
|
schemaErrorMap: this._def.errorMap,
|
|
415
415
|
parent: null,
|
|
416
416
|
data: e,
|
|
417
|
-
parsedType:
|
|
417
|
+
parsedType: be(e)
|
|
418
418
|
};
|
|
419
419
|
if (!this["~standard"].async) try {
|
|
420
420
|
const r = this._parseSync({
|
|
@@ -451,7 +451,7 @@ var E = class {
|
|
|
451
451
|
schemaErrorMap: this._def.errorMap,
|
|
452
452
|
parent: null,
|
|
453
453
|
data: e,
|
|
454
|
-
parsedType:
|
|
454
|
+
parsedType: be(e)
|
|
455
455
|
}, n = this._parse({
|
|
456
456
|
data: e,
|
|
457
457
|
path: r.path,
|
|
@@ -604,7 +604,7 @@ var mt = class Fe extends E {
|
|
|
604
604
|
_parse(t) {
|
|
605
605
|
if (this._def.coerce && (t.data = String(t.data)), this._getType(t) !== x.string) {
|
|
606
606
|
const a = this._getOrReturnCtx(t);
|
|
607
|
-
return
|
|
607
|
+
return b(a, {
|
|
608
608
|
code: g.invalid_type,
|
|
609
609
|
expected: x.string,
|
|
610
610
|
received: a.parsedType
|
|
@@ -613,7 +613,7 @@ var mt = class Fe extends E {
|
|
|
613
613
|
const r = new K();
|
|
614
614
|
let n;
|
|
615
615
|
for (const a of this._def.checks) if (a.kind === "min")
|
|
616
|
-
t.data.length < a.value && (n = this._getOrReturnCtx(t, n),
|
|
616
|
+
t.data.length < a.value && (n = this._getOrReturnCtx(t, n), b(n, {
|
|
617
617
|
code: g.too_small,
|
|
618
618
|
minimum: a.value,
|
|
619
619
|
type: "string",
|
|
@@ -622,7 +622,7 @@ var mt = class Fe extends E {
|
|
|
622
622
|
message: a.message
|
|
623
623
|
}), r.dirty());
|
|
624
624
|
else if (a.kind === "max")
|
|
625
|
-
t.data.length > a.value && (n = this._getOrReturnCtx(t, n),
|
|
625
|
+
t.data.length > a.value && (n = this._getOrReturnCtx(t, n), b(n, {
|
|
626
626
|
code: g.too_big,
|
|
627
627
|
maximum: a.value,
|
|
628
628
|
type: "string",
|
|
@@ -632,14 +632,14 @@ var mt = class Fe extends E {
|
|
|
632
632
|
}), r.dirty());
|
|
633
633
|
else if (a.kind === "length") {
|
|
634
634
|
const i = t.data.length > a.value, s = t.data.length < a.value;
|
|
635
|
-
(i || s) && (n = this._getOrReturnCtx(t, n), i ?
|
|
635
|
+
(i || s) && (n = this._getOrReturnCtx(t, n), i ? b(n, {
|
|
636
636
|
code: g.too_big,
|
|
637
637
|
maximum: a.value,
|
|
638
638
|
type: "string",
|
|
639
639
|
inclusive: !0,
|
|
640
640
|
exact: !0,
|
|
641
641
|
message: a.message
|
|
642
|
-
}) : s &&
|
|
642
|
+
}) : s && b(n, {
|
|
643
643
|
code: g.too_small,
|
|
644
644
|
minimum: a.value,
|
|
645
645
|
type: "string",
|
|
@@ -648,43 +648,43 @@ var mt = class Fe extends E {
|
|
|
648
648
|
message: a.message
|
|
649
649
|
}), r.dirty());
|
|
650
650
|
} else if (a.kind === "email")
|
|
651
|
-
Ma.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
651
|
+
Ma.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
652
652
|
validation: "email",
|
|
653
653
|
code: g.invalid_string,
|
|
654
654
|
message: a.message
|
|
655
655
|
}), r.dirty());
|
|
656
656
|
else if (a.kind === "emoji")
|
|
657
|
-
Ot || (Ot = new RegExp(Ra, "u")), Ot.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
657
|
+
Ot || (Ot = new RegExp(Ra, "u")), Ot.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
658
658
|
validation: "emoji",
|
|
659
659
|
code: g.invalid_string,
|
|
660
660
|
message: a.message
|
|
661
661
|
}), r.dirty());
|
|
662
662
|
else if (a.kind === "uuid")
|
|
663
|
-
Ta.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
663
|
+
Ta.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
664
664
|
validation: "uuid",
|
|
665
665
|
code: g.invalid_string,
|
|
666
666
|
message: a.message
|
|
667
667
|
}), r.dirty());
|
|
668
668
|
else if (a.kind === "nanoid")
|
|
669
|
-
La.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
669
|
+
La.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
670
670
|
validation: "nanoid",
|
|
671
671
|
code: g.invalid_string,
|
|
672
672
|
message: a.message
|
|
673
673
|
}), r.dirty());
|
|
674
674
|
else if (a.kind === "cuid")
|
|
675
|
-
Ca.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
675
|
+
Ca.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
676
676
|
validation: "cuid",
|
|
677
677
|
code: g.invalid_string,
|
|
678
678
|
message: a.message
|
|
679
679
|
}), r.dirty());
|
|
680
680
|
else if (a.kind === "cuid2")
|
|
681
|
-
Ia.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
681
|
+
Ia.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
682
682
|
validation: "cuid2",
|
|
683
683
|
code: g.invalid_string,
|
|
684
684
|
message: a.message
|
|
685
685
|
}), r.dirty());
|
|
686
686
|
else if (a.kind === "ulid")
|
|
687
|
-
Na.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
687
|
+
Na.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
688
688
|
validation: "ulid",
|
|
689
689
|
code: g.invalid_string,
|
|
690
690
|
message: a.message
|
|
@@ -692,64 +692,64 @@ var mt = class Fe extends E {
|
|
|
692
692
|
else if (a.kind === "url") try {
|
|
693
693
|
new URL(t.data);
|
|
694
694
|
} catch {
|
|
695
|
-
n = this._getOrReturnCtx(t, n),
|
|
695
|
+
n = this._getOrReturnCtx(t, n), b(n, {
|
|
696
696
|
validation: "url",
|
|
697
697
|
code: g.invalid_string,
|
|
698
698
|
message: a.message
|
|
699
699
|
}), r.dirty();
|
|
700
700
|
}
|
|
701
|
-
else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
701
|
+
else a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
702
702
|
validation: "regex",
|
|
703
703
|
code: g.invalid_string,
|
|
704
704
|
message: a.message
|
|
705
|
-
}), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "includes" ? t.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(t, n),
|
|
705
|
+
}), r.dirty())) : a.kind === "trim" ? t.data = t.data.trim() : a.kind === "includes" ? t.data.includes(a.value, a.position) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
706
706
|
code: g.invalid_string,
|
|
707
707
|
validation: {
|
|
708
708
|
includes: a.value,
|
|
709
709
|
position: a.position
|
|
710
710
|
},
|
|
711
711
|
message: a.message
|
|
712
|
-
}), r.dirty()) : a.kind === "toLowerCase" ? t.data = t.data.toLowerCase() : a.kind === "toUpperCase" ? t.data = t.data.toUpperCase() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n),
|
|
712
|
+
}), r.dirty()) : a.kind === "toLowerCase" ? t.data = t.data.toLowerCase() : a.kind === "toUpperCase" ? t.data = t.data.toUpperCase() : a.kind === "startsWith" ? t.data.startsWith(a.value) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
713
713
|
code: g.invalid_string,
|
|
714
714
|
validation: { startsWith: a.value },
|
|
715
715
|
message: a.message
|
|
716
|
-
}), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n),
|
|
716
|
+
}), r.dirty()) : a.kind === "endsWith" ? t.data.endsWith(a.value) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
717
717
|
code: g.invalid_string,
|
|
718
718
|
validation: { endsWith: a.value },
|
|
719
719
|
message: a.message
|
|
720
|
-
}), r.dirty()) : a.kind === "datetime" ? Da(a).test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
720
|
+
}), r.dirty()) : a.kind === "datetime" ? Da(a).test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
721
721
|
code: g.invalid_string,
|
|
722
722
|
validation: "datetime",
|
|
723
723
|
message: a.message
|
|
724
|
-
}), r.dirty()) : a.kind === "date" ? Va.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
724
|
+
}), r.dirty()) : a.kind === "date" ? Va.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
725
725
|
code: g.invalid_string,
|
|
726
726
|
validation: "date",
|
|
727
727
|
message: a.message
|
|
728
|
-
}), r.dirty()) : a.kind === "time" ? Wa(a).test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
728
|
+
}), r.dirty()) : a.kind === "time" ? Wa(a).test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
729
729
|
code: g.invalid_string,
|
|
730
730
|
validation: "time",
|
|
731
731
|
message: a.message
|
|
732
|
-
}), r.dirty()) : a.kind === "duration" ? Ea.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
732
|
+
}), r.dirty()) : a.kind === "duration" ? Ea.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
733
733
|
validation: "duration",
|
|
734
734
|
code: g.invalid_string,
|
|
735
735
|
message: a.message
|
|
736
|
-
}), r.dirty()) : a.kind === "ip" ? za(t.data, a.version) || (n = this._getOrReturnCtx(t, n),
|
|
736
|
+
}), r.dirty()) : a.kind === "ip" ? za(t.data, a.version) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
737
737
|
validation: "ip",
|
|
738
738
|
code: g.invalid_string,
|
|
739
739
|
message: a.message
|
|
740
|
-
}), r.dirty()) : a.kind === "jwt" ? Ua(t.data, a.alg) || (n = this._getOrReturnCtx(t, n),
|
|
740
|
+
}), r.dirty()) : a.kind === "jwt" ? Ua(t.data, a.alg) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
741
741
|
validation: "jwt",
|
|
742
742
|
code: g.invalid_string,
|
|
743
743
|
message: a.message
|
|
744
|
-
}), r.dirty()) : a.kind === "cidr" ? Ba(t.data, a.version) || (n = this._getOrReturnCtx(t, n),
|
|
744
|
+
}), r.dirty()) : a.kind === "cidr" ? Ba(t.data, a.version) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
745
745
|
validation: "cidr",
|
|
746
746
|
code: g.invalid_string,
|
|
747
747
|
message: a.message
|
|
748
|
-
}), r.dirty()) : a.kind === "base64" ? $a.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
748
|
+
}), r.dirty()) : a.kind === "base64" ? $a.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
749
749
|
validation: "base64",
|
|
750
750
|
code: g.invalid_string,
|
|
751
751
|
message: a.message
|
|
752
|
-
}), r.dirty()) : a.kind === "base64url" ? Fa.test(t.data) || (n = this._getOrReturnCtx(t, n),
|
|
752
|
+
}), r.dirty()) : a.kind === "base64url" ? Fa.test(t.data) || (n = this._getOrReturnCtx(t, n), b(n, {
|
|
753
753
|
validation: "base64url",
|
|
754
754
|
code: g.invalid_string,
|
|
755
755
|
message: a.message
|
|
@@ -1035,7 +1035,7 @@ var Bt = class Ht extends E {
|
|
|
1035
1035
|
_parse(t) {
|
|
1036
1036
|
if (this._def.coerce && (t.data = Number(t.data)), this._getType(t) !== x.number) {
|
|
1037
1037
|
const a = this._getOrReturnCtx(t);
|
|
1038
|
-
return
|
|
1038
|
+
return b(a, {
|
|
1039
1039
|
code: g.invalid_type,
|
|
1040
1040
|
expected: x.number,
|
|
1041
1041
|
received: a.parsedType
|
|
@@ -1043,30 +1043,30 @@ var Bt = class Ht extends E {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
let r;
|
|
1045
1045
|
const n = new K();
|
|
1046
|
-
for (const a of this._def.checks) a.kind === "int" ? R.isInteger(t.data) || (r = this._getOrReturnCtx(t, r),
|
|
1046
|
+
for (const a of this._def.checks) a.kind === "int" ? R.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1047
1047
|
code: g.invalid_type,
|
|
1048
1048
|
expected: "integer",
|
|
1049
1049
|
received: "float",
|
|
1050
1050
|
message: a.message
|
|
1051
|
-
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r),
|
|
1051
|
+
}), n.dirty()) : a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1052
1052
|
code: g.too_small,
|
|
1053
1053
|
minimum: a.value,
|
|
1054
1054
|
type: "number",
|
|
1055
1055
|
inclusive: a.inclusive,
|
|
1056
1056
|
exact: !1,
|
|
1057
1057
|
message: a.message
|
|
1058
|
-
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r),
|
|
1058
|
+
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1059
1059
|
code: g.too_big,
|
|
1060
1060
|
maximum: a.value,
|
|
1061
1061
|
type: "number",
|
|
1062
1062
|
inclusive: a.inclusive,
|
|
1063
1063
|
exact: !1,
|
|
1064
1064
|
message: a.message
|
|
1065
|
-
}), n.dirty()) : a.kind === "multipleOf" ? Ha(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r),
|
|
1065
|
+
}), n.dirty()) : a.kind === "multipleOf" ? Ha(t.data, a.value) !== 0 && (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1066
1066
|
code: g.not_multiple_of,
|
|
1067
1067
|
multipleOf: a.value,
|
|
1068
1068
|
message: a.message
|
|
1069
|
-
}), n.dirty()) : a.kind === "finite" ? Number.isFinite(t.data) || (r = this._getOrReturnCtx(t, r),
|
|
1069
|
+
}), n.dirty()) : a.kind === "finite" ? Number.isFinite(t.data) || (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1070
1070
|
code: g.not_finite,
|
|
1071
1071
|
message: a.message
|
|
1072
1072
|
}), n.dirty()) : R.assertNever(a);
|
|
@@ -1209,19 +1209,19 @@ var Gt = class Yt extends E {
|
|
|
1209
1209
|
if (this._getType(t) !== x.bigint) return this._getInvalidInput(t);
|
|
1210
1210
|
let r;
|
|
1211
1211
|
const n = new K();
|
|
1212
|
-
for (const a of this._def.checks) a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r),
|
|
1212
|
+
for (const a of this._def.checks) a.kind === "min" ? (a.inclusive ? t.data < a.value : t.data <= a.value) && (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1213
1213
|
code: g.too_small,
|
|
1214
1214
|
type: "bigint",
|
|
1215
1215
|
minimum: a.value,
|
|
1216
1216
|
inclusive: a.inclusive,
|
|
1217
1217
|
message: a.message
|
|
1218
|
-
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r),
|
|
1218
|
+
}), n.dirty()) : a.kind === "max" ? (a.inclusive ? t.data > a.value : t.data >= a.value) && (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1219
1219
|
code: g.too_big,
|
|
1220
1220
|
type: "bigint",
|
|
1221
1221
|
maximum: a.value,
|
|
1222
1222
|
inclusive: a.inclusive,
|
|
1223
1223
|
message: a.message
|
|
1224
|
-
}), n.dirty()) : a.kind === "multipleOf" ? t.data % a.value !== BigInt(0) && (r = this._getOrReturnCtx(t, r),
|
|
1224
|
+
}), n.dirty()) : a.kind === "multipleOf" ? t.data % a.value !== BigInt(0) && (r = this._getOrReturnCtx(t, r), b(r, {
|
|
1225
1225
|
code: g.not_multiple_of,
|
|
1226
1226
|
multipleOf: a.value,
|
|
1227
1227
|
message: a.message
|
|
@@ -1233,7 +1233,7 @@ var Gt = class Yt extends E {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
_getInvalidInput(t) {
|
|
1235
1235
|
const r = this._getOrReturnCtx(t);
|
|
1236
|
-
return
|
|
1236
|
+
return b(r, {
|
|
1237
1237
|
code: g.invalid_type,
|
|
1238
1238
|
expected: x.bigint,
|
|
1239
1239
|
received: r.parsedType
|
|
@@ -1328,7 +1328,7 @@ var Xt = class extends E {
|
|
|
1328
1328
|
_parse(e) {
|
|
1329
1329
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== x.boolean) {
|
|
1330
1330
|
const t = this._getOrReturnCtx(e);
|
|
1331
|
-
return
|
|
1331
|
+
return b(t, {
|
|
1332
1332
|
code: g.invalid_type,
|
|
1333
1333
|
expected: x.boolean,
|
|
1334
1334
|
received: t.parsedType
|
|
@@ -1346,24 +1346,24 @@ var Jt = class Cn extends E {
|
|
|
1346
1346
|
_parse(t) {
|
|
1347
1347
|
if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== x.date) {
|
|
1348
1348
|
const a = this._getOrReturnCtx(t);
|
|
1349
|
-
return
|
|
1349
|
+
return b(a, {
|
|
1350
1350
|
code: g.invalid_type,
|
|
1351
1351
|
expected: x.date,
|
|
1352
1352
|
received: a.parsedType
|
|
1353
1353
|
}), I;
|
|
1354
1354
|
}
|
|
1355
1355
|
if (Number.isNaN(t.data.getTime()))
|
|
1356
|
-
return
|
|
1356
|
+
return b(this._getOrReturnCtx(t), { code: g.invalid_date }), I;
|
|
1357
1357
|
const r = new K();
|
|
1358
1358
|
let n;
|
|
1359
|
-
for (const a of this._def.checks) a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n),
|
|
1359
|
+
for (const a of this._def.checks) a.kind === "min" ? t.data.getTime() < a.value && (n = this._getOrReturnCtx(t, n), b(n, {
|
|
1360
1360
|
code: g.too_small,
|
|
1361
1361
|
message: a.message,
|
|
1362
1362
|
inclusive: !0,
|
|
1363
1363
|
exact: !1,
|
|
1364
1364
|
minimum: a.value,
|
|
1365
1365
|
type: "date"
|
|
1366
|
-
}), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n),
|
|
1366
|
+
}), r.dirty()) : a.kind === "max" ? t.data.getTime() > a.value && (n = this._getOrReturnCtx(t, n), b(n, {
|
|
1367
1367
|
code: g.too_big,
|
|
1368
1368
|
message: a.message,
|
|
1369
1369
|
inclusive: !0,
|
|
@@ -1417,7 +1417,7 @@ var Qt = class extends E {
|
|
|
1417
1417
|
_parse(e) {
|
|
1418
1418
|
if (this._getType(e) !== x.symbol) {
|
|
1419
1419
|
const t = this._getOrReturnCtx(e);
|
|
1420
|
-
return
|
|
1420
|
+
return b(t, {
|
|
1421
1421
|
code: g.invalid_type,
|
|
1422
1422
|
expected: x.symbol,
|
|
1423
1423
|
received: t.parsedType
|
|
@@ -1434,7 +1434,7 @@ var gt = class extends E {
|
|
|
1434
1434
|
_parse(e) {
|
|
1435
1435
|
if (this._getType(e) !== x.undefined) {
|
|
1436
1436
|
const t = this._getOrReturnCtx(e);
|
|
1437
|
-
return
|
|
1437
|
+
return b(t, {
|
|
1438
1438
|
code: g.invalid_type,
|
|
1439
1439
|
expected: x.undefined,
|
|
1440
1440
|
received: t.parsedType
|
|
@@ -1451,7 +1451,7 @@ var _t = class extends E {
|
|
|
1451
1451
|
_parse(e) {
|
|
1452
1452
|
if (this._getType(e) !== x.null) {
|
|
1453
1453
|
const t = this._getOrReturnCtx(e);
|
|
1454
|
-
return
|
|
1454
|
+
return b(t, {
|
|
1455
1455
|
code: g.invalid_type,
|
|
1456
1456
|
expected: x.null,
|
|
1457
1457
|
received: t.parsedType
|
|
@@ -1491,7 +1491,7 @@ Me.create = (e) => new Me({
|
|
|
1491
1491
|
var xe = class extends E {
|
|
1492
1492
|
_parse(e) {
|
|
1493
1493
|
const t = this._getOrReturnCtx(e);
|
|
1494
|
-
return
|
|
1494
|
+
return b(t, {
|
|
1495
1495
|
code: g.invalid_type,
|
|
1496
1496
|
expected: x.never,
|
|
1497
1497
|
received: t.parsedType
|
|
@@ -1506,7 +1506,7 @@ var qt = class extends E {
|
|
|
1506
1506
|
_parse(e) {
|
|
1507
1507
|
if (this._getType(e) !== x.undefined) {
|
|
1508
1508
|
const t = this._getOrReturnCtx(e);
|
|
1509
|
-
return
|
|
1509
|
+
return b(t, {
|
|
1510
1510
|
code: g.invalid_type,
|
|
1511
1511
|
expected: x.void,
|
|
1512
1512
|
received: t.parsedType
|
|
@@ -1523,14 +1523,14 @@ var je = class lt extends E {
|
|
|
1523
1523
|
_parse(t) {
|
|
1524
1524
|
const { ctx: r, status: n } = this._processInputParams(t), a = this._def;
|
|
1525
1525
|
if (r.parsedType !== x.array)
|
|
1526
|
-
return
|
|
1526
|
+
return b(r, {
|
|
1527
1527
|
code: g.invalid_type,
|
|
1528
1528
|
expected: x.array,
|
|
1529
1529
|
received: r.parsedType
|
|
1530
1530
|
}), I;
|
|
1531
1531
|
if (a.exactLength !== null) {
|
|
1532
1532
|
const s = r.data.length > a.exactLength.value, o = r.data.length < a.exactLength.value;
|
|
1533
|
-
(s || o) && (
|
|
1533
|
+
(s || o) && (b(r, {
|
|
1534
1534
|
code: s ? g.too_big : g.too_small,
|
|
1535
1535
|
minimum: o ? a.exactLength.value : void 0,
|
|
1536
1536
|
maximum: s ? a.exactLength.value : void 0,
|
|
@@ -1540,22 +1540,22 @@ var je = class lt extends E {
|
|
|
1540
1540
|
message: a.exactLength.message
|
|
1541
1541
|
}), n.dirty());
|
|
1542
1542
|
}
|
|
1543
|
-
if (a.minLength !== null && r.data.length < a.minLength.value && (
|
|
1543
|
+
if (a.minLength !== null && r.data.length < a.minLength.value && (b(r, {
|
|
1544
1544
|
code: g.too_small,
|
|
1545
1545
|
minimum: a.minLength.value,
|
|
1546
1546
|
type: "array",
|
|
1547
1547
|
inclusive: !0,
|
|
1548
1548
|
exact: !1,
|
|
1549
1549
|
message: a.minLength.message
|
|
1550
|
-
}), n.dirty()), a.maxLength !== null && r.data.length > a.maxLength.value && (
|
|
1550
|
+
}), n.dirty()), a.maxLength !== null && r.data.length > a.maxLength.value && (b(r, {
|
|
1551
1551
|
code: g.too_big,
|
|
1552
1552
|
maximum: a.maxLength.value,
|
|
1553
1553
|
type: "array",
|
|
1554
1554
|
inclusive: !0,
|
|
1555
1555
|
exact: !1,
|
|
1556
1556
|
message: a.maxLength.message
|
|
1557
|
-
}), n.dirty()), r.common.async) return Promise.all([...r.data].map((s, o) => a.type._parseAsync(new
|
|
1558
|
-
const i = [...r.data].map((s, o) => a.type._parseSync(new
|
|
1557
|
+
}), n.dirty()), r.common.async) return Promise.all([...r.data].map((s, o) => a.type._parseAsync(new le(r, s, r.path, o)))).then((s) => K.mergeArray(n, s));
|
|
1558
|
+
const i = [...r.data].map((s, o) => a.type._parseSync(new le(r, s, r.path, o)));
|
|
1559
1559
|
return K.mergeArray(n, i);
|
|
1560
1560
|
}
|
|
1561
1561
|
get element() {
|
|
@@ -1631,7 +1631,7 @@ var ae = class re extends E {
|
|
|
1631
1631
|
_parse(t) {
|
|
1632
1632
|
if (this._getType(t) !== x.object) {
|
|
1633
1633
|
const c = this._getOrReturnCtx(t);
|
|
1634
|
-
return
|
|
1634
|
+
return b(c, {
|
|
1635
1635
|
code: g.invalid_type,
|
|
1636
1636
|
expected: x.object,
|
|
1637
1637
|
received: c.parsedType
|
|
@@ -1648,7 +1648,7 @@ var ae = class re extends E {
|
|
|
1648
1648
|
status: "valid",
|
|
1649
1649
|
value: c
|
|
1650
1650
|
},
|
|
1651
|
-
value: l._parse(new
|
|
1651
|
+
value: l._parse(new le(n, f, n.path, c)),
|
|
1652
1652
|
alwaysSet: c in n.data
|
|
1653
1653
|
});
|
|
1654
1654
|
}
|
|
@@ -1665,7 +1665,7 @@ var ae = class re extends E {
|
|
|
1665
1665
|
}
|
|
1666
1666
|
});
|
|
1667
1667
|
else if (c === "strict")
|
|
1668
|
-
s.length > 0 && (
|
|
1668
|
+
s.length > 0 && (b(n, {
|
|
1669
1669
|
code: g.unrecognized_keys,
|
|
1670
1670
|
keys: s
|
|
1671
1671
|
}), r.dirty());
|
|
@@ -1680,7 +1680,7 @@ var ae = class re extends E {
|
|
|
1680
1680
|
status: "valid",
|
|
1681
1681
|
value: l
|
|
1682
1682
|
},
|
|
1683
|
-
value: c._parse(new
|
|
1683
|
+
value: c._parse(new le(n, f, n.path, l)),
|
|
1684
1684
|
alwaysSet: l in n.data
|
|
1685
1685
|
});
|
|
1686
1686
|
}
|
|
@@ -1827,8 +1827,8 @@ var vt = class extends E {
|
|
|
1827
1827
|
for (const s of a) if (s.result.status === "valid") return s.result;
|
|
1828
1828
|
for (const s of a) if (s.result.status === "dirty")
|
|
1829
1829
|
return t.common.issues.push(...s.ctx.common.issues), s.result;
|
|
1830
|
-
const i = a.map((s) => new
|
|
1831
|
-
return
|
|
1830
|
+
const i = a.map((s) => new oe(s.ctx.common.issues));
|
|
1831
|
+
return b(t, {
|
|
1832
1832
|
code: g.invalid_union,
|
|
1833
1833
|
unionErrors: i
|
|
1834
1834
|
}), I;
|
|
@@ -1875,8 +1875,8 @@ var vt = class extends E {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
if (a)
|
|
1877
1877
|
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
|
1878
|
-
const s = i.map((o) => new
|
|
1879
|
-
return
|
|
1878
|
+
const s = i.map((o) => new oe(o));
|
|
1879
|
+
return b(t, {
|
|
1880
1880
|
code: g.invalid_union,
|
|
1881
1881
|
unionErrors: s
|
|
1882
1882
|
}), I;
|
|
@@ -1891,11 +1891,11 @@ vt.create = (e, t) => new vt({
|
|
|
1891
1891
|
typeName: N.ZodUnion,
|
|
1892
1892
|
...T(t)
|
|
1893
1893
|
});
|
|
1894
|
-
var
|
|
1894
|
+
var ue = (e) => e instanceof bt ? ue(e.schema) : e instanceof ve ? ue(e.innerType()) : e instanceof yt ? [e.value] : e instanceof Et ? e.options : e instanceof xt ? R.objectValues(e.enum) : e instanceof wt ? ue(e._def.innerType) : e instanceof gt ? [void 0] : e instanceof _t ? [null] : e instanceof ge ? [void 0, ...ue(e.unwrap())] : e instanceof Ce ? [null, ...ue(e.unwrap())] : e instanceof Ln || e instanceof Ct ? ue(e.unwrap()) : e instanceof St ? ue(e._def.innerType) : [], Ga = class In extends E {
|
|
1895
1895
|
_parse(t) {
|
|
1896
1896
|
const { ctx: r } = this._processInputParams(t);
|
|
1897
1897
|
if (r.parsedType !== x.object)
|
|
1898
|
-
return
|
|
1898
|
+
return b(r, {
|
|
1899
1899
|
code: g.invalid_type,
|
|
1900
1900
|
expected: x.object,
|
|
1901
1901
|
received: r.parsedType
|
|
@@ -1909,7 +1909,7 @@ var de = (e) => e instanceof yt ? de(e.schema) : e instanceof ve ? de(e.innerTyp
|
|
|
1909
1909
|
data: r.data,
|
|
1910
1910
|
path: r.path,
|
|
1911
1911
|
parent: r
|
|
1912
|
-
}) : (
|
|
1912
|
+
}) : (b(r, {
|
|
1913
1913
|
code: g.invalid_union_discriminator,
|
|
1914
1914
|
options: Array.from(this.optionsMap.keys()),
|
|
1915
1915
|
path: [n]
|
|
@@ -1927,7 +1927,7 @@ var de = (e) => e instanceof yt ? de(e.schema) : e instanceof ve ? de(e.innerTyp
|
|
|
1927
1927
|
static create(t, r, n) {
|
|
1928
1928
|
const a = /* @__PURE__ */ new Map();
|
|
1929
1929
|
for (const i of r) {
|
|
1930
|
-
const s =
|
|
1930
|
+
const s = ue(i.shape[t]);
|
|
1931
1931
|
if (!s.length) throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
1932
1932
|
for (const o of s) {
|
|
1933
1933
|
if (a.has(o)) throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);
|
|
@@ -1944,7 +1944,7 @@ var de = (e) => e instanceof yt ? de(e.schema) : e instanceof ve ? de(e.innerTyp
|
|
|
1944
1944
|
}
|
|
1945
1945
|
};
|
|
1946
1946
|
function er(e, t) {
|
|
1947
|
-
const r =
|
|
1947
|
+
const r = be(e), n = be(t);
|
|
1948
1948
|
if (e === t) return {
|
|
1949
1949
|
valid: !0,
|
|
1950
1950
|
data: e
|
|
@@ -1988,7 +1988,7 @@ var kt = class extends E {
|
|
|
1988
1988
|
return s.valid ? ((Nr(a) || Nr(i)) && t.dirty(), {
|
|
1989
1989
|
status: t.value,
|
|
1990
1990
|
value: s.data
|
|
1991
|
-
}) : (
|
|
1991
|
+
}) : (b(r, { code: g.invalid_intersection_types }), I);
|
|
1992
1992
|
};
|
|
1993
1993
|
return r.common.async ? Promise.all([this._def.left._parseAsync({
|
|
1994
1994
|
data: r.data,
|
|
@@ -2019,20 +2019,20 @@ var Se = class Nn extends E {
|
|
|
2019
2019
|
_parse(t) {
|
|
2020
2020
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
2021
2021
|
if (n.parsedType !== x.array)
|
|
2022
|
-
return
|
|
2022
|
+
return b(n, {
|
|
2023
2023
|
code: g.invalid_type,
|
|
2024
2024
|
expected: x.array,
|
|
2025
2025
|
received: n.parsedType
|
|
2026
2026
|
}), I;
|
|
2027
2027
|
if (n.data.length < this._def.items.length)
|
|
2028
|
-
return
|
|
2028
|
+
return b(n, {
|
|
2029
2029
|
code: g.too_small,
|
|
2030
2030
|
minimum: this._def.items.length,
|
|
2031
2031
|
inclusive: !0,
|
|
2032
2032
|
exact: !1,
|
|
2033
2033
|
type: "array"
|
|
2034
2034
|
}), I;
|
|
2035
|
-
!this._def.rest && n.data.length > this._def.items.length && (
|
|
2035
|
+
!this._def.rest && n.data.length > this._def.items.length && (b(n, {
|
|
2036
2036
|
code: g.too_big,
|
|
2037
2037
|
maximum: this._def.items.length,
|
|
2038
2038
|
inclusive: !0,
|
|
@@ -2041,7 +2041,7 @@ var Se = class Nn extends E {
|
|
|
2041
2041
|
}), r.dirty());
|
|
2042
2042
|
const a = [...n.data].map((i, s) => {
|
|
2043
2043
|
const o = this._def.items[s] || this._def.rest;
|
|
2044
|
-
return o ? o._parse(new
|
|
2044
|
+
return o ? o._parse(new le(n, i, n.path, s)) : null;
|
|
2045
2045
|
}).filter((i) => !!i);
|
|
2046
2046
|
return n.common.async ? Promise.all(a).then((i) => K.mergeArray(r, i)) : K.mergeArray(r, a);
|
|
2047
2047
|
}
|
|
@@ -2074,15 +2074,15 @@ var Ya = class tr extends E {
|
|
|
2074
2074
|
_parse(t) {
|
|
2075
2075
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
2076
2076
|
if (n.parsedType !== x.object)
|
|
2077
|
-
return
|
|
2077
|
+
return b(n, {
|
|
2078
2078
|
code: g.invalid_type,
|
|
2079
2079
|
expected: x.object,
|
|
2080
2080
|
received: n.parsedType
|
|
2081
2081
|
}), I;
|
|
2082
2082
|
const a = [], i = this._def.keyType, s = this._def.valueType;
|
|
2083
2083
|
for (const o in n.data) a.push({
|
|
2084
|
-
key: i._parse(new
|
|
2085
|
-
value: s._parse(new
|
|
2084
|
+
key: i._parse(new le(n, o, n.path, o)),
|
|
2085
|
+
value: s._parse(new le(n, n.data[o], n.path, o)),
|
|
2086
2086
|
alwaysSet: o in n.data
|
|
2087
2087
|
});
|
|
2088
2088
|
return n.common.async ? K.mergeObjectAsync(r, a) : K.mergeObjectSync(r, a);
|
|
@@ -2113,14 +2113,14 @@ var Ya = class tr extends E {
|
|
|
2113
2113
|
_parse(e) {
|
|
2114
2114
|
const { status: t, ctx: r } = this._processInputParams(e);
|
|
2115
2115
|
if (r.parsedType !== x.map)
|
|
2116
|
-
return
|
|
2116
|
+
return b(r, {
|
|
2117
2117
|
code: g.invalid_type,
|
|
2118
2118
|
expected: x.map,
|
|
2119
2119
|
received: r.parsedType
|
|
2120
2120
|
}), I;
|
|
2121
2121
|
const n = this._def.keyType, a = this._def.valueType, i = [...r.data.entries()].map(([s, o], c) => ({
|
|
2122
|
-
key: n._parse(new
|
|
2123
|
-
value: a._parse(new
|
|
2122
|
+
key: n._parse(new le(r, s, r.path, [c, "key"])),
|
|
2123
|
+
value: a._parse(new le(r, o, r.path, [c, "value"]))
|
|
2124
2124
|
}));
|
|
2125
2125
|
if (r.common.async) {
|
|
2126
2126
|
const s = /* @__PURE__ */ new Map();
|
|
@@ -2159,20 +2159,20 @@ var nr = class ar extends E {
|
|
|
2159
2159
|
_parse(t) {
|
|
2160
2160
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
2161
2161
|
if (n.parsedType !== x.set)
|
|
2162
|
-
return
|
|
2162
|
+
return b(n, {
|
|
2163
2163
|
code: g.invalid_type,
|
|
2164
2164
|
expected: x.set,
|
|
2165
2165
|
received: n.parsedType
|
|
2166
2166
|
}), I;
|
|
2167
2167
|
const a = this._def;
|
|
2168
|
-
a.minSize !== null && n.data.size < a.minSize.value && (
|
|
2168
|
+
a.minSize !== null && n.data.size < a.minSize.value && (b(n, {
|
|
2169
2169
|
code: g.too_small,
|
|
2170
2170
|
minimum: a.minSize.value,
|
|
2171
2171
|
type: "set",
|
|
2172
2172
|
inclusive: !0,
|
|
2173
2173
|
exact: !1,
|
|
2174
2174
|
message: a.minSize.message
|
|
2175
|
-
}), r.dirty()), a.maxSize !== null && n.data.size > a.maxSize.value && (
|
|
2175
|
+
}), r.dirty()), a.maxSize !== null && n.data.size > a.maxSize.value && (b(n, {
|
|
2176
2176
|
code: g.too_big,
|
|
2177
2177
|
maximum: a.maxSize.value,
|
|
2178
2178
|
type: "set",
|
|
@@ -2192,7 +2192,7 @@ var nr = class ar extends E {
|
|
|
2192
2192
|
value: l
|
|
2193
2193
|
};
|
|
2194
2194
|
}
|
|
2195
|
-
const o = [...n.data.values()].map((c, l) => i._parse(new
|
|
2195
|
+
const o = [...n.data.values()].map((c, l) => i._parse(new le(n, c, n.path, l)));
|
|
2196
2196
|
return n.common.async ? Promise.all(o).then((c) => s(c)) : s(o);
|
|
2197
2197
|
}
|
|
2198
2198
|
min(t, r) {
|
|
@@ -2234,7 +2234,7 @@ var Xa = class ct extends E {
|
|
|
2234
2234
|
_parse(t) {
|
|
2235
2235
|
const { ctx: r } = this._processInputParams(t);
|
|
2236
2236
|
if (r.parsedType !== x.function)
|
|
2237
|
-
return
|
|
2237
|
+
return b(r, {
|
|
2238
2238
|
code: g.invalid_type,
|
|
2239
2239
|
expected: x.function,
|
|
2240
2240
|
received: r.parsedType
|
|
@@ -2275,7 +2275,7 @@ var Xa = class ct extends E {
|
|
|
2275
2275
|
if (this._def.returns instanceof ze) {
|
|
2276
2276
|
const o = this;
|
|
2277
2277
|
return Y(async function(...c) {
|
|
2278
|
-
const l = new
|
|
2278
|
+
const l = new oe([]), f = await o._def.args.parseAsync(c, i).catch((p) => {
|
|
2279
2279
|
throw l.addIssue(n(c, p)), l;
|
|
2280
2280
|
}), u = await Reflect.apply(s, this, f);
|
|
2281
2281
|
return await o._def.returns._def.type.parseAsync(u, i).catch((p) => {
|
|
@@ -2286,9 +2286,9 @@ var Xa = class ct extends E {
|
|
|
2286
2286
|
const o = this;
|
|
2287
2287
|
return Y(function(...c) {
|
|
2288
2288
|
const l = o._def.args.safeParse(c, i);
|
|
2289
|
-
if (!l.success) throw new
|
|
2289
|
+
if (!l.success) throw new oe([n(c, l.error)]);
|
|
2290
2290
|
const f = Reflect.apply(s, this, l.data), u = o._def.returns.safeParse(f, i);
|
|
2291
|
-
if (!u.success) throw new
|
|
2291
|
+
if (!u.success) throw new oe([a(f, u.error)]);
|
|
2292
2292
|
return u.data;
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
@@ -2325,7 +2325,7 @@ var Xa = class ct extends E {
|
|
|
2325
2325
|
...T(n)
|
|
2326
2326
|
});
|
|
2327
2327
|
}
|
|
2328
|
-
},
|
|
2328
|
+
}, bt = class extends E {
|
|
2329
2329
|
get schema() {
|
|
2330
2330
|
return this._def.getter();
|
|
2331
2331
|
}
|
|
@@ -2338,16 +2338,16 @@ var Xa = class ct extends E {
|
|
|
2338
2338
|
});
|
|
2339
2339
|
}
|
|
2340
2340
|
};
|
|
2341
|
-
|
|
2341
|
+
bt.create = (e, t) => new bt({
|
|
2342
2342
|
getter: e,
|
|
2343
2343
|
typeName: N.ZodLazy,
|
|
2344
2344
|
...T(t)
|
|
2345
2345
|
});
|
|
2346
|
-
var
|
|
2346
|
+
var yt = class extends E {
|
|
2347
2347
|
_parse(e) {
|
|
2348
2348
|
if (e.data !== this._def.value) {
|
|
2349
2349
|
const t = this._getOrReturnCtx(e);
|
|
2350
|
-
return
|
|
2350
|
+
return b(t, {
|
|
2351
2351
|
received: t.data,
|
|
2352
2352
|
code: g.invalid_literal,
|
|
2353
2353
|
expected: this._def.value
|
|
@@ -2362,7 +2362,7 @@ var bt = class extends E {
|
|
|
2362
2362
|
return this._def.value;
|
|
2363
2363
|
}
|
|
2364
2364
|
};
|
|
2365
|
-
|
|
2365
|
+
yt.create = (e, t) => new yt({
|
|
2366
2366
|
value: e,
|
|
2367
2367
|
typeName: N.ZodLiteral,
|
|
2368
2368
|
...T(t)
|
|
@@ -2378,7 +2378,7 @@ var Et = class ir extends E {
|
|
|
2378
2378
|
_parse(t) {
|
|
2379
2379
|
if (typeof t.data != "string") {
|
|
2380
2380
|
const r = this._getOrReturnCtx(t), n = this._def.values;
|
|
2381
|
-
return
|
|
2381
|
+
return b(r, {
|
|
2382
2382
|
expected: R.joinValues(n),
|
|
2383
2383
|
received: r.parsedType,
|
|
2384
2384
|
code: g.invalid_type
|
|
@@ -2386,7 +2386,7 @@ var Et = class ir extends E {
|
|
|
2386
2386
|
}
|
|
2387
2387
|
if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(t.data)) {
|
|
2388
2388
|
const r = this._getOrReturnCtx(t), n = this._def.values;
|
|
2389
|
-
return
|
|
2389
|
+
return b(r, {
|
|
2390
2390
|
received: r.data,
|
|
2391
2391
|
code: g.invalid_enum_value,
|
|
2392
2392
|
options: n
|
|
@@ -2431,7 +2431,7 @@ var xt = class extends E {
|
|
|
2431
2431
|
const t = R.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(e);
|
|
2432
2432
|
if (r.parsedType !== x.string && r.parsedType !== x.number) {
|
|
2433
2433
|
const n = R.objectValues(t);
|
|
2434
|
-
return
|
|
2434
|
+
return b(r, {
|
|
2435
2435
|
expected: R.joinValues(n),
|
|
2436
2436
|
received: r.parsedType,
|
|
2437
2437
|
code: g.invalid_type
|
|
@@ -2439,7 +2439,7 @@ var xt = class extends E {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
if (this._cache || (this._cache = new Set(R.getValidEnumValues(this._def.values))), !this._cache.has(e.data)) {
|
|
2441
2441
|
const n = R.objectValues(t);
|
|
2442
|
-
return
|
|
2442
|
+
return b(r, {
|
|
2443
2443
|
received: r.data,
|
|
2444
2444
|
code: g.invalid_enum_value,
|
|
2445
2445
|
options: n
|
|
@@ -2462,7 +2462,7 @@ var ze = class extends E {
|
|
|
2462
2462
|
}
|
|
2463
2463
|
_parse(e) {
|
|
2464
2464
|
const { ctx: t } = this._processInputParams(e);
|
|
2465
|
-
return t.parsedType !== x.promise && t.common.async === !1 ? (
|
|
2465
|
+
return t.parsedType !== x.promise && t.common.async === !1 ? (b(t, {
|
|
2466
2466
|
code: g.invalid_type,
|
|
2467
2467
|
expected: x.promise,
|
|
2468
2468
|
received: t.parsedType
|
|
@@ -2487,7 +2487,7 @@ var ve = class extends E {
|
|
|
2487
2487
|
_parse(e) {
|
|
2488
2488
|
const { status: t, ctx: r } = this._processInputParams(e), n = this._def.effect || null, a = {
|
|
2489
2489
|
addIssue: (i) => {
|
|
2490
|
-
|
|
2490
|
+
b(r, i), i.fatal ? t.abort() : t.dirty();
|
|
2491
2491
|
},
|
|
2492
2492
|
get path() {
|
|
2493
2493
|
return r.path;
|
|
@@ -2642,7 +2642,7 @@ var St = class extends E {
|
|
|
2642
2642
|
status: "valid",
|
|
2643
2643
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2644
2644
|
get error() {
|
|
2645
|
-
return new
|
|
2645
|
+
return new oe(r.common.issues);
|
|
2646
2646
|
},
|
|
2647
2647
|
input: r.data
|
|
2648
2648
|
})
|
|
@@ -2650,7 +2650,7 @@ var St = class extends E {
|
|
|
2650
2650
|
status: "valid",
|
|
2651
2651
|
value: n.status === "valid" ? n.value : this._def.catchValue({
|
|
2652
2652
|
get error() {
|
|
2653
|
-
return new
|
|
2653
|
+
return new oe(r.common.issues);
|
|
2654
2654
|
},
|
|
2655
2655
|
input: r.data
|
|
2656
2656
|
})
|
|
@@ -2670,7 +2670,7 @@ var sr = class extends E {
|
|
|
2670
2670
|
_parse(e) {
|
|
2671
2671
|
if (this._getType(e) !== x.nan) {
|
|
2672
2672
|
const t = this._getOrReturnCtx(e);
|
|
2673
|
-
return
|
|
2673
|
+
return b(t, {
|
|
2674
2674
|
code: g.invalid_type,
|
|
2675
2675
|
expected: x.nan,
|
|
2676
2676
|
received: t.parsedType
|
|
@@ -2755,7 +2755,7 @@ var Ul = { object: ae.lazycreate }, N;
|
|
|
2755
2755
|
(function(e) {
|
|
2756
2756
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
2757
2757
|
})(N || (N = {}));
|
|
2758
|
-
var z = mt.create, Bl = Bt.create, Hl = sr.create, Gl = Gt.create, Zt = Xt.create, Yl = Jt.create, Xl = Qt.create, Jl = gt.create, Ql = _t.create, Kl = Kt.create, Ja = Me.create, ql = xe.create, ec = qt.create, tc = je.create, pr = ae.create, rc = ae.strictCreate, nc = vt.create, ac = Ga.create, ic = kt.create, sc = Se.create, Qa = Ya.create, oc = rr.create, lc = nr.create, cc = Xa.create, dc =
|
|
2758
|
+
var z = mt.create, Bl = Bt.create, Hl = sr.create, Gl = Gt.create, Zt = Xt.create, Yl = Jt.create, Xl = Qt.create, Jl = gt.create, Ql = _t.create, Kl = Kt.create, Ja = Me.create, ql = xe.create, ec = qt.create, tc = je.create, pr = ae.create, rc = ae.strictCreate, nc = vt.create, ac = Ga.create, ic = kt.create, sc = Se.create, Qa = Ya.create, oc = rr.create, lc = nr.create, cc = Xa.create, dc = bt.create, uc = yt.create, Mn = Et.create, fc = xt.create, hc = ze.create, pc = ve.create, mc = ge.create, gc = Ce.create, _c = ve.createWithPreprocess, vc = An.create, Ka = pr({
|
|
2759
2759
|
mode: Mn([
|
|
2760
2760
|
"light",
|
|
2761
2761
|
"dark",
|
|
@@ -2868,7 +2868,7 @@ var or = function() {
|
|
|
2868
2868
|
return t;
|
|
2869
2869
|
}, or.apply(this, arguments);
|
|
2870
2870
|
};
|
|
2871
|
-
function
|
|
2871
|
+
function ce(e, t, r, n) {
|
|
2872
2872
|
function a(i) {
|
|
2873
2873
|
return i instanceof r ? i : new r(function(s) {
|
|
2874
2874
|
s(i);
|
|
@@ -2895,7 +2895,7 @@ function le(e, t, r, n) {
|
|
|
2895
2895
|
l((n = n.apply(e, t || [])).next());
|
|
2896
2896
|
});
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2898
|
+
function de(e, t) {
|
|
2899
2899
|
var r = {
|
|
2900
2900
|
label: 0,
|
|
2901
2901
|
sent: function() {
|
|
@@ -3010,9 +3010,9 @@ function Lr(e, t) {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
}
|
|
3012
3012
|
function Ar(e, t, r) {
|
|
3013
|
-
return r === void 0 && (r = 16),
|
|
3013
|
+
return r === void 0 && (r = 16), ce(this, void 0, void 0, function() {
|
|
3014
3014
|
var n, a, i, s;
|
|
3015
|
-
return
|
|
3015
|
+
return de(this, function(o) {
|
|
3016
3016
|
switch (o.label) {
|
|
3017
3017
|
case 0:
|
|
3018
3018
|
n = Array(e.length), a = Date.now(), i = 0, o.label = 1;
|
|
@@ -3045,7 +3045,7 @@ function mr(e) {
|
|
|
3045
3045
|
function ne(e) {
|
|
3046
3046
|
return parseFloat(e);
|
|
3047
3047
|
}
|
|
3048
|
-
function
|
|
3048
|
+
function fe(e, t) {
|
|
3049
3049
|
return typeof e == "number" && isNaN(e) ? t : e;
|
|
3050
3050
|
}
|
|
3051
3051
|
function G(e) {
|
|
@@ -3223,9 +3223,9 @@ function gi(e, t, r, n) {
|
|
|
3223
3223
|
return mi(e[s], t);
|
|
3224
3224
|
}, n));
|
|
3225
3225
|
return function() {
|
|
3226
|
-
return
|
|
3226
|
+
return ce(this, void 0, void 0, function() {
|
|
3227
3227
|
var o, c, l, f, u;
|
|
3228
|
-
return
|
|
3228
|
+
return de(this, function(p) {
|
|
3229
3229
|
switch (p.label) {
|
|
3230
3230
|
case 0:
|
|
3231
3231
|
return [4, i];
|
|
@@ -3329,7 +3329,7 @@ function ki() {
|
|
|
3329
3329
|
"RGB8" in WebGLRenderingContext.prototype
|
|
3330
3330
|
]) >= 3;
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3332
|
+
function bi() {
|
|
3333
3333
|
var e = window;
|
|
3334
3334
|
return G([
|
|
3335
3335
|
"DOMRectList" in e,
|
|
@@ -3348,7 +3348,7 @@ function Qe() {
|
|
|
3348
3348
|
r.supports("text-transform: full-width")
|
|
3349
3349
|
]) >= 4;
|
|
3350
3350
|
}
|
|
3351
|
-
function
|
|
3351
|
+
function yi() {
|
|
3352
3352
|
if (navigator.platform === "iPad") return !0;
|
|
3353
3353
|
var e = screen, t = e.width / e.height;
|
|
3354
3354
|
return G([
|
|
@@ -3409,7 +3409,7 @@ function Ii() {
|
|
|
3409
3409
|
};
|
|
3410
3410
|
}
|
|
3411
3411
|
function Ni() {
|
|
3412
|
-
return ie() && !gr() && !
|
|
3412
|
+
return ie() && !gr() && !bi();
|
|
3413
3413
|
}
|
|
3414
3414
|
function Ti() {
|
|
3415
3415
|
return ie() && Qe() && Je() || Xe() && Si() && ki();
|
|
@@ -3456,9 +3456,9 @@ function Rr(e) {
|
|
|
3456
3456
|
}
|
|
3457
3457
|
function Wn(e, t, r) {
|
|
3458
3458
|
var n, a, i;
|
|
3459
|
-
return r === void 0 && (r = 50),
|
|
3459
|
+
return r === void 0 && (r = 50), ce(this, void 0, void 0, function() {
|
|
3460
3460
|
var s, o;
|
|
3461
|
-
return
|
|
3461
|
+
return de(this, function(c) {
|
|
3462
3462
|
switch (c.label) {
|
|
3463
3463
|
case 0:
|
|
3464
3464
|
s = document, c.label = 1;
|
|
@@ -3598,29 +3598,29 @@ function Zi() {
|
|
|
3598
3598
|
var e = this;
|
|
3599
3599
|
return Wn(function(t, r) {
|
|
3600
3600
|
var n = r.document;
|
|
3601
|
-
return
|
|
3601
|
+
return ce(e, void 0, void 0, function() {
|
|
3602
3602
|
var a, i, s, o, c, l, f, u, p, h, m, v;
|
|
3603
|
-
return
|
|
3603
|
+
return de(this, function(k) {
|
|
3604
3604
|
for (a = n.body, a.style.fontSize = Oi, i = n.createElement("div"), i.style.setProperty("visibility", "hidden", "important"), s = {}, o = {}, c = function(_) {
|
|
3605
|
-
var
|
|
3606
|
-
return M.position = "absolute", M.top = "0", M.left = "0", M.fontFamily = _,
|
|
3607
|
-
}, l = function(_,
|
|
3608
|
-
return c("'".concat(_, "',").concat(
|
|
3605
|
+
var y = n.createElement("span"), M = y.style;
|
|
3606
|
+
return M.position = "absolute", M.top = "0", M.left = "0", M.fontFamily = _, y.textContent = ji, i.appendChild(y), y;
|
|
3607
|
+
}, l = function(_, y) {
|
|
3608
|
+
return c("'".concat(_, "',").concat(y));
|
|
3609
3609
|
}, f = function() {
|
|
3610
3610
|
return Te.map(c);
|
|
3611
3611
|
}, u = function() {
|
|
3612
|
-
for (var _ = {},
|
|
3612
|
+
for (var _ = {}, y = function(D) {
|
|
3613
3613
|
_[D] = Te.map(function(C) {
|
|
3614
3614
|
return l(D, C);
|
|
3615
3615
|
});
|
|
3616
3616
|
}, M = 0, Z = jr; M < Z.length; M++) {
|
|
3617
3617
|
var V = Z[M];
|
|
3618
|
-
|
|
3618
|
+
y(V);
|
|
3619
3619
|
}
|
|
3620
3620
|
return _;
|
|
3621
3621
|
}, p = function(_) {
|
|
3622
|
-
return Te.some(function(
|
|
3623
|
-
return _[M].offsetWidth !== s[
|
|
3622
|
+
return Te.some(function(y, M) {
|
|
3623
|
+
return _[M].offsetWidth !== s[y] || _[M].offsetHeight !== o[y];
|
|
3624
3624
|
});
|
|
3625
3625
|
}, h = f(), m = u(), a.appendChild(i), v = 0; v < Te.length; v++)
|
|
3626
3626
|
s[Te[v]] = h[v].offsetWidth, o[Te[v]] = h[v].offsetHeight;
|
|
@@ -3747,7 +3747,7 @@ function Ji() {
|
|
|
3747
3747
|
return window.screen.colorDepth;
|
|
3748
3748
|
}
|
|
3749
3749
|
function Qi() {
|
|
3750
|
-
return
|
|
3750
|
+
return fe(ne(navigator.deviceMemory), void 0);
|
|
3751
3751
|
}
|
|
3752
3752
|
function Ki() {
|
|
3753
3753
|
if (!(ie() && Qe() && Je()))
|
|
@@ -3755,7 +3755,7 @@ function Ki() {
|
|
|
3755
3755
|
}
|
|
3756
3756
|
function qi() {
|
|
3757
3757
|
var e = screen, t = function(n) {
|
|
3758
|
-
return
|
|
3758
|
+
return fe(mr(n), null);
|
|
3759
3759
|
}, r = [t(e.width), t(e.height)];
|
|
3760
3760
|
return r.sort().reverse(), r;
|
|
3761
3761
|
}
|
|
@@ -3772,9 +3772,9 @@ function rs() {
|
|
|
3772
3772
|
function ns() {
|
|
3773
3773
|
var e = this;
|
|
3774
3774
|
return rs(), function() {
|
|
3775
|
-
return
|
|
3775
|
+
return ce(e, void 0, void 0, function() {
|
|
3776
3776
|
var t;
|
|
3777
|
-
return
|
|
3777
|
+
return de(this, function(r) {
|
|
3778
3778
|
switch (r.label) {
|
|
3779
3779
|
case 0:
|
|
3780
3780
|
return t = lr(), cr(t) ? dt ? [2, On([], dt, !0)] : xi() ? [4, wi()] : [3, 2] : [3, 2];
|
|
@@ -3794,9 +3794,9 @@ function as() {
|
|
|
3794
3794
|
};
|
|
3795
3795
|
var t = ns();
|
|
3796
3796
|
return function() {
|
|
3797
|
-
return
|
|
3797
|
+
return ce(e, void 0, void 0, function() {
|
|
3798
3798
|
var r, n;
|
|
3799
|
-
return
|
|
3799
|
+
return de(this, function(a) {
|
|
3800
3800
|
switch (a.label) {
|
|
3801
3801
|
case 0:
|
|
3802
3802
|
return [4, t()];
|
|
@@ -3817,10 +3817,10 @@ function as() {
|
|
|
3817
3817
|
function lr() {
|
|
3818
3818
|
var e = screen;
|
|
3819
3819
|
return [
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3820
|
+
fe(ne(e.availTop), null),
|
|
3821
|
+
fe(ne(e.width) - ne(e.availWidth) - fe(ne(e.availLeft), 0), null),
|
|
3822
|
+
fe(ne(e.height) - ne(e.availHeight) - fe(ne(e.availTop), 0), null),
|
|
3823
|
+
fe(ne(e.availLeft), null)
|
|
3824
3824
|
];
|
|
3825
3825
|
}
|
|
3826
3826
|
function cr(e) {
|
|
@@ -3828,7 +3828,7 @@ function cr(e) {
|
|
|
3828
3828
|
return !0;
|
|
3829
3829
|
}
|
|
3830
3830
|
function is() {
|
|
3831
|
-
return
|
|
3831
|
+
return fe(mr(navigator.hardwareConcurrency), void 0);
|
|
3832
3832
|
}
|
|
3833
3833
|
function ss() {
|
|
3834
3834
|
var e, t = (e = window.Intl) === null || e === void 0 ? void 0 : e.DateTimeFormat;
|
|
@@ -3873,7 +3873,7 @@ function fs() {
|
|
|
3873
3873
|
}
|
|
3874
3874
|
function hs() {
|
|
3875
3875
|
var e = navigator.platform;
|
|
3876
|
-
return e === "MacIntel" && ie() && !gr() ?
|
|
3876
|
+
return e === "MacIntel" && ie() && !gr() ? yi() ? "iPad" : "iPhone" : e;
|
|
3877
3877
|
}
|
|
3878
3878
|
function ps() {
|
|
3879
3879
|
return navigator.vendor || "";
|
|
@@ -4202,16 +4202,16 @@ function _s() {
|
|
|
4202
4202
|
}
|
|
4203
4203
|
function vs(e) {
|
|
4204
4204
|
var t = (e === void 0 ? {} : e).debug;
|
|
4205
|
-
return
|
|
4205
|
+
return ce(this, void 0, void 0, function() {
|
|
4206
4206
|
var r, n, a, i, s, o;
|
|
4207
|
-
return
|
|
4207
|
+
return de(this, function(c) {
|
|
4208
4208
|
switch (c.label) {
|
|
4209
4209
|
case 0:
|
|
4210
4210
|
return ks() ? (r = _s(), n = Object.keys(r), a = (o = []).concat.apply(o, n.map(function(l) {
|
|
4211
4211
|
return r[l];
|
|
4212
|
-
})), [4,
|
|
4212
|
+
})), [4, bs(a)]) : [2, void 0];
|
|
4213
4213
|
case 1:
|
|
4214
|
-
return i = c.sent(), t &&
|
|
4214
|
+
return i = c.sent(), t && ys(r, i), s = n.filter(function(l) {
|
|
4215
4215
|
var f = r[l];
|
|
4216
4216
|
return G(f.map(function(u) {
|
|
4217
4217
|
return i[u];
|
|
@@ -4224,11 +4224,11 @@ function vs(e) {
|
|
|
4224
4224
|
function ks() {
|
|
4225
4225
|
return ie() || _r();
|
|
4226
4226
|
}
|
|
4227
|
-
function
|
|
4227
|
+
function bs(e) {
|
|
4228
4228
|
var t;
|
|
4229
|
-
return
|
|
4229
|
+
return ce(this, void 0, void 0, function() {
|
|
4230
4230
|
var r, n, a, i, c, s, o, c;
|
|
4231
|
-
return
|
|
4231
|
+
return de(this, function(l) {
|
|
4232
4232
|
switch (l.label) {
|
|
4233
4233
|
case 0:
|
|
4234
4234
|
for (r = document, n = r.createElement("div"), a = new Array(e.length), i = {}, Or(n), c = 0; c < e.length; ++c)
|
|
@@ -4253,7 +4253,7 @@ function ys(e) {
|
|
|
4253
4253
|
function Or(e) {
|
|
4254
4254
|
e.style.setProperty("visibility", "hidden", "important"), e.style.setProperty("display", "block", "important");
|
|
4255
4255
|
}
|
|
4256
|
-
function
|
|
4256
|
+
function ys(e, t) {
|
|
4257
4257
|
for (var r = "DOM blockers debug:\n```", n = 0, a = Object.keys(e); n < a.length; n++) {
|
|
4258
4258
|
var i = a[n];
|
|
4259
4259
|
r += `
|
|
@@ -4336,7 +4336,7 @@ function Es() {
|
|
|
4336
4336
|
return j.log(S + j.sqrt(S * S - 1));
|
|
4337
4337
|
}, _ = function(S) {
|
|
4338
4338
|
return j.log(S + j.sqrt(S * S + 1));
|
|
4339
|
-
},
|
|
4339
|
+
}, y = function(S) {
|
|
4340
4340
|
return j.log((1 + S) / (1 - S)) / 2;
|
|
4341
4341
|
}, M = function(S) {
|
|
4342
4342
|
return j.exp(S) - 1 / j.exp(S) / 2;
|
|
@@ -4357,7 +4357,7 @@ function Es() {
|
|
|
4357
4357
|
asinh: n(1),
|
|
4358
4358
|
asinhPf: _(1),
|
|
4359
4359
|
atanh: a(0.5),
|
|
4360
|
-
atanhPf:
|
|
4360
|
+
atanhPf: y(0.5),
|
|
4361
4361
|
atan: i(0.5),
|
|
4362
4362
|
sin: s(-1e300),
|
|
4363
4363
|
sinh: o(1),
|
|
@@ -4396,8 +4396,8 @@ function Rs() {
|
|
|
4396
4396
|
}
|
|
4397
4397
|
r[s] = p, t.append(e.createElement("br"), p);
|
|
4398
4398
|
}
|
|
4399
|
-
for (var _ = 0,
|
|
4400
|
-
var s =
|
|
4399
|
+
for (var _ = 0, y = Object.keys(Ft); _ < y.length; _++) {
|
|
4400
|
+
var s = y[_];
|
|
4401
4401
|
n[s] = r[s].getBoundingClientRect().width;
|
|
4402
4402
|
}
|
|
4403
4403
|
return n;
|
|
@@ -4567,8 +4567,8 @@ function Gs(e) {
|
|
|
4567
4567
|
var k = v[m], _ = r[k];
|
|
4568
4568
|
o.push("".concat(k, "=").concat(_).concat(Ws.has(_) ? "=".concat(r.getParameter(_)) : ""));
|
|
4569
4569
|
}
|
|
4570
|
-
if (n) for (var
|
|
4571
|
-
var Z = M[
|
|
4570
|
+
if (n) for (var y = 0, M = n; y < M.length; y++) {
|
|
4571
|
+
var Z = M[y];
|
|
4572
4572
|
if (!(Z === Un && Hn() || Z === Bs && Js())) {
|
|
4573
4573
|
var V = r.getExtension(Z);
|
|
4574
4574
|
if (!V) {
|
|
@@ -4745,9 +4745,9 @@ function lo(e) {
|
|
|
4745
4745
|
function co(e, t) {
|
|
4746
4746
|
var r = Date.now();
|
|
4747
4747
|
return { get: function(n) {
|
|
4748
|
-
return
|
|
4748
|
+
return ce(this, void 0, void 0, function() {
|
|
4749
4749
|
var a, i, s;
|
|
4750
|
-
return
|
|
4750
|
+
return de(this, function(o) {
|
|
4751
4751
|
switch (o.label) {
|
|
4752
4752
|
case 0:
|
|
4753
4753
|
return a = Date.now(), [4, e()];
|
|
@@ -4768,9 +4768,9 @@ function uo() {
|
|
|
4768
4768
|
}
|
|
4769
4769
|
function fo(e) {
|
|
4770
4770
|
var t;
|
|
4771
|
-
return e === void 0 && (e = {}),
|
|
4771
|
+
return e === void 0 && (e = {}), ce(this, void 0, void 0, function() {
|
|
4772
4772
|
var r, n, a;
|
|
4773
|
-
return
|
|
4773
|
+
return de(this, function(i) {
|
|
4774
4774
|
switch (i.label) {
|
|
4775
4775
|
case 0:
|
|
4776
4776
|
return (!((t = e.monitoring) !== null && t !== void 0) || t) && uo(), r = e.delayFallback, n = e.debug, [4, lo(r)];
|
|
@@ -5015,8 +5015,8 @@ async function _o(e, t, r, n = {}) {
|
|
|
5015
5015
|
return k && _ && r.onToolStart && r.onToolStart(k, _), !1;
|
|
5016
5016
|
}
|
|
5017
5017
|
if (m.type === "tool_complete") {
|
|
5018
|
-
const k = m.toolId, _ = m.text,
|
|
5019
|
-
return k && _ && r.onToolComplete && r.onToolComplete(k, _,
|
|
5018
|
+
const k = m.toolId, _ = m.text, y = m.durationMs;
|
|
5019
|
+
return k && _ && r.onToolComplete && r.onToolComplete(k, _, y ?? 0), !1;
|
|
5020
5020
|
}
|
|
5021
5021
|
if (m.type === "model_start" || m.type === "final_meta") {
|
|
5022
5022
|
if (m.type === "final_meta" && r.onFinalMeta) {
|
|
@@ -5078,11 +5078,11 @@ var ko = class {
|
|
|
5078
5078
|
removeAllListeners() {
|
|
5079
5079
|
this.listeners.clear();
|
|
5080
5080
|
}
|
|
5081
|
-
},
|
|
5081
|
+
}, bo = "agentforge";
|
|
5082
5082
|
function vr(e) {
|
|
5083
|
-
return `${
|
|
5083
|
+
return `${bo}:session:${e}`;
|
|
5084
5084
|
}
|
|
5085
|
-
function
|
|
5085
|
+
function yo(e) {
|
|
5086
5086
|
try {
|
|
5087
5087
|
return sessionStorage.getItem(vr(e)) ?? void 0;
|
|
5088
5088
|
} catch {
|
|
@@ -5115,7 +5115,7 @@ var xo = class {
|
|
|
5115
5115
|
emitter;
|
|
5116
5116
|
constructor(e, t, r) {
|
|
5117
5117
|
this.hostConfig = t, this.onStateChange = r, this.config = e, this.apiClient = new po(e.apiBaseUrl, { preview: e.preview }), this.emitter = new ko(), this.initializeFingerprint();
|
|
5118
|
-
const n = e.sessionId ??
|
|
5118
|
+
const n = e.sessionId ?? yo(e.agentId);
|
|
5119
5119
|
e.sessionId && it(e.agentId, e.sessionId);
|
|
5120
5120
|
const a = e.mode === "inline";
|
|
5121
5121
|
this.state = {
|
|
@@ -5671,12 +5671,12 @@ function Oo(e, t, r, n) {
|
|
|
5671
5671
|
function Zo(e) {
|
|
5672
5672
|
e ? Ve.get(e)?.destroy() : (Ve.forEach((t) => t.destroy()), Ve.clear());
|
|
5673
5673
|
}
|
|
5674
|
-
var Mt, L, Qn, Po,
|
|
5675
|
-
function
|
|
5674
|
+
var Mt, L, Qn, Po, ye, zr, Kn, qn, Vt, ut, We, ea, kr, dr, ur, $o, Nt = {}, Tt = [], Fo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ke = Array.isArray;
|
|
5675
|
+
function pe(e, t) {
|
|
5676
5676
|
for (var r in t) e[r] = t[r];
|
|
5677
5677
|
return e;
|
|
5678
5678
|
}
|
|
5679
|
-
function
|
|
5679
|
+
function br(e) {
|
|
5680
5680
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
5681
5681
|
}
|
|
5682
5682
|
function He(e, t, r) {
|
|
@@ -5716,8 +5716,8 @@ function Oe(e, t) {
|
|
|
5716
5716
|
}
|
|
5717
5717
|
function Vo(e) {
|
|
5718
5718
|
if (e.__P && e.__d) {
|
|
5719
|
-
var t = e.__v, r = t.__e, n = [], a = [], i =
|
|
5720
|
-
i.__v = t.__v + 1, L.vnode && L.vnode(i),
|
|
5719
|
+
var t = e.__v, r = t.__e, n = [], a = [], i = pe({}, t);
|
|
5720
|
+
i.__v = t.__v + 1, L.vnode && L.vnode(i), yr(e.__P, i, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [r] : null, n, r ?? Oe(t), !!(32 & t.__u), a), i.__v = t.__v, i.__.__k[i.__i] = i, aa(n, i, a), t.__e = t.__ = null, i.__e != r && ta(i);
|
|
5721
5721
|
}
|
|
5722
5722
|
}
|
|
5723
5723
|
function ta(e) {
|
|
@@ -5726,18 +5726,18 @@ function ta(e) {
|
|
|
5726
5726
|
}), ta(e);
|
|
5727
5727
|
}
|
|
5728
5728
|
function Ur(e) {
|
|
5729
|
-
(!e.__d && (e.__d = !0) &&
|
|
5729
|
+
(!e.__d && (e.__d = !0) && ye.push(e) && !Lt.__r++ || zr != L.debounceRendering) && ((zr = L.debounceRendering) || Kn)(Lt);
|
|
5730
5730
|
}
|
|
5731
5731
|
function Lt() {
|
|
5732
5732
|
try {
|
|
5733
|
-
for (var e, t = 1;
|
|
5733
|
+
for (var e, t = 1; ye.length; ) ye.length > t && ye.sort(qn), e = ye.shift(), t = ye.length, Vo(e);
|
|
5734
5734
|
} finally {
|
|
5735
|
-
|
|
5735
|
+
ye.length = Lt.__r = 0;
|
|
5736
5736
|
}
|
|
5737
5737
|
}
|
|
5738
5738
|
function ra(e, t, r, n, a, i, s, o, c, l, f) {
|
|
5739
|
-
var u, p, h, m, v, k, _,
|
|
5740
|
-
for (c = Wo(r, t,
|
|
5739
|
+
var u, p, h, m, v, k, _, y = n && n.__k || Tt, M = t.length;
|
|
5740
|
+
for (c = Wo(r, t, y, c, M), u = 0; u < M; u++) (h = r.__k[u]) != null && (p = h.__i != -1 && y[h.__i] || Nt, h.__i = u, k = yr(e, h, p, a, i, s, o, c, l, f), m = h.__e, h.ref && p.ref != h.ref && (p.ref && xr(p.ref, null, h), f.push(h.ref, h.__c || m, h)), v == null && m != null && (v = m), (_ = !!(4 & h.__u)) || p.__k === h.__k ? (c = na(h, c, e, _), _ && p.__e && (p.__e = null)) : typeof h.type == "function" && k !== void 0 ? c = k : m && (c = m.nextSibling), h.__u &= -7);
|
|
5741
5741
|
return r.__e = v, c;
|
|
5742
5742
|
}
|
|
5743
5743
|
function Wo(e, t, r, n, a) {
|
|
@@ -5802,34 +5802,34 @@ function Hr(e) {
|
|
|
5802
5802
|
}
|
|
5803
5803
|
};
|
|
5804
5804
|
}
|
|
5805
|
-
function
|
|
5806
|
-
var f, u, p, h, m, v, k, _,
|
|
5805
|
+
function yr(e, t, r, n, a, i, s, o, c, l) {
|
|
5806
|
+
var f, u, p, h, m, v, k, _, y, M, Z, V, D, C, S, W = t.type;
|
|
5807
5807
|
if (t.constructor !== void 0) return null;
|
|
5808
5808
|
128 & r.__u && (c = !!(32 & r.__u), i = [o = t.__e = r.__e]), (f = L.__b) && f(t);
|
|
5809
5809
|
e: if (typeof W == "function") try {
|
|
5810
|
-
if (_ = t.props,
|
|
5810
|
+
if (_ = t.props, y = W.prototype && W.prototype.render, M = (f = W.contextType) && n[f.__c], Z = f ? M ? M.props.value : f.__ : n, r.__c ? k = (u = t.__c = r.__c).__ = u.__E : (y ? t.__c = u = new W(_, Z) : (t.__c = u = new _e(_, Z), u.constructor = W, u.render = Uo), M && M.sub(u), u.state || (u.state = {}), u.__n = n, p = u.__d = !0, u.__h = [], u._sb = []), y && u.__s == null && (u.__s = u.state), y && W.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = pe({}, u.__s)), pe(u.__s, W.getDerivedStateFromProps(_, u.__s))), h = u.props, m = u.state, u.__v = t, p) y && W.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), y && u.componentDidMount != null && u.__h.push(u.componentDidMount);
|
|
5811
5811
|
else {
|
|
5812
|
-
if (
|
|
5812
|
+
if (y && W.getDerivedStateFromProps == null && _ !== h && u.componentWillReceiveProps != null && u.componentWillReceiveProps(_, Z), t.__v == r.__v || !u.__e && u.shouldComponentUpdate != null && u.shouldComponentUpdate(_, u.__s, Z) === !1) {
|
|
5813
5813
|
t.__v != r.__v && (u.props = _, u.state = u.__s, u.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(q) {
|
|
5814
5814
|
q && (q.__ = t);
|
|
5815
5815
|
}), Tt.push.apply(u.__h, u._sb), u._sb = [], u.__h.length && s.push(u);
|
|
5816
5816
|
break e;
|
|
5817
5817
|
}
|
|
5818
|
-
u.componentWillUpdate != null && u.componentWillUpdate(_, u.__s, Z),
|
|
5818
|
+
u.componentWillUpdate != null && u.componentWillUpdate(_, u.__s, Z), y && u.componentDidUpdate != null && u.__h.push(function() {
|
|
5819
5819
|
u.componentDidUpdate(h, m, v);
|
|
5820
5820
|
});
|
|
5821
5821
|
}
|
|
5822
|
-
if (u.context = Z, u.props = _, u.__P = e, u.__e = !1, V = L.__r, D = 0,
|
|
5822
|
+
if (u.context = Z, u.props = _, u.__P = e, u.__e = !1, V = L.__r, D = 0, y) u.state = u.__s, u.__d = !1, V && V(t), f = u.render(u.props, u.state, u.context), Tt.push.apply(u.__h, u._sb), u._sb = [];
|
|
5823
5823
|
else do
|
|
5824
5824
|
u.__d = !1, V && V(t), f = u.render(u.props, u.state, u.context), u.state = u.__s;
|
|
5825
5825
|
while (u.__d && ++D < 25);
|
|
5826
|
-
u.state = u.__s, u.getChildContext != null && (n =
|
|
5826
|
+
u.state = u.__s, u.getChildContext != null && (n = pe(pe({}, n), u.getChildContext())), y && !p && u.getSnapshotBeforeUpdate != null && (v = u.getSnapshotBeforeUpdate(h, m)), C = f != null && f.type === H && f.key == null ? ia(f.props.children) : f, o = ra(e, Ke(C) ? C : [C], t, r, n, a, i, s, o, c, l), u.base = t.__e, t.__u &= -161, u.__h.length && s.push(u), k && (u.__E = u.__ = null);
|
|
5827
5827
|
} catch (q) {
|
|
5828
5828
|
if (t.__v = null, c || i != null) if (q.then) {
|
|
5829
5829
|
for (t.__u |= c ? 160 : 128; o && o.nodeType == 8 && o.nextSibling; ) o = o.nextSibling;
|
|
5830
5830
|
i[i.indexOf(o)] = null, t.__e = o;
|
|
5831
5831
|
} else {
|
|
5832
|
-
for (S = i.length; S--; )
|
|
5832
|
+
for (S = i.length; S--; ) br(i[S]);
|
|
5833
5833
|
fr(t);
|
|
5834
5834
|
}
|
|
5835
5835
|
else t.__e = r.__e, t.__k = r.__k, q.then || fr(t);
|
|
@@ -5854,28 +5854,28 @@ function aa(e, t, r) {
|
|
|
5854
5854
|
});
|
|
5855
5855
|
}
|
|
5856
5856
|
function ia(e) {
|
|
5857
|
-
return typeof e != "object" || e == null || e.__b > 0 ? e : Ke(e) ? e.map(ia) : e.constructor !== void 0 ? null :
|
|
5857
|
+
return typeof e != "object" || e == null || e.__b > 0 ? e : Ke(e) ? e.map(ia) : e.constructor !== void 0 ? null : pe({}, e);
|
|
5858
5858
|
}
|
|
5859
5859
|
function zo(e, t, r, n, a, i, s, o, c) {
|
|
5860
|
-
var l, f, u, p, h, m, v, k = r.props || Nt, _ = t.props,
|
|
5861
|
-
if (
|
|
5862
|
-
for (l = 0; l < i.length; l++) if ((h = i[l]) && "setAttribute" in h == !!
|
|
5860
|
+
var l, f, u, p, h, m, v, k = r.props || Nt, _ = t.props, y = t.type;
|
|
5861
|
+
if (y == "svg" ? a = "http://www.w3.org/2000/svg" : y == "math" ? a = "http://www.w3.org/1998/Math/MathML" : a || (a = "http://www.w3.org/1999/xhtml"), i != null) {
|
|
5862
|
+
for (l = 0; l < i.length; l++) if ((h = i[l]) && "setAttribute" in h == !!y && (y ? h.localName == y : h.nodeType == 3)) {
|
|
5863
5863
|
e = h, i[l] = null;
|
|
5864
5864
|
break;
|
|
5865
5865
|
}
|
|
5866
5866
|
}
|
|
5867
5867
|
if (e == null) {
|
|
5868
|
-
if (
|
|
5869
|
-
e = document.createElementNS(a,
|
|
5868
|
+
if (y == null) return document.createTextNode(_);
|
|
5869
|
+
e = document.createElementNS(a, y, _.is && _), o && (L.__m && L.__m(t, i), o = !1), i = null;
|
|
5870
5870
|
}
|
|
5871
|
-
if (
|
|
5871
|
+
if (y == null) k === _ || o && e.data == _ || (e.data = _);
|
|
5872
5872
|
else {
|
|
5873
|
-
if (i =
|
|
5873
|
+
if (i = y == "textarea" && _.defaultValue != null ? null : i && Mt.call(e.childNodes), !o && i != null) for (k = {}, l = 0; l < e.attributes.length; l++) k[(h = e.attributes[l]).name] = h.value;
|
|
5874
5874
|
for (l in k) h = k[l], l == "dangerouslySetInnerHTML" ? u = h : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || st(e, l, null, h, a);
|
|
5875
5875
|
for (l in _) h = _[l], l == "children" ? p = h : l == "dangerouslySetInnerHTML" ? f = h : l == "value" ? m = h : l == "checked" ? v = h : o && typeof h != "function" || k[l] === h || st(e, l, h, k[l], a);
|
|
5876
5876
|
if (f) o || u && (f.__html == u.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
|
|
5877
|
-
else if (u && (e.innerHTML = ""), ra(t.type == "template" ? e.content : e, Ke(p) ? p : [p], t, r, n,
|
|
5878
|
-
o &&
|
|
5877
|
+
else if (u && (e.innerHTML = ""), ra(t.type == "template" ? e.content : e, Ke(p) ? p : [p], t, r, n, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : a, i, s, i ? i[0] : r.__k && Oe(r, 0), o, c), i != null) for (l = i.length; l--; ) br(i[l]);
|
|
5878
|
+
o && y != "textarea" || (l = "value", y == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || y == "progress" && !m || y == "option" && m != k[l]) && st(e, l, m, k[l], a), l = "checked", v != null && v != e[l] && st(e, l, v, k[l], a));
|
|
5879
5879
|
}
|
|
5880
5880
|
return e;
|
|
5881
5881
|
}
|
|
@@ -5900,14 +5900,14 @@ function sa(e, t, r) {
|
|
|
5900
5900
|
n.base = n.__P = null;
|
|
5901
5901
|
}
|
|
5902
5902
|
if (n = e.__k) for (a = 0; a < n.length; a++) n[a] && sa(n[a], t, r || typeof e.type != "function");
|
|
5903
|
-
r ||
|
|
5903
|
+
r || br(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
5904
5904
|
}
|
|
5905
5905
|
function Uo(e, t, r) {
|
|
5906
5906
|
return this.constructor(e, r);
|
|
5907
5907
|
}
|
|
5908
5908
|
function oa(e, t, r) {
|
|
5909
5909
|
var n, a, i, s;
|
|
5910
|
-
t == document && (t = document.documentElement), L.__ && L.__(e, t), a = (n = typeof r == "function") ? null : r && r.__k || t.__k, i = [], s = [],
|
|
5910
|
+
t == document && (t = document.documentElement), L.__ && L.__(e, t), a = (n = typeof r == "function") ? null : r && r.__k || t.__k, i = [], s = [], yr(t, e = (!n && r || t).__k = He(H, null, [e]), a || Nt, Nt, t.namespaceURI, !n && r ? [r] : a ? null : t.firstChild ? Mt.call(t.childNodes) : null, i, !n && r ? r : a ? a.__e : t.firstChild, n, s), aa(i, e, s);
|
|
5911
5911
|
}
|
|
5912
5912
|
Mt = Tt.slice, L = { __e: function(e, t, r, n) {
|
|
5913
5913
|
for (var a, i, s; t = t.__; ) if ((a = t.__c) && !a.__) try {
|
|
@@ -5919,11 +5919,11 @@ Mt = Tt.slice, L = { __e: function(e, t, r, n) {
|
|
|
5919
5919
|
} }, Qn = 0, Po = function(e) {
|
|
5920
5920
|
return e != null && e.constructor === void 0;
|
|
5921
5921
|
}, _e.prototype.setState = function(e, t) {
|
|
5922
|
-
var r = this.__s != null && this.__s != this.state ? this.__s : this.__s =
|
|
5923
|
-
typeof e == "function" && (e = e(
|
|
5922
|
+
var r = this.__s != null && this.__s != this.state ? this.__s : this.__s = pe({}, this.state);
|
|
5923
|
+
typeof e == "function" && (e = e(pe({}, r), this.props)), e && pe(r, e), e != null && this.__v && (t && this._sb.push(t), Ur(this));
|
|
5924
5924
|
}, _e.prototype.forceUpdate = function(e) {
|
|
5925
5925
|
this.__v && (this.__e = !0, e && this.__h.push(e), Ur(this));
|
|
5926
|
-
}, _e.prototype.render = H,
|
|
5926
|
+
}, _e.prototype.render = H, ye = [], Kn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, qn = function(e, t) {
|
|
5927
5927
|
return e.__v.__b - t.__v.__b;
|
|
5928
5928
|
}, Lt.__r = 0, Vt = Math.random().toString(8), ut = "__d" + Vt, We = "__a" + Vt, ea = /(PointerCapture)$|Capture$/i, kr = 0, dr = Hr(!1), ur = Hr(!0), $o = 0;
|
|
5929
5929
|
var Ge, $, Wt, Gr, Ye = 0, la = [], F = L, Yr = F.__b, Xr = F.__r, Jr = F.diffed, Qr = F.__c, Kr = F.unmount, qr = F.__;
|
|
@@ -5935,7 +5935,7 @@ function wr(e, t) {
|
|
|
5935
5935
|
});
|
|
5936
5936
|
return e >= r.__.length && r.__.push({}), r.__[e];
|
|
5937
5937
|
}
|
|
5938
|
-
function
|
|
5938
|
+
function me(e) {
|
|
5939
5939
|
return Ye = 1, Bo(da, e);
|
|
5940
5940
|
}
|
|
5941
5941
|
function Bo(e, t, r) {
|
|
@@ -5972,11 +5972,11 @@ function Bo(e, t, r) {
|
|
|
5972
5972
|
}
|
|
5973
5973
|
return n.__N || n.__;
|
|
5974
5974
|
}
|
|
5975
|
-
function
|
|
5975
|
+
function se(e, t) {
|
|
5976
5976
|
var r = wr(Ge++, 3);
|
|
5977
5977
|
!F.__s && ca(r.__H, t) && (r.__ = e, r.u = t, $.__H.__h.push(r));
|
|
5978
5978
|
}
|
|
5979
|
-
function
|
|
5979
|
+
function he(e) {
|
|
5980
5980
|
return Ye = 5, Rt(function() {
|
|
5981
5981
|
return { current: e };
|
|
5982
5982
|
}, []);
|
|
@@ -8046,6 +8046,64 @@ var cl = `
|
|
|
8046
8046
|
opacity: 0.75;
|
|
8047
8047
|
letter-spacing: -0.01em;
|
|
8048
8048
|
}
|
|
8049
|
+
|
|
8050
|
+
/* ── Mobile: full-viewport panel ─────────────────────────────── */
|
|
8051
|
+
@media (max-width: 639px) {
|
|
8052
|
+
@keyframes ak-panel-in-mobile {
|
|
8053
|
+
from { opacity: 0; transform: translateY(32px); }
|
|
8054
|
+
to { opacity: 1; transform: translateY(0); }
|
|
8055
|
+
}
|
|
8056
|
+
|
|
8057
|
+
/* The shadow host (data-agentkit-widget) sits inside the outer fixed container.
|
|
8058
|
+
Give it its own fixed position so it fills the viewport independently,
|
|
8059
|
+
bypassing the outer container's bottom/right offsets. */
|
|
8060
|
+
:host([data-open]) {
|
|
8061
|
+
position: fixed;
|
|
8062
|
+
top: 0;
|
|
8063
|
+
left: 0;
|
|
8064
|
+
right: 0;
|
|
8065
|
+
bottom: 0;
|
|
8066
|
+
z-index: 2147483647;
|
|
8067
|
+
pointer-events: none;
|
|
8068
|
+
}
|
|
8069
|
+
|
|
8070
|
+
:host([data-open]) .ak-floating {
|
|
8071
|
+
width: 100%;
|
|
8072
|
+
height: 100%;
|
|
8073
|
+
align-items: stretch;
|
|
8074
|
+
gap: 0;
|
|
8075
|
+
}
|
|
8076
|
+
|
|
8077
|
+
:host([data-open]) .ak-shell-wrap {
|
|
8078
|
+
flex: 1;
|
|
8079
|
+
min-height: 0;
|
|
8080
|
+
width: 100%;
|
|
8081
|
+
align-items: stretch;
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
:host([data-open]) .ak-shell--floating {
|
|
8085
|
+
width: 100%;
|
|
8086
|
+
flex: 1;
|
|
8087
|
+
height: auto;
|
|
8088
|
+
border-radius: 0;
|
|
8089
|
+
box-shadow: none;
|
|
8090
|
+
border-left: none;
|
|
8091
|
+
border-right: none;
|
|
8092
|
+
border-top: none;
|
|
8093
|
+
}
|
|
8094
|
+
|
|
8095
|
+
:host([data-open]) .ak-launcher {
|
|
8096
|
+
display: none;
|
|
8097
|
+
}
|
|
8098
|
+
|
|
8099
|
+
:host([data-open]) .ak-shell-enter {
|
|
8100
|
+
animation: ak-panel-in-mobile 0.22s ease-out;
|
|
8101
|
+
}
|
|
8102
|
+
|
|
8103
|
+
:host([data-open]) .ak-branding {
|
|
8104
|
+
display: none;
|
|
8105
|
+
}
|
|
8106
|
+
}
|
|
8049
8107
|
`;
|
|
8050
8108
|
var dl = 0;
|
|
8051
8109
|
function d(e, t, r, n, a, i) {
|
|
@@ -8147,7 +8205,7 @@ function hl() {
|
|
|
8147
8205
|
});
|
|
8148
8206
|
}
|
|
8149
8207
|
function pl({ title: e, subtitle: t, avatarUrl: r, onClose: n, onReset: a, hideClose: i = !1 }) {
|
|
8150
|
-
const [s, o] =
|
|
8208
|
+
const [s, o] = me(!1);
|
|
8151
8209
|
return /* @__PURE__ */ d("div", {
|
|
8152
8210
|
className: `ak-header${s ? " ak-header--confirming" : ""}`,
|
|
8153
8211
|
children: [/* @__PURE__ */ d("div", {
|
|
@@ -8234,7 +8292,7 @@ function pl({ title: e, subtitle: t, avatarUrl: r, onClose: n, onReset: a, hideC
|
|
|
8234
8292
|
});
|
|
8235
8293
|
}
|
|
8236
8294
|
function ml({ ackText: e, events: t = [], collapsed: r = !1, onToggle: n, isComplete: a = !1 }) {
|
|
8237
|
-
const [i, s] =
|
|
8295
|
+
const [i, s] = me(!1), o = t[t.length - 1]?.text ?? e;
|
|
8238
8296
|
if (!o) return null;
|
|
8239
8297
|
const c = n ? r : i, l = n ?? (() => s((f) => !f));
|
|
8240
8298
|
return a && c ? /* @__PURE__ */ d("button", {
|
|
@@ -8302,7 +8360,7 @@ function ml({ ackText: e, events: t = [], collapsed: r = !1, onToggle: n, isComp
|
|
|
8302
8360
|
});
|
|
8303
8361
|
}
|
|
8304
8362
|
function gl({ thinking: e, isThinking: t, thinkingViewable: r }) {
|
|
8305
|
-
const [n, a] =
|
|
8363
|
+
const [n, a] = me(!1);
|
|
8306
8364
|
return !t && !e ? null : t ? /* @__PURE__ */ d("div", {
|
|
8307
8365
|
className: "ak-thinking",
|
|
8308
8366
|
children: /* @__PURE__ */ d("div", {
|
|
@@ -8474,7 +8532,7 @@ function Pe({ src: e, alt: t, overlayCount: r = 0, onClick: n }) {
|
|
|
8474
8532
|
}
|
|
8475
8533
|
function fn({ images: e, index: t, onClose: r, onIndexChange: n }) {
|
|
8476
8534
|
const a = t !== null, i = a && t !== null ? Math.min(Math.max(0, t), e.length - 1) : 0, s = a ? e[i] : null;
|
|
8477
|
-
return
|
|
8535
|
+
return se(() => {
|
|
8478
8536
|
if (!a) return;
|
|
8479
8537
|
const o = (c) => {
|
|
8480
8538
|
c.key === "Escape" ? (c.stopPropagation(), r()) : c.key === "ArrowLeft" && e.length > 1 ? (c.preventDefault(), n((i - 1 + e.length) % e.length)) : c.key === "ArrowRight" && e.length > 1 && (c.preventDefault(), n((i + 1) % e.length));
|
|
@@ -8667,7 +8725,7 @@ function kl({ url: e, mimeType: t, fileName: r }) {
|
|
|
8667
8725
|
})]
|
|
8668
8726
|
});
|
|
8669
8727
|
}
|
|
8670
|
-
function
|
|
8728
|
+
function bl(e) {
|
|
8671
8729
|
try {
|
|
8672
8730
|
return new Date(e).toLocaleTimeString([], {
|
|
8673
8731
|
hour: "2-digit",
|
|
@@ -8713,7 +8771,7 @@ function Q(e) {
|
|
|
8713
8771
|
}
|
|
8714
8772
|
return r < e.length && t.push(e.slice(r)), t;
|
|
8715
8773
|
}
|
|
8716
|
-
function
|
|
8774
|
+
function yl(e) {
|
|
8717
8775
|
e = e.replace(/\\text\{([^}]*)\}/g, "$1").replace(/\\implies/g, "→").replace(/\\Rightarrow/g, "⟹").replace(/\\times/g, "×").replace(/\\div/g, "÷").replace(/\\cdot/g, "·").replace(/\\quad/g, " ").replace(/\\qquad/g, " ").replace(/\\leq/g, "≤").replace(/\\geq/g, "≥").replace(/\\neq/g, "≠").replace(/\\approx/g, "≈").replace(/\\infty/g, "∞").replace(/\\\((.+?)\\\)/gs, "$1").replace(/\\\[[\s\S]+?\\\]/g, "").replace(/\\\$/g, "\0DOLLAR\0").replace(/\$\$[\s\S]+?\$\$/g, "").replace(/\$([^$]+)\$/g, "$1").replace(/\x00DOLLAR\x00/g, "$").replace(/\\[a-zA-Z]+\*?/g, "").replace(/\n{3,}/g, `
|
|
8718
8776
|
|
|
8719
8777
|
`);
|
|
@@ -8783,10 +8841,10 @@ function bl(e) {
|
|
|
8783
8841
|
for (; v < t.length && v < f + 20; ) {
|
|
8784
8842
|
const _ = t[v];
|
|
8785
8843
|
if (_.length - _.trimStart().length > u && _.trim() !== "") {
|
|
8786
|
-
const
|
|
8787
|
-
/^[-*+]\s/.test(
|
|
8844
|
+
const y = _.trim();
|
|
8845
|
+
/^[-*+]\s/.test(y) ? h.push(/* @__PURE__ */ d("li", { children: Q(y.replace(/^[-*+]\s+/, "")) }, `nested-${v}`)) : m.push(/* @__PURE__ */ d("p", {
|
|
8788
8846
|
style: { margin: "0.2em 0 0" },
|
|
8789
|
-
children: Q(
|
|
8847
|
+
children: Q(y)
|
|
8790
8848
|
}, `cont-${v}`)), v++;
|
|
8791
8849
|
} else break;
|
|
8792
8850
|
}
|
|
@@ -8822,10 +8880,10 @@ function bl(e) {
|
|
|
8822
8880
|
for (; v < t.length && v < f + 20; ) {
|
|
8823
8881
|
const _ = t[v];
|
|
8824
8882
|
if (_.length - _.trimStart().length > u && _.trim() !== "") {
|
|
8825
|
-
const
|
|
8826
|
-
/^\d+\.\s/.test(
|
|
8883
|
+
const y = _.trim();
|
|
8884
|
+
/^\d+\.\s/.test(y) ? h.push(/* @__PURE__ */ d("li", { children: Q(y.replace(/^\d+\.\s+/, "")) }, `nested-order-${v}`)) : /^[-*+]\s/.test(y) ? h.push(/* @__PURE__ */ d("li", { children: Q(y.replace(/^[-*+]\s+/, "")) }, `nested-unorder-${v}`)) : m.push(/* @__PURE__ */ d("p", {
|
|
8827
8885
|
style: { margin: "0.2em 0 0" },
|
|
8828
|
-
children: Q(
|
|
8886
|
+
children: Q(y)
|
|
8829
8887
|
}, `cont-${v}`)), v++;
|
|
8830
8888
|
} else break;
|
|
8831
8889
|
}
|
|
@@ -8897,7 +8955,7 @@ function bl(e) {
|
|
|
8897
8955
|
return /* @__PURE__ */ d(H, { children: r });
|
|
8898
8956
|
}
|
|
8899
8957
|
function xl({ message: e, thinkingViewable: t = !1 }) {
|
|
8900
|
-
const [r, n] =
|
|
8958
|
+
const [r, n] = me(null), [a, i] = me(null), s = e.role === "user", o = e.status === "error", c = e.status === "streaming", l = !!(e.images && e.images.length > 0), f = (() => {
|
|
8901
8959
|
if (!s) return [];
|
|
8902
8960
|
const C = (e.uploadedAttachments ?? []).filter((S) => S.kind === "image").map((S) => ({
|
|
8903
8961
|
url: S.url,
|
|
@@ -8908,13 +8966,13 @@ function xl({ message: e, thinkingViewable: t = !1 }) {
|
|
|
8908
8966
|
url: e.uploadedImageUrl,
|
|
8909
8967
|
mimeType: "image/jpeg"
|
|
8910
8968
|
}] : [];
|
|
8911
|
-
})(), u = s ? (e.uploadedAttachments ?? []).filter((C) => C.kind === "file") : [], p = f.length > 0, h = u.length > 0, m = l || p, v = !s && !o, k = !!e.isHuman && !s, _ = s ? "ak-message--user" : o ? "ak-message--assistant ak-message--error" : k ? "ak-message--assistant ak-message--operator" : "ak-message--assistant",
|
|
8969
|
+
})(), u = s ? (e.uploadedAttachments ?? []).filter((C) => C.kind === "file") : [], p = f.length > 0, h = u.length > 0, m = l || p, v = !s && !o, k = !!e.isHuman && !s, _ = s ? "ak-message--user" : o ? "ak-message--assistant ak-message--error" : k ? "ak-message--assistant ak-message--operator" : "ak-message--assistant", y = [
|
|
8912
8970
|
"ak-message__bubble",
|
|
8913
8971
|
v ? "ak-message__bubble--md" : "",
|
|
8914
8972
|
m ? "ak-message__bubble--has-image" : "",
|
|
8915
8973
|
k ? "ak-message__bubble--operator" : ""
|
|
8916
8974
|
].filter(Boolean).join(" "), M = k ? e.senderDisplay?.trim() || "Operator" : null, Z = M ? M.charAt(0).toUpperCase() : "", V = /* @__PURE__ */ d(H, { children: [/* @__PURE__ */ d("div", {
|
|
8917
|
-
className:
|
|
8975
|
+
className: y,
|
|
8918
8976
|
children: [
|
|
8919
8977
|
p && /* @__PURE__ */ d(un, {
|
|
8920
8978
|
messageId: `${e.id}-up`,
|
|
@@ -8948,7 +9006,7 @@ function xl({ message: e, thinkingViewable: t = !1 }) {
|
|
|
8948
9006
|
}),
|
|
8949
9007
|
(e.content || c && !e.isThinking && !e.toolStatus) && /* @__PURE__ */ d("div", {
|
|
8950
9008
|
className: m ? "ak-message__image-caption" : void 0,
|
|
8951
|
-
children: [v ?
|
|
9009
|
+
children: [v ? yl(e.content) : e.content, c && !e.isThinking && !e.toolStatus && /* @__PURE__ */ d("span", {
|
|
8952
9010
|
className: "ak-cursor",
|
|
8953
9011
|
"aria-hidden": "true",
|
|
8954
9012
|
children: [
|
|
@@ -8961,7 +9019,7 @@ function xl({ message: e, thinkingViewable: t = !1 }) {
|
|
|
8961
9019
|
]
|
|
8962
9020
|
}), /* @__PURE__ */ d("span", {
|
|
8963
9021
|
className: "ak-message__time",
|
|
8964
|
-
children:
|
|
9022
|
+
children: bl(e.createdAt)
|
|
8965
9023
|
})] }), D = !!e.content || !e.isThinking && !e.toolStatus;
|
|
8966
9024
|
return /* @__PURE__ */ d("div", {
|
|
8967
9025
|
className: `ak-message ${_}`,
|
|
@@ -9047,8 +9105,8 @@ function Sl(e, t) {
|
|
|
9047
9105
|
return r;
|
|
9048
9106
|
}
|
|
9049
9107
|
function Cl({ messages: e, isLoading: t, thinkingViewable: r, operatorFallbackLabel: n = "Operator" }) {
|
|
9050
|
-
const a =
|
|
9051
|
-
return
|
|
9108
|
+
const a = he(null), i = he(null), s = he(!0), o = Rt(() => Sl(e, n), [e, n]);
|
|
9109
|
+
return se(() => {
|
|
9052
9110
|
if (!(a.current?.parentElement ?? a.current)) return;
|
|
9053
9111
|
const c = (u) => {
|
|
9054
9112
|
s.current = u.scrollHeight - u.scrollTop - u.clientHeight < 120;
|
|
@@ -9058,9 +9116,9 @@ function Cl({ messages: e, isLoading: t, thinkingViewable: r, operatorFallbackLa
|
|
|
9058
9116
|
if (!l) return;
|
|
9059
9117
|
const f = () => c(l);
|
|
9060
9118
|
return l.addEventListener("scroll", f, { passive: !0 }), () => l.removeEventListener("scroll", f);
|
|
9061
|
-
}, []),
|
|
9119
|
+
}, []), se(() => {
|
|
9062
9120
|
e[e.length - 1]?.role === "user" && (s.current = !0), s.current && i.current?.scrollIntoView({ behavior: "smooth" });
|
|
9063
|
-
}, [e]),
|
|
9121
|
+
}, [e]), se(() => {
|
|
9064
9122
|
s.current && i.current?.scrollIntoView({ behavior: "smooth" });
|
|
9065
9123
|
}, [
|
|
9066
9124
|
t,
|
|
@@ -9296,10 +9354,10 @@ function jl(e) {
|
|
|
9296
9354
|
return _a.includes(e.type);
|
|
9297
9355
|
}
|
|
9298
9356
|
function Ol({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…", privacyPolicyUrl: n, termsOfServiceUrl: a, photoSendingEnabled: i = !1, fileUploadEnabled: s = !1, attachmentMaxCount: o = 5, attachmentMaxFileSizeMb: c = 1 }) {
|
|
9299
|
-
const [l, f] =
|
|
9300
|
-
|
|
9357
|
+
const [l, f] = me(""), [u, p] = me([]), [h, m] = me(/* @__PURE__ */ new Map()), [v, k] = me(!1), _ = he(null), y = he(null), M = he(null), Z = he(null), V = he(null), D = i || s, C = Rt(() => c * 1024 * 1024, [c]);
|
|
9358
|
+
se(() => () => {
|
|
9301
9359
|
h.forEach((A) => URL.revokeObjectURL(A));
|
|
9302
|
-
}, []),
|
|
9360
|
+
}, []), se(() => {
|
|
9303
9361
|
t || _.current?.focus();
|
|
9304
9362
|
}, [t]);
|
|
9305
9363
|
const S = Ho((A) => {
|
|
@@ -9307,14 +9365,14 @@ function Ol({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
9307
9365
|
const P = A.composedPath ? A.composedPath() : [], te = !!Z.current && P.includes(Z.current), U = !!V.current && P.includes(V.current);
|
|
9308
9366
|
!te && !U && k(!1);
|
|
9309
9367
|
}, [v]);
|
|
9310
|
-
|
|
9368
|
+
se(() => {
|
|
9311
9369
|
if (v)
|
|
9312
9370
|
return document.addEventListener("click", S), () => document.removeEventListener("click", S);
|
|
9313
|
-
}, [v, S]),
|
|
9371
|
+
}, [v, S]), se(() => {
|
|
9314
9372
|
D || k(!1);
|
|
9315
9373
|
}, [D]);
|
|
9316
9374
|
function W() {
|
|
9317
|
-
h.forEach((A) => URL.revokeObjectURL(A)), m(/* @__PURE__ */ new Map()), p([]),
|
|
9375
|
+
h.forEach((A) => URL.revokeObjectURL(A)), m(/* @__PURE__ */ new Map()), p([]), y.current && (y.current.value = ""), M.current && (M.current.value = "");
|
|
9318
9376
|
}
|
|
9319
9377
|
function q(A) {
|
|
9320
9378
|
p((P) => {
|
|
@@ -9380,10 +9438,10 @@ function Ol({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
9380
9438
|
const P = Array.from(A.currentTarget.files ?? []);
|
|
9381
9439
|
A.currentTarget.value = "", tt(P, "file");
|
|
9382
9440
|
}
|
|
9383
|
-
function ya() {
|
|
9384
|
-
k(!1), b.current?.click();
|
|
9385
|
-
}
|
|
9386
9441
|
function ba() {
|
|
9442
|
+
k(!1), y.current?.click();
|
|
9443
|
+
}
|
|
9444
|
+
function ya() {
|
|
9387
9445
|
k(!1), M.current?.click();
|
|
9388
9446
|
}
|
|
9389
9447
|
const xa = !t && (!!l.trim() || u.length > 0);
|
|
@@ -9396,14 +9454,14 @@ function Ol({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
9396
9454
|
role: "menu",
|
|
9397
9455
|
children: [i && /* @__PURE__ */ d("button", {
|
|
9398
9456
|
className: "ak-composer__attach-menu-item",
|
|
9399
|
-
onClick:
|
|
9457
|
+
onClick: ba,
|
|
9400
9458
|
type: "button",
|
|
9401
9459
|
role: "menuitem",
|
|
9402
9460
|
disabled: t,
|
|
9403
9461
|
children: [/* @__PURE__ */ d(Al, {}), /* @__PURE__ */ d("span", { children: "Photo" })]
|
|
9404
9462
|
}), s && /* @__PURE__ */ d("button", {
|
|
9405
9463
|
className: "ak-composer__attach-menu-item",
|
|
9406
|
-
onClick:
|
|
9464
|
+
onClick: ya,
|
|
9407
9465
|
type: "button",
|
|
9408
9466
|
role: "menuitem",
|
|
9409
9467
|
disabled: t,
|
|
@@ -9461,7 +9519,7 @@ function Ol({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
|
|
|
9461
9519
|
children: [
|
|
9462
9520
|
D && /* @__PURE__ */ d(H, { children: [
|
|
9463
9521
|
i && /* @__PURE__ */ d("input", {
|
|
9464
|
-
ref:
|
|
9522
|
+
ref: y,
|
|
9465
9523
|
type: "file",
|
|
9466
9524
|
multiple: !0,
|
|
9467
9525
|
accept: Ml,
|
|
@@ -9668,7 +9726,7 @@ function _n({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
|
|
|
9668
9726
|
avatarUrl: e.avatarUrl,
|
|
9669
9727
|
onClose: o.onClose,
|
|
9670
9728
|
onReset: i === "ready" ? o.onReset : void 0,
|
|
9671
|
-
hideClose:
|
|
9729
|
+
hideClose: a
|
|
9672
9730
|
}),
|
|
9673
9731
|
i === "validating" && /* @__PURE__ */ d("div", {
|
|
9674
9732
|
className: "ak-init-status",
|
|
@@ -9756,13 +9814,17 @@ function Dl({ isOpen: e, onClick: t, avatarUrl: r, ariaLabel: n = "Toggle chat"
|
|
|
9756
9814
|
});
|
|
9757
9815
|
}
|
|
9758
9816
|
function vn({ config: e, state: t, callbacks: r }) {
|
|
9759
|
-
const n = e.mode === "inline", a =
|
|
9760
|
-
return
|
|
9817
|
+
const n = e.mode === "inline", a = he(null);
|
|
9818
|
+
return se(() => {
|
|
9761
9819
|
const i = a.current?.getRootNode()?.host;
|
|
9762
9820
|
if (!i) return;
|
|
9763
9821
|
const s = ll(e.theme.mode);
|
|
9764
9822
|
i.setAttribute("data-theme", s);
|
|
9765
|
-
}, [e.theme.mode]),
|
|
9823
|
+
}, [e.theme.mode]), se(() => {
|
|
9824
|
+
if (n) return;
|
|
9825
|
+
const i = a.current?.getRootNode()?.host;
|
|
9826
|
+
i && (t.isOpen ? i.setAttribute("data-open", "") : i.removeAttribute("data-open"));
|
|
9827
|
+
}, [n, t.isOpen]), n ? /* @__PURE__ */ d("div", {
|
|
9766
9828
|
ref: a,
|
|
9767
9829
|
className: "ak-inline",
|
|
9768
9830
|
children: /* @__PURE__ */ d(_n, {
|
|
@@ -9815,16 +9877,16 @@ var kn = (e, t, r, n) => {
|
|
|
9815
9877
|
}
|
|
9816
9878
|
};
|
|
9817
9879
|
};
|
|
9818
|
-
function
|
|
9880
|
+
function bn(e) {
|
|
9819
9881
|
return cl + `
|
|
9820
9882
|
` + ol(e);
|
|
9821
9883
|
}
|
|
9822
9884
|
var zl = {
|
|
9823
9885
|
init(e) {
|
|
9824
|
-
return jo(e, kn,
|
|
9886
|
+
return jo(e, kn, bn(Ue(e)));
|
|
9825
9887
|
},
|
|
9826
9888
|
mount(e, t) {
|
|
9827
|
-
return Oo(e, t, kn,
|
|
9889
|
+
return Oo(e, t, kn, bn(Ue({
|
|
9828
9890
|
...t,
|
|
9829
9891
|
mode: "inline"
|
|
9830
9892
|
})));
|