work.suroh.tk/node_modules/rx/dist/rx.async.compat.min.js

3 lines
6.2 KiB
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
/* 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}var c={"function":!0,object:!0},d=c[typeof exports]&&exports&&!exports.nodeType?exports:null,e=c[typeof module]&&module&&!module.nodeType?module:null,f=b(d&&e&&"object"==typeof global&&global),g=b(c[typeof self]&&self),h=b(c[typeof window]&&window),i=(e&&e.exports===d?d:null,b(c[typeof this]&&this)),j=f||h!==(i&&i.window)&&h||g||i||Function("return this")();"function"==typeof define&&define.amd?define(["./rx.binding","exports"],function(b,c){return j.Rx=a(j,c,b),j.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(j,module.exports,require("./rx")):j.Rx=a(j,{},j.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return H.e=b,H}}}function f(a){return a?t.isObservable(a)?a:D(a)?t.fromPromise(a):k(a)||j(a)?J.call(this,a):E(a)?i.call(this,a):G(a)||F(a)?g.call(this,a):l(a)?h.call(this,a):a:a}function g(a){return t.from(a).concatMap(function(a){return t.isObservable(a)||l(a)?f.call(null,a):c.Observable.just(a)}).toArray()}function h(a){function b(a,b){c[b]=d,g.push(a.map(function(a){c[b]=a}))}for(var c=new a.constructor,e=Object.keys(a),g=[],h=0,i=e.length;i>h;h++){var j=e[h],k=f.call(this,a[j]);k&&t.isObservable(k)?b(k,j):c[j]=a[j]}return t.forkJoin.apply(t,g).map(function(){return c})}function i(a){var b=this;return new w(function(c){a.call(b,function(){var a=arguments[0],b=arguments[1];if(a)return c.onError(a);if(arguments.length>2){for(var d=[],e=1,f=arguments.length;f>e;e++)d.push(arguments[e]);b=d}c.onNext(b),c.onCompleted()})})}function j(a){return E(a.next)&&E(a["throw"])}function k(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:j(b.prototype):!1}function l(a){return Object==a.constructor}function m(a,b,c,d){var e=new y;return d.push(n(e,b,c)),a.apply(b,d),e.asObservable()}function n(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(E(c)){if(e=I(c).apply(b,e),e===H)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function o(a,b,c,d){var e=new y;return d.push(p(e,b,c)),a.apply(b,d),e.asObservable()}function p(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(E(c)){var f=I(c).apply(b,f);if(f===H)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function q(b){return a.StaticNodeList?b instanceof a.StaticNodeList||b instanceof a.NodeList:"[object NodeList]"===Object.prototype.toString.call(b)}function r(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function s(a,b,c){var d=new z,e=Object.prototype.toString.call(a);if(q(a)||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(s(a.item(f),b,c));else a&&d.add(new r(a,b,c));return d}var t=c.Observable,u=t.fromPromise,v=t.throwError,w=c.AnonymousObservable,x=c.ObservableBase,y=c.AsyncSubject,z=(c.Disposable.create,c.CompositeDisposable),A=(c.Scheduler.immediate,c.Scheduler["default"]),B=c.internals.inherits,C=c.Scheduler.isScheduler,D=c.helpers.isPromise,E=c.helpers.isFunction,F=c.helpers.isIterable,G=c.helpers.isArrayLike,H={e:{}},I=c.internals.tryCatch=function(a){if(!E(a))throw new TypeError("fn must be a function");return e(a)};t.wrap=function(a){function b(){return t.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var J=t.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new w(function(d){function e(b){var c=I(a.next).call(a,b);return c===H?d.onError(c.e):void h(c)}function g(b){var c=I(a.next).call(a,b);return c===H?d.onError(c.e):void h(c)}function h(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=f.call(b,a.value),h=null,j=!1;t.isObservable(c)?i.add(c.subscribe(function(a){j=!0,h=a},g,function(){j&&e(h)})):g(new TypeError("type not supported"))}var i=new z;return E(a)&&(a=a.apply
//# sourceMappingURL=rx.async.compat.map