Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

most

Package Overview
Dependencies
Maintainers
5
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

most - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

4

dist/most.min.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.most=t.most||{})}(this,function(t){"use strict";function e(t){this.source=t}function n(t,e){var n=e.length,i=new Array(n+1);i[0]=t;for(var r=0;r<n;++r)i[r+1]=e[r];return i}function i(t,e){for(var n=e.length,i=new Array(n+1),r=0;r<n;++r)i[r]=e[r];return i[n]=t,i}function r(t,e){if(t<0)throw new TypeError("n must be >= 0");var n=e.length;return 0===t||0===n?e:t>=n?[]:o(t,e,n-t)}function o(t,e,n){for(var i=new Array(n),r=0;r<n;++r)i[r]=e[t+r];return i}function s(t){return r(1,t)}function u(t){for(var e=t.length,n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function h(t,e){for(var n=e.length,i=new Array(n),r=0;r<n;++r)i[r]=t(e[r]);return i}function c(t,e,n){for(var i=e,r=0,o=n.length;r<o;++r)i=t(i,n[r],r);return i}function p(t,e,n){if(e<0)throw new TypeError("i must be >= 0");for(var i=n.length,r=new Array(i),o=0;o<i;++o)r[o]=e===o?t:n[o];return r}function f(t,e){if(t<0)throw new TypeError("i must be >= 0");var n=e.length;return 0===n||t>=n?e:1===n?[]:a(t,e,n-1)}function a(t,e,n){var i,r=new Array(n);for(i=0;i<t;++i)r[i]=e[i];for(i=t;i<n;++i)r[i]=e[i+1];return r}function d(t,e){for(var n,i=e.length,r=new Array(i),o=0,s=0;s<i;++s)n=e[s],t(n)||(r[o]=n,++o);return r.length=o,r}function l(t,e){for(var n=0,i=e.length;n<i;++n)if(t===e[n])return n;return-1}function y(t){return null!=t&&"number"==typeof t.length&&"function"!=typeof t}function v(t,e){this._dispose=t,this._data=e}function w(){this.disposable=void 0,this.disposed=!1,this._resolve=void 0;var t=this;this.result=new Promise(function(e){t._resolve=e})}function k(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}function m(t,e,n){var i=E(e);return k(i)?i.catch(function(e){n.error(t,e)}):i}function _(t,e){return T(new v(t,e))}function b(){return new v(Fi,void 0)}function g(t){return _(x,t)}function x(t){return Promise.all(Oi(E,t))}function E(t){try{return t.dispose()}catch(t){return Promise.reject(t)}}function A(){return new w}function T(t){return new v(P,M(t))}function P(t){return t.disposed||(t.disposed=!0,t.value=E(t.disposable),t.disposable=void 0),t.value}function M(t){return{disposed:!1,disposable:t,value:void 0}}function R(t){setTimeout(function(){throw t},0)}function I(t,e,n){this._run=t,this.value=e,this.sink=n,this.active=!0}function L(t,e,n){n.error(t,e)}function W(t,e,n){n.event(t,e)}function C(t,e,n){n.end(t,e)}function N(t){return new e(new S(t))}function S(t){this.value=t}function q(t,e,n){n.event(t,e),n.end(t,void 0)}function B(){return Gi}function j(){}function V(t){return t.dispose()}function D(){return Hi}function U(){}function z(t){return new e(new O(t))}function O(t){this.array=t}function F(t,e,n){function i(t){n.end(t)}for(var r=0,o=e.length;r<o&&this.active;++r)n.event(t,e[r]);this.active&&i(t)}function G(t){return"function"==typeof t[Ji]}function H(t){return t[Ji]()}function J(t){return new e(new K(t))}function K(t){this.iterable=t}function Q(t,e,n){this.scheduler=n,this.iterator=t,this.task=new I(X,this,e),n.asap(this.task)}function X(t,e,n){var i=e.iterator.next();i.done?n.end(t,i.value):n.event(t,i.value),e.scheduler.asap(e.task)}function Y(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}function Z(t){var e=null;if(t){var n=t[Qi];if("function"==typeof n&&(e=n.call(t),!e||"function"!=typeof e.subscribe))throw new TypeError("invalid observable "+e)}return e}function $(t){return new e(new tt(t))}function tt(t){this.observable=t}function et(t,e){this.sink=t,this.scheduler=e}function nt(t){return t.unsubscribe()}function it(t){if(t instanceof e)return t;var n=Z(t);if(null!=n)return $(n);if(Array.isArray(t)||y(t))return z(t);if(G(t))return J(t);throw new TypeError("from(x) must be observable, iterable, or array-like: "+t)}function rt(t,n){return new e(new ot(t,n))}function ot(t,e){this.period=t,this.value=e}function st(t,e,n,i){this.time=t,this.period=e,this.task=n,this.scheduler=i,this.active=!0}function ut(t){return Promise.resolve(t).then(ht)}function ht(t){try{return t.run()}catch(e){return t.error(e)}}function ct(t,e){this.timer=t,this.timeline=e,this._timer=null,this._nextArrival=1/0;var n=this;this._runReadyTasksBound=function(){n._runReadyTasks(n.now())}}function pt(){}function ft(t){this.f=t,this.active=!0}function at(t){var e=new ft(t);return ut(e),e}function dt(){this.tasks=[]}function lt(t,e,n){for(var i=e.events,r=0;r<i.length;++r){var o=i[r];o.active&&(t(o),o.period>=0&&o.active&&(o.time=o.time+o.period,yt(o,n)))}return n}function yt(t,e){var n=e.length;if(0===n)return void e.push(kt(t.time,[t]));var i=wt(t.time,e);i>=n?e.push(kt(t.time,[t])):t.time===e[i].time?e[i].events.push(t):e.splice(i,0,kt(t.time,[t]))}function vt(t,e){e.events=d(t,e.events)}function wt(t,e){for(var n,i,r=0,o=e.length;r<o;){if(n=Math.floor((r+o)/2),i=e[n],t===i.time)return n;t<i.time?o=n:r=n+1}return o}function kt(t,e){return{time:t,events:e}}function mt(t,e){if(null==t||"object"!=typeof t)throw new TypeError("subscriber must be an object");var n=A(),i=new _t(R,t,n);return n.setDisposable(e.source.run(i,Xi)),new bt(n)}function _t(t,e,n){this.fatalError=t,this.subscriber=e,this.disposable=n}function bt(t){this.disposable=t}function gt(t,e,n,i,r,o){Promise.resolve(r.dispose()).then(function(){"function"==typeof n&&n.call(e,o)}).catch(function(t){"function"==typeof i&&i.call(e,t)}).catch(t)}function xt(t,e){return t(e)}function Et(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function At(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function Tt(t,e,n){this.event=t,this.source=e,this.capture=n}function Pt(t){var e=t.target;e.source.removeEventListener(e.event,t.addEvent,e.capture)}function Mt(t){this.sink=t,this.events=[],this.active=!0}function Rt(t,e,n){this.sink=t,this.events=n,this.time=e}function It(t,e,n){this.time=t,this.value=e,this.sink=n}function Lt(t,e,n){this.time=t,this.value=e,this.sink=n}function Wt(t,e){this.event=t,this.source=e}function Ct(t){var e=t.target;e.source.removeListener(e.event,t.addEvent)}function Nt(t,n,i){var r;if("function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener)arguments.length<3&&(i=!1),r=new Tt(t,n,i);else{if("function"!=typeof n.addListener||"function"!=typeof n.removeListener)throw new Error("source must support addEventListener/removeEventListener or addListener/removeListener");r=new Wt(t,n)}return new e(r)}function St(t){return qt(t,Xi)}function qt(t,e){return new Promise(function(n,i){Bt(t,e,n,i)})}function Bt(t,e,n,i){var r=A(),o=new jt(n,i,r);r.setDisposable(t.run(o,e))}function jt(t,e,n){this._end=t,this._error=e,this._disposable=n,this.active=!0}function Vt(t,e,n,i){Promise.resolve(n.dispose()).then(function(){t(i)},e)}function Dt(t){this.sink=t}function Ut(t,e){this.p=t,this.source=e}function zt(t,e){this.p=t,this.sink=e}function Ot(t,e){return function(n){return t(n)&&e(n)}}function Ft(t,e,n){this.p=t,this.f=e,this.source=n}function Gt(t,e,n){this.p=t,this.f=e,this.sink=n}function Ht(t,e){this.f=t,this.source=e}function Jt(t,e){this.f=t,this.sink=e}function Kt(t,n){return new e(Ht.create(t,n.source))}function Qt(t,e){return Kt(function(){return t},e)}function Xt(t,n){return new e(new Yt(t,n.source))}function Yt(t,e){this.source=e,this.f=t}function Zt(t,e){this.sink=e,this.f=t}function $t(t,e){return te(Xt(t,e))}function te(t){return St(t.source)}function ee(t,n,i){return new e(new ne(t,n,i.source))}function ne(t,e,n){this.step=t,this.seed=e,this.source=n}function ie(t,e,n){this.step=t,this.seed=e,this.sink=n}function re(t,n,i){return new e(new oe(t,n,i.source))}function oe(t,e,n){this.source=n,this.f=t,this.value=e}function se(t,e,n){this.f=t,this.value=e,this.sink=n}function ue(t,e,n){return St(new he(t,e,n.source))}function he(t,e,n){this.source=n,this.f=t,this.value=e}function ce(t,e,n){this.f=t,this.value=e,this.sink=n}function pe(t,n){return new e(new fe(t,n))}function fe(t,e){this.f=t,this.value=e}function ae(t,e,n,i){function r(t){s.sink.error(s.scheduler.now(),t)}function o(t){return de(t,e)}this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var s=this;Promise.resolve(this).then(o).catch(r)}function de(t,e){var n=t.f;return Promise.resolve(n(e)).then(function(e){return le(t,e)})}function le(t,e){return e.done?(t.sink.end(t.scheduler.now(),e.value),e.value):(t.sink.event(t.scheduler.now(),e.value),t.active?de(t,e.seed):e.value)}function ye(t,n){return new e(new ve(t,n))}function ve(t,e){this.f=t,this.value=e}function we(t,e,n,i){function r(t){u.sink.error(u.scheduler.now(),t)}function o(t){return ke(t,s)}this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var s=e,u=this;Promise.resolve(this).then(o).catch(r)}function ke(t,e){if(t.sink.event(t.scheduler.now(),e),!t.active)return e;var n=t.f;return Promise.resolve(n(e)).then(function(e){return me(t,e)})}function me(t,e){return t.active?ke(t,e):t.value}function _e(t){return new e(new be(t,s(arguments)))}function be(t,e){this.f=t,this.args=e}function ge(t,e,n){function i(t){r.sink.error(r.scheduler.now(),t)}this.iterator=t,this.sink=e,this.scheduler=n,this.active=!0;var r=this;Promise.resolve(this).then(xe).catch(i)}function xe(t,e){return t.active?Ee(t,t.iterator.next(e)):e}function Ee(t,e){return e.done?t.sink.end(t.scheduler.now(),e.value):Promise.resolve(e.value).then(function(e){return Ae(t,e)},function(e){return Te(t,e)})}function Ae(t,e){return t.sink.event(t.scheduler.now(),e),xe(t,e)}function Te(t,e){return Ee(t,t.iterator.throw(e))}function Pe(t,n){return new e(new Me(t,n.source))}function Me(t,e){this.f=t,this.source=e}function Re(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0,this.disposable=T(e.run(this,i))}function Ie(t,e){return Le(N(t),e)}function Le(t,e){return Pe(function(){return e},t)}function We(t,e){this.sink=e,this.index=t,this.active=!0,this.value=void 0}function Ce(t,e){switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return t(e[0],e[1]);case 3:return t(e[0],e[1],e[2]);case 4:return t(e[0],e[1],e[2],e[3]);case 5:return t(e[0],e[1],e[2],e[3],e[4]);default:return t.apply(void 0,e)}}function Ne(t){return Se(t,Zi(arguments))}function Se(t,n){var i=n.length;return 0===i?B():1===i?Kt(t,n[0]):new e(qe(t,n))}function qe(t,e){return new je(t,Yi(Be,e))}function Be(t){return t.source}function je(t,e){this.f=t,this.sources=e}function Ve(t,e,n,i){var r=this;this.sink=n,this.disposables=t,this.sinks=e,this.f=i;var o=e.length;this.awaiting=o,this.values=new Array(o),this.hasValue=new Array(o);for(var s=0;s<o;++s)r.hasValue[s]=!1;this.activeCount=e.length}function De(t,e){return Ne(zi,t,e)}function Ue(t,n){return new e(new ze(t,n.source))}function ze(t,e){this.transducer=t,this.source=e}function Oe(t,e){this.xf=t,this.sink=e}function Fe(t){this.time=-(1/0),this.sink=t}function Ge(t){return"function"==typeof t["@@transducer/step"]?new He(t):new Je(t)}function He(t){this.tx=t}function Je(t){this.tx=t}function Ke(){this.head=null,this.length=0}function Qe(t,e){return Xe(Di,t,e)}function Xe(t,n,i){return new e(new Ye(t,n,i.source))}function Ye(t,e,n){this.f=t,this.concurrency=e,this.source=n}function Ze(t,e,n,i,r){this.f=t,this.concurrency=e,this.sink=i,this.scheduler=r,this.pending=[],this.current=new Ke,this.disposable=T(n.run(this,r)),this.active=!0}function $e(t,e,n,i){return t(e).source.run(n,i)}function tn(t,e,n){this.prev=this.next=null,this.time=t,this.outer=e,this.sink=n,this.disposable=void 0}function en(t,e){return Xe(t,1/0,e)}function nn(t){return Qe(1/0,t)}function rn(t,e){return Xe(t,1,e)}function on(){return sn($i(arguments))}function sn(t){var n=t.length;return 0===n?B():1===n?t[0]:new e(un(t))}function un(t){return new cn(tr(hn,[],t))}function hn(t,e){var n=e.source;return n instanceof cn?t.concat(n.sources):t.concat(n)}function cn(t){this.sources=t}function pn(t,e,n){this.sink=n,this.disposables=t,this.activeCount=e.length}function fn(t,e){return dn(t,e,r(2,arguments))}function an(t,n){return new e(new yn(Di,t.source,[n.source]))}function dn(t,n,i){return new e(new yn(t,n.source,h(ln,i)))}function ln(t){return t.source}function yn(t,e,n){this.f=t,this.sampler=e,this.sources=n}function vn(t){this.sink=t,this.hasValue=!1}function wn(t,e,n){this.f=t,this.sinks=e,this.sink=n,this.active=!1}function kn(t){return t.hasValue}function mn(t){return t.value}function _n(t){this._capacity=t||32,this._length=0,this._head=0}function bn(t,e,n,i,r){for(var o=0;o<r;++o)n[o+i]=t[o+e],t[o+e]=void 0}function gn(t){return xn(t,nr(arguments))}function xn(t,n){return 0===n.length?B():1===n.length?Kt(t,n[0]):new e(new An(t,er(En,n)))}function En(t){return t.source}function An(t,e){this.f=t,this.sources=e}function Tn(t,e,n,i){this.f=t,this.sinks=n,this.sink=i,this.buffers=e}function Pn(t,e,n,i){i.event(e,Ce(t,er(Mn,n)))}function Mn(t){return t.shift()}function Rn(t,e){for(var n=0,i=t.length;n<i;++n)if(t[n].isEmpty()&&!e[n].active)return!0;return!1}function In(t){for(var e=0,n=t.length;e<n;++e)if(t[e].isEmpty())return!1;return!0}function Ln(t){return new e(new Wn(t.source))}function Wn(t){this.source=t}function Cn(t,e){this.sink=t,this.scheduler=e,this.current=null,this.ended=!1}function Nn(t,e,n,i){this.min=t,this.max=e,this.outer=n,this.sink=i,this.disposable=b()}function Sn(t,n){return new e(Ut.create(t,n.source))}function qn(t){return Bn(Dn,t)}function Bn(t,n){return new e(new jn(t,n.source))}function jn(t,e){this.equals=t,this.source=e}function Vn(t,e){this.equals=t,this.sink=e,this.value=void 0,this.init=!0}function Dn(t,e){return t===e}function Un(t,e){return On(0,t,e)}function zn(t,e){return On(t,1/0,e)}function On(t,n,i){return n<=t?B():new e(Fn(t,n,i.source))}function Fn(t,e,n){return n instanceof Ht?Gn(t,e,n):n instanceof Jn?Hn(t,e,n):new Jn(t,e,n)}function Gn(t,e,n){return Ht.create(n.f,Fn(t,e,n.source))}function Hn(t,e,n){return t+=n.min,e=Math.min(e+n.min,n.max),new Jn(t,e,n.source)}function Jn(t,e,n){this.source=n,this.min=t,this.max=e}function Kn(t,e,n,i,r){this.sink=i,this.skip=t,this.take=e,this.disposable=T(n.run(this,r))}function Qn(t,n){return new e(new Xn(t,n.source))}function Xn(t,e){this.p=t,this.source=e}function Yn(t,e,n,i){this.p=t,this.sink=n,this.active=!0,this.disposable=T(e.run(this,i))}function Zn(t,n){return new e(new $n(t,n.source))}function $n(t,e){this.p=t,this.source=e}function ti(t,e){this.p=t,this.sink=e,this.skipping=!0}function ei(t,n){return new e(new ri(t.source,n.source))}function ni(t,n){return new e(new oi(t.source,n.source))}function ii(t,e){return ei(nn(t),ni(t,e))}function ri(t,e){this.maxSignal=t,this.source=e}function oi(t,e){this.minSignal=t,this.source=e}function si(t,e){this.value=t,this.sink=e}function ui(t,e,n){this.min=t,this.max=e,this.sink=n}function hi(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function ci(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function pi(){}function fi(t,n){return t<=0?n:new e(new ai(t,n.source))}function ai(t,e){this.dt=t,this.source=e}function di(t,e,n){this.dt=t,this.sink=e,this.scheduler=n}function li(t){return new e(new yi(t.source))}function yi(t){this.source=t}function vi(t){this.sink=t}function wi(t,n){return new e(ki(t,n.source))}function ki(t,e){return e instanceof Ht?mi(t,e):e instanceof bi?_i(t,e):new bi(t,e)}function mi(t,e){return Ht.create(e.f,ki(t,e.source))}function _i(t,e){return new bi(Math.max(t,e.period),e.source)}function bi(t,e){this.period=t,this.source=e}function gi(t,e){this.time=0,this.period=t,this.sink=e}function xi(t,n){return new e(new Ei(t,n.source))}function Ei(t,e){this.dt=t,this.source=e}function Ai(t,e,n,i){this.dt=t,this.sink=n,this.scheduler=i,this.value=void 0,this.timer=null;var r=e.run(this,i);this.disposable=g([this,r])}function Ti(t){return Pi(N(t))}function Pi(t){return new e(new Mi(t.source))}function Mi(t){this.source=t}function Ri(t,e){this.sink=t,this.scheduler=e,this.queue=Promise.resolve();var n=this;this._eventBound=function(t){n.sink.event(n.scheduler.now(),t)},this._endBound=function(t){n.sink.end(n.scheduler.now(),t)},this._errorBound=function(t){n.sink.error(n.scheduler.now(),t)}}function Ii(t){this.sink=t,this.active=!0}function Li(t,n){return new e(new Si(t,n.source))}function Wi(t){return new e(new Ci(t))}function Ci(t){this.value=t}function Ni(t,e,n){n.error(t,e)}function Si(t,e){this.f=t,this.source=e}function qi(t,e,n,i){this.f=t,this.sink=new Ii(n),this.scheduler=i,this.disposable=e.run(this,i)}function Bi(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function ji(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function Vi(t){var e=t.source;return e instanceof ur?t:new t.constructor(new ur(e))}var Di=function(t){return t},Ui=function(t,e){return function(n){return t(e(n))}},zi=function(t,e){return t(e)};v.prototype.dispose=function(){return this._dispose(this._data)},w.prototype.setDisposable=function(t){if(void 0!==this.disposable)throw new Error("setDisposable called more than once");this.disposable=t,this.disposed&&this._resolve(t.dispose())},w.prototype.dispose=function(){return this.disposed?this.result:(this.disposed=!0,void 0!==this.disposable&&(this.result=this.disposable.dispose()),this.result)};var Oi=h,Fi=Di;I.event=function(t,e){return new I(W,t,e)},I.end=function(t,e){return new I(C,t,e)},I.error=function(t,e){return new I(L,t,e)},I.prototype.dispose=function(){this.active=!1},I.prototype.run=function(t){this.active&&this._run(t,this.value,this.sink)},I.prototype.error=function(t,e){return this.active?void this.sink.error(t,e):R(e)},S.prototype.run=function(t,e){return e.asap(new I(q,this.value,t))},j.prototype.run=function(t,e){var n=I.end(void 0,t);return e.asap(n),_(V,n)};var Gi=new e(new j);U.prototype.run=function(){return b()};var Hi=new e(new U);O.prototype.run=function(t,e){return e.asap(new I(F,this.array,t))};var Ji;Ji="function"==typeof Set&&"function"==typeof(new Set)["@@iterator"]?"@@iterator":"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_",K.prototype.run=function(t,e){return new Q(H(this.iterable),t,e)},Q.prototype.dispose=function(){return this.task.dispose()};var Ki;Ki="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")();var Qi=Y(Ki);tt.prototype.run=function(t,e){var n=this.observable.subscribe(new et(t,e));if("function"==typeof n)return _(n);if(n&&"function"==typeof n.unsubscribe)return _(nt,n);throw new TypeError("Observable returned invalid subscription "+String(n))},et.prototype.next=function(t){this.sink.event(this.scheduler.now(),t)},et.prototype.complete=function(t){this.sink.end(this.scheduler.now(),t)},et.prototype.error=function(t){this.sink.error(this.scheduler.now(),t)},ot.prototype.run=function(t,e){return e.periodic(this.period,I.event(this.value,t))},st.prototype.run=function(){return this.task.run(this.time)},st.prototype.error=function(t){return this.task.error(this.time,t)},st.prototype.dispose=function(){return this.scheduler.cancel(this),this.task.dispose()},ct.prototype.now=function(){return this.timer.now()},ct.prototype.asap=function(t){return this.schedule(0,-1,t)},ct.prototype.delay=function(t,e){return this.schedule(t,-1,e)},ct.prototype.periodic=function(t,e){return this.schedule(0,t,e)},ct.prototype.schedule=function(t,e,n){var i=this.now(),r=new st(i+Math.max(0,t),e,n,this);return this.timeline.add(r),this._scheduleNextRun(i),r},ct.prototype.cancel=function(t){t.active=!1,this.timeline.remove(t)&&this._reschedule()},ct.prototype.cancelAll=function(t){this.timeline.removeAll(t),this._reschedule()},ct.prototype._reschedule=function(){this.timeline.isEmpty()?this._unschedule():this._scheduleNextRun(this.now())},ct.prototype._unschedule=function(){this.timer.clearTimer(this._timer),this._timer=null},ct.prototype._scheduleNextRun=function(t){if(!this.timeline.isEmpty()){var e=this.timeline.nextArrival();null===this._timer?this._scheduleNextArrival(e,t):e<this._nextArrival&&(this._unschedule(),this._scheduleNextArrival(e,t))}},ct.prototype._scheduleNextArrival=function(t,e){this._nextArrival=t;var n=Math.max(0,t-e);this._timer=this.timer.setTimer(this._runReadyTasksBound,n)},ct.prototype._runReadyTasks=function(t){this._timer=null,this.timeline.runTasks(t,ht),this._scheduleNextRun(this.now())},pt.prototype.now=Date.now,pt.prototype.setTimer=function(t,e){return e<=0?at(t):setTimeout(t,e)},pt.prototype.clearTimer=function(t){return t instanceof ft?t.cancel():clearTimeout(t)},ft.prototype.run=function(){return this.active&&this.f()},ft.prototype.error=function(t){throw t},ft.prototype.cancel=function(){this.active=!1},dt.prototype.nextArrival=function(){return this.isEmpty()?1/0:this.tasks[0].time},dt.prototype.isEmpty=function(){return 0===this.tasks.length},dt.prototype.add=function(t){yt(t,this.tasks)},dt.prototype.remove=function(t){var e=wt(t.time,this.tasks);if(e>=0&&e<this.tasks.length){var n=l(t,this.tasks[e].events);if(n>=0)return this.tasks[e].events.splice(n,1),!0}return!1},dt.prototype.removeAll=function(t){for(var e=this,n=0,i=this.tasks.length;n<i;++n)vt(t,e.tasks[n])},dt.prototype.runTasks=function(t,e){for(var n=this,i=this.tasks,r=i.length,o=0;o<r&&i[o].time<=t;)++o;this.tasks=i.slice(o);for(var s=0;s<o;++s)n.tasks=lt(e,i[s],n.tasks)};var Xi=new ct(new pt,new dt);_t.prototype.event=function(t,e){this.disposable.disposed||"function"!=typeof this.subscriber.next||this.subscriber.next(e)},_t.prototype.end=function(t,e){var n=this.subscriber;gt(this.fatalError,n,n.complete,n.error,this.disposable,e)},_t.prototype.error=function(t,e){var n=this.subscriber;gt(this.fatalError,n,n.error,n.error,this.disposable,e)},bt.prototype.unsubscribe=function(){this.disposable.dispose()},Tt.prototype.run=function(t,e){function n(n){Et(e.now(),n,t)}return this.source.addEventListener(this.event,n,this.capture),_(Pt,{target:this,addEvent:n})},Mt.prototype.event=function(t,e){this.active&&(0===this.events.length&&ut(new Rt(this.sink,t,this.events)),this.events.push({time:t,value:e}))},Mt.prototype.end=function(t,e){this.active&&this._end(new It(t,e,this.sink))},Mt.prototype.error=function(t,e){this._end(new Lt(t,e,this.sink))},Mt.prototype._end=function(t){this.active=!1,ut(t)},Rt.prototype.run=function(){for(var t,e=this,n=this.events,i=this.sink,r=0,o=n.length;r<o;++r)t=n[r],e.time=t.time,i.event(t.time,t.value);n.length=0},Rt.prototype.error=function(t){this.sink.error(this.time,t)},It.prototype.run=function(){this.sink.end(this.time,this.value)},It.prototype.error=function(t){this.sink.error(this.time,t)},Lt.prototype.run=function(){this.sink.error(this.time,this.value)},Lt.prototype.error=function(t){throw t},Wt.prototype.run=function(t,e){function n(t){var n=arguments,r=arguments.length;if(r>1){for(var o=new Array(r),s=0;s<r;++s)o[s]=n[s];Et(e.now(),o,i)}else Et(e.now(),t,i)}var i=new Mt(t);return this.source.addListener(this.event,n),_(Ct,{target:this,addEvent:n})},jt.prototype.event=function(t,e){},jt.prototype.end=function(t,e){this.active&&(this.active=!1,Vt(this._end,this._error,this._disposable,e))},jt.prototype.error=function(t,e){this.active=!1,Vt(this._error,this._error,this._disposable,e)},Dt.prototype.event=function(t,e){return this.sink.event(t,e)},Dt.prototype.end=function(t,e){return this.sink.end(t,e)},Dt.prototype.error=function(t,e){return this.sink.error(t,e)},Ut.create=function(t,e){return e instanceof Ut?new Ut(Ot(e.p,t),e.source):new Ut(t,e)},Ut.prototype.run=function(t,e){return this.source.run(new zt(this.p,t),e)},zt.prototype.end=Dt.prototype.end,zt.prototype.error=Dt.prototype.error,zt.prototype.event=function(t,e){var n=this.p;n(e)&&this.sink.event(t,e)},Ft.prototype.run=function(t,e){return this.source.run(new Gt(this.p,this.f,t),e)},Gt.prototype.event=function(t,e){var n=this.f,i=this.p;i(e)&&this.sink.event(t,n(e))},Gt.prototype.end=Dt.prototype.end,Gt.prototype.error=Dt.prototype.error,Ht.create=function(t,e){return e instanceof Ht?new Ht(Ui(t,e.f),e.source):e instanceof Ut?new Ft(e.p,t,e.source):new Ht(t,e)},Ht.prototype.run=function(t,e){return this.source.run(new Jt(this.f,t),e)},Jt.prototype.end=Dt.prototype.end,Jt.prototype.error=Dt.prototype.error,Jt.prototype.event=function(t,e){var n=this.f;this.sink.event(t,n(e))},Yt.prototype.run=function(t,e){return this.source.run(new Zt(this.f,t),e)},Zt.prototype.end=Dt.prototype.end,Zt.prototype.error=Dt.prototype.error,Zt.prototype.event=function(t,e){var n=this.f;n(e),this.sink.event(t,e)},ne.prototype.run=function(t,e){return this.source.run(new ie(this.step,this.seed,t),e)},ie.prototype.error=Dt.prototype.error,ie.prototype.event=function(t,e){var n=this.step(this.seed,e);this.seed=n.seed,this.sink.event(t,n.value)},ie.prototype.end=function(t){this.sink.end(t,this.seed)},oe.prototype.run=function(t,e){var n=e.asap(I.event(this.value,t)),i=this.source.run(new se(this.f,this.value,t),e);return g([n,i])},se.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},se.prototype.error=Dt.prototype.error,se.prototype.end=Dt.prototype.end,he.prototype.run=function(t,e){return this.source.run(new ce(this.f,this.value,t),e)},ce.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},ce.prototype.error=Dt.prototype.error,ce.prototype.end=function(t){this.sink.end(t,this.value)},fe.prototype.run=function(t,e){return new ae(this.f,this.value,t,e)},ae.prototype.dispose=function(){this.active=!1},ve.prototype.run=function(t,e){return new we(this.f,this.value,t,e)},we.prototype.dispose=function(){this.active=!1},be.prototype.run=function(t,e){return new ge(this.f.apply(void 0,this.args),t,e)},ge.prototype.dispose=function(){this.active=!1},Me.prototype.run=function(t,e){return new Re(this.f,this.source,t,e)},Re.prototype.error=Dt.prototype.error,Re.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},Re.prototype.end=function(t,e){this.active&&(m(t,this.disposable,this.sink),this._startNext(t,e,this.sink))},Re.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Re.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},Re.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()},We.prototype.event=function(t,e){this.active&&(this.value=e,this.sink.event(t,this))},We.prototype.end=function(t,e){this.active&&(this.active=!1,this.sink.end(t,{index:this.index,value:e}))},We.prototype.error=Dt.prototype.error;var Yi=h,Zi=s;je.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Ve(o,s,t,this.f),h=0;h<r;++h)n=s[h]=new We(h,u),o[h]=i.sources[h].run(n,e);return g(o)},Ve.prototype.error=Dt.prototype.error,Ve.prototype.event=function(t,e){var n=e.index,i=this._updateReady(n);this.values[n]=e.value,0===i&&this.sink.event(t,Ce(this.f,this.values))},Ve.prototype._updateReady=function(t){return this.awaiting>0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},Ve.prototype.end=function(t,e){m(t,this.disposables[e.index],this.sink),0===--this.activeCount&&this.sink.end(t,e.value)},ze.prototype.run=function(t,e){var n=this.transducer(new Fe(t));return this.source.run(new Oe(Ge(n),t),e)},Oe.prototype.event=function(t,e){var n=this.xf.step(t,e);return this.xf.isReduced(n)?this.sink.end(t,this.xf.getResult(n)):n},Oe.prototype.end=function(t,e){return this.xf.result(e)},Oe.prototype.error=function(t,e){return this.sink.error(t,e)},Fe.prototype["@@transducer/init"]=Fe.prototype.init=function(){},Fe.prototype["@@transducer/step"]=Fe.prototype.step=function(t,e){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,e)},Fe.prototype["@@transducer/result"]=Fe.prototype.result=function(t){return this.sink.end(this.time,t)},He.prototype.step=function(t,e){return this.tx["@@transducer/step"](t,e)},He.prototype.result=function(t){return this.tx["@@transducer/result"](t)},He.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},He.prototype.getResult=function(t){return t["@@transducer/value"]},Je.prototype.step=function(t,e){return this.tx.step(t,e)},Je.prototype.result=function(t){return this.tx.result(t)},Je.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},Je.prototype.getResult=function(t){return t.value},Ke.prototype.add=function(t){null!==this.head&&(this.head.prev=t,t.next=this.head),this.head=t,++this.length},Ke.prototype.remove=function(t){--this.length,t===this.head&&(this.head=this.head.next),null!==t.next&&(t.next.prev=t.prev,t.next=null),null!==t.prev&&(t.prev.next=t.next,t.prev=null)},Ke.prototype.isEmpty=function(){return 0===this.length},Ke.prototype.dispose=function(){if(this.isEmpty())return Promise.resolve();var t=[],e=this.head;for(this.head=null,this.length=0;null!==e;)t.push(e.dispose()),e=e.next;return Promise.all(t)},Ye.prototype.run=function(t,e){return new Ze(this.f,this.concurrency,this.source,t,e)},Ze.prototype.event=function(t,e){this._addInner(t,e)},Ze.prototype._addInner=function(t,e){this.current.length<this.concurrency?this._startInner(t,e):this.pending.push(e)},Ze.prototype._startInner=function(t,e){try{this._initInner(t,e)}catch(e){this.error(t,e)}},Ze.prototype._initInner=function(t,e){var n=new tn(t,this,this.sink);n.disposable=$e(this.f,e,n,this.scheduler),this.current.add(n)},Ze.prototype.end=function(t,e){this.active=!1,m(t,this.disposable,this.sink),this._checkEnd(t,e)},Ze.prototype.error=function(t,e){this.active=!1,this.sink.error(t,e)},Ze.prototype.dispose=function(){return this.active=!1,this.pending.length=0,Promise.all([this.disposable.dispose(),this.current.dispose()])},Ze.prototype._endInner=function(t,e,n){this.current.remove(n),m(t,n,this),0===this.pending.length?this._checkEnd(t,e):this._startInner(t,this.pending.shift())},Ze.prototype._checkEnd=function(t,e){!this.active&&this.current.isEmpty()&&this.sink.end(t,e)},tn.prototype.event=function(t,e){this.sink.event(Math.max(t,this.time),e)},tn.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.time),e,this)},tn.prototype.error=function(t,e){this.outer.error(Math.max(t,this.time),e)},tn.prototype.dispose=function(){return this.disposable.dispose()};var $i=u,tr=c;cn.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new pn(o,s,t),h=0;h<r;++h)n=s[h]=new We(h,u),o[h]=i.sources[h].run(n,e);return g(o)},pn.prototype.error=Dt.prototype.error,pn.prototype.event=function(t,e){this.sink.event(t,e.value)},pn.prototype.end=function(t,e){m(t,this.disposables[e.index],this.sink),0===--this.activeCount&&this.sink.end(t,e.value)},yn.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r+1),s=new Array(r),u=new wn(this.f,s,t),h=0;h<r;++h)n=s[h]=new vn(u),o[h]=i.sources[h].run(n,e);return o[h]=this.sampler.run(u,e),g(o)},vn.prototype.event=function(t,e){this.value=e,this.hasValue=!0,this.sink._notify(this)},vn.prototype.end=function(){},vn.prototype.error=Dt.prototype.error,wn.prototype._notify=function(){this.active||(this.active=this.sinks.every(kn))},wn.prototype.event=function(t){this.active&&this.sink.event(t,Ce(this.f,h(mn,this.sinks)))},wn.prototype.end=Dt.prototype.end,wn.prototype.error=Dt.prototype.error,_n.prototype.push=function(t){var e=this._length;this._checkCapacity(e+1);var n=this._head+e&this._capacity-1;this[n]=t,this._length=e+1},_n.prototype.shift=function(){var t=this._head,e=this[t];return this[t]=void 0,this._head=t+1&this._capacity-1,this._length--,e},_n.prototype.isEmpty=function(){return 0===this._length},_n.prototype.length=function(){return this._length},_n.prototype._checkCapacity=function(t){this._capacity<t&&this._ensureCapacity(this._capacity<<1)},_n.prototype._ensureCapacity=function(t){var e=this._capacity;this._capacity=t;var n=this._head+this._length;n>e&&bn(this,0,this,e,n&e-1)};var er=h,nr=s;An.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Array(r),h=new Tn(this.f,u,s,t),c=0;c<r;++c)u[c]=new _n,
n=s[c]=new We(c,h),o[c]=i.sources[c].run(n,e);return g(o)},Tn.prototype.event=function(t,e){var n=this.buffers,i=n[e.index];if(i.push(e.value),1===i.length()){if(!In(this.buffers))return;Pn(this.f,t,n,this.sink),Rn(this.buffers,this.sinks)&&this.sink.end(t,void 0)}},Tn.prototype.end=function(t,e){var n=this.buffers[e.index];n.isEmpty()&&this.sink.end(t,e.value)},Tn.prototype.error=Dt.prototype.error,Wn.prototype.run=function(t,e){var n=new Cn(t,e);return g([n,this.source.run(n,e)])},Cn.prototype.event=function(t,e){this._disposeCurrent(t),this.current=new Nn(t,1/0,this,this.sink),this.current.disposable=e.source.run(this.current,this.scheduler)},Cn.prototype.end=function(t,e){this.ended=!0,this._checkEnd(t,e)},Cn.prototype.error=function(t,e){this.ended=!0,this.sink.error(t,e)},Cn.prototype.dispose=function(){return this._disposeCurrent(this.scheduler.now())},Cn.prototype._disposeCurrent=function(t){if(null!==this.current)return this.current._dispose(t)},Cn.prototype._disposeInner=function(t,e){e._dispose(t),e===this.current&&(this.current=null)},Cn.prototype._checkEnd=function(t,e){this.ended&&null===this.current&&this.sink.end(t,e)},Cn.prototype._endInner=function(t,e,n){this._disposeInner(t,n),this._checkEnd(t,e)},Cn.prototype._errorInner=function(t,e,n){this._disposeInner(t,n),this.sink.error(t,e)},Nn.prototype.event=function(t,e){t<this.max&&this.sink.event(Math.max(t,this.min),e)},Nn.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.min),e,this)},Nn.prototype.error=function(t,e){this.outer._errorInner(Math.max(t,this.min),e,this)},Nn.prototype._dispose=function(t){this.max=t,m(t,this.disposable,this.sink)},jn.prototype.run=function(t,e){return this.source.run(new Vn(this.equals,t),e)},Vn.prototype.end=Dt.prototype.end,Vn.prototype.error=Dt.prototype.error,Vn.prototype.event=function(t,e){this.init?(this.init=!1,this.value=e,this.sink.event(t,e)):this.equals(this.value,e)||(this.value=e,this.sink.event(t,e))},Jn.prototype.run=function(t,e){return new Kn(this.min,this.max-this.min,this.source,t,e)},Kn.prototype.end=Dt.prototype.end,Kn.prototype.error=Dt.prototype.error,Kn.prototype.event=function(t,e){return this.skip>0?void(this.skip-=1):void(0!==this.take&&(this.take-=1,this.sink.event(t,e),0===this.take&&(this.dispose(),this.sink.end(t,e))))},Kn.prototype.dispose=function(){return this.disposable.dispose()},Xn.prototype.run=function(t,e){return new Yn(this.p,this.source,t,e)},Yn.prototype.end=Dt.prototype.end,Yn.prototype.error=Dt.prototype.error,Yn.prototype.event=function(t,e){if(this.active){var n=this.p;this.active=n(e),this.active?this.sink.event(t,e):(this.dispose(),this.sink.end(t,e))}},Yn.prototype.dispose=function(){return this.disposable.dispose()},$n.prototype.run=function(t,e){return this.source.run(new ti(this.p,t),e)},ti.prototype.end=Dt.prototype.end,ti.prototype.error=Dt.prototype.error,ti.prototype.event=function(t,e){if(this.skipping){var n=this.p;if(this.skipping=n(e),this.skipping)return}this.sink.event(t,e)},ri.prototype.run=function(t,e){var n=new si(-(1/0),t),i=new ci(this.maxSignal,t,e),r=this.source.run(new ui(n,i,t),e);return g([n,i,r])},oi.prototype.run=function(t,e){var n=new hi(this.minSignal,t,e),i=new si(1/0,t),r=this.source.run(new ui(n,i,t),e);return g([n,i,r])},si.prototype.error=Dt.prototype.error,si.prototype.event=pi,si.prototype.end=pi,si.prototype.dispose=pi,ui.prototype.event=function(t,e){t>=this.min.value&&t<this.max.value&&this.sink.event(t,e)},ui.prototype.error=Dt.prototype.error,ui.prototype.end=Dt.prototype.end,hi.prototype.event=function(t){t<this.value&&(this.value=t)},hi.prototype.end=pi,hi.prototype.error=Dt.prototype.error,hi.prototype.dispose=function(){return this.disposable.dispose()},ci.prototype.event=function(t,e){t<this.value&&(this.value=t,this.sink.end(t,e))},ci.prototype.end=pi,ci.prototype.error=Dt.prototype.error,ci.prototype.dispose=function(){return this.disposable.dispose()},ai.prototype.run=function(t,e){var n=new di(this.dt,t,e);return g([n,this.source.run(n,e)])},di.prototype.dispose=function(){var t=this;this.scheduler.cancelAll(function(e){return e.sink===t.sink})},di.prototype.event=function(t,e){this.scheduler.delay(this.dt,I.event(e,this.sink))},di.prototype.end=function(t,e){this.scheduler.delay(this.dt,I.end(e,this.sink))},di.prototype.error=Dt.prototype.error,yi.prototype.run=function(t,e){return this.source.run(new vi(t),e)},vi.prototype.end=Dt.prototype.end,vi.prototype.error=Dt.prototype.error,vi.prototype.event=function(t,e){this.sink.event(t,{time:t,value:e})},bi.prototype.run=function(t,e){return this.source.run(new gi(this.period,t),e)},gi.prototype.event=function(t,e){t>=this.time&&(this.time=t+this.period,this.sink.event(t,e))},gi.prototype.end=Dt.prototype.end,gi.prototype.error=Dt.prototype.error,Ei.prototype.run=function(t,e){return new Ai(this.dt,this.source,t,e)},Ai.prototype.event=function(t,e){this._clearTimer(),this.value=e,this.timer=this.scheduler.delay(this.dt,I.event(e,this.sink))},Ai.prototype.end=function(t,e){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,e)},Ai.prototype.error=function(t,e){this._clearTimer(),this.sink.error(t,e)},Ai.prototype.dispose=function(){this._clearTimer()},Ai.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},Mi.prototype.run=function(t,e){return this.source.run(new Ri(t,e),e)},Ri.prototype.event=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._event(e)}).catch(this._errorBound)},Ri.prototype.end=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._end(e)}).catch(this._errorBound)},Ri.prototype.error=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._errorBound(e)}).catch(R)},Ri.prototype._event=function(t){return t.then(this._eventBound)},Ri.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)},Ii.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},Ii.prototype.end=function(t,e){this.active&&(this.disable(),this.sink.end(t,e))},Ii.prototype.error=function(t,e){this.disable(),this.sink.error(t,e)},Ii.prototype.disable=function(){return this.active=!1,this.sink};var ir=Li;Ci.prototype.run=function(t,e){return e.asap(new I(Ni,this.value,t))},Si.prototype.run=function(t,e){return new qi(this.f,this.source,t,e)},qi.prototype.event=function(t,e){Et(t,e,this.sink)},qi.prototype.end=function(t,e){At(t,e,this.sink)},qi.prototype.error=function(t,e){var n=this.sink.disable();m(t,this.disposable,this.sink),this._startNext(t,e,n)},qi.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},qi.prototype._continue=function(t,e,n){var i=t(e);return i.source.run(n,this.scheduler)},qi.prototype.dispose=function(){return this.disposable.dispose()};var rr=function(t,e){this.source=t,this.sink=e,this.disposed=!1};rr.prototype.dispose=function(){if(!this.disposed){this.disposed=!0;var t=this.source.remove(this.sink);return 0===t&&this.source._dispose()}};var or=function(t){return t.dispose()},sr={dispose:function(){}},ur=function(t){this.source=t,this.sinks=[],this._disposable=sr};ur.prototype.run=function(t,e){var n=this.add(t);return 1===n&&(this._disposable=this.source.run(this,e)),new rr(this,t)},ur.prototype._dispose=function(){var t=this._disposable;return this._disposable=sr,Promise.resolve(t).then(or)},ur.prototype.add=function(t){return this.sinks=i(t,this.sinks),this.sinks.length},ur.prototype.remove=function(t){var e=l(t,this.sinks);return e>=0&&(this.sinks=f(e,this.sinks)),this.sinks.length},ur.prototype.event=function(t,e){var n=this.sinks;if(1===n.length)return n[0].event(t,e);for(var i=0;i<n.length;++i)Bi(t,e,n[i])},ur.prototype.end=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)ji(t,e,n[i])},ur.prototype.error=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)n[i].error(t,e)},e.of=N,e.empty=B,e.from=it,e.prototype.subscribe=function(t){return mt(t,this)},e.prototype[Qi]=function(){return this},e.prototype.thru=function(t){return xt(t,this)},e.prototype.observe=e.prototype.forEach=function(t){return $t(t,this)},e.prototype.drain=function(){return te(this)},e.prototype.loop=function(t,e){return ee(t,e,this)},e.prototype.scan=function(t,e){return re(t,e,this)},e.prototype.reduce=function(t,e){return ue(t,e,this)},e.prototype.concat=function(t){return Le(this,t)},e.prototype.startWith=function(t){return Ie(t,this)},e.prototype.map=function(t){return Kt(t,this)},e.prototype.ap=function(t){return De(this,t)},e.prototype.constant=function(t){return Qt(t,this)},e.prototype.tap=function(t){return Xt(t,this)},e.prototype.transduce=function(t){return Ue(t,this)},e.prototype.flatMap=e.prototype.chain=function(t){return en(t,this)},e.prototype.join=function(){return nn(this)},e.prototype.continueWith=e.prototype.flatMapEnd=function(t){return Pe(t,this)},e.prototype.concatMap=function(t){return rn(t,this)},e.prototype.mergeConcurrently=function(t){return Qe(t,this)},e.prototype.merge=function(){return sn(n(this,arguments))},e.prototype.combine=function(t){return Se(t,p(this,0,arguments))},e.prototype.sampleWith=function(t){return an(t,this)},e.prototype.sample=function(t){return dn(t,this,s(arguments))},e.prototype.zip=function(t){return xn(t,p(this,0,arguments))},e.prototype.switch=e.prototype.switchLatest=function(){return Ln(this)},e.prototype.filter=function(t){return Sn(t,this)},e.prototype.skipRepeats=function(){return qn(this)},e.prototype.skipRepeatsWith=function(t){return Bn(t,this)},e.prototype.take=function(t){return Un(t,this)},e.prototype.skip=function(t){return zn(t,this)},e.prototype.slice=function(t,e){return On(t,e,this)},e.prototype.takeWhile=function(t){return Qn(t,this)},e.prototype.skipWhile=function(t){return Zn(t,this)},e.prototype.until=e.prototype.takeUntil=function(t){return ei(t,this)},e.prototype.since=e.prototype.skipUntil=function(t){return ni(t,this)},e.prototype.during=function(t){return ii(t,this)},e.prototype.delay=function(t){return fi(t,this)},e.prototype.timestamp=function(){return li(this)},e.prototype.throttle=function(t){return wi(t,this)},e.prototype.debounce=function(t){return xi(t,this)},e.prototype.await=function(){return Pi(this)},e.prototype.recoverWith=e.prototype.flatMapError=function(t){return ir(t,this)},e.prototype.multicast=function(){return Vi(this)},t.Stream=e,t.of=N,t.just=N,t.empty=B,t.never=D,t.from=it,t.periodic=rt,t.observe=$t,t.forEach=$t,t.drain=te,t.loop=ee,t.scan=re,t.reduce=ue,t.concat=Le,t.startWith=Ie,t.map=Kt,t.constant=Qt,t.tap=Xt,t.ap=De,t.transduce=Ue,t.flatMap=en,t.chain=en,t.join=nn,t.continueWith=Pe,t.flatMapEnd=Pe,t.concatMap=rn,t.mergeConcurrently=Qe,t.merge=on,t.mergeArray=sn,t.combine=Ne,t.combineArray=Se,t.sample=fn,t.sampleArray=dn,t.sampleWith=an,t.zip=gn,t.zipArray=xn,t.switchLatest=Ln,t.switch=Ln,t.filter=Sn,t.skipRepeats=qn,t.distinct=qn,t.skipRepeatsWith=Bn,t.distinctBy=Bn,t.take=Un,t.skip=zn,t.slice=On,t.takeWhile=Qn,t.skipWhile=Zn,t.takeUntil=ei,t.until=ei,t.skipUntil=ni,t.since=ni,t.during=ii,t.delay=fi,t.timestamp=li,t.throttle=wi,t.debounce=xi,t.fromPromise=Ti,t.awaitPromises=Pi,t.await=Pi,t.recoverWith=Li,t.flatMapError=ir,t.throwError=Wi,t.multicast=Vi,t.defaultScheduler=Xi,t.PropagateTask=I,t.fromEvent=Nt,t.unfold=pe,t.iterate=ye,t.generate=_e,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.most=t.most||{})}(this,function(t){"use strict";function e(t){this.source=t}function n(t,e){var n=e.length,i=new Array(n+1);i[0]=t;for(var r=0;r<n;++r)i[r+1]=e[r];return i}function i(t,e){for(var n=e.length,i=new Array(n+1),r=0;r<n;++r)i[r]=e[r];return i[n]=t,i}function r(t,e){if(t<0)throw new TypeError("n must be >= 0");var n=e.length;return 0===t||0===n?e:t>=n?[]:o(t,e,n-t)}function o(t,e,n){for(var i=new Array(n),r=0;r<n;++r)i[r]=e[t+r];return i}function s(t){return r(1,t)}function u(t){for(var e=t.length,n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function h(t,e){for(var n=e.length,i=new Array(n),r=0;r<n;++r)i[r]=t(e[r]);return i}function c(t,e,n){for(var i=e,r=0,o=n.length;r<o;++r)i=t(i,n[r],r);return i}function p(t,e,n){if(e<0)throw new TypeError("i must be >= 0");for(var i=n.length,r=new Array(i),o=0;o<i;++o)r[o]=e===o?t:n[o];return r}function f(t,e){if(t<0)throw new TypeError("i must be >= 0");var n=e.length;return 0===n||t>=n?e:1===n?[]:a(t,e,n-1)}function a(t,e,n){var i,r=new Array(n);for(i=0;i<t;++i)r[i]=e[i];for(i=t;i<n;++i)r[i]=e[i+1];return r}function d(t,e){for(var n=e.length,i=new Array(n),r=0,o=void 0,s=0;s<n;++s)o=e[s],t(o)||(i[r]=o,++r);return i.length=r,i}function l(t,e){for(var n=0,i=e.length;n<i;++n)if(t===e[n])return n;return-1}function y(t){return null!=t&&"number"==typeof t.length&&"function"!=typeof t}function v(t,e){this._dispose=t,this._data=e}function w(){this.disposable=void 0,this.disposed=!1,this._resolve=void 0;var t=this;this.result=new Promise(function(e){t._resolve=e})}function k(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}function m(t,e,n){var i=E(e);return k(i)?i.catch(function(e){n.error(t,e)}):i}function _(t,e){return T(new v(t,e))}function b(){return new v(Oi,void 0)}function g(t){return _(x,t)}function x(t){return Promise.all(zi(E,t))}function E(t){try{return t.dispose()}catch(t){return Promise.reject(t)}}function A(){return new w}function T(t){return new v(P,M(t))}function P(t){return t.disposed||(t.disposed=!0,t.value=E(t.disposable),t.disposable=void 0),t.value}function M(t){return{disposed:!1,disposable:t,value:void 0}}function R(t){setTimeout(function(){throw t},0)}function I(t,e,n){this._run=t,this.value=e,this.sink=n,this.active=!0}function W(t,e,n){n.error(t,e)}function L(t,e,n){n.event(t,e)}function C(t,e,n){n.end(t,e)}function N(t){return new e(new S(t))}function S(t){this.value=t}function q(t,e,n){n.event(t,e),n.end(t,void 0)}function B(){return Fi}function j(){}function V(t){return t.dispose()}function D(){return Gi}function U(){}function z(t){return new e(new O(t))}function O(t){this.array=t}function F(t,e,n){function i(t){n.end(t)}for(var r=0,o=e.length;r<o&&this.active;++r)n.event(t,e[r]);this.active&&i(t)}function G(t){return"function"==typeof t[Hi]}function H(t){return t[Hi]()}function J(t){return new e(new K(t))}function K(t){this.iterable=t}function Q(t,e,n){for(var i=e.next();!i.done&&this.active;)n.event(t,i.value),i=e.next();n.end(t,i.value)}function X(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}function Y(t){var e=null;if(t){var n=t[Ki];if("function"==typeof n&&(e=n.call(t),!e||"function"!=typeof e.subscribe))throw new TypeError("invalid observable "+e)}return e}function Z(t){return new e(new $(t))}function $(t){this.observable=t}function tt(t,e){this.sink=t,this.scheduler=e}function et(t){return t.unsubscribe()}function nt(t){if(t instanceof e)return t;var n=Y(t);if(null!=n)return Z(n);if(Array.isArray(t)||y(t))return z(t);if(G(t))return J(t);throw new TypeError("from(x) must be observable, iterable, or array-like: "+t)}function it(t,n){return new e(new rt(t,n))}function rt(t,e){this.period=t,this.value=e}function ot(t,e,n,i){this.time=t,this.period=e,this.task=n,this.scheduler=i,this.active=!0}function st(t){return Promise.resolve(t).then(ut)}function ut(t){try{return t.run()}catch(e){return t.error(e)}}function ht(t,e){this.timer=t,this.timeline=e,this._timer=null,this._nextArrival=1/0;var n=this;this._runReadyTasksBound=function(){n._runReadyTasks(n.now())}}function ct(){}function pt(t){this.f=t,this.active=!0}function ft(t){var e=new pt(t);return st(e),e}function at(){this.tasks=[]}function dt(t,e,n){for(var i=e.events,r=0;r<i.length;++r){var o=i[r];o.active&&(t(o),o.period>=0&&o.active&&(o.time=o.time+o.period,lt(o,n)))}return n}function lt(t,e){var n=e.length;if(0===n)return void e.push(wt(t.time,[t]));var i=vt(t.time,e);i>=n?e.push(wt(t.time,[t])):t.time===e[i].time?e[i].events.push(t):e.splice(i,0,wt(t.time,[t]))}function yt(t,e){e.events=d(t,e.events)}function vt(t,e){for(var n,i,r=0,o=e.length;r<o;){if(n=Math.floor((r+o)/2),i=e[n],t===i.time)return n;t<i.time?o=n:r=n+1}return o}function wt(t,e){return{time:t,events:e}}function kt(t,e){if(null==t||"object"!=typeof t)throw new TypeError("subscriber must be an object");var n=A(),i=new mt(R,t,n);return n.setDisposable(e.source.run(i,Qi)),new _t(n)}function mt(t,e,n){this.fatalError=t,this.subscriber=e,this.disposable=n}function _t(t){this.disposable=t}function bt(t,e,n,i,r,o){Promise.resolve(r.dispose()).then(function(){"function"==typeof n&&n.call(e,o)}).catch(function(t){"function"==typeof i&&i.call(e,t)}).catch(t)}function gt(t,e){return t(e)}function xt(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function Et(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function At(t,e,n){this.event=t,this.source=e,this.capture=n}function Tt(t){var e=t.target;e.source.removeEventListener(e.event,t.addEvent,e.capture)}function Pt(t){this.sink=t,this.events=[],this.active=!0}function Mt(t,e,n){this.sink=t,this.events=n,this.time=e}function Rt(t,e,n){this.time=t,this.value=e,this.sink=n}function It(t,e,n){this.time=t,this.value=e,this.sink=n}function Wt(t,e){this.event=t,this.source=e}function Lt(t){var e=t.target;e.source.removeListener(e.event,t.addEvent)}function Ct(t,n,i){var r;if("function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener)arguments.length<3&&(i=!1),r=new At(t,n,i);else{if("function"!=typeof n.addListener||"function"!=typeof n.removeListener)throw new Error("source must support addEventListener/removeEventListener or addListener/removeListener");r=new Wt(t,n)}return new e(r)}function Nt(t){return St(t,Qi)}function St(t,e){return new Promise(function(n,i){qt(t,e,n,i)})}function qt(t,e,n,i){var r=A(),o=new Bt(n,i,r);r.setDisposable(t.run(o,e))}function Bt(t,e,n){this._end=t,this._error=e,this._disposable=n,this.active=!0}function jt(t,e,n,i){Promise.resolve(n.dispose()).then(function(){t(i)},e)}function Vt(t){this.sink=t}function Dt(t,e){this.p=t,this.source=e}function Ut(t,e){this.p=t,this.sink=e}function zt(t,e){return function(n){return t(n)&&e(n)}}function Ot(t,e,n){this.p=t,this.f=e,this.source=n}function Ft(t,e,n){this.p=t,this.f=e,this.sink=n}function Gt(t,e){this.f=t,this.source=e}function Ht(t,e){this.f=t,this.sink=e}function Jt(t,n){return new e(Gt.create(t,n.source))}function Kt(t,e){return Jt(function(){return t},e)}function Qt(t,n){return new e(new Xt(t,n.source))}function Xt(t,e){this.source=e,this.f=t}function Yt(t,e){this.sink=e,this.f=t}function Zt(t,e){return $t(Qt(t,e))}function $t(t){return Nt(t.source)}function te(t,n,i){return new e(new ee(t,n,i.source))}function ee(t,e,n){this.step=t,this.seed=e,this.source=n}function ne(t,e,n){this.step=t,this.seed=e,this.sink=n}function ie(t,n,i){return new e(new re(t,n,i.source))}function re(t,e,n){this.source=n,this.f=t,this.value=e}function oe(t,e,n){this.f=t,this.value=e,this.sink=n}function se(t,e,n){return Nt(new ue(t,e,n.source))}function ue(t,e,n){this.source=n,this.f=t,this.value=e}function he(t,e,n){this.f=t,this.value=e,this.sink=n}function ce(t,n){return new e(new pe(t,n))}function pe(t,e){this.f=t,this.value=e}function fe(t,e,n,i){function r(t){s.sink.error(s.scheduler.now(),t)}function o(t){return ae(t,e)}this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var s=this;Promise.resolve(this).then(o).catch(r)}function ae(t,e){var n=t.f;return Promise.resolve(n(e)).then(function(e){return de(t,e)})}function de(t,e){return e.done?(t.sink.end(t.scheduler.now(),e.value),e.value):(t.sink.event(t.scheduler.now(),e.value),t.active?ae(t,e.seed):e.value)}function le(t,n){return new e(new ye(t,n))}function ye(t,e){this.f=t,this.value=e}function ve(t,e,n,i){function r(t){u.sink.error(u.scheduler.now(),t)}function o(t){return we(t,s)}this.f=t,this.sink=n,this.scheduler=i,this.active=!0;var s=e,u=this;Promise.resolve(this).then(o).catch(r)}function we(t,e){if(t.sink.event(t.scheduler.now(),e),!t.active)return e;var n=t.f;return Promise.resolve(n(e)).then(function(e){return ke(t,e)})}function ke(t,e){return t.active?we(t,e):t.value}function me(t){return new e(new _e(t,s(arguments)))}function _e(t,e){this.f=t,this.args=e}function be(t,e,n){function i(t){r.sink.error(r.scheduler.now(),t)}this.iterator=t,this.sink=e,this.scheduler=n,this.active=!0;var r=this;Promise.resolve(this).then(ge).catch(i)}function ge(t,e){return t.active?xe(t,t.iterator.next(e)):e}function xe(t,e){return e.done?t.sink.end(t.scheduler.now(),e.value):Promise.resolve(e.value).then(function(e){return Ee(t,e)},function(e){return Ae(t,e)})}function Ee(t,e){return t.sink.event(t.scheduler.now(),e),ge(t,e)}function Ae(t,e){return xe(t,t.iterator.throw(e))}function Te(t,n){return new e(new Pe(t,n.source))}function Pe(t,e){this.f=t,this.source=e}function Me(t,e,n,i){this.f=t,this.sink=n,this.scheduler=i,this.active=!0,this.disposable=T(e.run(this,i))}function Re(t,e){return Ie(N(t),e)}function Ie(t,e){return Te(function(){return e},t)}function We(t,e){this.sink=e,this.index=t,this.active=!0,this.value=void 0}function Le(t,e){switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return t(e[0],e[1]);case 3:return t(e[0],e[1],e[2]);case 4:return t(e[0],e[1],e[2],e[3]);case 5:return t(e[0],e[1],e[2],e[3],e[4]);default:return t.apply(void 0,e)}}function Ce(t){return Ne(t,Yi(arguments))}function Ne(t,n){var i=n.length;return 0===i?B():1===i?Jt(t,n[0]):new e(Se(t,n))}function Se(t,e){return new Be(t,Xi(qe,e))}function qe(t){return t.source}function Be(t,e){this.f=t,this.sources=e}function je(t,e,n,i){var r=this;this.sink=n,this.disposables=t,this.sinks=e,this.f=i;var o=e.length;this.awaiting=o,this.values=new Array(o),this.hasValue=new Array(o);for(var s=0;s<o;++s)r.hasValue[s]=!1;this.activeCount=e.length}function Ve(t,e){return Ce(Ui,t,e)}function De(t,n){return new e(new Ue(t,n.source))}function Ue(t,e){this.transducer=t,this.source=e}function ze(t,e){this.xf=t,this.sink=e}function Oe(t){this.time=-(1/0),this.sink=t}function Fe(t){return"function"==typeof t["@@transducer/step"]?new Ge(t):new He(t)}function Ge(t){this.tx=t}function He(t){this.tx=t}function Je(){this.head=null,this.length=0}function Ke(t,e){return Qe(Vi,t,e)}function Qe(t,n,i){return new e(new Xe(t,n,i.source))}function Xe(t,e,n){this.f=t,this.concurrency=e,this.source=n}function Ye(t,e,n,i,r){this.f=t,this.concurrency=e,this.sink=i,this.scheduler=r,this.pending=[],this.current=new Je,this.disposable=T(n.run(this,r)),this.active=!0}function Ze(t,e,n,i){return t(e).source.run(n,i)}function $e(t,e,n){this.prev=this.next=null,this.time=t,this.outer=e,this.sink=n,this.disposable=void 0}function tn(t,e){return Qe(t,1/0,e)}function en(t){return Ke(1/0,t)}function nn(t,e){return Qe(t,1,e)}function rn(){return on(Zi(arguments))}function on(t){var n=t.length;return 0===n?B():1===n?t[0]:new e(sn(t))}function sn(t){return new hn($i(un,[],t))}function un(t,e){var n=e.source;return n instanceof hn?t.concat(n.sources):t.concat(n)}function hn(t){this.sources=t}function cn(t,e,n){this.sink=n,this.disposables=t,this.activeCount=e.length}function pn(t,e){return an(t,e,r(2,arguments))}function fn(t,n){return new e(new ln(Vi,t.source,[n.source]))}function an(t,n,i){return new e(new ln(t,n.source,h(dn,i)))}function dn(t){return t.source}function ln(t,e,n){this.f=t,this.sampler=e,this.sources=n}function yn(t){this.sink=t,this.hasValue=!1}function vn(t,e,n){this.f=t,this.sinks=e,this.sink=n,this.active=!1}function wn(t){return t.hasValue}function kn(t){return t.value}function mn(t){this._capacity=t||32,this._length=0,this._head=0}function _n(t,e,n,i,r){for(var o=0;o<r;++o)n[o+i]=t[o+e],t[o+e]=void 0}function bn(t){return gn(t,er(arguments))}function gn(t,n){return 0===n.length?B():1===n.length?Jt(t,n[0]):new e(new En(t,tr(xn,n)))}function xn(t){return t.source}function En(t,e){this.f=t,this.sources=e}function An(t,e,n,i){this.f=t,this.sinks=n,this.sink=i,this.buffers=e}function Tn(t,e,n,i){i.event(e,Le(t,tr(Pn,n)))}function Pn(t){return t.shift()}function Mn(t,e){for(var n=0,i=t.length;n<i;++n)if(t[n].isEmpty()&&!e[n].active)return!0;return!1}function Rn(t){for(var e=0,n=t.length;e<n;++e)if(t[e].isEmpty())return!1;return!0}function In(t){return new e(new Wn(t.source))}function Wn(t){this.source=t}function Ln(t,e){this.sink=t,this.scheduler=e,this.current=null,this.ended=!1}function Cn(t,e,n,i){this.min=t,this.max=e,this.outer=n,this.sink=i,this.disposable=b()}function Nn(t,n){return new e(Dt.create(t,n.source))}function Sn(t){return qn(Vn,t)}function qn(t,n){return new e(new Bn(t,n.source))}function Bn(t,e){this.equals=t,this.source=e}function jn(t,e){this.equals=t,this.sink=e,this.value=void 0,this.init=!0}function Vn(t,e){return t===e}function Dn(t,e){return zn(0,t,e)}function Un(t,e){return zn(t,1/0,e)}function zn(t,n,i){return n<=t?B():new e(On(t,n,i.source))}function On(t,e,n){return n instanceof Gt?Fn(t,e,n):n instanceof Hn?Gn(t,e,n):new Hn(t,e,n)}function Fn(t,e,n){return Gt.create(n.f,On(t,e,n.source))}function Gn(t,e,n){return t+=n.min,e=Math.min(e+n.min,n.max),new Hn(t,e,n.source)}function Hn(t,e,n){this.source=n,this.min=t,this.max=e}function Jn(t,e,n,i,r){this.sink=i,this.skip=t,this.take=e,this.disposable=T(n.run(this,r))}function Kn(t,n){return new e(new Qn(t,n.source))}function Qn(t,e){this.p=t,this.source=e}function Xn(t,e,n,i){this.p=t,this.sink=n,this.active=!0,this.disposable=T(e.run(this,i))}function Yn(t,n){return new e(new Zn(t,n.source))}function Zn(t,e){this.p=t,this.source=e}function $n(t,e){this.p=t,this.sink=e,this.skipping=!0}function ti(t,n){return new e(new ii(t.source,n.source))}function ei(t,n){return new e(new ri(t.source,n.source))}function ni(t,e){return ti(en(t),ei(t,e))}function ii(t,e){this.maxSignal=t,this.source=e}function ri(t,e){this.minSignal=t,this.source=e}function oi(t,e){this.value=t,this.sink=e}function si(t,e,n){this.min=t,this.max=e,this.sink=n}function ui(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function hi(t,e,n){this.value=1/0,this.sink=e,this.disposable=t.run(this,n)}function ci(){}function pi(t,n){return t<=0?n:new e(new fi(t,n.source))}function fi(t,e){this.dt=t,this.source=e}function ai(t,e,n){this.dt=t,this.sink=e,this.scheduler=n}function di(t){return new e(new li(t.source))}function li(t){this.source=t}function yi(t){this.sink=t}function vi(t,n){return new e(wi(t,n.source))}function wi(t,e){return e instanceof Gt?ki(t,e):e instanceof _i?mi(t,e):new _i(t,e)}function ki(t,e){return Gt.create(e.f,wi(t,e.source))}function mi(t,e){return new _i(Math.max(t,e.period),e.source)}function _i(t,e){this.period=t,this.source=e}function bi(t,e){this.time=0,this.period=t,this.sink=e}function gi(t,n){return new e(new xi(t,n.source))}function xi(t,e){this.dt=t,this.source=e}function Ei(t,e,n,i){this.dt=t,this.sink=n,this.scheduler=i,this.value=void 0,this.timer=null;var r=e.run(this,i);this.disposable=g([this,r])}function Ai(t){return Ti(N(t))}function Ti(t){return new e(new Pi(t.source))}function Pi(t){this.source=t}function Mi(t,e){this.sink=t,this.scheduler=e,this.queue=Promise.resolve();var n=this;this._eventBound=function(t){n.sink.event(n.scheduler.now(),t)},this._endBound=function(t){n.sink.end(n.scheduler.now(),t)},this._errorBound=function(t){n.sink.error(n.scheduler.now(),t)}}function Ri(t){this.sink=t,this.active=!0}function Ii(t,n){return new e(new Ni(t,n.source))}function Wi(t){return new e(new Li(t))}function Li(t){this.value=t}function Ci(t,e,n){n.error(t,e)}function Ni(t,e){this.f=t,this.source=e}function Si(t,e,n,i){this.f=t,this.sink=new Ri(n),this.scheduler=i,this.disposable=e.run(this,i)}function qi(t,e,n){try{n.event(t,e)}catch(e){n.error(t,e)}}function Bi(t,e,n){try{n.end(t,e)}catch(e){n.error(t,e)}}function ji(t){var e=t.source;return e instanceof sr?t:new t.constructor(new sr(e))}var Vi=function(t){return t},Di=function(t,e){return function(n){return t(e(n))}},Ui=function(t,e){return t(e)};v.prototype.dispose=function(){return this._dispose(this._data)},w.prototype.setDisposable=function(t){if(void 0!==this.disposable)throw new Error("setDisposable called more than once");this.disposable=t,this.disposed&&this._resolve(t.dispose())},w.prototype.dispose=function(){return this.disposed?this.result:(this.disposed=!0,void 0!==this.disposable&&(this.result=this.disposable.dispose()),this.result)};var zi=h,Oi=Vi;I.event=function(t,e){return new I(L,t,e)},I.end=function(t,e){return new I(C,t,e)},I.error=function(t,e){return new I(W,t,e)},I.prototype.dispose=function(){this.active=!1},I.prototype.run=function(t){this.active&&this._run(t,this.value,this.sink)},I.prototype.error=function(t,e){return this.active?void this.sink.error(t,e):R(e)},S.prototype.run=function(t,e){return e.asap(new I(q,this.value,t))},j.prototype.run=function(t,e){var n=I.end(void 0,t);return e.asap(n),_(V,n)};var Fi=new e(new j);U.prototype.run=function(){return b()};var Gi=new e(new U);O.prototype.run=function(t,e){return e.asap(new I(F,this.array,t))};var Hi;Hi="function"==typeof Set&&"function"==typeof(new Set)["@@iterator"]?"@@iterator":"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_",K.prototype.run=function(t,e){return e.asap(new I(Q,H(this.iterable),t))};var Ji;Ji="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")();var Ki=X(Ji);$.prototype.run=function(t,e){var n=this.observable.subscribe(new tt(t,e));if("function"==typeof n)return _(n);if(n&&"function"==typeof n.unsubscribe)return _(et,n);throw new TypeError("Observable returned invalid subscription "+String(n))},tt.prototype.next=function(t){this.sink.event(this.scheduler.now(),t)},tt.prototype.complete=function(t){this.sink.end(this.scheduler.now(),t)},tt.prototype.error=function(t){this.sink.error(this.scheduler.now(),t)},rt.prototype.run=function(t,e){return e.periodic(this.period,I.event(this.value,t))},ot.prototype.run=function(){return this.task.run(this.time)},ot.prototype.error=function(t){return this.task.error(this.time,t)},ot.prototype.dispose=function(){return this.scheduler.cancel(this),this.task.dispose()},ht.prototype.now=function(){return this.timer.now()},ht.prototype.asap=function(t){return this.schedule(0,-1,t)},ht.prototype.delay=function(t,e){return this.schedule(t,-1,e)},ht.prototype.periodic=function(t,e){return this.schedule(0,t,e)},ht.prototype.schedule=function(t,e,n){var i=this.now(),r=new ot(i+Math.max(0,t),e,n,this);return this.timeline.add(r),this._scheduleNextRun(i),r},ht.prototype.cancel=function(t){t.active=!1,this.timeline.remove(t)&&this._reschedule()},ht.prototype.cancelAll=function(t){this.timeline.removeAll(t),this._reschedule()},ht.prototype._reschedule=function(){this.timeline.isEmpty()?this._unschedule():this._scheduleNextRun(this.now())},ht.prototype._unschedule=function(){this.timer.clearTimer(this._timer),this._timer=null},ht.prototype._scheduleNextRun=function(t){if(!this.timeline.isEmpty()){var e=this.timeline.nextArrival();null===this._timer?this._scheduleNextArrival(e,t):e<this._nextArrival&&(this._unschedule(),this._scheduleNextArrival(e,t))}},ht.prototype._scheduleNextArrival=function(t,e){this._nextArrival=t;var n=Math.max(0,t-e);this._timer=this.timer.setTimer(this._runReadyTasksBound,n)},ht.prototype._runReadyTasks=function(t){this._timer=null,this.timeline.runTasks(t,ut),this._scheduleNextRun(this.now())},ct.prototype.now=Date.now,ct.prototype.setTimer=function(t,e){return e<=0?ft(t):setTimeout(t,e)},ct.prototype.clearTimer=function(t){return t instanceof pt?t.cancel():clearTimeout(t)},pt.prototype.run=function(){return this.active&&this.f()},pt.prototype.error=function(t){throw t},pt.prototype.cancel=function(){this.active=!1},at.prototype.nextArrival=function(){return this.isEmpty()?1/0:this.tasks[0].time},at.prototype.isEmpty=function(){return 0===this.tasks.length},at.prototype.add=function(t){lt(t,this.tasks)},at.prototype.remove=function(t){var e=vt(t.time,this.tasks);if(e>=0&&e<this.tasks.length){var n=l(t,this.tasks[e].events);if(n>=0)return this.tasks[e].events.splice(n,1),!0}return!1},at.prototype.removeAll=function(t){for(var e=this,n=0,i=this.tasks.length;n<i;++n)yt(t,e.tasks[n])},at.prototype.runTasks=function(t,e){for(var n=this,i=this.tasks,r=i.length,o=0;o<r&&i[o].time<=t;)++o;this.tasks=i.slice(o);for(var s=0;s<o;++s)n.tasks=dt(e,i[s],n.tasks)};var Qi=new ht(new ct,new at);mt.prototype.event=function(t,e){this.disposable.disposed||"function"!=typeof this.subscriber.next||this.subscriber.next(e)},mt.prototype.end=function(t,e){if(!this.disposable.disposed){var n=this.subscriber;bt(this.fatalError,n,n.complete,n.error,this.disposable,e)}},mt.prototype.error=function(t,e){var n=this.subscriber;bt(this.fatalError,n,n.error,n.error,this.disposable,e)},_t.prototype.unsubscribe=function(){this.disposable.dispose()},At.prototype.run=function(t,e){function n(n){xt(e.now(),n,t)}return this.source.addEventListener(this.event,n,this.capture),_(Tt,{target:this,addEvent:n})},Pt.prototype.event=function(t,e){this.active&&(0===this.events.length&&st(new Mt(this.sink,t,this.events)),this.events.push({time:t,value:e}))},Pt.prototype.end=function(t,e){this.active&&this._end(new Rt(t,e,this.sink))},Pt.prototype.error=function(t,e){this._end(new It(t,e,this.sink))},Pt.prototype._end=function(t){this.active=!1,st(t)},Mt.prototype.run=function(){for(var t,e=this,n=this.events,i=this.sink,r=0,o=n.length;r<o;++r)t=n[r],e.time=t.time,i.event(t.time,t.value);n.length=0},Mt.prototype.error=function(t){this.sink.error(this.time,t)},Rt.prototype.run=function(){this.sink.end(this.time,this.value)},Rt.prototype.error=function(t){this.sink.error(this.time,t)},It.prototype.run=function(){this.sink.error(this.time,this.value)},It.prototype.error=function(t){throw t},Wt.prototype.run=function(t,e){function n(t){var n=arguments,r=arguments.length;if(r>1){for(var o=new Array(r),s=0;s<r;++s)o[s]=n[s];xt(e.now(),o,i)}else xt(e.now(),t,i)}var i=new Pt(t);return this.source.addListener(this.event,n),_(Lt,{target:this,addEvent:n})},Bt.prototype.event=function(t,e){},Bt.prototype.end=function(t,e){this.active&&(this.active=!1,jt(this._end,this._error,this._disposable,e))},Bt.prototype.error=function(t,e){this.active=!1,jt(this._error,this._error,this._disposable,e)},Vt.prototype.event=function(t,e){return this.sink.event(t,e)},Vt.prototype.end=function(t,e){return this.sink.end(t,e)},Vt.prototype.error=function(t,e){return this.sink.error(t,e)},Dt.create=function(t,e){return e instanceof Dt?new Dt(zt(e.p,t),e.source):new Dt(t,e)},Dt.prototype.run=function(t,e){return this.source.run(new Ut(this.p,t),e)},Ut.prototype.end=Vt.prototype.end,Ut.prototype.error=Vt.prototype.error,Ut.prototype.event=function(t,e){var n=this.p;n(e)&&this.sink.event(t,e)},Ot.prototype.run=function(t,e){return this.source.run(new Ft(this.p,this.f,t),e)},Ft.prototype.event=function(t,e){var n=this.f,i=this.p;i(e)&&this.sink.event(t,n(e))},Ft.prototype.end=Vt.prototype.end,Ft.prototype.error=Vt.prototype.error,Gt.create=function(t,e){return e instanceof Gt?new Gt(Di(t,e.f),e.source):e instanceof Dt?new Ot(e.p,t,e.source):new Gt(t,e)},Gt.prototype.run=function(t,e){return this.source.run(new Ht(this.f,t),e)},Ht.prototype.end=Vt.prototype.end,Ht.prototype.error=Vt.prototype.error,Ht.prototype.event=function(t,e){var n=this.f;this.sink.event(t,n(e))},Xt.prototype.run=function(t,e){return this.source.run(new Yt(this.f,t),e)},Yt.prototype.end=Vt.prototype.end,Yt.prototype.error=Vt.prototype.error,Yt.prototype.event=function(t,e){var n=this.f;n(e),this.sink.event(t,e)},ee.prototype.run=function(t,e){return this.source.run(new ne(this.step,this.seed,t),e)},ne.prototype.error=Vt.prototype.error,ne.prototype.event=function(t,e){var n=this.step(this.seed,e);this.seed=n.seed,this.sink.event(t,n.value)},ne.prototype.end=function(t){this.sink.end(t,this.seed)},re.prototype.run=function(t,e){var n=e.asap(I.event(this.value,t)),i=this.source.run(new oe(this.f,this.value,t),e);return g([n,i])},oe.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},oe.prototype.error=Vt.prototype.error,oe.prototype.end=Vt.prototype.end,ue.prototype.run=function(t,e){return this.source.run(new he(this.f,this.value,t),e)},he.prototype.event=function(t,e){var n=this.f;this.value=n(this.value,e),this.sink.event(t,this.value)},he.prototype.error=Vt.prototype.error,he.prototype.end=function(t){this.sink.end(t,this.value)},pe.prototype.run=function(t,e){return new fe(this.f,this.value,t,e)},fe.prototype.dispose=function(){this.active=!1},ye.prototype.run=function(t,e){return new ve(this.f,this.value,t,e)},ve.prototype.dispose=function(){this.active=!1},_e.prototype.run=function(t,e){return new be(this.f.apply(void 0,this.args),t,e)},be.prototype.dispose=function(){this.active=!1},Pe.prototype.run=function(t,e){return new Me(this.f,this.source,t,e)},Me.prototype.error=Vt.prototype.error,Me.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},Me.prototype.end=function(t,e){this.active&&(m(t,this.disposable,this.sink),this._startNext(t,e,this.sink))},Me.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Me.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},Me.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()},We.prototype.event=function(t,e){this.active&&(this.value=e,this.sink.event(t,this))},We.prototype.end=function(t,e){this.active&&(this.active=!1,this.sink.end(t,{index:this.index,value:e}))},We.prototype.error=Vt.prototype.error;var Xi=h,Yi=s;Be.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new je(o,s,t,this.f),h=0;h<r;++h)n=s[h]=new We(h,u),o[h]=i.sources[h].run(n,e);return g(o)},je.prototype.error=Vt.prototype.error,je.prototype.event=function(t,e){var n=e.index,i=this._updateReady(n);this.values[n]=e.value,0===i&&this.sink.event(t,Le(this.f,this.values))},je.prototype._updateReady=function(t){return this.awaiting>0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},je.prototype.end=function(t,e){m(t,this.disposables[e.index],this.sink),0===--this.activeCount&&this.sink.end(t,e.value)},Ue.prototype.run=function(t,e){var n=this.transducer(new Oe(t));return this.source.run(new ze(Fe(n),t),e)},ze.prototype.event=function(t,e){var n=this.xf.step(t,e);return this.xf.isReduced(n)?this.sink.end(t,this.xf.getResult(n)):n},ze.prototype.end=function(t,e){return this.xf.result(e)},ze.prototype.error=function(t,e){return this.sink.error(t,e)},Oe.prototype["@@transducer/init"]=Oe.prototype.init=function(){},Oe.prototype["@@transducer/step"]=Oe.prototype.step=function(t,e){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,e)},Oe.prototype["@@transducer/result"]=Oe.prototype.result=function(t){return this.sink.end(this.time,t)},Ge.prototype.step=function(t,e){return this.tx["@@transducer/step"](t,e)},Ge.prototype.result=function(t){return this.tx["@@transducer/result"](t)},Ge.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},Ge.prototype.getResult=function(t){return t["@@transducer/value"]},He.prototype.step=function(t,e){return this.tx.step(t,e)},He.prototype.result=function(t){return this.tx.result(t)},He.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},He.prototype.getResult=function(t){return t.value},Je.prototype.add=function(t){null!==this.head&&(this.head.prev=t,t.next=this.head),this.head=t,++this.length},Je.prototype.remove=function(t){--this.length,t===this.head&&(this.head=this.head.next),null!==t.next&&(t.next.prev=t.prev,t.next=null),null!==t.prev&&(t.prev.next=t.next,t.prev=null)},Je.prototype.isEmpty=function(){return 0===this.length},Je.prototype.dispose=function(){if(this.isEmpty())return Promise.resolve();var t=[],e=this.head;for(this.head=null,this.length=0;null!==e;)t.push(e.dispose()),e=e.next;return Promise.all(t)},Xe.prototype.run=function(t,e){return new Ye(this.f,this.concurrency,this.source,t,e)},Ye.prototype.event=function(t,e){this._addInner(t,e)},Ye.prototype._addInner=function(t,e){this.current.length<this.concurrency?this._startInner(t,e):this.pending.push(e)},Ye.prototype._startInner=function(t,e){try{this._initInner(t,e)}catch(e){this.error(t,e)}},Ye.prototype._initInner=function(t,e){var n=new $e(t,this,this.sink);n.disposable=Ze(this.f,e,n,this.scheduler),this.current.add(n)},Ye.prototype.end=function(t,e){this.active=!1,m(t,this.disposable,this.sink),this._checkEnd(t,e)},Ye.prototype.error=function(t,e){this.active=!1,this.sink.error(t,e)},Ye.prototype.dispose=function(){return this.active=!1,this.pending.length=0,Promise.all([this.disposable.dispose(),this.current.dispose()])},Ye.prototype._endInner=function(t,e,n){this.current.remove(n),m(t,n,this),0===this.pending.length?this._checkEnd(t,e):this._startInner(t,this.pending.shift())},Ye.prototype._checkEnd=function(t,e){!this.active&&this.current.isEmpty()&&this.sink.end(t,e)},$e.prototype.event=function(t,e){this.sink.event(Math.max(t,this.time),e)},$e.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.time),e,this)},$e.prototype.error=function(t,e){this.outer.error(Math.max(t,this.time),e)},$e.prototype.dispose=function(){return this.disposable.dispose()};var Zi=u,$i=c;hn.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new cn(o,s,t),h=0;h<r;++h)n=s[h]=new We(h,u),o[h]=i.sources[h].run(n,e);return g(o)},cn.prototype.error=Vt.prototype.error,cn.prototype.event=function(t,e){this.sink.event(t,e.value)},cn.prototype.end=function(t,e){m(t,this.disposables[e.index],this.sink),0===--this.activeCount&&this.sink.end(t,e.value)},ln.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r+1),s=new Array(r),u=new vn(this.f,s,t),h=0;h<r;++h)n=s[h]=new yn(u),o[h]=i.sources[h].run(n,e);return o[h]=this.sampler.run(u,e),g(o)},yn.prototype.event=function(t,e){this.value=e,this.hasValue=!0,this.sink._notify(this)},yn.prototype.end=function(){},yn.prototype.error=Vt.prototype.error,vn.prototype._notify=function(){this.active||(this.active=this.sinks.every(wn))},vn.prototype.event=function(t){this.active&&this.sink.event(t,Le(this.f,h(kn,this.sinks)))},vn.prototype.end=Vt.prototype.end,vn.prototype.error=Vt.prototype.error,mn.prototype.push=function(t){var e=this._length;this._checkCapacity(e+1);var n=this._head+e&this._capacity-1;this[n]=t,this._length=e+1},mn.prototype.shift=function(){var t=this._head,e=this[t];return this[t]=void 0,this._head=t+1&this._capacity-1,this._length--,e},mn.prototype.isEmpty=function(){return 0===this._length},mn.prototype.length=function(){return this._length},mn.prototype._checkCapacity=function(t){this._capacity<t&&this._ensureCapacity(this._capacity<<1)},mn.prototype._ensureCapacity=function(t){var e=this._capacity;this._capacity=t;var n=this._head+this._length;n>e&&_n(this,0,this,e,n&e-1)};var tr=h,er=s;En.prototype.run=function(t,e){for(var n,i=this,r=this.sources.length,o=new Array(r),s=new Array(r),u=new Array(r),h=new An(this.f,u,s,t),c=0;c<r;++c)u[c]=new mn,n=s[c]=new We(c,h),o[c]=i.sources[c].run(n,e);return g(o)},An.prototype.event=function(t,e){
var n=this.buffers,i=n[e.index];if(i.push(e.value),1===i.length()){if(!Rn(this.buffers))return;Tn(this.f,t,n,this.sink),Mn(this.buffers,this.sinks)&&this.sink.end(t,void 0)}},An.prototype.end=function(t,e){var n=this.buffers[e.index];n.isEmpty()&&this.sink.end(t,e.value)},An.prototype.error=Vt.prototype.error,Wn.prototype.run=function(t,e){var n=new Ln(t,e);return g([n,this.source.run(n,e)])},Ln.prototype.event=function(t,e){this._disposeCurrent(t),this.current=new Cn(t,1/0,this,this.sink),this.current.disposable=e.source.run(this.current,this.scheduler)},Ln.prototype.end=function(t,e){this.ended=!0,this._checkEnd(t,e)},Ln.prototype.error=function(t,e){this.ended=!0,this.sink.error(t,e)},Ln.prototype.dispose=function(){return this._disposeCurrent(this.scheduler.now())},Ln.prototype._disposeCurrent=function(t){if(null!==this.current)return this.current._dispose(t)},Ln.prototype._disposeInner=function(t,e){e._dispose(t),e===this.current&&(this.current=null)},Ln.prototype._checkEnd=function(t,e){this.ended&&null===this.current&&this.sink.end(t,e)},Ln.prototype._endInner=function(t,e,n){this._disposeInner(t,n),this._checkEnd(t,e)},Ln.prototype._errorInner=function(t,e,n){this._disposeInner(t,n),this.sink.error(t,e)},Cn.prototype.event=function(t,e){t<this.max&&this.sink.event(Math.max(t,this.min),e)},Cn.prototype.end=function(t,e){this.outer._endInner(Math.max(t,this.min),e,this)},Cn.prototype.error=function(t,e){this.outer._errorInner(Math.max(t,this.min),e,this)},Cn.prototype._dispose=function(t){this.max=t,m(t,this.disposable,this.sink)},Bn.prototype.run=function(t,e){return this.source.run(new jn(this.equals,t),e)},jn.prototype.end=Vt.prototype.end,jn.prototype.error=Vt.prototype.error,jn.prototype.event=function(t,e){this.init?(this.init=!1,this.value=e,this.sink.event(t,e)):this.equals(this.value,e)||(this.value=e,this.sink.event(t,e))},Hn.prototype.run=function(t,e){return new Jn(this.min,this.max-this.min,this.source,t,e)},Jn.prototype.end=Vt.prototype.end,Jn.prototype.error=Vt.prototype.error,Jn.prototype.event=function(t,e){return this.skip>0?void(this.skip-=1):void(0!==this.take&&(this.take-=1,this.sink.event(t,e),0===this.take&&(this.dispose(),this.sink.end(t,e))))},Jn.prototype.dispose=function(){return this.disposable.dispose()},Qn.prototype.run=function(t,e){return new Xn(this.p,this.source,t,e)},Xn.prototype.end=Vt.prototype.end,Xn.prototype.error=Vt.prototype.error,Xn.prototype.event=function(t,e){if(this.active){var n=this.p;this.active=n(e),this.active?this.sink.event(t,e):(this.dispose(),this.sink.end(t,e))}},Xn.prototype.dispose=function(){return this.disposable.dispose()},Zn.prototype.run=function(t,e){return this.source.run(new $n(this.p,t),e)},$n.prototype.end=Vt.prototype.end,$n.prototype.error=Vt.prototype.error,$n.prototype.event=function(t,e){if(this.skipping){var n=this.p;if(this.skipping=n(e),this.skipping)return}this.sink.event(t,e)},ii.prototype.run=function(t,e){var n=new oi(-(1/0),t),i=new hi(this.maxSignal,t,e),r=this.source.run(new si(n,i,t),e);return g([n,i,r])},ri.prototype.run=function(t,e){var n=new ui(this.minSignal,t,e),i=new oi(1/0,t),r=this.source.run(new si(n,i,t),e);return g([n,i,r])},oi.prototype.error=Vt.prototype.error,oi.prototype.event=ci,oi.prototype.end=ci,oi.prototype.dispose=ci,si.prototype.event=function(t,e){t>=this.min.value&&t<this.max.value&&this.sink.event(t,e)},si.prototype.error=Vt.prototype.error,si.prototype.end=Vt.prototype.end,ui.prototype.event=function(t){t<this.value&&(this.value=t)},ui.prototype.end=ci,ui.prototype.error=Vt.prototype.error,ui.prototype.dispose=function(){return this.disposable.dispose()},hi.prototype.event=function(t,e){t<this.value&&(this.value=t,this.sink.end(t,e))},hi.prototype.end=ci,hi.prototype.error=Vt.prototype.error,hi.prototype.dispose=function(){return this.disposable.dispose()},fi.prototype.run=function(t,e){var n=new ai(this.dt,t,e);return g([n,this.source.run(n,e)])},ai.prototype.dispose=function(){var t=this;this.scheduler.cancelAll(function(e){return e.sink===t.sink})},ai.prototype.event=function(t,e){this.scheduler.delay(this.dt,I.event(e,this.sink))},ai.prototype.end=function(t,e){this.scheduler.delay(this.dt,I.end(e,this.sink))},ai.prototype.error=Vt.prototype.error,li.prototype.run=function(t,e){return this.source.run(new yi(t),e)},yi.prototype.end=Vt.prototype.end,yi.prototype.error=Vt.prototype.error,yi.prototype.event=function(t,e){this.sink.event(t,{time:t,value:e})},_i.prototype.run=function(t,e){return this.source.run(new bi(this.period,t),e)},bi.prototype.event=function(t,e){t>=this.time&&(this.time=t+this.period,this.sink.event(t,e))},bi.prototype.end=Vt.prototype.end,bi.prototype.error=Vt.prototype.error,xi.prototype.run=function(t,e){return new Ei(this.dt,this.source,t,e)},Ei.prototype.event=function(t,e){this._clearTimer(),this.value=e,this.timer=this.scheduler.delay(this.dt,I.event(e,this.sink))},Ei.prototype.end=function(t,e){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,e)},Ei.prototype.error=function(t,e){this._clearTimer(),this.sink.error(t,e)},Ei.prototype.dispose=function(){this._clearTimer()},Ei.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},Pi.prototype.run=function(t,e){return this.source.run(new Mi(t,e),e)},Mi.prototype.event=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._event(e)}).catch(this._errorBound)},Mi.prototype.end=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._end(e)}).catch(this._errorBound)},Mi.prototype.error=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._errorBound(e)}).catch(R)},Mi.prototype._event=function(t){return t.then(this._eventBound)},Mi.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)},Ri.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},Ri.prototype.end=function(t,e){this.active&&(this.disable(),this.sink.end(t,e))},Ri.prototype.error=function(t,e){this.disable(),this.sink.error(t,e)},Ri.prototype.disable=function(){return this.active=!1,this.sink};var nr=Ii;Li.prototype.run=function(t,e){return e.asap(new I(Ci,this.value,t))},Ni.prototype.run=function(t,e){return new Si(this.f,this.source,t,e)},Si.prototype.event=function(t,e){xt(t,e,this.sink)},Si.prototype.end=function(t,e){Et(t,e,this.sink)},Si.prototype.error=function(t,e){var n=this.sink.disable();m(t,this.disposable,this.sink),this._startNext(t,e,n)},Si.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Si.prototype._continue=function(t,e,n){var i=t(e);return i.source.run(n,this.scheduler)},Si.prototype.dispose=function(){return this.disposable.dispose()};var ir=function(t,e){this.source=t,this.sink=e,this.disposed=!1};ir.prototype.dispose=function(){if(!this.disposed){this.disposed=!0;var t=this.source.remove(this.sink);return 0===t&&this.source._dispose()}};var rr=function(t){return t.dispose()},or={dispose:function(){}},sr=function(t){this.source=t,this.sinks=[],this._disposable=or};sr.prototype.run=function(t,e){var n=this.add(t);return 1===n&&(this._disposable=this.source.run(this,e)),new ir(this,t)},sr.prototype._dispose=function(){var t=this._disposable;return this._disposable=or,Promise.resolve(t).then(rr)},sr.prototype.add=function(t){return this.sinks=i(t,this.sinks),this.sinks.length},sr.prototype.remove=function(t){var e=l(t,this.sinks);return e>=0&&(this.sinks=f(e,this.sinks)),this.sinks.length},sr.prototype.event=function(t,e){var n=this.sinks;if(1===n.length)return n[0].event(t,e);for(var i=0;i<n.length;++i)qi(t,e,n[i])},sr.prototype.end=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)Bi(t,e,n[i])},sr.prototype.error=function(t,e){for(var n=this.sinks,i=0;i<n.length;++i)n[i].error(t,e)},e.of=N,e.empty=B,e.from=nt,e.prototype.subscribe=function(t){return kt(t,this)},e.prototype[Ki]=function(){return this},e.prototype.thru=function(t){return gt(t,this)},e.prototype.observe=e.prototype.forEach=function(t){return Zt(t,this)},e.prototype.drain=function(){return $t(this)},e.prototype.loop=function(t,e){return te(t,e,this)},e.prototype.scan=function(t,e){return ie(t,e,this)},e.prototype.reduce=function(t,e){return se(t,e,this)},e.prototype.concat=function(t){return Ie(this,t)},e.prototype.startWith=function(t){return Re(t,this)},e.prototype.map=function(t){return Jt(t,this)},e.prototype.ap=function(t){return Ve(this,t)},e.prototype.constant=function(t){return Kt(t,this)},e.prototype.tap=function(t){return Qt(t,this)},e.prototype.transduce=function(t){return De(t,this)},e.prototype.chain=function(t){return tn(t,this)},e.prototype.flatMap=e.prototype.chain,e.prototype.join=function(){return en(this)},e.prototype.continueWith=function(t){return Te(t,this)},e.prototype.flatMapEnd=e.prototype.continueWith,e.prototype.concatMap=function(t){return nn(t,this)},e.prototype.mergeConcurrently=function(t){return Ke(t,this)},e.prototype.merge=function(){return on(n(this,arguments))},e.prototype.combine=function(t){return Ne(t,p(this,0,arguments))},e.prototype.sampleWith=function(t){return fn(t,this)},e.prototype.sample=function(t){return an(t,this,s(arguments))},e.prototype.zip=function(t){return gn(t,p(this,0,arguments))},e.prototype.switchLatest=function(){return In(this)},e.prototype.switch=e.prototype.switchLatest,e.prototype.filter=function(t){return Nn(t,this)},e.prototype.skipRepeats=function(){return Sn(this)},e.prototype.skipRepeatsWith=function(t){return qn(t,this)},e.prototype.take=function(t){return Dn(t,this)},e.prototype.skip=function(t){return Un(t,this)},e.prototype.slice=function(t,e){return zn(t,e,this)},e.prototype.takeWhile=function(t){return Kn(t,this)},e.prototype.skipWhile=function(t){return Yn(t,this)},e.prototype.until=function(t){return ti(t,this)},e.prototype.takeUntil=e.prototype.until,e.prototype.since=function(t){return ei(t,this)},e.prototype.skipUntil=e.prototype.since,e.prototype.during=function(t){return ni(t,this)},e.prototype.delay=function(t){return pi(t,this)},e.prototype.timestamp=function(){return di(this)},e.prototype.throttle=function(t){return vi(t,this)},e.prototype.debounce=function(t){return gi(t,this)},e.prototype.awaitPromises=function(){return Ti(this)},e.prototype.await=e.prototype.awaitPromises,e.prototype.recoverWith=function(t){return nr(t,this)},e.prototype.flatMapError=e.prototype.recoverWith,e.prototype.multicast=function(){return ji(this)},t.Stream=e,t.of=N,t.just=N,t.empty=B,t.never=D,t.from=nt,t.periodic=it,t.observe=Zt,t.forEach=Zt,t.drain=$t,t.loop=te,t.scan=ie,t.reduce=se,t.concat=Ie,t.startWith=Re,t.map=Jt,t.constant=Kt,t.tap=Qt,t.ap=Ve,t.transduce=De,t.flatMap=tn,t.chain=tn,t.join=en,t.continueWith=Te,t.flatMapEnd=Te,t.concatMap=nn,t.mergeConcurrently=Ke,t.merge=rn,t.mergeArray=on,t.combine=Ce,t.combineArray=Ne,t.sample=pn,t.sampleArray=an,t.sampleWith=fn,t.zip=bn,t.zipArray=gn,t.switchLatest=In,t.switch=In,t.filter=Nn,t.skipRepeats=Sn,t.distinct=Sn,t.skipRepeatsWith=qn,t.distinctBy=qn,t.take=Dn,t.skip=Un,t.slice=zn,t.takeWhile=Kn,t.skipWhile=Yn,t.takeUntil=ti,t.until=ti,t.skipUntil=ei,t.since=ei,t.during=ni,t.delay=pi,t.timestamp=di,t.throttle=vi,t.debounce=gi,t.fromPromise=Ai,t.awaitPromises=Ti,t.await=Ti,t.recoverWith=Ii,t.flatMapError=nr,t.throwError=Wi,t.multicast=ji,t.defaultScheduler=Qi,t.PropagateTask=I,t.fromEvent=Ct,t.unfold=ce,t.iterate=le,t.generate=me,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -27,3 +27,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -30,0 +30,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -41,3 +41,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -44,0 +44,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -20,3 +20,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -23,0 +23,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -24,3 +24,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -27,0 +27,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -30,3 +30,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -33,0 +33,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -29,3 +29,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -32,0 +32,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -31,3 +31,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -34,0 +34,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,3 +23,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -26,0 +26,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -30,3 +30,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -33,0 +33,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -32,3 +32,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -35,0 +35,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -17,3 +17,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -20,0 +20,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -24,3 +24,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -27,0 +27,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -45,3 +45,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -48,0 +48,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -28,3 +28,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -31,0 +31,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -24,3 +24,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -27,0 +27,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -126,3 +126,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -360,2 +360,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// @deprecated flatMap, use chain instead
exports.flatMap = _flatMap.flatMap;

@@ -372,11 +373,14 @@ exports.chain = _flatMap.flatMap;

_Stream2.default.prototype.flatMap = _Stream2.default.prototype.chain = function (f) {
_Stream2.default.prototype.chain = function (f) {
return (0, _flatMap.flatMap)(f, this);
};
// @deprecated use chain instead
_Stream2.default.prototype.flatMap = _Stream2.default.prototype.chain;
/**
* Monadic join. Flatten a Stream<Stream<X>> to Stream<X> by merging inner
* streams to the outer. Event arrival times are preserved.
* @returns {Stream<X>} new stream containing all events of all inner streams
*/
* Monadic join. Flatten a Stream<Stream<X>> to Stream<X> by merging inner
* streams to the outer. Event arrival times are preserved.
* @returns {Stream<X>} new stream containing all events of all inner streams
*/
_Stream2.default.prototype.join = function () {

@@ -386,2 +390,3 @@ return (0, _flatMap.join)(this);

// @deprecated flatMapEnd, use continueWith instead
exports.continueWith = _continueWith.continueWith;

@@ -398,6 +403,9 @@ exports.flatMapEnd = _continueWith.continueWith;

_Stream2.default.prototype.continueWith = _Stream2.default.prototype.flatMapEnd = function (f) {
_Stream2.default.prototype.continueWith = function (f) {
return (0, _continueWith.continueWith)(f, this);
};
// @deprecated use continueWith instead
_Stream2.default.prototype.flatMapEnd = _Stream2.default.prototype.continueWith;
exports.concatMap = _concatMap.concatMap;

@@ -512,2 +520,3 @@

// @deprecated switch, use switchLatest instead
exports.switchLatest = _switch.switchLatest;

@@ -522,9 +531,14 @@ exports.switch = _switch.switchLatest;

_Stream2.default.prototype.switch = _Stream2.default.prototype.switchLatest = function () {
_Stream2.default.prototype.switchLatest = function () {
return (0, _switch.switchLatest)(this);
};
// @deprecated use switchLatest instead
_Stream2.default.prototype.switch = _Stream2.default.prototype.switchLatest;
// -----------------------------------------------------------------------
// Filtering
// @deprecated distinct, use skipRepeats instead
// @deprecated distinctBy, use skipRepeatsWith instead
exports.filter = _filter.filter;

@@ -634,2 +648,4 @@ exports.skipRepeats = _filter.skipRepeats;

// @deprecated takeUntil, use until instead
// @deprecated skipUntil, use since instead
exports.takeUntil = _timeslice.takeUntil;

@@ -651,29 +667,35 @@ exports.until = _timeslice.takeUntil;

_Stream2.default.prototype.until = _Stream2.default.prototype.takeUntil = function (signal) {
_Stream2.default.prototype.until = function (signal) {
return (0, _timeslice.takeUntil)(signal, this);
};
// @deprecated use until instead
_Stream2.default.prototype.takeUntil = _Stream2.default.prototype.until;
/**
* stream: -a-b-c-d-e-f-g->
* signal: -------x
* takeUntil(signal, stream): -------d-e-f-g->
* @param {Stream} signal retain only events in stream at or after the first
* event in signal
* @returns {Stream} new stream containing only events that occur after
* the first event in signal.
*/
_Stream2.default.prototype.since = _Stream2.default.prototype.skipUntil = function (signal) {
* stream: -a-b-c-d-e-f-g->
* signal: -------x
* takeUntil(signal, stream): -------d-e-f-g->
* @param {Stream} signal retain only events in stream at or after the first
* event in signal
* @returns {Stream} new stream containing only events that occur after
* the first event in signal.
*/
_Stream2.default.prototype.since = function (signal) {
return (0, _timeslice.skipUntil)(signal, this);
};
// @deprecated use since instead
_Stream2.default.prototype.skipUntil = _Stream2.default.prototype.since;
/**
* stream: -a-b-c-d-e-f-g->
* timeWindow: -----s
* s: -----t
* stream.during(timeWindow): -----c-d-e-|
* @param {Stream<Stream>} timeWindow a stream whose first event (s) represents
* the window start time. That event (s) is itself a stream whose first event (t)
* represents the window end time
* @returns {Stream} new stream containing only events within the provided timespan
*/
* stream: -a-b-c-d-e-f-g->
* timeWindow: -----s
* s: -----t
* stream.during(timeWindow): -----c-d-e-|
* @param {Stream<Stream>} timeWindow a stream whose first event (s) represents
* the window start time. That event (s) is itself a stream whose first event (t)
* represents the window end time
* @returns {Stream} new stream containing only events within the provided timespan
*/
_Stream2.default.prototype.during = function (timeWindow) {

@@ -745,2 +767,3 @@ return (0, _timeslice.during)(timeWindow, this);

// @deprecated await, use awaitPromises instead
exports.fromPromise = _promises.fromPromise;

@@ -756,9 +779,13 @@ exports.awaitPromises = _promises.awaitPromises;

_Stream2.default.prototype.await = function () {
_Stream2.default.prototype.awaitPromises = function () {
return (0, _promises.awaitPromises)(this);
};
// @deprecated use awaitPromises instead
_Stream2.default.prototype.await = _Stream2.default.prototype.awaitPromises;
// -----------------------------------------------------------------------
// Error handling
// @deprecated flatMapError, use recoverWith instead
exports.recoverWith = _errors.recoverWith;

@@ -778,6 +805,9 @@ exports.flatMapError = _errors.flatMapError;

_Stream2.default.prototype.recoverWith = _Stream2.default.prototype.flatMapError = function (f) {
_Stream2.default.prototype.recoverWith = function (f) {
return (0, _errors.flatMapError)(f, this);
};
// @deprecated use recoverWith instead
_Stream2.default.prototype.flatMapError = _Stream2.default.prototype.recoverWith;
// -----------------------------------------------------------------------

@@ -784,0 +814,0 @@ // Multicasting

@@ -18,3 +18,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -21,0 +21,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -22,3 +22,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -55,4 +55,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

SubscribeObserver.prototype.end = function (t, x) {
var s = this.subscriber;
doDispose(this.fatalError, s, s.complete, s.error, this.disposable, x);
if (!this.disposable.disposed) {
var s = this.subscriber;
doDispose(this.fatalError, s, s.complete, s.error, this.disposable, x);
}
};

@@ -59,0 +61,0 @@

@@ -19,3 +19,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -22,0 +22,0 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */

@@ -12,3 +12,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -15,0 +15,0 @@ function Timeline() {

@@ -22,3 +22,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -25,0 +25,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -20,3 +20,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -23,0 +23,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -16,3 +16,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -19,0 +19,0 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */

@@ -31,25 +31,14 @@ 'use strict';

IterableSource.prototype.run = function (sink, scheduler) {
return new IteratorProducer((0, _iterable.getIterator)(this.iterable), sink, scheduler);
return scheduler.asap(new _PropagateTask2.default(runProducer, (0, _iterable.getIterator)(this.iterable), sink));
};
function IteratorProducer(iterator, sink, scheduler) {
this.scheduler = scheduler;
this.iterator = iterator;
this.task = new _PropagateTask2.default(runProducer, this, sink);
scheduler.asap(this.task);
}
function runProducer(t, iterator, sink) {
var r = iterator.next();
IteratorProducer.prototype.dispose = function () {
return this.task.dispose();
};
function runProducer(t, producer, sink) {
var x = producer.iterator.next();
if (x.done) {
sink.end(t, x.value);
} else {
sink.event(t, x.value);
while (!r.done && this.active) {
sink.event(t, r.value);
r = iterator.next();
}
producer.scheduler.asap(producer.task);
sink.end(t, r.value);
}

@@ -16,3 +16,3 @@ 'use strict';

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

@@ -19,0 +19,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -21,3 +21,3 @@ 'use strict';

* @param {Number} period periodicity of events in millis
* @param {*} value value to emit each period
* @param {*} deprecatedValue @deprecated value to emit each period
* @returns {Stream} new stream that emits the current time every period

@@ -29,4 +29,4 @@ */

function periodic(period, value) {
return new _Stream2.default(new Periodic(period, value));
function periodic(period, deprecatedValue) {
return new _Stream2.default(new Periodic(period, deprecatedValue));
}

@@ -33,0 +33,0 @@

{
"name": "most",
"version": "1.1.1",
"version": "1.2.0",
"description": "Monadic streams",

@@ -48,17 +48,17 @@ "typings": "type-definitions/most.d.ts",

"@most/eslint-config-most": "^1.0.3",
"@most/hold": "^1.3.1",
"babel-polyfill": "^6.13.0",
"buba": "3.0.1",
"@most/hold": "1.4.2",
"babel-polyfill": "^6.20.0",
"buba": "^4.0.1",
"buster": "^0.7.18",
"eslint": "^3.4.0",
"markdown-doctest": "^0.9.0",
"eslint": "^3.12.1",
"markdown-doctest": "^0.9.1",
"rimraf": "^2.5.4",
"rollup": "^0.36.0",
"rollup-plugin-buble": "^0.13.0",
"rollup": "^0.39.2",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-node-resolve": "^2.0.0",
"transducers-js": "^0.4.174",
"uglify-js": "^2.7.3"
"uglify-js": "^2.7.5"
},
"dependencies": {
"@most/multicast": "^1.2.3",
"@most/multicast": "^1.2.5",
"@most/prelude": "^1.4.0",

@@ -65,0 +65,0 @@ "symbol-observable": "^1.0.2"

@@ -240,2 +240,3 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */

// @deprecated flatMap, use chain instead
export { flatMap, flatMap as chain, join }

@@ -249,7 +250,10 @@

*/
Stream.prototype.flatMap = Stream.prototype.chain = function (f) {
Stream.prototype.chain = function (f) {
return flatMap(f, this)
}
/**
// @deprecated use chain instead
Stream.prototype.flatMap = Stream.prototype.chain
/**
* Monadic join. Flatten a Stream<Stream<X>> to Stream<X> by merging inner

@@ -265,2 +269,3 @@ * streams to the outer. Event arrival times are preserved.

// @deprecated flatMapEnd, use continueWith instead
export { continueWith, continueWith as flatMapEnd }

@@ -275,6 +280,9 @@

*/
Stream.prototype.continueWith = Stream.prototype.flatMapEnd = function (f) {
Stream.prototype.continueWith = function (f) {
return continueWith(f, this)
}
// @deprecated use continueWith instead
Stream.prototype.flatMapEnd = Stream.prototype.continueWith
import { concatMap } from './combinator/concatMap'

@@ -392,2 +400,3 @@

// @deprecated switch, use switchLatest instead
export { switchLatest, switchLatest as switch }

@@ -400,6 +409,9 @@

*/
Stream.prototype.switch = Stream.prototype.switchLatest = function () {
Stream.prototype.switchLatest = function () {
return switchLatest(this)
}
// @deprecated use switchLatest instead
Stream.prototype.switch = Stream.prototype.switchLatest
// -----------------------------------------------------------------------

@@ -410,2 +422,4 @@ // Filtering

// @deprecated distinct, use skipRepeats instead
// @deprecated distinctBy, use skipRepeatsWith instead
export { filter, skipRepeats, skipRepeats as distinct, skipRepeatsWith, skipRepeatsWith as distinctBy }

@@ -509,2 +523,4 @@

// @deprecated takeUntil, use until instead
// @deprecated skipUntil, use since instead
export { takeUntil, takeUntil as until, skipUntil, skipUntil as since, during }

@@ -521,7 +537,10 @@

*/
Stream.prototype.until = Stream.prototype.takeUntil = function (signal) {
Stream.prototype.until = function (signal) {
return takeUntil(signal, this)
}
/**
// @deprecated use until instead
Stream.prototype.takeUntil = Stream.prototype.until
/**
* stream: -a-b-c-d-e-f-g->

@@ -535,7 +554,10 @@ * signal: -------x

*/
Stream.prototype.since = Stream.prototype.skipUntil = function (signal) {
Stream.prototype.since = function (signal) {
return skipUntil(signal, this)
}
/**
// @deprecated use since instead
Stream.prototype.skipUntil = Stream.prototype.since
/**
* stream: -a-b-c-d-e-f-g->

@@ -619,2 +641,3 @@ * timeWindow: -----s

// @deprecated await, use awaitPromises instead
export { fromPromise, awaitPromises, awaitPromises as await }

@@ -627,6 +650,9 @@

*/
Stream.prototype.await = function () {
Stream.prototype.awaitPromises = function () {
return awaitPromises(this)
}
// @deprecated use awaitPromises instead
Stream.prototype.await = Stream.prototype.awaitPromises
// -----------------------------------------------------------------------

@@ -637,2 +663,3 @@ // Error handling

// @deprecated flatMapError, use recoverWith instead
export { recoverWith, flatMapError, throwError }

@@ -649,6 +676,9 @@

*/
Stream.prototype.recoverWith = Stream.prototype.flatMapError = function (f) {
Stream.prototype.recoverWith = function (f) {
return flatMapError(f, this)
}
// @deprecated use recoverWith instead
Stream.prototype.flatMapError = Stream.prototype.recoverWith
// -----------------------------------------------------------------------

@@ -655,0 +685,0 @@ // Multicasting

@@ -35,4 +35,6 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */

SubscribeObserver.prototype.end = function (t, x) {
var s = this.subscriber
doDispose(this.fatalError, s, s.complete, s.error, this.disposable, x)
if (!this.disposable.disposed) {
var s = this.subscriber
doDispose(this.fatalError, s, s.complete, s.error, this.disposable, x)
}
}

@@ -39,0 +41,0 @@

@@ -18,25 +18,14 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */

IterableSource.prototype.run = function (sink, scheduler) {
return new IteratorProducer(getIterator(this.iterable), sink, scheduler)
return scheduler.asap(new PropagateTask(runProducer, getIterator(this.iterable), sink))
}
function IteratorProducer (iterator, sink, scheduler) {
this.scheduler = scheduler
this.iterator = iterator
this.task = new PropagateTask(runProducer, this, sink)
scheduler.asap(this.task)
}
function runProducer (t, iterator, sink) {
let r = iterator.next()
IteratorProducer.prototype.dispose = function () {
return this.task.dispose()
}
function runProducer (t, producer, sink) {
var x = producer.iterator.next()
if (x.done) {
sink.end(t, x.value)
} else {
sink.event(t, x.value)
while (!r.done && this.active) {
sink.event(t, r.value)
r = iterator.next()
}
producer.scheduler.asap(producer.task)
sink.end(t, r.value)
}

@@ -11,7 +11,7 @@ /** @license MIT License (c) copyright 2010-2016 original author or authors */

* @param {Number} period periodicity of events in millis
* @param {*} value value to emit each period
* @param {*} deprecatedValue @deprecated value to emit each period
* @returns {Stream} new stream that emits the current time every period
*/
export function periodic (period, value) {
return new Stream(new Periodic(period, value))
export function periodic (period, deprecatedValue) {
return new Stream(new Periodic(period, deprecatedValue))
}

@@ -18,0 +18,0 @@

@@ -5,3 +5,3 @@ declare type SeedValue<S, V> = { seed: S, value: V };

declare interface Generator<A, B, C> {}
declare interface Iterable<A> {}
declare interface Iterable<A> { [Symbol.iterator](): IterableIterator<A> }

@@ -12,2 +12,3 @@ declare type CreateGenerator<A> = (...args: Array<any>) => Generator<A|Promise<A>, any, any>;

event(time: number, value: A): void;
// end value parameter is deprecated
end(time: number, value?: A): void;

@@ -51,2 +52,3 @@ error(time: number, err: Error): void;

error(err: Error): void;
// complete value parameter is deprecated
complete(value?: A): void;

@@ -180,3 +182,3 @@ }

sampleWith<A>(sampler: Stream<any>): Stream<A>;
sampleWith(sampler: Stream<any>): Stream<A>;

@@ -412,2 +414,3 @@ zip<B, R>(

static error (error: Error, sink: Sink<any>): PropagateTask<any>;
// end value parameter is deprecated
static end <T> (value: T, sink: Sink<T>): PropagateTask<T>;

@@ -418,2 +421,2 @@

dispose(): void;
}
}

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

Sorry, the diff of this file is not supported yet

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