@telia-ace/ace-chat-flamingo 1.1.123-rc.40 → 1.1.123-rc.42
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/index.js +44 -40
- package/index.mjs +181 -167
- package/package.json +3 -3
- package/ui/tunnistus-auth-card.d.ts +2 -0
package/index.mjs
CHANGED
|
@@ -152,8 +152,8 @@ function bl(n, e, t) {
|
|
|
152
152
|
}
|
|
153
153
|
function a(g, m) {
|
|
154
154
|
i[g] && (s[g] = function($) {
|
|
155
|
-
return new Promise(function(
|
|
156
|
-
r.push([g, $,
|
|
155
|
+
return new Promise(function(xe, le) {
|
|
156
|
+
r.push([g, $, xe, le]) > 1 || c(g, $);
|
|
157
157
|
});
|
|
158
158
|
}, m && (s[g] = m(s[g])));
|
|
159
159
|
}
|
|
@@ -662,7 +662,7 @@ var Tl = (function(n) {
|
|
|
662
662
|
var i, s;
|
|
663
663
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(t)) !== null && s !== void 0 ? s : Ro;
|
|
664
664
|
}, e;
|
|
665
|
-
})(P),
|
|
665
|
+
})(P), de = (function(n) {
|
|
666
666
|
Me(e, n);
|
|
667
667
|
function e(t) {
|
|
668
668
|
var i = n.call(this) || this;
|
|
@@ -1165,13 +1165,13 @@ function ac(n, e, t, i, s, r, o, a) {
|
|
|
1165
1165
|
return l < i ? m($) : c.push($);
|
|
1166
1166
|
}, m = function($) {
|
|
1167
1167
|
l++;
|
|
1168
|
-
var
|
|
1168
|
+
var xe = !1;
|
|
1169
1169
|
oe(t($, u++)).subscribe(Q(e, function(le) {
|
|
1170
1170
|
e.next(le);
|
|
1171
1171
|
}, function() {
|
|
1172
|
-
|
|
1172
|
+
xe = !0;
|
|
1173
1173
|
}, void 0, function() {
|
|
1174
|
-
if (
|
|
1174
|
+
if (xe)
|
|
1175
1175
|
try {
|
|
1176
1176
|
l--;
|
|
1177
1177
|
for (var le = function() {
|
|
@@ -1274,7 +1274,7 @@ function vt(n) {
|
|
|
1274
1274
|
function bi(n, e) {
|
|
1275
1275
|
return C(e) ? Wt(n, e, 1) : Wt(n, 1);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function be(n) {
|
|
1278
1278
|
return n <= 0 ? function() {
|
|
1279
1279
|
return Re;
|
|
1280
1280
|
} : re(function(e, t) {
|
|
@@ -1544,10 +1544,10 @@ class xc {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
class kc {
|
|
1546
1546
|
constructor(e, t) {
|
|
1547
|
-
this.name = e, this.component = t, this.print$ = new P(), this.typingState$ = new
|
|
1547
|
+
this.name = e, this.component = t, this.print$ = new P(), this.typingState$ = new de(!1), this.complete$ = new P(), this.system = this.createSystem(), this.rehydrate$ = new P(), this.saveToCurrentSession$ = new P(), this.showChatOverlay$ = new de(!1), this.onComplete = () => this.complete$.asObservable();
|
|
1548
1548
|
}
|
|
1549
1549
|
connect(e = {}) {
|
|
1550
|
-
this.complete$.pipe(
|
|
1550
|
+
this.complete$.pipe(be(1)).subscribe(() => {
|
|
1551
1551
|
this.disconnected();
|
|
1552
1552
|
});
|
|
1553
1553
|
}
|
|
@@ -2257,7 +2257,7 @@ const Bc = { svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" f
|
|
|
2257
2257
|
attachStyles: !0
|
|
2258
2258
|
};
|
|
2259
2259
|
let ft, aa, Qn, la = !1, In = !1, hs = !1, te = !1, qr = null, Fi = !1;
|
|
2260
|
-
const Xn = typeof window < "u" ? window : {},
|
|
2260
|
+
const Xn = typeof window < "u" ? window : {}, we = Xn.document || { head: {} }, ca = Xn.HTMLElement || class {
|
|
2261
2261
|
}, X = {
|
|
2262
2262
|
$flags$: 0,
|
|
2263
2263
|
$resourcesUrl$: "",
|
|
@@ -2269,7 +2269,7 @@ const Xn = typeof window < "u" ? window : {}, $e = Xn.document || { head: {} },
|
|
|
2269
2269
|
}, Yc = /* @__PURE__ */ (() => {
|
|
2270
2270
|
let n = !1;
|
|
2271
2271
|
try {
|
|
2272
|
-
|
|
2272
|
+
we.addEventListener("e", null, Object.defineProperty({}, "passive", {
|
|
2273
2273
|
get() {
|
|
2274
2274
|
n = !0;
|
|
2275
2275
|
}
|
|
@@ -2294,7 +2294,7 @@ const Xn = typeof window < "u" ? window : {}, $e = Xn.document || { head: {} },
|
|
|
2294
2294
|
} catch (i) {
|
|
2295
2295
|
on(i);
|
|
2296
2296
|
}
|
|
2297
|
-
}, Jc = (n, e) => e & 4 ?
|
|
2297
|
+
}, Jc = (n, e) => e & 4 ? we : e & 8 ? Xn : e & 16 ? we.body : n, eu = (n) => Yc ? {
|
|
2298
2298
|
passive: (n & 1) !== 0,
|
|
2299
2299
|
capture: (n & 2) !== 0
|
|
2300
2300
|
} : (n & 2) !== 0, Vr = "http://www.w3.org/1999/xlink", tt = (n, e = "") => () => {
|
|
@@ -2303,11 +2303,11 @@ const Xn = typeof window < "u" ? window : {}, $e = Xn.document || { head: {} },
|
|
|
2303
2303
|
Xc && t ? (i = i || new CSSStyleSheet(), i.replace(e)) : i = e, Nn.set(n, i);
|
|
2304
2304
|
}, nu = (n, e, t, i) => {
|
|
2305
2305
|
let s = ha(e, t), r = Nn.get(s);
|
|
2306
|
-
if (n = n.nodeType === 11 ? n :
|
|
2306
|
+
if (n = n.nodeType === 11 ? n : we, r)
|
|
2307
2307
|
if (typeof r == "string") {
|
|
2308
2308
|
n = n.head || n;
|
|
2309
2309
|
let o = Wr.get(n), a;
|
|
2310
|
-
o || Wr.set(n, o = /* @__PURE__ */ new Set()), o.has(s) || (a =
|
|
2310
|
+
o || Wr.set(n, o = /* @__PURE__ */ new Set()), o.has(s) || (a = we.createElement("style"), a.innerHTML = r, n.insertBefore(a, n.querySelector("link")), o && o.add(s));
|
|
2311
2311
|
} else n.adoptedStyleSheets.includes(r) || (n.adoptedStyleSheets = [...n.adoptedStyleSheets, r]);
|
|
2312
2312
|
return s;
|
|
2313
2313
|
}, iu = (n) => {
|
|
@@ -2403,11 +2403,11 @@ const Xn = typeof window < "u" ? window : {}, $e = Xn.document || { head: {} },
|
|
|
2403
2403
|
// slot element does not have fallback content
|
|
2404
2404
|
1
|
|
2405
2405
|
))), s.$text$ !== null)
|
|
2406
|
-
o = s.$elm$ =
|
|
2406
|
+
o = s.$elm$ = we.createTextNode(s.$text$);
|
|
2407
2407
|
else if (s.$flags$ & 1)
|
|
2408
|
-
o = s.$elm$ =
|
|
2408
|
+
o = s.$elm$ = we.createTextNode("");
|
|
2409
2409
|
else {
|
|
2410
|
-
if (te || (te = s.$tag$ === "svg"), o = s.$elm$ =
|
|
2410
|
+
if (te || (te = s.$tag$ === "svg"), o = s.$elm$ = we.createElementNS(te ? ru : ou, s.$flags$ & 2 ? "slot-fb" : s.$tag$), te && s.$tag$ === "foreignObject" && (te = !1), da(null, s, te), au(ft) && o["s-si"] !== ft && o.classList.add(o["s-si"] = ft), s.$children$)
|
|
2411
2411
|
for (r = 0; r < s.$children$.length; ++r)
|
|
2412
2412
|
a = Mn(n, s, r, o), a && o.appendChild(a);
|
|
2413
2413
|
s.$tag$ === "svg" ? te = !1 : o.tagName === "foreignObject" && (te = !0);
|
|
@@ -2503,7 +2503,7 @@ const Xn = typeof window < "u" ? window : {}, $e = Xn.document || { head: {} },
|
|
|
2503
2503
|
va(r.$elm$);
|
|
2504
2504
|
let o, a, c, l, u, p, d = 0;
|
|
2505
2505
|
for (; d < ue.length; d++)
|
|
2506
|
-
o = ue[d], a = o.$nodeToRelocate$, a["s-ol"] || (c =
|
|
2506
|
+
o = ue[d], a = o.$nodeToRelocate$, a["s-ol"] || (c = we.createTextNode(""), c["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = c, a));
|
|
2507
2507
|
for (d = 0; d < ue.length; d++)
|
|
2508
2508
|
if (o = ue[d], a = o.$nodeToRelocate$, o.$slotRefNode$) {
|
|
2509
2509
|
for (l = o.$slotRefNode$.parentNode, u = o.$slotRefNode$.nextSibling, c = a["s-ol"]; c = c.previousSibling; )
|
|
@@ -2641,7 +2641,7 @@ const Xn = typeof window < "u" ? window : {}, $e = Xn.document || { head: {} },
|
|
|
2641
2641
|
}), Eu(n, e, t)), i();
|
|
2642
2642
|
}
|
|
2643
2643
|
}, Tu = (n) => {
|
|
2644
|
-
const e = n["s-cr"] =
|
|
2644
|
+
const e = n["s-cr"] = we.createComment("");
|
|
2645
2645
|
e["s-cn"] = !0, n.insertBefore(e, n.firstChild);
|
|
2646
2646
|
}, Ou = (n) => {
|
|
2647
2647
|
if ((X.$flags$ & 1) === 0) {
|
|
@@ -2936,10 +2936,10 @@ let Ca = class extends Jn {
|
|
|
2936
2936
|
* Copyright 2020 Google LLC
|
|
2937
2937
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2938
2938
|
*/
|
|
2939
|
-
const
|
|
2939
|
+
const ye = () => new Ju();
|
|
2940
2940
|
class Ju {
|
|
2941
2941
|
}
|
|
2942
|
-
const Si = /* @__PURE__ */ new WeakMap(),
|
|
2942
|
+
const Si = /* @__PURE__ */ new WeakMap(), $e = ln(class extends Ca {
|
|
2943
2943
|
render(n) {
|
|
2944
2944
|
return w;
|
|
2945
2945
|
}
|
|
@@ -3231,39 +3231,39 @@ class ah extends Ca {
|
|
|
3231
3231
|
this.shouldLog && !this.isDisabled() && console.log(e, this.options.id, t);
|
|
3232
3232
|
}
|
|
3233
3233
|
}
|
|
3234
|
-
const qi = ln(ah),
|
|
3234
|
+
const qi = ln(ah), Ee = (n, e, t) => {
|
|
3235
3235
|
n && t.style.setProperty(e, n);
|
|
3236
3236
|
}, Ea = (n, e) => {
|
|
3237
3237
|
var t, i, s, r, o, a, c, l, u;
|
|
3238
|
-
|
|
3238
|
+
Ee((t = n.colors) == null ? void 0 : t.primaryBackground, "--primary-background", e), Ee(
|
|
3239
3239
|
(i = n.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
|
3240
3240
|
"--text-on-primary-background",
|
|
3241
3241
|
e
|
|
3242
|
-
),
|
|
3242
|
+
), Ee(
|
|
3243
3243
|
(s = n.colors) == null ? void 0 : s.secondaryBackground,
|
|
3244
3244
|
"--secondary-background",
|
|
3245
3245
|
e
|
|
3246
|
-
),
|
|
3246
|
+
), Ee(
|
|
3247
3247
|
(r = n.colors) == null ? void 0 : r.textOnSecondaryBackground,
|
|
3248
3248
|
"--text-on-secondary-background",
|
|
3249
3249
|
e
|
|
3250
|
-
),
|
|
3250
|
+
), Ee(
|
|
3251
3251
|
(o = n.colors) == null ? void 0 : o.interactiveDestructiveBackground,
|
|
3252
3252
|
"--destructive-color",
|
|
3253
3253
|
e
|
|
3254
|
-
),
|
|
3254
|
+
), Ee(
|
|
3255
3255
|
(a = n.colors) == null ? void 0 : a.interactiveTextOnDestructiveBackground,
|
|
3256
3256
|
"--text-on-destructive-color",
|
|
3257
3257
|
e
|
|
3258
|
-
),
|
|
3258
|
+
), Ee(
|
|
3259
3259
|
(c = n.colors) == null ? void 0 : c.interactivePrimaryBackground,
|
|
3260
3260
|
"--interactive-primary-background",
|
|
3261
3261
|
e
|
|
3262
|
-
),
|
|
3262
|
+
), Ee(
|
|
3263
3263
|
(l = n.colors) == null ? void 0 : l.interactiveTextOnPrimaryBackground,
|
|
3264
3264
|
"--interactive-text-on-primary-background",
|
|
3265
3265
|
e
|
|
3266
|
-
),
|
|
3266
|
+
), Ee((u = n.colors) == null ? void 0 : u.focusColor, "--focus-color", e);
|
|
3267
3267
|
};
|
|
3268
3268
|
var lh = Object.defineProperty, cn = (n, e, t, i) => {
|
|
3269
3269
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
@@ -3272,7 +3272,7 @@ var lh = Object.defineProperty, cn = (n, e, t, i) => {
|
|
|
3272
3272
|
};
|
|
3273
3273
|
const Rs = class Rs extends A {
|
|
3274
3274
|
constructor() {
|
|
3275
|
-
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef =
|
|
3275
|
+
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = ye(), this.widgetActive$ = new de(!1), this.componentIsDestroyed$ = new P();
|
|
3276
3276
|
}
|
|
3277
3277
|
async connectedCallback() {
|
|
3278
3278
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
|
@@ -3351,7 +3351,7 @@ const Rs = class Rs extends A {
|
|
|
3351
3351
|
"trigger-container": !0,
|
|
3352
3352
|
"ace-hidden": !this.triggerVisible
|
|
3353
3353
|
})}
|
|
3354
|
-
${
|
|
3354
|
+
${$e(this.containerRef)}
|
|
3355
3355
|
>
|
|
3356
3356
|
${!this.active && ((s = (i = (t = (e = this.application) == null ? void 0 : e.settings) == null ? void 0 : t.branding) == null ? void 0 : i.other) != null && s.showButtonLabel) ? y`
|
|
3357
3357
|
<button
|
|
@@ -3792,7 +3792,7 @@ function ph({ context: n }) {
|
|
|
3792
3792
|
* Copyright 2022 Google LLC
|
|
3793
3793
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3794
3794
|
*/
|
|
3795
|
-
function
|
|
3795
|
+
function pe({ context: n, subscribe: e }) {
|
|
3796
3796
|
return (t, i) => {
|
|
3797
3797
|
typeof i == "object" ? i.addInitializer((function() {
|
|
3798
3798
|
new co(this, { context: n, callback: (s) => {
|
|
@@ -3812,7 +3812,7 @@ var fh = Object.defineProperty, Ta = (n, e, t, i) => {
|
|
|
3812
3812
|
};
|
|
3813
3813
|
const ae = "application", Is = class Is extends A {
|
|
3814
3814
|
constructor() {
|
|
3815
|
-
super(...arguments), this.nodes = [], this.wrapperRef =
|
|
3815
|
+
super(...arguments), this.nodes = [], this.wrapperRef = ye(), this.fullscreen = !1, this.isReady = new de(!1);
|
|
3816
3816
|
}
|
|
3817
3817
|
addChild(e) {
|
|
3818
3818
|
e.parent = this, this.nodes.push(e);
|
|
@@ -3837,7 +3837,7 @@ const ae = "application", Is = class Is extends A {
|
|
|
3837
3837
|
render() {
|
|
3838
3838
|
var i, s;
|
|
3839
3839
|
const e = this.application.settings.components.conversation;
|
|
3840
|
-
return ((s = (i = e == null ? void 0 : e.properties) == null ? void 0 : i.chat) == null ? void 0 : s.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === gs.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")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), y`<div class="widget-container" ${
|
|
3840
|
+
return ((s = (i = e == null ? void 0 : e.properties) == null ? void 0 : i.chat) == null ? void 0 : s.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === gs.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")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), y`<div class="widget-container" ${$e(this.wrapperRef)}>
|
|
3841
3841
|
${uh(this.nodes, (r) => r)}
|
|
3842
3842
|
</div>`;
|
|
3843
3843
|
}
|
|
@@ -4093,7 +4093,7 @@ class mh {
|
|
|
4093
4093
|
}
|
|
4094
4094
|
class ho {
|
|
4095
4095
|
constructor(e, t, i, s, r) {
|
|
4096
|
-
this.id = e, this.providerKey = t, this.providerOptions = i, this.component = r, this.provider$ = new
|
|
4096
|
+
this.id = e, this.providerKey = t, this.providerOptions = i, this.component = r, this.provider$ = new de(null), this.entries$ = new de([]), this.removeEntryAction$ = new P(), this.kill$ = new P(), this.isTyping$ = new de(!1), this.data$ = new de({}), this.complete$ = this.provider$.pipe(
|
|
4097
4097
|
Le((c) => c ? c.onComplete() : Re)
|
|
4098
4098
|
);
|
|
4099
4099
|
const o = this._getProviderFactory(t);
|
|
@@ -4131,14 +4131,14 @@ class ho {
|
|
|
4131
4131
|
};
|
|
4132
4132
|
}
|
|
4133
4133
|
write(e) {
|
|
4134
|
-
this._addEntryRemoveHandler(e), this.entries$.pipe(
|
|
4134
|
+
this._addEntryRemoveHandler(e), this.entries$.pipe(be(1)).subscribe((t) => {
|
|
4135
4135
|
this.entries$.next([...t, e]);
|
|
4136
4136
|
});
|
|
4137
4137
|
}
|
|
4138
4138
|
_addEntryRemoveHandler(e) {
|
|
4139
4139
|
e.remove$.pipe(
|
|
4140
4140
|
Le(() => this.entries$),
|
|
4141
|
-
|
|
4141
|
+
be(1)
|
|
4142
4142
|
).subscribe((t) => {
|
|
4143
4143
|
this.removeEntryAction$.next(e), this.entries$.next(t.filter((i) => i !== e));
|
|
4144
4144
|
});
|
|
@@ -4149,7 +4149,7 @@ class ho {
|
|
|
4149
4149
|
}
|
|
4150
4150
|
class vh {
|
|
4151
4151
|
constructor(e) {
|
|
4152
|
-
this.component = e, this.currentSession$ = new
|
|
4152
|
+
this.component = e, this.currentSession$ = new de(null), this.sessions = [], this.storage = null, On(e, "handover").subscribe((t) => {
|
|
4153
4153
|
const i = this._createNewSession(
|
|
4154
4154
|
t.detail.providerKey,
|
|
4155
4155
|
t.detail.providerOptions
|
|
@@ -4247,7 +4247,7 @@ class vh {
|
|
|
4247
4247
|
}
|
|
4248
4248
|
class bh {
|
|
4249
4249
|
constructor(e, t) {
|
|
4250
|
-
this.state$ = e, this.component = t, this.entries$ = new
|
|
4250
|
+
this.state$ = e, this.component = t, this.entries$ = new de([]), this.session = () => this.session$, this.isTyping = () => this.isTyping$, this.entries = () => this.entries$.asObservable(), this.sessionService = new vh(this.component), this.session$ = this.sessionService.currentSession(), this.isTyping$ = this.session$.pipe(
|
|
4251
4251
|
Le((i) => i ? i.provider$.pipe(
|
|
4252
4252
|
Le((s) => s ? s.isTyping() : Mi(!1))
|
|
4253
4253
|
) : Mi(!1))
|
|
@@ -4565,7 +4565,7 @@ Oa([
|
|
|
4565
4565
|
k({ attribute: !1 })
|
|
4566
4566
|
], Xt.prototype, "entry");
|
|
4567
4567
|
Oa([
|
|
4568
|
-
|
|
4568
|
+
pe({ context: ae }),
|
|
4569
4569
|
k({ attribute: !1 })
|
|
4570
4570
|
], Xt.prototype, "application");
|
|
4571
4571
|
var $h = Object.defineProperty, Ra = (n, e, t, i) => {
|
|
@@ -4829,10 +4829,10 @@ function Ih(n) {
|
|
|
4829
4829
|
ce(n, e) || (n[e] = null);
|
|
4830
4830
|
return n;
|
|
4831
4831
|
}
|
|
4832
|
-
function
|
|
4832
|
+
function _e(n) {
|
|
4833
4833
|
const e = Ia(null);
|
|
4834
4834
|
for (const [t, i] of La(n))
|
|
4835
|
-
ce(n, t) && (Array.isArray(i) ? e[t] = Ih(i) : i && typeof i == "object" && i.constructor === Object ? e[t] =
|
|
4835
|
+
ce(n, t) && (Array.isArray(i) ? e[t] = Ih(i) : i && typeof i == "object" && i.constructor === Object ? e[t] = _e(i) : e[t] = i);
|
|
4836
4836
|
return e;
|
|
4837
4837
|
}
|
|
4838
4838
|
function Ut(n, e) {
|
|
@@ -4930,7 +4930,7 @@ function Na() {
|
|
|
4930
4930
|
HTMLFormElement: p,
|
|
4931
4931
|
DOMParser: d,
|
|
4932
4932
|
trustedTypes: g
|
|
4933
|
-
} = n, m = c.prototype, $ = Ut(m, "cloneNode"),
|
|
4933
|
+
} = n, m = c.prototype, $ = Ut(m, "cloneNode"), xe = Ut(m, "remove"), le = Ut(m, "nextSibling"), Ne = Ut(m, "childNodes"), Be = Ut(m, "parentNode");
|
|
4934
4934
|
if (typeof o == "function") {
|
|
4935
4935
|
const b = t.createElement("template");
|
|
4936
4936
|
b.content && b.content.ownerDocument && (t = b.content.ownerDocument);
|
|
@@ -4988,9 +4988,9 @@ function Na() {
|
|
|
4988
4988
|
let lr = null;
|
|
4989
4989
|
const cr = x({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4990
4990
|
let ui = null;
|
|
4991
|
-
const ur = x({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), fn = "http://www.w3.org/1998/Math/MathML", gn = "http://www.w3.org/2000/svg",
|
|
4992
|
-
let ct =
|
|
4993
|
-
const ll = x({}, [fn, gn,
|
|
4991
|
+
const ur = x({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), fn = "http://www.w3.org/1998/Math/MathML", gn = "http://www.w3.org/2000/svg", ke = "http://www.w3.org/1999/xhtml";
|
|
4992
|
+
let ct = ke, hi = !1, di = null;
|
|
4993
|
+
const ll = x({}, [fn, gn, ke], _i);
|
|
4994
4994
|
let mn = x({}, ["mi", "mo", "mn", "ms", "mtext"]), vn = x({}, ["annotation-xml"]);
|
|
4995
4995
|
const cl = x({}, ["title", "style", "font", "a", "script"]);
|
|
4996
4996
|
let Rt = null;
|
|
@@ -5001,8 +5001,8 @@ function Na() {
|
|
|
5001
5001
|
}, pi = function() {
|
|
5002
5002
|
let h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5003
5003
|
if (!(ut && ut === h)) {
|
|
5004
|
-
if ((!h || typeof h != "object") && (h = {}), h =
|
|
5005
|
-
ul.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? hl : h.PARSER_MEDIA_TYPE, U = Rt === "application/xhtml+xml" ? _i : Cn, N = ce(h, "ALLOWED_TAGS") ? x({}, h.ALLOWED_TAGS, U) : er, D = ce(h, "ALLOWED_ATTR") ? x({}, h.ALLOWED_ATTR, U) : tr, di = ce(h, "ALLOWED_NAMESPACES") ? x({}, h.ALLOWED_NAMESPACES, _i) : ll, ui = ce(h, "ADD_URI_SAFE_ATTR") ? x(
|
|
5004
|
+
if ((!h || typeof h != "object") && (h = {}), h = _e(h), Rt = // eslint-disable-next-line unicorn/prefer-includes
|
|
5005
|
+
ul.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? hl : h.PARSER_MEDIA_TYPE, U = Rt === "application/xhtml+xml" ? _i : Cn, N = ce(h, "ALLOWED_TAGS") ? x({}, h.ALLOWED_TAGS, U) : er, D = ce(h, "ALLOWED_ATTR") ? x({}, h.ALLOWED_ATTR, U) : tr, di = ce(h, "ALLOWED_NAMESPACES") ? x({}, h.ALLOWED_NAMESPACES, _i) : ll, ui = ce(h, "ADD_URI_SAFE_ATTR") ? x(_e(ur), h.ADD_URI_SAFE_ATTR, U) : ur, lr = ce(h, "ADD_DATA_URI_TAGS") ? x(_e(cr), h.ADD_DATA_URI_TAGS, U) : cr, lt = ce(h, "FORBID_CONTENTS") ? x({}, h.FORBID_CONTENTS, U) : ar, Tt = ce(h, "FORBID_TAGS") ? x({}, h.FORBID_TAGS, U) : _e({}), ri = ce(h, "FORBID_ATTR") ? x({}, h.FORBID_ATTR, U) : _e({}), at = ce(h, "USE_PROFILES") ? h.USE_PROFILES : !1, nr = h.ALLOW_ARIA_ATTR !== !1, oi = h.ALLOW_DATA_ATTR !== !1, ir = h.ALLOW_UNKNOWN_PROTOCOLS || !1, sr = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, rt = h.SAFE_FOR_TEMPLATES || !1, hn = h.SAFE_FOR_XML !== !1, Ge = h.WHOLE_DOCUMENT || !1, ot = h.RETURN_DOM || !1, dn = h.RETURN_DOM_FRAGMENT || !1, pn = h.RETURN_TRUSTED_TYPE || !1, li = h.FORCE_BODY || !1, rr = h.SANITIZE_DOM !== !1, or = h.SANITIZE_NAMED_PROPS || !1, ci = h.KEEP_CONTENT !== !1, Ot = h.IN_PLACE || !1, Js = h.ALLOWED_URI_REGEXP || Pa, ct = h.NAMESPACE || ke, mn = h.MATHML_TEXT_INTEGRATION_POINTS || mn, vn = h.HTML_INTEGRATION_POINTS || vn, L = h.CUSTOM_ELEMENT_HANDLING || {}, h.CUSTOM_ELEMENT_HANDLING && hr(h.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (L.tagNameCheck = h.CUSTOM_ELEMENT_HANDLING.tagNameCheck), h.CUSTOM_ELEMENT_HANDLING && hr(h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (L.attributeNameCheck = h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), h.CUSTOM_ELEMENT_HANDLING && typeof h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (L.allowCustomizedBuiltInElements = h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), rt && (oi = !1), dn && (ot = !0), at && (N = x({}, vo), D = [], at.html === !0 && (x(N, mo), x(D, bo)), at.svg === !0 && (x(N, Ai), x(D, Ri), x(D, wn)), at.svgFilters === !0 && (x(N, Ti), x(D, Ri), x(D, wn)), at.mathMl === !0 && (x(N, Oi), x(D, yo), x(D, wn))), h.ADD_TAGS && (N === er && (N = _e(N)), x(N, h.ADD_TAGS, U)), h.ADD_ATTR && (D === tr && (D = _e(D)), x(D, h.ADD_ATTR, U)), h.ADD_URI_SAFE_ATTR && x(ui, h.ADD_URI_SAFE_ATTR, U), h.FORBID_CONTENTS && (lt === ar && (lt = _e(lt)), x(lt, h.FORBID_CONTENTS, U)), ci && (N["#text"] = !0), Ge && x(N, ["html", "head", "body"]), N.table && (x(N, ["tbody"]), delete Tt.tbody), h.TRUSTED_TYPES_POLICY) {
|
|
5006
5006
|
if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
5007
5007
|
throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
5008
5008
|
if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -5019,15 +5019,15 @@ function Na() {
|
|
|
5019
5019
|
tagName: "template"
|
|
5020
5020
|
});
|
|
5021
5021
|
const v = Cn(h.tagName), O = Cn(f.tagName);
|
|
5022
|
-
return di[h.namespaceURI] ? h.namespaceURI === gn ? f.namespaceURI ===
|
|
5023
|
-
},
|
|
5022
|
+
return di[h.namespaceURI] ? h.namespaceURI === gn ? f.namespaceURI === ke ? v === "svg" : f.namespaceURI === fn ? v === "svg" && (O === "annotation-xml" || mn[O]) : !!dr[v] : h.namespaceURI === fn ? f.namespaceURI === ke ? v === "math" : f.namespaceURI === gn ? v === "math" && vn[O] : !!pr[v] : h.namespaceURI === ke ? f.namespaceURI === gn && !vn[O] || f.namespaceURI === fn && !mn[O] ? !1 : !pr[v] && (cl[v] || !dr[v]) : !!(Rt === "application/xhtml+xml" && di[h.namespaceURI]) : !1;
|
|
5023
|
+
}, ge = function(h) {
|
|
5024
5024
|
Pt(e.removed, {
|
|
5025
5025
|
element: h
|
|
5026
5026
|
});
|
|
5027
5027
|
try {
|
|
5028
5028
|
Be(h).removeChild(h);
|
|
5029
5029
|
} catch {
|
|
5030
|
-
|
|
5030
|
+
xe(h);
|
|
5031
5031
|
}
|
|
5032
5032
|
}, ht = function(h, f) {
|
|
5033
5033
|
try {
|
|
@@ -5044,7 +5044,7 @@ function Na() {
|
|
|
5044
5044
|
if (f.removeAttribute(h), h === "is")
|
|
5045
5045
|
if (ot || dn)
|
|
5046
5046
|
try {
|
|
5047
|
-
|
|
5047
|
+
ge(f);
|
|
5048
5048
|
} catch {
|
|
5049
5049
|
}
|
|
5050
5050
|
else
|
|
@@ -5060,9 +5060,9 @@ function Na() {
|
|
|
5060
5060
|
const I = go(h, /^[\r\n\t ]+/);
|
|
5061
5061
|
v = I && I[0];
|
|
5062
5062
|
}
|
|
5063
|
-
Rt === "application/xhtml+xml" && ct ===
|
|
5063
|
+
Rt === "application/xhtml+xml" && ct === ke && (h = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + h + "</body></html>");
|
|
5064
5064
|
const O = M ? M.createHTML(h) : h;
|
|
5065
|
-
if (ct ===
|
|
5065
|
+
if (ct === ke)
|
|
5066
5066
|
try {
|
|
5067
5067
|
f = new d().parseFromString(O, Rt);
|
|
5068
5068
|
} catch {
|
|
@@ -5075,7 +5075,7 @@ function Na() {
|
|
|
5075
5075
|
}
|
|
5076
5076
|
}
|
|
5077
5077
|
const j = f.body || f.documentElement;
|
|
5078
|
-
return h && v && j.insertBefore(t.createTextNode(v), j.childNodes[0] || null), ct ===
|
|
5078
|
+
return h && v && j.insertBefore(t.createTextNode(v), j.childNodes[0] || null), ct === ke ? tl.call(f, Ge ? "html" : "body")[0] : Ge ? f.documentElement : j;
|
|
5079
5079
|
}, gr = function(h) {
|
|
5080
5080
|
return We.call(
|
|
5081
5081
|
h.ownerDocument || h,
|
|
@@ -5089,21 +5089,21 @@ function Na() {
|
|
|
5089
5089
|
}, mr = function(h) {
|
|
5090
5090
|
return typeof a == "function" && h instanceof a;
|
|
5091
5091
|
};
|
|
5092
|
-
function
|
|
5092
|
+
function Se(b, h, f) {
|
|
5093
5093
|
$n(b, (v) => {
|
|
5094
5094
|
v.call(e, h, f, ut);
|
|
5095
5095
|
});
|
|
5096
5096
|
}
|
|
5097
5097
|
const vr = function(h) {
|
|
5098
5098
|
let f = null;
|
|
5099
|
-
if (
|
|
5100
|
-
return
|
|
5099
|
+
if (Se(W.beforeSanitizeElements, h, null), fi(h))
|
|
5100
|
+
return ge(h), !0;
|
|
5101
5101
|
const v = U(h.nodeName);
|
|
5102
|
-
if (
|
|
5102
|
+
if (Se(W.uponSanitizeElement, h, {
|
|
5103
5103
|
tagName: v,
|
|
5104
5104
|
allowedTags: N
|
|
5105
5105
|
}), hn && h.hasChildNodes() && !mr(h.firstElementChild) && Z(/<[/\w!]/g, h.innerHTML) && Z(/<[/\w!]/g, h.textContent) || h.nodeType === Dt.progressingInstruction || hn && h.nodeType === Dt.comment && Z(/<[/\w]/g, h.data))
|
|
5106
|
-
return
|
|
5106
|
+
return ge(h), !0;
|
|
5107
5107
|
if (!N[v] || Tt[v]) {
|
|
5108
5108
|
if (!Tt[v] && yr(v) && (L.tagNameCheck instanceof RegExp && Z(L.tagNameCheck, v) || L.tagNameCheck instanceof Function && L.tagNameCheck(v)))
|
|
5109
5109
|
return !1;
|
|
@@ -5112,18 +5112,18 @@ function Na() {
|
|
|
5112
5112
|
if (j && O) {
|
|
5113
5113
|
const I = j.length;
|
|
5114
5114
|
for (let ee = I - 1; ee >= 0; --ee) {
|
|
5115
|
-
const
|
|
5116
|
-
|
|
5115
|
+
const Ce = $(j[ee], !0);
|
|
5116
|
+
Ce.__removalCount = (h.__removalCount || 0) + 1, O.insertBefore(Ce, le(h));
|
|
5117
5117
|
}
|
|
5118
5118
|
}
|
|
5119
5119
|
}
|
|
5120
|
-
return
|
|
5120
|
+
return ge(h), !0;
|
|
5121
5121
|
}
|
|
5122
|
-
return h instanceof c && !pl(h) || (v === "noscript" || v === "noembed" || v === "noframes") && Z(/<\/no(script|embed|frames)/i, h.innerHTML) ? (
|
|
5122
|
+
return h instanceof c && !pl(h) || (v === "noscript" || v === "noembed" || v === "noframes") && Z(/<\/no(script|embed|frames)/i, h.innerHTML) ? (ge(h), !0) : (rt && h.nodeType === Dt.text && (f = h.textContent, $n([ni, ii, si], (O) => {
|
|
5123
5123
|
f = Mt(f, O, " ");
|
|
5124
5124
|
}), h.textContent !== f && (Pt(e.removed, {
|
|
5125
5125
|
element: h.cloneNode()
|
|
5126
|
-
}), h.textContent = f)),
|
|
5126
|
+
}), h.textContent = f)), Se(W.afterSanitizeElements, h, null), !1);
|
|
5127
5127
|
}, br = function(h, f, v) {
|
|
5128
5128
|
if (rr && (f === "id" || f === "name") && (v in t || v in dl))
|
|
5129
5129
|
return !1;
|
|
@@ -5154,7 +5154,7 @@ function Na() {
|
|
|
5154
5154
|
}, yr = function(h) {
|
|
5155
5155
|
return h !== "annotation-xml" && go(h, ol);
|
|
5156
5156
|
}, $r = function(h) {
|
|
5157
|
-
|
|
5157
|
+
Se(W.beforeSanitizeAttributes, h, null);
|
|
5158
5158
|
const {
|
|
5159
5159
|
attributes: f
|
|
5160
5160
|
} = h;
|
|
@@ -5172,10 +5172,10 @@ function Na() {
|
|
|
5172
5172
|
const j = f[O], {
|
|
5173
5173
|
name: I,
|
|
5174
5174
|
namespaceURI: ee,
|
|
5175
|
-
value:
|
|
5176
|
-
} = j, Lt = U(I), gi =
|
|
5175
|
+
value: Ce
|
|
5176
|
+
} = j, Lt = U(I), gi = Ce;
|
|
5177
5177
|
let B = I === "value" ? gi : Rh(gi);
|
|
5178
|
-
if (v.attrName = Lt, v.attrValue = B, v.keepAttr = !0, v.forceKeepAttr = void 0,
|
|
5178
|
+
if (v.attrName = Lt, v.attrValue = B, v.keepAttr = !0, v.forceKeepAttr = void 0, Se(W.uponSanitizeAttribute, h, v), B = v.attrValue, or && (Lt === "id" || Lt === "name") && (ht(I, h), B = al + B), hn && Z(/((--!?|])>)|<\/(style|title)/i, B)) {
|
|
5179
5179
|
ht(I, h);
|
|
5180
5180
|
continue;
|
|
5181
5181
|
}
|
|
@@ -5210,18 +5210,18 @@ function Na() {
|
|
|
5210
5210
|
}
|
|
5211
5211
|
if (B !== gi)
|
|
5212
5212
|
try {
|
|
5213
|
-
ee ? h.setAttributeNS(ee, I, B) : h.setAttribute(I, B), fi(h) ?
|
|
5213
|
+
ee ? h.setAttributeNS(ee, I, B) : h.setAttribute(I, B), fi(h) ? ge(h) : fo(e.removed);
|
|
5214
5214
|
} catch {
|
|
5215
5215
|
ht(I, h);
|
|
5216
5216
|
}
|
|
5217
5217
|
}
|
|
5218
|
-
|
|
5218
|
+
Se(W.afterSanitizeAttributes, h, null);
|
|
5219
5219
|
}, fl = function b(h) {
|
|
5220
5220
|
let f = null;
|
|
5221
5221
|
const v = gr(h);
|
|
5222
|
-
for (
|
|
5223
|
-
|
|
5224
|
-
|
|
5222
|
+
for (Se(W.beforeSanitizeShadowDOM, h, null); f = v.nextNode(); )
|
|
5223
|
+
Se(W.uponSanitizeShadowNode, f, null), vr(f), $r(f), f.content instanceof r && b(f.content);
|
|
5224
|
+
Se(W.afterSanitizeShadowDOM, h, null);
|
|
5225
5225
|
};
|
|
5226
5226
|
return e.sanitize = function(b) {
|
|
5227
5227
|
let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, f = null, v = null, O = null, j = null;
|
|
@@ -5235,8 +5235,8 @@ function Na() {
|
|
|
5235
5235
|
return b;
|
|
5236
5236
|
if (ai || pi(h), e.removed = [], typeof b == "string" && (Ot = !1), Ot) {
|
|
5237
5237
|
if (b.nodeName) {
|
|
5238
|
-
const
|
|
5239
|
-
if (!N[
|
|
5238
|
+
const Ce = U(b.nodeName);
|
|
5239
|
+
if (!N[Ce] || Tt[Ce])
|
|
5240
5240
|
throw Nt("root node is forbidden and cannot be sanitized in-place");
|
|
5241
5241
|
}
|
|
5242
5242
|
} else if (b instanceof a)
|
|
@@ -5248,7 +5248,7 @@ function Na() {
|
|
|
5248
5248
|
if (f = fr(b), !f)
|
|
5249
5249
|
return ot ? null : pn ? qe : "";
|
|
5250
5250
|
}
|
|
5251
|
-
f && li &&
|
|
5251
|
+
f && li && ge(f.firstChild);
|
|
5252
5252
|
const I = gr(Ot ? b : f);
|
|
5253
5253
|
for (; O = I.nextNode(); )
|
|
5254
5254
|
vr(O), $r(O), O.content instanceof r && fl(O.content);
|
|
@@ -5264,8 +5264,8 @@ function Na() {
|
|
|
5264
5264
|
}
|
|
5265
5265
|
let ee = Ge ? f.outerHTML : f.innerHTML;
|
|
5266
5266
|
return Ge && N["!doctype"] && f.ownerDocument && f.ownerDocument.doctype && f.ownerDocument.doctype.name && Z(Ma, f.ownerDocument.doctype.name) && (ee = "<!DOCTYPE " + f.ownerDocument.doctype.name + `>
|
|
5267
|
-
` + ee), rt && $n([ni, ii, si], (
|
|
5268
|
-
ee = Mt(ee,
|
|
5267
|
+
` + ee), rt && $n([ni, ii, si], (Ce) => {
|
|
5268
|
+
ee = Mt(ee, Ce, " ");
|
|
5269
5269
|
}), M && pn ? M.createHTML(ee) : ee;
|
|
5270
5270
|
}, e.setConfig = function() {
|
|
5271
5271
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -5524,7 +5524,7 @@ var Y = {
|
|
|
5524
5524
|
'"': """,
|
|
5525
5525
|
"'": "'"
|
|
5526
5526
|
}, ko = (n) => Ed[n];
|
|
5527
|
-
function
|
|
5527
|
+
function ve(n, e) {
|
|
5528
5528
|
if (e) {
|
|
5529
5529
|
if (Y.escapeTest.test(n))
|
|
5530
5530
|
return n.replace(Y.escapeReplace, ko);
|
|
@@ -5775,12 +5775,12 @@ ${u}` : u;
|
|
|
5775
5775
|
}
|
|
5776
5776
|
}
|
|
5777
5777
|
s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(l) && (o = !0));
|
|
5778
|
-
let $ = null,
|
|
5779
|
-
this.options.gfm && ($ = this.rules.other.listIsTask.exec(u), $ && (
|
|
5778
|
+
let $ = null, xe;
|
|
5779
|
+
this.options.gfm && ($ = this.rules.other.listIsTask.exec(u), $ && (xe = $[0] !== "[ ] ", u = u.replace(this.rules.other.listReplaceTask, ""))), s.items.push({
|
|
5780
5780
|
type: "list_item",
|
|
5781
5781
|
raw: l,
|
|
5782
5782
|
task: !!$,
|
|
5783
|
-
checked:
|
|
5783
|
+
checked: xe,
|
|
5784
5784
|
loose: !1,
|
|
5785
5785
|
text: u,
|
|
5786
5786
|
tokens: []
|
|
@@ -6347,8 +6347,8 @@ ${u}` : u;
|
|
|
6347
6347
|
var r;
|
|
6348
6348
|
const i = (r = (e || "").match(Y.notSpaceStart)) == null ? void 0 : r[0], s = n.replace(Y.endingNewline, "") + `
|
|
6349
6349
|
`;
|
|
6350
|
-
return i ? '<pre><code class="language-' +
|
|
6351
|
-
` : "<pre><code>" + (t ? s :
|
|
6350
|
+
return i ? '<pre><code class="language-' + ve(i) + '">' + (t ? s : ve(s, !0)) + `</code></pre>
|
|
6351
|
+
` : "<pre><code>" + (t ? s : ve(s, !0)) + `</code></pre>
|
|
6352
6352
|
`;
|
|
6353
6353
|
}
|
|
6354
6354
|
blockquote({ tokens: n }) {
|
|
@@ -6384,7 +6384,7 @@ ${this.parser.parse(n)}</blockquote>
|
|
|
6384
6384
|
let e = "";
|
|
6385
6385
|
if (n.task) {
|
|
6386
6386
|
const i = this.checkbox({ checked: !!n.checked });
|
|
6387
|
-
n.loose ? ((t = n.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (n.tokens[0].text = i + " " + n.tokens[0].text, n.tokens[0].tokens && n.tokens[0].tokens.length > 0 && n.tokens[0].tokens[0].type === "text" && (n.tokens[0].tokens[0].text = i + " " +
|
|
6387
|
+
n.loose ? ((t = n.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (n.tokens[0].text = i + " " + n.tokens[0].text, n.tokens[0].tokens && n.tokens[0].tokens.length > 0 && n.tokens[0].tokens[0].type === "text" && (n.tokens[0].tokens[0].text = i + " " + ve(n.tokens[0].tokens[0].text), n.tokens[0].tokens[0].escaped = !0)) : n.tokens.unshift({
|
|
6388
6388
|
type: "text",
|
|
6389
6389
|
raw: i + " ",
|
|
6390
6390
|
text: i + " ",
|
|
@@ -6440,7 +6440,7 @@ ${n}</tr>
|
|
|
6440
6440
|
return `<em>${this.parser.parseInline(n)}</em>`;
|
|
6441
6441
|
}
|
|
6442
6442
|
codespan({ text: n }) {
|
|
6443
|
-
return `<code>${
|
|
6443
|
+
return `<code>${ve(n, !0)}</code>`;
|
|
6444
6444
|
}
|
|
6445
6445
|
br(n) {
|
|
6446
6446
|
return "<br>";
|
|
@@ -6454,19 +6454,19 @@ ${n}</tr>
|
|
|
6454
6454
|
return i;
|
|
6455
6455
|
n = s;
|
|
6456
6456
|
let r = '<a href="' + n + '"';
|
|
6457
|
-
return e && (r += ' title="' +
|
|
6457
|
+
return e && (r += ' title="' + ve(e) + '"'), r += ">" + i + "</a>", r;
|
|
6458
6458
|
}
|
|
6459
6459
|
image({ href: n, title: e, text: t, tokens: i }) {
|
|
6460
6460
|
i && (t = this.parser.parseInline(i, this.parser.textRenderer));
|
|
6461
6461
|
const s = So(n);
|
|
6462
6462
|
if (s === null)
|
|
6463
|
-
return
|
|
6463
|
+
return ve(t);
|
|
6464
6464
|
n = s;
|
|
6465
6465
|
let r = `<img src="${n}" alt="${t}"`;
|
|
6466
|
-
return e && (r += ` title="${
|
|
6466
|
+
return e && (r += ` title="${ve(e)}"`), r += ">", r;
|
|
6467
6467
|
}
|
|
6468
6468
|
text(n) {
|
|
6469
|
-
return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text :
|
|
6469
|
+
return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text : ve(n.text);
|
|
6470
6470
|
}
|
|
6471
6471
|
}, Cs = class {
|
|
6472
6472
|
// no need for block level renderers
|
|
@@ -6863,7 +6863,7 @@ ${n}</tr>
|
|
|
6863
6863
|
return (t) => {
|
|
6864
6864
|
if (t.message += `
|
|
6865
6865
|
Please report this to https://github.com/markedjs/marked.`, n) {
|
|
6866
|
-
const i = "<p>An error occurred:</p><pre>" +
|
|
6866
|
+
const i = "<p>An error occurred:</p><pre>" + ve(t.message + "", !0) + "</pre>";
|
|
6867
6867
|
return e ? Promise.resolve(i) : i;
|
|
6868
6868
|
}
|
|
6869
6869
|
if (e)
|
|
@@ -6915,7 +6915,7 @@ Qa.link = function({ href: n, title: e, text: t }) {
|
|
|
6915
6915
|
S.use({ renderer: Qa });
|
|
6916
6916
|
const zs = class zs extends A {
|
|
6917
6917
|
constructor() {
|
|
6918
|
-
super(...arguments), this.showLightbox = !1, this.imageUrl = "", this.altText = "", this.scrollRef =
|
|
6918
|
+
super(...arguments), this.showLightbox = !1, this.imageUrl = "", this.altText = "", this.scrollRef = ye(), this.contentRef = ye(), this.autoScroll = !0, this.buffer = "", this.pointer = 0, this.imageRegexp = new RegExp(/!\[[^[]*\([^)]*\)/gm);
|
|
6919
6919
|
}
|
|
6920
6920
|
// Stop autoscroll on user interaction
|
|
6921
6921
|
handleAutoscroll() {
|
|
@@ -6978,10 +6978,10 @@ const zs = class zs extends A {
|
|
|
6978
6978
|
}
|
|
6979
6979
|
render() {
|
|
6980
6980
|
return y`
|
|
6981
|
-
<div class="message-type-markdown" ${
|
|
6981
|
+
<div class="message-type-markdown" ${$e(this.contentRef)}>
|
|
6982
6982
|
<div></div>
|
|
6983
6983
|
</div>
|
|
6984
|
-
<div class="scroll" ${
|
|
6984
|
+
<div class="scroll" ${$e(this.scrollRef)}></div>
|
|
6985
6985
|
${this.showLightbox ? y`<ace-lightbox
|
|
6986
6986
|
imageUrl="${this.imageUrl}"
|
|
6987
6987
|
altText="${this.altText}"
|
|
@@ -7130,7 +7130,7 @@ let Bn = Fs;
|
|
|
7130
7130
|
Ld([
|
|
7131
7131
|
k({ attribute: !0 })
|
|
7132
7132
|
], Bn.prototype, "imageUrl");
|
|
7133
|
-
var Id = Object.defineProperty,
|
|
7133
|
+
var Id = Object.defineProperty, fe = (n, e, t, i) => {
|
|
7134
7134
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--)
|
|
7135
7135
|
(o = n[r]) && (s = o(e, t, s) || s);
|
|
7136
7136
|
return s && Id(e, t, s), s;
|
|
@@ -7144,7 +7144,7 @@ customElements.get("message-type-markdown") || customElements.define("message-ty
|
|
|
7144
7144
|
customElements.get("ace-lightbox") || customElements.define("ace-lightbox", Bn);
|
|
7145
7145
|
const _o = _a(A), js = class js extends _o {
|
|
7146
7146
|
constructor() {
|
|
7147
|
-
super(...arguments), this.platform = null, this.entries = [], this.typing = !1, this.message = "", this.disabledInput = !1, this.disabledSkipToLatest = !1, this.disabledSubmit = !1, this.chatOverlayActive = !1, this.textAreaLength = 0, this.showAuthBanner = !1, this.authenticated = !1, this.isMuted = !1, this.isKeyboardNavigation = !1, this.conversationContentRef =
|
|
7147
|
+
super(...arguments), this.platform = null, this.entries = [], this.typing = !1, this.message = "", this.disabledInput = !1, this.disabledSkipToLatest = !1, this.disabledSubmit = !1, this.chatOverlayActive = !1, this.textAreaLength = 0, this.showAuthBanner = !1, this.authenticated = !1, this.isMuted = !1, this.isKeyboardNavigation = !1, this.conversationContentRef = ye(), this.conversationFeedRef = ye(), this.formRef = ye(), this.inputRef = ye(), this.scrollRef = ye(), this.counterRef = ye(), this.chatCurrentScrollPosition = 0, this.toast = new mh(this), this.messageMaxLength = 1e3, this.messageMaxLengthLabel = "Maximum character limit reached", this.skipToLatestMessageLabel = "Skip to latest message", this.conversationState$ = new de("waiting"), this.stateMachine = new bh(this.conversationState$, this), this.provider$ = this.stateMachine.session().pipe(
|
|
7148
7148
|
Le((e) => e ? e == null ? void 0 : e.provider$ : Mi(null))
|
|
7149
7149
|
), this.userTyping$ = new P();
|
|
7150
7150
|
}
|
|
@@ -7372,21 +7372,21 @@ const _o = _a(A), js = class js extends _o {
|
|
|
7372
7372
|
})}
|
|
7373
7373
|
part="scroll-container"
|
|
7374
7374
|
aria-live="polite"
|
|
7375
|
-
${
|
|
7375
|
+
${$e(this.conversationContentRef)}
|
|
7376
7376
|
>
|
|
7377
7377
|
${this.toast.hasMessage() ? y`<div class="conversation__toast">${this.toast.message}</div>` : w}
|
|
7378
7378
|
<ace-conversation-feed
|
|
7379
7379
|
.entries=${this.entries}
|
|
7380
7380
|
.loading=${this.typing}
|
|
7381
|
-
${
|
|
7381
|
+
${$e(this.conversationFeedRef)}
|
|
7382
7382
|
@updated=${this.onSessionUpdated}
|
|
7383
7383
|
></ace-conversation-feed>
|
|
7384
|
-
<div class="scroll" ${
|
|
7384
|
+
<div class="scroll" ${$e(this.scrollRef)}></div>
|
|
7385
7385
|
</div>
|
|
7386
7386
|
<form
|
|
7387
7387
|
class="conversation-bottom"
|
|
7388
7388
|
@submit=${this.onSendMessage}
|
|
7389
|
-
${
|
|
7389
|
+
${$e(this.formRef)}
|
|
7390
7390
|
?inert=${this.disabledInput}
|
|
7391
7391
|
data-testid="conversation-bottom"
|
|
7392
7392
|
>
|
|
@@ -7407,7 +7407,7 @@ const _o = _a(A), js = class js extends _o {
|
|
|
7407
7407
|
@mousedown=${this.mouseDownHandler}
|
|
7408
7408
|
@focus=${this.focusHandler}
|
|
7409
7409
|
@blur=${this.blurHandler}
|
|
7410
|
-
${
|
|
7410
|
+
${$e(this.inputRef)}
|
|
7411
7411
|
aria-valuenow=${this.textAreaLength}
|
|
7412
7412
|
aria-valuemax=${this.messageMaxLength}
|
|
7413
7413
|
aria-valuemin="0"
|
|
@@ -7423,7 +7423,7 @@ const _o = _a(A), js = class js extends _o {
|
|
|
7423
7423
|
>
|
|
7424
7424
|
<telia-icon svg=${oa.svg}></telia-icon>
|
|
7425
7425
|
</button>
|
|
7426
|
-
<span class="counter" ${
|
|
7426
|
+
<span class="counter" ${$e(this.counterRef)}>
|
|
7427
7427
|
${this.textAreaLength} / ${this.messageMaxLength}</span
|
|
7428
7428
|
>
|
|
7429
7429
|
</div>
|
|
@@ -7785,37 +7785,37 @@ js.styles = [
|
|
|
7785
7785
|
`
|
|
7786
7786
|
];
|
|
7787
7787
|
let ne = js;
|
|
7788
|
-
|
|
7788
|
+
fe([
|
|
7789
7789
|
T()
|
|
7790
7790
|
], ne.prototype, "platform");
|
|
7791
|
-
|
|
7791
|
+
fe([
|
|
7792
7792
|
T()
|
|
7793
7793
|
], ne.prototype, "entries");
|
|
7794
|
-
|
|
7794
|
+
fe([
|
|
7795
7795
|
T()
|
|
7796
7796
|
], ne.prototype, "typing");
|
|
7797
|
-
|
|
7797
|
+
fe([
|
|
7798
7798
|
T()
|
|
7799
7799
|
], ne.prototype, "message");
|
|
7800
|
-
|
|
7800
|
+
fe([
|
|
7801
7801
|
T()
|
|
7802
7802
|
], ne.prototype, "disabledInput");
|
|
7803
|
-
|
|
7803
|
+
fe([
|
|
7804
7804
|
T()
|
|
7805
7805
|
], ne.prototype, "disabledSkipToLatest");
|
|
7806
|
-
|
|
7806
|
+
fe([
|
|
7807
7807
|
T()
|
|
7808
7808
|
], ne.prototype, "disabledSubmit");
|
|
7809
|
-
|
|
7809
|
+
fe([
|
|
7810
7810
|
T()
|
|
7811
7811
|
], ne.prototype, "chatOverlayActive");
|
|
7812
|
-
|
|
7812
|
+
fe([
|
|
7813
7813
|
T()
|
|
7814
7814
|
], ne.prototype, "textAreaLength");
|
|
7815
|
-
|
|
7815
|
+
fe([
|
|
7816
7816
|
T()
|
|
7817
7817
|
], ne.prototype, "showAuthBanner");
|
|
7818
|
-
|
|
7818
|
+
fe([
|
|
7819
7819
|
T()
|
|
7820
7820
|
], ne.prototype, "authenticated");
|
|
7821
7821
|
var Oe = /* @__PURE__ */ ((n) => (n.Tunnistus = "tunnistus", n.BankId = "bankid", n.Freja = "freja", n))(Oe || {}), F = /* @__PURE__ */ ((n) => (n.Pending = "pending", n.Authenticated = "authenticated", n.Error = "error", n))(F || {});
|
|
@@ -7948,8 +7948,8 @@ class Vt {
|
|
|
7948
7948
|
}
|
|
7949
7949
|
}
|
|
7950
7950
|
}
|
|
7951
|
-
const
|
|
7952
|
-
var
|
|
7951
|
+
const me = (n) => n.objectType === "info", Pd = (n) => n.objectType === "chatEntry", Md = (n) => n.objectType === "pen", Nd = (n) => n.objectType === "chatButtonClicked", Ud = (n) => n.objectType === "endVideoButtonClicked", Dd = (n) => n.type === "queue-status", Hd = (n) => n.type === "established", zd = (n) => n.type === "pen-status", Fd = (n) => n.type === "prepareVideo", jd = (n) => n.type === "videoPrepared", Bd = (n) => n.type === "chatButtonClicked", qd = (n) => n.type === "endVideoButtonClicked", Vd = (n) => n.type === "chat-ended";
|
|
7952
|
+
var he = /* @__PURE__ */ ((n) => (n.Initial = "initial", n.Error = "error", n.Retry = "retry", n.InitError = "init-error", n))(he || {});
|
|
7953
7953
|
class Ue extends Error {
|
|
7954
7954
|
constructor(e, t, i) {
|
|
7955
7955
|
super(i || (t == null ? void 0 : t.message) || "Unknown engine error"), this.errorType = e, this.originalError = t;
|
|
@@ -8173,7 +8173,7 @@ class Zd {
|
|
|
8173
8173
|
).pipe(
|
|
8174
8174
|
vc((e) => {
|
|
8175
8175
|
const t = e == null ? void 0 : e.dataObjects.find(
|
|
8176
|
-
(i) =>
|
|
8176
|
+
(i) => me(i) && i.infoType === "error"
|
|
8177
8177
|
);
|
|
8178
8178
|
if (t)
|
|
8179
8179
|
throw new Ue(
|
|
@@ -8193,7 +8193,7 @@ class Zd {
|
|
|
8193
8193
|
clockstamp: Date.now().toString(),
|
|
8194
8194
|
message: e
|
|
8195
8195
|
}), i = ((t == null ? void 0 : t.dataObjects) || []).find(
|
|
8196
|
-
(s) =>
|
|
8196
|
+
(s) => me(s) && s.infoType === "error"
|
|
8197
8197
|
);
|
|
8198
8198
|
if (i)
|
|
8199
8199
|
throw new Ue(
|
|
@@ -8230,7 +8230,7 @@ class Zd {
|
|
|
8230
8230
|
instance: this.config.instance,
|
|
8231
8231
|
emailAddress: e
|
|
8232
8232
|
}), i = ((t == null ? void 0 : t.dataObjects) || []).find(
|
|
8233
|
-
(s) =>
|
|
8233
|
+
(s) => me(s) && s.infoType === "error"
|
|
8234
8234
|
);
|
|
8235
8235
|
if (i)
|
|
8236
8236
|
throw new Ue(
|
|
@@ -8249,10 +8249,10 @@ class Zd {
|
|
|
8249
8249
|
}), Md(t) && this.actionsSubject$.next({
|
|
8250
8250
|
penStatus: t.penStatus,
|
|
8251
8251
|
type: "pen-status"
|
|
8252
|
-
}),
|
|
8252
|
+
}), me(t) && t.infoType === "queue" && this.actionsSubject$.next({
|
|
8253
8253
|
text: t.text,
|
|
8254
8254
|
type: "queue-status"
|
|
8255
|
-
}),
|
|
8255
|
+
}), me(t) && t.infoType === "established" && this.actionsSubject$.next({
|
|
8256
8256
|
text: t.text,
|
|
8257
8257
|
agentAlias: t.agentAlias,
|
|
8258
8258
|
type: "established",
|
|
@@ -8261,9 +8261,9 @@ class Zd {
|
|
|
8261
8261
|
agentUsername: t.agentUsername,
|
|
8262
8262
|
entrance: t.entrance,
|
|
8263
8263
|
errand: t.errand
|
|
8264
|
-
}),
|
|
8264
|
+
}), me(t) && t.infoType === "prepareVideo" && this.actionsSubject$.next({
|
|
8265
8265
|
type: "prepareVideo"
|
|
8266
|
-
}),
|
|
8266
|
+
}), me(t) && t.infoType === "videoPrepared" && this.actionsSubject$.next({
|
|
8267
8267
|
text: t.text,
|
|
8268
8268
|
agent: t.agent,
|
|
8269
8269
|
type: "videoPrepared",
|
|
@@ -8274,7 +8274,7 @@ class Zd {
|
|
|
8274
8274
|
}), Ud(t) && this.actionsSubject$.next({
|
|
8275
8275
|
guestId: t.guestId,
|
|
8276
8276
|
type: "endVideoButtonClicked"
|
|
8277
|
-
}),
|
|
8277
|
+
}), me(t) && ["afterChat", "finished"].includes(t.infoType) && this.actionsSubject$.next({
|
|
8278
8278
|
text: t.text,
|
|
8279
8279
|
type: "chat-ended",
|
|
8280
8280
|
showForm: t.infoType === "afterChat",
|
|
@@ -8291,7 +8291,7 @@ class Zd {
|
|
|
8291
8291
|
return "noSession";
|
|
8292
8292
|
const t = e.dataObjects;
|
|
8293
8293
|
for (const i of t)
|
|
8294
|
-
if (
|
|
8294
|
+
if (me(i))
|
|
8295
8295
|
switch (i.infoType) {
|
|
8296
8296
|
case "finished":
|
|
8297
8297
|
case "afterChat":
|
|
@@ -8307,7 +8307,7 @@ class Zd {
|
|
|
8307
8307
|
instance: this.config.instance
|
|
8308
8308
|
});
|
|
8309
8309
|
return !e || (e.dataObjects || []).find(
|
|
8310
|
-
(t) =>
|
|
8310
|
+
(t) => me(t) && t.infoType === "noSession"
|
|
8311
8311
|
) ? null : (this.processMessages(e), e);
|
|
8312
8312
|
}
|
|
8313
8313
|
}
|
|
@@ -8567,7 +8567,7 @@ At([
|
|
|
8567
8567
|
T()
|
|
8568
8568
|
], st.prototype, "showValidationWarning");
|
|
8569
8569
|
At([
|
|
8570
|
-
|
|
8570
|
+
pe({ context: ae }),
|
|
8571
8571
|
k({ attribute: !1 })
|
|
8572
8572
|
], st.prototype, "application");
|
|
8573
8573
|
window.customElements.get("ace-welcome-form") || window.customElements.define("ace-welcome-form", st);
|
|
@@ -8730,7 +8730,7 @@ _s([
|
|
|
8730
8730
|
T()
|
|
8731
8731
|
], Ct.prototype, "name");
|
|
8732
8732
|
_s([
|
|
8733
|
-
|
|
8733
|
+
pe({ context: ae }),
|
|
8734
8734
|
k({ attribute: !1 })
|
|
8735
8735
|
], Ct.prototype, "application");
|
|
8736
8736
|
window.customElements.get("ace-welcome-form-third-party") || window.customElements.define("ace-welcome-form-third-party", Ct);
|
|
@@ -8893,7 +8893,7 @@ As([
|
|
|
8893
8893
|
T()
|
|
8894
8894
|
], Et.prototype, "isEmailValid");
|
|
8895
8895
|
As([
|
|
8896
|
-
|
|
8896
|
+
pe({ context: ae }),
|
|
8897
8897
|
k({ attribute: !1 })
|
|
8898
8898
|
], Et.prototype, "application");
|
|
8899
8899
|
window.customElements.get("ace-conversation-ended-form") || window.customElements.define(
|
|
@@ -9032,7 +9032,7 @@ Vs.styles = [
|
|
|
9032
9032
|
];
|
|
9033
9033
|
let qn = Vs;
|
|
9034
9034
|
Jd([
|
|
9035
|
-
|
|
9035
|
+
pe({ context: ae }),
|
|
9036
9036
|
k({ attribute: !1 })
|
|
9037
9037
|
], qn.prototype, "application");
|
|
9038
9038
|
window.customElements.get("ace-video-confirm-dialog") || window.customElements.define("ace-video-confirm-dialog", qn);
|
|
@@ -9118,7 +9118,7 @@ Ws.styles = [
|
|
|
9118
9118
|
];
|
|
9119
9119
|
let Vn = Ws;
|
|
9120
9120
|
tp([
|
|
9121
|
-
|
|
9121
|
+
pe({ context: ae }),
|
|
9122
9122
|
k({ attribute: !1 })
|
|
9123
9123
|
], Vn.prototype, "application");
|
|
9124
9124
|
window.customElements.get("ace-survey") || window.customElements.define("ace-survey", Vn);
|
|
@@ -9205,7 +9205,7 @@ Gs.styles = [
|
|
|
9205
9205
|
];
|
|
9206
9206
|
let Wn = Gs;
|
|
9207
9207
|
ip([
|
|
9208
|
-
|
|
9208
|
+
pe({ context: ae }),
|
|
9209
9209
|
k({ attribute: !1 })
|
|
9210
9210
|
], Wn.prototype, "application");
|
|
9211
9211
|
window.customElements.get("ace-entrance-closed-dialog") || window.customElements.define(
|
|
@@ -9402,7 +9402,7 @@ Ka([
|
|
|
9402
9402
|
k({ attribute: !1 })
|
|
9403
9403
|
], tn.prototype, "entry");
|
|
9404
9404
|
Ka([
|
|
9405
|
-
|
|
9405
|
+
pe({ context: ae }),
|
|
9406
9406
|
k({ attribute: !1 })
|
|
9407
9407
|
], tn.prototype, "application");
|
|
9408
9408
|
window.customElements.get("ace-contact-data-field") || window.customElements.define("ace-contact-data-field", tn);
|
|
@@ -9533,7 +9533,7 @@ Ys.styles = [
|
|
|
9533
9533
|
];
|
|
9534
9534
|
let Gn = Ys;
|
|
9535
9535
|
op([
|
|
9536
|
-
|
|
9536
|
+
pe({ context: ae }),
|
|
9537
9537
|
k({ attribute: !1 })
|
|
9538
9538
|
], Gn.prototype, "application");
|
|
9539
9539
|
window.customElements.get("ace-quit-confirm-dialog") || window.customElements.define("ace-quit-confirm-dialog", Gn);
|
|
@@ -9544,9 +9544,13 @@ var ap = Object.defineProperty, lp = (n, e, t, i) => {
|
|
|
9544
9544
|
};
|
|
9545
9545
|
const Qs = class Qs extends A {
|
|
9546
9546
|
constructor(e) {
|
|
9547
|
-
super(), this.tunnistusURL = "", this.state =
|
|
9548
|
-
const {
|
|
9549
|
-
|
|
9547
|
+
super(), this.tunnistusURL = "", this.state = he.Initial, this.isAuthenticating = !1;
|
|
9548
|
+
const {
|
|
9549
|
+
tunnistusURL: t = "",
|
|
9550
|
+
state: i = he.Initial,
|
|
9551
|
+
isAuthenticating: s = !1
|
|
9552
|
+
} = e ?? {};
|
|
9553
|
+
this.tunnistusURL = t, this.state = i, this.isAuthenticating = s;
|
|
9550
9554
|
}
|
|
9551
9555
|
onStartAuth() {
|
|
9552
9556
|
const e = new CustomEvent("action", {
|
|
@@ -9560,7 +9564,7 @@ const Qs = class Qs extends A {
|
|
|
9560
9564
|
render() {
|
|
9561
9565
|
const e = this.application.texts;
|
|
9562
9566
|
switch (this.state) {
|
|
9563
|
-
case
|
|
9567
|
+
case he.InitError:
|
|
9564
9568
|
return y`<div class="container">
|
|
9565
9569
|
<div class="header-row">
|
|
9566
9570
|
<telia-icon class="error-icon" svg=${Br.svg}></telia-icon>
|
|
@@ -9578,7 +9582,7 @@ const Qs = class Qs extends A {
|
|
|
9578
9582
|
)}
|
|
9579
9583
|
</p>
|
|
9580
9584
|
</div>`;
|
|
9581
|
-
case
|
|
9585
|
+
case he.Error:
|
|
9582
9586
|
return y`<div class="container">
|
|
9583
9587
|
<div class="header-row">
|
|
9584
9588
|
<telia-icon class="error-icon" svg=${Br.svg}></telia-icon>
|
|
@@ -9602,6 +9606,8 @@ const Qs = class Qs extends A {
|
|
|
9602
9606
|
href="${this.tunnistusURL}"
|
|
9603
9607
|
@click=${this.onStartAuth}
|
|
9604
9608
|
data-testId="auth-error-link"
|
|
9609
|
+
?inert=${this.isAuthenticating}
|
|
9610
|
+
style=${this.isAuthenticating ? "pointer-events: none; opacity: 0.5;" : ""}
|
|
9605
9611
|
>
|
|
9606
9612
|
${e.getOrFallback(
|
|
9607
9613
|
"tunnistus-auth.error.link-button",
|
|
@@ -9611,7 +9617,7 @@ const Qs = class Qs extends A {
|
|
|
9611
9617
|
</a>
|
|
9612
9618
|
</div>
|
|
9613
9619
|
</div>`;
|
|
9614
|
-
case
|
|
9620
|
+
case he.Initial:
|
|
9615
9621
|
default:
|
|
9616
9622
|
return y`<div class="container">
|
|
9617
9623
|
<div class="header-row">
|
|
@@ -9636,6 +9642,8 @@ const Qs = class Qs extends A {
|
|
|
9636
9642
|
href="${this.tunnistusURL}"
|
|
9637
9643
|
@click=${this.onStartAuth}
|
|
9638
9644
|
data-testId="auth-initial-link"
|
|
9645
|
+
?inert=${this.isAuthenticating}
|
|
9646
|
+
style=${this.isAuthenticating ? "pointer-events: none; opacity: 0.5;" : ""}
|
|
9639
9647
|
>
|
|
9640
9648
|
${e.getOrFallback(
|
|
9641
9649
|
"tunnistus-auth.initial.link-button",
|
|
@@ -9724,7 +9732,7 @@ Qs.styles = [
|
|
|
9724
9732
|
];
|
|
9725
9733
|
let Zn = Qs;
|
|
9726
9734
|
lp([
|
|
9727
|
-
|
|
9735
|
+
pe({ context: ae }),
|
|
9728
9736
|
k({ attribute: !1 })
|
|
9729
9737
|
], Zn.prototype, "application");
|
|
9730
9738
|
window.customElements.get("ace-tunnistus-auth-card") || window.customElements.define("ace-tunnistus-auth-card", Zn);
|
|
@@ -9829,7 +9837,7 @@ Xs.styles = [
|
|
|
9829
9837
|
];
|
|
9830
9838
|
let nn = Xs;
|
|
9831
9839
|
dp([
|
|
9832
|
-
|
|
9840
|
+
pe({ context: ae }),
|
|
9833
9841
|
k({ attribute: !1 })
|
|
9834
9842
|
], nn.prototype, "application");
|
|
9835
9843
|
window.customElements.get("ace-video-iframe") || window.customElements.define("ace-video-iframe", nn);
|
|
@@ -9942,7 +9950,7 @@ class Ts extends kc {
|
|
|
9942
9950
|
save(e) {
|
|
9943
9951
|
this.component.stateMachine.session().pipe(
|
|
9944
9952
|
Le((t) => (t == null ? void 0 : t.data$) || Re),
|
|
9945
|
-
|
|
9953
|
+
be(1)
|
|
9946
9954
|
).subscribe((t) => {
|
|
9947
9955
|
this.saveToCurrentSession$.next({ ...t, ...e });
|
|
9948
9956
|
});
|
|
@@ -10006,11 +10014,11 @@ class Ts extends kc {
|
|
|
10006
10014
|
return;
|
|
10007
10015
|
}
|
|
10008
10016
|
this.headerComponent.authUrl = this.authResult.tunnistusURL, this.headerComponent.authState = H.NonAuthenticated, e ? this.handleAuthentication() : (this.authenticationCardEntry = this.showTunnistusAuthCard(
|
|
10009
|
-
|
|
10017
|
+
he.Initial,
|
|
10010
10018
|
this.authResult.tunnistusURL
|
|
10011
10019
|
), this.authenticationCardEntry.actions$.pipe(
|
|
10012
10020
|
G((t) => t.key === "start-auth"),
|
|
10013
|
-
|
|
10021
|
+
be(1)
|
|
10014
10022
|
).subscribe(() => {
|
|
10015
10023
|
this.handleAuthentication();
|
|
10016
10024
|
}));
|
|
@@ -10025,7 +10033,7 @@ class Ts extends kc {
|
|
|
10025
10033
|
async getAuthResult() {
|
|
10026
10034
|
const e = await this.idHubClient.auth();
|
|
10027
10035
|
if (e.status === F.Error) {
|
|
10028
|
-
this.showTunnistusAuthCard(
|
|
10036
|
+
this.showTunnistusAuthCard(he.InitError), this.headerComponent.showAuthOptions = !1;
|
|
10029
10037
|
return;
|
|
10030
10038
|
}
|
|
10031
10039
|
return e;
|
|
@@ -10142,13 +10150,18 @@ class Ts extends kc {
|
|
|
10142
10150
|
return t.innerHTML = e, t.value;
|
|
10143
10151
|
}
|
|
10144
10152
|
async handleAuthentication() {
|
|
10145
|
-
var t, i, s, r;
|
|
10153
|
+
var t, i, s, r, o, a, c, l;
|
|
10146
10154
|
this.headerComponent.userName = this.texts.getOrFallback(
|
|
10147
10155
|
"widget-header.authenticating",
|
|
10148
10156
|
"Authenticating..."
|
|
10149
|
-
), this.headerComponent.authState = H.Authenticating
|
|
10157
|
+
), this.headerComponent.authState = H.Authenticating, (t = this.authenticationCardEntry) == null || t.remove(), this.authenticationCardEntry = this.showTunnistusAuthCard(
|
|
10158
|
+
(i = this.authResult) != null && i.tunnistusURL ? he.Initial : he.InitError,
|
|
10159
|
+
(s = this.authResult) == null ? void 0 : s.tunnistusURL,
|
|
10160
|
+
void 0,
|
|
10161
|
+
!0
|
|
10162
|
+
);
|
|
10150
10163
|
const e = await this.idHubClient.collect();
|
|
10151
|
-
switch (this.authenticationCardEntry
|
|
10164
|
+
switch ((r = this.authenticationCardEntry) == null || r.remove(), this.idHubEidType) {
|
|
10152
10165
|
case Oe.Tunnistus:
|
|
10153
10166
|
if (e.status === F.Error) {
|
|
10154
10167
|
if (this.authResult = await this.getAuthResult(), !this.authResult) return;
|
|
@@ -10156,23 +10169,23 @@ class Ts extends kc {
|
|
|
10156
10169
|
"widget-header.not-authenticated",
|
|
10157
10170
|
"Not authenticated"
|
|
10158
10171
|
), this.headerComponent.authState = H.NonAuthenticated, this.headerComponent.authUrl = this.authResult.tunnistusURL, this.authenticationCardEntry = this.showTunnistusAuthCard(
|
|
10159
|
-
|
|
10172
|
+
he.Error,
|
|
10160
10173
|
this.authResult.tunnistusURL
|
|
10161
10174
|
), this.authenticationCardEntry.actions$.pipe(
|
|
10162
|
-
G((
|
|
10163
|
-
|
|
10175
|
+
G((u) => u.key === "start-auth"),
|
|
10176
|
+
be(1)
|
|
10164
10177
|
).subscribe(async () => {
|
|
10165
10178
|
this.startAuthenticationFlow(!0);
|
|
10166
10179
|
});
|
|
10167
10180
|
return;
|
|
10168
10181
|
} else if (e.status === F.Authenticated) {
|
|
10169
|
-
const
|
|
10170
|
-
((
|
|
10171
|
-
),
|
|
10172
|
-
this.headerComponent.userName =
|
|
10173
|
-
name:
|
|
10182
|
+
const u = Gd(
|
|
10183
|
+
((o = e == null ? void 0 : e.idhubEIDToken) == null ? void 0 : o.split(".")[1]) ?? ""
|
|
10184
|
+
), p = JSON.parse(u), d = ((c = (a = p == null ? void 0 : p.completionData) == null ? void 0 : a.user) == null ? void 0 : c.name) ?? "";
|
|
10185
|
+
this.headerComponent.userName = d, this.headerComponent.authState = H.Authenticated, this.component.application.storage.set("auth", {
|
|
10186
|
+
name: d,
|
|
10174
10187
|
authenticated: !0
|
|
10175
|
-
}), this.component.setAuthenticationBannerStatus(H.Authenticated), (
|
|
10188
|
+
}), this.component.setAuthenticationBannerStatus(H.Authenticated), (l = this.authenticationCardEntry) == null || l.remove(), this.handleWelcomeForm(
|
|
10176
10189
|
this.engine.config,
|
|
10177
10190
|
e.idhubEIDToken
|
|
10178
10191
|
);
|
|
@@ -10225,8 +10238,8 @@ class Ts extends kc {
|
|
|
10225
10238
|
);
|
|
10226
10239
|
this.printEntry(e);
|
|
10227
10240
|
}
|
|
10228
|
-
showTunnistusAuthCard(e, t, i) {
|
|
10229
|
-
const
|
|
10241
|
+
showTunnistusAuthCard(e, t, i, s) {
|
|
10242
|
+
const r = new ie(
|
|
10230
10243
|
q.System,
|
|
10231
10244
|
{
|
|
10232
10245
|
name: ""
|
|
@@ -10240,14 +10253,15 @@ class Ts extends kc {
|
|
|
10240
10253
|
{
|
|
10241
10254
|
state: e,
|
|
10242
10255
|
tunnistusURL: t ?? "",
|
|
10243
|
-
errorMessage: i ?? ""
|
|
10256
|
+
errorMessage: i ?? "",
|
|
10257
|
+
isAuthenticating: s ?? !1
|
|
10244
10258
|
}
|
|
10245
10259
|
]
|
|
10246
10260
|
]
|
|
10247
10261
|
}
|
|
10248
10262
|
]
|
|
10249
10263
|
);
|
|
10250
|
-
return this.printEntry(
|
|
10264
|
+
return this.printEntry(r), r;
|
|
10251
10265
|
}
|
|
10252
10266
|
showWelcomeForm(e) {
|
|
10253
10267
|
this.component.disableInput(), this.component.disableSkipToLatestMessage();
|
|
@@ -10274,7 +10288,7 @@ class Ts extends kc {
|
|
|
10274
10288
|
]
|
|
10275
10289
|
), this.printEntry(t), t.actions$.pipe(
|
|
10276
10290
|
G((i) => i.key === "submitted"),
|
|
10277
|
-
|
|
10291
|
+
be(1)
|
|
10278
10292
|
).subscribe((i) => {
|
|
10279
10293
|
t.remove(), this.user.name = i.data.name, this.component.application.storage.set("userName", {
|
|
10280
10294
|
name: this.user.name
|
|
@@ -10318,7 +10332,7 @@ class Ts extends kc {
|
|
|
10318
10332
|
]
|
|
10319
10333
|
), this.printEntry(this.quitConfirmDialogEntry), this.quitConfirmDialogEntry.actions$.pipe(
|
|
10320
10334
|
G((t) => t.key === "quit-chat"),
|
|
10321
|
-
|
|
10335
|
+
be(1)
|
|
10322
10336
|
).subscribe((t) => {
|
|
10323
10337
|
var i, s, r, o;
|
|
10324
10338
|
((i = t.data) == null ? void 0 : i.result) === "quit" ? (this.endConversation(), (s = this.quitConfirmDialogEntry) == null || s.remove()) : ((r = t.data) == null ? void 0 : r.result) === "cancel" && ((o = this.quitConfirmDialogEntry) == null || o.remove());
|
|
@@ -10338,7 +10352,7 @@ class Ts extends kc {
|
|
|
10338
10352
|
);
|
|
10339
10353
|
this.printEntry(e), e.actions$.pipe(
|
|
10340
10354
|
G((t) => t.key === "submitted"),
|
|
10341
|
-
|
|
10355
|
+
be(1)
|
|
10342
10356
|
).subscribe((t) => {
|
|
10343
10357
|
e.remove(), t.data.email && this.sendConversationEmail(t.data.email);
|
|
10344
10358
|
});
|
|
@@ -10356,7 +10370,7 @@ class Ts extends kc {
|
|
|
10356
10370
|
]
|
|
10357
10371
|
), this.printEntry(this.videoConfirmDialogEntry), this.videoConfirmDialogEntry.actions$.pipe(
|
|
10358
10372
|
G((e) => e.key === "video-confirm"),
|
|
10359
|
-
|
|
10373
|
+
be(1)
|
|
10360
10374
|
).subscribe((e) => {
|
|
10361
10375
|
var t;
|
|
10362
10376
|
this.videoConfirmDialogEntry && this.videoConfirmDialogEntry.remove(), e.data.result === "declined" && (this.guestId = null), (t = this.engine) == null || t.videoPrepared(e.data.result), this.printSystem(e.data.text);
|