@acrobits/ipc-sdk 0.1.4 → 0.1.5-alpha.0
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/docs/interfaces/DetailedContactItem.html +8 -8
- package/docs/interfaces/UriContactItem.html +3 -3
- package/docs/types/HostType.html +1 -1
- package/docs/types/IpcProtocolVersion.html +1 -1
- package/lib/ipc-sdk.js +699 -620
- package/lib/ipc-sdk.js.map +1 -1
- package/lib/ipc-sdk.umd.cjs +3 -3
- package/lib/ipc-sdk.umd.cjs.map +1 -1
- package/package.json +2 -2
package/lib/ipc-sdk.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (
|
|
4
|
-
var C = /* @__PURE__ */ ((
|
|
5
|
-
return
|
|
6
|
-
e.__proto__ =
|
|
7
|
-
} || function(e,
|
|
8
|
-
for (var i in
|
|
9
|
-
Object.prototype.hasOwnProperty.call(
|
|
10
|
-
},
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Ae = (n, t, e) => t in n ? Pe(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var _ = (n, t, e) => (Ae(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var C = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.HostInForeground = "HOST IN FOREGROUND", n))(C || {}), Q = function(n, t) {
|
|
5
|
+
return Q = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
6
|
+
e.__proto__ = r;
|
|
7
|
+
} || function(e, r) {
|
|
8
|
+
for (var i in r)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
10
|
+
}, Q(n, t);
|
|
11
11
|
};
|
|
12
|
-
function x(
|
|
12
|
+
function x(n, t) {
|
|
13
13
|
if (typeof t != "function" && t !== null)
|
|
14
14
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
15
|
-
|
|
15
|
+
Q(n, t);
|
|
16
16
|
function e() {
|
|
17
|
-
this.constructor =
|
|
17
|
+
this.constructor = n;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
var t = typeof Symbol == "function" && Symbol.iterator, e = t &&
|
|
21
|
+
function G(n) {
|
|
22
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], r = 0;
|
|
23
23
|
if (e)
|
|
24
|
-
return e.call(
|
|
25
|
-
if (
|
|
24
|
+
return e.call(n);
|
|
25
|
+
if (n && typeof n.length == "number")
|
|
26
26
|
return {
|
|
27
27
|
next: function() {
|
|
28
|
-
return
|
|
28
|
+
return n && r >= n.length && (n = void 0), { value: n && n[r++], done: !n };
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
32
32
|
}
|
|
33
|
-
function M(
|
|
34
|
-
var e = typeof Symbol == "function" &&
|
|
33
|
+
function M(n, t) {
|
|
34
|
+
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
35
35
|
if (!e)
|
|
36
|
-
return
|
|
37
|
-
var
|
|
36
|
+
return n;
|
|
37
|
+
var r = e.call(n), i, o = [], s;
|
|
38
38
|
try {
|
|
39
|
-
for (; (t === void 0 || t-- > 0) && !(i =
|
|
39
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
40
40
|
o.push(i.value);
|
|
41
41
|
} catch (c) {
|
|
42
42
|
s = { error: c };
|
|
43
43
|
} finally {
|
|
44
44
|
try {
|
|
45
|
-
i && !i.done && (e =
|
|
45
|
+
i && !i.done && (e = r.return) && e.call(r);
|
|
46
46
|
} finally {
|
|
47
47
|
if (s)
|
|
48
48
|
throw s.error;
|
|
@@ -50,54 +50,54 @@ function M(r, t) {
|
|
|
50
50
|
}
|
|
51
51
|
return o;
|
|
52
52
|
}
|
|
53
|
-
function I(
|
|
53
|
+
function I(n, t, e) {
|
|
54
54
|
if (e || arguments.length === 2)
|
|
55
|
-
for (var
|
|
56
|
-
(o || !(
|
|
57
|
-
return
|
|
55
|
+
for (var r = 0, i = t.length, o; r < i; r++)
|
|
56
|
+
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
57
|
+
return n.concat(o || Array.prototype.slice.call(t));
|
|
58
58
|
}
|
|
59
|
-
function b(
|
|
60
|
-
return typeof
|
|
59
|
+
function b(n) {
|
|
60
|
+
return typeof n == "function";
|
|
61
61
|
}
|
|
62
|
-
function Z(
|
|
63
|
-
var t = function(
|
|
64
|
-
Error.call(
|
|
65
|
-
}, e =
|
|
62
|
+
function Z(n) {
|
|
63
|
+
var t = function(r) {
|
|
64
|
+
Error.call(r), r.stack = new Error().stack;
|
|
65
|
+
}, e = n(t);
|
|
66
66
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var N = Z(function(n) {
|
|
69
69
|
return function(e) {
|
|
70
|
-
|
|
71
|
-
` + e.map(function(
|
|
72
|
-
return i + 1 + ") " +
|
|
70
|
+
n(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
71
|
+
` + e.map(function(r, i) {
|
|
72
|
+
return i + 1 + ") " + r.toString();
|
|
73
73
|
}).join(`
|
|
74
74
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
|
-
function j(
|
|
78
|
-
if (
|
|
79
|
-
var e =
|
|
80
|
-
0 <= e &&
|
|
77
|
+
function j(n, t) {
|
|
78
|
+
if (n) {
|
|
79
|
+
var e = n.indexOf(t);
|
|
80
|
+
0 <= e && n.splice(e, 1);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
var
|
|
84
|
-
function
|
|
83
|
+
var T = function() {
|
|
84
|
+
function n(t) {
|
|
85
85
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
86
86
|
}
|
|
87
|
-
return
|
|
88
|
-
var t, e,
|
|
87
|
+
return n.prototype.unsubscribe = function() {
|
|
88
|
+
var t, e, r, i, o;
|
|
89
89
|
if (!this.closed) {
|
|
90
90
|
this.closed = !0;
|
|
91
91
|
var s = this._parentage;
|
|
92
92
|
if (s)
|
|
93
93
|
if (this._parentage = null, Array.isArray(s))
|
|
94
94
|
try {
|
|
95
|
-
for (var c =
|
|
95
|
+
for (var c = G(s), u = c.next(); !u.done; u = c.next()) {
|
|
96
96
|
var a = u.value;
|
|
97
97
|
a.remove(this);
|
|
98
98
|
}
|
|
99
|
-
} catch (
|
|
100
|
-
t = { error:
|
|
99
|
+
} catch (h) {
|
|
100
|
+
t = { error: h };
|
|
101
101
|
} finally {
|
|
102
102
|
try {
|
|
103
103
|
u && !u.done && (e = c.return) && e.call(c);
|
|
@@ -108,74 +108,74 @@ var P = function() {
|
|
|
108
108
|
}
|
|
109
109
|
else
|
|
110
110
|
s.remove(this);
|
|
111
|
-
var
|
|
112
|
-
if (b(
|
|
111
|
+
var p = this.initialTeardown;
|
|
112
|
+
if (b(p))
|
|
113
113
|
try {
|
|
114
|
-
|
|
115
|
-
} catch (
|
|
116
|
-
o =
|
|
114
|
+
p();
|
|
115
|
+
} catch (h) {
|
|
116
|
+
o = h instanceof N ? h.errors : [h];
|
|
117
117
|
}
|
|
118
118
|
var f = this._finalizers;
|
|
119
119
|
if (f) {
|
|
120
120
|
this._finalizers = null;
|
|
121
121
|
try {
|
|
122
|
-
for (var w =
|
|
123
|
-
var
|
|
122
|
+
for (var w = G(f), y = w.next(); !y.done; y = w.next()) {
|
|
123
|
+
var D = y.value;
|
|
124
124
|
try {
|
|
125
|
-
ie(
|
|
126
|
-
} catch (
|
|
127
|
-
o = o ?? [],
|
|
125
|
+
ie(D);
|
|
126
|
+
} catch (h) {
|
|
127
|
+
o = o ?? [], h instanceof N ? o = I(I([], M(o)), M(h.errors)) : o.push(h);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
} catch (
|
|
131
|
-
|
|
130
|
+
} catch (h) {
|
|
131
|
+
r = { error: h };
|
|
132
132
|
} finally {
|
|
133
133
|
try {
|
|
134
134
|
y && !y.done && (i = w.return) && i.call(w);
|
|
135
135
|
} finally {
|
|
136
|
-
if (
|
|
137
|
-
throw
|
|
136
|
+
if (r)
|
|
137
|
+
throw r.error;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
if (o)
|
|
142
|
-
throw new
|
|
142
|
+
throw new N(o);
|
|
143
143
|
}
|
|
144
|
-
},
|
|
144
|
+
}, n.prototype.add = function(t) {
|
|
145
145
|
var e;
|
|
146
146
|
if (t && t !== this)
|
|
147
147
|
if (this.closed)
|
|
148
148
|
ie(t);
|
|
149
149
|
else {
|
|
150
|
-
if (t instanceof
|
|
150
|
+
if (t instanceof n) {
|
|
151
151
|
if (t.closed || t._hasParent(this))
|
|
152
152
|
return;
|
|
153
153
|
t._addParent(this);
|
|
154
154
|
}
|
|
155
155
|
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, n.prototype._hasParent = function(t) {
|
|
158
158
|
var e = this._parentage;
|
|
159
159
|
return e === t || Array.isArray(e) && e.includes(t);
|
|
160
|
-
},
|
|
160
|
+
}, n.prototype._addParent = function(t) {
|
|
161
161
|
var e = this._parentage;
|
|
162
162
|
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
163
|
-
},
|
|
163
|
+
}, n.prototype._removeParent = function(t) {
|
|
164
164
|
var e = this._parentage;
|
|
165
165
|
e === t ? this._parentage = null : Array.isArray(e) && j(e, t);
|
|
166
|
-
},
|
|
166
|
+
}, n.prototype.remove = function(t) {
|
|
167
167
|
var e = this._finalizers;
|
|
168
|
-
e && j(e, t), t instanceof
|
|
169
|
-
},
|
|
170
|
-
var t = new
|
|
168
|
+
e && j(e, t), t instanceof n && t._removeParent(this);
|
|
169
|
+
}, n.EMPTY = function() {
|
|
170
|
+
var t = new n();
|
|
171
171
|
return t.closed = !0, t;
|
|
172
|
-
}(),
|
|
173
|
-
}(), ye =
|
|
174
|
-
function me(
|
|
175
|
-
return
|
|
172
|
+
}(), n;
|
|
173
|
+
}(), ye = T.EMPTY;
|
|
174
|
+
function me(n) {
|
|
175
|
+
return n instanceof T || n && "closed" in n && b(n.remove) && b(n.add) && b(n.unsubscribe);
|
|
176
176
|
}
|
|
177
|
-
function ie(
|
|
178
|
-
b(
|
|
177
|
+
function ie(n) {
|
|
178
|
+
b(n) ? n() : n.unsubscribe();
|
|
179
179
|
}
|
|
180
180
|
var we = {
|
|
181
181
|
onUnhandledError: null,
|
|
@@ -183,37 +183,37 @@ var we = {
|
|
|
183
183
|
Promise: void 0,
|
|
184
184
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
185
185
|
useDeprecatedNextContext: !1
|
|
186
|
-
},
|
|
187
|
-
setTimeout: function(
|
|
188
|
-
for (var e = [],
|
|
189
|
-
e[
|
|
190
|
-
var i =
|
|
191
|
-
return i != null && i.setTimeout ? i.setTimeout.apply(i, I([
|
|
186
|
+
}, z = {
|
|
187
|
+
setTimeout: function(n, t) {
|
|
188
|
+
for (var e = [], r = 2; r < arguments.length; r++)
|
|
189
|
+
e[r - 2] = arguments[r];
|
|
190
|
+
var i = z.delegate;
|
|
191
|
+
return i != null && i.setTimeout ? i.setTimeout.apply(i, I([n, t], M(e))) : setTimeout.apply(void 0, I([n, t], M(e)));
|
|
192
192
|
},
|
|
193
|
-
clearTimeout: function(
|
|
194
|
-
var t =
|
|
195
|
-
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(
|
|
193
|
+
clearTimeout: function(n) {
|
|
194
|
+
var t = z.delegate;
|
|
195
|
+
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(n);
|
|
196
196
|
},
|
|
197
197
|
delegate: void 0
|
|
198
198
|
};
|
|
199
|
-
function Re(
|
|
200
|
-
|
|
201
|
-
throw
|
|
199
|
+
function Re(n) {
|
|
200
|
+
z.setTimeout(function() {
|
|
201
|
+
throw n;
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
function oe() {
|
|
205
205
|
}
|
|
206
|
-
function U(
|
|
207
|
-
|
|
206
|
+
function U(n) {
|
|
207
|
+
n();
|
|
208
208
|
}
|
|
209
|
-
var ee = function(
|
|
210
|
-
x(t,
|
|
209
|
+
var ee = function(n) {
|
|
210
|
+
x(t, n);
|
|
211
211
|
function t(e) {
|
|
212
|
-
var
|
|
213
|
-
return
|
|
212
|
+
var r = n.call(this) || this;
|
|
213
|
+
return r.isStopped = !1, e ? (r.destination = e, me(e) && e.add(r)) : r.destination = Le, r;
|
|
214
214
|
}
|
|
215
|
-
return t.create = function(e,
|
|
216
|
-
return new
|
|
215
|
+
return t.create = function(e, r, i) {
|
|
216
|
+
return new L(e, r, i);
|
|
217
217
|
}, t.prototype.next = function(e) {
|
|
218
218
|
this.isStopped || this._next(e);
|
|
219
219
|
}, t.prototype.error = function(e) {
|
|
@@ -221,7 +221,7 @@ var ee = function(r) {
|
|
|
221
221
|
}, t.prototype.complete = function() {
|
|
222
222
|
this.isStopped || (this.isStopped = !0, this._complete());
|
|
223
223
|
}, t.prototype.unsubscribe = function() {
|
|
224
|
-
this.closed || (this.isStopped = !0,
|
|
224
|
+
this.closed || (this.isStopped = !0, n.prototype.unsubscribe.call(this), this.destination = null);
|
|
225
225
|
}, t.prototype._next = function(e) {
|
|
226
226
|
this.destination.next(e);
|
|
227
227
|
}, t.prototype._error = function(e) {
|
|
@@ -237,49 +237,49 @@ var ee = function(r) {
|
|
|
237
237
|
this.unsubscribe();
|
|
238
238
|
}
|
|
239
239
|
}, t;
|
|
240
|
-
}(
|
|
241
|
-
function
|
|
242
|
-
return Ue.call(
|
|
240
|
+
}(T), Ue = Function.prototype.bind;
|
|
241
|
+
function k(n, t) {
|
|
242
|
+
return Ue.call(n, t);
|
|
243
243
|
}
|
|
244
244
|
var $e = function() {
|
|
245
|
-
function
|
|
245
|
+
function n(t) {
|
|
246
246
|
this.partialObserver = t;
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return n.prototype.next = function(t) {
|
|
249
249
|
var e = this.partialObserver;
|
|
250
250
|
if (e.next)
|
|
251
251
|
try {
|
|
252
252
|
e.next(t);
|
|
253
|
-
} catch (
|
|
254
|
-
|
|
253
|
+
} catch (r) {
|
|
254
|
+
P(r);
|
|
255
255
|
}
|
|
256
|
-
},
|
|
256
|
+
}, n.prototype.error = function(t) {
|
|
257
257
|
var e = this.partialObserver;
|
|
258
258
|
if (e.error)
|
|
259
259
|
try {
|
|
260
260
|
e.error(t);
|
|
261
|
-
} catch (
|
|
262
|
-
|
|
261
|
+
} catch (r) {
|
|
262
|
+
P(r);
|
|
263
263
|
}
|
|
264
264
|
else
|
|
265
|
-
|
|
266
|
-
},
|
|
265
|
+
P(t);
|
|
266
|
+
}, n.prototype.complete = function() {
|
|
267
267
|
var t = this.partialObserver;
|
|
268
268
|
if (t.complete)
|
|
269
269
|
try {
|
|
270
270
|
t.complete();
|
|
271
271
|
} catch (e) {
|
|
272
|
-
|
|
272
|
+
P(e);
|
|
273
273
|
}
|
|
274
|
-
},
|
|
275
|
-
}(),
|
|
276
|
-
x(t,
|
|
277
|
-
function t(e,
|
|
278
|
-
var o =
|
|
274
|
+
}, n;
|
|
275
|
+
}(), L = function(n) {
|
|
276
|
+
x(t, n);
|
|
277
|
+
function t(e, r, i) {
|
|
278
|
+
var o = n.call(this) || this, s;
|
|
279
279
|
if (b(e) || !e)
|
|
280
280
|
s = {
|
|
281
281
|
next: e ?? void 0,
|
|
282
|
-
error:
|
|
282
|
+
error: r ?? void 0,
|
|
283
283
|
complete: i ?? void 0
|
|
284
284
|
};
|
|
285
285
|
else {
|
|
@@ -287,62 +287,62 @@ var $e = function() {
|
|
|
287
287
|
o && we.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
288
288
|
return o.unsubscribe();
|
|
289
289
|
}, s = {
|
|
290
|
-
next: e.next &&
|
|
291
|
-
error: e.error &&
|
|
292
|
-
complete: e.complete &&
|
|
290
|
+
next: e.next && k(e.next, c),
|
|
291
|
+
error: e.error && k(e.error, c),
|
|
292
|
+
complete: e.complete && k(e.complete, c)
|
|
293
293
|
}) : s = e;
|
|
294
294
|
}
|
|
295
295
|
return o.destination = new $e(s), o;
|
|
296
296
|
}
|
|
297
297
|
return t;
|
|
298
298
|
}(ee);
|
|
299
|
-
function
|
|
300
|
-
Re(
|
|
299
|
+
function P(n) {
|
|
300
|
+
Re(n);
|
|
301
301
|
}
|
|
302
|
-
function je(
|
|
303
|
-
throw
|
|
302
|
+
function je(n) {
|
|
303
|
+
throw n;
|
|
304
304
|
}
|
|
305
|
-
var
|
|
305
|
+
var Le = {
|
|
306
306
|
closed: !0,
|
|
307
307
|
next: oe,
|
|
308
308
|
error: je,
|
|
309
309
|
complete: oe
|
|
310
|
-
},
|
|
310
|
+
}, Ve = function() {
|
|
311
311
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
312
312
|
}();
|
|
313
|
-
function Se(
|
|
314
|
-
return
|
|
313
|
+
function Se(n) {
|
|
314
|
+
return n;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
318
|
-
return
|
|
319
|
-
return i(
|
|
316
|
+
function Fe(n) {
|
|
317
|
+
return n.length === 0 ? Se : n.length === 1 ? n[0] : function(e) {
|
|
318
|
+
return n.reduce(function(r, i) {
|
|
319
|
+
return i(r);
|
|
320
320
|
}, e);
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
323
|
var Y = function() {
|
|
324
|
-
function
|
|
324
|
+
function n(t) {
|
|
325
325
|
t && (this._subscribe = t);
|
|
326
326
|
}
|
|
327
|
-
return
|
|
328
|
-
var e = new
|
|
327
|
+
return n.prototype.lift = function(t) {
|
|
328
|
+
var e = new n();
|
|
329
329
|
return e.source = this, e.operator = t, e;
|
|
330
|
-
},
|
|
331
|
-
var i = this, o =
|
|
330
|
+
}, n.prototype.subscribe = function(t, e, r) {
|
|
331
|
+
var i = this, o = De(t) ? t : new L(t, e, r);
|
|
332
332
|
return U(function() {
|
|
333
333
|
var s = i, c = s.operator, u = s.source;
|
|
334
334
|
o.add(c ? c.call(o, u) : u ? i._subscribe(o) : i._trySubscribe(o));
|
|
335
335
|
}), o;
|
|
336
|
-
},
|
|
336
|
+
}, n.prototype._trySubscribe = function(t) {
|
|
337
337
|
try {
|
|
338
338
|
return this._subscribe(t);
|
|
339
339
|
} catch (e) {
|
|
340
340
|
t.error(e);
|
|
341
341
|
}
|
|
342
|
-
},
|
|
343
|
-
var
|
|
342
|
+
}, n.prototype.forEach = function(t, e) {
|
|
343
|
+
var r = this;
|
|
344
344
|
return e = se(e), new e(function(i, o) {
|
|
345
|
-
var s = new
|
|
345
|
+
var s = new L({
|
|
346
346
|
next: function(c) {
|
|
347
347
|
try {
|
|
348
348
|
t(c);
|
|
@@ -353,81 +353,81 @@ var Y = function() {
|
|
|
353
353
|
error: o,
|
|
354
354
|
complete: i
|
|
355
355
|
});
|
|
356
|
-
|
|
356
|
+
r.subscribe(s);
|
|
357
357
|
});
|
|
358
|
-
},
|
|
358
|
+
}, n.prototype._subscribe = function(t) {
|
|
359
359
|
var e;
|
|
360
360
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
361
|
-
},
|
|
361
|
+
}, n.prototype[Ve] = function() {
|
|
362
362
|
return this;
|
|
363
|
-
},
|
|
363
|
+
}, n.prototype.pipe = function() {
|
|
364
364
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
365
365
|
t[e] = arguments[e];
|
|
366
|
-
return
|
|
367
|
-
},
|
|
366
|
+
return Fe(t)(this);
|
|
367
|
+
}, n.prototype.toPromise = function(t) {
|
|
368
368
|
var e = this;
|
|
369
|
-
return t = se(t), new t(function(
|
|
369
|
+
return t = se(t), new t(function(r, i) {
|
|
370
370
|
var o;
|
|
371
371
|
e.subscribe(function(s) {
|
|
372
372
|
return o = s;
|
|
373
373
|
}, function(s) {
|
|
374
374
|
return i(s);
|
|
375
375
|
}, function() {
|
|
376
|
-
return
|
|
376
|
+
return r(o);
|
|
377
377
|
});
|
|
378
378
|
});
|
|
379
|
-
},
|
|
380
|
-
return new
|
|
381
|
-
},
|
|
379
|
+
}, n.create = function(t) {
|
|
380
|
+
return new n(t);
|
|
381
|
+
}, n;
|
|
382
382
|
}();
|
|
383
|
-
function se(
|
|
383
|
+
function se(n) {
|
|
384
384
|
var t;
|
|
385
|
-
return (t =
|
|
385
|
+
return (t = n ?? we.Promise) !== null && t !== void 0 ? t : Promise;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
return
|
|
387
|
+
function He(n) {
|
|
388
|
+
return n && b(n.next) && b(n.error) && b(n.complete);
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
return
|
|
390
|
+
function De(n) {
|
|
391
|
+
return n && n instanceof ee || He(n) && me(n);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
return b(
|
|
393
|
+
function Ne(n) {
|
|
394
|
+
return b(n == null ? void 0 : n.lift);
|
|
395
395
|
}
|
|
396
|
-
function Ce(
|
|
396
|
+
function Ce(n) {
|
|
397
397
|
return function(t) {
|
|
398
|
-
if (
|
|
398
|
+
if (Ne(t))
|
|
399
399
|
return t.lift(function(e) {
|
|
400
400
|
try {
|
|
401
|
-
return
|
|
402
|
-
} catch (
|
|
403
|
-
this.error(
|
|
401
|
+
return n(e, this);
|
|
402
|
+
} catch (r) {
|
|
403
|
+
this.error(r);
|
|
404
404
|
}
|
|
405
405
|
});
|
|
406
406
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
function Ee(
|
|
410
|
-
return new
|
|
409
|
+
function Ee(n, t, e, r, i) {
|
|
410
|
+
return new ke(n, t, e, r, i);
|
|
411
411
|
}
|
|
412
|
-
var
|
|
413
|
-
x(t,
|
|
414
|
-
function t(e,
|
|
415
|
-
var u =
|
|
416
|
-
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next =
|
|
412
|
+
var ke = function(n) {
|
|
413
|
+
x(t, n);
|
|
414
|
+
function t(e, r, i, o, s, c) {
|
|
415
|
+
var u = n.call(this, e) || this;
|
|
416
|
+
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next = r ? function(a) {
|
|
417
417
|
try {
|
|
418
|
-
|
|
419
|
-
} catch (
|
|
420
|
-
e.error(
|
|
418
|
+
r(a);
|
|
419
|
+
} catch (p) {
|
|
420
|
+
e.error(p);
|
|
421
421
|
}
|
|
422
|
-
} :
|
|
422
|
+
} : n.prototype._next, u._error = o ? function(a) {
|
|
423
423
|
try {
|
|
424
424
|
o(a);
|
|
425
|
-
} catch (
|
|
426
|
-
e.error(
|
|
425
|
+
} catch (p) {
|
|
426
|
+
e.error(p);
|
|
427
427
|
} finally {
|
|
428
428
|
this.unsubscribe();
|
|
429
429
|
}
|
|
430
|
-
} :
|
|
430
|
+
} : n.prototype._error, u._complete = i ? function() {
|
|
431
431
|
try {
|
|
432
432
|
i();
|
|
433
433
|
} catch (a) {
|
|
@@ -435,39 +435,39 @@ var Be = function(r) {
|
|
|
435
435
|
} finally {
|
|
436
436
|
this.unsubscribe();
|
|
437
437
|
}
|
|
438
|
-
} :
|
|
438
|
+
} : n.prototype._complete, u;
|
|
439
439
|
}
|
|
440
440
|
return t.prototype.unsubscribe = function() {
|
|
441
441
|
var e;
|
|
442
442
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
443
|
-
var
|
|
444
|
-
|
|
443
|
+
var r = this.closed;
|
|
444
|
+
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
445
445
|
}
|
|
446
446
|
}, t;
|
|
447
|
-
}(ee),
|
|
447
|
+
}(ee), Be = Z(function(n) {
|
|
448
448
|
return function() {
|
|
449
|
-
|
|
449
|
+
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
450
450
|
};
|
|
451
|
-
}), xe = function(
|
|
452
|
-
x(t,
|
|
451
|
+
}), xe = function(n) {
|
|
452
|
+
x(t, n);
|
|
453
453
|
function t() {
|
|
454
|
-
var e =
|
|
454
|
+
var e = n.call(this) || this;
|
|
455
455
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
456
456
|
}
|
|
457
457
|
return t.prototype.lift = function(e) {
|
|
458
|
-
var
|
|
459
|
-
return
|
|
458
|
+
var r = new ue(this, this);
|
|
459
|
+
return r.operator = e, r;
|
|
460
460
|
}, t.prototype._throwIfClosed = function() {
|
|
461
461
|
if (this.closed)
|
|
462
|
-
throw new
|
|
462
|
+
throw new Be();
|
|
463
463
|
}, t.prototype.next = function(e) {
|
|
464
|
-
var
|
|
464
|
+
var r = this;
|
|
465
465
|
U(function() {
|
|
466
466
|
var i, o;
|
|
467
|
-
if (
|
|
468
|
-
|
|
467
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
468
|
+
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
469
469
|
try {
|
|
470
|
-
for (var s =
|
|
470
|
+
for (var s = G(r.currentObservers), c = s.next(); !c.done; c = s.next()) {
|
|
471
471
|
var u = c.value;
|
|
472
472
|
u.next(e);
|
|
473
473
|
}
|
|
@@ -484,11 +484,11 @@ var Be = function(r) {
|
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
}, t.prototype.error = function(e) {
|
|
487
|
-
var
|
|
487
|
+
var r = this;
|
|
488
488
|
U(function() {
|
|
489
|
-
if (
|
|
490
|
-
|
|
491
|
-
for (var i =
|
|
489
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
490
|
+
r.hasError = r.isStopped = !0, r.thrownError = e;
|
|
491
|
+
for (var i = r.observers; i.length; )
|
|
492
492
|
i.shift().error(e);
|
|
493
493
|
}
|
|
494
494
|
});
|
|
@@ -497,8 +497,8 @@ var Be = function(r) {
|
|
|
497
497
|
U(function() {
|
|
498
498
|
if (e._throwIfClosed(), !e.isStopped) {
|
|
499
499
|
e.isStopped = !0;
|
|
500
|
-
for (var
|
|
501
|
-
|
|
500
|
+
for (var r = e.observers; r.length; )
|
|
501
|
+
r.shift().complete();
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
}, t.prototype.unsubscribe = function() {
|
|
@@ -511,95 +511,95 @@ var Be = function(r) {
|
|
|
511
511
|
enumerable: !1,
|
|
512
512
|
configurable: !0
|
|
513
513
|
}), t.prototype._trySubscribe = function(e) {
|
|
514
|
-
return this._throwIfClosed(),
|
|
514
|
+
return this._throwIfClosed(), n.prototype._trySubscribe.call(this, e);
|
|
515
515
|
}, t.prototype._subscribe = function(e) {
|
|
516
516
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
517
517
|
}, t.prototype._innerSubscribe = function(e) {
|
|
518
|
-
var
|
|
519
|
-
return o || s ? ye : (this.currentObservers = null, c.push(e), new
|
|
520
|
-
|
|
518
|
+
var r = this, i = this, o = i.hasError, s = i.isStopped, c = i.observers;
|
|
519
|
+
return o || s ? ye : (this.currentObservers = null, c.push(e), new T(function() {
|
|
520
|
+
r.currentObservers = null, j(c, e);
|
|
521
521
|
}));
|
|
522
522
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
523
|
-
var
|
|
523
|
+
var r = this, i = r.hasError, o = r.thrownError, s = r.isStopped;
|
|
524
524
|
i ? e.error(o) : s && e.complete();
|
|
525
525
|
}, t.prototype.asObservable = function() {
|
|
526
526
|
var e = new Y();
|
|
527
527
|
return e.source = this, e;
|
|
528
|
-
}, t.create = function(e,
|
|
529
|
-
return new ue(e,
|
|
528
|
+
}, t.create = function(e, r) {
|
|
529
|
+
return new ue(e, r);
|
|
530
530
|
}, t;
|
|
531
|
-
}(Y), ue = function(
|
|
532
|
-
x(t,
|
|
533
|
-
function t(e,
|
|
534
|
-
var i =
|
|
535
|
-
return i.destination = e, i.source =
|
|
531
|
+
}(Y), ue = function(n) {
|
|
532
|
+
x(t, n);
|
|
533
|
+
function t(e, r) {
|
|
534
|
+
var i = n.call(this) || this;
|
|
535
|
+
return i.destination = e, i.source = r, i;
|
|
536
536
|
}
|
|
537
537
|
return t.prototype.next = function(e) {
|
|
538
|
-
var
|
|
539
|
-
(i = (
|
|
538
|
+
var r, i;
|
|
539
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || i === void 0 || i.call(r, e);
|
|
540
540
|
}, t.prototype.error = function(e) {
|
|
541
|
-
var
|
|
542
|
-
(i = (
|
|
541
|
+
var r, i;
|
|
542
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || i === void 0 || i.call(r, e);
|
|
543
543
|
}, t.prototype.complete = function() {
|
|
544
|
-
var e,
|
|
545
|
-
(
|
|
544
|
+
var e, r;
|
|
545
|
+
(r = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || r === void 0 || r.call(e);
|
|
546
546
|
}, t.prototype._subscribe = function(e) {
|
|
547
|
-
var
|
|
548
|
-
return (i = (
|
|
547
|
+
var r, i;
|
|
548
|
+
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && i !== void 0 ? i : ye;
|
|
549
549
|
}, t;
|
|
550
550
|
}(xe), _e = {
|
|
551
551
|
now: function() {
|
|
552
552
|
return (_e.delegate || Date).now();
|
|
553
553
|
},
|
|
554
554
|
delegate: void 0
|
|
555
|
-
}, qe = function(
|
|
556
|
-
x(t,
|
|
557
|
-
function t(e,
|
|
558
|
-
return
|
|
555
|
+
}, qe = function(n) {
|
|
556
|
+
x(t, n);
|
|
557
|
+
function t(e, r) {
|
|
558
|
+
return n.call(this) || this;
|
|
559
559
|
}
|
|
560
|
-
return t.prototype.schedule = function(e,
|
|
560
|
+
return t.prototype.schedule = function(e, r) {
|
|
561
561
|
return this;
|
|
562
562
|
}, t;
|
|
563
|
-
}(
|
|
564
|
-
setInterval: function(
|
|
565
|
-
for (var e = [],
|
|
566
|
-
e[
|
|
567
|
-
var i =
|
|
568
|
-
return i != null && i.setInterval ? i.setInterval.apply(i, I([
|
|
563
|
+
}(T), V = {
|
|
564
|
+
setInterval: function(n, t) {
|
|
565
|
+
for (var e = [], r = 2; r < arguments.length; r++)
|
|
566
|
+
e[r - 2] = arguments[r];
|
|
567
|
+
var i = V.delegate;
|
|
568
|
+
return i != null && i.setInterval ? i.setInterval.apply(i, I([n, t], M(e))) : setInterval.apply(void 0, I([n, t], M(e)));
|
|
569
569
|
},
|
|
570
|
-
clearInterval: function(
|
|
571
|
-
var t =
|
|
572
|
-
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(
|
|
570
|
+
clearInterval: function(n) {
|
|
571
|
+
var t = V.delegate;
|
|
572
|
+
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(n);
|
|
573
573
|
},
|
|
574
574
|
delegate: void 0
|
|
575
|
-
},
|
|
576
|
-
x(t,
|
|
577
|
-
function t(e,
|
|
578
|
-
var i =
|
|
579
|
-
return i.scheduler = e, i.work =
|
|
575
|
+
}, Qe = function(n) {
|
|
576
|
+
x(t, n);
|
|
577
|
+
function t(e, r) {
|
|
578
|
+
var i = n.call(this, e, r) || this;
|
|
579
|
+
return i.scheduler = e, i.work = r, i.pending = !1, i;
|
|
580
580
|
}
|
|
581
|
-
return t.prototype.schedule = function(e,
|
|
581
|
+
return t.prototype.schedule = function(e, r) {
|
|
582
582
|
var i;
|
|
583
|
-
if (
|
|
583
|
+
if (r === void 0 && (r = 0), this.closed)
|
|
584
584
|
return this;
|
|
585
585
|
this.state = e;
|
|
586
586
|
var o = this.id, s = this.scheduler;
|
|
587
|
-
return o != null && (this.id = this.recycleAsyncId(s, o,
|
|
588
|
-
}, t.prototype.requestAsyncId = function(e,
|
|
589
|
-
return i === void 0 && (i = 0),
|
|
590
|
-
}, t.prototype.recycleAsyncId = function(e,
|
|
587
|
+
return o != null && (this.id = this.recycleAsyncId(s, o, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(s, this.id, r), this;
|
|
588
|
+
}, t.prototype.requestAsyncId = function(e, r, i) {
|
|
589
|
+
return i === void 0 && (i = 0), V.setInterval(e.flush.bind(e, this), i);
|
|
590
|
+
}, t.prototype.recycleAsyncId = function(e, r, i) {
|
|
591
591
|
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
592
|
-
return
|
|
593
|
-
|
|
594
|
-
}, t.prototype.execute = function(e,
|
|
592
|
+
return r;
|
|
593
|
+
r != null && V.clearInterval(r);
|
|
594
|
+
}, t.prototype.execute = function(e, r) {
|
|
595
595
|
if (this.closed)
|
|
596
596
|
return new Error("executing a cancelled action");
|
|
597
597
|
this.pending = !1;
|
|
598
|
-
var i = this._execute(e,
|
|
598
|
+
var i = this._execute(e, r);
|
|
599
599
|
if (i)
|
|
600
600
|
return i;
|
|
601
601
|
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
602
|
-
}, t.prototype._execute = function(e,
|
|
602
|
+
}, t.prototype._execute = function(e, r) {
|
|
603
603
|
var i = !1, o;
|
|
604
604
|
try {
|
|
605
605
|
this.work(e);
|
|
@@ -610,28 +610,28 @@ var Be = function(r) {
|
|
|
610
610
|
return this.unsubscribe(), o;
|
|
611
611
|
}, t.prototype.unsubscribe = function() {
|
|
612
612
|
if (!this.closed) {
|
|
613
|
-
var e = this,
|
|
614
|
-
this.work = this.state = this.scheduler = null, this.pending = !1, j(o, this),
|
|
613
|
+
var e = this, r = e.id, i = e.scheduler, o = i.actions;
|
|
614
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, j(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
615
615
|
}
|
|
616
616
|
}, t;
|
|
617
617
|
}(qe), ce = function() {
|
|
618
|
-
function
|
|
619
|
-
e === void 0 && (e =
|
|
620
|
-
}
|
|
621
|
-
return
|
|
622
|
-
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(
|
|
623
|
-
},
|
|
624
|
-
}(),
|
|
625
|
-
x(t,
|
|
626
|
-
function t(e,
|
|
627
|
-
|
|
628
|
-
var i =
|
|
618
|
+
function n(t, e) {
|
|
619
|
+
e === void 0 && (e = n.now), this.schedulerActionCtor = t, this.now = e;
|
|
620
|
+
}
|
|
621
|
+
return n.prototype.schedule = function(t, e, r) {
|
|
622
|
+
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(r, e);
|
|
623
|
+
}, n.now = _e.now, n;
|
|
624
|
+
}(), Ge = function(n) {
|
|
625
|
+
x(t, n);
|
|
626
|
+
function t(e, r) {
|
|
627
|
+
r === void 0 && (r = ce.now);
|
|
628
|
+
var i = n.call(this, e, r) || this;
|
|
629
629
|
return i.actions = [], i._active = !1, i;
|
|
630
630
|
}
|
|
631
631
|
return t.prototype.flush = function(e) {
|
|
632
|
-
var
|
|
632
|
+
var r = this.actions;
|
|
633
633
|
if (this._active) {
|
|
634
|
-
|
|
634
|
+
r.push(e);
|
|
635
635
|
return;
|
|
636
636
|
}
|
|
637
637
|
var i;
|
|
@@ -639,90 +639,90 @@ var Be = function(r) {
|
|
|
639
639
|
do
|
|
640
640
|
if (i = e.execute(e.state, e.delay))
|
|
641
641
|
break;
|
|
642
|
-
while (e =
|
|
642
|
+
while (e = r.shift());
|
|
643
643
|
if (this._active = !1, i) {
|
|
644
|
-
for (; e =
|
|
644
|
+
for (; e = r.shift(); )
|
|
645
645
|
e.unsubscribe();
|
|
646
646
|
throw i;
|
|
647
647
|
}
|
|
648
648
|
}, t;
|
|
649
|
-
}(ce),
|
|
650
|
-
function Je(
|
|
651
|
-
return
|
|
649
|
+
}(ce), ze = new Ge(Qe), Ye = ze;
|
|
650
|
+
function Je(n) {
|
|
651
|
+
return n && b(n.schedule);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
653
|
+
var We = Z(function(n) {
|
|
654
654
|
return function() {
|
|
655
|
-
|
|
655
|
+
n(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
656
656
|
};
|
|
657
657
|
});
|
|
658
|
-
function O(
|
|
658
|
+
function O(n, t) {
|
|
659
659
|
var e = typeof t == "object";
|
|
660
|
-
return new Promise(function(
|
|
661
|
-
var o = new
|
|
660
|
+
return new Promise(function(r, i) {
|
|
661
|
+
var o = new L({
|
|
662
662
|
next: function(s) {
|
|
663
|
-
|
|
663
|
+
r(s), o.unsubscribe();
|
|
664
664
|
},
|
|
665
665
|
error: i,
|
|
666
666
|
complete: function() {
|
|
667
|
-
e ?
|
|
667
|
+
e ? r(t.defaultValue) : i(new We());
|
|
668
668
|
}
|
|
669
669
|
});
|
|
670
|
-
|
|
670
|
+
n.subscribe(o);
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
673
|
+
function Ke(n) {
|
|
674
|
+
return n instanceof Date && !isNaN(n);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
return Ce(function(e,
|
|
676
|
+
function A(n, t) {
|
|
677
|
+
return Ce(function(e, r) {
|
|
678
678
|
var i = 0;
|
|
679
|
-
e.subscribe(Ee(
|
|
680
|
-
|
|
679
|
+
e.subscribe(Ee(r, function(o) {
|
|
680
|
+
r.next(n.call(t, o, i++));
|
|
681
681
|
}));
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
|
-
function Xe(
|
|
685
|
-
|
|
686
|
-
var
|
|
687
|
-
return t != null && (Je(t) ? e = t :
|
|
688
|
-
var o =
|
|
684
|
+
function Xe(n, t, e) {
|
|
685
|
+
n === void 0 && (n = 0), e === void 0 && (e = Ye);
|
|
686
|
+
var r = -1;
|
|
687
|
+
return t != null && (Je(t) ? e = t : r = t), new Y(function(i) {
|
|
688
|
+
var o = Ke(n) ? +n - e.now() : n;
|
|
689
689
|
o < 0 && (o = 0);
|
|
690
690
|
var s = 0;
|
|
691
691
|
return e.schedule(function() {
|
|
692
|
-
i.closed || (i.next(s++), 0 <=
|
|
692
|
+
i.closed || (i.next(s++), 0 <= r ? this.schedule(void 0, r) : i.complete());
|
|
693
693
|
}, o);
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
function Ze(
|
|
697
|
-
var
|
|
698
|
-
return
|
|
696
|
+
function Ze(n, t, e) {
|
|
697
|
+
var r = b(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
698
|
+
return r ? Ce(function(i, o) {
|
|
699
699
|
var s;
|
|
700
|
-
(s =
|
|
700
|
+
(s = r.subscribe) === null || s === void 0 || s.call(r);
|
|
701
701
|
var c = !0;
|
|
702
702
|
i.subscribe(Ee(o, function(u) {
|
|
703
703
|
var a;
|
|
704
|
-
(a =
|
|
704
|
+
(a = r.next) === null || a === void 0 || a.call(r, u), o.next(u);
|
|
705
705
|
}, function() {
|
|
706
706
|
var u;
|
|
707
|
-
c = !1, (u =
|
|
707
|
+
c = !1, (u = r.complete) === null || u === void 0 || u.call(r), o.complete();
|
|
708
708
|
}, function(u) {
|
|
709
709
|
var a;
|
|
710
|
-
c = !1, (a =
|
|
710
|
+
c = !1, (a = r.error) === null || a === void 0 || a.call(r, u), o.error(u);
|
|
711
711
|
}, function() {
|
|
712
712
|
var u, a;
|
|
713
|
-
c && ((u =
|
|
713
|
+
c && ((u = r.unsubscribe) === null || u === void 0 || u.call(r)), (a = r.finalize) === null || a === void 0 || a.call(r);
|
|
714
714
|
}));
|
|
715
715
|
}) : Se;
|
|
716
716
|
}
|
|
717
|
-
var et = Object.defineProperty, tt = (
|
|
718
|
-
class
|
|
717
|
+
var et = Object.defineProperty, tt = (n, t, e) => t in n ? et(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, E = (n, t, e) => (tt(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
718
|
+
class d extends Error {
|
|
719
719
|
constructor(t) {
|
|
720
720
|
super(`Incorrect context (${t}). Cannot perform the requested operation.`), E(this, "context"), this.context = t;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
class $ extends Error {
|
|
724
|
-
constructor(t, e,
|
|
725
|
-
super(`Invalid parameter (${t}). ${
|
|
724
|
+
constructor(t, e, r) {
|
|
725
|
+
super(`Invalid parameter (${t}). ${r}`), this.param = t, this.value = e, this.reason = r;
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
class rt extends Error {
|
|
@@ -744,71 +744,71 @@ class ae extends Error {
|
|
|
744
744
|
}
|
|
745
745
|
class le extends Error {
|
|
746
746
|
constructor(t, e) {
|
|
747
|
-
let
|
|
748
|
-
e && (
|
|
747
|
+
let r = `Unsupported Protocol ${Array.isArray(t) ? "versions" : "version"}: (${t}).`;
|
|
748
|
+
e && (r += ` Minimum version supported is ${e}.`), super(r), this.version = t;
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
function m(
|
|
752
|
-
return typeof
|
|
751
|
+
function m(n) {
|
|
752
|
+
return typeof n == "function";
|
|
753
753
|
}
|
|
754
|
-
function it(
|
|
755
|
-
return m(
|
|
754
|
+
function it(n) {
|
|
755
|
+
return m(n == null ? void 0 : n.lift);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function F(n) {
|
|
758
758
|
return function(t) {
|
|
759
759
|
if (it(t))
|
|
760
760
|
return t.lift(function(e) {
|
|
761
761
|
try {
|
|
762
|
-
return
|
|
763
|
-
} catch (
|
|
764
|
-
this.error(
|
|
762
|
+
return n(e, this);
|
|
763
|
+
} catch (r) {
|
|
764
|
+
this.error(r);
|
|
765
765
|
}
|
|
766
766
|
});
|
|
767
767
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
|
-
var J = function(
|
|
771
|
-
return J = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e,
|
|
772
|
-
e.__proto__ =
|
|
773
|
-
} || function(e,
|
|
774
|
-
for (var i in
|
|
775
|
-
Object.prototype.hasOwnProperty.call(
|
|
776
|
-
}, J(
|
|
770
|
+
var J = function(n, t) {
|
|
771
|
+
return J = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
772
|
+
e.__proto__ = r;
|
|
773
|
+
} || function(e, r) {
|
|
774
|
+
for (var i in r)
|
|
775
|
+
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
776
|
+
}, J(n, t);
|
|
777
777
|
};
|
|
778
|
-
function te(
|
|
778
|
+
function te(n, t) {
|
|
779
779
|
if (typeof t != "function" && t !== null)
|
|
780
780
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
781
|
-
J(
|
|
781
|
+
J(n, t);
|
|
782
782
|
function e() {
|
|
783
|
-
this.constructor =
|
|
783
|
+
this.constructor = n;
|
|
784
784
|
}
|
|
785
|
-
|
|
785
|
+
n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
786
786
|
}
|
|
787
|
-
function he(
|
|
788
|
-
var t = typeof Symbol == "function" && Symbol.iterator, e = t &&
|
|
787
|
+
function he(n) {
|
|
788
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], r = 0;
|
|
789
789
|
if (e)
|
|
790
|
-
return e.call(
|
|
791
|
-
if (
|
|
790
|
+
return e.call(n);
|
|
791
|
+
if (n && typeof n.length == "number")
|
|
792
792
|
return {
|
|
793
793
|
next: function() {
|
|
794
|
-
return
|
|
794
|
+
return n && r >= n.length && (n = void 0), { value: n && n[r++], done: !n };
|
|
795
795
|
}
|
|
796
796
|
};
|
|
797
797
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
var e = typeof Symbol == "function" &&
|
|
799
|
+
function W(n, t) {
|
|
800
|
+
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
801
801
|
if (!e)
|
|
802
|
-
return
|
|
803
|
-
var
|
|
802
|
+
return n;
|
|
803
|
+
var r = e.call(n), i, o = [], s;
|
|
804
804
|
try {
|
|
805
|
-
for (; (t === void 0 || t-- > 0) && !(i =
|
|
805
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
|
|
806
806
|
o.push(i.value);
|
|
807
807
|
} catch (c) {
|
|
808
808
|
s = { error: c };
|
|
809
809
|
} finally {
|
|
810
810
|
try {
|
|
811
|
-
i && !i.done && (e =
|
|
811
|
+
i && !i.done && (e = r.return) && e.call(r);
|
|
812
812
|
} finally {
|
|
813
813
|
if (s)
|
|
814
814
|
throw s.error;
|
|
@@ -816,39 +816,39 @@ function K(r, t) {
|
|
|
816
816
|
}
|
|
817
817
|
return o;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function K(n, t, e) {
|
|
820
820
|
if (e || arguments.length === 2)
|
|
821
|
-
for (var
|
|
822
|
-
(o || !(
|
|
823
|
-
return
|
|
824
|
-
}
|
|
825
|
-
function ot(
|
|
826
|
-
var t = function(
|
|
827
|
-
Error.call(
|
|
828
|
-
}, e =
|
|
821
|
+
for (var r = 0, i = t.length, o; r < i; r++)
|
|
822
|
+
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
823
|
+
return n.concat(o || Array.prototype.slice.call(t));
|
|
824
|
+
}
|
|
825
|
+
function ot(n) {
|
|
826
|
+
var t = function(r) {
|
|
827
|
+
Error.call(r), r.stack = new Error().stack;
|
|
828
|
+
}, e = n(t);
|
|
829
829
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
830
830
|
}
|
|
831
|
-
var
|
|
831
|
+
var B = ot(function(n) {
|
|
832
832
|
return function(t) {
|
|
833
|
-
|
|
834
|
-
` + t.map(function(e,
|
|
835
|
-
return
|
|
833
|
+
n(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
834
|
+
` + t.map(function(e, r) {
|
|
835
|
+
return r + 1 + ") " + e.toString();
|
|
836
836
|
}).join(`
|
|
837
837
|
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
|
838
838
|
};
|
|
839
839
|
});
|
|
840
|
-
function
|
|
841
|
-
if (
|
|
842
|
-
var e =
|
|
843
|
-
0 <= e &&
|
|
840
|
+
function de(n, t) {
|
|
841
|
+
if (n) {
|
|
842
|
+
var e = n.indexOf(t);
|
|
843
|
+
0 <= e && n.splice(e, 1);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
846
|
var re = function() {
|
|
847
|
-
function
|
|
847
|
+
function n(t) {
|
|
848
848
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
849
849
|
}
|
|
850
|
-
return
|
|
851
|
-
var t, e,
|
|
850
|
+
return n.prototype.unsubscribe = function() {
|
|
851
|
+
var t, e, r, i, o;
|
|
852
852
|
if (!this.closed) {
|
|
853
853
|
this.closed = !0;
|
|
854
854
|
var s = this._parentage;
|
|
@@ -859,8 +859,8 @@ var re = function() {
|
|
|
859
859
|
var a = u.value;
|
|
860
860
|
a.remove(this);
|
|
861
861
|
}
|
|
862
|
-
} catch (
|
|
863
|
-
t = { error:
|
|
862
|
+
} catch (h) {
|
|
863
|
+
t = { error: h };
|
|
864
864
|
} finally {
|
|
865
865
|
try {
|
|
866
866
|
u && !u.done && (e = c.return) && e.call(c);
|
|
@@ -871,75 +871,75 @@ var re = function() {
|
|
|
871
871
|
}
|
|
872
872
|
else
|
|
873
873
|
s.remove(this);
|
|
874
|
-
var
|
|
875
|
-
if (m(
|
|
874
|
+
var p = this.initialTeardown;
|
|
875
|
+
if (m(p))
|
|
876
876
|
try {
|
|
877
|
-
|
|
878
|
-
} catch (
|
|
879
|
-
o =
|
|
877
|
+
p();
|
|
878
|
+
} catch (h) {
|
|
879
|
+
o = h instanceof B ? h.errors : [h];
|
|
880
880
|
}
|
|
881
881
|
var f = this._finalizers;
|
|
882
882
|
if (f) {
|
|
883
883
|
this._finalizers = null;
|
|
884
884
|
try {
|
|
885
885
|
for (var w = he(f), y = w.next(); !y.done; y = w.next()) {
|
|
886
|
-
var
|
|
886
|
+
var D = y.value;
|
|
887
887
|
try {
|
|
888
|
-
|
|
889
|
-
} catch (
|
|
890
|
-
o = o ?? [],
|
|
888
|
+
pe(D);
|
|
889
|
+
} catch (h) {
|
|
890
|
+
o = o ?? [], h instanceof B ? o = K(K([], W(o)), W(h.errors)) : o.push(h);
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
} catch (
|
|
894
|
-
|
|
893
|
+
} catch (h) {
|
|
894
|
+
r = { error: h };
|
|
895
895
|
} finally {
|
|
896
896
|
try {
|
|
897
897
|
y && !y.done && (i = w.return) && i.call(w);
|
|
898
898
|
} finally {
|
|
899
|
-
if (
|
|
900
|
-
throw
|
|
899
|
+
if (r)
|
|
900
|
+
throw r.error;
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
if (o)
|
|
905
|
-
throw new
|
|
905
|
+
throw new B(o);
|
|
906
906
|
}
|
|
907
|
-
},
|
|
907
|
+
}, n.prototype.add = function(t) {
|
|
908
908
|
var e;
|
|
909
909
|
if (t && t !== this)
|
|
910
910
|
if (this.closed)
|
|
911
|
-
|
|
911
|
+
pe(t);
|
|
912
912
|
else {
|
|
913
|
-
if (t instanceof
|
|
913
|
+
if (t instanceof n) {
|
|
914
914
|
if (t.closed || t._hasParent(this))
|
|
915
915
|
return;
|
|
916
916
|
t._addParent(this);
|
|
917
917
|
}
|
|
918
918
|
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
|
919
919
|
}
|
|
920
|
-
},
|
|
920
|
+
}, n.prototype._hasParent = function(t) {
|
|
921
921
|
var e = this._parentage;
|
|
922
922
|
return e === t || Array.isArray(e) && e.includes(t);
|
|
923
|
-
},
|
|
923
|
+
}, n.prototype._addParent = function(t) {
|
|
924
924
|
var e = this._parentage;
|
|
925
925
|
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
926
|
-
},
|
|
926
|
+
}, n.prototype._removeParent = function(t) {
|
|
927
927
|
var e = this._parentage;
|
|
928
|
-
e === t ? this._parentage = null : Array.isArray(e) &&
|
|
929
|
-
},
|
|
928
|
+
e === t ? this._parentage = null : Array.isArray(e) && de(e, t);
|
|
929
|
+
}, n.prototype.remove = function(t) {
|
|
930
930
|
var e = this._finalizers;
|
|
931
|
-
e &&
|
|
932
|
-
},
|
|
933
|
-
var t = new
|
|
931
|
+
e && de(e, t), t instanceof n && t._removeParent(this);
|
|
932
|
+
}, n.EMPTY = function() {
|
|
933
|
+
var t = new n();
|
|
934
934
|
return t.closed = !0, t;
|
|
935
|
-
}(),
|
|
935
|
+
}(), n;
|
|
936
936
|
}();
|
|
937
937
|
re.EMPTY;
|
|
938
|
-
function Me(
|
|
939
|
-
return
|
|
938
|
+
function Me(n) {
|
|
939
|
+
return n instanceof re || n && "closed" in n && m(n.remove) && m(n.add) && m(n.unsubscribe);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
m(
|
|
941
|
+
function pe(n) {
|
|
942
|
+
m(n) ? n() : n.unsubscribe();
|
|
943
943
|
}
|
|
944
944
|
var Ie = {
|
|
945
945
|
onUnhandledError: null,
|
|
@@ -948,34 +948,34 @@ var Ie = {
|
|
|
948
948
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
949
949
|
useDeprecatedNextContext: !1
|
|
950
950
|
}, st = {
|
|
951
|
-
setTimeout: function(
|
|
952
|
-
for (var e = [],
|
|
953
|
-
e[
|
|
954
|
-
return setTimeout.apply(void 0,
|
|
951
|
+
setTimeout: function(n, t) {
|
|
952
|
+
for (var e = [], r = 2; r < arguments.length; r++)
|
|
953
|
+
e[r - 2] = arguments[r];
|
|
954
|
+
return setTimeout.apply(void 0, K([n, t], W(e)));
|
|
955
955
|
},
|
|
956
|
-
clearTimeout: function(
|
|
957
|
-
return clearTimeout(
|
|
956
|
+
clearTimeout: function(n) {
|
|
957
|
+
return clearTimeout(n);
|
|
958
958
|
},
|
|
959
959
|
delegate: void 0
|
|
960
960
|
};
|
|
961
|
-
function ut(
|
|
961
|
+
function ut(n) {
|
|
962
962
|
st.setTimeout(function() {
|
|
963
|
-
throw
|
|
963
|
+
throw n;
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
966
|
function fe() {
|
|
967
967
|
}
|
|
968
|
-
function ct(
|
|
969
|
-
|
|
968
|
+
function ct(n) {
|
|
969
|
+
n();
|
|
970
970
|
}
|
|
971
|
-
var ne = function(
|
|
972
|
-
te(t,
|
|
971
|
+
var ne = function(n) {
|
|
972
|
+
te(t, n);
|
|
973
973
|
function t(e) {
|
|
974
|
-
var
|
|
975
|
-
return
|
|
974
|
+
var r = n.call(this) || this;
|
|
975
|
+
return r.isStopped = !1, e ? (r.destination = e, Me(e) && e.add(r)) : r.destination = dt, r;
|
|
976
976
|
}
|
|
977
|
-
return t.create = function(e,
|
|
978
|
-
return new X(e,
|
|
977
|
+
return t.create = function(e, r, i) {
|
|
978
|
+
return new X(e, r, i);
|
|
979
979
|
}, t.prototype.next = function(e) {
|
|
980
980
|
this.isStopped || this._next(e);
|
|
981
981
|
}, t.prototype.error = function(e) {
|
|
@@ -983,7 +983,7 @@ var ne = function(r) {
|
|
|
983
983
|
}, t.prototype.complete = function() {
|
|
984
984
|
this.isStopped || (this.isStopped = !0, this._complete());
|
|
985
985
|
}, t.prototype.unsubscribe = function() {
|
|
986
|
-
this.closed || (this.isStopped = !0,
|
|
986
|
+
this.closed || (this.isStopped = !0, n.prototype.unsubscribe.call(this), this.destination = null);
|
|
987
987
|
}, t.prototype._next = function(e) {
|
|
988
988
|
this.destination.next(e);
|
|
989
989
|
}, t.prototype._error = function(e) {
|
|
@@ -1000,32 +1000,32 @@ var ne = function(r) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}, t;
|
|
1002
1002
|
}(re), at = Function.prototype.bind;
|
|
1003
|
-
function q(
|
|
1004
|
-
return at.call(
|
|
1003
|
+
function q(n, t) {
|
|
1004
|
+
return at.call(n, t);
|
|
1005
1005
|
}
|
|
1006
1006
|
var lt = function() {
|
|
1007
|
-
function
|
|
1007
|
+
function n(t) {
|
|
1008
1008
|
this.partialObserver = t;
|
|
1009
1009
|
}
|
|
1010
|
-
return
|
|
1010
|
+
return n.prototype.next = function(t) {
|
|
1011
1011
|
var e = this.partialObserver;
|
|
1012
1012
|
if (e.next)
|
|
1013
1013
|
try {
|
|
1014
1014
|
e.next(t);
|
|
1015
|
-
} catch (
|
|
1016
|
-
R(
|
|
1015
|
+
} catch (r) {
|
|
1016
|
+
R(r);
|
|
1017
1017
|
}
|
|
1018
|
-
},
|
|
1018
|
+
}, n.prototype.error = function(t) {
|
|
1019
1019
|
var e = this.partialObserver;
|
|
1020
1020
|
if (e.error)
|
|
1021
1021
|
try {
|
|
1022
1022
|
e.error(t);
|
|
1023
|
-
} catch (
|
|
1024
|
-
R(
|
|
1023
|
+
} catch (r) {
|
|
1024
|
+
R(r);
|
|
1025
1025
|
}
|
|
1026
1026
|
else
|
|
1027
1027
|
R(t);
|
|
1028
|
-
},
|
|
1028
|
+
}, n.prototype.complete = function() {
|
|
1029
1029
|
var t = this.partialObserver;
|
|
1030
1030
|
if (t.complete)
|
|
1031
1031
|
try {
|
|
@@ -1033,15 +1033,15 @@ var lt = function() {
|
|
|
1033
1033
|
} catch (e) {
|
|
1034
1034
|
R(e);
|
|
1035
1035
|
}
|
|
1036
|
-
},
|
|
1037
|
-
}(), X = function(
|
|
1038
|
-
te(t,
|
|
1039
|
-
function t(e,
|
|
1040
|
-
var o =
|
|
1036
|
+
}, n;
|
|
1037
|
+
}(), X = function(n) {
|
|
1038
|
+
te(t, n);
|
|
1039
|
+
function t(e, r, i) {
|
|
1040
|
+
var o = n.call(this) || this, s;
|
|
1041
1041
|
if (m(e) || !e)
|
|
1042
1042
|
s = {
|
|
1043
1043
|
next: e ?? void 0,
|
|
1044
|
-
error:
|
|
1044
|
+
error: r ?? void 0,
|
|
1045
1045
|
complete: i ?? void 0
|
|
1046
1046
|
};
|
|
1047
1047
|
else {
|
|
@@ -1058,51 +1058,51 @@ var lt = function() {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
return t;
|
|
1060
1060
|
}(ne);
|
|
1061
|
-
function R(
|
|
1062
|
-
ut(
|
|
1061
|
+
function R(n) {
|
|
1062
|
+
ut(n);
|
|
1063
1063
|
}
|
|
1064
|
-
function ht(
|
|
1065
|
-
throw
|
|
1064
|
+
function ht(n) {
|
|
1065
|
+
throw n;
|
|
1066
1066
|
}
|
|
1067
|
-
var
|
|
1067
|
+
var dt = {
|
|
1068
1068
|
closed: !0,
|
|
1069
1069
|
next: fe,
|
|
1070
1070
|
error: ht,
|
|
1071
1071
|
complete: fe
|
|
1072
|
-
},
|
|
1072
|
+
}, pt = function() {
|
|
1073
1073
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1074
1074
|
}();
|
|
1075
|
-
function Oe(
|
|
1076
|
-
return
|
|
1075
|
+
function Oe(n) {
|
|
1076
|
+
return n;
|
|
1077
1077
|
}
|
|
1078
|
-
function ft(
|
|
1079
|
-
return
|
|
1080
|
-
return
|
|
1081
|
-
return
|
|
1078
|
+
function ft(n) {
|
|
1079
|
+
return n.length === 0 ? Oe : n.length === 1 ? n[0] : function(t) {
|
|
1080
|
+
return n.reduce(function(e, r) {
|
|
1081
|
+
return r(e);
|
|
1082
1082
|
}, t);
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
1085
|
var vt = function() {
|
|
1086
|
-
function
|
|
1086
|
+
function n(t) {
|
|
1087
1087
|
t && (this._subscribe = t);
|
|
1088
1088
|
}
|
|
1089
|
-
return
|
|
1090
|
-
var e = new
|
|
1089
|
+
return n.prototype.lift = function(t) {
|
|
1090
|
+
var e = new n();
|
|
1091
1091
|
return e.source = this, e.operator = t, e;
|
|
1092
|
-
},
|
|
1093
|
-
var i = this, o = bt(t) ? t : new X(t, e,
|
|
1092
|
+
}, n.prototype.subscribe = function(t, e, r) {
|
|
1093
|
+
var i = this, o = bt(t) ? t : new X(t, e, r);
|
|
1094
1094
|
return ct(function() {
|
|
1095
1095
|
var s = i, c = s.operator, u = s.source;
|
|
1096
1096
|
o.add(c ? c.call(o, u) : u ? i._subscribe(o) : i._trySubscribe(o));
|
|
1097
1097
|
}), o;
|
|
1098
|
-
},
|
|
1098
|
+
}, n.prototype._trySubscribe = function(t) {
|
|
1099
1099
|
try {
|
|
1100
1100
|
return this._subscribe(t);
|
|
1101
1101
|
} catch (e) {
|
|
1102
1102
|
t.error(e);
|
|
1103
1103
|
}
|
|
1104
|
-
},
|
|
1105
|
-
var
|
|
1104
|
+
}, n.prototype.forEach = function(t, e) {
|
|
1105
|
+
var r = this;
|
|
1106
1106
|
return e = ve(e), new e(function(i, o) {
|
|
1107
1107
|
var s = new X({
|
|
1108
1108
|
next: function(c) {
|
|
@@ -1115,65 +1115,65 @@ var vt = function() {
|
|
|
1115
1115
|
error: o,
|
|
1116
1116
|
complete: i
|
|
1117
1117
|
});
|
|
1118
|
-
|
|
1118
|
+
r.subscribe(s);
|
|
1119
1119
|
});
|
|
1120
|
-
},
|
|
1120
|
+
}, n.prototype._subscribe = function(t) {
|
|
1121
1121
|
var e;
|
|
1122
1122
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
1123
|
-
},
|
|
1123
|
+
}, n.prototype[pt] = function() {
|
|
1124
1124
|
return this;
|
|
1125
|
-
},
|
|
1125
|
+
}, n.prototype.pipe = function() {
|
|
1126
1126
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
1127
1127
|
t[e] = arguments[e];
|
|
1128
1128
|
return ft(t)(this);
|
|
1129
|
-
},
|
|
1129
|
+
}, n.prototype.toPromise = function(t) {
|
|
1130
1130
|
var e = this;
|
|
1131
|
-
return t = ve(t), new t(function(
|
|
1131
|
+
return t = ve(t), new t(function(r, i) {
|
|
1132
1132
|
var o;
|
|
1133
1133
|
e.subscribe(function(s) {
|
|
1134
1134
|
return o = s;
|
|
1135
1135
|
}, function(s) {
|
|
1136
1136
|
return i(s);
|
|
1137
1137
|
}, function() {
|
|
1138
|
-
return
|
|
1138
|
+
return r(o);
|
|
1139
1139
|
});
|
|
1140
1140
|
});
|
|
1141
|
-
},
|
|
1142
|
-
return new
|
|
1143
|
-
},
|
|
1141
|
+
}, n.create = function(t) {
|
|
1142
|
+
return new n(t);
|
|
1143
|
+
}, n;
|
|
1144
1144
|
}();
|
|
1145
|
-
function ve(
|
|
1145
|
+
function ve(n) {
|
|
1146
1146
|
var t;
|
|
1147
|
-
return (t =
|
|
1147
|
+
return (t = n ?? Ie.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1148
1148
|
}
|
|
1149
|
-
function gt(
|
|
1150
|
-
return
|
|
1149
|
+
function gt(n) {
|
|
1150
|
+
return n && m(n.next) && m(n.error) && m(n.complete);
|
|
1151
1151
|
}
|
|
1152
|
-
function bt(
|
|
1153
|
-
return
|
|
1152
|
+
function bt(n) {
|
|
1153
|
+
return n && n instanceof ne || gt(n) && Me(n);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1156
|
-
return new yt(
|
|
1155
|
+
function H(n, t, e, r, i) {
|
|
1156
|
+
return new yt(n, t, e, r, i);
|
|
1157
1157
|
}
|
|
1158
|
-
var yt = function(
|
|
1159
|
-
te(t,
|
|
1160
|
-
function t(e,
|
|
1161
|
-
var u =
|
|
1162
|
-
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next =
|
|
1158
|
+
var yt = function(n) {
|
|
1159
|
+
te(t, n);
|
|
1160
|
+
function t(e, r, i, o, s, c) {
|
|
1161
|
+
var u = n.call(this, e) || this;
|
|
1162
|
+
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next = r ? function(a) {
|
|
1163
1163
|
try {
|
|
1164
|
-
|
|
1165
|
-
} catch (
|
|
1166
|
-
e.error(
|
|
1164
|
+
r(a);
|
|
1165
|
+
} catch (p) {
|
|
1166
|
+
e.error(p);
|
|
1167
1167
|
}
|
|
1168
|
-
} :
|
|
1168
|
+
} : n.prototype._next, u._error = o ? function(a) {
|
|
1169
1169
|
try {
|
|
1170
1170
|
o(a);
|
|
1171
|
-
} catch (
|
|
1172
|
-
e.error(
|
|
1171
|
+
} catch (p) {
|
|
1172
|
+
e.error(p);
|
|
1173
1173
|
} finally {
|
|
1174
1174
|
this.unsubscribe();
|
|
1175
1175
|
}
|
|
1176
|
-
} :
|
|
1176
|
+
} : n.prototype._error, u._complete = i ? function() {
|
|
1177
1177
|
try {
|
|
1178
1178
|
i();
|
|
1179
1179
|
} catch (a) {
|
|
@@ -1181,88 +1181,88 @@ var yt = function(r) {
|
|
|
1181
1181
|
} finally {
|
|
1182
1182
|
this.unsubscribe();
|
|
1183
1183
|
}
|
|
1184
|
-
} :
|
|
1184
|
+
} : n.prototype._complete, u;
|
|
1185
1185
|
}
|
|
1186
1186
|
return t.prototype.unsubscribe = function() {
|
|
1187
1187
|
var e;
|
|
1188
1188
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
1189
|
-
var
|
|
1190
|
-
|
|
1189
|
+
var r = this.closed;
|
|
1190
|
+
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
1191
1191
|
}
|
|
1192
1192
|
}, t;
|
|
1193
1193
|
}(ne);
|
|
1194
|
-
function
|
|
1195
|
-
return
|
|
1194
|
+
function l(n, t) {
|
|
1195
|
+
return F(function(e, r) {
|
|
1196
1196
|
var i = 0;
|
|
1197
|
-
e.subscribe(
|
|
1198
|
-
|
|
1197
|
+
e.subscribe(H(r, function(o) {
|
|
1198
|
+
r.next(n.call(t, o, i++));
|
|
1199
1199
|
}));
|
|
1200
1200
|
});
|
|
1201
1201
|
}
|
|
1202
|
-
var mt = new vt(function(
|
|
1203
|
-
return
|
|
1202
|
+
var mt = new vt(function(n) {
|
|
1203
|
+
return n.complete();
|
|
1204
1204
|
});
|
|
1205
|
-
function S(
|
|
1206
|
-
return
|
|
1205
|
+
function S(n) {
|
|
1206
|
+
return n <= 0 ? function() {
|
|
1207
1207
|
return mt;
|
|
1208
|
-
} :
|
|
1209
|
-
var
|
|
1210
|
-
t.subscribe(
|
|
1211
|
-
++
|
|
1208
|
+
} : F(function(t, e) {
|
|
1209
|
+
var r = 0;
|
|
1210
|
+
t.subscribe(H(e, function(i) {
|
|
1211
|
+
++r <= n && (e.next(i), n <= r && e.complete());
|
|
1212
1212
|
}));
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
|
-
function g(
|
|
1216
|
-
return
|
|
1215
|
+
function g(n, t) {
|
|
1216
|
+
return F(function(e, r) {
|
|
1217
1217
|
var i = 0;
|
|
1218
|
-
e.subscribe(
|
|
1219
|
-
return
|
|
1218
|
+
e.subscribe(H(r, function(o) {
|
|
1219
|
+
return n.call(t, o, i++) && r.next(o);
|
|
1220
1220
|
}));
|
|
1221
1221
|
});
|
|
1222
1222
|
}
|
|
1223
|
-
function v(
|
|
1224
|
-
var
|
|
1225
|
-
return
|
|
1223
|
+
function v(n, t, e) {
|
|
1224
|
+
var r = m(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
1225
|
+
return r ? F(function(i, o) {
|
|
1226
1226
|
var s;
|
|
1227
|
-
(s =
|
|
1227
|
+
(s = r.subscribe) === null || s === void 0 || s.call(r);
|
|
1228
1228
|
var c = !0;
|
|
1229
|
-
i.subscribe(
|
|
1229
|
+
i.subscribe(H(o, function(u) {
|
|
1230
1230
|
var a;
|
|
1231
|
-
(a =
|
|
1231
|
+
(a = r.next) === null || a === void 0 || a.call(r, u), o.next(u);
|
|
1232
1232
|
}, function() {
|
|
1233
1233
|
var u;
|
|
1234
|
-
c = !1, (u =
|
|
1234
|
+
c = !1, (u = r.complete) === null || u === void 0 || u.call(r), o.complete();
|
|
1235
1235
|
}, function(u) {
|
|
1236
1236
|
var a;
|
|
1237
|
-
c = !1, (a =
|
|
1237
|
+
c = !1, (a = r.error) === null || a === void 0 || a.call(r, u), o.error(u);
|
|
1238
1238
|
}, function() {
|
|
1239
1239
|
var u, a;
|
|
1240
|
-
c && ((u =
|
|
1240
|
+
c && ((u = r.unsubscribe) === null || u === void 0 || u.call(r)), (a = r.finalize) === null || a === void 0 || a.call(r);
|
|
1241
1241
|
}));
|
|
1242
1242
|
}) : Oe;
|
|
1243
1243
|
}
|
|
1244
1244
|
const wt = /^(\d+)\.(\d+)$/;
|
|
1245
|
-
function St(
|
|
1246
|
-
if (typeof
|
|
1247
|
-
const t =
|
|
1245
|
+
function St(n) {
|
|
1246
|
+
if (typeof n == "string") {
|
|
1247
|
+
const t = n.match(wt);
|
|
1248
1248
|
if (t)
|
|
1249
1249
|
return `${t[1]}.${t[2]}`;
|
|
1250
1250
|
}
|
|
1251
|
-
throw new nt(
|
|
1251
|
+
throw new nt(n);
|
|
1252
1252
|
}
|
|
1253
|
-
function ge(
|
|
1254
|
-
const t = St(
|
|
1253
|
+
function ge(n) {
|
|
1254
|
+
const t = St(n), [e, r] = t.split("."), [i, o] = [parseInt(e), parseInt(r)];
|
|
1255
1255
|
return [i, o];
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const [e,
|
|
1259
|
-
return e < i ? -1 : e > i ? 1 :
|
|
1257
|
+
function Te(n, t) {
|
|
1258
|
+
const [e, r] = ge(n), [i, o] = ge(t);
|
|
1259
|
+
return e < i ? -1 : e > i ? 1 : r < o ? -1 : r > o ? 1 : 0;
|
|
1260
1260
|
}
|
|
1261
|
-
function Ct(
|
|
1262
|
-
return
|
|
1261
|
+
function Ct(n, t) {
|
|
1262
|
+
return Te(n, t) === 1;
|
|
1263
1263
|
}
|
|
1264
|
-
function Et(
|
|
1265
|
-
return
|
|
1264
|
+
function Et(n, t) {
|
|
1265
|
+
return Te(n, t) >= 0;
|
|
1266
1266
|
}
|
|
1267
1267
|
const be = "2.0";
|
|
1268
1268
|
class xt {
|
|
@@ -1276,7 +1276,7 @@ class xt {
|
|
|
1276
1276
|
* @param logService - An instance of a logging service or utility
|
|
1277
1277
|
*/
|
|
1278
1278
|
constructor(t, e) {
|
|
1279
|
-
if (E(this, "negotiatedProtocolVersion"), E(this, "currentContext"), E(this, "incomingMessages$"), E(this, "inIframe", !1), E(this, "embeddedResult"), E(this, "iframePort1"), E(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new xe(), this.supportedVersions = t.filter((
|
|
1279
|
+
if (E(this, "negotiatedProtocolVersion"), E(this, "currentContext"), E(this, "incomingMessages$"), E(this, "inIframe", !1), E(this, "embeddedResult"), E(this, "iframePort1"), E(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new xe(), this.supportedVersions = t.filter((r) => Et(r, be)), !this.supportedVersions.length)
|
|
1280
1280
|
throw new le(t, be);
|
|
1281
1281
|
this.negotiatedProtocolVersion = this.supportedVersions[0], this.embeddedResult = null, this.iframePort2 = null;
|
|
1282
1282
|
}
|
|
@@ -1296,7 +1296,7 @@ class xt {
|
|
|
1296
1296
|
return this.inIframe ? this.iframePort1 : (e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) == null ? void 0 : e.port1;
|
|
1297
1297
|
}
|
|
1298
1298
|
get port2() {
|
|
1299
|
-
var t, e,
|
|
1299
|
+
var t, e, r, i;
|
|
1300
1300
|
if (this.inIframe) {
|
|
1301
1301
|
if (!this.iframePort2)
|
|
1302
1302
|
throw new ae("port2");
|
|
@@ -1304,7 +1304,7 @@ class xt {
|
|
|
1304
1304
|
} else {
|
|
1305
1305
|
if (!((e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) != null && e.port2))
|
|
1306
1306
|
throw new ae("port2");
|
|
1307
|
-
return (i = (
|
|
1307
|
+
return (i = (r = window.Acrobits) == null ? void 0 : r.messageChannel) == null ? void 0 : i.port2;
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
1310
|
/**
|
|
@@ -1314,7 +1314,7 @@ class xt {
|
|
|
1314
1314
|
*/
|
|
1315
1315
|
determineContext() {
|
|
1316
1316
|
return Xe(1e3).pipe(
|
|
1317
|
-
|
|
1317
|
+
l(() => (this.isEmbedded() ? this.currentContext = "user" : this.currentContext = "guest", this.currentContext)),
|
|
1318
1318
|
S(1)
|
|
1319
1319
|
);
|
|
1320
1320
|
}
|
|
@@ -1326,14 +1326,14 @@ class xt {
|
|
|
1326
1326
|
*/
|
|
1327
1327
|
openBridge() {
|
|
1328
1328
|
if (!this.isEmbedded())
|
|
1329
|
-
throw new
|
|
1329
|
+
throw new d(this.currentContext);
|
|
1330
1330
|
const t = "HELLO", e = this.createMessage(t);
|
|
1331
1331
|
e.protocolVersions = this.supportedVersions, this.logCreated(t, e);
|
|
1332
|
-
const
|
|
1332
|
+
const r = this.incomingMessages$.pipe(
|
|
1333
1333
|
g((i) => i.type === t && i.replyTo === e.id),
|
|
1334
|
-
|
|
1334
|
+
l((i) => i),
|
|
1335
1335
|
v(this.logReceived(t)),
|
|
1336
|
-
|
|
1336
|
+
l((i) => {
|
|
1337
1337
|
if (this.supportedVersions.some((o) => Ct(o, i.protocolVersion)))
|
|
1338
1338
|
throw new le(i.protocolVersion, this.supportedVersions[0]);
|
|
1339
1339
|
return i;
|
|
@@ -1345,7 +1345,7 @@ class xt {
|
|
|
1345
1345
|
}),
|
|
1346
1346
|
S(1)
|
|
1347
1347
|
);
|
|
1348
|
-
return this.logService.debug(`Created ${t} Reply handler`), this.inIframe ? this.createIframeChannel().then(() => this.finishIpcSetup(e)) : this.finishIpcSetup(e),
|
|
1348
|
+
return this.logService.debug(`Created ${t} Reply handler`), this.inIframe ? this.createIframeChannel().then(() => this.finishIpcSetup(e)) : this.finishIpcSetup(e), r;
|
|
1349
1349
|
}
|
|
1350
1350
|
/**
|
|
1351
1351
|
* Request an SSO Token from the Host app to authenticate the current user and make further API
|
|
@@ -1356,16 +1356,16 @@ class xt {
|
|
|
1356
1356
|
*/
|
|
1357
1357
|
requestSSOToken() {
|
|
1358
1358
|
if (!this.isEmbedded())
|
|
1359
|
-
throw new
|
|
1359
|
+
throw new d(this.currentContext);
|
|
1360
1360
|
const t = "TOKEN", e = this.createMessage(t);
|
|
1361
1361
|
this.logCreated(t, e);
|
|
1362
|
-
const
|
|
1362
|
+
const r = this.incomingMessages$.pipe(
|
|
1363
1363
|
g((i) => i.type === t && i.replyTo === e.id),
|
|
1364
|
-
|
|
1364
|
+
l((i) => i),
|
|
1365
1365
|
v(this.logReceived(t)),
|
|
1366
1366
|
S(1)
|
|
1367
1367
|
);
|
|
1368
|
-
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e),
|
|
1368
|
+
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
|
|
1369
1369
|
}
|
|
1370
1370
|
/**
|
|
1371
1371
|
* Sends the {@link JoiningRoomMessage} lifecycle message to the Host application based on the
|
|
@@ -1382,18 +1382,18 @@ class xt {
|
|
|
1382
1382
|
*/
|
|
1383
1383
|
sendJoiningRoomMessage(t) {
|
|
1384
1384
|
if (!this.isEmbedded())
|
|
1385
|
-
throw new
|
|
1385
|
+
throw new d(this.currentContext);
|
|
1386
1386
|
const {
|
|
1387
1387
|
roomName: e,
|
|
1388
|
-
roomInvite:
|
|
1388
|
+
roomInvite: r,
|
|
1389
1389
|
displayName: i,
|
|
1390
1390
|
jwtToken: o,
|
|
1391
1391
|
serverUrl: s,
|
|
1392
1392
|
region: c,
|
|
1393
1393
|
joinMicMuted: u,
|
|
1394
1394
|
joinWithoutCamera: a
|
|
1395
|
-
} = t,
|
|
1396
|
-
f.roomName = e, f.jwtToken = o, f.serverUrl = s, f.region = c, f.roomInvite =
|
|
1395
|
+
} = t, p = "JOINING ROOM", f = this.createMessage(p, !1);
|
|
1396
|
+
f.roomName = e, f.jwtToken = o, f.serverUrl = s, f.region = c, f.roomInvite = r, f.joinMicMuted = u ?? !1, f.joinWithoutCamera = a ?? !1, f.displayName = i, this.logCreated(p, f), this.port2.postMessage(f), this.logSent(p, f);
|
|
1397
1397
|
}
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Sends a {@link LeavingRoomMessage} lifecycle message to the Host app.
|
|
@@ -1408,9 +1408,9 @@ class xt {
|
|
|
1408
1408
|
*/
|
|
1409
1409
|
sendLeavingRoomMessage(t) {
|
|
1410
1410
|
if (!this.isEmbedded())
|
|
1411
|
-
throw new
|
|
1412
|
-
const e = "LEAVING ROOM",
|
|
1413
|
-
|
|
1411
|
+
throw new d(this.currentContext);
|
|
1412
|
+
const e = "LEAVING ROOM", r = this.createMessage(e, !1);
|
|
1413
|
+
r.roomName = t, this.logCreated(e, r), this.port2.postMessage(r), this.logSent(e, r);
|
|
1414
1414
|
}
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Setup listener for {@link JoinRoomMessage}, which can be sent by a host app to ask the client
|
|
@@ -1440,13 +1440,13 @@ class xt {
|
|
|
1440
1440
|
*/
|
|
1441
1441
|
onJoinRoomMessage() {
|
|
1442
1442
|
if (!this.isEmbedded())
|
|
1443
|
-
throw new
|
|
1443
|
+
throw new d(this.currentContext);
|
|
1444
1444
|
const t = "JOIN ROOM";
|
|
1445
1445
|
return this.incomingMessages$.pipe(
|
|
1446
1446
|
g((e) => e.type === t && e.target === "client"),
|
|
1447
|
-
|
|
1447
|
+
l((e) => e),
|
|
1448
1448
|
v(this.logReceived(t)),
|
|
1449
|
-
|
|
1449
|
+
l((e) => e)
|
|
1450
1450
|
);
|
|
1451
1451
|
}
|
|
1452
1452
|
/**
|
|
@@ -1476,13 +1476,13 @@ class xt {
|
|
|
1476
1476
|
*/
|
|
1477
1477
|
onLeaveRoomMessage() {
|
|
1478
1478
|
if (!this.isEmbedded())
|
|
1479
|
-
throw new
|
|
1479
|
+
throw new d(this.currentContext);
|
|
1480
1480
|
const t = "LEAVE ROOM";
|
|
1481
1481
|
return this.incomingMessages$.pipe(
|
|
1482
1482
|
g((e) => e.type === t && e.target === "client"),
|
|
1483
|
-
|
|
1483
|
+
l((e) => e),
|
|
1484
1484
|
v(this.logReceived(t)),
|
|
1485
|
-
|
|
1485
|
+
l((e) => e)
|
|
1486
1486
|
);
|
|
1487
1487
|
}
|
|
1488
1488
|
/**
|
|
@@ -1513,13 +1513,13 @@ class xt {
|
|
|
1513
1513
|
*/
|
|
1514
1514
|
onConfigMessage() {
|
|
1515
1515
|
if (!this.isEmbedded())
|
|
1516
|
-
throw new
|
|
1516
|
+
throw new d(this.currentContext);
|
|
1517
1517
|
const t = "CONFIG";
|
|
1518
1518
|
return this.incomingMessages$.pipe(
|
|
1519
1519
|
g((e) => e.type === t && e.target === "client"),
|
|
1520
|
-
|
|
1520
|
+
l((e) => e),
|
|
1521
1521
|
v(this.logReceived(t)),
|
|
1522
|
-
|
|
1522
|
+
l((e) => ({
|
|
1523
1523
|
preferredCameraType: e.preferredCameraType,
|
|
1524
1524
|
preferredMicType: e.preferredMicType,
|
|
1525
1525
|
preferredOutputType: e.preferredOutputType,
|
|
@@ -1535,28 +1535,28 @@ class xt {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
sendScreenshareSourceMessage(t) {
|
|
1537
1537
|
if (!this.isEmbedded())
|
|
1538
|
-
throw new
|
|
1539
|
-
const e = "SCREENSHARE SOURCE",
|
|
1540
|
-
|
|
1538
|
+
throw new d(this.currentContext);
|
|
1539
|
+
const e = "SCREENSHARE SOURCE", r = this.createMessage(e);
|
|
1540
|
+
r.sourceTypes = t, this.logCreated(e, r);
|
|
1541
1541
|
const i = this.incomingMessages$.pipe(
|
|
1542
|
-
g((o) => o.type === e && o.replyTo ===
|
|
1543
|
-
|
|
1542
|
+
g((o) => o.type === e && o.replyTo === r.id),
|
|
1543
|
+
l((o) => o),
|
|
1544
1544
|
v(this.logReceived(e)),
|
|
1545
|
-
|
|
1545
|
+
l((o) => o),
|
|
1546
1546
|
S(1)
|
|
1547
1547
|
);
|
|
1548
|
-
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(
|
|
1548
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
|
|
1549
1549
|
}
|
|
1550
|
-
layoutChange(t, e,
|
|
1550
|
+
layoutChange(t, e, r) {
|
|
1551
1551
|
if (!this.isEmbedded())
|
|
1552
|
-
throw new
|
|
1552
|
+
throw new d(this.currentContext);
|
|
1553
1553
|
const i = "LAYOUT CHANGE";
|
|
1554
1554
|
let o, s;
|
|
1555
|
-
if (e &&
|
|
1555
|
+
if (e && r ? (o = this.createMessage(i, !1, r), o.result = e) : (o = this.createMessage(i), s = this.incomingMessages$.pipe(
|
|
1556
1556
|
g((c) => c.type === i && c.replyTo === o.id),
|
|
1557
|
-
|
|
1557
|
+
l((c) => c),
|
|
1558
1558
|
v(this.logReceived(i)),
|
|
1559
|
-
|
|
1559
|
+
l((c) => c),
|
|
1560
1560
|
S(1)
|
|
1561
1561
|
), this.logService.debug(`Created ${i} Reply handler`)), o.layout = t, this.logCreated(i, o), this.port2.postMessage(o), this.logSent(i, o), s)
|
|
1562
1562
|
return s;
|
|
@@ -1594,57 +1594,57 @@ class xt {
|
|
|
1594
1594
|
*/
|
|
1595
1595
|
onLayoutChangeMessage() {
|
|
1596
1596
|
if (!this.isEmbedded())
|
|
1597
|
-
throw new
|
|
1597
|
+
throw new d(this.currentContext);
|
|
1598
1598
|
const t = "LAYOUT CHANGE";
|
|
1599
1599
|
return this.incomingMessages$.pipe(
|
|
1600
1600
|
g((e) => e.type === t && e.target === "client" && e.replyTo === null),
|
|
1601
|
-
|
|
1601
|
+
l((e) => e),
|
|
1602
1602
|
v(this.logReceived(t)),
|
|
1603
|
-
|
|
1603
|
+
l((e) => e)
|
|
1604
1604
|
);
|
|
1605
1605
|
}
|
|
1606
1606
|
requestOAuthToken(t) {
|
|
1607
1607
|
if (!this.isEmbedded())
|
|
1608
|
-
throw new
|
|
1608
|
+
throw new d(this.currentContext);
|
|
1609
1609
|
Array.isArray(t) || (t = [t]);
|
|
1610
|
-
const e = "OAUTH TOKEN",
|
|
1611
|
-
|
|
1610
|
+
const e = "OAUTH TOKEN", r = this.createMessage(e);
|
|
1611
|
+
r.providerTypes = t, this.logCreated(e, r);
|
|
1612
1612
|
const i = this.incomingMessages$.pipe(
|
|
1613
|
-
g((o) => o.type === e && o.replyTo ===
|
|
1614
|
-
|
|
1613
|
+
g((o) => o.type === e && o.replyTo === r.id),
|
|
1614
|
+
l((o) => o),
|
|
1615
1615
|
v(this.logReceived(e)),
|
|
1616
1616
|
S(1)
|
|
1617
1617
|
);
|
|
1618
|
-
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(
|
|
1618
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
|
|
1619
1619
|
}
|
|
1620
1620
|
openUrl(t, e) {
|
|
1621
1621
|
if (!this.isEmbedded())
|
|
1622
|
-
throw new
|
|
1623
|
-
const
|
|
1624
|
-
i.url = t, i.data = e, this.logCreated(
|
|
1622
|
+
throw new d(this.currentContext);
|
|
1623
|
+
const r = "OPEN URL", i = this.createMessage(r, !1);
|
|
1624
|
+
i.url = t, i.data = e, this.logCreated(r, i), this.port2.postMessage(i), this.logSent(r, i);
|
|
1625
1625
|
}
|
|
1626
|
-
selectContacts(t, e,
|
|
1626
|
+
selectContacts(t, e, r) {
|
|
1627
1627
|
if (!this.isEmbedded())
|
|
1628
|
-
throw new
|
|
1629
|
-
if (e === "group" &&
|
|
1628
|
+
throw new d(this.currentContext);
|
|
1629
|
+
if (e === "group" && r === void 0)
|
|
1630
1630
|
throw new $(
|
|
1631
1631
|
"currentContacts",
|
|
1632
|
-
|
|
1632
|
+
r,
|
|
1633
1633
|
"currentContacts is required for group streams"
|
|
1634
1634
|
);
|
|
1635
|
-
if (e === "direct" &&
|
|
1635
|
+
if (e === "direct" && r !== void 0)
|
|
1636
1636
|
throw new $(
|
|
1637
1637
|
"currentContacts",
|
|
1638
|
-
|
|
1638
|
+
r,
|
|
1639
1639
|
"currentContacts should not be passed for direct streams"
|
|
1640
1640
|
);
|
|
1641
1641
|
const i = "SELECT CONTACTS", o = this.createMessage(i, !0);
|
|
1642
|
-
o.streamType = e, o.streamId = t, o.currentContacts =
|
|
1642
|
+
o.streamType = e, o.streamId = t, o.currentContacts = r, this.logCreated(i, o);
|
|
1643
1643
|
const s = this.incomingMessages$.pipe(
|
|
1644
1644
|
g((c) => c.type === i && c.replyTo === o.id),
|
|
1645
1645
|
v(this.logReceived(i)),
|
|
1646
1646
|
// validate if `streamId` is the same as we sent
|
|
1647
|
-
|
|
1647
|
+
l((c) => {
|
|
1648
1648
|
const u = c;
|
|
1649
1649
|
if (u.streamId !== t)
|
|
1650
1650
|
throw new rt(u.streamId, t);
|
|
@@ -1664,26 +1664,27 @@ class xt {
|
|
|
1664
1664
|
*/
|
|
1665
1665
|
matchContacts(t) {
|
|
1666
1666
|
if (!this.isEmbedded())
|
|
1667
|
-
throw new
|
|
1667
|
+
throw new d(this.currentContext);
|
|
1668
1668
|
if (!t.length)
|
|
1669
1669
|
throw new $("contacts", t, "At least one contact is required");
|
|
1670
|
-
const e = "MATCH CONTACTS",
|
|
1671
|
-
|
|
1670
|
+
const e = "MATCH CONTACTS", r = this.createMessage(e);
|
|
1671
|
+
r.contacts = [...t], this.logCreated(e, r);
|
|
1672
1672
|
const i = this.incomingMessages$.pipe(
|
|
1673
|
-
g((o) => o.type === e && o.replyTo ===
|
|
1673
|
+
g((o) => o.type === e && o.replyTo === r.id),
|
|
1674
1674
|
v(this.logReceived(e)),
|
|
1675
|
-
|
|
1675
|
+
l((o) => o),
|
|
1676
1676
|
S(1)
|
|
1677
1677
|
);
|
|
1678
|
-
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(
|
|
1678
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
|
|
1679
1679
|
}
|
|
1680
1680
|
/**
|
|
1681
1681
|
* Setup listener for {@link PushMessageMessage}, which can be sent by a Host app to forward an
|
|
1682
1682
|
* an Acrobits Messaging message received via push notification to the Client app.
|
|
1683
1683
|
*
|
|
1684
1684
|
* @remarks
|
|
1685
|
-
* The format of the
|
|
1686
|
-
*
|
|
1685
|
+
* The format of the payload SHOULD be kept the same as the one received from the push
|
|
1686
|
+
* notification. The Client app can then use the {@link MessagingNotificationType} to parse the
|
|
1687
|
+
* message as needed.
|
|
1687
1688
|
*
|
|
1688
1689
|
* @example
|
|
1689
1690
|
* Here is an example of how a listener can be setup:
|
|
@@ -1704,11 +1705,11 @@ class xt {
|
|
|
1704
1705
|
*/
|
|
1705
1706
|
onPushMessageMessage() {
|
|
1706
1707
|
if (!this.isEmbedded())
|
|
1707
|
-
throw new
|
|
1708
|
+
throw new d(this.currentContext);
|
|
1708
1709
|
const t = "PUSH MESSAGE";
|
|
1709
1710
|
return this.incomingMessages$.pipe(
|
|
1710
1711
|
g((e) => e.type === t && e.target === "client"),
|
|
1711
|
-
|
|
1712
|
+
l((e) => e),
|
|
1712
1713
|
v(this.logReceived(t))
|
|
1713
1714
|
);
|
|
1714
1715
|
}
|
|
@@ -1723,16 +1724,16 @@ class xt {
|
|
|
1723
1724
|
*/
|
|
1724
1725
|
requestPushToken() {
|
|
1725
1726
|
if (!this.isEmbedded())
|
|
1726
|
-
throw new
|
|
1727
|
+
throw new d(this.currentContext);
|
|
1727
1728
|
const t = "PUSH TOKEN", e = this.createMessage(t);
|
|
1728
1729
|
this.logCreated(t, e);
|
|
1729
|
-
const
|
|
1730
|
+
const r = this.incomingMessages$.pipe(
|
|
1730
1731
|
g((i) => i.type === t && i.replyTo === e.id),
|
|
1731
1732
|
v(this.logReceived(t)),
|
|
1732
|
-
|
|
1733
|
+
l((i) => i),
|
|
1733
1734
|
S(1)
|
|
1734
1735
|
);
|
|
1735
|
-
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e),
|
|
1736
|
+
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
|
|
1736
1737
|
}
|
|
1737
1738
|
/**
|
|
1738
1739
|
* Setup listener for {@link BadgeQueryMessage}, which can be sent by a `Host` app to request the
|
|
@@ -1743,11 +1744,11 @@ class xt {
|
|
|
1743
1744
|
*/
|
|
1744
1745
|
onBadgeQueryMessage() {
|
|
1745
1746
|
if (!this.isEmbedded())
|
|
1746
|
-
throw new
|
|
1747
|
+
throw new d(this.currentContext);
|
|
1747
1748
|
const t = "BADGE QUERY";
|
|
1748
1749
|
return this.incomingMessages$.pipe(
|
|
1749
1750
|
g((e) => e.type === t && e.target === "client"),
|
|
1750
|
-
|
|
1751
|
+
l((e) => e),
|
|
1751
1752
|
v(this.logReceived(t))
|
|
1752
1753
|
);
|
|
1753
1754
|
}
|
|
@@ -1764,9 +1765,9 @@ class xt {
|
|
|
1764
1765
|
*/
|
|
1765
1766
|
sendBadgeUpdateMessage(t, e) {
|
|
1766
1767
|
if (!this.isEmbedded())
|
|
1767
|
-
throw new
|
|
1768
|
-
const
|
|
1769
|
-
i.count = t, this.logCreated(
|
|
1768
|
+
throw new d(this.currentContext);
|
|
1769
|
+
const r = "BADGE UPDATE", i = this.createMessage(r, !1, e);
|
|
1770
|
+
i.count = t, this.logCreated(r, i), this.port2.postMessage(i), this.logSent(r, i);
|
|
1770
1771
|
}
|
|
1771
1772
|
/**
|
|
1772
1773
|
* Setup listener for {@link HostInForegroundMessage}, which can be sent by a `Host` app to
|
|
@@ -1781,14 +1782,92 @@ class xt {
|
|
|
1781
1782
|
*/
|
|
1782
1783
|
onHostInForegroundMessage() {
|
|
1783
1784
|
if (!this.isEmbedded())
|
|
1784
|
-
throw new
|
|
1785
|
+
throw new d(this.currentContext);
|
|
1785
1786
|
const t = "HOST IN FOREGROUND";
|
|
1786
1787
|
return this.incomingMessages$.pipe(
|
|
1787
1788
|
g((e) => e.type === t && e.target === "client"),
|
|
1788
|
-
|
|
1789
|
+
l((e) => e),
|
|
1790
|
+
v(this.logReceived(t))
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* Sends a {@link LifecycleMessage} to the Host app, to notify it of a lifecycle event.
|
|
1795
|
+
*
|
|
1796
|
+
* @remarks
|
|
1797
|
+
* This message is used to notify the Host app of a lifecycle event, such as the app
|
|
1798
|
+
* re-establishing a connection with it's server after being offline or the user joining a call
|
|
1799
|
+
* etc.
|
|
1800
|
+
*
|
|
1801
|
+
* @param eventName - Name of the event to send
|
|
1802
|
+
* @param payload - Payload to send with the event
|
|
1803
|
+
*
|
|
1804
|
+
* @returns This method returns void.
|
|
1805
|
+
*/
|
|
1806
|
+
sendLifecycleMessage(t, e) {
|
|
1807
|
+
if (!this.isEmbedded())
|
|
1808
|
+
throw new d(this.currentContext);
|
|
1809
|
+
const r = "LIFECYCLE", i = this.createMessage(r, !1);
|
|
1810
|
+
i.eventName = t, i.payload = e, this.logCreated(r, i), this.port2.postMessage(i), this.logSent(r, i);
|
|
1811
|
+
}
|
|
1812
|
+
/**
|
|
1813
|
+
* Sends a {@link LogMessage} to the Host app, to add to it's application logs.
|
|
1814
|
+
*
|
|
1815
|
+
* @remarks
|
|
1816
|
+
* The purpose of this message is to provide a generic mechanism of reporting logs for various
|
|
1817
|
+
* apps using the IPC protocol.
|
|
1818
|
+
*
|
|
1819
|
+
* @param level - The {@link LogMessageLevel}
|
|
1820
|
+
* @param message - Message to log as a string. This can be a JSON string as well.
|
|
1821
|
+
*
|
|
1822
|
+
* @returns This method returns void.
|
|
1823
|
+
*/
|
|
1824
|
+
sendLogMessage(t, e) {
|
|
1825
|
+
if (!this.isEmbedded())
|
|
1826
|
+
throw new d(this.currentContext);
|
|
1827
|
+
const r = "LOG", i = this.createMessage(r, !1);
|
|
1828
|
+
i.level = t, i.message = e, this.logCreated(r, i), this.port2.postMessage(i), this.logSent(r, i);
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Setup listener for {@link RequestLogsMessage}, which can be sent by a `Host` app to request
|
|
1832
|
+
* logs from the `Client` app.
|
|
1833
|
+
*
|
|
1834
|
+
* @remarks
|
|
1835
|
+
* The `Host` app can either request that logs be sent as a buffer via the IPC Protocol or
|
|
1836
|
+
* trigger a file download by the `Client` by passing a {@link RequestLogsResponseType} in the
|
|
1837
|
+
* `responseType` property.
|
|
1838
|
+
*
|
|
1839
|
+
* @returns An observable that emits whenever a {@link RequestLogsMessage} is received so it can
|
|
1840
|
+
* be subscribed to indefinitely.
|
|
1841
|
+
*/
|
|
1842
|
+
onRequestLogsMessage() {
|
|
1843
|
+
if (!this.isEmbedded())
|
|
1844
|
+
throw new d(this.currentContext);
|
|
1845
|
+
const t = "REQUEST LOGS";
|
|
1846
|
+
return this.incomingMessages$.pipe(
|
|
1847
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1848
|
+
l((e) => e),
|
|
1789
1849
|
v(this.logReceived(t))
|
|
1790
1850
|
);
|
|
1791
1851
|
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Send a {@link ViewTransitionMessage} to the `Host` app, notifying it of a view transition
|
|
1854
|
+
* happening in the `Client` app.
|
|
1855
|
+
*
|
|
1856
|
+
* @remarks
|
|
1857
|
+
* A view transition can be either a route navigation, opening or closing a modal, switching tabs
|
|
1858
|
+
* or opening a menu.
|
|
1859
|
+
*
|
|
1860
|
+
* @param transitionType - The kind of transition. Should be of {@link ViewTransitionType}.
|
|
1861
|
+
* @param targetView - The name of the view which is being transitioned to.
|
|
1862
|
+
*
|
|
1863
|
+
* @returns This method returns void.
|
|
1864
|
+
*/
|
|
1865
|
+
sendViewTransitionMessage(t, e) {
|
|
1866
|
+
if (!this.isEmbedded())
|
|
1867
|
+
throw new d(this.currentContext);
|
|
1868
|
+
const r = "VIEW TRANSITION", i = this.createMessage(r, !1);
|
|
1869
|
+
i.transitionType = t, i.targetView = e, this.logCreated(r, i), this.port2.postMessage(i), this.logSent(r, i);
|
|
1870
|
+
}
|
|
1792
1871
|
/**
|
|
1793
1872
|
* Checks if the client app is either embedded in an iframe or in a native webview.
|
|
1794
1873
|
*
|
|
@@ -1803,8 +1882,8 @@ class xt {
|
|
|
1803
1882
|
return this.logService.debug("Checking if running in iframe..."), t = !!this.frameElement, t || (t = this.self !== this.parent), t ? (this.logService.debug("In iframe"), this.inIframe = !0, this.embeddedResult = !0, !0) : (this.logService.debug("Not in iframe"), this.logService.debug("Checking if running in native app..."), !t && (t = !!window.Acrobits, t) ? (this.logService.debug("In native app"), this.embeddedResult = !0, t) : (this.logService.debug("Not running in native app"), this.embeddedResult = !1, this.embeddedResult));
|
|
1804
1883
|
}
|
|
1805
1884
|
logReceived(t, e) {
|
|
1806
|
-
const
|
|
1807
|
-
return e &&
|
|
1885
|
+
const r = (i) => this.logService.debug(`[IPC] Received ${t} message`, i);
|
|
1886
|
+
return e && r(e), r;
|
|
1808
1887
|
}
|
|
1809
1888
|
logSent(t, e) {
|
|
1810
1889
|
this.logService.debug(`[IPC] Sent ${t} message`, e);
|
|
@@ -1814,8 +1893,8 @@ class xt {
|
|
|
1814
1893
|
}
|
|
1815
1894
|
async createIframeChannel() {
|
|
1816
1895
|
return new Promise((t) => {
|
|
1817
|
-
const e = (
|
|
1818
|
-
|
|
1896
|
+
const e = (r) => {
|
|
1897
|
+
r.data === "message channel port" && (this.iframePort2 = r.ports[0], this.self.removeEventListener("message", e), t());
|
|
1819
1898
|
};
|
|
1820
1899
|
this.self.addEventListener("message", e), this.parent.postMessage("get channel", "*");
|
|
1821
1900
|
});
|
|
@@ -1827,21 +1906,21 @@ class xt {
|
|
|
1827
1906
|
const { data: e } = t;
|
|
1828
1907
|
!e.id || e.target !== "client" || this.incomingMessages$.next(e);
|
|
1829
1908
|
}
|
|
1830
|
-
createMessage(t, e = !0,
|
|
1909
|
+
createMessage(t, e = !0, r) {
|
|
1831
1910
|
return {
|
|
1832
1911
|
type: t,
|
|
1833
1912
|
id: this.generateId(),
|
|
1834
1913
|
target: "host",
|
|
1835
1914
|
expectReply: e,
|
|
1836
|
-
replyTo:
|
|
1915
|
+
replyTo: r ?? null
|
|
1837
1916
|
};
|
|
1838
1917
|
}
|
|
1839
1918
|
generateId(t = 8, e = !1) {
|
|
1840
|
-
let
|
|
1919
|
+
let r = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
|
|
1841
1920
|
const i = [];
|
|
1842
|
-
e && (
|
|
1921
|
+
e && (r = r.substr(0, r.indexOf("Q")));
|
|
1843
1922
|
for (let o = 0; o < t; o++)
|
|
1844
|
-
i.push(
|
|
1923
|
+
i.push(r[Math.floor(Math.random() * r.length)]);
|
|
1845
1924
|
return i.join("");
|
|
1846
1925
|
}
|
|
1847
1926
|
}
|
|
@@ -1909,36 +1988,36 @@ class It {
|
|
|
1909
1988
|
this.helper.openBridge().pipe(
|
|
1910
1989
|
Ze((t) => {
|
|
1911
1990
|
this.helper.onBadgeQueryMessage().subscribe((e) => {
|
|
1912
|
-
var
|
|
1991
|
+
var r;
|
|
1913
1992
|
this.logger.debug("Received Badge Query: ", e);
|
|
1914
|
-
for (const i of ((
|
|
1993
|
+
for (const i of ((r = this.listeners.get(C.BadgeQuery)) == null ? void 0 : r.values()) ?? [])
|
|
1915
1994
|
i();
|
|
1916
1995
|
}), this.helper.onHostInForegroundMessage().subscribe((e) => {
|
|
1917
|
-
var
|
|
1996
|
+
var r;
|
|
1918
1997
|
this.logger.debug("Received Host In Foreground: ", e);
|
|
1919
|
-
for (const i of ((
|
|
1998
|
+
for (const i of ((r = this.listeners.get(C.HostInForeground)) == null ? void 0 : r.values()) ?? [])
|
|
1920
1999
|
i();
|
|
1921
2000
|
}), this.cloudId = t.cloudId, this.host = t.host;
|
|
1922
2001
|
}),
|
|
1923
|
-
|
|
2002
|
+
A(() => {
|
|
1924
2003
|
})
|
|
1925
2004
|
)
|
|
1926
2005
|
);
|
|
1927
2006
|
}
|
|
1928
|
-
selectContacts(t, e,
|
|
2007
|
+
selectContacts(t, e, r) {
|
|
1929
2008
|
this.logger.debug("Selecting Contacts: ", ...arguments);
|
|
1930
2009
|
let i;
|
|
1931
2010
|
if (e === "multi") {
|
|
1932
|
-
if (!
|
|
2011
|
+
if (!r)
|
|
1933
2012
|
throw new $(
|
|
1934
2013
|
"currentContacts",
|
|
1935
|
-
|
|
2014
|
+
r,
|
|
1936
2015
|
"currentContacts is required for group streams"
|
|
1937
2016
|
);
|
|
1938
|
-
i = this.helper.selectContacts(t.toString(), "group",
|
|
2017
|
+
i = this.helper.selectContacts(t.toString(), "group", r);
|
|
1939
2018
|
} else
|
|
1940
2019
|
i = this.helper.selectContacts(t.toString(), "direct");
|
|
1941
|
-
return O(i.pipe(
|
|
2020
|
+
return O(i.pipe(A((o) => o.contacts)));
|
|
1942
2021
|
}
|
|
1943
2022
|
/**
|
|
1944
2023
|
* Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
|
|
@@ -1950,7 +2029,7 @@ class It {
|
|
|
1950
2029
|
* Host's contact list.
|
|
1951
2030
|
*/
|
|
1952
2031
|
matchContacts(t) {
|
|
1953
|
-
return this.logger.debug("Match Contacts: ", t), O(this.helper.matchContacts(t).pipe(
|
|
2032
|
+
return this.logger.debug("Match Contacts: ", t), O(this.helper.matchContacts(t).pipe(A((e) => e.contacts)));
|
|
1954
2033
|
}
|
|
1955
2034
|
/**
|
|
1956
2035
|
* Requests the `Host` app to provide the Push Token for the current device.
|
|
@@ -1958,7 +2037,7 @@ class It {
|
|
|
1958
2037
|
* @returns A promise with the Push Token as `string`.
|
|
1959
2038
|
*/
|
|
1960
2039
|
requestPushToken() {
|
|
1961
|
-
return this.logger.debug("Requesting Push Token"), O(this.helper.requestPushToken().pipe(
|
|
2040
|
+
return this.logger.debug("Requesting Push Token"), O(this.helper.requestPushToken().pipe(A((t) => t.pushToken)));
|
|
1962
2041
|
}
|
|
1963
2042
|
/**
|
|
1964
2043
|
* Sends the current badge count to the `Host` app.
|
|
@@ -1978,8 +2057,8 @@ class It {
|
|
|
1978
2057
|
onBadgeQueryRequest(t) {
|
|
1979
2058
|
var e;
|
|
1980
2059
|
return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(C.BadgeQuery)) == null || e.add(t), () => {
|
|
1981
|
-
var
|
|
1982
|
-
return (
|
|
2060
|
+
var r;
|
|
2061
|
+
return (r = this.listeners.get(C.BadgeQuery)) == null ? void 0 : r.delete(t);
|
|
1983
2062
|
};
|
|
1984
2063
|
}
|
|
1985
2064
|
/**
|
|
@@ -1992,8 +2071,8 @@ class It {
|
|
|
1992
2071
|
onHostInForeground(t) {
|
|
1993
2072
|
var e;
|
|
1994
2073
|
return this.logger.debug("Registering for Host In Foreground"), (e = this.listeners.get(C.HostInForeground)) == null || e.add(t), () => {
|
|
1995
|
-
var
|
|
1996
|
-
return (
|
|
2074
|
+
var r;
|
|
2075
|
+
return (r = this.listeners.get(C.HostInForeground)) == null ? void 0 : r.delete(t);
|
|
1997
2076
|
};
|
|
1998
2077
|
}
|
|
1999
2078
|
evaluateContext(t) {
|