mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2025-10-11 23:25:00 +00:00
structure, layout and automation
This commit is contained in:
119
node_modules/rxjs/_esm5/operators/audit.js
generated
vendored
Normal file
119
node_modules/rxjs/_esm5/operators/audit.js
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/** PURE_IMPORTS_START .._util_tryCatch,.._util_errorObject,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Ignores source values for a duration determined by another Observable, then
|
||||
* emits the most recent value from the source Observable, then repeats this
|
||||
* process.
|
||||
*
|
||||
* <span class="informal">It's like {@link auditTime}, but the silencing
|
||||
* duration is determined by a second Observable.</span>
|
||||
*
|
||||
* <img src="./img/audit.png" width="100%">
|
||||
*
|
||||
* `audit` is similar to `throttle`, but emits the last value from the silenced
|
||||
* time window, instead of the first value. `audit` emits the most recent value
|
||||
* from the source Observable on the output Observable as soon as its internal
|
||||
* timer becomes disabled, and ignores source values while the timer is enabled.
|
||||
* Initially, the timer is disabled. As soon as the first source value arrives,
|
||||
* the timer is enabled by calling the `durationSelector` function with the
|
||||
* source value, which returns the "duration" Observable. When the duration
|
||||
* Observable emits a value or completes, the timer is disabled, then the most
|
||||
* recent source value is emitted on the output Observable, and this process
|
||||
* repeats for the next source value.
|
||||
*
|
||||
* @example <caption>Emit clicks at a rate of at most one click per second</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.audit(ev => Rx.Observable.interval(1000));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link auditTime}
|
||||
* @see {@link debounce}
|
||||
* @see {@link delayWhen}
|
||||
* @see {@link sample}
|
||||
* @see {@link throttle}
|
||||
*
|
||||
* @param {function(value: T): SubscribableOrPromise} durationSelector A function
|
||||
* that receives a value from the source Observable, for computing the silencing
|
||||
* duration, returned as an Observable or a Promise.
|
||||
* @return {Observable<T>} An Observable that performs rate-limiting of
|
||||
* emissions from the source Observable.
|
||||
* @method audit
|
||||
* @owner Observable
|
||||
*/
|
||||
export function audit(durationSelector) {
|
||||
return function auditOperatorFunction(source) {
|
||||
return source.lift(new AuditOperator(durationSelector));
|
||||
};
|
||||
}
|
||||
var AuditOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function AuditOperator(durationSelector) {
|
||||
this.durationSelector = durationSelector;
|
||||
}
|
||||
AuditOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
|
||||
};
|
||||
return AuditOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var AuditSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(AuditSubscriber, _super);
|
||||
function AuditSubscriber(destination, durationSelector) {
|
||||
_super.call(this, destination);
|
||||
this.durationSelector = durationSelector;
|
||||
this.hasValue = false;
|
||||
}
|
||||
AuditSubscriber.prototype._next = function (value) {
|
||||
this.value = value;
|
||||
this.hasValue = true;
|
||||
if (!this.throttled) {
|
||||
var duration = tryCatch(this.durationSelector)(value);
|
||||
if (duration === errorObject) {
|
||||
this.destination.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
var innerSubscription = subscribeToResult(this, duration);
|
||||
if (innerSubscription.closed) {
|
||||
this.clearThrottle();
|
||||
}
|
||||
else {
|
||||
this.add(this.throttled = innerSubscription);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
AuditSubscriber.prototype.clearThrottle = function () {
|
||||
var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
|
||||
if (throttled) {
|
||||
this.remove(throttled);
|
||||
this.throttled = null;
|
||||
throttled.unsubscribe();
|
||||
}
|
||||
if (hasValue) {
|
||||
this.value = null;
|
||||
this.hasValue = false;
|
||||
this.destination.next(value);
|
||||
}
|
||||
};
|
||||
AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
|
||||
this.clearThrottle();
|
||||
};
|
||||
AuditSubscriber.prototype.notifyComplete = function () {
|
||||
this.clearThrottle();
|
||||
};
|
||||
return AuditSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=audit.js.map
|
1
node_modules/rxjs/_esm5/operators/audit.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/audit.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/operators/audit.ts"],"names":[],"mappings":";;;;;OAKO,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAC7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,sBAAyB,gBAA0D;IACjF,MAAM,CAAC,+BAA+B,MAAqB;QACzD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED;IACE,uBAAoB,gBAA0D;QAA1D,qBAAgB,GAAhB,gBAAgB,CAA0C;IAC9E,CAAC;IAED,4BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,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,MAAM,CAAC,SAAS,CAAC,CAAC;YACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,SAAS,CAAC,WAAW,EAAE,CAAC;QAC1B,CAAC;QACD,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,oCAAU,GAAV,UAAW,UAAa,EAAE,UAAa,EAAE,UAAkB,EAAE,UAAkB;QAC7E,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED,wCAAc,GAAd;QACE,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACH,sBAAC;AAAD,CAAC,AAlDD,CAAoC,eAAe,GAkDlD"}
|
53
node_modules/rxjs/_esm5/operators/auditTime.js
generated
vendored
Normal file
53
node_modules/rxjs/_esm5/operators/auditTime.js
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/** 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';
|
||||
/**
|
||||
* Ignores source values for `duration` milliseconds, then emits the most recent
|
||||
* value from the source Observable, then repeats this process.
|
||||
*
|
||||
* <span class="informal">When it sees a source values, it ignores that plus
|
||||
* the next ones for `duration` milliseconds, and then it emits the most recent
|
||||
* value from the source.</span>
|
||||
*
|
||||
* <img src="./img/auditTime.png" width="100%">
|
||||
*
|
||||
* `auditTime` is similar to `throttleTime`, but emits the last value from the
|
||||
* silenced time window, instead of the first value. `auditTime` emits the most
|
||||
* recent value from the source Observable on the output Observable as soon as
|
||||
* its internal timer becomes disabled, and ignores source values while the
|
||||
* timer is enabled. Initially, the timer is disabled. As soon as the first
|
||||
* source value arrives, the timer is enabled. After `duration` milliseconds (or
|
||||
* the time unit determined internally by the optional `scheduler`) has passed,
|
||||
* the timer is disabled, then the most recent source value is emitted on the
|
||||
* output Observable, and this process repeats for the next source value.
|
||||
* Optionally takes a {@link IScheduler} for managing timers.
|
||||
*
|
||||
* @example <caption>Emit clicks at a rate of at most one click per second</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.auditTime(1000);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link audit}
|
||||
* @see {@link debounceTime}
|
||||
* @see {@link delay}
|
||||
* @see {@link sampleTime}
|
||||
* @see {@link throttleTime}
|
||||
*
|
||||
* @param {number} duration Time to wait before emitting the most recent source
|
||||
* value, measured in milliseconds or the time unit determined internally
|
||||
* by the optional `scheduler`.
|
||||
* @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for
|
||||
* managing the timers that handle the rate-limiting behavior.
|
||||
* @return {Observable<T>} An Observable that performs rate-limiting of
|
||||
* emissions from the source Observable.
|
||||
* @method auditTime
|
||||
* @owner Observable
|
||||
*/
|
||||
export function auditTime(duration, scheduler) {
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
return audit(function () { return timer(duration, scheduler); });
|
||||
}
|
||||
//# sourceMappingURL=auditTime.js.map
|
1
node_modules/rxjs/_esm5/operators/auditTime.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/auditTime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../src/operators/auditTime.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB;OAEnC,EAAE,KAAK,EAAE,MAAM,SAAS;OACxB,EAAE,KAAK,EAAE,MAAM,qBAAqB;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,0BAA6B,QAAgB,EAAE,SAA6B;IAA7B,yBAA6B,GAA7B,iBAA6B;IAC1E,MAAM,CAAC,KAAK,CAAC,cAAM,OAAA,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC;AACjD,CAAC"}
|
79
node_modules/rxjs/_esm5/operators/buffer.js
generated
vendored
Normal file
79
node_modules/rxjs/_esm5/operators/buffer.js
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Buffers the source Observable values until `closingNotifier` emits.
|
||||
*
|
||||
* <span class="informal">Collects values from the past as an array, and emits
|
||||
* that array only when another Observable emits.</span>
|
||||
*
|
||||
* <img src="./img/buffer.png" width="100%">
|
||||
*
|
||||
* Buffers the incoming Observable values until the given `closingNotifier`
|
||||
* Observable emits a value, at which point it emits the buffer on the output
|
||||
* Observable and starts a new buffer internally, awaiting the next time
|
||||
* `closingNotifier` emits.
|
||||
*
|
||||
* @example <caption>On every click, emit array of most recent interval events</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var interval = Rx.Observable.interval(1000);
|
||||
* var buffered = interval.buffer(clicks);
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link bufferCount}
|
||||
* @see {@link bufferTime}
|
||||
* @see {@link bufferToggle}
|
||||
* @see {@link bufferWhen}
|
||||
* @see {@link window}
|
||||
*
|
||||
* @param {Observable<any>} closingNotifier An Observable that signals the
|
||||
* buffer to be emitted on the output Observable.
|
||||
* @return {Observable<T[]>} An Observable of buffers, which are arrays of
|
||||
* values.
|
||||
* @method buffer
|
||||
* @owner Observable
|
||||
*/
|
||||
export function buffer(closingNotifier) {
|
||||
return function bufferOperatorFunction(source) {
|
||||
return source.lift(new BufferOperator(closingNotifier));
|
||||
};
|
||||
}
|
||||
var BufferOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function BufferOperator(closingNotifier) {
|
||||
this.closingNotifier = closingNotifier;
|
||||
}
|
||||
BufferOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
|
||||
};
|
||||
return BufferOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var BufferSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BufferSubscriber, _super);
|
||||
function BufferSubscriber(destination, closingNotifier) {
|
||||
_super.call(this, destination);
|
||||
this.buffer = [];
|
||||
this.add(subscribeToResult(this, closingNotifier));
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/buffer.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/buffer.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../src/operators/buffer.ts"],"names":[],"mappings":";;;;;OAGO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,uBAA0B,eAAgC;IACxD,MAAM,CAAC,gCAAgC,MAAqB;QAC1D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAI,eAAe,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;AACJ,CAAC;AAED;IAEE,wBAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IACpD,CAAC;IAED,6BAAI,GAAJ,UAAK,UAA2B,EAAE,MAAW;QAC3C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAClF,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,IAQC;AAED;;;;GAIG;AACH;IAAkC,oCAAuB;IAGvD,0BAAY,WAA4B,EAAE,eAAgC;QACxE,kBAAM,WAAW,CAAC,CAAC;QAHb,WAAM,GAAQ,EAAE,CAAC;QAIvB,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;IACrD,CAAC;IAES,gCAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,qCAAU,GAAV,UAAW,UAAa,EAAE,UAAe,EAC9B,UAAkB,EAAE,UAAkB,EACtC,QAAiC;QAC1C,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACH,uBAAC;AAAD,CAAC,AAnBD,CAAkC,eAAe,GAmBhD"}
|
145
node_modules/rxjs/_esm5/operators/bufferCount.js
generated
vendored
Normal file
145
node_modules/rxjs/_esm5/operators/bufferCount.js
generated
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Buffers the source Observable values until the size hits the maximum
|
||||
* `bufferSize` given.
|
||||
*
|
||||
* <span class="informal">Collects values from the past as an array, and emits
|
||||
* that array only when its size reaches `bufferSize`.</span>
|
||||
*
|
||||
* <img src="./img/bufferCount.png" width="100%">
|
||||
*
|
||||
* Buffers a number of values from the source Observable by `bufferSize` then
|
||||
* emits the buffer and clears it, and starts a new buffer each
|
||||
* `startBufferEvery` values. If `startBufferEvery` is not provided or is
|
||||
* `null`, then new buffers are started immediately at the start of the source
|
||||
* and when each buffer closes and is emitted.
|
||||
*
|
||||
* @example <caption>Emit the last two click events as an array</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var buffered = clicks.bufferCount(2);
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>On every click, emit the last two click events as an array</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var buffered = clicks.bufferCount(2, 1);
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link buffer}
|
||||
* @see {@link bufferTime}
|
||||
* @see {@link bufferToggle}
|
||||
* @see {@link bufferWhen}
|
||||
* @see {@link pairwise}
|
||||
* @see {@link windowCount}
|
||||
*
|
||||
* @param {number} bufferSize The maximum size of the buffer emitted.
|
||||
* @param {number} [startBufferEvery] Interval at which to start a new buffer.
|
||||
* For example if `startBufferEvery` is `2`, then a new buffer will be started
|
||||
* on every other value from the source. A new buffer is started at the
|
||||
* beginning of the source by default.
|
||||
* @return {Observable<T[]>} An Observable of arrays of buffered values.
|
||||
* @method bufferCount
|
||||
* @owner Observable
|
||||
*/
|
||||
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__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var BufferCountSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BufferCountSubscriber, _super);
|
||||
function BufferCountSubscriber(destination, bufferSize) {
|
||||
_super.call(this, destination);
|
||||
this.bufferSize = bufferSize;
|
||||
this.buffer = [];
|
||||
}
|
||||
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));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var BufferSkipCountSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BufferSkipCountSubscriber, _super);
|
||||
function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
|
||||
_super.call(this, destination);
|
||||
this.bufferSize = bufferSize;
|
||||
this.startBufferEvery = startBufferEvery;
|
||||
this.buffers = [];
|
||||
this.count = 0;
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/bufferCount.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/bufferCount.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../src/operators/bufferCount.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAK1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwC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AO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACrB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IAES,6CAAS,GAAnB;QACE,IAAA,SAAqC,EAA7B,oBAAO,EAAE,4BAAW,CAAU;QAEtC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;YAC7B,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBACtB,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QACD,gBAAK,CAAC,SAAS,WAAE,CAAC;IACpB,CAAC;IAEH,gCAAC;AAAD,CAAC,AAtCD,CAA2C,UAAU,GAsCpD"}
|
202
node_modules/rxjs/_esm5/operators/bufferTime.js
generated
vendored
Normal file
202
node_modules/rxjs/_esm5/operators/bufferTime.js
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
/** PURE_IMPORTS_START .._scheduler_async,.._Subscriber,.._util_isScheduler PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { async } from '../scheduler/async';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Buffers the source Observable values for a specific time period.
|
||||
*
|
||||
* <span class="informal">Collects values from the past as an array, and emits
|
||||
* those arrays periodically in time.</span>
|
||||
*
|
||||
* <img src="./img/bufferTime.png" width="100%">
|
||||
*
|
||||
* Buffers values from the source for a specific time duration `bufferTimeSpan`.
|
||||
* Unless the optional argument `bufferCreationInterval` is given, it emits and
|
||||
* resets the buffer every `bufferTimeSpan` milliseconds. If
|
||||
* `bufferCreationInterval` is given, this operator opens the buffer every
|
||||
* `bufferCreationInterval` milliseconds and closes (emits and resets) the
|
||||
* buffer every `bufferTimeSpan` milliseconds. When the optional argument
|
||||
* `maxBufferSize` is specified, the buffer will be closed either after
|
||||
* `bufferTimeSpan` milliseconds or when it contains `maxBufferSize` elements.
|
||||
*
|
||||
* @example <caption>Every second, emit an array of the recent click events</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var buffered = clicks.bufferTime(1000);
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Every 5 seconds, emit the click events from the next 2 seconds</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var buffered = clicks.bufferTime(2000, 5000);
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link buffer}
|
||||
* @see {@link bufferCount}
|
||||
* @see {@link bufferToggle}
|
||||
* @see {@link bufferWhen}
|
||||
* @see {@link windowTime}
|
||||
*
|
||||
* @param {number} bufferTimeSpan The amount of time to fill each buffer array.
|
||||
* @param {number} [bufferCreationInterval] The interval at which to start new
|
||||
* buffers.
|
||||
* @param {number} [maxBufferSize] The maximum buffer size.
|
||||
* @param {Scheduler} [scheduler=async] The scheduler on which to schedule the
|
||||
* intervals that determine buffer boundaries.
|
||||
* @return {Observable<T[]>} An observable of arrays of buffered values.
|
||||
* @method bufferTime
|
||||
* @owner Observable
|
||||
*/
|
||||
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__*/ (/*@__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__*/ (/*@__PURE__*/ function () {
|
||||
function Context() {
|
||||
this.buffer = [];
|
||||
}
|
||||
return Context;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var BufferTimeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BufferTimeSubscriber, _super);
|
||||
function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
|
||||
_super.call(this, destination);
|
||||
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));
|
||||
}
|
||||
}
|
||||
BufferTimeSubscriber.prototype._next = function (value) {
|
||||
var contexts = this.contexts;
|
||||
var len = contexts.length;
|
||||
var filledBufferContext;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var context = contexts[i];
|
||||
var buffer = context.buffer;
|
||||
buffer.push(value);
|
||||
if (buffer.length == this.maxBufferSize) {
|
||||
filledBufferContext = context;
|
||||
}
|
||||
}
|
||||
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 = contexts.shift();
|
||||
destination.next(context.buffer);
|
||||
}
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
/** @deprecated internal use only */ 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
|
1
node_modules/rxjs/_esm5/operators/bufferTime.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/bufferTime.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
155
node_modules/rxjs/_esm5/operators/bufferToggle.js
generated
vendored
Normal file
155
node_modules/rxjs/_esm5/operators/bufferToggle.js
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
/** PURE_IMPORTS_START .._Subscription,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscription } from '../Subscription';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/**
|
||||
* Buffers the source Observable values starting from an emission from
|
||||
* `openings` and ending when the output of `closingSelector` emits.
|
||||
*
|
||||
* <span class="informal">Collects values from the past as an array. Starts
|
||||
* collecting only when `opening` emits, and calls the `closingSelector`
|
||||
* function to get an Observable that tells when to close the buffer.</span>
|
||||
*
|
||||
* <img src="./img/bufferToggle.png" width="100%">
|
||||
*
|
||||
* Buffers values from the source by opening the buffer via signals from an
|
||||
* Observable provided to `openings`, and closing and sending the buffers when
|
||||
* a Subscribable or Promise returned by the `closingSelector` function emits.
|
||||
*
|
||||
* @example <caption>Every other second, emit the click events from the next 500ms</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var openings = Rx.Observable.interval(1000);
|
||||
* var buffered = clicks.bufferToggle(openings, i =>
|
||||
* i % 2 ? Rx.Observable.interval(500) : Rx.Observable.empty()
|
||||
* );
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link buffer}
|
||||
* @see {@link bufferCount}
|
||||
* @see {@link bufferTime}
|
||||
* @see {@link bufferWhen}
|
||||
* @see {@link windowToggle}
|
||||
*
|
||||
* @param {SubscribableOrPromise<O>} openings A Subscribable or Promise of notifications to start new
|
||||
* buffers.
|
||||
* @param {function(value: O): SubscribableOrPromise} closingSelector A function that takes
|
||||
* the value emitted by the `openings` observable and returns a Subscribable or Promise,
|
||||
* which, when it emits, signals that the associated buffer should be emitted
|
||||
* and cleared.
|
||||
* @return {Observable<T[]>} An observable of arrays of buffered values.
|
||||
* @method bufferToggle
|
||||
* @owner Observable
|
||||
*/
|
||||
export function bufferToggle(openings, closingSelector) {
|
||||
return function bufferToggleOperatorFunction(source) {
|
||||
return source.lift(new BufferToggleOperator(openings, closingSelector));
|
||||
};
|
||||
}
|
||||
var BufferToggleOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var BufferToggleSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BufferToggleSubscriber, _super);
|
||||
function BufferToggleSubscriber(destination, openings, closingSelector) {
|
||||
_super.call(this, destination);
|
||||
this.openings = openings;
|
||||
this.closingSelector = closingSelector;
|
||||
this.contexts = [];
|
||||
this.add(subscribeToResult(this, openings));
|
||||
}
|
||||
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 = contexts.shift();
|
||||
context.subscription.unsubscribe();
|
||||
context.buffer = null;
|
||||
context.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 = contexts.shift();
|
||||
this.destination.next(context.buffer);
|
||||
context.subscription.unsubscribe();
|
||||
context.buffer = null;
|
||||
context.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
|
1
node_modules/rxjs/_esm5/operators/bufferToggle.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/bufferToggle.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../src/operators/bufferToggle.ts"],"names":[],"mappings":";;;;;OAGO,EAAE,YAAY,EAAE,MAAM,iBAAiB;OACvC,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,6BACE,QAAkC,EAClC,eAAyD;IAEzD,MAAM,CAAC,sCAAsC,MAAqB;QAChE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAO,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC;AACJ,CAAC;AAED;IAEE,8BAAoB,QAAkC,EAClC,eAAyD;QADzD,aAAQ,GAAR,QAAQ,CAA0B;QAClC,oBAAe,GAAf,eAAe,CAA0C;IAC7E,CAAC;IAED,mCAAI,GAAJ,UAAK,UAA2B,EAAE,MAAW;QAC3C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,sBAAsB,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACvG,CAAC;IACH,2BAAC;AAAD,CAAC,AATD,IASC;AAOD;;;;GAIG;AACH;IAA2C,0CAAqB;IAG9D,gCAAY,WAA4B,EACpB,QAAkC,EAClC,eAAgE;QAClF,kBAAM,WAAW,CAAC,CAAC;QAFD,aAAQ,GAAR,QAAQ,CAA0B;QAClC,oBAAe,GAAf,eAAe,CAAiD;QAJ5E,aAAQ,GAA4B,EAAE,CAAC;QAM7C,IAAI,CAAC,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YAC1B,YAAY,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAEO,6CAAY,GAApB,UAAqB,eAAoB;QACvC,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE/B,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,IAAM,OAAO,GAAG,EAAE,cAAM,EAAE,0BAAY,EAAE,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvB,IAAM,iBAAiB,GAAG,iBAAiB,CAAC,IAAI,EAAE,eAAe,EAAO,OAAO,CAAC,CAAC;QAEjF,EAAE,CAAC,CAAC,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QAAC,IAAI,CAAC,CAAC;YACC,iBAAkB,CAAC,OAAO,GAAG,OAAO,CAAC;YAE5C,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAC5B,YAAY,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IACH,6BAAC;AAAD,CAAC,AAhGD,CAA2C,eAAe,GAgGzD"}
|
125
node_modules/rxjs/_esm5/operators/bufferWhen.js
generated
vendored
Normal file
125
node_modules/rxjs/_esm5/operators/bufferWhen.js
generated
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
/** PURE_IMPORTS_START .._Subscription,.._util_tryCatch,.._util_errorObject,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscription } from '../Subscription';
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Buffers the source Observable values, using a factory function of closing
|
||||
* Observables to determine when to close, emit, and reset the buffer.
|
||||
*
|
||||
* <span class="informal">Collects values from the past as an array. When it
|
||||
* starts collecting values, it calls a function that returns an Observable that
|
||||
* tells when to close the buffer and restart collecting.</span>
|
||||
*
|
||||
* <img src="./img/bufferWhen.png" width="100%">
|
||||
*
|
||||
* Opens a buffer immediately, then closes the buffer when the observable
|
||||
* returned by calling `closingSelector` function emits a value. When it closes
|
||||
* the buffer, it immediately opens a new buffer and repeats the process.
|
||||
*
|
||||
* @example <caption>Emit an array of the last clicks every [1-5] random seconds</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var buffered = clicks.bufferWhen(() =>
|
||||
* Rx.Observable.interval(1000 + Math.random() * 4000)
|
||||
* );
|
||||
* buffered.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link buffer}
|
||||
* @see {@link bufferCount}
|
||||
* @see {@link bufferTime}
|
||||
* @see {@link bufferToggle}
|
||||
* @see {@link windowWhen}
|
||||
*
|
||||
* @param {function(): Observable} closingSelector A function that takes no
|
||||
* arguments and returns an Observable that signals buffer closure.
|
||||
* @return {Observable<T[]>} An observable of arrays of buffered values.
|
||||
* @method bufferWhen
|
||||
* @owner Observable
|
||||
*/
|
||||
export function bufferWhen(closingSelector) {
|
||||
return function (source) {
|
||||
return source.lift(new BufferWhenOperator(closingSelector));
|
||||
};
|
||||
}
|
||||
var BufferWhenOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function BufferWhenOperator(closingSelector) {
|
||||
this.closingSelector = closingSelector;
|
||||
}
|
||||
BufferWhenOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
|
||||
};
|
||||
return BufferWhenOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var BufferWhenSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(BufferWhenSubscriber, _super);
|
||||
function BufferWhenSubscriber(destination, closingSelector) {
|
||||
_super.call(this, destination);
|
||||
this.closingSelector = closingSelector;
|
||||
this.subscribing = false;
|
||||
this.openBuffer();
|
||||
}
|
||||
BufferWhenSubscriber.prototype._next = function (value) {
|
||||
this.buffer.push(value);
|
||||
};
|
||||
BufferWhenSubscriber.prototype._complete = function () {
|
||||
var buffer = this.buffer;
|
||||
if (buffer) {
|
||||
this.destination.next(buffer);
|
||||
}
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
/** @deprecated internal use only */ BufferWhenSubscriber.prototype._unsubscribe = function () {
|
||||
this.buffer = null;
|
||||
this.subscribing = false;
|
||||
};
|
||||
BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this.openBuffer();
|
||||
};
|
||||
BufferWhenSubscriber.prototype.notifyComplete = function () {
|
||||
if (this.subscribing) {
|
||||
this.complete();
|
||||
}
|
||||
else {
|
||||
this.openBuffer();
|
||||
}
|
||||
};
|
||||
BufferWhenSubscriber.prototype.openBuffer = function () {
|
||||
var closingSubscription = this.closingSubscription;
|
||||
if (closingSubscription) {
|
||||
this.remove(closingSubscription);
|
||||
closingSubscription.unsubscribe();
|
||||
}
|
||||
var buffer = this.buffer;
|
||||
if (this.buffer) {
|
||||
this.destination.next(buffer);
|
||||
}
|
||||
this.buffer = [];
|
||||
var closingNotifier = tryCatch(this.closingSelector)();
|
||||
if (closingNotifier === errorObject) {
|
||||
this.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
closingSubscription = new Subscription();
|
||||
this.closingSubscription = closingSubscription;
|
||||
this.add(closingSubscription);
|
||||
this.subscribing = true;
|
||||
closingSubscription.add(subscribeToResult(this, closingNotifier));
|
||||
this.subscribing = false;
|
||||
}
|
||||
};
|
||||
return BufferWhenSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=bufferWhen.js.map
|
1
node_modules/rxjs/_esm5/operators/bufferWhen.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/bufferWhen.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../src/operators/bufferWhen.ts"],"names":[],"mappings":";;;;;OAGO,EAAE,YAAY,EAAE,MAAM,iBAAiB;OACvC,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,2BAA8B,eAAsC;IAClE,MAAM,CAAC,UAAU,MAAqB;QACpC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC;AAED;IAEE,4BAAoB,eAAsC;QAAtC,oBAAe,GAAf,eAAe,CAAuB;IAC1D,CAAC;IAED,iCAAI,GAAJ,UAAK,UAA2B,EAAE,MAAW;QAC3C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACtF,CAAC;IACH,yBAAC;AAAD,CAAC,AARD,IAQC;AAED;;;;GAIG;AACH;IAAsC,wCAAuB;IAK3D,8BAAY,WAA4B,EAAU,eAAsC;QACtF,kBAAM,WAAW,CAAC,CAAC;QAD6B,oBAAe,GAAf,eAAe,CAAuB;QAHhF,gBAAW,GAAY,KAAK,C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,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QAEjB,IAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAEzD,EAAE,CAAC,CAAC,eAAe,KAAK,WAAW,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;YACzC,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;YAC/C,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,mBAAmB,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;YAClE,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,CAAC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AAtED,CAAsC,eAAe,GAsEpD"}
|
117
node_modules/rxjs/_esm5/operators/catchError.js
generated
vendored
Normal file
117
node_modules/rxjs/_esm5/operators/catchError.js
generated
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Catches errors on the observable to be handled by returning a new observable or throwing an error.
|
||||
*
|
||||
* <img src="./img/catch.png" width="100%">
|
||||
*
|
||||
* @example <caption>Continues with a different Observable when there's an error</caption>
|
||||
*
|
||||
* Observable.of(1, 2, 3, 4, 5)
|
||||
* .map(n => {
|
||||
* if (n == 4) {
|
||||
* throw 'four!';
|
||||
* }
|
||||
* return n;
|
||||
* })
|
||||
* .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V'))
|
||||
* .subscribe(x => console.log(x));
|
||||
* // 1, 2, 3, I, II, III, IV, V
|
||||
*
|
||||
* @example <caption>Retries the caught source Observable again in case of error, similar to retry() operator</caption>
|
||||
*
|
||||
* Observable.of(1, 2, 3, 4, 5)
|
||||
* .map(n => {
|
||||
* if (n === 4) {
|
||||
* throw 'four!';
|
||||
* }
|
||||
* return n;
|
||||
* })
|
||||
* .catch((err, caught) => caught)
|
||||
* .take(30)
|
||||
* .subscribe(x => console.log(x));
|
||||
* // 1, 2, 3, 1, 2, 3, ...
|
||||
*
|
||||
* @example <caption>Throws a new error when the source Observable throws an error</caption>
|
||||
*
|
||||
* Observable.of(1, 2, 3, 4, 5)
|
||||
* .map(n => {
|
||||
* if (n == 4) {
|
||||
* throw 'four!';
|
||||
* }
|
||||
* return n;
|
||||
* })
|
||||
* .catch(err => {
|
||||
* throw 'error in source. Details: ' + err;
|
||||
* })
|
||||
* .subscribe(
|
||||
* x => console.log(x),
|
||||
* err => console.log(err)
|
||||
* );
|
||||
* // 1, 2, 3, error in source. Details: four!
|
||||
*
|
||||
* @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which
|
||||
* is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable
|
||||
* is returned by the `selector` will be used to continue the observable chain.
|
||||
* @return {Observable} An observable that originates from either the source or the observable returned by the
|
||||
* catch `selector` function.
|
||||
* @name catchError
|
||||
*/
|
||||
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__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var CatchSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(CatchSubscriber, _super);
|
||||
function CatchSubscriber(destination, selector, caught) {
|
||||
_super.call(this, destination);
|
||||
this.selector = selector;
|
||||
this.caught = caught;
|
||||
}
|
||||
// NOTE: overriding `error` instead of `_error` because we don't want
|
||||
// to have this flag this subscriber as `isStopped`. We can mimic the
|
||||
// behavior of the RetrySubscriber (from the `retry` operator), where
|
||||
// we unsubscribe from our source chain, reset our Subscriber flags,
|
||||
// then subscribe to the selector result.
|
||||
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();
|
||||
this.add(subscribeToResult(this, result));
|
||||
}
|
||||
};
|
||||
return CatchSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=catchError.js.map
|
1
node_modules/rxjs/_esm5/operators/catchError.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/catchError.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../src/operators/catchError.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAC7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;A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sBAAsB,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAzBD,CAAoC,eAAe,GAyBlD"}
|
6
node_modules/rxjs/_esm5/operators/combineAll.js
generated
vendored
Normal file
6
node_modules/rxjs/_esm5/operators/combineAll.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/** PURE_IMPORTS_START .._operators_combineLatest PURE_IMPORTS_END */
|
||||
import { CombineLatestOperator } from '../operators/combineLatest';
|
||||
export function combineAll(project) {
|
||||
return function (source) { return source.lift(new CombineLatestOperator(project)); };
|
||||
}
|
||||
//# sourceMappingURL=combineAll.js.map
|
1
node_modules/rxjs/_esm5/operators/combineAll.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/combineAll.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../src/operators/combineAll.ts"],"names":[],"mappings":"OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B;AAIlE,2BAAiC,OAAsC;IACrE,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC,EAA/C,CAA+C,CAAC;AACpF,CAAC"}
|
150
node_modules/rxjs/_esm5/operators/combineLatest.js
generated
vendored
Normal file
150
node_modules/rxjs/_esm5/operators/combineLatest.js
generated
vendored
Normal file
@ -0,0 +1,150 @@
|
||||
/** PURE_IMPORTS_START .._observable_ArrayObservable,.._util_isArray,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { ArrayObservable } from '../observable/ArrayObservable';
|
||||
import { isArray } from '../util/isArray';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
var none = {};
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Combines multiple Observables to create an Observable whose values are
|
||||
* calculated from the latest values of each of its input Observables.
|
||||
*
|
||||
* <span class="informal">Whenever any input Observable emits a value, it
|
||||
* computes a formula using the latest values from all the inputs, then emits
|
||||
* the output of that formula.</span>
|
||||
*
|
||||
* <img src="./img/combineLatest.png" width="100%">
|
||||
*
|
||||
* `combineLatest` combines the values from this Observable with values from
|
||||
* Observables passed as arguments. This is done by subscribing to each
|
||||
* Observable, in order, and collecting an array of each of the most recent
|
||||
* values any time any of the input Observables emits, then either taking that
|
||||
* array and passing it as arguments to an optional `project` function and
|
||||
* emitting the return value of that, or just emitting the array of recent
|
||||
* values directly if there is no `project` function.
|
||||
*
|
||||
* @example <caption>Dynamically calculate the Body-Mass Index from an Observable of weight and one for height</caption>
|
||||
* var weight = Rx.Observable.of(70, 72, 76, 79, 75);
|
||||
* var height = Rx.Observable.of(1.76, 1.77, 1.78);
|
||||
* var bmi = weight.combineLatest(height, (w, h) => w / (h * h));
|
||||
* bmi.subscribe(x => console.log('BMI is ' + x));
|
||||
*
|
||||
* // With output to console:
|
||||
* // BMI is 24.212293388429753
|
||||
* // BMI is 23.93948099205209
|
||||
* // BMI is 23.671253629592222
|
||||
*
|
||||
* @see {@link combineAll}
|
||||
* @see {@link merge}
|
||||
* @see {@link withLatestFrom}
|
||||
*
|
||||
* @param {ObservableInput} other An input Observable to combine with the source
|
||||
* Observable. More than one input Observables may be given as argument.
|
||||
* @param {function} [project] An optional function to project the values from
|
||||
* the combined latest values into a new value on the output Observable.
|
||||
* @return {Observable} An Observable of projected values from the most recent
|
||||
* values from each input Observable, or an array of the most recent values from
|
||||
* each input Observable.
|
||||
* @method combineLatest
|
||||
* @owner Observable
|
||||
*/
|
||||
export function combineLatest() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
var project = null;
|
||||
if (typeof observables[observables.length - 1] === 'function') {
|
||||
project = observables.pop();
|
||||
}
|
||||
// if the first and only other argument besides the resultSelector is an array
|
||||
// assume it's been called with `combineLatest([obs1, obs2, obs3], project)`
|
||||
if (observables.length === 1 && isArray(observables[0])) {
|
||||
observables = observables[0].slice();
|
||||
}
|
||||
return function (source) { return source.lift.call(new ArrayObservable([source].concat(observables)), new CombineLatestOperator(project)); };
|
||||
}
|
||||
export var CombineLatestOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function CombineLatestOperator(project) {
|
||||
this.project = project;
|
||||
}
|
||||
CombineLatestOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new CombineLatestSubscriber(subscriber, this.project));
|
||||
};
|
||||
return CombineLatestOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var CombineLatestSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(CombineLatestSubscriber, _super);
|
||||
function CombineLatestSubscriber(destination, project) {
|
||||
_super.call(this, destination);
|
||||
this.project = project;
|
||||
this.active = 0;
|
||||
this.values = [];
|
||||
this.observables = [];
|
||||
}
|
||||
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.project) {
|
||||
this._tryProject(values);
|
||||
}
|
||||
else {
|
||||
this.destination.next(values.slice());
|
||||
}
|
||||
}
|
||||
};
|
||||
CombineLatestSubscriber.prototype._tryProject = function (values) {
|
||||
var result;
|
||||
try {
|
||||
result = this.project.apply(this, values);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.destination.next(result);
|
||||
};
|
||||
return CombineLatestSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=combineLatest.js.map
|
1
node_modules/rxjs/_esm5/operators/combineLatest.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/combineLatest.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../src/operators/combineLatest.ts"],"names":[],"mappings":";;;;;OACO,EAAE,eAAe,EAAE,MAAM,+BAA+B;OACxD,EAAE,OAAO,EAAE,MAAM,iBAAiB;OAGlC,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D,IAAM,IAAI,GAAG,EAAE,CAAC;AAiBhB,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH;IAAoC,qBAE+C;SAF/C,WAE+C,CAF/C,sBAE+C,C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AK,IAAI,GAAG,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACxD,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;QAEhC,EAAE,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC;YACpB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;gBACjB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAC3B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IAEO,6CAAW,GAAnB,UAAoB,MAAa;QAC/B,IAAI,MAAW,CAAC;QAChB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC;QACT,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACH,8BAAC;AAAD,CAAC,AAjED,CAAmD,eAAe,GAiEjE"}
|
61
node_modules/rxjs/_esm5/operators/concat.js
generated
vendored
Normal file
61
node_modules/rxjs/_esm5/operators/concat.js
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/** PURE_IMPORTS_START .._observable_concat PURE_IMPORTS_END */
|
||||
import { concat as concatStatic } from '../observable/concat';
|
||||
export { concat as concatStatic } from '../observable/concat';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Creates an output Observable which sequentially emits all values from every
|
||||
* given input Observable after the current Observable.
|
||||
*
|
||||
* <span class="informal">Concatenates multiple Observables together by
|
||||
* sequentially emitting their values, one Observable after the other.</span>
|
||||
*
|
||||
* <img src="./img/concat.png" width="100%">
|
||||
*
|
||||
* Joins this Observable with multiple other Observables by subscribing to them
|
||||
* one at a time, starting with the source, and merging their results into the
|
||||
* output Observable. Will wait for each Observable to complete before moving
|
||||
* on to the next.
|
||||
*
|
||||
* @example <caption>Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10</caption>
|
||||
* var timer = Rx.Observable.interval(1000).take(4);
|
||||
* var sequence = Rx.Observable.range(1, 10);
|
||||
* var result = timer.concat(sequence);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // results in:
|
||||
* // 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10
|
||||
*
|
||||
* @example <caption>Concatenate 3 Observables</caption>
|
||||
* var timer1 = Rx.Observable.interval(1000).take(10);
|
||||
* var timer2 = Rx.Observable.interval(2000).take(6);
|
||||
* var timer3 = Rx.Observable.interval(500).take(10);
|
||||
* var result = timer1.concat(timer2, timer3);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // results in the following:
|
||||
* // (Prints to console sequentially)
|
||||
* // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9
|
||||
* // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5
|
||||
* // -500ms-> 0 -500ms-> 1 -500ms-> ... 9
|
||||
*
|
||||
* @see {@link concatAll}
|
||||
* @see {@link concatMap}
|
||||
* @see {@link concatMapTo}
|
||||
*
|
||||
* @param {ObservableInput} other An input Observable to concatenate after the source
|
||||
* Observable. More than one input Observables may be given as argument.
|
||||
* @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each
|
||||
* Observable subscription on.
|
||||
* @return {Observable} All values of each passed Observable merged into a
|
||||
* single Observable, in order, in serial fashion.
|
||||
* @method concat
|
||||
* @owner Observable
|
||||
*/
|
||||
export function concat() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
return function (source) { return source.lift.call(concatStatic.apply(void 0, [source].concat(observables))); };
|
||||
}
|
||||
//# sourceMappingURL=concat.js.map
|
1
node_modules/rxjs/_esm5/operators/concat.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/concat.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../src/operators/concat.ts"],"names":[],"mappings":"OAGO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,sBAAsB;AAE7D,SAAS,MAAM,IAAI,YAAY,QAAQ,sBAAsB,CAAC;AAW9D,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH;IAA6B,qBAAwD;SAAxD,WAAwD,CAAxD,sBAAwD,CAAxD,IAAwD;QAAxD,oCAAwD;;IACnF,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,gBAAO,MAAM,SAAK,WAAW,EAAC,CAAC,EAA5D,CAA4D,CAAC;AACjG,CAAC"}
|
54
node_modules/rxjs/_esm5/operators/concatAll.js
generated
vendored
Normal file
54
node_modules/rxjs/_esm5/operators/concatAll.js
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/** PURE_IMPORTS_START ._mergeAll PURE_IMPORTS_END */
|
||||
import { mergeAll } from './mergeAll';
|
||||
/**
|
||||
* Converts a higher-order Observable into a first-order Observable by
|
||||
* concatenating the inner Observables in order.
|
||||
*
|
||||
* <span class="informal">Flattens an Observable-of-Observables by putting one
|
||||
* inner Observable after the other.</span>
|
||||
*
|
||||
* <img src="./img/concatAll.png" width="100%">
|
||||
*
|
||||
* Joins every Observable emitted by the source (a higher-order Observable), in
|
||||
* a serial fashion. It subscribes to each inner Observable only after the
|
||||
* previous inner Observable has completed, and merges all of their values into
|
||||
* the returned observable.
|
||||
*
|
||||
* __Warning:__ If the source Observable emits Observables quickly and
|
||||
* endlessly, and the inner Observables it emits generally complete slower than
|
||||
* the source emits, you can run into memory issues as the incoming Observables
|
||||
* collect in an unbounded buffer.
|
||||
*
|
||||
* Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set
|
||||
* to `1`.
|
||||
*
|
||||
* @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var higherOrder = clicks.map(ev => Rx.Observable.interval(1000).take(4));
|
||||
* var firstOrder = higherOrder.concatAll();
|
||||
* firstOrder.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // (results are not concurrent)
|
||||
* // For every click on the "document" it will emit values 0 to 3 spaced
|
||||
* // on a 1000ms interval
|
||||
* // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
|
||||
*
|
||||
* @see {@link combineAll}
|
||||
* @see {@link concat}
|
||||
* @see {@link concatMap}
|
||||
* @see {@link concatMapTo}
|
||||
* @see {@link exhaust}
|
||||
* @see {@link mergeAll}
|
||||
* @see {@link switch}
|
||||
* @see {@link zipAll}
|
||||
*
|
||||
* @return {Observable} An Observable emitting values from all the inner
|
||||
* Observables concatenated.
|
||||
* @method concatAll
|
||||
* @owner Observable
|
||||
*/
|
||||
export function concatAll() {
|
||||
return mergeAll(1);
|
||||
}
|
||||
//# sourceMappingURL=concatAll.js.map
|
1
node_modules/rxjs/_esm5/operators/concatAll.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/concatAll.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../src/operators/concatAll.ts"],"names":[],"mappings":"OACO,EAAE,QAAQ,EAAE,MAAM,YAAY;AAGrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH;IACE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC"}
|
66
node_modules/rxjs/_esm5/operators/concatMap.js
generated
vendored
Normal file
66
node_modules/rxjs/_esm5/operators/concatMap.js
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
/** PURE_IMPORTS_START ._mergeMap PURE_IMPORTS_END */
|
||||
import { mergeMap } from './mergeMap';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Projects each source value to an Observable which is merged in the output
|
||||
* Observable, in a serialized fashion waiting for each one to complete before
|
||||
* merging the next.
|
||||
*
|
||||
* <span class="informal">Maps each value to an Observable, then flattens all of
|
||||
* these inner Observables using {@link concatAll}.</span>
|
||||
*
|
||||
* <img src="./img/concatMap.png" width="100%">
|
||||
*
|
||||
* Returns an Observable that emits items based on applying a function that you
|
||||
* supply to each item emitted by the source Observable, where that function
|
||||
* returns an (so-called "inner") Observable. Each new inner Observable is
|
||||
* concatenated with the previous inner Observable.
|
||||
*
|
||||
* __Warning:__ if source values arrive endlessly and faster than their
|
||||
* corresponding inner Observables can complete, it will result in memory issues
|
||||
* as inner Observables amass in an unbounded buffer waiting for their turn to
|
||||
* be subscribed to.
|
||||
*
|
||||
* Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set
|
||||
* to `1`.
|
||||
*
|
||||
* @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.concatMap(ev => Rx.Observable.interval(1000).take(4));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // (results are not concurrent)
|
||||
* // For every click on the "document" it will emit values 0 to 3 spaced
|
||||
* // on a 1000ms interval
|
||||
* // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
|
||||
*
|
||||
* @see {@link concat}
|
||||
* @see {@link concatAll}
|
||||
* @see {@link concatMapTo}
|
||||
* @see {@link exhaustMap}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link switchMap}
|
||||
*
|
||||
* @param {function(value: T, ?index: number): ObservableInput} project A function
|
||||
* that, when applied to an item emitted by the source Observable, returns an
|
||||
* Observable.
|
||||
* @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
|
||||
* A function to produce the value on the output Observable based on the values
|
||||
* and the indices of the source (outer) emission and the inner Observable
|
||||
* emission. The arguments passed to this function are:
|
||||
* - `outerValue`: the value that came from the source
|
||||
* - `innerValue`: the value that came from the projected Observable
|
||||
* - `outerIndex`: the "index" of the value that came from the source
|
||||
* - `innerIndex`: the "index" of the value from the projected Observable
|
||||
* @return {Observable} An Observable that emits the result of applying the
|
||||
* projection function (and the optional `resultSelector`) to each item emitted
|
||||
* by the source Observable and taking values from each projected inner
|
||||
* Observable sequentially.
|
||||
* @method concatMap
|
||||
* @owner Observable
|
||||
*/
|
||||
export function concatMap(project, resultSelector) {
|
||||
return mergeMap(project, resultSelector, 1);
|
||||
}
|
||||
//# sourceMappingURL=concatMap.js.map
|
1
node_modules/rxjs/_esm5/operators/concatMap.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/concatMap.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../src/operators/concatMap.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY;AAOrC,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,0BAAmC,OAAyD,EACzD,cAA4F;IAC7H,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
63
node_modules/rxjs/_esm5/operators/concatMapTo.js
generated
vendored
Normal file
63
node_modules/rxjs/_esm5/operators/concatMapTo.js
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/** PURE_IMPORTS_START ._concatMap PURE_IMPORTS_END */
|
||||
import { concatMap } from './concatMap';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Projects each source value to the same Observable which is merged multiple
|
||||
* times in a serialized fashion on the output Observable.
|
||||
*
|
||||
* <span class="informal">It's like {@link concatMap}, but maps each value
|
||||
* always to the same inner Observable.</span>
|
||||
*
|
||||
* <img src="./img/concatMapTo.png" width="100%">
|
||||
*
|
||||
* Maps each source value to the given Observable `innerObservable` regardless
|
||||
* of the source value, and then flattens those resulting Observables into one
|
||||
* single Observable, which is the output Observable. Each new `innerObservable`
|
||||
* instance emitted on the output Observable is concatenated with the previous
|
||||
* `innerObservable` instance.
|
||||
*
|
||||
* __Warning:__ if source values arrive endlessly and faster than their
|
||||
* corresponding inner Observables can complete, it will result in memory issues
|
||||
* as inner Observables amass in an unbounded buffer waiting for their turn to
|
||||
* be subscribed to.
|
||||
*
|
||||
* Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter
|
||||
* set to `1`.
|
||||
*
|
||||
* @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.concatMapTo(Rx.Observable.interval(1000).take(4));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // (results are not concurrent)
|
||||
* // For every click on the "document" it will emit values 0 to 3 spaced
|
||||
* // on a 1000ms interval
|
||||
* // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3
|
||||
*
|
||||
* @see {@link concat}
|
||||
* @see {@link concatAll}
|
||||
* @see {@link concatMap}
|
||||
* @see {@link mergeMapTo}
|
||||
* @see {@link switchMapTo}
|
||||
*
|
||||
* @param {ObservableInput} innerObservable An Observable to replace each value from
|
||||
* the source Observable.
|
||||
* @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
|
||||
* A function to produce the value on the output Observable based on the values
|
||||
* and the indices of the source (outer) emission and the inner Observable
|
||||
* emission. The arguments passed to this function are:
|
||||
* - `outerValue`: the value that came from the source
|
||||
* - `innerValue`: the value that came from the projected Observable
|
||||
* - `outerIndex`: the "index" of the value that came from the source
|
||||
* - `innerIndex`: the "index" of the value from the projected Observable
|
||||
* @return {Observable} An observable of values merged together by joining the
|
||||
* passed observable with itself, one after the other, for each value emitted
|
||||
* from the source.
|
||||
* @method concatMapTo
|
||||
* @owner Observable
|
||||
*/
|
||||
export function concatMapTo(innerObservable, resultSelector) {
|
||||
return concatMap(function () { return innerObservable; }, resultSelector);
|
||||
}
|
||||
//# sourceMappingURL=concatMapTo.js.map
|
1
node_modules/rxjs/_esm5/operators/concatMapTo.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/concatMapTo.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../src/operators/concatMapTo.ts"],"names":[],"mappings":"OACO,EAAE,SAAS,EAAE,MAAM,aAAa;AAMvC,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,4BACE,eAA8B,EAC9B,cAA4F;IAE5F,MAAM,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC;AAC1D,CAAC"}
|
112
node_modules/rxjs/_esm5/operators/count.js
generated
vendored
Normal file
112
node_modules/rxjs/_esm5/operators/count.js
generated
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Counts the number of emissions on the source and emits that number when the
|
||||
* source completes.
|
||||
*
|
||||
* <span class="informal">Tells how many values were emitted, when the source
|
||||
* completes.</span>
|
||||
*
|
||||
* <img src="./img/count.png" width="100%">
|
||||
*
|
||||
* `count` transforms an Observable that emits values into an Observable that
|
||||
* emits a single value that represents the number of values emitted by the
|
||||
* source Observable. If the source Observable terminates with an error, `count`
|
||||
* will pass this error notification along without emitting a value first. If
|
||||
* the source Observable does not terminate at all, `count` will neither emit
|
||||
* a value nor terminate. This operator takes an optional `predicate` function
|
||||
* as argument, in which case the output emission will represent the number of
|
||||
* source values that matched `true` with the `predicate`.
|
||||
*
|
||||
* @example <caption>Counts how many seconds have passed before the first click happened</caption>
|
||||
* var seconds = Rx.Observable.interval(1000);
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var secondsBeforeClick = seconds.takeUntil(clicks);
|
||||
* var result = secondsBeforeClick.count();
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Counts how many odd numbers are there between 1 and 7</caption>
|
||||
* var numbers = Rx.Observable.range(1, 7);
|
||||
* var result = numbers.count(i => i % 2 === 1);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in:
|
||||
* // 4
|
||||
*
|
||||
* @see {@link max}
|
||||
* @see {@link min}
|
||||
* @see {@link reduce}
|
||||
*
|
||||
* @param {function(value: T, i: number, source: Observable<T>): boolean} [predicate] A
|
||||
* boolean function to select what values are to be counted. It is provided with
|
||||
* arguments of:
|
||||
* - `value`: the value from the source Observable.
|
||||
* - `index`: the (zero-based) "index" of the value from the source Observable.
|
||||
* - `source`: the source Observable instance itself.
|
||||
* @return {Observable} An Observable of one number that represents the count as
|
||||
* described above.
|
||||
* @method count
|
||||
* @owner Observable
|
||||
*/
|
||||
export function count(predicate) {
|
||||
return function (source) { return source.lift(new CountOperator(predicate, source)); };
|
||||
}
|
||||
var CountOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var CountSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(CountSubscriber, _super);
|
||||
function CountSubscriber(destination, predicate, source) {
|
||||
_super.call(this, destination);
|
||||
this.predicate = predicate;
|
||||
this.source = source;
|
||||
this.count = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/count.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/count.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"count.js","sourceRoot":"","sources":["../../src/operators/count.ts"],"names":[],"mappings":";;;;;OAGO,EAAE,UAAU,EAAE,MAAM,eAAe;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,sBAAyB,SAAuE;IA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,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC;QACT,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACX,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;IACH,CAAC;IAES,mCAAS,GAAnB;QACE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IACH,sBAAC;AAAD,CAAC,AArCD,CAAiC,UAAU,GAqC1C"}
|
128
node_modules/rxjs/_esm5/operators/debounce.js
generated
vendored
Normal file
128
node_modules/rxjs/_esm5/operators/debounce.js
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Emits a value from the source Observable only after a particular time span
|
||||
* determined by another Observable has passed without another source emission.
|
||||
*
|
||||
* <span class="informal">It's like {@link debounceTime}, but the time span of
|
||||
* emission silence is determined by a second Observable.</span>
|
||||
*
|
||||
* <img src="./img/debounce.png" width="100%">
|
||||
*
|
||||
* `debounce` delays values emitted by the source Observable, but drops previous
|
||||
* pending delayed emissions if a new value arrives on the source Observable.
|
||||
* This operator keeps track of the most recent value from the source
|
||||
* Observable, and spawns a duration Observable by calling the
|
||||
* `durationSelector` function. The value is emitted only when the duration
|
||||
* Observable emits a value or completes, and if no other value was emitted on
|
||||
* the source Observable since the duration Observable was spawned. If a new
|
||||
* value appears before the duration Observable emits, the previous value will
|
||||
* be dropped and will not be emitted on the output Observable.
|
||||
*
|
||||
* Like {@link debounceTime}, this is a rate-limiting operator, and also a
|
||||
* delay-like operator since output emissions do not necessarily occur at the
|
||||
* same time as they did on the source Observable.
|
||||
*
|
||||
* @example <caption>Emit the most recent click after a burst of clicks</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.debounce(() => Rx.Observable.interval(1000));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link audit}
|
||||
* @see {@link debounceTime}
|
||||
* @see {@link delayWhen}
|
||||
* @see {@link throttle}
|
||||
*
|
||||
* @param {function(value: T): SubscribableOrPromise} durationSelector A function
|
||||
* that receives a value from the source Observable, for computing the timeout
|
||||
* duration for each source value, returned as an Observable or a Promise.
|
||||
* @return {Observable} An Observable that delays the emissions of the source
|
||||
* Observable by the specified duration Observable returned by
|
||||
* `durationSelector`, and may drop some values if they occur too frequently.
|
||||
* @method debounce
|
||||
* @owner Observable
|
||||
*/
|
||||
export function debounce(durationSelector) {
|
||||
return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
|
||||
}
|
||||
var DebounceOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function DebounceOperator(durationSelector) {
|
||||
this.durationSelector = durationSelector;
|
||||
}
|
||||
DebounceOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
|
||||
};
|
||||
return DebounceOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DebounceSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DebounceSubscriber, _super);
|
||||
function DebounceSubscriber(destination, durationSelector) {
|
||||
_super.call(this, destination);
|
||||
this.durationSelector = durationSelector;
|
||||
this.hasValue = false;
|
||||
this.durationSubscription = null;
|
||||
}
|
||||
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.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
|
1
node_modules/rxjs/_esm5/operators/debounce.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/debounce.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../src/operators/debounce.ts"],"names":[],"mappings":";;;;;OAKO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAA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GAAG,KAAK,CAAC;YACtB,gBAAK,CAAC,KAAK,YAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AAlED,CAAuC,eAAe,GAkErD"}
|
119
node_modules/rxjs/_esm5/operators/debounceTime.js
generated
vendored
Normal file
119
node_modules/rxjs/_esm5/operators/debounceTime.js
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._scheduler_async PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { async } from '../scheduler/async';
|
||||
/**
|
||||
* Emits a value from the source Observable only after a particular time span
|
||||
* has passed without another source emission.
|
||||
*
|
||||
* <span class="informal">It's like {@link delay}, but passes only the most
|
||||
* recent value from each burst of emissions.</span>
|
||||
*
|
||||
* <img src="./img/debounceTime.png" width="100%">
|
||||
*
|
||||
* `debounceTime` delays values emitted by the source Observable, but drops
|
||||
* previous pending delayed emissions if a new value arrives on the source
|
||||
* Observable. This operator keeps track of the most recent value from the
|
||||
* source Observable, and emits that only when `dueTime` enough time has passed
|
||||
* without any other value appearing on the source Observable. If a new value
|
||||
* appears before `dueTime` silence occurs, the previous value will be dropped
|
||||
* and will not be emitted on the output Observable.
|
||||
*
|
||||
* This is a rate-limiting operator, because it is impossible for more than one
|
||||
* value to be emitted in any time window of duration `dueTime`, but it is also
|
||||
* a delay-like operator since output emissions do not occur at the same time as
|
||||
* they did on the source Observable. Optionally takes a {@link IScheduler} for
|
||||
* managing timers.
|
||||
*
|
||||
* @example <caption>Emit the most recent click after a burst of clicks</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.debounceTime(1000);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link auditTime}
|
||||
* @see {@link debounce}
|
||||
* @see {@link delay}
|
||||
* @see {@link sampleTime}
|
||||
* @see {@link throttleTime}
|
||||
*
|
||||
* @param {number} dueTime The timeout duration in milliseconds (or the time
|
||||
* unit determined internally by the optional `scheduler`) for the window of
|
||||
* time required to wait for emission silence before emitting the most recent
|
||||
* source value.
|
||||
* @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for
|
||||
* managing the timers that handle the timeout for each value.
|
||||
* @return {Observable} An Observable that delays the emissions of the source
|
||||
* Observable by the specified `dueTime`, and may drop some values if they occur
|
||||
* too frequently.
|
||||
* @method debounceTime
|
||||
* @owner Observable
|
||||
*/
|
||||
export function debounceTime(dueTime, scheduler) {
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
|
||||
}
|
||||
var DebounceTimeOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DebounceTimeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DebounceTimeSubscriber, _super);
|
||||
function DebounceTimeSubscriber(destination, dueTime, scheduler) {
|
||||
_super.call(this, destination);
|
||||
this.dueTime = dueTime;
|
||||
this.scheduler = scheduler;
|
||||
this.debouncedSubscription = null;
|
||||
this.lastValue = null;
|
||||
this.hasValue = false;
|
||||
}
|
||||
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) {
|
||||
this.destination.next(this.lastValue);
|
||||
this.lastValue = null;
|
||||
this.hasValue = false;
|
||||
}
|
||||
};
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/debounceTime.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/debounceTime.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../src/operators/debounceTime.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;OAGnC,EAAE,KAAK,EAAE,MAAM,oBAAoB;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,6BAAgC,OAAe,EAAE,SAA6B;IAA7B,yBAA6B,GAA7B,iBAA6B;IAC5E,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,EAAzD,CAAyD,CAA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I,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC;IACH,CAAC;IAEO,8CAAa,GAArB;QACE,IAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QAEzD,EAAE,CAAC,CAAC,qBAAqB,KAAK,IAAI,CAAC,CAAC,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;YACnC,qBAAqB,CAAC,WAAW,EAAE,CAAC;YACpC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QACpC,CAAC;IACH,CAAC;IACH,6BAAC;AAAD,CAAC,AA1CD,CAAwC,UAAU,GA0CjD;AAED,sBAAsB,UAAuC;IAC3D,UAAU,CAAC,aAAa,EAAE,CAAC;AAC7B,CAAC"}
|
80
node_modules/rxjs/_esm5/operators/defaultIfEmpty.js
generated
vendored
Normal file
80
node_modules/rxjs/_esm5/operators/defaultIfEmpty.js
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Emits a given value if the source Observable completes without emitting any
|
||||
* `next` value, otherwise mirrors the source Observable.
|
||||
*
|
||||
* <span class="informal">If the source Observable turns out to be empty, then
|
||||
* this operator will emit a default value.</span>
|
||||
*
|
||||
* <img src="./img/defaultIfEmpty.png" width="100%">
|
||||
*
|
||||
* `defaultIfEmpty` emits the values emitted by the source Observable or a
|
||||
* specified default value if the source Observable is empty (completes without
|
||||
* having emitted any `next` value).
|
||||
*
|
||||
* @example <caption>If no clicks happen in 5 seconds, then emit "no clicks"</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var clicksBeforeFive = clicks.takeUntil(Rx.Observable.interval(5000));
|
||||
* var result = clicksBeforeFive.defaultIfEmpty('no clicks');
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link empty}
|
||||
* @see {@link last}
|
||||
*
|
||||
* @param {any} [defaultValue=null] The default value used if the source
|
||||
* Observable is empty.
|
||||
* @return {Observable} An Observable that emits either the specified
|
||||
* `defaultValue` if the source Observable emits no items, or the values emitted
|
||||
* by the source Observable.
|
||||
* @method defaultIfEmpty
|
||||
* @owner Observable
|
||||
*/
|
||||
export function defaultIfEmpty(defaultValue) {
|
||||
if (defaultValue === void 0) {
|
||||
defaultValue = null;
|
||||
}
|
||||
return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
|
||||
}
|
||||
var DefaultIfEmptyOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function DefaultIfEmptyOperator(defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
|
||||
};
|
||||
return DefaultIfEmptyOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DefaultIfEmptySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DefaultIfEmptySubscriber, _super);
|
||||
function DefaultIfEmptySubscriber(destination, defaultValue) {
|
||||
_super.call(this, destination);
|
||||
this.defaultValue = defaultValue;
|
||||
this.isEmpty = true;
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/defaultIfEmpty.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/defaultIfEmpty.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../src/operators/defaultIfEmpty.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;AAM1C,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,+BAAqC,YAAsB;IAAtB,4BAAsB,GAAtB,mBAAsB;IACzD,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,YAAY,CAAC,CAAsB,EAA1E,CAA0E,CAAC;AAC/G,CAAC;AAED;IAEE,gCAAoB,YAAe;QAAf,iBAAY,GAAZ,YAAY,CAAG;IACnC,CAAC;IAED,qCAAI,GAAJ,UAAK,UAA6B,EAAE,MAAW;QAC7C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IACvF,CAAC;IACH,6BAAC;AAAD,CAAC,AARD,IAQC;AAED;;;;GAIG;AACH;IAA6C,4CAAa;IAGxD,kCAAY,WAA8B,EAAU,YAAe;QACjE,kBAAM,WAAW,CAAC,CAAC;QAD+B,iBAAY,GAAZ,YAAY,CAAG;QAF3D,YAAO,GAAY,IAAI,CAAC;IAIhC,CAAC;IAES,wCAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAES,4CAAS,GAAnB;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IACH,+BAAC;AAAD,CAAC,AAlBD,CAA6C,UAAU,GAkBtD"}
|
139
node_modules/rxjs/_esm5/operators/delay.js
generated
vendored
Normal file
139
node_modules/rxjs/_esm5/operators/delay.js
generated
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
/** PURE_IMPORTS_START .._scheduler_async,.._util_isDate,.._Subscriber,.._Notification PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { async } from '../scheduler/async';
|
||||
import { isDate } from '../util/isDate';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Notification } from '../Notification';
|
||||
/**
|
||||
* Delays the emission of items from the source Observable by a given timeout or
|
||||
* until a given Date.
|
||||
*
|
||||
* <span class="informal">Time shifts each item by some specified amount of
|
||||
* milliseconds.</span>
|
||||
*
|
||||
* <img src="./img/delay.png" width="100%">
|
||||
*
|
||||
* If the delay argument is a Number, this operator time shifts the source
|
||||
* Observable by that amount of time expressed in milliseconds. The relative
|
||||
* time intervals between the values are preserved.
|
||||
*
|
||||
* If the delay argument is a Date, this operator time shifts the start of the
|
||||
* Observable execution until the given date occurs.
|
||||
*
|
||||
* @example <caption>Delay each click by one second</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var delayedClicks = clicks.delay(1000); // each click emitted after 1 second
|
||||
* delayedClicks.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Delay all clicks until a future date happens</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var date = new Date('March 15, 2050 12:00:00'); // in the future
|
||||
* var delayedClicks = clicks.delay(date); // click emitted only after that date
|
||||
* delayedClicks.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link debounceTime}
|
||||
* @see {@link delayWhen}
|
||||
*
|
||||
* @param {number|Date} delay The delay duration in milliseconds (a `number`) or
|
||||
* a `Date` until which the emission of the source items is delayed.
|
||||
* @param {Scheduler} [scheduler=async] The IScheduler to use for
|
||||
* managing the timers that handle the time-shift for each item.
|
||||
* @return {Observable} An Observable that delays the emissions of the source
|
||||
* Observable by the specified timeout or Date.
|
||||
* @method delay
|
||||
* @owner Observable
|
||||
*/
|
||||
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__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DelaySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DelaySubscriber, _super);
|
||||
function DelaySubscriber(destination, delay, scheduler) {
|
||||
_super.call(this, destination);
|
||||
this.delay = delay;
|
||||
this.scheduler = scheduler;
|
||||
this.queue = [];
|
||||
this.active = false;
|
||||
this.errored = false;
|
||||
}
|
||||
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;
|
||||
this.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);
|
||||
};
|
||||
DelaySubscriber.prototype._complete = function () {
|
||||
this.scheduleNotification(Notification.createComplete());
|
||||
};
|
||||
return DelaySubscriber;
|
||||
}(Subscriber));
|
||||
var DelayMessage = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function DelayMessage(time, notification) {
|
||||
this.time = time;
|
||||
this.notification = notification;
|
||||
}
|
||||
return DelayMessage;
|
||||
}());
|
||||
//# sourceMappingURL=delay.js.map
|
1
node_modules/rxjs/_esm5/operators/delay.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/delay.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../src/operators/delay.ts"],"names":[],"mappings":";;;;;OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB;OACnC,EAAE,MAAM,EAAE,MAAM,gBAAgB;OAGhC,EAAE,UAAU,EAAE,MAAM,eAAe;OAEnC,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAM9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,sBAAyB,KAAkB,EAClB,SAA6B;IAA7B,yBAA6B,GAA7B,iBAA6B;IACpD,IAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,IAAM,QAAQ,GAAG,aAAa,GAAG,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAS,KAAK,CAAC,CAAC;IACtF,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAnD,CAAmD,CAAC;AACxF,CAAC;AAED;IACE,uBAAoB,KAAa,EACb,SAAqB;QADrB,UAAK,GAAL,KAAK,CAAQ;QACb,cAAS,GAAT,SAAS,CAAY;IACzC,CAAC;IAED,4BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACvF,CAAC;IACH,oBAAC;AAAD,CAAC,AARD,IAQC;AAQD;;;;GAIG;AACH;IAAiC,mCAAa;IAwB5C,yBAAY,WAA0B,EAClB,KAAa,EACb,SAAqB;QACvC,kBAAM,WAAW,CAAC,CAAC;QAFD,UAAK,GAA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IAIC"}
|
195
node_modules/rxjs/_esm5/operators/delayWhen.js
generated
vendored
Normal file
195
node_modules/rxjs/_esm5/operators/delayWhen.js
generated
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._Observable,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Observable } from '../Observable';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Delays the emission of items from the source Observable by a given time span
|
||||
* determined by the emissions of another Observable.
|
||||
*
|
||||
* <span class="informal">It's like {@link delay}, but the time span of the
|
||||
* delay duration is determined by a second Observable.</span>
|
||||
*
|
||||
* <img src="./img/delayWhen.png" width="100%">
|
||||
*
|
||||
* `delayWhen` time shifts each emitted value from the source Observable by a
|
||||
* time span determined by another Observable. When the source emits a value,
|
||||
* the `delayDurationSelector` function is called with the source value as
|
||||
* argument, and should return an Observable, called the "duration" Observable.
|
||||
* The source value is emitted on the output Observable only when the duration
|
||||
* Observable emits a value or completes.
|
||||
*
|
||||
* Optionally, `delayWhen` takes a second argument, `subscriptionDelay`, which
|
||||
* is an Observable. When `subscriptionDelay` emits its first value or
|
||||
* completes, the source Observable is subscribed to and starts behaving like
|
||||
* described in the previous paragraph. If `subscriptionDelay` is not provided,
|
||||
* `delayWhen` will subscribe to the source Observable as soon as the output
|
||||
* Observable is subscribed.
|
||||
*
|
||||
* @example <caption>Delay each click by a random amount of time, between 0 and 5 seconds</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var delayedClicks = clicks.delayWhen(event =>
|
||||
* Rx.Observable.interval(Math.random() * 5000)
|
||||
* );
|
||||
* delayedClicks.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link debounce}
|
||||
* @see {@link delay}
|
||||
*
|
||||
* @param {function(value: T): Observable} delayDurationSelector A function that
|
||||
* returns an Observable for each value emitted by the source Observable, which
|
||||
* is then used to delay the emission of that item on the output Observable
|
||||
* until the Observable returned from this function emits a value.
|
||||
* @param {Observable} subscriptionDelay An Observable that triggers the
|
||||
* subscription to the source Observable once it emits any value.
|
||||
* @return {Observable} An Observable that delays the emissions of the source
|
||||
* Observable by an amount of time specified by the Observable returned by
|
||||
* `delayDurationSelector`.
|
||||
* @method delayWhen
|
||||
* @owner Observable
|
||||
*/
|
||||
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__*/ (/*@__PURE__*/ function () {
|
||||
function DelayWhenOperator(delayDurationSelector) {
|
||||
this.delayDurationSelector = delayDurationSelector;
|
||||
}
|
||||
DelayWhenOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
|
||||
};
|
||||
return DelayWhenOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DelayWhenSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DelayWhenSubscriber, _super);
|
||||
function DelayWhenSubscriber(destination, delayDurationSelector) {
|
||||
_super.call(this, destination);
|
||||
this.delayDurationSelector = delayDurationSelector;
|
||||
this.completed = false;
|
||||
this.delayNotifierSubscriptions = [];
|
||||
this.values = [];
|
||||
}
|
||||
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) {
|
||||
try {
|
||||
var delayNotifier = this.delayDurationSelector(value);
|
||||
if (delayNotifier) {
|
||||
this.tryDelay(delayNotifier, value);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
};
|
||||
DelayWhenSubscriber.prototype._complete = function () {
|
||||
this.completed = true;
|
||||
this.tryComplete();
|
||||
};
|
||||
DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
|
||||
subscription.unsubscribe();
|
||||
var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
|
||||
var value = null;
|
||||
if (subscriptionIdx !== -1) {
|
||||
value = this.values[subscriptionIdx];
|
||||
this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
|
||||
this.values.splice(subscriptionIdx, 1);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
|
||||
var notifierSubscription = subscribeToResult(this, delayNotifier, value);
|
||||
if (notifierSubscription && !notifierSubscription.closed) {
|
||||
this.add(notifierSubscription);
|
||||
this.delayNotifierSubscriptions.push(notifierSubscription);
|
||||
}
|
||||
this.values.push(value);
|
||||
};
|
||||
DelayWhenSubscriber.prototype.tryComplete = function () {
|
||||
if (this.completed && this.delayNotifierSubscriptions.length === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return DelayWhenSubscriber;
|
||||
}(OuterSubscriber));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var SubscriptionDelayObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(SubscriptionDelayObservable, _super);
|
||||
function SubscriptionDelayObservable(/** @deprecated internal use only */ source, subscriptionDelay) {
|
||||
_super.call(this);
|
||||
this.source = source;
|
||||
this.subscriptionDelay = subscriptionDelay;
|
||||
}
|
||||
/** @deprecated internal use only */ SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
|
||||
this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
|
||||
};
|
||||
return SubscriptionDelayObservable;
|
||||
}(Observable));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var SubscriptionDelaySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(SubscriptionDelaySubscriber, _super);
|
||||
function SubscriptionDelaySubscriber(parent, source) {
|
||||
_super.call(this);
|
||||
this.parent = parent;
|
||||
this.source = source;
|
||||
this.sourceSubscribed = false;
|
||||
}
|
||||
SubscriptionDelaySubscriber.prototype._next = function (unused) {
|
||||
this.subscribeToSource();
|
||||
};
|
||||
SubscriptionDelaySubscriber.prototype._error = function (err) {
|
||||
this.unsubscribe();
|
||||
this.parent.error(err);
|
||||
};
|
||||
SubscriptionDelaySubscriber.prototype._complete = function () {
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/delayWhen.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/delayWhen.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../src/operators/delayWhen.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,UAAU,EAAE,MAAM,eAAe;OAEnC,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,0BAA6B,qBAAoD,EACpD,iBAAmC;IAC9D,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACtB,MAAM,CAAC,UAAC,MAAqB;YAC3B,OAAA,IAAI,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,CAAC;iBACvD,IAAI,CAAC,IAAI,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;QADrD,CACqD,CAAC;IAC1D,CAAC;IACD,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,qBAAqB,CAAC,CAAC,EAAzD,CAAyD,CAAC;AAC9F,CAAC;AAED;IACE,2BAAoB,qBAAoD;QAApD,0BAAqB,GAArB,qBAAqB,CAA+B;IACxE,CAAC;IAED,gCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC3F,CAAC;IACH,wBAAC;AAAD,CAAC,AAPD,IAOC;AAED;;;;GAIG;AACH;IAAwC,uCAAqB;IAK3D,6BAAY,WAA0B,EAClB,qBAAoD;QACtE,kBAAM,WAAW,CAAC,CAAC;QADD,0BAAqB,GA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al file
78
node_modules/rxjs/_esm5/operators/dematerialize.js
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Converts an Observable of {@link Notification} objects into the emissions
|
||||
* that they represent.
|
||||
*
|
||||
* <span class="informal">Unwraps {@link Notification} objects as actual `next`,
|
||||
* `error` and `complete` emissions. The opposite of {@link materialize}.</span>
|
||||
*
|
||||
* <img src="./img/dematerialize.png" width="100%">
|
||||
*
|
||||
* `dematerialize` is assumed to operate an Observable that only emits
|
||||
* {@link Notification} objects as `next` emissions, and does not emit any
|
||||
* `error`. Such Observable is the output of a `materialize` operation. Those
|
||||
* notifications are then unwrapped using the metadata they contain, and emitted
|
||||
* as `next`, `error`, and `complete` on the output Observable.
|
||||
*
|
||||
* Use this operator in conjunction with {@link materialize}.
|
||||
*
|
||||
* @example <caption>Convert an Observable of Notifications to an actual Observable</caption>
|
||||
* var notifA = new Rx.Notification('N', 'A');
|
||||
* var notifB = new Rx.Notification('N', 'B');
|
||||
* var notifE = new Rx.Notification('E', void 0,
|
||||
* new TypeError('x.toUpperCase is not a function')
|
||||
* );
|
||||
* var materialized = Rx.Observable.of(notifA, notifB, notifE);
|
||||
* var upperCase = materialized.dematerialize();
|
||||
* upperCase.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
* // Results in:
|
||||
* // A
|
||||
* // B
|
||||
* // TypeError: x.toUpperCase is not a function
|
||||
*
|
||||
* @see {@link Notification}
|
||||
* @see {@link materialize}
|
||||
*
|
||||
* @return {Observable} An Observable that emits items and notifications
|
||||
* embedded in Notification objects emitted by the source Observable.
|
||||
* @method dematerialize
|
||||
* @owner Observable
|
||||
*/
|
||||
export function dematerialize() {
|
||||
return function dematerializeOperatorFunction(source) {
|
||||
return source.lift(new DeMaterializeOperator());
|
||||
};
|
||||
}
|
||||
var DeMaterializeOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function DeMaterializeOperator() {
|
||||
}
|
||||
DeMaterializeOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DeMaterializeSubscriber(subscriber));
|
||||
};
|
||||
return DeMaterializeOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DeMaterializeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DeMaterializeSubscriber, _super);
|
||||
function DeMaterializeSubscriber(destination) {
|
||||
_super.call(this, destination);
|
||||
}
|
||||
DeMaterializeSubscriber.prototype._next = function (value) {
|
||||
value.observe(this.destination);
|
||||
};
|
||||
return DeMaterializeSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=dematerialize.js.map
|
1
node_modules/rxjs/_esm5/operators/dematerialize.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/dematerialize.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../src/operators/dematerialize.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IACE,MAAM,CAAC,uCAAuC,MAAmC;QAC/E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,qBAAqB,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC;AAED;IAAA;IAIA,CAAC;IAHC,oCAAI,GAAJ,UAAK,UAA2B,EAAE,MAAW;QAC3C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;IACnE,CAAC;IACH,4BAAC;AAAD,CAAC,AAJD,IAIC;AAED;;;;GAIG;AACH;IAAmE,2CAAa;IAC9E,iCAAY,WAA4B;QACtC,kBAAM,WAAW,CAAC,CAAC;IACrB,CAAC;IAES,uCAAK,GAAf,UAAgB,KAAQ;QACtB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACH,8BAAC;AAAD,CAAC,AARD,CAAmE,UAAU,GAQ5E"}
|
120
node_modules/rxjs/_esm5/operators/distinct.js
generated
vendored
Normal file
120
node_modules/rxjs/_esm5/operators/distinct.js
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult,.._util_Set PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { Set } from '../util/Set';
|
||||
/**
|
||||
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.
|
||||
*
|
||||
* If a keySelector function is provided, then it will project each value from the source observable into a new value that it will
|
||||
* check for equality with previously projected values. If a keySelector function is not provided, it will use each value from the
|
||||
* source observable directly with an equality check against previous values.
|
||||
*
|
||||
* In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking.
|
||||
*
|
||||
* In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the
|
||||
* hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct`
|
||||
* use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so
|
||||
* that the internal `Set` can be "flushed", basically clearing it of values.
|
||||
*
|
||||
* @example <caption>A simple example with numbers</caption>
|
||||
* Observable.of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1)
|
||||
* .distinct()
|
||||
* .subscribe(x => console.log(x)); // 1, 2, 3, 4
|
||||
*
|
||||
* @example <caption>An example using a keySelector function</caption>
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
*
|
||||
* Observable.of<Person>(
|
||||
* { age: 4, name: 'Foo'},
|
||||
* { age: 7, name: 'Bar'},
|
||||
* { age: 5, name: 'Foo'})
|
||||
* .distinct((p: Person) => p.name)
|
||||
* .subscribe(x => console.log(x));
|
||||
*
|
||||
* // displays:
|
||||
* // { age: 4, name: 'Foo' }
|
||||
* // { age: 7, name: 'Bar' }
|
||||
*
|
||||
* @see {@link distinctUntilChanged}
|
||||
* @see {@link distinctUntilKeyChanged}
|
||||
*
|
||||
* @param {function} [keySelector] Optional function to select which value you want to check as distinct.
|
||||
* @param {Observable} [flushes] Optional Observable for flushing the internal HashSet of the operator.
|
||||
* @return {Observable} An Observable that emits items from the source Observable with distinct values.
|
||||
* @method distinct
|
||||
* @owner Observable
|
||||
*/
|
||||
export function distinct(keySelector, flushes) {
|
||||
return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
|
||||
}
|
||||
var DistinctOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var DistinctSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DistinctSubscriber, _super);
|
||||
function DistinctSubscriber(destination, keySelector, flushes) {
|
||||
_super.call(this, destination);
|
||||
this.keySelector = keySelector;
|
||||
this.values = new Set();
|
||||
if (flushes) {
|
||||
this.add(subscribeToResult(this, flushes));
|
||||
}
|
||||
}
|
||||
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));
|
||||
//# sourceMappingURL=distinct.js.map
|
1
node_modules/rxjs/_esm5/operators/distinct.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/distinct.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../src/operators/distinct.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAQ,GAAG,EAAE,MAAM,aAAa;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACrB,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAEO,4CAAe,GAAvB,UAAwB,KAAQ;QAC9B,IAAI,GAAM,CAAC;QACH,kCAAW,CAAU;QAC7B,IAAI,CAAC;YACH,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAChC,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvB,MAAM,CAAC;QACT,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAEO,0CAAa,GAArB,UAAsB,GAAQ,EAAE,KAAQ;QAC9B,wBAAM,CAAU;QACxB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,CAAC,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,GAAG,CAAI,GAAG,CAAC,CAAC;YACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAEH,yBAAC;AAAD,CAAC,AAjDD,CAA8C,eAAe,GAiD5D"}
|
109
node_modules/rxjs/_esm5/operators/distinctUntilChanged.js
generated
vendored
Normal file
109
node_modules/rxjs/_esm5/operators/distinctUntilChanged.js
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._util_tryCatch,.._util_errorObject PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item.
|
||||
*
|
||||
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
|
||||
*
|
||||
* If a comparator function is not provided, an equality check is used by default.
|
||||
*
|
||||
* @example <caption>A simple example with numbers</caption>
|
||||
* Observable.of(1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 4)
|
||||
* .distinctUntilChanged()
|
||||
* .subscribe(x => console.log(x)); // 1, 2, 1, 2, 3, 4
|
||||
*
|
||||
* @example <caption>An example using a compare function</caption>
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
*
|
||||
* Observable.of<Person>(
|
||||
* { age: 4, name: 'Foo'},
|
||||
* { age: 7, name: 'Bar'},
|
||||
* { age: 5, name: 'Foo'})
|
||||
* { age: 6, name: 'Foo'})
|
||||
* .distinctUntilChanged((p: Person, q: Person) => p.name === q.name)
|
||||
* .subscribe(x => console.log(x));
|
||||
*
|
||||
* // displays:
|
||||
* // { age: 4, name: 'Foo' }
|
||||
* // { age: 7, name: 'Bar' }
|
||||
* // { age: 5, name: 'Foo' }
|
||||
*
|
||||
* @see {@link distinct}
|
||||
* @see {@link distinctUntilKeyChanged}
|
||||
*
|
||||
* @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.
|
||||
* @return {Observable} An Observable that emits items from the source Observable with distinct values.
|
||||
* @method distinctUntilChanged
|
||||
* @owner Observable
|
||||
*/
|
||||
export function distinctUntilChanged(compare, keySelector) {
|
||||
return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
|
||||
}
|
||||
var DistinctUntilChangedOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function DistinctUntilChangedOperator(compare, keySelector) {
|
||||
this.compare = compare;
|
||||
this.keySelector = keySelector;
|
||||
}
|
||||
DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
|
||||
};
|
||||
return DistinctUntilChangedOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var DistinctUntilChangedSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(DistinctUntilChangedSubscriber, _super);
|
||||
function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
|
||||
_super.call(this, destination);
|
||||
this.keySelector = keySelector;
|
||||
this.hasKey = false;
|
||||
if (typeof compare === 'function') {
|
||||
this.compare = compare;
|
||||
}
|
||||
}
|
||||
DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
|
||||
return x === y;
|
||||
};
|
||||
DistinctUntilChangedSubscriber.prototype._next = function (value) {
|
||||
var keySelector = this.keySelector;
|
||||
var key = value;
|
||||
if (keySelector) {
|
||||
key = tryCatch(this.keySelector)(value);
|
||||
if (key === errorObject) {
|
||||
return this.destination.error(errorObject.e);
|
||||
}
|
||||
}
|
||||
var result = false;
|
||||
if (this.hasKey) {
|
||||
result = tryCatch(this.compare)(this.key, key);
|
||||
if (result === errorObject) {
|
||||
return this.destination.error(errorObject.e);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.hasKey = true;
|
||||
}
|
||||
if (Boolean(result) === false) {
|
||||
this.key = key;
|
||||
this.destination.next(value);
|
||||
}
|
||||
};
|
||||
return DistinctUntilChangedSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=distinctUntilChanged.js.map
|
1
node_modules/rxjs/_esm5/operators/distinctUntilChanged.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/distinctUntilChanged.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":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AEtB,IAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,IAAI,GAAG,GAAQ,KAAK,CAAC;QAErB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YAChB,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC;YACxC,EAAE,CAAC,CAAC,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,IAAI,MAAM,GAAQ,KAAK,CAAC;QAExB,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAChB,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC/C,EAAE,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC3B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACH,qCAAC;AAAD,CAAC,AA7CD,CAAmD,UAAU,GA6C5D"}
|
64
node_modules/rxjs/_esm5/operators/distinctUntilKeyChanged.js
generated
vendored
Normal file
64
node_modules/rxjs/_esm5/operators/distinctUntilKeyChanged.js
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/** PURE_IMPORTS_START ._distinctUntilChanged PURE_IMPORTS_END */
|
||||
import { distinctUntilChanged } from './distinctUntilChanged';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,
|
||||
* using a property accessed by using the key provided to check if the two items are distinct.
|
||||
*
|
||||
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
|
||||
*
|
||||
* If a comparator function is not provided, an equality check is used by default.
|
||||
*
|
||||
* @example <caption>An example comparing the name of persons</caption>
|
||||
*
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
*
|
||||
* Observable.of<Person>(
|
||||
* { age: 4, name: 'Foo'},
|
||||
* { age: 7, name: 'Bar'},
|
||||
* { age: 5, name: 'Foo'},
|
||||
* { age: 6, name: 'Foo'})
|
||||
* .distinctUntilKeyChanged('name')
|
||||
* .subscribe(x => console.log(x));
|
||||
*
|
||||
* // displays:
|
||||
* // { age: 4, name: 'Foo' }
|
||||
* // { age: 7, name: 'Bar' }
|
||||
* // { age: 5, name: 'Foo' }
|
||||
*
|
||||
* @example <caption>An example comparing the first letters of the name</caption>
|
||||
*
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
*
|
||||
* Observable.of<Person>(
|
||||
* { age: 4, name: 'Foo1'},
|
||||
* { age: 7, name: 'Bar'},
|
||||
* { age: 5, name: 'Foo2'},
|
||||
* { age: 6, name: 'Foo3'})
|
||||
* .distinctUntilKeyChanged('name', (x: string, y: string) => x.substring(0, 3) === y.substring(0, 3))
|
||||
* .subscribe(x => console.log(x));
|
||||
*
|
||||
* // displays:
|
||||
* // { age: 4, name: 'Foo1' }
|
||||
* // { age: 7, name: 'Bar' }
|
||||
* // { age: 5, name: 'Foo2' }
|
||||
*
|
||||
* @see {@link distinct}
|
||||
* @see {@link distinctUntilChanged}
|
||||
*
|
||||
* @param {string} key String key for object property lookup on each item.
|
||||
* @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.
|
||||
* @return {Observable} An Observable that emits items from the source Observable with distinct values based on the key specified.
|
||||
* @method distinctUntilKeyChanged
|
||||
* @owner Observable
|
||||
*/
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/distinctUntilKeyChanged.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/distinctUntilKeyChanged.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../src/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB;AAM7D,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wCAA2C,GAAW,EAAE,OAAiC;IACvF,MAAM,CAAC,oBAAoB,CAAC,UAAC,CAAI,EAAE,CAAI,IAAK,OAAA,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAArD,CAAqD,CAAC,CAAC;AACrG,CAAC"}
|
101
node_modules/rxjs/_esm5/operators/elementAt.js
generated
vendored
Normal file
101
node_modules/rxjs/_esm5/operators/elementAt.js
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._util_ArgumentOutOfRangeError PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';
|
||||
/**
|
||||
* Emits the single value at the specified `index` in a sequence of emissions
|
||||
* from the source Observable.
|
||||
*
|
||||
* <span class="informal">Emits only the i-th value, then completes.</span>
|
||||
*
|
||||
* <img src="./img/elementAt.png" width="100%">
|
||||
*
|
||||
* `elementAt` returns an Observable that emits the item at the specified
|
||||
* `index` in the source Observable, or a default value if that `index` is out
|
||||
* of range and the `default` argument is provided. If the `default` argument is
|
||||
* not given and the `index` is out of range, the output Observable will emit an
|
||||
* `ArgumentOutOfRangeError` error.
|
||||
*
|
||||
* @example <caption>Emit only the third click event</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.elementAt(2);
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in:
|
||||
* // click 1 = nothing
|
||||
* // click 2 = nothing
|
||||
* // click 3 = MouseEvent object logged to console
|
||||
*
|
||||
* @see {@link first}
|
||||
* @see {@link last}
|
||||
* @see {@link skip}
|
||||
* @see {@link single}
|
||||
* @see {@link take}
|
||||
*
|
||||
* @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an
|
||||
* ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0` or the
|
||||
* Observable has completed before emitting the i-th `next` notification.
|
||||
*
|
||||
* @param {number} index Is the number `i` for the i-th source emission that has
|
||||
* happened since the subscription, starting from the number `0`.
|
||||
* @param {T} [defaultValue] The default value returned for missing indices.
|
||||
* @return {Observable} An Observable that emits a single item, if it is found.
|
||||
* Otherwise, will emit the default value if given. If not, then emits an error.
|
||||
* @method elementAt
|
||||
* @owner Observable
|
||||
*/
|
||||
export function elementAt(index, defaultValue) {
|
||||
return function (source) { return source.lift(new ElementAtOperator(index, defaultValue)); };
|
||||
}
|
||||
var ElementAtOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function ElementAtOperator(index, defaultValue) {
|
||||
this.index = index;
|
||||
this.defaultValue = defaultValue;
|
||||
if (index < 0) {
|
||||
throw new ArgumentOutOfRangeError;
|
||||
}
|
||||
}
|
||||
ElementAtOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new ElementAtSubscriber(subscriber, this.index, this.defaultValue));
|
||||
};
|
||||
return ElementAtOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var ElementAtSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ElementAtSubscriber, _super);
|
||||
function ElementAtSubscriber(destination, index, defaultValue) {
|
||||
_super.call(this, destination);
|
||||
this.index = index;
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
ElementAtSubscriber.prototype._next = function (x) {
|
||||
if (this.index-- === 0) {
|
||||
this.destination.next(x);
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
ElementAtSubscriber.prototype._complete = function () {
|
||||
var destination = this.destination;
|
||||
if (this.index >= 0) {
|
||||
if (typeof this.defaultValue !== 'undefined') {
|
||||
destination.next(this.defaultValue);
|
||||
}
|
||||
else {
|
||||
destination.error(new ArgumentOutOfRangeError);
|
||||
}
|
||||
}
|
||||
destination.complete();
|
||||
};
|
||||
return ElementAtSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=elementAt.js.map
|
1
node_modules/rxjs/_esm5/operators/elementAt.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/elementAt.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../src/operators/elementAt.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,uBAAuB,EAAE,MAAM,iCAAiC;AAKzE;;;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CAAC,CAAC,CAAC,CAAC;YACpB,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC7C,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACtC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;QACD,WAAW,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IACH,0BAAC;AAAD,CAAC,AAxBD,CAAqC,UAAU,GAwB9C"}
|
75
node_modules/rxjs/_esm5/operators/every.js
generated
vendored
Normal file
75
node_modules/rxjs/_esm5/operators/every.js
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
|
||||
*
|
||||
* @example <caption>A simple example emitting true if all elements are less than 5, false otherwise</caption>
|
||||
* Observable.of(1, 2, 3, 4, 5, 6)
|
||||
* .every(x => x < 5)
|
||||
* .subscribe(x => console.log(x)); // -> false
|
||||
*
|
||||
* @param {function} predicate A function for determining if an item meets a specified condition.
|
||||
* @param {any} [thisArg] Optional object to use for `this` in the callback.
|
||||
* @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.
|
||||
* @method every
|
||||
* @owner Observable
|
||||
*/
|
||||
export function every(predicate, thisArg) {
|
||||
return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
|
||||
}
|
||||
var EveryOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var EverySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(EverySubscriber, _super);
|
||||
function EverySubscriber(destination, predicate, thisArg, source) {
|
||||
_super.call(this, destination);
|
||||
this.predicate = predicate;
|
||||
this.thisArg = thisArg;
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
this.thisArg = thisArg || 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
|
1
node_modules/rxjs/_esm5/operators/every.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/every.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"every.js","sourceRoot":"","sources":["../../src/operators/every.ts"],"names":[],"mappings":";;;;;OAGO,EAAE,UAAU,EAAE,MAAM,eAAe;AAG1C;;;;;;;;;;;;;GAaG;AACH,sBAAyB,SAAsE,EACtE,O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KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/E,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC;QACT,CAAC;QAED,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACZ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAES,mCAAS,GAAnB;QACE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACH,sBAAC;AAAD,CAAC,AAjCD,CAAiC,UAAU,GAiC1C"}
|
90
node_modules/rxjs/_esm5/operators/exhaust.js
generated
vendored
Normal file
90
node_modules/rxjs/_esm5/operators/exhaust.js
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/**
|
||||
* Converts a higher-order Observable into a first-order Observable by dropping
|
||||
* inner Observables while the previous inner Observable has not yet completed.
|
||||
*
|
||||
* <span class="informal">Flattens an Observable-of-Observables by dropping the
|
||||
* next inner Observables while the current inner is still executing.</span>
|
||||
*
|
||||
* <img src="./img/exhaust.png" width="100%">
|
||||
*
|
||||
* `exhaust` subscribes to an Observable that emits Observables, also known as a
|
||||
* higher-order Observable. Each time it observes one of these emitted inner
|
||||
* Observables, the output Observable begins emitting the items emitted by that
|
||||
* inner Observable. So far, it behaves like {@link mergeAll}. However,
|
||||
* `exhaust` ignores every new inner Observable if the previous Observable has
|
||||
* not yet completed. Once that one completes, it will accept and flatten the
|
||||
* next inner Observable and repeat this process.
|
||||
*
|
||||
* @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(5));
|
||||
* var result = higherOrder.exhaust();
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link combineAll}
|
||||
* @see {@link concatAll}
|
||||
* @see {@link switch}
|
||||
* @see {@link mergeAll}
|
||||
* @see {@link exhaustMap}
|
||||
* @see {@link zipAll}
|
||||
*
|
||||
* @return {Observable} An Observable that takes a source of Observables and propagates the first observable
|
||||
* exclusively until it completes before subscribing to the next.
|
||||
* @method exhaust
|
||||
* @owner Observable
|
||||
*/
|
||||
export function exhaust() {
|
||||
return function (source) { return source.lift(new SwitchFirstOperator()); };
|
||||
}
|
||||
var SwitchFirstOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function SwitchFirstOperator() {
|
||||
}
|
||||
SwitchFirstOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new SwitchFirstSubscriber(subscriber));
|
||||
};
|
||||
return SwitchFirstOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var SwitchFirstSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(SwitchFirstSubscriber, _super);
|
||||
function SwitchFirstSubscriber(destination) {
|
||||
_super.call(this, destination);
|
||||
this.hasCompleted = false;
|
||||
this.hasSubscription = false;
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/exhaust.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/exhaust.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../src/operators/exhaust.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAC7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;IACE,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,EAAK,CAAC,EAAzC,CAAyC,CAAC;AAC9E,CAAC;AAED;IAAA;IAIA,CAAC;IAHC,kCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,CAAC;IACH,0BAAC;AAAD,CAAC,AAJD,IAIC;AAED;;;;GAIG;AACH;IAAuC,yCAAqB;IAI1D,+BAAY,WAA0B;QACpC,kBAAM,WAAW,CAAC,CAAC;QAJb,iBAAY,GAAY,KAAK,CAAC;QAC9B,oBAAe,GAAY,KAAK,CAAC;IAIzC,CAAC;IAES,qCAAK,GAAf,UAAgB,KAAQ;QACtB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAES,yCAAS,GAAnB;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,8CAAc,GAAd,UAAe,QAAsB;QACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AA7BD,CAAuC,eAAe,GA6BrD"}
|
139
node_modules/rxjs/_esm5/operators/exhaustMap.js
generated
vendored
Normal file
139
node_modules/rxjs/_esm5/operators/exhaustMap.js
generated
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Projects each source value to an Observable which is merged in the output
|
||||
* Observable only if the previous projected Observable has completed.
|
||||
*
|
||||
* <span class="informal">Maps each value to an Observable, then flattens all of
|
||||
* these inner Observables using {@link exhaust}.</span>
|
||||
*
|
||||
* <img src="./img/exhaustMap.png" width="100%">
|
||||
*
|
||||
* Returns an Observable that emits items based on applying a function that you
|
||||
* supply to each item emitted by the source Observable, where that function
|
||||
* returns an (so-called "inner") Observable. When it projects a source value to
|
||||
* an Observable, the output Observable begins emitting the items emitted by
|
||||
* that projected Observable. However, `exhaustMap` ignores every new projected
|
||||
* Observable if the previous projected Observable has not yet completed. Once
|
||||
* that one completes, it will accept and flatten the next projected Observable
|
||||
* and repeat this process.
|
||||
*
|
||||
* @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.exhaustMap((ev) => Rx.Observable.interval(1000).take(5));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link concatMap}
|
||||
* @see {@link exhaust}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link switchMap}
|
||||
*
|
||||
* @param {function(value: T, ?index: number): ObservableInput} project A function
|
||||
* that, when applied to an item emitted by the source Observable, returns an
|
||||
* Observable.
|
||||
* @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
|
||||
* A function to produce the value on the output Observable based on the values
|
||||
* and the indices of the source (outer) emission and the inner Observable
|
||||
* emission. The arguments passed to this function are:
|
||||
* - `outerValue`: the value that came from the source
|
||||
* - `innerValue`: the value that came from the projected Observable
|
||||
* - `outerIndex`: the "index" of the value that came from the source
|
||||
* - `innerIndex`: the "index" of the value from the projected Observable
|
||||
* @return {Observable} An Observable containing projected Observables
|
||||
* of each item of the source, ignoring projected Observables that start before
|
||||
* their preceding Observable has completed.
|
||||
* @method exhaustMap
|
||||
* @owner Observable
|
||||
*/
|
||||
export function exhaustMap(project, resultSelector) {
|
||||
return function (source) { return source.lift(new SwitchFirstMapOperator(project, resultSelector)); };
|
||||
}
|
||||
var SwitchFirstMapOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function SwitchFirstMapOperator(project, resultSelector) {
|
||||
this.project = project;
|
||||
this.resultSelector = resultSelector;
|
||||
}
|
||||
SwitchFirstMapOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new SwitchFirstMapSubscriber(subscriber, this.project, this.resultSelector));
|
||||
};
|
||||
return SwitchFirstMapOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var SwitchFirstMapSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(SwitchFirstMapSubscriber, _super);
|
||||
function SwitchFirstMapSubscriber(destination, project, resultSelector) {
|
||||
_super.call(this, destination);
|
||||
this.project = project;
|
||||
this.resultSelector = resultSelector;
|
||||
this.hasSubscription = false;
|
||||
this.hasCompleted = false;
|
||||
this.index = 0;
|
||||
}
|
||||
SwitchFirstMapSubscriber.prototype._next = function (value) {
|
||||
if (!this.hasSubscription) {
|
||||
this.tryNext(value);
|
||||
}
|
||||
};
|
||||
SwitchFirstMapSubscriber.prototype.tryNext = function (value) {
|
||||
var index = this.index++;
|
||||
var destination = this.destination;
|
||||
try {
|
||||
var result = this.project(value, index);
|
||||
this.hasSubscription = true;
|
||||
this.add(subscribeToResult(this, result, value, index));
|
||||
}
|
||||
catch (err) {
|
||||
destination.error(err);
|
||||
}
|
||||
};
|
||||
SwitchFirstMapSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (!this.hasSubscription) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
SwitchFirstMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
var _a = this, resultSelector = _a.resultSelector, destination = _a.destination;
|
||||
if (resultSelector) {
|
||||
this.trySelectResult(outerValue, innerValue, outerIndex, innerIndex);
|
||||
}
|
||||
else {
|
||||
destination.next(innerValue);
|
||||
}
|
||||
};
|
||||
SwitchFirstMapSubscriber.prototype.trySelectResult = function (outerValue, innerValue, outerIndex, innerIndex) {
|
||||
var _a = this, resultSelector = _a.resultSelector, destination = _a.destination;
|
||||
try {
|
||||
var result = resultSelector(outerValue, innerValue, outerIndex, innerIndex);
|
||||
destination.next(result);
|
||||
}
|
||||
catch (err) {
|
||||
destination.error(err);
|
||||
}
|
||||
};
|
||||
SwitchFirstMapSubscriber.prototype.notifyError = function (err) {
|
||||
this.destination.error(err);
|
||||
};
|
||||
SwitchFirstMapSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
this.remove(innerSub);
|
||||
this.hasSubscription = false;
|
||||
if (this.hasCompleted) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return SwitchFirstMapSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=exhaustMap.js.map
|
1
node_modules/rxjs/_esm5/operators/exhaustMap.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/exhaustMap.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../src/operators/exhaustMap.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAM7D,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,2BACE,OAAwD,EACxD,cAA4F;IAE1F,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,EAAhE,CAAgE,CAAC;AACrG,CAAC;AAEH;IACE,gCAAoB,OAAwD,EACxD,cAA4F;QAD5F,YAAO,GAAP,OAAO,CAAiD;QACxD,mBAAc,GAAd,cAAc,CAA8E;IAChH,CAAC;IAED,qCAAI,GAAJ,UAAK,UAAyB,EAAE,MA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C,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IACH,+BAAC;AAAD,CAAC,AAtED,CAAgD,eAAe,GAsE9D"}
|
154
node_modules/rxjs/_esm5/operators/expand.js
generated
vendored
Normal file
154
node_modules/rxjs/_esm5/operators/expand.js
generated
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
/** PURE_IMPORTS_START .._util_tryCatch,.._util_errorObject,.._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Recursively projects each source value to an Observable which is merged in
|
||||
* the output Observable.
|
||||
*
|
||||
* <span class="informal">It's similar to {@link mergeMap}, but applies the
|
||||
* projection function to every source value as well as every output value.
|
||||
* It's recursive.</span>
|
||||
*
|
||||
* <img src="./img/expand.png" width="100%">
|
||||
*
|
||||
* Returns an Observable that emits items based on applying a function that you
|
||||
* supply to each item emitted by the source Observable, where that function
|
||||
* returns an Observable, and then merging those resulting Observables and
|
||||
* emitting the results of this merger. *Expand* will re-emit on the output
|
||||
* Observable every source value. Then, each output value is given to the
|
||||
* `project` function which returns an inner Observable to be merged on the
|
||||
* output Observable. Those output values resulting from the projection are also
|
||||
* given to the `project` function to produce new output values. This is how
|
||||
* *expand* behaves recursively.
|
||||
*
|
||||
* @example <caption>Start emitting the powers of two on every click, at most 10 of them</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var powersOfTwo = clicks
|
||||
* .mapTo(1)
|
||||
* .expand(x => Rx.Observable.of(2 * x).delay(1000))
|
||||
* .take(10);
|
||||
* powersOfTwo.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link mergeScan}
|
||||
*
|
||||
* @param {function(value: T, index: number) => Observable} project A function
|
||||
* that, when applied to an item emitted by the source or the output Observable,
|
||||
* returns an Observable.
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
|
||||
* Observables being subscribed to concurrently.
|
||||
* @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to
|
||||
* each projected inner Observable.
|
||||
* @return {Observable} An Observable that emits the source values and also
|
||||
* result of applying the projection function to each value emitted on the
|
||||
* output Observable and and merging the results of the Observables obtained
|
||||
* from this transformation.
|
||||
* @method expand
|
||||
* @owner Observable
|
||||
*/
|
||||
export function expand(project, concurrent, scheduler) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
if (scheduler === void 0) {
|
||||
scheduler = undefined;
|
||||
}
|
||||
concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
|
||||
return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
|
||||
}
|
||||
export var ExpandOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function ExpandOperator(project, concurrent, scheduler) {
|
||||
this.project = project;
|
||||
this.concurrent = concurrent;
|
||||
this.scheduler = scheduler;
|
||||
}
|
||||
ExpandOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
|
||||
};
|
||||
return ExpandOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var ExpandSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ExpandSubscriber, _super);
|
||||
function ExpandSubscriber(destination, project, concurrent, scheduler) {
|
||||
_super.call(this, destination);
|
||||
this.project = project;
|
||||
this.concurrent = concurrent;
|
||||
this.scheduler = scheduler;
|
||||
this.index = 0;
|
||||
this.active = 0;
|
||||
this.hasCompleted = false;
|
||||
if (concurrent < Number.POSITIVE_INFINITY) {
|
||||
this.buffer = [];
|
||||
}
|
||||
}
|
||||
ExpandSubscriber.dispatch = function (arg) {
|
||||
var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
|
||||
subscriber.subscribeToProjection(result, value, index);
|
||||
};
|
||||
ExpandSubscriber.prototype._next = function (value) {
|
||||
var destination = this.destination;
|
||||
if (destination.closed) {
|
||||
this._complete();
|
||||
return;
|
||||
}
|
||||
var index = this.index++;
|
||||
if (this.active < this.concurrent) {
|
||||
destination.next(value);
|
||||
var result = tryCatch(this.project)(value, index);
|
||||
if (result === errorObject) {
|
||||
destination.error(errorObject.e);
|
||||
}
|
||||
else if (!this.scheduler) {
|
||||
this.subscribeToProjection(result, value, index);
|
||||
}
|
||||
else {
|
||||
var state = { subscriber: this, result: result, value: value, index: index };
|
||||
this.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.buffer.push(value);
|
||||
}
|
||||
};
|
||||
ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
|
||||
this.active++;
|
||||
this.add(subscribeToResult(this, result, value, index));
|
||||
};
|
||||
ExpandSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (this.hasCompleted && this.active === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
this._next(innerValue);
|
||||
};
|
||||
ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
|
||||
var buffer = this.buffer;
|
||||
this.remove(innerSub);
|
||||
this.active--;
|
||||
if (buffer && buffer.length > 0) {
|
||||
this._next(buffer.shift());
|
||||
}
|
||||
if (this.hasCompleted && this.active === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return ExpandSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=expand.js.map
|
1
node_modules/rxjs/_esm5/operators/expand.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/expand.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../src/operators/expand.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAE1C,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAM7D,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,uBAA6B,OAAmD,EACnD,UAA6C,EAC7C,SAAiC;IADjC,0BAA6C,GAA7C,aAAqB,MAAM,CAAC,iBAAiB;IAC7C,yBAAiC,GAAjC,qBAAiC;IAC5D,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,iBAAiB,GAAG,UAAU,CAAC;IAE3E,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,EAA/D,CAA+D,CAAC;AACpG,CAAC;AAED;IACE,wBAAoB,OAAmD,EACnD,UAAkB,EAClB,SAAqB;QAFrB,YAAO,GAAP,OAAO,CAA4C;QACnD,eAAU,GAAV,UAAU,CAAQ;QAClB,cAAS,GAAT,SAAS,CAAY;IACzC,CAAC;IAED,6BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC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UAAkB,EACtC,QAA+B;QACxC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,yCAAc,GAAd,UAAe,QAAsB;QACnC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7B,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IACH,uBAAC;AAAD,CAAC,AA3ED,CAA4C,eAAe,GA2E1D"}
|
95
node_modules/rxjs/_esm5/operators/filter.js
generated
vendored
Normal file
95
node_modules/rxjs/_esm5/operators/filter.js
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Filter items emitted by the source Observable by only emitting those that
|
||||
* satisfy a specified predicate.
|
||||
*
|
||||
* <span class="informal">Like
|
||||
* [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),
|
||||
* it only emits a value from the source if it passes a criterion function.</span>
|
||||
*
|
||||
* <img src="./img/filter.png" width="100%">
|
||||
*
|
||||
* Similar to the well-known `Array.prototype.filter` method, this operator
|
||||
* takes values from the source Observable, passes them through a `predicate`
|
||||
* function and only emits those values that yielded `true`.
|
||||
*
|
||||
* @example <caption>Emit only click events whose target was a DIV element</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');
|
||||
* clicksOnDivs.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link distinct}
|
||||
* @see {@link distinctUntilChanged}
|
||||
* @see {@link distinctUntilKeyChanged}
|
||||
* @see {@link ignoreElements}
|
||||
* @see {@link partition}
|
||||
* @see {@link skip}
|
||||
*
|
||||
* @param {function(value: T, index: number): boolean} predicate A function that
|
||||
* evaluates each value emitted by the source Observable. If it returns `true`,
|
||||
* the value is emitted, if `false` the value is not passed to the output
|
||||
* Observable. The `index` parameter is the number `i` for the i-th source
|
||||
* emission that has happened since the subscription, starting from the number
|
||||
* `0`.
|
||||
* @param {any} [thisArg] An optional argument to determine the value of `this`
|
||||
* in the `predicate` function.
|
||||
* @return {Observable} An Observable of values from the source that were
|
||||
* allowed by the `predicate` function.
|
||||
* @method filter
|
||||
* @owner Observable
|
||||
*/
|
||||
export function filter(predicate, thisArg) {
|
||||
return function filterOperatorFunction(source) {
|
||||
return source.lift(new FilterOperator(predicate, thisArg));
|
||||
};
|
||||
}
|
||||
var FilterOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var FilterSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FilterSubscriber, _super);
|
||||
function FilterSubscriber(destination, predicate, thisArg) {
|
||||
_super.call(this, destination);
|
||||
this.predicate = predicate;
|
||||
this.thisArg = thisArg;
|
||||
this.count = 0;
|
||||
}
|
||||
// the try catch block below is left specifically for
|
||||
// optimization and perf reasons. a tryCatcher is not necessary here.
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/filter.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/filter.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/operators/filter.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAU1C,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,uBAA0B,SAA+C,EAC/C,OAAa;IACrC,MAAM,CAAC,gCAAgC,MAAqB;QAC1D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;AACJ,CAAC;AAED;IACE,wBAAoB,SAA+C,EAC/C,OAAa;QADb,cAAS,GAAT,SAAS,CAAsC;QAC/C,YAAO,GAAP,OAAO,CAAM;IACjC,CAAC;IAED,6BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1F,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,IAQC;AAED;;;;GAIG;AACH;IAAkC,oCAAa;IAI7C,0BAAY,WAA0B,EAClB,SAA+C,EAC/C,OAAY;QAC9B,kBAAM,WAAW,CAAC,CAAC;QAFD,cAAS,GAAT,SAAS,CAAsC;QAC/C,YAAO,GAAP,OAAO,CAAK;QAJhC,UAAK,GAAW,CAAC,CAAC;IAMlB,CAAC;IAED,qDAAqD;IACrD,qEAAqE;IAC3D,gCAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,MAAW,CAAC;QAChB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAClE,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC;QACT,CAAC;QACD,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACX,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACH,uBAAC;AAAD,CAAC,AAxBD,CAAkC,UAAU,GAwB3C"}
|
44
node_modules/rxjs/_esm5/operators/finalize.js
generated
vendored
Normal file
44
node_modules/rxjs/_esm5/operators/finalize.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._Subscription PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Subscription } from '../Subscription';
|
||||
/**
|
||||
* Returns an Observable that mirrors the source Observable, but will call a specified function when
|
||||
* the source terminates on complete or error.
|
||||
* @param {function} callback Function to be called when source terminates.
|
||||
* @return {Observable} An Observable that mirrors the source, but will call the specified function on termination.
|
||||
* @method finally
|
||||
* @owner Observable
|
||||
*/
|
||||
export function finalize(callback) {
|
||||
return function (source) { return source.lift(new FinallyOperator(callback)); };
|
||||
}
|
||||
var FinallyOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function FinallyOperator(callback) {
|
||||
this.callback = callback;
|
||||
}
|
||||
FinallyOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new FinallySubscriber(subscriber, this.callback));
|
||||
};
|
||||
return FinallyOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var FinallySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FinallySubscriber, _super);
|
||||
function FinallySubscriber(destination, callback) {
|
||||
_super.call(this, destination);
|
||||
this.add(new Subscription(callback));
|
||||
}
|
||||
return FinallySubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=finalize.js.map
|
1
node_modules/rxjs/_esm5/operators/finalize.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/finalize.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../src/operators/finalize.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,YAAY,EAAiB,MAAM,iBAAiB;AAI7D;;;;;;;GAOG;AACH,yBAA4B,QAAoB;IAC9C,MAAM,CAAC,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,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5E,CAAC;IACH,sBAAC;AAAD,CAAC,AAPD,IAOC;AAED;;;;GAIG;AACH;IAAmC,qCAAa;IAC9C,2BAAY,WAA0B,EAAE,QAAoB;QAC1D,kBAAM,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvC,CAAC;IACH,wBAAC;AAAD,CAAC,AALD,CAAmC,UAAU,GAK5C"}
|
99
node_modules/rxjs/_esm5/operators/find.js
generated
vendored
Normal file
99
node_modules/rxjs/_esm5/operators/find.js
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Emits only the first value emitted by the source Observable that meets some
|
||||
* condition.
|
||||
*
|
||||
* <span class="informal">Finds the first value that passes some test and emits
|
||||
* that.</span>
|
||||
*
|
||||
* <img src="./img/find.png" width="100%">
|
||||
*
|
||||
* `find` searches for the first item in the source Observable that matches the
|
||||
* specified condition embodied by the `predicate`, and returns the first
|
||||
* occurrence in the source. Unlike {@link first}, the `predicate` is required
|
||||
* in `find`, and does not emit an error if a valid value is not found.
|
||||
*
|
||||
* @example <caption>Find and emit the first click that happens on a DIV element</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.find(ev => ev.target.tagName === 'DIV');
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link filter}
|
||||
* @see {@link first}
|
||||
* @see {@link findIndex}
|
||||
* @see {@link take}
|
||||
*
|
||||
* @param {function(value: T, index: number, source: Observable<T>): boolean} predicate
|
||||
* A function called with each item to test for condition matching.
|
||||
* @param {any} [thisArg] An optional argument to determine the value of `this`
|
||||
* in the `predicate` function.
|
||||
* @return {Observable<T>} An Observable of the first item that matches the
|
||||
* condition.
|
||||
* @method find
|
||||
* @owner Observable
|
||||
*/
|
||||
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)); };
|
||||
}
|
||||
export var FindValueOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var FindValueSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FindValueSubscriber, _super);
|
||||
function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
|
||||
_super.call(this, destination);
|
||||
this.predicate = predicate;
|
||||
this.source = source;
|
||||
this.yieldIndex = yieldIndex;
|
||||
this.thisArg = thisArg;
|
||||
this.index = 0;
|
||||
}
|
||||
FindValueSubscriber.prototype.notifyComplete = function (value) {
|
||||
var destination = this.destination;
|
||||
destination.next(value);
|
||||
destination.complete();
|
||||
};
|
||||
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));
|
||||
//# sourceMappingURL=find.js.map
|
1
node_modules/rxjs/_esm5/operators/find.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/find.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/operators/find.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;AAW1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAwB,SAAsE,EACtE,OAAa;IACnC,EAAE,CAAC,CAAC,OAAO,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,6BAA6B,CAAC,CAAC;IACrD,CAAC;IACD,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,EAArE,CAAqE,CAAC;AAC1G,CAAC;AAED;IACE,2BAAoB,SAAsE,EACtE,MAAqB,EACrB,UAAmB,EACnB,OAAa;QAHb,cAAS,GAAT,SAAS,CAA6D;QACtE,WAAM,GAAN,MAAM,CAAe;QACrB,eAAU,GAAV,UAA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ACvD,CAAC;QACH,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAES,uCAAS,GAAnB;QACE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACxD,CAAC;IACH,0BAAC;AAAD,CAAC,AAlCD,CAA4C,UAAU,GAkCrD"}
|
40
node_modules/rxjs/_esm5/operators/findIndex.js
generated
vendored
Normal file
40
node_modules/rxjs/_esm5/operators/findIndex.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/** PURE_IMPORTS_START .._operators_find PURE_IMPORTS_END */
|
||||
import { FindValueOperator } from '../operators/find';
|
||||
/**
|
||||
* Emits only the index of the first value emitted by the source Observable that
|
||||
* meets some condition.
|
||||
*
|
||||
* <span class="informal">It's like {@link find}, but emits the index of the
|
||||
* found value, not the value itself.</span>
|
||||
*
|
||||
* <img src="./img/findIndex.png" width="100%">
|
||||
*
|
||||
* `findIndex` searches for the first item in the source Observable that matches
|
||||
* the specified condition embodied by the `predicate`, and returns the
|
||||
* (zero-based) index of the first occurrence in the source. Unlike
|
||||
* {@link first}, the `predicate` is required in `findIndex`, and does not emit
|
||||
* an error if a valid value is not found.
|
||||
*
|
||||
* @example <caption>Emit the index of first click that happens on a DIV element</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.findIndex(ev => ev.target.tagName === 'DIV');
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link filter}
|
||||
* @see {@link find}
|
||||
* @see {@link first}
|
||||
* @see {@link take}
|
||||
*
|
||||
* @param {function(value: T, index: number, source: Observable<T>): boolean} predicate
|
||||
* A function called with each item to test for condition matching.
|
||||
* @param {any} [thisArg] An optional argument to determine the value of `this`
|
||||
* in the `predicate` function.
|
||||
* @return {Observable} An Observable of the index of the first item that
|
||||
* matches the condition.
|
||||
* @method find
|
||||
* @owner Observable
|
||||
*/
|
||||
export function findIndex(predicate, thisArg) {
|
||||
return function (source) { return source.lift(new FindValueOperator(predicate, source, true, thisArg)); };
|
||||
}
|
||||
//# sourceMappingURL=findIndex.js.map
|
1
node_modules/rxjs/_esm5/operators/findIndex.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/findIndex.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../src/operators/findIndex.ts"],"names":[],"mappings":"OACO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,0BAA6B,SAAsE,EACtE,OAAa;IACxC,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAoB,EAAvF,CAAuF,CAAC;AAC5H,CAAC"}
|
153
node_modules/rxjs/_esm5/operators/first.js
generated
vendored
Normal file
153
node_modules/rxjs/_esm5/operators/first.js
generated
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._util_EmptyError PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { EmptyError } from '../util/EmptyError';
|
||||
/**
|
||||
* Emits only the first value (or the first value that meets some condition)
|
||||
* emitted by the source Observable.
|
||||
*
|
||||
* <span class="informal">Emits only the first value. Or emits only the first
|
||||
* value that passes some test.</span>
|
||||
*
|
||||
* <img src="./img/first.png" width="100%">
|
||||
*
|
||||
* If called with no arguments, `first` emits the first value of the source
|
||||
* Observable, then completes. If called with a `predicate` function, `first`
|
||||
* emits the first value of the source that matches the specified condition. It
|
||||
* may also take a `resultSelector` function to produce the output value from
|
||||
* the input value, and a `defaultValue` to emit in case the source completes
|
||||
* before it is able to emit a valid value. Throws an error if `defaultValue`
|
||||
* was not provided and a matching element is not found.
|
||||
*
|
||||
* @example <caption>Emit only the first click that happens on the DOM</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.first();
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Emits the first click that happens on a DIV</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.first(ev => ev.target.tagName === 'DIV');
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link filter}
|
||||
* @see {@link find}
|
||||
* @see {@link take}
|
||||
*
|
||||
* @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
|
||||
* callback if the Observable completes before any `next` notification was sent.
|
||||
*
|
||||
* @param {function(value: T, index: number, source: Observable<T>): boolean} [predicate]
|
||||
* An optional function called with each item to test for condition matching.
|
||||
* @param {function(value: T, index: number): R} [resultSelector] A function to
|
||||
* produce the value on the output Observable based on the values
|
||||
* and the indices of the source Observable. The arguments passed to this
|
||||
* function are:
|
||||
* - `value`: the value that was emitted on the source.
|
||||
* - `index`: the "index" of the value from the source.
|
||||
* @param {R} [defaultValue] The default value emitted in case no valid value
|
||||
* was found on the source.
|
||||
* @return {Observable<T|R>} An Observable of the first item that matches the
|
||||
* condition.
|
||||
* @method first
|
||||
* @owner Observable
|
||||
*/
|
||||
export function first(predicate, resultSelector, defaultValue) {
|
||||
return function (source) { return source.lift(new FirstOperator(predicate, resultSelector, defaultValue, source)); };
|
||||
}
|
||||
var FirstOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function FirstOperator(predicate, resultSelector, defaultValue, source) {
|
||||
this.predicate = predicate;
|
||||
this.resultSelector = resultSelector;
|
||||
this.defaultValue = defaultValue;
|
||||
this.source = source;
|
||||
}
|
||||
FirstOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new FirstSubscriber(observer, this.predicate, this.resultSelector, this.defaultValue, this.source));
|
||||
};
|
||||
return FirstOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var FirstSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(FirstSubscriber, _super);
|
||||
function FirstSubscriber(destination, predicate, resultSelector, defaultValue, source) {
|
||||
_super.call(this, destination);
|
||||
this.predicate = predicate;
|
||||
this.resultSelector = resultSelector;
|
||||
this.defaultValue = defaultValue;
|
||||
this.source = source;
|
||||
this.index = 0;
|
||||
this.hasCompleted = false;
|
||||
this._emitted = false;
|
||||
}
|
||||
FirstSubscriber.prototype._next = function (value) {
|
||||
var index = this.index++;
|
||||
if (this.predicate) {
|
||||
this._tryPredicate(value, index);
|
||||
}
|
||||
else {
|
||||
this._emit(value, index);
|
||||
}
|
||||
};
|
||||
FirstSubscriber.prototype._tryPredicate = function (value, index) {
|
||||
var result;
|
||||
try {
|
||||
result = this.predicate(value, index, this.source);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
if (result) {
|
||||
this._emit(value, index);
|
||||
}
|
||||
};
|
||||
FirstSubscriber.prototype._emit = function (value, index) {
|
||||
if (this.resultSelector) {
|
||||
this._tryResultSelector(value, index);
|
||||
return;
|
||||
}
|
||||
this._emitFinal(value);
|
||||
};
|
||||
FirstSubscriber.prototype._tryResultSelector = function (value, index) {
|
||||
var result;
|
||||
try {
|
||||
result = this.resultSelector(value, index);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this._emitFinal(result);
|
||||
};
|
||||
FirstSubscriber.prototype._emitFinal = function (value) {
|
||||
var destination = this.destination;
|
||||
if (!this._emitted) {
|
||||
this._emitted = true;
|
||||
destination.next(value);
|
||||
destination.complete();
|
||||
this.hasCompleted = true;
|
||||
}
|
||||
};
|
||||
FirstSubscriber.prototype._complete = function () {
|
||||
var destination = this.destination;
|
||||
if (!this.hasCompleted && typeof this.defaultValue !== 'undefined') {
|
||||
destination.next(this.defaultValue);
|
||||
destination.complete();
|
||||
}
|
||||
else if (!this.hasCompleted) {
|
||||
destination.error(new EmptyError);
|
||||
}
|
||||
};
|
||||
return FirstSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=first.js.map
|
1
node_modules/rxjs/_esm5/operators/first.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/first.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"first.js","sourceRoot":"","sources":["../../src/operators/first.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,UAAU,EAAE,MAAM,oBAAoB;AAiB/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,sBAA4B,SAAuE,EACvE,cAAwD,EACxD,YAAgB;IAC1C,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC,EAA/E,CAA+E,CAAC;AACpH,CAAC;AAED;IACE,uBAAoB,SAAuE,EACvE,cAAwD,EACxD,YAAkB,EAClB,MAAsB;QAHtB,cAAS,GAAT,SAAS,CAA8D;QACvE,mBAAc,GAAd,cAAc,CAA0C;QACxD,iBAAY,GAAZ,YAAY,CAAM;QAClB,WAAM,GAAN,MAAM,CAAgB;IAC1C,CAAC;IAED,4BAAI,GAAJ,UAAK,QAAuB,EAAE,MAAW;QAC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,CAAC,YAAY,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC;YACnE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACpC,WAAW,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC9B,WAAW,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAzED,CAAoC,UAAU,GAyE7C"}
|
276
node_modules/rxjs/_esm5/operators/groupBy.js
generated
vendored
Normal file
276
node_modules/rxjs/_esm5/operators/groupBy.js
generated
vendored
Normal file
@ -0,0 +1,276 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._Subscription,.._Observable,.._Subject,.._util_Map,.._util_FastMap PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { Observable } from '../Observable';
|
||||
import { Subject } from '../Subject';
|
||||
import { Map } from '../util/Map';
|
||||
import { FastMap } from '../util/FastMap';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Groups the items emitted by an Observable according to a specified criterion,
|
||||
* and emits these grouped items as `GroupedObservables`, one
|
||||
* {@link GroupedObservable} per group.
|
||||
*
|
||||
* <img src="./img/groupBy.png" width="100%">
|
||||
*
|
||||
* @example <caption>Group objects by id and return as array</caption>
|
||||
* Observable.of<Obj>({id: 1, name: 'aze1'},
|
||||
* {id: 2, name: 'sf2'},
|
||||
* {id: 2, name: 'dg2'},
|
||||
* {id: 1, name: 'erg1'},
|
||||
* {id: 1, name: 'df1'},
|
||||
* {id: 2, name: 'sfqfb2'},
|
||||
* {id: 3, name: 'qfs3'},
|
||||
* {id: 2, name: 'qsgqsfg2'}
|
||||
* )
|
||||
* .groupBy(p => p.id)
|
||||
* .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], []))
|
||||
* .subscribe(p => console.log(p));
|
||||
*
|
||||
* // displays:
|
||||
* // [ { id: 1, name: 'aze1' },
|
||||
* // { id: 1, name: 'erg1' },
|
||||
* // { id: 1, name: 'df1' } ]
|
||||
* //
|
||||
* // [ { id: 2, name: 'sf2' },
|
||||
* // { id: 2, name: 'dg2' },
|
||||
* // { id: 2, name: 'sfqfb2' },
|
||||
* // { id: 2, name: 'qsgqsfg2' } ]
|
||||
* //
|
||||
* // [ { id: 3, name: 'qfs3' } ]
|
||||
*
|
||||
* @example <caption>Pivot data on the id field</caption>
|
||||
* Observable.of<Obj>({id: 1, name: 'aze1'},
|
||||
* {id: 2, name: 'sf2'},
|
||||
* {id: 2, name: 'dg2'},
|
||||
* {id: 1, name: 'erg1'},
|
||||
* {id: 1, name: 'df1'},
|
||||
* {id: 2, name: 'sfqfb2'},
|
||||
* {id: 3, name: 'qfs1'},
|
||||
* {id: 2, name: 'qsgqsfg2'}
|
||||
* )
|
||||
* .groupBy(p => p.id, p => p.name)
|
||||
* .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], ["" + group$.key]))
|
||||
* .map(arr => ({'id': parseInt(arr[0]), 'values': arr.slice(1)}))
|
||||
* .subscribe(p => console.log(p));
|
||||
*
|
||||
* // displays:
|
||||
* // { id: 1, values: [ 'aze1', 'erg1', 'df1' ] }
|
||||
* // { id: 2, values: [ 'sf2', 'dg2', 'sfqfb2', 'qsgqsfg2' ] }
|
||||
* // { id: 3, values: [ 'qfs1' ] }
|
||||
*
|
||||
* @param {function(value: T): K} keySelector A function that extracts the key
|
||||
* for each item.
|
||||
* @param {function(value: T): R} [elementSelector] A function that extracts the
|
||||
* return element for each item.
|
||||
* @param {function(grouped: GroupedObservable<K,R>): Observable<any>} [durationSelector]
|
||||
* A function that returns an Observable to determine how long each group should
|
||||
* exist.
|
||||
* @return {Observable<GroupedObservable<K,R>>} An Observable that emits
|
||||
* GroupedObservables, each of which corresponds to a unique key value and each
|
||||
* of which emits those items from the source Observable that share that key
|
||||
* value.
|
||||
* @method groupBy
|
||||
* @owner Observable
|
||||
*/
|
||||
export function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
|
||||
return function (source) {
|
||||
return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
|
||||
};
|
||||
}
|
||||
var GroupByOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var GroupBySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(GroupBySubscriber, _super);
|
||||
function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
|
||||
_super.call(this, destination);
|
||||
this.keySelector = keySelector;
|
||||
this.elementSelector = elementSelector;
|
||||
this.durationSelector = durationSelector;
|
||||
this.subjectSelector = subjectSelector;
|
||||
this.groups = null;
|
||||
this.attemptedToUnsubscribe = false;
|
||||
this.count = 0;
|
||||
}
|
||||
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 = typeof key === 'string' ? new FastMap() : 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));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var GroupDurationSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(GroupDurationSubscriber, _super);
|
||||
function GroupDurationSubscriber(key, group, parent) {
|
||||
_super.call(this, group);
|
||||
this.key = key;
|
||||
this.group = group;
|
||||
this.parent = parent;
|
||||
}
|
||||
GroupDurationSubscriber.prototype._next = function (value) {
|
||||
this.complete();
|
||||
};
|
||||
/** @deprecated internal use only */ 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));
|
||||
/**
|
||||
* An Observable representing values belonging to the same group represented by
|
||||
* a common key. The values emitted by a GroupedObservable come from the source
|
||||
* Observable. The common key is available as the field `key` on a
|
||||
* GroupedObservable instance.
|
||||
*
|
||||
* @class GroupedObservable<K, T>
|
||||
*/
|
||||
export var GroupedObservable = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(GroupedObservable, _super);
|
||||
function GroupedObservable(key, groupSubject, refCountSubscription) {
|
||||
_super.call(this);
|
||||
this.key = key;
|
||||
this.groupSubject = groupSubject;
|
||||
this.refCountSubscription = refCountSubscription;
|
||||
}
|
||||
/** @deprecated internal use only */ 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));
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var InnerRefCountSubscription = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(InnerRefCountSubscription, _super);
|
||||
function InnerRefCountSubscription(parent) {
|
||||
_super.call(this);
|
||||
this.parent = parent;
|
||||
parent.count++;
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/groupBy.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/groupBy.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
49
node_modules/rxjs/_esm5/operators/ignoreElements.js
generated
vendored
Normal file
49
node_modules/rxjs/_esm5/operators/ignoreElements.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._util_noop PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { noop } from '../util/noop';
|
||||
/**
|
||||
* Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.
|
||||
*
|
||||
* <img src="./img/ignoreElements.png" width="100%">
|
||||
*
|
||||
* @return {Observable} An empty Observable that only calls `complete`
|
||||
* or `error`, based on which one is called by the source Observable.
|
||||
* @method ignoreElements
|
||||
* @owner Observable
|
||||
*/
|
||||
export function ignoreElements() {
|
||||
return function ignoreElementsOperatorFunction(source) {
|
||||
return source.lift(new IgnoreElementsOperator());
|
||||
};
|
||||
}
|
||||
var IgnoreElementsOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function IgnoreElementsOperator() {
|
||||
}
|
||||
IgnoreElementsOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new IgnoreElementsSubscriber(subscriber));
|
||||
};
|
||||
return IgnoreElementsOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var IgnoreElementsSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(IgnoreElementsSubscriber, _super);
|
||||
function IgnoreElementsSubscriber() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
IgnoreElementsSubscriber.prototype._next = function (unused) {
|
||||
noop();
|
||||
};
|
||||
return IgnoreElementsSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=ignoreElements.js.map
|
1
node_modules/rxjs/_esm5/operators/ignoreElements.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/ignoreElements.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../src/operators/ignoreElements.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,IAAI,EAAE,MAAM,cAAc;AAGnC;;;;;;;;;GASG;AACH;IACE,MAAM,CAAC,wCAAwC,MAAqB;QAClE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,sBAAsB,EAAE,CAAC,CAAC;IACnD,CAAC,CAAC;AACJ,CAAC;AAED;IAAA;IAIA,CAAC;IAHC,qCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC;IACpE,CAAC;IACH,6BAAC;AAAD,CAAC,AAJD,IAIC;AAED;;;;GAIG;AACH;IAA0C,4CAAa;IAAvD;QAA0C,8BAAa;IAIvD,CAAC;IAHW,wCAAK,GAAf,UAAgB,MAAS;QACvB,IAAI,EAAE,CAAC;IACT,CAAC;IACH,+BAAC;AAAD,CAAC,AAJD,CAA0C,UAAU,GAInD"}
|
44
node_modules/rxjs/_esm5/operators/isEmpty.js
generated
vendored
Normal file
44
node_modules/rxjs/_esm5/operators/isEmpty.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function isEmpty() {
|
||||
return function (source) { return source.lift(new IsEmptyOperator()); };
|
||||
}
|
||||
var IsEmptyOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function IsEmptyOperator() {
|
||||
}
|
||||
IsEmptyOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new IsEmptySubscriber(observer));
|
||||
};
|
||||
return IsEmptyOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var IsEmptySubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(IsEmptySubscriber, _super);
|
||||
function IsEmptySubscriber(destination) {
|
||||
_super.call(this, destination);
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/isEmpty.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/isEmpty.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../src/operators/isEmpty.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAI1C;IACE,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,eAAe,EAAE,CAAC,EAAlC,CAAkC,CAAC;AACvE,CAAC;AAED;IAAA;IAIA,CAAC;IAHC,8BAAI,GAAJ,UAAM,QAA6B,EAAE,MAAW;QAC9C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAED;;;;GAIG;AACH;IAAgC,qCAAe;IAC7C,2BAAY,WAAgC;QAC1C,kBAAM,WAAW,CAAC,CAAC;IACrB,CAAC;IAEO,0CAAc,GAAtB,UAAuB,OAAgB;QACrC,IAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAErC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,WAAW,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAES,iCAAK,GAAf,UAAgB,KAAc;QAC5B,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAES,qCAAS,GAAnB;QACE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACH,wBAAC;AAAD,CAAC,AAnBD,CAAgC,UAAU,GAmBzC"}
|
120
node_modules/rxjs/_esm5/operators/last.js
generated
vendored
Normal file
120
node_modules/rxjs/_esm5/operators/last.js
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._util_EmptyError PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { EmptyError } from '../util/EmptyError';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Returns an Observable that emits only the last item emitted by the source Observable.
|
||||
* It optionally takes a predicate function as a parameter, in which case, rather than emitting
|
||||
* the last item from the source Observable, the resulting Observable will emit the last item
|
||||
* from the source Observable that satisfies the predicate.
|
||||
*
|
||||
* <img src="./img/last.png" width="100%">
|
||||
*
|
||||
* @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
|
||||
* callback if the Observable completes before any `next` notification was sent.
|
||||
* @param {function} predicate - The condition any source emitted item has to satisfy.
|
||||
* @return {Observable} An Observable that emits only the last item satisfying the given condition
|
||||
* from the source, or an NoSuchElementException if no such items are emitted.
|
||||
* @throws - Throws if no items that match the predicate are emitted by the source Observable.
|
||||
* @method last
|
||||
* @owner Observable
|
||||
*/
|
||||
export function last(predicate, resultSelector, defaultValue) {
|
||||
return function (source) { return source.lift(new LastOperator(predicate, resultSelector, defaultValue, source)); };
|
||||
}
|
||||
var LastOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function LastOperator(predicate, resultSelector, defaultValue, source) {
|
||||
this.predicate = predicate;
|
||||
this.resultSelector = resultSelector;
|
||||
this.defaultValue = defaultValue;
|
||||
this.source = source;
|
||||
}
|
||||
LastOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new LastSubscriber(observer, this.predicate, this.resultSelector, this.defaultValue, this.source));
|
||||
};
|
||||
return LastOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var LastSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(LastSubscriber, _super);
|
||||
function LastSubscriber(destination, predicate, resultSelector, defaultValue, source) {
|
||||
_super.call(this, destination);
|
||||
this.predicate = predicate;
|
||||
this.resultSelector = resultSelector;
|
||||
this.defaultValue = defaultValue;
|
||||
this.source = source;
|
||||
this.hasValue = false;
|
||||
this.index = 0;
|
||||
if (typeof defaultValue !== 'undefined') {
|
||||
this.lastValue = defaultValue;
|
||||
this.hasValue = true;
|
||||
}
|
||||
}
|
||||
LastSubscriber.prototype._next = function (value) {
|
||||
var index = this.index++;
|
||||
if (this.predicate) {
|
||||
this._tryPredicate(value, index);
|
||||
}
|
||||
else {
|
||||
if (this.resultSelector) {
|
||||
this._tryResultSelector(value, index);
|
||||
return;
|
||||
}
|
||||
this.lastValue = value;
|
||||
this.hasValue = true;
|
||||
}
|
||||
};
|
||||
LastSubscriber.prototype._tryPredicate = function (value, index) {
|
||||
var result;
|
||||
try {
|
||||
result = this.predicate(value, index, this.source);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
if (result) {
|
||||
if (this.resultSelector) {
|
||||
this._tryResultSelector(value, index);
|
||||
return;
|
||||
}
|
||||
this.lastValue = value;
|
||||
this.hasValue = true;
|
||||
}
|
||||
};
|
||||
LastSubscriber.prototype._tryResultSelector = function (value, index) {
|
||||
var result;
|
||||
try {
|
||||
result = this.resultSelector(value, index);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.lastValue = result;
|
||||
this.hasValue = true;
|
||||
};
|
||||
LastSubscriber.prototype._complete = function () {
|
||||
var destination = this.destination;
|
||||
if (this.hasValue) {
|
||||
destination.next(this.lastValue);
|
||||
destination.complete();
|
||||
}
|
||||
else {
|
||||
destination.error(new EmptyError);
|
||||
}
|
||||
};
|
||||
return LastSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=last.js.map
|
1
node_modules/rxjs/_esm5/operators/last.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/last.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"last.js","sourceRoot":"","sources":["../../src/operators/last.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,UAAU,EAAE,MAAM,oBAAoB;AAiB/C,mCAAmC;AAEnC;;;;;;;;;;;;;;;;GAgBG;AACH,qBAA2B,SAAuE,EACvE,cAAwD,EACxD,YAAgB;IACzC,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC,EAA9E,CAA8E,CAAC;AACnH,CAAC;AAED;IACE,sBAAoB,SAAuE,EACvE,cAAwD,EACxD,YAAkB,EAClB,MAAsB;QAHtB,cAAS,GAAT,SAAS,CAA8D;QACvE,mBAAc,GAAd,cAAc,CAA0C;QACxD,iBAAY,GAAZ,YAAY,CAAM;QAClB,WAAM,GAAN,MAAM,CAAgB;IAC1C,CAAC;IAED,2BAAI,GAAJ,UAAK,QAAuB,EAAE,MAAW;QACvC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,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ACH,qBAAC;AAAD,CAAC,AAtED,CAAmC,UAAU,GAsE5C"}
|
89
node_modules/rxjs/_esm5/operators/map.js
generated
vendored
Normal file
89
node_modules/rxjs/_esm5/operators/map.js
generated
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Applies a given `project` function to each value emitted by the source
|
||||
* Observable, and emits the resulting values as an Observable.
|
||||
*
|
||||
* <span class="informal">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),
|
||||
* it passes each source value through a transformation function to get
|
||||
* corresponding output values.</span>
|
||||
*
|
||||
* <img src="./img/map.png" width="100%">
|
||||
*
|
||||
* Similar to the well known `Array.prototype.map` function, this operator
|
||||
* applies a projection to each value and emits that projection in the output
|
||||
* Observable.
|
||||
*
|
||||
* @example <caption>Map every click to the clientX position of that click</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var positions = clicks.map(ev => ev.clientX);
|
||||
* positions.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link mapTo}
|
||||
* @see {@link pluck}
|
||||
*
|
||||
* @param {function(value: T, index: number): R} project The function to apply
|
||||
* to each `value` emitted by the source Observable. The `index` parameter is
|
||||
* the number `i` for the i-th emission that has happened since the
|
||||
* subscription, starting from the number `0`.
|
||||
* @param {any} [thisArg] An optional argument to define what `this` is in the
|
||||
* `project` function.
|
||||
* @return {Observable<R>} An Observable that emits the values from the source
|
||||
* Observable transformed by the given `project` function.
|
||||
* @method map
|
||||
* @owner Observable
|
||||
*/
|
||||
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));
|
||||
};
|
||||
}
|
||||
export var MapOperator = /*@__PURE__*/ (/*@__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;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var MapSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(MapSubscriber, _super);
|
||||
function MapSubscriber(destination, project, thisArg) {
|
||||
_super.call(this, destination);
|
||||
this.project = project;
|
||||
this.count = 0;
|
||||
this.thisArg = thisArg || this;
|
||||
}
|
||||
// NOTE: This looks unoptimized, but it's actually purposefully NOT
|
||||
// using try/catch optimizations.
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/map.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/map.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/operators/map.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,oBAA0B,OAAu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YAC5B,MAAM,CAAC;QACT,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACH,oBAAC;AAAD,CAAC,AAvBD,CAAkC,UAAU,GAuB3C"}
|
64
node_modules/rxjs/_esm5/operators/mapTo.js
generated
vendored
Normal file
64
node_modules/rxjs/_esm5/operators/mapTo.js
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
/**
|
||||
* Emits the given constant value on the output Observable every time the source
|
||||
* Observable emits a value.
|
||||
*
|
||||
* <span class="informal">Like {@link map}, but it maps every source value to
|
||||
* the same output value every time.</span>
|
||||
*
|
||||
* <img src="./img/mapTo.png" width="100%">
|
||||
*
|
||||
* Takes a constant `value` as argument, and emits that whenever the source
|
||||
* Observable emits a value. In other words, ignores the actual source value,
|
||||
* and simply uses the emission moment to know when to emit the given `value`.
|
||||
*
|
||||
* @example <caption>Map every click to the string 'Hi'</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var greetings = clicks.mapTo('Hi');
|
||||
* greetings.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link map}
|
||||
*
|
||||
* @param {any} value The value to map each source value to.
|
||||
* @return {Observable} An Observable that emits the given `value` every time
|
||||
* the source Observable emits something.
|
||||
* @method mapTo
|
||||
* @owner Observable
|
||||
*/
|
||||
export function mapTo(value) {
|
||||
return function (source) { return source.lift(new MapToOperator(value)); };
|
||||
}
|
||||
var MapToOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function MapToOperator(value) {
|
||||
this.value = value;
|
||||
}
|
||||
MapToOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new MapToSubscriber(subscriber, this.value));
|
||||
};
|
||||
return MapToOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var MapToSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(MapToSubscriber, _super);
|
||||
function MapToSubscriber(destination, value) {
|
||||
_super.call(this, destination);
|
||||
this.value = value;
|
||||
}
|
||||
MapToSubscriber.prototype._next = function (x) {
|
||||
this.destination.next(this.value);
|
||||
};
|
||||
return MapToSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=mapTo.js.map
|
1
node_modules/rxjs/_esm5/operators/mapTo.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/mapTo.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../src/operators/mapTo.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,eAAe;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,sBAA4B,KAAQ;IAClC,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC,EAArC,CAAqC,CAAC;AAC1E,CAAC;AAED;IAIE,uBAAY,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,4BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IACH,oBAAC;AAAD,CAAC,AAXD,IAWC;AAED;;;;GAIG;AACH;IAAoC,mCAAa;IAI/C,yBAAY,WAA0B,EAAE,KAAQ;QAC9C,kBAAM,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAES,+BAAK,GAAf,UAAgB,CAAI;QAClB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IACH,sBAAC;AAAD,CAAC,AAZD,CAAoC,UAAU,GAY7C"}
|
93
node_modules/rxjs/_esm5/operators/materialize.js
generated
vendored
Normal file
93
node_modules/rxjs/_esm5/operators/materialize.js
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._Notification PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Notification } from '../Notification';
|
||||
/**
|
||||
* Represents all of the notifications from the source Observable as `next`
|
||||
* emissions marked with their original types within {@link Notification}
|
||||
* objects.
|
||||
*
|
||||
* <span class="informal">Wraps `next`, `error` and `complete` emissions in
|
||||
* {@link Notification} objects, emitted as `next` on the output Observable.
|
||||
* </span>
|
||||
*
|
||||
* <img src="./img/materialize.png" width="100%">
|
||||
*
|
||||
* `materialize` returns an Observable that emits a `next` notification for each
|
||||
* `next`, `error`, or `complete` emission of the source Observable. When the
|
||||
* source Observable emits `complete`, the output Observable will emit `next` as
|
||||
* a Notification of type "complete", and then it will emit `complete` as well.
|
||||
* When the source Observable emits `error`, the output will emit `next` as a
|
||||
* Notification of type "error", and then `complete`.
|
||||
*
|
||||
* This operator is useful for producing metadata of the source Observable, to
|
||||
* be consumed as `next` emissions. Use it in conjunction with
|
||||
* {@link dematerialize}.
|
||||
*
|
||||
* @example <caption>Convert a faulty Observable to an Observable of Notifications</caption>
|
||||
* var letters = Rx.Observable.of('a', 'b', 13, 'd');
|
||||
* var upperCase = letters.map(x => x.toUpperCase());
|
||||
* var materialized = upperCase.materialize();
|
||||
* materialized.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // - Notification {kind: "N", value: "A", error: undefined, hasValue: true}
|
||||
* // - Notification {kind: "N", value: "B", error: undefined, hasValue: true}
|
||||
* // - Notification {kind: "E", value: undefined, error: TypeError:
|
||||
* // x.toUpperCase is not a function at MapSubscriber.letters.map.x
|
||||
* // [as project] (http://1…, hasValue: false}
|
||||
*
|
||||
* @see {@link Notification}
|
||||
* @see {@link dematerialize}
|
||||
*
|
||||
* @return {Observable<Notification<T>>} An Observable that emits
|
||||
* {@link Notification} objects that wrap the original emissions from the source
|
||||
* Observable with metadata.
|
||||
* @method materialize
|
||||
* @owner Observable
|
||||
*/
|
||||
export function materialize() {
|
||||
return function materializeOperatorFunction(source) {
|
||||
return source.lift(new MaterializeOperator());
|
||||
};
|
||||
}
|
||||
var MaterializeOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function MaterializeOperator() {
|
||||
}
|
||||
MaterializeOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new MaterializeSubscriber(subscriber));
|
||||
};
|
||||
return MaterializeOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
var MaterializeSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(MaterializeSubscriber, _super);
|
||||
function MaterializeSubscriber(destination) {
|
||||
_super.call(this, destination);
|
||||
}
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/materialize.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/materialize.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../src/operators/materialize.ts"],"names":[],"mappings":";;;;;OAEO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH;IACE,MAAM,CAAC,qCAAqC,MAAqB;QAC/D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED;IAAA;IAIA,CAAC;IAHC,kCAAI,GAAJ,UAAK,UAAuC,EAAE,MAAW;QACvD,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,CAAC;IACH,0BAAC;AAAD,CAAC,AAJD,IAIC;AAED;;;;GAIG;AACH;IAAuC,yCAAa;IAClD,+BAAY,WAAwC;QAClD,kBAAM,WAAW,CAAC,CAAC;IACrB,CAAC;IAES,qCAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC;IAES,sCAAM,GAAhB,UAAiB,GAAQ;QACvB,IAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,WAAW,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAES,yCAAS,GAAnB;QACE,IAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;QAChD,WAAW,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IACH,4BAAC;AAAD,CAAC,AApBD,CAAuC,UAAU,GAoBhD"}
|
40
node_modules/rxjs/_esm5/operators/max.js
generated
vendored
Normal file
40
node_modules/rxjs/_esm5/operators/max.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/** PURE_IMPORTS_START ._reduce PURE_IMPORTS_END */
|
||||
import { reduce } from './reduce';
|
||||
/**
|
||||
* The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function),
|
||||
* and when source Observable completes it emits a single item: the item with the largest value.
|
||||
*
|
||||
* <img src="./img/max.png" width="100%">
|
||||
*
|
||||
* @example <caption>Get the maximal value of a series of numbers</caption>
|
||||
* Rx.Observable.of(5, 4, 7, 2, 8)
|
||||
* .max()
|
||||
* .subscribe(x => console.log(x)); // -> 8
|
||||
*
|
||||
* @example <caption>Use a comparer function to get the maximal item</caption>
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
* Observable.of<Person>({age: 7, name: 'Foo'},
|
||||
* {age: 5, name: 'Bar'},
|
||||
* {age: 9, name: 'Beer'})
|
||||
* .max<Person>((a: Person, b: Person) => a.age < b.age ? -1 : 1)
|
||||
* .subscribe((x: Person) => console.log(x.name)); // -> 'Beer'
|
||||
* }
|
||||
*
|
||||
* @see {@link min}
|
||||
*
|
||||
* @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the
|
||||
* value of two items.
|
||||
* @return {Observable} An Observable that emits item with the largest value.
|
||||
* @method max
|
||||
* @owner Observable
|
||||
*/
|
||||
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
|
1
node_modules/rxjs/_esm5/operators/max.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/max.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"max.js","sourceRoot":"","sources":["../../src/operators/max.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,EAAE,MAAM,UAAU;AAGjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oBAAuB,QAAiC;IACtD,IAAM,GAAG,GAAsB,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC;UAC3D,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAA1B,CAA0B;UACpC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAb,CAAa,CAAC;IAE5B,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
58
node_modules/rxjs/_esm5/operators/merge.js
generated
vendored
Normal file
58
node_modules/rxjs/_esm5/operators/merge.js
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/** PURE_IMPORTS_START .._observable_merge PURE_IMPORTS_END */
|
||||
import { merge as mergeStatic } from '../observable/merge';
|
||||
export { merge as mergeStatic } from '../observable/merge';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Creates an output Observable which concurrently emits all values from every
|
||||
* given input Observable.
|
||||
*
|
||||
* <span class="informal">Flattens multiple Observables together by blending
|
||||
* their values into one Observable.</span>
|
||||
*
|
||||
* <img src="./img/merge.png" width="100%">
|
||||
*
|
||||
* `merge` subscribes to each given input Observable (either the source or an
|
||||
* Observable given as argument), and simply forwards (without doing any
|
||||
* transformation) all the values from all the input Observables to the output
|
||||
* Observable. The output Observable only completes once all input Observables
|
||||
* have completed. Any error delivered by an input Observable will be immediately
|
||||
* emitted on the output Observable.
|
||||
*
|
||||
* @example <caption>Merge together two Observables: 1s interval and clicks</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var timer = Rx.Observable.interval(1000);
|
||||
* var clicksOrTimer = clicks.merge(timer);
|
||||
* clicksOrTimer.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>
|
||||
* var timer1 = Rx.Observable.interval(1000).take(10);
|
||||
* var timer2 = Rx.Observable.interval(2000).take(6);
|
||||
* var timer3 = Rx.Observable.interval(500).take(10);
|
||||
* var concurrent = 2; // the argument
|
||||
* var merged = timer1.merge(timer2, timer3, concurrent);
|
||||
* merged.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link mergeAll}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link mergeMapTo}
|
||||
* @see {@link mergeScan}
|
||||
*
|
||||
* @param {ObservableInput} other An input Observable to merge with the source
|
||||
* Observable. More than one input Observables may be given as argument.
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
|
||||
* Observables being subscribed to concurrently.
|
||||
* @param {Scheduler} [scheduler=null] The IScheduler to use for managing
|
||||
* concurrency of input Observables.
|
||||
* @return {Observable} An Observable that emits items that are the result of
|
||||
* every input Observable.
|
||||
* @method merge
|
||||
* @owner Observable
|
||||
*/
|
||||
export function merge() {
|
||||
var observables = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
observables[_i - 0] = arguments[_i];
|
||||
}
|
||||
return function (source) { return source.lift.call(mergeStatic.apply(void 0, [source].concat(observables))); };
|
||||
}
|
||||
//# sourceMappingURL=merge.js.map
|
1
node_modules/rxjs/_esm5/operators/merge.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/merge.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/operators/merge.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,qBAAqB;AAE1D,SAAS,KAAK,IAAI,WAAW,QAAQ,qBAAqB,CAAC;AAiB3D,mCAAmC;AACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;IAA4B,qBAAiE;SAAjE,WAAiE,CAAjE,sBAAiE,CAAjE,IAAiE;QAAjE,oCAAiE;;IAC3F,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,gBAAC,MAAM,SAAK,WAAW,EAAC,CAAC,EAArD,CAAqD,CAAC;AAC1F,CAAC"}
|
54
node_modules/rxjs/_esm5/operators/mergeAll.js
generated
vendored
Normal file
54
node_modules/rxjs/_esm5/operators/mergeAll.js
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/** PURE_IMPORTS_START ._mergeMap,.._util_identity PURE_IMPORTS_END */
|
||||
import { mergeMap } from './mergeMap';
|
||||
import { identity } from '../util/identity';
|
||||
/**
|
||||
* Converts a higher-order Observable into a first-order Observable which
|
||||
* concurrently delivers all values that are emitted on the inner Observables.
|
||||
*
|
||||
* <span class="informal">Flattens an Observable-of-Observables.</span>
|
||||
*
|
||||
* <img src="./img/mergeAll.png" width="100%">
|
||||
*
|
||||
* `mergeAll` subscribes to an Observable that emits Observables, also known as
|
||||
* a higher-order Observable. Each time it observes one of these emitted inner
|
||||
* Observables, it subscribes to that and delivers all the values from the
|
||||
* inner Observable on the output Observable. The output Observable only
|
||||
* completes once all inner Observables have completed. Any error delivered by
|
||||
* a inner Observable will be immediately emitted on the output Observable.
|
||||
*
|
||||
* @example <caption>Spawn a new interval Observable for each click event, and blend their outputs as one Observable</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000));
|
||||
* var firstOrder = higherOrder.mergeAll();
|
||||
* firstOrder.subscribe(x => console.log(x));
|
||||
*
|
||||
* @example <caption>Count from 0 to 9 every second for each click, but only allow 2 concurrent timers</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10));
|
||||
* var firstOrder = higherOrder.mergeAll(2);
|
||||
* firstOrder.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link combineAll}
|
||||
* @see {@link concatAll}
|
||||
* @see {@link exhaust}
|
||||
* @see {@link merge}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link mergeMapTo}
|
||||
* @see {@link mergeScan}
|
||||
* @see {@link switch}
|
||||
* @see {@link zipAll}
|
||||
*
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner
|
||||
* Observables being subscribed to concurrently.
|
||||
* @return {Observable} An Observable that emits values coming from all the
|
||||
* inner Observables emitted by the source Observable.
|
||||
* @method mergeAll
|
||||
* @owner Observable
|
||||
*/
|
||||
export function mergeAll(concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
return mergeMap(identity, null, concurrent);
|
||||
}
|
||||
//# sourceMappingURL=mergeAll.js.map
|
1
node_modules/rxjs/_esm5/operators/mergeAll.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/mergeAll.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../src/operators/mergeAll.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,MAAM,YAAY;OAC9B,EAAE,QAAQ,EAAE,MAAM,kBAAkB;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,yBAA4B,UAA6C;IAA7C,0BAA6C,GAA7C,aAAqB,MAAM,CAAC,iBAAiB;IACvE,MAAM,CAAC,QAAQ,CAAC,QAA4D,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAClG,CAAC"}
|
178
node_modules/rxjs/_esm5/operators/mergeMap.js
generated
vendored
Normal file
178
node_modules/rxjs/_esm5/operators/mergeMap.js
generated
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
/** PURE_IMPORTS_START .._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Projects each source value to an Observable which is merged in the output
|
||||
* Observable.
|
||||
*
|
||||
* <span class="informal">Maps each value to an Observable, then flattens all of
|
||||
* these inner Observables using {@link mergeAll}.</span>
|
||||
*
|
||||
* <img src="./img/mergeMap.png" width="100%">
|
||||
*
|
||||
* Returns an Observable that emits items based on applying a function that you
|
||||
* supply to each item emitted by the source Observable, where that function
|
||||
* returns an Observable, and then merging those resulting Observables and
|
||||
* emitting the results of this merger.
|
||||
*
|
||||
* @example <caption>Map and flatten each letter to an Observable ticking every 1 second</caption>
|
||||
* var letters = Rx.Observable.of('a', 'b', 'c');
|
||||
* var result = letters.mergeMap(x =>
|
||||
* Rx.Observable.interval(1000).map(i => x+i)
|
||||
* );
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in the following:
|
||||
* // a0
|
||||
* // b0
|
||||
* // c0
|
||||
* // a1
|
||||
* // b1
|
||||
* // c1
|
||||
* // continues to list a,b,c with respective ascending integers
|
||||
*
|
||||
* @see {@link concatMap}
|
||||
* @see {@link exhaustMap}
|
||||
* @see {@link merge}
|
||||
* @see {@link mergeAll}
|
||||
* @see {@link mergeMapTo}
|
||||
* @see {@link mergeScan}
|
||||
* @see {@link switchMap}
|
||||
*
|
||||
* @param {function(value: T, ?index: number): ObservableInput} project A function
|
||||
* that, when applied to an item emitted by the source Observable, returns an
|
||||
* Observable.
|
||||
* @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
|
||||
* A function to produce the value on the output Observable based on the values
|
||||
* and the indices of the source (outer) emission and the inner Observable
|
||||
* emission. The arguments passed to this function are:
|
||||
* - `outerValue`: the value that came from the source
|
||||
* - `innerValue`: the value that came from the projected Observable
|
||||
* - `outerIndex`: the "index" of the value that came from the source
|
||||
* - `innerIndex`: the "index" of the value from the projected Observable
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
|
||||
* Observables being subscribed to concurrently.
|
||||
* @return {Observable} An Observable that emits the result of applying the
|
||||
* projection function (and the optional `resultSelector`) to each item emitted
|
||||
* by the source Observable and merging the results of the Observables obtained
|
||||
* from this transformation.
|
||||
* @method mergeMap
|
||||
* @owner Observable
|
||||
*/
|
||||
export function mergeMap(project, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
return function mergeMapOperatorFunction(source) {
|
||||
if (typeof resultSelector === 'number') {
|
||||
concurrent = resultSelector;
|
||||
resultSelector = null;
|
||||
}
|
||||
return source.lift(new MergeMapOperator(project, resultSelector, concurrent));
|
||||
};
|
||||
}
|
||||
export var MergeMapOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function MergeMapOperator(project, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
this.project = project;
|
||||
this.resultSelector = resultSelector;
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
MergeMapOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new MergeMapSubscriber(observer, this.project, this.resultSelector, this.concurrent));
|
||||
};
|
||||
return MergeMapOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var MergeMapSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(MergeMapSubscriber, _super);
|
||||
function MergeMapSubscriber(destination, project, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
_super.call(this, destination);
|
||||
this.project = project;
|
||||
this.resultSelector = resultSelector;
|
||||
this.concurrent = concurrent;
|
||||
this.hasCompleted = false;
|
||||
this.buffer = [];
|
||||
this.active = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
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) {
|
||||
this.add(subscribeToResult(this, ish, value, index));
|
||||
};
|
||||
MergeMapSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (this.active === 0 && this.buffer.length === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
if (this.resultSelector) {
|
||||
this._notifyResultSelector(outerValue, innerValue, outerIndex, innerIndex);
|
||||
}
|
||||
else {
|
||||
this.destination.next(innerValue);
|
||||
}
|
||||
};
|
||||
MergeMapSubscriber.prototype._notifyResultSelector = function (outerValue, innerValue, outerIndex, innerIndex) {
|
||||
var result;
|
||||
try {
|
||||
result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.destination.next(result);
|
||||
};
|
||||
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));
|
||||
//# sourceMappingURL=mergeMap.js.map
|
1
node_modules/rxjs/_esm5/operators/mergeMap.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/mergeMap.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../src/operators/mergeMap.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AAOpD,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,yBAAkC,OAAwD,EACxD,cAAuG,EACvG,UAA6C;IAA7C,0BAA6C,GAA7C,aAAqB,MAAM,CAAC,iBAAiB;IAC7E,MAAM,CAAC,kCAAkC,MAAqB;QAC5D,EAAE,CAAC,CAAC,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC;YACvC,UAAU,GAAW,cAAc,CAAC;YACpC,cAAc,GAAG,IAAI,CAAC;QACxB,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,OAAO,EAAO,cAAc,EAAE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CAAC;IAEO,kDAAqB,GAA7B,UAA8B,UAAa,EAAE,UAAa,EAAE,UAAkB,EAAE,UAAkB;QAChG,IAAI,MAAS,CAAC;QACd,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QAC/E,CAAE;QAAA,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM,CAAC;QACT,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,2CAAc,GAAd,UAAe,QAAsB;QACnC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AA5ED,CAAiD,eAAe,GA4E/D"}
|
160
node_modules/rxjs/_esm5/operators/mergeMapTo.js
generated
vendored
Normal file
160
node_modules/rxjs/_esm5/operators/mergeMapTo.js
generated
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
/** PURE_IMPORTS_START .._OuterSubscriber,.._util_subscribeToResult PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Projects each source value to the same Observable which is merged multiple
|
||||
* times in the output Observable.
|
||||
*
|
||||
* <span class="informal">It's like {@link mergeMap}, but maps each value always
|
||||
* to the same inner Observable.</span>
|
||||
*
|
||||
* <img src="./img/mergeMapTo.png" width="100%">
|
||||
*
|
||||
* Maps each source value to the given Observable `innerObservable` regardless
|
||||
* of the source value, and then merges those resulting Observables into one
|
||||
* single Observable, which is the output Observable.
|
||||
*
|
||||
* @example <caption>For each click event, start an interval Observable ticking every 1 second</caption>
|
||||
* var clicks = Rx.Observable.fromEvent(document, 'click');
|
||||
* var result = clicks.mergeMapTo(Rx.Observable.interval(1000));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* @see {@link concatMapTo}
|
||||
* @see {@link merge}
|
||||
* @see {@link mergeAll}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link mergeScan}
|
||||
* @see {@link switchMapTo}
|
||||
*
|
||||
* @param {ObservableInput} innerObservable An Observable to replace each value from
|
||||
* the source Observable.
|
||||
* @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
|
||||
* A function to produce the value on the output Observable based on the values
|
||||
* and the indices of the source (outer) emission and the inner Observable
|
||||
* emission. The arguments passed to this function are:
|
||||
* - `outerValue`: the value that came from the source
|
||||
* - `innerValue`: the value that came from the projected Observable
|
||||
* - `outerIndex`: the "index" of the value that came from the source
|
||||
* - `innerIndex`: the "index" of the value from the projected Observable
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
|
||||
* Observables being subscribed to concurrently.
|
||||
* @return {Observable} An Observable that emits items from the given
|
||||
* `innerObservable` (and optionally transformed through `resultSelector`) every
|
||||
* time a value is emitted on the source Observable.
|
||||
* @method mergeMapTo
|
||||
* @owner Observable
|
||||
*/
|
||||
export function mergeMapTo(innerObservable, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
if (typeof resultSelector === 'number') {
|
||||
concurrent = resultSelector;
|
||||
resultSelector = null;
|
||||
}
|
||||
return function (source) { return source.lift(new MergeMapToOperator(innerObservable, resultSelector, concurrent)); };
|
||||
}
|
||||
// TODO: Figure out correct signature here: an Operator<Observable<T>, R>
|
||||
// needs to implement call(observer: Subscriber<R>): Subscriber<Observable<T>>
|
||||
export var MergeMapToOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function MergeMapToOperator(ish, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
this.ish = ish;
|
||||
this.resultSelector = resultSelector;
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
MergeMapToOperator.prototype.call = function (observer, source) {
|
||||
return source.subscribe(new MergeMapToSubscriber(observer, this.ish, this.resultSelector, this.concurrent));
|
||||
};
|
||||
return MergeMapToOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var MergeMapToSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(MergeMapToSubscriber, _super);
|
||||
function MergeMapToSubscriber(destination, ish, resultSelector, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
_super.call(this, destination);
|
||||
this.ish = ish;
|
||||
this.resultSelector = resultSelector;
|
||||
this.concurrent = concurrent;
|
||||
this.hasCompleted = false;
|
||||
this.buffer = [];
|
||||
this.active = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
MergeMapToSubscriber.prototype._next = function (value) {
|
||||
if (this.active < this.concurrent) {
|
||||
var resultSelector = this.resultSelector;
|
||||
var index = this.index++;
|
||||
var ish = this.ish;
|
||||
var destination = this.destination;
|
||||
this.active++;
|
||||
this._innerSub(ish, destination, resultSelector, value, index);
|
||||
}
|
||||
else {
|
||||
this.buffer.push(value);
|
||||
}
|
||||
};
|
||||
MergeMapToSubscriber.prototype._innerSub = function (ish, destination, resultSelector, value, index) {
|
||||
this.add(subscribeToResult(this, ish, value, index));
|
||||
};
|
||||
MergeMapToSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (this.active === 0 && this.buffer.length === 0) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
MergeMapToSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
var _a = this, resultSelector = _a.resultSelector, destination = _a.destination;
|
||||
if (resultSelector) {
|
||||
this.trySelectResult(outerValue, innerValue, outerIndex, innerIndex);
|
||||
}
|
||||
else {
|
||||
destination.next(innerValue);
|
||||
}
|
||||
};
|
||||
MergeMapToSubscriber.prototype.trySelectResult = function (outerValue, innerValue, outerIndex, innerIndex) {
|
||||
var _a = this, resultSelector = _a.resultSelector, destination = _a.destination;
|
||||
var result;
|
||||
try {
|
||||
result = resultSelector(outerValue, innerValue, outerIndex, innerIndex);
|
||||
}
|
||||
catch (err) {
|
||||
destination.error(err);
|
||||
return;
|
||||
}
|
||||
destination.next(result);
|
||||
};
|
||||
MergeMapToSubscriber.prototype.notifyError = function (err) {
|
||||
this.destination.error(err);
|
||||
};
|
||||
MergeMapToSubscriber.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 MergeMapToSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=mergeMapTo.js.map
|
1
node_modules/rxjs/_esm5/operators/mergeMapTo.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/mergeMapTo.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../src/operators/mergeMapTo.ts"],"names":[],"mappings":";;;;;OAKO,EAAE,eAAe,EAAE,MAAM,oBAAoB;OAE7C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAM7D,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,2BAAoC,eAA8B,EAC9B,cAAuG,EACvG,UAA6C;IAA7C,0BAA6C,GAA7C,aAAqB,MAAM,CAAC,iBAAiB;IAC/E,EAAE,CAAC,CAAC,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvC,UAAU,GAAW,cAAc,CAAC;QACpC,cAAc,GAAG,IAAI,CAAC;IACxB,CAAC;IACD,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,eAAe,EAAO,cAAc,EAAE,UAAU,CAAC,CAAC,EAArF,CAAqF,CAAC;AAC1H,CAAC;AAED,yEAAyE;AACzE,oFAAoF;AACpF;IACE,4BAAoB,GAAuB,EACvB,cAA4F,EAC5F,UAA6C;QAArD,0BAAqD,GAArD,aAA6B,MAAM,CAAC,iBAAiB;QAF7C,QAAG,GAAH,GAAG,CAAoB;QACvB,mBAAc,GAAd,cAAc,CAA8E;QAC5F,eAAU,GAAV,UAAU,CAAmC;IACjE,CAAC;IAED,iCAAI,GAAJ,UAAK,QAAuB,EAAE,MAAW;QACvC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,oBAAoB,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,c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AED,6CAAc,GAAd,UAAe,QAAsB;QACnC,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;IACH,2BAAC;AAAD,CAAC,AAjFD,CAAmD,eAAe,GAiFjE"}
|
130
node_modules/rxjs/_esm5/operators/mergeScan.js
generated
vendored
Normal file
130
node_modules/rxjs/_esm5/operators/mergeScan.js
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
/** PURE_IMPORTS_START .._util_tryCatch,.._util_errorObject,.._util_subscribeToResult,.._OuterSubscriber PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { tryCatch } from '../util/tryCatch';
|
||||
import { errorObject } from '../util/errorObject';
|
||||
import { subscribeToResult } from '../util/subscribeToResult';
|
||||
import { OuterSubscriber } from '../OuterSubscriber';
|
||||
/**
|
||||
* Applies an accumulator function over the source Observable where the
|
||||
* accumulator function itself returns an Observable, then each intermediate
|
||||
* Observable returned is merged into the output Observable.
|
||||
*
|
||||
* <span class="informal">It's like {@link scan}, but the Observables returned
|
||||
* by the accumulator are merged into the outer Observable.</span>
|
||||
*
|
||||
* @example <caption>Count the number of click events</caption>
|
||||
* const click$ = Rx.Observable.fromEvent(document, 'click');
|
||||
* const one$ = click$.mapTo(1);
|
||||
* const seed = 0;
|
||||
* const count$ = one$.mergeScan((acc, one) => Rx.Observable.of(acc + one), seed);
|
||||
* count$.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results:
|
||||
* 1
|
||||
* 2
|
||||
* 3
|
||||
* 4
|
||||
* // ...and so on for each click
|
||||
*
|
||||
* @param {function(acc: R, value: T): Observable<R>} accumulator
|
||||
* The accumulator function called on each source value.
|
||||
* @param seed The initial accumulation value.
|
||||
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of
|
||||
* input Observables being subscribed to concurrently.
|
||||
* @return {Observable<R>} An observable of the accumulated values.
|
||||
* @method mergeScan
|
||||
* @owner Observable
|
||||
*/
|
||||
export function mergeScan(accumulator, seed, concurrent) {
|
||||
if (concurrent === void 0) {
|
||||
concurrent = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
|
||||
}
|
||||
export var MergeScanOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function MergeScanOperator(accumulator, seed, concurrent) {
|
||||
this.accumulator = accumulator;
|
||||
this.seed = seed;
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
MergeScanOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
|
||||
};
|
||||
return MergeScanOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var MergeScanSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(MergeScanSubscriber, _super);
|
||||
function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
|
||||
_super.call(this, destination);
|
||||
this.accumulator = accumulator;
|
||||
this.acc = acc;
|
||||
this.concurrent = concurrent;
|
||||
this.hasValue = false;
|
||||
this.hasCompleted = false;
|
||||
this.buffer = [];
|
||||
this.active = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
MergeScanSubscriber.prototype._next = function (value) {
|
||||
if (this.active < this.concurrent) {
|
||||
var index = this.index++;
|
||||
var ish = tryCatch(this.accumulator)(this.acc, value);
|
||||
var destination = this.destination;
|
||||
if (ish === errorObject) {
|
||||
destination.error(errorObject.e);
|
||||
}
|
||||
else {
|
||||
this.active++;
|
||||
this._innerSub(ish, value, index);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.buffer.push(value);
|
||||
}
|
||||
};
|
||||
MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
|
||||
this.add(subscribeToResult(this, ish, value, index));
|
||||
};
|
||||
MergeScanSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (this.active === 0 && this.buffer.length === 0) {
|
||||
if (this.hasValue === false) {
|
||||
this.destination.next(this.acc);
|
||||
}
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
|
||||
var destination = this.destination;
|
||||
this.acc = innerValue;
|
||||
this.hasValue = true;
|
||||
destination.next(innerValue);
|
||||
};
|
||||
MergeScanSubscriber.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) {
|
||||
if (this.hasValue === false) {
|
||||
this.destination.next(this.acc);
|
||||
}
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return MergeScanSubscriber;
|
||||
}(OuterSubscriber));
|
||||
//# sourceMappingURL=mergeScan.js.map
|
1
node_modules/rxjs/_esm5/operators/mergeScan.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/mergeScan.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../src/operators/mergeScan.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,QAAQ,EAAE,MAAM,kBAAkB;OACpC,EAAE,WAAW,EAAE,MAAM,qBAAqB;OAC1C,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;OACtD,EAAE,eAAe,EAAE,MAAM,oBAAoB;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,0BAAgC,WAAgD,EAChD,IAAO,EACP,UAA6C;IAA7C,0BAA6C,GAA7C,aAAqB,MAAM,CAAC,iBAAiB;IAC3E,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,EAAjE,CAAiE,CAAC;AACtG,CAAC;AAED;IACE,2BAAoB,WAAgD,EAChD,IAAO,EACP,UAAkB;QAFlB,gBAAW,GAAX,WAAW,CAAqC;QAChD,SAAI,GAAJ,IAAI,CAAG;QACP,eAAU,GAAV,UAAU,CAAQ;IACtC,CAAC;IAED,gCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAC7C,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CACzD,CAAC,CAAC;IACL,CAAC;IACH,wBAAC;AAAD,CAAC,AAXD,IAWC;AAED;;;;GAIG;AACH;IAA+C,uCAAqB;IAOlE,6BAAY,WAA0B,EAClB,WAAgD,EAChD,GAAM,EACN,UAAkB;QACpC,kBAAM,WAAW,CAAC,CAAC;QAHD,gBAAW,GAAX,WAAW,CAAqC;QAChD,QAAG,GAAH,GAAG,CAAG;QACN,eAAU,GAAV,UAAU,CAAQ;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/_esm5/operators/min.js
generated
vendored
Normal file
40
node_modules/rxjs/_esm5/operators/min.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/** PURE_IMPORTS_START ._reduce PURE_IMPORTS_END */
|
||||
import { reduce } from './reduce';
|
||||
/**
|
||||
* The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function),
|
||||
* and when source Observable completes it emits a single item: the item with the smallest value.
|
||||
*
|
||||
* <img src="./img/min.png" width="100%">
|
||||
*
|
||||
* @example <caption>Get the minimal value of a series of numbers</caption>
|
||||
* Rx.Observable.of(5, 4, 7, 2, 8)
|
||||
* .min()
|
||||
* .subscribe(x => console.log(x)); // -> 2
|
||||
*
|
||||
* @example <caption>Use a comparer function to get the minimal item</caption>
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
* Observable.of<Person>({age: 7, name: 'Foo'},
|
||||
* {age: 5, name: 'Bar'},
|
||||
* {age: 9, name: 'Beer'})
|
||||
* .min<Person>( (a: Person, b: Person) => a.age < b.age ? -1 : 1)
|
||||
* .subscribe((x: Person) => console.log(x.name)); // -> 'Bar'
|
||||
* }
|
||||
*
|
||||
* @see {@link max}
|
||||
*
|
||||
* @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the
|
||||
* value of two items.
|
||||
* @return {Observable<R>} An Observable that emits item with the smallest value.
|
||||
* @method min
|
||||
* @owner Observable
|
||||
*/
|
||||
export function min(comparer) {
|
||||
var min = (typeof comparer === 'function')
|
||||
? function (x, y) { return comparer(x, y) < 0 ? x : y; }
|
||||
: function (x, y) { return x < y ? x : y; };
|
||||
return reduce(min);
|
||||
}
|
||||
//# sourceMappingURL=min.js.map
|
1
node_modules/rxjs/_esm5/operators/min.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/min.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"min.js","sourceRoot":"","sources":["../../src/operators/min.ts"],"names":[],"mappings":"OAAO,EAAE,MAAM,EAAE,MAAM,UAAU;AAGjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oBAAuB,QAAiC;IACtD,IAAM,GAAG,GAAsB,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC;UAC3D,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAA1B,CAA0B;UACpC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAb,CAAa,CAAC;IAC5B,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
57
node_modules/rxjs/_esm5/operators/multicast.js
generated
vendored
Normal file
57
node_modules/rxjs/_esm5/operators/multicast.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/** PURE_IMPORTS_START .._observable_ConnectableObservable PURE_IMPORTS_END */
|
||||
import { connectableObservableDescriptor } from '../observable/ConnectableObservable';
|
||||
/* tslint:enable:max-line-length */
|
||||
/**
|
||||
* Returns an Observable that emits the results of invoking a specified selector on items
|
||||
* emitted by a ConnectableObservable that shares a single subscription to the underlying stream.
|
||||
*
|
||||
* <img src="./img/multicast.png" width="100%">
|
||||
*
|
||||
* @param {Function|Subject} subjectOrSubjectFactory - Factory function to create an intermediate subject through
|
||||
* which the source sequence's elements will be multicast to the selector function
|
||||
* or Subject to push source elements into.
|
||||
* @param {Function} [selector] - Optional selector function that can use the multicasted source stream
|
||||
* as many times as needed, without causing multiple subscriptions to the source stream.
|
||||
* Subscribers to the given source will receive all notifications of the source from the
|
||||
* time of the subscription forward.
|
||||
* @return {Observable} An Observable that emits the results of invoking the selector
|
||||
* on the items emitted by a `ConnectableObservable` that shares a single subscription to
|
||||
* the underlying stream.
|
||||
* @method multicast
|
||||
* @owner Observable
|
||||
*/
|
||||
export function multicast(subjectOrSubjectFactory, selector) {
|
||||
return function multicastOperatorFunction(source) {
|
||||
var subjectFactory;
|
||||
if (typeof subjectOrSubjectFactory === 'function') {
|
||||
subjectFactory = subjectOrSubjectFactory;
|
||||
}
|
||||
else {
|
||||
subjectFactory = function subjectFactory() {
|
||||
return subjectOrSubjectFactory;
|
||||
};
|
||||
}
|
||||
if (typeof selector === 'function') {
|
||||
return source.lift(new MulticastOperator(subjectFactory, selector));
|
||||
}
|
||||
var connectable = Object.create(source, connectableObservableDescriptor);
|
||||
connectable.source = source;
|
||||
connectable.subjectFactory = subjectFactory;
|
||||
return connectable;
|
||||
};
|
||||
}
|
||||
export var MulticastOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function MulticastOperator(subjectFactory, selector) {
|
||||
this.subjectFactory = subjectFactory;
|
||||
this.selector = selector;
|
||||
}
|
||||
MulticastOperator.prototype.call = function (subscriber, source) {
|
||||
var selector = this.selector;
|
||||
var subject = this.subjectFactory();
|
||||
var subscription = selector(subject).subscribe(subscriber);
|
||||
subscription.add(source.subscribe(subject));
|
||||
return subscription;
|
||||
};
|
||||
return MulticastOperator;
|
||||
}());
|
||||
//# sourceMappingURL=multicast.js.map
|
1
node_modules/rxjs/_esm5/operators/multicast.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/multicast.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../src/operators/multicast.ts"],"names":[],"mappings":"OAIO,EAAyB,+BAA+B,EAAE,MAAM,qCAAqC;AAO5G,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;GAkBG;AACH,0BAAgC,uBAAwD,EACxD,QAAmD;IACjF,MAAM,CAAC,mCAAmC,MAAqB;QAC7D,IAAI,cAAgC,CAAC;QACrC,EAAE,CAAC,CAAC,OAAO,uBAAuB,KAAK,UAAU,CAAC,CAAC,CAAC;YAClD,cAAc,GAAqB,uBAAuB,CAAC;QAC7D,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,cAAc,GAAG;gBACf,MAAM,CAAa,uBAAuB,CAAC;YAC7C,CAAC,CAAC;QACJ,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,IAAM,WAAW,GAAQ,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC;QAChF,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;QAC5B,WAAW,CAAC,cAAc,GAAG,cAAc,CAAC;QAE5C,MAAM,CAA4B,WAAW,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED;IACE,2BAAoB,cAAgC,EAChC,QAAkD;QADlD,mBAAc,GAAd,cAAc,CAAkB;QAChC,aAAQ,GAAR,QAAQ,CAA0C;IACtE,CAAC;IACD,gCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACjC,4BAAQ,CAAU;QAC1B,IAAM,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACtC,IAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7D,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,YAAY,CAAC;IACtB,CAAC;IACH,wBAAC;AAAD,CAAC,AAXD,IAWC"}
|
119
node_modules/rxjs/_esm5/operators/observeOn.js
generated
vendored
Normal file
119
node_modules/rxjs/_esm5/operators/observeOn.js
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/** PURE_IMPORTS_START .._Subscriber,.._Notification PURE_IMPORTS_END */
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b)
|
||||
if (b.hasOwnProperty(p))
|
||||
d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Notification } from '../Notification';
|
||||
/**
|
||||
*
|
||||
* Re-emits all notifications from source Observable with specified scheduler.
|
||||
*
|
||||
* <span class="informal">Ensure a specific scheduler is used, from outside of an Observable.</span>
|
||||
*
|
||||
* `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule
|
||||
* notifications emitted by the source Observable. It might be useful, if you do not have control over
|
||||
* internal scheduler of a given Observable, but want to control when its values are emitted nevertheless.
|
||||
*
|
||||
* Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable,
|
||||
* but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal
|
||||
* scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits
|
||||
* notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`.
|
||||
* An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split
|
||||
* that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source
|
||||
* Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a
|
||||
* little bit more, to ensure that they are emitted at expected moments.
|
||||
*
|
||||
* As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications
|
||||
* will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn`
|
||||
* will delay all notifications - including error notifications - while `delay` will pass through error
|
||||
* from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator
|
||||
* for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used
|
||||
* for notification emissions in general.
|
||||
*
|
||||
* @example <caption>Ensure values in subscribe are called just before browser repaint.</caption>
|
||||
* const intervals = Rx.Observable.interval(10); // Intervals are scheduled
|
||||
* // with async scheduler by default...
|
||||
*
|
||||
* intervals
|
||||
* .observeOn(Rx.Scheduler.animationFrame) // ...but we will observe on animationFrame
|
||||
* .subscribe(val => { // scheduler to ensure smooth animation.
|
||||
* someDiv.style.height = val + 'px';
|
||||
* });
|
||||
*
|
||||
* @see {@link delay}
|
||||
*
|
||||
* @param {IScheduler} scheduler Scheduler that will be used to reschedule notifications from source Observable.
|
||||
* @param {number} [delay] Number of milliseconds that states with what delay every notification should be rescheduled.
|
||||
* @return {Observable<T>} Observable that emits the same notifications as the source Observable,
|
||||
* but with provided scheduler.
|
||||
*
|
||||
* @method observeOn
|
||||
* @owner Observable
|
||||
*/
|
||||
export function observeOn(scheduler, delay) {
|
||||
if (delay === void 0) {
|
||||
delay = 0;
|
||||
}
|
||||
return function observeOnOperatorFunction(source) {
|
||||
return source.lift(new ObserveOnOperator(scheduler, delay));
|
||||
};
|
||||
}
|
||||
export var ObserveOnOperator = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function ObserveOnOperator(scheduler, delay) {
|
||||
if (delay === void 0) {
|
||||
delay = 0;
|
||||
}
|
||||
this.scheduler = scheduler;
|
||||
this.delay = delay;
|
||||
}
|
||||
ObserveOnOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
|
||||
};
|
||||
return ObserveOnOperator;
|
||||
}());
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export var ObserveOnSubscriber = /*@__PURE__*/ (/*@__PURE__*/ function (_super) {
|
||||
__extends(ObserveOnSubscriber, _super);
|
||||
function ObserveOnSubscriber(destination, scheduler, delay) {
|
||||
if (delay === void 0) {
|
||||
delay = 0;
|
||||
}
|
||||
_super.call(this, destination);
|
||||
this.scheduler = scheduler;
|
||||
this.delay = delay;
|
||||
}
|
||||
ObserveOnSubscriber.dispatch = function (arg) {
|
||||
var notification = arg.notification, destination = arg.destination;
|
||||
notification.observe(destination);
|
||||
this.unsubscribe();
|
||||
};
|
||||
ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
|
||||
this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
|
||||
};
|
||||
ObserveOnSubscriber.prototype._next = function (value) {
|
||||
this.scheduleMessage(Notification.createNext(value));
|
||||
};
|
||||
ObserveOnSubscriber.prototype._error = function (err) {
|
||||
this.scheduleMessage(Notification.createError(err));
|
||||
};
|
||||
ObserveOnSubscriber.prototype._complete = function () {
|
||||
this.scheduleMessage(Notification.createComplete());
|
||||
};
|
||||
return ObserveOnSubscriber;
|
||||
}(Subscriber));
|
||||
export var ObserveOnMessage = /*@__PURE__*/ (/*@__PURE__*/ function () {
|
||||
function ObserveOnMessage(notification, destination) {
|
||||
this.notification = notification;
|
||||
this.destination = destination;
|
||||
}
|
||||
return ObserveOnMessage;
|
||||
}());
|
||||
//# sourceMappingURL=observeOn.js.map
|
1
node_modules/rxjs/_esm5/operators/observeOn.js.map
generated
vendored
Normal file
1
node_modules/rxjs/_esm5/operators/observeOn.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../src/operators/observeOn.ts"],"names":[],"mappings":";;;;;OAIO,EAAE,UAAU,EAAE,MAAM,eAAe;OACnC,EAAE,YAAY,EAAE,MAAM,iBAAiB;AAK9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,0BAA6B,SAAqB,EAAE,KAAiB;IAAjB,qBAAiB,GAAjB,SAAiB;IACnE,MAAM,CAAC,mCAAmC,MAAqB;QAC7D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC;AAED;IACE,2BAAoB,SAAqB,EAAU,KAAiB;QAAzB,qBAAyB,GAAzB,SAAyB;QAAhD,cAAS,GAAT,SAAS,CAAY;QAAU,UAAK,GAAL,KAAK,CAAY;IACpE,CAAC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,UAAU,GAgCrD;AAED;IACE,0BAAmB,YAA+B,EAC/B,WAAiC;QADjC,iBAAY,GAAZ,YAAY,CAAmB;QAC/B,gBAAW,GAAX,WAAW,CAAsB;IACpD,CAAC;IACH,uBAAC;AAAD,CAAC,AAJD,IAIC"}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user