forked from Reactive-Extensions/RxJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrx.lite.min.js
5 lines (5 loc) · 80.2 KB
/
rx.lite.min.js
1
2
3
4
5
/* 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=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function d(a){return function(){try{return a.apply(this,arguments)}catch(b){return ua.e=b,ua}}}function e(a){throw a}function f(a,b){if(wa&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Aa)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+Aa+"\n");a.stack=g(e)}}function g(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];h(f)||i(f)||!f||c.push(f)}return c.join("\n")}function h(a){var b=k(a);if(!b)return!1;var c=b[0],d=b[1];return c===ya&&d>=za&&ne>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(wa)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=k(c);if(!d)return;return ya=d[0],d[1]}}function k(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function l(b,c,d,e,f,g){var h=nb(b),i=h.length,j=nb(c),k=j.length;if(i!==k&&!e)return!1;for(var l,m=i;m--;)if(l=h[m],!(e?l in c:kb.call(c,l)))return!1;for(var n=e;++m<i;){l=h[m];var o,p=b[l],q=c[l];if(!(o===a?d(p,q,e,f,g):o))return!1;n||(n="constructor"===l)}if(!n){var r=b.constructor,s=c.constructor;if(r!==s&&"constructor"in b&&"constructor"in c&&!("function"==typeof r&&r instanceof r&&"function"==typeof s&&s instanceof s))return!1}return!0}function m(a,b,c){switch(c){case Pa:case Qa:return+a===+b;case Ra:return a.name===b.name&&a.message===b.message;case Ua:return a!==+a?b!==+b:a===+b;case Wa:case Ya:return a===b+""}return!1}function n(a){return!!a&&"object"==typeof a}function o(a){return"number"==typeof a&&a>-1&&a%1===0&&mb>=a}function p(a){return n(a)&&o(a.length)&&!!ib[lb.call(a)]}function q(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}function r(b,c,d,e,f,g){var h=-1,i=b.length,j=c.length;if(i!==j&&!(e&&j>i))return!1;for(;++h<i;){var k,l=b[h],m=c[h];if(k!==a){if(k)continue;return!1}if(e){if(!q(c,function(a){return l===a||d(l,a,e,f,g)}))return!1}else if(l!==m&&!d(l,m,e,f,g))return!1}return!0}function s(a,b,c,d,e,f){var g=qb(a),h=qb(b),i=Oa,j=Oa;g||(i=lb.call(a),i===Na?i=Va:i!==Va&&(g=p(a))),h||(j=lb.call(b),j===Na&&(j=Va));var k=i===Va&&!pb(a),n=j===Va&&!pb(b),o=i===j;if(o&&!g&&!k)return m(a,b,i);if(!d){var q=k&&kb.call(a,"__wrapped__"),s=n&&kb.call(b,"__wrapped__");if(q||s)return c(q?a.value():a,s?b.value():b,d,e,f)}if(!o)return!1;e||(e=[]),f||(f=[]);for(var t=e.length;t--;)if(e[t]===a)return f[t]===b;e.push(a),f.push(b);var u=(g?r:l)(a,b,c,d,e,f);return e.pop(),f.pop(),u}function t(a,b,c,d,e){return a===b?!0:null==a||null==b||!ob(a)&&!n(b)?a!==a&&b!==b:s(a,b,t,c,d,e)}function u(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function v(a,b){this.id=a,this.value=b}function w(a){this._s=a,this.isDisposed=!1}function x(a){this._s=a}function y(a){this._s=a,this._l=a.length,this._i=0}function z(a){this._a=a}function A(a){this._a=a,this._l=E(a),this._i=0}function B(a){return"number"==typeof a&&ka.isFinite(a)}function C(b){var c,d=b[Ha];if(!d&&"string"==typeof b)return c=new x(b),c[Ha]();if(!d&&b.length!==a)return c=new z(b),c[Ha]();if(!d)throw new TypeError("Object is not iterable");return b[Ha]()}function D(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function E(a){var b=+a.length;return isNaN(b)?0:0!==b&&B(b)?(b=D(b)*Math.floor(Math.abs(b)),0>=b?0:b>zc?zc:b):b}function F(a,b){return Jb(a)||(a=Pb),new Bc(b,a)}function G(a,b){this.observer=a,this.parent=b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function J(){return[]}function H(){return!1}function J(){return[]}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(a){return function(b){return a.subscribe(b)}}function L(b,c){return function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e}}function M(a,b,c,d){var e=new je;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(ta(c)){if(e=va(c).apply(b,e),e===ua)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 je;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(ta(c)){var f=va(c).apply(b,f);if(f===ua)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function Q(a){return ka.StaticNodeList?a instanceof ka.StaticNodeList||a instanceof ka.NodeList:"[object NodeList]"===Object.prototype.toString.call(a)}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 ub,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}function T(a,b){return new Sd(a,b)}function U(a,b,c){return new fe(function(d){var e=a,f=Ib(b);return c.scheduleRecursiveFuture(0,e,function(a,b){if(f>0){var g=c.now();e=new Date(e.getTime()+f),e.getTime()<=g&&(e=new Date(g+f))}d.onNext(a),b(a+1,new Date(e))})})}function V(a,b,c){return a===b?new fe(function(a){return c.schedulePeriodic(0,b,function(b){return a.onNext(b),b+1})}):uc(function(){return U(new Date(c.now()+a),b,c)})}function W(a,b,c){return new fe(function(d){var e,f=!1,g=new Db,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.error,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Cb,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveFuture(null,b,function(a,b){var e,g,k,l;if(null===h){j=!0;do k=null,i.length>0&&i[0].timestamp-c.now()<=0&&(k=i.shift().value),null!==k&&k.accept(d);while(null!==k);l=!1,g=0,i.length>0?(l=!0,g=Math.max(0,i[0].timestamp-c.now())):f=!1,e=h,j=!1,null!==e?d.onError(e):l&&b(null,g)}}))))}),new Eb(e,g)},a)}function X(a,b,c){return uc(function(){return W(a,b-c.now(),c)})}function Y(a,b,c){var d,e;return ta(b)?e=b:(d=b,e=c),new fe(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=va(e)(a);if(c===ua)return b.onError(c.e);var d=new Cb;g.add(d),d.setDisposable(c.subscribe(function(){b.onNext(a),g.remove(d),f()},function(a){b.onError(a)},function(){b.onNext(a),g.remove(d),f()}))},function(a){b.onError(a)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&b.onCompleted()}var g=new ub,h=!1,i=new Db;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new Eb(i,g)},this)}function Z(a,b){return new fe(function(c){var d,e=!1,f=new Db,g=0,h=a.subscribe(function(a){var h=va(b)(a);if(h===ua)return c.onError(h.e);sa(h)&&(h=Od(h)),e=!0,d=a,g++;var i=g,j=new Cb;f.setDisposable(j),j.setDisposable(h.subscribe(function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()},function(a){c.onError(a)},function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new Eb(h,f)},a)}function $(a,b,c,d){return ta(b)&&(d=c,c=b,b=Fc()),hc.isObservable(d)||(d=Lc(new _d)),new fe(function(e){function f(a){function b(){return l=c===k}var c=k,f=new Cb;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(d.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(d.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new Db,i=new Db,j=new Cb;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=va(c)(a);if(b===ua)return e.onError(b.e);f(sa(b)?Od(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Eb(h,i)},a)}function _(a,b,c,d){return Jb(c)&&(d=c,c=Lc(new _d)),c instanceof Error&&(c=Lc(c)),Jb(d)||(d=Ub),hc.isObservable(c)||(c=Lc(new _d)),new fe(function(e){function f(){var a=g;k.setDisposable(d.scheduleFuture(null,b,function(){j=g===a,j&&(sa(c)&&(c=Od(c)),i.setDisposable(c.subscribe(e)))}))}var g=0,h=new Cb,i=new Db,j=!1,k=new Db;return i.setDisposable(h),f(),h.setDisposable(a.subscribe(function(a){j||(g++,e.onNext(a),f())},function(a){j||(g++,e.onError(a))},function(){j||(g++,e.onCompleted())})),new Eb(i,k)},a)}function aa(a,b,c){return new fe(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(na))){if(f)return d.onError(f);var e=va(c).apply(null,j);if(e===ua)return d.onError(e.e);d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Eb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function ba(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var ca={"function":!0,object:!0},da=ca[typeof exports]&&exports&&!exports.nodeType?exports:null,ea=ca[typeof module]&&module&&!module.nodeType?module:null,fa=b(da&&ea&&"object"==typeof global&&global),ga=b(ca[typeof self]&&self),ha=b(ca[typeof window]&&window),ia=ea&&ea.exports===da?da:null,ja=b(ca[typeof this]&&this),ka=fa||ha!==(ja&&ja.window)&&ha||ga||ja||Function("return this")(),la={internals:{},config:{Promise:ka.Promise},helpers:{}},ma=la.helpers.noop=function(){},na=la.helpers.identity=function(a){return a},oa=la.helpers.defaultNow=Date.now,pa=la.helpers.defaultComparer=function(a,b){return rb(a,b)},qa=la.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},ra=(la.helpers.defaultKeySerializer=function(a){return a.toString()},la.helpers.defaultError=function(a){throw a}),sa=la.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ta=la.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==toString.call(a)}),a}(),ua={e:{}},va=la.internals.tryCatch=function(a){if(!ta(a))throw new TypeError("fn must be a function");return d(a)};la.config.longStackSupport=!1;var wa=!1,xa=va(function(){throw new Error})();wa=!!xa.e&&!!xa.e.stack;var ya,za=j(),Aa="From previous event:",Ba=la.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Ba.prototype=Object.create(Error.prototype),Ba.prototype.name="EmptyError";var Ca=la.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Ca.prototype=Object.create(Error.prototype),Ca.prototype.name="ObjectDisposedError";var Da=la.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Da.prototype=Object.create(Error.prototype),Da.prototype.name="ArgumentOutOfRangeError";var Ea=la.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};Ea.prototype=Object.create(Error.prototype),Ea.prototype.name="NotSupportedError";var Fa=la.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Fa.prototype=Object.create(Error.prototype),Fa.prototype.name="NotImplementedError";var Ga=la.helpers.notImplemented=function(){throw new Fa},Ha=(la.helpers.notSupported=function(){throw new Ea},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");ka.Set&&"function"==typeof(new ka.Set)["@@iterator"]&&(Ha="@@iterator");var Ia=la.doneEnumerator={done:!0,value:a},Ja=la.helpers.isIterable=function(b){return b&&b[Ha]!==a},Ka=la.helpers.isArrayLike=function(b){return b&&b.length!==a};la.helpers.iterator=Ha;var La=la.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Ma=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Na=(Ma.length,"[object Arguments]"),Oa="[object Array]",Pa="[object Boolean]",Qa="[object Date]",Ra="[object Error]",Sa="[object Function]",Ta="[object Map]",Ua="[object Number]",Va="[object Object]",Wa="[object RegExp]",Xa="[object Set]",Ya="[object String]",Za="[object WeakMap]",$a="[object ArrayBuffer]",_a="[object Float32Array]",ab="[object Float64Array]",bb="[object Int8Array]",cb="[object Int16Array]",db="[object Int32Array]",eb="[object Uint8Array]",fb="[object Uint8ClampedArray]",gb="[object Uint16Array]",hb="[object Uint32Array]",ib={};ib[_a]=ib[ab]=ib[bb]=ib[cb]=ib[db]=ib[eb]=ib[fb]=ib[gb]=ib[hb]=!0,ib[Na]=ib[Oa]=ib[$a]=ib[Pa]=ib[Qa]=ib[Ra]=ib[Sa]=ib[Ta]=ib[Ua]=ib[Va]=ib[Wa]=ib[Xa]=ib[Ya]=ib[Za]=!1;var jb=Object.prototype,kb=jb.hasOwnProperty,lb=jb.toString,mb=Math.pow(2,53)-1,nb=Object.keys||function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}(),ob=la.internals.isObject=function(a){var b=typeof a;return!!a&&("object"===b||"function"===b)},pb=function(){try{Object({toString:0}+"")}catch(a){return function(){return!1}}return function(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}}(),qb=Array.isArray||function(a){return n(a)&&o(a.length)&&lb.call(a)===Oa},rb=la.internals.isEqual=function(a,b){return t(a,b)},sb=({}.hasOwnProperty,Array.prototype.slice,la.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),tb=la.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},ub=(la.internals.addRef=function(a,b){return new fe(function(c){return new Eb(b.getDisposable(),a.subscribe(c))})},la.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];this.disposables=c,this.isDisposed=!1,this.length=c.length}),vb=ub.prototype;vb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},vb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},vb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var wb=la.Disposable=function(a){this.isDisposed=!1,this.action=a||ma};wb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var xb=wb.create=function(a){return new wb(a)},yb=wb.empty={dispose:ma},zb=wb.isDisposable=function(a){return a&&ta(a.dispose)},Ab=wb.checkDisposed=function(a){if(a.isDisposed)throw new Ca},Bb=wb._fixup=function(a){return zb(a)?a:yb},Cb=la.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Cb.prototype.getDisposable=function(){return this.current},Cb.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},Cb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null,a&&a.dispose()}};var Db=la.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Db.prototype.getDisposable=function(){return this.current},Db.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Db.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Eb=la.BinaryDisposable=function(a,b){this._first=a,this._second=b,this.isDisposed=!1};Eb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this._first;this._first=null,a&&a.dispose();var b=this._second;this._second=null,b&&b.dispose()}};var Fb=la.NAryDisposable=function(a){this._disposables=a,this.isDisposed=!1};Fb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=0,b=this._disposables.length;b>a;a++)this._disposables[a].dispose();this._disposables.length=0}};var Gb=(la.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?yb:new a(this)},b}(),la.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||qa,this.disposable=new Cb});Gb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Gb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Gb.prototype.isCancelled=function(){return this.disposable.isDisposed},Gb.prototype.invokeCore=function(){return Bb(this.action(this.scheduler,this.state))};var Hb=la.Scheduler=function(){function a(){}a.isScheduler=function(b){return b instanceof a};var b=a.prototype;return b.schedule=function(a,b){throw new Fa},b.scheduleFuture=function(b,c,d){var e=c;return e instanceof Date&&(e-=this.now()),e=a.normalize(e),0===e?this.schedule(b,d):this._scheduleFuture(b,e,d)},b._scheduleFuture=function(a,b,c){throw new Fa},a.now=oa,a.prototype.now=oa,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Ib=Hb.normalize,Jb=Hb.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),yb}var g=!1,h=!1,i=a.schedule(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new ub;return e(d,c),f}function c(a,b){function c(b,d){function g(a,b){return h?f.remove(j):i=!0,e(b,c),yb}var h=!1,i=!1,j=a.scheduleFuture(b,d,g);i||(f.add(j),h=!0)}var d=b[0],e=b[1],f=new ub;return e(d,c),f}a.scheduleRecursive=function(a,c){return this.schedule([a,c],b)},a.scheduleRecursiveFuture=function(a,b,d){return this.scheduleFuture([a,d],b,c)}}(Hb.prototype),function(a){a.schedulePeriodic=function(a,b,c){if("undefined"==typeof ka.setInterval)throw new Ea;b=Ib(b);var d=a,e=ka.setInterval(function(){d=c(d)},b);return xb(function(){ka.clearInterval(e)})}}(Hb.prototype);var Kb,Lb,Mb=function(a){function b(){a.call(this)}return sb(b,a),b.prototype.schedule=function(a,b){return Bb(b(this,a))},b}(Hb),Nb=Hb.immediate=new Mb,Ob=function(a){function b(){for(;d.length>0;){var a=d.dequeue();!a.isCancelled()&&a.invoke()}}function c(){a.call(this)}var d;return sb(c,a),c.prototype.schedule=function(a,c){var f=new Gb(this,a,c,this.now());if(d)d.enqueue(f);else{d=new Vb(4),d.enqueue(f);var g=va(b)();d=null,g===ua&&e(g.e)}return f.disposable},c.prototype.scheduleRequired=function(){return!d},c}(Hb),Pb=Hb.currentThread=new Ob,Qb=(la.internals.SchedulePeriodicRecursive=function(){function a(a){return function(b,c){c(0,a._period);var d=va(a._action)(a._state);d===ua&&(a._cancel.dispose(),e(d.e)),a._state=d}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Cb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,a(this))),b},b}(),function(){var a,b=ma;if(ka.setTimeout)a=ka.setTimeout,b=ka.clearTimeout;else{if(!ka.WScript)throw new Ea;a=function(a,b){ka.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Rb=Qb.setTimeout,Sb=Qb.clearTimeout;!function(){function a(b){if(f)Rb(function(){a(b)},0);else{var c=d[b];if(c){f=!0;var g=va(c)();Lb(b),f=!1,g===ua&&e(g.e)}}}function b(){if(!ka.postMessage||ka.importScripts)return!1;var a=!1,b=ka.onmessage;return ka.onmessage=function(){a=!0},ka.postMessage("","*"),ka.onmessage=b,a}var c=1,d={},f=!1;Lb=function(a){delete d[a]};var g=new RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=fa&&ia&&fa.setImmediate)&&!g.test(h)&&h;if(ta(h))Kb=function(b){var e=c++;return d[e]=b,h(function(){a(e)}),e};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Kb=function(b){var e=c++;return d[e]=b,process.nextTick(function(){a(e)}),e};else if(b()){var i="ms.rx.schedule"+Math.random(),j=function(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))};ka.addEventListener("message",j,!1),Kb=function(a){var b=c++;return d[b]=a,ka.postMessage(i+currentId,"*"),b}}else if(ka.MessageChannel){var k=new ka.MessageChannel;k.port1.onmessage=function(b){a(b.data)},Kb=function(a){var b=c++;return d[b]=a,k.port2.postMessage(b),b}}else Kb="document"in ka&&"onreadystatechange"in ka.document.createElement("script")?function(b){var e=ka.document.createElement("script"),f=c++;return d[f]=b,e.onreadystatechange=function(){a(f),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},ka.document.documentElement.appendChild(e),f}:function(b){var e=c++;return d[e]=b,Rb(function(){a(e)},0),e}}();var Tb=function(a){function b(){a.call(this)}function c(a,b,c,d){return function(){a.setDisposable(wb._fixup(b(c,d)))}}function d(a){this._id=a,this.isDisposed=!1}function e(a){this._id=a,this.isDisposed=!1}return sb(b,a),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Lb(this._id))},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Sb(this._id))},b.prototype.schedule=function(a,b){var e=new Cb,f=Kb(c(e,b,this,a));return new Eb(e,new d(f))},b.prototype._scheduleFuture=function(a,b,d){if(0===b)return this.schedule(a,d);var f=new Cb,g=Rb(c(f,d,this,a),b);return new Eb(f,new e(g))},b}(Hb),Ub=Hb["default"]=Hb.async=new Tb;v.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Vb=la.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Wb=Vb.prototype;Wb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Wb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Wb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},Wb.peek=function(){return this.items[0].value},Wb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Wb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Wb.enqueue=function(a){var b=this.length++;this.items[b]=new v(Vb.count++,a),this.percolate(b)},Wb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Vb.count=0;var Xb,Yb=la.Notification=function(){function a(){}return a.prototype._accept=function(a,b,c){throw new Fa},a.prototype._acceptObserver=function(a,b,c){throw new Fa},a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObserver(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return Jb(a)||(a=Nb),new fe(function(c){return a.schedule(b,function(a,b){b._acceptObserver(c),"N"===b.kind&&c.onCompleted()})})},a}(),Zb=function(a){function b(a){this.value=a,this.kind="N"}return sb(b,a),b.prototype._accept=function(a){return a(this.value)},b.prototype._acceptObserver=function(a){return a.onNext(this.value)},b.prototype.toString=function(){return"OnNext("+this.value+")"},b}(Yb),$b=function(a){function b(a){this.error=a,this.kind="E"}return sb(b,a),b.prototype._accept=function(a,b){return b(this.error)},b.prototype._acceptObserver=function(a){return a.onError(this.error)},b.prototype.toString=function(){return"OnError("+this.error+")"},b}(Yb),_b=function(a){function b(){this.kind="C"}return sb(b,a),b.prototype._accept=function(a,b,c){return c()},b.prototype._acceptObserver=function(a){return a.onCompleted()},b.prototype.toString=function(){return"OnCompleted()"},b}(Yb),ac=Yb.createOnNext=function(a){return new Zb(a)},bc=Yb.createOnError=function(a){return new $b(a)},cc=Yb.createOnCompleted=function(){return new _b},dc=la.Observer=function(){},ec=dc.create=function(a,b,c){return a||(a=ma),b||(b=ra),c||(c=ma),new gc(a,b,c)},fc=la.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return sb(b,a),b.prototype.next=Ga,b.prototype.error=Ga,b.prototype.completed=Ga,b.prototype.onNext=function(a){!this.isStopped&&this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(dc),gc=la.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return sb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(fc),hc=la.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c.onError=function(b){f(b,a),d.call(c,b)},b.call(a,c)}}function b(){if(la.config.longStackSupport&&wa){var b=this._subscribe,c=va(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}}return Xb=b.prototype,b.isObservable=function(a){return a&&ta(a.subscribe)},Xb.subscribe=Xb.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:ec(a,b,c))},Xb.subscribeOnNext=function(a,b){return this._subscribe(ec("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Xb.subscribeOnError=function(a,b){return this._subscribe(ec(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Xb.subscribeOnCompleted=function(a,b){return this._subscribe(ec(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),ic=la.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new Db}function c(a,b){return function(){a.onNext(b)}}function d(a,b){return function(){a.onError(b)}}function f(a){return function(){a.onCompleted()}}function g(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=va(c)();return d===ua?(a.queue=[],a.hasFaulted=!0,e(d.e)):void b(a)}return sb(b,a),b.prototype.next=function(a){this.queue.push(c(this.observer,a))},b.prototype.error=function(a){this.queue.push(d(this.observer,a))},b.prototype.completed=function(){this.queue.push(f(this.observer))},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(this,g))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(fc),jc=la.ObservableBase=function(a){function b(a){return a&&ta(a.dispose)?a:ta(a)?xb(a):yb}function c(a,c){var d=c[0],f=c[1],g=va(f.subscribeCore).call(f,d);g!==ua||d.fail(ua.e)||e(ua.e),d.setDisposable(b(g))}function d(){a.call(this)}return sb(d,a),d.prototype._subscribe=function(a){var b=new ge(a),d=[b,this];return Pb.scheduleRequired()?Pb.schedule(d,c):c(null,d),b},d.prototype.subscribeCore=Ga,d}(hc),kc=la.FlatMapObservable=function(a){function b(b,c,d,e){this.resultSelector=ta(d)?d:null,this.selector=La(ta(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.o=a,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},sb(c,fc),c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.next=function(a){var b=this.i++,c=va(this.selector)(a,b,this.source);return c===ua?this.o.onError(c.e):(sa(c)&&(c=Od(c)),(Ka(c)||Ja(c))&&(c=hc.from(c)),void this.o.onNext(this._wrapResult(c,a,b)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onCompleted()},b}(jc),lc=la.internals.Enumerable=function(){};w.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.isDisposed=!0)};var mc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=va(a.e.next).call(a.e);if(c===ua)return a.o.onError(c.e);if(c.done)return a.o.onCompleted();var e=c.value;sa(e)&&(e=Od(e));var f=new Cb;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,d={isDisposed:!1,o:a,subscription:b,e:this.sources[Ha]()},e=Pb.scheduleRecursive(d,c);return new Fb([b,e,new w(d)])},sb(d,fc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.o.onError(a)},d.prototype.completed=function(){this._recurse(this._state)},b}(jc);lc.prototype.concat=function(){return new mc(this)};var nc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=va(a.e.next).call(a.e);if(c===ua)return a.o.onError(c.e);if(c.done)return null!==a.lastError?a.o.onError(a.lastError):a.o.onCompleted();var e=c.value;sa(e)&&(e=Od(e));var f=new Cb;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,d={isDisposed:!1,e:this.sources[Ha](),subscription:b,lastError:null,o:a},e=Pb.scheduleRecursive(d,c);return new Fb([b,e,new w(d)])},sb(d,fc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.lastError=a,this._recurse(this._state)},d.prototype.completed=function(){this._state.o.onCompleted()},b}(jc);lc.prototype.catchError=function(){return new nc(this)},lc.prototype.catchErrorWhen=function(a){var b=this;return new fe(function(c){var d,e=new ie,f=new ie,g=a(e),h=g.subscribe(f),i=b[Ha](),j={isDisposed:!1},k=new Db,l=Pb.scheduleRecursive(null,function(a,b){if(!j.isDisposed){var g=va(i.next).call(i);if(g===ua)return c.onError(g.e);if(g.done)return void(d?c.onError(d):c.onCompleted());var h=g.value;sa(h)&&(h=Od(h));var l=new Cb,m=new Cb;k.setDisposable(new Eb(m,l)),l.setDisposable(h.subscribe(function(a){c.onNext(a)},function(a){m.setDisposable(f.subscribe(b,function(a){
c.onError(a)},function(){c.onCompleted()})),e.onNext(a)},function(){c.onCompleted()}))}});return new Fb([h,k,l,new w(j)])})};var oc=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return sb(b,a),b.prototype[Ha]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?Ia:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(lc),pc=lc.repeat=function(a,b){return new oc(a,b)},qc=function(a){function b(a,b,c){this.s=a,this.fn=b?La(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return sb(b,a),b.prototype[Ha]=function(){return new c(this)},c.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:Ia},b}(lc),rc=lc.of=function(a,b,c){return new qc(a,b,c)},sc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},sb(c,fc),c.prototype.next=function(a){this.a.push(a)},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onNext(this.a),this.o.onCompleted()},b}(jc);Xb.toArray=function(){return new sc(this)},hc.create=function(a,b){return new fe(a,b)};var tc=function(a){function b(b){this._f=b,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=va(this._f)();return b===ua?Lc(b.e).subscribe(a):(sa(b)&&(b=Od(b)),b.subscribe(a))},b}(jc),uc=hc.defer=function(a){return new tc(a)},vc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.scheduler=b}function d(a,b){return b.onCompleted(),yb}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.scheduler);return b.run()},c.prototype.run=function(){var a=this.observer;return this.scheduler===Nb?d(null,a):this.scheduler.schedule(a,d)},b}(jc),wc=new vc(Nb),xc=hc.empty=function(a){return Jb(a)||(a=Nb),a===Nb?wc:new vc(a)},yc=function(a){function b(b,c,d){this._iterable=b,this._fn=c,this._scheduler=d,a.call(this)}function c(a,b,c){return function(d,e){var f=va(b.next).call(b);if(f===ua)return a.onError(f.e);if(f.done)return a.onCompleted();var g=f.value;return ta(c)&&(g=va(c)(g,d),g===ua)?a.onError(g.e):(a.onNext(g),void e(d+1))}}return sb(b,a),b.prototype.subscribeCore=function(a){var b=Object(this._iterable),d=C(b);return this._scheduler.scheduleRecursive(0,c(a,d,this._fn))},b}(jc),zc=Math.pow(2,53)-1;x.prototype[Ha]=function(){return new y(this._s)},y.prototype[Ha]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:Ia},z.prototype[Ha]=function(){return new A(this._a)},A.prototype[Ha]=function(){return this},A.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:Ia};var Ac=hc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ta(b))throw new Error("mapFn when provided must be a function");if(b)var e=La(b,c,2);return Jb(d)||(d=Pb),new yc(a,e,d)},Bc=function(a){function b(b,c){this._args=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b.length;return function(d,e){c>d?(a.onNext(b[d]),e(d+1)):a.onCompleted()}}return sb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._args))},b}(jc),Cc=hc.fromArray=function(a,b){return Jb(b)||(b=Pb),new Bc(a,b)},Dc=function(a){function b(){a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return yb},b}(jc),Ec=new Dc,Fc=hc.never=function(){return Ec};hc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Bc(b,Pb)},hc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Bc(c,a)};var Gc=function(a){function b(b,c){this._o=b,this._keys=Object.keys(b),this._scheduler=c,a.call(this)}function c(a,b,c){return function(d,e){if(d<c.length){var f=c[d];a.onNext([f,b[f]]),e(d+1)}else a.onCompleted()}}return sb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._o,this._keys))},b}(jc);hc.pairs=function(a,b){return b||(b=Pb),new Gc(a,b)};var Hc=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}function c(a,b,c){return function(d,e){b>d?(c.onNext(a+d),e(d+1)):c.onCompleted()}}return sb(b,a),b.prototype.subscribeCore=function(a){return this.scheduler.scheduleRecursive(0,c(this.start,this.rangeCount,a))},b}(jc);hc.range=function(a,b,c){return Jb(c)||(c=Pb),new Hc(a,b,c)};var Ic=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(jc);G.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount,a)},hc.repeat=function(a,b,c){return Jb(c)||(c=Pb),new Ic(a,b,c)};var Jc=function(a){function b(b,c){this._value=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),yb}return sb(b,a),b.prototype.subscribeCore=function(a){var b=[this._value,a];return this._scheduler===Nb?c(null,b):this._scheduler.schedule(b,c)},b}(jc),Kc=(hc["return"]=hc.just=function(a,b){return Jb(b)||(b=Nb),new Jc(a,b)},function(a){function b(b,c){this._error=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onError(c),yb}return sb(b,a),b.prototype.subscribeCore=function(a){var b=[this._error,a];return this._scheduler===Nb?c(null,b):this._scheduler.schedule(b,c)},b}(jc)),Lc=hc["throw"]=function(a,b){return Jb(b)||(b=Nb),new Kc(a,b)},Mc=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Cb,c=new Db;return c.setDisposable(b),b.setDisposable(this.source.subscribe(new Nc(a,c,this._fn))),c},b}(jc),Nc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=va(this._fn)(a);if(b===ua)return this._o.onError(b.e);sa(b)&&(b=Od(b));var c=new Cb;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(fc);Xb["catch"]=function(a){return ta(a)?new Mc(this,a):Oc([this,a])};var Oc=hc["catch"]=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return rc(a).catchError()};Xb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),Rc.apply(this,b)};var Pc=function(a){function b(b,c){this._params=b,this._cb=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._params.length,c=new Array(b),d={hasValue:u(b,H),hasValueAll:!1,isDone:u(b,H),values:new Array(b)},e=0;b>e;e++){var f=this._params[e],g=new Cb;c[e]=g,sa(f)&&(f=Od(f)),g.setDisposable(f.subscribe(new Qc(a,e,this._cb,d)))}return new Fb(c)},b}(jc),Qc=function(a){function b(b,c,d,e){this._o=b,this._i=c,this._cb=d,this._state=e,a.call(this)}function c(a){return function(b,c){return c!==a}}return sb(b,a),b.prototype.next=function(a){if(this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll||(this._state.hasValueAll=this._state.hasValue.every(na))){var b=va(this._cb).apply(null,this._state.values);if(b===ua)return this._o.onError(b.e);this._o.onNext(b)}else this._state.isDone.filter(c(this._i)).every(na)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._state.isDone[this._i]=!0,this._state.isDone.every(na)&&this._o.onCompleted()},b}(fc),Rc=hc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ta(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new Pc(b,d)};Xb.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Uc.apply(null,a)};var Sc=function(a){function b(b,c){this._s=b,this._fn=c,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._s.o.onNext(a)},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.i++,this._fn(this._s)},b}(fc),Tc=function(a){function b(b){this._sources=b,a.call(this)}function c(a,b){if(!a.disposable.isDisposed){if(a.i===a.sources.length)return a.o.onCompleted();var c=a.sources[a.i];sa(c)&&(c=Od(c));var d=new Cb;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new Sc(a,b)))}}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,d=xb(ma),e={o:a,i:0,subscription:b,disposable:d,sources:this._sources},f=Nb.scheduleRecursive(e,c);return new Fb([b,d,f])},b}(jc),Uc=hc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return new Tc(a)};Xb.concatAll=function(){return this.merge(1)};var Vc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new ub;return b.add(this.source.subscribe(new Wc(a,this.maxConcurrent,b))),b},b}(jc),Wc=function(a){function b(b,c,d){this.o=b,this.max=c,this.g=d,this.done=!1,this.q=[],this.activeCount=0,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return sb(b,a),b.prototype.handleSubscribe=function(a){var b=new Cb;this.g.add(b),sa(a)&&(a=Od(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.next=function(a){this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a)},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,0===this.activeCount&&this.o.onCompleted()},sb(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.q.length>0?this.parent.handleSubscribe(this.parent.q.shift()):(this.parent.activeCount--,this.parent.done&&0===this.parent.activeCount&&this.parent.o.onCompleted())},b}(fc);Xb.merge=function(a){return"number"!=typeof a?Xc(this,a):new Vc(this,a)};var Xc=hc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Jb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Nb,b=0;d>b;b++)c.push(arguments[b]);else for(a=Nb,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},Yc=la.CompositeError=function(a){this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Yc.prototype=Object.create(Error.prototype),Yc.prototype.name="CompositeError";var Zc=function(a){function b(b){this.source=b,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new ub,c=new Cb,d={isStopped:!1,errors:[],o:a};return b.add(c),c.setDisposable(this.source.subscribe(new $c(b,d))),b},b}(jc),$c=function(a){function b(b,c){this._group=b,this._state=c,a.call(this)}function c(a,b){0===b.length?a.onCompleted():1===b.length?a.onError(b[0]):a.onError(new Yc(b))}function d(b,c,d){this._inner=b,this._group=c,this._state=d,a.call(this)}return sb(b,a),b.prototype.next=function(a){var b=new Cb;this._group.add(b),sa(a)&&(a=Od(a)),b.setDisposable(a.subscribe(new d(b,this._group,this._state)))},b.prototype.error=function(a){this._state.errors.push(a),this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},b.prototype.completed=function(){this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},sb(d,a),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.errors.push(a),this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},d.prototype.completed=function(){this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},b}(fc);hc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=F(null,a);return new Zc(d)};var _c=function(a){function b(b){this.source=b,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new ub,c=new Cb;return b.add(c),c.setDisposable(this.source.subscribe(new ad(a,b))),b},b}(jc),ad=function(a){function b(b,c){this.o=b,this.g=c,this.done=!1,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return sb(b,a),b.prototype.next=function(a){var b=new Cb;this.g.add(b),sa(a)&&(a=Od(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,1===this.g.length&&this.o.onCompleted()},sb(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.done&&1===this.parent.g.length&&this.parent.o.onCompleted()},b}(fc);Xb.mergeAll=function(){return new _c(this)};var bd=function(a){function b(b,c){this._s=b,this._o=sa(c)?Od(c):c,this._open=!1,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Cb;b.setDisposable(this._s.subscribe(new cd(a,this))),sa(this._o)&&(this._o=Od(this._o));var c=new Cb;return c.setDisposable(this._o.subscribe(new dd(a,this,c))),new Eb(b,c)},b}(jc),cd=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._p._open&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._p._open&&this._o.onCompleted()},b}(fc),dd=function(a){function b(b,c,d){this._o=b,this._p=c,this._r=d,a.call(this)}return sb(b,a),b.prototype.next=function(){this._p._open=!0,this._r.dispose()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._r.dispose()},b}(fc);Xb.skipUntil=function(a){return new bd(this,a)};var ed=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,fc.call(this)}function d(a,b){this.parent=a,this.id=b,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,d=this.source.subscribe(new c(a,b));return new Eb(d,b)},sb(c,fc),c.prototype.next=function(a){var b=new Cb,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),sa(a)&&(a=Od(a)),b.setDisposable(a.subscribe(new d(this,c)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.stopped=!0,!this.hasLatest&&this.o.onCompleted()},sb(d,fc),d.prototype.next=function(a){this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.error=function(a){this.parent.latest===this.id&&this.parent.o.onError(a)},d.prototype.completed=function(){this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.stopped&&this.parent.o.onCompleted())},b}(jc);Xb["switch"]=Xb.switchLatest=function(){return new ed(this)};var fd=function(a){function b(b,c){this.source=b,this.other=sa(c)?Od(c):c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return new Eb(this.source.subscribe(a),this.other.subscribe(new gd(a)))},b}(jc),gd=function(a){function b(b){this._o=b,a.call(this)}return sb(b,a),b.prototype.next=function(){this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=ma,b}(fc);Xb.takeUntil=function(a){return new fd(this,a)};var hd=function(a){function b(b,c,d){this._s=b,this._ss=c,this._cb=d,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._ss.length,c={hasValue:u(b,H),hasValueAll:!1,values:new Array(b)},d=this._ss.length,e=new Array(d+1),f=0;d>f;f++){var g=this._ss[f],h=new Cb;sa(g)&&(g=Od(g)),h.setDisposable(g.subscribe(new id(a,f,c))),e[f]=h}var i=new Cb;return i.setDisposable(this._s.subscribe(new jd(a,this._cb,c))),e[d]=i,new Fb(e)},b}(jc),id=function(a){function b(b,c,d){this._o=b,this._i=c,this._state=d,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll=this._state.hasValue.every(na)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=ma,b}(fc),jd=function(a){function b(b,c,d){this._o=b,this._cb=c,this._state=d,a.call(this)}return sb(b,a),b.prototype.next=function(a){var b=[a].concat(this._state.values);if(this._state.hasValueAll){var c=va(this._cb).apply(null,b);return c===ua?this._o.onError(c.e):void this._o.onNext(c)}},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(fc);Xb.withLatestFrom=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ta(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new hd(this,b,d)};var kd=function(a){function b(b,c){this._s=b,this._cb=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._s.length,c=new Array(b),d=u(b,H),e=u(b,J),f=0;b>f;f++){var g=this._s[f],h=new Cb;c[f]=h,sa(g)&&(g=Od(g)),h.setDisposable(g.subscribe(new ld(a,f,this,e,d)))}return new Fb(c)},b}(jc),ld=function(a){function b(b,c,d,e,f){this._o=b,this._i=c,this._p=d,this._q=e,this._d=f,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return sb(b,a),b.prototype.next=function(a){if(this._q[this._i].push(a),this._q.every(c)){var b=this._q.map(d),f=va(this._p._cb).apply(null,b);if(f===ua)return this._o.onError(f.e);this._o.onNext(f)}else this._d.filter(e(this._i)).every(na)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d[this._i]=!0,this._d.every(na)&&this._o.onCompleted()},b}(fc);Xb.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ta(b[a-1])?b.pop():I;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new kd(b,d)},hc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];Array.isArray(b[0])&&(b=ta(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)};var md=function(a){function b(b,c){this.sources=b,this._cb=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){for(var b=this.sources,c=b.length,d=new Array(c),e={q:u(c,J),done:u(c,H),cb:this._cb,o:a},f=0;c>f;f++)!function(a){var c=b[a],f=new Cb;(Ka(c)||Ja(c))&&(c=Ac(c)),d[a]=f,f.setDisposable(c.subscribe(new nd(e,a)))}(f);return new Fb(d)},b}(jc),nd=function(a){function b(b,c){this._s=b,this._i=c,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return sb(b,a),b.prototype.next=function(a){if(this._s.q[this._i].push(a),this._s.q.every(c)){var b=this._s.q.map(d),f=va(this._s.cb).apply(null,b);if(f===ua)return this._s.o.onError(f.e);this._s.o.onNext(f)}else this._s.done.filter(e(this._i)).every(na)&&this._s.o.onCompleted()},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.done[this._i]=!0,this._s.done.every(na)&&this._s.o.onCompleted()},b}(fc);Xb.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ta(b[a-1])?b.pop():I,e=this;return b.unshift(e),new md(b,d)},Xb.asObservable=function(){return new fe(K(this),this)};var od=function(a){function b(b){this.source=b,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new pd(a))},b}(jc),pd=function(a){function b(b){this._o=b,a.call(this)}return sb(b,a),b.prototype.next=function(a){a.accept(this._o)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(fc);Xb.dematerialize=function(){return new od(this)};var qd=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new rd(a,this.keyFn,this.comparer))},b}(jc),rd=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return sb(b,a),b.prototype.next=function(a){var b,c=a;return ta(this.keyFn)&&(c=va(this.keyFn)(a),c===ua)?this.o.onError(c.e):this.hasCurrentKey&&(b=va(this.comparer)(this.currentKey,c),b===ua)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(fc);Xb.distinctUntilChanged=function(a,b){return b||(b=pa),new qd(this,a,b)};var sd=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||ta(b._oN)?ec(b._oN||ma,b._oE||ma,b._oC||ma):b._oN,this.isStopped=!1,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},sb(c,fc),c.prototype.next=function(a){var b=va(this.t.onNext).call(this.t,a);b===ua&&this.o.onError(b.e),this.o.onNext(a)},c.prototype.error=function(a){var b=va(this.t.onError).call(this.t,a);return b===ua?this.o.onError(b.e):void this.o.onError(a)},c.prototype.completed=function(){var a=va(this.t.onCompleted).call(this.t);return a===ua?this.o.onError(a.e):void this.o.onCompleted()},b}(jc);Xb["do"]=Xb.tap=Xb.doAction=function(a,b,c){return new sd(this,a,b,c)},Xb.doOnNext=Xb.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Xb.doOnError=Xb.tapOnError=function(a,b){return this.tap(ma,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Xb.doOnCompleted=Xb.tapOnCompleted=function(a,b){return this.tap(ma,null,"undefined"!=typeof b?function(){a.call(b)}:a)};var td=function(a){function b(b,c,d){this.source=b,this._fn=La(c,d,0),a.call(this)}function c(a,b){this.isDisposed=!1,this._s=a,this._fn=b}return sb(b,a),b.prototype.subscribeCore=function(a){var b=va(this.source.subscribe).call(this.source,a);return b===ua&&(this._fn(),e(b.e)),new c(b,this._fn)},c.prototype.dispose=function(){if(!this.isDisposed){var a=va(this._s.dispose).call(this._s);this._fn(),a===ua&&e(a.e)}},b}(jc);Xb["finally"]=function(a,b){return new td(this,a,b)};var ud=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=ma,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(jc);Xb.ignoreElements=function(){return new ud(this)};var vd=function(a){function b(b,c){this.source=b,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new wd(a))},b}(jc),wd=function(a){function b(b){this._o=b,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._o.onNext(ac(a))},b.prototype.error=function(a){this._o.onNext(bc(a)),this._o.onCompleted()},b.prototype.completed=function(){this._o.onNext(cc()),this._o.onCompleted()},b}(fc);Xb.materialize=function(){return new vd(this)},Xb.repeat=function(a){return pc(this,a).concat()},Xb.retry=function(a){return pc(this,a).catchError()},Xb.retryWhen=function(a){return pc(this).catchErrorWhen(a)};var xd=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new yd(a,this))},b}(jc),yd=function(a){function b(b,c){this._o=b,this._p=c,this._fn=c.accumulator,this._hs=c.hasSeed,this._s=c.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,a.call(this)}return sb(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=va(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?va(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===ua?this._o.onError(this._a.e):(this._o.onNext(this._a),void this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){!this._hv&&this._hs&&this._o.onNext(this._s),this._o.onCompleted()},b}(fc);Xb.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new xd(this,c,b,a)};var zd=function(a){function b(b,c){this.source=b,this._c=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ad(a,this._c))},b}(jc),Ad=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return sb(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._o.onNext(this._q.shift())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(fc);Xb.skipLast=function(a){if(0>a)throw new Da;return new zd(this,a)},Xb.startWith=function(){var a,b=0;arguments.length&&Jb(arguments[0])?(a=arguments[0],b=1):a=Nb;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return rc([Cc(c,a),this]).concat()};var Bd=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return sb(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._q.shift()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){for(;this._q.length>0;)this._o.onNext(this._q.shift());this._o.onCompleted()},b}(fc);Xb.takeLast=function(a){if(0>a)throw new Da;var b=this;return new fe(function(c){return b.subscribe(new Bd(c,a))},b)},Xb.flatMapConcat=Xb.concatMap=function(a,b,c){return new kc(this,a,b,c).merge(1)};var Cd=function(a){function b(b,c,d){this.source=b,this.selector=La(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,fc.call(this)}return sb(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))},sb(d,fc),d.prototype.next=function(a){var b=va(this.selector)(a,this.i++,this.source);return b===ua?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}(jc);Xb.map=Xb.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Cd?this.internalMap(c,b):new Cd(this,c,b)},Xb.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(L(b,a))},Xb.flatMap=Xb.selectMany=function(a,b,c){return new kc(this,a,b,c).mergeAll()},la.Observable.prototype.flatMapLatest=function(a,b,c){return new kc(this,a,b,c).switchLatest()};var Dd=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,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},sb(c,fc),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}(jc);Xb.skip=function(a){if(0>a)throw new Da;return new Dd(this,a)};var Ed=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Fd(a,this))},b}(jc),Fd=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return sb(b,a),b.prototype.next=function(a){if(!this._r){var b=va(this._p._fn)(a,this._i++,this._p);if(b===ua)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}(fc);Xb.skipWhile=function(a,b){var c=La(a,b,3);return new Ed(this,c)};var Gd=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,fc.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},sb(c,fc),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}(jc);Xb.take=function(a,b){if(0>a)throw new Da;return 0===a?xc(b):new Gd(this,a)};var Hd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Id(a,this))},b}(jc),Id=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return sb(b,a),b.prototype.next=function(a){return this._r&&(this._r=va(this._p._fn)(a,this._i++,this._p),this._r===ua)?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}(fc);Xb.takeWhile=function(a,b){var c=La(a,b,3);return new Hd(this,c)};var Jd=function(a){function b(b,c,d){this.source=b,this.predicate=La(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,fc.call(this)}return sb(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)},sb(d,fc),d.prototype.next=function(a){var b=va(this.predicate)(a,this.i++,this.source);return b===ua?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}(jc);Xb.filter=Xb.where=function(a,b){return this instanceof Jd?this.internalFilter(a,b):new Jd(this,a,b)},hc.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return M(a,b,c,e)}},hc.fromNodeCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return O(a,b,c,e)}},R.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},la.config.useNativeEvents=!1;var Kd=function(a){function b(b,c,d){this._el=b,this._n=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ta(b)&&(c=va(b).apply(null,arguments),c===ua)?a.onError(c.e):void a.onNext(c)}}return sb(b,a),b.prototype.subscribeCore=function(a){return S(this._el,this._n,c(a,this._fn))},b}(jc);hc.fromEvent=function(a,b,c){return a.addListener?Md(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):la.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Kd(a,b,c).publish().refCount():Md(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Ld=function(a){function b(b,c,d){this._add=b,this._del=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ta(b)&&(c=va(b).apply(null,arguments),c===ua)?a.onError(c.e):void a.onNext(c)}}function d(a,b,c){this._del=a,this._fn=b,this._ret=c,this.isDisposed=!1}return sb(b,a),b.prototype.subscribeCore=function(a){
var b=c(a,this._fn),e=this._add(b);return new d(this._del,b,e)},d.prototype.dispose=function(){this.isDisposed||ta(this._del)&&this._del(this._fn,this._ret)},b}(jc),Md=hc.fromEventPattern=function(a,b,c){return new Ld(a,b,c).publish().refCount()},Nd=function(a){function b(b,c){this._p=b,this._s=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];c.onNext(d),c.onCompleted()}function d(a,b){var c=b[0],d=b[1];c.onError(d)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Cb,e=this;return this._p.then(function(d){b.setDisposable(e._s.schedule([a,d],c))},function(c){b.setDisposable(e._s.schedule([a,c],d))}),b},b}(jc),Od=hc.fromPromise=function(a,b){return b||(b=Ub),new Nd(a,b)};Xb.toPromise=function(a){if(a||(a=la.config.Promise),!a)throw new Ea("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d;b.subscribe(function(a){d=a},c,function(){a(d)})})},hc.startAsync=function(a){var b=va(a)();return b===ua?Lc(b.e):Od(b)};var Pd=function(a){function b(b,c,d){this.source=b,this._fn1=c,this._fn2=d,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.multicast(this._fn1());return new Eb(this._fn2(b).subscribe(a),b.connect())},b}(jc);Xb.multicast=function(a,b){return ta(a)?new Pd(this,a,b):new Rd(this,a)},Xb.publish=function(a){return a&&ta(a)?this.multicast(function(){return new ie},a):this.multicast(new ie)},Xb.share=function(){return this.publish().refCount()},Xb.publishLast=function(a){return a&&ta(a)?this.multicast(function(){return new je},a):this.multicast(new je)},Xb.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new le(b)},a):this.multicast(new le(a))},Xb.shareValue=function(a){return this.publishValue(a).refCount()},Xb.replay=function(a,b,c,d){return a&&ta(a)?this.multicast(function(){return new me(b,c,d)},a):this.multicast(new me(b,c,d))},Xb.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Qd=function(a){function b(b){this.source=b,this._count=0,this._connectableSubscription=null,a.call(this)}function c(a,b){this._p=a,this._s=b,this.isDisposed=!1}return sb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.subscribe(a);return 1===++this._count&&(this._connectableSubscription=this.source.connect()),new c(this,b)},c.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.dispose(),0===--this._p._count&&this._p._connectableSubscription.dispose())},b}(jc),Rd=la.ConnectableObservable=function(a){function b(b,c){this.source=b,this._connection=null,this._source=b.asObservable(),this._subject=c,a.call(this)}function c(a,b){this._p=a,this._s=b}return sb(b,a),c.prototype.dispose=function(){this._s&&(this._s.dispose(),this._s=null,this._p._connection=null)},b.prototype.connect=function(){if(!this._connection){var a=this._source.subscribe(this._subject);this._connection=new c(this,a)}return this._connection},b.prototype._subscribe=function(a){return this._subject.subscribe(a)},b.prototype.refCount=function(){return new Qd(this)},b}(hc),Sd=function(a){function b(b,c){this._dt=b,this._s=c,a.call(this)}function c(a,b){b.onNext(0),b.onCompleted()}return sb(b,a),b.prototype.subscribeCore=function(a){return this._s.scheduleFuture(a,this._dt,c)},b}(jc),Td=hc.interval=function(a,b){return V(a,a,Jb(b)?b:Ub)};hc.timer=function(b,c,d){var e;return Jb(d)||(d=Ub),null!=c&&"number"==typeof c?e=c:Jb(c)&&(d=c),(b instanceof Date||"number"==typeof b)&&e===a?T(b,d):b instanceof Date&&e!==a?U(b.getTime(),c,d):V(b,e,d)};Xb.delay=function(){var a=arguments[0];if("number"==typeof a||a instanceof Date){var b=a,c=arguments[1];return Jb(c)||(c=Ub),b instanceof Date?X(this,b,c):W(this,b,c)}if(hc.isObservable(a)||ta(a))return Y(this,a,arguments[1]);throw new Error("Invalid arguments")};var Ud=function(a){function b(b,c,d){Jb(d)||(d=Ub),this.source=b,this._dt=c,this._s=d,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b=new Db;return new Eb(this.source.subscribe(new Vd(a,this._dt,this._s,b)),b)},b}(jc),Vd=function(a){function b(b,c,d,e){this._o=b,this._d=c,this._scheduler=d,this._c=e,this._v=null,this._hv=!1,this._id=0,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._hv=!0,this._v=a;var b=++this._id,c=new Cb;this._c.setDisposable(c),c.setDisposable(this._scheduler.scheduleFuture(this,this._d,function(c,d){d._hv&&d._id===b&&d._o.onNext(a),d._hv=!1}))},b.prototype.error=function(a){this._c.dispose(),this._o.onError(a),this._hv=!1,this._id++},b.prototype.completed=function(){this._c.dispose(),this._hv&&this._o.onNext(this._v),this._o.onCompleted(),this._hv=!1,this._id++},b}(fc);Xb.debounce=function(){if(ta(arguments[0]))return Z(this,arguments[0]);if("number"==typeof arguments[0])return new Ud(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")};var Wd=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Xd(a,this._s))},b}(jc),Xd=function(a){function b(b,c){this._o=b,this._s=c,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._o.onNext({value:a,timestamp:this._s.now()})},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(fc);Xb.timestamp=function(a){return Jb(a)||(a=Ub),new Wd(this,a)};var Yd=function(a){function b(b,c){this.source=b,this._sampler=c,a.call(this)}return sb(b,a),b.prototype.subscribeCore=function(a){var b={o:a,atEnd:!1,value:null,hasValue:!1,sourceSubscription:new Cb};return b.sourceSubscription.setDisposable(this.source.subscribe(new $d(b))),new Eb(b.sourceSubscription,this._sampler.subscribe(new Zd(b)))},b}(jc),Zd=function(a){function b(b){this._s=b,a.call(this)}return sb(b,a),b.prototype._handleMessage=function(){this._s.hasValue&&(this._s.hasValue=!1,this._s.o.onNext(this._s.value)),this._s.atEnd&&this._s.o.onCompleted()},b.prototype.next=function(){this._handleMessage()},b.prototype.error=function(a){this._s.onError(a)},b.prototype.completed=function(){this._handleMessage()},b}(fc),$d=function(a){function b(b){this._s=b,a.call(this)}return sb(b,a),b.prototype.next=function(a){this._s.hasValue=!0,this._s.value=a},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.atEnd=!0,this._s.sourceSubscription.dispose()},b}(fc);Xb.sample=function(a,b){return Jb(b)||(b=Ub),"number"==typeof a?new Yd(this,Td(a,b)):new Yd(this,a)};var _d=la.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};_d.prototype=Object.create(Error.prototype),Xb.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return _(this,a,arguments[1],arguments[2]);if(hc.isObservable(a)||ta(a))return $(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")},Xb.throttle=function(a,b){Jb(b)||(b=Ub);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new fe(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var ae=function(a){function b(b,c){this.source=b,this.controller=new ie,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,a.call(this)}return sb(b,a),b.prototype._subscribe=function(a){var b=this.source.publish(),c=b.subscribe(a),d=yb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=yb)});return new Fb([c,d,e])},b.prototype.pause=function(){this.controller.onNext(!1)},b.prototype.resume=function(){this.controller.onNext(!0)},b}(hc);Xb.pausable=function(a){return new ae(this,a)};var be=function(b){function c(a,c){this.source=a,this.controller=new ie,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,b.call(this)}return sb(c,b),c.prototype._subscribe=function(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=aa(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){d!==a&&f.shouldFire!==d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f},c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(hc);Xb.pausableBuffered=function(a){return new be(this,a)};var ce=function(a){function b(b,c,d){a.call(this),this.subject=new de(c,d),this.source=b.multicast(this.subject).refCount()}return sb(b,a),b.prototype._subscribe=function(a){return this.source.subscribe(a)},b.prototype.request=function(a){return this.subject.request(null==a?-1:a)},b}(hc),de=function(a){function b(b,c){null==b&&(b=!0),a.call(this),this.subject=new ie,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=c||Pb}return sb(b,a),tb(b.prototype,dc,{_subscribe:function(a){return this.subject.subscribe(a)},onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Yb.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Yb.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(Yb.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.schedule(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,xb(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),b}(hc);Xb.controlled=function(a,b){return a&&Jb(a)&&(b=a,a=!0),null==a&&(a=!0),new ce(this,a,b)},Xb.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a};var ee=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return sb(b,a),b.prototype.next=function(a){var b=va(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===ua&&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}(fc);Xb.transduce=function(a){var b=this;return new fe(function(c){var d=a(ba(c));return b.subscribe(new ee(c,d))},b)};var fe=la.AnonymousObservable=function(a){function b(a){return a&&ta(a.dispose)?a:ta(a)?xb(a):yb}function c(a,c){var d=c[0],f=c[1],g=va(f.__subscribe).call(f,d);g!==ua||d.fail(ua.e)||e(ua.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return sb(d,a),d.prototype._subscribe=function(a){var b=new ge(a),d=[b,this];return Pb.scheduleRequired()?Pb.schedule(d,c):c(null,d),b},d}(hc),ge=function(a){function b(b){a.call(this),this.observer=b,this.m=new Cb}sb(b,a);var c=b.prototype;return c.next=function(a){var b=va(this.observer.onNext).call(this.observer,a);b===ua&&(this.dispose(),e(b.e))},c.error=function(a){var b=va(this.observer.onError).call(this.observer,a);this.dispose(),b===ua&&e(b.e)},c.completed=function(){var a=va(this.observer.onCompleted).call(this.observer);this.dispose(),a===ua&&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}(fc),he=function(a,b){this._s=a,this._o=b};he.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 ie=la.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return sb(b,a),tb(b.prototype,dc.prototype,{_subscribe:function(a){return Ab(this),this.isStopped?this.hasError?(a.onError(this.error),yb):(a.onCompleted(),yb):(this.observers.push(a),new he(this,a))},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Ab(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(Ab(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(Ab(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 ke(a,b)},b}(hc),je=la.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return sb(b,a),tb(b.prototype,dc.prototype,{_subscribe:function(a){return Ab(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),yb):(this.observers.push(a),new he(this,a))},hasObservers:function(){return Ab(this),this.observers.length>0},onCompleted:function(){var a,b;if(Ab(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(Ab(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){Ab(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(hc),ke=la.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return sb(b,a),tb(b.prototype,dc.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}(hc),le=la.BehaviorSubject=function(a){function b(b){a.call(this),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return sb(b,a),tb(b.prototype,dc.prototype,{_subscribe:function(a){return Ab(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),yb):(this.observers.push(a),a.onNext(this.value),new he(this,a))},getValue:function(){return Ab(this),this.hasError&&e(this.error),this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Ab(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(Ab(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){if(Ab(this),!this.isStopped){this.value=a;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,this.value=null,this.error=null}}),b}(hc),me=la.ReplaySubject=function(a){function b(a,b){return xb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(b,c,d){this.bufferSize=null==b?e:b,this.windowSize=null==c?e:c,this.scheduler=d||Pb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this)}var e=Math.pow(2,53)-1;return sb(d,a),tb(d.prototype,dc.prototype,{_subscribe:function(a){Ab(this);var c=new ic(this.scheduler,a),d=b(this,c);this._trim(this.scheduler.now()),this.observers.push(c);for(var e=0,f=this.q.length;f>e;e++)c.onNext(this.q[e].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),d},hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(Ab(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(Ab(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(Ab(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=0,d=c(this.observers),e=d.length;e>b;b++){var f=d[b];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),d}(hc);la.Pauser=function(a){function b(){a.call(this)}return sb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ie),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ka.Rx=la,define(function(){return la})):da&&ea?ia?(ea.exports=la).Rx=la:da.Rx=la:ka.Rx=la;var ne=j()}).call(this);
//# sourceMappingURL=rx.lite.map