Socket
Socket
Sign inDemoInstall

rx

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Library for composing asynchronous and event-based operations in JavaScript",
"version": "2.1.3",
"version": "2.1.4",
"homepage": "http://rx.codeplex.com",

@@ -8,0 +8,0 @@ "author": {

@@ -1,2 +0,2 @@

(function(t,e){function n(){}function r(t){return t}function i(){return(new Date).getTime()}function o(t,e){return t===e}function s(t,e){return t-e}function u(t){return""+t}function c(t){throw t}function a(){if(this.isDisposed)throw Error(x)}function h(t,e){return 1===t.length&&Array.isArray(t[e])?t[e]:C.call(t)}function l(t,e){for(var n=Array(t),r=0;t>r;r++)n[r]=e();return n}function f(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function p(t,e,n,r,i){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=i||s,this.disposable=new M}function d(t,n){return new Se(function(r){var i=new M,o=new L;return o.setDisposable(i),i.setDisposable(t.subscribe(r.onNext.bind(r),function(t){var i,s;try{s=n(t)}catch(u){return r.onError(u),e}i=new M,o.setDisposable(i),i.setDisposable(s.subscribe(r))},r.onCompleted.bind(r))),o})}function b(t,n){var r=this;return new Se(function(i){var o=0,s=t.length;return r.subscribe(function(r){if(s>o){var u,c=t[o++];try{u=n(r,c)}catch(a){return i.onError(a),e}i.onNext(u)}else i.onCompleted()},i.onError.bind(i),i.onCompleted.bind(i))})}function v(t){return this.select(t).mergeObservable()}var m="object"==typeof exports&&exports,y=("object"==typeof module&&module&&module.exports==m&&module,"object"==typeof global&&global);y.global===y&&(t=y);var w={Internals:{}},g="Sequence contains no elements.",E="Argument out of range",x="Object has been disposed",C=Array.prototype.slice;({}).hasOwnProperty;var D=this.inherits=w.Internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},A=w.Internals.addProperties=function(t){for(var e=C.call(arguments,1),n=0,r=e.length;r>n;n++){var i=e[n];for(var o in i)t[o]=i[o]}},S=w.Internals.addRef=function(t,e){return new Se(function(n){return new k(e.getDisposable(),t.subscribe(n))})};Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=C.call(arguments,1),r=function(){function i(){}if(this instanceof r){i.prototype=e.prototype;var o=new i,s=e.apply(o,n.concat(C.call(arguments)));return Object(s)===s?s:o}return e.apply(t,n.concat(C.call(arguments)))};return r});var _=Object("a"),N="a"!=_[0]||!(0 in _);Array.prototype.every||(Array.prototype.every=function(t){var e=Object(this),n=N&&"[object String]"=={}.toString.call(this)?this.split(""):e,r=n.length>>>0,i=arguments[1];if("[object Function]"!={}.toString.call(t))throw new TypeError(t+" is not a function");for(var o=0;r>o;o++)if(o in n&&!t.call(i,n[o],o,e))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(t){var e=Object(this),n=N&&"[object String]"=={}.toString.call(this)?this.split(""):e,r=n.length>>>0,i=Array(r),o=arguments[1];if("[object Function]"!={}.toString.call(t))throw new TypeError(t+" is not a function");for(var s=0;r>s;s++)s in n&&(i[s]=t.call(o,n[s],s,e));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){for(var e,n=[],r=Object(this),i=0,o=r.length>>>0;o>i;i++)e=r[i],i in r&&t.call(arguments[1],e,i,r)&&n.push(e);return n}),Array.isArray||(Array.isArray=function(t){return"[object Array]"==Object.prototype.toString.call(t)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=Object(this),n=e.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>1&&(r=Number(arguments[1]),r!==r?r=0:0!==r&&1/0!=r&&r!==-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);n>i;i++)if(i in e&&e[i]===t)return i;return-1});var O=function(t,e){this.id=t,this.value=e};O.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var W=function(t){this.items=Array(t),this.length=0},R=W.prototype;R.isHigherPriority=function(t,e){return 0>this.items[t].compareTo(this.items[e])},R.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},R.heapify=function(t){if(t===e&&(t=0),!(t>=this.length||0>t)){var n=2*t+1,r=2*t+2,i=t;if(this.length>n&&this.isHigherPriority(n,i)&&(i=n),this.length>r&&this.isHigherPriority(r,i)&&(i=r),i!==t){var o=this.items[t];this.items[t]=this.items[i],this.items[i]=o,this.heapify(i)}}},R.peek=function(){return this.items[0].value},R.removeAt=function(t){this.items[t]=this.items[--this.length],delete this.items[this.length],this.heapify()},R.dequeue=function(){var t=this.peek();return this.removeAt(0),t},R.enqueue=function(t){var e=this.length++;this.items[e]=new O(W.count++,t),this.percolate(e)},R.remove=function(t){for(var e=0;this.length>e;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},W.count=0;var k=w.CompositeDisposable=function(){this.disposables=h(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},j=k.prototype;j.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},j.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},j.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()}},j.clear=function(){var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()},j.contains=function(t){return-1!==this.disposables.indexOf(t)},j.toArray=function(){return this.disposables.slice(0)};var q=w.Disposable=function(t){this.isDisposed=!1,this.action=t};q.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var T=q.create=function(t){return new q(t)},I=q.empty={dispose:n},M=w.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null},P=M.prototype;P.disposable=function(t){return t?this.setDisposable(t):this.getDisposable()},P.getDisposable=function(){return this.current},P.setDisposable=function(t){if(this.current)throw Error("Disposable has already been assigned");var e=this.isDisposed;e||(this.current=t),e&&t&&t.dispose()},P.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var L=w.SerialDisposable=function(){this.isDisposed=!1,this.current=null};L.prototype.getDisposable=function(){return this.current},L.prototype.setDisposable=function(t){var e,n=this.isDisposed;n||(e=this.current,this.current=t),e&&e.dispose(),n&&t&&t.dispose()},L.prototype.disposable=function(t){return t?(this.setDisposable(t),e):this.getDisposable()},L.prototype.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var V=w.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.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()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?I:new t(this)},e}();f.prototype.dispose=function(){var t=this;this.scheduler.schedule(function(){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())})},p.prototype.invoke=function(){this.disposable.disposable(this.invokeCore())},p.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},p.prototype.isCancelled=function(){return this.disposable.isDisposed},p.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var z=w.Scheduler=function(){function e(t,e,n,r){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=r}function n(t,e){var n=e.first,r=e.second,i=new k,o=function(e){r(e,function(e){var n=!1,r=!1,s=t.scheduleWithState(e,function(t,e){return n?i.remove(s):r=!0,o(e),I});r||(i.add(s),n=!0)})};return o(n),i}function r(t,e,n){var r=e.first,i=e.second,o=new k,s=function(e){i(e,function(e,r){var i=!1,u=!1,c=t[n].call(t,e,r,function(t,e){return i?o.remove(c):u=!0,s(e),I});u||(o.add(c),i=!0)})};return s(r),o}function o(t,e){return e(),I}var s=e.prototype;return s.catchException=function(t){return new Q(this,t)},s.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,function(){e()})},s.schedulePeriodicWithState=function(e,n,r){var i=e,o=t.setInterval(function(){i=r(i)},n);return T(function(){t.clearInterval(o)})},s.schedule=function(t){return this._schedule(t,o)},s.scheduleWithState=function(t,e){return this._schedule(t,e)},s.scheduleWithRelative=function(t,e){return this._scheduleRelative(e,t,o)},s.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},s.scheduleWithAbsolute=function(t,e){return this._scheduleAbsolute(e,t,o)},s.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},s.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,function(t,e){t(function(){e(t)})})},s.scheduleRecursiveWithState=function(t,e){return this.scheduleWithState({first:t,second:e},function(t,e){return n(t,e)})},s.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithRelativeAndState=function(t,e,n){return this._scheduleRelative({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithRelativeAndState")})},s.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithAbsoluteAndState")})},e.now=i,e.normalize=function(t){return 0>t&&(t=0),t},e}(),F="Scheduler is not allowed to block the thread",B=z.immediate=function(){function t(t,e){return e(this,t)}function e(t,e,n){if(e>0)throw Error(F);return n(this,t)}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new z(i,t,e,n)}(),H=z.currentThread=function(){function t(){o=new W(4)}function e(t,e){return this.scheduleWithRelativeAndState(t,0,e)}function n(e,n,r){var i,s=this.now()+z.normalize(n),u=new p(this,e,r,s);if(o)o.enqueue(u);else{i=new t;try{o.enqueue(u),i.run()}catch(c){throw c}finally{i.dispose()}}return u.disposable}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}var o;t.prototype.dispose=function(){o=null},t.prototype.run=function(){for(var t;o.length>0;)if(t=o.dequeue(),!t.isCancelled()){for(;t.dueTime-z.now()>0;);t.isCancelled()||t.invoke()}};var s=new z(i,e,n,r);return s.scheduleRequired=function(){return null===o},s.ensureTrampoline=function(t){return null===o?this.schedule(t):t()},s}(),U=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new M;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}();w.VirtualTimeScheduler=function(t){function n(){return this.toDateTimeOffset(this.clock)}function r(t,e){return this.scheduleAbsoluteWithState(t,this.clock,e)}function i(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e),n)}function o(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e-this.now()),n)}function s(t,e){return e(),I}function u(e,s){this.clock=e,this.comparer=s,this.isEnabled=!1,this.queue=new W(1024),t.call(this,n,r,i,o)}D(u,t);var c=u.prototype;return c.schedulePeriodicWithState=function(t,e,n){var r=new U(this,t,e,n);return r.start()},c.scheduleRelativeWithState=function(t,e,n){var r=this.add(this.clock,e);return this.scheduleAbsoluteWithState(t,r,n)},c.scheduleRelative=function(t,e){return this.scheduleRelativeWithState(e,t,s)},c.start=function(){var t;if(!this.isEnabled){this.isEnabled=!0;do t=this.getNext(),null!==t?(this.comparer(t.dueTime,this.clock)>0&&(this.clock=t.dueTime),t.invoke()):this.isEnabled=!1;while(this.isEnabled)}},c.stop=function(){this.isEnabled=!1},c.advanceTo=function(t){var e,n=this.comparer(this.clock,t);if(this.comparer(this.clock,t)>0)throw Error(E);if(0!==n&&!this.isEnabled){this.isEnabled=!0;do e=this.getNext(),null!==e&&0>=this.comparer(e.dueTime,t)?(this.comparer(e.dueTime,this.clock)>0&&(this.clock=e.dueTime),e.invoke()):this.isEnabled=!1;while(this.isEnabled);this.clock=t}},c.advanceBy=function(t){var n=this.add(this.clock,t),r=this.comparer(this.clock,n);if(r>0)throw Error(E);return 0!==r?this.advanceTo(n):e},c.sleep=function(t){var e=this.add(this.clock,t);if(this.comparer(this.clock,e)>=0)throw Error(E);this.clock=e},c.getNext=function(){for(var t;this.queue.length>0;){if(t=this.queue.peek(),!t.isCancelled())return t;this.queue.dequeue()}return null},c.scheduleAbsolute=function(t,e){return this.scheduleAbsoluteWithState(e,t,s)},c.scheduleAbsoluteWithState=function(t,e,n){var r=this,i=function(t,e){return r.queue.remove(o),n(t,e)},o=new p(r,t,i,e,r.comparer);return r.queue.enqueue(o),o.disposable},u}(z),w.HistoricalScheduler=function(t){function e(e,n){var r=null==e?0:e,i=n||s;t.call(this,r,i)}D(e,t);var n=e.prototype;return n.add=function(t,e){return t+e},n.toDateTimeOffset=function(t){return new Date(t).getTime()},n.toRelative=function(t){return t},e}(w.VirtualTimeScheduler);var G,J=n;(function(){function e(){if(!t.postMessage||t.importScripts)return!1;var e=!1,n=t.onmessage;return t.onmessage=function(){e=!0},t.postMessage("","*"),t.onmessage=n,e}function n(t){if("string"==typeof t.data&&t.data.substring(0,r.length)===r){var e=t.data.substring(r.length),n=i[e];n(),delete i[e]}}if("object"==typeof t.process&&"[object process]"===Object.prototype.toString.call(t.process))G=t.process.nextTick;else if("function"==typeof t.setImmediate)G=t.setImmediate,J=t.clearImmediate;else if(e()){var r="ms.rx.schedule"+Math.random(),i={},o=0;t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n,!1),G=function(e){var n=o++;i[n]=e,t.postMessage(r+n,"*")}}else if(t.MessageChannel){var s=new t.MessageChannel,u={},c=0;s.port1.onmessage=function(t){var e=t.data,n=u[e];n(),delete u[e]},G=function(t){var e=c++;u[e]=t,s.port2.postMessage(e)}}else"document"in t&&"onreadystatechange"in t.document.createElement("script")?G=function(e){var n=t.document.createElement("script");n.onreadystatechange=function(){e(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},t.document.documentElement.appendChild(n)}:(G=function(e){return t.setTimeout(e,0)},J=t.clearTimeout)})();var K=z.timeout=function(){function e(t,e){var n=this,r=new M,i=G(function(){r.isDisposed||r.setDisposable(e(n,t))});return new k(r,T(function(){J(i)}))}function n(e,n,r){var i=this,o=z.normalize(n);if(0===o)return i.scheduleWithState(e,r);var s=new M,u=t.setTimeout(function(){s.isDisposed||s.setDisposable(r(i,e))},o);return new k(s,T(function(){t.clearTimeout(u)}))}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new z(i,e,n,r)}(),Q=function(t){function e(){return this._scheduler.now()}function n(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function r(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function i(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function o(o,s){this._scheduler=o,this._handler=s,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,e,n,r,i)}return D(o,t),o.prototype._clone=function(t){return new o(t,this._handler)},o.prototype._wrap=function(t){var e=this;return function(n,r){try{return t(e._getRecursiveWrapper(n),r)}catch(i){if(!e._handler(i))throw i;return I}}},o.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},o.prototype.schedulePeriodicWithState=function(t,e,n){var r=this,i=!1,o=new M;return o.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(i)return null;try{return n(t)}catch(e){if(i=!0,!r._handler(e))throw e;return o.dispose(),null}})),o},o}(z),X=w.Notification=function(){function t(t,e){this.hasValue=null==e?!1:e,this.kind=t}var e=t.prototype;return e.accept=function(t,e,n){return 1===arguments.length&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},e.toObservable=function(t){var e=this;return t=t||B,new Se(function(n){return t.schedule(function(){e._acceptObservable(n),"N"===e.kind&&n.onCompleted()})})},e.equals=function(t){var e=null==t?"":""+t;return""+this===e},t}(),Y=X.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){var i=new X("N",!0);return i.value=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),Z=X.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){var i=new X("E");return i.exception=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),$=X.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){var r=new X("C");return r._accept=t.bind(r),r._acceptObservable=e.bind(r),r.toString=n.bind(r),r}}(),te=w.Internals.Enumerator=function(t,e,n){this.moveNext=t,this.getCurrent=e,this.dispose=n},ee=te.create=function(t,e,r){var i=!1;return r||(r=n),new te(function(){if(i)return!1;var e=t();return e||(i=!0,r()),e},function(){return e()},function(){i||(r(),i=!0)})},ne=w.Internals.Enumerable=function(){function t(t){this.getEnumerator=t}return t.prototype.concat=function(){var t=this;return new Se(function(n){var r=t.getEnumerator(),i=!1,o=new L,s=B.scheduleRecursive(function(t){var s,u,c=!1;if(!i){try{c=r.moveNext(),c?s=r.getCurrent():r.dispose()}catch(a){u=a,r.dispose()}if(u)return n.onError(u),e;if(!c)return n.onCompleted(),e;var h=new M;o.setDisposable(h),h.setDisposable(s.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){t()}))}});return new k(o,s,T(function(){i=!0,r.dispose()}))})},t.prototype.catchException=function(){var t=this;return new Se(function(n){var r,i=t.getEnumerator(),o=!1,s=new L,u=B.scheduleRecursive(function(t){var u,c,a;if(a=!1,!o){try{a=i.moveNext(),a&&(u=i.getCurrent())}catch(h){c=h}if(c)return n.onError(c),e;if(!a)return r?n.onError(r):n.onCompleted(),e;var l=new M;s.setDisposable(l),l.setDisposable(u.subscribe(n.onNext.bind(n),function(e){r=e,t()},n.onCompleted.bind(n)))}});return new k(s,u,T(function(){o=!0}))})},t}(),re=ne.repeat=function(t,n){return n===e&&(n=-1),new ne(function(){var e,r=n;return ee(function(){return 0===r?!1:(r>0&&r--,e=t,!0)},function(){return e})})},ie=ne.forEach=function(t,e){return e||(e=r),new ne(function(){var n,r=-1;return ee(function(){return++r<t.length?(n=e(t[r],r),!0):!1},function(){return n})})},oe=w.Observer=function(){};oe.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},oe.prototype.asObserver=function(){return new ae(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},oe.prototype.checked=function(){return new he(this)};var se=oe.create=function(t,e,r){return t||(t=n),e||(e=c),r||(r=n),new ae(t,e,r)};oe.fromNotifier=function(t){return new ae(function(e){return t(Y(e))},function(e){return t(Z(e))},function(){return t($())})};var ue,ce=w.Internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return D(e,t),e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(){return this.isStopped?!1:(this.isStopped=!0,this.error(!0),!0)},e}(oe),ae=w.AnonymousObserver=function(t){function e(e,n,r){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=r}return D(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(ce),he=function(t){function e(e){t.call(this),this._observer=e,this._state=0}D(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();try{this._observer.onNext(t)}catch(e){throw e}finally{this._state=0}},n.onError=function(t){this.checkAccess();try{this._observer.onError(t)}catch(e){throw e}finally{this._state=2}},n.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(t){throw t}finally{this._state=2}},n.checkAccess=function(){if(1===this._state)throw Error("Re-entrancy detected");if(2===this._state)throw Error("Observer completed");0===this._state&&(this._state=1)},e}(oe),le=w.Internals.ScheduledObserver=function(t){function n(e,n){t.call(this),this.scheduler=e,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new L}return D(n,t),n.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},n.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},n.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},n.prototype.ensureActive=function(){var t=!1,n=this;!this.hasFaulted&&this.queue.length>0&&(t=!this.isAcquired,this.isAcquired=!0),t&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(t){var r;if(!(n.queue.length>0))return n.isAcquired=!1,e;r=n.queue.shift();try{r()}catch(i){throw n.queue=[],n.hasFaulted=!0,i}t()}))},n.prototype.dispose=function(){t.prototype.dispose.call(this),this.disposable.dispose()},n}(ce),fe=function(t){function e(){t.apply(this,arguments)}return D(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e}(le),pe=w.Observable=function(){function t(t){this._subscribe=t}return ue=t.prototype,ue.finalValue=function(){var t=this;return new Se(function(e){var n,r=!1;return t.subscribe(function(t){r=!0,n=t},e.onError.bind(e),function(){r?(e.onNext(n),e.onCompleted()):e.onError(Error(g))})})},ue.subscribe=ue.forEach=function(t,e,n){var r;return r="object"==typeof t?t:se(t,e,n),this._subscribe(r)},ue.toArray=function(){function t(t,e){var n=t.slice(0);return n.push(e),n}return this.scan([],t).startWith([]).finalValue()},t}();pe.start=function(t,e){return de(t,e)()};var de=pe.toAsync=function(t,n,r){return n||(n=K),function(){var i=C.call(arguments,0),o=new Re;return n.schedule(function(){var n;try{n=t.apply(r,i)}catch(s){return o.onError(s),e}o.onNext(n),o.onCompleted()}),o.asObservable()}};ue.observeOn=function(t){var e=this;return new Se(function(n){return e.subscribe(new fe(t,n))})},ue.subscribeOn=function(t){var e=this;return new Se(function(n){var r=new M,i=new L;return i.setDisposable(r),r.setDisposable(t.schedule(function(){i.setDisposable(new f(t,e.subscribe(n)))})),i})},pe.create=function(t){return new Se(function(e){return T(t(e))})},pe.createWithDisposable=function(t){return new Se(t)};var be=pe.defer=function(t){return new Se(function(e){var n;try{n=t()}catch(r){return ge(r).subscribe(e)}return n.subscribe(e)})},ve=pe.empty=function(t){return t||(t=B),new Se(function(e){return t.schedule(function(){e.onCompleted()})})},me=pe.fromArray=function(t,e){return e||(e=H),new Se(function(n){var r=0;return e.scheduleRecursive(function(e){t.length>r?(n.onNext(t[r++]),e()):n.onCompleted()})})};pe.generate=function(t,n,r,i,o){return o||(o=H),new Se(function(s){var u=!0,c=t;return o.scheduleRecursive(function(t){var o,a;try{u?u=!1:c=r(c),o=n(c),o&&(a=i(c))}catch(h){return s.onError(h),e}o?(s.onNext(a),t()):s.onCompleted()})})};var ye=pe.never=function(){return new Se(function(){return I})};pe.range=function(t,e,n){return n||(n=H),new Se(function(r){return n.scheduleRecursiveWithState(0,function(n,i){e>n?(r.onNext(t+n),i(n+1)):r.onCompleted()})})},pe.repeat=function(t,e,n){return n||(n=H),null==e&&(e=-1),we(t,n).repeat(e)};var we=pe.returnValue=function(t,e){return e||(e=B),new Se(function(n){return e.schedule(function(){n.onNext(t),n.onCompleted()})})},ge=pe.throwException=function(t,e){return e||(e=B),new Se(function(n){return e.schedule(function(){n.onError(t)})})};pe.using=function(t,e){return new Se(function(n){var r,i,o=I;try{r=t(),r&&(o=r),i=e(r)}catch(s){return new k(ge(s).subscribe(n),o)}return new k(i.subscribe(n),o)})},ue.amb=function(t){var e=this;return new Se(function(n){function r(){o||(o=s,a.dispose())}function i(){o||(o=u,c.dispose())}var o,s="L",u="R",c=new M,a=new M;return c.setDisposable(e.subscribe(function(t){r(),o===s&&n.onNext(t)},function(t){r(),o===s&&n.onError(t)},function(){r(),o===s&&n.onCompleted()})),a.setDisposable(t.subscribe(function(t){i(),o===u&&n.onNext(t)},function(t){i(),o===u&&n.onError(t)},function(){i(),o===u&&n.onCompleted()})),new k(c,a)})},pe.amb=function(){function t(t,e){return t.amb(e)}for(var e=ye(),n=h(arguments,0),r=0,i=n.length;i>r;r++)e=t(e,n[r]);return e},ue.catchException=function(t){return"function"==typeof t?d(this,t):Ee([this,t])};var Ee=pe.catchException=function(){var t=h(arguments,0);return ie(t).catchException()};ue.combineLatest=function(){var t=C.call(arguments);return Array.isArray(t[0])?t[0].unshift(this):t.unshift(this),xe.apply(this,t)};var xe=pe.combineLatest=function(){var t=C.call(arguments),n=t.pop();return Array.isArray(t[0])&&(t=t[0]),new Se(function(r){function i(t){var i;if(c[t]=!0,a||(a=c.every(function(t){return t}))){try{i=n.apply(null,f)}catch(o){return r.onError(o),e}r.onNext(i)}else h.filter(function(e,n){return n!==t}).every(function(t){return t})&&r.onCompleted()}function o(t){h[t]=!0,h.every(function(t){return t})&&r.onCompleted()}for(var s=function(){return!1},u=t.length,c=l(u,s),a=!1,h=l(u,s),f=Array(u),p=Array(u),d=0;u>d;d++)(function(e){p[e]=new M,p[e].setDisposable(t[e].subscribe(function(t){f[e]=t,i(e)},r.onError.bind(r),function(){o(e)}))})(d);return new k(p)})};ue.concat=function(){var t=C.call(arguments,0);return t.unshift(this),Ce.apply(this,t)};var Ce=pe.concat=function(){var t=h(arguments,0);return ie(t).concat()};ue.concatObservable=ue.concatAll=function(){return this.merge(1)},ue.merge=function(t){if("number"!=typeof t)return De(this,t);var e=this;return new Se(function(n){var r=0,i=new k,o=!1,s=[],u=function(t){var e=new M;i.add(e),e.setDisposable(t.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){var t;i.remove(e),s.length>0?(t=s.shift(),u(t)):(r--,o&&0===r&&n.onCompleted())}))};return i.add(e.subscribe(function(e){t>r?(r++,u(e)):s.push(e)},n.onError.bind(n),function(){o=!0,0===r&&n.onCompleted()})),i})};var De=pe.merge=function(){var t,e;return arguments[0]?arguments[0].now?(t=arguments[0],e=C.call(arguments,1)):(t=B,e=C.call(arguments,0)):(t=B,e=C.call(arguments,1)),Array.isArray(e[0])&&(e=e[0]),me(e,t).mergeObservable()};ue.mergeObservable=ue.mergeAll=function(){var t=this;return new Se(function(e){var n=new k,r=!1,i=new M;return n.add(i),i.setDisposable(t.subscribe(function(t){var i=new M;n.add(i),i.setDisposable(t.subscribe(function(t){e.onNext(t)},e.onError.bind(e),function(){n.remove(i),r&&1===n.length&&e.onCompleted()}))},e.onError.bind(e),function(){r=!0,1===n.length&&e.onCompleted()})),n})},ue.onErrorResumeNext=function(t){if(!t)throw Error("Second observable is required");return Ae([this,t])};var Ae=pe.onErrorResumeNext=function(){var t=h(arguments,0);return new Se(function(e){var n=0,r=new L,i=B.scheduleRecursive(function(i){var o,s;t.length>n?(o=t[n++],s=new M,r.setDisposable(s),s.setDisposable(o.subscribe(e.onNext.bind(e),function(){i()},function(){i()}))):e.onCompleted()});return new k(r,i)})};ue.skipUntil=function(t){var e=this;return new Se(function(n){var r=!1,i=new k(e.subscribe(function(t){r&&n.onNext(t)},n.onError.bind(n),function(){r&&n.onCompleted()})),o=new M;return i.add(o),o.setDisposable(t.subscribe(function(){r=!0,o.dispose()},n.onError.bind(n),function(){o.dispose()})),i})},ue.switchLatest=function(){var t=this;return new Se(function(e){var n=!1,r=new L,i=!1,o=0,s=t.subscribe(function(t){var s=new M,u=++o;n=!0,r.setDisposable(s),s.setDisposable(t.subscribe(function(t){o===u&&e.onNext(t)},function(t){o===u&&e.onError(t)},function(){o===u&&(n=!1,i&&e.onCompleted())}))},e.onError.bind(e),function(){i=!0,n||e.onCompleted()});return new k(s,r)})},ue.takeUntil=function(t){var e=this;return new Se(function(r){return new k(e.subscribe(r),t.subscribe(r.onCompleted.bind(r),r.onError.bind(r),n))})},ue.zip=function(){if(Array.isArray(arguments[0]))return b.apply(this,arguments);var t=this,n=C.call(arguments),i=n.pop();return n.unshift(t),new Se(function(o){function s(t){a[t]=!0,a.every(function(t){return t})&&o.onCompleted()}for(var u=n.length,c=l(u,function(){return[]}),a=l(u,function(){return!1}),h=function(n){var s,u;if(c.every(function(t){return t.length>0})){try{u=c.map(function(t){return t.shift()}),s=i.apply(t,u)}catch(h){return o.onError(h),e}o.onNext(s)}else a.filter(function(t,e){return e!==n}).every(r)&&o.onCompleted()},f=Array(u),p=0;u>p;p++)(function(t){f[t]=new M,f[t].setDisposable(n[t].subscribe(function(e){c[t].push(e),h(t)},o.onError.bind(o),function(){s(t)}))})(p);return new k(f)})},pe.zip=function(){var t=C.call(arguments,0),e=t.shift();return e.zip.apply(e,t)},pe.zipArray=function(){var t=C.call(arguments);return new Se(function(n){function i(t){if(u.every(function(t){return t.length>0})){var i=u.map(function(t){return t.shift()});n.onNext(i)}else if(c.filter(function(e,n){return n!==t}).every(r))return n.onCompleted(),e}function o(t){return c[t]=!0,c.every(r)?(n.onCompleted(),e):e}for(var s=t.length,u=l(s,function(){return[]}),c=l(s,function(){return!1}),a=Array(s),h=0;s>h;h++)(function(e){a[e]=new M,a[e].setDisposable(t[e].subscribe(function(t){u[e].push(t),i(e)},n.onError.bind(n),function(){o(e)}))})(h);var f=new k(a);return f.add(T(function(){for(var t=0,e=u.length;e>t;t++)u[t]=[]})),f})},ue.asObservable=function(){var t=this;return new Se(function(e){return t.subscribe(e)})},ue.bufferWithCount=function(t,n){return n===e&&(n=t),this.windowWithCount(t,n).selectMany(function(t){return t.toArray()}).where(function(t){return t.length>0})},ue.dematerialize=function(){var t=this;return new Se(function(e){return t.subscribe(function(t){return t.accept(e)},e.onError.bind(e),e.onCompleted.bind(e))})},ue.distinctUntilChanged=function(t,n){var i=this;return t||(t=r),n||(n=o),new Se(function(r){var o,s=!1;return i.subscribe(function(i){var u,c=!1;try{u=t(i)}catch(a){return r.onError(a),e}if(s)try{c=n(o,u)}catch(a){return r.onError(a),e}s&&c||(s=!0,o=u,r.onNext(i))},r.onError.bind(r),r.onCompleted.bind(r))})},ue.doAction=function(t,e,n){var r,i=this;return"function"==typeof t?r=t:(r=t.onNext.bind(t),e=t.onError.bind(t),n=t.onCompleted.bind(t)),new Se(function(t){return i.subscribe(function(e){try{r(e)}catch(n){t.onError(n)}t.onNext(e)},function(n){if(e){try{e(n)}catch(r){t.onError(r)}t.onError(n)}else t.onError(n)},function(){if(n){try{n()}catch(e){t.onError(e)}t.onCompleted()}else t.onCompleted()})})},ue.finallyAction=function(t){var e=this;return new Se(function(n){var r=e.subscribe(n);return T(function(){try{r.dispose()}catch(e){throw e}finally{t()}})})},ue.ignoreElements=function(){var t=this;
(function(t,e){function n(){}function r(t){return t}function i(){return(new Date).getTime()}function o(t,e){return t===e}function s(t,e){return t-e}function u(t){return""+t}function c(t){throw t}function a(){if(this.isDisposed)throw Error(x)}function h(t,e){return 1===t.length&&Array.isArray(t[e])?t[e]:C.call(t)}function l(t,e){for(var n=Array(t),r=0;t>r;r++)n[r]=e();return n}function f(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function p(t,e,n,r,i){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=i||s,this.disposable=new M}function d(t,n){return new Se(function(r){var i=new M,o=new L;return o.setDisposable(i),i.setDisposable(t.subscribe(r.onNext.bind(r),function(t){var i,s;try{s=n(t)}catch(u){return r.onError(u),e}i=new M,o.setDisposable(i),i.setDisposable(s.subscribe(r))},r.onCompleted.bind(r))),o})}function b(t,n){var r=this;return new Se(function(i){var o=0,s=t.length;return r.subscribe(function(r){if(s>o){var u,c=t[o++];try{u=n(r,c)}catch(a){return i.onError(a),e}i.onNext(u)}else i.onCompleted()},i.onError.bind(i),i.onCompleted.bind(i))})}function v(t){return this.select(t).mergeObservable()}var m="object"==typeof exports&&exports,y=("object"==typeof module&&module&&module.exports==m&&module,"object"==typeof global&&global);y.global===y&&(t=y);var w={Internals:{}},g="Sequence contains no elements.",E="Argument out of range",x="Object has been disposed",C=Array.prototype.slice;({}).hasOwnProperty;var D=this.inherits=w.Internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},A=w.Internals.addProperties=function(t){for(var e=C.call(arguments,1),n=0,r=e.length;r>n;n++){var i=e[n];for(var o in i)t[o]=i[o]}},S=w.Internals.addRef=function(t,e){return new Se(function(n){return new k(e.getDisposable(),t.subscribe(n))})};Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=C.call(arguments,1),r=function(){function i(){}if(this instanceof r){i.prototype=e.prototype;var o=new i,s=e.apply(o,n.concat(C.call(arguments)));return Object(s)===s?s:o}return e.apply(t,n.concat(C.call(arguments)))};return r});var _=Object("a"),N="a"!=_[0]||!(0 in _);Array.prototype.every||(Array.prototype.every=function(t){var e=Object(this),n=N&&"[object String]"=={}.toString.call(this)?this.split(""):e,r=n.length>>>0,i=arguments[1];if("[object Function]"!={}.toString.call(t))throw new TypeError(t+" is not a function");for(var o=0;r>o;o++)if(o in n&&!t.call(i,n[o],o,e))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(t){var e=Object(this),n=N&&"[object String]"=={}.toString.call(this)?this.split(""):e,r=n.length>>>0,i=Array(r),o=arguments[1];if("[object Function]"!={}.toString.call(t))throw new TypeError(t+" is not a function");for(var s=0;r>s;s++)s in n&&(i[s]=t.call(o,n[s],s,e));return i}),Array.prototype.filter||(Array.prototype.filter=function(t){for(var e,n=[],r=Object(this),i=0,o=r.length>>>0;o>i;i++)e=r[i],i in r&&t.call(arguments[1],e,i,r)&&n.push(e);return n}),Array.isArray||(Array.isArray=function(t){return"[object Array]"==Object.prototype.toString.call(t)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=Object(this),n=e.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>1&&(r=Number(arguments[1]),r!==r?r=0:0!==r&&1/0!=r&&r!==-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);n>i;i++)if(i in e&&e[i]===t)return i;return-1});var O=function(t,e){this.id=t,this.value=e};O.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var W=function(t){this.items=Array(t),this.length=0},R=W.prototype;R.isHigherPriority=function(t,e){return 0>this.items[t].compareTo(this.items[e])},R.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},R.heapify=function(t){if(t===e&&(t=0),!(t>=this.length||0>t)){var n=2*t+1,r=2*t+2,i=t;if(this.length>n&&this.isHigherPriority(n,i)&&(i=n),this.length>r&&this.isHigherPriority(r,i)&&(i=r),i!==t){var o=this.items[t];this.items[t]=this.items[i],this.items[i]=o,this.heapify(i)}}},R.peek=function(){return this.items[0].value},R.removeAt=function(t){this.items[t]=this.items[--this.length],delete this.items[this.length],this.heapify()},R.dequeue=function(){var t=this.peek();return this.removeAt(0),t},R.enqueue=function(t){var e=this.length++;this.items[e]=new O(W.count++,t),this.percolate(e)},R.remove=function(t){for(var e=0;this.length>e;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},W.count=0;var k=w.CompositeDisposable=function(){this.disposables=h(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},j=k.prototype;j.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},j.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},j.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()}},j.clear=function(){var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()},j.contains=function(t){return-1!==this.disposables.indexOf(t)},j.toArray=function(){return this.disposables.slice(0)};var q=w.Disposable=function(t){this.isDisposed=!1,this.action=t};q.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var T=q.create=function(t){return new q(t)},I=q.empty={dispose:n},M=w.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null},P=M.prototype;P.disposable=function(t){return t?this.setDisposable(t):this.getDisposable()},P.getDisposable=function(){return this.current},P.setDisposable=function(t){if(this.current)throw Error("Disposable has already been assigned");var e=this.isDisposed;e||(this.current=t),e&&t&&t.dispose()},P.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var L=w.SerialDisposable=function(){this.isDisposed=!1,this.current=null};L.prototype.getDisposable=function(){return this.current},L.prototype.setDisposable=function(t){var e,n=this.isDisposed;n||(e=this.current,this.current=t),e&&e.dispose(),n&&t&&t.dispose()},L.prototype.disposable=function(t){return t?(this.setDisposable(t),e):this.getDisposable()},L.prototype.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var V=w.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.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()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?I:new t(this)},e}();f.prototype.dispose=function(){var t=this;this.scheduler.schedule(function(){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())})},p.prototype.invoke=function(){this.disposable.disposable(this.invokeCore())},p.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},p.prototype.isCancelled=function(){return this.disposable.isDisposed},p.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var z=w.Scheduler=function(){function e(t,e,n,r){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=r}function n(t,e){var n=e.first,r=e.second,i=new k,o=function(e){r(e,function(e){var n=!1,r=!1,s=t.scheduleWithState(e,function(t,e){return n?i.remove(s):r=!0,o(e),I});r||(i.add(s),n=!0)})};return o(n),i}function r(t,e,n){var r=e.first,i=e.second,o=new k,s=function(e){i(e,function(e,r){var i=!1,u=!1,c=t[n].call(t,e,r,function(t,e){return i?o.remove(c):u=!0,s(e),I});u||(o.add(c),i=!0)})};return s(r),o}function o(t,e){return e(),I}var s=e.prototype;return s.catchException=function(t){return new Q(this,t)},s.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,function(){e()})},s.schedulePeriodicWithState=function(e,n,r){var i=e,o=t.setInterval(function(){i=r(i)},n);return T(function(){t.clearInterval(o)})},s.schedule=function(t){return this._schedule(t,o)},s.scheduleWithState=function(t,e){return this._schedule(t,e)},s.scheduleWithRelative=function(t,e){return this._scheduleRelative(e,t,o)},s.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},s.scheduleWithAbsolute=function(t,e){return this._scheduleAbsolute(e,t,o)},s.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},s.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,function(t,e){t(function(){e(t)})})},s.scheduleRecursiveWithState=function(t,e){return this.scheduleWithState({first:t,second:e},function(t,e){return n(t,e)})},s.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithRelativeAndState=function(t,e,n){return this._scheduleRelative({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithRelativeAndState")})},s.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithAbsoluteAndState")})},e.now=i,e.normalize=function(t){return 0>t&&(t=0),t},e}(),F="Scheduler is not allowed to block the thread",B=z.immediate=function(){function t(t,e){return e(this,t)}function e(t,e,n){if(e>0)throw Error(F);return n(this,t)}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new z(i,t,e,n)}(),H=z.currentThread=function(){function t(){o=new W(4)}function e(t,e){return this.scheduleWithRelativeAndState(t,0,e)}function n(e,n,r){var i,s=this.now()+z.normalize(n),u=new p(this,e,r,s);if(o)o.enqueue(u);else{i=new t;try{o.enqueue(u),i.run()}catch(c){throw c}finally{i.dispose()}}return u.disposable}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}var o;t.prototype.dispose=function(){o=null},t.prototype.run=function(){for(var t;o.length>0;)if(t=o.dequeue(),!t.isCancelled()){for(;t.dueTime-z.now()>0;);t.isCancelled()||t.invoke()}};var s=new z(i,e,n,r);return s.scheduleRequired=function(){return null===o},s.ensureTrampoline=function(t){return null===o?this.schedule(t):t()},s}(),U=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new M;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}();w.VirtualTimeScheduler=function(t){function n(){return this.toDateTimeOffset(this.clock)}function r(t,e){return this.scheduleAbsoluteWithState(t,this.clock,e)}function i(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e),n)}function o(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e-this.now()),n)}function s(t,e){return e(),I}function u(e,s){this.clock=e,this.comparer=s,this.isEnabled=!1,this.queue=new W(1024),t.call(this,n,r,i,o)}D(u,t);var c=u.prototype;return c.schedulePeriodicWithState=function(t,e,n){var r=new U(this,t,e,n);return r.start()},c.scheduleRelativeWithState=function(t,e,n){var r=this.add(this.clock,e);return this.scheduleAbsoluteWithState(t,r,n)},c.scheduleRelative=function(t,e){return this.scheduleRelativeWithState(e,t,s)},c.start=function(){var t;if(!this.isEnabled){this.isEnabled=!0;do t=this.getNext(),null!==t?(this.comparer(t.dueTime,this.clock)>0&&(this.clock=t.dueTime),t.invoke()):this.isEnabled=!1;while(this.isEnabled)}},c.stop=function(){this.isEnabled=!1},c.advanceTo=function(t){var e,n=this.comparer(this.clock,t);if(this.comparer(this.clock,t)>0)throw Error(E);if(0!==n&&!this.isEnabled){this.isEnabled=!0;do e=this.getNext(),null!==e&&0>=this.comparer(e.dueTime,t)?(this.comparer(e.dueTime,this.clock)>0&&(this.clock=e.dueTime),e.invoke()):this.isEnabled=!1;while(this.isEnabled);this.clock=t}},c.advanceBy=function(t){var n=this.add(this.clock,t),r=this.comparer(this.clock,n);if(r>0)throw Error(E);return 0!==r?this.advanceTo(n):e},c.sleep=function(t){var e=this.add(this.clock,t);if(this.comparer(this.clock,e)>=0)throw Error(E);this.clock=e},c.getNext=function(){for(var t;this.queue.length>0;){if(t=this.queue.peek(),!t.isCancelled())return t;this.queue.dequeue()}return null},c.scheduleAbsolute=function(t,e){return this.scheduleAbsoluteWithState(e,t,s)},c.scheduleAbsoluteWithState=function(t,e,n){var r=this,i=function(t,e){return r.queue.remove(o),n(t,e)},o=new p(r,t,i,e,r.comparer);return r.queue.enqueue(o),o.disposable},u}(z),w.HistoricalScheduler=function(t){function e(e,n){var r=null==e?0:e,i=n||s;t.call(this,r,i)}D(e,t);var n=e.prototype;return n.add=function(t,e){return t+e},n.toDateTimeOffset=function(t){return new Date(t).getTime()},n.toRelative=function(t){return t},e}(w.VirtualTimeScheduler);var G,J=n;(function(){function e(){if(!t.postMessage||t.importScripts)return!1;var e=!1,n=t.onmessage;return t.onmessage=function(){e=!0},t.postMessage("","*"),t.onmessage=n,e}function n(t){if("string"==typeof t.data&&t.data.substring(0,r.length)===r){var e=t.data.substring(r.length),n=i[e];n(),delete i[e]}}if("object"==typeof t.process&&"[object process]"===Object.prototype.toString.call(t.process))G=t.process.nextTick;else if("function"==typeof t.setImmediate)G=t.setImmediate,J=t.clearImmediate;else if(e()){var r="ms.rx.schedule"+Math.random(),i={},o=0;t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n,!1),G=function(e){var n=o++;i[n]=e,t.postMessage(r+n,"*")}}else if(t.MessageChannel){var s=new t.MessageChannel,u={},c=0;s.port1.onmessage=function(t){var e=t.data,n=u[e];n(),delete u[e]},G=function(t){var e=c++;u[e]=t,s.port2.postMessage(e)}}else"document"in t&&"onreadystatechange"in t.document.createElement("script")?G=function(e){var n=t.document.createElement("script");n.onreadystatechange=function(){e(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},t.document.documentElement.appendChild(n)}:(G=function(e){return t.setTimeout(e,0)},J=t.clearTimeout)})();var K=z.timeout=function(){function e(t,e){var n=this,r=new M,i=G(function(){r.isDisposed||r.setDisposable(e(n,t))});return new k(r,T(function(){J(i)}))}function n(e,n,r){var i=this,o=z.normalize(n);if(0===o)return i.scheduleWithState(e,r);var s=new M,u=t.setTimeout(function(){s.isDisposed||s.setDisposable(r(i,e))},o);return new k(s,T(function(){t.clearTimeout(u)}))}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new z(i,e,n,r)}(),Q=function(t){function e(){return this._scheduler.now()}function n(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function r(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function i(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function o(o,s){this._scheduler=o,this._handler=s,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,e,n,r,i)}return D(o,t),o.prototype._clone=function(t){return new o(t,this._handler)},o.prototype._wrap=function(t){var e=this;return function(n,r){try{return t(e._getRecursiveWrapper(n),r)}catch(i){if(!e._handler(i))throw i;return I}}},o.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},o.prototype.schedulePeriodicWithState=function(t,e,n){var r=this,i=!1,o=new M;return o.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(i)return null;try{return n(t)}catch(e){if(i=!0,!r._handler(e))throw e;return o.dispose(),null}})),o},o}(z),X=w.Notification=function(){function t(t,e){this.hasValue=null==e?!1:e,this.kind=t}var e=t.prototype;return e.accept=function(t,e,n){return 1===arguments.length&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},e.toObservable=function(t){var e=this;return t=t||B,new Se(function(n){return t.schedule(function(){e._acceptObservable(n),"N"===e.kind&&n.onCompleted()})})},e.equals=function(t){var e=null==t?"":""+t;return""+this===e},t}(),Y=X.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){var i=new X("N",!0);return i.value=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),Z=X.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){var i=new X("E");return i.exception=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),$=X.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){var r=new X("C");return r._accept=t.bind(r),r._acceptObservable=e.bind(r),r.toString=n.bind(r),r}}(),te=w.Internals.Enumerator=function(t,e,n){this.moveNext=t,this.getCurrent=e,this.dispose=n},ee=te.create=function(t,e,r){var i=!1;return r||(r=n),new te(function(){if(i)return!1;var e=t();return e||(i=!0,r()),e},function(){return e()},function(){i||(r(),i=!0)})},ne=w.Internals.Enumerable=function(){function t(t){this.getEnumerator=t}return t.prototype.concat=function(){var t=this;return new Se(function(n){var r=t.getEnumerator(),i=!1,o=new L,s=B.scheduleRecursive(function(t){var s,u,c=!1;if(!i){try{c=r.moveNext(),c?s=r.getCurrent():r.dispose()}catch(a){u=a,r.dispose()}if(u)return n.onError(u),e;if(!c)return n.onCompleted(),e;var h=new M;o.setDisposable(h),h.setDisposable(s.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){t()}))}});return new k(o,s,T(function(){i=!0,r.dispose()}))})},t.prototype.catchException=function(){var t=this;return new Se(function(n){var r,i=t.getEnumerator(),o=!1,s=new L,u=B.scheduleRecursive(function(t){var u,c,a;if(a=!1,!o){try{a=i.moveNext(),a&&(u=i.getCurrent())}catch(h){c=h}if(c)return n.onError(c),e;if(!a)return r?n.onError(r):n.onCompleted(),e;var l=new M;s.setDisposable(l),l.setDisposable(u.subscribe(n.onNext.bind(n),function(e){r=e,t()},n.onCompleted.bind(n)))}});return new k(s,u,T(function(){o=!0}))})},t}(),re=ne.repeat=function(t,n){return n===e&&(n=-1),new ne(function(){var e,r=n;return ee(function(){return 0===r?!1:(r>0&&r--,e=t,!0)},function(){return e})})},ie=ne.forEach=function(t,e){return e||(e=r),new ne(function(){var n,r=-1;return ee(function(){return++r<t.length?(n=e(t[r],r),!0):!1},function(){return n})})},oe=w.Observer=function(){};oe.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},oe.prototype.asObserver=function(){return new ae(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},oe.prototype.checked=function(){return new he(this)};var se=oe.create=function(t,e,r){return t||(t=n),e||(e=c),r||(r=n),new ae(t,e,r)};oe.fromNotifier=function(t){return new ae(function(e){return t(Y(e))},function(e){return t(Z(e))},function(){return t($())})};var ue,ce=w.Internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return D(e,t),e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(){return this.isStopped?!1:(this.isStopped=!0,this.error(!0),!0)},e}(oe),ae=w.AnonymousObserver=function(t){function e(e,n,r){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=r}return D(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(ce),he=function(t){function e(e){t.call(this),this._observer=e,this._state=0}D(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();try{this._observer.onNext(t)}catch(e){throw e}finally{this._state=0}},n.onError=function(t){this.checkAccess();try{this._observer.onError(t)}catch(e){throw e}finally{this._state=2}},n.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(t){throw t}finally{this._state=2}},n.checkAccess=function(){if(1===this._state)throw Error("Re-entrancy detected");if(2===this._state)throw Error("Observer completed");0===this._state&&(this._state=1)},e}(oe),le=w.Internals.ScheduledObserver=function(t){function n(e,n){t.call(this),this.scheduler=e,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new L}return D(n,t),n.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},n.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},n.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},n.prototype.ensureActive=function(){var t=!1,n=this;!this.hasFaulted&&this.queue.length>0&&(t=!this.isAcquired,this.isAcquired=!0),t&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(t){var r;if(!(n.queue.length>0))return n.isAcquired=!1,e;r=n.queue.shift();try{r()}catch(i){throw n.queue=[],n.hasFaulted=!0,i}t()}))},n.prototype.dispose=function(){t.prototype.dispose.call(this),this.disposable.dispose()},n}(ce),fe=function(t){function e(){t.apply(this,arguments)}return D(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e}(le),pe=w.Observable=function(){function t(t){this._subscribe=t}return ue=t.prototype,ue.finalValue=function(){var t=this;return new Se(function(e){var n,r=!1;return t.subscribe(function(t){r=!0,n=t},e.onError.bind(e),function(){r?(e.onNext(n),e.onCompleted()):e.onError(Error(g))})})},ue.subscribe=ue.forEach=function(t,e,n){var r;return r="object"==typeof t?t:se(t,e,n),this._subscribe(r)},ue.toArray=function(){function t(t,e){var n=t.slice(0);return n.push(e),n}return this.scan([],t).startWith([]).finalValue()},t}();pe.start=function(t,e){return de(t,e)()};var de=pe.toAsync=function(t,n,r){return n||(n=K),function(){var i=C.call(arguments,0),o=new Re;return n.schedule(function(){var n;try{n=t.apply(r,i)}catch(s){return o.onError(s),e}o.onNext(n),o.onCompleted()}),o.asObservable()}};ue.observeOn=function(t){var e=this;return new Se(function(n){return e.subscribe(new fe(t,n))})},ue.subscribeOn=function(t){var e=this;return new Se(function(n){var r=new M,i=new L;return i.setDisposable(r),r.setDisposable(t.schedule(function(){i.setDisposable(new f(t,e.subscribe(n)))})),i})},pe.create=function(t){return new Se(function(e){return T(t(e)||n)})},pe.createWithDisposable=function(t){return new Se(t)};var be=pe.defer=function(t){return new Se(function(e){var n;try{n=t()}catch(r){return ge(r).subscribe(e)}return n.subscribe(e)})},ve=pe.empty=function(t){return t||(t=B),new Se(function(e){return t.schedule(function(){e.onCompleted()})})},me=pe.fromArray=function(t,e){return e||(e=H),new Se(function(n){var r=0;return e.scheduleRecursive(function(e){t.length>r?(n.onNext(t[r++]),e()):n.onCompleted()})})};pe.generate=function(t,n,r,i,o){return o||(o=H),new Se(function(s){var u=!0,c=t;return o.scheduleRecursive(function(t){var o,a;try{u?u=!1:c=r(c),o=n(c),o&&(a=i(c))}catch(h){return s.onError(h),e}o?(s.onNext(a),t()):s.onCompleted()})})};var ye=pe.never=function(){return new Se(function(){return I})};pe.range=function(t,e,n){return n||(n=H),new Se(function(r){return n.scheduleRecursiveWithState(0,function(n,i){e>n?(r.onNext(t+n),i(n+1)):r.onCompleted()})})},pe.repeat=function(t,e,n){return n||(n=H),null==e&&(e=-1),we(t,n).repeat(e)};var we=pe.returnValue=function(t,e){return e||(e=B),new Se(function(n){return e.schedule(function(){n.onNext(t),n.onCompleted()})})},ge=pe.throwException=function(t,e){return e||(e=B),new Se(function(n){return e.schedule(function(){n.onError(t)})})};pe.using=function(t,e){return new Se(function(n){var r,i,o=I;try{r=t(),r&&(o=r),i=e(r)}catch(s){return new k(ge(s).subscribe(n),o)}return new k(i.subscribe(n),o)})},ue.amb=function(t){var e=this;return new Se(function(n){function r(){o||(o=s,a.dispose())}function i(){o||(o=u,c.dispose())}var o,s="L",u="R",c=new M,a=new M;return c.setDisposable(e.subscribe(function(t){r(),o===s&&n.onNext(t)},function(t){r(),o===s&&n.onError(t)},function(){r(),o===s&&n.onCompleted()})),a.setDisposable(t.subscribe(function(t){i(),o===u&&n.onNext(t)},function(t){i(),o===u&&n.onError(t)},function(){i(),o===u&&n.onCompleted()})),new k(c,a)})},pe.amb=function(){function t(t,e){return t.amb(e)}for(var e=ye(),n=h(arguments,0),r=0,i=n.length;i>r;r++)e=t(e,n[r]);return e},ue.catchException=function(t){return"function"==typeof t?d(this,t):Ee([this,t])};var Ee=pe.catchException=function(){var t=h(arguments,0);return ie(t).catchException()};ue.combineLatest=function(){var t=C.call(arguments);return Array.isArray(t[0])?t[0].unshift(this):t.unshift(this),xe.apply(this,t)};var xe=pe.combineLatest=function(){var t=C.call(arguments),n=t.pop();return Array.isArray(t[0])&&(t=t[0]),new Se(function(r){function i(t){var i;if(c[t]=!0,a||(a=c.every(function(t){return t}))){try{i=n.apply(null,f)}catch(o){return r.onError(o),e}r.onNext(i)}else h.filter(function(e,n){return n!==t}).every(function(t){return t})&&r.onCompleted()}function o(t){h[t]=!0,h.every(function(t){return t})&&r.onCompleted()}for(var s=function(){return!1},u=t.length,c=l(u,s),a=!1,h=l(u,s),f=Array(u),p=Array(u),d=0;u>d;d++)(function(e){p[e]=new M,p[e].setDisposable(t[e].subscribe(function(t){f[e]=t,i(e)},r.onError.bind(r),function(){o(e)}))})(d);return new k(p)})};ue.concat=function(){var t=C.call(arguments,0);return t.unshift(this),Ce.apply(this,t)};var Ce=pe.concat=function(){var t=h(arguments,0);return ie(t).concat()};ue.concatObservable=ue.concatAll=function(){return this.merge(1)},ue.merge=function(t){if("number"!=typeof t)return De(this,t);var e=this;return new Se(function(n){var r=0,i=new k,o=!1,s=[],u=function(t){var e=new M;i.add(e),e.setDisposable(t.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){var t;i.remove(e),s.length>0?(t=s.shift(),u(t)):(r--,o&&0===r&&n.onCompleted())}))};return i.add(e.subscribe(function(e){t>r?(r++,u(e)):s.push(e)},n.onError.bind(n),function(){o=!0,0===r&&n.onCompleted()})),i})};var De=pe.merge=function(){var t,e;return arguments[0]?arguments[0].now?(t=arguments[0],e=C.call(arguments,1)):(t=B,e=C.call(arguments,0)):(t=B,e=C.call(arguments,1)),Array.isArray(e[0])&&(e=e[0]),me(e,t).mergeObservable()};ue.mergeObservable=ue.mergeAll=function(){var t=this;return new Se(function(e){var n=new k,r=!1,i=new M;return n.add(i),i.setDisposable(t.subscribe(function(t){var i=new M;n.add(i),i.setDisposable(t.subscribe(function(t){e.onNext(t)},e.onError.bind(e),function(){n.remove(i),r&&1===n.length&&e.onCompleted()}))},e.onError.bind(e),function(){r=!0,1===n.length&&e.onCompleted()})),n})},ue.onErrorResumeNext=function(t){if(!t)throw Error("Second observable is required");return Ae([this,t])};var Ae=pe.onErrorResumeNext=function(){var t=h(arguments,0);return new Se(function(e){var n=0,r=new L,i=B.scheduleRecursive(function(i){var o,s;t.length>n?(o=t[n++],s=new M,r.setDisposable(s),s.setDisposable(o.subscribe(e.onNext.bind(e),function(){i()},function(){i()}))):e.onCompleted()});return new k(r,i)})};ue.skipUntil=function(t){var e=this;return new Se(function(n){var r=!1,i=new k(e.subscribe(function(t){r&&n.onNext(t)},n.onError.bind(n),function(){r&&n.onCompleted()})),o=new M;return i.add(o),o.setDisposable(t.subscribe(function(){r=!0,o.dispose()},n.onError.bind(n),function(){o.dispose()})),i})},ue.switchLatest=function(){var t=this;return new Se(function(e){var n=!1,r=new L,i=!1,o=0,s=t.subscribe(function(t){var s=new M,u=++o;n=!0,r.setDisposable(s),s.setDisposable(t.subscribe(function(t){o===u&&e.onNext(t)},function(t){o===u&&e.onError(t)},function(){o===u&&(n=!1,i&&e.onCompleted())}))},e.onError.bind(e),function(){i=!0,n||e.onCompleted()});return new k(s,r)})},ue.takeUntil=function(t){var e=this;return new Se(function(r){return new k(e.subscribe(r),t.subscribe(r.onCompleted.bind(r),r.onError.bind(r),n))})},ue.zip=function(){if(Array.isArray(arguments[0]))return b.apply(this,arguments);var t=this,n=C.call(arguments),i=n.pop();return n.unshift(t),new Se(function(o){function s(t){a[t]=!0,a.every(function(t){return t})&&o.onCompleted()}for(var u=n.length,c=l(u,function(){return[]}),a=l(u,function(){return!1}),h=function(n){var s,u;if(c.every(function(t){return t.length>0})){try{u=c.map(function(t){return t.shift()}),s=i.apply(t,u)}catch(h){return o.onError(h),e}o.onNext(s)}else a.filter(function(t,e){return e!==n}).every(r)&&o.onCompleted()},f=Array(u),p=0;u>p;p++)(function(t){f[t]=new M,f[t].setDisposable(n[t].subscribe(function(e){c[t].push(e),h(t)},o.onError.bind(o),function(){s(t)}))})(p);return new k(f)})},pe.zip=function(){var t=C.call(arguments,0),e=t.shift();return e.zip.apply(e,t)},pe.zipArray=function(){var t=C.call(arguments);return new Se(function(n){function i(t){if(u.every(function(t){return t.length>0})){var i=u.map(function(t){return t.shift()});n.onNext(i)}else if(c.filter(function(e,n){return n!==t}).every(r))return n.onCompleted(),e}function o(t){return c[t]=!0,c.every(r)?(n.onCompleted(),e):e}for(var s=t.length,u=l(s,function(){return[]}),c=l(s,function(){return!1}),a=Array(s),h=0;s>h;h++)(function(e){a[e]=new M,a[e].setDisposable(t[e].subscribe(function(t){u[e].push(t),i(e)},n.onError.bind(n),function(){o(e)}))})(h);var f=new k(a);return f.add(T(function(){for(var t=0,e=u.length;e>t;t++)u[t]=[]})),f})},ue.asObservable=function(){var t=this;return new Se(function(e){return t.subscribe(e)})},ue.bufferWithCount=function(t,n){return n===e&&(n=t),this.windowWithCount(t,n).selectMany(function(t){return t.toArray()}).where(function(t){return t.length>0})},ue.dematerialize=function(){var t=this;return new Se(function(e){return t.subscribe(function(t){return t.accept(e)},e.onError.bind(e),e.onCompleted.bind(e))})},ue.distinctUntilChanged=function(t,n){var i=this;return t||(t=r),n||(n=o),new Se(function(r){var o,s=!1;return i.subscribe(function(i){var u,c=!1;try{u=t(i)}catch(a){return r.onError(a),e}if(s)try{c=n(o,u)}catch(a){return r.onError(a),e}s&&c||(s=!0,o=u,r.onNext(i))},r.onError.bind(r),r.onCompleted.bind(r))})},ue.doAction=function(t,e,n){var r,i=this;return"function"==typeof t?r=t:(r=t.onNext.bind(t),e=t.onError.bind(t),n=t.onCompleted.bind(t)),new Se(function(t){return i.subscribe(function(e){try{r(e)}catch(n){t.onError(n)}t.onNext(e)},function(n){if(e){try{e(n)}catch(r){t.onError(r)}t.onError(n)}else t.onError(n)},function(){if(n){try{n()}catch(e){t.onError(e)}t.onCompleted()}else t.onCompleted()})})},ue.finallyAction=function(t){var e=this;return new Se(function(n){var r=e.subscribe(n);return T(function(){try{r.dispose()}catch(e){throw e}finally{t()}})})},ue.ignoreElements=function(){var t=this;
return new Se(function(e){return t.subscribe(n,e.onError.bind(e),e.onCompleted.bind(e))})},ue.materialize=function(){var t=this;return new Se(function(e){return t.subscribe(function(t){e.onNext(Y(t))},function(t){e.onNext(Z(t)),e.onCompleted()},function(){e.onNext($()),e.onCompleted()})})},ue.repeat=function(t){return re(this,t).concat()},ue.retry=function(t){return re(this,t).catchException()},ue.scan=function(){var t,e,n=!1;2===arguments.length?(t=arguments[0],e=arguments[1],n=!0):e=arguments[0];var r=this;return be(function(){var i,o=!1;return r.select(function(r){return o?i=e(i,r):(i=n?e(t,r):r,o=!0),i})})},ue.skipLast=function(t){var e=this;return new Se(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&n.onNext(r.shift())},n.onError.bind(n),n.onCompleted.bind(n))})},ue.startWith=function(){var t,e,n=0;return arguments.length&&"now"in Object(arguments[0])?(e=arguments[0],n=1):e=B,t=C.call(arguments,n),ie([me(t,e),this]).concat()},ue.takeLast=function(t,e){return this.takeLastBuffer(t).selectMany(function(t){return me(t,e)})},ue.takeLastBuffer=function(t){var e=this;return new Se(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&r.shift()},n.onError.bind(n),function(){n.onNext(r),n.onCompleted()})})},ue.windowWithCount=function(t,e){var n=this;if(0>=t)throw Error(E);if(null==e&&(e=t),0>=e)throw Error(E);return new Se(function(r){var i=new M,o=new V(i),s=0,u=[],c=function(){var t=new We;u.push(t),r.onNext(S(t,o))};return c(),i.setDisposable(n.subscribe(function(n){for(var r,i=0,o=u.length;o>i;i++)u[i].onNext(n);var a=s-t+1;a>=0&&0===a%e&&(r=u.shift(),r.onCompleted()),s++,0===s%e&&c()},function(t){for(;u.length>0;)u.shift().onError(t);r.onError(t)},function(){for(;u.length>0;)u.shift().onCompleted();r.onCompleted()})),o})},ue.defaultIfEmpty=function(t){var n=this;return t===e&&(t=null),new Se(function(e){var r=!1;return n.subscribe(function(t){r=!0,e.onNext(t)},e.onError.bind(e),function(){r||e.onNext(t),e.onCompleted()})})},ue.distinct=function(t,n){var i=this;return t||(t=r),n||(n=u),new Se(function(r){var o={};return i.subscribe(function(i){var s,u,c,a=!1;try{s=t(i),u=n(s)}catch(h){return r.onError(h),e}for(c in o)if(u===c){a=!0;break}a||(o[u]=null,r.onNext(i))},r.onError.bind(r),r.onCompleted.bind(r))})},ue.groupBy=function(t,e,n){return this.groupByUntil(t,e,function(){return ye()},n)},ue.groupByUntil=function(t,i,o,s){var c=this;return i||(i=r),s||(s=u),new Se(function(r){var u={},a=new k,h=new V(a);return a.add(c.subscribe(function(c){var l,f,p,d,b,v,m,y,w,g;try{v=t(c),m=s(v)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}d=!1;try{w=u[m],w||(w=new We,u[m]=w,d=!0)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}if(d){b=new Ne(v,w,h),f=new Ne(v,w);try{l=o(f)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}r.onNext(b),y=new M,a.add(y);var x=function(){m in u&&(delete u[m],w.onCompleted()),a.remove(y)};y.setDisposable(l.take(1).subscribe(n,function(t){for(g in u)u[g].onError(t);r.onError(t)},function(){x()}))}try{p=i(c)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}w.onNext(p)},function(t){for(var e in u)u[e].onError(t);r.onError(t)},function(){for(var t in u)u[t].onCompleted();r.onCompleted()})),h})},ue.select=function(t,n){var r=this;return new Se(function(i){var o=0;return r.subscribe(function(s){var u;try{u=t.call(n,s,o++,r)}catch(c){return i.onError(c),e}i.onNext(u)},i.onError.bind(i),i.onCompleted.bind(i))})},ue.map=ue.select,ue.selectMany=ue.flatMap=function(t,e){return e?this.selectMany(function(n){return t(n).select(function(t){return e(n,t)})}):"function"==typeof t?v.call(this,t):v.call(this,function(){return t})},ue.skip=function(t){if(0>t)throw Error(E);var e=this;return new Se(function(n){var r=t;return e.subscribe(function(t){0>=r?n.onNext(t):r--},n.onError.bind(n),n.onCompleted.bind(n))})},ue.skipWhile=function(t){var n=this;return new Se(function(r){var i=0,o=!1;return n.subscribe(function(n){if(!o)try{o=!t(n,i++)}catch(s){return r.onError(s),e}o&&r.onNext(n)},r.onError.bind(r),r.onCompleted.bind(r))})},ue.take=function(t,e){if(0>t)throw Error(E);if(0===t)return ve(e);var n=this;return new Se(function(e){var r=t;return n.subscribe(function(t){r>0&&(r--,e.onNext(t),0===r&&e.onCompleted())},e.onError.bind(e),e.onCompleted.bind(e))})},ue.takeWhile=function(t){var n=this;return new Se(function(r){var i=0,o=!0;return n.subscribe(function(n){if(o){try{o=t(n,i++)}catch(s){return r.onError(s),e}o?r.onNext(n):r.onCompleted()}},r.onError.bind(r),r.onCompleted.bind(r))})},ue.where=function(t,n){var r=this;return new Se(function(i){var o=0;return r.subscribe(function(s){var u;try{u=t.call(n,s,o++,r)}catch(c){return i.onError(c),e}u&&i.onNext(s)},i.onError.bind(i),i.onCompleted.bind(i))})},ue.filter=ue.where;var Se=w.Internals.AnonymousObservable=function(t){function n(r){function i(t){var e=new _e(t);if(H.scheduleRequired())H.schedule(function(){try{e.disposable(r(e))}catch(t){if(!e.fail(t))throw t}});else try{e.disposable(r(e))}catch(n){if(!e.fail(n))throw n}return e}return this instanceof n?(t.call(this,i),e):new n(r)}return D(n,t),n}(pe),_e=function(t){function e(e){t.call(this),this.observer=e,this.m=new M}D(e,t);var n=e.prototype;return n.next=function(t){var e=!1;try{this.observer.onNext(t),e=!0}catch(n){throw n}finally{e||this.dispose()}},n.error=function(t){try{this.observer.onError(t)}catch(e){throw e}finally{this.dispose()}},n.completed=function(){try{this.observer.onCompleted()}catch(t){throw t}finally{this.dispose()}},n.disposable=function(t){return this.m.disposable(t)},n.dispose=function(){t.prototype.dispose.call(this),this.m.dispose()},e}(ce),Ne=function(t){function e(t){return this.underlyingObservable.subscribe(t)}function n(n,r,i){t.call(this,e),this.key=n,this.underlyingObservable=i?new Se(function(t){return new k(i.getDisposable(),r.subscribe(t))}):r}return D(n,t),n}(pe),Oe=function(t,e){this.subject=t,this.observer=e};Oe.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var t=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(t,1),this.observer=null}};var We=w.Subject=function(t){function e(t){return a.call(this),this.isStopped?this.exception?(t.onError(this.exception),I):(t.onCompleted(),I):(this.observers.push(t),new Oe(this,t))}function n(){t.call(this,e),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return D(n,t),A(n.prototype,oe,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(a.call(this),!this.isStopped){var t=this.observers.slice(0);this.isStopped=!0;for(var e=0,n=t.length;n>e;e++)t[e].onCompleted();this.observers=[]}},onError:function(t){if(a.call(this),!this.isStopped){var e=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var n=0,r=e.length;r>n;n++)e[n].onError(t);this.observers=[]}},onNext:function(t){if(a.call(this),!this.isStopped)for(var e=this.observers.slice(0),n=0,r=e.length;r>n;n++)e[n].onNext(t)},dispose:function(){this.isDisposed=!0,this.observers=null}}),n.create=function(t,e){return new ke(t,e)},n}(pe),Re=w.AsyncSubject=function(t){function e(t){if(a.call(this),!this.isStopped)return this.observers.push(t),new Oe(this,t);var e=this.exception,n=this.hasValue,r=this.value;return e?t.onError(e):n?(t.onNext(r),t.onCompleted()):t.onCompleted(),I}function n(){t.call(this,e),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return D(n,t),A(n.prototype,oe,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){var t,e,n;if(a.call(this),!this.isStopped){var r=this.observers.slice(0);this.isStopped=!0;var i=this.value,o=this.hasValue;if(o)for(e=0,n=r.length;n>e;e++)t=r[e],t.onNext(i),t.onCompleted();else for(e=0,n=r.length;n>e;e++)r[e].onCompleted();this.observers=[]}},onError:function(t){if(a.call(this),!this.isStopped){var e=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var n=0,r=e.length;r>n;n++)e[n].onError(t);this.observers=[]}},onNext:function(t){a.call(this),this.isStopped||(this.value=t,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),n}(pe),ke=function(t){function e(t){return this.observable.subscribe(t)}function n(n,r){t.call(this,e),this.observer=n,this.observable=r}return D(n,t),A(n.prototype,oe,{onCompleted:function(){this.observer.onCompleted()},onError:function(t){this.observer.onError(t)},onNext:function(t){this.observer.onNext(t)}}),n}(pe);return"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t.Rx=w,define(function(){return w})):(m?"object"==typeof module&&module&&module.exports==m?module.exports=w:m=w:t.Rx=w,e)})(this);

@@ -1,2 +0,2 @@

(function(t,e){function n(){}function r(t){return t}function i(){return(new Date).getTime()}function o(t,e){return t===e}function s(t,e){return t-e}function u(t){return""+t}function c(t){throw t}function a(){if(this.isDisposed)throw Error(x)}function h(t,e){return 1===t.length&&Array.isArray(t[e])?t[e]:C.call(t)}function l(t,e){for(var n=Array(t),r=0;t>r;r++)n[r]=e();return n}function f(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function p(t,e,n,r,i){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=i||s,this.disposable=new j}function d(t,n){return new De(function(r){var i=new j,o=new P;return o.setDisposable(i),i.setDisposable(t.subscribe(r.onNext.bind(r),function(t){var i,s;try{s=n(t)}catch(u){return r.onError(u),e}i=new j,o.setDisposable(i),i.setDisposable(s.subscribe(r))},r.onCompleted.bind(r))),o})}function b(t,n){var r=this;return new De(function(i){var o=0,s=t.length;return r.subscribe(function(r){if(s>o){var u,c=t[o++];try{u=n(r,c)}catch(a){return i.onError(a),e}i.onNext(u)}else i.onCompleted()},i.onError.bind(i),i.onCompleted.bind(i))})}function v(t){return this.select(t).mergeObservable()}var m="object"==typeof exports&&exports,y=("object"==typeof module&&module&&module.exports==m&&module,"object"==typeof global&&global);y.global===y&&(t=y);var w={Internals:{}},g="Sequence contains no elements.",E="Argument out of range",x="Object has been disposed",C=Array.prototype.slice;({}).hasOwnProperty;var D=this.inherits=w.Internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},A=w.Internals.addProperties=function(t){for(var e=C.call(arguments,1),n=0,r=e.length;r>n;n++){var i=e[n];for(var o in i)t[o]=i[o]}},S=w.Internals.addRef=function(t,e){return new De(function(n){return new R(e.getDisposable(),t.subscribe(n))})},_=function(t,e){this.id=t,this.value=e};_.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var N=function(t){this.items=Array(t),this.length=0},W=N.prototype;W.isHigherPriority=function(t,e){return 0>this.items[t].compareTo(this.items[e])},W.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},W.heapify=function(t){if(t===e&&(t=0),!(t>=this.length||0>t)){var n=2*t+1,r=2*t+2,i=t;if(this.length>n&&this.isHigherPriority(n,i)&&(i=n),this.length>r&&this.isHigherPriority(r,i)&&(i=r),i!==t){var o=this.items[t];this.items[t]=this.items[i],this.items[i]=o,this.heapify(i)}}},W.peek=function(){return this.items[0].value},W.removeAt=function(t){this.items[t]=this.items[--this.length],delete this.items[this.length],this.heapify()},W.dequeue=function(){var t=this.peek();return this.removeAt(0),t},W.enqueue=function(t){var e=this.length++;this.items[e]=new _(N.count++,t),this.percolate(e)},W.remove=function(t){for(var e=0;this.length>e;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},N.count=0;var R=w.CompositeDisposable=function(){this.disposables=h(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},O=R.prototype;O.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},O.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},O.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()}},O.clear=function(){var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()},O.contains=function(t){return-1!==this.disposables.indexOf(t)},O.toArray=function(){return this.disposables.slice(0)};var k=w.Disposable=function(t){this.isDisposed=!1,this.action=t};k.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var q=k.create=function(t){return new k(t)},T=k.empty={dispose:n},j=w.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null},I=j.prototype;I.disposable=function(t){return t?this.setDisposable(t):this.getDisposable()},I.getDisposable=function(){return this.current},I.setDisposable=function(t){if(this.current)throw Error("Disposable has already been assigned");var e=this.isDisposed;e||(this.current=t),e&&t&&t.dispose()},I.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var P=w.SerialDisposable=function(){this.isDisposed=!1,this.current=null};P.prototype.getDisposable=function(){return this.current},P.prototype.setDisposable=function(t){var e,n=this.isDisposed;n||(e=this.current,this.current=t),e&&e.dispose(),n&&t&&t.dispose()},P.prototype.disposable=function(t){return t?(this.setDisposable(t),e):this.getDisposable()},P.prototype.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var M=w.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.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()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?T:new t(this)},e}();f.prototype.dispose=function(){var t=this;this.scheduler.schedule(function(){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())})},p.prototype.invoke=function(){this.disposable.disposable(this.invokeCore())},p.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},p.prototype.isCancelled=function(){return this.disposable.isDisposed},p.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var L=w.Scheduler=function(){function e(t,e,n,r){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=r}function n(t,e){var n=e.first,r=e.second,i=new R,o=function(e){r(e,function(e){var n=!1,r=!1,s=t.scheduleWithState(e,function(t,e){return n?i.remove(s):r=!0,o(e),T});r||(i.add(s),n=!0)})};return o(n),i}function r(t,e,n){var r=e.first,i=e.second,o=new R,s=function(e){i(e,function(e,r){var i=!1,u=!1,c=t[n].call(t,e,r,function(t,e){return i?o.remove(c):u=!0,s(e),T});u||(o.add(c),i=!0)})};return s(r),o}function o(t,e){return e(),T}var s=e.prototype;return s.catchException=function(t){return new J(this,t)},s.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,function(){e()})},s.schedulePeriodicWithState=function(e,n,r){var i=e,o=t.setInterval(function(){i=r(i)},n);return q(function(){t.clearInterval(o)})},s.schedule=function(t){return this._schedule(t,o)},s.scheduleWithState=function(t,e){return this._schedule(t,e)},s.scheduleWithRelative=function(t,e){return this._scheduleRelative(e,t,o)},s.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},s.scheduleWithAbsolute=function(t,e){return this._scheduleAbsolute(e,t,o)},s.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},s.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,function(t,e){t(function(){e(t)})})},s.scheduleRecursiveWithState=function(t,e){return this.scheduleWithState({first:t,second:e},function(t,e){return n(t,e)})},s.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithRelativeAndState=function(t,e,n){return this._scheduleRelative({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithRelativeAndState")})},s.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithAbsoluteAndState")})},e.now=i,e.normalize=function(t){return 0>t&&(t=0),t},e}(),V="Scheduler is not allowed to block the thread",z=L.immediate=function(){function t(t,e){return e(this,t)}function e(t,e,n){if(e>0)throw Error(V);return n(this,t)}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new L(i,t,e,n)}(),B=L.currentThread=function(){function t(){o=new N(4)}function e(t,e){return this.scheduleWithRelativeAndState(t,0,e)}function n(e,n,r){var i,s=this.now()+L.normalize(n),u=new p(this,e,r,s);if(o)o.enqueue(u);else{i=new t;try{o.enqueue(u),i.run()}catch(c){throw c}finally{i.dispose()}}return u.disposable}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}var o;t.prototype.dispose=function(){o=null},t.prototype.run=function(){for(var t;o.length>0;)if(t=o.dequeue(),!t.isCancelled()){for(;t.dueTime-L.now()>0;);t.isCancelled()||t.invoke()}};var s=new L(i,e,n,r);return s.scheduleRequired=function(){return null===o},s.ensureTrampoline=function(t){return null===o?this.schedule(t):t()},s}(),F=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new j;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}();w.VirtualTimeScheduler=function(t){function n(){return this.toDateTimeOffset(this.clock)}function r(t,e){return this.scheduleAbsoluteWithState(t,this.clock,e)}function i(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e),n)}function o(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e-this.now()),n)}function s(t,e){return e(),T}function u(e,s){this.clock=e,this.comparer=s,this.isEnabled=!1,this.queue=new N(1024),t.call(this,n,r,i,o)}D(u,t);var c=u.prototype;return c.schedulePeriodicWithState=function(t,e,n){var r=new F(this,t,e,n);return r.start()},c.scheduleRelativeWithState=function(t,e,n){var r=this.add(this.clock,e);return this.scheduleAbsoluteWithState(t,r,n)},c.scheduleRelative=function(t,e){return this.scheduleRelativeWithState(e,t,s)},c.start=function(){var t;if(!this.isEnabled){this.isEnabled=!0;do t=this.getNext(),null!==t?(this.comparer(t.dueTime,this.clock)>0&&(this.clock=t.dueTime),t.invoke()):this.isEnabled=!1;while(this.isEnabled)}},c.stop=function(){this.isEnabled=!1},c.advanceTo=function(t){var e,n=this.comparer(this.clock,t);if(this.comparer(this.clock,t)>0)throw Error(E);if(0!==n&&!this.isEnabled){this.isEnabled=!0;do e=this.getNext(),null!==e&&0>=this.comparer(e.dueTime,t)?(this.comparer(e.dueTime,this.clock)>0&&(this.clock=e.dueTime),e.invoke()):this.isEnabled=!1;while(this.isEnabled);this.clock=t}},c.advanceBy=function(t){var n=this.add(this.clock,t),r=this.comparer(this.clock,n);if(r>0)throw Error(E);return 0!==r?this.advanceTo(n):e},c.sleep=function(t){var e=this.add(this.clock,t);if(this.comparer(this.clock,e)>=0)throw Error(E);this.clock=e},c.getNext=function(){for(var t;this.queue.length>0;){if(t=this.queue.peek(),!t.isCancelled())return t;this.queue.dequeue()}return null},c.scheduleAbsolute=function(t,e){return this.scheduleAbsoluteWithState(e,t,s)},c.scheduleAbsoluteWithState=function(t,e,n){var r=this,i=function(t,e){return r.queue.remove(o),n(t,e)},o=new p(r,t,i,e,r.comparer);return r.queue.enqueue(o),o.disposable},u}(L),w.HistoricalScheduler=function(t){function e(e,n){var r=null==e?0:e,i=n||s;t.call(this,r,i)}D(e,t);var n=e.prototype;return n.add=function(t,e){return t+e},n.toDateTimeOffset=function(t){return new Date(t).getTime()},n.toRelative=function(t){return t},e}(w.VirtualTimeScheduler);var H,U=n;(function(){function e(){if(!t.postMessage||t.importScripts)return!1;var e=!1,n=t.onmessage;return t.onmessage=function(){e=!0},t.postMessage("","*"),t.onmessage=n,e}function n(t){if("string"==typeof t.data&&t.data.substring(0,r.length)===r){var e=t.data.substring(r.length),n=i[e];n(),delete i[e]}}if("object"==typeof t.process&&"[object process]"===Object.prototype.toString.call(t.process))H=t.process.nextTick;else if("function"==typeof t.setImmediate)H=t.setImmediate,U=t.clearImmediate;else if(e()){var r="ms.rx.schedule"+Math.random(),i={},o=0;t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n,!1),H=function(e){var n=o++;i[n]=e,t.postMessage(r+n,"*")}}else if(t.MessageChannel){var s=new t.MessageChannel,u={},c=0;s.port1.onmessage=function(t){var e=t.data,n=u[e];n(),delete u[e]},H=function(t){var e=c++;u[e]=t,s.port2.postMessage(e)}}else"document"in t&&"onreadystatechange"in t.document.createElement("script")?H=function(e){var n=t.document.createElement("script");n.onreadystatechange=function(){e(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},t.document.documentElement.appendChild(n)}:(H=function(e){return t.setTimeout(e,0)},U=t.clearTimeout)})();var G=L.timeout=function(){function e(t,e){var n=this,r=new j,i=H(function(){r.isDisposed||r.setDisposable(e(n,t))});return new R(r,q(function(){U(i)}))}function n(e,n,r){var i=this,o=L.normalize(n);if(0===o)return i.scheduleWithState(e,r);var s=new j,u=t.setTimeout(function(){s.isDisposed||s.setDisposable(r(i,e))},o);return new R(s,q(function(){t.clearTimeout(u)}))}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new L(i,e,n,r)}(),J=function(t){function e(){return this._scheduler.now()}function n(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function r(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function i(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function o(o,s){this._scheduler=o,this._handler=s,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,e,n,r,i)}return D(o,t),o.prototype._clone=function(t){return new o(t,this._handler)},o.prototype._wrap=function(t){var e=this;return function(n,r){try{return t(e._getRecursiveWrapper(n),r)}catch(i){if(!e._handler(i))throw i;return T}}},o.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},o.prototype.schedulePeriodicWithState=function(t,e,n){var r=this,i=!1,o=new j;return o.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(i)return null;try{return n(t)}catch(e){if(i=!0,!r._handler(e))throw e;return o.dispose(),null}})),o},o}(L),K=w.Notification=function(){function t(t,e){this.hasValue=null==e?!1:e,this.kind=t}var e=t.prototype;return e.accept=function(t,e,n){return 1===arguments.length&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},e.toObservable=function(t){var e=this;return t=t||z,new De(function(n){return t.schedule(function(){e._acceptObservable(n),"N"===e.kind&&n.onCompleted()})})},e.equals=function(t){var e=null==t?"":""+t;return""+this===e},t}(),Q=K.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){var i=new K("N",!0);return i.value=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),X=K.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){var i=new K("E");return i.exception=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),Y=K.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){var r=new K("C");return r._accept=t.bind(r),r._acceptObservable=e.bind(r),r.toString=n.bind(r),r}}(),Z=w.Internals.Enumerator=function(t,e,n){this.moveNext=t,this.getCurrent=e,this.dispose=n},$=Z.create=function(t,e,r){var i=!1;return r||(r=n),new Z(function(){if(i)return!1;var e=t();return e||(i=!0,r()),e},function(){return e()},function(){i||(r(),i=!0)})},te=w.Internals.Enumerable=function(){function t(t){this.getEnumerator=t}return t.prototype.concat=function(){var t=this;return new De(function(n){var r=t.getEnumerator(),i=!1,o=new P,s=z.scheduleRecursive(function(t){var s,u,c=!1;if(!i){try{c=r.moveNext(),c?s=r.getCurrent():r.dispose()}catch(a){u=a,r.dispose()}if(u)return n.onError(u),e;if(!c)return n.onCompleted(),e;var h=new j;o.setDisposable(h),h.setDisposable(s.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){t()}))}});return new R(o,s,q(function(){i=!0,r.dispose()}))})},t.prototype.catchException=function(){var t=this;return new De(function(n){var r,i=t.getEnumerator(),o=!1,s=new P,u=z.scheduleRecursive(function(t){var u,c,a;if(a=!1,!o){try{a=i.moveNext(),a&&(u=i.getCurrent())}catch(h){c=h}if(c)return n.onError(c),e;if(!a)return r?n.onError(r):n.onCompleted(),e;var l=new j;s.setDisposable(l),l.setDisposable(u.subscribe(n.onNext.bind(n),function(e){r=e,t()},n.onCompleted.bind(n)))}});return new R(s,u,q(function(){o=!0}))})},t}(),ee=te.repeat=function(t,n){return n===e&&(n=-1),new te(function(){var e,r=n;return $(function(){return 0===r?!1:(r>0&&r--,e=t,!0)},function(){return e})})},ne=te.forEach=function(t,e){return e||(e=r),new te(function(){var n,r=-1;return $(function(){return++r<t.length?(n=e(t[r],r),!0):!1},function(){return n})})},re=w.Observer=function(){};re.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},re.prototype.asObserver=function(){return new ue(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},re.prototype.checked=function(){return new ce(this)};var ie=re.create=function(t,e,r){return t||(t=n),e||(e=c),r||(r=n),new ue(t,e,r)};re.fromNotifier=function(t){return new ue(function(e){return t(Q(e))},function(e){return t(X(e))},function(){return t(Y())})};var oe,se=w.Internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return D(e,t),e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(){return this.isStopped?!1:(this.isStopped=!0,this.error(!0),!0)},e}(re),ue=w.AnonymousObserver=function(t){function e(e,n,r){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=r}return D(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(se),ce=function(t){function e(e){t.call(this),this._observer=e,this._state=0}D(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();try{this._observer.onNext(t)}catch(e){throw e}finally{this._state=0}},n.onError=function(t){this.checkAccess();try{this._observer.onError(t)}catch(e){throw e}finally{this._state=2}},n.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(t){throw t}finally{this._state=2}},n.checkAccess=function(){if(1===this._state)throw Error("Re-entrancy detected");if(2===this._state)throw Error("Observer completed");0===this._state&&(this._state=1)},e}(re),ae=w.Internals.ScheduledObserver=function(t){function n(e,n){t.call(this),this.scheduler=e,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new P}return D(n,t),n.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},n.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},n.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},n.prototype.ensureActive=function(){var t=!1,n=this;!this.hasFaulted&&this.queue.length>0&&(t=!this.isAcquired,this.isAcquired=!0),t&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(t){var r;if(!(n.queue.length>0))return n.isAcquired=!1,e;r=n.queue.shift();try{r()}catch(i){throw n.queue=[],n.hasFaulted=!0,i}t()}))},n.prototype.dispose=function(){t.prototype.dispose.call(this),this.disposable.dispose()},n}(se),he=function(t){function e(){t.apply(this,arguments)}return D(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e}(ae),le=w.Observable=function(){function t(t){this._subscribe=t}return oe=t.prototype,oe.finalValue=function(){var t=this;return new De(function(e){var n,r=!1;return t.subscribe(function(t){r=!0,n=t},e.onError.bind(e),function(){r?(e.onNext(n),e.onCompleted()):e.onError(Error(g))})})},oe.subscribe=oe.forEach=function(t,e,n){var r;return r="object"==typeof t?t:ie(t,e,n),this._subscribe(r)},oe.toArray=function(){function t(t,e){var n=t.slice(0);return n.push(e),n}return this.scan([],t).startWith([]).finalValue()},t}();le.start=function(t,e){return fe(t,e)()};var fe=le.toAsync=function(t,n,r){return n||(n=G),function(){var i=C.call(arguments,0),o=new We;return n.schedule(function(){var n;try{n=t.apply(r,i)}catch(s){return o.onError(s),e}o.onNext(n),o.onCompleted()}),o.asObservable()}};oe.observeOn=function(t){var e=this;return new De(function(n){return e.subscribe(new he(t,n))})},oe.subscribeOn=function(t){var e=this;return new De(function(n){var r=new j,i=new P;return i.setDisposable(r),r.setDisposable(t.schedule(function(){i.setDisposable(new f(t,e.subscribe(n)))})),i})},le.create=function(t){return new De(function(e){return q(t(e))})},le.createWithDisposable=function(t){return new De(t)};var pe=le.defer=function(t){return new De(function(e){var n;try{n=t()}catch(r){return ye(r).subscribe(e)}return n.subscribe(e)})},de=le.empty=function(t){return t||(t=z),new De(function(e){return t.schedule(function(){e.onCompleted()})})},be=le.fromArray=function(t,e){return e||(e=B),new De(function(n){var r=0;return e.scheduleRecursive(function(e){t.length>r?(n.onNext(t[r++]),e()):n.onCompleted()})})};le.generate=function(t,n,r,i,o){return o||(o=B),new De(function(s){var u=!0,c=t;return o.scheduleRecursive(function(t){var o,a;try{u?u=!1:c=r(c),o=n(c),o&&(a=i(c))}catch(h){return s.onError(h),e}o?(s.onNext(a),t()):s.onCompleted()})})};var ve=le.never=function(){return new De(function(){return T})};le.range=function(t,e,n){return n||(n=B),new De(function(r){return n.scheduleRecursiveWithState(0,function(n,i){e>n?(r.onNext(t+n),i(n+1)):r.onCompleted()})})},le.repeat=function(t,e,n){return n||(n=B),null==e&&(e=-1),me(t,n).repeat(e)};var me=le.returnValue=function(t,e){return e||(e=z),new De(function(n){return e.schedule(function(){n.onNext(t),n.onCompleted()})})},ye=le.throwException=function(t,e){return e||(e=z),new De(function(n){return e.schedule(function(){n.onError(t)})})};le.using=function(t,e){return new De(function(n){var r,i,o=T;try{r=t(),r&&(o=r),i=e(r)}catch(s){return new R(ye(s).subscribe(n),o)}return new R(i.subscribe(n),o)})},oe.amb=function(t){var e=this;return new De(function(n){function r(){o||(o=s,a.dispose())}function i(){o||(o=u,c.dispose())}var o,s="L",u="R",c=new j,a=new j;return c.setDisposable(e.subscribe(function(t){r(),o===s&&n.onNext(t)},function(t){r(),o===s&&n.onError(t)},function(){r(),o===s&&n.onCompleted()})),a.setDisposable(t.subscribe(function(t){i(),o===u&&n.onNext(t)},function(t){i(),o===u&&n.onError(t)},function(){i(),o===u&&n.onCompleted()})),new R(c,a)})},le.amb=function(){function t(t,e){return t.amb(e)}for(var e=ve(),n=h(arguments,0),r=0,i=n.length;i>r;r++)e=t(e,n[r]);return e},oe.catchException=function(t){return"function"==typeof t?d(this,t):we([this,t])};var we=le.catchException=function(){var t=h(arguments,0);return ne(t).catchException()};oe.combineLatest=function(){var t=C.call(arguments);return Array.isArray(t[0])?t[0].unshift(this):t.unshift(this),ge.apply(this,t)};var ge=le.combineLatest=function(){var t=C.call(arguments),n=t.pop();return Array.isArray(t[0])&&(t=t[0]),new De(function(r){function i(t){var i;if(c[t]=!0,a||(a=c.every(function(t){return t}))){try{i=n.apply(null,f)}catch(o){return r.onError(o),e}r.onNext(i)}else h.filter(function(e,n){return n!==t}).every(function(t){return t})&&r.onCompleted()}function o(t){h[t]=!0,h.every(function(t){return t})&&r.onCompleted()}for(var s=function(){return!1},u=t.length,c=l(u,s),a=!1,h=l(u,s),f=Array(u),p=Array(u),d=0;u>d;d++)(function(e){p[e]=new j,p[e].setDisposable(t[e].subscribe(function(t){f[e]=t,i(e)},r.onError.bind(r),function(){o(e)}))})(d);return new R(p)})};oe.concat=function(){var t=C.call(arguments,0);return t.unshift(this),Ee.apply(this,t)};var Ee=le.concat=function(){var t=h(arguments,0);return ne(t).concat()};oe.concatObservable=oe.concatAll=function(){return this.merge(1)},oe.merge=function(t){if("number"!=typeof t)return xe(this,t);var e=this;return new De(function(n){var r=0,i=new R,o=!1,s=[],u=function(t){var e=new j;i.add(e),e.setDisposable(t.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){var t;i.remove(e),s.length>0?(t=s.shift(),u(t)):(r--,o&&0===r&&n.onCompleted())}))};return i.add(e.subscribe(function(e){t>r?(r++,u(e)):s.push(e)},n.onError.bind(n),function(){o=!0,0===r&&n.onCompleted()})),i})};var xe=le.merge=function(){var t,e;return arguments[0]?arguments[0].now?(t=arguments[0],e=C.call(arguments,1)):(t=z,e=C.call(arguments,0)):(t=z,e=C.call(arguments,1)),Array.isArray(e[0])&&(e=e[0]),be(e,t).mergeObservable()};oe.mergeObservable=oe.mergeAll=function(){var t=this;return new De(function(e){var n=new R,r=!1,i=new j;return n.add(i),i.setDisposable(t.subscribe(function(t){var i=new j;n.add(i),i.setDisposable(t.subscribe(function(t){e.onNext(t)},e.onError.bind(e),function(){n.remove(i),r&&1===n.length&&e.onCompleted()}))},e.onError.bind(e),function(){r=!0,1===n.length&&e.onCompleted()})),n})},oe.onErrorResumeNext=function(t){if(!t)throw Error("Second observable is required");return Ce([this,t])};var Ce=le.onErrorResumeNext=function(){var t=h(arguments,0);return new De(function(e){var n=0,r=new P,i=z.scheduleRecursive(function(i){var o,s;t.length>n?(o=t[n++],s=new j,r.setDisposable(s),s.setDisposable(o.subscribe(e.onNext.bind(e),function(){i()},function(){i()}))):e.onCompleted()});return new R(r,i)})};oe.skipUntil=function(t){var e=this;return new De(function(n){var r=!1,i=new R(e.subscribe(function(t){r&&n.onNext(t)},n.onError.bind(n),function(){r&&n.onCompleted()})),o=new j;return i.add(o),o.setDisposable(t.subscribe(function(){r=!0,o.dispose()},n.onError.bind(n),function(){o.dispose()})),i})},oe.switchLatest=function(){var t=this;return new De(function(e){var n=!1,r=new P,i=!1,o=0,s=t.subscribe(function(t){var s=new j,u=++o;n=!0,r.setDisposable(s),s.setDisposable(t.subscribe(function(t){o===u&&e.onNext(t)},function(t){o===u&&e.onError(t)},function(){o===u&&(n=!1,i&&e.onCompleted())}))},e.onError.bind(e),function(){i=!0,n||e.onCompleted()});return new R(s,r)})},oe.takeUntil=function(t){var e=this;return new De(function(r){return new R(e.subscribe(r),t.subscribe(r.onCompleted.bind(r),r.onError.bind(r),n))})},oe.zip=function(){if(Array.isArray(arguments[0]))return b.apply(this,arguments);var t=this,n=C.call(arguments),i=n.pop();return n.unshift(t),new De(function(o){function s(t){a[t]=!0,a.every(function(t){return t})&&o.onCompleted()}for(var u=n.length,c=l(u,function(){return[]}),a=l(u,function(){return!1}),h=function(n){var s,u;if(c.every(function(t){return t.length>0})){try{u=c.map(function(t){return t.shift()}),s=i.apply(t,u)}catch(h){return o.onError(h),e}o.onNext(s)}else a.filter(function(t,e){return e!==n}).every(r)&&o.onCompleted()},f=Array(u),p=0;u>p;p++)(function(t){f[t]=new j,f[t].setDisposable(n[t].subscribe(function(e){c[t].push(e),h(t)},o.onError.bind(o),function(){s(t)}))})(p);return new R(f)})},le.zip=function(){var t=C.call(arguments,0),e=t.shift();return e.zip.apply(e,t)},le.zipArray=function(){var t=C.call(arguments);return new De(function(n){function i(t){if(u.every(function(t){return t.length>0})){var i=u.map(function(t){return t.shift()});n.onNext(i)}else if(c.filter(function(e,n){return n!==t}).every(r))return n.onCompleted(),e}function o(t){return c[t]=!0,c.every(r)?(n.onCompleted(),e):e}for(var s=t.length,u=l(s,function(){return[]}),c=l(s,function(){return!1}),a=Array(s),h=0;s>h;h++)(function(e){a[e]=new j,a[e].setDisposable(t[e].subscribe(function(t){u[e].push(t),i(e)},n.onError.bind(n),function(){o(e)}))})(h);var f=new R(a);return f.add(q(function(){for(var t=0,e=u.length;e>t;t++)u[t]=[]})),f})},oe.asObservable=function(){var t=this;return new De(function(e){return t.subscribe(e)})},oe.bufferWithCount=function(t,n){return n===e&&(n=t),this.windowWithCount(t,n).selectMany(function(t){return t.toArray()}).where(function(t){return t.length>0})},oe.dematerialize=function(){var t=this;return new De(function(e){return t.subscribe(function(t){return t.accept(e)},e.onError.bind(e),e.onCompleted.bind(e))})},oe.distinctUntilChanged=function(t,n){var i=this;return t||(t=r),n||(n=o),new De(function(r){var o,s=!1;return i.subscribe(function(i){var u,c=!1;try{u=t(i)}catch(a){return r.onError(a),e}if(s)try{c=n(o,u)}catch(a){return r.onError(a),e}s&&c||(s=!0,o=u,r.onNext(i))},r.onError.bind(r),r.onCompleted.bind(r))})},oe.doAction=function(t,e,n){var r,i=this;return"function"==typeof t?r=t:(r=t.onNext.bind(t),e=t.onError.bind(t),n=t.onCompleted.bind(t)),new De(function(t){return i.subscribe(function(e){try{r(e)}catch(n){t.onError(n)}t.onNext(e)},function(n){if(e){try{e(n)}catch(r){t.onError(r)}t.onError(n)}else t.onError(n)},function(){if(n){try{n()}catch(e){t.onError(e)}t.onCompleted()}else t.onCompleted()})})},oe.finallyAction=function(t){var e=this;return new De(function(n){var r=e.subscribe(n);return q(function(){try{r.dispose()}catch(e){throw e}finally{t()}})})},oe.ignoreElements=function(){var t=this;return new De(function(e){return t.subscribe(n,e.onError.bind(e),e.onCompleted.bind(e))})},oe.materialize=function(){var t=this;return new De(function(e){return t.subscribe(function(t){e.onNext(Q(t))},function(t){e.onNext(X(t)),e.onCompleted()},function(){e.onNext(Y()),e.onCompleted()})})},oe.repeat=function(t){return ee(this,t).concat()},oe.retry=function(t){return ee(this,t).catchException()},oe.scan=function(){var t,e,n=!1;2===arguments.length?(t=arguments[0],e=arguments[1],n=!0):e=arguments[0];var r=this;return pe(function(){var i,o=!1;return r.select(function(r){return o?i=e(i,r):(i=n?e(t,r):r,o=!0),i})})},oe.skipLast=function(t){var e=this;return new De(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&n.onNext(r.shift())},n.onError.bind(n),n.onCompleted.bind(n))})},oe.startWith=function(){var t,e,n=0;return arguments.length&&"now"in Object(arguments[0])?(e=arguments[0],n=1):e=z,t=C.call(arguments,n),ne([be(t,e),this]).concat()},oe.takeLast=function(t,e){return this.takeLastBuffer(t).selectMany(function(t){return be(t,e)})},oe.takeLastBuffer=function(t){var e=this;return new De(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&r.shift()},n.onError.bind(n),function(){n.onNext(r),n.onCompleted()})})},oe.windowWithCount=function(t,e){var n=this;if(0>=t)throw Error(E);if(null==e&&(e=t),0>=e)throw Error(E);return new De(function(r){var i=new j,o=new M(i),s=0,u=[],c=function(){var t=new Ne;u.push(t),r.onNext(S(t,o))};return c(),i.setDisposable(n.subscribe(function(n){for(var r,i=0,o=u.length;o>i;i++)u[i].onNext(n);var a=s-t+1;a>=0&&0===a%e&&(r=u.shift(),r.onCompleted()),s++,0===s%e&&c()
(function(t,e){function n(){}function r(t){return t}function i(){return(new Date).getTime()}function o(t,e){return t===e}function s(t,e){return t-e}function u(t){return""+t}function c(t){throw t}function a(){if(this.isDisposed)throw Error(x)}function h(t,e){return 1===t.length&&Array.isArray(t[e])?t[e]:C.call(t)}function l(t,e){for(var n=Array(t),r=0;t>r;r++)n[r]=e();return n}function f(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function p(t,e,n,r,i){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=i||s,this.disposable=new j}function d(t,n){return new De(function(r){var i=new j,o=new P;return o.setDisposable(i),i.setDisposable(t.subscribe(r.onNext.bind(r),function(t){var i,s;try{s=n(t)}catch(u){return r.onError(u),e}i=new j,o.setDisposable(i),i.setDisposable(s.subscribe(r))},r.onCompleted.bind(r))),o})}function b(t,n){var r=this;return new De(function(i){var o=0,s=t.length;return r.subscribe(function(r){if(s>o){var u,c=t[o++];try{u=n(r,c)}catch(a){return i.onError(a),e}i.onNext(u)}else i.onCompleted()},i.onError.bind(i),i.onCompleted.bind(i))})}function v(t){return this.select(t).mergeObservable()}var m="object"==typeof exports&&exports,y=("object"==typeof module&&module&&module.exports==m&&module,"object"==typeof global&&global);y.global===y&&(t=y);var w={Internals:{}},g="Sequence contains no elements.",E="Argument out of range",x="Object has been disposed",C=Array.prototype.slice;({}).hasOwnProperty;var D=this.inherits=w.Internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n},A=w.Internals.addProperties=function(t){for(var e=C.call(arguments,1),n=0,r=e.length;r>n;n++){var i=e[n];for(var o in i)t[o]=i[o]}},S=w.Internals.addRef=function(t,e){return new De(function(n){return new R(e.getDisposable(),t.subscribe(n))})},_=function(t,e){this.id=t,this.value=e};_.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var N=function(t){this.items=Array(t),this.length=0},W=N.prototype;W.isHigherPriority=function(t,e){return 0>this.items[t].compareTo(this.items[e])},W.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},W.heapify=function(t){if(t===e&&(t=0),!(t>=this.length||0>t)){var n=2*t+1,r=2*t+2,i=t;if(this.length>n&&this.isHigherPriority(n,i)&&(i=n),this.length>r&&this.isHigherPriority(r,i)&&(i=r),i!==t){var o=this.items[t];this.items[t]=this.items[i],this.items[i]=o,this.heapify(i)}}},W.peek=function(){return this.items[0].value},W.removeAt=function(t){this.items[t]=this.items[--this.length],delete this.items[this.length],this.heapify()},W.dequeue=function(){var t=this.peek();return this.removeAt(0),t},W.enqueue=function(t){var e=this.length++;this.items[e]=new _(N.count++,t),this.percolate(e)},W.remove=function(t){for(var e=0;this.length>e;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},N.count=0;var R=w.CompositeDisposable=function(){this.disposables=h(arguments,0),this.isDisposed=!1,this.length=this.disposables.length},O=R.prototype;O.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},O.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},O.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()}},O.clear=function(){var t=this.disposables.slice(0);this.disposables=[],this.length=0;for(var e=0,n=t.length;n>e;e++)t[e].dispose()},O.contains=function(t){return-1!==this.disposables.indexOf(t)},O.toArray=function(){return this.disposables.slice(0)};var k=w.Disposable=function(t){this.isDisposed=!1,this.action=t};k.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var q=k.create=function(t){return new k(t)},T=k.empty={dispose:n},j=w.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null},I=j.prototype;I.disposable=function(t){return t?this.setDisposable(t):this.getDisposable()},I.getDisposable=function(){return this.current},I.setDisposable=function(t){if(this.current)throw Error("Disposable has already been assigned");var e=this.isDisposed;e||(this.current=t),e&&t&&t.dispose()},I.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var P=w.SerialDisposable=function(){this.isDisposed=!1,this.current=null};P.prototype.getDisposable=function(){return this.current},P.prototype.setDisposable=function(t){var e,n=this.isDisposed;n||(e=this.current,this.current=t),e&&e.dispose(),n&&t&&t.dispose()},P.prototype.disposable=function(t){return t?(this.setDisposable(t),e):this.getDisposable()},P.prototype.dispose=function(){var t;this.isDisposed||(this.isDisposed=!0,t=this.current,this.current=null),t&&t.dispose()};var M=w.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.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()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?T:new t(this)},e}();f.prototype.dispose=function(){var t=this;this.scheduler.schedule(function(){t.isDisposed||(t.isDisposed=!0,t.disposable.dispose())})},p.prototype.invoke=function(){this.disposable.disposable(this.invokeCore())},p.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},p.prototype.isCancelled=function(){return this.disposable.isDisposed},p.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var L=w.Scheduler=function(){function e(t,e,n,r){this.now=t,this._schedule=e,this._scheduleRelative=n,this._scheduleAbsolute=r}function n(t,e){var n=e.first,r=e.second,i=new R,o=function(e){r(e,function(e){var n=!1,r=!1,s=t.scheduleWithState(e,function(t,e){return n?i.remove(s):r=!0,o(e),T});r||(i.add(s),n=!0)})};return o(n),i}function r(t,e,n){var r=e.first,i=e.second,o=new R,s=function(e){i(e,function(e,r){var i=!1,u=!1,c=t[n].call(t,e,r,function(t,e){return i?o.remove(c):u=!0,s(e),T});u||(o.add(c),i=!0)})};return s(r),o}function o(t,e){return e(),T}var s=e.prototype;return s.catchException=function(t){return new J(this,t)},s.schedulePeriodic=function(t,e){return this.schedulePeriodicWithState(null,t,function(){e()})},s.schedulePeriodicWithState=function(e,n,r){var i=e,o=t.setInterval(function(){i=r(i)},n);return q(function(){t.clearInterval(o)})},s.schedule=function(t){return this._schedule(t,o)},s.scheduleWithState=function(t,e){return this._schedule(t,e)},s.scheduleWithRelative=function(t,e){return this._scheduleRelative(e,t,o)},s.scheduleWithRelativeAndState=function(t,e,n){return this._scheduleRelative(t,e,n)},s.scheduleWithAbsolute=function(t,e){return this._scheduleAbsolute(e,t,o)},s.scheduleWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute(t,e,n)},s.scheduleRecursive=function(t){return this.scheduleRecursiveWithState(t,function(t,e){t(function(){e(t)})})},s.scheduleRecursiveWithState=function(t,e){return this.scheduleWithState({first:t,second:e},function(t,e){return n(t,e)})},s.scheduleRecursiveWithRelative=function(t,e){return this.scheduleRecursiveWithRelativeAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithRelativeAndState=function(t,e,n){return this._scheduleRelative({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithRelativeAndState")})},s.scheduleRecursiveWithAbsolute=function(t,e){return this.scheduleRecursiveWithAbsoluteAndState(e,t,function(t,e){t(function(n){e(t,n)})})},s.scheduleRecursiveWithAbsoluteAndState=function(t,e,n){return this._scheduleAbsolute({first:t,second:n},e,function(t,e){return r(t,e,"scheduleWithAbsoluteAndState")})},e.now=i,e.normalize=function(t){return 0>t&&(t=0),t},e}(),V="Scheduler is not allowed to block the thread",z=L.immediate=function(){function t(t,e){return e(this,t)}function e(t,e,n){if(e>0)throw Error(V);return n(this,t)}function n(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new L(i,t,e,n)}(),B=L.currentThread=function(){function t(){o=new N(4)}function e(t,e){return this.scheduleWithRelativeAndState(t,0,e)}function n(e,n,r){var i,s=this.now()+L.normalize(n),u=new p(this,e,r,s);if(o)o.enqueue(u);else{i=new t;try{o.enqueue(u),i.run()}catch(c){throw c}finally{i.dispose()}}return u.disposable}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}var o;t.prototype.dispose=function(){o=null},t.prototype.run=function(){for(var t;o.length>0;)if(t=o.dequeue(),!t.isCancelled()){for(;t.dueTime-L.now()>0;);t.isCancelled()||t.invoke()}};var s=new L(i,e,n,r);return s.scheduleRequired=function(){return null===o},s.ensureTrampoline=function(t){return null===o?this.schedule(t):t()},s}(),F=function(){function t(t,e){e(0,this._period);try{this._state=this._action(this._state)}catch(n){throw this._cancel.dispose(),n}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new j;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,t.bind(this))),e},e}();w.VirtualTimeScheduler=function(t){function n(){return this.toDateTimeOffset(this.clock)}function r(t,e){return this.scheduleAbsoluteWithState(t,this.clock,e)}function i(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e),n)}function o(t,e,n){return this.scheduleRelativeWithState(t,this.toRelative(e-this.now()),n)}function s(t,e){return e(),T}function u(e,s){this.clock=e,this.comparer=s,this.isEnabled=!1,this.queue=new N(1024),t.call(this,n,r,i,o)}D(u,t);var c=u.prototype;return c.schedulePeriodicWithState=function(t,e,n){var r=new F(this,t,e,n);return r.start()},c.scheduleRelativeWithState=function(t,e,n){var r=this.add(this.clock,e);return this.scheduleAbsoluteWithState(t,r,n)},c.scheduleRelative=function(t,e){return this.scheduleRelativeWithState(e,t,s)},c.start=function(){var t;if(!this.isEnabled){this.isEnabled=!0;do t=this.getNext(),null!==t?(this.comparer(t.dueTime,this.clock)>0&&(this.clock=t.dueTime),t.invoke()):this.isEnabled=!1;while(this.isEnabled)}},c.stop=function(){this.isEnabled=!1},c.advanceTo=function(t){var e,n=this.comparer(this.clock,t);if(this.comparer(this.clock,t)>0)throw Error(E);if(0!==n&&!this.isEnabled){this.isEnabled=!0;do e=this.getNext(),null!==e&&0>=this.comparer(e.dueTime,t)?(this.comparer(e.dueTime,this.clock)>0&&(this.clock=e.dueTime),e.invoke()):this.isEnabled=!1;while(this.isEnabled);this.clock=t}},c.advanceBy=function(t){var n=this.add(this.clock,t),r=this.comparer(this.clock,n);if(r>0)throw Error(E);return 0!==r?this.advanceTo(n):e},c.sleep=function(t){var e=this.add(this.clock,t);if(this.comparer(this.clock,e)>=0)throw Error(E);this.clock=e},c.getNext=function(){for(var t;this.queue.length>0;){if(t=this.queue.peek(),!t.isCancelled())return t;this.queue.dequeue()}return null},c.scheduleAbsolute=function(t,e){return this.scheduleAbsoluteWithState(e,t,s)},c.scheduleAbsoluteWithState=function(t,e,n){var r=this,i=function(t,e){return r.queue.remove(o),n(t,e)},o=new p(r,t,i,e,r.comparer);return r.queue.enqueue(o),o.disposable},u}(L),w.HistoricalScheduler=function(t){function e(e,n){var r=null==e?0:e,i=n||s;t.call(this,r,i)}D(e,t);var n=e.prototype;return n.add=function(t,e){return t+e},n.toDateTimeOffset=function(t){return new Date(t).getTime()},n.toRelative=function(t){return t},e}(w.VirtualTimeScheduler);var H,U=n;(function(){function e(){if(!t.postMessage||t.importScripts)return!1;var e=!1,n=t.onmessage;return t.onmessage=function(){e=!0},t.postMessage("","*"),t.onmessage=n,e}function n(t){if("string"==typeof t.data&&t.data.substring(0,r.length)===r){var e=t.data.substring(r.length),n=i[e];n(),delete i[e]}}if("object"==typeof t.process&&"[object process]"===Object.prototype.toString.call(t.process))H=t.process.nextTick;else if("function"==typeof t.setImmediate)H=t.setImmediate,U=t.clearImmediate;else if(e()){var r="ms.rx.schedule"+Math.random(),i={},o=0;t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n,!1),H=function(e){var n=o++;i[n]=e,t.postMessage(r+n,"*")}}else if(t.MessageChannel){var s=new t.MessageChannel,u={},c=0;s.port1.onmessage=function(t){var e=t.data,n=u[e];n(),delete u[e]},H=function(t){var e=c++;u[e]=t,s.port2.postMessage(e)}}else"document"in t&&"onreadystatechange"in t.document.createElement("script")?H=function(e){var n=t.document.createElement("script");n.onreadystatechange=function(){e(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},t.document.documentElement.appendChild(n)}:(H=function(e){return t.setTimeout(e,0)},U=t.clearTimeout)})();var G=L.timeout=function(){function e(t,e){var n=this,r=new j,i=H(function(){r.isDisposed||r.setDisposable(e(n,t))});return new R(r,q(function(){U(i)}))}function n(e,n,r){var i=this,o=L.normalize(n);if(0===o)return i.scheduleWithState(e,r);var s=new j,u=t.setTimeout(function(){s.isDisposed||s.setDisposable(r(i,e))},o);return new R(s,q(function(){t.clearTimeout(u)}))}function r(t,e,n){return this.scheduleWithRelativeAndState(t,e-this.now(),n)}return new L(i,e,n,r)}(),J=function(t){function e(){return this._scheduler.now()}function n(t,e){return this._scheduler.scheduleWithState(t,this._wrap(e))}function r(t,e,n){return this._scheduler.scheduleWithRelativeAndState(t,e,this._wrap(n))}function i(t,e,n){return this._scheduler.scheduleWithAbsoluteAndState(t,e,this._wrap(n))}function o(o,s){this._scheduler=o,this._handler=s,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this,e,n,r,i)}return D(o,t),o.prototype._clone=function(t){return new o(t,this._handler)},o.prototype._wrap=function(t){var e=this;return function(n,r){try{return t(e._getRecursiveWrapper(n),r)}catch(i){if(!e._handler(i))throw i;return T}}},o.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},o.prototype.schedulePeriodicWithState=function(t,e,n){var r=this,i=!1,o=new j;return o.setDisposable(this._scheduler.schedulePeriodicWithState(t,e,function(t){if(i)return null;try{return n(t)}catch(e){if(i=!0,!r._handler(e))throw e;return o.dispose(),null}})),o},o}(L),K=w.Notification=function(){function t(t,e){this.hasValue=null==e?!1:e,this.kind=t}var e=t.prototype;return e.accept=function(t,e,n){return 1===arguments.length&&"object"==typeof t?this._acceptObservable(t):this._accept(t,e,n)},e.toObservable=function(t){var e=this;return t=t||z,new De(function(n){return t.schedule(function(){e._acceptObservable(n),"N"===e.kind&&n.onCompleted()})})},e.equals=function(t){var e=null==t?"":""+t;return""+this===e},t}(),Q=K.createOnNext=function(){function t(t){return t(this.value)}function e(t){return t.onNext(this.value)}function n(){return"OnNext("+this.value+")"}return function(r){var i=new K("N",!0);return i.value=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),X=K.createOnError=function(){function t(t,e){return e(this.exception)}function e(t){return t.onError(this.exception)}function n(){return"OnError("+this.exception+")"}return function(r){var i=new K("E");return i.exception=r,i._accept=t.bind(i),i._acceptObservable=e.bind(i),i.toString=n.bind(i),i}}(),Y=K.createOnCompleted=function(){function t(t,e,n){return n()}function e(t){return t.onCompleted()}function n(){return"OnCompleted()"}return function(){var r=new K("C");return r._accept=t.bind(r),r._acceptObservable=e.bind(r),r.toString=n.bind(r),r}}(),Z=w.Internals.Enumerator=function(t,e,n){this.moveNext=t,this.getCurrent=e,this.dispose=n},$=Z.create=function(t,e,r){var i=!1;return r||(r=n),new Z(function(){if(i)return!1;var e=t();return e||(i=!0,r()),e},function(){return e()},function(){i||(r(),i=!0)})},te=w.Internals.Enumerable=function(){function t(t){this.getEnumerator=t}return t.prototype.concat=function(){var t=this;return new De(function(n){var r=t.getEnumerator(),i=!1,o=new P,s=z.scheduleRecursive(function(t){var s,u,c=!1;if(!i){try{c=r.moveNext(),c?s=r.getCurrent():r.dispose()}catch(a){u=a,r.dispose()}if(u)return n.onError(u),e;if(!c)return n.onCompleted(),e;var h=new j;o.setDisposable(h),h.setDisposable(s.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){t()}))}});return new R(o,s,q(function(){i=!0,r.dispose()}))})},t.prototype.catchException=function(){var t=this;return new De(function(n){var r,i=t.getEnumerator(),o=!1,s=new P,u=z.scheduleRecursive(function(t){var u,c,a;if(a=!1,!o){try{a=i.moveNext(),a&&(u=i.getCurrent())}catch(h){c=h}if(c)return n.onError(c),e;if(!a)return r?n.onError(r):n.onCompleted(),e;var l=new j;s.setDisposable(l),l.setDisposable(u.subscribe(n.onNext.bind(n),function(e){r=e,t()},n.onCompleted.bind(n)))}});return new R(s,u,q(function(){o=!0}))})},t}(),ee=te.repeat=function(t,n){return n===e&&(n=-1),new te(function(){var e,r=n;return $(function(){return 0===r?!1:(r>0&&r--,e=t,!0)},function(){return e})})},ne=te.forEach=function(t,e){return e||(e=r),new te(function(){var n,r=-1;return $(function(){return++r<t.length?(n=e(t[r],r),!0):!1},function(){return n})})},re=w.Observer=function(){};re.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},re.prototype.asObserver=function(){return new ue(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},re.prototype.checked=function(){return new ce(this)};var ie=re.create=function(t,e,r){return t||(t=n),e||(e=c),r||(r=n),new ue(t,e,r)};re.fromNotifier=function(t){return new ue(function(e){return t(Q(e))},function(e){return t(X(e))},function(){return t(Y())})};var oe,se=w.Internals.AbstractObserver=function(t){function e(){this.isStopped=!1,t.call(this)}return D(e,t),e.prototype.onNext=function(t){this.isStopped||this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(){return this.isStopped?!1:(this.isStopped=!0,this.error(!0),!0)},e}(re),ue=w.AnonymousObserver=function(t){function e(e,n,r){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=r}return D(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(se),ce=function(t){function e(e){t.call(this),this._observer=e,this._state=0}D(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();try{this._observer.onNext(t)}catch(e){throw e}finally{this._state=0}},n.onError=function(t){this.checkAccess();try{this._observer.onError(t)}catch(e){throw e}finally{this._state=2}},n.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(t){throw t}finally{this._state=2}},n.checkAccess=function(){if(1===this._state)throw Error("Re-entrancy detected");if(2===this._state)throw Error("Observer completed");0===this._state&&(this._state=1)},e}(re),ae=w.Internals.ScheduledObserver=function(t){function n(e,n){t.call(this),this.scheduler=e,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new P}return D(n,t),n.prototype.next=function(t){var e=this;this.queue.push(function(){e.observer.onNext(t)})},n.prototype.error=function(t){var e=this;this.queue.push(function(){e.observer.onError(t)})},n.prototype.completed=function(){var t=this;this.queue.push(function(){t.observer.onCompleted()})},n.prototype.ensureActive=function(){var t=!1,n=this;!this.hasFaulted&&this.queue.length>0&&(t=!this.isAcquired,this.isAcquired=!0),t&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(t){var r;if(!(n.queue.length>0))return n.isAcquired=!1,e;r=n.queue.shift();try{r()}catch(i){throw n.queue=[],n.hasFaulted=!0,i}t()}))},n.prototype.dispose=function(){t.prototype.dispose.call(this),this.disposable.dispose()},n}(se),he=function(t){function e(){t.apply(this,arguments)}return D(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e}(ae),le=w.Observable=function(){function t(t){this._subscribe=t}return oe=t.prototype,oe.finalValue=function(){var t=this;return new De(function(e){var n,r=!1;return t.subscribe(function(t){r=!0,n=t},e.onError.bind(e),function(){r?(e.onNext(n),e.onCompleted()):e.onError(Error(g))})})},oe.subscribe=oe.forEach=function(t,e,n){var r;return r="object"==typeof t?t:ie(t,e,n),this._subscribe(r)},oe.toArray=function(){function t(t,e){var n=t.slice(0);return n.push(e),n}return this.scan([],t).startWith([]).finalValue()},t}();le.start=function(t,e){return fe(t,e)()};var fe=le.toAsync=function(t,n,r){return n||(n=G),function(){var i=C.call(arguments,0),o=new We;return n.schedule(function(){var n;try{n=t.apply(r,i)}catch(s){return o.onError(s),e}o.onNext(n),o.onCompleted()}),o.asObservable()}};oe.observeOn=function(t){var e=this;return new De(function(n){return e.subscribe(new he(t,n))})},oe.subscribeOn=function(t){var e=this;return new De(function(n){var r=new j,i=new P;return i.setDisposable(r),r.setDisposable(t.schedule(function(){i.setDisposable(new f(t,e.subscribe(n)))})),i})},le.create=function(t){return new De(function(e){return q(t(e)||n)})},le.createWithDisposable=function(t){return new De(t)};var pe=le.defer=function(t){return new De(function(e){var n;try{n=t()}catch(r){return ye(r).subscribe(e)}return n.subscribe(e)})},de=le.empty=function(t){return t||(t=z),new De(function(e){return t.schedule(function(){e.onCompleted()})})},be=le.fromArray=function(t,e){return e||(e=B),new De(function(n){var r=0;return e.scheduleRecursive(function(e){t.length>r?(n.onNext(t[r++]),e()):n.onCompleted()})})};le.generate=function(t,n,r,i,o){return o||(o=B),new De(function(s){var u=!0,c=t;return o.scheduleRecursive(function(t){var o,a;try{u?u=!1:c=r(c),o=n(c),o&&(a=i(c))}catch(h){return s.onError(h),e}o?(s.onNext(a),t()):s.onCompleted()})})};var ve=le.never=function(){return new De(function(){return T})};le.range=function(t,e,n){return n||(n=B),new De(function(r){return n.scheduleRecursiveWithState(0,function(n,i){e>n?(r.onNext(t+n),i(n+1)):r.onCompleted()})})},le.repeat=function(t,e,n){return n||(n=B),null==e&&(e=-1),me(t,n).repeat(e)};var me=le.returnValue=function(t,e){return e||(e=z),new De(function(n){return e.schedule(function(){n.onNext(t),n.onCompleted()})})},ye=le.throwException=function(t,e){return e||(e=z),new De(function(n){return e.schedule(function(){n.onError(t)})})};le.using=function(t,e){return new De(function(n){var r,i,o=T;try{r=t(),r&&(o=r),i=e(r)}catch(s){return new R(ye(s).subscribe(n),o)}return new R(i.subscribe(n),o)})},oe.amb=function(t){var e=this;return new De(function(n){function r(){o||(o=s,a.dispose())}function i(){o||(o=u,c.dispose())}var o,s="L",u="R",c=new j,a=new j;return c.setDisposable(e.subscribe(function(t){r(),o===s&&n.onNext(t)},function(t){r(),o===s&&n.onError(t)},function(){r(),o===s&&n.onCompleted()})),a.setDisposable(t.subscribe(function(t){i(),o===u&&n.onNext(t)},function(t){i(),o===u&&n.onError(t)},function(){i(),o===u&&n.onCompleted()})),new R(c,a)})},le.amb=function(){function t(t,e){return t.amb(e)}for(var e=ve(),n=h(arguments,0),r=0,i=n.length;i>r;r++)e=t(e,n[r]);return e},oe.catchException=function(t){return"function"==typeof t?d(this,t):we([this,t])};var we=le.catchException=function(){var t=h(arguments,0);return ne(t).catchException()};oe.combineLatest=function(){var t=C.call(arguments);return Array.isArray(t[0])?t[0].unshift(this):t.unshift(this),ge.apply(this,t)};var ge=le.combineLatest=function(){var t=C.call(arguments),n=t.pop();return Array.isArray(t[0])&&(t=t[0]),new De(function(r){function i(t){var i;if(c[t]=!0,a||(a=c.every(function(t){return t}))){try{i=n.apply(null,f)}catch(o){return r.onError(o),e}r.onNext(i)}else h.filter(function(e,n){return n!==t}).every(function(t){return t})&&r.onCompleted()}function o(t){h[t]=!0,h.every(function(t){return t})&&r.onCompleted()}for(var s=function(){return!1},u=t.length,c=l(u,s),a=!1,h=l(u,s),f=Array(u),p=Array(u),d=0;u>d;d++)(function(e){p[e]=new j,p[e].setDisposable(t[e].subscribe(function(t){f[e]=t,i(e)},r.onError.bind(r),function(){o(e)}))})(d);return new R(p)})};oe.concat=function(){var t=C.call(arguments,0);return t.unshift(this),Ee.apply(this,t)};var Ee=le.concat=function(){var t=h(arguments,0);return ne(t).concat()};oe.concatObservable=oe.concatAll=function(){return this.merge(1)},oe.merge=function(t){if("number"!=typeof t)return xe(this,t);var e=this;return new De(function(n){var r=0,i=new R,o=!1,s=[],u=function(t){var e=new j;i.add(e),e.setDisposable(t.subscribe(n.onNext.bind(n),n.onError.bind(n),function(){var t;i.remove(e),s.length>0?(t=s.shift(),u(t)):(r--,o&&0===r&&n.onCompleted())}))};return i.add(e.subscribe(function(e){t>r?(r++,u(e)):s.push(e)},n.onError.bind(n),function(){o=!0,0===r&&n.onCompleted()})),i})};var xe=le.merge=function(){var t,e;return arguments[0]?arguments[0].now?(t=arguments[0],e=C.call(arguments,1)):(t=z,e=C.call(arguments,0)):(t=z,e=C.call(arguments,1)),Array.isArray(e[0])&&(e=e[0]),be(e,t).mergeObservable()};oe.mergeObservable=oe.mergeAll=function(){var t=this;return new De(function(e){var n=new R,r=!1,i=new j;return n.add(i),i.setDisposable(t.subscribe(function(t){var i=new j;n.add(i),i.setDisposable(t.subscribe(function(t){e.onNext(t)},e.onError.bind(e),function(){n.remove(i),r&&1===n.length&&e.onCompleted()}))},e.onError.bind(e),function(){r=!0,1===n.length&&e.onCompleted()})),n})},oe.onErrorResumeNext=function(t){if(!t)throw Error("Second observable is required");return Ce([this,t])};var Ce=le.onErrorResumeNext=function(){var t=h(arguments,0);return new De(function(e){var n=0,r=new P,i=z.scheduleRecursive(function(i){var o,s;t.length>n?(o=t[n++],s=new j,r.setDisposable(s),s.setDisposable(o.subscribe(e.onNext.bind(e),function(){i()},function(){i()}))):e.onCompleted()});return new R(r,i)})};oe.skipUntil=function(t){var e=this;return new De(function(n){var r=!1,i=new R(e.subscribe(function(t){r&&n.onNext(t)},n.onError.bind(n),function(){r&&n.onCompleted()})),o=new j;return i.add(o),o.setDisposable(t.subscribe(function(){r=!0,o.dispose()},n.onError.bind(n),function(){o.dispose()})),i})},oe.switchLatest=function(){var t=this;return new De(function(e){var n=!1,r=new P,i=!1,o=0,s=t.subscribe(function(t){var s=new j,u=++o;n=!0,r.setDisposable(s),s.setDisposable(t.subscribe(function(t){o===u&&e.onNext(t)},function(t){o===u&&e.onError(t)},function(){o===u&&(n=!1,i&&e.onCompleted())}))},e.onError.bind(e),function(){i=!0,n||e.onCompleted()});return new R(s,r)})},oe.takeUntil=function(t){var e=this;return new De(function(r){return new R(e.subscribe(r),t.subscribe(r.onCompleted.bind(r),r.onError.bind(r),n))})},oe.zip=function(){if(Array.isArray(arguments[0]))return b.apply(this,arguments);var t=this,n=C.call(arguments),i=n.pop();return n.unshift(t),new De(function(o){function s(t){a[t]=!0,a.every(function(t){return t})&&o.onCompleted()}for(var u=n.length,c=l(u,function(){return[]}),a=l(u,function(){return!1}),h=function(n){var s,u;if(c.every(function(t){return t.length>0})){try{u=c.map(function(t){return t.shift()}),s=i.apply(t,u)}catch(h){return o.onError(h),e}o.onNext(s)}else a.filter(function(t,e){return e!==n}).every(r)&&o.onCompleted()},f=Array(u),p=0;u>p;p++)(function(t){f[t]=new j,f[t].setDisposable(n[t].subscribe(function(e){c[t].push(e),h(t)},o.onError.bind(o),function(){s(t)}))})(p);return new R(f)})},le.zip=function(){var t=C.call(arguments,0),e=t.shift();return e.zip.apply(e,t)},le.zipArray=function(){var t=C.call(arguments);return new De(function(n){function i(t){if(u.every(function(t){return t.length>0})){var i=u.map(function(t){return t.shift()});n.onNext(i)}else if(c.filter(function(e,n){return n!==t}).every(r))return n.onCompleted(),e}function o(t){return c[t]=!0,c.every(r)?(n.onCompleted(),e):e}for(var s=t.length,u=l(s,function(){return[]}),c=l(s,function(){return!1}),a=Array(s),h=0;s>h;h++)(function(e){a[e]=new j,a[e].setDisposable(t[e].subscribe(function(t){u[e].push(t),i(e)},n.onError.bind(n),function(){o(e)}))})(h);var f=new R(a);return f.add(q(function(){for(var t=0,e=u.length;e>t;t++)u[t]=[]})),f})},oe.asObservable=function(){var t=this;return new De(function(e){return t.subscribe(e)})},oe.bufferWithCount=function(t,n){return n===e&&(n=t),this.windowWithCount(t,n).selectMany(function(t){return t.toArray()}).where(function(t){return t.length>0})},oe.dematerialize=function(){var t=this;return new De(function(e){return t.subscribe(function(t){return t.accept(e)},e.onError.bind(e),e.onCompleted.bind(e))})},oe.distinctUntilChanged=function(t,n){var i=this;return t||(t=r),n||(n=o),new De(function(r){var o,s=!1;return i.subscribe(function(i){var u,c=!1;try{u=t(i)}catch(a){return r.onError(a),e}if(s)try{c=n(o,u)}catch(a){return r.onError(a),e}s&&c||(s=!0,o=u,r.onNext(i))},r.onError.bind(r),r.onCompleted.bind(r))})},oe.doAction=function(t,e,n){var r,i=this;return"function"==typeof t?r=t:(r=t.onNext.bind(t),e=t.onError.bind(t),n=t.onCompleted.bind(t)),new De(function(t){return i.subscribe(function(e){try{r(e)}catch(n){t.onError(n)}t.onNext(e)},function(n){if(e){try{e(n)}catch(r){t.onError(r)}t.onError(n)}else t.onError(n)},function(){if(n){try{n()}catch(e){t.onError(e)}t.onCompleted()}else t.onCompleted()})})},oe.finallyAction=function(t){var e=this;return new De(function(n){var r=e.subscribe(n);return q(function(){try{r.dispose()}catch(e){throw e}finally{t()}})})},oe.ignoreElements=function(){var t=this;return new De(function(e){return t.subscribe(n,e.onError.bind(e),e.onCompleted.bind(e))})},oe.materialize=function(){var t=this;return new De(function(e){return t.subscribe(function(t){e.onNext(Q(t))},function(t){e.onNext(X(t)),e.onCompleted()},function(){e.onNext(Y()),e.onCompleted()})})},oe.repeat=function(t){return ee(this,t).concat()},oe.retry=function(t){return ee(this,t).catchException()},oe.scan=function(){var t,e,n=!1;2===arguments.length?(t=arguments[0],e=arguments[1],n=!0):e=arguments[0];var r=this;return pe(function(){var i,o=!1;return r.select(function(r){return o?i=e(i,r):(i=n?e(t,r):r,o=!0),i})})},oe.skipLast=function(t){var e=this;return new De(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&n.onNext(r.shift())},n.onError.bind(n),n.onCompleted.bind(n))})},oe.startWith=function(){var t,e,n=0;return arguments.length&&"now"in Object(arguments[0])?(e=arguments[0],n=1):e=z,t=C.call(arguments,n),ne([be(t,e),this]).concat()},oe.takeLast=function(t,e){return this.takeLastBuffer(t).selectMany(function(t){return be(t,e)})},oe.takeLastBuffer=function(t){var e=this;return new De(function(n){var r=[];return e.subscribe(function(e){r.push(e),r.length>t&&r.shift()},n.onError.bind(n),function(){n.onNext(r),n.onCompleted()})})},oe.windowWithCount=function(t,e){var n=this;if(0>=t)throw Error(E);if(null==e&&(e=t),0>=e)throw Error(E);return new De(function(r){var i=new j,o=new M(i),s=0,u=[],c=function(){var t=new Ne;u.push(t),r.onNext(S(t,o))};return c(),i.setDisposable(n.subscribe(function(n){for(var r,i=0,o=u.length;o>i;i++)u[i].onNext(n);var a=s-t+1;a>=0&&0===a%e&&(r=u.shift(),r.onCompleted()),s++,0===s%e&&c()
},function(t){for(;u.length>0;)u.shift().onError(t);r.onError(t)},function(){for(;u.length>0;)u.shift().onCompleted();r.onCompleted()})),o})},oe.defaultIfEmpty=function(t){var n=this;return t===e&&(t=null),new De(function(e){var r=!1;return n.subscribe(function(t){r=!0,e.onNext(t)},e.onError.bind(e),function(){r||e.onNext(t),e.onCompleted()})})},oe.distinct=function(t,n){var i=this;return t||(t=r),n||(n=u),new De(function(r){var o={};return i.subscribe(function(i){var s,u,c,a=!1;try{s=t(i),u=n(s)}catch(h){return r.onError(h),e}for(c in o)if(u===c){a=!0;break}a||(o[u]=null,r.onNext(i))},r.onError.bind(r),r.onCompleted.bind(r))})},oe.groupBy=function(t,e,n){return this.groupByUntil(t,e,function(){return ve()},n)},oe.groupByUntil=function(t,i,o,s){var c=this;return i||(i=r),s||(s=u),new De(function(r){var u={},a=new R,h=new M(a);return a.add(c.subscribe(function(c){var l,f,p,d,b,v,m,y,w,g;try{v=t(c),m=s(v)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}d=!1;try{w=u[m],w||(w=new Ne,u[m]=w,d=!0)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}if(d){b=new Se(v,w,h),f=new Se(v,w);try{l=o(f)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}r.onNext(b),y=new j,a.add(y);var x=function(){m in u&&(delete u[m],w.onCompleted()),a.remove(y)};y.setDisposable(l.take(1).subscribe(n,function(t){for(g in u)u[g].onError(t);r.onError(t)},function(){x()}))}try{p=i(c)}catch(E){for(g in u)u[g].onError(E);return r.onError(E),e}w.onNext(p)},function(t){for(var e in u)u[e].onError(t);r.onError(t)},function(){for(var t in u)u[t].onCompleted();r.onCompleted()})),h})},oe.select=function(t,n){var r=this;return new De(function(i){var o=0;return r.subscribe(function(s){var u;try{u=t.call(n,s,o++,r)}catch(c){return i.onError(c),e}i.onNext(u)},i.onError.bind(i),i.onCompleted.bind(i))})},oe.map=oe.select,oe.selectMany=oe.flatMap=function(t,e){return e?this.selectMany(function(n){return t(n).select(function(t){return e(n,t)})}):"function"==typeof t?v.call(this,t):v.call(this,function(){return t})},oe.skip=function(t){if(0>t)throw Error(E);var e=this;return new De(function(n){var r=t;return e.subscribe(function(t){0>=r?n.onNext(t):r--},n.onError.bind(n),n.onCompleted.bind(n))})},oe.skipWhile=function(t){var n=this;return new De(function(r){var i=0,o=!1;return n.subscribe(function(n){if(!o)try{o=!t(n,i++)}catch(s){return r.onError(s),e}o&&r.onNext(n)},r.onError.bind(r),r.onCompleted.bind(r))})},oe.take=function(t,e){if(0>t)throw Error(E);if(0===t)return de(e);var n=this;return new De(function(e){var r=t;return n.subscribe(function(t){r>0&&(r--,e.onNext(t),0===r&&e.onCompleted())},e.onError.bind(e),e.onCompleted.bind(e))})},oe.takeWhile=function(t){var n=this;return new De(function(r){var i=0,o=!0;return n.subscribe(function(n){if(o){try{o=t(n,i++)}catch(s){return r.onError(s),e}o?r.onNext(n):r.onCompleted()}},r.onError.bind(r),r.onCompleted.bind(r))})},oe.where=function(t,n){var r=this;return new De(function(i){var o=0;return r.subscribe(function(s){var u;try{u=t.call(n,s,o++,r)}catch(c){return i.onError(c),e}u&&i.onNext(s)},i.onError.bind(i),i.onCompleted.bind(i))})},oe.filter=oe.where;var De=w.Internals.AnonymousObservable=function(t){function n(r){function i(t){var e=new Ae(t);if(B.scheduleRequired())B.schedule(function(){try{e.disposable(r(e))}catch(t){if(!e.fail(t))throw t}});else try{e.disposable(r(e))}catch(n){if(!e.fail(n))throw n}return e}return this instanceof n?(t.call(this,i),e):new n(r)}return D(n,t),n}(le),Ae=function(t){function e(e){t.call(this),this.observer=e,this.m=new j}D(e,t);var n=e.prototype;return n.next=function(t){var e=!1;try{this.observer.onNext(t),e=!0}catch(n){throw n}finally{e||this.dispose()}},n.error=function(t){try{this.observer.onError(t)}catch(e){throw e}finally{this.dispose()}},n.completed=function(){try{this.observer.onCompleted()}catch(t){throw t}finally{this.dispose()}},n.disposable=function(t){return this.m.disposable(t)},n.dispose=function(){t.prototype.dispose.call(this),this.m.dispose()},e}(se),Se=function(t){function e(t){return this.underlyingObservable.subscribe(t)}function n(n,r,i){t.call(this,e),this.key=n,this.underlyingObservable=i?new De(function(t){return new R(i.getDisposable(),r.subscribe(t))}):r}return D(n,t),n}(le),_e=function(t,e){this.subject=t,this.observer=e};_e.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var t=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(t,1),this.observer=null}};var Ne=w.Subject=function(t){function e(t){return a.call(this),this.isStopped?this.exception?(t.onError(this.exception),T):(t.onCompleted(),T):(this.observers.push(t),new _e(this,t))}function n(){t.call(this,e),this.isDisposed=!1,this.isStopped=!1,this.observers=[]}return D(n,t),A(n.prototype,re,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(a.call(this),!this.isStopped){var t=this.observers.slice(0);this.isStopped=!0;for(var e=0,n=t.length;n>e;e++)t[e].onCompleted();this.observers=[]}},onError:function(t){if(a.call(this),!this.isStopped){var e=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var n=0,r=e.length;r>n;n++)e[n].onError(t);this.observers=[]}},onNext:function(t){if(a.call(this),!this.isStopped)for(var e=this.observers.slice(0),n=0,r=e.length;r>n;n++)e[n].onNext(t)},dispose:function(){this.isDisposed=!0,this.observers=null}}),n.create=function(t,e){return new Re(t,e)},n}(le),We=w.AsyncSubject=function(t){function e(t){if(a.call(this),!this.isStopped)return this.observers.push(t),new _e(this,t);var e=this.exception,n=this.hasValue,r=this.value;return e?t.onError(e):n?(t.onNext(r),t.onCompleted()):t.onCompleted(),T}function n(){t.call(this,e),this.isDisposed=!1,this.isStopped=!1,this.value=null,this.hasValue=!1,this.observers=[],this.exception=null}return D(n,t),A(n.prototype,re,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){var t,e,n;if(a.call(this),!this.isStopped){var r=this.observers.slice(0);this.isStopped=!0;var i=this.value,o=this.hasValue;if(o)for(e=0,n=r.length;n>e;e++)t=r[e],t.onNext(i),t.onCompleted();else for(e=0,n=r.length;n>e;e++)r[e].onCompleted();this.observers=[]}},onError:function(t){if(a.call(this),!this.isStopped){var e=this.observers.slice(0);this.isStopped=!0,this.exception=t;for(var n=0,r=e.length;r>n;n++)e[n].onError(t);this.observers=[]}},onNext:function(t){a.call(this),this.isStopped||(this.value=t,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),n}(le),Re=function(t){function e(t){return this.observable.subscribe(t)}function n(n,r){t.call(this,e),this.observer=n,this.observable=r}return D(n,t),A(n.prototype,re,{onCompleted:function(){this.observer.onCompleted()},onError:function(t){this.observer.onError(t)},onNext:function(t){this.observer.onNext(t)}}),n}(le);return"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t.Rx=w,define(function(){return w})):(m?"object"==typeof module&&module&&module.exports==m?module.exports=w:m=w:t.Rx=w,e)})(this);

@@ -12,3 +12,3 @@ /**

return new AnonymousObservable(function (o) {
return disposableCreate(subscribe(o));
return disposableCreate(subscribe(o) || noop);
});

@@ -15,0 +15,0 @@ };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc