@telia-ace/widget-conversation-flamingo 1.1.41-rc.1 → 1.1.41
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.mjs
CHANGED
@@ -5,46 +5,46 @@ function bt() {
|
|
5
5
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
6
6
|
return U(yt);
|
7
7
|
}
|
8
|
-
const
|
9
|
-
for (let
|
10
|
-
|
11
|
-
function mt(
|
12
|
-
return
|
8
|
+
const d = [];
|
9
|
+
for (let r = 0; r < 256; ++r)
|
10
|
+
d.push((r + 256).toString(16).slice(1));
|
11
|
+
function mt(r, e = 0) {
|
12
|
+
return d[r[e + 0]] + d[r[e + 1]] + d[r[e + 2]] + d[r[e + 3]] + "-" + d[r[e + 4]] + d[r[e + 5]] + "-" + d[r[e + 6]] + d[r[e + 7]] + "-" + d[r[e + 8]] + d[r[e + 9]] + "-" + d[r[e + 10]] + d[r[e + 11]] + d[r[e + 12]] + d[r[e + 13]] + d[r[e + 14]] + d[r[e + 15]];
|
13
13
|
}
|
14
14
|
const wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), G = {
|
15
15
|
randomUUID: wt
|
16
16
|
};
|
17
|
-
function St(
|
18
|
-
if (G.randomUUID && !
|
17
|
+
function St(r, e, t) {
|
18
|
+
if (G.randomUUID && !e && !r)
|
19
19
|
return G.randomUUID();
|
20
|
-
|
21
|
-
const n =
|
22
|
-
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128,
|
20
|
+
r = r || {};
|
21
|
+
const n = r.random || (r.rng || bt)();
|
22
|
+
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
|
23
23
|
t = t || 0;
|
24
24
|
for (let i = 0; i < 16; ++i)
|
25
|
-
|
26
|
-
return
|
25
|
+
e[t + i] = n[i];
|
26
|
+
return e;
|
27
27
|
}
|
28
28
|
return mt(n);
|
29
29
|
}
|
30
|
-
var L = function(
|
30
|
+
var L = function(r, e) {
|
31
31
|
return L = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
|
32
32
|
t.__proto__ = n;
|
33
33
|
} || function(t, n) {
|
34
34
|
for (var i in n)
|
35
35
|
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
36
|
-
}, L(
|
36
|
+
}, L(r, e);
|
37
37
|
};
|
38
|
-
function x(
|
39
|
-
if (typeof
|
40
|
-
throw new TypeError("Class extends value " + String(
|
41
|
-
L(
|
38
|
+
function x(r, e) {
|
39
|
+
if (typeof e != "function" && e !== null)
|
40
|
+
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
41
|
+
L(r, e);
|
42
42
|
function t() {
|
43
|
-
this.constructor =
|
43
|
+
this.constructor = r;
|
44
44
|
}
|
45
|
-
|
45
|
+
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
46
46
|
}
|
47
|
-
function gt(
|
47
|
+
function gt(r, e, t, n) {
|
48
48
|
function i(o) {
|
49
49
|
return o instanceof t ? o : new t(function(s) {
|
50
50
|
s(o);
|
@@ -68,10 +68,10 @@ function gt(e, r, t, n) {
|
|
68
68
|
function c(l) {
|
69
69
|
l.done ? o(l.value) : i(l.value).then(u, a);
|
70
70
|
}
|
71
|
-
c((n = n.apply(
|
71
|
+
c((n = n.apply(r, e || [])).next());
|
72
72
|
});
|
73
73
|
}
|
74
|
-
function W(
|
74
|
+
function W(r, e) {
|
75
75
|
var t = { label: 0, sent: function() {
|
76
76
|
if (o[0] & 1)
|
77
77
|
throw o[1];
|
@@ -125,7 +125,7 @@ function W(e, r) {
|
|
125
125
|
o[2] && t.ops.pop(), t.trys.pop();
|
126
126
|
continue;
|
127
127
|
}
|
128
|
-
c =
|
128
|
+
c = e.call(r, t);
|
129
129
|
} catch (l) {
|
130
130
|
c = [6, l], i = 0;
|
131
131
|
} finally {
|
@@ -136,25 +136,25 @@ function W(e, r) {
|
|
136
136
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
137
137
|
}
|
138
138
|
}
|
139
|
-
function g(
|
140
|
-
var
|
139
|
+
function g(r) {
|
140
|
+
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
141
141
|
if (t)
|
142
|
-
return t.call(
|
143
|
-
if (
|
142
|
+
return t.call(r);
|
143
|
+
if (r && typeof r.length == "number")
|
144
144
|
return {
|
145
145
|
next: function() {
|
146
|
-
return
|
146
|
+
return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
|
147
147
|
}
|
148
148
|
};
|
149
|
-
throw new TypeError(
|
149
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
150
150
|
}
|
151
|
-
function $(
|
152
|
-
var t = typeof Symbol == "function" &&
|
151
|
+
function $(r, e) {
|
152
|
+
var t = typeof Symbol == "function" && r[Symbol.iterator];
|
153
153
|
if (!t)
|
154
|
-
return
|
155
|
-
var n = t.call(
|
154
|
+
return r;
|
155
|
+
var n = t.call(r), i, o = [], s;
|
156
156
|
try {
|
157
|
-
for (; (
|
157
|
+
for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; )
|
158
158
|
o.push(i.value);
|
159
159
|
} catch (u) {
|
160
160
|
s = { error: u };
|
@@ -168,26 +168,26 @@ function $(e, r) {
|
|
168
168
|
}
|
169
169
|
return o;
|
170
170
|
}
|
171
|
-
function k(
|
171
|
+
function k(r, e, t) {
|
172
172
|
if (t || arguments.length === 2)
|
173
|
-
for (var n = 0, i =
|
174
|
-
(o || !(n in
|
175
|
-
return
|
173
|
+
for (var n = 0, i = e.length, o; n < i; n++)
|
174
|
+
(o || !(n in e)) && (o || (o = Array.prototype.slice.call(e, 0, n)), o[n] = e[n]);
|
175
|
+
return r.concat(o || Array.prototype.slice.call(e));
|
176
176
|
}
|
177
|
-
function S(
|
178
|
-
return this instanceof S ? (this.v =
|
177
|
+
function S(r) {
|
178
|
+
return this instanceof S ? (this.v = r, this) : new S(r);
|
179
179
|
}
|
180
|
-
function xt(
|
180
|
+
function xt(r, e, t) {
|
181
181
|
if (!Symbol.asyncIterator)
|
182
182
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
183
|
-
var n = t.apply(
|
183
|
+
var n = t.apply(r, e || []), i, o = [];
|
184
184
|
return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() {
|
185
185
|
return this;
|
186
186
|
}, i;
|
187
187
|
function s(f) {
|
188
188
|
n[f] && (i[f] = function(y) {
|
189
|
-
return new Promise(function(E,
|
190
|
-
o.push([f, y, E,
|
189
|
+
return new Promise(function(E, p) {
|
190
|
+
o.push([f, y, E, p]) > 1 || u(f, y);
|
191
191
|
});
|
192
192
|
});
|
193
193
|
}
|
@@ -211,17 +211,17 @@ function xt(e, r, t) {
|
|
211
211
|
f(y), o.shift(), o.length && u(o[0][0], o[0][1]);
|
212
212
|
}
|
213
213
|
}
|
214
|
-
function Et(
|
214
|
+
function Et(r) {
|
215
215
|
if (!Symbol.asyncIterator)
|
216
216
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
217
|
-
var
|
218
|
-
return
|
217
|
+
var e = r[Symbol.asyncIterator], t;
|
218
|
+
return e ? e.call(r) : (r = typeof g == "function" ? g(r) : r[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
|
219
219
|
return this;
|
220
220
|
}, t);
|
221
221
|
function n(o) {
|
222
|
-
t[o] =
|
222
|
+
t[o] = r[o] && function(s) {
|
223
223
|
return new Promise(function(u, a) {
|
224
|
-
s =
|
224
|
+
s = r[o](s), i(u, a, s.done, s.value);
|
225
225
|
});
|
226
226
|
};
|
227
227
|
}
|
@@ -231,36 +231,36 @@ function Et(e) {
|
|
231
231
|
}, s);
|
232
232
|
}
|
233
233
|
}
|
234
|
-
function h(
|
235
|
-
return typeof
|
234
|
+
function h(r) {
|
235
|
+
return typeof r == "function";
|
236
236
|
}
|
237
|
-
function X(
|
238
|
-
var
|
237
|
+
function X(r) {
|
238
|
+
var e = function(n) {
|
239
239
|
Error.call(n), n.stack = new Error().stack;
|
240
|
-
}, t = e
|
240
|
+
}, t = r(e);
|
241
241
|
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
242
242
|
}
|
243
|
-
var R = X(function(
|
243
|
+
var R = X(function(r) {
|
244
244
|
return function(t) {
|
245
|
-
|
245
|
+
r(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
246
246
|
` + t.map(function(n, i) {
|
247
247
|
return i + 1 + ") " + n.toString();
|
248
248
|
}).join(`
|
249
249
|
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
250
250
|
};
|
251
251
|
});
|
252
|
-
function D(
|
253
|
-
if (
|
254
|
-
var t =
|
255
|
-
0 <= t &&
|
252
|
+
function D(r, e) {
|
253
|
+
if (r) {
|
254
|
+
var t = r.indexOf(e);
|
255
|
+
0 <= t && r.splice(t, 1);
|
256
256
|
}
|
257
257
|
}
|
258
258
|
var j = function() {
|
259
|
-
function e
|
260
|
-
this.initialTeardown =
|
259
|
+
function r(e) {
|
260
|
+
this.initialTeardown = e, this.closed = !1, this._parentage = null, this._finalizers = null;
|
261
261
|
}
|
262
|
-
return
|
263
|
-
var
|
262
|
+
return r.prototype.unsubscribe = function() {
|
263
|
+
var e, t, n, i, o;
|
264
264
|
if (!this.closed) {
|
265
265
|
this.closed = !0;
|
266
266
|
var s = this._parentage;
|
@@ -271,14 +271,14 @@ var j = function() {
|
|
271
271
|
var c = a.value;
|
272
272
|
c.remove(this);
|
273
273
|
}
|
274
|
-
} catch (
|
275
|
-
|
274
|
+
} catch (p) {
|
275
|
+
e = { error: p };
|
276
276
|
} finally {
|
277
277
|
try {
|
278
278
|
a && !a.done && (t = u.return) && t.call(u);
|
279
279
|
} finally {
|
280
|
-
if (
|
281
|
-
throw
|
280
|
+
if (e)
|
281
|
+
throw e.error;
|
282
282
|
}
|
283
283
|
}
|
284
284
|
else
|
@@ -287,8 +287,8 @@ var j = function() {
|
|
287
287
|
if (h(l))
|
288
288
|
try {
|
289
289
|
l();
|
290
|
-
} catch (
|
291
|
-
o =
|
290
|
+
} catch (p) {
|
291
|
+
o = p instanceof R ? p.errors : [p];
|
292
292
|
}
|
293
293
|
var v = this._finalizers;
|
294
294
|
if (v) {
|
@@ -298,12 +298,12 @@ var j = function() {
|
|
298
298
|
var E = y.value;
|
299
299
|
try {
|
300
300
|
z(E);
|
301
|
-
} catch (
|
302
|
-
o = o ?? [],
|
301
|
+
} catch (p) {
|
302
|
+
o = o ?? [], p instanceof R ? o = k(k([], $(o)), $(p.errors)) : o.push(p);
|
303
303
|
}
|
304
304
|
}
|
305
|
-
} catch (
|
306
|
-
n = { error:
|
305
|
+
} catch (p) {
|
306
|
+
n = { error: p };
|
307
307
|
} finally {
|
308
308
|
try {
|
309
309
|
y && !y.done && (i = f.return) && i.call(f);
|
@@ -316,41 +316,41 @@ var j = function() {
|
|
316
316
|
if (o)
|
317
317
|
throw new R(o);
|
318
318
|
}
|
319
|
-
},
|
319
|
+
}, r.prototype.add = function(e) {
|
320
320
|
var t;
|
321
|
-
if (
|
321
|
+
if (e && e !== this)
|
322
322
|
if (this.closed)
|
323
|
-
z(
|
323
|
+
z(e);
|
324
324
|
else {
|
325
|
-
if (
|
326
|
-
if (
|
325
|
+
if (e instanceof r) {
|
326
|
+
if (e.closed || e._hasParent(this))
|
327
327
|
return;
|
328
|
-
|
328
|
+
e._addParent(this);
|
329
329
|
}
|
330
|
-
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(
|
330
|
+
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(e);
|
331
331
|
}
|
332
|
-
},
|
332
|
+
}, r.prototype._hasParent = function(e) {
|
333
333
|
var t = this._parentage;
|
334
|
-
return t ===
|
335
|
-
},
|
334
|
+
return t === e || Array.isArray(t) && t.includes(e);
|
335
|
+
}, r.prototype._addParent = function(e) {
|
336
336
|
var t = this._parentage;
|
337
|
-
this._parentage = Array.isArray(t) ? (t.push(
|
338
|
-
},
|
337
|
+
this._parentage = Array.isArray(t) ? (t.push(e), t) : t ? [t, e] : e;
|
338
|
+
}, r.prototype._removeParent = function(e) {
|
339
339
|
var t = this._parentage;
|
340
|
-
t ===
|
341
|
-
},
|
340
|
+
t === e ? this._parentage = null : Array.isArray(t) && D(t, e);
|
341
|
+
}, r.prototype.remove = function(e) {
|
342
342
|
var t = this._finalizers;
|
343
|
-
t && D(t,
|
344
|
-
},
|
345
|
-
var
|
346
|
-
return
|
347
|
-
}(),
|
343
|
+
t && D(t, e), e instanceof r && e._removeParent(this);
|
344
|
+
}, r.EMPTY = function() {
|
345
|
+
var e = new r();
|
346
|
+
return e.closed = !0, e;
|
347
|
+
}(), r;
|
348
348
|
}(), Z = j.EMPTY;
|
349
|
-
function N(
|
350
|
-
return
|
349
|
+
function N(r) {
|
350
|
+
return r instanceof j || r && "closed" in r && h(r.remove) && h(r.add) && h(r.unsubscribe);
|
351
351
|
}
|
352
|
-
function z(
|
353
|
-
h(
|
352
|
+
function z(r) {
|
353
|
+
h(r) ? r() : r.unsubscribe();
|
354
354
|
}
|
355
355
|
var tt = {
|
356
356
|
onUnhandledError: null,
|
@@ -359,98 +359,98 @@ var tt = {
|
|
359
359
|
useDeprecatedSynchronousErrorHandling: !1,
|
360
360
|
useDeprecatedNextContext: !1
|
361
361
|
}, M = {
|
362
|
-
setTimeout: function(
|
362
|
+
setTimeout: function(r, e) {
|
363
363
|
for (var t = [], n = 2; n < arguments.length; n++)
|
364
364
|
t[n - 2] = arguments[n];
|
365
365
|
var i = M.delegate;
|
366
|
-
return i != null && i.setTimeout ? i.setTimeout.apply(i, k([
|
366
|
+
return i != null && i.setTimeout ? i.setTimeout.apply(i, k([r, e], $(t))) : setTimeout.apply(void 0, k([r, e], $(t)));
|
367
367
|
},
|
368
|
-
clearTimeout: function(
|
369
|
-
var
|
370
|
-
return ((
|
368
|
+
clearTimeout: function(r) {
|
369
|
+
var e = M.delegate;
|
370
|
+
return ((e == null ? void 0 : e.clearTimeout) || clearTimeout)(r);
|
371
371
|
},
|
372
372
|
delegate: void 0
|
373
373
|
};
|
374
|
-
function et(
|
374
|
+
function et(r) {
|
375
375
|
M.setTimeout(function() {
|
376
|
-
throw
|
376
|
+
throw r;
|
377
377
|
});
|
378
378
|
}
|
379
379
|
function Y() {
|
380
380
|
}
|
381
|
-
function T(
|
382
|
-
|
381
|
+
function T(r) {
|
382
|
+
r();
|
383
383
|
}
|
384
|
-
var B = function(
|
385
|
-
x(
|
386
|
-
function
|
387
|
-
var n =
|
384
|
+
var B = function(r) {
|
385
|
+
x(e, r);
|
386
|
+
function e(t) {
|
387
|
+
var n = r.call(this) || this;
|
388
388
|
return n.isStopped = !1, t ? (n.destination = t, N(t) && t.add(n)) : n.destination = Ot, n;
|
389
389
|
}
|
390
|
-
return
|
390
|
+
return e.create = function(t, n, i) {
|
391
391
|
return new V(t, n, i);
|
392
|
-
},
|
392
|
+
}, e.prototype.next = function(t) {
|
393
393
|
this.isStopped || this._next(t);
|
394
|
-
},
|
394
|
+
}, e.prototype.error = function(t) {
|
395
395
|
this.isStopped || (this.isStopped = !0, this._error(t));
|
396
|
-
},
|
396
|
+
}, e.prototype.complete = function() {
|
397
397
|
this.isStopped || (this.isStopped = !0, this._complete());
|
398
|
-
},
|
399
|
-
this.closed || (this.isStopped = !0,
|
400
|
-
},
|
398
|
+
}, e.prototype.unsubscribe = function() {
|
399
|
+
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
|
400
|
+
}, e.prototype._next = function(t) {
|
401
401
|
this.destination.next(t);
|
402
|
-
},
|
402
|
+
}, e.prototype._error = function(t) {
|
403
403
|
try {
|
404
404
|
this.destination.error(t);
|
405
405
|
} finally {
|
406
406
|
this.unsubscribe();
|
407
407
|
}
|
408
|
-
},
|
408
|
+
}, e.prototype._complete = function() {
|
409
409
|
try {
|
410
410
|
this.destination.complete();
|
411
411
|
} finally {
|
412
412
|
this.unsubscribe();
|
413
413
|
}
|
414
|
-
},
|
414
|
+
}, e;
|
415
415
|
}(j), _t = Function.prototype.bind;
|
416
|
-
function F(
|
417
|
-
return _t.call(
|
416
|
+
function F(r, e) {
|
417
|
+
return _t.call(r, e);
|
418
418
|
}
|
419
419
|
var It = function() {
|
420
|
-
function e
|
421
|
-
this.partialObserver =
|
420
|
+
function r(e) {
|
421
|
+
this.partialObserver = e;
|
422
422
|
}
|
423
|
-
return
|
423
|
+
return r.prototype.next = function(e) {
|
424
424
|
var t = this.partialObserver;
|
425
425
|
if (t.next)
|
426
426
|
try {
|
427
|
-
t.next(
|
427
|
+
t.next(e);
|
428
428
|
} catch (n) {
|
429
429
|
A(n);
|
430
430
|
}
|
431
|
-
},
|
431
|
+
}, r.prototype.error = function(e) {
|
432
432
|
var t = this.partialObserver;
|
433
433
|
if (t.error)
|
434
434
|
try {
|
435
|
-
t.error(
|
435
|
+
t.error(e);
|
436
436
|
} catch (n) {
|
437
437
|
A(n);
|
438
438
|
}
|
439
439
|
else
|
440
|
-
A(
|
441
|
-
},
|
442
|
-
var
|
443
|
-
if (
|
440
|
+
A(e);
|
441
|
+
}, r.prototype.complete = function() {
|
442
|
+
var e = this.partialObserver;
|
443
|
+
if (e.complete)
|
444
444
|
try {
|
445
|
-
|
445
|
+
e.complete();
|
446
446
|
} catch (t) {
|
447
447
|
A(t);
|
448
448
|
}
|
449
|
-
},
|
450
|
-
}(), V = function(
|
451
|
-
x(
|
452
|
-
function
|
453
|
-
var o =
|
449
|
+
}, r;
|
450
|
+
}(), V = function(r) {
|
451
|
+
x(e, r);
|
452
|
+
function e(t, n, i) {
|
453
|
+
var o = r.call(this) || this, s;
|
454
454
|
if (h(t) || !t)
|
455
455
|
s = {
|
456
456
|
next: t ?? void 0,
|
@@ -469,13 +469,13 @@ var It = function() {
|
|
469
469
|
}
|
470
470
|
return o.destination = new It(s), o;
|
471
471
|
}
|
472
|
-
return
|
472
|
+
return e;
|
473
473
|
}(B);
|
474
|
-
function A(
|
475
|
-
et(
|
474
|
+
function A(r) {
|
475
|
+
et(r);
|
476
476
|
}
|
477
|
-
function Pt(
|
478
|
-
throw
|
477
|
+
function Pt(r) {
|
478
|
+
throw r;
|
479
479
|
}
|
480
480
|
var Ot = {
|
481
481
|
closed: !0,
|
@@ -485,42 +485,42 @@ var Ot = {
|
|
485
485
|
}, q = function() {
|
486
486
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
487
487
|
}();
|
488
|
-
function Ut(
|
489
|
-
return
|
488
|
+
function Ut(r) {
|
489
|
+
return r;
|
490
490
|
}
|
491
|
-
function At(
|
492
|
-
return
|
493
|
-
return
|
491
|
+
function At(r) {
|
492
|
+
return r.length === 0 ? Ut : r.length === 1 ? r[0] : function(t) {
|
493
|
+
return r.reduce(function(n, i) {
|
494
494
|
return i(n);
|
495
495
|
}, t);
|
496
496
|
};
|
497
497
|
}
|
498
498
|
var b = function() {
|
499
|
-
function e
|
500
|
-
|
501
|
-
}
|
502
|
-
return
|
503
|
-
var t = new
|
504
|
-
return t.source = this, t.operator =
|
505
|
-
},
|
506
|
-
var i = this, o = $t(
|
499
|
+
function r(e) {
|
500
|
+
e && (this._subscribe = e);
|
501
|
+
}
|
502
|
+
return r.prototype.lift = function(e) {
|
503
|
+
var t = new r();
|
504
|
+
return t.source = this, t.operator = e, t;
|
505
|
+
}, r.prototype.subscribe = function(e, t, n) {
|
506
|
+
var i = this, o = $t(e) ? e : new V(e, t, n);
|
507
507
|
return T(function() {
|
508
508
|
var s = i, u = s.operator, a = s.source;
|
509
509
|
o.add(u ? u.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
|
510
510
|
}), o;
|
511
|
-
},
|
511
|
+
}, r.prototype._trySubscribe = function(e) {
|
512
512
|
try {
|
513
|
-
return this._subscribe(
|
513
|
+
return this._subscribe(e);
|
514
514
|
} catch (t) {
|
515
|
-
|
515
|
+
e.error(t);
|
516
516
|
}
|
517
|
-
},
|
517
|
+
}, r.prototype.forEach = function(e, t) {
|
518
518
|
var n = this;
|
519
519
|
return t = K(t), new t(function(i, o) {
|
520
520
|
var s = new V({
|
521
521
|
next: function(u) {
|
522
522
|
try {
|
523
|
-
|
523
|
+
e(u);
|
524
524
|
} catch (a) {
|
525
525
|
o(a), s.unsubscribe();
|
526
526
|
}
|
@@ -530,18 +530,18 @@ var b = function() {
|
|
530
530
|
});
|
531
531
|
n.subscribe(s);
|
532
532
|
});
|
533
|
-
},
|
533
|
+
}, r.prototype._subscribe = function(e) {
|
534
534
|
var t;
|
535
|
-
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(
|
536
|
-
},
|
535
|
+
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e);
|
536
|
+
}, r.prototype[q] = function() {
|
537
537
|
return this;
|
538
|
-
},
|
539
|
-
for (var
|
540
|
-
|
541
|
-
return At(
|
542
|
-
},
|
538
|
+
}, r.prototype.pipe = function() {
|
539
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
540
|
+
e[t] = arguments[t];
|
541
|
+
return At(e)(this);
|
542
|
+
}, r.prototype.toPromise = function(e) {
|
543
543
|
var t = this;
|
544
|
-
return
|
544
|
+
return e = K(e), new e(function(n, i) {
|
545
545
|
var o;
|
546
546
|
t.subscribe(function(s) {
|
547
547
|
return o = s;
|
@@ -551,29 +551,29 @@ var b = function() {
|
|
551
551
|
return n(o);
|
552
552
|
});
|
553
553
|
});
|
554
|
-
},
|
555
|
-
return new e
|
556
|
-
},
|
554
|
+
}, r.create = function(e) {
|
555
|
+
return new r(e);
|
556
|
+
}, r;
|
557
557
|
}();
|
558
|
-
function K(
|
559
|
-
var
|
560
|
-
return (
|
558
|
+
function K(r) {
|
559
|
+
var e;
|
560
|
+
return (e = r ?? tt.Promise) !== null && e !== void 0 ? e : Promise;
|
561
561
|
}
|
562
|
-
function Tt(
|
563
|
-
return
|
562
|
+
function Tt(r) {
|
563
|
+
return r && h(r.next) && h(r.error) && h(r.complete);
|
564
564
|
}
|
565
|
-
function $t(
|
566
|
-
return
|
565
|
+
function $t(r) {
|
566
|
+
return r && r instanceof B || Tt(r) && N(r);
|
567
567
|
}
|
568
|
-
function kt(
|
569
|
-
return h(
|
568
|
+
function kt(r) {
|
569
|
+
return h(r == null ? void 0 : r.lift);
|
570
570
|
}
|
571
|
-
function I(
|
572
|
-
return function(
|
573
|
-
if (kt(
|
574
|
-
return
|
571
|
+
function I(r) {
|
572
|
+
return function(e) {
|
573
|
+
if (kt(e))
|
574
|
+
return e.lift(function(t) {
|
575
575
|
try {
|
576
|
-
return
|
576
|
+
return r(t, this);
|
577
577
|
} catch (n) {
|
578
578
|
this.error(n);
|
579
579
|
}
|
@@ -581,20 +581,20 @@ function I(e) {
|
|
581
581
|
throw new TypeError("Unable to lift unknown Observable type");
|
582
582
|
};
|
583
583
|
}
|
584
|
-
function _(
|
585
|
-
return new jt(
|
584
|
+
function _(r, e, t, n, i) {
|
585
|
+
return new jt(r, e, t, n, i);
|
586
586
|
}
|
587
|
-
var jt = function(
|
588
|
-
x(
|
589
|
-
function
|
590
|
-
var a =
|
587
|
+
var jt = function(r) {
|
588
|
+
x(e, r);
|
589
|
+
function e(t, n, i, o, s, u) {
|
590
|
+
var a = r.call(this, t) || this;
|
591
591
|
return a.onFinalize = s, a.shouldUnsubscribe = u, a._next = n ? function(c) {
|
592
592
|
try {
|
593
593
|
n(c);
|
594
594
|
} catch (l) {
|
595
595
|
t.error(l);
|
596
596
|
}
|
597
|
-
} :
|
597
|
+
} : r.prototype._next, a._error = o ? function(c) {
|
598
598
|
try {
|
599
599
|
o(c);
|
600
600
|
} catch (l) {
|
@@ -602,7 +602,7 @@ var jt = function(e) {
|
|
602
602
|
} finally {
|
603
603
|
this.unsubscribe();
|
604
604
|
}
|
605
|
-
} :
|
605
|
+
} : r.prototype._error, a._complete = i ? function() {
|
606
606
|
try {
|
607
607
|
i();
|
608
608
|
} catch (c) {
|
@@ -610,32 +610,32 @@ var jt = function(e) {
|
|
610
610
|
} finally {
|
611
611
|
this.unsubscribe();
|
612
612
|
}
|
613
|
-
} :
|
613
|
+
} : r.prototype._complete, a;
|
614
614
|
}
|
615
|
-
return
|
615
|
+
return e.prototype.unsubscribe = function() {
|
616
616
|
var t;
|
617
617
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
618
618
|
var n = this.closed;
|
619
|
-
|
619
|
+
r.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
620
620
|
}
|
621
|
-
},
|
622
|
-
}(B), Ct = X(function(
|
621
|
+
}, e;
|
622
|
+
}(B), Ct = X(function(r) {
|
623
623
|
return function() {
|
624
|
-
|
624
|
+
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
625
625
|
};
|
626
|
-
}), m = function(
|
627
|
-
x(
|
628
|
-
function
|
629
|
-
var t =
|
626
|
+
}), m = function(r) {
|
627
|
+
x(e, r);
|
628
|
+
function e() {
|
629
|
+
var t = r.call(this) || this;
|
630
630
|
return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
|
631
631
|
}
|
632
|
-
return
|
632
|
+
return e.prototype.lift = function(t) {
|
633
633
|
var n = new J(this, this);
|
634
634
|
return n.operator = t, n;
|
635
|
-
},
|
635
|
+
}, e.prototype._throwIfClosed = function() {
|
636
636
|
if (this.closed)
|
637
637
|
throw new Ct();
|
638
|
-
},
|
638
|
+
}, e.prototype.next = function(t) {
|
639
639
|
var n = this;
|
640
640
|
T(function() {
|
641
641
|
var i, o;
|
@@ -658,7 +658,7 @@ var jt = function(e) {
|
|
658
658
|
}
|
659
659
|
}
|
660
660
|
});
|
661
|
-
},
|
661
|
+
}, e.prototype.error = function(t) {
|
662
662
|
var n = this;
|
663
663
|
T(function() {
|
664
664
|
if (n._throwIfClosed(), !n.isStopped) {
|
@@ -667,7 +667,7 @@ var jt = function(e) {
|
|
667
667
|
i.shift().error(t);
|
668
668
|
}
|
669
669
|
});
|
670
|
-
},
|
670
|
+
}, e.prototype.complete = function() {
|
671
671
|
var t = this;
|
672
672
|
T(function() {
|
673
673
|
if (t._throwIfClosed(), !t.isStopped) {
|
@@ -676,116 +676,116 @@ var jt = function(e) {
|
|
676
676
|
n.shift().complete();
|
677
677
|
}
|
678
678
|
});
|
679
|
-
},
|
679
|
+
}, e.prototype.unsubscribe = function() {
|
680
680
|
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
681
|
-
}, Object.defineProperty(
|
681
|
+
}, Object.defineProperty(e.prototype, "observed", {
|
682
682
|
get: function() {
|
683
683
|
var t;
|
684
684
|
return ((t = this.observers) === null || t === void 0 ? void 0 : t.length) > 0;
|
685
685
|
},
|
686
686
|
enumerable: !1,
|
687
687
|
configurable: !0
|
688
|
-
}),
|
689
|
-
return this._throwIfClosed(),
|
690
|
-
},
|
688
|
+
}), e.prototype._trySubscribe = function(t) {
|
689
|
+
return this._throwIfClosed(), r.prototype._trySubscribe.call(this, t);
|
690
|
+
}, e.prototype._subscribe = function(t) {
|
691
691
|
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
|
692
|
-
},
|
692
|
+
}, e.prototype._innerSubscribe = function(t) {
|
693
693
|
var n = this, i = this, o = i.hasError, s = i.isStopped, u = i.observers;
|
694
694
|
return o || s ? Z : (this.currentObservers = null, u.push(t), new j(function() {
|
695
695
|
n.currentObservers = null, D(u, t);
|
696
696
|
}));
|
697
|
-
},
|
697
|
+
}, e.prototype._checkFinalizedStatuses = function(t) {
|
698
698
|
var n = this, i = n.hasError, o = n.thrownError, s = n.isStopped;
|
699
699
|
i ? t.error(o) : s && t.complete();
|
700
|
-
},
|
700
|
+
}, e.prototype.asObservable = function() {
|
701
701
|
var t = new b();
|
702
702
|
return t.source = this, t;
|
703
|
-
},
|
703
|
+
}, e.create = function(t, n) {
|
704
704
|
return new J(t, n);
|
705
|
-
},
|
706
|
-
}(b), J = function(
|
707
|
-
x(
|
708
|
-
function
|
709
|
-
var i =
|
705
|
+
}, e;
|
706
|
+
}(b), J = function(r) {
|
707
|
+
x(e, r);
|
708
|
+
function e(t, n) {
|
709
|
+
var i = r.call(this) || this;
|
710
710
|
return i.destination = t, i.source = n, i;
|
711
711
|
}
|
712
|
-
return
|
712
|
+
return e.prototype.next = function(t) {
|
713
713
|
var n, i;
|
714
714
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, t);
|
715
|
-
},
|
715
|
+
}, e.prototype.error = function(t) {
|
716
716
|
var n, i;
|
717
717
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, t);
|
718
|
-
},
|
718
|
+
}, e.prototype.complete = function() {
|
719
719
|
var t, n;
|
720
720
|
(n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
|
721
|
-
},
|
721
|
+
}, e.prototype._subscribe = function(t) {
|
722
722
|
var n, i;
|
723
723
|
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && i !== void 0 ? i : Z;
|
724
|
-
},
|
725
|
-
}(m), rt = function(
|
726
|
-
x(
|
727
|
-
function
|
728
|
-
var n =
|
724
|
+
}, e;
|
725
|
+
}(m), rt = function(r) {
|
726
|
+
x(e, r);
|
727
|
+
function e(t) {
|
728
|
+
var n = r.call(this) || this;
|
729
729
|
return n._value = t, n;
|
730
730
|
}
|
731
|
-
return Object.defineProperty(
|
731
|
+
return Object.defineProperty(e.prototype, "value", {
|
732
732
|
get: function() {
|
733
733
|
return this.getValue();
|
734
734
|
},
|
735
735
|
enumerable: !1,
|
736
736
|
configurable: !0
|
737
|
-
}),
|
738
|
-
var n =
|
737
|
+
}), e.prototype._subscribe = function(t) {
|
738
|
+
var n = r.prototype._subscribe.call(this, t);
|
739
739
|
return !n.closed && t.next(this._value), n;
|
740
|
-
},
|
740
|
+
}, e.prototype.getValue = function() {
|
741
741
|
var t = this, n = t.hasError, i = t.thrownError, o = t._value;
|
742
742
|
if (n)
|
743
743
|
throw i;
|
744
744
|
return this._throwIfClosed(), o;
|
745
|
-
},
|
746
|
-
|
747
|
-
},
|
748
|
-
}(m), Rt = new b(function(
|
749
|
-
return
|
745
|
+
}, e.prototype.next = function(t) {
|
746
|
+
r.prototype.next.call(this, this._value = t);
|
747
|
+
}, e;
|
748
|
+
}(m), Rt = new b(function(r) {
|
749
|
+
return r.complete();
|
750
750
|
});
|
751
|
-
function Ft(
|
752
|
-
return
|
751
|
+
function Ft(r) {
|
752
|
+
return r && h(r.schedule);
|
753
753
|
}
|
754
|
-
function Lt(
|
755
|
-
return
|
754
|
+
function Lt(r) {
|
755
|
+
return r[r.length - 1];
|
756
756
|
}
|
757
|
-
function Dt(
|
758
|
-
return Ft(Lt(
|
757
|
+
function Dt(r) {
|
758
|
+
return Ft(Lt(r)) ? r.pop() : void 0;
|
759
759
|
}
|
760
|
-
var nt = function(
|
761
|
-
return
|
760
|
+
var nt = function(r) {
|
761
|
+
return r && typeof r.length == "number" && typeof r != "function";
|
762
762
|
};
|
763
|
-
function it(
|
764
|
-
return h(
|
763
|
+
function it(r) {
|
764
|
+
return h(r == null ? void 0 : r.then);
|
765
765
|
}
|
766
|
-
function ot(
|
767
|
-
return h(
|
766
|
+
function ot(r) {
|
767
|
+
return h(r[q]);
|
768
768
|
}
|
769
|
-
function st(
|
770
|
-
return Symbol.asyncIterator && h(
|
769
|
+
function st(r) {
|
770
|
+
return Symbol.asyncIterator && h(r == null ? void 0 : r[Symbol.asyncIterator]);
|
771
771
|
}
|
772
|
-
function ut(
|
773
|
-
return new TypeError("You provided " + (
|
772
|
+
function ut(r) {
|
773
|
+
return new TypeError("You provided " + (r !== null && typeof r == "object" ? "an invalid object" : "'" + r + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
|
774
774
|
}
|
775
775
|
function Mt() {
|
776
776
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
777
777
|
}
|
778
778
|
var ct = Mt();
|
779
|
-
function at(
|
780
|
-
return h(
|
779
|
+
function at(r) {
|
780
|
+
return h(r == null ? void 0 : r[ct]);
|
781
781
|
}
|
782
|
-
function lt(
|
782
|
+
function lt(r) {
|
783
783
|
return xt(this, arguments, function() {
|
784
784
|
var t, n, i, o;
|
785
785
|
return W(this, function(s) {
|
786
786
|
switch (s.label) {
|
787
787
|
case 0:
|
788
|
-
t =
|
788
|
+
t = r.getReader(), s.label = 1;
|
789
789
|
case 1:
|
790
790
|
s.trys.push([1, , 9, 10]), s.label = 2;
|
791
791
|
case 2:
|
@@ -810,59 +810,59 @@ function lt(e) {
|
|
810
810
|
});
|
811
811
|
});
|
812
812
|
}
|
813
|
-
function ft(
|
814
|
-
return h(
|
813
|
+
function ft(r) {
|
814
|
+
return h(r == null ? void 0 : r.getReader);
|
815
815
|
}
|
816
|
-
function P(
|
817
|
-
if (
|
818
|
-
return
|
819
|
-
if (
|
820
|
-
if (ot(
|
821
|
-
return Yt(
|
822
|
-
if (nt(
|
823
|
-
return Vt(
|
824
|
-
if (it(
|
825
|
-
return Bt(
|
826
|
-
if (st(
|
827
|
-
return ht(
|
828
|
-
if (at(
|
829
|
-
return qt(
|
830
|
-
if (ft(
|
831
|
-
return Ht(
|
832
|
-
}
|
833
|
-
throw ut(
|
834
|
-
}
|
835
|
-
function Yt(
|
836
|
-
return new b(function(
|
837
|
-
var t =
|
816
|
+
function P(r) {
|
817
|
+
if (r instanceof b)
|
818
|
+
return r;
|
819
|
+
if (r != null) {
|
820
|
+
if (ot(r))
|
821
|
+
return Yt(r);
|
822
|
+
if (nt(r))
|
823
|
+
return Vt(r);
|
824
|
+
if (it(r))
|
825
|
+
return Bt(r);
|
826
|
+
if (st(r))
|
827
|
+
return ht(r);
|
828
|
+
if (at(r))
|
829
|
+
return qt(r);
|
830
|
+
if (ft(r))
|
831
|
+
return Ht(r);
|
832
|
+
}
|
833
|
+
throw ut(r);
|
834
|
+
}
|
835
|
+
function Yt(r) {
|
836
|
+
return new b(function(e) {
|
837
|
+
var t = r[q]();
|
838
838
|
if (h(t.subscribe))
|
839
|
-
return t.subscribe(
|
839
|
+
return t.subscribe(e);
|
840
840
|
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
841
841
|
});
|
842
842
|
}
|
843
|
-
function Vt(
|
844
|
-
return new b(function(
|
845
|
-
for (var t = 0; t <
|
846
|
-
|
847
|
-
|
843
|
+
function Vt(r) {
|
844
|
+
return new b(function(e) {
|
845
|
+
for (var t = 0; t < r.length && !e.closed; t++)
|
846
|
+
e.next(r[t]);
|
847
|
+
e.complete();
|
848
848
|
});
|
849
849
|
}
|
850
|
-
function Bt(
|
851
|
-
return new b(function(
|
852
|
-
|
853
|
-
|
850
|
+
function Bt(r) {
|
851
|
+
return new b(function(e) {
|
852
|
+
r.then(function(t) {
|
853
|
+
e.closed || (e.next(t), e.complete());
|
854
854
|
}, function(t) {
|
855
|
-
return
|
855
|
+
return e.error(t);
|
856
856
|
}).then(null, et);
|
857
857
|
});
|
858
858
|
}
|
859
|
-
function qt(
|
860
|
-
return new b(function(
|
859
|
+
function qt(r) {
|
860
|
+
return new b(function(e) {
|
861
861
|
var t, n;
|
862
862
|
try {
|
863
|
-
for (var i = g(
|
863
|
+
for (var i = g(r), o = i.next(); !o.done; o = i.next()) {
|
864
864
|
var s = o.value;
|
865
|
-
if (
|
865
|
+
if (e.next(s), e.closed)
|
866
866
|
return;
|
867
867
|
}
|
868
868
|
} catch (u) {
|
@@ -875,33 +875,33 @@ function qt(e) {
|
|
875
875
|
throw t.error;
|
876
876
|
}
|
877
877
|
}
|
878
|
-
|
878
|
+
e.complete();
|
879
879
|
});
|
880
880
|
}
|
881
|
-
function ht(
|
882
|
-
return new b(function(
|
883
|
-
Gt(
|
884
|
-
return
|
881
|
+
function ht(r) {
|
882
|
+
return new b(function(e) {
|
883
|
+
Gt(r, e).catch(function(t) {
|
884
|
+
return e.error(t);
|
885
885
|
});
|
886
886
|
});
|
887
887
|
}
|
888
|
-
function Ht(
|
889
|
-
return ht(lt(
|
888
|
+
function Ht(r) {
|
889
|
+
return ht(lt(r));
|
890
890
|
}
|
891
|
-
function Gt(
|
891
|
+
function Gt(r, e) {
|
892
892
|
var t, n, i, o;
|
893
893
|
return gt(this, void 0, void 0, function() {
|
894
894
|
var s, u;
|
895
895
|
return W(this, function(a) {
|
896
896
|
switch (a.label) {
|
897
897
|
case 0:
|
898
|
-
a.trys.push([0, 5, 6, 11]), t = Et(
|
898
|
+
a.trys.push([0, 5, 6, 11]), t = Et(r), a.label = 1;
|
899
899
|
case 1:
|
900
900
|
return [4, t.next()];
|
901
901
|
case 2:
|
902
902
|
if (n = a.sent(), !!n.done)
|
903
903
|
return [3, 4];
|
904
|
-
if (s = n.value,
|
904
|
+
if (s = n.value, e.next(s), e.closed)
|
905
905
|
return [2];
|
906
906
|
a.label = 3;
|
907
907
|
case 3:
|
@@ -923,62 +923,62 @@ function Gt(e, r) {
|
|
923
923
|
case 10:
|
924
924
|
return [7];
|
925
925
|
case 11:
|
926
|
-
return
|
926
|
+
return e.complete(), [2];
|
927
927
|
}
|
928
928
|
});
|
929
929
|
});
|
930
930
|
}
|
931
|
-
function w(
|
931
|
+
function w(r, e, t, n, i) {
|
932
932
|
n === void 0 && (n = 0), i === void 0 && (i = !1);
|
933
|
-
var o =
|
934
|
-
t(), i ?
|
933
|
+
var o = e.schedule(function() {
|
934
|
+
t(), i ? r.add(this.schedule(null, n)) : this.unsubscribe();
|
935
935
|
}, n);
|
936
|
-
if (
|
936
|
+
if (r.add(o), !i)
|
937
937
|
return o;
|
938
938
|
}
|
939
|
-
function
|
940
|
-
return
|
939
|
+
function dt(r, e) {
|
940
|
+
return e === void 0 && (e = 0), I(function(t, n) {
|
941
941
|
t.subscribe(_(n, function(i) {
|
942
|
-
return w(n,
|
942
|
+
return w(n, r, function() {
|
943
943
|
return n.next(i);
|
944
|
-
},
|
944
|
+
}, e);
|
945
945
|
}, function() {
|
946
|
-
return w(n,
|
946
|
+
return w(n, r, function() {
|
947
947
|
return n.complete();
|
948
|
-
},
|
948
|
+
}, e);
|
949
949
|
}, function(i) {
|
950
|
-
return w(n,
|
950
|
+
return w(n, r, function() {
|
951
951
|
return n.error(i);
|
952
|
-
},
|
952
|
+
}, e);
|
953
953
|
}));
|
954
954
|
});
|
955
955
|
}
|
956
|
-
function
|
957
|
-
return
|
958
|
-
n.add(
|
956
|
+
function pt(r, e) {
|
957
|
+
return e === void 0 && (e = 0), I(function(t, n) {
|
958
|
+
n.add(r.schedule(function() {
|
959
959
|
return t.subscribe(n);
|
960
|
-
},
|
960
|
+
}, e));
|
961
961
|
});
|
962
962
|
}
|
963
|
-
function zt(
|
964
|
-
return P(
|
963
|
+
function zt(r, e) {
|
964
|
+
return P(r).pipe(pt(e), dt(e));
|
965
965
|
}
|
966
|
-
function Kt(
|
967
|
-
return P(
|
966
|
+
function Kt(r, e) {
|
967
|
+
return P(r).pipe(pt(e), dt(e));
|
968
968
|
}
|
969
|
-
function Jt(
|
969
|
+
function Jt(r, e) {
|
970
970
|
return new b(function(t) {
|
971
971
|
var n = 0;
|
972
|
-
return
|
973
|
-
n ===
|
972
|
+
return e.schedule(function() {
|
973
|
+
n === r.length ? t.complete() : (t.next(r[n++]), t.closed || this.schedule());
|
974
974
|
});
|
975
975
|
});
|
976
976
|
}
|
977
|
-
function Qt(
|
977
|
+
function Qt(r, e) {
|
978
978
|
return new b(function(t) {
|
979
979
|
var n;
|
980
|
-
return w(t,
|
981
|
-
n =
|
980
|
+
return w(t, e, function() {
|
981
|
+
n = r[ct](), w(t, e, function() {
|
982
982
|
var i, o, s;
|
983
983
|
try {
|
984
984
|
i = n.next(), o = i.value, s = i.done;
|
@@ -993,13 +993,13 @@ function Qt(e, r) {
|
|
993
993
|
};
|
994
994
|
});
|
995
995
|
}
|
996
|
-
function vt(
|
997
|
-
if (!
|
996
|
+
function vt(r, e) {
|
997
|
+
if (!r)
|
998
998
|
throw new Error("Iterable cannot be null");
|
999
999
|
return new b(function(t) {
|
1000
|
-
w(t,
|
1001
|
-
var n =
|
1002
|
-
w(t,
|
1000
|
+
w(t, e, function() {
|
1001
|
+
var n = r[Symbol.asyncIterator]();
|
1002
|
+
w(t, e, function() {
|
1003
1003
|
n.next().then(function(i) {
|
1004
1004
|
i.done ? t.complete() : t.next(i.value);
|
1005
1005
|
});
|
@@ -1007,46 +1007,46 @@ function vt(e, r) {
|
|
1007
1007
|
});
|
1008
1008
|
});
|
1009
1009
|
}
|
1010
|
-
function Wt(
|
1011
|
-
return vt(lt(
|
1012
|
-
}
|
1013
|
-
function Xt(
|
1014
|
-
if (
|
1015
|
-
if (ot(
|
1016
|
-
return zt(
|
1017
|
-
if (nt(
|
1018
|
-
return Jt(
|
1019
|
-
if (it(
|
1020
|
-
return Kt(
|
1021
|
-
if (st(
|
1022
|
-
return vt(
|
1023
|
-
if (at(
|
1024
|
-
return Qt(
|
1025
|
-
if (ft(
|
1026
|
-
return Wt(
|
1027
|
-
}
|
1028
|
-
throw ut(
|
1029
|
-
}
|
1030
|
-
function Zt(
|
1031
|
-
return
|
1010
|
+
function Wt(r, e) {
|
1011
|
+
return vt(lt(r), e);
|
1012
|
+
}
|
1013
|
+
function Xt(r, e) {
|
1014
|
+
if (r != null) {
|
1015
|
+
if (ot(r))
|
1016
|
+
return zt(r, e);
|
1017
|
+
if (nt(r))
|
1018
|
+
return Jt(r, e);
|
1019
|
+
if (it(r))
|
1020
|
+
return Kt(r, e);
|
1021
|
+
if (st(r))
|
1022
|
+
return vt(r, e);
|
1023
|
+
if (at(r))
|
1024
|
+
return Qt(r, e);
|
1025
|
+
if (ft(r))
|
1026
|
+
return Wt(r, e);
|
1027
|
+
}
|
1028
|
+
throw ut(r);
|
1029
|
+
}
|
1030
|
+
function Zt(r, e) {
|
1031
|
+
return e ? Xt(r, e) : P(r);
|
1032
1032
|
}
|
1033
1033
|
function Nt() {
|
1034
|
-
for (var
|
1035
|
-
e
|
1036
|
-
var t = Dt(
|
1037
|
-
return Zt(
|
1034
|
+
for (var r = [], e = 0; e < arguments.length; e++)
|
1035
|
+
r[e] = arguments[e];
|
1036
|
+
var t = Dt(r);
|
1037
|
+
return Zt(r, t);
|
1038
1038
|
}
|
1039
|
-
function Q(
|
1040
|
-
return
|
1039
|
+
function Q(r) {
|
1040
|
+
return r <= 0 ? function() {
|
1041
1041
|
return Rt;
|
1042
|
-
} : I(function(
|
1042
|
+
} : I(function(e, t) {
|
1043
1043
|
var n = 0;
|
1044
|
-
|
1045
|
-
++n <=
|
1044
|
+
e.subscribe(_(t, function(i) {
|
1045
|
+
++n <= r && (t.next(i), r <= n && t.complete());
|
1046
1046
|
}));
|
1047
1047
|
});
|
1048
1048
|
}
|
1049
|
-
function te(
|
1049
|
+
function te(r, e) {
|
1050
1050
|
return I(function(t, n) {
|
1051
1051
|
var i = null, o = 0, s = !1, u = function() {
|
1052
1052
|
return s && !i && n.complete();
|
@@ -1054,8 +1054,8 @@ function te(e, r) {
|
|
1054
1054
|
t.subscribe(_(n, function(a) {
|
1055
1055
|
i == null || i.unsubscribe();
|
1056
1056
|
var c = 0, l = o++;
|
1057
|
-
P(
|
1058
|
-
return n.next(
|
1057
|
+
P(r(a, l)).subscribe(i = _(n, function(v) {
|
1058
|
+
return n.next(e ? e(a, v, l, c++) : v);
|
1059
1059
|
}, function() {
|
1060
1060
|
i = null, u();
|
1061
1061
|
}));
|
@@ -1064,16 +1064,16 @@ function te(e, r) {
|
|
1064
1064
|
}));
|
1065
1065
|
});
|
1066
1066
|
}
|
1067
|
-
function ee(
|
1068
|
-
return I(function(
|
1069
|
-
P(
|
1067
|
+
function ee(r) {
|
1068
|
+
return I(function(e, t) {
|
1069
|
+
P(r).subscribe(_(t, function() {
|
1070
1070
|
return t.complete();
|
1071
|
-
}, Y)), !t.closed &&
|
1071
|
+
}, Y)), !t.closed && e.subscribe(t);
|
1072
1072
|
});
|
1073
1073
|
}
|
1074
1074
|
class re {
|
1075
|
-
constructor(
|
1076
|
-
this.id =
|
1075
|
+
constructor(e, t, n) {
|
1076
|
+
this.id = e, this.component = t, this.platform = n, this.entries$ = new rt([]), this.kill$ = new m(), this.queue = [], t.addEventListener("user-submit", (i) => {
|
1077
1077
|
if (!this.provider) {
|
1078
1078
|
console.warn(
|
1079
1079
|
"No provider activated, unable to print message to conversation."
|
@@ -1083,38 +1083,38 @@ class re {
|
|
1083
1083
|
this.provider.onUserSubmit(i.detail);
|
1084
1084
|
});
|
1085
1085
|
}
|
1086
|
-
write(
|
1087
|
-
this.addEntryRemoveHandler(
|
1088
|
-
this.entries$.next([...t,
|
1086
|
+
write(e) {
|
1087
|
+
this.addEntryRemoveHandler(e), this.entries$.pipe(Q(1)).subscribe((t) => {
|
1088
|
+
this.entries$.next([...t, e]);
|
1089
1089
|
});
|
1090
1090
|
}
|
1091
1091
|
entries() {
|
1092
1092
|
return this.entries$.asObservable();
|
1093
1093
|
}
|
1094
|
-
setProvider(
|
1095
|
-
this.provider =
|
1094
|
+
setProvider(e) {
|
1095
|
+
this.provider = e, this.provider.actions().pipe(ee(this.kill$)).subscribe((t) => {
|
1096
1096
|
this.write(t);
|
1097
1097
|
}), this.provider.connect();
|
1098
1098
|
}
|
1099
|
-
handover(
|
1100
|
-
const t = this.platform.registeredProviders.get(
|
1099
|
+
handover(e) {
|
1100
|
+
const t = this.platform.registeredProviders.get(e);
|
1101
1101
|
if (t) {
|
1102
1102
|
this.provider && this.queue.unshift(this.provider), this.kill$.next();
|
1103
1103
|
const n = t(this);
|
1104
1104
|
this.setProvider(n);
|
1105
1105
|
}
|
1106
1106
|
}
|
1107
|
-
addEntryRemoveHandler(
|
1108
|
-
|
1107
|
+
addEntryRemoveHandler(e) {
|
1108
|
+
e.remove$.pipe(
|
1109
1109
|
te(() => this.entries$),
|
1110
1110
|
Q(1)
|
1111
1111
|
).subscribe((t) => {
|
1112
|
-
this.entries$.next(t.filter((n) => n !==
|
1112
|
+
this.entries$.next(t.filter((n) => n !== e));
|
1113
1113
|
});
|
1114
1114
|
}
|
1115
1115
|
completeProvider() {
|
1116
|
-
const [
|
1117
|
-
|
1116
|
+
const [e] = this.queue;
|
1117
|
+
e && this.setProvider(e);
|
1118
1118
|
}
|
1119
1119
|
isTyping() {
|
1120
1120
|
return this.provider ? this.provider.isTyping() : Nt(!1);
|
@@ -1124,23 +1124,23 @@ class H {
|
|
1124
1124
|
constructor() {
|
1125
1125
|
this.sessions = /* @__PURE__ */ new Map(), this.registeredProviders = /* @__PURE__ */ new Map(), this.activeSessionId = null;
|
1126
1126
|
}
|
1127
|
-
static async getInstance(
|
1128
|
-
let t = await
|
1129
|
-
return t || (t = new H(), await
|
1127
|
+
static async getInstance(e) {
|
1128
|
+
let t = await e.get("conversation");
|
1129
|
+
return t || (t = new H(), await e.register("conversation", t), t);
|
1130
1130
|
}
|
1131
|
-
registerProvider(
|
1132
|
-
this.registeredProviders.set(
|
1131
|
+
registerProvider(e, t) {
|
1132
|
+
this.registeredProviders.set(e, t);
|
1133
1133
|
}
|
1134
|
-
createSession(
|
1135
|
-
const t = new re(St(),
|
1134
|
+
createSession(e) {
|
1135
|
+
const t = new re(St(), e, this), n = this.getProviderByConfiguration(e);
|
1136
1136
|
if (n) {
|
1137
1137
|
const i = n(t);
|
1138
1138
|
t.setProvider(i);
|
1139
1139
|
}
|
1140
1140
|
return this.sessions.set(t.id, t), this.activeSessionId = t.id, t;
|
1141
1141
|
}
|
1142
|
-
getProviderByConfiguration(
|
1143
|
-
const [t] =
|
1142
|
+
getProviderByConfiguration(e) {
|
1143
|
+
const [t] = e.properties.providers || [];
|
1144
1144
|
if (!t) {
|
1145
1145
|
console.warn(
|
1146
1146
|
"No providers registered. You most likely forgot to add a provider to the conversation component properties."
|
@@ -1150,36 +1150,39 @@ class H {
|
|
1150
1150
|
return this.registeredProviders.get(t);
|
1151
1151
|
}
|
1152
1152
|
}
|
1153
|
-
const se = async (
|
1154
|
-
|
1153
|
+
const se = async (r) => {
|
1154
|
+
r.registerComponent("conversation", import("./conversation-870f3fc5.mjs")), await H.getInstance(r.container);
|
1155
1155
|
};
|
1156
|
-
var O = /* @__PURE__ */ ((
|
1156
|
+
var O = /* @__PURE__ */ ((r) => (r.User = "user", r.Agent = "agent", r.System = "system", r))(O || {});
|
1157
1157
|
class C {
|
1158
|
-
constructor(
|
1159
|
-
this.type =
|
1158
|
+
constructor(e, t, n) {
|
1159
|
+
this.type = e, this.sender = t, this.messages = n, this.status = "delivered", this.didUpdate = new m(), this.actions$ = new m(), this.remove$ = new m(), this.timestamp = Date.now();
|
1160
1160
|
}
|
1161
|
-
update(
|
1161
|
+
update(e) {
|
1162
1162
|
this.messages = [
|
1163
1163
|
{
|
1164
|
-
items:
|
1164
|
+
items: e
|
1165
1165
|
}
|
1166
1166
|
], this.didUpdate.next(this);
|
1167
1167
|
}
|
1168
|
+
setStatus(e) {
|
1169
|
+
this.status = e, this.didUpdate.next(this);
|
1170
|
+
}
|
1168
1171
|
remove() {
|
1169
1172
|
this.remove$.next();
|
1170
1173
|
}
|
1171
1174
|
}
|
1172
1175
|
class ne {
|
1173
|
-
constructor(
|
1174
|
-
this.name =
|
1176
|
+
constructor(e) {
|
1177
|
+
this.name = e, this.print$ = new m();
|
1175
1178
|
}
|
1176
|
-
print(
|
1179
|
+
print(e) {
|
1177
1180
|
const t = new C(
|
1178
1181
|
O.Agent,
|
1179
1182
|
{ name: this.name },
|
1180
1183
|
[
|
1181
1184
|
{
|
1182
|
-
items: [["html", { content:
|
1185
|
+
items: [["html", { content: e }]]
|
1183
1186
|
}
|
1184
1187
|
]
|
1185
1188
|
);
|
@@ -1190,16 +1193,16 @@ class ne {
|
|
1190
1193
|
}
|
1191
1194
|
}
|
1192
1195
|
class ie {
|
1193
|
-
constructor(
|
1194
|
-
this.name =
|
1196
|
+
constructor(e) {
|
1197
|
+
this.name = e, this.print$ = new m();
|
1195
1198
|
}
|
1196
|
-
print(
|
1199
|
+
print(e) {
|
1197
1200
|
const t = new C(
|
1198
1201
|
O.User,
|
1199
1202
|
{ name: this.name },
|
1200
1203
|
[
|
1201
1204
|
{
|
1202
|
-
items: [["html", { content:
|
1205
|
+
items: [["html", { content: e }]]
|
1203
1206
|
}
|
1204
1207
|
]
|
1205
1208
|
);
|
@@ -1213,13 +1216,13 @@ class oe {
|
|
1213
1216
|
constructor() {
|
1214
1217
|
this.print$ = new m(), this.name = "system";
|
1215
1218
|
}
|
1216
|
-
print(
|
1219
|
+
print(e) {
|
1217
1220
|
const t = new C(
|
1218
1221
|
O.System,
|
1219
1222
|
{ name: this.name },
|
1220
1223
|
[
|
1221
1224
|
{
|
1222
|
-
items: [["html", { content:
|
1225
|
+
items: [["html", { content: e }]]
|
1223
1226
|
}
|
1224
1227
|
]
|
1225
1228
|
);
|
@@ -1230,17 +1233,17 @@ class oe {
|
|
1230
1233
|
}
|
1231
1234
|
}
|
1232
1235
|
class ue {
|
1233
|
-
constructor(
|
1234
|
-
this.name =
|
1236
|
+
constructor(e, t) {
|
1237
|
+
this.name = e, this.session = t, this.print$ = new m(), this.typingState$ = new rt(!1), this.system = this.createSystem();
|
1235
1238
|
}
|
1236
1239
|
connect() {
|
1237
1240
|
}
|
1238
|
-
onUserSubmit(
|
1239
|
-
this.print(O.User,
|
1241
|
+
onUserSubmit(e) {
|
1242
|
+
this.print(O.User, e.text);
|
1240
1243
|
}
|
1241
|
-
print(
|
1244
|
+
print(e, t) {
|
1242
1245
|
const n = new C(
|
1243
|
-
|
1246
|
+
e,
|
1244
1247
|
{
|
1245
1248
|
name: ""
|
1246
1249
|
},
|
@@ -1252,32 +1255,32 @@ class ue {
|
|
1252
1255
|
);
|
1253
1256
|
return this.printEntry(n);
|
1254
1257
|
}
|
1255
|
-
printEntry(
|
1256
|
-
return this.print$.next(
|
1258
|
+
printEntry(e) {
|
1259
|
+
return this.print$.next(e), e;
|
1257
1260
|
}
|
1258
|
-
createAgent(
|
1259
|
-
const t = new ne(
|
1261
|
+
createAgent(e) {
|
1262
|
+
const t = new ne(e);
|
1260
1263
|
return t.subscribe().subscribe((n) => {
|
1261
1264
|
this.playNotification(), this.printEntry(n);
|
1262
1265
|
}), t;
|
1263
1266
|
}
|
1264
|
-
createUser(
|
1265
|
-
const t = new ie(
|
1267
|
+
createUser(e) {
|
1268
|
+
const t = new ie(e);
|
1266
1269
|
return t.subscribe().subscribe((n) => {
|
1267
1270
|
this.printEntry(n);
|
1268
1271
|
}), t;
|
1269
1272
|
}
|
1270
1273
|
createSystem() {
|
1271
|
-
const
|
1272
|
-
return
|
1274
|
+
const e = new oe();
|
1275
|
+
return e.subscribe().subscribe((t) => {
|
1273
1276
|
this.printEntry(t);
|
1274
|
-
}),
|
1277
|
+
}), e;
|
1275
1278
|
}
|
1276
|
-
setTypingState(
|
1277
|
-
this.typingState$.next(
|
1279
|
+
setTypingState(e) {
|
1280
|
+
this.typingState$.next(e);
|
1278
1281
|
}
|
1279
|
-
setToastMessage(
|
1280
|
-
this.session.component.setToastMessage(
|
1282
|
+
setToastMessage(e) {
|
1283
|
+
this.session.component.setToastMessage(e);
|
1281
1284
|
}
|
1282
1285
|
isTyping() {
|
1283
1286
|
return this.typingState$.asObservable();
|
@@ -1289,8 +1292,8 @@ class ue {
|
|
1289
1292
|
this.session.completeProvider();
|
1290
1293
|
}
|
1291
1294
|
playNotification() {
|
1292
|
-
const
|
1293
|
-
this.session.component.application.branding().other.disableSound || new Audio(
|
1295
|
+
const e = "https://publicpoc.blob.core.windows.net/widget-assets/notification.mp3";
|
1296
|
+
this.session.component.application.branding().other.disableSound || new Audio(e).play();
|
1294
1297
|
}
|
1295
1298
|
}
|
1296
1299
|
export {
|