user model added; message model changed; tag model added
This commit is contained in:
1 parent
d27216c8a8
commit
f6a8c83586
5156 files changed
+62
-437424
No files matched your search
-202
@@ -1,202 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
||||
export { ajax } from '../internal/observable/dom/ajax';
|
||||
export { AjaxResponse, AjaxError, AjaxTimeoutError } from '../internal/observable/dom/AjaxObservable';
|
||||
//# sourceMappingURL=index.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAe,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC"}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
||||
export { config } from '../internal/config';
|
||||
export { InnerSubscriber } from '../internal/InnerSubscriber';
|
||||
export { OuterSubscriber } from '../internal/OuterSubscriber';
|
||||
export { Scheduler } from '../internal/Scheduler';
|
||||
export { AnonymousSubject } from '../internal/Subject';
|
||||
export { SubjectSubscription } from '../internal/SubjectSubscription';
|
||||
export { Subscriber } from '../internal/Subscriber';
|
||||
export { fromPromise } from '../internal/observable/fromPromise';
|
||||
export { fromIterable } from '../internal/observable/fromIterable';
|
||||
export { ajax } from '../internal/observable/dom/ajax';
|
||||
export { webSocket } from '../internal/observable/dom/webSocket';
|
||||
export { ajaxGet, ajaxPost, ajaxDelete, ajaxPut, ajaxPatch, ajaxGetJSON, AjaxObservable, AjaxSubscriber, AjaxResponse, AjaxError, AjaxTimeoutError } from '../internal/observable/dom/AjaxObservable';
|
||||
export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject';
|
||||
export { CombineLatestOperator } from '../internal/observable/combineLatest';
|
||||
export { dispatch } from '../internal/observable/range';
|
||||
export { SubscribeOnObservable } from '../internal/observable/SubscribeOnObservable';
|
||||
export { Timestamp } from '../internal/operators/timestamp';
|
||||
export { TimeInterval } from '../internal/operators/timeInterval';
|
||||
export { GroupedObservable } from '../internal/operators/groupBy';
|
||||
export { defaultThrottleConfig } from '../internal/operators/throttle';
|
||||
export { rxSubscriber } from '../internal/symbol/rxSubscriber';
|
||||
export { iterator } from '../internal/symbol/iterator';
|
||||
export { observable } from '../internal/symbol/observable';
|
||||
export { ArgumentOutOfRangeError } from '../internal/util/ArgumentOutOfRangeError';
|
||||
export { EmptyError } from '../internal/util/EmptyError';
|
||||
export { Immediate } from '../internal/util/Immediate';
|
||||
export { ObjectUnsubscribedError } from '../internal/util/ObjectUnsubscribedError';
|
||||
export { TimeoutError } from '../internal/util/TimeoutError';
|
||||
export { UnsubscriptionError } from '../internal/util/UnsubscriptionError';
|
||||
export { applyMixins } from '../internal/util/applyMixins';
|
||||
export { errorObject } from '../internal/util/errorObject';
|
||||
export { hostReportError } from '../internal/util/hostReportError';
|
||||
export { identity } from '../internal/util/identity';
|
||||
export { isArray } from '../internal/util/isArray';
|
||||
export { isArrayLike } from '../internal/util/isArrayLike';
|
||||
export { isDate } from '../internal/util/isDate';
|
||||
export { isFunction } from '../internal/util/isFunction';
|
||||
export { isIterable } from '../internal/util/isIterable';
|
||||
export { isNumeric } from '../internal/util/isNumeric';
|
||||
export { isObject } from '../internal/util/isObject';
|
||||
export { isInteropObservable as isObservable } from '../internal/util/isInteropObservable';
|
||||
export { isPromise } from '../internal/util/isPromise';
|
||||
export { isScheduler } from '../internal/util/isScheduler';
|
||||
export { noop } from '../internal/util/noop';
|
||||
export { not } from '../internal/util/not';
|
||||
export { pipe } from '../internal/util/pipe';
|
||||
export { root } from '../internal/util/root';
|
||||
export { subscribeTo } from '../internal/util/subscribeTo';
|
||||
export { subscribeToArray } from '../internal/util/subscribeToArray';
|
||||
export { subscribeToIterable } from '../internal/util/subscribeToIterable';
|
||||
export { subscribeToObservable } from '../internal/util/subscribeToObservable';
|
||||
export { subscribeToPromise } from '../internal/util/subscribeToPromise';
|
||||
export { subscribeToResult } from '../internal/util/subscribeToResult';
|
||||
export { toSubscriber } from '../internal/util/toSubscriber';
|
||||
export { tryCatch } from '../internal/util/tryCatch';
|
||||
//# sourceMappingURL=index.js.map
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subject } from './Subject';
|
||||
import { Subscription } from './Subscription';
|
||||
var AsyncSubject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(AsyncSubject, _super);
|
||||
function AsyncSubject() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.value = null;
|
||||
_this.hasNext = false;
|
||||
_this.hasCompleted = false;
|
||||
return _this;
|
||||
}
|
||||
AsyncSubject.prototype._subscribe = function (subscriber) {
|
||||
if (this.hasError) {
|
||||
subscriber.error(this.thrownError);
|
||||
return Subscription.EMPTY;
|
||||
}
|
||||
else if (this.hasCompleted && this.hasNext) {
|
||||
subscriber.next(this.value);
|
||||
subscriber.complete();
|
||||
return Subscription.EMPTY;
|
||||
}
|
||||
return _super.prototype._subscribe.call(this, subscriber);
|
||||
};
|
||||
AsyncSubject.prototype.next = function (value) {
|
||||
if (!this.hasCompleted) {
|
||||
this.value = value;
|
||||
this.hasNext = true;
|
||||
}
|
||||
};
|
||||
AsyncSubject.prototype.error = function (error) {
|
||||
if (!this.hasCompleted) {
|
||||
_super.prototype.error.call(this, error);
|
||||
}
|
||||
};
|
||||
AsyncSubject.prototype.complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (this.hasNext) {
|
||||
_super.prototype.next.call(this, this.value);
|
||||
}
|
||||
_super.prototype.complete.call(this);
|
||||
};
|
||||
return AsyncSubject;
|
||||
}(Subject));
|
||||
export { AsyncSubject };
|
||||
//# sourceMappingURL=AsyncSubject.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"AsyncSubject.js","sources":["../../src/internal/AsyncSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C;IAAqC,wCAAU;IAA/C;QAAA,qEAsCC;QArCS,WAAK,GAAM,IAAI,CAAC;QAChB,aAAO,GAAY,KAAK,CAAC;QACzB,kBAAY,GAAY,KAAK,CAAC;;IAmCxC,CAAC;IAhCC,iCAAU,GAAV,UAAW,UAA2B;QACpC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACnC,OAAO,YAAY,CAAC,KAAK,CAAC;SAC3B;aAAM,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,EAAE;YAC5C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO,YAAY,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,2BAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACrB;IACH,CAAC;IAED,4BAAK,GAAL,UAAM,KAAU;QACd,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,iBAAM,KAAK,YAAC,KAAK,CAAC,CAAC;SACpB;IACH,CAAC;IAED,+BAAQ,GAAR;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,iBAAM,IAAI,YAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxB;QACD,iBAAM,QAAQ,WAAE,CAAC;IACnB,CAAC;IACH,mBAAC;AAAD,CAAC,AAtCD,CAAqC,OAAO,GAsC3C"}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subject } from './Subject';
|
||||
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
|
||||
var BehaviorSubject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BehaviorSubject, _super);
|
||||
function BehaviorSubject(_value) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this._value = _value;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(BehaviorSubject.prototype, "value", {
|
||||
get: function () {
|
||||
return this.getValue();
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
BehaviorSubject.prototype._subscribe = function (subscriber) {
|
||||
var subscription = _super.prototype._subscribe.call(this, subscriber);
|
||||
if (subscription && !subscription.closed) {
|
||||
subscriber.next(this._value);
|
||||
}
|
||||
return subscription;
|
||||
};
|
||||
BehaviorSubject.prototype.getValue = function () {
|
||||
if (this.hasError) {
|
||||
throw this.thrownError;
|
||||
}
|
||||
else if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
else {
|
||||
return this._value;
|
||||
}
|
||||
};
|
||||
BehaviorSubject.prototype.next = function (value) {
|
||||
_super.prototype.next.call(this, this._value = value);
|
||||
};
|
||||
return BehaviorSubject;
|
||||
}(Subject));
|
||||
export { BehaviorSubject };
|
||||
//# sourceMappingURL=BehaviorSubject.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"BehaviorSubject.js","sources":["../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAQzE;IAAwC,2CAAU;IAEhD,yBAAoB,MAAS;QAA7B,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAG;;IAE7B,CAAC;IAED,sBAAI,kCAAK;aAAT;YACE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;;;OAAA;IAGD,oCAAU,GAAV,UAAW,UAAyB;QAClC,IAAM,YAAY,GAAG,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC;QAClD,IAAI,YAAY,IAAI,CAAoB,YAAa,CAAC,MAAM,EAAE;YAC5D,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,kCAAQ,GAAR;QACE,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,MAAM,IAAI,CAAC,WAAW,CAAC;SACxB;aAAM,IAAI,IAAI,CAAC,MAAM,EAAE;YACtB,MAAM,IAAI,uBAAuB,EAAE,CAAC;SACrC;aAAM;YACL,OAAO,IAAI,CAAC,MAAM,CAAC;SACpB;IACH,CAAC;IAED,8BAAI,GAAJ,UAAK,KAAQ;QACX,iBAAM,IAAI,YAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IACH,sBAAC;AAAD,CAAC,AAhCD,CAAwC,OAAO,GAgC9C"}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from './Subscriber';
|
||||
var InnerSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(InnerSubscriber, _super);
|
||||
function InnerSubscriber(parent, outerValue, outerIndex) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.parent = parent;
|
||||
_this.outerValue = outerValue;
|
||||
_this.outerIndex = outerIndex;
|
||||
_this.index = 0;
|
||||
return _this;
|
||||
}
|
||||
InnerSubscriber.prototype._next = function (value) {
|
||||
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
|
||||
};
|
||||
InnerSubscriber.prototype._error = function (error) {
|
||||
this.parent.notifyError(error, this);
|
||||
this.unsubscribe();
|
||||
};
|
||||
InnerSubscriber.prototype._complete = function () {
|
||||
this.parent.notifyComplete(this);
|
||||
this.unsubscribe();
|
||||
};
|
||||
return InnerSubscriber;
|
||||
}(Subscriber));
|
||||
export { InnerSubscriber };
|
||||
//# sourceMappingURL=InnerSubscriber.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"InnerSubscriber.js","sources":["../../src/internal/InnerSubscriber.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C;IAA2C,2CAAa;IAGtD,yBAAoB,MAA6B,EAAS,UAAa,EAAS,UAAkB;QAAlG,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAuB;QAAS,gBAAU,GAAV,UAAU,CAAG;QAAS,gBAAU,GAAV,UAAU,CAAQ;QAF1F,WAAK,GAAG,CAAC,CAAC;;IAIlB,CAAC;IAES,+BAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC;IAES,gCAAM,GAAhB,UAAiB,KAAU;QACzB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAES,mCAAS,GAAnB;QACE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IACH,sBAAC;AAAD,CAAC,AApBD,CAA2C,UAAU,GAoBpD"}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
|
||||
import { config } from './config';
|
||||
import { hostReportError } from './util/hostReportError';
|
||||
export var empty = {
|
||||
closed: true,
|
||||
next: function (value) { },
|
||||
error: function (err) {
|
||||
if (config.useDeprecatedSynchronousErrorHandling) {
|
||||
throw err;
|
||||
}
|
||||
else {
|
||||
hostReportError(err);
|
||||
}
|
||||
},
|
||||
complete: function () { }
|
||||
};
|
||||
//# sourceMappingURL=Observer.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Observer.js","sources":["../../src/internal/Observer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,CAAC,IAAM,KAAK,GAAkB;IAClC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAJ,UAAK,KAAU,IAAoB,CAAC;IACpC,KAAK,EAAL,UAAM,GAAQ;QACZ,IAAI,MAAM,CAAC,qCAAqC,EAAE;YAChD,MAAM,GAAG,CAAC;SACX;aAAM;YACL,eAAe,CAAC,GAAG,CAAC,CAAC;SACtB;IACH,CAAC;IACD,QAAQ,EAAR,cAA4B,CAAC;CAC9B,CAAC"}
|
||||
-1
@@ -1 +0,0 @@
|
||||
//# sourceMappingURL=Operator.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Operator.js","sources":["../../src/internal/Operator.ts"],"names":[],"mappings":""}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from './Subscriber';
|
||||
var OuterSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(OuterSubscriber, _super);
|
||||
function OuterSubscriber() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.destination.next(innerValue);
|
||||
};
|
||||
OuterSubscriber.prototype.notifyError = function (error, innerSub) {
|
||||
this.destination.error(error);
|
||||
};
|
||||
OuterSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
this.destination.complete();
|
||||
};
|
||||
return OuterSubscriber;
|
||||
}(Subscriber));
|
||||
export { OuterSubscriber };
|
||||
//# sourceMappingURL=OuterSubscriber.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"OuterSubscriber.js","sources":["../../src/internal/OuterSubscriber.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C;IAA2C,2CAAa;IAAxD;;IAcA,CAAC;IAbC,oCAAU,GAAV,UAAW,UAAa,EAAE,UAAa,EAC5B,UAAkB,EAAE,UAAkB,EACtC,QAA+B;QACxC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,qCAAW,GAAX,UAAY,KAAU,EAAE,QAA+B;QACrD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,wCAAc,GAAd,UAAe,QAA+B;QAC5C,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IACH,sBAAC;AAAD,CAAC,AAdD,CAA2C,UAAU,GAcpD"}
|
||||
-117
@@ -1,117 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subject } from './Subject';
|
||||
import { queue } from './scheduler/queue';
|
||||
import { Subscription } from './Subscription';
|
||||
import { ObserveOnSubscriber } from './operators/observeOn';
|
||||
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
|
||||
import { SubjectSubscription } from './SubjectSubscription';
|
||||
var ReplaySubject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(ReplaySubject, _super);
|
||||
function ReplaySubject(bufferSize, windowTime, scheduler) {
|
||||
if (bufferSize === void 0) {
|
||||
bufferSize = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
if (windowTime === void 0) {
|
||||
windowTime = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
var _this = _super.call(this) || this;
|
||||
_this.scheduler = scheduler;
|
||||
_this._events = [];
|
||||
_this._infiniteTimeWindow = false;
|
||||
_this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
|
||||
_this._windowTime = windowTime < 1 ? 1 : windowTime;
|
||||
if (windowTime === Number.POSITIVE_INFINITY) {
|
||||
_this._infiniteTimeWindow = true;
|
||||
_this.next = _this.nextInfiniteTimeWindow;
|
||||
}
|
||||
else {
|
||||
_this.next = _this.nextTimeWindow;
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
|
||||
var _events = this._events;
|
||||
_events.push(value);
|
||||
if (_events.length > this._bufferSize) {
|
||||
_events.shift();
|
||||
}
|
||||
_super.prototype.next.call(this, value);
|
||||
};
|
||||
ReplaySubject.prototype.nextTimeWindow = function (value) {
|
||||
this._events.push(new ReplayEvent(this._getNow(), value));
|
||||
this._trimBufferThenGetEvents();
|
||||
_super.prototype.next.call(this, value);
|
||||
};
|
||||
ReplaySubject.prototype._subscribe = function (subscriber) {
|
||||
var _infiniteTimeWindow = this._infiniteTimeWindow;
|
||||
var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
|
||||
var scheduler = this.scheduler;
|
||||
var len = _events.length;
|
||||
var subscription;
|
||||
if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
else if (this.isStopped || this.hasError) {
|
||||
subscription = Subscription.EMPTY;
|
||||
}
|
||||
else {
|
||||
this.observers.push(subscriber);
|
||||
subscription = new SubjectSubscription(this, subscriber);
|
||||
}
|
||||
if (scheduler) {
|
||||
subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));
|
||||
}
|
||||
if (_infiniteTimeWindow) {
|
||||
for (var i = 0; i < len && !subscriber.closed; i++) {
|
||||
subscriber.next(_events[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < len && !subscriber.closed; i++) {
|
||||
subscriber.next(_events[i].value);
|
||||
}
|
||||
}
|
||||
if (this.hasError) {
|
||||
subscriber.error(this.thrownError);
|
||||
}
|
||||
else if (this.isStopped) {
|
||||
subscriber.complete();
|
||||
}
|
||||
return subscription;
|
||||
};
|
||||
ReplaySubject.prototype._getNow = function () {
|
||||
return (this.scheduler || queue).now();
|
||||
};
|
||||
ReplaySubject.prototype._trimBufferThenGetEvents = function () {
|
||||
var now = this._getNow();
|
||||
var _bufferSize = this._bufferSize;
|
||||
var _windowTime = this._windowTime;
|
||||
var _events = this._events;
|
||||
var eventsCount = _events.length;
|
||||
var spliceCount = 0;
|
||||
while (spliceCount < eventsCount) {
|
||||
if ((now - _events[spliceCount].time) < _windowTime) {
|
||||
break;
|
||||
}
|
||||
spliceCount++;
|
||||
}
|
||||
if (eventsCount > _bufferSize) {
|
||||
spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
|
||||
}
|
||||
if (spliceCount > 0) {
|
||||
_events.splice(0, spliceCount);
|
||||
}
|
||||
return _events;
|
||||
};
|
||||
return ReplaySubject;
|
||||
}(Subject));
|
||||
export { ReplaySubject };
|
||||
var ReplayEvent = /*@__PURE__*/ (function () {
|
||||
function ReplayEvent(time, value) {
|
||||
this.time = time;
|
||||
this.value = value;
|
||||
}
|
||||
return ReplayEvent;
|
||||
}());
|
||||
//# sourceMappingURL=ReplaySubject.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"ReplaySubject.js","sources":["../../src/internal/ReplaySubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAQ5D;IAAsC,yCAAU;IAM9C,uBAAY,UAA6C,EAC7C,UAA6C,EACrC,SAAyB;QAFjC,2BAAA,EAAA,aAAqB,MAAM,CAAC,iBAAiB;QAC7C,2BAAA,EAAA,aAAqB,MAAM,CAAC,iBAAiB;QADzD,YAGE,iBAAO,SAUR;QAXmB,eAAS,GAAT,SAAS,CAAgB;QAPrC,aAAO,GAA2B,EAAE,CAAC;QAGrC,yBAAmB,GAAY,KAAK,CAAC;QAM3C,KAAI,CAAC,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QACnD,KAAI,CAAC,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAEnD,IAAI,UAAU,KAAK,MAAM,CAAC,iBAAiB,EAA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I,CAAC,OAAO,CAAC;QAE/C,IAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QAKpB,OAAO,WAAW,GAAG,WAAW,EAAE;YAChC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,EAAE;gBACnD,MAAM;aACP;YACD,WAAW,EAAE,CAAC;SACf;QAED,IAAI,WAAW,GAAG,WAAW,EAAE;YAC7B,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,CAAC;SAChE;QAED,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;SAChC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEH,oBAAC;AAAD,CAAC,AAnHD,CAAsC,OAAO,GAmH5C;;AAED;IACE,qBAAmB,IAAY,EAAS,KAAQ;QAA7B,SAAI,GAAJ,IAAI,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAG;IAChD,CAAC;IACH,kBAAC;AAAD,CAAC,AAHD,IAGC"}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
var Scheduler = /*@__PURE__*/ (function () {
|
||||
function Scheduler(SchedulerAction, now) {
|
||||
if (now === void 0) {
|
||||
now = Scheduler.now;
|
||||
}
|
||||
this.SchedulerAction = SchedulerAction;
|
||||
this.now = now;
|
||||
}
|
||||
Scheduler.prototype.schedule = function (work, delay, state) {
|
||||
if (delay === void 0) {
|
||||
delay = 0;
|
||||
}
|
||||
return new this.SchedulerAction(this, work).schedule(state, delay);
|
||||
};
|
||||
Scheduler.now = function () { return Date.now(); };
|
||||
return Scheduler;
|
||||
}());
|
||||
export { Scheduler };
|
||||
//# sourceMappingURL=Scheduler.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"Scheduler.js","sources":["../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAuBA;IASE,mBAAoB,eAA8B,EACtC,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,SAAS,CAAC,GAAG;QADzB,oBAAe,GAAf,eAAe,CAAe;QAEhD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IA6BM,4BAAQ,GAAf,UAAmB,IAAmD,EAAE,KAAiB,EAAE,KAAS;QAA5B,sBAAA,EAAA,SAAiB;QACvF,OAAO,IAAI,IAAI,CAAC,eAAe,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;IApCa,aAAG,GAAiB,cAAM,OAAA,IAAI,CAAC,GAAG,EAAE,EAAV,CAAU,CAAC;IAqCrD,gBAAC;CAAA,AA5CD,IA4CC;SA5CY,SAAS"}
|
||||
-158
@@ -1,158 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Observable } from './Observable';
|
||||
import { Subscriber } from './Subscriber';
|
||||
import { Subscription } from './Subscription';
|
||||
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
|
||||
import { SubjectSubscription } from './SubjectSubscription';
|
||||
import { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';
|
||||
var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SubjectSubscriber, _super);
|
||||
function SubjectSubscriber(destination) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.destination = destination;
|
||||
return _this;
|
||||
}
|
||||
return SubjectSubscriber;
|
||||
}(Subscriber));
|
||||
export { SubjectSubscriber };
|
||||
var Subject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(Subject, _super);
|
||||
function Subject() {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.observers = [];
|
||||
_this.closed = false;
|
||||
_this.isStopped = false;
|
||||
_this.hasError = false;
|
||||
_this.thrownError = null;
|
||||
return _this;
|
||||
}
|
||||
Subject.prototype[rxSubscriberSymbol] = function () {
|
||||
return new SubjectSubscriber(this);
|
||||
};
|
||||
Subject.prototype.lift = function (operator) {
|
||||
var subject = new AnonymousSubject(this, this);
|
||||
subject.operator = operator;
|
||||
return subject;
|
||||
};
|
||||
Subject.prototype.next = function (value) {
|
||||
if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
if (!this.isStopped) {
|
||||
var observers = this.observers;
|
||||
var len = observers.length;
|
||||
var copy = observers.slice();
|
||||
for (var i = 0; i < len; i++) {
|
||||
copy[i].next(value);
|
||||
}
|
||||
}
|
||||
};
|
||||
Subject.prototype.error = function (err) {
|
||||
if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
this.hasError = true;
|
||||
this.thrownError = err;
|
||||
this.isStopped = true;
|
||||
var observers = this.observers;
|
||||
var len = observers.length;
|
||||
var copy = observers.slice();
|
||||
for (var i = 0; i < len; i++) {
|
||||
copy[i].error(err);
|
||||
}
|
||||
this.observers.length = 0;
|
||||
};
|
||||
Subject.prototype.complete = function () {
|
||||
if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
this.isStopped = true;
|
||||
var observers = this.observers;
|
||||
var len = observers.length;
|
||||
var copy = observers.slice();
|
||||
for (var i = 0; i < len; i++) {
|
||||
copy[i].complete();
|
||||
}
|
||||
this.observers.length = 0;
|
||||
};
|
||||
Subject.prototype.unsubscribe = function () {
|
||||
this.isStopped = true;
|
||||
this.closed = true;
|
||||
this.observers = null;
|
||||
};
|
||||
Subject.prototype._trySubscribe = function (subscriber) {
|
||||
if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
else {
|
||||
return _super.prototype._trySubscribe.call(this, subscriber);
|
||||
}
|
||||
};
|
||||
Subject.prototype._subscribe = function (subscriber) {
|
||||
if (this.closed) {
|
||||
throw new ObjectUnsubscribedError();
|
||||
}
|
||||
else if (this.hasError) {
|
||||
subscriber.error(this.thrownError);
|
||||
return Subscription.EMPTY;
|
||||
}
|
||||
else if (this.isStopped) {
|
||||
subscriber.complete();
|
||||
return Subscription.EMPTY;
|
||||
}
|
||||
else {
|
||||
this.observers.push(subscriber);
|
||||
return new SubjectSubscription(this, subscriber);
|
||||
}
|
||||
};
|
||||
Subject.prototype.asObservable = function () {
|
||||
var observable = new Observable();
|
||||
observable.source = this;
|
||||
return observable;
|
||||
};
|
||||
Subject.create = function (destination, source) {
|
||||
return new AnonymousSubject(destination, source);
|
||||
};
|
||||
return Subject;
|
||||
}(Observable));
|
||||
export { Subject };
|
||||
var AnonymousSubject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(AnonymousSubject, _super);
|
||||
function AnonymousSubject(destination, source) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.destination = destination;
|
||||
_this.source = source;
|
||||
return _this;
|
||||
}
|
||||
AnonymousSubject.prototype.next = function (value) {
|
||||
var destination = this.destination;
|
||||
if (destination && destination.next) {
|
||||
destination.next(value);
|
||||
}
|
||||
};
|
||||
AnonymousSubject.prototype.error = function (err) {
|
||||
var destination = this.destination;
|
||||
if (destination && destination.error) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
};
|
||||
AnonymousSubject.prototype.complete = function () {
|
||||
var destination = this.destination;
|
||||
if (destination && destination.complete) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
AnonymousSubject.prototype._subscribe = function (subscriber) {
|
||||
var source = this.source;
|
||||
if (source) {
|
||||
return this.source.subscribe(subscriber);
|
||||
}
|
||||
else {
|
||||
return Subscription.EMPTY;
|
||||
}
|
||||
};
|
||||
return AnonymousSubject;
|
||||
}(Subject));
|
||||
export { AnonymousSubject };
|
||||
//# sourceMappingURL=Subject.js.map
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscription } from './Subscription';
|
||||
var SubjectSubscription = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SubjectSubscription, _super);
|
||||
function SubjectSubscription(subject, subscriber) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.subject = subject;
|
||||
_this.subscriber = subscriber;
|
||||
_this.closed = false;
|
||||
return _this;
|
||||
}
|
||||
SubjectSubscription.prototype.unsubscribe = function () {
|
||||
if (this.closed) {
|
||||
return;
|
||||
}
|
||||
this.closed = true;
|
||||
var subject = this.subject;
|
||||
var observers = subject.observers;
|
||||
this.subject = null;
|
||||
if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
|
||||
return;
|
||||
}
|
||||
var subscriberIndex = observers.indexOf(this.subscriber);
|
||||
if (subscriberIndex !== -1) {
|
||||
observers.splice(subscriberIndex, 1);
|
||||
}
|
||||
};
|
||||
return SubjectSubscription;
|
||||
}(Subscription));
|
||||
export { SubjectSubscription };
|
||||
//# sourceMappingURL=SubjectSubscription.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"SubjectSubscription.js","sources":["../../src/internal/SubjectSubscription.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAO9C;IAA4C,+CAAY;IAGtD,6BAAmB,OAAmB,EAAS,UAAuB;QAAtE,YACE,iBAAO,SACR;QAFkB,aAAO,GAAP,OAAO,CAAY;QAAS,gBAAU,GAAV,UAAU,CAAa;QAFtE,YAAM,GAAY,KAAK,CAAC;;IAIxB,CAAC;IAED,yCAAW,GAAX;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO;SACR;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QAEpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE;YAC/E,OAAO;SACR;QAED,IAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAE3D,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;YAC1B,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;SACtC;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA7BD,CAA4C,YAAY,GA6BvD"}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
||||
var _enable_super_gross_mode_that_will_cause_bad_things = false;
|
||||
export var config = {
|
||||
Promise: undefined,
|
||||
set useDeprecatedSynchronousErrorHandling(value) {
|
||||
if (value) {
|
||||
var error = /*@__PURE__*/ new Error();
|
||||
/*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
|
||||
}
|
||||
else if (_enable_super_gross_mode_that_will_cause_bad_things) {
|
||||
/*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
|
||||
}
|
||||
_enable_super_gross_mode_that_will_cause_bad_things = value;
|
||||
},
|
||||
get useDeprecatedSynchronousErrorHandling() {
|
||||
return _enable_super_gross_mode_that_will_cause_bad_things;
|
||||
},
|
||||
};
|
||||
//# sourceMappingURL=config.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"config.js","sources":["../../src/internal/config.ts"],"names":[],"mappings":"AAAA,IAAI,mDAAmD,GAAG,KAAK,CAAC;AAMhE,MAAM,CAAC,IAAM,MAAM,GAAG;IAKpB,OAAO,EAAE,SAAmC;IAU5C,IAAI,qCAAqC,CAAC,KAAc;QACtD,IAAI,KAAK,EAAE;YACT,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;YAC1B,OAAO,CAAC,IAAI,CAAC,+FAA+F,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;SAC7H;aAAM,IAAI,mDAAmD,EAAE;YAC9D,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;SACrE;QACD,mDAAmD,GAAG,KAAK,CAAC;IAC9D,CAAC;IAED,IAAI,qCAAqC;QACvC,OAAO,mDAAmD,CAAC;IAC7D,CAAC;CACF,CAAC"}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Observable } from '../Observable';
|
||||
import { asap } from '../scheduler/asap';
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SubscribeOnObservable, _super);
|
||||
function SubscribeOnObservable(source, delayTime, scheduler) {
|
||||
if (delayTime === void 0) {
|
||||
delayTime = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = asap;
|
||||
}
|
||||
var _this = _super.call(this) || this;
|
||||
_this.source = source;
|
||||
_this.delayTime = delayTime;
|
||||
_this.scheduler = scheduler;
|
||||
if (!isNumeric(delayTime) || delayTime < 0) {
|
||||
_this.delayTime = 0;
|
||||
}
|
||||
if (!scheduler || typeof scheduler.schedule !== 'function') {
|
||||
_this.scheduler = asap;
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
SubscribeOnObservable.create = function (source, delay, scheduler) {
|
||||
if (delay === void 0) {
|
||||
delay = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = asap;
|
||||
}
|
||||
return new SubscribeOnObservable(source, delay, scheduler);
|
||||
};
|
||||
SubscribeOnObservable.dispatch = function (arg) {
|
||||
var source = arg.source, subscriber = arg.subscriber;
|
||||
return this.add(source.subscribe(subscriber));
|
||||
};
|
||||
SubscribeOnObservable.prototype._subscribe = function (subscriber) {
|
||||
var delay = this.delayTime;
|
||||
var source = this.source;
|
||||
var scheduler = this.scheduler;
|
||||
return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
|
||||
source: source, subscriber: subscriber
|
||||
});
|
||||
};
|
||||
return SubscribeOnObservable;
|
||||
}(Observable));
|
||||
export { SubscribeOnObservable };
|
||||
//# sourceMappingURL=SubscribeOnObservable.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"SubscribeOnObservable.js","sources":["../../../src/internal/observable/SubscribeOnObservable.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAY9C;IAA8C,iDAAa;IAYzD,+BAAmB,MAAqB,EACpB,SAAqB,EACrB,SAA+B;QAD/B,0BAAA,EAAA,aAAqB;QACrB,0BAAA,EAAA,gBAA+B;QAFnD,YAGE,iBAAO,SAOR;QAVkB,YAAM,GAAN,MAAM,CAAe;QACpB,eAAS,GAAT,SAAS,CAAY;QACrB,eAAS,GAAT,SAAS,CAAsB;QAEjD,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE;YAC1C,KAAI,CAAC,SAAS,GAAG,CAAC,CAAC;SACpB;QACD,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,UAAU,EAAE;YAC1D,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;;IACH,CAAC;IApBM,4BAAM,GAAb,UAAiB,MAAqB,EAAE,KAAiB,EAAE,SAA+B;QAAlD,sBAAA,EAAA,SAAiB;QAAE,0BAAA,EAAA,gBAA+B;QACxF,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;IAGM,8BAAQ,GAAf,UAA6C,GAAmB;QACtD,IAAA,mBAAM,EAAE,2BAAU,CAAS;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAChD,CAAC;IAeD,0CAAU,GAAV,UAAW,UAAyB;QAClC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;QAC7B,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEjC,OAAO,SAAS,CAAC,QAAQ,CAAmB,qBAAqB,CAAC,QAAQ,EAAE,KAAK,EAAE;YACjF,MAAM,QAAA,EAAE,UAAU,YAAA;SACnB,CAAC,CAAC;IACL,CAAC;IACH,4BAAC;AAAD,CAAC,AAlCD,CAA8C,UAAU,GAkCvD"}
|
||||
-105
@@ -1,105 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { AsyncSubject } from '../AsyncSubject';
|
||||
import { map } from '../operators/map';
|
||||
import { canReportError } from '../util/canReportError';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
export function bindCallback(callbackFunc, resultSelector, scheduler) {
|
||||
if (resultSelector) {
|
||||
if (isScheduler(resultSelector)) {
|
||||
scheduler = resultSelector;
|
||||
}
|
||||
else {
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
|
||||
};
|
||||
}
|
||||
}
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var context = this;
|
||||
var subject;
|
||||
var params = {
|
||||
context: context,
|
||||
subject: subject,
|
||||
callbackFunc: callbackFunc,
|
||||
scheduler: scheduler,
|
||||
};
|
||||
return new Observable(function (subscriber) {
|
||||
if (!scheduler) {
|
||||
if (!subject) {
|
||||
subject = new AsyncSubject();
|
||||
var handler = function () {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i] = arguments[_i];
|
||||
}
|
||||
subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
|
||||
subject.complete();
|
||||
};
|
||||
try {
|
||||
callbackFunc.apply(context, args.concat([handler]));
|
||||
}
|
||||
catch (err) {
|
||||
if (canReportError(subject)) {
|
||||
subject.error(err);
|
||||
}
|
||||
else {
|
||||
console.warn(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
return subject.subscribe(subscriber);
|
||||
}
|
||||
else {
|
||||
var state = {
|
||||
args: args, subscriber: subscriber, params: params,
|
||||
};
|
||||
return scheduler.schedule(dispatch, 0, state);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
function dispatch(state) {
|
||||
var _this = this;
|
||||
var self = this;
|
||||
var args = state.args, subscriber = state.subscriber, params = state.params;
|
||||
var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
|
||||
var subject = params.subject;
|
||||
if (!subject) {
|
||||
subject = params.subject = new AsyncSubject();
|
||||
var handler = function () {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i] = arguments[_i];
|
||||
}
|
||||
var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
|
||||
_this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
|
||||
};
|
||||
try {
|
||||
callbackFunc.apply(context, args.concat([handler]));
|
||||
}
|
||||
catch (err) {
|
||||
subject.error(err);
|
||||
}
|
||||
}
|
||||
this.add(subject.subscribe(subscriber));
|
||||
}
|
||||
function dispatchNext(state) {
|
||||
var value = state.value, subject = state.subject;
|
||||
subject.next(value);
|
||||
subject.complete();
|
||||
}
|
||||
function dispatchError(state) {
|
||||
var err = state.err, subject = state.subject;
|
||||
subject.error(err);
|
||||
}
|
||||
//# sourceMappingURL=bindCallback.js.map
|
||||
-113
@@ -1,113 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { AsyncSubject } from '../AsyncSubject';
|
||||
import { map } from '../operators/map';
|
||||
import { canReportError } from '../util/canReportError';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { isArray } from '../util/isArray';
|
||||
export function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
|
||||
if (resultSelector) {
|
||||
if (isScheduler(resultSelector)) {
|
||||
scheduler = resultSelector;
|
||||
}
|
||||
else {
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
|
||||
};
|
||||
}
|
||||
}
|
||||
return function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var params = {
|
||||
subject: undefined,
|
||||
args: args,
|
||||
callbackFunc: callbackFunc,
|
||||
scheduler: scheduler,
|
||||
context: this,
|
||||
};
|
||||
return new Observable(function (subscriber) {
|
||||
var context = params.context;
|
||||
var subject = params.subject;
|
||||
if (!scheduler) {
|
||||
if (!subject) {
|
||||
subject = params.subject = new AsyncSubject();
|
||||
var handler = function () {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i] = arguments[_i];
|
||||
}
|
||||
var err = innerArgs.shift();
|
||||
if (err) {
|
||||
subject.error(err);
|
||||
return;
|
||||
}
|
||||
subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
|
||||
subject.complete();
|
||||
};
|
||||
try {
|
||||
callbackFunc.apply(context, args.concat([handler]));
|
||||
}
|
||||
catch (err) {
|
||||
if (canReportError(subject)) {
|
||||
subject.error(err);
|
||||
}
|
||||
else {
|
||||
console.warn(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
return subject.subscribe(subscriber);
|
||||
}
|
||||
else {
|
||||
return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
function dispatch(state) {
|
||||
var _this = this;
|
||||
var params = state.params, subscriber = state.subscriber, context = state.context;
|
||||
var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
|
||||
var subject = params.subject;
|
||||
if (!subject) {
|
||||
subject = params.subject = new AsyncSubject();
|
||||
var handler = function () {
|
||||
var innerArgs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
innerArgs[_i] = arguments[_i];
|
||||
}
|
||||
var err = innerArgs.shift();
|
||||
if (err) {
|
||||
_this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
|
||||
}
|
||||
else {
|
||||
var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
|
||||
_this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
|
||||
}
|
||||
};
|
||||
try {
|
||||
callbackFunc.apply(context, args.concat([handler]));
|
||||
}
|
||||
catch (err) {
|
||||
this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
|
||||
}
|
||||
}
|
||||
this.add(subject.subscribe(subscriber));
|
||||
}
|
||||
function dispatchNext(arg) {
|
||||
var value = arg.value, subject = arg.subject;
|
||||
subject.next(value);
|
||||
subject.complete();
|
||||
}
|
||||
function dispatchError(arg) {
|
||||
var err = arg.err, subject = arg.subject;
|
||||
subject.error(err);
|
||||
}
|
||||
//# sourceMappingURL=bindNodeCallback.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"bindNodeCallback.js","sources":["../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAoJ1C,MAAM,UAAU,gBAAgB,CAC9B,YAAsB,EACtB,cAAsC,EACtC,SAAyB;IAGzB,IAAI,cAAc,EAAE;QAClB,IAAI,WAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,GAAG,cAAc,CAAC;SAC5B;aAAM;YAEL,OAAO;gBAAC,cAAc;qBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;oBAAd,yBAAc;;gBAAK,OAAA,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC,eAAI,IAAI,EAAE,IAAI,CAChF,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,eAAI,IAAI,EAAE,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,EAA9D,CAA8D,CAAC,CAC5E;YAF0B,CAE1B,CAAC;SACH;KACF;IAED,OAAO;QAAoB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QACvC,IAAM,MAAM,GAAmB;YAC7B,OAAO,EAAE,SAAS;YAClB,IAAI,MAAA;Y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,CAAC,CAAC;SACvF;KACF;IAED,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC1C,CAAC;AAOD,SAAS,YAAY,CAAI,GAAuB;IACtC,IAAA,iBAAK,EAAE,qBAAO,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC;AAOD,SAAS,aAAa,CAAI,GAAwB;IACxC,IAAA,aAAG,EAAE,qBAAO,CAAS;IAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
||||
-101
@@ -1,101 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { fromArray } from './fromArray';
|
||||
var NONE = {};
|
||||
export function combineLatest() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
var resultSelector = null;
|
||||
var scheduler = null;
|
||||
if (isScheduler(observables[observables.length - 1])) {
|
||||
scheduler = observables.pop();
|
||||
}
|
||||
if (typeof observables[observables.length - 1] === 'function') {
|
||||
resultSelector = observables.pop();
|
||||
}
|
||||
if (observables.length === 1 && isArray(observables[0])) {
|
||||
observables = observables[0];
|
||||
}
|
||||
return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
|
||||
}
|
||||
var CombineLatestOperator = /*@__PURE__*/ (function () {
|
||||
function CombineLatestOperator(resultSelector) {
|
||||
this.resultSelector = resultSelector;
|
||||
}
|
||||
CombineLatestOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
|
||||
};
|
||||
return CombineLatestOperator;
|
||||
}());
|
||||
export { CombineLatestOperator };
|
||||
var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(CombineLatestSubscriber, _super);
|
||||
function CombineLatestSubscriber(destination, resultSelector) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.resultSelector = resultSelector;
|
||||
_this.active = 0;
|
||||
_this.values = [];
|
||||
_this.observables = [];
|
||||
return _this;
|
||||
}
|
||||
CombineLatestSubscriber.prototype._next = function (observable) {
|
||||
this.values.push(NONE);
|
||||
this.observables.push(observable);
|
||||
};
|
||||
CombineLatestSubscriber.prototype._complete = function () {
|
||||
var observables = this.observables;
|
||||
var len = observables.length;
|
||||
if (len === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
else {
|
||||
this.active = len;
|
||||
this.toRespond = len;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var observable = observables[i];
|
||||
this.add(subscribeToResult(this, observable, observable, i));
|
||||
}
|
||||
}
|
||||
};
|
||||
CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
|
||||
if ((this.active -= 1) === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
var values = this.values;
|
||||
var oldVal = values[outerIndex];
|
||||
var toRespond = !this.toRespond
|
||||
? 0
|
||||
: oldVal === NONE ? --this.toRespond : this.toRespond;
|
||||
values[outerIndex] = innerValue;
|
||||
if (toRespond === 0) {
|
||||
if (this.resultSelector) {
|
||||
this._tryResultSelector(values);
|
||||
}
|
||||
else {
|
||||
this.destination.next(values.slice());
|
||||
}
|
||||
}
|
||||
};
|
||||
CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
|
||||
var result;
|
||||
try {
|
||||
result = this.resultSelector.apply(this, values);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.destination.next(result);
|
||||
};
|
||||
return CombineLatestSubscriber;
|
||||
}(OuterSubscriber));
|
||||
export { CombineLatestSubscriber };
|
||||
//# sourceMappingURL=combineLatest.js.map
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { from } from './from';
|
||||
import { empty } from './empty';
|
||||
export function defer(observableFactory) {
|
||||
return new Observable(function (subscriber) {
|
||||
var input;
|
||||
try {
|
||||
input = observableFactory();
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
var source = input ? from(input) : empty();
|
||||
return source.subscribe(subscriber);
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=defer.js.map
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
/** PURE_IMPORTS_START _AjaxObservable PURE_IMPORTS_END */
|
||||
import { AjaxObservable } from './AjaxObservable';
|
||||
export var ajax = AjaxObservable.create;
|
||||
//# sourceMappingURL=ajax.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _WebSocketSubject PURE_IMPORTS_END */
|
||||
import { WebSocketSubject } from './WebSocketSubject';
|
||||
export function webSocket(urlConfigOrSource) {
|
||||
return new WebSocketSubject(urlConfigOrSource);
|
||||
}
|
||||
//# sourceMappingURL=webSocket.js.map
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { isFunction } from '../util/isFunction';
|
||||
import { map } from '../operators/map';
|
||||
var toString = Object.prototype.toString;
|
||||
export function fromEvent(target, eventName, options, resultSelector) {
|
||||
if (isFunction(options)) {
|
||||
resultSelector = options;
|
||||
options = undefined;
|
||||
}
|
||||
if (resultSelector) {
|
||||
return fromEvent(target, eventName, options).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
function handler(e) {
|
||||
if (arguments.length > 1) {
|
||||
subscriber.next(Array.prototype.slice.call(arguments));
|
||||
}
|
||||
else {
|
||||
subscriber.next(e);
|
||||
}
|
||||
}
|
||||
setupSubscription(target, eventName, handler, subscriber, options);
|
||||
});
|
||||
}
|
||||
function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
|
||||
var unsubscribe;
|
||||
if (isEventTarget(sourceObj)) {
|
||||
var source_1 = sourceObj;
|
||||
sourceObj.addEventListener(eventName, handler, options);
|
||||
unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
|
||||
}
|
||||
else if (isJQueryStyleEventEmitter(sourceObj)) {
|
||||
var source_2 = sourceObj;
|
||||
sourceObj.on(eventName, handler);
|
||||
unsubscribe = function () { return source_2.off(eventName, handler); };
|
||||
}
|
||||
else if (isNodeStyleEventEmitter(sourceObj)) {
|
||||
var source_3 = sourceObj;
|
||||
sourceObj.addListener(eventName, handler);
|
||||
unsubscribe = function () { return source_3.removeListener(eventName, handler); };
|
||||
}
|
||||
else if (sourceObj && sourceObj.length) {
|
||||
for (var i = 0, len = sourceObj.length; i < len; i++) {
|
||||
setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new TypeError('Invalid event target');
|
||||
}
|
||||
subscriber.add(unsubscribe);
|
||||
}
|
||||
function isNodeStyleEventEmitter(sourceObj) {
|
||||
return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
|
||||
}
|
||||
function isJQueryStyleEventEmitter(sourceObj) {
|
||||
return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
|
||||
}
|
||||
function isEventTarget(sourceObj) {
|
||||
return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
|
||||
}
|
||||
//# sourceMappingURL=fromEvent.js.map
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { isFunction } from '../util/isFunction';
|
||||
import { map } from '../operators/map';
|
||||
export function fromEventPattern(addHandler, removeHandler, resultSelector) {
|
||||
if (resultSelector) {
|
||||
return fromEventPattern(addHandler, removeHandler).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
var handler = function () {
|
||||
var e = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
e[_i] = arguments[_i];
|
||||
}
|
||||
return subscriber.next(e.length === 1 ? e[0] : e);
|
||||
};
|
||||
var retValue;
|
||||
try {
|
||||
retValue = addHandler(handler);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
if (!isFunction(removeHandler)) {
|
||||
return undefined;
|
||||
}
|
||||
return function () { return removeHandler(handler, retValue); };
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=fromEventPattern.js.map
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { identity } from '../util/identity';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
|
||||
var resultSelector;
|
||||
var initialState;
|
||||
if (arguments.length == 1) {
|
||||
var options = initialStateOrOptions;
|
||||
initialState = options.initialState;
|
||||
condition = options.condition;
|
||||
iterate = options.iterate;
|
||||
resultSelector = options.resultSelector || identity;
|
||||
scheduler = options.scheduler;
|
||||
}
|
||||
else if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {
|
||||
initialState = initialStateOrOptions;
|
||||
resultSelector = identity;
|
||||
scheduler = resultSelectorOrObservable;
|
||||
}
|
||||
else {
|
||||
initialState = initialStateOrOptions;
|
||||
resultSelector = resultSelectorOrObservable;
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
var state = initialState;
|
||||
if (scheduler) {
|
||||
return scheduler.schedule(dispatch, 0, {
|
||||
subscriber: subscriber,
|
||||
iterate: iterate,
|
||||
condition: condition,
|
||||
resultSelector: resultSelector,
|
||||
state: state
|
||||
});
|
||||
}
|
||||
do {
|
||||
if (condition) {
|
||||
var conditionResult = void 0;
|
||||
try {
|
||||
conditionResult = condition(state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
if (!conditionResult) {
|
||||
subscriber.complete();
|
||||
break;
|
||||
}
|
||||
}
|
||||
var value = void 0;
|
||||
try {
|
||||
value = resultSelector(state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
subscriber.next(value);
|
||||
if (subscriber.closed) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
state = iterate(state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
} while (true);
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
function dispatch(state) {
|
||||
var subscriber = state.subscriber, condition = state.condition;
|
||||
if (subscriber.closed) {
|
||||
return undefined;
|
||||
}
|
||||
if (state.needIterate) {
|
||||
try {
|
||||
state.state = state.iterate(state.state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
else {
|
||||
state.needIterate = true;
|
||||
}
|
||||
if (condition) {
|
||||
var conditionResult = void 0;
|
||||
try {
|
||||
conditionResult = condition(state.state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
if (!conditionResult) {
|
||||
subscriber.complete();
|
||||
return undefined;
|
||||
}
|
||||
if (subscriber.closed) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
var value;
|
||||
try {
|
||||
value = state.resultSelector(state.state);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
if (subscriber.closed) {
|
||||
return undefined;
|
||||
}
|
||||
subscriber.next(value);
|
||||
if (subscriber.closed) {
|
||||
return undefined;
|
||||
}
|
||||
return this.schedule(state);
|
||||
}
|
||||
//# sourceMappingURL=generate.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"generate.js","sources":["../../../src/internal/observable/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA8PlD,MAAM,UAAU,QAAQ,CAAO,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,0BAA+D,EAC/D,SAAyB;IAEtD,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAEpB,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE;QACzB,IAAM,OAAO,GAAG,qBAA8C,CAAC;QAC/D,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACpC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QAC9B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC1B,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,QAA4B,CAAC;QACxE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;KAC/B;SAAM,IAAI,0BAA0B,KAAK,SAAS,IAAI,WAAW,CAAC,0BAA0B,CAAC,EAAE;QAC9F,YAAY,GAAG,qBAA0B,CAA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AAK,CAAC,CAAC;IACvB,IAAI,UAAU,CAAC,MAAM,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
|
||||
import { defer } from './defer';
|
||||
import { EMPTY } from './empty';
|
||||
export function iif(condition, trueResult, falseResult) {
|
||||
if (trueResult === void 0) {
|
||||
trueResult = EMPTY;
|
||||
}
|
||||
if (falseResult === void 0) {
|
||||
falseResult = EMPTY;
|
||||
}
|
||||
return defer(function () { return condition() ? trueResult : falseResult; });
|
||||
}
|
||||
//# sourceMappingURL=iif.js.map
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { async } from '../scheduler/async';
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
export function interval(period, scheduler) {
|
||||
if (period === void 0) {
|
||||
period = 0;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
if (!isNumeric(period) || period < 0) {
|
||||
period = 0;
|
||||
}
|
||||
if (!scheduler || typeof scheduler.schedule !== 'function') {
|
||||
scheduler = async;
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
|
||||
return subscriber;
|
||||
});
|
||||
}
|
||||
function dispatch(state) {
|
||||
var subscriber = state.subscriber, counter = state.counter, period = state.period;
|
||||
subscriber.next(counter);
|
||||
this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
|
||||
}
|
||||
//# sourceMappingURL=interval.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"interval.js","sources":["../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAmD9C,MAAM,UAAU,QAAQ,CAAC,MAAU,EACV,SAAgC;IADhC,uBAAA,EAAA,UAAU;IACV,0BAAA,EAAA,iBAAgC;IACvD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE;QACpC,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,UAAU,EAAE;QAC1D,SAAS,GAAG,KAAK,CAAC;KACnB;IAED,OAAO,IAAI,UAAU,CAAS,UAAA,UAAU;QACtC,UAAU,CAAC,GAAG,CACZ,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,UAAU,YAAA,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,CACzE,CAAC;QACF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAuC,KAAoB;IAClE,IAAA,6BAAU,EAAE,uBAAO,EAAE,qBAAM,CAAW;IAC9C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,YAAA,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,EAAE,MAAM,QAAA,EAAE,EAAE,MAAM,CAAC,CAAC;AACtE,CAAC"}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
import { mergeAll } from '../operators/mergeAll';
|
||||
import { fromArray } from './fromArray';
|
||||
export function merge() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
var concurrent = Number.POSITIVE_INFINITY;
|
||||
var scheduler = null;
|
||||
var last = observables[observables.length - 1];
|
||||
if (isScheduler(last)) {
|
||||
scheduler = observables.pop();
|
||||
if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
|
||||
concurrent = observables.pop();
|
||||
}
|
||||
}
|
||||
else if (typeof last === 'number') {
|
||||
concurrent = observables.pop();
|
||||
}
|
||||
if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {
|
||||
return observables[0];
|
||||
}
|
||||
return mergeAll(concurrent)(fromArray(observables, scheduler));
|
||||
}
|
||||
//# sourceMappingURL=merge.js.map
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { noop } from '../util/noop';
|
||||
export var NEVER = /*@__PURE__*/ new Observable(noop);
|
||||
export function never() {
|
||||
return NEVER;
|
||||
}
|
||||
//# sourceMappingURL=never.js.map
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { from } from './from';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { EMPTY } from './empty';
|
||||
export function onErrorResumeNext() {
|
||||
var sources = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
sources[_i] = arguments[_i];
|
||||
}
|
||||
if (sources.length === 0) {
|
||||
return EMPTY;
|
||||
}
|
||||
var first = sources[0], remainder = sources.slice(1);
|
||||
if (sources.length === 1 && isArray(first)) {
|
||||
return onErrorResumeNext.apply(void 0, first);
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
|
||||
return from(first).subscribe({
|
||||
next: function (value) { subscriber.next(value); },
|
||||
error: subNext,
|
||||
complete: subNext,
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=onErrorResumeNext.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"onErrorResumeNext.js","sources":["../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwEhC,MAAM,UAAU,iBAAiB;IAAO,iBAEqD;SAFrD,UAEqD,EAFrD,qBAEqD,EAFrD,IAEqD;QAFrD,4BAEqD;;IAE3F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC;KACd;IAEO,IAAA,kBAAK,EAAE,4BAAY,CAAa;IAExC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;QAC1C,OAAO,iBAAiB,eAAI,KAAK,EAAE;KACpC;IAED,OAAO,IAAI,UAAU,CAAC,UAAA,UAAU;QAC9B,IAAM,OAAO,GAAG,cAAM,OAAA,UAAU,CAAC,GAAG,CAClC,iBAAiB,eAAI,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,CACtD,EAFqB,CAErB,CAAC;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;YAC3B,IAAI,YAAC,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvC,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscription } from '../Subscription';
|
||||
export function pairs(obj, scheduler) {
|
||||
if (!scheduler) {
|
||||
return new Observable(function (subscriber) {
|
||||
var keys = Object.keys(obj);
|
||||
for (var i = 0; i < keys.length && !subscriber.closed; i++) {
|
||||
var key = keys[i];
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
subscriber.next([key, obj[key]]);
|
||||
}
|
||||
}
|
||||
subscriber.complete();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new Observable(function (subscriber) {
|
||||
var keys = Object.keys(obj);
|
||||
var subscription = new Subscription();
|
||||
subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
|
||||
return subscription;
|
||||
});
|
||||
}
|
||||
}
|
||||
export function dispatch(state) {
|
||||
var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
|
||||
if (!subscriber.closed) {
|
||||
if (index < keys.length) {
|
||||
var key = keys[index];
|
||||
subscriber.next([key, obj[key]]);
|
||||
subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
|
||||
}
|
||||
else {
|
||||
subscriber.complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=pairs.js.map
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { isArray } from '../util/isArray';
|
||||
import { fromArray } from './fromArray';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function race() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
if (observables.length === 1) {
|
||||
if (isArray(observables[0])) {
|
||||
observables = observables[0];
|
||||
}
|
||||
else {
|
||||
return observables[0];
|
||||
}
|
||||
}
|
||||
return fromArray(observables, undefined).lift(new RaceOperator());
|
||||
}
|
||||
var RaceOperator = /*@__PURE__*/ (function () {
|
||||
function RaceOperator() {
|
||||
}
|
||||
RaceOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new RaceSubscriber(subscriber));
|
||||
};
|
||||
return RaceOperator;
|
||||
}());
|
||||
export { RaceOperator };
|
||||
var RaceSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(RaceSubscriber, _super);
|
||||
function RaceSubscriber(destination) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.hasFirst = false;
|
||||
_this.observables = [];
|
||||
_this.subscriptions = [];
|
||||
return _this;
|
||||
}
|
||||
RaceSubscriber.prototype._next = function (observable) {
|
||||
this.observables.push(observable);
|
||||
};
|
||||
RaceSubscriber.prototype._complete = function () {
|
||||
var observables = this.observables;
|
||||
var len = observables.length;
|
||||
if (len === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < len && !this.hasFirst; i++) {
|
||||
var observable = observables[i];
|
||||
var subscription = subscribeToResult(this, observable, observable, i);
|
||||
if (this.subscriptions) {
|
||||
this.subscriptions.push(subscription);
|
||||
}
|
||||
this.add(subscription);
|
||||
}
|
||||
this.observables = null;
|
||||
}
|
||||
};
|
||||
RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
if (!this.hasFirst) {
|
||||
this.hasFirst = true;
|
||||
for (var i = 0; i < this.subscriptions.length; i++) {
|
||||
if (i !== outerIndex) {
|
||||
var subscription = this.subscriptions[i];
|
||||
subscription.unsubscribe();
|
||||
this.remove(subscription);
|
||||
}
|
||||
}
|
||||
this.subscriptions = null;
|
||||
}
|
||||
this.destination.next(innerValue);
|
||||
};
|
||||
return RaceSubscriber;
|
||||
}(OuterSubscriber));
|
||||
export { RaceSubscriber };
|
||||
//# sourceMappingURL=race.js.map
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
export function throwError(error, scheduler) {
|
||||
if (!scheduler) {
|
||||
return new Observable(function (subscriber) { return subscriber.error(error); });
|
||||
}
|
||||
else {
|
||||
return new Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
|
||||
}
|
||||
}
|
||||
function dispatch(_a) {
|
||||
var error = _a.error, subscriber = _a.subscriber;
|
||||
subscriber.error(error);
|
||||
}
|
||||
//# sourceMappingURL=throwError.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"throwError.js","sources":["../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAoE3C,MAAM,UAAU,UAAU,CAAC,KAAU,EAAE,SAAyB;IAC9D,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,UAAU,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAvB,CAAuB,CAAC,CAAC;KAC9D;SAAM;QACL,OAAO,IAAI,UAAU,CAAC,UAAA,UAAU,IAAI,OAAA,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,KAAK,OAAA,EAAE,UAAU,YAAA,EAAE,CAAC,EAAtD,CAAsD,CAAC,CAAC;KAC7F;AACH,CAAC;AAOD,SAAS,QAAQ,CAAC,EAAkC;QAAhC,gBAAK,EAAE,0BAAU;IACnC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC"}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { async } from '../scheduler/async';
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
export function timer(dueTime, periodOrScheduler, scheduler) {
|
||||
if (dueTime === void 0) {
|
||||
dueTime = 0;
|
||||
}
|
||||
var period = -1;
|
||||
if (isNumeric(periodOrScheduler)) {
|
||||
period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
|
||||
}
|
||||
else if (isScheduler(periodOrScheduler)) {
|
||||
scheduler = periodOrScheduler;
|
||||
}
|
||||
if (!isScheduler(scheduler)) {
|
||||
scheduler = async;
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
var due = isNumeric(dueTime)
|
||||
? dueTime
|
||||
: (+dueTime - scheduler.now());
|
||||
return scheduler.schedule(dispatch, due, {
|
||||
index: 0, period: period, subscriber: subscriber
|
||||
});
|
||||
});
|
||||
}
|
||||
function dispatch(state) {
|
||||
var index = state.index, period = state.period, subscriber = state.subscriber;
|
||||
subscriber.next(index);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
else if (period === -1) {
|
||||
return subscriber.complete();
|
||||
}
|
||||
state.index = index + 1;
|
||||
this.schedule(state, period);
|
||||
}
|
||||
//# sourceMappingURL=timer.js.map
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { from } from './from';
|
||||
import { EMPTY } from './empty';
|
||||
export function using(resourceFactory, observableFactory) {
|
||||
return new Observable(function (subscriber) {
|
||||
var resource;
|
||||
try {
|
||||
resource = resourceFactory();
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
var result;
|
||||
try {
|
||||
result = observableFactory(resource);
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return undefined;
|
||||
}
|
||||
var source = result ? from(result) : EMPTY;
|
||||
var subscription = source.subscribe(subscriber);
|
||||
return function () {
|
||||
subscription.unsubscribe();
|
||||
if (resource) {
|
||||
resource.unsubscribe();
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=using.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"using.js","sources":["../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA8BhC,MAAM,UAAU,KAAK,CAAI,eAA4C,EAC5C,iBAAiF;IACxG,OAAO,IAAI,UAAU,CAAI,UAAA,UAAU;QACjC,IAAI,QAA+B,CAAC;QAEpC,IAAI;YACF,QAAQ,GAAG,eAAe,EAAE,CAAC;SAC9B;QAAC,OAAO,GAAG,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtB,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,MAAiC,CAAC;QACtC,IAAI;YACF,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;SACtC;QAAC,OAAO,GAAG,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtB,OAAO,SAAS,CAAC;SAClB;QAED,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC7C,IAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAClD,OAAO;YACL,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
-218
@@ -1,218 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { fromArray } from './fromArray';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { iterator as Symbol_iterator } from '../../internal/symbol/iterator';
|
||||
export function zip() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
var resultSelector = observables[observables.length - 1];
|
||||
if (typeof resultSelector === 'function') {
|
||||
observables.pop();
|
||||
}
|
||||
return fromArray(observables, undefined).lift(new ZipOperator(resultSelector));
|
||||
}
|
||||
var ZipOperator = /*@__PURE__*/ (function () {
|
||||
function ZipOperator(resultSelector) {
|
||||
this.resultSelector = resultSelector;
|
||||
}
|
||||
ZipOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
|
||||
};
|
||||
return ZipOperator;
|
||||
}());
|
||||
export { ZipOperator };
|
||||
var ZipSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(ZipSubscriber, _super);
|
||||
function ZipSubscriber(destination, resultSelector, values) {
|
||||
if (values === void 0) {
|
||||
values = Object.create(null);
|
||||
}
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.iterators = [];
|
||||
_this.active = 0;
|
||||
_this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
|
||||
_this.values = values;
|
||||
return _this;
|
||||
}
|
||||
ZipSubscriber.prototype._next = function (value) {
|
||||
var iterators = this.iterators;
|
||||
if (isArray(value)) {
|
||||
iterators.push(new StaticArrayIterator(value));
|
||||
}
|
||||
else if (typeof value[Symbol_iterator] === 'function') {
|
||||
iterators.push(new StaticIterator(value[Symbol_iterator]()));
|
||||
}
|
||||
else {
|
||||
iterators.push(new ZipBufferIterator(this.destination, this, value));
|
||||
}
|
||||
};
|
||||
ZipSubscriber.prototype._complete = function () {
|
||||
var iterators = this.iterators;
|
||||
var len = iterators.length;
|
||||
this.unsubscribe();
|
||||
if (len === 0) {
|
||||
this.destination.complete();
|
||||
return;
|
||||
}
|
||||
this.active = len;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var iterator = iterators[i];
|
||||
if (iterator.stillUnsubscribed) {
|
||||
var destination = this.destination;
|
||||
destination.add(iterator.subscribe(iterator, i));
|
||||
}
|
||||
else {
|
||||
this.active--;
|
||||
}
|
||||
}
|
||||
};
|
||||
ZipSubscriber.prototype.notifyInactive = function () {
|
||||
this.active--;
|
||||
if (this.active === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
ZipSubscriber.prototype.checkIterators = function () {
|
||||
var iterators = this.iterators;
|
||||
var len = iterators.length;
|
||||
var destination = this.destination;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var iterator = iterators[i];
|
||||
if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var shouldComplete = false;
|
||||
var args = [];
|
||||
for (var i = 0; i < len; i++) {
|
||||
var iterator = iterators[i];
|
||||
var result = iterator.next();
|
||||
if (iterator.hasCompleted()) {
|
||||
shouldComplete = true;
|
||||
}
|
||||
if (result.done) {
|
||||
destination.complete();
|
||||
return;
|
||||
}
|
||||
args.push(result.value);
|
||||
}
|
||||
if (this.resultSelector) {
|
||||
this._tryresultSelector(args);
|
||||
}
|
||||
else {
|
||||
destination.next(args);
|
||||
}
|
||||
if (shouldComplete) {
|
||||
destination.complete();
|
||||
}
|
||||
};
|
||||
ZipSubscriber.prototype._tryresultSelector = function (args) {
|
||||
var result;
|
||||
try {
|
||||
result = this.resultSelector.apply(this, args);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.destination.next(result);
|
||||
};
|
||||
return ZipSubscriber;
|
||||
}(Subscriber));
|
||||
export { ZipSubscriber };
|
||||
var StaticIterator = /*@__PURE__*/ (function () {
|
||||
function StaticIterator(iterator) {
|
||||
this.iterator = iterator;
|
||||
this.nextResult = iterator.next();
|
||||
}
|
||||
StaticIterator.prototype.hasValue = function () {
|
||||
return true;
|
||||
};
|
||||
StaticIterator.prototype.next = function () {
|
||||
var result = this.nextResult;
|
||||
this.nextResult = this.iterator.next();
|
||||
return result;
|
||||
};
|
||||
StaticIterator.prototype.hasCompleted = function () {
|
||||
var nextResult = this.nextResult;
|
||||
return nextResult && nextResult.done;
|
||||
};
|
||||
return StaticIterator;
|
||||
}());
|
||||
var StaticArrayIterator = /*@__PURE__*/ (function () {
|
||||
function StaticArrayIterator(array) {
|
||||
this.array = array;
|
||||
this.index = 0;
|
||||
this.length = 0;
|
||||
this.length = array.length;
|
||||
}
|
||||
StaticArrayIterator.prototype[Symbol_iterator] = function () {
|
||||
return this;
|
||||
};
|
||||
StaticArrayIterator.prototype.next = function (value) {
|
||||
var i = this.index++;
|
||||
var array = this.array;
|
||||
return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
|
||||
};
|
||||
StaticArrayIterator.prototype.hasValue = function () {
|
||||
return this.array.length > this.index;
|
||||
};
|
||||
StaticArrayIterator.prototype.hasCompleted = function () {
|
||||
return this.array.length === this.index;
|
||||
};
|
||||
return StaticArrayIterator;
|
||||
}());
|
||||
var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(ZipBufferIterator, _super);
|
||||
function ZipBufferIterator(destination, parent, observable) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.parent = parent;
|
||||
_this.observable = observable;
|
||||
_this.stillUnsubscribed = true;
|
||||
_this.buffer = [];
|
||||
_this.isComplete = false;
|
||||
return _this;
|
||||
}
|
||||
ZipBufferIterator.prototype[Symbol_iterator] = function () {
|
||||
return this;
|
||||
};
|
||||
ZipBufferIterator.prototype.next = function () {
|
||||
var buffer = this.buffer;
|
||||
if (buffer.length === 0 && this.isComplete) {
|
||||
return { value: null, done: true };
|
||||
}
|
||||
else {
|
||||
return { value: buffer.shift(), done: false };
|
||||
}
|
||||
};
|
||||
ZipBufferIterator.prototype.hasValue = function () {
|
||||
return this.buffer.length > 0;
|
||||
};
|
||||
ZipBufferIterator.prototype.hasCompleted = function () {
|
||||
return this.buffer.length === 0 && this.isComplete;
|
||||
};
|
||||
ZipBufferIterator.prototype.notifyComplete = function () {
|
||||
if (this.buffer.length > 0) {
|
||||
this.isComplete = true;
|
||||
this.parent.notifyInactive();
|
||||
}
|
||||
else {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.buffer.push(innerValue);
|
||||
this.parent.checkIterators();
|
||||
};
|
||||
ZipBufferIterator.prototype.subscribe = function (value, index) {
|
||||
return subscribeToResult(this, this.observable, this, index);
|
||||
};
|
||||
return ZipBufferIterator;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=zip.js.map
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
|
||||
import { async } from '../scheduler/async';
|
||||
import { audit } from './audit';
|
||||
import { timer } from '../observable/timer';
|
||||
export function auditTime(duration, scheduler) {
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
return audit(function () { return timer(duration, scheduler); });
|
||||
}
|
||||
//# sourceMappingURL=auditTime.js.map
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function buffer(closingNotifier) {
|
||||
return function bufferOperatorFunction(source) {
|
||||
return source.lift(new BufferOperator(closingNotifier));
|
||||
};
|
||||
}
|
||||
var BufferOperator = /*@__PURE__*/ (function () {
|
||||
function BufferOperator(closingNotifier) {
|
||||
this.closingNotifier = closingNotifier;
|
||||
}
|
||||
BufferOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
|
||||
};
|
||||
return BufferOperator;
|
||||
}());
|
||||
var BufferSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BufferSubscriber, _super);
|
||||
function BufferSubscriber(destination, closingNotifier) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.buffer = [];
|
||||
_this.add(subscribeToResult(_this, closingNotifier));
|
||||
return _this;
|
||||
}
|
||||
BufferSubscriber.prototype._next = function (value) {
|
||||
this.buffer.push(value);
|
||||
};
|
||||
BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
var buffer = this.buffer;
|
||||
this.buffer = [];
|
||||
this.destination.next(buffer);
|
||||
};
|
||||
return BufferSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=buffer.js.map
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function bufferCount(bufferSize, startBufferEvery) {
|
||||
if (startBufferEvery === void 0) {
|
||||
startBufferEvery = null;
|
||||
}
|
||||
return function bufferCountOperatorFunction(source) {
|
||||
return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
|
||||
};
|
||||
}
|
||||
var BufferCountOperator = /*@__PURE__*/ (function () {
|
||||
function BufferCountOperator(bufferSize, startBufferEvery) {
|
||||
this.bufferSize = bufferSize;
|
||||
this.startBufferEvery = startBufferEvery;
|
||||
if (!startBufferEvery || bufferSize === startBufferEvery) {
|
||||
this.subscriberClass = BufferCountSubscriber;
|
||||
}
|
||||
else {
|
||||
this.subscriberClass = BufferSkipCountSubscriber;
|
||||
}
|
||||
}
|
||||
BufferCountOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
|
||||
};
|
||||
return BufferCountOperator;
|
||||
}());
|
||||
var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BufferCountSubscriber, _super);
|
||||
function BufferCountSubscriber(destination, bufferSize) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.bufferSize = bufferSize;
|
||||
_this.buffer = [];
|
||||
return _this;
|
||||
}
|
||||
BufferCountSubscriber.prototype._next = function (value) {
|
||||
var buffer = this.buffer;
|
||||
buffer.push(value);
|
||||
if (buffer.length == this.bufferSize) {
|
||||
this.destination.next(buffer);
|
||||
this.buffer = [];
|
||||
}
|
||||
};
|
||||
BufferCountSubscriber.prototype._complete = function () {
|
||||
var buffer = this.buffer;
|
||||
if (buffer.length > 0) {
|
||||
this.destination.next(buffer);
|
||||
}
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
return BufferCountSubscriber;
|
||||
}(Subscriber));
|
||||
var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BufferSkipCountSubscriber, _super);
|
||||
function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.bufferSize = bufferSize;
|
||||
_this.startBufferEvery = startBufferEvery;
|
||||
_this.buffers = [];
|
||||
_this.count = 0;
|
||||
return _this;
|
||||
}
|
||||
BufferSkipCountSubscriber.prototype._next = function (value) {
|
||||
var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
|
||||
this.count++;
|
||||
if (count % startBufferEvery === 0) {
|
||||
buffers.push([]);
|
||||
}
|
||||
for (var i = buffers.length; i--;) {
|
||||
var buffer = buffers[i];
|
||||
buffer.push(value);
|
||||
if (buffer.length === bufferSize) {
|
||||
buffers.splice(i, 1);
|
||||
this.destination.next(buffer);
|
||||
}
|
||||
}
|
||||
};
|
||||
BufferSkipCountSubscriber.prototype._complete = function () {
|
||||
var _a = this, buffers = _a.buffers, destination = _a.destination;
|
||||
while (buffers.length > 0) {
|
||||
var buffer = buffers.shift();
|
||||
if (buffer.length > 0) {
|
||||
destination.next(buffer);
|
||||
}
|
||||
}
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
return BufferSkipCountSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=bufferCount.js.map
|
||||
-148
@@ -1,148 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { async } from '../scheduler/async';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
export function bufferTime(bufferTimeSpan) {
|
||||
var length = arguments.length;
|
||||
var scheduler = async;
|
||||
if (isScheduler(arguments[arguments.length - 1])) {
|
||||
scheduler = arguments[arguments.length - 1];
|
||||
length--;
|
||||
}
|
||||
var bufferCreationInterval = null;
|
||||
if (length >= 2) {
|
||||
bufferCreationInterval = arguments[1];
|
||||
}
|
||||
var maxBufferSize = Number.POSITIVE_INFINITY;
|
||||
if (length >= 3) {
|
||||
maxBufferSize = arguments[2];
|
||||
}
|
||||
return function bufferTimeOperatorFunction(source) {
|
||||
return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
|
||||
};
|
||||
}
|
||||
var BufferTimeOperator = /*@__PURE__*/ (function () {
|
||||
function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
|
||||
this.bufferTimeSpan = bufferTimeSpan;
|
||||
this.bufferCreationInterval = bufferCreationInterval;
|
||||
this.maxBufferSize = maxBufferSize;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
BufferTimeOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
|
||||
};
|
||||
return BufferTimeOperator;
|
||||
}());
|
||||
var Context = /*@__PURE__*/ (function () {
|
||||
function Context() {
|
||||
this.buffer = [];
|
||||
}
|
||||
return Context;
|
||||
}());
|
||||
var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BufferTimeSubscriber, _super);
|
||||
function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.bufferTimeSpan = bufferTimeSpan;
|
||||
_this.bufferCreationInterval = bufferCreationInterval;
|
||||
_this.maxBufferSize = maxBufferSize;
|
||||
_this.scheduler = scheduler;
|
||||
_this.contexts = [];
|
||||
var context = _this.openContext();
|
||||
_this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
|
||||
if (_this.timespanOnly) {
|
||||
var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
|
||||
_this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
|
||||
}
|
||||
else {
|
||||
var closeState = { subscriber: _this, context: context };
|
||||
var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
|
||||
_this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
|
||||
_this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
BufferTimeSubscriber.prototype._next = function (value) {
|
||||
var contexts = this.contexts;
|
||||
var len = contexts.length;
|
||||
var filledBufferContext;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var context_1 = contexts[i];
|
||||
var buffer = context_1.buffer;
|
||||
buffer.push(value);
|
||||
if (buffer.length == this.maxBufferSize) {
|
||||
filledBufferContext = context_1;
|
||||
}
|
||||
}
|
||||
if (filledBufferContext) {
|
||||
this.onBufferFull(filledBufferContext);
|
||||
}
|
||||
};
|
||||
BufferTimeSubscriber.prototype._error = function (err) {
|
||||
this.contexts.length = 0;
|
||||
_super.prototype._error.call(this, err);
|
||||
};
|
||||
BufferTimeSubscriber.prototype._complete = function () {
|
||||
var _a = this, contexts = _a.contexts, destination = _a.destination;
|
||||
while (contexts.length > 0) {
|
||||
var context_2 = contexts.shift();
|
||||
destination.next(context_2.buffer);
|
||||
}
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
BufferTimeSubscriber.prototype._unsubscribe = function () {
|
||||
this.contexts = null;
|
||||
};
|
||||
BufferTimeSubscriber.prototype.onBufferFull = function (context) {
|
||||
this.closeContext(context);
|
||||
var closeAction = context.closeAction;
|
||||
closeAction.unsubscribe();
|
||||
this.remove(closeAction);
|
||||
if (!this.closed && this.timespanOnly) {
|
||||
context = this.openContext();
|
||||
var bufferTimeSpan = this.bufferTimeSpan;
|
||||
var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
|
||||
this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
|
||||
}
|
||||
};
|
||||
BufferTimeSubscriber.prototype.openContext = function () {
|
||||
var context = new Context();
|
||||
this.contexts.push(context);
|
||||
return context;
|
||||
};
|
||||
BufferTimeSubscriber.prototype.closeContext = function (context) {
|
||||
this.destination.next(context.buffer);
|
||||
var contexts = this.contexts;
|
||||
var spliceIndex = contexts ? contexts.indexOf(context) : -1;
|
||||
if (spliceIndex >= 0) {
|
||||
contexts.splice(contexts.indexOf(context), 1);
|
||||
}
|
||||
};
|
||||
return BufferTimeSubscriber;
|
||||
}(Subscriber));
|
||||
function dispatchBufferTimeSpanOnly(state) {
|
||||
var subscriber = state.subscriber;
|
||||
var prevContext = state.context;
|
||||
if (prevContext) {
|
||||
subscriber.closeContext(prevContext);
|
||||
}
|
||||
if (!subscriber.closed) {
|
||||
state.context = subscriber.openContext();
|
||||
state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
|
||||
}
|
||||
}
|
||||
function dispatchBufferCreation(state) {
|
||||
var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
|
||||
var context = subscriber.openContext();
|
||||
var action = this;
|
||||
if (!subscriber.closed) {
|
||||
subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
|
||||
action.schedule(state, bufferCreationInterval);
|
||||
}
|
||||
}
|
||||
function dispatchBufferClose(arg) {
|
||||
var subscriber = arg.subscriber, context = arg.context;
|
||||
subscriber.closeContext(context);
|
||||
}
|
||||
//# sourceMappingURL=bufferTime.js.map
|
||||
-107
@@ -1,107 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscription } from '../Subscription';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
export function bufferToggle(openings, closingSelector) {
|
||||
return function bufferToggleOperatorFunction(source) {
|
||||
return source.lift(new BufferToggleOperator(openings, closingSelector));
|
||||
};
|
||||
}
|
||||
var BufferToggleOperator = /*@__PURE__*/ (function () {
|
||||
function BufferToggleOperator(openings, closingSelector) {
|
||||
this.openings = openings;
|
||||
this.closingSelector = closingSelector;
|
||||
}
|
||||
BufferToggleOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
|
||||
};
|
||||
return BufferToggleOperator;
|
||||
}());
|
||||
var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BufferToggleSubscriber, _super);
|
||||
function BufferToggleSubscriber(destination, openings, closingSelector) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.openings = openings;
|
||||
_this.closingSelector = closingSelector;
|
||||
_this.contexts = [];
|
||||
_this.add(subscribeToResult(_this, openings));
|
||||
return _this;
|
||||
}
|
||||
BufferToggleSubscriber.prototype._next = function (value) {
|
||||
var contexts = this.contexts;
|
||||
var len = contexts.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
contexts[i].buffer.push(value);
|
||||
}
|
||||
};
|
||||
BufferToggleSubscriber.prototype._error = function (err) {
|
||||
var contexts = this.contexts;
|
||||
while (contexts.length > 0) {
|
||||
var context_1 = contexts.shift();
|
||||
context_1.subscription.unsubscribe();
|
||||
context_1.buffer = null;
|
||||
context_1.subscription = null;
|
||||
}
|
||||
this.contexts = null;
|
||||
_super.prototype._error.call(this, err);
|
||||
};
|
||||
BufferToggleSubscriber.prototype._complete = function () {
|
||||
var contexts = this.contexts;
|
||||
while (contexts.length > 0) {
|
||||
var context_2 = contexts.shift();
|
||||
this.destination.next(context_2.buffer);
|
||||
context_2.subscription.unsubscribe();
|
||||
context_2.buffer = null;
|
||||
context_2.subscription = null;
|
||||
}
|
||||
this.contexts = null;
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
|
||||
};
|
||||
BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
this.closeBuffer(innerSub.context);
|
||||
};
|
||||
BufferToggleSubscriber.prototype.openBuffer = function (value) {
|
||||
try {
|
||||
var closingSelector = this.closingSelector;
|
||||
var closingNotifier = closingSelector.call(this, value);
|
||||
if (closingNotifier) {
|
||||
this.trySubscribe(closingNotifier);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this._error(err);
|
||||
}
|
||||
};
|
||||
BufferToggleSubscriber.prototype.closeBuffer = function (context) {
|
||||
var contexts = this.contexts;
|
||||
if (contexts && context) {
|
||||
var buffer = context.buffer, subscription = context.subscription;
|
||||
this.destination.next(buffer);
|
||||
contexts.splice(contexts.indexOf(context), 1);
|
||||
this.remove(subscription);
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
};
|
||||
BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
|
||||
var contexts = this.contexts;
|
||||
var buffer = [];
|
||||
var subscription = new Subscription();
|
||||
var context = { buffer: buffer, subscription: subscription };
|
||||
contexts.push(context);
|
||||
var innerSubscription = subscribeToResult(this, closingNotifier, context);
|
||||
if (!innerSubscription || innerSubscription.closed) {
|
||||
this.closeBuffer(context);
|
||||
}
|
||||
else {
|
||||
innerSubscription.context = context;
|
||||
this.add(innerSubscription);
|
||||
subscription.add(innerSubscription);
|
||||
}
|
||||
};
|
||||
return BufferToggleSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=bufferToggle.js.map
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { InnerSubscriber } from '../InnerSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function catchError(selector) {
|
||||
return function catchErrorOperatorFunction(source) {
|
||||
var operator = new CatchOperator(selector);
|
||||
var caught = source.lift(operator);
|
||||
return (operator.caught = caught);
|
||||
};
|
||||
}
|
||||
var CatchOperator = /*@__PURE__*/ (function () {
|
||||
function CatchOperator(selector) {
|
||||
this.selector = selector;
|
||||
}
|
||||
CatchOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
|
||||
};
|
||||
return CatchOperator;
|
||||
}());
|
||||
var CatchSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(CatchSubscriber, _super);
|
||||
function CatchSubscriber(destination, selector, caught) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.selector = selector;
|
||||
_this.caught = caught;
|
||||
return _this;
|
||||
}
|
||||
CatchSubscriber.prototype.error = function (err) {
|
||||
if (!this.isStopped) {
|
||||
var result = void 0;
|
||||
try {
|
||||
result = this.selector(err, this.caught);
|
||||
}
|
||||
catch (err2) {
|
||||
_super.prototype.error.call(this, err2);
|
||||
return;
|
||||
}
|
||||
this._unsubscribeAndRecycle();
|
||||
var innerSubscriber = new InnerSubscriber(this, undefined, undefined);
|
||||
this.add(innerSubscriber);
|
||||
subscribeToResult(this, result, undefined, undefined, innerSubscriber);
|
||||
}
|
||||
};
|
||||
return CatchSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=catchError.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
|
||||
import { CombineLatestOperator } from '../observable/combineLatest';
|
||||
export function combineAll(project) {
|
||||
return function (source) { return source.lift(new CombineLatestOperator(project)); };
|
||||
}
|
||||
//# sourceMappingURL=combineAll.js.map
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
|
||||
import { isArray } from '../util/isArray';
|
||||
import { CombineLatestOperator } from '../observable/combineLatest';
|
||||
import { from } from '../observable/from';
|
||||
var none = {};
|
||||
export function combineLatest() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
var project = null;
|
||||
if (typeof observables[observables.length - 1] === 'function') {
|
||||
project = observables.pop();
|
||||
}
|
||||
if (observables.length === 1 && isArray(observables[0])) {
|
||||
observables = observables[0].slice();
|
||||
}
|
||||
return function (source) { return source.lift.call(from([source].concat(observables)), new CombineLatestOperator(project)); };
|
||||
}
|
||||
//# sourceMappingURL=combineLatest.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"combineLatest.js","sources":["../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI1C,IAAM,IAAI,GAAG,EAAE,CAAC;AAoChB,MAAM,UAAU,aAAa;IAAO,qBAE+C;SAF/C,UAE+C,EAF/C,qBAE+C,EAF/C,IAE+C;QAF/C,gCAE+C;;IACjF,IAAI,OAAO,GAAiC,IAAI,CAAC;IACjD,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,UAAU,EAAE;QAC7D,OAAO,GAAiC,WAAW,CAAC,GAAG,EAAE,CAAC;KAC3D;IAID,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;QACvD,WAAW,GAAS,WAAW,CAAC,CAAC,CAAE,CAAC,KAAK,EAAE,CAAC;KAC7C;IAED,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,SAAK,WAAW,EAAE,EAAE,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC,EAApF,CAAoF,CAAC;AACzH,CAAC"}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
|
||||
import { concat as concatStatic } from '../observable/concat';
|
||||
export function concat() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
return function (source) { return source.lift.call(concatStatic.apply(void 0, [source].concat(observables))); };
|
||||
}
|
||||
//# sourceMappingURL=concat.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
|
||||
import { mergeAll } from './mergeAll';
|
||||
export function concatAll() {
|
||||
return mergeAll(1);
|
||||
}
|
||||
//# sourceMappingURL=concatAll.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
|
||||
import { mergeMap } from './mergeMap';
|
||||
export function concatMap(project, resultSelector) {
|
||||
return mergeMap(project, resultSelector, 1);
|
||||
}
|
||||
//# sourceMappingURL=concatMap.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
|
||||
import { concatMap } from './concatMap';
|
||||
export function concatMapTo(innerObservable, resultSelector) {
|
||||
return concatMap(function () { return innerObservable; }, resultSelector);
|
||||
}
|
||||
//# sourceMappingURL=concatMapTo.js.map
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function count(predicate) {
|
||||
return function (source) { return source.lift(new CountOperator(predicate, source)); };
|
||||
}
|
||||
var CountOperator = /*@__PURE__*/ (function () {
|
||||
function CountOperator(predicate, source) {
|
||||
this.predicate = predicate;
|
||||
this.source = source;
|
||||
}
|
||||
CountOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
|
||||
};
|
||||
return CountOperator;
|
||||
}());
|
||||
var CountSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(CountSubscriber, _super);
|
||||
function CountSubscriber(destination, predicate, source) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.predicate = predicate;
|
||||
_this.source = source;
|
||||
_this.count = 0;
|
||||
_this.index = 0;
|
||||
return _this;
|
||||
}
|
||||
CountSubscriber.prototype._next = function (value) {
|
||||
if (this.predicate) {
|
||||
this._tryPredicate(value);
|
||||
}
|
||||
else {
|
||||
this.count++;
|
||||
}
|
||||
};
|
||||
CountSubscriber.prototype._tryPredicate = function (value) {
|
||||
var result;
|
||||
try {
|
||||
result = this.predicate(value, this.index++, this.source);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
if (result) {
|
||||
this.count++;
|
||||
}
|
||||
};
|
||||
CountSubscriber.prototype._complete = function () {
|
||||
this.destination.next(this.count);
|
||||
this.destination.complete();
|
||||
};
|
||||
return CountSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=count.js.map
|
||||
-76
@@ -1,76 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function debounce(durationSelector) {
|
||||
return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
|
||||
}
|
||||
var DebounceOperator = /*@__PURE__*/ (function () {
|
||||
function DebounceOperator(durationSelector) {
|
||||
this.durationSelector = durationSelector;
|
||||
}
|
||||
DebounceOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
|
||||
};
|
||||
return DebounceOperator;
|
||||
}());
|
||||
var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DebounceSubscriber, _super);
|
||||
function DebounceSubscriber(destination, durationSelector) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.durationSelector = durationSelector;
|
||||
_this.hasValue = false;
|
||||
_this.durationSubscription = null;
|
||||
return _this;
|
||||
}
|
||||
DebounceSubscriber.prototype._next = function (value) {
|
||||
try {
|
||||
var result = this.durationSelector.call(this, value);
|
||||
if (result) {
|
||||
this._tryNext(value, result);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
};
|
||||
DebounceSubscriber.prototype._complete = function () {
|
||||
this.emitValue();
|
||||
this.destination.complete();
|
||||
};
|
||||
DebounceSubscriber.prototype._tryNext = function (value, duration) {
|
||||
var subscription = this.durationSubscription;
|
||||
this.value = value;
|
||||
this.hasValue = true;
|
||||
if (subscription) {
|
||||
subscription.unsubscribe();
|
||||
this.remove(subscription);
|
||||
}
|
||||
subscription = subscribeToResult(this, duration);
|
||||
if (subscription && !subscription.closed) {
|
||||
this.add(this.durationSubscription = subscription);
|
||||
}
|
||||
};
|
||||
DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.emitValue();
|
||||
};
|
||||
DebounceSubscriber.prototype.notifyComplete = function () {
|
||||
this.emitValue();
|
||||
};
|
||||
DebounceSubscriber.prototype.emitValue = function () {
|
||||
if (this.hasValue) {
|
||||
var value = this.value;
|
||||
var subscription = this.durationSubscription;
|
||||
if (subscription) {
|
||||
this.durationSubscription = null;
|
||||
subscription.unsubscribe();
|
||||
this.remove(subscription);
|
||||
}
|
||||
this.value = null;
|
||||
this.hasValue = false;
|
||||
_super.prototype._next.call(this, value);
|
||||
}
|
||||
};
|
||||
return DebounceSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=debounce.js.map
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { async } from '../scheduler/async';
|
||||
export function debounceTime(dueTime, scheduler) {
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
|
||||
}
|
||||
var DebounceTimeOperator = /*@__PURE__*/ (function () {
|
||||
function DebounceTimeOperator(dueTime, scheduler) {
|
||||
this.dueTime = dueTime;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
DebounceTimeOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
|
||||
};
|
||||
return DebounceTimeOperator;
|
||||
}());
|
||||
var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DebounceTimeSubscriber, _super);
|
||||
function DebounceTimeSubscriber(destination, dueTime, scheduler) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.dueTime = dueTime;
|
||||
_this.scheduler = scheduler;
|
||||
_this.debouncedSubscription = null;
|
||||
_this.lastValue = null;
|
||||
_this.hasValue = false;
|
||||
return _this;
|
||||
}
|
||||
DebounceTimeSubscriber.prototype._next = function (value) {
|
||||
this.clearDebounce();
|
||||
this.lastValue = value;
|
||||
this.hasValue = true;
|
||||
this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
|
||||
};
|
||||
DebounceTimeSubscriber.prototype._complete = function () {
|
||||
this.debouncedNext();
|
||||
this.destination.complete();
|
||||
};
|
||||
DebounceTimeSubscriber.prototype.debouncedNext = function () {
|
||||
this.clearDebounce();
|
||||
if (this.hasValue) {
|
||||
var lastValue = this.lastValue;
|
||||
this.lastValue = null;
|
||||
this.hasValue = false;
|
||||
this.destination.next(lastValue);
|
||||
}
|
||||
};
|
||||
DebounceTimeSubscriber.prototype.clearDebounce = function () {
|
||||
var debouncedSubscription = this.debouncedSubscription;
|
||||
if (debouncedSubscription !== null) {
|
||||
this.remove(debouncedSubscription);
|
||||
debouncedSubscription.unsubscribe();
|
||||
this.debouncedSubscription = null;
|
||||
}
|
||||
};
|
||||
return DebounceTimeSubscriber;
|
||||
}(Subscriber));
|
||||
function dispatchNext(subscriber) {
|
||||
subscriber.debouncedNext();
|
||||
}
|
||||
//# sourceMappingURL=debounceTime.js.map
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function defaultIfEmpty(defaultValue) {
|
||||
if (defaultValue === void 0) {
|
||||
defaultValue = null;
|
||||
}
|
||||
return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
|
||||
}
|
||||
var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
|
||||
function DefaultIfEmptyOperator(defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
|
||||
};
|
||||
return DefaultIfEmptyOperator;
|
||||
}());
|
||||
var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DefaultIfEmptySubscriber, _super);
|
||||
function DefaultIfEmptySubscriber(destination, defaultValue) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.defaultValue = defaultValue;
|
||||
_this.isEmpty = true;
|
||||
return _this;
|
||||
}
|
||||
DefaultIfEmptySubscriber.prototype._next = function (value) {
|
||||
this.isEmpty = false;
|
||||
this.destination.next(value);
|
||||
};
|
||||
DefaultIfEmptySubscriber.prototype._complete = function () {
|
||||
if (this.isEmpty) {
|
||||
this.destination.next(this.defaultValue);
|
||||
}
|
||||
this.destination.complete();
|
||||
};
|
||||
return DefaultIfEmptySubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=defaultIfEmpty.js.map
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { async } from '../scheduler/async';
|
||||
import { isDate } from '../util/isDate';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Notification } from '../Notification';
|
||||
export function delay(delay, scheduler) {
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
var absoluteDelay = isDate(delay);
|
||||
var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
|
||||
return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
|
||||
}
|
||||
var DelayOperator = /*@__PURE__*/ (function () {
|
||||
function DelayOperator(delay, scheduler) {
|
||||
this.delay = delay;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
DelayOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
|
||||
};
|
||||
return DelayOperator;
|
||||
}());
|
||||
var DelaySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DelaySubscriber, _super);
|
||||
function DelaySubscriber(destination, delay, scheduler) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.delay = delay;
|
||||
_this.scheduler = scheduler;
|
||||
_this.queue = [];
|
||||
_this.active = false;
|
||||
_this.errored = false;
|
||||
return _this;
|
||||
}
|
||||
DelaySubscriber.dispatch = function (state) {
|
||||
var source = state.source;
|
||||
var queue = source.queue;
|
||||
var scheduler = state.scheduler;
|
||||
var destination = state.destination;
|
||||
while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
|
||||
queue.shift().notification.observe(destination);
|
||||
}
|
||||
if (queue.length > 0) {
|
||||
var delay_1 = Math.max(0, queue[0].time - scheduler.now());
|
||||
this.schedule(state, delay_1);
|
||||
}
|
||||
else {
|
||||
this.unsubscribe();
|
||||
source.active = false;
|
||||
}
|
||||
};
|
||||
DelaySubscriber.prototype._schedule = function (scheduler) {
|
||||
this.active = true;
|
||||
var destination = this.destination;
|
||||
destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
|
||||
source: this, destination: this.destination, scheduler: scheduler
|
||||
}));
|
||||
};
|
||||
DelaySubscriber.prototype.scheduleNotification = function (notification) {
|
||||
if (this.errored === true) {
|
||||
return;
|
||||
}
|
||||
var scheduler = this.scheduler;
|
||||
var message = new DelayMessage(scheduler.now() + this.delay, notification);
|
||||
this.queue.push(message);
|
||||
if (this.active === false) {
|
||||
this._schedule(scheduler);
|
||||
}
|
||||
};
|
||||
DelaySubscriber.prototype._next = function (value) {
|
||||
this.scheduleNotification(Notification.createNext(value));
|
||||
};
|
||||
DelaySubscriber.prototype._error = function (err) {
|
||||
this.errored = true;
|
||||
this.queue = [];
|
||||
this.destination.error(err);
|
||||
this.unsubscribe();
|
||||
};
|
||||
DelaySubscriber.prototype._complete = function () {
|
||||
this.scheduleNotification(Notification.createComplete());
|
||||
this.unsubscribe();
|
||||
};
|
||||
return DelaySubscriber;
|
||||
}(Subscriber));
|
||||
var DelayMessage = /*@__PURE__*/ (function () {
|
||||
function DelayMessage(time, notification) {
|
||||
this.time = time;
|
||||
this.notification = notification;
|
||||
}
|
||||
return DelayMessage;
|
||||
}());
|
||||
//# sourceMappingURL=delay.js.map
|
||||
-132
@@ -1,132 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Observable } from '../Observable';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function delayWhen(delayDurationSelector, subscriptionDelay) {
|
||||
if (subscriptionDelay) {
|
||||
return function (source) {
|
||||
return new SubscriptionDelayObservable(source, subscriptionDelay)
|
||||
.lift(new DelayWhenOperator(delayDurationSelector));
|
||||
};
|
||||
}
|
||||
return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
|
||||
}
|
||||
var DelayWhenOperator = /*@__PURE__*/ (function () {
|
||||
function DelayWhenOperator(delayDurationSelector) {
|
||||
this.delayDurationSelector = delayDurationSelector;
|
||||
}
|
||||
DelayWhenOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
|
||||
};
|
||||
return DelayWhenOperator;
|
||||
}());
|
||||
var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DelayWhenSubscriber, _super);
|
||||
function DelayWhenSubscriber(destination, delayDurationSelector) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.delayDurationSelector = delayDurationSelector;
|
||||
_this.completed = false;
|
||||
_this.delayNotifierSubscriptions = [];
|
||||
_this.index = 0;
|
||||
return _this;
|
||||
}
|
||||
DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.destination.next(outerValue);
|
||||
this.removeSubscription(innerSub);
|
||||
this.tryComplete();
|
||||
};
|
||||
DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
|
||||
this._error(error);
|
||||
};
|
||||
DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
var value = this.removeSubscription(innerSub);
|
||||
if (value) {
|
||||
this.destination.next(value);
|
||||
}
|
||||
this.tryComplete();
|
||||
};
|
||||
DelayWhenSubscriber.prototype._next = function (value) {
|
||||
var index = this.index++;
|
||||
try {
|
||||
var delayNotifier = this.delayDurationSelector(value, index);
|
||||
if (delayNotifier) {
|
||||
this.tryDelay(delayNotifier, value);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
};
|
||||
DelayWhenSubscriber.prototype._complete = function () {
|
||||
this.completed = true;
|
||||
this.tryComplete();
|
||||
this.unsubscribe();
|
||||
};
|
||||
DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
|
||||
subscription.unsubscribe();
|
||||
var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
|
||||
if (subscriptionIdx !== -1) {
|
||||
this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
|
||||
}
|
||||
return subscription.outerValue;
|
||||
};
|
||||
DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
|
||||
var notifierSubscription = subscribeToResult(this, delayNotifier, value);
|
||||
if (notifierSubscription && !notifierSubscription.closed) {
|
||||
var destination = this.destination;
|
||||
destination.add(notifierSubscription);
|
||||
this.delayNotifierSubscriptions.push(notifierSubscription);
|
||||
}
|
||||
};
|
||||
DelayWhenSubscriber.prototype.tryComplete = function () {
|
||||
if (this.completed && this.delayNotifierSubscriptions.length === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return DelayWhenSubscriber;
|
||||
}(OuterSubscriber));
|
||||
var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SubscriptionDelayObservable, _super);
|
||||
function SubscriptionDelayObservable(source, subscriptionDelay) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.source = source;
|
||||
_this.subscriptionDelay = subscriptionDelay;
|
||||
return _this;
|
||||
}
|
||||
SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
|
||||
this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
|
||||
};
|
||||
return SubscriptionDelayObservable;
|
||||
}(Observable));
|
||||
var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SubscriptionDelaySubscriber, _super);
|
||||
function SubscriptionDelaySubscriber(parent, source) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.parent = parent;
|
||||
_this.source = source;
|
||||
_this.sourceSubscribed = false;
|
||||
return _this;
|
||||
}
|
||||
SubscriptionDelaySubscriber.prototype._next = function (unused) {
|
||||
this.subscribeToSource();
|
||||
};
|
||||
SubscriptionDelaySubscriber.prototype._error = function (err) {
|
||||
this.unsubscribe();
|
||||
this.parent.error(err);
|
||||
};
|
||||
SubscriptionDelaySubscriber.prototype._complete = function () {
|
||||
this.unsubscribe();
|
||||
this.subscribeToSource();
|
||||
};
|
||||
SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
|
||||
if (!this.sourceSubscribed) {
|
||||
this.sourceSubscribed = true;
|
||||
this.unsubscribe();
|
||||
this.source.subscribe(this.parent);
|
||||
}
|
||||
};
|
||||
return SubscriptionDelaySubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=delayWhen.js.map
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function dematerialize() {
|
||||
return function dematerializeOperatorFunction(source) {
|
||||
return source.lift(new DeMaterializeOperator());
|
||||
};
|
||||
}
|
||||
var DeMaterializeOperator = /*@__PURE__*/ (function () {
|
||||
function DeMaterializeOperator() {
|
||||
}
|
||||
DeMaterializeOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DeMaterializeSubscriber(subscriber));
|
||||
};
|
||||
return DeMaterializeOperator;
|
||||
}());
|
||||
var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DeMaterializeSubscriber, _super);
|
||||
function DeMaterializeSubscriber(destination) {
|
||||
return _super.call(this, destination) || this;
|
||||
}
|
||||
DeMaterializeSubscriber.prototype._next = function (value) {
|
||||
value.observe(this.destination);
|
||||
};
|
||||
return DeMaterializeSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=dematerialize.js.map
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function distinct(keySelector, flushes) {
|
||||
return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
|
||||
}
|
||||
var DistinctOperator = /*@__PURE__*/ (function () {
|
||||
function DistinctOperator(keySelector, flushes) {
|
||||
this.keySelector = keySelector;
|
||||
this.flushes = flushes;
|
||||
}
|
||||
DistinctOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
|
||||
};
|
||||
return DistinctOperator;
|
||||
}());
|
||||
var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(DistinctSubscriber, _super);
|
||||
function DistinctSubscriber(destination, keySelector, flushes) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.keySelector = keySelector;
|
||||
_this.values = new Set();
|
||||
if (flushes) {
|
||||
_this.add(subscribeToResult(_this, flushes));
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.values.clear();
|
||||
};
|
||||
DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
|
||||
this._error(error);
|
||||
};
|
||||
DistinctSubscriber.prototype._next = function (value) {
|
||||
if (this.keySelector) {
|
||||
this._useKeySelector(value);
|
||||
}
|
||||
else {
|
||||
this._finalizeNext(value, value);
|
||||
}
|
||||
};
|
||||
DistinctSubscriber.prototype._useKeySelector = function (value) {
|
||||
var key;
|
||||
var destination = this.destination;
|
||||
try {
|
||||
key = this.keySelector(value);
|
||||
}
|
||||
catch (err) {
|
||||
destination.error(err);
|
||||
return;
|
||||
}
|
||||
this._finalizeNext(key, value);
|
||||
};
|
||||
DistinctSubscriber.prototype._finalizeNext = function (key, value) {
|
||||
var values = this.values;
|
||||
if (!values.has(key)) {
|
||||
values.add(key);
|
||||
this.destination.next(value);
|
||||
}
|
||||
};
|
||||
return DistinctSubscriber;
|
||||
}(OuterSubscriber));
|
||||
export { DistinctSubscriber };
|
||||
//# sourceMappingURL=distinct.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
|
||||
import { distinctUntilChanged } from './distinctUntilChanged';
|
||||
export function distinctUntilKeyChanged(key, compare) {
|
||||
return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
|
||||
}
|
||||
//# sourceMappingURL=distinctUntilKeyChanged.js.map
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
|
||||
import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';
|
||||
import { filter } from './filter';
|
||||
import { throwIfEmpty } from './throwIfEmpty';
|
||||
import { defaultIfEmpty } from './defaultIfEmpty';
|
||||
import { take } from './take';
|
||||
export function elementAt(index, defaultValue) {
|
||||
if (index < 0) {
|
||||
throw new ArgumentOutOfRangeError();
|
||||
}
|
||||
var hasDefaultValue = arguments.length >= 2;
|
||||
return function (source) {
|
||||
return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue
|
||||
? defaultIfEmpty(defaultValue)
|
||||
: throwIfEmpty(function () { return new ArgumentOutOfRangeError(); }));
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=elementAt.js.map
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function every(predicate, thisArg) {
|
||||
return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
|
||||
}
|
||||
var EveryOperator = /*@__PURE__*/ (function () {
|
||||
function EveryOperator(predicate, thisArg, source) {
|
||||
this.predicate = predicate;
|
||||
this.thisArg = thisArg;
|
||||
this.source = source;
|
||||
}
|
||||
EveryOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
|
||||
};
|
||||
return EveryOperator;
|
||||
}());
|
||||
var EverySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(EverySubscriber, _super);
|
||||
function EverySubscriber(destination, predicate, thisArg, source) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.predicate = predicate;
|
||||
_this.thisArg = thisArg;
|
||||
_this.source = source;
|
||||
_this.index = 0;
|
||||
_this.thisArg = thisArg || _this;
|
||||
return _this;
|
||||
}
|
||||
EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
|
||||
this.destination.next(everyValueMatch);
|
||||
this.destination.complete();
|
||||
};
|
||||
EverySubscriber.prototype._next = function (value) {
|
||||
var result = false;
|
||||
try {
|
||||
result = this.predicate.call(this.thisArg, value, this.index++, this.source);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
if (!result) {
|
||||
this.notifyComplete(false);
|
||||
}
|
||||
};
|
||||
EverySubscriber.prototype._complete = function () {
|
||||
this.notifyComplete(true);
|
||||
};
|
||||
return EverySubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=every.js.map
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
export function exhaust() {
|
||||
return function (source) { return source.lift(new SwitchFirstOperator()); };
|
||||
}
|
||||
var SwitchFirstOperator = /*@__PURE__*/ (function () {
|
||||
function SwitchFirstOperator() {
|
||||
}
|
||||
SwitchFirstOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new SwitchFirstSubscriber(subscriber));
|
||||
};
|
||||
return SwitchFirstOperator;
|
||||
}());
|
||||
var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(SwitchFirstSubscriber, _super);
|
||||
function SwitchFirstSubscriber(destination) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.hasCompleted = false;
|
||||
_this.hasSubscription = false;
|
||||
return _this;
|
||||
}
|
||||
SwitchFirstSubscriber.prototype._next = function (value) {
|
||||
if (!this.hasSubscription) {
|
||||
this.hasSubscription = true;
|
||||
this.add(subscribeToResult(this, value));
|
||||
}
|
||||
};
|
||||
SwitchFirstSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (!this.hasSubscription) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
this.remove(innerSub);
|
||||
this.hasSubscription = false;
|
||||
if (this.hasCompleted) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return SwitchFirstSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=exhaust.js.map
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function filter(predicate, thisArg) {
|
||||
return function filterOperatorFunction(source) {
|
||||
return source.lift(new FilterOperator(predicate, thisArg));
|
||||
};
|
||||
}
|
||||
var FilterOperator = /*@__PURE__*/ (function () {
|
||||
function FilterOperator(predicate, thisArg) {
|
||||
this.predicate = predicate;
|
||||
this.thisArg = thisArg;
|
||||
}
|
||||
FilterOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
|
||||
};
|
||||
return FilterOperator;
|
||||
}());
|
||||
var FilterSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(FilterSubscriber, _super);
|
||||
function FilterSubscriber(destination, predicate, thisArg) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.predicate = predicate;
|
||||
_this.thisArg = thisArg;
|
||||
_this.count = 0;
|
||||
return _this;
|
||||
}
|
||||
FilterSubscriber.prototype._next = function (value) {
|
||||
var result;
|
||||
try {
|
||||
result = this.predicate.call(this.thisArg, value, this.count++);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
if (result) {
|
||||
this.destination.next(value);
|
||||
}
|
||||
};
|
||||
return FilterSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=filter.js.map
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Subscription } from '../Subscription';
|
||||
export function finalize(callback) {
|
||||
return function (source) { return source.lift(new FinallyOperator(callback)); };
|
||||
}
|
||||
var FinallyOperator = /*@__PURE__*/ (function () {
|
||||
function FinallyOperator(callback) {
|
||||
this.callback = callback;
|
||||
}
|
||||
FinallyOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new FinallySubscriber(subscriber, this.callback));
|
||||
};
|
||||
return FinallyOperator;
|
||||
}());
|
||||
var FinallySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(FinallySubscriber, _super);
|
||||
function FinallySubscriber(destination, callback) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.add(new Subscription(callback));
|
||||
return _this;
|
||||
}
|
||||
return FinallySubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=finalize.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"finalize.js","sources":["../../../src/internal/operators/finalize.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAY/C,MAAM,UAAU,QAAQ,CAAI,QAAoB;IAC9C,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,EAA1C,CAA0C,CAAC;AAC/E,CAAC;AAED;IACE,yBAAoB,QAAoB;QAApB,aAAQ,GAAR,QAAQ,CAAY;IACxC,CAAC;IAED,8BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5E,CAAC;IACH,sBAAC;AAAD,CAAC,AAPD,IAOC;AAOD;IAAmC,6CAAa;IAC9C,2BAAY,WAA0B,EAAE,QAAoB;QAA5D,YACE,kBAAM,WAAW,CAAC,SAEnB;QADC,KAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;;IACvC,CAAC;IACH,wBAAC;AAAD,CAAC,AALD,CAAmC,UAAU,GAK5C"}
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function find(predicate, thisArg) {
|
||||
if (typeof predicate !== 'function') {
|
||||
throw new TypeError('predicate is not a function');
|
||||
}
|
||||
return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
|
||||
}
|
||||
var FindValueOperator = /*@__PURE__*/ (function () {
|
||||
function FindValueOperator(predicate, source, yieldIndex, thisArg) {
|
||||
this.predicate = predicate;
|
||||
this.source = source;
|
||||
this.yieldIndex = yieldIndex;
|
||||
this.thisArg = thisArg;
|
||||
}
|
||||
FindValueOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
|
||||
};
|
||||
return FindValueOperator;
|
||||
}());
|
||||
export { FindValueOperator };
|
||||
var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(FindValueSubscriber, _super);
|
||||
function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.predicate = predicate;
|
||||
_this.source = source;
|
||||
_this.yieldIndex = yieldIndex;
|
||||
_this.thisArg = thisArg;
|
||||
_this.index = 0;
|
||||
return _this;
|
||||
}
|
||||
FindValueSubscriber.prototype.notifyComplete = function (value) {
|
||||
var destination = this.destination;
|
||||
destination.next(value);
|
||||
destination.complete();
|
||||
this.unsubscribe();
|
||||
};
|
||||
FindValueSubscriber.prototype._next = function (value) {
|
||||
var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
|
||||
var index = this.index++;
|
||||
try {
|
||||
var result = predicate.call(thisArg || this, value, index, this.source);
|
||||
if (result) {
|
||||
this.notifyComplete(this.yieldIndex ? index : value);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
};
|
||||
FindValueSubscriber.prototype._complete = function () {
|
||||
this.notifyComplete(this.yieldIndex ? -1 : undefined);
|
||||
};
|
||||
return FindValueSubscriber;
|
||||
}(Subscriber));
|
||||
export { FindValueSubscriber };
|
||||
//# sourceMappingURL=find.js.map
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
|
||||
import { FindValueOperator } from '../operators/find';
|
||||
export function findIndex(predicate, thisArg) {
|
||||
return function (source) { return source.lift(new FindValueOperator(predicate, source, true, thisArg)); };
|
||||
}
|
||||
//# sourceMappingURL=findIndex.js.map
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
|
||||
import { EmptyError } from '../util/EmptyError';
|
||||
import { filter } from './filter';
|
||||
import { take } from './take';
|
||||
import { defaultIfEmpty } from './defaultIfEmpty';
|
||||
import { throwIfEmpty } from './throwIfEmpty';
|
||||
import { identity } from '../util/identity';
|
||||
export function first(predicate, defaultValue) {
|
||||
var hasDefaultValue = arguments.length >= 2;
|
||||
return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };
|
||||
}
|
||||
//# sourceMappingURL=first.js.map
|
||||
-182
@@ -1,182 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { Observable } from '../Observable';
|
||||
import { Subject } from '../Subject';
|
||||
export function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
|
||||
return function (source) {
|
||||
return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
|
||||
};
|
||||
}
|
||||
var GroupByOperator = /*@__PURE__*/ (function () {
|
||||
function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
|
||||
this.keySelector = keySelector;
|
||||
this.elementSelector = elementSelector;
|
||||
this.durationSelector = durationSelector;
|
||||
this.subjectSelector = subjectSelector;
|
||||
}
|
||||
GroupByOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
|
||||
};
|
||||
return GroupByOperator;
|
||||
}());
|
||||
var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(GroupBySubscriber, _super);
|
||||
function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.keySelector = keySelector;
|
||||
_this.elementSelector = elementSelector;
|
||||
_this.durationSelector = durationSelector;
|
||||
_this.subjectSelector = subjectSelector;
|
||||
_this.groups = null;
|
||||
_this.attemptedToUnsubscribe = false;
|
||||
_this.count = 0;
|
||||
return _this;
|
||||
}
|
||||
GroupBySubscriber.prototype._next = function (value) {
|
||||
var key;
|
||||
try {
|
||||
key = this.keySelector(value);
|
||||
}
|
||||
catch (err) {
|
||||
this.error(err);
|
||||
return;
|
||||
}
|
||||
this._group(value, key);
|
||||
};
|
||||
GroupBySubscriber.prototype._group = function (value, key) {
|
||||
var groups = this.groups;
|
||||
if (!groups) {
|
||||
groups = this.groups = new Map();
|
||||
}
|
||||
var group = groups.get(key);
|
||||
var element;
|
||||
if (this.elementSelector) {
|
||||
try {
|
||||
element = this.elementSelector(value);
|
||||
}
|
||||
catch (err) {
|
||||
this.error(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
element = value;
|
||||
}
|
||||
if (!group) {
|
||||
group = (this.subjectSelector ? this.subjectSelector() : new Subject());
|
||||
groups.set(key, group);
|
||||
var groupedObservable = new GroupedObservable(key, group, this);
|
||||
this.destination.next(groupedObservable);
|
||||
if (this.durationSelector) {
|
||||
var duration = void 0;
|
||||
try {
|
||||
duration = this.durationSelector(new GroupedObservable(key, group));
|
||||
}
|
||||
catch (err) {
|
||||
this.error(err);
|
||||
return;
|
||||
}
|
||||
this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
|
||||
}
|
||||
}
|
||||
if (!group.closed) {
|
||||
group.next(element);
|
||||
}
|
||||
};
|
||||
GroupBySubscriber.prototype._error = function (err) {
|
||||
var groups = this.groups;
|
||||
if (groups) {
|
||||
groups.forEach(function (group, key) {
|
||||
group.error(err);
|
||||
});
|
||||
groups.clear();
|
||||
}
|
||||
this.destination.error(err);
|
||||
};
|
||||
GroupBySubscriber.prototype._complete = function () {
|
||||
var groups = this.groups;
|
||||
if (groups) {
|
||||
groups.forEach(function (group, key) {
|
||||
group.complete();
|
||||
});
|
||||
groups.clear();
|
||||
}
|
||||
this.destination.complete();
|
||||
};
|
||||
GroupBySubscriber.prototype.removeGroup = function (key) {
|
||||
this.groups.delete(key);
|
||||
};
|
||||
GroupBySubscriber.prototype.unsubscribe = function () {
|
||||
if (!this.closed) {
|
||||
this.attemptedToUnsubscribe = true;
|
||||
if (this.count === 0) {
|
||||
_super.prototype.unsubscribe.call(this);
|
||||
}
|
||||
}
|
||||
};
|
||||
return GroupBySubscriber;
|
||||
}(Subscriber));
|
||||
var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(GroupDurationSubscriber, _super);
|
||||
function GroupDurationSubscriber(key, group, parent) {
|
||||
var _this = _super.call(this, group) || this;
|
||||
_this.key = key;
|
||||
_this.group = group;
|
||||
_this.parent = parent;
|
||||
return _this;
|
||||
}
|
||||
GroupDurationSubscriber.prototype._next = function (value) {
|
||||
this.complete();
|
||||
};
|
||||
GroupDurationSubscriber.prototype._unsubscribe = function () {
|
||||
var _a = this, parent = _a.parent, key = _a.key;
|
||||
this.key = this.parent = null;
|
||||
if (parent) {
|
||||
parent.removeGroup(key);
|
||||
}
|
||||
};
|
||||
return GroupDurationSubscriber;
|
||||
}(Subscriber));
|
||||
var GroupedObservable = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(GroupedObservable, _super);
|
||||
function GroupedObservable(key, groupSubject, refCountSubscription) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.key = key;
|
||||
_this.groupSubject = groupSubject;
|
||||
_this.refCountSubscription = refCountSubscription;
|
||||
return _this;
|
||||
}
|
||||
GroupedObservable.prototype._subscribe = function (subscriber) {
|
||||
var subscription = new Subscription();
|
||||
var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
|
||||
if (refCountSubscription && !refCountSubscription.closed) {
|
||||
subscription.add(new InnerRefCountSubscription(refCountSubscription));
|
||||
}
|
||||
subscription.add(groupSubject.subscribe(subscriber));
|
||||
return subscription;
|
||||
};
|
||||
return GroupedObservable;
|
||||
}(Observable));
|
||||
export { GroupedObservable };
|
||||
var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(InnerRefCountSubscription, _super);
|
||||
function InnerRefCountSubscription(parent) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.parent = parent;
|
||||
parent.count++;
|
||||
return _this;
|
||||
}
|
||||
InnerRefCountSubscription.prototype.unsubscribe = function () {
|
||||
var parent = this.parent;
|
||||
if (!parent.closed && !this.closed) {
|
||||
_super.prototype.unsubscribe.call(this);
|
||||
parent.count -= 1;
|
||||
if (parent.count === 0 && parent.attemptedToUnsubscribe) {
|
||||
parent.unsubscribe();
|
||||
}
|
||||
}
|
||||
};
|
||||
return InnerRefCountSubscription;
|
||||
}(Subscription));
|
||||
//# sourceMappingURL=groupBy.js.map
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function ignoreElements() {
|
||||
return function ignoreElementsOperatorFunction(source) {
|
||||
return source.lift(new IgnoreElementsOperator());
|
||||
};
|
||||
}
|
||||
var IgnoreElementsOperator = /*@__PURE__*/ (function () {
|
||||
function IgnoreElementsOperator() {
|
||||
}
|
||||
IgnoreElementsOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new IgnoreElementsSubscriber(subscriber));
|
||||
};
|
||||
return IgnoreElementsOperator;
|
||||
}());
|
||||
var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(IgnoreElementsSubscriber, _super);
|
||||
function IgnoreElementsSubscriber() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
IgnoreElementsSubscriber.prototype._next = function (unused) {
|
||||
};
|
||||
return IgnoreElementsSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=ignoreElements.js.map
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
||||
export { audit } from './audit';
|
||||
export { auditTime } from './auditTime';
|
||||
export { buffer } from './buffer';
|
||||
export { bufferCount } from './bufferCount';
|
||||
export { bufferTime } from './bufferTime';
|
||||
export { bufferToggle } from './bufferToggle';
|
||||
export { bufferWhen } from './bufferWhen';
|
||||
export { catchError } from './catchError';
|
||||
export { combineAll } from './combineAll';
|
||||
export { combineLatest } from './combineLatest';
|
||||
export { concat } from './concat';
|
||||
export { concatAll } from './concatAll';
|
||||
export { concatMap } from './concatMap';
|
||||
export { concatMapTo } from './concatMapTo';
|
||||
export { count } from './count';
|
||||
export { debounce } from './debounce';
|
||||
export { debounceTime } from './debounceTime';
|
||||
export { defaultIfEmpty } from './defaultIfEmpty';
|
||||
export { delay } from './delay';
|
||||
export { delayWhen } from './delayWhen';
|
||||
export { dematerialize } from './dematerialize';
|
||||
export { distinct } from './distinct';
|
||||
export { distinctUntilChanged } from './distinctUntilChanged';
|
||||
export { distinctUntilKeyChanged } from './distinctUntilKeyChanged';
|
||||
export { elementAt } from './elementAt';
|
||||
export { every } from './every';
|
||||
export { exhaust } from './exhaust';
|
||||
export { exhaustMap } from './exhaustMap';
|
||||
export { expand } from './expand';
|
||||
export { filter } from './filter';
|
||||
export { finalize } from './finalize';
|
||||
export { find } from './find';
|
||||
export { findIndex } from './findIndex';
|
||||
export { first } from './first';
|
||||
export { groupBy } from './groupBy';
|
||||
export { ignoreElements } from './ignoreElements';
|
||||
export { isEmpty } from './isEmpty';
|
||||
export { last } from './last';
|
||||
export { map } from './map';
|
||||
export { mapTo } from './mapTo';
|
||||
export { materialize } from './materialize';
|
||||
export { max } from './max';
|
||||
export { merge } from './merge';
|
||||
export { mergeAll } from './mergeAll';
|
||||
export { mergeMap } from './mergeMap';
|
||||
export { mergeMap as flatMap } from './mergeMap';
|
||||
export { mergeMapTo } from './mergeMapTo';
|
||||
export { mergeScan } from './mergeScan';
|
||||
export { min } from './min';
|
||||
export { multicast } from './multicast';
|
||||
export { observeOn } from './observeOn';
|
||||
export { onErrorResumeNext } from './onErrorResumeNext';
|
||||
export { pairwise } from './pairwise';
|
||||
export { partition } from './partition';
|
||||
export { pluck } from './pluck';
|
||||
export { publish } from './publish';
|
||||
export { publishBehavior } from './publishBehavior';
|
||||
export { publishLast } from './publishLast';
|
||||
export { publishReplay } from './publishReplay';
|
||||
export { race } from './race';
|
||||
export { reduce } from './reduce';
|
||||
export { repeat } from './repeat';
|
||||
export { repeatWhen } from './repeatWhen';
|
||||
export { retry } from './retry';
|
||||
export { retryWhen } from './retryWhen';
|
||||
export { refCount } from './refCount';
|
||||
export { sample } from './sample';
|
||||
export { sampleTime } from './sampleTime';
|
||||
export { scan } from './scan';
|
||||
export { sequenceEqual } from './sequenceEqual';
|
||||
export { share } from './share';
|
||||
export { shareReplay } from './shareReplay';
|
||||
export { single } from './single';
|
||||
export { skip } from './skip';
|
||||
export { skipLast } from './skipLast';
|
||||
export { skipUntil } from './skipUntil';
|
||||
export { skipWhile } from './skipWhile';
|
||||
export { startWith } from './startWith';
|
||||
export { subscribeOn } from './subscribeOn';
|
||||
export { switchAll } from './switchAll';
|
||||
export { switchMap } from './switchMap';
|
||||
export { switchMapTo } from './switchMapTo';
|
||||
export { take } from './take';
|
||||
export { takeLast } from './takeLast';
|
||||
export { takeUntil } from './takeUntil';
|
||||
export { takeWhile } from './takeWhile';
|
||||
export { tap } from './tap';
|
||||
export { throttle } from './throttle';
|
||||
export { throttleTime } from './throttleTime';
|
||||
export { timeInterval } from './timeInterval';
|
||||
export { timeout } from './timeout';
|
||||
export { timeoutWith } from './timeoutWith';
|
||||
export { timestamp } from './timestamp';
|
||||
export { toArray } from './toArray';
|
||||
export { window } from './window';
|
||||
export { windowCount } from './windowCount';
|
||||
export { windowTime } from './windowTime';
|
||||
export { windowToggle } from './windowToggle';
|
||||
export { windowWhen } from './windowWhen';
|
||||
export { withLatestFrom } from './withLatestFrom';
|
||||
export { zip } from './zip';
|
||||
export { zipAll } from './zipAll';
|
||||
//# sourceMappingURL=index.js.map
|
||||
-1
@@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AU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function isEmpty() {
|
||||
return function (source) { return source.lift(new IsEmptyOperator()); };
|
||||
}
|
||||
var IsEmptyOperator = /*@__PURE__*/ (function () {
|
||||
function IsEmptyOperator() {
|
||||
}
|
||||
IsEmptyOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new IsEmptySubscriber(observer));
|
||||
};
|
||||
return IsEmptyOperator;
|
||||
}());
|
||||
var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(IsEmptySubscriber, _super);
|
||||
function IsEmptySubscriber(destination) {
|
||||
return _super.call(this, destination) || this;
|
||||
}
|
||||
IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
|
||||
var destination = this.destination;
|
||||
destination.next(isEmpty);
|
||||
destination.complete();
|
||||
};
|
||||
IsEmptySubscriber.prototype._next = function (value) {
|
||||
this.notifyComplete(false);
|
||||
};
|
||||
IsEmptySubscriber.prototype._complete = function () {
|
||||
this.notifyComplete(true);
|
||||
};
|
||||
return IsEmptySubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=isEmpty.js.map
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
|
||||
import { EmptyError } from '../util/EmptyError';
|
||||
import { filter } from './filter';
|
||||
import { takeLast } from './takeLast';
|
||||
import { throwIfEmpty } from './throwIfEmpty';
|
||||
import { defaultIfEmpty } from './defaultIfEmpty';
|
||||
import { identity } from '../util/identity';
|
||||
export function last(predicate, defaultValue) {
|
||||
var hasDefaultValue = arguments.length >= 2;
|
||||
return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };
|
||||
}
|
||||
//# sourceMappingURL=last.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"last.js","sources":["../../../src/internal/operators/last.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkC5C,MAAM,UAAU,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAC3C,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,QAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,cAAc,CAAQ,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,UAAU,EAAE,EAAhB,CAAgB,CAAC,CAC7F,EAJiC,CAIjC,CAAC;AACJ,CAAC"}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function map(project, thisArg) {
|
||||
return function mapOperation(source) {
|
||||
if (typeof project !== 'function') {
|
||||
throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
|
||||
}
|
||||
return source.lift(new MapOperator(project, thisArg));
|
||||
};
|
||||
}
|
||||
var MapOperator = /*@__PURE__*/ (function () {
|
||||
function MapOperator(project, thisArg) {
|
||||
this.project = project;
|
||||
this.thisArg = thisArg;
|
||||
}
|
||||
MapOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
|
||||
};
|
||||
return MapOperator;
|
||||
}());
|
||||
export { MapOperator };
|
||||
var MapSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(MapSubscriber, _super);
|
||||
function MapSubscriber(destination, project, thisArg) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.project = project;
|
||||
_this.count = 0;
|
||||
_this.thisArg = thisArg || _this;
|
||||
return _this;
|
||||
}
|
||||
MapSubscriber.prototype._next = function (value) {
|
||||
var result;
|
||||
try {
|
||||
result = this.project.call(this.thisArg, value, this.count++);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.destination.next(result);
|
||||
};
|
||||
return MapSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=map.js.map
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function mapTo(value) {
|
||||
return function (source) { return source.lift(new MapToOperator(value)); };
|
||||
}
|
||||
var MapToOperator = /*@__PURE__*/ (function () {
|
||||
function MapToOperator(value) {
|
||||
this.value = value;
|
||||
}
|
||||
MapToOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new MapToSubscriber(subscriber, this.value));
|
||||
};
|
||||
return MapToOperator;
|
||||
}());
|
||||
var MapToSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(MapToSubscriber, _super);
|
||||
function MapToSubscriber(destination, value) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.value = value;
|
||||
return _this;
|
||||
}
|
||||
MapToSubscriber.prototype._next = function (x) {
|
||||
this.destination.next(this.value);
|
||||
};
|
||||
return MapToSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=mapTo.js.map
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Notification } from '../Notification';
|
||||
export function materialize() {
|
||||
return function materializeOperatorFunction(source) {
|
||||
return source.lift(new MaterializeOperator());
|
||||
};
|
||||
}
|
||||
var MaterializeOperator = /*@__PURE__*/ (function () {
|
||||
function MaterializeOperator() {
|
||||
}
|
||||
MaterializeOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new MaterializeSubscriber(subscriber));
|
||||
};
|
||||
return MaterializeOperator;
|
||||
}());
|
||||
var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(MaterializeSubscriber, _super);
|
||||
function MaterializeSubscriber(destination) {
|
||||
return _super.call(this, destination) || this;
|
||||
}
|
||||
MaterializeSubscriber.prototype._next = function (value) {
|
||||
this.destination.next(Notification.createNext(value));
|
||||
};
|
||||
MaterializeSubscriber.prototype._error = function (err) {
|
||||
var destination = this.destination;
|
||||
destination.next(Notification.createError(err));
|
||||
destination.complete();
|
||||
};
|
||||
MaterializeSubscriber.prototype._complete = function () {
|
||||
var destination = this.destination;
|
||||
destination.next(Notification.createComplete());
|
||||
destination.complete();
|
||||
};
|
||||
return MaterializeSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=materialize.js.map
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
|
||||
import { reduce } from './reduce';
|
||||
export function max(comparer) {
|
||||
var max = (typeof comparer === 'function')
|
||||
? function (x, y) { return comparer(x, y) > 0 ? x : y; }
|
||||
: function (x, y) { return x > y ? x : y; };
|
||||
return reduce(max);
|
||||
}
|
||||
//# sourceMappingURL=max.js.map
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
|
||||
import { merge as mergeStatic } from '../observable/merge';
|
||||
export function merge() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i] = arguments[_i];
|
||||
}
|
||||
return function (source) { return source.lift.call(mergeStatic.apply(void 0, [source].concat(observables))); };
|
||||
}
|
||||
//# sourceMappingURL=merge.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"merge.js","sources":["../../../src/internal/operators/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAsC3D,MAAM,UAAU,KAAK;IAAO,qBAAoE;SAApE,UAAoE,EAApE,qBAAoE,EAApE,IAAoE;QAApE,gCAAoE;;IAC9F,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,gBAAC,MAAM,SAAK,WAAW,GAAE,EAArD,CAAqD,CAAC;AAC1F,CAAC"}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
|
||||
import { mergeMap } from './mergeMap';
|
||||
import { identity } from '../util/identity';
|
||||
export function mergeAll(concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
return mergeMap(identity, concurrent);
|
||||
}
|
||||
//# sourceMappingURL=mergeAll.js.map
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { InnerSubscriber } from '../InnerSubscriber';
|
||||
import { map } from './map';
|
||||
import { from } from '../observable/from';
|
||||
export function mergeMap(project, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
if (typeof resultSelector === 'function') {
|
||||
return function (source) { return source.pipe(mergeMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
|
||||
}
|
||||
else if (typeof resultSelector === 'number') {
|
||||
concurrent = resultSelector;
|
||||
}
|
||||
return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
|
||||
}
|
||||
var MergeMapOperator = /*@__PURE__*/ (function () {
|
||||
function MergeMapOperator(project, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
this.project = project;
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
MergeMapOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
|
||||
};
|
||||
return MergeMapOperator;
|
||||
}());
|
||||
export { MergeMapOperator };
|
||||
var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(MergeMapSubscriber, _super);
|
||||
function MergeMapSubscriber(destination, project, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.project = project;
|
||||
_this.concurrent = concurrent;
|
||||
_this.hasCompleted = false;
|
||||
_this.buffer = [];
|
||||
_this.active = 0;
|
||||
_this.index = 0;
|
||||
return _this;
|
||||
}
|
||||
MergeMapSubscriber.prototype._next = function (value) {
|
||||
if (this.active < this.concurrent) {
|
||||
this._tryNext(value);
|
||||
}
|
||||
else {
|
||||
this.buffer.push(value);
|
||||
}
|
||||
};
|
||||
MergeMapSubscriber.prototype._tryNext = function (value) {
|
||||
var result;
|
||||
var index = this.index++;
|
||||
try {
|
||||
result = this.project(value, index);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.active++;
|
||||
this._innerSub(result, value, index);
|
||||
};
|
||||
MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
|
||||
var innerSubscriber = new InnerSubscriber(this, undefined, undefined);
|
||||
var destination = this.destination;
|
||||
destination.add(innerSubscriber);
|
||||
subscribeToResult(this, ish, value, index, innerSubscriber);
|
||||
};
|
||||
MergeMapSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (this.active === 0 && this.buffer.length === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
this.unsubscribe();
|
||||
};
|
||||
MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.destination.next(innerValue);
|
||||
};
|
||||
MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
var buffer = this.buffer;
|
||||
this.remove(innerSub);
|
||||
this.active--;
|
||||
if (buffer.length > 0) {
|
||||
this._next(buffer.shift());
|
||||
}
|
||||
else if (this.active === 0 && this.hasCompleted) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return MergeMapSubscriber;
|
||||
}(OuterSubscriber));
|
||||
export { MergeMapSubscriber };
|
||||
//# sourceMappingURL=mergeMap.js.map
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
|
||||
import { mergeMap } from './mergeMap';
|
||||
export function mergeMapTo(innerObservable, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
if (typeof resultSelector === 'function') {
|
||||
return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);
|
||||
}
|
||||
if (typeof resultSelector === 'number') {
|
||||
concurrent = resultSelector;
|
||||
}
|
||||
return mergeMap(function () { return innerObservable; }, concurrent);
|
||||
}
|
||||
//# sourceMappingURL=mergeMapTo.js.map
|
||||
Loaded 100 of 5156 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user