@telia-ace/widget-conversation-flamingo 1.1.76 → 1.1.77-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/conversation-utilities.d.ts +1 -1
- package/conversation.d.ts +2 -0
- package/index.js +25 -20
- package/index.mjs +163 -137
- package/package.json +2 -2
- package/widget-manifest.json +14 -0
package/index.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var x = (s, e, t) => (
|
1
|
+
var Ci = Object.defineProperty;
|
2
|
+
var Ai = (s, e, t) => e in s ? Ci(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
3
|
+
var x = (s, e, t) => (Ai(s, typeof e != "symbol" ? e + "" : e, t), t), Ei = (s, e, t) => {
|
4
4
|
if (!e.has(s))
|
5
5
|
throw TypeError("Cannot " + t);
|
6
6
|
};
|
@@ -9,7 +9,7 @@ var $t = (s, e, t) => {
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
10
10
|
e instanceof WeakSet ? e.add(s) : e.set(s, t);
|
11
11
|
};
|
12
|
-
var He = (s, e, t) => (
|
12
|
+
var He = (s, e, t) => (Ei(s, e, "access private method"), t);
|
13
13
|
const Ul = async (s) => {
|
14
14
|
s.registerComponent("conversation", Promise.resolve().then(() => Ml));
|
15
15
|
};
|
@@ -54,7 +54,7 @@ function ye(s, e) {
|
|
54
54
|
}
|
55
55
|
s.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
56
56
|
}
|
57
|
-
function
|
57
|
+
function Ti(s, e, t, n) {
|
58
58
|
function i(r) {
|
59
59
|
return r instanceof t ? r : new t(function(o) {
|
60
60
|
o(r);
|
@@ -187,7 +187,7 @@ function se(s, e, t) {
|
|
187
187
|
function pe(s) {
|
188
188
|
return this instanceof pe ? (this.v = s, this) : new pe(s);
|
189
189
|
}
|
190
|
-
function
|
190
|
+
function Li(s, e, t) {
|
191
191
|
if (!Symbol.asyncIterator)
|
192
192
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
193
193
|
var n = t.apply(s, e || []), i, r = [];
|
@@ -221,7 +221,7 @@ function Oi(s, e, t) {
|
|
221
221
|
p(d), r.shift(), r.length && a(r[0][0], r[0][1]);
|
222
222
|
}
|
223
223
|
}
|
224
|
-
function
|
224
|
+
function Oi(s) {
|
225
225
|
if (!Symbol.asyncIterator)
|
226
226
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
227
227
|
var e = s[Symbol.asyncIterator], t;
|
@@ -395,7 +395,7 @@ var Wt = function(s) {
|
|
395
395
|
ye(e, s);
|
396
396
|
function e(t) {
|
397
397
|
var n = s.call(this) || this;
|
398
|
-
return n.isStopped = !1, t ? (n.destination = t, bs(t) && t.add(n)) : n.destination =
|
398
|
+
return n.isStopped = !1, t ? (n.destination = t, bs(t) && t.add(n)) : n.destination = Mi, n;
|
399
399
|
}
|
400
400
|
return e.create = function(t, n, i) {
|
401
401
|
return new Rt(t, n, i);
|
@@ -422,11 +422,11 @@ var Wt = function(s) {
|
|
422
422
|
this.unsubscribe();
|
423
423
|
}
|
424
424
|
}, e;
|
425
|
-
}(at),
|
425
|
+
}(at), Pi = Function.prototype.bind;
|
426
426
|
function wt(s, e) {
|
427
|
-
return
|
427
|
+
return Pi.call(s, e);
|
428
428
|
}
|
429
|
-
var
|
429
|
+
var Ri = function() {
|
430
430
|
function s(e) {
|
431
431
|
this.partialObserver = e;
|
432
432
|
}
|
@@ -477,20 +477,20 @@ var Ii = function() {
|
|
477
477
|
complete: t.complete && wt(t.complete, a)
|
478
478
|
}) : o = t;
|
479
479
|
}
|
480
|
-
return r.destination = new
|
480
|
+
return r.destination = new Ri(o), r;
|
481
481
|
}
|
482
482
|
return e;
|
483
483
|
}(Wt);
|
484
484
|
function Be(s) {
|
485
485
|
$s(s);
|
486
486
|
}
|
487
|
-
function
|
487
|
+
function Ii(s) {
|
488
488
|
throw s;
|
489
489
|
}
|
490
|
-
var
|
490
|
+
var Mi = {
|
491
491
|
closed: !0,
|
492
492
|
next: Ye,
|
493
|
-
error:
|
493
|
+
error: Ii,
|
494
494
|
complete: Ye
|
495
495
|
}, Yt = function() {
|
496
496
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
@@ -498,7 +498,7 @@ var zi = {
|
|
498
498
|
function Pe(s) {
|
499
499
|
return s;
|
500
500
|
}
|
501
|
-
function
|
501
|
+
function zi(s) {
|
502
502
|
return s.length === 0 ? Pe : s.length === 1 ? s[0] : function(t) {
|
503
503
|
return s.reduce(function(n, i) {
|
504
504
|
return i(n);
|
@@ -513,7 +513,7 @@ var A = function() {
|
|
513
513
|
var t = new s();
|
514
514
|
return t.source = this, t.operator = e, t;
|
515
515
|
}, s.prototype.subscribe = function(e, t, n) {
|
516
|
-
var i = this, r =
|
516
|
+
var i = this, r = ji(e) ? e : new Rt(e, t, n);
|
517
517
|
return Ze(function() {
|
518
518
|
var o = i, a = o.operator, l = o.source;
|
519
519
|
r.add(a ? a.call(r, l) : l ? i._subscribe(r) : i._trySubscribe(r));
|
@@ -548,7 +548,7 @@ var A = function() {
|
|
548
548
|
}, s.prototype.pipe = function() {
|
549
549
|
for (var e = [], t = 0; t < arguments.length; t++)
|
550
550
|
e[t] = arguments[t];
|
551
|
-
return
|
551
|
+
return zi(e)(this);
|
552
552
|
}, s.prototype.toPromise = function(e) {
|
553
553
|
var t = this;
|
554
554
|
return e = Sn(e), new e(function(n, i) {
|
@@ -569,18 +569,18 @@ function Sn(s) {
|
|
569
569
|
var e;
|
570
570
|
return (e = s ?? ys.Promise) !== null && e !== void 0 ? e : Promise;
|
571
571
|
}
|
572
|
-
function
|
572
|
+
function Ui(s) {
|
573
573
|
return s && $(s.next) && $(s.error) && $(s.complete);
|
574
574
|
}
|
575
|
-
function
|
576
|
-
return s && s instanceof Wt ||
|
575
|
+
function ji(s) {
|
576
|
+
return s && s instanceof Wt || Ui(s) && bs(s);
|
577
577
|
}
|
578
|
-
function
|
578
|
+
function Di(s) {
|
579
579
|
return $(s == null ? void 0 : s.lift);
|
580
580
|
}
|
581
581
|
function K(s) {
|
582
582
|
return function(e) {
|
583
|
-
if (
|
583
|
+
if (Di(e))
|
584
584
|
return e.lift(function(t) {
|
585
585
|
try {
|
586
586
|
return s(t, this);
|
@@ -592,9 +592,9 @@ function K(s) {
|
|
592
592
|
};
|
593
593
|
}
|
594
594
|
function P(s, e, t, n, i) {
|
595
|
-
return new
|
595
|
+
return new Hi(s, e, t, n, i);
|
596
596
|
}
|
597
|
-
var
|
597
|
+
var Hi = function(s) {
|
598
598
|
ye(e, s);
|
599
599
|
function e(t, n, i, r, o, a) {
|
600
600
|
var l = s.call(this, t) || this;
|
@@ -629,7 +629,7 @@ var Bi = function(s) {
|
|
629
629
|
s.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
630
630
|
}
|
631
631
|
}, e;
|
632
|
-
}(Wt),
|
632
|
+
}(Wt), Bi = ms(function(s) {
|
633
633
|
return function() {
|
634
634
|
s(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
635
635
|
};
|
@@ -644,7 +644,7 @@ var Bi = function(s) {
|
|
644
644
|
return n.operator = t, n;
|
645
645
|
}, e.prototype._throwIfClosed = function() {
|
646
646
|
if (this.closed)
|
647
|
-
throw new
|
647
|
+
throw new Bi();
|
648
648
|
}, e.prototype.next = function(t) {
|
649
649
|
var n = this;
|
650
650
|
Ze(function() {
|
@@ -758,7 +758,7 @@ var Bi = function(s) {
|
|
758
758
|
}(_), Re = new A(function(s) {
|
759
759
|
return s.complete();
|
760
760
|
});
|
761
|
-
function
|
761
|
+
function Ni(s) {
|
762
762
|
return s && $(s.schedule);
|
763
763
|
}
|
764
764
|
function Qt(s) {
|
@@ -768,9 +768,9 @@ function xs(s) {
|
|
768
768
|
return $(Qt(s)) ? s.pop() : void 0;
|
769
769
|
}
|
770
770
|
function Gt(s) {
|
771
|
-
return
|
771
|
+
return Ni(Qt(s)) ? s.pop() : void 0;
|
772
772
|
}
|
773
|
-
function
|
773
|
+
function Fi(s, e) {
|
774
774
|
return typeof Qt(s) == "number" ? s.pop() : e;
|
775
775
|
}
|
776
776
|
var Kt = function(s) {
|
@@ -788,15 +788,15 @@ function _s(s) {
|
|
788
788
|
function Ss(s) {
|
789
789
|
return new TypeError("You provided " + (s !== null && typeof s == "object" ? "an invalid object" : "'" + s + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
790
790
|
}
|
791
|
-
function
|
791
|
+
function qi() {
|
792
792
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
793
793
|
}
|
794
|
-
var Cs =
|
794
|
+
var Cs = qi();
|
795
795
|
function As(s) {
|
796
796
|
return $(s == null ? void 0 : s[Cs]);
|
797
797
|
}
|
798
798
|
function Es(s) {
|
799
|
-
return
|
799
|
+
return Li(this, arguments, function() {
|
800
800
|
var t, n, i, r;
|
801
801
|
return gs(this, function(o) {
|
802
802
|
switch (o.label) {
|
@@ -834,21 +834,21 @@ function B(s) {
|
|
834
834
|
return s;
|
835
835
|
if (s != null) {
|
836
836
|
if (ks(s))
|
837
|
-
return
|
837
|
+
return Zi(s);
|
838
838
|
if (Kt(s))
|
839
|
-
return
|
839
|
+
return Wi(s);
|
840
840
|
if (ws(s))
|
841
|
-
return
|
841
|
+
return Yi(s);
|
842
842
|
if (_s(s))
|
843
843
|
return Ls(s);
|
844
844
|
if (As(s))
|
845
|
-
return
|
845
|
+
return Qi(s);
|
846
846
|
if (Ts(s))
|
847
|
-
return
|
847
|
+
return Gi(s);
|
848
848
|
}
|
849
849
|
throw Ss(s);
|
850
850
|
}
|
851
|
-
function
|
851
|
+
function Zi(s) {
|
852
852
|
return new A(function(e) {
|
853
853
|
var t = s[Yt]();
|
854
854
|
if ($(t.subscribe))
|
@@ -856,14 +856,14 @@ function Wi(s) {
|
|
856
856
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
857
857
|
});
|
858
858
|
}
|
859
|
-
function
|
859
|
+
function Wi(s) {
|
860
860
|
return new A(function(e) {
|
861
861
|
for (var t = 0; t < s.length && !e.closed; t++)
|
862
862
|
e.next(s[t]);
|
863
863
|
e.complete();
|
864
864
|
});
|
865
865
|
}
|
866
|
-
function
|
866
|
+
function Yi(s) {
|
867
867
|
return new A(function(e) {
|
868
868
|
s.then(function(t) {
|
869
869
|
e.closed || (e.next(t), e.complete());
|
@@ -872,7 +872,7 @@ function Qi(s) {
|
|
872
872
|
}).then(null, $s);
|
873
873
|
});
|
874
874
|
}
|
875
|
-
function
|
875
|
+
function Qi(s) {
|
876
876
|
return new A(function(e) {
|
877
877
|
var t, n;
|
878
878
|
try {
|
@@ -896,22 +896,22 @@ function Gi(s) {
|
|
896
896
|
}
|
897
897
|
function Ls(s) {
|
898
898
|
return new A(function(e) {
|
899
|
-
|
899
|
+
Ki(s, e).catch(function(t) {
|
900
900
|
return e.error(t);
|
901
901
|
});
|
902
902
|
});
|
903
903
|
}
|
904
|
-
function
|
904
|
+
function Gi(s) {
|
905
905
|
return Ls(Es(s));
|
906
906
|
}
|
907
|
-
function
|
907
|
+
function Ki(s, e) {
|
908
908
|
var t, n, i, r;
|
909
|
-
return
|
909
|
+
return Ti(this, void 0, void 0, function() {
|
910
910
|
var o, a;
|
911
911
|
return gs(this, function(l) {
|
912
912
|
switch (l.label) {
|
913
913
|
case 0:
|
914
|
-
l.trys.push([0, 5, 6, 11]), t =
|
914
|
+
l.trys.push([0, 5, 6, 11]), t = Oi(s), l.label = 1;
|
915
915
|
case 1:
|
916
916
|
return [4, t.next()];
|
917
917
|
case 2:
|
@@ -976,13 +976,13 @@ function Ps(s, e) {
|
|
976
976
|
}, e));
|
977
977
|
});
|
978
978
|
}
|
979
|
-
function
|
979
|
+
function Xi(s, e) {
|
980
980
|
return B(s).pipe(Ps(e), Os(e));
|
981
981
|
}
|
982
|
-
function
|
982
|
+
function Vi(s, e) {
|
983
983
|
return B(s).pipe(Ps(e), Os(e));
|
984
984
|
}
|
985
|
-
function
|
985
|
+
function Ji(s, e) {
|
986
986
|
return new A(function(t) {
|
987
987
|
var n = 0;
|
988
988
|
return e.schedule(function() {
|
@@ -990,7 +990,7 @@ function er(s, e) {
|
|
990
990
|
});
|
991
991
|
});
|
992
992
|
}
|
993
|
-
function
|
993
|
+
function er(s, e) {
|
994
994
|
return new A(function(t) {
|
995
995
|
var n;
|
996
996
|
return q(t, e, function() {
|
@@ -1023,28 +1023,28 @@ function Rs(s, e) {
|
|
1023
1023
|
});
|
1024
1024
|
});
|
1025
1025
|
}
|
1026
|
-
function
|
1026
|
+
function tr(s, e) {
|
1027
1027
|
return Rs(Es(s), e);
|
1028
1028
|
}
|
1029
|
-
function
|
1029
|
+
function nr(s, e) {
|
1030
1030
|
if (s != null) {
|
1031
1031
|
if (ks(s))
|
1032
|
-
return
|
1032
|
+
return Xi(s, e);
|
1033
1033
|
if (Kt(s))
|
1034
|
-
return er(s, e);
|
1035
|
-
if (ws(s))
|
1036
1034
|
return Ji(s, e);
|
1035
|
+
if (ws(s))
|
1036
|
+
return Vi(s, e);
|
1037
1037
|
if (_s(s))
|
1038
1038
|
return Rs(s, e);
|
1039
1039
|
if (As(s))
|
1040
|
-
return
|
1040
|
+
return er(s, e);
|
1041
1041
|
if (Ts(s))
|
1042
|
-
return
|
1042
|
+
return tr(s, e);
|
1043
1043
|
}
|
1044
1044
|
throw Ss(s);
|
1045
1045
|
}
|
1046
1046
|
function lt(s, e) {
|
1047
|
-
return e ?
|
1047
|
+
return e ? nr(s, e) : B(s);
|
1048
1048
|
}
|
1049
1049
|
function It() {
|
1050
1050
|
for (var s = [], e = 0; e < arguments.length; e++)
|
@@ -1060,23 +1060,23 @@ function Qe(s, e) {
|
|
1060
1060
|
}));
|
1061
1061
|
});
|
1062
1062
|
}
|
1063
|
-
var
|
1064
|
-
function
|
1065
|
-
return
|
1063
|
+
var sr = Array.isArray;
|
1064
|
+
function ir(s, e) {
|
1065
|
+
return sr(e) ? s.apply(void 0, se([], Q(e))) : s(e);
|
1066
1066
|
}
|
1067
1067
|
function Is(s) {
|
1068
1068
|
return Qe(function(e) {
|
1069
|
-
return
|
1069
|
+
return ir(s, e);
|
1070
1070
|
});
|
1071
1071
|
}
|
1072
|
-
var
|
1073
|
-
function
|
1072
|
+
var rr = Array.isArray, or = Object.getPrototypeOf, ar = Object.prototype, lr = Object.keys;
|
1073
|
+
function cr(s) {
|
1074
1074
|
if (s.length === 1) {
|
1075
1075
|
var e = s[0];
|
1076
|
-
if (
|
1076
|
+
if (rr(e))
|
1077
1077
|
return { args: e, keys: null };
|
1078
|
-
if (
|
1079
|
-
var t =
|
1078
|
+
if (hr(e)) {
|
1079
|
+
var t = lr(e);
|
1080
1080
|
return {
|
1081
1081
|
args: t.map(function(n) {
|
1082
1082
|
return e[n];
|
@@ -1087,26 +1087,26 @@ function hr(s) {
|
|
1087
1087
|
}
|
1088
1088
|
return { args: s, keys: null };
|
1089
1089
|
}
|
1090
|
-
function
|
1091
|
-
return s && typeof s == "object" &&
|
1090
|
+
function hr(s) {
|
1091
|
+
return s && typeof s == "object" && or(s) === ar;
|
1092
1092
|
}
|
1093
|
-
function
|
1093
|
+
function ur(s, e) {
|
1094
1094
|
return s.reduce(function(t, n, i) {
|
1095
1095
|
return t[n] = e[i], t;
|
1096
1096
|
}, {});
|
1097
1097
|
}
|
1098
|
-
function
|
1098
|
+
function pr() {
|
1099
1099
|
for (var s = [], e = 0; e < arguments.length; e++)
|
1100
1100
|
s[e] = arguments[e];
|
1101
|
-
var t = Gt(s), n = xs(s), i =
|
1101
|
+
var t = Gt(s), n = xs(s), i = cr(s), r = i.args, o = i.keys;
|
1102
1102
|
if (r.length === 0)
|
1103
1103
|
return lt([], t);
|
1104
|
-
var a = new A(
|
1105
|
-
return
|
1104
|
+
var a = new A(dr(r, t, o ? function(l) {
|
1105
|
+
return ur(o, l);
|
1106
1106
|
} : Pe));
|
1107
1107
|
return n ? a.pipe(Is(n)) : a;
|
1108
1108
|
}
|
1109
|
-
function
|
1109
|
+
function dr(s, e, t) {
|
1110
1110
|
return t === void 0 && (t = Pe), function(n) {
|
1111
1111
|
An(e, function() {
|
1112
1112
|
for (var i = s.length, r = new Array(i), o = i, a = i, l = function(h) {
|
@@ -1126,7 +1126,7 @@ function fr(s, e, t) {
|
|
1126
1126
|
function An(s, e, t) {
|
1127
1127
|
s ? q(t, s, e) : e();
|
1128
1128
|
}
|
1129
|
-
function
|
1129
|
+
function fr(s, e, t, n, i, r, o, a) {
|
1130
1130
|
var l = [], c = 0, h = 0, u = !1, p = function() {
|
1131
1131
|
u && !l.length && !c && e.complete();
|
1132
1132
|
}, d = function(f) {
|
@@ -1167,21 +1167,21 @@ function Xt(s, e, t) {
|
|
1167
1167
|
return e(n, r, i, o);
|
1168
1168
|
})(B(s(n, i)));
|
1169
1169
|
}, t) : (typeof e == "number" && (t = e), K(function(n, i) {
|
1170
|
-
return
|
1170
|
+
return fr(n, i, s, t);
|
1171
1171
|
}));
|
1172
1172
|
}
|
1173
|
-
function
|
1173
|
+
function gr(s) {
|
1174
1174
|
return s === void 0 && (s = 1 / 0), Xt(Pe, s);
|
1175
1175
|
}
|
1176
|
-
var
|
1176
|
+
var mr = ["addListener", "removeListener"], vr = ["addEventListener", "removeEventListener"], br = ["on", "off"];
|
1177
1177
|
function Ge(s, e, t, n) {
|
1178
1178
|
if ($(t) && (n = t, t = void 0), n)
|
1179
1179
|
return Ge(s, e, t).pipe(Is(n));
|
1180
|
-
var i = Q(
|
1180
|
+
var i = Q(xr(s) ? vr.map(function(a) {
|
1181
1181
|
return function(l) {
|
1182
1182
|
return s[a](e, l, t);
|
1183
1183
|
};
|
1184
|
-
}) :
|
1184
|
+
}) : yr(s) ? mr.map(En(s, e)) : $r(s) ? br.map(En(s, e)) : [], 2), r = i[0], o = i[1];
|
1185
1185
|
if (!r && Kt(s))
|
1186
1186
|
return Xt(function(a) {
|
1187
1187
|
return Ge(a, e, t);
|
@@ -1206,20 +1206,20 @@ function En(s, e) {
|
|
1206
1206
|
};
|
1207
1207
|
};
|
1208
1208
|
}
|
1209
|
-
function
|
1209
|
+
function yr(s) {
|
1210
1210
|
return $(s.addListener) && $(s.removeListener);
|
1211
1211
|
}
|
1212
|
-
function
|
1212
|
+
function $r(s) {
|
1213
1213
|
return $(s.on) && $(s.off);
|
1214
1214
|
}
|
1215
|
-
function
|
1215
|
+
function xr(s) {
|
1216
1216
|
return $(s.addEventListener) && $(s.removeEventListener);
|
1217
1217
|
}
|
1218
|
-
function
|
1218
|
+
function wr() {
|
1219
1219
|
for (var s = [], e = 0; e < arguments.length; e++)
|
1220
1220
|
s[e] = arguments[e];
|
1221
|
-
var t = Gt(s), n =
|
1222
|
-
return i.length ? i.length === 1 ? B(i[0]) :
|
1221
|
+
var t = Gt(s), n = Fi(s, 1 / 0), i = s;
|
1222
|
+
return i.length ? i.length === 1 ? B(i[0]) : gr(n)(lt(i, t)) : Re;
|
1223
1223
|
}
|
1224
1224
|
function Mt(s) {
|
1225
1225
|
return s <= 0 ? function() {
|
@@ -1278,7 +1278,10 @@ function Ut() {
|
|
1278
1278
|
});
|
1279
1279
|
}
|
1280
1280
|
var W = /* @__PURE__ */ ((s) => (s.User = "user", s.Agent = "agent", s.System = "system", s))(W || {});
|
1281
|
-
const
|
1281
|
+
const kr = () => "10000000-1000-4000-8000-100000000000".replace(
|
1282
|
+
/[018]/g,
|
1283
|
+
(s) => (+s ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +s / 4).toString(16)
|
1284
|
+
), Ms = () => typeof crypto.randomUUID == "function" ? crypto.randomUUID() : kr();
|
1282
1285
|
function jl(s) {
|
1283
1286
|
let e = s;
|
1284
1287
|
const t = /https?:\/\/[^\s<]+/gi, n = /<a [^>]*href="([^"]*)"[^>]*>[^<]*<\/a>/g, i = s.match(t) || [], r = [];
|
@@ -1487,8 +1490,8 @@ class Dl {
|
|
1487
1490
|
return this.print$.asObservable();
|
1488
1491
|
}
|
1489
1492
|
playNotification() {
|
1490
|
-
const e = "https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";
|
1491
|
-
this.component.application.storage.get("muteAudioNotifications")
|
1493
|
+
const e = !document.hidden && this.component.application.storage.get("open"), t = "https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";
|
1494
|
+
!this.component.application.storage.get("muteAudioNotifications") && !e && new Audio(t).play().catch((i) => {
|
1492
1495
|
});
|
1493
1496
|
}
|
1494
1497
|
complete() {
|
@@ -3222,7 +3225,22 @@ class X extends k {
|
|
3222
3225
|
);
|
3223
3226
|
return;
|
3224
3227
|
}
|
3225
|
-
this.active = !this.active, this.active ? (this.application.appendToDOM(), this.
|
3228
|
+
this.active = !this.active, this.active ? (this.application.appendToDOM(), this.notify("widget-set-active", {
|
3229
|
+
widgetId: this.application.id,
|
3230
|
+
active: !0
|
3231
|
+
}), this.widgetActive$.next(!0), this.hideTrigger()) : (this.application.hide(), this.notify("widget-set-active", {
|
3232
|
+
widgetId: this.application.id,
|
3233
|
+
active: !1
|
3234
|
+
}), this.widgetActive$.next(!1), this.showTrigger());
|
3235
|
+
}
|
3236
|
+
notify(e, t = {}) {
|
3237
|
+
window != null && window.parent && window.parent.postMessage(
|
3238
|
+
{
|
3239
|
+
type: e,
|
3240
|
+
data: t
|
3241
|
+
},
|
3242
|
+
"*"
|
3243
|
+
);
|
3226
3244
|
}
|
3227
3245
|
_applyBranding() {
|
3228
3246
|
var e;
|
@@ -3713,7 +3731,7 @@ class cn extends k {
|
|
3713
3731
|
render() {
|
3714
3732
|
var n, i;
|
3715
3733
|
const e = this.application.settings.components.conversation;
|
3716
|
-
return ((i = (n = e == null ? void 0 : e.properties) == null ? void 0 : n.chat) == null ? void 0 : i.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ln.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), m`<div class="widget-container" ${z(this.wrapperRef)}>
|
3734
|
+
return ((i = (n = e == null ? void 0 : e.properties) == null ? void 0 : n.chat) == null ? void 0 : i.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === ln.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), m`<div class="widget-container" ${z(this.wrapperRef)}>
|
3717
3735
|
${$a(this.nodes, (r) => r)}
|
3718
3736
|
</div>`;
|
3719
3737
|
}
|
@@ -3858,7 +3876,7 @@ Aa([
|
|
3858
3876
|
w({ attribute: !1 }),
|
3859
3877
|
_a({ context: Ea })
|
3860
3878
|
], cn.prototype, "application", 2);
|
3861
|
-
var
|
3879
|
+
var Ta = Object.defineProperty, La = Object.getOwnPropertyDescriptor, hn = (s, e, t, n) => {
|
3862
3880
|
for (var i = n > 1 ? void 0 : n ? La(e, t) : e, r = s.length - 1, o; r >= 0; r--)
|
3863
3881
|
(o = s[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
3864
3882
|
return n && i && Ta(e, t, i), i;
|
@@ -4067,7 +4085,7 @@ class Pa {
|
|
4067
4085
|
const t = {
|
4068
4086
|
sessions: e.sessions.map((n) => n.toStore())
|
4069
4087
|
};
|
4070
|
-
this.storage.set("conversation", t
|
4088
|
+
this.storage.set("conversation", t);
|
4071
4089
|
}
|
4072
4090
|
_createNewSession(e, t = {}) {
|
4073
4091
|
const n = this._getStoredSessions(), i = new as(
|
@@ -4126,7 +4144,7 @@ class Ra {
|
|
4126
4144
|
return [...r, ...o];
|
4127
4145
|
})
|
4128
4146
|
);
|
4129
|
-
return
|
4147
|
+
return wr(t, n);
|
4130
4148
|
})
|
4131
4149
|
).subscribe((e) => {
|
4132
4150
|
this.entries$.next(e);
|
@@ -4260,7 +4278,7 @@ un.styles = [
|
|
4260
4278
|
E`
|
4261
4279
|
:host {
|
4262
4280
|
box-sizing: border-box;
|
4263
|
-
display:
|
4281
|
+
display: inline;
|
4264
4282
|
}
|
4265
4283
|
* {
|
4266
4284
|
box-sizing: border-box;
|
@@ -4290,8 +4308,13 @@ un.styles = [
|
|
4290
4308
|
align-items: center;
|
4291
4309
|
}
|
4292
4310
|
|
4311
|
+
.conversation-system-message .message-container {
|
4312
|
+
width: 100%;
|
4313
|
+
}
|
4293
4314
|
.conversation-system-message .message-content {
|
4294
4315
|
padding: 0;
|
4316
|
+
width: 100%;
|
4317
|
+
text-align: center;
|
4295
4318
|
}
|
4296
4319
|
|
4297
4320
|
.conversation-system-message span {
|
@@ -4377,7 +4400,7 @@ un.styles = [
|
|
4377
4400
|
za([
|
4378
4401
|
w({ attribute: !1 })
|
4379
4402
|
], un.prototype, "entry", 2);
|
4380
|
-
var Ua = Object.defineProperty, ja = Object.getOwnPropertyDescriptor,
|
4403
|
+
var Ua = Object.defineProperty, ja = Object.getOwnPropertyDescriptor, ui = (s, e, t, n) => {
|
4381
4404
|
for (var i = n > 1 ? void 0 : n ? ja(e, t) : e, r = s.length - 1, o; r >= 0; r--)
|
4382
4405
|
(o = s[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
4383
4406
|
return n && i && Ua(e, t, i), i;
|
@@ -4437,10 +4460,10 @@ mt.styles = [
|
|
4437
4460
|
}
|
4438
4461
|
`
|
4439
4462
|
];
|
4440
|
-
|
4463
|
+
ui([
|
4441
4464
|
w({ attribute: !1 })
|
4442
4465
|
], mt.prototype, "entries", 2);
|
4443
|
-
|
4466
|
+
ui([
|
4444
4467
|
w({ type: Boolean })
|
4445
4468
|
], mt.prototype, "loading", 2);
|
4446
4469
|
/**
|
@@ -4507,7 +4530,7 @@ pn.styles = [
|
|
4507
4530
|
Na([
|
4508
4531
|
w({ attribute: !1 })
|
4509
4532
|
], pn.prototype, "group", 2);
|
4510
|
-
class
|
4533
|
+
class pi extends k {
|
4511
4534
|
render() {
|
4512
4535
|
return m`<div class="container">
|
4513
4536
|
<div class="dot"></div>
|
@@ -4516,7 +4539,7 @@ class di extends k {
|
|
4516
4539
|
</div>`;
|
4517
4540
|
}
|
4518
4541
|
}
|
4519
|
-
|
4542
|
+
pi.styles = [
|
4520
4543
|
E`
|
4521
4544
|
:host {
|
4522
4545
|
display: block;
|
@@ -4646,10 +4669,10 @@ function fn() {
|
|
4646
4669
|
};
|
4647
4670
|
}
|
4648
4671
|
let ae = fn();
|
4649
|
-
function
|
4672
|
+
function di(s) {
|
4650
4673
|
ae = s;
|
4651
4674
|
}
|
4652
|
-
const
|
4675
|
+
const fi = /[&<>"']/, Ya = new RegExp(fi.source, "g"), gi = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Qa = new RegExp(gi.source, "g"), Ga = {
|
4653
4676
|
"&": "&",
|
4654
4677
|
"<": "<",
|
4655
4678
|
">": ">",
|
@@ -4658,9 +4681,9 @@ const gi = /[&<>"']/, Ya = new RegExp(gi.source, "g"), mi = /[<>"']|&(?!(#\d{1,7
|
|
4658
4681
|
}, ls = (s) => Ga[s];
|
4659
4682
|
function L(s, e) {
|
4660
4683
|
if (e) {
|
4661
|
-
if (
|
4684
|
+
if (fi.test(s))
|
4662
4685
|
return s.replace(Ya, ls);
|
4663
|
-
} else if (
|
4686
|
+
} else if (gi.test(s))
|
4664
4687
|
return s.replace(Qa, ls);
|
4665
4688
|
return s;
|
4666
4689
|
}
|
@@ -5211,7 +5234,7 @@ class st {
|
|
5211
5234
|
}
|
5212
5235
|
}
|
5213
5236
|
}
|
5214
|
-
const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
|
5237
|
+
const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, mi = /(?:[*+-]|\d{1,9}[.)])/, vi = y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, mi).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), gn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, rl = /^[^\n]+/, mn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, ol = y(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), al = y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, mi).getRegex(), vt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", vn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ll = y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", vn).replace("tag", vt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), bi = y(gn).replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), cl = y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", bi).getRegex(), bn = {
|
5215
5238
|
blockquote: cl,
|
5216
5239
|
code: nl,
|
5217
5240
|
def: ol,
|
@@ -5219,10 +5242,10 @@ const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl =
|
|
5219
5242
|
heading: il,
|
5220
5243
|
hr: je,
|
5221
5244
|
html: ll,
|
5222
|
-
lheading:
|
5245
|
+
lheading: vi,
|
5223
5246
|
list: al,
|
5224
5247
|
newline: tl,
|
5225
|
-
paragraph:
|
5248
|
+
paragraph: bi,
|
5226
5249
|
table: Se,
|
5227
5250
|
text: rl
|
5228
5251
|
}, ps = y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), hl = {
|
@@ -5238,24 +5261,24 @@ const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl =
|
|
5238
5261
|
// fences not supported
|
5239
5262
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
5240
5263
|
paragraph: y(gn).replace("hr", je).replace("heading", ` *#{1,6} *[^
|
5241
|
-
]`).replace("lheading",
|
5242
|
-
},
|
5264
|
+
]`).replace("lheading", vi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
5265
|
+
}, yi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, pl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, $i = /^( {2,}|\\)\n(?!\s*$)/, dl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, De = "\\p{P}\\p{S}", fl = y(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, De).getRegex(), gl = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, ml = y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, De).getRegex(), vl = y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, De).getRegex(), bl = y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, De).getRegex(), yl = y(/\\([punct])/, "gu").replace(/punct/g, De).getRegex(), $l = y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xl = y(vn).replace("(?:-->|$)", "-->").getRegex(), wl = y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xl).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), it = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, kl = y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", it).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xi = y(/^!?\[(label)\]\[(ref)\]/).replace("label", it).replace("ref", mn).getRegex(), wi = y(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), _l = y("reflink|nolink(?!\\()", "g").replace("reflink", xi).replace("nolink", wi).getRegex(), yn = {
|
5243
5266
|
_backpedal: Se,
|
5244
5267
|
// only used for GFM url
|
5245
5268
|
anyPunctuation: yl,
|
5246
5269
|
autolink: $l,
|
5247
5270
|
blockSkip: gl,
|
5248
|
-
br:
|
5271
|
+
br: $i,
|
5249
5272
|
code: pl,
|
5250
5273
|
del: Se,
|
5251
5274
|
emStrongLDelim: ml,
|
5252
5275
|
emStrongRDelimAst: vl,
|
5253
5276
|
emStrongRDelimUnd: bl,
|
5254
|
-
escape:
|
5277
|
+
escape: yi,
|
5255
5278
|
link: kl,
|
5256
|
-
nolink:
|
5279
|
+
nolink: wi,
|
5257
5280
|
punctuation: fl,
|
5258
|
-
reflink:
|
5281
|
+
reflink: xi,
|
5259
5282
|
reflinkSearch: _l,
|
5260
5283
|
tag: wl,
|
5261
5284
|
text: dl,
|
@@ -5266,14 +5289,14 @@ const tl = /^(?: *(?:\n|$))+/, nl = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, sl =
|
|
5266
5289
|
reflink: y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", it).getRegex()
|
5267
5290
|
}, qt = {
|
5268
5291
|
...yn,
|
5269
|
-
escape: y(
|
5292
|
+
escape: y(yi).replace("])", "~|])").getRegex(),
|
5270
5293
|
url: y(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
5271
5294
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
5272
5295
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
5273
5296
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
5274
5297
|
}, Cl = {
|
5275
5298
|
...qt,
|
5276
|
-
br: y(
|
5299
|
+
br: y($i).replace("{2,}", "*").getRegex(),
|
5277
5300
|
text: y(qt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
5278
5301
|
}, qe = {
|
5279
5302
|
normal: bn,
|
@@ -5862,7 +5885,7 @@ x(Ce, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
5862
5885
|
"postprocess",
|
5863
5886
|
"processAllTokens"
|
5864
5887
|
]));
|
5865
|
-
var Oe, Zt, ot,
|
5888
|
+
var Oe, Zt, ot, ki;
|
5866
5889
|
class Al {
|
5867
5890
|
constructor(...e) {
|
5868
5891
|
$t(this, Oe);
|
@@ -6006,7 +6029,7 @@ Oe = new WeakSet(), Zt = function(e, t) {
|
|
6006
6029
|
return (n, i) => {
|
6007
6030
|
const r = { ...i }, o = { ...this.defaults, ...r };
|
6008
6031
|
this.defaults.async === !0 && r.async === !1 && (o.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), o.async = !0);
|
6009
|
-
const a = He(this, ot,
|
6032
|
+
const a = He(this, ot, ki).call(this, !!o.silent, !!o.async);
|
6010
6033
|
if (typeof n > "u" || n === null)
|
6011
6034
|
return a(new Error("marked(): input parameter is undefined or null"));
|
6012
6035
|
if (typeof n != "string")
|
@@ -6023,7 +6046,7 @@ Oe = new WeakSet(), Zt = function(e, t) {
|
|
6023
6046
|
return a(l);
|
6024
6047
|
}
|
6025
6048
|
};
|
6026
|
-
}, ot = new WeakSet(),
|
6049
|
+
}, ot = new WeakSet(), ki = function(e, t) {
|
6027
6050
|
return (n) => {
|
6028
6051
|
if (n.message += `
|
6029
6052
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
@@ -6040,12 +6063,12 @@ function v(s, e) {
|
|
6040
6063
|
return oe.parse(s, e);
|
6041
6064
|
}
|
6042
6065
|
v.options = v.setOptions = function(s) {
|
6043
|
-
return oe.setOptions(s), v.defaults = oe.defaults,
|
6066
|
+
return oe.setOptions(s), v.defaults = oe.defaults, di(v.defaults), v;
|
6044
6067
|
};
|
6045
6068
|
v.getDefaults = fn;
|
6046
6069
|
v.defaults = ae;
|
6047
6070
|
v.use = function(...s) {
|
6048
|
-
return oe.use(...s), v.defaults = oe.defaults,
|
6071
|
+
return oe.use(...s), v.defaults = oe.defaults, di(v.defaults), v;
|
6049
6072
|
};
|
6050
6073
|
v.walkTokens = function(s, e) {
|
6051
6074
|
return oe.walkTokens(s, e);
|
@@ -6067,7 +6090,7 @@ v.walkTokens;
|
|
6067
6090
|
v.parseInline;
|
6068
6091
|
D.parse;
|
6069
6092
|
j.lex;
|
6070
|
-
var El = Object.defineProperty, Tl = Object.getOwnPropertyDescriptor,
|
6093
|
+
var El = Object.defineProperty, Tl = Object.getOwnPropertyDescriptor, _i = (s, e, t, n) => {
|
6071
6094
|
for (var i = n > 1 ? void 0 : n ? Tl(e, t) : e, r = s.length - 1, o; r >= 0; r--)
|
6072
6095
|
(o = s[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
6073
6096
|
return n && i && El(e, t, i), i;
|
@@ -6194,10 +6217,10 @@ bt.styles = [
|
|
6194
6217
|
}
|
6195
6218
|
`
|
6196
6219
|
];
|
6197
|
-
|
6220
|
+
_i([
|
6198
6221
|
w({ attribute: !1 })
|
6199
6222
|
], bt.prototype, "message", 2);
|
6200
|
-
|
6223
|
+
_i([
|
6201
6224
|
C()
|
6202
6225
|
], bt.prototype, "showLightbox", 2);
|
6203
6226
|
var Ll = Object.defineProperty, Ol = Object.getOwnPropertyDescriptor, Pl = (s, e, t, n) => {
|
@@ -6300,14 +6323,14 @@ var Rl = Object.defineProperty, Il = Object.getOwnPropertyDescriptor, V = (s, e,
|
|
6300
6323
|
customElements.get("conversation-entry") || customElements.define("conversation-entry", un);
|
6301
6324
|
customElements.get("ace-conversation-feed") || customElements.define("ace-conversation-feed", mt);
|
6302
6325
|
customElements.get("conversation-group") || customElements.define("conversation-group", pn);
|
6303
|
-
customElements.get("ace-typing-state") || customElements.define("ace-typing-state",
|
6326
|
+
customElements.get("ace-typing-state") || customElements.define("ace-typing-state", pi);
|
6304
6327
|
customElements.get("message-type-html") || customElements.define("message-type-html", dn);
|
6305
6328
|
customElements.get("message-type-markdown") || customElements.define("message-type-markdown", bt);
|
6306
6329
|
customElements.get("ace-lightbox") || customElements.define("ace-lightbox", xn);
|
6307
|
-
const
|
6308
|
-
class R extends
|
6330
|
+
const Si = ci(k);
|
6331
|
+
class R extends Si {
|
6309
6332
|
constructor() {
|
6310
|
-
super(...arguments), this.message = "", this.disabledInput = !1, this.disabledSubmit = !1, this.chatOverlayActive = !1, this.textAreaLength = 0, this.conversationContentRef = M(), this.conversationFeedRef = M(), this.formRef = M(), this.inputRef = M(), this.scrollRef = M(), this.counterRef = M(), this.chatScrollHeight = 0, this.chatCurrentScrollPosition = 0, this.toast = new Oa(this), this.messageMaxLength = 1e3, this.messageMaxLengthLabel = "Maximum character limit reached", this.skipToLatestMessageLabel = "Skip to latest message", this.platform = null, this.entries = [], this.typing = !1, this.conversationState$ = new U("waiting"), this.stateMachine = new Ra(this.conversationState$, this), this.provider$ = this.stateMachine.session().pipe(
|
6333
|
+
super(...arguments), this.message = "", this.disabledInput = !1, this.disabledSubmit = !1, this.chatOverlayActive = !1, this.textAreaLength = 0, this.isMuted = !1, this.conversationContentRef = M(), this.conversationFeedRef = M(), this.formRef = M(), this.inputRef = M(), this.scrollRef = M(), this.counterRef = M(), this.chatScrollHeight = 0, this.chatCurrentScrollPosition = 0, this.toast = new Oa(this), this.messageMaxLength = 1e3, this.messageMaxLengthLabel = "Maximum character limit reached", this.skipToLatestMessageLabel = "Skip to latest message", this.platform = null, this.entries = [], this.typing = !1, this.conversationState$ = new U("waiting"), this.stateMachine = new Ra(this.conversationState$, this), this.provider$ = this.stateMachine.session().pipe(
|
6311
6334
|
de((e) => e ? e == null ? void 0 : e.provider$ : It(null))
|
6312
6335
|
), this.userTyping$ = new _();
|
6313
6336
|
}
|
@@ -6321,7 +6344,7 @@ class R extends Ci {
|
|
6321
6344
|
t && t.widgetActive$.pipe(zt(t.componentIsDestroyed$)).subscribe((n) => {
|
6322
6345
|
const i = this.conversationContentRef.value;
|
6323
6346
|
i && (n ? i.scrollTop = this.chatCurrentScrollPosition : this.chatCurrentScrollPosition = i.scrollTop);
|
6324
|
-
}), this.stateSubscription =
|
6347
|
+
}), this.stateSubscription = pr([
|
6325
6348
|
this.stateMachine.entries(),
|
6326
6349
|
this.stateMachine.isTyping()
|
6327
6350
|
]).subscribe(([n, i]) => {
|
@@ -6373,7 +6396,7 @@ class R extends Ci {
|
|
6373
6396
|
this.scrollToBottom();
|
6374
6397
|
}
|
6375
6398
|
disableInput() {
|
6376
|
-
this.disabledInput = !0;
|
6399
|
+
this.disabledInput = !0, this.message = "";
|
6377
6400
|
}
|
6378
6401
|
enableInput() {
|
6379
6402
|
this.disabledInput = !1;
|
@@ -6384,7 +6407,7 @@ class R extends Ci {
|
|
6384
6407
|
enableSubmit() {
|
6385
6408
|
this.disabledSubmit = !1;
|
6386
6409
|
}
|
6387
|
-
//Clear messages when starting a new chat to avoid confusion
|
6410
|
+
// Clear messages when starting a new chat to avoid confusion
|
6388
6411
|
clearMessages() {
|
6389
6412
|
var i, r;
|
6390
6413
|
const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector("ace-conversation-feed"), t = (r = e == null ? void 0 : e.shadowRoot) == null ? void 0 : r.querySelector(".conversation-feed"), n = t == null ? void 0 : t.querySelectorAll(".conversation-entry");
|
@@ -6414,13 +6437,13 @@ class R extends Ci {
|
|
6414
6437
|
const e = this.application.getComponent("widget-header");
|
6415
6438
|
if (!e)
|
6416
6439
|
return;
|
6417
|
-
const t = this.application.texts, n = t.getOrFallback("conversation.mute", "Mute"), i = t.getOrFallback("conversation.unmute", "Unmute"), r =
|
6418
|
-
label:
|
6419
|
-
icon:
|
6440
|
+
const t = this.application.texts, n = t.getOrFallback("conversation.mute", "Mute"), i = t.getOrFallback("conversation.unmute", "Unmute"), r = e.addOption({
|
6441
|
+
label: this.isMuted ? i : n,
|
6442
|
+
icon: this.isMuted ? Dn.svg : Hn.svg,
|
6420
6443
|
closeOnClick: !1,
|
6421
6444
|
datatestid: "options-mute-button",
|
6422
6445
|
onClick: () => {
|
6423
|
-
|
6446
|
+
this.isMuted ? (this.isMuted = !1, this.application.unmute(), r.updateLabel(n), r.updateIcon(Hn.svg)) : (this.isMuted = !0, this.application.mute(), r.updateLabel(i), r.updateIcon(Dn.svg));
|
6424
6447
|
}
|
6425
6448
|
});
|
6426
6449
|
}
|
@@ -6452,6 +6475,9 @@ class R extends Ci {
|
|
6452
6475
|
});
|
6453
6476
|
return this.dispatchEvent(n), n.detail.complete || Re;
|
6454
6477
|
}
|
6478
|
+
firstUpdated() {
|
6479
|
+
this.isMuted = this.application.storage.get("muteAudioNotifications") ?? !1;
|
6480
|
+
}
|
6455
6481
|
render() {
|
6456
6482
|
var i, r, o;
|
6457
6483
|
const e = this.application.texts;
|
@@ -6548,7 +6574,7 @@ class R extends Ci {
|
|
6548
6574
|
}
|
6549
6575
|
}
|
6550
6576
|
R.styles = [
|
6551
|
-
|
6577
|
+
Si.styles || [],
|
6552
6578
|
E`
|
6553
6579
|
:host {
|
6554
6580
|
font-family: var(--font-family);
|