@acrobits/ipc-sdk 0.7.0 → 0.7.2-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/assets/main.js +4 -4
- package/docs/assets/style.css +46 -15
- package/docs/classes/IPCManager.html +27 -27
- package/docs/enums/IPCEvents.html +1 -1
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +1 -1
- package/docs/interfaces/BaseContactItem.html +2 -2
- package/docs/interfaces/CloudUsernameContactItem.html +3 -3
- package/docs/interfaces/DetailedContactItem.html +9 -9
- package/docs/interfaces/ILogger.html +2 -2
- package/docs/interfaces/UriContactItem.html +3 -3
- package/docs/modules.html +1 -1
- package/docs/types/ContactItem.html +1 -1
- package/docs/types/ContactLabel.html +1 -1
- package/docs/types/ContactType.html +1 -1
- package/docs/types/ContactURI.html +1 -1
- package/docs/types/HostType.html +1 -1
- package/docs/types/IPCContext.html +1 -1
- package/docs/types/IpcProtocolVersion.html +1 -1
- package/docs/types/UnsubscribeCallback.html +2 -2
- package/lib/ipc-sdk.js +320 -284
- 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/lib/tsdoc-metadata.json +1 -1
- package/package.json +9 -9
package/lib/ipc-sdk.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var Pe = (n, t, e) => t in n ? Ie(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var T = (n, t, e) => (Pe(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var m = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n.PushToken = "PUSH TOKEN", n))(m || {}), B = function(n, t) {
|
|
5
|
+
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
6
6
|
e.__proto__ = r;
|
|
7
7
|
} || function(e, r) {
|
|
8
8
|
for (var i in r)
|
|
9
9
|
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
10
|
-
},
|
|
10
|
+
}, B(n, t);
|
|
11
11
|
};
|
|
12
12
|
function M(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
|
+
B(n, t);
|
|
16
16
|
function e() {
|
|
17
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
|
|
21
|
+
function z(n) {
|
|
22
22
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], r = 0;
|
|
23
23
|
if (e)
|
|
24
24
|
return e.call(n);
|
|
@@ -30,7 +30,7 @@ function Q(n) {
|
|
|
30
30
|
};
|
|
31
31
|
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function $(n, t) {
|
|
34
34
|
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
35
35
|
if (!e)
|
|
36
36
|
return n;
|
|
@@ -50,22 +50,22 @@ function _(n, t) {
|
|
|
50
50
|
}
|
|
51
51
|
return s;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function F(n, t, e) {
|
|
54
54
|
if (e || arguments.length === 2)
|
|
55
55
|
for (var r = 0, i = t.length, s; r < i; r++)
|
|
56
56
|
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
57
57
|
return n.concat(s || Array.prototype.slice.call(t));
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function w(n) {
|
|
60
60
|
return typeof n == "function";
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function X(n) {
|
|
63
63
|
var t = function(r) {
|
|
64
64
|
Error.call(r), r.stack = new Error().stack;
|
|
65
65
|
}, e = n(t);
|
|
66
66
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var j = X(function(n) {
|
|
69
69
|
return function(e) {
|
|
70
70
|
n(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
71
71
|
` + e.map(function(r, i) {
|
|
@@ -74,13 +74,13 @@ var D = Z(function(n) {
|
|
|
74
74
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
|
-
function
|
|
77
|
+
function k(n, t) {
|
|
78
78
|
if (n) {
|
|
79
79
|
var e = n.indexOf(t);
|
|
80
80
|
0 <= e && n.splice(e, 1);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var R = function() {
|
|
84
84
|
function n(t) {
|
|
85
85
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
86
86
|
}
|
|
@@ -92,12 +92,12 @@ var P = function() {
|
|
|
92
92
|
if (o)
|
|
93
93
|
if (this._parentage = null, Array.isArray(o))
|
|
94
94
|
try {
|
|
95
|
-
for (var c =
|
|
95
|
+
for (var c = z(o), a = c.next(); !a.done; a = c.next()) {
|
|
96
96
|
var u = a.value;
|
|
97
97
|
u.remove(this);
|
|
98
98
|
}
|
|
99
|
-
} catch (
|
|
100
|
-
t = { error:
|
|
99
|
+
} catch (v) {
|
|
100
|
+
t = { error: v };
|
|
101
101
|
} finally {
|
|
102
102
|
try {
|
|
103
103
|
a && !a.done && (e = c.return) && e.call(c);
|
|
@@ -109,29 +109,29 @@ var P = function() {
|
|
|
109
109
|
else
|
|
110
110
|
o.remove(this);
|
|
111
111
|
var g = this.initialTeardown;
|
|
112
|
-
if (
|
|
112
|
+
if (w(g))
|
|
113
113
|
try {
|
|
114
114
|
g();
|
|
115
|
-
} catch (
|
|
116
|
-
s =
|
|
115
|
+
} catch (v) {
|
|
116
|
+
s = v instanceof j ? v.errors : [v];
|
|
117
117
|
}
|
|
118
|
-
var
|
|
119
|
-
if (
|
|
118
|
+
var y = this._finalizers;
|
|
119
|
+
if (y) {
|
|
120
120
|
this._finalizers = null;
|
|
121
121
|
try {
|
|
122
|
-
for (var
|
|
123
|
-
var
|
|
122
|
+
for (var p = z(y), S = p.next(); !S.done; S = p.next()) {
|
|
123
|
+
var V = S.value;
|
|
124
124
|
try {
|
|
125
|
-
|
|
126
|
-
} catch (
|
|
127
|
-
s = s ?? [],
|
|
125
|
+
ie(V);
|
|
126
|
+
} catch (v) {
|
|
127
|
+
s = s ?? [], v instanceof j ? s = F(F([], $(s)), $(v.errors)) : s.push(v);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
} catch (
|
|
131
|
-
r = { error:
|
|
130
|
+
} catch (v) {
|
|
131
|
+
r = { error: v };
|
|
132
132
|
} finally {
|
|
133
133
|
try {
|
|
134
|
-
|
|
134
|
+
S && !S.done && (i = p.return) && i.call(p);
|
|
135
135
|
} finally {
|
|
136
136
|
if (r)
|
|
137
137
|
throw r.error;
|
|
@@ -139,13 +139,13 @@ var P = function() {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
if (s)
|
|
142
|
-
throw new
|
|
142
|
+
throw new j(s);
|
|
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
150
|
if (t instanceof n) {
|
|
151
151
|
if (t.closed || t._hasParent(this))
|
|
@@ -162,58 +162,57 @@ var P = function() {
|
|
|
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
|
-
e === t ? this._parentage = null : Array.isArray(e) &&
|
|
165
|
+
e === t ? this._parentage = null : Array.isArray(e) && k(e, t);
|
|
166
166
|
}, n.prototype.remove = function(t) {
|
|
167
167
|
var e = this._finalizers;
|
|
168
|
-
e &&
|
|
168
|
+
e && k(e, t), t instanceof n && t._removeParent(this);
|
|
169
169
|
}, n.EMPTY = function() {
|
|
170
170
|
var t = new n();
|
|
171
171
|
return t.closed = !0, t;
|
|
172
172
|
}(), n;
|
|
173
|
-
}(),
|
|
174
|
-
function
|
|
175
|
-
return n instanceof
|
|
173
|
+
}(), be = R.EMPTY;
|
|
174
|
+
function me(n) {
|
|
175
|
+
return n instanceof R || n && "closed" in n && w(n.remove) && w(n.add) && w(n.unsubscribe);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
|
|
177
|
+
function ie(n) {
|
|
178
|
+
w(n) ? n() : n.unsubscribe();
|
|
179
179
|
}
|
|
180
|
-
var
|
|
180
|
+
var we = {
|
|
181
181
|
onUnhandledError: null,
|
|
182
182
|
onStoppedNotification: null,
|
|
183
183
|
Promise: void 0,
|
|
184
184
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
185
185
|
useDeprecatedNextContext: !1
|
|
186
|
-
},
|
|
186
|
+
}, Se = {
|
|
187
187
|
setTimeout: function(n, t) {
|
|
188
188
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
189
189
|
e[r - 2] = arguments[r];
|
|
190
|
-
|
|
191
|
-
return i != null && i.setTimeout ? i.setTimeout.apply(i, R([n, t], _(e))) : setTimeout.apply(void 0, R([n, t], _(e)));
|
|
190
|
+
return setTimeout.apply(void 0, F([n, t], $(e)));
|
|
192
191
|
},
|
|
193
192
|
clearTimeout: function(n) {
|
|
194
|
-
var t =
|
|
193
|
+
var t = Se.delegate;
|
|
195
194
|
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(n);
|
|
196
195
|
},
|
|
197
196
|
delegate: void 0
|
|
198
197
|
};
|
|
199
|
-
function
|
|
200
|
-
|
|
198
|
+
function Ae(n) {
|
|
199
|
+
Se.setTimeout(function() {
|
|
201
200
|
throw n;
|
|
202
201
|
});
|
|
203
202
|
}
|
|
204
|
-
function
|
|
203
|
+
function se() {
|
|
205
204
|
}
|
|
206
|
-
function
|
|
205
|
+
function U(n) {
|
|
207
206
|
n();
|
|
208
207
|
}
|
|
209
|
-
var
|
|
208
|
+
var Z = function(n) {
|
|
210
209
|
M(t, n);
|
|
211
210
|
function t(e) {
|
|
212
211
|
var r = n.call(this) || this;
|
|
213
|
-
return r.isStopped = !1, e ? (r.destination = e,
|
|
212
|
+
return r.isStopped = !1, e ? (r.destination = e, me(e) && e.add(r)) : r.destination = $e, r;
|
|
214
213
|
}
|
|
215
214
|
return t.create = function(e, r, i) {
|
|
216
|
-
return new
|
|
215
|
+
return new N(e, r, i);
|
|
217
216
|
}, t.prototype.next = function(e) {
|
|
218
217
|
this.isStopped || this._next(e);
|
|
219
218
|
}, t.prototype.error = function(e) {
|
|
@@ -237,11 +236,11 @@ var ee = function(n) {
|
|
|
237
236
|
this.unsubscribe();
|
|
238
237
|
}
|
|
239
238
|
}, t;
|
|
240
|
-
}(
|
|
241
|
-
function
|
|
242
|
-
return
|
|
239
|
+
}(R), Oe = Function.prototype.bind;
|
|
240
|
+
function H(n, t) {
|
|
241
|
+
return Oe.call(n, t);
|
|
243
242
|
}
|
|
244
|
-
var
|
|
243
|
+
var Le = function() {
|
|
245
244
|
function n(t) {
|
|
246
245
|
this.partialObserver = t;
|
|
247
246
|
}
|
|
@@ -272,11 +271,11 @@ var $e = function() {
|
|
|
272
271
|
A(e);
|
|
273
272
|
}
|
|
274
273
|
}, n;
|
|
275
|
-
}(),
|
|
274
|
+
}(), N = function(n) {
|
|
276
275
|
M(t, n);
|
|
277
276
|
function t(e, r, i) {
|
|
278
277
|
var s = n.call(this) || this, o;
|
|
279
|
-
if (
|
|
278
|
+
if (w(e) || !e)
|
|
280
279
|
o = {
|
|
281
280
|
next: e ?? void 0,
|
|
282
281
|
error: r ?? void 0,
|
|
@@ -284,43 +283,43 @@ var $e = function() {
|
|
|
284
283
|
};
|
|
285
284
|
else {
|
|
286
285
|
var c;
|
|
287
|
-
s &&
|
|
286
|
+
s && we.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
288
287
|
return s.unsubscribe();
|
|
289
288
|
}, o = {
|
|
290
|
-
next: e.next &&
|
|
291
|
-
error: e.error &&
|
|
292
|
-
complete: e.complete &&
|
|
289
|
+
next: e.next && H(e.next, c),
|
|
290
|
+
error: e.error && H(e.error, c),
|
|
291
|
+
complete: e.complete && H(e.complete, c)
|
|
293
292
|
}) : o = e;
|
|
294
293
|
}
|
|
295
|
-
return s.destination = new
|
|
294
|
+
return s.destination = new Le(o), s;
|
|
296
295
|
}
|
|
297
296
|
return t;
|
|
298
|
-
}(
|
|
297
|
+
}(Z);
|
|
299
298
|
function A(n) {
|
|
300
|
-
|
|
299
|
+
Ae(n);
|
|
301
300
|
}
|
|
302
301
|
function Ue(n) {
|
|
303
302
|
throw n;
|
|
304
303
|
}
|
|
305
|
-
var
|
|
304
|
+
var $e = {
|
|
306
305
|
closed: !0,
|
|
307
|
-
next:
|
|
306
|
+
next: se,
|
|
308
307
|
error: Ue,
|
|
309
|
-
complete:
|
|
310
|
-
},
|
|
308
|
+
complete: se
|
|
309
|
+
}, Fe = function() {
|
|
311
310
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
312
311
|
}();
|
|
313
312
|
function Ee(n) {
|
|
314
313
|
return n;
|
|
315
314
|
}
|
|
316
|
-
function
|
|
315
|
+
function ke(n) {
|
|
317
316
|
return n.length === 0 ? Ee : n.length === 1 ? n[0] : function(e) {
|
|
318
317
|
return n.reduce(function(r, i) {
|
|
319
318
|
return i(r);
|
|
320
319
|
}, e);
|
|
321
320
|
};
|
|
322
321
|
}
|
|
323
|
-
var
|
|
322
|
+
var Q = function() {
|
|
324
323
|
function n(t) {
|
|
325
324
|
t && (this._subscribe = t);
|
|
326
325
|
}
|
|
@@ -328,8 +327,8 @@ var G = function() {
|
|
|
328
327
|
var e = new n();
|
|
329
328
|
return e.source = this, e.operator = t, e;
|
|
330
329
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
331
|
-
var i = this, s =
|
|
332
|
-
return
|
|
330
|
+
var i = this, s = Ve(t) ? t : new N(t, e, r);
|
|
331
|
+
return U(function() {
|
|
333
332
|
var o = i, c = o.operator, a = o.source;
|
|
334
333
|
s.add(c ? c.call(s, a) : a ? i._subscribe(s) : i._trySubscribe(s));
|
|
335
334
|
}), s;
|
|
@@ -341,8 +340,8 @@ var G = function() {
|
|
|
341
340
|
}
|
|
342
341
|
}, n.prototype.forEach = function(t, e) {
|
|
343
342
|
var r = this;
|
|
344
|
-
return e =
|
|
345
|
-
var o = new
|
|
343
|
+
return e = oe(e), new e(function(i, s) {
|
|
344
|
+
var o = new N({
|
|
346
345
|
next: function(c) {
|
|
347
346
|
try {
|
|
348
347
|
t(c);
|
|
@@ -358,15 +357,15 @@ var G = function() {
|
|
|
358
357
|
}, n.prototype._subscribe = function(t) {
|
|
359
358
|
var e;
|
|
360
359
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
361
|
-
}, n.prototype[
|
|
360
|
+
}, n.prototype[Fe] = function() {
|
|
362
361
|
return this;
|
|
363
362
|
}, n.prototype.pipe = function() {
|
|
364
363
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
365
364
|
t[e] = arguments[e];
|
|
366
|
-
return
|
|
365
|
+
return ke(t)(this);
|
|
367
366
|
}, n.prototype.toPromise = function(t) {
|
|
368
367
|
var e = this;
|
|
369
|
-
return t =
|
|
368
|
+
return t = oe(t), new t(function(r, i) {
|
|
370
369
|
var s;
|
|
371
370
|
e.subscribe(function(o) {
|
|
372
371
|
return s = o;
|
|
@@ -380,22 +379,22 @@ var G = function() {
|
|
|
380
379
|
return new n(t);
|
|
381
380
|
}, n;
|
|
382
381
|
}();
|
|
383
|
-
function
|
|
382
|
+
function oe(n) {
|
|
384
383
|
var t;
|
|
385
|
-
return (t = n ??
|
|
384
|
+
return (t = n ?? we.Promise) !== null && t !== void 0 ? t : Promise;
|
|
385
|
+
}
|
|
386
|
+
function Ne(n) {
|
|
387
|
+
return n && w(n.next) && w(n.error) && w(n.complete);
|
|
386
388
|
}
|
|
387
389
|
function Ve(n) {
|
|
388
|
-
return n &&
|
|
390
|
+
return n && n instanceof Z || Ne(n) && me(n);
|
|
389
391
|
}
|
|
390
392
|
function je(n) {
|
|
391
|
-
return n
|
|
392
|
-
}
|
|
393
|
-
function De(n) {
|
|
394
|
-
return m(n == null ? void 0 : n.lift);
|
|
393
|
+
return w(n == null ? void 0 : n.lift);
|
|
395
394
|
}
|
|
396
395
|
function Ce(n) {
|
|
397
396
|
return function(t) {
|
|
398
|
-
if (
|
|
397
|
+
if (je(t))
|
|
399
398
|
return t.lift(function(e) {
|
|
400
399
|
try {
|
|
401
400
|
return n(e, this);
|
|
@@ -407,9 +406,9 @@ function Ce(n) {
|
|
|
407
406
|
};
|
|
408
407
|
}
|
|
409
408
|
function Me(n, t, e, r, i) {
|
|
410
|
-
return new
|
|
409
|
+
return new He(n, t, e, r, i);
|
|
411
410
|
}
|
|
412
|
-
var
|
|
411
|
+
var He = function(n) {
|
|
413
412
|
M(t, n);
|
|
414
413
|
function t(e, r, i, s, o, c) {
|
|
415
414
|
var a = n.call(this, e) || this;
|
|
@@ -444,7 +443,7 @@ var qe = function(n) {
|
|
|
444
443
|
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
445
444
|
}
|
|
446
445
|
}, t;
|
|
447
|
-
}(
|
|
446
|
+
}(Z), De = X(function(n) {
|
|
448
447
|
return function() {
|
|
449
448
|
n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
450
449
|
};
|
|
@@ -455,19 +454,19 @@ var qe = function(n) {
|
|
|
455
454
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
456
455
|
}
|
|
457
456
|
return t.prototype.lift = function(e) {
|
|
458
|
-
var r = new
|
|
457
|
+
var r = new ae(this, this);
|
|
459
458
|
return r.operator = e, r;
|
|
460
459
|
}, t.prototype._throwIfClosed = function() {
|
|
461
460
|
if (this.closed)
|
|
462
|
-
throw new
|
|
461
|
+
throw new De();
|
|
463
462
|
}, t.prototype.next = function(e) {
|
|
464
463
|
var r = this;
|
|
465
|
-
|
|
464
|
+
U(function() {
|
|
466
465
|
var i, s;
|
|
467
466
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
468
467
|
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
469
468
|
try {
|
|
470
|
-
for (var o =
|
|
469
|
+
for (var o = z(r.currentObservers), c = o.next(); !c.done; c = o.next()) {
|
|
471
470
|
var a = c.value;
|
|
472
471
|
a.next(e);
|
|
473
472
|
}
|
|
@@ -485,7 +484,7 @@ var qe = function(n) {
|
|
|
485
484
|
});
|
|
486
485
|
}, t.prototype.error = function(e) {
|
|
487
486
|
var r = this;
|
|
488
|
-
|
|
487
|
+
U(function() {
|
|
489
488
|
if (r._throwIfClosed(), !r.isStopped) {
|
|
490
489
|
r.hasError = r.isStopped = !0, r.thrownError = e;
|
|
491
490
|
for (var i = r.observers; i.length; )
|
|
@@ -494,7 +493,7 @@ var qe = function(n) {
|
|
|
494
493
|
});
|
|
495
494
|
}, t.prototype.complete = function() {
|
|
496
495
|
var e = this;
|
|
497
|
-
|
|
496
|
+
U(function() {
|
|
498
497
|
if (e._throwIfClosed(), !e.isStopped) {
|
|
499
498
|
e.isStopped = !0;
|
|
500
499
|
for (var r = e.observers; r.length; )
|
|
@@ -516,19 +515,19 @@ var qe = function(n) {
|
|
|
516
515
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
517
516
|
}, t.prototype._innerSubscribe = function(e) {
|
|
518
517
|
var r = this, i = this, s = i.hasError, o = i.isStopped, c = i.observers;
|
|
519
|
-
return s || o ?
|
|
520
|
-
r.currentObservers = null,
|
|
518
|
+
return s || o ? be : (this.currentObservers = null, c.push(e), new R(function() {
|
|
519
|
+
r.currentObservers = null, k(c, e);
|
|
521
520
|
}));
|
|
522
521
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
523
522
|
var r = this, i = r.hasError, s = r.thrownError, o = r.isStopped;
|
|
524
523
|
i ? e.error(s) : o && e.complete();
|
|
525
524
|
}, t.prototype.asObservable = function() {
|
|
526
|
-
var e = new
|
|
525
|
+
var e = new Q();
|
|
527
526
|
return e.source = this, e;
|
|
528
527
|
}, t.create = function(e, r) {
|
|
529
|
-
return new
|
|
528
|
+
return new ae(e, r);
|
|
530
529
|
}, t;
|
|
531
|
-
}(
|
|
530
|
+
}(Q), ae = function(n) {
|
|
532
531
|
M(t, n);
|
|
533
532
|
function t(e, r) {
|
|
534
533
|
var i = n.call(this) || this;
|
|
@@ -545,14 +544,14 @@ var qe = function(n) {
|
|
|
545
544
|
(r = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || r === void 0 || r.call(e);
|
|
546
545
|
}, t.prototype._subscribe = function(e) {
|
|
547
546
|
var r, i;
|
|
548
|
-
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && i !== void 0 ? i :
|
|
547
|
+
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && i !== void 0 ? i : be;
|
|
549
548
|
}, t;
|
|
550
|
-
}(xe),
|
|
549
|
+
}(xe), qe = {
|
|
551
550
|
now: function() {
|
|
552
|
-
return
|
|
551
|
+
return Date.now();
|
|
553
552
|
},
|
|
554
553
|
delegate: void 0
|
|
555
|
-
},
|
|
554
|
+
}, Be = function(n) {
|
|
556
555
|
M(t, n);
|
|
557
556
|
function t(e, r) {
|
|
558
557
|
return n.call(this) || this;
|
|
@@ -560,15 +559,14 @@ var qe = function(n) {
|
|
|
560
559
|
return t.prototype.schedule = function(e, r) {
|
|
561
560
|
return this;
|
|
562
561
|
}, t;
|
|
563
|
-
}(
|
|
562
|
+
}(R), Y = {
|
|
564
563
|
setInterval: function(n, t) {
|
|
565
564
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
566
565
|
e[r - 2] = arguments[r];
|
|
567
|
-
|
|
568
|
-
return i != null && i.setInterval ? i.setInterval.apply(i, R([n, t], _(e))) : setInterval.apply(void 0, R([n, t], _(e)));
|
|
566
|
+
return setInterval.apply(void 0, F([n, t], $(e)));
|
|
569
567
|
},
|
|
570
568
|
clearInterval: function(n) {
|
|
571
|
-
var t =
|
|
569
|
+
var t = Y.delegate;
|
|
572
570
|
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(n);
|
|
573
571
|
},
|
|
574
572
|
delegate: void 0
|
|
@@ -586,11 +584,11 @@ var qe = function(n) {
|
|
|
586
584
|
var s = this.id, o = this.scheduler;
|
|
587
585
|
return s != null && (this.id = this.recycleAsyncId(o, s, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(o, this.id, r), this;
|
|
588
586
|
}, t.prototype.requestAsyncId = function(e, r, i) {
|
|
589
|
-
return i === void 0 && (i = 0),
|
|
587
|
+
return i === void 0 && (i = 0), Y.setInterval(e.flush.bind(e, this), i);
|
|
590
588
|
}, t.prototype.recycleAsyncId = function(e, r, i) {
|
|
591
589
|
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
592
590
|
return r;
|
|
593
|
-
r != null &&
|
|
591
|
+
r != null && Y.clearInterval(r);
|
|
594
592
|
}, t.prototype.execute = function(e, r) {
|
|
595
593
|
if (this.closed)
|
|
596
594
|
return new Error("executing a cancelled action");
|
|
@@ -611,20 +609,20 @@ var qe = function(n) {
|
|
|
611
609
|
}, t.prototype.unsubscribe = function() {
|
|
612
610
|
if (!this.closed) {
|
|
613
611
|
var e = this, r = e.id, i = e.scheduler, s = i.actions;
|
|
614
|
-
this.work = this.state = this.scheduler = null, this.pending = !1,
|
|
612
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, k(s, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, n.prototype.unsubscribe.call(this);
|
|
615
613
|
}
|
|
616
614
|
}, t;
|
|
617
|
-
}(
|
|
615
|
+
}(Be), ce = function() {
|
|
618
616
|
function n(t, e) {
|
|
619
617
|
e === void 0 && (e = n.now), this.schedulerActionCtor = t, this.now = e;
|
|
620
618
|
}
|
|
621
619
|
return n.prototype.schedule = function(t, e, r) {
|
|
622
620
|
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(r, e);
|
|
623
|
-
}, n.now =
|
|
621
|
+
}, n.now = qe.now, n;
|
|
624
622
|
}(), Qe = function(n) {
|
|
625
623
|
M(t, n);
|
|
626
624
|
function t(e, r) {
|
|
627
|
-
r === void 0 && (r =
|
|
625
|
+
r === void 0 && (r = ce.now);
|
|
628
626
|
var i = n.call(this, e, r) || this;
|
|
629
627
|
return i.actions = [], i._active = !1, i;
|
|
630
628
|
}
|
|
@@ -646,25 +644,25 @@ var qe = function(n) {
|
|
|
646
644
|
throw i;
|
|
647
645
|
}
|
|
648
646
|
}, t;
|
|
649
|
-
}(
|
|
650
|
-
function
|
|
651
|
-
return n &&
|
|
647
|
+
}(ce), Ye = new Qe(ze), Ge = Ye;
|
|
648
|
+
function Ke(n) {
|
|
649
|
+
return n && w(n.schedule);
|
|
652
650
|
}
|
|
653
|
-
var
|
|
651
|
+
var Je = X(function(n) {
|
|
654
652
|
return function() {
|
|
655
653
|
n(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
656
654
|
};
|
|
657
655
|
});
|
|
658
|
-
function
|
|
656
|
+
function _(n, t) {
|
|
659
657
|
var e = typeof t == "object";
|
|
660
658
|
return new Promise(function(r, i) {
|
|
661
|
-
var s = new
|
|
659
|
+
var s = new N({
|
|
662
660
|
next: function(o) {
|
|
663
661
|
r(o), s.unsubscribe();
|
|
664
662
|
},
|
|
665
663
|
error: i,
|
|
666
664
|
complete: function() {
|
|
667
|
-
e ? r(t.defaultValue) : i(new
|
|
665
|
+
e ? r(t.defaultValue) : i(new Je());
|
|
668
666
|
}
|
|
669
667
|
});
|
|
670
668
|
n.subscribe(s);
|
|
@@ -684,7 +682,7 @@ function O(n, t) {
|
|
|
684
682
|
function Xe(n, t, e) {
|
|
685
683
|
n === void 0 && (n = 0), e === void 0 && (e = Ge);
|
|
686
684
|
var r = -1;
|
|
687
|
-
return t != null && (
|
|
685
|
+
return t != null && (Ke(t) ? e = t : r = t), new Q(function(i) {
|
|
688
686
|
var s = We(n) ? +n - e.now() : n;
|
|
689
687
|
s < 0 && (s = 0);
|
|
690
688
|
var o = 0;
|
|
@@ -694,7 +692,7 @@ function Xe(n, t, e) {
|
|
|
694
692
|
});
|
|
695
693
|
}
|
|
696
694
|
function Ze(n, t, e) {
|
|
697
|
-
var r =
|
|
695
|
+
var r = w(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
698
696
|
return r ? Ce(function(i, s) {
|
|
699
697
|
var o;
|
|
700
698
|
(o = r.subscribe) === null || o === void 0 || o.call(r);
|
|
@@ -720,7 +718,7 @@ class l extends Error {
|
|
|
720
718
|
super(`Incorrect context (${t}). Cannot perform the requested operation.`), C(this, "context"), this.context = t;
|
|
721
719
|
}
|
|
722
720
|
}
|
|
723
|
-
class
|
|
721
|
+
class x extends Error {
|
|
724
722
|
constructor(t, e, r) {
|
|
725
723
|
super(`Invalid parameter (${t}). ${r}`), this.param = t, this.value = e, this.reason = r;
|
|
726
724
|
}
|
|
@@ -737,24 +735,24 @@ class nt extends Error {
|
|
|
737
735
|
super(`Invalid version format: ${t}`);
|
|
738
736
|
}
|
|
739
737
|
}
|
|
740
|
-
class
|
|
738
|
+
class ue extends Error {
|
|
741
739
|
constructor(t) {
|
|
742
740
|
super(`${t} needs to be initialized before it can be used.`);
|
|
743
741
|
}
|
|
744
742
|
}
|
|
745
|
-
class
|
|
743
|
+
class le extends Error {
|
|
746
744
|
constructor(t, e) {
|
|
747
745
|
let r = `Unsupported Protocol ${Array.isArray(t) ? "versions" : "version"}: (${t}).`;
|
|
748
746
|
e && (r += ` Minimum version supported is ${e}.`), super(r), this.version = t;
|
|
749
747
|
}
|
|
750
748
|
}
|
|
751
|
-
function
|
|
749
|
+
function E(n) {
|
|
752
750
|
return typeof n == "function";
|
|
753
751
|
}
|
|
754
752
|
function it(n) {
|
|
755
|
-
return
|
|
753
|
+
return E(n == null ? void 0 : n.lift);
|
|
756
754
|
}
|
|
757
|
-
function
|
|
755
|
+
function I(n) {
|
|
758
756
|
return function(t) {
|
|
759
757
|
if (it(t))
|
|
760
758
|
return t.lift(function(e) {
|
|
@@ -767,24 +765,24 @@ function N(n) {
|
|
|
767
765
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
768
766
|
};
|
|
769
767
|
}
|
|
770
|
-
var
|
|
771
|
-
return
|
|
768
|
+
var G = function(n, t) {
|
|
769
|
+
return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
772
770
|
e.__proto__ = r;
|
|
773
771
|
} || function(e, r) {
|
|
774
772
|
for (var i in r)
|
|
775
773
|
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
776
|
-
},
|
|
774
|
+
}, G(n, t);
|
|
777
775
|
};
|
|
778
|
-
function
|
|
776
|
+
function ee(n, t) {
|
|
779
777
|
if (typeof t != "function" && t !== null)
|
|
780
778
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
781
|
-
|
|
779
|
+
G(n, t);
|
|
782
780
|
function e() {
|
|
783
781
|
this.constructor = n;
|
|
784
782
|
}
|
|
785
783
|
n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
786
784
|
}
|
|
787
|
-
function
|
|
785
|
+
function he(n) {
|
|
788
786
|
var t = typeof Symbol == "function" && Symbol.iterator, e = t && n[t], r = 0;
|
|
789
787
|
if (e)
|
|
790
788
|
return e.call(n);
|
|
@@ -816,7 +814,7 @@ function K(n, t) {
|
|
|
816
814
|
}
|
|
817
815
|
return s;
|
|
818
816
|
}
|
|
819
|
-
function
|
|
817
|
+
function J(n, t, e) {
|
|
820
818
|
if (e || arguments.length === 2)
|
|
821
819
|
for (var r = 0, i = t.length, s; r < i; r++)
|
|
822
820
|
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
@@ -828,7 +826,7 @@ function st(n) {
|
|
|
828
826
|
}, e = n(t);
|
|
829
827
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
830
828
|
}
|
|
831
|
-
var
|
|
829
|
+
var D = st(function(n) {
|
|
832
830
|
return function(t) {
|
|
833
831
|
n(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
834
832
|
` + t.map(function(e, r) {
|
|
@@ -837,13 +835,13 @@ var B = st(function(n) {
|
|
|
837
835
|
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
|
838
836
|
};
|
|
839
837
|
});
|
|
840
|
-
function
|
|
838
|
+
function de(n, t) {
|
|
841
839
|
if (n) {
|
|
842
840
|
var e = n.indexOf(t);
|
|
843
841
|
0 <= e && n.splice(e, 1);
|
|
844
842
|
}
|
|
845
843
|
}
|
|
846
|
-
var
|
|
844
|
+
var te = function() {
|
|
847
845
|
function n(t) {
|
|
848
846
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
849
847
|
}
|
|
@@ -855,12 +853,12 @@ var re = function() {
|
|
|
855
853
|
if (o)
|
|
856
854
|
if (this._parentage = null, Array.isArray(o))
|
|
857
855
|
try {
|
|
858
|
-
for (var c =
|
|
856
|
+
for (var c = he(o), a = c.next(); !a.done; a = c.next()) {
|
|
859
857
|
var u = a.value;
|
|
860
858
|
u.remove(this);
|
|
861
859
|
}
|
|
862
|
-
} catch (
|
|
863
|
-
t = { error:
|
|
860
|
+
} catch (v) {
|
|
861
|
+
t = { error: v };
|
|
864
862
|
} finally {
|
|
865
863
|
try {
|
|
866
864
|
a && !a.done && (e = c.return) && e.call(c);
|
|
@@ -872,29 +870,29 @@ var re = function() {
|
|
|
872
870
|
else
|
|
873
871
|
o.remove(this);
|
|
874
872
|
var g = this.initialTeardown;
|
|
875
|
-
if (
|
|
873
|
+
if (E(g))
|
|
876
874
|
try {
|
|
877
875
|
g();
|
|
878
|
-
} catch (
|
|
879
|
-
s =
|
|
876
|
+
} catch (v) {
|
|
877
|
+
s = v instanceof D ? v.errors : [v];
|
|
880
878
|
}
|
|
881
|
-
var
|
|
882
|
-
if (
|
|
879
|
+
var y = this._finalizers;
|
|
880
|
+
if (y) {
|
|
883
881
|
this._finalizers = null;
|
|
884
882
|
try {
|
|
885
|
-
for (var
|
|
886
|
-
var
|
|
883
|
+
for (var p = he(y), S = p.next(); !S.done; S = p.next()) {
|
|
884
|
+
var V = S.value;
|
|
887
885
|
try {
|
|
888
|
-
|
|
889
|
-
} catch (
|
|
890
|
-
s = s ?? [],
|
|
886
|
+
pe(V);
|
|
887
|
+
} catch (v) {
|
|
888
|
+
s = s ?? [], v instanceof D ? s = J(J([], K(s)), K(v.errors)) : s.push(v);
|
|
891
889
|
}
|
|
892
890
|
}
|
|
893
|
-
} catch (
|
|
894
|
-
r = { error:
|
|
891
|
+
} catch (v) {
|
|
892
|
+
r = { error: v };
|
|
895
893
|
} finally {
|
|
896
894
|
try {
|
|
897
|
-
|
|
895
|
+
S && !S.done && (i = p.return) && i.call(p);
|
|
898
896
|
} finally {
|
|
899
897
|
if (r)
|
|
900
898
|
throw r.error;
|
|
@@ -902,13 +900,13 @@ var re = function() {
|
|
|
902
900
|
}
|
|
903
901
|
}
|
|
904
902
|
if (s)
|
|
905
|
-
throw new
|
|
903
|
+
throw new D(s);
|
|
906
904
|
}
|
|
907
905
|
}, n.prototype.add = function(t) {
|
|
908
906
|
var e;
|
|
909
907
|
if (t && t !== this)
|
|
910
908
|
if (this.closed)
|
|
911
|
-
|
|
909
|
+
pe(t);
|
|
912
910
|
else {
|
|
913
911
|
if (t instanceof n) {
|
|
914
912
|
if (t.closed || t._hasParent(this))
|
|
@@ -925,23 +923,23 @@ var re = function() {
|
|
|
925
923
|
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
926
924
|
}, n.prototype._removeParent = function(t) {
|
|
927
925
|
var e = this._parentage;
|
|
928
|
-
e === t ? this._parentage = null : Array.isArray(e) &&
|
|
926
|
+
e === t ? this._parentage = null : Array.isArray(e) && de(e, t);
|
|
929
927
|
}, n.prototype.remove = function(t) {
|
|
930
928
|
var e = this._finalizers;
|
|
931
|
-
e &&
|
|
929
|
+
e && de(e, t), t instanceof n && t._removeParent(this);
|
|
932
930
|
}, n.EMPTY = function() {
|
|
933
931
|
var t = new n();
|
|
934
932
|
return t.closed = !0, t;
|
|
935
933
|
}(), n;
|
|
936
934
|
}();
|
|
937
|
-
|
|
938
|
-
function
|
|
939
|
-
return n instanceof
|
|
935
|
+
te.EMPTY;
|
|
936
|
+
function Te(n) {
|
|
937
|
+
return n instanceof te || n && "closed" in n && E(n.remove) && E(n.add) && E(n.unsubscribe);
|
|
940
938
|
}
|
|
941
|
-
function
|
|
942
|
-
|
|
939
|
+
function pe(n) {
|
|
940
|
+
E(n) ? n() : n.unsubscribe();
|
|
943
941
|
}
|
|
944
|
-
var
|
|
942
|
+
var _e = {
|
|
945
943
|
onUnhandledError: null,
|
|
946
944
|
onStoppedNotification: null,
|
|
947
945
|
Promise: void 0,
|
|
@@ -951,7 +949,7 @@ var Re = {
|
|
|
951
949
|
setTimeout: function(n, t) {
|
|
952
950
|
for (var e = [], r = 2; r < arguments.length; r++)
|
|
953
951
|
e[r - 2] = arguments[r];
|
|
954
|
-
return setTimeout.apply(void 0,
|
|
952
|
+
return setTimeout.apply(void 0, J([n, t], K(e)));
|
|
955
953
|
},
|
|
956
954
|
clearTimeout: function(n) {
|
|
957
955
|
return clearTimeout(n);
|
|
@@ -963,19 +961,19 @@ function at(n) {
|
|
|
963
961
|
throw n;
|
|
964
962
|
});
|
|
965
963
|
}
|
|
966
|
-
function
|
|
964
|
+
function fe() {
|
|
967
965
|
}
|
|
968
966
|
function ct(n) {
|
|
969
967
|
n();
|
|
970
968
|
}
|
|
971
|
-
var
|
|
972
|
-
|
|
969
|
+
var re = function(n) {
|
|
970
|
+
ee(t, n);
|
|
973
971
|
function t(e) {
|
|
974
972
|
var r = n.call(this) || this;
|
|
975
|
-
return r.isStopped = !1, e ? (r.destination = e,
|
|
973
|
+
return r.isStopped = !1, e ? (r.destination = e, Te(e) && e.add(r)) : r.destination = dt, r;
|
|
976
974
|
}
|
|
977
975
|
return t.create = function(e, r, i) {
|
|
978
|
-
return new
|
|
976
|
+
return new W(e, r, i);
|
|
979
977
|
}, t.prototype.next = function(e) {
|
|
980
978
|
this.isStopped || this._next(e);
|
|
981
979
|
}, t.prototype.error = function(e) {
|
|
@@ -999,8 +997,8 @@ var ne = function(n) {
|
|
|
999
997
|
this.unsubscribe();
|
|
1000
998
|
}
|
|
1001
999
|
}, t;
|
|
1002
|
-
}(
|
|
1003
|
-
function
|
|
1000
|
+
}(te), ut = Function.prototype.bind;
|
|
1001
|
+
function q(n, t) {
|
|
1004
1002
|
return ut.call(n, t);
|
|
1005
1003
|
}
|
|
1006
1004
|
var lt = function() {
|
|
@@ -1034,11 +1032,11 @@ var lt = function() {
|
|
|
1034
1032
|
L(e);
|
|
1035
1033
|
}
|
|
1036
1034
|
}, n;
|
|
1037
|
-
}(),
|
|
1038
|
-
|
|
1035
|
+
}(), W = function(n) {
|
|
1036
|
+
ee(t, n);
|
|
1039
1037
|
function t(e, r, i) {
|
|
1040
1038
|
var s = n.call(this) || this, o;
|
|
1041
|
-
if (
|
|
1039
|
+
if (E(e) || !e)
|
|
1042
1040
|
o = {
|
|
1043
1041
|
next: e ?? void 0,
|
|
1044
1042
|
error: r ?? void 0,
|
|
@@ -1046,18 +1044,18 @@ var lt = function() {
|
|
|
1046
1044
|
};
|
|
1047
1045
|
else {
|
|
1048
1046
|
var c;
|
|
1049
|
-
s &&
|
|
1047
|
+
s && _e.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
1050
1048
|
return s.unsubscribe();
|
|
1051
1049
|
}, o = {
|
|
1052
|
-
next: e.next &&
|
|
1053
|
-
error: e.error &&
|
|
1054
|
-
complete: e.complete &&
|
|
1050
|
+
next: e.next && q(e.next, c),
|
|
1051
|
+
error: e.error && q(e.error, c),
|
|
1052
|
+
complete: e.complete && q(e.complete, c)
|
|
1055
1053
|
}) : o = e;
|
|
1056
1054
|
}
|
|
1057
1055
|
return s.destination = new lt(o), s;
|
|
1058
1056
|
}
|
|
1059
1057
|
return t;
|
|
1060
|
-
}(
|
|
1058
|
+
}(re);
|
|
1061
1059
|
function L(n) {
|
|
1062
1060
|
at(n);
|
|
1063
1061
|
}
|
|
@@ -1066,17 +1064,17 @@ function ht(n) {
|
|
|
1066
1064
|
}
|
|
1067
1065
|
var dt = {
|
|
1068
1066
|
closed: !0,
|
|
1069
|
-
next:
|
|
1067
|
+
next: fe,
|
|
1070
1068
|
error: ht,
|
|
1071
|
-
complete:
|
|
1069
|
+
complete: fe
|
|
1072
1070
|
}, pt = function() {
|
|
1073
1071
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1074
1072
|
}();
|
|
1075
|
-
function
|
|
1073
|
+
function Re(n) {
|
|
1076
1074
|
return n;
|
|
1077
1075
|
}
|
|
1078
1076
|
function ft(n) {
|
|
1079
|
-
return n.length === 0 ?
|
|
1077
|
+
return n.length === 0 ? Re : n.length === 1 ? n[0] : function(t) {
|
|
1080
1078
|
return n.reduce(function(e, r) {
|
|
1081
1079
|
return r(e);
|
|
1082
1080
|
}, t);
|
|
@@ -1090,7 +1088,7 @@ var gt = function() {
|
|
|
1090
1088
|
var e = new n();
|
|
1091
1089
|
return e.source = this, e.operator = t, e;
|
|
1092
1090
|
}, n.prototype.subscribe = function(t, e, r) {
|
|
1093
|
-
var i = this, s = yt(t) ? t : new
|
|
1091
|
+
var i = this, s = yt(t) ? t : new W(t, e, r);
|
|
1094
1092
|
return ct(function() {
|
|
1095
1093
|
var o = i, c = o.operator, a = o.source;
|
|
1096
1094
|
s.add(c ? c.call(s, a) : a ? i._subscribe(s) : i._trySubscribe(s));
|
|
@@ -1103,8 +1101,8 @@ var gt = function() {
|
|
|
1103
1101
|
}
|
|
1104
1102
|
}, n.prototype.forEach = function(t, e) {
|
|
1105
1103
|
var r = this;
|
|
1106
|
-
return e =
|
|
1107
|
-
var o = new
|
|
1104
|
+
return e = ge(e), new e(function(i, s) {
|
|
1105
|
+
var o = new W({
|
|
1108
1106
|
next: function(c) {
|
|
1109
1107
|
try {
|
|
1110
1108
|
t(c);
|
|
@@ -1128,7 +1126,7 @@ var gt = function() {
|
|
|
1128
1126
|
return ft(t)(this);
|
|
1129
1127
|
}, n.prototype.toPromise = function(t) {
|
|
1130
1128
|
var e = this;
|
|
1131
|
-
return t =
|
|
1129
|
+
return t = ge(t), new t(function(r, i) {
|
|
1132
1130
|
var s;
|
|
1133
1131
|
e.subscribe(function(o) {
|
|
1134
1132
|
return s = o;
|
|
@@ -1142,21 +1140,21 @@ var gt = function() {
|
|
|
1142
1140
|
return new n(t);
|
|
1143
1141
|
}, n;
|
|
1144
1142
|
}();
|
|
1145
|
-
function
|
|
1143
|
+
function ge(n) {
|
|
1146
1144
|
var t;
|
|
1147
|
-
return (t = n ??
|
|
1145
|
+
return (t = n ?? _e.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1148
1146
|
}
|
|
1149
1147
|
function vt(n) {
|
|
1150
|
-
return n &&
|
|
1148
|
+
return n && E(n.next) && E(n.error) && E(n.complete);
|
|
1151
1149
|
}
|
|
1152
1150
|
function yt(n) {
|
|
1153
|
-
return n && n instanceof
|
|
1151
|
+
return n && n instanceof re || vt(n) && Te(n);
|
|
1154
1152
|
}
|
|
1155
|
-
function
|
|
1153
|
+
function P(n, t, e, r, i) {
|
|
1156
1154
|
return new bt(n, t, e, r, i);
|
|
1157
1155
|
}
|
|
1158
1156
|
var bt = function(n) {
|
|
1159
|
-
|
|
1157
|
+
ee(t, n);
|
|
1160
1158
|
function t(e, r, i, s, o, c) {
|
|
1161
1159
|
var a = n.call(this, e) || this;
|
|
1162
1160
|
return a.onFinalize = o, a.shouldUnsubscribe = c, a._next = r ? function(u) {
|
|
@@ -1190,11 +1188,11 @@ var bt = function(n) {
|
|
|
1190
1188
|
n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
1191
1189
|
}
|
|
1192
1190
|
}, t;
|
|
1193
|
-
}(
|
|
1191
|
+
}(re);
|
|
1194
1192
|
function h(n, t) {
|
|
1195
|
-
return
|
|
1193
|
+
return I(function(e, r) {
|
|
1196
1194
|
var i = 0;
|
|
1197
|
-
e.subscribe(
|
|
1195
|
+
e.subscribe(P(r, function(s) {
|
|
1198
1196
|
r.next(n.call(t, s, i++));
|
|
1199
1197
|
}));
|
|
1200
1198
|
});
|
|
@@ -1202,31 +1200,40 @@ function h(n, t) {
|
|
|
1202
1200
|
var mt = new gt(function(n) {
|
|
1203
1201
|
return n.complete();
|
|
1204
1202
|
});
|
|
1205
|
-
function
|
|
1203
|
+
function b(n) {
|
|
1206
1204
|
return n <= 0 ? function() {
|
|
1207
1205
|
return mt;
|
|
1208
|
-
} :
|
|
1206
|
+
} : I(function(t, e) {
|
|
1209
1207
|
var r = 0;
|
|
1210
|
-
t.subscribe(
|
|
1208
|
+
t.subscribe(P(e, function(i) {
|
|
1211
1209
|
++r <= n && (e.next(i), n <= r && e.complete());
|
|
1212
1210
|
}));
|
|
1213
1211
|
});
|
|
1214
1212
|
}
|
|
1215
1213
|
function f(n, t) {
|
|
1216
|
-
return
|
|
1214
|
+
return I(function(e, r) {
|
|
1217
1215
|
var i = 0;
|
|
1218
|
-
e.subscribe(
|
|
1216
|
+
e.subscribe(P(r, function(s) {
|
|
1219
1217
|
return n.call(t, s, i++) && r.next(s);
|
|
1220
1218
|
}));
|
|
1221
1219
|
});
|
|
1222
1220
|
}
|
|
1221
|
+
function wt(n, t) {
|
|
1222
|
+
return t === void 0 && (t = !1), I(function(e, r) {
|
|
1223
|
+
var i = 0;
|
|
1224
|
+
e.subscribe(P(r, function(s) {
|
|
1225
|
+
var o = n(s, i++);
|
|
1226
|
+
(o || t) && r.next(s), !o && r.complete();
|
|
1227
|
+
}));
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1223
1230
|
function d(n, t, e) {
|
|
1224
|
-
var r =
|
|
1225
|
-
return r ?
|
|
1231
|
+
var r = E(n) || t || e ? { next: n, error: t, complete: e } : n;
|
|
1232
|
+
return r ? I(function(i, s) {
|
|
1226
1233
|
var o;
|
|
1227
1234
|
(o = r.subscribe) === null || o === void 0 || o.call(r);
|
|
1228
1235
|
var c = !0;
|
|
1229
|
-
i.subscribe(
|
|
1236
|
+
i.subscribe(P(s, function(a) {
|
|
1230
1237
|
var u;
|
|
1231
1238
|
(u = r.next) === null || u === void 0 || u.call(r, a), s.next(a);
|
|
1232
1239
|
}, function() {
|
|
@@ -1239,33 +1246,33 @@ function d(n, t, e) {
|
|
|
1239
1246
|
var a, u;
|
|
1240
1247
|
c && ((a = r.unsubscribe) === null || a === void 0 || a.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
|
|
1241
1248
|
}));
|
|
1242
|
-
}) :
|
|
1249
|
+
}) : Re;
|
|
1243
1250
|
}
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1251
|
+
const St = /^(\d+)\.(\d+)$/;
|
|
1252
|
+
function Et(n) {
|
|
1246
1253
|
if (typeof n == "string") {
|
|
1247
|
-
const t = n.match(
|
|
1254
|
+
const t = n.match(St);
|
|
1248
1255
|
if (t)
|
|
1249
1256
|
return `${t[1]}.${t[2]}`;
|
|
1250
1257
|
}
|
|
1251
1258
|
throw new nt(n);
|
|
1252
1259
|
}
|
|
1253
|
-
function
|
|
1254
|
-
const t =
|
|
1260
|
+
function ve(n) {
|
|
1261
|
+
const t = Et(n), [e, r] = t.split("."), [i, s] = [parseInt(e), parseInt(r)];
|
|
1255
1262
|
return [i, s];
|
|
1256
1263
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const [e, r] =
|
|
1264
|
+
function ne(n, t) {
|
|
1265
|
+
const [e, r] = ve(n), [i, s] = ve(t);
|
|
1259
1266
|
return e < i ? -1 : e > i ? 1 : r < s ? -1 : r > s ? 1 : 0;
|
|
1260
1267
|
}
|
|
1261
|
-
function Et(n, t) {
|
|
1262
|
-
return ie(n, t) === 1;
|
|
1263
|
-
}
|
|
1264
1268
|
function Ct(n, t) {
|
|
1265
|
-
return
|
|
1269
|
+
return ne(n, t) === 1;
|
|
1266
1270
|
}
|
|
1267
|
-
|
|
1268
|
-
|
|
1271
|
+
function Mt(n, t) {
|
|
1272
|
+
return ne(n, t) >= 0;
|
|
1273
|
+
}
|
|
1274
|
+
const ye = "2.0";
|
|
1275
|
+
class xt {
|
|
1269
1276
|
/**
|
|
1270
1277
|
* Create a new instance of the {@link IpcHelper | IPC Protocol Helper}.
|
|
1271
1278
|
*
|
|
@@ -1276,8 +1283,8 @@ class Mt {
|
|
|
1276
1283
|
* @param logService - An instance of a logging service or utility
|
|
1277
1284
|
*/
|
|
1278
1285
|
constructor(t, e) {
|
|
1279
|
-
if (C(this, "negotiatedProtocolVersion"), C(this, "currentContext"), C(this, "incomingMessages$"), C(this, "inIframe", !1), C(this, "embeddedResult"), C(this, "iframePort1"), C(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new xe(), this.supportedVersions = t.filter((r) =>
|
|
1280
|
-
throw new
|
|
1286
|
+
if (C(this, "negotiatedProtocolVersion"), C(this, "currentContext"), C(this, "incomingMessages$"), C(this, "inIframe", !1), C(this, "embeddedResult"), C(this, "iframePort1"), C(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new xe(), this.supportedVersions = t.filter((r) => Mt(r, ye)), !this.supportedVersions.length)
|
|
1287
|
+
throw new le(t, ye);
|
|
1281
1288
|
this.negotiatedProtocolVersion = this.supportedVersions[0], this.embeddedResult = null, this.iframePort2 = null;
|
|
1282
1289
|
}
|
|
1283
1290
|
get parent() {
|
|
@@ -1299,11 +1306,11 @@ class Mt {
|
|
|
1299
1306
|
var t, e, r, i;
|
|
1300
1307
|
if (this.inIframe) {
|
|
1301
1308
|
if (!this.iframePort2)
|
|
1302
|
-
throw new
|
|
1309
|
+
throw new ue("port2");
|
|
1303
1310
|
return this.iframePort2;
|
|
1304
1311
|
} else {
|
|
1305
1312
|
if (!((e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) != null && e.port2))
|
|
1306
|
-
throw new
|
|
1313
|
+
throw new ue("port2");
|
|
1307
1314
|
return (i = (r = window.Acrobits) == null ? void 0 : r.messageChannel) == null ? void 0 : i.port2;
|
|
1308
1315
|
}
|
|
1309
1316
|
}
|
|
@@ -1315,7 +1322,7 @@ class Mt {
|
|
|
1315
1322
|
determineContext() {
|
|
1316
1323
|
return Xe(1e3).pipe(
|
|
1317
1324
|
h(() => (this.isEmbedded() ? this.currentContext = "user" : this.currentContext = "guest", this.currentContext)),
|
|
1318
|
-
|
|
1325
|
+
b(1)
|
|
1319
1326
|
);
|
|
1320
1327
|
}
|
|
1321
1328
|
/**
|
|
@@ -1334,8 +1341,8 @@ class Mt {
|
|
|
1334
1341
|
h((i) => i),
|
|
1335
1342
|
d(this.logReceived(t)),
|
|
1336
1343
|
h((i) => {
|
|
1337
|
-
if (this.supportedVersions.some((s) =>
|
|
1338
|
-
throw new
|
|
1344
|
+
if (this.supportedVersions.some((s) => Ct(s, i.protocolVersion)))
|
|
1345
|
+
throw new le(i.protocolVersion, this.supportedVersions[0]);
|
|
1339
1346
|
return i;
|
|
1340
1347
|
}),
|
|
1341
1348
|
d((i) => {
|
|
@@ -1343,7 +1350,7 @@ class Mt {
|
|
|
1343
1350
|
`[IPC] Negotiated IPC Protocol Version: ${this.negotiatedProtocolVersion}`
|
|
1344
1351
|
);
|
|
1345
1352
|
}),
|
|
1346
|
-
|
|
1353
|
+
b(1)
|
|
1347
1354
|
);
|
|
1348
1355
|
return this.logService.debug(`Created ${t} Reply handler`), this.inIframe ? this.createIframeChannel().then(() => this.finishIpcSetup(e)) : this.finishIpcSetup(e), r;
|
|
1349
1356
|
}
|
|
@@ -1363,7 +1370,7 @@ class Mt {
|
|
|
1363
1370
|
f((i) => i.type === t && i.replyTo === e.id),
|
|
1364
1371
|
h((i) => i),
|
|
1365
1372
|
d(this.logReceived(t)),
|
|
1366
|
-
|
|
1373
|
+
b(1)
|
|
1367
1374
|
);
|
|
1368
1375
|
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
|
|
1369
1376
|
}
|
|
@@ -1392,8 +1399,8 @@ class Mt {
|
|
|
1392
1399
|
region: c,
|
|
1393
1400
|
joinMicMuted: a,
|
|
1394
1401
|
joinWithoutCamera: u
|
|
1395
|
-
} = t, g = "JOINING ROOM",
|
|
1396
|
-
|
|
1402
|
+
} = t, g = "JOINING ROOM", y = this.createMessage(g, !1);
|
|
1403
|
+
y.roomName = e, y.jwtToken = s, y.serverUrl = o, y.region = c, y.roomInvite = r, y.joinMicMuted = a ?? !1, y.joinWithoutCamera = u ?? !1, y.displayName = i, this.logCreated(g, y), this.port2.postMessage(y), this.logSent(g, y);
|
|
1397
1404
|
}
|
|
1398
1405
|
/**
|
|
1399
1406
|
* Sends a {@link LeavingRoomMessage} lifecycle message to the Host app.
|
|
@@ -1543,7 +1550,7 @@ class Mt {
|
|
|
1543
1550
|
h((s) => s),
|
|
1544
1551
|
d(this.logReceived(e)),
|
|
1545
1552
|
h((s) => s),
|
|
1546
|
-
|
|
1553
|
+
b(1)
|
|
1547
1554
|
);
|
|
1548
1555
|
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
|
|
1549
1556
|
}
|
|
@@ -1557,7 +1564,7 @@ class Mt {
|
|
|
1557
1564
|
h((c) => c),
|
|
1558
1565
|
d(this.logReceived(i)),
|
|
1559
1566
|
h((c) => c),
|
|
1560
|
-
|
|
1567
|
+
b(1)
|
|
1561
1568
|
), this.logService.debug(`Created ${i} Reply handler`)), s.layout = t, this.logCreated(i, s), this.port2.postMessage(s), this.logSent(i, s), o)
|
|
1562
1569
|
return o;
|
|
1563
1570
|
}
|
|
@@ -1613,7 +1620,7 @@ class Mt {
|
|
|
1613
1620
|
f((s) => s.type === e && s.replyTo === r.id),
|
|
1614
1621
|
h((s) => s),
|
|
1615
1622
|
d(this.logReceived(e)),
|
|
1616
|
-
|
|
1623
|
+
b(1)
|
|
1617
1624
|
);
|
|
1618
1625
|
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
|
|
1619
1626
|
}
|
|
@@ -1627,13 +1634,13 @@ class Mt {
|
|
|
1627
1634
|
if (!this.isEmbedded())
|
|
1628
1635
|
throw new l(this.currentContext);
|
|
1629
1636
|
if (e === "group" && i === void 0)
|
|
1630
|
-
throw new
|
|
1637
|
+
throw new x(
|
|
1631
1638
|
"currentContacts",
|
|
1632
1639
|
i,
|
|
1633
1640
|
"currentContacts is required for group streams"
|
|
1634
1641
|
);
|
|
1635
1642
|
if (e === "direct" && i !== void 0)
|
|
1636
|
-
throw new
|
|
1643
|
+
throw new x(
|
|
1637
1644
|
"currentContacts",
|
|
1638
1645
|
i,
|
|
1639
1646
|
"currentContacts should not be passed for direct streams"
|
|
@@ -1650,7 +1657,7 @@ class Mt {
|
|
|
1650
1657
|
throw new rt(u.streamId, t);
|
|
1651
1658
|
return e === "direct" && u.contacts.length > 1 && (u.contacts = [u.contacts[0]]), u;
|
|
1652
1659
|
}),
|
|
1653
|
-
|
|
1660
|
+
b(1)
|
|
1654
1661
|
);
|
|
1655
1662
|
return this.logService.debug(`Created ${s} Reply handler`), this.port2.postMessage(o), this.logSent(s, o), c;
|
|
1656
1663
|
}
|
|
@@ -1666,14 +1673,14 @@ class Mt {
|
|
|
1666
1673
|
if (!this.isEmbedded())
|
|
1667
1674
|
throw new l(this.currentContext);
|
|
1668
1675
|
if (!t.length)
|
|
1669
|
-
throw new
|
|
1676
|
+
throw new x("contacts", t, "At least one contact is required");
|
|
1670
1677
|
const e = "MATCH CONTACTS", r = this.createMessage(e);
|
|
1671
1678
|
r.contacts = [...t], this.logCreated(e, r);
|
|
1672
1679
|
const i = this.incomingMessages$.pipe(
|
|
1673
1680
|
f((s) => s.type === e && s.replyTo === r.id),
|
|
1674
1681
|
d(this.logReceived(e)),
|
|
1675
1682
|
h((s) => s),
|
|
1676
|
-
|
|
1683
|
+
b(1)
|
|
1677
1684
|
);
|
|
1678
1685
|
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
|
|
1679
1686
|
}
|
|
@@ -1731,7 +1738,7 @@ class Mt {
|
|
|
1731
1738
|
f((i) => i.type === t && i.replyTo === e.id),
|
|
1732
1739
|
d(this.logReceived(t)),
|
|
1733
1740
|
h((i) => i),
|
|
1734
|
-
|
|
1741
|
+
b(1)
|
|
1735
1742
|
);
|
|
1736
1743
|
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
|
|
1737
1744
|
}
|
|
@@ -1936,7 +1943,7 @@ class Mt {
|
|
|
1936
1943
|
const s = "FILE TRANSFER", o = this.createMessage(s, !1);
|
|
1937
1944
|
if (o.mimeType = t.mimeType, o.fileName = t.fileName, o.fileSize = t.fileSize, o.fileHash = t.fileHash.toLowerCase(), o.dataType = t.dataType, o.data = t.data, o.intent = e, e === "attachment") {
|
|
1938
1945
|
if (!r)
|
|
1939
|
-
throw new
|
|
1946
|
+
throw new x(
|
|
1940
1947
|
"streamId",
|
|
1941
1948
|
r,
|
|
1942
1949
|
"streamId is required for attachment intent"
|
|
@@ -1948,7 +1955,7 @@ class Mt {
|
|
|
1948
1955
|
f((a) => a.type === s && a.replyTo === o.id),
|
|
1949
1956
|
d(this.logReceived(s)),
|
|
1950
1957
|
h((a) => a),
|
|
1951
|
-
|
|
1958
|
+
b(1)
|
|
1952
1959
|
);
|
|
1953
1960
|
return this.port2.postMessage(o), this.logSent(s, o), c;
|
|
1954
1961
|
}
|
|
@@ -1992,6 +1999,32 @@ class Mt {
|
|
|
1992
1999
|
d(this.logReceived(t))
|
|
1993
2000
|
);
|
|
1994
2001
|
}
|
|
2002
|
+
sendFileRequestMessage({ fileName: t, fileHash: e, fileSize: r, mimeType: i }, s, o, c) {
|
|
2003
|
+
if (!this.isEmbedded())
|
|
2004
|
+
throw new l(this.currentContext);
|
|
2005
|
+
const a = "FILE REQUEST", u = this.createMessage(a);
|
|
2006
|
+
if (u.fileName = t, u.fileHash = e.toLowerCase(), u.fileSize = r, u.mimeType = i, u.intent = s, u.maxChunkSize = c, s === "attachment") {
|
|
2007
|
+
if (!o)
|
|
2008
|
+
throw new x(
|
|
2009
|
+
"streamId",
|
|
2010
|
+
o,
|
|
2011
|
+
"streamId is required for attachment intent"
|
|
2012
|
+
);
|
|
2013
|
+
u.streamId = o;
|
|
2014
|
+
}
|
|
2015
|
+
this.logCreated(a, u);
|
|
2016
|
+
let g = 0;
|
|
2017
|
+
const y = this.incomingMessages$.pipe(
|
|
2018
|
+
f(
|
|
2019
|
+
(p) => p.type === a && p.replyTo === u.id
|
|
2020
|
+
),
|
|
2021
|
+
d(this.logReceived(a)),
|
|
2022
|
+
d(() => g++),
|
|
2023
|
+
h((p) => (p.result === "success" && (p.chunkHash = p.chunkHash.toLowerCase()), p)),
|
|
2024
|
+
wt((p) => p.result === "success" && g < p.totalChunks)
|
|
2025
|
+
);
|
|
2026
|
+
return this.port2.postMessage(u), this.logSent(a, u), y;
|
|
2027
|
+
}
|
|
1995
2028
|
/**
|
|
1996
2029
|
* Sends a {@link FileSelectionMessage} to the Host app, to request the user to select on or
|
|
1997
2030
|
* more files.
|
|
@@ -2013,29 +2046,32 @@ class Mt {
|
|
|
2013
2046
|
*
|
|
2014
2047
|
* @returns This method returns void.
|
|
2015
2048
|
*/
|
|
2016
|
-
sendFileSelectionMessage(t = "attachment", e, r, i) {
|
|
2049
|
+
sendFileSelectionMessage(t = "attachment", e, r, i, s) {
|
|
2017
2050
|
if (!this.isEmbedded())
|
|
2018
2051
|
throw new l(this.currentContext);
|
|
2019
|
-
const
|
|
2020
|
-
if (
|
|
2052
|
+
const o = "FILE SELECTION", c = this.createMessage(o);
|
|
2053
|
+
if (c.intent = t, c.maxCount = r, c.maxFileSize = i, c.mimeTypes = s, t === "attachment") {
|
|
2021
2054
|
if (!e)
|
|
2022
|
-
throw new
|
|
2055
|
+
throw new x(
|
|
2023
2056
|
"streamId",
|
|
2024
2057
|
e,
|
|
2025
2058
|
"streamId is required for attachment intent"
|
|
2026
2059
|
);
|
|
2027
|
-
|
|
2060
|
+
c.streamId = e;
|
|
2028
2061
|
}
|
|
2029
|
-
this.logCreated(
|
|
2030
|
-
const
|
|
2062
|
+
this.logCreated(o, c);
|
|
2063
|
+
const a = this.incomingMessages$.pipe(
|
|
2031
2064
|
f(
|
|
2032
|
-
(
|
|
2065
|
+
(u) => u.type === o && u.replyTo === c.id
|
|
2033
2066
|
),
|
|
2034
|
-
h((
|
|
2035
|
-
|
|
2036
|
-
|
|
2067
|
+
h((u) => {
|
|
2068
|
+
var g, y;
|
|
2069
|
+
return u.files = (g = u.files) == null ? void 0 : g.map((p) => (p.fileHash = p.fileHash.toLowerCase(), p)), u.fileHashes = (y = u.fileHashes) == null ? void 0 : y.map((p) => p.toLowerCase()), u;
|
|
2070
|
+
}),
|
|
2071
|
+
d(this.logReceived(o)),
|
|
2072
|
+
b(1)
|
|
2037
2073
|
);
|
|
2038
|
-
return this.port2.postMessage(
|
|
2074
|
+
return this.port2.postMessage(c), this.logSent(o, c), a;
|
|
2039
2075
|
}
|
|
2040
2076
|
/**
|
|
2041
2077
|
* Sends a {@link FileDownloadMessage} to the Host app, to request the download of a file.
|
|
@@ -2063,7 +2099,7 @@ class Mt {
|
|
|
2063
2099
|
f((a) => a.type === s && a.replyTo === o.id),
|
|
2064
2100
|
d(this.logReceived(s)),
|
|
2065
2101
|
h((a) => a),
|
|
2066
|
-
|
|
2102
|
+
b(1)
|
|
2067
2103
|
);
|
|
2068
2104
|
return this.port2.postMessage(o), this.logSent(s, o), c;
|
|
2069
2105
|
}
|
|
@@ -2090,7 +2126,7 @@ class Mt {
|
|
|
2090
2126
|
f((o) => o.type === r && o.replyTo === i.id),
|
|
2091
2127
|
d(this.logReceived(r)),
|
|
2092
2128
|
h((o) => o),
|
|
2093
|
-
|
|
2129
|
+
b(1)
|
|
2094
2130
|
);
|
|
2095
2131
|
return this.port2.postMessage(i), this.logSent(r, i), s;
|
|
2096
2132
|
}
|
|
@@ -2118,7 +2154,7 @@ class Mt {
|
|
|
2118
2154
|
f((o) => o.type === r && o.replyTo === i.id),
|
|
2119
2155
|
d(this.logReceived(r)),
|
|
2120
2156
|
h((o) => o),
|
|
2121
|
-
|
|
2157
|
+
b(1)
|
|
2122
2158
|
);
|
|
2123
2159
|
return this.port2.postMessage(i), this.logSent(r, i), s;
|
|
2124
2160
|
}
|
|
@@ -2198,10 +2234,10 @@ class Mt {
|
|
|
2198
2234
|
* version.
|
|
2199
2235
|
*/
|
|
2200
2236
|
compareVersion(t) {
|
|
2201
|
-
return
|
|
2237
|
+
return ne(this.negotiatedProtocolVersion, t);
|
|
2202
2238
|
}
|
|
2203
2239
|
logReceived(t, e) {
|
|
2204
|
-
|
|
2240
|
+
["FILE TRANSFER", "FILE REQUEST"].includes(t) && e != null && e.data && (e = { ...e, data: "..." });
|
|
2205
2241
|
const r = (i) => this.logService.debug(`[IPC] Received ${t} message`, i);
|
|
2206
2242
|
return e && r(e), r;
|
|
2207
2243
|
}
|
|
@@ -2244,8 +2280,8 @@ class Mt {
|
|
|
2244
2280
|
return i.join("");
|
|
2245
2281
|
}
|
|
2246
2282
|
}
|
|
2247
|
-
const
|
|
2248
|
-
class
|
|
2283
|
+
const Tt = ["2.0"];
|
|
2284
|
+
class Rt {
|
|
2249
2285
|
/**
|
|
2250
2286
|
* A class that manages the IPC communication between the `Client` and the `Host`.
|
|
2251
2287
|
*
|
|
@@ -2260,15 +2296,15 @@ class _t {
|
|
|
2260
2296
|
/**
|
|
2261
2297
|
* The type of the `Host` app the `Client` is embedded in.
|
|
2262
2298
|
*/
|
|
2263
|
-
|
|
2299
|
+
T(this, "host");
|
|
2264
2300
|
/**
|
|
2265
2301
|
* The cloud ID of the `Host` app the `Client` is embedded in.
|
|
2266
2302
|
*/
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
this.logger = t ?? console, this.helper = new
|
|
2303
|
+
T(this, "cloudId");
|
|
2304
|
+
T(this, "logger");
|
|
2305
|
+
T(this, "helper");
|
|
2306
|
+
T(this, "listeners");
|
|
2307
|
+
this.logger = t ?? console, this.helper = new xt(Tt, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(m.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(m.Lifecycle, /* @__PURE__ */ new Set()), this.listeners.set(m.PushToken, /* @__PURE__ */ new Set());
|
|
2272
2308
|
}
|
|
2273
2309
|
/**
|
|
2274
2310
|
* Returns whether the app is running inside a native WebView (`host` context) or as a
|
|
@@ -2295,7 +2331,7 @@ class _t {
|
|
|
2295
2331
|
* @returns A promise with {@link IPCContext} the app is running under.
|
|
2296
2332
|
*/
|
|
2297
2333
|
async determineContext() {
|
|
2298
|
-
const t = await
|
|
2334
|
+
const t = await _(this.helper.determineContext(), {
|
|
2299
2335
|
defaultValue: "guest"
|
|
2300
2336
|
});
|
|
2301
2337
|
return this.evaluateContext(t);
|
|
@@ -2304,23 +2340,23 @@ class _t {
|
|
|
2304
2340
|
* Initiates the IPC handshake with the `Host` app.
|
|
2305
2341
|
*/
|
|
2306
2342
|
initiateConnection() {
|
|
2307
|
-
return
|
|
2343
|
+
return _(
|
|
2308
2344
|
this.helper.openBridge().pipe(
|
|
2309
2345
|
Ze((t) => {
|
|
2310
2346
|
this.helper.onBadgeQueryMessage().subscribe((e) => {
|
|
2311
2347
|
var r;
|
|
2312
2348
|
this.logger.debug("Received Badge Query: ", e);
|
|
2313
|
-
for (const i of ((r = this.listeners.get(
|
|
2349
|
+
for (const i of ((r = this.listeners.get(m.BadgeQuery)) == null ? void 0 : r.values()) ?? [])
|
|
2314
2350
|
i();
|
|
2315
2351
|
}), this.helper.onLifecycleMessage().subscribe((e) => {
|
|
2316
2352
|
var r;
|
|
2317
2353
|
this.logger.debug("Received Lifecycle Event: ", e);
|
|
2318
|
-
for (const i of ((r = this.listeners.get(
|
|
2354
|
+
for (const i of ((r = this.listeners.get(m.Lifecycle)) == null ? void 0 : r.values()) ?? [])
|
|
2319
2355
|
i(e.eventName, e.payload);
|
|
2320
2356
|
}), this.helper.onPushTokenMessage().subscribe((e) => {
|
|
2321
2357
|
var r;
|
|
2322
2358
|
this.logger.debug("Received Push Token: ", e);
|
|
2323
|
-
for (const i of ((r = this.listeners.get(
|
|
2359
|
+
for (const i of ((r = this.listeners.get(m.PushToken)) == null ? void 0 : r.values()) ?? [])
|
|
2324
2360
|
i(e.pushToken, e.appId, e.selector);
|
|
2325
2361
|
}), this.cloudId = t.cloudId, this.host = t.host;
|
|
2326
2362
|
}),
|
|
@@ -2334,7 +2370,7 @@ class _t {
|
|
|
2334
2370
|
let s;
|
|
2335
2371
|
if (e === "multi") {
|
|
2336
2372
|
if (!r || !Array.isArray(r))
|
|
2337
|
-
throw new
|
|
2373
|
+
throw new x(
|
|
2338
2374
|
"currentContacts",
|
|
2339
2375
|
r,
|
|
2340
2376
|
"currentContacts is required for group streams"
|
|
@@ -2347,7 +2383,7 @@ class _t {
|
|
|
2347
2383
|
);
|
|
2348
2384
|
} else
|
|
2349
2385
|
r ? i = r : i = "cloudUsername", s = this.helper.selectContacts(t.toString(), "direct", i);
|
|
2350
|
-
return
|
|
2386
|
+
return _(s.pipe(O((o) => o.contacts)));
|
|
2351
2387
|
}
|
|
2352
2388
|
/**
|
|
2353
2389
|
* Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
|
|
@@ -2359,7 +2395,7 @@ class _t {
|
|
|
2359
2395
|
* Host's contact list.
|
|
2360
2396
|
*/
|
|
2361
2397
|
matchContacts(t) {
|
|
2362
|
-
return this.logger.debug("Match Contacts: ", t),
|
|
2398
|
+
return this.logger.debug("Match Contacts: ", t), _(this.helper.matchContacts(t).pipe(O((e) => e.contacts)));
|
|
2363
2399
|
}
|
|
2364
2400
|
/**
|
|
2365
2401
|
* Requests the `Host` app to provide the Push Token for the current device.
|
|
@@ -2367,7 +2403,7 @@ class _t {
|
|
|
2367
2403
|
* @returns A promise with the Push Token as `string`.
|
|
2368
2404
|
*/
|
|
2369
2405
|
requestPushToken() {
|
|
2370
|
-
return this.logger.debug("Requesting Push Token"),
|
|
2406
|
+
return this.logger.debug("Requesting Push Token"), _(this.helper.requestPushToken().pipe(O((t) => t.pushToken)));
|
|
2371
2407
|
}
|
|
2372
2408
|
/**
|
|
2373
2409
|
* Sends the current badge count to the `Host` app.
|
|
@@ -2409,9 +2445,9 @@ class _t {
|
|
|
2409
2445
|
*/
|
|
2410
2446
|
onBadgeQueryRequest(t) {
|
|
2411
2447
|
var e;
|
|
2412
|
-
return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(
|
|
2448
|
+
return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(m.BadgeQuery)) == null || e.add(t), () => {
|
|
2413
2449
|
var r;
|
|
2414
|
-
return (r = this.listeners.get(
|
|
2450
|
+
return (r = this.listeners.get(m.BadgeQuery)) == null ? void 0 : r.delete(t);
|
|
2415
2451
|
};
|
|
2416
2452
|
}
|
|
2417
2453
|
/**
|
|
@@ -2428,9 +2464,9 @@ class _t {
|
|
|
2428
2464
|
*/
|
|
2429
2465
|
onLifecycleEvent(t) {
|
|
2430
2466
|
var e;
|
|
2431
|
-
return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(
|
|
2467
|
+
return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(m.Lifecycle)) == null || e.add(t), () => {
|
|
2432
2468
|
var r;
|
|
2433
|
-
return (r = this.listeners.get(
|
|
2469
|
+
return (r = this.listeners.get(m.Lifecycle)) == null ? void 0 : r.delete(t);
|
|
2434
2470
|
};
|
|
2435
2471
|
}
|
|
2436
2472
|
/**
|
|
@@ -2446,9 +2482,9 @@ class _t {
|
|
|
2446
2482
|
*/
|
|
2447
2483
|
onPushToken(t) {
|
|
2448
2484
|
var e;
|
|
2449
|
-
return this.logger.debug("Registering for Push Token"), (e = this.listeners.get(
|
|
2485
|
+
return this.logger.debug("Registering for Push Token"), (e = this.listeners.get(m.PushToken)) == null || e.add(t), () => {
|
|
2450
2486
|
var r;
|
|
2451
|
-
return (r = this.listeners.get(
|
|
2487
|
+
return (r = this.listeners.get(m.PushToken)) == null ? void 0 : r.delete(t);
|
|
2452
2488
|
};
|
|
2453
2489
|
}
|
|
2454
2490
|
evaluateContext(t) {
|
|
@@ -2459,6 +2495,6 @@ class _t {
|
|
|
2459
2495
|
}
|
|
2460
2496
|
}
|
|
2461
2497
|
export {
|
|
2462
|
-
|
|
2463
|
-
|
|
2498
|
+
m as IPCEvents,
|
|
2499
|
+
Rt as IPCManager
|
|
2464
2500
|
};
|