@blackglory/structures 0.10.22 → 0.11.1
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/README.md +2 -47
- package/dist/es2015/index.min.mjs +1 -15
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +28 -1652
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +27 -1654
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -15
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -15
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +28 -1652
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +27 -1654
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -15
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/bit-set.d.ts +1 -1
- package/lib/es2015/bit-set.js +1 -0
- package/lib/es2015/bit-set.js.map +1 -1
- package/lib/es2015/index.d.ts +0 -2
- package/lib/es2015/index.js +0 -2
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/typed-bit-set.d.ts +1 -1
- package/lib/es2015/typed-bit-set.js +1 -0
- package/lib/es2015/typed-bit-set.js.map +1 -1
- package/lib/es2018/bit-set.d.ts +1 -1
- package/lib/es2018/bit-set.js +1 -0
- package/lib/es2018/bit-set.js.map +1 -1
- package/lib/es2018/index.d.ts +0 -2
- package/lib/es2018/index.js +0 -2
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/typed-bit-set.d.ts +1 -1
- package/lib/es2018/typed-bit-set.js +1 -0
- package/lib/es2018/typed-bit-set.js.map +1 -1
- package/package.json +2 -3
- package/lib/es2015/finite-state-machine.d.ts +0 -15
- package/lib/es2015/finite-state-machine.js +0 -38
- package/lib/es2015/finite-state-machine.js.map +0 -1
- package/lib/es2015/observable-finite-state-machine.d.ts +0 -14
- package/lib/es2015/observable-finite-state-machine.js +0 -31
- package/lib/es2015/observable-finite-state-machine.js.map +0 -1
- package/lib/es2018/finite-state-machine.d.ts +0 -15
- package/lib/es2018/finite-state-machine.js +0 -38
- package/lib/es2018/finite-state-machine.js.map +0 -1
- package/lib/es2018/observable-finite-state-machine.d.ts +0 -14
- package/lib/es2018/observable-finite-state-machine.js +0 -31
- package/lib/es2018/observable-finite-state-machine.js.map +0 -1
package/dist/es2015/index.mjs
CHANGED
|
@@ -66,12 +66,12 @@ _undefined$1.isntUndefined = isntUndefined$1;
|
|
|
66
66
|
var _function$1 = {};
|
|
67
67
|
|
|
68
68
|
_function$1.isntFunction = _function$1.isFunction = void 0;
|
|
69
|
-
function isFunction$
|
|
69
|
+
function isFunction$1(val) {
|
|
70
70
|
return typeof val === 'function';
|
|
71
71
|
}
|
|
72
|
-
_function$1.isFunction = isFunction$
|
|
72
|
+
_function$1.isFunction = isFunction$1;
|
|
73
73
|
function isntFunction$1(val) {
|
|
74
|
-
return !isFunction$
|
|
74
|
+
return !isFunction$1(val);
|
|
75
75
|
}
|
|
76
76
|
_function$1.isntFunction = isntFunction$1;
|
|
77
77
|
|
|
@@ -901,39 +901,39 @@ function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout =
|
|
|
901
901
|
}
|
|
902
902
|
exponentialBackoff.calculateExponentialBackoffTimeout = calculateExponentialBackoffTimeout;
|
|
903
903
|
|
|
904
|
-
var setTimeout$
|
|
904
|
+
var setTimeout$1 = {};
|
|
905
905
|
|
|
906
|
-
setTimeout$
|
|
907
|
-
function setTimeout
|
|
906
|
+
setTimeout$1.setTimeout = void 0;
|
|
907
|
+
function setTimeout(timeout, cb) {
|
|
908
908
|
const timer = globalThis.setTimeout(cb, timeout);
|
|
909
909
|
return () => clearTimeout(timer);
|
|
910
910
|
}
|
|
911
|
-
setTimeout$
|
|
911
|
+
setTimeout$1.setTimeout = setTimeout;
|
|
912
912
|
|
|
913
913
|
var setSchedule$1 = {};
|
|
914
914
|
|
|
915
915
|
setSchedule$1.setSchedule = void 0;
|
|
916
|
-
const set_timeout_1$3 = setTimeout$
|
|
916
|
+
const set_timeout_1$3 = setTimeout$1;
|
|
917
917
|
function setSchedule(timestamp, cb) {
|
|
918
918
|
const timeout = timestamp - Date.now();
|
|
919
919
|
return (0, set_timeout_1$3.setTimeout)(timeout, cb);
|
|
920
920
|
}
|
|
921
921
|
setSchedule$1.setSchedule = setSchedule;
|
|
922
922
|
|
|
923
|
-
var setInterval$
|
|
923
|
+
var setInterval$1 = {};
|
|
924
924
|
|
|
925
|
-
setInterval$
|
|
926
|
-
function setInterval
|
|
925
|
+
setInterval$1.setInterval = void 0;
|
|
926
|
+
function setInterval(timeout, cb) {
|
|
927
927
|
const timer = globalThis.setInterval(cb, timeout);
|
|
928
928
|
return () => clearInterval(timer);
|
|
929
929
|
}
|
|
930
|
-
setInterval$
|
|
930
|
+
setInterval$1.setInterval = setInterval;
|
|
931
931
|
|
|
932
|
-
var setImmediate$
|
|
932
|
+
var setImmediate$1 = {};
|
|
933
933
|
|
|
934
|
-
setImmediate$
|
|
935
|
-
const set_timeout_1$2 = setTimeout$
|
|
936
|
-
function setImmediate
|
|
934
|
+
setImmediate$1.setImmediate = void 0;
|
|
935
|
+
const set_timeout_1$2 = setTimeout$1;
|
|
936
|
+
function setImmediate(cb) {
|
|
937
937
|
if (globalThis.setImmediate) {
|
|
938
938
|
const timer = globalThis.setImmediate(cb);
|
|
939
939
|
return () => clearImmediate(timer);
|
|
@@ -942,12 +942,12 @@ function setImmediate$1(cb) {
|
|
|
942
942
|
return (0, set_timeout_1$2.setTimeout)(0, cb);
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
setImmediate$
|
|
945
|
+
setImmediate$1.setImmediate = setImmediate;
|
|
946
946
|
|
|
947
947
|
var setTimeoutLoop$1 = {};
|
|
948
948
|
|
|
949
949
|
setTimeoutLoop$1.setTimeoutLoop = void 0;
|
|
950
|
-
const set_timeout_1$1 = setTimeout$
|
|
950
|
+
const set_timeout_1$1 = setTimeout$1;
|
|
951
951
|
function setTimeoutLoop(timeout, cb) {
|
|
952
952
|
let isCancelled = false;
|
|
953
953
|
let cancel = (0, set_timeout_1$1.setTimeout)(timeout, loop);
|
|
@@ -967,7 +967,7 @@ setTimeoutLoop$1.setTimeoutLoop = setTimeoutLoop;
|
|
|
967
967
|
var setDynamicTimeoutLoop$1 = {};
|
|
968
968
|
|
|
969
969
|
setDynamicTimeoutLoop$1.setDynamicTimeoutLoop = void 0;
|
|
970
|
-
const set_timeout_1 = setTimeout$
|
|
970
|
+
const set_timeout_1 = setTimeout$1;
|
|
971
971
|
function setDynamicTimeoutLoop(timeout, cb) {
|
|
972
972
|
let isCancelled = false;
|
|
973
973
|
let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);
|
|
@@ -997,10 +997,10 @@ setDynamicTimeoutLoop$1.setDynamicTimeoutLoop = setDynamicTimeoutLoop;
|
|
|
997
997
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
998
998
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
999
999
|
};__exportStar(exponentialBackoff, exports);
|
|
1000
|
-
__exportStar(setTimeout$
|
|
1000
|
+
__exportStar(setTimeout$1, exports);
|
|
1001
1001
|
__exportStar(setSchedule$1, exports);
|
|
1002
|
-
__exportStar(setInterval$
|
|
1003
|
-
__exportStar(setImmediate$
|
|
1002
|
+
__exportStar(setInterval$1, exports);
|
|
1003
|
+
__exportStar(setImmediate$1, exports);
|
|
1004
1004
|
__exportStar(setTimeoutLoop$1, exports);
|
|
1005
1005
|
__exportStar(setDynamicTimeoutLoop$1, exports);
|
|
1006
1006
|
|
|
@@ -1124,12 +1124,12 @@ _undefined.isntUndefined = isntUndefined;
|
|
|
1124
1124
|
var _function = {};
|
|
1125
1125
|
|
|
1126
1126
|
_function.isntFunction = _function.isFunction = void 0;
|
|
1127
|
-
function isFunction
|
|
1127
|
+
function isFunction(val) {
|
|
1128
1128
|
return typeof val === 'function';
|
|
1129
1129
|
}
|
|
1130
|
-
_function.isFunction = isFunction
|
|
1130
|
+
_function.isFunction = isFunction;
|
|
1131
1131
|
function isntFunction(val) {
|
|
1132
|
-
return !isFunction
|
|
1132
|
+
return !isFunction(val);
|
|
1133
1133
|
}
|
|
1134
1134
|
_function.isntFunction = isntFunction;
|
|
1135
1135
|
|
|
@@ -4022,1632 +4022,6 @@ class TrieMap {
|
|
|
4022
4022
|
}
|
|
4023
4023
|
}
|
|
4024
4024
|
|
|
4025
|
-
class FiniteStateMachine {
|
|
4026
|
-
constructor(schema, initialState) {
|
|
4027
|
-
this.schema = schema;
|
|
4028
|
-
this._state = initialState;
|
|
4029
|
-
}
|
|
4030
|
-
get [Symbol.toStringTag]() {
|
|
4031
|
-
return this.constructor.name;
|
|
4032
|
-
}
|
|
4033
|
-
get state() {
|
|
4034
|
-
return this._state;
|
|
4035
|
-
}
|
|
4036
|
-
matches(state) {
|
|
4037
|
-
return this._state === state;
|
|
4038
|
-
}
|
|
4039
|
-
can(event) {
|
|
4040
|
-
return event in this.schema[this.state];
|
|
4041
|
-
}
|
|
4042
|
-
/**
|
|
4043
|
-
* @throws {BadEventError}
|
|
4044
|
-
*/
|
|
4045
|
-
send(event) {
|
|
4046
|
-
if (this.can(event)) {
|
|
4047
|
-
this._state = this.schema[this.state][event];
|
|
4048
|
-
}
|
|
4049
|
-
else {
|
|
4050
|
-
throw new BadEventError(this.state, event);
|
|
4051
|
-
}
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
class BadEventError extends es2018Exports$1.CustomError {
|
|
4055
|
-
constructor(state, event) {
|
|
4056
|
-
super(`State ${state} cannot react to event ${event}`);
|
|
4057
|
-
}
|
|
4058
|
-
}
|
|
4059
|
-
|
|
4060
|
-
/*! *****************************************************************************
|
|
4061
|
-
Copyright (c) Microsoft Corporation.
|
|
4062
|
-
|
|
4063
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4064
|
-
purpose with or without fee is hereby granted.
|
|
4065
|
-
|
|
4066
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4067
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4068
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4069
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4070
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4071
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4072
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4073
|
-
***************************************************************************** */
|
|
4074
|
-
/* global Reflect, Promise */
|
|
4075
|
-
|
|
4076
|
-
var extendStatics = function(d, b) {
|
|
4077
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4078
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
4079
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
4080
|
-
return extendStatics(d, b);
|
|
4081
|
-
};
|
|
4082
|
-
|
|
4083
|
-
function __extends(d, b) {
|
|
4084
|
-
if (typeof b !== "function" && b !== null)
|
|
4085
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
4086
|
-
extendStatics(d, b);
|
|
4087
|
-
function __() { this.constructor = d; }
|
|
4088
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
4089
|
-
}
|
|
4090
|
-
|
|
4091
|
-
function __values(o) {
|
|
4092
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4093
|
-
if (m) return m.call(o);
|
|
4094
|
-
if (o && typeof o.length === "number") return {
|
|
4095
|
-
next: function () {
|
|
4096
|
-
if (o && i >= o.length) o = void 0;
|
|
4097
|
-
return { value: o && o[i++], done: !o };
|
|
4098
|
-
}
|
|
4099
|
-
};
|
|
4100
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
4101
|
-
}
|
|
4102
|
-
|
|
4103
|
-
function __read(o, n) {
|
|
4104
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4105
|
-
if (!m) return o;
|
|
4106
|
-
var i = m.call(o), r, ar = [], e;
|
|
4107
|
-
try {
|
|
4108
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
4109
|
-
}
|
|
4110
|
-
catch (error) { e = { error: error }; }
|
|
4111
|
-
finally {
|
|
4112
|
-
try {
|
|
4113
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
4114
|
-
}
|
|
4115
|
-
finally { if (e) throw e.error; }
|
|
4116
|
-
}
|
|
4117
|
-
return ar;
|
|
4118
|
-
}
|
|
4119
|
-
|
|
4120
|
-
function __spreadArray(to, from, pack) {
|
|
4121
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4122
|
-
if (ar || !(i in from)) {
|
|
4123
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4124
|
-
ar[i] = from[i];
|
|
4125
|
-
}
|
|
4126
|
-
}
|
|
4127
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4128
|
-
}
|
|
4129
|
-
|
|
4130
|
-
function isFunction(value) {
|
|
4131
|
-
return typeof value === 'function';
|
|
4132
|
-
}
|
|
4133
|
-
|
|
4134
|
-
function createErrorClass(createImpl) {
|
|
4135
|
-
var _super = function (instance) {
|
|
4136
|
-
Error.call(instance);
|
|
4137
|
-
instance.stack = new Error().stack;
|
|
4138
|
-
};
|
|
4139
|
-
var ctorFunc = createImpl(_super);
|
|
4140
|
-
ctorFunc.prototype = Object.create(Error.prototype);
|
|
4141
|
-
ctorFunc.prototype.constructor = ctorFunc;
|
|
4142
|
-
return ctorFunc;
|
|
4143
|
-
}
|
|
4144
|
-
|
|
4145
|
-
var UnsubscriptionError = createErrorClass(function (_super) {
|
|
4146
|
-
return function UnsubscriptionErrorImpl(errors) {
|
|
4147
|
-
_super(this);
|
|
4148
|
-
this.message = errors
|
|
4149
|
-
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
|
|
4150
|
-
: '';
|
|
4151
|
-
this.name = 'UnsubscriptionError';
|
|
4152
|
-
this.errors = errors;
|
|
4153
|
-
};
|
|
4154
|
-
});
|
|
4155
|
-
|
|
4156
|
-
function arrRemove(arr, item) {
|
|
4157
|
-
if (arr) {
|
|
4158
|
-
var index = arr.indexOf(item);
|
|
4159
|
-
0 <= index && arr.splice(index, 1);
|
|
4160
|
-
}
|
|
4161
|
-
}
|
|
4162
|
-
|
|
4163
|
-
var Subscription = (function () {
|
|
4164
|
-
function Subscription(initialTeardown) {
|
|
4165
|
-
this.initialTeardown = initialTeardown;
|
|
4166
|
-
this.closed = false;
|
|
4167
|
-
this._parentage = null;
|
|
4168
|
-
this._finalizers = null;
|
|
4169
|
-
}
|
|
4170
|
-
Subscription.prototype.unsubscribe = function () {
|
|
4171
|
-
var e_1, _a, e_2, _b;
|
|
4172
|
-
var errors;
|
|
4173
|
-
if (!this.closed) {
|
|
4174
|
-
this.closed = true;
|
|
4175
|
-
var _parentage = this._parentage;
|
|
4176
|
-
if (_parentage) {
|
|
4177
|
-
this._parentage = null;
|
|
4178
|
-
if (Array.isArray(_parentage)) {
|
|
4179
|
-
try {
|
|
4180
|
-
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
|
|
4181
|
-
var parent_1 = _parentage_1_1.value;
|
|
4182
|
-
parent_1.remove(this);
|
|
4183
|
-
}
|
|
4184
|
-
}
|
|
4185
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4186
|
-
finally {
|
|
4187
|
-
try {
|
|
4188
|
-
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
|
|
4189
|
-
}
|
|
4190
|
-
finally { if (e_1) throw e_1.error; }
|
|
4191
|
-
}
|
|
4192
|
-
}
|
|
4193
|
-
else {
|
|
4194
|
-
_parentage.remove(this);
|
|
4195
|
-
}
|
|
4196
|
-
}
|
|
4197
|
-
var initialFinalizer = this.initialTeardown;
|
|
4198
|
-
if (isFunction(initialFinalizer)) {
|
|
4199
|
-
try {
|
|
4200
|
-
initialFinalizer();
|
|
4201
|
-
}
|
|
4202
|
-
catch (e) {
|
|
4203
|
-
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
4204
|
-
}
|
|
4205
|
-
}
|
|
4206
|
-
var _finalizers = this._finalizers;
|
|
4207
|
-
if (_finalizers) {
|
|
4208
|
-
this._finalizers = null;
|
|
4209
|
-
try {
|
|
4210
|
-
for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
|
|
4211
|
-
var finalizer = _finalizers_1_1.value;
|
|
4212
|
-
try {
|
|
4213
|
-
execFinalizer(finalizer);
|
|
4214
|
-
}
|
|
4215
|
-
catch (err) {
|
|
4216
|
-
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
4217
|
-
if (err instanceof UnsubscriptionError) {
|
|
4218
|
-
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
|
|
4219
|
-
}
|
|
4220
|
-
else {
|
|
4221
|
-
errors.push(err);
|
|
4222
|
-
}
|
|
4223
|
-
}
|
|
4224
|
-
}
|
|
4225
|
-
}
|
|
4226
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
4227
|
-
finally {
|
|
4228
|
-
try {
|
|
4229
|
-
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
|
|
4230
|
-
}
|
|
4231
|
-
finally { if (e_2) throw e_2.error; }
|
|
4232
|
-
}
|
|
4233
|
-
}
|
|
4234
|
-
if (errors) {
|
|
4235
|
-
throw new UnsubscriptionError(errors);
|
|
4236
|
-
}
|
|
4237
|
-
}
|
|
4238
|
-
};
|
|
4239
|
-
Subscription.prototype.add = function (teardown) {
|
|
4240
|
-
var _a;
|
|
4241
|
-
if (teardown && teardown !== this) {
|
|
4242
|
-
if (this.closed) {
|
|
4243
|
-
execFinalizer(teardown);
|
|
4244
|
-
}
|
|
4245
|
-
else {
|
|
4246
|
-
if (teardown instanceof Subscription) {
|
|
4247
|
-
if (teardown.closed || teardown._hasParent(this)) {
|
|
4248
|
-
return;
|
|
4249
|
-
}
|
|
4250
|
-
teardown._addParent(this);
|
|
4251
|
-
}
|
|
4252
|
-
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
4253
|
-
}
|
|
4254
|
-
}
|
|
4255
|
-
};
|
|
4256
|
-
Subscription.prototype._hasParent = function (parent) {
|
|
4257
|
-
var _parentage = this._parentage;
|
|
4258
|
-
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
|
|
4259
|
-
};
|
|
4260
|
-
Subscription.prototype._addParent = function (parent) {
|
|
4261
|
-
var _parentage = this._parentage;
|
|
4262
|
-
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
4263
|
-
};
|
|
4264
|
-
Subscription.prototype._removeParent = function (parent) {
|
|
4265
|
-
var _parentage = this._parentage;
|
|
4266
|
-
if (_parentage === parent) {
|
|
4267
|
-
this._parentage = null;
|
|
4268
|
-
}
|
|
4269
|
-
else if (Array.isArray(_parentage)) {
|
|
4270
|
-
arrRemove(_parentage, parent);
|
|
4271
|
-
}
|
|
4272
|
-
};
|
|
4273
|
-
Subscription.prototype.remove = function (teardown) {
|
|
4274
|
-
var _finalizers = this._finalizers;
|
|
4275
|
-
_finalizers && arrRemove(_finalizers, teardown);
|
|
4276
|
-
if (teardown instanceof Subscription) {
|
|
4277
|
-
teardown._removeParent(this);
|
|
4278
|
-
}
|
|
4279
|
-
};
|
|
4280
|
-
Subscription.EMPTY = (function () {
|
|
4281
|
-
var empty = new Subscription();
|
|
4282
|
-
empty.closed = true;
|
|
4283
|
-
return empty;
|
|
4284
|
-
})();
|
|
4285
|
-
return Subscription;
|
|
4286
|
-
}());
|
|
4287
|
-
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
4288
|
-
function isSubscription(value) {
|
|
4289
|
-
return (value instanceof Subscription ||
|
|
4290
|
-
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
|
|
4291
|
-
}
|
|
4292
|
-
function execFinalizer(finalizer) {
|
|
4293
|
-
if (isFunction(finalizer)) {
|
|
4294
|
-
finalizer();
|
|
4295
|
-
}
|
|
4296
|
-
else {
|
|
4297
|
-
finalizer.unsubscribe();
|
|
4298
|
-
}
|
|
4299
|
-
}
|
|
4300
|
-
|
|
4301
|
-
var config = {
|
|
4302
|
-
onUnhandledError: null,
|
|
4303
|
-
onStoppedNotification: null,
|
|
4304
|
-
Promise: undefined,
|
|
4305
|
-
useDeprecatedSynchronousErrorHandling: false,
|
|
4306
|
-
useDeprecatedNextContext: false,
|
|
4307
|
-
};
|
|
4308
|
-
|
|
4309
|
-
var timeoutProvider = {
|
|
4310
|
-
setTimeout: function (handler, timeout) {
|
|
4311
|
-
var args = [];
|
|
4312
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4313
|
-
args[_i - 2] = arguments[_i];
|
|
4314
|
-
}
|
|
4315
|
-
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
|
|
4316
|
-
},
|
|
4317
|
-
clearTimeout: function (handle) {
|
|
4318
|
-
return (clearTimeout)(handle);
|
|
4319
|
-
},
|
|
4320
|
-
delegate: undefined,
|
|
4321
|
-
};
|
|
4322
|
-
|
|
4323
|
-
function reportUnhandledError(err) {
|
|
4324
|
-
timeoutProvider.setTimeout(function () {
|
|
4325
|
-
{
|
|
4326
|
-
throw err;
|
|
4327
|
-
}
|
|
4328
|
-
});
|
|
4329
|
-
}
|
|
4330
|
-
|
|
4331
|
-
function noop() { }
|
|
4332
|
-
|
|
4333
|
-
function errorContext(cb) {
|
|
4334
|
-
{
|
|
4335
|
-
cb();
|
|
4336
|
-
}
|
|
4337
|
-
}
|
|
4338
|
-
|
|
4339
|
-
var Subscriber = (function (_super) {
|
|
4340
|
-
__extends(Subscriber, _super);
|
|
4341
|
-
function Subscriber(destination) {
|
|
4342
|
-
var _this = _super.call(this) || this;
|
|
4343
|
-
_this.isStopped = false;
|
|
4344
|
-
if (destination) {
|
|
4345
|
-
_this.destination = destination;
|
|
4346
|
-
if (isSubscription(destination)) {
|
|
4347
|
-
destination.add(_this);
|
|
4348
|
-
}
|
|
4349
|
-
}
|
|
4350
|
-
else {
|
|
4351
|
-
_this.destination = EMPTY_OBSERVER;
|
|
4352
|
-
}
|
|
4353
|
-
return _this;
|
|
4354
|
-
}
|
|
4355
|
-
Subscriber.create = function (next, error, complete) {
|
|
4356
|
-
return new SafeSubscriber(next, error, complete);
|
|
4357
|
-
};
|
|
4358
|
-
Subscriber.prototype.next = function (value) {
|
|
4359
|
-
if (this.isStopped) ;
|
|
4360
|
-
else {
|
|
4361
|
-
this._next(value);
|
|
4362
|
-
}
|
|
4363
|
-
};
|
|
4364
|
-
Subscriber.prototype.error = function (err) {
|
|
4365
|
-
if (this.isStopped) ;
|
|
4366
|
-
else {
|
|
4367
|
-
this.isStopped = true;
|
|
4368
|
-
this._error(err);
|
|
4369
|
-
}
|
|
4370
|
-
};
|
|
4371
|
-
Subscriber.prototype.complete = function () {
|
|
4372
|
-
if (this.isStopped) ;
|
|
4373
|
-
else {
|
|
4374
|
-
this.isStopped = true;
|
|
4375
|
-
this._complete();
|
|
4376
|
-
}
|
|
4377
|
-
};
|
|
4378
|
-
Subscriber.prototype.unsubscribe = function () {
|
|
4379
|
-
if (!this.closed) {
|
|
4380
|
-
this.isStopped = true;
|
|
4381
|
-
_super.prototype.unsubscribe.call(this);
|
|
4382
|
-
this.destination = null;
|
|
4383
|
-
}
|
|
4384
|
-
};
|
|
4385
|
-
Subscriber.prototype._next = function (value) {
|
|
4386
|
-
this.destination.next(value);
|
|
4387
|
-
};
|
|
4388
|
-
Subscriber.prototype._error = function (err) {
|
|
4389
|
-
try {
|
|
4390
|
-
this.destination.error(err);
|
|
4391
|
-
}
|
|
4392
|
-
finally {
|
|
4393
|
-
this.unsubscribe();
|
|
4394
|
-
}
|
|
4395
|
-
};
|
|
4396
|
-
Subscriber.prototype._complete = function () {
|
|
4397
|
-
try {
|
|
4398
|
-
this.destination.complete();
|
|
4399
|
-
}
|
|
4400
|
-
finally {
|
|
4401
|
-
this.unsubscribe();
|
|
4402
|
-
}
|
|
4403
|
-
};
|
|
4404
|
-
return Subscriber;
|
|
4405
|
-
}(Subscription));
|
|
4406
|
-
var _bind = Function.prototype.bind;
|
|
4407
|
-
function bind(fn, thisArg) {
|
|
4408
|
-
return _bind.call(fn, thisArg);
|
|
4409
|
-
}
|
|
4410
|
-
var ConsumerObserver = (function () {
|
|
4411
|
-
function ConsumerObserver(partialObserver) {
|
|
4412
|
-
this.partialObserver = partialObserver;
|
|
4413
|
-
}
|
|
4414
|
-
ConsumerObserver.prototype.next = function (value) {
|
|
4415
|
-
var partialObserver = this.partialObserver;
|
|
4416
|
-
if (partialObserver.next) {
|
|
4417
|
-
try {
|
|
4418
|
-
partialObserver.next(value);
|
|
4419
|
-
}
|
|
4420
|
-
catch (error) {
|
|
4421
|
-
handleUnhandledError(error);
|
|
4422
|
-
}
|
|
4423
|
-
}
|
|
4424
|
-
};
|
|
4425
|
-
ConsumerObserver.prototype.error = function (err) {
|
|
4426
|
-
var partialObserver = this.partialObserver;
|
|
4427
|
-
if (partialObserver.error) {
|
|
4428
|
-
try {
|
|
4429
|
-
partialObserver.error(err);
|
|
4430
|
-
}
|
|
4431
|
-
catch (error) {
|
|
4432
|
-
handleUnhandledError(error);
|
|
4433
|
-
}
|
|
4434
|
-
}
|
|
4435
|
-
else {
|
|
4436
|
-
handleUnhandledError(err);
|
|
4437
|
-
}
|
|
4438
|
-
};
|
|
4439
|
-
ConsumerObserver.prototype.complete = function () {
|
|
4440
|
-
var partialObserver = this.partialObserver;
|
|
4441
|
-
if (partialObserver.complete) {
|
|
4442
|
-
try {
|
|
4443
|
-
partialObserver.complete();
|
|
4444
|
-
}
|
|
4445
|
-
catch (error) {
|
|
4446
|
-
handleUnhandledError(error);
|
|
4447
|
-
}
|
|
4448
|
-
}
|
|
4449
|
-
};
|
|
4450
|
-
return ConsumerObserver;
|
|
4451
|
-
}());
|
|
4452
|
-
var SafeSubscriber = (function (_super) {
|
|
4453
|
-
__extends(SafeSubscriber, _super);
|
|
4454
|
-
function SafeSubscriber(observerOrNext, error, complete) {
|
|
4455
|
-
var _this = _super.call(this) || this;
|
|
4456
|
-
var partialObserver;
|
|
4457
|
-
if (isFunction(observerOrNext) || !observerOrNext) {
|
|
4458
|
-
partialObserver = {
|
|
4459
|
-
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,
|
|
4460
|
-
error: error !== null && error !== void 0 ? error : undefined,
|
|
4461
|
-
complete: complete !== null && complete !== void 0 ? complete : undefined,
|
|
4462
|
-
};
|
|
4463
|
-
}
|
|
4464
|
-
else {
|
|
4465
|
-
var context_1;
|
|
4466
|
-
if (_this && config.useDeprecatedNextContext) {
|
|
4467
|
-
context_1 = Object.create(observerOrNext);
|
|
4468
|
-
context_1.unsubscribe = function () { return _this.unsubscribe(); };
|
|
4469
|
-
partialObserver = {
|
|
4470
|
-
next: observerOrNext.next && bind(observerOrNext.next, context_1),
|
|
4471
|
-
error: observerOrNext.error && bind(observerOrNext.error, context_1),
|
|
4472
|
-
complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),
|
|
4473
|
-
};
|
|
4474
|
-
}
|
|
4475
|
-
else {
|
|
4476
|
-
partialObserver = observerOrNext;
|
|
4477
|
-
}
|
|
4478
|
-
}
|
|
4479
|
-
_this.destination = new ConsumerObserver(partialObserver);
|
|
4480
|
-
return _this;
|
|
4481
|
-
}
|
|
4482
|
-
return SafeSubscriber;
|
|
4483
|
-
}(Subscriber));
|
|
4484
|
-
function handleUnhandledError(error) {
|
|
4485
|
-
{
|
|
4486
|
-
reportUnhandledError(error);
|
|
4487
|
-
}
|
|
4488
|
-
}
|
|
4489
|
-
function defaultErrorHandler(err) {
|
|
4490
|
-
throw err;
|
|
4491
|
-
}
|
|
4492
|
-
var EMPTY_OBSERVER = {
|
|
4493
|
-
closed: true,
|
|
4494
|
-
next: noop,
|
|
4495
|
-
error: defaultErrorHandler,
|
|
4496
|
-
complete: noop,
|
|
4497
|
-
};
|
|
4498
|
-
|
|
4499
|
-
var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();
|
|
4500
|
-
|
|
4501
|
-
function identity(x) {
|
|
4502
|
-
return x;
|
|
4503
|
-
}
|
|
4504
|
-
|
|
4505
|
-
function pipeFromArray(fns) {
|
|
4506
|
-
if (fns.length === 0) {
|
|
4507
|
-
return identity;
|
|
4508
|
-
}
|
|
4509
|
-
if (fns.length === 1) {
|
|
4510
|
-
return fns[0];
|
|
4511
|
-
}
|
|
4512
|
-
return function piped(input) {
|
|
4513
|
-
return fns.reduce(function (prev, fn) { return fn(prev); }, input);
|
|
4514
|
-
};
|
|
4515
|
-
}
|
|
4516
|
-
|
|
4517
|
-
var Observable = (function () {
|
|
4518
|
-
function Observable(subscribe) {
|
|
4519
|
-
if (subscribe) {
|
|
4520
|
-
this._subscribe = subscribe;
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
Observable.prototype.lift = function (operator) {
|
|
4524
|
-
var observable = new Observable();
|
|
4525
|
-
observable.source = this;
|
|
4526
|
-
observable.operator = operator;
|
|
4527
|
-
return observable;
|
|
4528
|
-
};
|
|
4529
|
-
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
|
|
4530
|
-
var _this = this;
|
|
4531
|
-
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
4532
|
-
errorContext(function () {
|
|
4533
|
-
var _a = _this, operator = _a.operator, source = _a.source;
|
|
4534
|
-
subscriber.add(operator
|
|
4535
|
-
?
|
|
4536
|
-
operator.call(subscriber, source)
|
|
4537
|
-
: source
|
|
4538
|
-
?
|
|
4539
|
-
_this._subscribe(subscriber)
|
|
4540
|
-
:
|
|
4541
|
-
_this._trySubscribe(subscriber));
|
|
4542
|
-
});
|
|
4543
|
-
return subscriber;
|
|
4544
|
-
};
|
|
4545
|
-
Observable.prototype._trySubscribe = function (sink) {
|
|
4546
|
-
try {
|
|
4547
|
-
return this._subscribe(sink);
|
|
4548
|
-
}
|
|
4549
|
-
catch (err) {
|
|
4550
|
-
sink.error(err);
|
|
4551
|
-
}
|
|
4552
|
-
};
|
|
4553
|
-
Observable.prototype.forEach = function (next, promiseCtor) {
|
|
4554
|
-
var _this = this;
|
|
4555
|
-
promiseCtor = getPromiseCtor(promiseCtor);
|
|
4556
|
-
return new promiseCtor(function (resolve, reject) {
|
|
4557
|
-
var subscriber = new SafeSubscriber({
|
|
4558
|
-
next: function (value) {
|
|
4559
|
-
try {
|
|
4560
|
-
next(value);
|
|
4561
|
-
}
|
|
4562
|
-
catch (err) {
|
|
4563
|
-
reject(err);
|
|
4564
|
-
subscriber.unsubscribe();
|
|
4565
|
-
}
|
|
4566
|
-
},
|
|
4567
|
-
error: reject,
|
|
4568
|
-
complete: resolve,
|
|
4569
|
-
});
|
|
4570
|
-
_this.subscribe(subscriber);
|
|
4571
|
-
});
|
|
4572
|
-
};
|
|
4573
|
-
Observable.prototype._subscribe = function (subscriber) {
|
|
4574
|
-
var _a;
|
|
4575
|
-
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
4576
|
-
};
|
|
4577
|
-
Observable.prototype[observable] = function () {
|
|
4578
|
-
return this;
|
|
4579
|
-
};
|
|
4580
|
-
Observable.prototype.pipe = function () {
|
|
4581
|
-
var operations = [];
|
|
4582
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4583
|
-
operations[_i] = arguments[_i];
|
|
4584
|
-
}
|
|
4585
|
-
return pipeFromArray(operations)(this);
|
|
4586
|
-
};
|
|
4587
|
-
Observable.prototype.toPromise = function (promiseCtor) {
|
|
4588
|
-
var _this = this;
|
|
4589
|
-
promiseCtor = getPromiseCtor(promiseCtor);
|
|
4590
|
-
return new promiseCtor(function (resolve, reject) {
|
|
4591
|
-
var value;
|
|
4592
|
-
_this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });
|
|
4593
|
-
});
|
|
4594
|
-
};
|
|
4595
|
-
Observable.create = function (subscribe) {
|
|
4596
|
-
return new Observable(subscribe);
|
|
4597
|
-
};
|
|
4598
|
-
return Observable;
|
|
4599
|
-
}());
|
|
4600
|
-
function getPromiseCtor(promiseCtor) {
|
|
4601
|
-
var _a;
|
|
4602
|
-
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
4603
|
-
}
|
|
4604
|
-
function isObserver(value) {
|
|
4605
|
-
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
|
4606
|
-
}
|
|
4607
|
-
function isSubscriber(value) {
|
|
4608
|
-
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
4609
|
-
}
|
|
4610
|
-
|
|
4611
|
-
function hasLift(source) {
|
|
4612
|
-
return isFunction(source === null || source === void 0 ? void 0 : source.lift);
|
|
4613
|
-
}
|
|
4614
|
-
function operate(init) {
|
|
4615
|
-
return function (source) {
|
|
4616
|
-
if (hasLift(source)) {
|
|
4617
|
-
return source.lift(function (liftedSource) {
|
|
4618
|
-
try {
|
|
4619
|
-
return init(liftedSource, this);
|
|
4620
|
-
}
|
|
4621
|
-
catch (err) {
|
|
4622
|
-
this.error(err);
|
|
4623
|
-
}
|
|
4624
|
-
});
|
|
4625
|
-
}
|
|
4626
|
-
throw new TypeError('Unable to lift unknown Observable type');
|
|
4627
|
-
};
|
|
4628
|
-
}
|
|
4629
|
-
|
|
4630
|
-
function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
|
|
4631
|
-
return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
|
|
4632
|
-
}
|
|
4633
|
-
var OperatorSubscriber = (function (_super) {
|
|
4634
|
-
__extends(OperatorSubscriber, _super);
|
|
4635
|
-
function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
|
|
4636
|
-
var _this = _super.call(this, destination) || this;
|
|
4637
|
-
_this.onFinalize = onFinalize;
|
|
4638
|
-
_this.shouldUnsubscribe = shouldUnsubscribe;
|
|
4639
|
-
_this._next = onNext
|
|
4640
|
-
? function (value) {
|
|
4641
|
-
try {
|
|
4642
|
-
onNext(value);
|
|
4643
|
-
}
|
|
4644
|
-
catch (err) {
|
|
4645
|
-
destination.error(err);
|
|
4646
|
-
}
|
|
4647
|
-
}
|
|
4648
|
-
: _super.prototype._next;
|
|
4649
|
-
_this._error = onError
|
|
4650
|
-
? function (err) {
|
|
4651
|
-
try {
|
|
4652
|
-
onError(err);
|
|
4653
|
-
}
|
|
4654
|
-
catch (err) {
|
|
4655
|
-
destination.error(err);
|
|
4656
|
-
}
|
|
4657
|
-
finally {
|
|
4658
|
-
this.unsubscribe();
|
|
4659
|
-
}
|
|
4660
|
-
}
|
|
4661
|
-
: _super.prototype._error;
|
|
4662
|
-
_this._complete = onComplete
|
|
4663
|
-
? function () {
|
|
4664
|
-
try {
|
|
4665
|
-
onComplete();
|
|
4666
|
-
}
|
|
4667
|
-
catch (err) {
|
|
4668
|
-
destination.error(err);
|
|
4669
|
-
}
|
|
4670
|
-
finally {
|
|
4671
|
-
this.unsubscribe();
|
|
4672
|
-
}
|
|
4673
|
-
}
|
|
4674
|
-
: _super.prototype._complete;
|
|
4675
|
-
return _this;
|
|
4676
|
-
}
|
|
4677
|
-
OperatorSubscriber.prototype.unsubscribe = function () {
|
|
4678
|
-
var _a;
|
|
4679
|
-
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
4680
|
-
var closed_1 = this.closed;
|
|
4681
|
-
_super.prototype.unsubscribe.call(this);
|
|
4682
|
-
!closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
4683
|
-
}
|
|
4684
|
-
};
|
|
4685
|
-
return OperatorSubscriber;
|
|
4686
|
-
}(Subscriber));
|
|
4687
|
-
|
|
4688
|
-
function refCount() {
|
|
4689
|
-
return operate(function (source, subscriber) {
|
|
4690
|
-
var connection = null;
|
|
4691
|
-
source._refCount++;
|
|
4692
|
-
var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () {
|
|
4693
|
-
if (!source || source._refCount <= 0 || 0 < --source._refCount) {
|
|
4694
|
-
connection = null;
|
|
4695
|
-
return;
|
|
4696
|
-
}
|
|
4697
|
-
var sharedConnection = source._connection;
|
|
4698
|
-
var conn = connection;
|
|
4699
|
-
connection = null;
|
|
4700
|
-
if (sharedConnection && (!conn || sharedConnection === conn)) {
|
|
4701
|
-
sharedConnection.unsubscribe();
|
|
4702
|
-
}
|
|
4703
|
-
subscriber.unsubscribe();
|
|
4704
|
-
});
|
|
4705
|
-
source.subscribe(refCounter);
|
|
4706
|
-
if (!refCounter.closed) {
|
|
4707
|
-
connection = source.connect();
|
|
4708
|
-
}
|
|
4709
|
-
});
|
|
4710
|
-
}
|
|
4711
|
-
|
|
4712
|
-
((function (_super) {
|
|
4713
|
-
__extends(ConnectableObservable, _super);
|
|
4714
|
-
function ConnectableObservable(source, subjectFactory) {
|
|
4715
|
-
var _this = _super.call(this) || this;
|
|
4716
|
-
_this.source = source;
|
|
4717
|
-
_this.subjectFactory = subjectFactory;
|
|
4718
|
-
_this._subject = null;
|
|
4719
|
-
_this._refCount = 0;
|
|
4720
|
-
_this._connection = null;
|
|
4721
|
-
if (hasLift(source)) {
|
|
4722
|
-
_this.lift = source.lift;
|
|
4723
|
-
}
|
|
4724
|
-
return _this;
|
|
4725
|
-
}
|
|
4726
|
-
ConnectableObservable.prototype._subscribe = function (subscriber) {
|
|
4727
|
-
return this.getSubject().subscribe(subscriber);
|
|
4728
|
-
};
|
|
4729
|
-
ConnectableObservable.prototype.getSubject = function () {
|
|
4730
|
-
var subject = this._subject;
|
|
4731
|
-
if (!subject || subject.isStopped) {
|
|
4732
|
-
this._subject = this.subjectFactory();
|
|
4733
|
-
}
|
|
4734
|
-
return this._subject;
|
|
4735
|
-
};
|
|
4736
|
-
ConnectableObservable.prototype._teardown = function () {
|
|
4737
|
-
this._refCount = 0;
|
|
4738
|
-
var _connection = this._connection;
|
|
4739
|
-
this._subject = this._connection = null;
|
|
4740
|
-
_connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();
|
|
4741
|
-
};
|
|
4742
|
-
ConnectableObservable.prototype.connect = function () {
|
|
4743
|
-
var _this = this;
|
|
4744
|
-
var connection = this._connection;
|
|
4745
|
-
if (!connection) {
|
|
4746
|
-
connection = this._connection = new Subscription();
|
|
4747
|
-
var subject_1 = this.getSubject();
|
|
4748
|
-
connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () {
|
|
4749
|
-
_this._teardown();
|
|
4750
|
-
subject_1.complete();
|
|
4751
|
-
}, function (err) {
|
|
4752
|
-
_this._teardown();
|
|
4753
|
-
subject_1.error(err);
|
|
4754
|
-
}, function () { return _this._teardown(); })));
|
|
4755
|
-
if (connection.closed) {
|
|
4756
|
-
this._connection = null;
|
|
4757
|
-
connection = Subscription.EMPTY;
|
|
4758
|
-
}
|
|
4759
|
-
}
|
|
4760
|
-
return connection;
|
|
4761
|
-
};
|
|
4762
|
-
ConnectableObservable.prototype.refCount = function () {
|
|
4763
|
-
return refCount()(this);
|
|
4764
|
-
};
|
|
4765
|
-
return ConnectableObservable;
|
|
4766
|
-
})(Observable));
|
|
4767
|
-
|
|
4768
|
-
var performanceTimestampProvider = {
|
|
4769
|
-
now: function () {
|
|
4770
|
-
return (performanceTimestampProvider.delegate || performance).now();
|
|
4771
|
-
},
|
|
4772
|
-
delegate: undefined,
|
|
4773
|
-
};
|
|
4774
|
-
|
|
4775
|
-
var animationFrameProvider = {
|
|
4776
|
-
schedule: function (callback) {
|
|
4777
|
-
var request = requestAnimationFrame;
|
|
4778
|
-
var cancel = cancelAnimationFrame;
|
|
4779
|
-
var handle = request(function (timestamp) {
|
|
4780
|
-
cancel = undefined;
|
|
4781
|
-
callback(timestamp);
|
|
4782
|
-
});
|
|
4783
|
-
return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); });
|
|
4784
|
-
},
|
|
4785
|
-
requestAnimationFrame: function () {
|
|
4786
|
-
var args = [];
|
|
4787
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4788
|
-
args[_i] = arguments[_i];
|
|
4789
|
-
}
|
|
4790
|
-
var delegate = animationFrameProvider.delegate;
|
|
4791
|
-
return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args)));
|
|
4792
|
-
},
|
|
4793
|
-
cancelAnimationFrame: function () {
|
|
4794
|
-
var args = [];
|
|
4795
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4796
|
-
args[_i] = arguments[_i];
|
|
4797
|
-
}
|
|
4798
|
-
return (cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args)));
|
|
4799
|
-
},
|
|
4800
|
-
delegate: undefined,
|
|
4801
|
-
};
|
|
4802
|
-
|
|
4803
|
-
function animationFramesFactory(timestampProvider) {
|
|
4804
|
-
var schedule = animationFrameProvider.schedule;
|
|
4805
|
-
return new Observable(function (subscriber) {
|
|
4806
|
-
var subscription = new Subscription();
|
|
4807
|
-
var provider = timestampProvider || performanceTimestampProvider;
|
|
4808
|
-
var start = provider.now();
|
|
4809
|
-
var run = function (timestamp) {
|
|
4810
|
-
var now = provider.now();
|
|
4811
|
-
subscriber.next({
|
|
4812
|
-
timestamp: timestampProvider ? now : timestamp,
|
|
4813
|
-
elapsed: now - start,
|
|
4814
|
-
});
|
|
4815
|
-
if (!subscriber.closed) {
|
|
4816
|
-
subscription.add(schedule(run));
|
|
4817
|
-
}
|
|
4818
|
-
};
|
|
4819
|
-
subscription.add(schedule(run));
|
|
4820
|
-
return subscription;
|
|
4821
|
-
});
|
|
4822
|
-
}
|
|
4823
|
-
animationFramesFactory();
|
|
4824
|
-
|
|
4825
|
-
var ObjectUnsubscribedError = createErrorClass(function (_super) {
|
|
4826
|
-
return function ObjectUnsubscribedErrorImpl() {
|
|
4827
|
-
_super(this);
|
|
4828
|
-
this.name = 'ObjectUnsubscribedError';
|
|
4829
|
-
this.message = 'object unsubscribed';
|
|
4830
|
-
};
|
|
4831
|
-
});
|
|
4832
|
-
|
|
4833
|
-
var Subject = (function (_super) {
|
|
4834
|
-
__extends(Subject, _super);
|
|
4835
|
-
function Subject() {
|
|
4836
|
-
var _this = _super.call(this) || this;
|
|
4837
|
-
_this.closed = false;
|
|
4838
|
-
_this.currentObservers = null;
|
|
4839
|
-
_this.observers = [];
|
|
4840
|
-
_this.isStopped = false;
|
|
4841
|
-
_this.hasError = false;
|
|
4842
|
-
_this.thrownError = null;
|
|
4843
|
-
return _this;
|
|
4844
|
-
}
|
|
4845
|
-
Subject.prototype.lift = function (operator) {
|
|
4846
|
-
var subject = new AnonymousSubject(this, this);
|
|
4847
|
-
subject.operator = operator;
|
|
4848
|
-
return subject;
|
|
4849
|
-
};
|
|
4850
|
-
Subject.prototype._throwIfClosed = function () {
|
|
4851
|
-
if (this.closed) {
|
|
4852
|
-
throw new ObjectUnsubscribedError();
|
|
4853
|
-
}
|
|
4854
|
-
};
|
|
4855
|
-
Subject.prototype.next = function (value) {
|
|
4856
|
-
var _this = this;
|
|
4857
|
-
errorContext(function () {
|
|
4858
|
-
var e_1, _a;
|
|
4859
|
-
_this._throwIfClosed();
|
|
4860
|
-
if (!_this.isStopped) {
|
|
4861
|
-
if (!_this.currentObservers) {
|
|
4862
|
-
_this.currentObservers = Array.from(_this.observers);
|
|
4863
|
-
}
|
|
4864
|
-
try {
|
|
4865
|
-
for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4866
|
-
var observer = _c.value;
|
|
4867
|
-
observer.next(value);
|
|
4868
|
-
}
|
|
4869
|
-
}
|
|
4870
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4871
|
-
finally {
|
|
4872
|
-
try {
|
|
4873
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4874
|
-
}
|
|
4875
|
-
finally { if (e_1) throw e_1.error; }
|
|
4876
|
-
}
|
|
4877
|
-
}
|
|
4878
|
-
});
|
|
4879
|
-
};
|
|
4880
|
-
Subject.prototype.error = function (err) {
|
|
4881
|
-
var _this = this;
|
|
4882
|
-
errorContext(function () {
|
|
4883
|
-
_this._throwIfClosed();
|
|
4884
|
-
if (!_this.isStopped) {
|
|
4885
|
-
_this.hasError = _this.isStopped = true;
|
|
4886
|
-
_this.thrownError = err;
|
|
4887
|
-
var observers = _this.observers;
|
|
4888
|
-
while (observers.length) {
|
|
4889
|
-
observers.shift().error(err);
|
|
4890
|
-
}
|
|
4891
|
-
}
|
|
4892
|
-
});
|
|
4893
|
-
};
|
|
4894
|
-
Subject.prototype.complete = function () {
|
|
4895
|
-
var _this = this;
|
|
4896
|
-
errorContext(function () {
|
|
4897
|
-
_this._throwIfClosed();
|
|
4898
|
-
if (!_this.isStopped) {
|
|
4899
|
-
_this.isStopped = true;
|
|
4900
|
-
var observers = _this.observers;
|
|
4901
|
-
while (observers.length) {
|
|
4902
|
-
observers.shift().complete();
|
|
4903
|
-
}
|
|
4904
|
-
}
|
|
4905
|
-
});
|
|
4906
|
-
};
|
|
4907
|
-
Subject.prototype.unsubscribe = function () {
|
|
4908
|
-
this.isStopped = this.closed = true;
|
|
4909
|
-
this.observers = this.currentObservers = null;
|
|
4910
|
-
};
|
|
4911
|
-
Object.defineProperty(Subject.prototype, "observed", {
|
|
4912
|
-
get: function () {
|
|
4913
|
-
var _a;
|
|
4914
|
-
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
4915
|
-
},
|
|
4916
|
-
enumerable: false,
|
|
4917
|
-
configurable: true
|
|
4918
|
-
});
|
|
4919
|
-
Subject.prototype._trySubscribe = function (subscriber) {
|
|
4920
|
-
this._throwIfClosed();
|
|
4921
|
-
return _super.prototype._trySubscribe.call(this, subscriber);
|
|
4922
|
-
};
|
|
4923
|
-
Subject.prototype._subscribe = function (subscriber) {
|
|
4924
|
-
this._throwIfClosed();
|
|
4925
|
-
this._checkFinalizedStatuses(subscriber);
|
|
4926
|
-
return this._innerSubscribe(subscriber);
|
|
4927
|
-
};
|
|
4928
|
-
Subject.prototype._innerSubscribe = function (subscriber) {
|
|
4929
|
-
var _this = this;
|
|
4930
|
-
var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
|
|
4931
|
-
if (hasError || isStopped) {
|
|
4932
|
-
return EMPTY_SUBSCRIPTION;
|
|
4933
|
-
}
|
|
4934
|
-
this.currentObservers = null;
|
|
4935
|
-
observers.push(subscriber);
|
|
4936
|
-
return new Subscription(function () {
|
|
4937
|
-
_this.currentObservers = null;
|
|
4938
|
-
arrRemove(observers, subscriber);
|
|
4939
|
-
});
|
|
4940
|
-
};
|
|
4941
|
-
Subject.prototype._checkFinalizedStatuses = function (subscriber) {
|
|
4942
|
-
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
|
|
4943
|
-
if (hasError) {
|
|
4944
|
-
subscriber.error(thrownError);
|
|
4945
|
-
}
|
|
4946
|
-
else if (isStopped) {
|
|
4947
|
-
subscriber.complete();
|
|
4948
|
-
}
|
|
4949
|
-
};
|
|
4950
|
-
Subject.prototype.asObservable = function () {
|
|
4951
|
-
var observable = new Observable();
|
|
4952
|
-
observable.source = this;
|
|
4953
|
-
return observable;
|
|
4954
|
-
};
|
|
4955
|
-
Subject.create = function (destination, source) {
|
|
4956
|
-
return new AnonymousSubject(destination, source);
|
|
4957
|
-
};
|
|
4958
|
-
return Subject;
|
|
4959
|
-
}(Observable));
|
|
4960
|
-
var AnonymousSubject = (function (_super) {
|
|
4961
|
-
__extends(AnonymousSubject, _super);
|
|
4962
|
-
function AnonymousSubject(destination, source) {
|
|
4963
|
-
var _this = _super.call(this) || this;
|
|
4964
|
-
_this.destination = destination;
|
|
4965
|
-
_this.source = source;
|
|
4966
|
-
return _this;
|
|
4967
|
-
}
|
|
4968
|
-
AnonymousSubject.prototype.next = function (value) {
|
|
4969
|
-
var _a, _b;
|
|
4970
|
-
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
4971
|
-
};
|
|
4972
|
-
AnonymousSubject.prototype.error = function (err) {
|
|
4973
|
-
var _a, _b;
|
|
4974
|
-
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
|
|
4975
|
-
};
|
|
4976
|
-
AnonymousSubject.prototype.complete = function () {
|
|
4977
|
-
var _a, _b;
|
|
4978
|
-
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
4979
|
-
};
|
|
4980
|
-
AnonymousSubject.prototype._subscribe = function (subscriber) {
|
|
4981
|
-
var _a, _b;
|
|
4982
|
-
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
|
|
4983
|
-
};
|
|
4984
|
-
return AnonymousSubject;
|
|
4985
|
-
}(Subject));
|
|
4986
|
-
|
|
4987
|
-
((function (_super) {
|
|
4988
|
-
__extends(BehaviorSubject, _super);
|
|
4989
|
-
function BehaviorSubject(_value) {
|
|
4990
|
-
var _this = _super.call(this) || this;
|
|
4991
|
-
_this._value = _value;
|
|
4992
|
-
return _this;
|
|
4993
|
-
}
|
|
4994
|
-
Object.defineProperty(BehaviorSubject.prototype, "value", {
|
|
4995
|
-
get: function () {
|
|
4996
|
-
return this.getValue();
|
|
4997
|
-
},
|
|
4998
|
-
enumerable: false,
|
|
4999
|
-
configurable: true
|
|
5000
|
-
});
|
|
5001
|
-
BehaviorSubject.prototype._subscribe = function (subscriber) {
|
|
5002
|
-
var subscription = _super.prototype._subscribe.call(this, subscriber);
|
|
5003
|
-
!subscription.closed && subscriber.next(this._value);
|
|
5004
|
-
return subscription;
|
|
5005
|
-
};
|
|
5006
|
-
BehaviorSubject.prototype.getValue = function () {
|
|
5007
|
-
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;
|
|
5008
|
-
if (hasError) {
|
|
5009
|
-
throw thrownError;
|
|
5010
|
-
}
|
|
5011
|
-
this._throwIfClosed();
|
|
5012
|
-
return _value;
|
|
5013
|
-
};
|
|
5014
|
-
BehaviorSubject.prototype.next = function (value) {
|
|
5015
|
-
_super.prototype.next.call(this, (this._value = value));
|
|
5016
|
-
};
|
|
5017
|
-
return BehaviorSubject;
|
|
5018
|
-
})(Subject));
|
|
5019
|
-
|
|
5020
|
-
var dateTimestampProvider = {
|
|
5021
|
-
now: function () {
|
|
5022
|
-
return (dateTimestampProvider.delegate || Date).now();
|
|
5023
|
-
},
|
|
5024
|
-
delegate: undefined,
|
|
5025
|
-
};
|
|
5026
|
-
|
|
5027
|
-
((function (_super) {
|
|
5028
|
-
__extends(ReplaySubject, _super);
|
|
5029
|
-
function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {
|
|
5030
|
-
if (_bufferSize === void 0) { _bufferSize = Infinity; }
|
|
5031
|
-
if (_windowTime === void 0) { _windowTime = Infinity; }
|
|
5032
|
-
if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }
|
|
5033
|
-
var _this = _super.call(this) || this;
|
|
5034
|
-
_this._bufferSize = _bufferSize;
|
|
5035
|
-
_this._windowTime = _windowTime;
|
|
5036
|
-
_this._timestampProvider = _timestampProvider;
|
|
5037
|
-
_this._buffer = [];
|
|
5038
|
-
_this._infiniteTimeWindow = true;
|
|
5039
|
-
_this._infiniteTimeWindow = _windowTime === Infinity;
|
|
5040
|
-
_this._bufferSize = Math.max(1, _bufferSize);
|
|
5041
|
-
_this._windowTime = Math.max(1, _windowTime);
|
|
5042
|
-
return _this;
|
|
5043
|
-
}
|
|
5044
|
-
ReplaySubject.prototype.next = function (value) {
|
|
5045
|
-
var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
|
|
5046
|
-
if (!isStopped) {
|
|
5047
|
-
_buffer.push(value);
|
|
5048
|
-
!_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
|
|
5049
|
-
}
|
|
5050
|
-
this._trimBuffer();
|
|
5051
|
-
_super.prototype.next.call(this, value);
|
|
5052
|
-
};
|
|
5053
|
-
ReplaySubject.prototype._subscribe = function (subscriber) {
|
|
5054
|
-
this._throwIfClosed();
|
|
5055
|
-
this._trimBuffer();
|
|
5056
|
-
var subscription = this._innerSubscribe(subscriber);
|
|
5057
|
-
var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;
|
|
5058
|
-
var copy = _buffer.slice();
|
|
5059
|
-
for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
|
|
5060
|
-
subscriber.next(copy[i]);
|
|
5061
|
-
}
|
|
5062
|
-
this._checkFinalizedStatuses(subscriber);
|
|
5063
|
-
return subscription;
|
|
5064
|
-
};
|
|
5065
|
-
ReplaySubject.prototype._trimBuffer = function () {
|
|
5066
|
-
var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;
|
|
5067
|
-
var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
|
|
5068
|
-
_bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
|
|
5069
|
-
if (!_infiniteTimeWindow) {
|
|
5070
|
-
var now = _timestampProvider.now();
|
|
5071
|
-
var last = 0;
|
|
5072
|
-
for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
|
|
5073
|
-
last = i;
|
|
5074
|
-
}
|
|
5075
|
-
last && _buffer.splice(0, last + 1);
|
|
5076
|
-
}
|
|
5077
|
-
};
|
|
5078
|
-
return ReplaySubject;
|
|
5079
|
-
})(Subject));
|
|
5080
|
-
|
|
5081
|
-
((function (_super) {
|
|
5082
|
-
__extends(AsyncSubject, _super);
|
|
5083
|
-
function AsyncSubject() {
|
|
5084
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
5085
|
-
_this._value = null;
|
|
5086
|
-
_this._hasValue = false;
|
|
5087
|
-
_this._isComplete = false;
|
|
5088
|
-
return _this;
|
|
5089
|
-
}
|
|
5090
|
-
AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {
|
|
5091
|
-
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;
|
|
5092
|
-
if (hasError) {
|
|
5093
|
-
subscriber.error(thrownError);
|
|
5094
|
-
}
|
|
5095
|
-
else if (isStopped || _isComplete) {
|
|
5096
|
-
_hasValue && subscriber.next(_value);
|
|
5097
|
-
subscriber.complete();
|
|
5098
|
-
}
|
|
5099
|
-
};
|
|
5100
|
-
AsyncSubject.prototype.next = function (value) {
|
|
5101
|
-
if (!this.isStopped) {
|
|
5102
|
-
this._value = value;
|
|
5103
|
-
this._hasValue = true;
|
|
5104
|
-
}
|
|
5105
|
-
};
|
|
5106
|
-
AsyncSubject.prototype.complete = function () {
|
|
5107
|
-
var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete;
|
|
5108
|
-
if (!_isComplete) {
|
|
5109
|
-
this._isComplete = true;
|
|
5110
|
-
_hasValue && _super.prototype.next.call(this, _value);
|
|
5111
|
-
_super.prototype.complete.call(this);
|
|
5112
|
-
}
|
|
5113
|
-
};
|
|
5114
|
-
return AsyncSubject;
|
|
5115
|
-
})(Subject));
|
|
5116
|
-
|
|
5117
|
-
var Action = (function (_super) {
|
|
5118
|
-
__extends(Action, _super);
|
|
5119
|
-
function Action(scheduler, work) {
|
|
5120
|
-
return _super.call(this) || this;
|
|
5121
|
-
}
|
|
5122
|
-
Action.prototype.schedule = function (state, delay) {
|
|
5123
|
-
return this;
|
|
5124
|
-
};
|
|
5125
|
-
return Action;
|
|
5126
|
-
}(Subscription));
|
|
5127
|
-
|
|
5128
|
-
var intervalProvider = {
|
|
5129
|
-
setInterval: function (handler, timeout) {
|
|
5130
|
-
var args = [];
|
|
5131
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
5132
|
-
args[_i - 2] = arguments[_i];
|
|
5133
|
-
}
|
|
5134
|
-
return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));
|
|
5135
|
-
},
|
|
5136
|
-
clearInterval: function (handle) {
|
|
5137
|
-
return (clearInterval)(handle);
|
|
5138
|
-
},
|
|
5139
|
-
delegate: undefined,
|
|
5140
|
-
};
|
|
5141
|
-
|
|
5142
|
-
var AsyncAction = (function (_super) {
|
|
5143
|
-
__extends(AsyncAction, _super);
|
|
5144
|
-
function AsyncAction(scheduler, work) {
|
|
5145
|
-
var _this = _super.call(this, scheduler, work) || this;
|
|
5146
|
-
_this.scheduler = scheduler;
|
|
5147
|
-
_this.work = work;
|
|
5148
|
-
_this.pending = false;
|
|
5149
|
-
return _this;
|
|
5150
|
-
}
|
|
5151
|
-
AsyncAction.prototype.schedule = function (state, delay) {
|
|
5152
|
-
if (delay === void 0) { delay = 0; }
|
|
5153
|
-
if (this.closed) {
|
|
5154
|
-
return this;
|
|
5155
|
-
}
|
|
5156
|
-
this.state = state;
|
|
5157
|
-
var id = this.id;
|
|
5158
|
-
var scheduler = this.scheduler;
|
|
5159
|
-
if (id != null) {
|
|
5160
|
-
this.id = this.recycleAsyncId(scheduler, id, delay);
|
|
5161
|
-
}
|
|
5162
|
-
this.pending = true;
|
|
5163
|
-
this.delay = delay;
|
|
5164
|
-
this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
|
|
5165
|
-
return this;
|
|
5166
|
-
};
|
|
5167
|
-
AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) {
|
|
5168
|
-
if (delay === void 0) { delay = 0; }
|
|
5169
|
-
return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);
|
|
5170
|
-
};
|
|
5171
|
-
AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) {
|
|
5172
|
-
if (delay === void 0) { delay = 0; }
|
|
5173
|
-
if (delay != null && this.delay === delay && this.pending === false) {
|
|
5174
|
-
return id;
|
|
5175
|
-
}
|
|
5176
|
-
intervalProvider.clearInterval(id);
|
|
5177
|
-
return undefined;
|
|
5178
|
-
};
|
|
5179
|
-
AsyncAction.prototype.execute = function (state, delay) {
|
|
5180
|
-
if (this.closed) {
|
|
5181
|
-
return new Error('executing a cancelled action');
|
|
5182
|
-
}
|
|
5183
|
-
this.pending = false;
|
|
5184
|
-
var error = this._execute(state, delay);
|
|
5185
|
-
if (error) {
|
|
5186
|
-
return error;
|
|
5187
|
-
}
|
|
5188
|
-
else if (this.pending === false && this.id != null) {
|
|
5189
|
-
this.id = this.recycleAsyncId(this.scheduler, this.id, null);
|
|
5190
|
-
}
|
|
5191
|
-
};
|
|
5192
|
-
AsyncAction.prototype._execute = function (state, _delay) {
|
|
5193
|
-
var errored = false;
|
|
5194
|
-
var errorValue;
|
|
5195
|
-
try {
|
|
5196
|
-
this.work(state);
|
|
5197
|
-
}
|
|
5198
|
-
catch (e) {
|
|
5199
|
-
errored = true;
|
|
5200
|
-
errorValue = e ? e : new Error('Scheduled action threw falsy error');
|
|
5201
|
-
}
|
|
5202
|
-
if (errored) {
|
|
5203
|
-
this.unsubscribe();
|
|
5204
|
-
return errorValue;
|
|
5205
|
-
}
|
|
5206
|
-
};
|
|
5207
|
-
AsyncAction.prototype.unsubscribe = function () {
|
|
5208
|
-
if (!this.closed) {
|
|
5209
|
-
var _a = this, id = _a.id, scheduler = _a.scheduler;
|
|
5210
|
-
var actions = scheduler.actions;
|
|
5211
|
-
this.work = this.state = this.scheduler = null;
|
|
5212
|
-
this.pending = false;
|
|
5213
|
-
arrRemove(actions, this);
|
|
5214
|
-
if (id != null) {
|
|
5215
|
-
this.id = this.recycleAsyncId(scheduler, id, null);
|
|
5216
|
-
}
|
|
5217
|
-
this.delay = null;
|
|
5218
|
-
_super.prototype.unsubscribe.call(this);
|
|
5219
|
-
}
|
|
5220
|
-
};
|
|
5221
|
-
return AsyncAction;
|
|
5222
|
-
}(Action));
|
|
5223
|
-
|
|
5224
|
-
var nextHandle = 1;
|
|
5225
|
-
var resolved;
|
|
5226
|
-
var activeHandles = {};
|
|
5227
|
-
function findAndClearHandle(handle) {
|
|
5228
|
-
if (handle in activeHandles) {
|
|
5229
|
-
delete activeHandles[handle];
|
|
5230
|
-
return true;
|
|
5231
|
-
}
|
|
5232
|
-
return false;
|
|
5233
|
-
}
|
|
5234
|
-
var Immediate = {
|
|
5235
|
-
setImmediate: function (cb) {
|
|
5236
|
-
var handle = nextHandle++;
|
|
5237
|
-
activeHandles[handle] = true;
|
|
5238
|
-
if (!resolved) {
|
|
5239
|
-
resolved = Promise.resolve();
|
|
5240
|
-
}
|
|
5241
|
-
resolved.then(function () { return findAndClearHandle(handle) && cb(); });
|
|
5242
|
-
return handle;
|
|
5243
|
-
},
|
|
5244
|
-
clearImmediate: function (handle) {
|
|
5245
|
-
findAndClearHandle(handle);
|
|
5246
|
-
},
|
|
5247
|
-
};
|
|
5248
|
-
|
|
5249
|
-
var setImmediate = Immediate.setImmediate, clearImmediate$1 = Immediate.clearImmediate;
|
|
5250
|
-
var immediateProvider = {
|
|
5251
|
-
setImmediate: function () {
|
|
5252
|
-
var args = [];
|
|
5253
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5254
|
-
args[_i] = arguments[_i];
|
|
5255
|
-
}
|
|
5256
|
-
var delegate = immediateProvider.delegate;
|
|
5257
|
-
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));
|
|
5258
|
-
},
|
|
5259
|
-
clearImmediate: function (handle) {
|
|
5260
|
-
return (clearImmediate$1)(handle);
|
|
5261
|
-
},
|
|
5262
|
-
delegate: undefined,
|
|
5263
|
-
};
|
|
5264
|
-
|
|
5265
|
-
var AsapAction = (function (_super) {
|
|
5266
|
-
__extends(AsapAction, _super);
|
|
5267
|
-
function AsapAction(scheduler, work) {
|
|
5268
|
-
var _this = _super.call(this, scheduler, work) || this;
|
|
5269
|
-
_this.scheduler = scheduler;
|
|
5270
|
-
_this.work = work;
|
|
5271
|
-
return _this;
|
|
5272
|
-
}
|
|
5273
|
-
AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
|
|
5274
|
-
if (delay === void 0) { delay = 0; }
|
|
5275
|
-
if (delay !== null && delay > 0) {
|
|
5276
|
-
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
|
|
5277
|
-
}
|
|
5278
|
-
scheduler.actions.push(this);
|
|
5279
|
-
return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));
|
|
5280
|
-
};
|
|
5281
|
-
AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
|
|
5282
|
-
if (delay === void 0) { delay = 0; }
|
|
5283
|
-
if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {
|
|
5284
|
-
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
|
|
5285
|
-
}
|
|
5286
|
-
if (!scheduler.actions.some(function (action) { return action.id === id; })) {
|
|
5287
|
-
immediateProvider.clearImmediate(id);
|
|
5288
|
-
scheduler._scheduled = undefined;
|
|
5289
|
-
}
|
|
5290
|
-
return undefined;
|
|
5291
|
-
};
|
|
5292
|
-
return AsapAction;
|
|
5293
|
-
}(AsyncAction));
|
|
5294
|
-
|
|
5295
|
-
var Scheduler = (function () {
|
|
5296
|
-
function Scheduler(schedulerActionCtor, now) {
|
|
5297
|
-
if (now === void 0) { now = Scheduler.now; }
|
|
5298
|
-
this.schedulerActionCtor = schedulerActionCtor;
|
|
5299
|
-
this.now = now;
|
|
5300
|
-
}
|
|
5301
|
-
Scheduler.prototype.schedule = function (work, delay, state) {
|
|
5302
|
-
if (delay === void 0) { delay = 0; }
|
|
5303
|
-
return new this.schedulerActionCtor(this, work).schedule(state, delay);
|
|
5304
|
-
};
|
|
5305
|
-
Scheduler.now = dateTimestampProvider.now;
|
|
5306
|
-
return Scheduler;
|
|
5307
|
-
}());
|
|
5308
|
-
|
|
5309
|
-
var AsyncScheduler = (function (_super) {
|
|
5310
|
-
__extends(AsyncScheduler, _super);
|
|
5311
|
-
function AsyncScheduler(SchedulerAction, now) {
|
|
5312
|
-
if (now === void 0) { now = Scheduler.now; }
|
|
5313
|
-
var _this = _super.call(this, SchedulerAction, now) || this;
|
|
5314
|
-
_this.actions = [];
|
|
5315
|
-
_this._active = false;
|
|
5316
|
-
_this._scheduled = undefined;
|
|
5317
|
-
return _this;
|
|
5318
|
-
}
|
|
5319
|
-
AsyncScheduler.prototype.flush = function (action) {
|
|
5320
|
-
var actions = this.actions;
|
|
5321
|
-
if (this._active) {
|
|
5322
|
-
actions.push(action);
|
|
5323
|
-
return;
|
|
5324
|
-
}
|
|
5325
|
-
var error;
|
|
5326
|
-
this._active = true;
|
|
5327
|
-
do {
|
|
5328
|
-
if ((error = action.execute(action.state, action.delay))) {
|
|
5329
|
-
break;
|
|
5330
|
-
}
|
|
5331
|
-
} while ((action = actions.shift()));
|
|
5332
|
-
this._active = false;
|
|
5333
|
-
if (error) {
|
|
5334
|
-
while ((action = actions.shift())) {
|
|
5335
|
-
action.unsubscribe();
|
|
5336
|
-
}
|
|
5337
|
-
throw error;
|
|
5338
|
-
}
|
|
5339
|
-
};
|
|
5340
|
-
return AsyncScheduler;
|
|
5341
|
-
}(Scheduler));
|
|
5342
|
-
|
|
5343
|
-
var AsapScheduler = (function (_super) {
|
|
5344
|
-
__extends(AsapScheduler, _super);
|
|
5345
|
-
function AsapScheduler() {
|
|
5346
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5347
|
-
}
|
|
5348
|
-
AsapScheduler.prototype.flush = function (action) {
|
|
5349
|
-
this._active = true;
|
|
5350
|
-
var flushId = this._scheduled;
|
|
5351
|
-
this._scheduled = undefined;
|
|
5352
|
-
var actions = this.actions;
|
|
5353
|
-
var error;
|
|
5354
|
-
action = action || actions.shift();
|
|
5355
|
-
do {
|
|
5356
|
-
if ((error = action.execute(action.state, action.delay))) {
|
|
5357
|
-
break;
|
|
5358
|
-
}
|
|
5359
|
-
} while ((action = actions[0]) && action.id === flushId && actions.shift());
|
|
5360
|
-
this._active = false;
|
|
5361
|
-
if (error) {
|
|
5362
|
-
while ((action = actions[0]) && action.id === flushId && actions.shift()) {
|
|
5363
|
-
action.unsubscribe();
|
|
5364
|
-
}
|
|
5365
|
-
throw error;
|
|
5366
|
-
}
|
|
5367
|
-
};
|
|
5368
|
-
return AsapScheduler;
|
|
5369
|
-
}(AsyncScheduler));
|
|
5370
|
-
|
|
5371
|
-
new AsapScheduler(AsapAction);
|
|
5372
|
-
|
|
5373
|
-
new AsyncScheduler(AsyncAction);
|
|
5374
|
-
|
|
5375
|
-
var QueueAction = (function (_super) {
|
|
5376
|
-
__extends(QueueAction, _super);
|
|
5377
|
-
function QueueAction(scheduler, work) {
|
|
5378
|
-
var _this = _super.call(this, scheduler, work) || this;
|
|
5379
|
-
_this.scheduler = scheduler;
|
|
5380
|
-
_this.work = work;
|
|
5381
|
-
return _this;
|
|
5382
|
-
}
|
|
5383
|
-
QueueAction.prototype.schedule = function (state, delay) {
|
|
5384
|
-
if (delay === void 0) { delay = 0; }
|
|
5385
|
-
if (delay > 0) {
|
|
5386
|
-
return _super.prototype.schedule.call(this, state, delay);
|
|
5387
|
-
}
|
|
5388
|
-
this.delay = delay;
|
|
5389
|
-
this.state = state;
|
|
5390
|
-
this.scheduler.flush(this);
|
|
5391
|
-
return this;
|
|
5392
|
-
};
|
|
5393
|
-
QueueAction.prototype.execute = function (state, delay) {
|
|
5394
|
-
return (delay > 0 || this.closed) ?
|
|
5395
|
-
_super.prototype.execute.call(this, state, delay) :
|
|
5396
|
-
this._execute(state, delay);
|
|
5397
|
-
};
|
|
5398
|
-
QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
|
|
5399
|
-
if (delay === void 0) { delay = 0; }
|
|
5400
|
-
if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {
|
|
5401
|
-
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
|
|
5402
|
-
}
|
|
5403
|
-
return scheduler.flush(this);
|
|
5404
|
-
};
|
|
5405
|
-
return QueueAction;
|
|
5406
|
-
}(AsyncAction));
|
|
5407
|
-
|
|
5408
|
-
var QueueScheduler = (function (_super) {
|
|
5409
|
-
__extends(QueueScheduler, _super);
|
|
5410
|
-
function QueueScheduler() {
|
|
5411
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5412
|
-
}
|
|
5413
|
-
return QueueScheduler;
|
|
5414
|
-
}(AsyncScheduler));
|
|
5415
|
-
|
|
5416
|
-
new QueueScheduler(QueueAction);
|
|
5417
|
-
|
|
5418
|
-
var AnimationFrameAction = (function (_super) {
|
|
5419
|
-
__extends(AnimationFrameAction, _super);
|
|
5420
|
-
function AnimationFrameAction(scheduler, work) {
|
|
5421
|
-
var _this = _super.call(this, scheduler, work) || this;
|
|
5422
|
-
_this.scheduler = scheduler;
|
|
5423
|
-
_this.work = work;
|
|
5424
|
-
return _this;
|
|
5425
|
-
}
|
|
5426
|
-
AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
|
|
5427
|
-
if (delay === void 0) { delay = 0; }
|
|
5428
|
-
if (delay !== null && delay > 0) {
|
|
5429
|
-
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
|
|
5430
|
-
}
|
|
5431
|
-
scheduler.actions.push(this);
|
|
5432
|
-
return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); }));
|
|
5433
|
-
};
|
|
5434
|
-
AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
|
|
5435
|
-
if (delay === void 0) { delay = 0; }
|
|
5436
|
-
if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {
|
|
5437
|
-
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
|
|
5438
|
-
}
|
|
5439
|
-
if (!scheduler.actions.some(function (action) { return action.id === id; })) {
|
|
5440
|
-
animationFrameProvider.cancelAnimationFrame(id);
|
|
5441
|
-
scheduler._scheduled = undefined;
|
|
5442
|
-
}
|
|
5443
|
-
return undefined;
|
|
5444
|
-
};
|
|
5445
|
-
return AnimationFrameAction;
|
|
5446
|
-
}(AsyncAction));
|
|
5447
|
-
|
|
5448
|
-
var AnimationFrameScheduler = (function (_super) {
|
|
5449
|
-
__extends(AnimationFrameScheduler, _super);
|
|
5450
|
-
function AnimationFrameScheduler() {
|
|
5451
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5452
|
-
}
|
|
5453
|
-
AnimationFrameScheduler.prototype.flush = function (action) {
|
|
5454
|
-
this._active = true;
|
|
5455
|
-
var flushId = this._scheduled;
|
|
5456
|
-
this._scheduled = undefined;
|
|
5457
|
-
var actions = this.actions;
|
|
5458
|
-
var error;
|
|
5459
|
-
action = action || actions.shift();
|
|
5460
|
-
do {
|
|
5461
|
-
if ((error = action.execute(action.state, action.delay))) {
|
|
5462
|
-
break;
|
|
5463
|
-
}
|
|
5464
|
-
} while ((action = actions[0]) && action.id === flushId && actions.shift());
|
|
5465
|
-
this._active = false;
|
|
5466
|
-
if (error) {
|
|
5467
|
-
while ((action = actions[0]) && action.id === flushId && actions.shift()) {
|
|
5468
|
-
action.unsubscribe();
|
|
5469
|
-
}
|
|
5470
|
-
throw error;
|
|
5471
|
-
}
|
|
5472
|
-
};
|
|
5473
|
-
return AnimationFrameScheduler;
|
|
5474
|
-
}(AsyncScheduler));
|
|
5475
|
-
|
|
5476
|
-
new AnimationFrameScheduler(AnimationFrameAction);
|
|
5477
|
-
|
|
5478
|
-
((function (_super) {
|
|
5479
|
-
__extends(VirtualTimeScheduler, _super);
|
|
5480
|
-
function VirtualTimeScheduler(schedulerActionCtor, maxFrames) {
|
|
5481
|
-
if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; }
|
|
5482
|
-
if (maxFrames === void 0) { maxFrames = Infinity; }
|
|
5483
|
-
var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this;
|
|
5484
|
-
_this.maxFrames = maxFrames;
|
|
5485
|
-
_this.frame = 0;
|
|
5486
|
-
_this.index = -1;
|
|
5487
|
-
return _this;
|
|
5488
|
-
}
|
|
5489
|
-
VirtualTimeScheduler.prototype.flush = function () {
|
|
5490
|
-
var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
|
|
5491
|
-
var error;
|
|
5492
|
-
var action;
|
|
5493
|
-
while ((action = actions[0]) && action.delay <= maxFrames) {
|
|
5494
|
-
actions.shift();
|
|
5495
|
-
this.frame = action.delay;
|
|
5496
|
-
if ((error = action.execute(action.state, action.delay))) {
|
|
5497
|
-
break;
|
|
5498
|
-
}
|
|
5499
|
-
}
|
|
5500
|
-
if (error) {
|
|
5501
|
-
while ((action = actions.shift())) {
|
|
5502
|
-
action.unsubscribe();
|
|
5503
|
-
}
|
|
5504
|
-
throw error;
|
|
5505
|
-
}
|
|
5506
|
-
};
|
|
5507
|
-
VirtualTimeScheduler.frameTimeFactor = 10;
|
|
5508
|
-
return VirtualTimeScheduler;
|
|
5509
|
-
})(AsyncScheduler));
|
|
5510
|
-
var VirtualAction = (function (_super) {
|
|
5511
|
-
__extends(VirtualAction, _super);
|
|
5512
|
-
function VirtualAction(scheduler, work, index) {
|
|
5513
|
-
if (index === void 0) { index = (scheduler.index += 1); }
|
|
5514
|
-
var _this = _super.call(this, scheduler, work) || this;
|
|
5515
|
-
_this.scheduler = scheduler;
|
|
5516
|
-
_this.work = work;
|
|
5517
|
-
_this.index = index;
|
|
5518
|
-
_this.active = true;
|
|
5519
|
-
_this.index = scheduler.index = index;
|
|
5520
|
-
return _this;
|
|
5521
|
-
}
|
|
5522
|
-
VirtualAction.prototype.schedule = function (state, delay) {
|
|
5523
|
-
if (delay === void 0) { delay = 0; }
|
|
5524
|
-
if (Number.isFinite(delay)) {
|
|
5525
|
-
if (!this.id) {
|
|
5526
|
-
return _super.prototype.schedule.call(this, state, delay);
|
|
5527
|
-
}
|
|
5528
|
-
this.active = false;
|
|
5529
|
-
var action = new VirtualAction(this.scheduler, this.work);
|
|
5530
|
-
this.add(action);
|
|
5531
|
-
return action.schedule(state, delay);
|
|
5532
|
-
}
|
|
5533
|
-
else {
|
|
5534
|
-
return Subscription.EMPTY;
|
|
5535
|
-
}
|
|
5536
|
-
};
|
|
5537
|
-
VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
|
|
5538
|
-
if (delay === void 0) { delay = 0; }
|
|
5539
|
-
this.delay = scheduler.frame + delay;
|
|
5540
|
-
var actions = scheduler.actions;
|
|
5541
|
-
actions.push(this);
|
|
5542
|
-
actions.sort(VirtualAction.sortActions);
|
|
5543
|
-
return true;
|
|
5544
|
-
};
|
|
5545
|
-
VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
|
|
5546
|
-
return undefined;
|
|
5547
|
-
};
|
|
5548
|
-
VirtualAction.prototype._execute = function (state, delay) {
|
|
5549
|
-
if (this.active === true) {
|
|
5550
|
-
return _super.prototype._execute.call(this, state, delay);
|
|
5551
|
-
}
|
|
5552
|
-
};
|
|
5553
|
-
VirtualAction.sortActions = function (a, b) {
|
|
5554
|
-
if (a.delay === b.delay) {
|
|
5555
|
-
if (a.index === b.index) {
|
|
5556
|
-
return 0;
|
|
5557
|
-
}
|
|
5558
|
-
else if (a.index > b.index) {
|
|
5559
|
-
return 1;
|
|
5560
|
-
}
|
|
5561
|
-
else {
|
|
5562
|
-
return -1;
|
|
5563
|
-
}
|
|
5564
|
-
}
|
|
5565
|
-
else if (a.delay > b.delay) {
|
|
5566
|
-
return 1;
|
|
5567
|
-
}
|
|
5568
|
-
else {
|
|
5569
|
-
return -1;
|
|
5570
|
-
}
|
|
5571
|
-
};
|
|
5572
|
-
return VirtualAction;
|
|
5573
|
-
}(AsyncAction));
|
|
5574
|
-
|
|
5575
|
-
new Observable(function (subscriber) { return subscriber.complete(); });
|
|
5576
|
-
|
|
5577
|
-
var NotificationKind;
|
|
5578
|
-
(function (NotificationKind) {
|
|
5579
|
-
NotificationKind["NEXT"] = "N";
|
|
5580
|
-
NotificationKind["ERROR"] = "E";
|
|
5581
|
-
NotificationKind["COMPLETE"] = "C";
|
|
5582
|
-
})(NotificationKind || (NotificationKind = {}));
|
|
5583
|
-
|
|
5584
|
-
createErrorClass(function (_super) { return function EmptyErrorImpl() {
|
|
5585
|
-
_super(this);
|
|
5586
|
-
this.name = 'EmptyError';
|
|
5587
|
-
this.message = 'no elements in sequence';
|
|
5588
|
-
}; });
|
|
5589
|
-
|
|
5590
|
-
createErrorClass(function (_super) {
|
|
5591
|
-
return function ArgumentOutOfRangeErrorImpl() {
|
|
5592
|
-
_super(this);
|
|
5593
|
-
this.name = 'ArgumentOutOfRangeError';
|
|
5594
|
-
this.message = 'argument out of range';
|
|
5595
|
-
};
|
|
5596
|
-
});
|
|
5597
|
-
|
|
5598
|
-
createErrorClass(function (_super) {
|
|
5599
|
-
return function NotFoundErrorImpl(message) {
|
|
5600
|
-
_super(this);
|
|
5601
|
-
this.name = 'NotFoundError';
|
|
5602
|
-
this.message = message;
|
|
5603
|
-
};
|
|
5604
|
-
});
|
|
5605
|
-
|
|
5606
|
-
createErrorClass(function (_super) {
|
|
5607
|
-
return function SequenceErrorImpl(message) {
|
|
5608
|
-
_super(this);
|
|
5609
|
-
this.name = 'SequenceError';
|
|
5610
|
-
this.message = message;
|
|
5611
|
-
};
|
|
5612
|
-
});
|
|
5613
|
-
|
|
5614
|
-
createErrorClass(function (_super) {
|
|
5615
|
-
return function TimeoutErrorImpl(info) {
|
|
5616
|
-
if (info === void 0) { info = null; }
|
|
5617
|
-
_super(this);
|
|
5618
|
-
this.message = 'Timeout has occurred';
|
|
5619
|
-
this.name = 'TimeoutError';
|
|
5620
|
-
this.info = info;
|
|
5621
|
-
};
|
|
5622
|
-
});
|
|
5623
|
-
|
|
5624
|
-
new Observable(noop);
|
|
5625
|
-
|
|
5626
|
-
class ObservableFiniteStateMachine extends FiniteStateMachine {
|
|
5627
|
-
constructor() {
|
|
5628
|
-
super(...arguments);
|
|
5629
|
-
this.stateChanges = new Subject();
|
|
5630
|
-
}
|
|
5631
|
-
get [Symbol.toStringTag]() {
|
|
5632
|
-
return this.constructor.name;
|
|
5633
|
-
}
|
|
5634
|
-
observeStateChanges() {
|
|
5635
|
-
return this.stateChanges;
|
|
5636
|
-
}
|
|
5637
|
-
/**
|
|
5638
|
-
* @throws {BadEventError}
|
|
5639
|
-
*/
|
|
5640
|
-
send(event) {
|
|
5641
|
-
const oldState = this.state;
|
|
5642
|
-
super.send(event);
|
|
5643
|
-
const newState = this.state;
|
|
5644
|
-
this.stateChanges.next({ event, oldState, newState });
|
|
5645
|
-
if (es2018$7.isEmptyObject(this.schema[newState])) {
|
|
5646
|
-
this.stateChanges.complete();
|
|
5647
|
-
}
|
|
5648
|
-
}
|
|
5649
|
-
}
|
|
5650
|
-
|
|
5651
4025
|
class SparseSet {
|
|
5652
4026
|
constructor(array = []) {
|
|
5653
4027
|
this.indexToValue = [];
|
|
@@ -6298,6 +4672,7 @@ class BitSet {
|
|
|
6298
4672
|
if (added) {
|
|
6299
4673
|
this._size++;
|
|
6300
4674
|
}
|
|
4675
|
+
return added;
|
|
6301
4676
|
}
|
|
6302
4677
|
delete(value) {
|
|
6303
4678
|
var _a;
|
|
@@ -6397,6 +4772,7 @@ class TypedBitSet {
|
|
|
6397
4772
|
if (added) {
|
|
6398
4773
|
this._size++;
|
|
6399
4774
|
}
|
|
4775
|
+
return added;
|
|
6400
4776
|
}
|
|
6401
4777
|
delete(value) {
|
|
6402
4778
|
var _a;
|
|
@@ -6428,5 +4804,5 @@ class TypedBitSet {
|
|
|
6428
4804
|
}
|
|
6429
4805
|
}
|
|
6430
4806
|
|
|
6431
|
-
export {
|
|
4807
|
+
export { BitSet, Box, DynamicTypedArray, Emitter, ExpirableMap, HashMap, HashSet, LRUMap, Queue, SortedSet, SparseMap, SparseSet, TLRUMap, TrieMap, TypedBitSet, TypedSparseMap, TypedSparseSet, convertArrayToCons, convertConsToArray, sliceArrayLeft, sliceArrayRight, truncateArrayLeft, truncateArrayRight };
|
|
6432
4808
|
//# sourceMappingURL=index.mjs.map
|