/
eb
/
Surf
Обзор
Документация
Войти
/
eb
/
Surf
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/rx/dist/rx.min.js
5 строк
72 KB
EvgeniyBudaev
Initial commit
17 фев 2020, 09:02
17 фев 2020, 09:02
bb6f06f
Код
Авторство
О чём код?
/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ (function(a){function b(a){return a&&a.Object===Object?a:null}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a){return function(){try{return a.apply(this,arguments) … [Строка слишком длинная. Вы можете скачать файл] var d;b.subscribe(function(a){d=a},c,function(){a(d)})})};var sc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],_b.call(this)}return jb(b,a),b.prototype.subscrib … [Строка слишком длинная. Вы можете скачать файл] },c)},S.prototype.push=function(a){var b=-1===R(this.set,a,this.comparer);return b&&this.set.push(a),b};var Kd=function(a){function b(b,c,d){this.source=b,this._keyFn=c,this._cmpFn=d,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ld(a,this._keyFn,this._cmpFn))},b}(fc),Ld=function(a){function b(b,c,d){this._o=b,this._keyFn=c,this._h=new S(d),a.call(this)}return jb(b,a),b.prototype.next=function(a){var b=a;return ka(this._keyFn)&&(b=ma(this._keyFn)(a),b===la)?this._o.onError(b.e):void(this._h.push(b)&&this._o.onNext(a))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(_b);$b.distinct=function(a,b){return b||(b=ga),new Kd(this,a,b)};var Md=function(a){function b(b,c,d){this.source=b,this.selector=Ca(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function d(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,_b.call(this)}return jb(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.selector,this))},jb(d,_b),d.prototype.next=function(a){var b=ma(this.selector)(a,this.i++,this.source);return b===la?this.o.onError(b.e):void this.o.onNext(b)},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(fc);$b.map=$b.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Md?this.internalMap(c,b):new Md(this,c,b)},$b.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(T(b,a))},$b.flatMapObserver=$b.selectManyObserver=function(a,b,c,d){var e=this;return new Vd(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}ja(c)&&(c=rc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}ja(c)&&(c=rc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}ja(a)&&(a=rc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},$b.flatMap=$b.selectMany=$b.mergeMap=function(a,b,c){return new gc(this,a,b,c).mergeAll()},$b.flatMapLatest=$b.switchMap=function(a,b,c){return new gc(this,a,b,c).switchLatest()};var Nd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._r=b,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},jb(c,_b),c.prototype.next=function(a){this._r<=0?this._o.onNext(a):this._r--},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(fc);$b.skip=function(a){if(0>a)throw new ua;return new Nd(this,a)};var Od=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Pd(a,this))},b}(fc),Pd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return jb(b,a),b.prototype.next=function(a){if(!this._r){var b=ma(this._p._fn)(a,this._i++,this._p);if(b===la)return this._o.onError(b.e);this._r=!b}this._r&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(_b);$b.skipWhile=function(a,b){var c=Ca(a,b,3);return new Od(this,c)};var Qd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._c=b,this._r=b,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},jb(c,_b),c.prototype.next=function(a){this._r-->0&&(this._o.onNext(a),this._r<=0&&this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(fc);$b.take=function(a,b){if(0>a)throw new ua;return 0===a?wc(b):new Qd(this,a)};var Rd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Sd(a,this))},b}(fc),Sd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return jb(b,a),b.prototype.next=function(a){return this._r&&(this._r=ma(this._p._fn)(a,this._i++,this._p),this._r===la)?this._o.onError(this._r.e):void(this._r?this._o.onNext(a):this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(_b);$b.takeWhile=function(a,b){var c=Ca(a,b,3);return new Rd(this,c)};var Td=function(a){function b(b,c,d){this.source=b,this.predicate=Ca(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function d(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,_b.call(this)}return jb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},jb(d,_b),d.prototype.next=function(a){var b=ma(this.predicate)(a,this.i++,this.source);return b===la?this.o.onError(b.e):void(b&&this.o.onNext(a))},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(fc);$b.filter=$b.where=function(a,b){return this instanceof Td?this.internalFilter(a,b):new Td(this,a,b)};var Ud=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return jb(b,a),b.prototype.next=function(a){var b=ma(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===la&&this._o.onError(b.e)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._xform["@@transducer/result"](this._o)},b}(_b);$b.transduce=function(a){var b=this;return new Vd(function(c){var d=a(U(c));return b.subscribe(new Ud(c,d))},b)};var Vd=ca.AnonymousObservable=function(a){function b(a){return a&&ka(a.dispose)?a:ka(a)?pb(a):qb}function c(a,c){var d=c[0],f=c[1],g=ma(f.__subscribe).call(f,d);g!==la||d.fail(la.e)||e(la.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return jb(d,a),d.prototype._subscribe=function(a){var b=new Wd(a),d=[b,this];return Ib.scheduleRequired()?Ib.schedule(d,c):c(null,d),b},d}(ec),Wd=function(a){function b(b){a.call(this),this.observer=b,this.m=new ub}jb(b,a);var c=b.prototype;return c.next=function(a){var b=ma(this.observer.onNext).call(this.observer,a);b===la&&(this.dispose(),e(b.e))},c.error=function(a){var b=ma(this.observer.onError).call(this.observer,a);this.dispose(),b===la&&e(b.e)},c.completed=function(){var a=ma(this.observer.onCompleted).call(this.observer);this.dispose(),a===la&&e(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(_b),Xd=function(a,b){this._s=a,this._o=b};Xd.prototype.dispose=function(){if(!this._s.isDisposed&&null!==this._o){var a=this._s.observers.indexOf(this._o);this._s.observers.splice(a,1),this._o=null}};var Yd=ca.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return jb(b,a),kb(b.prototype,Yb.prototype,{_subscribe:function(a){return sb(this),this.isStopped?this.hasError?(a.onError(this.error),qb):(a.onCompleted(),qb):(this.observers.push(a),new Xd(this,a))},hasObservers:function(){return sb(this),this.observers.length>0},onCompleted:function(){if(sb(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(sb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(sb(this),!this.isStopped)for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),b.create=function(a,b){return new Zd(a,b)},b}(ec),Zd=(ca.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return jb(b,a),kb(b.prototype,Yb.prototype,{_subscribe:function(a){return sb(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),qb):(this.observers.push(a),new Xd(this,a))},hasObservers:function(){return sb(this),this.observers.length>0},onCompleted:function(){var a,b;if(sb(this),!this.isStopped){this.isStopped=!0;var d=c(this.observers),b=d.length;if(this.hasValue)for(a=0;b>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;b>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(sb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){sb(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(ec),ca.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return jb(b,a),kb(b.prototype,Yb.prototype,{_subscribe:function(a){return this.observable.subscribe(a)},onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(ec));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ba.Rx=ca,define(function(){return ca})):W&&X?_?(X.exports=ca).Rx=ca:W.Rx=ca:ba.Rx=ca;var $d=j()}).call(this); //# sourceMappingURL=rx.map