Repository navigation
Expand file tree
/
Copy pathrx.all.min.js
More file actions
7 lines (7 loc) · 139 KB
/
Copy pathrx.all.min.js
File metadata and controls
7 lines (7 loc) · 139 KB
1
2
3
4
5
6
7
/* 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)}catch(b){return Za.e=b,Za}}}function e(a){throw a}function f(a,b){if(_a&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(db)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+db+"\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===bb&&d>=cb&&rg>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(_a)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 bb=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(a){var b=[];if(!aa(a))return b;Lb.nonEnumArgs&&a.length&&Mb(a)&&(a=Ob.call(a));var c=Lb.enumPrototypes&&"function"==typeof a,d=Lb.enumErrorProps&&(a===Fb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Lb.nonEnumShadows&&a!==Gb){var f=a.constructor,g=-1,h=rb;if(a===(f&&f.prototype))var i=a===Hb?Bb:a===Fb?wb:Cb.call(a),j=Kb[i];for(;++g<h;)e=qb[g],j&&j[e]||!Db.call(a,e)||b.push(e)}return b}function m(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function n(a,b){return m(a,b,l)}function o(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function p(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Cb.call(a),h=Cb.call(b);if(g==sb&&(g=zb),h==sb&&(h=zb),g!=h)return!1;switch(g){case ub:case vb:return+a==+b;case yb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Ab:case Bb:return a==String(b)}var i=g==tb;if(!i){if(g!=zb||!Lb.nodeClass&&(o(a)||o(b)))return!1;var j=!Lb.argsObject&&Mb(a)?Object:a.constructor,k=!Lb.argsObject&&Mb(b)?Object:b.constructor;if(!(j==k||Db.call(a,"constructor")&&Db.call(b,"constructor")||Ya(j)&&j instanceof j&&Ya(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var l=c.length;l--;)if(c[l]==a)return d[l]==b;var m=0,q=!0;if(c.push(a),d.push(b),i){if(l=a.length,m=b.length,q=m==l)for(;m--;){var r=b[m];if(!(q=p(a[m],r,c,d)))break}}else n(b,function(b,e,f){return Db.call(f,e)?(m++,q=Db.call(a,e)&&p(a[e],b,c,d)):void 0}),q&&n(a,function(a,b,c){return Db.call(c,b)?q=--m>-1:void 0});return c.pop(),d.pop(),q}function r(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function s(a,b){this.id=a,this.value=b}function t(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function u(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function v(a){this._s=a,this.isDisposed=!1}function w(a){this._s=a}function x(a){this._s=a,this._l=a.length,this._i=0}function y(a){this._a=a}function z(a){this._a=a,this._l=D(a),this._i=0}function A(a){return"number"==typeof a&&Pa.isFinite(a)}function B(b){var c,d=b[kb];if(!d&&"string"==typeof b)return c=new w(b),c[kb]();if(!d&&b.length!==a)return c=new y(b),c[kb]();if(!d)throw new TypeError("Object is not iterable");return b[kb]()}function C(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function D(a){var b=+a.length;return isNaN(b)?0:0!==b&&A(b)?(b=C(b)*Math.floor(Math.abs(b)),0>=b?0:b>fd?fd:b):b}function E(a,b){this.observer=a,this.parent=b}function F(a,b){var c=a.length;return function(d,e){c>d?(b.onNext(a[d]),e(d+1)):b.onCompleted()}}function G(a,b){return ic(a)||(a=pc),new hd(b,a)}function H(a,b){this.observer=a,this.parent=b}function I(a,b){this.observer=a,this.parent=b}function J(a,b){return a.amb(b)}function K(){return!1}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(){return!1}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(){return!1}function M(){return[]}function K(){return!1}function M(){return[]}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function N(a){return function(b){return a.subscribe(b)}}function O(a){return a.toArray()}function P(a){return a.length>0}function Q(a,b,c){var d=pb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Xa(e)&&(e=Yc(e)),(nb(e)||mb(e))&&(e=gd(e)),e}).concatAll()}function R(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function S(a){this.comparer=a,this.set=[]}function T(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 U(a){if(0===a.length)throw new eb;return a[0]}function V(a,b,c,d){var e=pb(b,c,3);return new ig(function(b){return a.subscribe(new We(b,a,e,d))},a)}function W(a){return a?Lc.isObservable(a)?a:Xa(a)?Lc.fromPromise(a):_(a)||$(a)?df.call(this,a):Ya(a)?Z.call(this,a):nb(a)||mb(a)?X.call(this,a):aa(a)?Y.call(this,a):a:a}function X(a){return Lc.from(a).concatMap(function(a){return Lc.isObservable(a)||aa(a)?W.call(null,a):Qa.Observable.just(a)}).toArray()}function Y(b){function c(b,c){d[c]=a,f.push(b.map(function(a){d[c]=a}))}for(var d=new b.constructor,e=Object.keys(b),f=[],g=0,h=e.length;h>g;g++){var i=e[g],j=W.call(this,b[i]);j&&Lc.isObservable(j)?c(j,i):d[i]=b[i]}return Lc.forkJoin.apply(Lc,f).map(function(){return d})}function Z(a){var b=this;return new ig(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 $(a){return Ya(a.next)&&Ya(a["throw"])}function _(a){var b=a.constructor;return b?"GeneratorFunction"===b.name||"GeneratorFunction"===b.displayName?!0:$(b.prototype):!1}function aa(a){return Object==a.constructor}function ba(a,b,c,d){var e=new ng;return d.push(ca(e,b,c)),a.apply(b,d),e.asObservable()}function ca(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(Ya(c)){if(e=$a(c).apply(b,e),e===Za)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function da(a,b,c,d){var e=new ng;return d.push(ea(e,b,c)),a.apply(b,d),e.asObservable()}function ea(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(Ya(c)){var f=$a(c).apply(b,f);if(f===Za)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function fa(a){return Pa.StaticNodeList?a instanceof Pa.StaticNodeList||a instanceof Pa.NodeList:"[object NodeList]"===Object.prototype.toString.call(a)}function ga(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function ha(a,b,c){var d=new Ub,e=Object.prototype.toString.call(a);if(fa(a)||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(ha(a.item(f),b,c));else a&&d.add(new ga(a,b,c));return d}function ia(a,b,c){return new ig(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(Sa))){if(f)return d.onError(f);var e=$a(c).apply(null,j);if(e===Za)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 cc(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 O(a){return a.toArray()}function ja(a,b){return a.groupJoin(this,b,cd,function(a,b){return b})}function ka(a){var b=this;return new ig(function(c){var d=new mg,e=new Ub,f=new ec(e);return c.onNext(Rb(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Xa(a)&&(a=Yc(a)),e.add(a.subscribe(function(a){d.onCompleted(),d=new mg,c.onNext(Rb(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function la(a){var b=this;return new ig(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Xa(b)&&(b=Yc(b));var i=new ac;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Ra,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new mg,c.onNext(Rb(h,g)),d()}))}var e=new bc,f=new Ub(e),g=new ec(f),h=new mg;return c.onNext(Rb(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function ma(a,b){return new vf(a,b)}function L(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function na(a){this.patterns=a}function oa(a,b){this.expression=a,this.selector=b}function pa(a){return function(b){a.onError(b)}}function qa(a,b){return function(){var c=$a(a.selector).apply(a,arguments);return c===Za?b.onError(c.e):void b.onNext(c)}}function ra(a,b,c){var d=a.get(b);if(!d){var e=new Df(b,c);return a.set(b,e),e}return d}function sa(a,b,c){this.joinObserverArray=a,this. Cf;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function ta(a,b){return new Ef(a,b)}function ua(a,b,c){return new ig(function(d){var e=a,f=hc(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 va(a,b,c){return a===b?new ig(function(a){return c.schedulePeriodic(0,b,function(b){return a.onNext(b),b+1})}):_c(function(){return ua(new Date(c.now()+a),b,c)})}function wa(a,b,c){return new ig(function(d){var e,f=!1,g=new bc,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 ac,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 cc(e,g)},a)}function xa(a,b,c){return _c(function(){return wa(a,b-c.now(),c)})}function ya(a,b,c){var d,e;return Ya(b)?e=b:(d=b,e=c),new ig(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=$a(e)(a);if(c===Za)return b.onError(c.e);var d=new ac;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 bc;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new cc(i,g)},this)}function za(a,b){return new ig(function(c){var d,e=!1,f=new bc,g=0,h=a.subscribe(function(a){var h=$a(b)(a);if(h===Za)return c.onError(h.e);Xa(h)&&(h=Yc(h)),e=!0,d=a,g++;var i=g,j=new ac;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 cc(h,f)},a)}function O(a){return a.toArray()}function O(a){return a.toArray()}function Aa(a,b){return new ig(function(c){function d(){g&&(g=!1,c.onNext(e)),f&&c.onCompleted()}var e,f=!1,g=!1,h=new ac;return h.setDisposable(a.subscribe(function(a){g=!0,e=a},function(a){c.onError(a)},function(){f=!0,h.dispose()})),new cc(h,b.subscribe(d,function(a){c.onError(a)},d))},a)}function Ba(a,b,c,d){return Ya(b)&&(d=c,c=b,b=md()),d||(d=td(new Mf)),new ig(function(e){function f(a){function b(){return l=c===k}var c=k,f=new ac;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 bc,i=new bc,j=new ac;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=$a(c)(a);if(b===Za)return e.onError(b.e);f(Xa(b)?Yc(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new cc(h,i)},a)}function Ca(a,b,c,d){return ic(c)&&(d=c,c=td(new Mf)),c instanceof Error&&(c=td(c)),ic(d)||(d=uc),new ig(function(e){function f(){var a=g;k.setDisposable(d.scheduleFuture(null,b,function(){j=g===a,j&&(Xa(c)&&(c=Yc(c)),i.setDisposable(c.subscribe(e)))}))}var g=0,h=new ac,i=new bc,j=!1,k=new bc;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 cc(i,k)},a)}function Da(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}function Ea(a){this.predicate=a}function Fa(a){this.predicate=a}function Ga(a,b){var c=this;this.scheduler=a,this.messages=b,this.subscriptions=[],this.observers=[];for(var d=0,e=this.messages.length;e>d;d++){var f=this.messages[d],g=f.value;!function(b){a.scheduleAbsolute(null,f.time,function(){for(var a=c.observers.slice(0),d=0,e=a.length;e>d;d++)b.accept(a[d]);return Yb})}(g)}}var Ha={"function":!0,object:!0},Ia=Ha[typeof exports]&&exports&&!exports.nodeType?exports:null,Ja=Ha[typeof module]&&module&&!module.nodeType?module:null,Ka=b(Ia&&Ja&&"object"==typeof global&&global),La=b(Ha[typeof self]&&self),Ma=b(Ha[typeof window]&&window),Na=Ja&&Ja.exports===Ia?Ia:null,Oa=b(Ha[typeof this]&&this),Pa=Ka||Ma!==(Oa&&Oa.window)&&Ma||La||Oa||Function("return this")(),Qa={internals:{},config:{Promise:Pa.Promise},helpers:{}},Ra=Qa.helpers.noop=function(){},Sa=Qa.helpers.identity=function(a){return a},Ta=Qa.helpers.defaultNow=Date.now,Ua=Qa.helpers.defaultComparer=function(a,b){return Nb(a,b)},Va=Qa.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Wa=(Qa.helpers.defaultKeySerializer=function(a){return a.toString()},Qa.helpers.defaultError=function(a){throw a}),Xa=Qa.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},Ya=Qa.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Cb.call(a)}),a}(),Za={e:{}},$a=Qa.internals.tryCatch=function(a){if(!Ya(a))throw new TypeError("fn must be a function");return d(a)};Qa.config.longStackSupport=!1;var _a=!1,ab=$a(function(){throw new Error})();_a=!!ab.e&&!!ab.e.stack;var bb,cb=j(),db="From previous event:",eb=Qa.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};eb.prototype=Object.create(Error.prototype),eb.prototype.name="EmptyError";var fb=Qa.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};fb.prototype=Object.create(Error.prototype),fb.prototype.name="ObjectDisposedError";var gb=Qa.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};gb.prototype=Object.create(Error.prototype),gb.prototype.name="ArgumentOutOfRangeError";var hb=Qa.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};hb.prototype=Object.create(Error.prototype),hb.prototype.name="NotSupportedError";var ib=Qa.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};ib.prototype=Object.create(Error.prototype),ib.prototype.name="NotImplementedError";var jb=Qa.helpers.notImplemented=function(){throw new ib},kb=(Qa.helpers.notSupported=function(){throw new hb},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");Pa.Set&&"function"==typeof(new Pa.Set)["@@iterator"]&&(kb="@@iterator");var lb=Qa.doneEnumerator={done:!0,value:a},mb=Qa.helpers.isIterable=function(b){return b&&b[kb]!==a},nb=Qa.helpers.isArrayLike=function(b){return b&&b.length!==a};Qa.helpers.iterator=kb;var ob,pb=Qa.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)}},qb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],rb=qb.length,sb="[object Arguments]",tb="[object Array]",ub="[object Boolean]",vb="[object Date]",wb="[object Error]",xb="[object Function]",yb="[object Number]",zb="[object Object]",Ab="[object RegExp]",Bb="[object String]",Cb=Object.prototype.toString,Db=Object.prototype.hasOwnProperty,Eb=Cb.call(arguments)==sb,Fb=Error.prototype,Gb=Object.prototype,Hb=String.prototype,Ib=Gb.propertyIsEnumerable;try{ob=!(Cb.call(document)==zb&&!({toString:0}+""))}catch(Jb){ob=!0}var Kb={};Kb[tb]=Kb[vb]=Kb[yb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Kb[ub]=Kb[Bb]={constructor:!0,toString:!0,valueOf:!0},Kb[wb]=Kb[xb]=Kb[Ab]={constructor:!0,toString:!0},Kb[zb]={constructor:!0};var Lb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Lb.enumErrorProps=Ib.call(Fb,"message")||Ib.call(Fb,"name"),Lb.enumPrototypes=Ib.call(a,"prototype"),Lb.nonEnumArgs=0!=c,Lb.nonEnumShadows=!/valueOf/.test(b)}(1);var aa=Qa.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Mb=function(a){return a&&"object"==typeof a?Cb.call(a)==sb:!1};Eb||(Mb=function(a){return a&&"object"==typeof a?Db.call(a,"callee"):!1});var Nb=Qa.internals.isEqual=function(a,b){return p(a,b,[],[])},Ob=({}.hasOwnProperty,Array.prototype.slice),Pb=Qa.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Qb=Qa.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]}},Rb=Qa.internals.addRef=function(a,b){return new ig(function(c){return new cc(b.getDisposable(),a.subscribe(c))})};s.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Sb=Qa.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Tb=Sb.prototype;Tb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Tb.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)}}},Tb.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)}}},Tb.peek=function(){return this.items[0].value},Tb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Tb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Tb.enqueue=function(a){var b=this.length++;this.items[b]=new s(Sb.count++,a),this.percolate(b)},Tb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Sb.count=0;var Ub=Qa.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;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=Qa.Disposable=function(a){this.isDisposed=!1,this.action=a||Ra};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:Ra},Zb=Wb.isDisposable=function(a){return a&&Ya(a.dispose)},$b=Wb.checkDisposed=function(a){if(a.isDisposed)throw new fb},_b=Wb._fixup=function(a){return Zb(a)?a:Yb},ac=Qa.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};ac.prototype.getDisposable=function(){return this.current},ac.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()},ac.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null,a&&a.dispose()}};var bc=Qa.SerialDisposable=function(){this.isDisposed=!1,this.current=null};bc.prototype.getDisposable=function(){return this.current},bc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},bc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var cc=Qa.BinaryDisposable=function(a,b){this._first=a,this._second=b,this.isDisposed=!1};cc.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 dc=Qa.NAryDisposable=function(a){this._disposables=a,this.isDisposed=!1};dc.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 ec=Qa.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}();t.prototype.dispose=function(){this.scheduler.schedule(this,u)};var fc=Qa.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Va,this.disposable=new ac};fc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},fc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},fc.prototype.isCancelled=function(){return this.disposable.isDisposed},fc.prototype.invokeCore=function(){return _b(this.action(this.scheduler,this.state))};var gc=Qa.Scheduler=function(){function a(){}a.isScheduler=function(b){return b instanceof a};var b=a.prototype;return b.schedule=function(a,b){throw new ib},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 ib},a.now=Ta,a.prototype.now=Ta,a.normalize=function(a){return 0>a&&(a=0),a},a}(),hc=gc.normalize,ic=gc.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)}}(gc.prototype),function(a){gc.prototype.schedulePeriodic=function(a,b,c){if("undefined"==typeof Pa.setInterval)throw new hb;b=hc(b);var d=a,e=Pa.setInterval(function(){d=c(d)},b);return Xb(function(){Pa.clearInterval(e)})}}(gc.prototype),function(a){a.catchError=a["catch"]=function(a){return new vc(this,a)}}(gc.prototype);var jc,kc,lc=Qa.internals.SchedulePeriodicRecursive=function(){function a(a){return function(b,c){c(0,a._period);var d=$a(a._action)(a._state);d===Za&&(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 ac;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,a(this))),b},b}(),mc=function(a){function b(){a.call(this)}return Pb(b,a),b.prototype.schedule=function(a,b){return _b(b(this,a))},b}(gc),nc=gc.immediate=new mc,oc=function(a){function b(){for(;d.length>0;){var a=d.dequeue();!a.isCancelled()&&a.invoke()}}function c(){a.call(this)}var d;return Pb(c,a),c.prototype.schedule=function(a,c){var f=new fc(this,a,c,this.now());if(d)d.enqueue(f);else{d=new Sb(4),d.enqueue(f);var g=$a(b)();d=null,g===Za&&e(g.e)}return f.disposable},c.prototype.scheduleRequired=function(){return!d},c}(gc),pc=gc.currentThread=new oc,qc=function(){var a,b=Ra;if(Pa.setTimeout)a=Pa.setTimeout,b=Pa.clearTimeout;else{if(!Pa.WScript)throw new hb;a=function(a,b){Pa.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),rc=qc.setTimeout,sc=qc.clearTimeout;!function(){function a(b){if(f)rc(function(){a(b)},0);else{var c=d[b];if(c){f=!0;var g=$a(c)();kc(b),f=!1,g===Za&&e(g.e)}}}function b(){if(!Pa.postMessage||Pa.importScripts)return!1;var a=!1,b=Pa.onmessage;return Pa. c=1,d={},f=!1;kc=function(a){delete d[a]};var g=new RegExp("^"+String(Cb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=Ka&&Na&&Ka.setImmediate)&&!g.test(h)&&h;if(Ya(h))jc=function(b){var e=c++;return d[e]=b,h(function(){a(e)}),e};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))jc=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))};Pa.addEventListener("message",j,!1),jc=function(a){var b=c++;return d[b]=a,Pa.postMessage(i+currentId,"*"),b}}else if(Pa.MessageChannel){var k=new Pa.MessageChannel;k.port1. b=c++;return d[b]=a,k.port2.postMessage(b),b}}else jc="document"in Pa&&"onreadystatechange"in Pa.document.createElement("script")?function(b){var e=Pa.document.createElement("script"),f=c++;return d[f]=b,e. e=c++;return d[e]=b,rc(function(){a(e)},0),e}}();var tc=function(a){function b(){a.call(this)}function c(a,b,c,d){return function(){!a.isDisposed&&a.setDisposable(Wb._fixup(b(c,d)))}}function d(a,b){this._id=b,this._method=a,this.isDisposed=!1}return Pb(b,a),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._method.call(null,this._id))},b.prototype.schedule=function(a,b){var e=new ac,f=jc(c(e,b,this,a));return new cc(e,new d(kc,f))},b.prototype._scheduleFuture=function(a,b,e){if(0===b)return this.schedule(a,e);var f=new ac,g=rc(c(f,e,this,a),b);return new cc(f,new d(sc,g))},b}(gc),uc=gc["default"]=gc.async=new tc,vc=function(a){function b(b,c){this._scheduler=b,this._handler=c,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this)}return Pb(b,a),b.prototype.schedule=function(a,b){return this._scheduler.schedule(a,this._wrap(b))},b.prototype._scheduleFuture=function(a,b,c){return this._scheduler.schedule(a,b,this._wrap(c))},b.prototype.now=function(){return this._scheduler.now()},b.prototype._clone=function(a){return new b(a,this._handler)},b.prototype._wrap=function(a){var b=this;return function(c,d){var f=$a(a)(b._getRecursiveWrapper(c),d);return f===Za?(b._handler(f.e)||e(f.e),Yb):_b(ret)}},b.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},b.prototype.schedulePeriodic=function(a,b,c){var d=this,f=!1,g=new ac;return g.setDisposable(this._scheduler.schedulePeriodic(a,b,function(a){if(f)return null;var b=$a(c)(a);return b===Za?(f=!0,d._handler(b.e)||e(b.e),g.dispose(),null):ret})),g},b}(gc),wc=Qa.Notification=function(){function a(){}return a.prototype._accept=function(a,b,c){throw new ib},a.prototype._acceptObservable=function(a,b,c){throw new ib},a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return ic(a)||(a=nc),new ig(function(c){return a.schedule(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),xc=function(a){function b(a){this.value=a,this.kind="N"}return Pb(b,a),b.prototype._accept=function(a){return a(this.value)},b.prototype._acceptObservable=function(a){return a.onNext(this.value)},b.prototype.toString=function(){return"OnNext("+this.value+")"},b}(wc),yc=function(a){function b(a){this.error=a,this.kind="E"}return Pb(b,a),b.prototype._accept=function(a,b){return b(this.error)},b.prototype._acceptObservable=function(a){return a.onError(this.error)},b.prototype.toString=function(){return"OnError("+this.error+")"},b}(wc),zc=function(a){function b(){this.kind="C"}return Pb(b,a),b.prototype._accept=function(a,b,c){return c()},b.prototype._acceptObservable=function(a){return a.onCompleted()},b.prototype.toString=function(){return"OnCompleted()"},b}(wc),Ac=wc.createOnNext=function(a){return new xc(a)},Bc=wc.createOnError=function(a){return new yc(a)},Cc=wc.createOnCompleted=function(){return new zc},Dc=Qa.Observer=function(){};Dc.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},Dc.prototype.asObserver=function(){var a=this;return new Hc(function(b){a.onNext(b)},function(b){a.onError(b)},function(){a.onCompleted()})},Dc.prototype.checked=function(){return new Ic(this)};var Ec=Dc.create=function(a,b,c){return a||(a=Ra),b||(b=Wa),c||(c=Ra),new Hc(a,b,c)};Dc.fromNotifier=function(a,b){var c=pb(a,b,1);return new Hc(function(a){return c(Ac(a))},function(a){return c(Bc(a))},function(){return c(Cc())})},Dc.prototype.notifyOn=function(a){return new Kc(a,this)},Dc.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var Fc,Gc=Qa.internals.AbstractObserver=function(a){function b(){this.isStopped=!1}return Pb(b,a),b.prototype.next=jb,b.prototype.error=jb,b.prototype.completed=jb,b.prototype. this.isStopped?!1:(this.isStopped=!0,this.error(a),
!0)},b}(Dc),Hc=Qa.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Pb(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}(Gc),Ic=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Pb(b,a);var c=b.prototype;return c. b=$a(this._observer.onNext).call(this._observer,a);this._state=0,b===Za&&e(b.e)},c. b=$a(this._observer.onError).call(this._observer,a);this._state=2,b===Za&&e(b.e)},c. a=$a(this._observer.onCompleted).call(this._observer);this._state=2,a===Za&&e(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(Dc),Jc=Qa.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 bc}return Pb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},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,function(a,b){var c;if(!(a.queue.length>0))return void(a.isAcquired=!1);c=a.queue.shift();var d=$a(c)();return d===Za?(a.queue=[],a.hasFaulted=!0,e(d.e)):void b(a)}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Gc),Kc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Pb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(Jc),Lc=Qa.Observable=function(){function a(a,b){return function(c){var d=c.onError;return c. b(){if(Qa.config.longStackSupport&&_a){var b=this._subscribe,c=$a(e)(new Error).e;this.stack=c.stack.substring(c.stack.indexOf("\n")+1),this._subscribe=a(this,b)}}return Fc=b.prototype,b.isObservable=function(a){return a&&Ya(a.subscribe)},Fc.subscribe=Fc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Ec(a,b,c))},Fc.subscribeOnNext=function(a,b){return this._subscribe(Ec("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Fc.subscribeOnError=function(a,b){return this._subscribe(Ec(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Fc.subscribeOnCompleted=function(a,b){return this._subscribe(Ec(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},b}(),Mc=Qa.ObservableBase=function(a){function b(a){return a&&Ya(a.dispose)?a:Ya(a)?Xb(a):Yb}function c(a,c){var d=c[0],f=c[1],g=$a(f.subscribeCore).call(f,d);g!==Za||d.fail(Za.e)||e(Za.e),d.setDisposable(b(g))}function d(){a.call(this)}return Pb(d,a),d.prototype._subscribe=function(a){var b=new jg(a),d=[b,this];return pc.scheduleRequired()?pc.schedule(d,c):c(null,d),b},d.prototype.subscribeCore=jb,d}(Lc),Nc=Qa.FlatMapObservable=function(a){function b(b,c,d,e){this.resultSelector=Ya(d)?d:null,this.selector=pb(Ya(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,Gc.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},Pb(c,Gc),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=$a(this.selector)(a,b,this.source);return c===Za?this.o.onError(c.e):(Xa(c)&&(c=Yc(c)),(nb(c)||mb(c))&&(c=Lc.from(c)),void this.o.onNext(this._wrapResult(c,a,b)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype. Pc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b,c){this._o=a,this._s=b,this._e=c,Gc.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b={isDisposed:!1},d=new bc,e=pc.scheduleRecursive(this.sources[kb](),function(e,f){if(!b.isDisposed){var g=$a(e.next).call(e);if(g===Za)return a.onError(g.e);if(g.done)return a.onCompleted();var h=g.value;Xa(h)&&(h=Yc(h));var i=new ac;d.setDisposable(i),i.setDisposable(h.subscribe(new c(a,f,e)))}});return new dc([d,e,new v(b)])},Pb(c,Gc),c.prototype. new Pc(this)};var Qc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this._o=a,this._recurse=b,Gc.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=this.sources[kb](),d={isDisposed:!1},e=new bc,f=pc.scheduleRecursive(null,function(f,g){if(!d.isDisposed){var h=$a(b.next).call(b);if(h===Za)return a.onError(h.e);if(h.done)return null!==f?a.onError(f):a.onCompleted();var i=h.value;Xa(i)&&(i=Yc(i));var j=new ac;e.setDisposable(j),j.setDisposable(i.subscribe(new c(a,g)))}});return new dc([e,f,new v(d)])},Pb(c,Gc),c.prototype.next=function(a){this._o.onNext(a)},c.prototype.error=function(a){this._recurse(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(Mc);Oc.prototype.catchError=function(){return new Qc(this)},Oc.prototype.catchErrorWhen=function(a){var b=this;return new ig(function(c){var d,e=new mg,f=new mg,g=a(e),h=g.subscribe(f),i=b[kb](),j={isDisposed:!1},k=new bc,l=pc.scheduleRecursive(null,function(a,b){if(!j.isDisposed){var g=$a(i.next).call(i);if(g===Za)return c.onError(g.e);if(g.done)return void(d?c.onError(d):c.onCompleted());var h=g.value;Xa(h)&&(h=Yc(h));var l=new ac,m=new ac;k.setDisposable(new cc(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 dc([h,k,l,new v(j)])})};var Rc=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 Pb(b,a),b.prototype[kb]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?lb:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(Oc),Sc=Oc.repeat=function(a,b){return new Rc(a,b)},Tc=function(a){function b(a,b,c){this.s=a,this.fn=b?pb(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return Pb(b,a),b.prototype[kb]=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]}:lb},b}(Oc),Uc=Oc.of=function(a,b,c){return new Tc(a,b,c)},Vc=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Kc(this._s,a))},b}(Mc);Fc.observeOn=function(a){return new Vc(this,a)};var Wc=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}function c(a,b){var c=b[0],d=b[1],e=b[2];d.setDisposable(new t(a,c.subscribe(e)))}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new ac,d=new bc;return d.setDisposable(b),b.setDisposable(this._s.schedule([this.source,d,a],c)),d},b}(Mc);Fc.subscribeOn=function(a){return new Wc(this,a)};var Xc=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 Pb(b,a),b.prototype.subscribeCore=function(a){var b=new ac,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}(Mc),Yc=Lc.fromPromise=function(a,b){return b||(b=uc),new Xc(a,b)};Fc.toPromise=function(a){if(a||(a=Qa.config.Promise),!a)throw new hb("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)})})};var Zc=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.a=[],Gc.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},Pb(c,Gc),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}(Mc);Fc.toArray=function(){return new Zc(this)},Lc.create=function(a,b){return new ig(a,b)};var $c=function(a){function b(b){this._f=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=$a(this._f)();return b===Za?td(b.e).subscribe(a):(Xa(b)&&(b=Yc(b)),b.subscribe(a))},b}(Mc),_c=Lc.defer=function(a){return new $c(a)},ad=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 Pb(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===nc?d(null,a):this.scheduler.schedule(a,d)},b}(Mc),bd=new ad(nc),cd=Lc.empty=function(a){return ic(a)||(a=nc),a===nc?bd:new ad(a)},dd=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new ed(a,this);return b.run()},b}(Mc),ed=function(){function a(a,b){this.o=a,this.parent=b}return a.prototype.run=function(){function a(a,b){var f=$a(c.next).call(c);if(f===Za)return d.onError(f.e);if(f.done)return d.onCompleted();var g=f.value;return Ya(e)&&(g=$a(e)(g,a),g===Za)?d.onError(g.e):(d.onNext(g),void b(a+1))}var b=Object(this.parent.iterable),c=B(b),d=this.o,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursive(0,a)},a}(),fd=Math.pow(2,53)-1;w.prototype[kb]=function(){return new x(this._s)},x.prototype[kb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:lb},y.prototype[kb]=function(){return new z(this._a)},z.prototype[kb]=function(){return this},z.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:lb};var gd=Lc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!Ya(b))throw new Error("mapFn when provided must be a function");if(b)var e=pb(b,c,2);return ic(d)||(d=pc),new dd(a,e,d)},hd=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(Mc);E.prototype.run=function(){return this.parent.scheduler.scheduleRecursive(0,F(this.parent.args,this.observer))};var id=Lc.fromArray=function(a,b){return ic(b)||(b=pc),new hd(a,b)},jd=function(a){function b(b,c,d,e,f){this._state=b,this._cndFn=c,this._itrFn=d,this._resFn=e,this._s=f,this._first=!0,a.call(this)}function c(a,b){if(a._first)a._first=!1;else if(a._state=$a(a._itrFn)(a._state),a._state===Za)return a._o.onError(a._state.e);var c=$a(a._cndFn)(a._state);if(c===Za)return a._o.onError(c.e);if(c){var d=$a(a._resFn)(a._state);if(d===Za)return a._o.onError(d.e);a._o.onNext(d),b(a)}else a._o.onCompleted()}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._o=a,this._s.scheduleRecursive(this,c)},b}(Mc);Lc.generate=function(a,b,c,d,e){return ic(e)||(e=pc),new jd(a,b,c,d,e)},Lc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new hd(b,pc)},Lc.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 hd(c,a)},Lc.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new ig(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},Lc.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Object.observe is not supported on your platform");return new ig(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var kd=function(a){function b(){a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return Yb},b}(Mc),ld=new kd,md=Lc.never=function(){return ld},nd=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new H(a,this);return b.run()},b}(Mc);H.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursive(0,a)},Lc.pairs=function(a,b){return b||(b=pc),new nd(a,b)};var od=function(a){function b(b,c,d){this.start=b,this.rangeCount=c,this.scheduler=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new pd(a,this);return b.run()},b}(Mc),pd=function(){function a(a,b){this.observer=a,this.parent=b}function b(a,b,c){return function(d,e){b>d?(c.onNext(a+d),e(d+1)):c.onCompleted()}}return a.prototype.run=function(){return this.parent.scheduler.scheduleRecursive(0,b(this.parent.start,this.parent.rangeCount,this.observer))},a}();Lc.range=function(a,b,c){return ic(c)||(c=pc),new od(a,b,c)};var qd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new I(a,this);return b.run()},b}(Mc);I.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)},Lc.repeat=function(a,b,c){return ic(c)||(c=pc),new qd(a,b,c)};var rd=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b,c){this.observer=a,this.value=b,this.scheduler=c}function d(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),Yb}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this.value,this.scheduler);return b.run()},c.prototype.run=function(){var a=[this.value,this.observer];return this.scheduler===nc?d(null,a):this.scheduler.schedule(a,d)},b}(Mc),sd=(Lc["return"]=Lc.just=function(a,b){return ic(b)||(b=nc),new rd(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.o=a,this.p=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.p.scheduler.schedule([this.p.error,this.o],d)},b}(Mc)),td=Lc["throw"]=function(a,b){return ic(b)||(b=nc),new sd(a,b)},ud=function(a){function b(b,c){this._resFn=b,this._obsFn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=Yb,c=$a(this._resFn)();if(c===Za)return new cc(td(c.e).subscribe(a),b);c&&(b=c);var d=$a(this._obsFn)(c);return d===Za?new cc(td(d.e).subscribe(a),b):new cc(d.subscribe(a),b)},b}(Mc);Lc.using=function(a,b){return new ud(a,b)},Fc.amb=function(a){var b=this;return new ig(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new ac,j=new ac;Xa(a)&&(a=Yc(a));var k=Ec(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()}),l=Ec(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()});return i.setDisposable(b.subscribe(k)),j.setDisposable(a.subscribe(l)),new cc(i,j)})},Lc.amb=function(){var a,b=md();if(Array.isArray(arguments[0]))a=arguments[0];else{var c=arguments.length;a=new Array(a);for(var d=0;c>d;d++)a[d]=arguments[d]}for(var d=0,c=a.length;c>d;d++)b=
F438
J(b,a[d]);return b};var vd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new ac,c=new bc;return c.setDisposable(b),b.setDisposable(this.source.subscribe(new wd(a,c,this._fn))),c},b}(Mc),wd=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return Pb(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=$a(this._fn)(a);if(b===Za)return this._o.onError(b.e);Xa(b)&&(b=Yc(b));var c=new ac;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(Gc);Fc["catch"]=function(a){return Ya(a)?new vd(this,a):xd([this,a])};var xd=Lc["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 Uc(a).catchError()};Fc.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),Ad.apply(this,b)};var yd=function(a){function b(b,c){this._params=b,this._cb=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._params.length,c=new Array(b),d={hasValue:r(b,K),hasValueAll:!1,isDone:r(b,K),values:new Array(b)},e=0;b>e;e++){var f=this._params[e],g=new ac;c[e]=g,Xa(f)&&(f=Yc(f)),g.setDisposable(f.subscribe(new zd(a,e,this._cb,d)))}return new dc(c)},b}(Mc),zd=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 Pb(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(Sa))){var b=$a(this._cb).apply(null,this._state.values);if(b===Za)return this._o.onError(b.e);this._o.onNext(b)}else this._state.isDone.filter(c(this._i)).every(Sa)&&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(Sa)&&this._o.onCompleted()},b}(Gc),Ad=Lc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=Ya(b[a-1])?b.pop():L;return Array.isArray(b[0])&&(b=b[0]),new yd(b,d)};Fc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Cd.apply(null,a)};var Bd=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){this.sources=a,this.o=b}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new c(this.sources,a);return b.run()},c.prototype.run=function(){var a,b=new bc,c=this.sources,d=c.length,e=this.o,f=nc.scheduleRecursive(0,function(f,g){if(!a){if(f===d)return e.onCompleted();var h=c[f];Xa(h)&&(h=Yc(h));var i=new ac;b.setDisposable(i),i.setDisposable(h.subscribe(function(a){e.onNext(a)},function(a){e.onError(a)},function(){g(f+1)}))}});return new Ub(b,f,Xb(function(){a=!0}))},b}(Mc),Cd=Lc.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 Bd(a)};Fc.concatAll=function(){return this.merge(1)};var Dd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new Ub;return b.add(this.source.subscribe(new Ed(a,this.maxConcurrent,b))),b},b}(Mc),Ed=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new ac;this.g.add(c),Xa(a)&&(a=Yc(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype. a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Fc.merge=function(a){return"number"!=typeof a?Fd(this,a):new Dd(this,a)};var Fd=Lc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(ic(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=nc,b=0;d>b;b++)c.push(arguments[b]);else for(a=nc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),G(a,c).mergeAll()},Gd=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function d(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new Ub,d=new ac;return b.add(d),d.setDisposable(this.source.subscribe(new c(a,b))),b},c.prototype. b=new ac;this.g.add(b),Xa(a)&&(a=Yc(a)),b.setDisposable(a.subscribe(new d(this,b)))}},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},d.prototype. a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},d.prototype.dispose=function(){this.isStopped=!0},d.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},b}(Mc);Fc.mergeAll=function(){return new Gd(this)};var Hd=Qa.CompositeError=function(a){this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Hd.prototype=Object.create(Error.prototype),Hd.prototype.name="CompositeError";var Id=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new Ub,c=new ac,d={isStopped:!1,errors:[],o:a};return b.add(c),c.setDisposable(this.source.subscribe(new Jd(b,d))),b},b}(Mc),Jd=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 Hd(b))}function d(b,c,d){this._inner=b,this._group=c,this._state=d,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=new ac;this._group.add(b),Xa(a)&&(a=Yc(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)},Pb(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}(Gc);Lc.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=G(null,a);return new Id(d)},Fc. new Error("Second observable is required");return Md([this,a])};var Kd=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(a.pos<a.sources.length){var c=a.sources[a.pos++];Xa(c)&&(c=Yc(c));var d=new ac;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new Ld(a,b)))}else a.o.onCompleted()}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new bc,d={pos:0,subscription:b,o:a,sources:this.sources},e=nc.scheduleRecursive(d,c);return new cc(b,e)},b}(Mc),Ld=function(a){function b(b,c){this._state=b,this._recurse=c,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._state.o.onNext(a)},b.prototype.error=function(){this._recurse(this._state)},b.prototype.completed=function(){this._recurse(this._state)},b}(Gc),Md=Lc. 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 new Kd(a)},Nd=function(a){function b(b,c){this._s=b,this._o=Xa(c)?Yc(c):c,this._open=!1,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new ac;b.setDisposable(this._s.subscribe(new Od(a,this))),Xa(this._o)&&(this._o=Yc(this._o));var c=new ac;return c.setDisposable(this._o.subscribe(new Pd(a,this,c))),new cc(b,c)},b}(Mc),Od=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return Pb(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. b(b,c,d){this._o=b,this._p=c,this._r=d,a.call(this)}return Pb(b,a),b.prototype.next=function(){this._p._open=!0,this._r.dispose()},b.prototype.error=function(a){this._o.onError(a)},b.prototype. new Nd(this,a)};var Qd=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,Gc.call(this)}function d(a,b){this.parent=a,this.id=b,Gc.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new bc,d=this.source.subscribe(new c(a,b));return new cc(d,b)},Pb(c,Gc),c.prototype.next=function(a){var b=new ac,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),Xa(a)&&(a=Yc(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()},Pb(d,Gc),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.isStopped&&this.parent.o.onCompleted())},b}(Mc);Fc["switch"]=Fc.switchLatest=function(){return new Qd(this)};var Rd=function(a){function b(b,c){this.source=b,this.other=Xa(c)?Yc(c):c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return new cc(this.source.subscribe(a),this.other.subscribe(new Sd(a)))},b}(Mc),Sd=function(a){function b(b){this._o=b,a.call(this)}return Pb(b,a),b.prototype.next=function(){this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype. new Rd(this,a)};var Td=function(a){function b(b,c,d){this._s=b,this._ss=c,this._cb=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._ss.length,c={hasValue:r(b,K),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 ac;Xa(g)&&(g=Yc(g)),h.setDisposable(g.subscribe(new Ud(a,f,c))),e[f]=h}var h=new ac;return h.setDisposable(this._s.subscribe(new Vd(a,this._cb,c))),e[d]=h,new dc(e)},b}(Mc),Ud=function(a){function b(b,c,d){this._o=b,this._i=c,this._state=d,a.call(this)}return Pb(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(Sa)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=Ra,b}(Gc),Vd=function(a){function b(b,c,d){this._o=b,this._cb=c,this._state=d,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=[a].concat(this._state.values);if(this._state.hasValueAll){var c=$a(this._cb).apply(null,b);return c===Za?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}(Gc);Fc.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=Ya(b[a-1])?b.pop():L;return Array.isArray(b[0])&&(b=b[0]),new Td(this,b,d)};var Wd=function(a){function b(b,c){this._s=b,this._cb=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=this._s.length,c=new Array(b);done=r(b,K),q=r(b,M);for(var d=0;b>d;d++){var e=this._s[d],f=new ac;c[d]=f,Xa(e)&&(e=Yc(e)),f.setDisposable(e.subscribe(new Xd(a,d,this,q,done)))}return new dc(c)},b}(Mc),Xd=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 Pb(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=$a(this._p._cb).apply(null,b);if(f===Za)return this._o.onError(f.e);this._o.onNext(f)}else this._d.filter(e(this._i)).every(Sa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d[this._i]=!0,this._d.every(Sa)&&this._o.onCompleted()},b}(Gc);Fc.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=Ya(b[a-1])?b.pop():L;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new Wd(b,d)},Lc.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=Ya(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)},Fc.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=Ya(b[a-1])?b.pop():L,e=this;return b.unshift(e),new ig(function(a){for(var c=b.length,f=r(c,M),g=r(c,K),h=new Array(c),i=0;c>i;i++)!function(c){var i=b[c],j=new ac;(nb(i)||mb(i))&&(i=gd(i)),j.setDisposable(i.subscribe(function(b){if(f[c].push(b),f.every(function(a){return a.length>0})){var h=f.map(function(a){return a.shift()}),i=$a(d).apply(e,h);if(i===Za)return a.onError(i.e);a.onNext(i)}else g.filter(function(a,b){return b!==c}).every(Sa)&&a.onCompleted()},function(b){a.onError(b)},function(){g[c]=!0,g.every(Sa)&&a.onCompleted()})),h[c]=j;
}(i);return new Ub(h)},e)},Fc.asObservable=function(){return new ig(N(this),this)},Fc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).flatMap(O).filter(P)};var Yd=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Zd(a))},b}(Mc),Zd=function(a){function b(b){this._o=b,a.call(this)}return Pb(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}(Gc);Fc.dematerialize=function(){return new Yd(this)};var $d=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new _d(a,this.keyFn,this.comparer))},b}(Mc),_d=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 Pb(b,a),b.prototype.next=function(a){var b,c=a;return Ya(this.keyFn)&&(c=$a(this.keyFn)(a),c===Za)?this.o.onError(c.e):this.hasCurrentKey&&(b=$a(this.comparer)(this.currentKey,c),b===Za)?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}(Gc);Fc.distinctUntilChanged=function(a,b){return b||(b=Ua),new $d(this,a,b)};var ae=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||Ya(b._oN)?Ec(b._oN||Ra,b._oE||Ra,b._oC||Ra):b._oN,this.isStopped=!1,Gc.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},Pb(c,Gc),c.prototype.next=function(a){var b=$a(this.t.onNext).call(this.t,a);b===Za&&this.o.onError(b.e),this.o.onNext(a)},c.prototype.error=function(a){var b=$a(this.t.onError).call(this.t,a);return b===Za?this.o.onError(b.e):void this.o.onError(a)},c.prototype.completed=function(){var a=$a(this.t.onCompleted).call(this.t);return a===Za?this.o.onError(a.e):void this.o.onCompleted()},b}(Mc);Fc["do"]=Fc.tap=Fc.doAction=function(a,b,c){return new ae(this,a,b,c)},Fc.doOnNext=Fc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Fc.doOnError=Fc.tapOnError=function(a,b){return this.tap(Ra,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Fc.doOnCompleted=Fc.tapOnCompleted=function(a,b){return this.tap(Ra,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Fc["finally"]=function(a){var b=this;return new ig(function(c){var d=$a(b.subscribe).call(b,c);return d===Za?(a(),e(d.e)):Xb(function(){var b=$a(d.dispose).call(d);a(),b===Za&&e(b.e)})},this)};var be=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(Mc);Fc.ignoreElements=function(){return new be(this)};var ce=function(a){function b(b,c){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new de(a))},b}(Mc),de=function(a){function b(b){this._o=b,a.call(this)}return Pb(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}(Gc);Fc.materialize=function(){return new ce(this)},Fc.repeat=function(a){return Sc(this,a).concat()},Fc.retry=function(a){return Sc(this,a).catchError()},Fc.retryWhen=function(a){return Sc(this).catchErrorWhen(a)};var ee=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new fe(a,this))},b}(Mc),fe=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 Pb(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=$a(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?$a(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===Za?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}(Gc);Fc.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new ee(this,c,b,a)};var ge=function(a){function b(b,c){this.source=b,this._c=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new he(a,this._c))},b}(Mc),he=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return Pb(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}(Gc);Fc.skipLast=function(a){if(0>a)throw new gb;return new ge(this,a)},Fc.startWith=function(){var a,b=0;arguments.length&&ic(arguments[0])?(a=arguments[0],b=1):a=nc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Uc([id(c,a),this]).concat()};var ie=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return Pb(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}(Gc);Fc.takeLast=function(a){if(0>a)throw new gb;var b=this;return new ig(function(c){return b.subscribe(new ie(c,a))},b)};var je=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return Pb(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(){this._o.onNext(this._q),this._o.onCompleted()},b}(Gc);Fc.takeLastBuffer=function(a){if(0>a)throw new gb;var b=this;return new ig(function(c){return b.subscribe(new je(c,a))},b)},Fc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),Math.abs(a)===1/0&&(a=0),0>=a)throw new gb;if(null==b&&(b=a),+b||(b=0),Math.abs(b)===1/0&&(b=0),0>=b)throw new gb;return new ig(function(d){function e(){var a=new mg;i.push(a),d.onNext(Rb(a,g))}var f=new ac,g=new ec(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},Fc.selectConcat=Fc.concatMap=function(a,b,c){return Ya(a)&&Ya(b)?this.concatMap(function(c,d){var e=a(c,d);return Xa(e)&&(e=Yc(e)),(nb(e)||mb(e))&&(e=gd(e)),e.map(function(a,e){return b(c,a,d,e)})}):Ya(a)?Q(this,a,c):Q(this,function(){return a})},Fc.concatMapObserver=Fc.selectConcatObserver=function(a,b,c,d){var e=this,f=pb(a,d,2),g=pb(b,d,1),h=pb(c,d,0);return new ig(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Xa(d)&&(d=Yc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Xa(c)&&(c=Yc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Xa(b)&&(b=Yc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()};var ke=function(a){function b(b,c){this._o=b,this._d=c,this._f=!1,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._f=!0,this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){!this._f&&this._o.onNext(this._d),this._o.onCompleted()},b}(Gc);Fc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new ig(function(a){return c.subscribe(new ke(a,b))},c)},S.prototype.push=function(a){var b=-1===R(this.set,a,this.comparer);return b&&this.set.push(a),b};var le=function(a){function b(b,c,d){this.source=b,this._keyFn=c,this._cmpFn=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new me(a,this._keyFn,this._cmpFn))},b}(Mc),me=function(a){function b(b,c,d){this._o=b,this._keyFn=c,this._h=new S(d),a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=a;return Ya(this._keyFn)&&(b=$a(this._keyFn)(a),b===Za)?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}(Gc);Fc.distinct=function(a,b){return b||(b=Ua),new le(this,a,b)},Fc.groupBy=function(a,b){return this.groupByUntil(a,b,md)},Fc.groupByUntil=function(b,c,d){var e=this;return new ig(function(f){var g=new Cf,h=new Ub,i=new ec(h),j=function(a){return function(b){b.onError(a)}};return h.add(e.subscribe(function(e){var k=$a(b)(e);if(k===Za)return g.forEach(j(k.e)),f.onError(k.e);var l=!1,m=g.get(k);if(m===a&&(m=new mg,g.set(k,m),l=!0),l){var n=new lg(k,m,i),o=new lg(k,m),p=$a(d)(o);if(p===Za)return g.forEach(j(p.e)),f.onError(p.e);f.onNext(n);var q=new ac;h.add(q),q.setDisposable(p.take(1).subscribe(Ra,function(a){g.forEach(j(a)),f.onError(a)},function(){g["delete"](k)&&m.onCompleted(),h.remove(q)}))}var r=e;return Ya(c)&&(r=$a(c)(e),r===Za)?(g.forEach(j(r.e)),f.onError(r.e)):void m.onNext(r)},function(a){g.forEach(j(a)),f.onError(a)},function(){g.forEach(function(a){a.onCompleted()}),f.onCompleted()})),i},e)};var ne=function(a){function b(b,c,d){this.source=b,this.selector=pb(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,Gc.call(this)}return Pb(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))},Pb(d,Gc),d.prototype.next=function(a){var b=$a(this.selector)(a,this.i++,this.source);return b===Za?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}(Mc);Fc.map=Fc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof ne?this.internalMap(c,b):new ne(this,c,b)},Fc.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))},Fc.flatMap=Fc.selectMany=function(a,b,c){return new Nc(this,a,b,c).mergeAll()},Fc.flatMapObserver=Fc.selectManyObserver=function(a,b,c,d){var e=this;return new ig(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)}Xa(c)&&(c=Yc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Xa(c)&&(c=Yc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Xa(a)&&(a=Yc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},Qa.Observable.prototype.flatMapLatest=function(a,b,c){return new Nc(this,a,b,c).switchLatest()};var oe=function(a){function b(b,c){this.source=b,this.skipCount=c,a.call(this)}function c(a,b){this.c=b,this.r=b,this.o=a,this.isStopped=!1}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.skipCount))},c.prototype. this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b}(Mc);Fc.skip=function(a){if(0>a)throw new gb;return new oe(this,a)};var pe=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new qe(a,this))},b}(Mc),qe=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return Pb(b,a),b.prototype.next=function(a){if(!this._r){var b=$a(this._p._fn)(a,this._i++,this._p);if(b===Za)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}(Gc);Fc.skipWhile=function(a,b){var c=pb(a,b,3);return new pe(this,c)};var re=function(a){function b(b,c){this.source=b,this.takeCount=c,a.call(this)}function c(a,b){this.o=a,this.c=b,this.r=b,this.isStopped=!1}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.takeCount))},c.prototype={onNext:function(a){this.isStopped||this.r-->0&&(this.o.onNext(a),this.r<=0&&this.o.onCompleted())},onError:function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},onCompleted:function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},dispose:function(){this.isStopped=!0},fail:function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)}},b}(Mc);Fc.take=function(a,b){if(0>a)throw new gb;return 0===a?cd(b):new re(this,a)};var se=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new te(a,this))},b}(Mc),te=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){return this._r&&(this._r=$a(this._p._fn)(a,this._i++,this._p),this._r===Za)?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}(Gc);Fc.takeWhile=function(a,b){var c=pb(a,b,3);return new se(this,c)};var ue=function(a){function b(b,c,d){this.source=b,this.predicate=pb(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,Gc.call(this)}return Pb(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)},Pb(d,Gc),d.prototype.next=function(a){var b=$a(this.predicate)(a,this.i++,this.source);return b===Za?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}(Mc);Fc.filter=Fc.where=function(a,b){return this instanceof ue?this.internalFilter(a,b):new ue(this,a,b)};var ve=function(a){function b(b,c,d){this.source=b,this._k=c,this._c=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new we(a,this._k,this._c))},b}(Mc),we=function(a){function b(b,c,d){this._o=b,this._k=c,this._c=d,this._v=null,this._hv=!1,this._l=[],a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=$a(this._k)(a);if(b===Za)return this._o.onError(b.e);var c=0;if(this._hv){if(c=$a(this._c)(b,this._v),c===Za)return this._o.onError(c.e)}else this._hv=!0,this._v=b;c>0&&(this._v=b,this._l=[]),c>=0&&this._l.push(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._l),this._o.onCompleted()},b}(Gc),xe=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ye(a,this))},b}(Mc),ye=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 Pb(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=$a(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?$a(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===Za?this._o.onError(this._a.e):void this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv&&this._o.onNext(this._a),!this._hv&&this._hs&&this._o.onNext(this._s),!this._hv&&!this._hs&&this._o.onError(new eb),this._o.onCompleted()},b}(Gc);Fc.reduce=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new xe(this,c,b,a)};var ze=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ae(a,this._fn,this.source))},b}(Mc),Ae=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=$a(this._fn)(a,this._i++,this._s);return b===Za?this._o.onError(b.e):void(Boolean(b)&&(this._o.onNext(!0),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(Gc);Fc.some=function(a,b){var c=pb(a,b,3);return new ze(this,c)};var Be=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ce(a))},b}(Mc),Ce=function(a){function b(b){this._o=b,a.call(this)}return Pb(b,a),b.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(Gc);Fc.isEmpty=function(){return new Be(this)};var De=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ee(a,this._fn,this.source))},b}(Mc),Ee=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=$a(this._fn)(a,this._i++,this._s);return b===Za?this._o.onError(b.e):void(Boolean(b)||(this._o.onNext(!1),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(Gc);Fc.every=function(a,b){var c=pb(a,b,3);return new De(this,c)};var Fe=function(a){function b(b,c,d){var e=+d||0;Math.abs(e)===1/0&&(e=0),this.source=b,this._elem=c,this._n=e,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(!1),a.onCompleted(),Yb):this.source.subscribe(new Ge(a,this._elem,this._n))},b}(Mc),Ge=function(a){function b(b,c,d){this._o=b,this._elem=c,this._n=d,this._i=0,a.call(this)}function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}return Pb(b,a),b.prototype.next=function(a){this._i++>=this._n&&c(a,this._elem)&&(this._o.onNext(!0),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(Gc);Fc.includes=function(a,b){return new Fe(this,a,b)};var He=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ie(a,this._fn,this.source))},b}(Mc),Ie=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,this._c=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){if(this._fn){var b=$a(this._fn)(a,this._i++,this._s);if(b===Za)return this._o.onError(b.e);Boolean(b)&&this._c++}else this._c++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},b}(Gc);Fc.count=function(a,b){var c=pb(a,b,3);return new He(this,c)};var Je=function(a){function b(b,c,d){this.source=b,this._e=c,this._n=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(-1),a.onCompleted(),Yb):this.source.subscribe(new Ke(a,this._e,this._n))},b}(Mc),Ke=function(a){function b(b,c,d){this._o=b,this._e=c,this._n=d,this._i=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._i>=this._n&&a===this._e&&(this._o.onNext(this._i),this._o.onCompleted()),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(-1),this._o.onCompleted()},b}(Gc);Fc.indexOf=function(a,b){var c=+b||0;return Math.abs(c)===1/0&&(c=0),new Je(this,a,c)};var Le=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Me(a,this._fn,this.source))},b}(Mc),Me=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,this._c=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){if(this._fn){var b=$a(this._fn)(a,this._i++,this._s);if(b===Za)return this._o.onError(b.e);this._c+=b}else this._c+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},b}(Gc);Fc.sum=function(a,b){var c=pb(a,b,3);return new Le(this,c)},Fc.minBy=function(a,b){return b||(b=Va),new ve(this,a,function(a,c){return-1*b(a,c)})},Fc.min=function(a){return this.minBy(Sa,a).map(function(a){return U(a)})},Fc.maxBy=function(a,b){return b||(b=Va),new ve(this,a,b)},Fc.max=function(a){return this.maxBy(Sa,a).map(function(a){return U(a)})};var Ne=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Oe(a,this._fn,this.source))},b}(Mc),Oe=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._c=0,this._t=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){if(this._fn){var b=$a(this._fn)(a,this._c++,this._s);if(b===Za)return this._o.onError(b.e);this._t+=b}else this._c++,this._t+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){return 0===this._c?this._o.onError(new eb):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},b}(Gc);Fc.average=function(a,b){var c,d=this;return Ya(a)&&(c=pb(a,b,3)),new Ne(d,c)},Fc.sequenceEqual=function(a,b){var c=this;return b||(b=Ua),new ig(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){if(h.length>0){var c=h.shift(),e=$a(b)(c,a);if(e===Za)return d.onError(e.e);e||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(nb(a)||mb(a))&&(a=gd(a)),Xa(a)&&(a=Yc(a));var j=a.subscribe(function(a){if(g.length>0){var c=g.shift(),f=$a(b)(c,a);if(f===Za)return d.onError(f.e);f||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new cc(i,j)},c)};var Pe=function(a){function b(b,c,d){this.source=b,this._i=c,this._d=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Qe(a,this._i,this._d))},b}(Mc),Qe=function(b){function c(a,c,d){this._o=a,this._i=c,this._d=d,b.call(this)}return Pb(c,b),c.prototype.next=function(a){0===this._i--&&(this._o.onNext(a),this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._d===a?this._o.onError(new gb):(this._o.onNext(this._d),this._o.onCompleted())},c}(Gc);Fc.elementAt=function(a,b){if(0>a)throw new gb;return new Pe(this,a,b)};var Re=function(b){function c(a,c,d){this._o=a,this._obj=c,this._s=d,this._i=0,this._hv=!1,this._v=null,b.call(this)}return Pb(c,b),c.prototype.next=function(a){var b=!1;if(this._obj.predicate){var c=$a(this._obj.predicate)(a,this._i++,this._s);if(c===Za)return this._o.onError(c.e);Boolean(c)&&(b=!0)}else this._obj.predicate||(b=!0);if(b){if(this._hv)return this._o.onError(new Error("Sequence contains more than one matching element"));this._hv=!0,this._v=a}},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===a?this._o.onError(new eb):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},c}(Gc);Fc.single=function(a,b){var c={},d=this;if(c="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Ya(c.predicate)){var e=c.predicate;c.predicate=pb(e,c.thisArg,3)}return new ig(function(a){return d.subscribe(new Re(a,c,d))},d)};var Se=function(a){function b(b,c){this.source=b,this._obj=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Te(a,this._obj,this.source))},b}(Mc),Te=function(b){function c(a,c,d){this._o=a,this._obj=c,this._s=d,this._i=0,b.call(this)}return Pb(c,b),c.prototype.next=function(a){if(this._obj.predicate){var b=$a(this._obj.predicate)(a,this._i++,this._s);if(b===Za)return this._o.onError(b.e);Boolean(b)&&(this._o.onNext(a),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(a),this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._obj.defaultValue===a?this._o.onError(new eb):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},c}(Gc);Fc.first=function(){var a={};if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Ya(a.predicate)){var b=a.predicate;a.predicate=pb(b,a.thisArg,3)}return new Se(this,a)};var Ue=function(a){function b(b,c){this.source=b,this._obj=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ve(a,this._obj,this.source))},b}(Mc),Ve=function(b){function c(a,c,d){this._o=a,this._obj=c,this._s=d,this._i=0,this._hv=!1,this._v=null,b.call(this)}return Pb(c,b),c.prototype.next=function(a){var b=!1;if(this._obj.predicate){var c=$a(this._obj.predicate)(a,this._i++,this._s);if(c===Za)return this._o.onError(c.e);Boolean(c)&&(b=!0)}else this._obj.predicate||(b=!0);b&&(this._hv=!0,this._v=a)},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===a?this._o.onError(new eb):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},c}(Gc);Fc.last=function(){var a={};if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Ya(a.predicate)){var b=a.predicate;a.predicate=pb(b,a.thisArg,3)}return new Ue(this,a)};var We=function(a){function b(b,c,d,e){this._o=b,this._s=c,this._cb=d,this._y=e,this._i=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=$a(this._cb)(a,this._i,this._s);return b===Za?this._o.onError(b.e):void(b?(this._o.onNext(this._y?this._i:a),this._o.onCompleted()):this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._y&&this._o.onNext(-1),this._o.onCompleted()},b}(Gc);Fc.find=function(a,b){return V(this,a,b,!1)},Fc.findIndex=function(a,b){return V(this,a,b,!0)};var Xe=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ye(a))},b}(Mc),Ye=function(a){function b(b){this._o=b,this._s=new Pa.Set,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._s.add(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._s),this._o.onCompleted()},b}(Gc);Fc.toSet=function(){if("undefined"==typeof Pa.Set)throw new TypeError;return new Xe(this)};var Ze=function(a){function b(b,c,d){this.source=b,this._k=c,this._e=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new $e(a,this._k,this._e))},b}(Mc),$e=function(a){function b(b,c,d){this._o=b,this._k=c,this._e=d,this._m=new Pa.Map,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=$a(this._k)(a);if(b===Za)return this._o.onError(b.e);var c=a;return this._e&&(c=$a(this._e)(a),c===Za)?this._o.onError(c.e):void this._m.set(b,c)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._m),this._o.onCompleted()},b}(Gc);Fc.toMap=function(a,b){if("undefined"==typeof Pa.Map)throw new TypeError;return new Ze(this,a,b)};var _e=function(a){function b(b,c,d){this.source=b,this._b=c,this._e=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new af(a,this._b,this._e))},b}(Mc),af=function(a){function b(b,c,d){this._o=b,this._b=c,this._e=d,this._i=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._i>=this._b&&(this._e===this._i?this._o.onCompleted():this._o.onNext(a)),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(Gc);Fc.slice=function(a,b){var c=a||0;if(0>c)throw new Qa.ArgumentOutOfRangeError;if("number"==typeof b&&c>b)throw new Qa.ArgumentOutOfRangeError;return new _e(this,c,b)};var bf=function(a){function b(b,c,d){this.source=b,this._e=c,this._n=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(-1),a.onCompleted(),Yb):this.source.subscribe(new cf(a,this._e,this._n))},b}(Mc),cf=function(a){function b(b,c,d){this._o=b,this._e=c,this._n=d,this._v=0,this._hv=!1,this._i=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._i>=this._n&&a===this._e&&(this._hv=!0,this._v=this._i),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?this._o.onNext(this._v):this._o.onNext(-1),this._o.onCompleted()},b}(Gc);Fc.lastIndexOf=function(a,b){var c=+b||0;return Math.abs(c)===1/0&&(c=0),new bf(this,a,c)},Lc.wrap=function(a){function b(){return Lc.spawn.call(this,a.apply(this,arguments))}return b.__generatorFunction__=a,b};var df=Lc.spawn=function(){for(var a=arguments[0],b=this,c=[],d=1,e=arguments.length;e>d;d++)c.push(arguments[d]);return new ig(function(d){function e(b){var c=$a(a.next).call(a,b);return c===Za?d.onError(c.e):void g(c)}function f(b){var c=$a(a.next).call(a,b);return c===Za?d.onError(c.e):void g(c)}function g(a){if(a.done)return d.onNext(a.value),void d.onCompleted();var c=W.call(b,a.value),g=null,i=!1;Lc.isObservable(c)?h.add(c.subscribe(function(a){i=!0,g=a},f,function(){i&&e(g)})):f(new TypeError("type not supported"))}var h=new Ub;return Ya(a)&&(a=a.apply(b,c)),a&&Ya(a.next)?(e(),h):(d.onNext(a),d.onCompleted())})};Lc.start=function(a,b,c){return ef(a,b,c)()};var ef=Lc.toAsync=function(a,b,c){return ic(c)||(c=uc),function(){var d=arguments,e=new ng;return c.schedule(null,function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};Lc.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 ba(a,b,c,e)}},Lc.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 da(a,b,c,e)}},ga.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},Qa.config.useNativeEvents=!1;var ff=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 Ya(b)&&(c=$a(b).apply(null,arguments),c===Za)?a.onError(c.e):void a.onNext(c)}}return Pb(b,a),b.prototype.subscribeCore=function(a){
return ha(this._el,this._n,c(a,this._fn))},b}(Mc);Lc.fromEvent=function(a,b,c){return a.addListener?hf(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):Qa.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new ff(a,b,c).publish().refCount():hf(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var gf=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 Ya(b)&&(c=$a(b).apply(null,arguments),c===Za)?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 Pb(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||Ya(this._del)&&this._del(this._fn,this._ret)},b}(Mc),hf=Lc.fromEventPattern=function(a,b,c){return new gf(a,b,c).publish().refCount()};Lc.startAsync=function(a){var b=$a(a)();return b===Za?td(b.e):Yc(b)};var jf=function(a){function b(b,c){this.source=b,this.controller=new mg,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,a.call(this)}return Pb(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 dc([c,d,e])},b.prototype.pause=function(){this.controller.onNext(!1)},b.prototype.resume=function(){this.controller.onNext(!0)},b}(Lc);Fc.pausable=function(a){return new jf(this,a)};var kf=function(b){function c(a,c){this.source=a,this.controller=new mg,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,b.call(this)}return Pb(c,b),c.prototype._subscribe=function(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=ia(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}(Lc);Fc.pausableBuffered=function(a){return new kf(this,a)};var lf=function(a){function b(b,c,d){a.call(this),this.subject=new mf(c,d),this.source=b.multicast(this.subject).refCount()}return Pb(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}(Lc),mf=function(a){function b(b,c){null==b&&(b=!0),a.call(this),this.subject=new mg,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||pc}return Pb(b,a),Qb(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(wc.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(wc.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(wc.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}(Lc);Fc.controlled=function(a,b){return a&&ic(a)&&(b=a,a=!0),null==a&&(a=!0),new lf(this,a,b)};var nf=function(a){function b(b){a.call(this),this.source=b}function c(a,b){b.source.request(1)}Pb(b,a),b.prototype._subscribe=function(a){return this.subscription=this.source.subscribe(new d(a,this,this.subscription)),new cc(this.subscription,uc.schedule(this,c))};var d=function(a){function c(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d,this.scheduleDisposable=null}function d(a,b){b.observable.source.request(1)}return Pb(c,a),c.prototype.completed=function(){this.observer.onCompleted(),this.dispose()},c.prototype.error=function(a){this.observer.onError(a),this.dispose()},c.prototype.next=function(a){this.observer.onNext(a),this.scheduleDisposable=uc.schedule(this,d)},b.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),this.scheduleDisposable&&(this.scheduleDisposable.dispose(),this.scheduleDisposable=null),a.prototype.dispose.call(this)},c}(Gc);return b}(Lc);lf.prototype.stopAndWait=function(){return new nf(this)};var of=function(a){function b(b,c){a.call(this),this.source=b,this.windowSize=c}function c(a,b){b.source.request(b.windowSize)}Pb(b,a),b.prototype._subscribe=function(a){return this.subscription=this.source.subscribe(new d(a,this,this.subscription)),new cc(this.subscription,uc.schedule(this,c))};var d=function(a){function b(b,c,d){this.observer=b,this.observable=c,this.cancel=d,this.received=0,this.scheduleDisposable=null,a.call(this)}function c(a,b){b.observable.source.request(b.observable.windowSize)}return Pb(b,a),b.prototype.completed=function(){this.observer.onCompleted(),this.dispose()},b.prototype.error=function(a){this.observer.onError(a),this.dispose()},b.prototype.next=function(a){this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received&&(this.scheduleDisposable=uc.schedule(this,c))},b.prototype.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),this.scheduleDisposable&&(this.scheduleDisposable.dispose(),this.scheduleDisposable=null),a.prototype.dispose.call(this)},b}(Gc);return b}(Lc);lf.prototype.windowed=function(a){return new of(this,a)},Fc.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 pf=function(a){function b(b,c,d){this.source=b,this._fn1=c,this._fn2=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.multicast(this._fn1());return new cc(this._fn2(b).subscribe(a),b.connect())},b}(Mc);Fc.multicast=function(a,b){return Ya(a)?new pf(this,a,b):new sf(this,a)},Fc.publish=function(a){return a&&Ya(a)?this.multicast(function(){return new mg},a):this.multicast(new mg)},Fc.share=function(){return this.publish().refCount()},Fc.publishLast=function(a){return a&&Ya(a)?this.multicast(function(){return new ng},a):this.multicast(new ng)},Fc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new og(b)},a):this.multicast(new og(a))},Fc.shareValue=function(a){return this.publishValue(a).refCount()},Fc.replay=function(a,b,c,d){return a&&Ya(a)?this.multicast(function(){return new pg(b,c,d)},a):this.multicast(new pg(b,c,d))},Fc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var qf=function(a,b){this._s=a,this._o=b};qf.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 rf=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 Pb(b,a),b.prototype.subscribeCore=function(a){var b=1===++this._count,d=this.source.subscribe(a);return b&&(this._connectableSubscription=this.source.connect()),new c(this,d)},c.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.dispose(),0===--this._p._count&&this._p._connectableSubscription.dispose())},b}(Mc),sf=Qa.ConnectableObservable=function(a){function b(b,c){this.source=b,this._hasSubscription=!1,this._subscription=null,this._sourceObservable=b.asObservable(),this._subject=c,a.call(this)}function c(a){this._p=a,this.isDisposed=!1}return Pb(b,a),c.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._p._hasSubscription=!1)},b.prototype.connect=function(){return this._hasSubscription||(this._hasSubscription=!0,this._subscription=new cc(this._sourceObservable.subscribe(this._subject),new c(this))),this._subscription},b.prototype._subscribe=function(a){return this._subject.subscribe(a)},b.prototype.refCount=function(){return new rf(this)},b}(Lc);Fc.singleInstance=function(){function a(){return d||(d=!0,b=c["finally"](function(){d=!1}).publish().refCount()),b}var b,c=this,d=!1;return new ig(function(b){return a().subscribe(b)})},Fc.join=function(a,b,c,d){var e=this;return new ig(function(f){var g=new Ub,h=!1,i=!1,j=0,k=0,l=new Cf,m=new Cf,n=function(a){f.onError(a)};return g.add(e.subscribe(function(a){var c=j++,e=new ac;l.set(c,a),g.add(e);var i=$a(b)(a);return i===Za?f.onError(i.e):(e.setDisposable(i.take(1).subscribe(Ra,n,function(){l["delete"](c)&&0===l.size&&h&&f.onCompleted(),g.remove(e)})),void m.forEach(function(b){var c=$a(d)(a,b);return c===Za?f.onError(c.e):void f.onNext(c)}))},n,function(){h=!0,(i||0===l.size)&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new ac;m.set(b,a),g.add(e);var h=$a(c)(a);return h===Za?f.onError(h.e):(e.setDisposable(h.take(1).subscribe(Ra,n,function(){m["delete"](b)&&0===m.size&&i&&f.onCompleted(),g.remove(e)})),void l.forEach(function(b){var c=$a(d)(b,a);return c===Za?f.onError(c.e):void f.onNext(c)}))},n,function(){i=!0,(h||0===m.size)&&f.onCompleted()})),g},e)},Fc.groupJoin=function(a,b,c,d){var e=this;return new ig(function(f){function g(a){}var h=new Ub,i=new ec(h),j=new Cf,k=new Cf,l=0,m=0,g=function(a){return function(b){b.onError(a)}};return h.add(e.subscribe(function(a){var c=new mg,e=l++;j.set(e,c);var m=$a(d)(a,Rb(c,i));if(m===Za)return j.forEach(g(m.e)),f.onError(m.e);f.onNext(m),k.forEach(function(a){c.onNext(a)});var n=new ac;h.add(n);var o=$a(b)(a);return o===Za?(j.forEach(g(o.e)),f.onError(o.e)):void n.setDisposable(o.take(1).subscribe(Ra,function(a){j.forEach(g(a)),f.onError(a)},function(){j["delete"](e)&&c.onCompleted(),h.remove(n)}))},function(a){j.forEach(g(a)),f.onError(a)},function(){f.onCompleted()})),h.add(a.subscribe(function(a){var b=m++;k.set(b,a);var d=new ac;h.add(d);var e=$a(c)(a);return e===Za?(j.forEach(g(e.e)),f.onError(e.e)):(d.setDisposable(e.take(1).subscribe(Ra,function(a){j.forEach(g(a)),f.onError(a)},function(){k["delete"](b),h.remove(d)})),void j.forEach(function(b){b.onNext(a)}))},function(a){j.forEach(g(a)),f.onError(a)})),i},e)},Fc.buffer=function(){return this.window.apply(this,arguments).flatMap(O)},Fc.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?ka.call(this,a):"function"==typeof a?la.call(this,a):ja.call(this,a,b)};var tf=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new uf(a))},b}(Mc),uf=function(a){function b(a){this._o=a,this._p=null,this._hp=!1}return Pb(b,a),b.prototype.next=function(a){this._hp?this._o.onNext([this._p,a]):this._hp=!0,this._p=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(Gc);Fc.pairwise=function(){return new tf(this)},Fc.partition=function(a,b){var c=pb(a,b,3);return[this.filter(a,b),this.filter(function(a,b,d){return!c(a,b,d)})]};var vf=function(a){function b(a,b){this.c=a,this.s=b}return Pb(b,a),b.prototype[kb]=function(){var a=this;return{next:function(){return a.c()?{done:!1,value:a.s}:{done:!0,value:void 0}}}},b}(Oc);Fc.letBind=Fc.let=function(a){return a(this)},Lc["if"]=function(a,b,c){return _c(function(){return c||(c=cd()),Xa(b)&&(b=Yc(b)),Xa(c)&&(c=Yc(c)),"function"==typeof c.now&&(c=cd(c)),a()?b:c})},Lc["for"]=Lc.forIn=function(a,b,c){return Uc(a,b,c).concat()};var wf=Lc["while"]=Lc.whileDo=function(a,b){return Xa(b)&&(b=Yc(b)),ma(a,b).concat()};Fc.doWhile=function(a){return Cd([this,wf(a,this)])},Lc["case"]=function(a,b,c){return _c(function(){Xa(c)&&(c=Yc(c)),c||(c=cd()),ic(c)&&(c=cd(c));var d=b[a()];return Xa(d)&&(d=Yc(d)),d||c})};var xf=function(a){functio
1798
n b(b,c,d){this.source=b,this._fn=c,this._scheduler=d,a.call(this)}function c(a,b){var c,d=a[0],e=a[1];if(!(d.q.length>0))return void(d.isAcquired=!1);c=d.q.shift();var f=new ac;d.d.add(f),f.setDisposable(c.subscribe(new yf(d,e,f))),b([d,e])}return Pb(b,a),b.prototype._ensureActive=function(a){var b=!1;a.q.length>0&&(b=!a.isAcquired,a.isAcquired=!0),b&&a.m.setDisposable(this._scheduler.scheduleRecursive([a,this],c))},b.prototype.subscribeCore=function(a){var b=new bc,c=new Ub(b),d={q:[],m:b,d:c,activeCount:0,isAcquired:!1,o:a};return d.q.push(this.source),d.activeCount++,this._ensureActive(d),c},b}(Mc),yf=function(a){function b(b,c,d){this._s=b,this._p=c,this._m1=d,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._s.o.onNext(a);var b=$a(this._p._fn)(a);return b===Za?this._s.o.onError(b.e):(this._s.q.push(b),this._s.activeCount++,void this._p._ensureActive(this._s))},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.d.remove(this._m1),this._s.activeCount--,0===this._s.activeCount&&this._s.o.onCompleted()},b}(Gc);Fc.expand=function(a,b){return ic(b)||(b=pc),new xf(this,a,b)};var zf=function(a){function b(b,c){this._sources=b,this._cb=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){if(0===this._sources.length)return a.onCompleted(),Yb;for(var b=this._sources.length,c={finished:!1,hasResults:new Array(b),hasCompleted:new Array(b),results:new Array(b)},d=new Ub,e=0,f=this._sources.length;f>e;e++){var g=this._sources[e];Xa(g)&&(g=Yc(g)),d.add(g.subscribe(new Af(a,c,e,this._cb,d)))}return d},b}(Mc),Af=function(a){function b(b,c,d,e,f){this._o=b,this._s=c,this._i=d,this._cb=e,this._subs=f,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._s.finished||(this._s.hasResults[this._i]=!0,this._s.results[this._i]=a)},b.prototype.error=function(a){this._s.finished=!0,this._o.onError(a),this._subs.dispose()},b.prototype.completed=function(){if(!this._s.finished){if(!this._s.hasResults[this._i])return this._o.onCompleted();this._s.hasCompleted[this._i]=!0;for(var a=0;a<this._s.results.length;a++)if(!this._s.hasCompleted[a])return;this._s.finished=!0;var b=$a(this._cb).apply(null,this._s.results);if(b===Za)return this._o.onError(b.e);this._o.onNext(b),this._o.onCompleted()}},b}(Gc);Lc.forkJoin=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=Ya(b[a-1])?b.pop():L;return Array.isArray(b[0])&&(b=b[0]),new zf(b,d)},Fc.forkJoin=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),Lc.forkJoin.apply(null,b)},Fc.manySelect=Fc.extend=function(a,b){ic(b)||(b=Qa.Scheduler.immediate);var c=this;return _c(function(){var d;return c.map(function(a){var b=new Bf(a);return d&&d.onNext(a),d=b,b}).tap(Ra,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Bf=function(a){function b(b){a.call(this),this.head=b,this.tail=new ng}return Pb(b,a),Qb(b.prototype,Dc,{_subscribe:function(a){var b=new Ub;return b.add(pc.schedule(this,function(c,d){a.onNext(d.head),b.add(d.tail.mergeAll().subscribe(a))})),b},onCompleted:function(){this.onNext(Lc.empty())},onError:function(a){this.onNext(Lc["throw"](a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),b}(Lc),Cf=Pa.Map||function(){function b(){this.size=0,this._values=[],this._keys=[]}return b.prototype["delete"]=function(a){var b=this._keys.indexOf(a);return-1===b?!1:(this._values.splice(b,1),this._keys.splice(b,1),this.size--,!0)},b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1===c?a:this._values[c]},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);return-1===c?(this._keys.push(a),this._values.push(b),this.size++):this._values[c]=b,this},b.prototype.forEach=function(a,b){for(var c=0;c<this.size;c++)a.call(b,this._values[c],this._keys[c])},b}();na.prototype.and=function(a){return new na(this.patterns.concat(a))},na.prototype.thenDo=function(a){return new oa(this,a)},oa.prototype.activate=function(a,b,c){for(var d=[],e=pa(b),f=0,g=this.expression.patterns.length;g>f;f++)d.push(ra(a,this.expression.patterns[f],e));var h=new sa(d,qa(this,b),function(){for(var a=0,b=d.length;b>a;a++)d[a].removeActivePlan(h);c(h)});for(f=0,g=d.length;g>f;f++)d[f].addActivePlan(h);return h},sa.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},sa.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;a<d.length;a++)f.push(d[a].value);this.onNext.apply(this,f)}}};var Df=function(a){function b(b,c){a.call(this),this.source=b,this. ac,this.isDisposed=!1}Pb(b,a);var c=b.prototype;return c.next=function(a){if(!this.isDisposed){if("E"===a.kind)return this.onError(a.error);this.queue.push(a);for(var b=this.activePlans.slice(0),c=0,d=b.length;d>c;c++)b[c].match()}},c.error=Ra,c.completed=Ra,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(Gc);Fc.and=function(a){return new na([this,a])},Fc.thenDo=function(a){return new na([this]).thenDo(a)},Lc.when=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];els
9D5E
e{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new ig(function(b){var c=[],d=new Cf,e=Ec(function(a){b.onNext(a)},function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},function(a){b.onCompleted()});try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){td(h).subscribe(b)}var i=new Ub;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var Ef=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 Pb(b,a),b.prototype.subscribeCore=function(a){return this._s.scheduleFuture(a,this._dt,c)},b}(Mc),Ff=Lc.interval=function(a,b){return va(a,a,ic(b)?b:uc)};Lc.timer=function(b,c,d){var e;return ic(d)||(d=uc),null!=c&&"number"==typeof c?e=c:ic(c)&&(d=c),(b instanceof Date||"number"==typeof b)&&e===a?ta(b,d):b instanceof Date&&e!==a?ua(b.getTime(),c,d):va(b,e,d)};Fc.delay=function(){var a=arguments[0];if("number"==typeof a||a instanceof Date){var b=a,c=arguments[1];return ic(c)||(c=uc),b instanceof Date?xa(this,b,c):wa(this,b,c)}if(Lc.isObservable(a)||Ya(a))return ya(this,a,arguments[1]);throw new Error("Invalid arguments")};var Gf=function(a){function b(b,c,d){ic(d)||(d=uc),this.source=b,this._dt=c,this._s=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new bc;return new cc(this.source.subscribe(new Hf(a,this.source,this._dt,this._s,b)),b)},b}(Mc),Hf=function(a){function b(b,c,d,e,f){this._o=b,this._s=c,this._d=d,this._scheduler=e,this._c=f,this._v=null,this._hv=!1,this._id=0,a.call(this)}return Pb(b,a),b.prototype.next=function(a){this._hv=!0,this._v=a;var b=++this._id,c=new ac;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}(Gc);Fc.debounce=function(){if(Ya(arguments[0]))return za(this,arguments[0]);if("number"==typeof arguments[0])return new Gf(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")},Fc.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),ic(c)||(c=uc),"number"==typeof b?d=b:ic(b)&&(d=a,c=b),new ig(function(b){function f(){var a=new ac,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleFuture(null,o,function(){if(g){var a=new mg;k.push(a),b.onNext(Rb(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new bc,m=0;return g=new Ub(l),h=new ec(g),k.push(new mg),b.onNext(Rb(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},Fc.windowWithTimeOrCount=function(a,b,c){var d=this;return ic(c)||(c=uc),new ig(function(e){function f(b){var d=new ac;g.setDisposable(d),d.setDisposable(c.scheduleFuture(null,a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new mg,e.onNext(Rb(l,i)),f(a)}}))}var g=new bc,h=new Ub(g),i=new ec(h),j=0,k=0,l=new mg;return e.onNext(Rb(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new mg,e.onNext(Rb(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},Fc.bufferWithTime=function(a,b,c){return this.windowWithTime(a,b,c).flatMap(O)},Fc.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).flatMap(O)};var If=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Jf(a,this._s))},b}(Mc),Jf=function(a){function b(b,c){this._o=b,this._s=c,this._l=c.now(),a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=this._s.now(),c=b-this._l;this._l=b,this._o.onNext({value:a,interval:c})},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(Gc);Fc.timeInterval=function(a){return ic(a)||(a=uc),new If(this,a)};var Kf=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Lf(a,this._s))},b}(Mc),Lf=function(a){function b(b,c){this._o=b,this._s=c,a.call(this)}return Pb(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}(Gc);Fc.timestamp=function(a){return ic(a)||(a=uc),new Kf(this,a)},Fc.sample=Fc.throttleLatest=function(a,b){return ic(b)||(b=uc),"number"==typeof a?Aa(this,Ff(a,b)):Aa(this,a)};var Mf=Qa.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};Mf.prototype=Object.create(Error.prototype),Fc.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return Ca(this,a,arguments[1],arguments[2]);if(Lc.isObservable(a)||Ya(a))return Ba(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")};var Nf=function(a){function b(b,c,d,e,f,g){this._state=b,this._cndFn=c,this._itrFn=d,this._resFn=e,this._timeFn=f,this._s=g,this._first=!0,this._hasResult=!1,a.call(this)}function c(a,b){if(a._hasResult&&a._o.onNext(a._state),a._first)a._first=!1;else if(a._state=$a(a._itrFn)(a._state),a._state===Za)return a._o.onError(a._state.e);if(a._hasResult=$a(a._cndFn)(a._state),a._hasResult===Za)return a._o.onError(a._hasResult.e);if(a._hasResult){var c=$a(a._resFn)(a._state);if(c===Za)return a._o.onError(c.e);var d=$a(a._timeFn)(a._state);if(d===Za)return a._o.onError(d.e);b(a,d)}else a._o.onCompleted()}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._o=a,this._s.scheduleRecursiveFuture(this,new Date(this._s.now()),c)},b}(Mc);Lc.generateWithAbsoluteTime=function(a,b,c,d,e,f){return ic(f)||(f=uc),new Nf(a,b,c,d,e,f)};var Of=function(a){function b(b,c,d,e,f,g){this._state=b,this._cndFn=c,this._itrFn=d,this._resFn=e,this._timeFn=f,this._s=g,this._first=!0,this._hasResult=!1,a.call(this)}function c(a,b){if(a._hasResult&&a._o.onNext(a._state),a._first)a._first=!1;else if(a._state=$a(a._itrFn)(a._state),a._state===Za)return a._o.onError(a._state.e);if(a._hasResult=$a(a._cndFn)(a._state),a._hasResult===Za)return a._o.onError(a._hasResult.e);if(a._hasResult){var c=$a(a._resFn)(a._state);if(c===Za)return a._o.onError(c.e);var d=$a(a._timeFn)(a._state);if(d===Za)return a._o.onError(d.e);b(a,d)}else a._o.onCompleted()}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._o=a,this._s.scheduleRecursiveFuture(this,0,c)},b}(Mc);Lc.generateWithRelativeTime=function(a,b,c,d,e,f){return ic(f)||(f=uc),new Of(a,b,c,d,e,f)};var Pf=function(a){function b(b,c,d){this.source=b,this._dt=c,this._s=d,a.call(this)}function c(a,b){var c=b[0],d=b[1],e=b[2];e.setDisposable(c.subscribe(d))}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new bc;return b.setDisposable(this._s.scheduleFuture([this.source,a,b],this._dt,c)),b},b}(Mc);Fc.delaySubscription=function(a,b){return ic(b)||(b=uc),new Pf(this,a,b)};var Qf=function(a){function b(b,c,d){this.source=b,this._d=c,this._s=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Rf(a,this))},b}(Mc),Rf=function(a){function b(b,c){this._o=b,this._s=c._s,this._d=c._d,this._q=[],a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=this._s.now();for(this._q.push({interval:b,value:a});this._q.length>0&&b-this._q[0].interval>=this._d;)this._o.onNext(this._q.shift().value)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){for(var a=this._s.now();this._q.length>0&&a-this._q[0].interval>=this._d;)this._o.onNext(this._q.shift().value);this._o.onCompleted()},b}(Gc);Fc.skipLastWithTime=function(a,b){return ic(b)||(b=uc),new Qf(this,a,b)};var Sf=function(a){function b(b,c,d){this.source=b,this._d=c,this._s=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Tf(a,this._d,this._s))},b}(Mc),Tf=function(a){function b(b,c,d){this._o=b,this._d=c,this._s=d,this._q=[],a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=this._s.now();for(this._q.push({interval:b,value:a});this._q.length>0&&b-this._q[0].interval>=this._d;)this._q.shift()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){for(var a=this._s.now();this._q.length>0;){var b=this._q.shift();a-b.interval<=this._d&&this._o.onNext(b.value)}this._o.onCompleted()},b}(Gc);Fc.takeLastWithTime=function(a,b){return ic(b)||(b=uc),new Sf(this,a,b)},Fc.takeLastBufferWithTime=function(a,b){var c=this;return ic(b)||(b=uc),new ig(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)};var Uf=function(a){function b(b,c,d){this.source=b,this._d=c,this._s=d,a.call(this)}function c(a,b){b.onCompleted()}return Pb(b,a),b.prototype.subscribeCore=function(a){return new cc(this._s.scheduleFuture(a,this._d,c),this.source.subscribe(a))},b}(Mc);Fc.takeWithTime=function(a,b){return ic(b)||(b=uc),new Uf(this,a,b)};var Vf=function(a){function b(b,c,d){this.source=b,this._d=c,this._s=d,this._open=!1,a.call(this)}function c(a,b){b._open=!0}return Pb(b,a),b.prototype.subscribeCore=function(a){return new cc(this._s.scheduleFuture(this,this._d,c),this.source.subscribe(new Wf(a,this)))},b}(Mc),Wf=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return Pb(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.completed=function(){this._o.onCompleted()},b}(Gc);Fc.skipWithTime=function(a,b){return ic(b)||(b=uc),new Vf(this,a,b)};var Xf=function(a){function b(b,c,d){this.source=b,this._st=c,this._s=d,a.call(this)}function c(a,b){b._open=!0}return Pb(b,a),b.prototype.subscribeCore=function(a){return this._open=!1,new cc(this._s.scheduleFuture(this,this._st,c),this.source.subscribe(new Yf(a,this)))},b}(Mc),Yf=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return Pb(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.completed=function(){this._o.onCompleted()},b}(Gc);Fc.skipUntilWithTime=function(a,b){return ic(b)||(b=uc),new Xf(this,a,b)},Fc.takeUntilWithTime=function(a,b){ic(b)||(b=uc);var c=this;return new ig(function(d){return new cc(b.scheduleFuture(d,a,function(a,b){b.onCompleted()}),c.subscribe(d))},c)},Fc.throttle=function(a,b){ic(b)||(b=uc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new ig(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 Zf=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return Pb(b,a),b.prototype.next=function(a){var b=$a(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===Za&&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}(Gc);Fc.transduce=function(a){var b=this;return new ig(function(c){var d=a(Da(c));return b.subscribe(new Zf(c,d))},b)};var $f=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new ac,c=new Ub,d={hasCurrent:!1,isStopped:!1,o:a,g:c};return c.add(b),b.setDisposable(this.source.subscribe(new _f(d))),c},b}(Mc),_f=function(a){function b(b){this._s=b,a.call(this)}function c(b,c){this._s=b,this._i=c,a.call(this)}return Pb(b,a),b.prototype.next=function(a){if(!this._s.hasCurrent){this._s.hasCurrent=!0,Xa(a)&&(a=Yc(a));var b=new ac;this._s.g.add(b),b.setDisposable(a.subscribe(new c(this._s,b)))}},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.isStopped=!0,!this._s.hasCurrent&&1===this._s.g.length&&this._s.o.onCompleted()},Pb(c,a),c.prototype.next=function(a){this._s.o.onNext(a)},c.prototype.error=function(a){this._s.o.onError(a)},c.prototype.completed=function(){this._s.g.remove(this._i),this._s.hasCurrent=!1,this._s.isStopped&&1===this._s.g.length&&this._s.o.onCompleted()},b}(Gc);Fc.switchFirst=function(){return new $f(this)},Fc.flatMapFirst=Fc.selectManyFirst=function(a,b,c){return new Nc(this,a,b,c).switchFirst()},Qa.Observable.prototype.flatMapWithMaxConcurrent=function(a,b,c,d){return new Nc(this,b,c,d).merge(a)};var ag=Qa.VirtualTimeScheduler=function(a){function b(b,c){this.clock=b,this.comparer=c,this.isEnabled=!1,this.queue=new Sb(1024),a.call(this)}Pb(b,a);var c=b.prototype;return c.now=function(){return this.toAbsoluteTime(this.clock)},c.schedule=function(a,b){return this.scheduleAbsolute(a,this.clock,b)},c.scheduleFuture=function(a,b,c){var d=b instanceof Date?this.toRelativeTime(b-this.now()):this.toRelativeTime(b);
return this.scheduleRelative(a,d,c)},c.add=jb,c.toAbsoluteTime=jb,c.toRelativeTime=jb,c.schedulePeriodic=function(a,b,c){var d=new lc(this,a,b,c);return d.start()},c.scheduleRelative=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsolute(a,d,c)},c.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},c.stop=function(){this.isEnabled=!1},c.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new gb;if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},c.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new gb;0!==c&&this.advanceTo(b)},c.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new gb;this.clock=b},c.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},c.scheduleAbsolute=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new fc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},b}(gc);Qa.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Va;a.call(this,d,e)}Pb(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toAbsoluteTime=function(a){return new Date(a).getTime()},c.toRelativeTime=function(a){return a},b}(Qa.VirtualTimeScheduler),Ea.prototype.equals=function(a){return a===this?!0:null==a?!1:"N"!==a.kind?!1:this.predicate(a.value)},Fa.prototype.equals=function(a){return a===this?!0:null==a?!1:"E"!==a.kind?!1:this.predicate(a.error)};var bg=Qa.ReactiveTest={created:100,subscribed:200,disposed:1e3,onNext:function(a,b){return"function"==typeof b?new cg(a,new Ea(b)):new cg(a,wc.createOnNext(b))},onError:function(a,b){return"function"==typeof b?new cg(a,new Fa(b)):new cg(a,wc.createOnError(b))},onCompleted:function(a){return new cg(a,wc.createOnCompleted())},subscribe:function(a,b){return new dg(a,b)}},cg=Qa.Recorded=function(a,b,c){this.time=a,this.value=b,this.comparer=c||Ua};cg.prototype.equals=function(a){return this.time===a.time&&this.comparer(this.value,a.value)},cg.prototype.toString=function(){return this.value.toString()+"@"+this.time};var dg=Qa.Subscription=function(a,b){this.subscribe=a,this.unsubscribe=b||Number.MAX_VALUE};dg.prototype.equals=function(a){return this.subscribe===a.subscribe&&this.unsubscribe===a.unsubscribe},dg.prototype.toString=function(){return"("+this.subscribe+", "+(this.unsubscribe===Number.MAX_VALUE?"Infinite":this.unsubscribe)+")"};var eg=Qa.MockDisposable=function(a){this.scheduler=a,this.disposes=[],this.disposes.push(this.scheduler.clock)};eg.prototype.dispose=function(){this.disposes.push(this.scheduler.clock)};var fg=function(a){function b(b){a.call(this),this.scheduler=b,this.messages=[]}Pb(b,a);var c=b.prototype;return c. cg(this.scheduler.clock,wc.createOnNext(a)))},c. cg(this.scheduler.clock,wc.createOnError(a)))},c. cg(this.scheduler.clock,wc.createOnCompleted()))},b}(Dc);Ga.prototype.then=function(b,c){var d=this;this.subscriptions.push(new dg(this.scheduler.clock));var e,f=this.subscriptions.length-1,g=Qa.Observer.create(function(c){var h=b(c);if(h&&"function"==typeof h.then)e=h;else{var i=d.scheduler.clock;e=new Ga(d.scheduler,[Qa.ReactiveTest.onNext(i,a),Qa.ReactiveTest.onCompleted(i)])}var j=d.observers.indexOf(g);d.observers.splice(j,1),d.subscriptions[f]=new dg(d.subscriptions[f].subscribe,d.scheduler.clock)},function(a){c(a);var b=d.observers.indexOf(g);d.observers.splice(b,1),d.subscriptions[f]=new dg(d.subscriptions[f].subscribe,d.scheduler.clock)});return this.observers.push(g),e||new Ga(this.scheduler,this.messages)};var gg=function(a){function b(b,c){a.call(this);var d,e,f=this;this.scheduler=b,this.messages=c,this.subscriptions=[],this.observers=[];for(var g=0,h=this.messages.length;h>g;g++)d=this.messages[g],e=d.value,function(a){b.scheduleAbsolute(null,d.time,function(){for(var b=f.observers.slice(0),c=0,d=b.length;d>c;c++)a.accept(b[c]);return Yb})}(e)}return Pb(b,a),b.prototype._subscribe=function(a){var b=this;this.observers.push(a),this.subscriptions.push(new dg(this.scheduler.clock));var c=this.subscriptions.length-1;return Xb(function(){var d=b.observers.indexOf(a);b.observers.splice(d,1),b.subscriptions[c]=new dg(b.subscriptions[c].subscribe,b.scheduler.clock)})},b}(Lc),hg=function(a){function b(b,c){a.call(this),this.scheduler=b,this.messages=c,this.subscriptions=[]}return Pb(b,a),b.prototype._subscribe=function(a){var b,c,d=this;this.subscriptions.push(new dg(this.scheduler.clock));for(var e=this.subscriptions.length-1,f=new Ub,g=0,h=this.messages.length;h>g;g++)b=this.messages[g],c=b.value,function(c){f.add(d.scheduler.scheduleRelative(null,b.time,function(){return c.accept(a),Yb}))}(c);return Xb(function(){d.subscriptions[e]=new dg(d.subscriptions[e].subscribe,d.scheduler.clock),f.dispose()})},b}(Lc);Qa.TestScheduler=function(a){function b(a,b){return a>b?1:b>a?-1:0}function c(){a.call(this,0,b)}return Pb(c,a),c.prototype.scheduleAbsolute=function(b,c,d){return c<=this.clock&&(c=this.clock+1),a.prototype.scheduleAbsolute.call(this,b,c,d)},c.prototype.add=function(a,b){return a+b},c.prototype.toAbsoluteTime=function(a){return new Date(a).getTime()},c.prototype.toRelativeTime=function(a){return a},c.prototype.startScheduler=function(a,b){b||(b={}),null==b.created&&(b.created=bg.created),null==b.subscribed&&(b.subscribed=bg.subscribed),null==b.disposed&&(b.disposed=bg.disposed);var c,d,e=this.createObserver();return this.scheduleAbsolute(null,b.created,function(){return c=a(),Yb}),this.scheduleAbsolute(null,b.subscribed,function(){return d=c.subscribe(e),Yb}),this.scheduleAbsolute(null,b.disposed,function(){return d.dispose(),Yb}),this.start(),e},c.prototype.createHotObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new gg(this,a)},c.prototype.createColdObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new hg(this,a)},c.prototype.createResolvedPromise=function(a,b){return new Ga(this,[Qa.ReactiveTest.onNext(a,b),Qa.ReactiveTest.onCompleted(a)])},c.prototype.createRejectedPromise=function(a,b){return new Ga(this,[Qa.ReactiveTest.onError(a,b)])},c.prototype.createObserver=function(){return new fg(this)},c}(ag);var ig=Qa.AnonymousObservable=function(a){function b(a){return a&&Ya(a.dispose)?a:Ya(a)?Xb(a):Yb}function c(a,c){var d=c[0],f=c[1],g=$a(f.__subscribe).call(f,d);g!==Za||d.fail(Za.e)||e(Za.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return Pb(d,a),d.prototype._subscribe=function(a){var b=new jg(a),d=[b,this];return pc.scheduleRequired()?pc.schedule(d,c):c(null,d),b},d}(Lc),jg=function(a){function b(b){a.call(this),this.observer=b,this.m=new ac}Pb(b,a);var c=b.prototype;return c.next=function(a){var b=$a(this.observer.onNext).call(this.observer,a);b===Za&&(this.dispose(),e(b.e))},c.error=function(a){var b=$a(this.observer.onError).call(this.observer,a);this.dispose(),b===Za&&e(b.e)},c.completed=function(){var a=$a(this.observer.onCompleted).call(this.observer);this.dispose(),a===Za&&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}(Gc),kg=function(a){function b(b,c){this._m=b,this._u=c,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return new cc(this._m.getDisposable(),this._u.subscribe(a))},b}(Mc),lg=function(a){function b(b,c,d){a.call(this),this.key=b,this.underlyingObservable=d?new kg(d,c):c}return Pb(b,a),b.prototype._subscribe=function(a){return this.underlyingObservable.subscribe(a)},b}(Lc),mg=Qa.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Pb(b,a),Qb(b.prototype,Dc.prototype,{_subscribe:function(a){return $b(this),this.isStopped?this.hasError?(a.onError(this.error),Yb):(a.onCompleted(),Yb):(this.observers.push(a),new qf(this,a))},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if($b(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($b(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($b(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 qg(a,b)},b}(Lc),ng=Qa.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Pb(b,a),Qb(b.prototype,Dc.prototype,{_subscribe:function(a){return $b(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 qf(this,a))},hasObservers:function(){return $b(this),this.observers.length>0},onCompleted:function(){var a,b;if($b(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($b(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){$b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(Lc),og=Qa.BehaviorSubject=function(a){function b(b){a.call(this),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Pb(b,a),Qb(b.prototype,Dc.prototype,{_subscribe:function(a){return $b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Yb):(this.observers.push(a),a.onNext(this.value),new qf(this,a))},getValue:function(){if($b(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if($b(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($b(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($b(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}(Lc),pg=Qa.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||pc,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 Pb(d,a),Qb(d.prototype,Dc.prototype,{_subscribe:function(a){$b(this);var c=new Jc(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($b(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($b(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($b(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}(Lc),qg=Qa.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return Pb(b,a),Qb(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}(Lc);Qa.Pauser=function(a){function b(){a.call(this)}return Pb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(mg),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Pa.Rx=Qa,define(function(){return Qa})):Ia&&Ja?Na?(Ja.exports=Qa).Rx=Qa:Ia.Rx=Qa:Pa.Rx=Qa;var rg=j()}).call(this);
//# sourceMappingURL=rx.all.map