From a0f1bc75cd23b7a4c55bfbe1ce336c7f164b4bb1 Mon Sep 17 00:00:00 2001 From: Brian Cavalier Date: Mon, 16 May 2016 21:05:50 -0400 Subject: [PATCH] Bump version, rebuild. Update markdown-doctest --- dist/most.js | 773 +++++++++++++++++++++++------------------------ dist/most.min.js | 4 +- package.json | 4 +- 3 files changed, 380 insertions(+), 401 deletions(-) diff --git a/dist/most.js b/dist/most.js index 6744e6f7..f49df02b 100644 --- a/dist/most.js +++ b/dist/most.js @@ -61,8 +61,8 @@ return /******/ (function(modules) { // webpackBootstrap var Stream = __webpack_require__(1); var base = __webpack_require__(2); var core = __webpack_require__(3); - var from = __webpack_require__(11).from; - var periodic = __webpack_require__(15).periodic; + var from = __webpack_require__(10).from; + var periodic = __webpack_require__(14).periodic; /** * Core stream type @@ -81,7 +81,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Fluent adapter - var thru = __webpack_require__(17).thru; + var thru = __webpack_require__(16).thru; /** * Adapt a functional stream transform to fluent style. @@ -97,9 +97,10 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Creating - var create = __webpack_require__(18); + var create = __webpack_require__(17); /** + * @deprecated * Create a stream by imperatively pushing events. * @param {function(add:function(x), end:function(e)):function} run function * that will receive 2 functions as arguments, the first to add new values to the @@ -112,7 +113,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Adapting other sources - var events = __webpack_require__(22); + var events = __webpack_require__(21); /** * Create a stream of events from the supplied EventTarget or EventEmitter @@ -128,7 +129,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Observing - var observe = __webpack_require__(25); + var observe = __webpack_require__(24); exports.observe = observe.observe; exports.forEach = observe.observe; @@ -157,7 +158,7 @@ return /******/ (function(modules) { // webpackBootstrap //------------------------------------------------------- - var loop = __webpack_require__(33).loop; + var loop = __webpack_require__(32).loop; exports.loop = loop; @@ -177,7 +178,7 @@ return /******/ (function(modules) { // webpackBootstrap //------------------------------------------------------- - var accumulate = __webpack_require__(35); + var accumulate = __webpack_require__(34); exports.scan = accumulate.scan; exports.reduce = accumulate.reduce; @@ -208,10 +209,10 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Building and extending - var unfold = __webpack_require__(36); - var iterate = __webpack_require__(37); - var generate = __webpack_require__(38); - var build = __webpack_require__(39); + var unfold = __webpack_require__(35); + var iterate = __webpack_require__(36); + var generate = __webpack_require__(37); + var build = __webpack_require__(38); exports.unfold = unfold.unfold; exports.iterate = iterate.iterate; @@ -249,8 +250,8 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Transforming - var transform = __webpack_require__(41); - var applicative = __webpack_require__(45); + var transform = __webpack_require__(40); + var applicative = __webpack_require__(44); exports.map = transform.map; exports.constant = transform.constant; @@ -298,7 +299,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Transducer support - var transduce = __webpack_require__(49); + var transduce = __webpack_require__(48); exports.transduce = transduce.transduce; @@ -314,7 +315,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // FlatMapping - var flatMap = __webpack_require__(50); + var flatMap = __webpack_require__(49); exports.flatMap = exports.chain = flatMap.flatMap; exports.join = flatMap.join; @@ -338,7 +339,7 @@ return /******/ (function(modules) { // webpackBootstrap return flatMap.join(this); }; - var continueWith = __webpack_require__(40).continueWith; + var continueWith = __webpack_require__(39).continueWith; exports.continueWith = continueWith; exports.flatMapEnd = continueWith; @@ -354,7 +355,7 @@ return /******/ (function(modules) { // webpackBootstrap return continueWith(f, this); }; - var concatMap = __webpack_require__(53).concatMap; + var concatMap = __webpack_require__(52).concatMap; exports.concatMap = concatMap; @@ -365,7 +366,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Concurrent merging - var mergeConcurrently = __webpack_require__(51); + var mergeConcurrently = __webpack_require__(50); exports.mergeConcurrently = mergeConcurrently.mergeConcurrently; @@ -385,7 +386,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Merging - var merge = __webpack_require__(54); + var merge = __webpack_require__(53); exports.merge = merge.merge; exports.mergeArray = merge.mergeArray; @@ -403,7 +404,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Combining - var combine = __webpack_require__(46); + var combine = __webpack_require__(45); exports.combine = combine.combine; exports.combineArray = combine.combineArray; @@ -421,7 +422,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Sampling - var sample = __webpack_require__(55); + var sample = __webpack_require__(54); exports.sample = sample.sample; exports.sampleWith = sample.sampleWith; @@ -449,7 +450,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Zipping - var zip = __webpack_require__(56); + var zip = __webpack_require__(55); exports.zip = zip.zip; @@ -467,7 +468,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Switching - var switchLatest = __webpack_require__(58).switch; + var switchLatest = __webpack_require__(57).switch; exports.switch = switchLatest; exports.switchLatest = switchLatest; @@ -484,7 +485,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Filtering - var filter = __webpack_require__(59); + var filter = __webpack_require__(58); exports.filter = filter.filter; exports.skipRepeats = exports.distinct = filter.skipRepeats; @@ -523,7 +524,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Slicing - var slice = __webpack_require__(60); + var slice = __webpack_require__(59); exports.take = slice.take; exports.skip = slice.skip; @@ -588,7 +589,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Time slicing - var timeslice = __webpack_require__(61); + var timeslice = __webpack_require__(60); exports.until = exports.takeUntil = timeslice.takeUntil; exports.since = exports.skipUntil = timeslice.skipUntil; @@ -637,7 +638,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Delaying - var delay = __webpack_require__(62).delay; + var delay = __webpack_require__(61).delay; exports.delay = delay; @@ -652,7 +653,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Getting event timestamp - var timestamp = __webpack_require__(63).timestamp; + var timestamp = __webpack_require__(62).timestamp; exports.timestamp = timestamp; @@ -668,7 +669,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Rate limiting - var limit = __webpack_require__(64); + var limit = __webpack_require__(63); exports.throttle = limit.throttle; exports.debounce = limit.debounce; @@ -699,7 +700,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Awaiting Promises - var promises = __webpack_require__(65); + var promises = __webpack_require__(64); exports.fromPromise = promises.fromPromise; exports.await = promises.awaitPromises; @@ -716,7 +717,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Error handling - var errors = __webpack_require__(66); + var errors = __webpack_require__(65); exports.recoverWith = errors.flatMapError; exports.flatMapError = errors.flatMapError; @@ -738,7 +739,7 @@ return /******/ (function(modules) { // webpackBootstrap //----------------------------------------------------------------------- // Multicasting - var multicast = __webpack_require__(16).default; + var multicast = __webpack_require__(15).default; exports.multicast = multicast; @@ -1061,9 +1062,8 @@ return /******/ (function(modules) { // webpackBootstrap /** @author John Hann */ var Stream = __webpack_require__(1); - var ValueSource = __webpack_require__(4); - var dispose = __webpack_require__(7); - var PropagateTask = __webpack_require__(5); + var dispose = __webpack_require__(4); + var PropagateTask = __webpack_require__(8); exports.of = streamOf; exports.empty = empty; @@ -1074,14 +1074,22 @@ return /******/ (function(modules) { // webpackBootstrap * @param {*} x * @returns {Stream} */ - function streamOf(x) { - return new Stream(new ValueSource(emit, x)); - } + function streamOf(x) { + return new Stream(new Just(x)); + } - function emit(t, x, sink) { - sink.event(0, x); - sink.end(0, void 0); - } + function Just(x) { + this.value = x; + } + + Just.prototype.run = function(sink, scheduler) { + return scheduler.asap(new PropagateTask(runJust, this.value, sink)); + }; + + function runJust(t, x, sink) { + sink.event(t, x); + sink.end(t, void 0); + } /** * Stream containing no events and ends immediately @@ -1131,118 +1139,9 @@ return /******/ (function(modules) { // webpackBootstrap /** @author Brian Cavalier */ /** @author John Hann */ - var PropagateTask = __webpack_require__(5); - - module.exports = ValueSource; - - function ValueSource(emit, x) { - this.emit = emit; - this.value = x; - } - - ValueSource.prototype.run = function(sink, scheduler) { - return new ValueProducer(this.emit, this.value, sink, scheduler); - }; - - function ValueProducer(emit, x, sink, scheduler) { - this.task = scheduler.asap(new PropagateTask(emit, x, sink)); - } - - ValueProducer.prototype.dispose = function() { - return this.task.cancel(); - }; - - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - /** @license MIT License (c) copyright 2010-2016 original author or authors */ - /** @author Brian Cavalier */ - /** @author John Hann */ - - var fatal = __webpack_require__(6); - - module.exports = PropagateTask; - - function PropagateTask(run, value, sink) { - this._run = run; - this.value = value; - this.sink = sink; - this.active = true; - } - - PropagateTask.event = function(value, sink) { - return new PropagateTask(emit, value, sink); - }; - - PropagateTask.end = function(value, sink) { - return new PropagateTask(end, value, sink); - }; - - PropagateTask.error = function(value, sink) { - return new PropagateTask(error, value, sink); - }; - - PropagateTask.prototype.dispose = function() { - this.active = false; - }; - - PropagateTask.prototype.run = function(t) { - if(!this.active) { - return; - } - this._run(t, this.value, this.sink); - }; - - PropagateTask.prototype.error = function(t, e) { - if(!this.active) { - return fatal(e); - } - this.sink.error(t, e); - }; - - function error(t, e, sink) { - sink.error(t, e); - } - - function emit(t, x, sink) { - sink.event(t, x); - } - - function end(t, x, sink) { - sink.end(t, x); - } - - -/***/ }, -/* 6 */ -/***/ function(module, exports) { - - /** @license MIT License (c) copyright 2010-2016 original author or authors */ - /** @author Brian Cavalier */ - /** @author John Hann */ - - module.exports = fatalError; - - function fatalError (e) { - setTimeout(function() { - throw e; - }, 0); - } - - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - /** @license MIT License (c) copyright 2010-2016 original author or authors */ - /** @author Brian Cavalier */ - /** @author John Hann */ - - var Disposable = __webpack_require__(8); - var SettableDisposable = __webpack_require__(9); - var isPromise = __webpack_require__(10).isPromise; + var Disposable = __webpack_require__(5); + var SettableDisposable = __webpack_require__(6); + var isPromise = __webpack_require__(7).isPromise; var base = __webpack_require__(2); var map = base.map; @@ -1366,7 +1265,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 8 */ +/* 5 */ /***/ function(module, exports) { /** @license MIT License (c) copyright 2010-2016 original author or authors */ @@ -1392,7 +1291,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 9 */ +/* 6 */ /***/ function(module, exports) { /** @license MIT License (c) copyright 2010-2016 original author or authors */ @@ -1440,7 +1339,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 10 */ +/* 7 */ /***/ function(module, exports) { /** @license MIT License (c) copyright 2010-2016 original author or authors */ @@ -1455,16 +1354,95 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 11 */ +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + /** @license MIT License (c) copyright 2010-2016 original author or authors */ + /** @author Brian Cavalier */ + /** @author John Hann */ + + var fatal = __webpack_require__(9); + + module.exports = PropagateTask; + + function PropagateTask(run, value, sink) { + this._run = run; + this.value = value; + this.sink = sink; + this.active = true; + } + + PropagateTask.event = function(value, sink) { + return new PropagateTask(emit, value, sink); + }; + + PropagateTask.end = function(value, sink) { + return new PropagateTask(end, value, sink); + }; + + PropagateTask.error = function(value, sink) { + return new PropagateTask(error, value, sink); + }; + + PropagateTask.prototype.dispose = function() { + this.active = false; + }; + + PropagateTask.prototype.run = function(t) { + if(!this.active) { + return; + } + this._run(t, this.value, this.sink); + }; + + PropagateTask.prototype.error = function(t, e) { + if(!this.active) { + return fatal(e); + } + this.sink.error(t, e); + }; + + function error(t, e, sink) { + sink.error(t, e); + } + + function emit(t, x, sink) { + sink.event(t, x); + } + + function end(t, x, sink) { + sink.end(t, x); + } + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /** @license MIT License (c) copyright 2010-2016 original author or authors */ + /** @author Brian Cavalier */ + /** @author John Hann */ + + module.exports = fatalError; + + function fatalError (e) { + setTimeout(function() { + throw e; + }, 0); + } + + +/***/ }, +/* 10 */ /***/ function(module, exports, __webpack_require__) { /** @license MIT License (c) copyright 2010-2016 original author or authors */ /** @author Brian Cavalier */ /** @author John Hann */ - var fromArray = __webpack_require__(12).fromArray; - var isIterable = __webpack_require__(13).isIterable; - var fromIterable = __webpack_require__(14).fromIterable; + var fromArray = __webpack_require__(11).fromArray; + var isIterable = __webpack_require__(12).isIterable; + var fromIterable = __webpack_require__(13).fromIterable; var isArrayLike = __webpack_require__(2).isArrayLike; exports.from = from; @@ -1483,7 +1461,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 12 */ +/* 11 */ /***/ function(module, exports, __webpack_require__) { /** @license MIT License (c) copyright 2010-2016 original author or authors */ @@ -1491,7 +1469,7 @@ return /******/ (function(modules) { // webpackBootstrap /** @author John Hann */ var Stream = __webpack_require__(1); - var PropagateTask = __webpack_require__(5); + var PropagateTask = __webpack_require__(8); exports.fromArray = fromArray; @@ -1504,38 +1482,24 @@ return /******/ (function(modules) { // webpackBootstrap } ArraySource.prototype.run = function(sink, scheduler) { - return new ArrayProducer(this.array, sink, scheduler); - }; - - function ArrayProducer(array, sink, scheduler) { - this.scheduler = scheduler; - this.task = new PropagateTask(runProducer, array, sink); - scheduler.asap(this.task); - } - - ArrayProducer.prototype.dispose = function() { - return this.task.dispose(); + return scheduler.asap(new PropagateTask(runProducer, this.array, sink)); }; function runProducer(t, array, sink) { - produce(this, array, sink); - } - - function produce(task, array, sink) { - for(var i=0, l=array.length; ii;++i)r[i+1]=n[i];return r}function e(t,n){for(var e=n.length,r=new Array(e+1),i=0;e>i;++i)r[i]=n[i];return r[e]=t,r}function r(t,n){if(0>t)throw new TypeError("n must be >= 0");var e=n.length;return 0===t||0===e?n:t>=e?[]:i(t,n,e-t)}function i(t,n,e){for(var r=new Array(e),i=0;e>i;++i)r[i]=n[t+i];return r}function o(t){return r(1,t)}function s(t){for(var n=t.length,e=new Array(n),r=0;n>r;++r)e[r]=t[r];return e}function u(t,n){for(var e=n.length,r=new Array(e),i=0;e>i;++i)r[i]=t(n[i]);return r}function c(t,n,e){for(var r=n,i=0,o=e.length;o>i;++i)r=t(r,e[i],i);return r}function h(t,n,e){if(0>n)throw new TypeError("i must be >= 0");for(var r=e.length,i=new Array(r),o=0;r>o;++o)i[o]=n===o?t:e[o];return i}function p(t,n){if(0>t)throw new TypeError("i must be >= 0");var e=n.length;return 0===e||t>=e?n:1===e?[]:a(t,n,e-1)}function a(t,n,e){var r=new Array(e),i=void 0;for(i=0;t>i;++i)r[i]=n[i];for(i=t;e>i;++i)r[i]=n[i+1];return r}function f(t,n){for(var e,r=n.length,i=new Array(r),o=0,s=0;r>s;++s)e=n[s],t(e)||(i[o]=e,++o);return i.length=o,i}function l(t,n){for(var e=0,r=n.length;r>e;++e)if(t===n[e])return e;return-1}function d(t){return null!=t&&"number"==typeof t.length&&"function"!=typeof t}function v(t){function n(e,r){switch(arguments.length){case 0:return n;case 1:return function(n){return t(e,n)};default:return t(e,r)}}return n}function y(t){function n(e,r,i){switch(arguments.length){case 0:return n;case 1:return v(function(n,r){return t(e,n,r)});case 2:return function(n){return t(e,r,n)};default:return t(e,r,i)}}return n}Object.defineProperty(t,"__esModule",{value:!0});var k=function(t){return t},m=function(t,n){return function(e){return t(n(e))}},w=function(t,n){return t(n)};t.cons=n,t.append=e,t.drop=r,t.tail=o,t.copy=s,t.map=u,t.reduce=c,t.replace=h,t.remove=p,t.removeAll=f,t.findIndex=l,t.isArrayLike=d,t.id=k,t.compose=m,t.apply=w,t.curry2=v,t.curry3=y})},function(t,n,e){function r(t){return new p(new a(i,t))}function i(t,n,e){e.event(0,n),e.end(0,void 0)}function o(){return d}function s(){}function u(t){return t.dispose()}function c(){return v}function h(){}var p=e(1),a=e(4),f=e(7),l=e(5);n.of=r,n.empty=o,n.never=c,s.prototype.run=function(t,n){var e=l.end(void 0,t);return n.asap(e),f.create(u,e)};var d=new p(new s);h.prototype.run=function(){return f.empty()};var v=new p(new h)},function(t,n,e){function r(t,n){this.emit=t,this.value=n}function i(t,n,e,r){this.task=r.asap(new o(t,n,e))}var o=e(5);t.exports=r,r.prototype.run=function(t,n){return new i(this.emit,this.value,t,n)},i.prototype.dispose=function(){return this.task.cancel()}},function(t,n,e){function r(t,n,e){this._run=t,this.value=n,this.sink=e,this.active=!0}function i(t,n,e){e.error(t,n)}function o(t,n,e){e.event(t,n)}function s(t,n,e){e.end(t,n)}var u=e(6);t.exports=r,r.event=function(t,n){return new r(o,t,n)},r.end=function(t,n){return new r(s,t,n)},r.error=function(t,n){return new r(i,t,n)},r.prototype.dispose=function(){this.active=!1},r.prototype.run=function(t){this.active&&this._run(t,this.value,this.sink)},r.prototype.error=function(t,n){return this.active?void this.sink.error(t,n):u(n)}},function(t,n){function e(t){setTimeout(function(){throw t},0)}t.exports=e},function(t,n,e){function r(t,n,e){var r=c(n);return m(r)?r["catch"](function(n){e.error(t,n)}):r}function i(t,n){return l(new y(t,n))}function o(){return new y(g,void 0)}function s(t){return i(u,t)}function u(t){return Promise.all(_(c,t))}function c(t){try{return t.dispose()}catch(n){return Promise.reject(n)}}function h(t){return i(p,t)}function p(t){return t.then(a)}function a(t){return t.dispose()}function f(){return new k}function l(t){return new y(d,v(t))}function d(t){return t.disposed||(t.disposed=!0,t.value=c(t.disposable),t.disposable=void 0),t.value}function v(t){return{disposed:!1,disposable:t,value:void 0}}var y=e(8),k=e(9),m=e(10).isPromise,w=e(2),_=w.map,g=w.id;n.tryDispose=r,n.create=i,n.once=l,n.empty=o,n.all=s,n.settable=f,n.promised=h},function(t,n){function e(t,n){this._dispose=t,this._data=n}t.exports=e,e.prototype.dispose=function(){return this._dispose(this._data)}},function(t,n){function e(){this.disposable=void 0,this.disposed=!1,this._resolve=void 0;var t=this;this.result=new Promise(function(n){t._resolve=n})}t.exports=e,e.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())},e.prototype.dispose=function(){return this.disposed?this.result:(this.disposed=!0,void 0!==this.disposable&&(this.result=this.disposable.dispose()),this.result)}},function(t,n){function e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}n.isPromise=e},function(t,n,e){function r(t){if(Array.isArray(t)||u(t))return i(t);if(o(t))return s(t);throw new TypeError("not iterable: "+t)}var i=e(12).fromArray,o=e(13).isIterable,s=e(14).fromIterable,u=e(2).isArrayLike;n.from=r},function(t,n,e){function r(t){return new c(new i(t))}function i(t){this.array=t}function o(t,n,e){this.scheduler=e,this.task=new h(s,t,n),e.asap(this.task)}function s(t,n,e){u(this,n,e)}function u(t,n,e){function r(){e.end(0)}for(var i=0,o=n.length;o>i&&t.active;++i)e.event(0,n[i]);t.active&&r()}var c=e(1),h=e(5);n.fromArray=r,i.prototype.run=function(t,n){return new o(this.array,t,n)},o.prototype.dispose=function(){return this.task.dispose()}},function(t,n){function e(t){return"function"==typeof t[o]}function r(t){return t[o]()}function i(t,n){return n[o]=t,n}n.isIterable=e,n.getIterator=r,n.makeIterable=i;var o;o="function"==typeof Set&&"function"==typeof(new Set)["@@iterator"]?"@@iterator":"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_"},function(t,n,e){function r(t){return new u(new i(t))}function i(t){this.iterable=t}function o(t,n,e){this.scheduler=e,this.iterator=t,this.task=new h(s,this,n),e.asap(this.task)}function s(t,n,e){var r=n.iterator.next();r.done?e.end(t,r.value):e.event(t,r.value),n.scheduler.asap(n.task)}var u=e(1),c=e(13).getIterator,h=e(5);n.fromIterable=r,i.prototype.run=function(t,n){return new o(c(this.iterable),t,n)},o.prototype.dispose=function(){return this.task.dispose()}},function(t,n,e){function r(t,n){return new u(new h(new i(t,n)))}function i(t,n){this.period=t,this.value=n}function o(t){t.cancel()}function s(t,n,e){e.event(t,n)}var u=e(1),c=e(7),h=e(16).MulticastSource,p=e(5);n.periodic=r,i.prototype.run=function(t,n){var e=n.periodic(this.period,new p(s,this.value,t));return c.create(o,e)}},function(t,n,e){var r,i,o;!function(s,u){i=[n,e(2)],r=u,o="function"==typeof r?r.apply(n,i):r,!(void 0!==o&&(t.exports=o))}(this,function(t,n){"use strict";function e(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n,e){try{e.event(t,n)}catch(r){e.error(t,r)}}function i(t,n,e){try{e.end(t,n)}catch(r){e.error(t,r)}}function o(t){var n=t.source;return n instanceof p?t:new t.constructor(new p(n))}Object.defineProperty(t,"__esModule",{value:!0}),t.MulticastSource=void 0;var s=function(){function t(t,n){for(var e=0;ei;++i)t=e[i],r.event(t.time,t.value),e[i]=void 0;n.length=0},i.prototype.error=function(t){this.deferred.error(0,t)},o.prototype.run=function(){this.sink.end(this.time,this.value)},o.prototype.error=function(t){this.sink.error(this.time,t)},s.prototype.run=function(){this.sink.error(this.time,this.value)},s.prototype.error=function(t){throw t}},function(t,n){function e(t){return Promise.resolve(t).then(r)}function r(t){try{return t.run()}catch(n){return t.error(n)}}t.exports=e},function(t,n){function e(t,n,e){try{e.event(t,n)}catch(r){e.error(t,r)}}function r(t,n,e){try{e.end(t,n)}catch(r){e.error(t,r)}}n.tryEvent=e,n.tryEnd=r},function(t,n,e){function r(t,n){var e;if("function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener){var r=arguments.length>2&&!!arguments[2];e=new o(new s(t,n,r))}else{if("function"!=typeof n.addListener||"function"!=typeof n.removeListener)throw new Error("source must support addEventListener/removeEventListener or addListener/removeListener");e=new u(t,n)}return new i(e)}var i=e(1),o=e(16).MulticastSource,s=e(23),u=e(24);n.fromEvent=r},function(t,n,e){function r(t,n,e){this.event=t,this.source=n,this.capture=e}function i(t){var n=t.target;n.source.removeEventListener(n.event,t.addEvent,n.capture)}var o=e(7),s=e(21);t.exports=r,r.prototype.run=function(t,n){function e(e){s.tryEvent(n.now(),e,t)}return this.source.addEventListener(this.event,e,this.capture),o.create(i,{target:this,addEvent:e})}},function(t,n,e){function r(t,n){this.event=t,this.source=n}function i(t){var n=t.target;n.source.removeListener(n.event,t.addEvent)}var o=e(19),s=e(7),u=e(21);t.exports=r,r.prototype.run=function(t,n){function e(t){var e=arguments.length;if(e>1){for(var i=new Array(e),o=0;e>o;++o)i[o]=arguments[o];u.tryEvent(n.now(),i,r)}else u.tryEvent(n.now(),t,r)}var r=new o(t);return this.source.addListener(this.event,e),s.create(i,{target:this,addEvent:e})}},function(t,n,e){function r(t,n){return s.withDefaultScheduler(t,n.source)}function i(t){return s.withDefaultScheduler(o,t.source)}function o(){}var s=e(26);n.observe=r,n.drain=i},function(t,n,e){function r(t,n){return i(t,n,c)}function i(t,n,e){return new Promise(function(r,i){o(t,n,e,r,i)})}function o(t,n,e,r,i){var o=u.settable(),c=new s(t,r,i,o);o.setDisposable(n.run(c,e))}var s=e(27),u=e(7),c=e(28);n.withDefaultScheduler=r,n.withScheduler=i},function(t,n){function e(t,n,e,r){this._event=t,this._end=n,this._error=e,this._disposable=r,this.active=!0}function r(t,n,e,r){Promise.resolve(e.dispose()).then(function(){t(r)},n)}t.exports=e,e.prototype.event=function(t,n){this.active&&this._event(n)},e.prototype.end=function(t,n){this.active&&(this.active=!1,r(this._end,this._error,this._disposable,n))},e.prototype.error=function(t,n){this.active=!1,r(this._error,this._error,this._disposable,n)}},function(t,n,e){(function(n){var r=e(30),i=e(31),o=e(32),s="object"==typeof n&&"function"==typeof n.nextTick;t.exports=new r(s?o:i)}).call(n,e(29))},function(t,n){function e(){h=!1,s.length?c=s.concat(c):p=-1,c.length&&r()}function r(){if(!h){var t=setTimeout(e);h=!0;for(var n=c.length;n;){for(s=c,c=[];++p1)for(var e=1;e=0&&(o.time=o.time+o.period,c(o,n)))}return n}function c(t,n){var e=n.length;if(0===e)return void n.push(p(t.time,[t]));var r=h(t.time,n);r>=e?n.push(p(t.time,[t])):t.time===n[r].time?n[r].events.push(t):n.splice(r,0,p(t.time,[t]))}function h(t,n){for(var e,r,i=0,o=n.length;o>i;){if(e=Math.floor((i+o)/2),r=n[e],t===r.time)return e;t=0&&n=0&&(this._tasks[n].events.splice(e,1),this._reschedule())}},o.prototype.cancelAll=function(t){for(var n=0;nr&&n[r].time<=t;)++r;this._tasks=n.slice(r);for(var i=0;r>i;++i)this._tasks=u(n[i],this._tasks);return this._tasks}},function(t,n){t.exports={now:Date.now,setTimer:function(t,n){return setTimeout(t,n)},clearTimer:function(t){return clearTimeout(t)}}},function(t,n,e){function r(t){this.f=t,this.active=!0}function i(t){var n=new r(t);return o(n),n}var o=e(20);r.prototype.run=function(){if(this.active){var t=this.f;return t()}},r.prototype.error=function(t){throw t},r.prototype.cancel=function(){this.active=!1},t.exports={now:Date.now,setTimer:function(t,n){return 0>=n?i(t):setTimeout(t,n)},clearTimer:function(t){return t instanceof r?t.cancel():clearTimeout(t)}}},function(t,n,e){function r(t,n,e){return new s(new i(t,n,e.source))}function i(t,n,e){this.step=t,this.seed=n,this.source=e}function o(t,n,e){this.step=t,this.seed=n,this.sink=e}var s=e(1),u=e(34);n.loop=r,i.prototype.run=function(t,n){return this.source.run(new o(this.step,this.seed,t),n)},o.prototype.error=u.prototype.error,o.prototype.event=function(t,n){var e=this.step(this.seed,n);this.seed=e.seed,this.sink.event(t,e.value)},o.prototype.end=function(t){this.sink.end(t,this.seed)}},function(t,n){function e(t){this.sink=t}t.exports=e,e.prototype.event=function(t,n){return this.sink.event(t,n)},e.prototype.end=function(t,n){return this.sink.end(t,n)},e.prototype.error=function(t,n){return this.sink.error(t,n)}},function(t,n,e){function r(t,n,e){return new p(new i(t,n,e.source))}function i(t,n,e){this.source=e,this.f=t,this.value=n}function o(t,n,e){this.f=t,this.value=n,this.sink=e}function s(t,n,e){return f.withDefaultScheduler(h,new u(t,n,e.source))}function u(t,n,e){this.source=e,this.f=t,this.value=n}function c(t,n,e){this.f=t,this.value=n,this.sink=e}function h(){}var p=e(1),a=e(34),f=e(26),l=e(7),d=e(5);n.scan=r,n.reduce=s,i.prototype.run=function(t,n){var e=n.asap(d.event(this.value,t)),r=this.source.run(new o(this.f,this.value,t),n);return l.all([e,r])},o.prototype.event=function(t,n){var e=this.f;this.value=e(this.value,n),this.sink.event(t,this.value)},o.prototype.error=a.prototype.error,o.prototype.end=a.prototype.end,u.prototype.run=function(t,n){return this.source.run(new c(this.f,this.value,t),n)},c.prototype.event=function(t,n){var e=this.f;this.value=e(this.value,n),this.sink.event(t,this.value)},c.prototype.error=a.prototype.error,c.prototype.end=function(t){this.sink.end(t,this.value)}},function(t,n,e){function r(t,n){return new c(new i(t,n))}function i(t,n){this.f=t,this.value=n}function o(t,n,e,r){function i(t){u.sink.error(u.scheduler.now(),t)}function o(t){return s(t,n)}this.f=t,this.sink=e,this.scheduler=r,this.active=!0;var u=this;Promise.resolve(this).then(o)["catch"](i)}function s(t,n){var e=t.f;return Promise.resolve(e(n)).then(function(n){return u(t,n)})}function u(t,n){return n.done?(t.sink.end(t.scheduler.now(),n.value),n.value):(t.sink.event(t.scheduler.now(),n.value),t.active?s(t,n.seed):n.value)}var c=e(1);n.unfold=r,i.prototype.run=function(t,n){return new o(this.f,this.value,t,n)},o.prototype.dispose=function(){this.active=!1}},function(t,n,e){function r(t,n){return new c(new i(t,n))}function i(t,n){this.f=t,this.value=n}function o(t,n,e,r){function i(t){c.sink.error(c.scheduler.now(),t)}function o(t){return s(t,u)}this.f=t,this.sink=e,this.scheduler=r,this.active=!0;var u=n,c=this;Promise.resolve(this).then(o)["catch"](i)}function s(t,n){if(t.sink.event(t.scheduler.now(),n),!t.active)return n;var e=t.f;return Promise.resolve(e(n)).then(function(n){return u(t,n)})}function u(t,n){return t.active?s(t,n):t.value}var c=e(1);n.iterate=r,i.prototype.run=function(t,n){return new o(this.f,this.value,t,n)},o.prototype.dispose=function(){this.active=!1}},function(t,n,e){function r(t){return new p(new i(t,a.tail(arguments)))}function i(t,n){this.f=t,this.args=n}function o(t,n,e){function r(t){i.sink.error(i.scheduler.now(),t)}this.iterator=t,this.sink=n,this.scheduler=e,this.active=!0;var i=this;Promise.resolve(this).then(s)["catch"](r)}function s(t,n){return t.active?u(t,t.iterator.next(n)):n}function u(t,n){return n.done?t.sink.end(t.scheduler.now(),n.value):Promise.resolve(n.value).then(function(n){return c(t,n)},function(n){return h(t,n)})}function c(t,n){return t.sink.event(t.scheduler.now(),n),s(t,n)}function h(t,n){return u(t,t.iterator["throw"](n))}var p=e(1),a=e(2);n.generate=r,i.prototype.run=function(t,n){return new o(this.f.apply(void 0,this.args),t,n)},o.prototype.dispose=function(){this.active=!1}},function(t,n,e){function r(t,n){return i(s(t),n)}function i(t,n){return u(function(){return n},t)}function o(t){return u(function(){return o(t)},t)}var s=e(3).of,u=e(40).continueWith;n.concat=i,n.cycle=o,n.cons=r},function(t,n,e){function r(t,n){return new s(new i(t,n.source))}function i(t,n){this.f=t,this.source=n}function o(t,n,e,r){this.f=t,this.sink=e,this.scheduler=r,this.active=!0,this.disposable=c.once(n.run(this,r))}var s=e(1),u=e(34),c=e(7),h=e(10).isPromise;n.continueWith=r,i.prototype.run=function(t,n){return new o(this.f,this.source,t,n)},o.prototype.error=u.prototype.error,o.prototype.event=function(t,n){this.active&&this.sink.event(t,n)},o.prototype.end=function(t,n){if(this.active){var e=c.tryDispose(t,this.disposable,this.sink);this.disposable=h(e)?c.promised(this._thenContinue(e,n)):this._continue(this.f,n)}},o.prototype._thenContinue=function(t,n){var e=this;return t.then(function(){return e._continue(e.f,n)})},o.prototype._continue=function(t,n){return t(n).source.run(this.sink,this.scheduler)},o.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()}},function(t,n,e){function r(t,n){return new s(u.create(t,n.source))}function i(t,n){return r(function(){return t},n)}function o(t,n){return r(function(n){return t(n),n},n)}var s=e(1),u=e(42);n.map=r,n.constant=i,n.tap=o},function(t,n,e){function r(t,n){this.f=t,this.source=n}function i(t,n){this.f=t,this.sink=n}var o=e(34),s=e(43),u=e(44),c=e(2);t.exports=r,r.create=function(t,n){return n instanceof r?new r(c.compose(t,n.f),n.source):n instanceof s?new u(n.p,t,n.source):new r(t,n)},r.prototype.run=function(t,n){return this.source.run(new i(this.f,t),n)},i.prototype.end=o.prototype.end,i.prototype.error=o.prototype.error,i.prototype.event=function(t,n){var e=this.f;this.sink.event(t,e(n))}},function(t,n,e){function r(t,n){this.p=t,this.source=n}function i(t,n){this.p=t,this.sink=n}function o(t,n){return function(e){return t(e)&&n(e)}}var s=e(34);t.exports=r,r.create=function(t,n){return n instanceof r?new r(o(n.p,t),n.source):new r(t,n)},r.prototype.run=function(t,n){return this.source.run(new i(this.p,t),n)},i.prototype.end=s.prototype.end,i.prototype.error=s.prototype.error,i.prototype.event=function(t,n){var e=this.p;e(n)&&this.sink.event(t,n)}},function(t,n,e){function r(t,n,e){this.p=t,this.f=n,this.source=e}function i(t,n,e){this.p=t,this.f=n,this.sink=e}var o=e(34);t.exports=r,r.prototype.run=function(t,n){return this.source.run(new i(this.p,this.f,t),n)},i.prototype.event=function(t,n){var e=this.f,r=this.p;r(n)&&this.sink.event(t,e(n))},i.prototype.end=o.prototype.end,i.prototype.error=o.prototype.error},function(t,n,e){function r(t,n){return i(o,t,n)}var i=e(46).combine,o=e(2).apply;n.ap=r},function(t,n,e){function r(t){return i(t,m(arguments))}function i(t,n){var e=n.length;return 0===e?a.empty():1===e?p.map(t,n[0]):new h(o(t,n))}function o(t,n){return new u(t,k(s,n))}function s(t){return t.source}function u(t,n){this.f=t,this.sources=n}function c(t,n,e,r){this.sink=e,this.disposables=t,this.sinks=n,this.f=r;var i=n.length;this.awaiting=i,this.values=new Array(i),this.hasValue=new Array(i);for(var o=0;i>o;++o)this.hasValue[o]=!1;this.activeCount=n.length}var h=e(1),p=e(41),a=e(3),f=e(34),l=e(47),d=e(7),v=e(2),y=e(48),k=v.map,m=v.tail;n.combineArray=i,n.combine=r,u.prototype.run=function(t,n){for(var e,r=this.sources.length,i=new Array(r),o=new Array(r),s=new c(i,o,t,this.f),u=0;r>u;++u)e=o[u]=new l(u,s),i[u]=this.sources[u].run(e,n);return d.all(i)},c.prototype.error=f.prototype.error,c.prototype.event=function(t,n){var e=n.index,r=this._updateReady(e);this.values[e]=n.value,0===r&&this.sink.event(t,y(this.f,this.values))},c.prototype._updateReady=function(t){return this.awaiting>0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},c.prototype.end=function(t,n){d.tryDispose(t,this.disposables[n.index],this.sink),0===--this.activeCount&&this.sink.end(t,n.value)}},function(t,n,e){function r(t,n){this.sink=n,this.index=t,this.active=!0,this.value=void 0}var i=e(34);t.exports=r,r.prototype.event=function(t,n){this.active&&(this.value=n,this.sink.event(t,this))},r.prototype.end=function(t,n){this.active&&(this.active=!1,this.sink.end(t,{index:this.index,value:n}))},r.prototype.error=i.prototype.error},function(t,n){function e(t,n){switch(n.length){case 0:return t();case 1:return t(n[0]);case 2:return t(n[0],n[1]);case 3:return t(n[0],n[1],n[2]);case 4:return t(n[0],n[1],n[2],n[3]);case 5:return t(n[0],n[1],n[2],n[3],n[4]);default:return t.apply(void 0,n)}}t.exports=e},function(t,n,e){function r(t,n){return new p(new i(t,n.source))}function i(t,n){this.transducer=t,this.source=n}function o(t,n){this.xf=t,this.sink=n}function s(t){this.time=-(1/0),this.sink=t}function u(t){return"function"==typeof t["@@transducer/step"]?new c(t):new h(t)}function c(t){this.tx=t}function h(t){this.tx=t}var p=e(1);n.transduce=r,i.prototype.run=function(t,n){var e=this.transducer(new s(t));return this.source.run(new o(u(e),t),n)},o.prototype.event=function(t,n){var e=this.xf.step(t,n);return this.xf.isReduced(e)?this.sink.end(t,this.xf.getResult(e)):e},o.prototype.end=function(t,n){return this.xf.result(n)},o.prototype.error=function(t,n){return this.sink.error(t,n)},s.prototype["@@transducer/init"]=s.prototype.init=function(){},s.prototype["@@transducer/step"]=s.prototype.step=function(t,n){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,n)},s.prototype["@@transducer/result"]=s.prototype.result=function(t){return this.sink.end(this.time,t)},c.prototype.step=function(t,n){return this.tx["@@transducer/step"](t,n)},c.prototype.result=function(t){ -return this.tx["@@transducer/result"](t)},c.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},c.prototype.getResult=function(t){return t["@@transducer/value"]},h.prototype.step=function(t,n){return this.tx.step(t,n)},h.prototype.result=function(t){return this.tx.result(t)},h.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},h.prototype.getResult=function(t){return t.value}},function(t,n,e){function r(t,n){return s(t,1/0,n)}function i(t){return o(1/0,t)}var o=e(51).mergeConcurrently,s=e(51).mergeMapConcurrently;n.flatMap=r,n.join=i},function(t,n,e){function r(t,n){return i(f,t,n)}function i(t,n,e){return new h(new o(t,n,e.source))}function o(t,n,e){this.f=t,this.concurrency=n,this.source=e}function s(t,n,e,r,i){this.f=t,this.concurrency=n,this.sink=r,this.scheduler=i,this.pending=[],this.current=new a,this.disposable=p.once(e.run(this,i)),this.active=!0}function u(t,n,e,r){return t(r).source.run(n,e)}function c(t,n,e){this.prev=this.next=null,this.time=t,this.outer=n,this.sink=e,this.disposable=void 0}var h=e(1),p=e(7),a=e(52),f=e(2).id;n.mergeConcurrently=r,n.mergeMapConcurrently=i,o.prototype.run=function(t,n){return new s(this.f,this.concurrency,this.source,t,n)},s.prototype.event=function(t,n){this._addInner(t,n)},s.prototype._addInner=function(t,n){this.current.lengthu;++u)e=o[u]=new a(u,s),i[u]=this.sources[u].run(e,n);return l.all(i)},c.prototype.error=p.prototype.error,c.prototype.event=function(t,n){this.sink.event(t,n.value)},c.prototype.end=function(t,n){l.tryDispose(t,this.disposables[n.index],this.sink),0===--this.activeCount&&this.sink.end(t,n.value)}},function(t,n,e){function r(t,n){return o(t,n,v.drop(2,arguments))}function i(t,n){return new f(new u(v.id,t.source,[n.source]))}function o(t,n,e){return new f(new u(t,n.source,v.map(s,e)))}function s(t){return t.source}function u(t,n,e){this.f=t,this.sampler=n,this.sources=e}function c(t){this.sink=t,this.hasValue=!1}function h(t,n,e){this.f=t,this.sinks=n,this.sink=e,this.active=!1}function p(t){return t.hasValue}function a(t){return t.value}var f=e(1),l=e(34),d=e(7),v=e(2),y=e(48);n.sample=r,n.sampleWith=i,n.sampleArray=o,u.prototype.run=function(t,n){for(var e,r=this.sources.length,i=new Array(r+1),o=new Array(r),s=new h(this.f,o,t),u=0;r>u;++u)e=o[u]=new c(s),i[u]=this.sources[u].run(e,n);return i[u]=this.sampler.run(s,n),d.all(i)},c.prototype.event=function(t,n){this.value=n,this.hasValue=!0,this.sink._notify(this)},c.prototype.end=function(){},c.prototype.error=l.prototype.error,h.prototype._notify=function(){this.active||(this.active=this.sinks.every(p))},h.prototype.event=function(t){this.active&&this.sink.event(t,y(this.f,v.map(a,this.sinks)))},h.prototype.end=l.prototype.end,h.prototype.error=l.prototype.error},function(t,n,e){function r(t){return i(t,b(arguments))}function i(t,n){return 0===n.length?d.empty():1===n.length?l.map(t,n[0]):new f(new s(t,g(o,n)))}function o(t){return t.source}function s(t,n){this.f=t,this.sources=n}function u(t,n,e,r){this.f=t,this.sinks=e,this.sink=r,this.buffers=n}function c(t,n,e,r){r.event(n,w(t,g(h,e)))}function h(t){return t.shift()}function p(t,n){for(var e=0,r=t.length;r>e;++e)if(t[e].isEmpty()&&!n[e].active)return!0;return!1}function a(t){for(var n=0,e=t.length;e>n;++n)if(t[n].isEmpty())return!1;return!0}var f=e(1),l=e(41),d=e(3),v=e(34),y=e(47),k=e(7),m=e(2),w=e(48),_=e(57),g=m.map,b=m.tail;n.zip=r,n.zipArray=i,s.prototype.run=function(t,n){for(var e,r=this.sources.length,i=new Array(r),o=new Array(r),s=new Array(r),c=new u(this.f,s,o,t),h=0;r>h;++h)s[h]=new _,e=o[h]=new y(h,c),i[h]=this.sources[h].run(e,n);return k.all(i)},u.prototype.event=function(t,n){var e=this.buffers,r=e[n.index];if(r.push(n.value),1===r.length()){if(!a(this.buffers))return;c(this.f,t,e,this.sink),p(this.buffers,this.sinks)&&this.sink.end(t,void 0)}},u.prototype.end=function(t,n){var e=this.buffers[n.index];e.isEmpty()&&this.sink.end(t,n.value)},u.prototype.error=v.prototype.error},function(t,n){function e(t){this._capacity=t||32,this._length=0,this._head=0}function r(t,n,e,r,i){for(var o=0;i>o;++o)e[o+r]=t[o+n],t[o+n]=void 0}t.exports=e,e.prototype.push=function(t){var n=this._length;this._checkCapacity(n+1);var e=this._head+n&this._capacity-1;this[e]=t,this._length=n+1},e.prototype.shift=function(){var t=this._head,n=this[t];return this[t]=void 0,this._head=t+1&this._capacity-1,this._length--,n},e.prototype.isEmpty=function(){return 0===this._length},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(t){this._capacityn&&r(this,0,this,n,e&n-1)}},function(t,n,e){function r(t){return new u(new i(t.source))}function i(t){this.source=t}function o(t,n){this.sink=t,this.scheduler=n,this.current=null,this.ended=!1}function s(t,n,e,r){this.min=t,this.max=n,this.outer=e,this.sink=r,this.disposable=c.empty()}var u=e(1),c=e(7);n["switch"]=r,i.prototype.run=function(t,n){var e=new o(t,n);return c.all(e,this.source.run(e,n))},o.prototype.event=function(t,n){this._disposeCurrent(t),this.current=new s(t,1/0,this,this.sink),this.current.disposable=n.source.run(this.current,this.scheduler)},o.prototype.end=function(t,n){this.ended=!0,this._checkEnd(t,n)},o.prototype.error=function(t,n){this.ended=!0,this.sink.error(t,n)},o.prototype.dispose=function(){return this._disposeCurrent(0)},o.prototype._disposeCurrent=function(t){return null!==this.current?this.current._dispose(t):void 0},o.prototype._disposeInner=function(t,n){n._dispose(t),n===this.current&&(this.current=null)},o.prototype._checkEnd=function(t,n){this.ended&&null===this.current&&this.sink.end(t,n)},o.prototype._endInner=function(t,n,e){this._disposeInner(t,e),this._checkEnd(t,n)},o.prototype._errorInner=function(t,n,e){this._disposeInner(t,e),this.sink.error(t,n)},s.prototype.event=function(t,n){t=n?w.empty():new k(s(t,n,e.source))}function s(t,n,e){return e instanceof g?u(t,n,e):e instanceof h?c(t,n,e):new h(t,n,e)}function u(t,n,e){return g.create(e.f,s(t,n,e.source))}function c(t,n,e){return t+=e.min,n=Math.min(n+e.min,e.max),new h(t,n,e.source)}function h(t,n,e){this.source=e,this.min=t,this.max=n}function p(t,n,e,r,i){this.sink=r,this.skip=t,this.take=n,this.disposable=_.once(e.run(this,i))}function a(t,n){return new k(new f(t,n.source))}function f(t,n){this.p=t,this.source=n}function l(t,n,e,r){this.p=t,this.sink=e,this.active=!0,this.disposable=_.once(n.run(this,r))}function d(t,n){return new k(new v(t,n.source))}function v(t,n){this.p=t,this.source=n}function y(t,n){this.p=t,this.sink=n,this.skipping=!0}var k=e(1),m=e(34),w=e(3),_=e(7),g=e(42);n.take=r,n.skip=i,n.slice=o,n.takeWhile=a,n.skipWhile=d,h.prototype.run=function(t,n){return new p(this.min,this.max-this.min,this.source,t,n)},p.prototype.end=m.prototype.end,p.prototype.error=m.prototype.error,p.prototype.event=function(t,n){return this.skip>0?void(this.skip-=1):void(0!==this.take&&(this.take-=1,this.sink.event(t,n),0===this.take&&(this.dispose(),this.sink.end(t,n))))},p.prototype.dispose=function(){return this.disposable.dispose()},f.prototype.run=function(t,n){return new l(this.p,this.source,t,n)},l.prototype.end=m.prototype.end,l.prototype.error=m.prototype.error,l.prototype.event=function(t,n){if(this.active){var e=this.p;this.active=e(n),this.active?this.sink.event(t,n):(this.dispose(),this.sink.end(t,n))}},l.prototype.dispose=function(){return this.disposable.dispose()},v.prototype.run=function(t,n){return this.source.run(new y(this.p,t),n)},y.prototype.end=m.prototype.end,y.prototype.error=m.prototype.error,y.prototype.event=function(t,n){if(this.skipping){var e=this.p;if(this.skipping=e(n),this.skipping)return}this.sink.event(t,n)}},function(t,n,e){function r(t,n){return new l(new s(t.source,n.source))}function i(t,n){return new l(new u(t.source,n.source))}function o(t,n){return r(y(t),i(t,n))}function s(t,n){this.maxSignal=t,this.source=n}function u(t,n){this.minSignal=t,this.source=n}function c(t,n){this.value=t,this.sink=n}function h(t,n,e){this.min=t,this.max=n,this.sink=e}function p(t,n,e){this.value=1/0,this.sink=n,this.disposable=t.run(this,e)}function a(t,n,e){this.value=1/0,this.sink=n,this.disposable=t.run(this,e)}function f(){}var l=e(1),d=e(34),v=e(7),y=e(50).join;n.during=o,n.takeUntil=r,n.skipUntil=i,s.prototype.run=function(t,n){var e=new c(-(1/0),t),r=new a(this.maxSignal,t,n),i=this.source.run(new h(e,r,t),n);return v.all([e,r,i])},u.prototype.run=function(t,n){var e=new p(this.minSignal,t,n),r=new c(1/0,t),i=this.source.run(new h(e,r,t),n);return v.all([e,r,i])},c.prototype.error=d.prototype.error,c.prototype.event=f,c.prototype.end=f,c.prototype.dispose=f,h.prototype.event=function(t,n){t>=this.min.value&&t=t?n:new s(new i(t,n.source))}function i(t,n){this.dt=t,this.source=n}function o(t,n,e){this.dt=t,this.sink=n,this.scheduler=e}var s=e(1),u=e(34),c=e(7),h=e(5);n.delay=r,i.prototype.run=function(t,n){var e=new o(this.dt,t,n);return c.all([e,this.source.run(e,n)])},o.prototype.dispose=function(){var t=this;this.scheduler.cancelAll(function(n){return n.sink===t.sink})},o.prototype.event=function(t,n){this.scheduler.delay(this.dt,h.event(n,this.sink))},o.prototype.end=function(t,n){this.scheduler.delay(this.dt,h.end(n,this.sink))},o.prototype.error=u.prototype.error},function(t,n,e){function r(t){return new s(new i(t.source))}function i(t){this.source=t}function o(t){this.sink=t}var s=e(1),u=e(34);n.timestamp=r,i.prototype.run=function(t,n){return this.source.run(new o(t),n)},o.prototype.end=u.prototype.end,o.prototype.error=u.prototype.error,o.prototype.event=function(t,n){this.sink.event(t,{time:t,value:n})}},function(t,n,e){function r(t,n){return new f(i(t,n.source))}function i(t,n){return n instanceof y?o(t,n):n instanceof u?s(t,n):new u(t,n)}function o(t,n){return y.create(n.f,i(t,n.source))}function s(t,n){return new u(Math.max(t,n.period),n.source)}function u(t,n){this.period=t,this.source=n}function c(t,n){this.time=0,this.period=t,this.sink=n}function h(t,n){return new f(new p(t,n.source))}function p(t,n){this.dt=t,this.source=n}function a(t,n,e,r){this.dt=t,this.sink=e,this.scheduler=r,this.value=void 0,this.timer=null;var i=n.run(this,r);this.disposable=d.all([this,i])}var f=e(1),l=e(34),d=e(7),v=e(5),y=e(42);n.throttle=r,n.debounce=h,u.prototype.run=function(t,n){return this.source.run(new c(this.period,t),n)},c.prototype.event=function(t,n){t>=this.time&&(this.time=t+this.period,this.sink.event(t,n))},c.prototype.end=l.prototype.end,c.prototype.error=l.prototype.error,p.prototype.run=function(t,n){return new a(this.dt,this.source,t,n)},a.prototype.event=function(t,n){this._clearTimer(),this.value=n,this.timer=this.scheduler.delay(this.dt,v.event(n,this.sink))},a.prototype.end=function(t,n){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,n)},a.prototype.error=function(t,n){this._clearTimer(),this.sink.error(t,n)},a.prototype.dispose=function(){this._clearTimer()},a.prototype._clearTimer=function(){return null===this.timer?!1:(this.timer.cancel(),this.timer=null,!0)}},function(t,n,e){function r(t){return i(h(t))}function i(t){return new u(new o(t.source))}function o(t){this.source=t}function s(t,n){this.sink=t,this.scheduler=n,this.queue=Promise.resolve();var e=this;this._eventBound=function(t){e.sink.event(e.scheduler.now(),t)},this._endBound=function(t){e.sink.end(e.scheduler.now(),t)},this._errorBound=function(t){e.sink.error(e.scheduler.now(),t)}}var u=e(1),c=e(6),h=e(3).of;n.fromPromise=r,n.awaitPromises=i,o.prototype.run=function(t,n){return this.source.run(new s(t,n),n)},s.prototype.event=function(t,n){var e=this;this.queue=this.queue.then(function(){return e._event(n)})["catch"](this._errorBound)},s.prototype.end=function(t,n){var e=this;this.queue=this.queue.then(function(){return e._end(n)})["catch"](this._errorBound)},s.prototype.error=function(t,n){var e=this;this.queue=this.queue.then(function(){return e._errorBound(n)})["catch"](c)},s.prototype._event=function(t){return t.then(this._eventBound)},s.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)}},function(t,n,e){function r(t,n){return new c(new s(t,n.source))}function i(t){return new c(new h(o,t))}function o(t,n,e){e.error(t,n)}function s(t,n){this.f=t,this.source=n}function u(t,n,e,r){this.f=t,this.sink=new p(e),this.scheduler=r,this.disposable=n.run(this,r)}var c=e(1),h=e(4),p=e(67),a=(e(34),e(7)),f=e(21),l=e(10).isPromise;n.flatMapError=r,n.recoverWith=r,n.throwError=i,s.prototype.run=function(t,n){return new u(this.f,this.source,t,n)},u.prototype.event=function(t,n){f.tryEvent(t,n,this.sink)},u.prototype.end=function(t,n){f.tryEnd(t,n,this.sink)},u.prototype.error=function(t,n){var e=this.sink.disable(),r=a.tryDispose(t,this.disposable,e);this.disposable=l(r)?a.promised(this._thenContinue(r,n,e)):this._continue(this.f,n,e)},u.prototype._thenContinue=function(t,n,e){var r=this;return t.then(function(){return r._continue(r.f,n,e)})},u.prototype._continue=function(t,n,e){return t(n).source.run(e,this.scheduler)},u.prototype.dispose=function(){return this.disposable.dispose()}},function(t,n){function e(t){this.sink=t,this.active=!0}t.exports=e,e.prototype.event=function(t,n){this.active&&this.sink.event(t,n)},e.prototype.end=function(t,n){this.active&&(this.disable(),this.sink.end(t,n))},e.prototype.error=function(t,n){this.disable(),this.sink.error(t,n)},e.prototype.disable=function(){return this.active=!1,this.sink}}])}); \ No newline at end of file +!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.most=n():t.most=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){var r=e(1),i=e(2),o=e(3),s=e(10).from,u=e(14).periodic;n.Stream=r,n.of=r.of=o.of,n.just=o.of,n.empty=r.empty=o.empty,n.never=o.never,n.from=s,n.periodic=u;var c=e(16).thru;r.prototype.thru=function(t){return c(t,this)};var h=e(17);n.create=h.create;var p=e(21);n.fromEvent=p.fromEvent;var a=e(24);n.observe=a.observe,n.forEach=a.observe,n.drain=a.drain,r.prototype.observe=r.prototype.forEach=function(t){return a.observe(t,this)},r.prototype.drain=function(){return a.drain(this)};var f=e(32).loop;n.loop=f,r.prototype.loop=function(t,n){return f(t,n,this)};var l=e(34);n.scan=l.scan,n.reduce=l.reduce,r.prototype.scan=function(t,n){return l.scan(t,n,this)},r.prototype.reduce=function(t,n){return l.reduce(t,n,this)};var v=e(35),d=e(36),y=e(37),k=e(38);n.unfold=v.unfold,n.iterate=d.iterate,n.generate=y.generate,n.cycle=k.cycle,n.concat=k.concat,n.startWith=k.cons,r.prototype.cycle=function(){return k.cycle(this)},r.prototype.concat=function(t){return k.concat(this,t)},r.prototype.startWith=function(t){return k.cons(t,this)};var m=e(40),w=e(44);n.map=m.map,n.constant=m.constant,n.tap=m.tap,n.ap=w.ap,r.prototype.map=function(t){return m.map(t,this)},r.prototype.ap=function(t){return w.ap(this,t)},r.prototype.constant=function(t){return m.constant(t,this)},r.prototype.tap=function(t){return m.tap(t,this)};var _=e(48);n.transduce=_.transduce,r.prototype.transduce=function(t){return _.transduce(t,this)};var g=e(49);n.flatMap=n.chain=g.flatMap,n.join=g.join,r.prototype.flatMap=r.prototype.chain=function(t){return g.flatMap(t,this)},r.prototype.join=function(){return g.join(this)};var b=e(39).continueWith;n.continueWith=b,n.flatMapEnd=b,r.prototype.continueWith=r.prototype.flatMapEnd=function(t){return b(t,this)};var x=e(52).concatMap;n.concatMap=x,r.prototype.concatMap=function(t){return x(t,this)};var E=e(50);n.mergeConcurrently=E.mergeConcurrently,r.prototype.mergeConcurrently=function(t){return E.mergeConcurrently(t,this)};var A=e(53);n.merge=A.merge,n.mergeArray=A.mergeArray,r.prototype.merge=function(){return A.mergeArray(i.cons(this,arguments))};var M=e(45);n.combine=M.combine,n.combineArray=M.combineArray,r.prototype.combine=function(t){return M.combineArray(t,i.replace(this,0,arguments))};var T=e(54);n.sample=T.sample,n.sampleWith=T.sampleWith,r.prototype.sampleWith=function(t){return T.sampleWith(t,this)},r.prototype.sample=function(t){return T.sampleArray(t,this,i.tail(arguments))};var P=e(55);n.zip=P.zip,r.prototype.zip=function(t){return P.zipArray(t,i.replace(this,0,arguments))};var W=e(57)["switch"];n["switch"]=W,n.switchLatest=W,r.prototype["switch"]=r.prototype.switchLatest=function(){return W(this)};var R=e(58);n.filter=R.filter,n.skipRepeats=n.distinct=R.skipRepeats,n.skipRepeatsWith=n.distinctBy=R.skipRepeatsWith,r.prototype.filter=function(t){return R.filter(t,this)},r.prototype.skipRepeats=function(){return R.skipRepeats(this)},r.prototype.skipRepeatsWith=function(t){return R.skipRepeatsWith(t,this)};var I=e(59);n.take=I.take,n.skip=I.skip,n.slice=I.slice,n.takeWhile=I.takeWhile,n.skipWhile=I.skipWhile,r.prototype.take=function(t){return I.take(t,this)},r.prototype.skip=function(t){return I.skip(t,this)},r.prototype.slice=function(t,n){return I.slice(t,n,this)},r.prototype.takeWhile=function(t){return I.takeWhile(t,this)},r.prototype.skipWhile=function(t){return I.skipWhile(t,this)};var C=e(60);n.until=n.takeUntil=C.takeUntil,n.since=n.skipUntil=C.skipUntil,n.during=C.during,r.prototype.until=r.prototype.takeUntil=function(t){return C.takeUntil(t,this)},r.prototype.since=r.prototype.skipUntil=function(t){return C.skipUntil(t,this)},r.prototype.during=function(t){return C.during(t,this)};var L=e(61).delay;n.delay=L,r.prototype.delay=function(t){return L(t,this)};var S=e(62).timestamp;n.timestamp=S,r.prototype.timestamp=function(){return S(this)};var D=e(63);n.throttle=D.throttle,n.debounce=D.debounce,r.prototype.throttle=function(t){return D.throttle(t,this)},r.prototype.debounce=function(t){return D.debounce(t,this)};var j=e(64);n.fromPromise=j.fromPromise,n.await=j.awaitPromises,r.prototype.await=function(){return j.awaitPromises(this)};var N=e(65);n.recoverWith=N.flatMapError,n.flatMapError=N.flatMapError,n.throwError=N.throwError,r.prototype.recoverWith=r.prototype.flatMapError=function(t){return N.flatMapError(t,this)};var q=e(15)["default"];n.multicast=q,r.prototype.multicast=function(){return q(this)}},function(t,n){function e(t){this.source=t}t.exports=e},function(t,n,e){var r,i,o;!function(e,s){i=[n],r=s,o="function"==typeof r?r.apply(n,i):r,!(void 0!==o&&(t.exports=o))}(this,function(t){"use strict";function n(t,n){var e=n.length,r=new Array(e+1);r[0]=t;for(var i=0;e>i;++i)r[i+1]=n[i];return r}function e(t,n){for(var e=n.length,r=new Array(e+1),i=0;e>i;++i)r[i]=n[i];return r[e]=t,r}function r(t,n){if(0>t)throw new TypeError("n must be >= 0");var e=n.length;return 0===t||0===e?n:t>=e?[]:i(t,n,e-t)}function i(t,n,e){for(var r=new Array(e),i=0;e>i;++i)r[i]=n[t+i];return r}function o(t){return r(1,t)}function s(t){for(var n=t.length,e=new Array(n),r=0;n>r;++r)e[r]=t[r];return e}function u(t,n){for(var e=n.length,r=new Array(e),i=0;e>i;++i)r[i]=t(n[i]);return r}function c(t,n,e){for(var r=n,i=0,o=e.length;o>i;++i)r=t(r,e[i],i);return r}function h(t,n,e){if(0>n)throw new TypeError("i must be >= 0");for(var r=e.length,i=new Array(r),o=0;r>o;++o)i[o]=n===o?t:e[o];return i}function p(t,n){if(0>t)throw new TypeError("i must be >= 0");var e=n.length;return 0===e||t>=e?n:1===e?[]:a(t,n,e-1)}function a(t,n,e){var r=new Array(e),i=void 0;for(i=0;t>i;++i)r[i]=n[i];for(i=t;e>i;++i)r[i]=n[i+1];return r}function f(t,n){for(var e,r=n.length,i=new Array(r),o=0,s=0;r>s;++s)e=n[s],t(e)||(i[o]=e,++o);return i.length=o,i}function l(t,n){for(var e=0,r=n.length;r>e;++e)if(t===n[e])return e;return-1}function v(t){return null!=t&&"number"==typeof t.length&&"function"!=typeof t}function d(t){function n(e,r){switch(arguments.length){case 0:return n;case 1:return function(n){return t(e,n)};default:return t(e,r)}}return n}function y(t){function n(e,r,i){switch(arguments.length){case 0:return n;case 1:return d(function(n,r){return t(e,n,r)});case 2:return function(n){return t(e,r,n)};default:return t(e,r,i)}}return n}Object.defineProperty(t,"__esModule",{value:!0});var k=function(t){return t},m=function(t,n){return function(e){return t(n(e))}},w=function(t,n){return t(n)};t.cons=n,t.append=e,t.drop=r,t.tail=o,t.copy=s,t.map=u,t.reduce=c,t.replace=h,t.remove=p,t.removeAll=f,t.findIndex=l,t.isArrayLike=v,t.id=k,t.compose=m,t.apply=w,t.curry2=d,t.curry3=y})},function(t,n,e){function r(t){return new a(new i(t))}function i(t){this.value=t}function o(t,n,e){e.event(t,n),e.end(t,void 0)}function s(){return v}function u(){}function c(t){return t.dispose()}function h(){return d}function p(){}var a=e(1),f=e(4),l=e(8);n.of=r,n.empty=s,n.never=h,i.prototype.run=function(t,n){return n.asap(new l(o,this.value,t))},u.prototype.run=function(t,n){var e=l.end(void 0,t);return n.asap(e),f.create(c,e)};var v=new a(new u);p.prototype.run=function(){return f.empty()};var d=new a(new p)},function(t,n,e){function r(t,n,e){var r=c(n);return m(r)?r["catch"](function(n){e.error(t,n)}):r}function i(t,n){return l(new y(t,n))}function o(){return new y(g,void 0)}function s(t){return i(u,t)}function u(t){return Promise.all(_(c,t))}function c(t){try{return t.dispose()}catch(n){return Promise.reject(n)}}function h(t){return i(p,t)}function p(t){return t.then(a)}function a(t){return t.dispose()}function f(){return new k}function l(t){return new y(v,d(t))}function v(t){return t.disposed||(t.disposed=!0,t.value=c(t.disposable),t.disposable=void 0),t.value}function d(t){return{disposed:!1,disposable:t,value:void 0}}var y=e(5),k=e(6),m=e(7).isPromise,w=e(2),_=w.map,g=w.id;n.tryDispose=r,n.create=i,n.once=l,n.empty=o,n.all=s,n.settable=f,n.promised=h},function(t,n){function e(t,n){this._dispose=t,this._data=n}t.exports=e,e.prototype.dispose=function(){return this._dispose(this._data)}},function(t,n){function e(){this.disposable=void 0,this.disposed=!1,this._resolve=void 0;var t=this;this.result=new Promise(function(n){t._resolve=n})}t.exports=e,e.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())},e.prototype.dispose=function(){return this.disposed?this.result:(this.disposed=!0,void 0!==this.disposable&&(this.result=this.disposable.dispose()),this.result)}},function(t,n){function e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}n.isPromise=e},function(t,n,e){function r(t,n,e){this._run=t,this.value=n,this.sink=e,this.active=!0}function i(t,n,e){e.error(t,n)}function o(t,n,e){e.event(t,n)}function s(t,n,e){e.end(t,n)}var u=e(9);t.exports=r,r.event=function(t,n){return new r(o,t,n)},r.end=function(t,n){return new r(s,t,n)},r.error=function(t,n){return new r(i,t,n)},r.prototype.dispose=function(){this.active=!1},r.prototype.run=function(t){this.active&&this._run(t,this.value,this.sink)},r.prototype.error=function(t,n){return this.active?void this.sink.error(t,n):u(n)}},function(t,n){function e(t){setTimeout(function(){throw t},0)}t.exports=e},function(t,n,e){function r(t){if(Array.isArray(t)||u(t))return i(t);if(o(t))return s(t);throw new TypeError("not iterable: "+t)}var i=e(11).fromArray,o=e(12).isIterable,s=e(13).fromIterable,u=e(2).isArrayLike;n.from=r},function(t,n,e){function r(t){return new s(new i(t))}function i(t){this.array=t}function o(t,n,e){function r(t){e.end(t)}for(var i=0,o=n.length;o>i&&this.active;++i)e.event(t,n[i]);this.active&&r(t)}var s=e(1),u=e(8);n.fromArray=r,i.prototype.run=function(t,n){return n.asap(new u(o,this.array,t))}},function(t,n){function e(t){return"function"==typeof t[o]}function r(t){return t[o]()}function i(t,n){return n[o]=t,n}n.isIterable=e,n.getIterator=r,n.makeIterable=i;var o;o="function"==typeof Set&&"function"==typeof(new Set)["@@iterator"]?"@@iterator":"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_"},function(t,n,e){function r(t){return new u(new i(t))}function i(t){this.iterable=t}function o(t,n,e){this.scheduler=e,this.iterator=t,this.task=new h(s,this,n),e.asap(this.task)}function s(t,n,e){var r=n.iterator.next();r.done?e.end(t,r.value):e.event(t,r.value),n.scheduler.asap(n.task)}var u=e(1),c=e(12).getIterator,h=e(8);n.fromIterable=r,i.prototype.run=function(t,n){return new o(c(this.iterable),t,n)},o.prototype.dispose=function(){return this.task.dispose()}},function(t,n,e){function r(t,n){return new s(new u(new i(t,n)))}function i(t,n){this.period=t,this.value=n}function o(t,n,e){e.event(t,n)}var s=e(1),u=(e(4),e(15).MulticastSource),c=e(8);n.periodic=r,i.prototype.run=function(t,n){return n.periodic(this.period,new c(o,this.value,t))}},function(t,n,e){var r,i,o;!function(s,u){i=[n,e(2)],r=u,o="function"==typeof r?r.apply(n,i):r,!(void 0!==o&&(t.exports=o))}(this,function(t,n){"use strict";function e(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n,e){try{e.event(t,n)}catch(r){e.error(t,r)}}function i(t,n,e){try{e.end(t,n)}catch(r){e.error(t,r)}}function o(t){var n=t.source;return n instanceof p?t:new t.constructor(new p(n))}Object.defineProperty(t,"__esModule",{value:!0}),t.MulticastSource=void 0;var s=function(){function t(t,n){for(var e=0;er;++r)t=n[r],e.event(t.time,t.value);n.length=0},i.prototype.error=function(t){this.sink.error(0,t)},o.prototype.run=function(){this.sink.end(this.time,this.value)},o.prototype.error=function(t){this.sink.error(this.time,t)},s.prototype.run=function(){this.sink.error(this.time,this.value)},s.prototype.error=function(t){throw t}},function(t,n){function e(t){return Promise.resolve(t).then(r)}function r(t){try{return t.run()}catch(n){return t.error(n)}}t.exports=e},function(t,n){function e(t,n,e){try{e.event(t,n)}catch(r){e.error(t,r)}}function r(t,n,e){try{e.end(t,n)}catch(r){e.error(t,r)}}n.tryEvent=e,n.tryEnd=r},function(t,n,e){function r(t,n){var e;if("function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener){var r=arguments.length>2&&!!arguments[2];e=new o(new s(t,n,r))}else{if("function"!=typeof n.addListener||"function"!=typeof n.removeListener)throw new Error("source must support addEventListener/removeEventListener or addListener/removeListener");e=new u(t,n)}return new i(e)}var i=e(1),o=e(15).MulticastSource,s=e(22),u=e(23);n.fromEvent=r},function(t,n,e){function r(t,n,e){this.event=t,this.source=n,this.capture=e}function i(t){var n=t.target;n.source.removeEventListener(n.event,t.addEvent,n.capture)}var o=e(4),s=e(20);t.exports=r,r.prototype.run=function(t,n){function e(e){s.tryEvent(n.now(),e,t)}return this.source.addEventListener(this.event,e,this.capture),o.create(i,{target:this,addEvent:e})}},function(t,n,e){function r(t,n){this.event=t,this.source=n}function i(t){var n=t.target;n.source.removeListener(n.event,t.addEvent)}var o=e(18),s=e(4),u=e(20);t.exports=r,r.prototype.run=function(t,n){function e(t){var e=arguments.length;if(e>1){for(var i=new Array(e),o=0;e>o;++o)i[o]=arguments[o];u.tryEvent(n.now(),i,r)}else u.tryEvent(n.now(),t,r)}var r=new o(t);return this.source.addListener(this.event,e),s.create(i,{target:this,addEvent:e})}},function(t,n,e){function r(t,n){return s.withDefaultScheduler(t,n.source)}function i(t){return s.withDefaultScheduler(o,t.source)}function o(){}var s=e(25);n.observe=r,n.drain=i},function(t,n,e){function r(t,n){return i(t,n,c)}function i(t,n,e){return new Promise(function(r,i){o(t,n,e,r,i)})}function o(t,n,e,r,i){var o=u.settable(),c=new s(t,r,i,o);o.setDisposable(n.run(c,e))}var s=e(26),u=e(4),c=e(27);n.withDefaultScheduler=r,n.withScheduler=i},function(t,n){function e(t,n,e,r){this._event=t,this._end=n,this._error=e,this._disposable=r,this.active=!0}function r(t,n,e,r){Promise.resolve(e.dispose()).then(function(){t(r)},n)}t.exports=e,e.prototype.event=function(t,n){this.active&&this._event(n)},e.prototype.end=function(t,n){this.active&&(this.active=!1,r(this._end,this._error,this._disposable,n))},e.prototype.error=function(t,n){this.active=!1,r(this._error,this._error,this._disposable,n)}},function(t,n,e){(function(n){var r=e(29),i=e(30),o=e(31),s="object"==typeof n&&"function"==typeof n.nextTick;t.exports=new r(s?o:i)}).call(n,e(28))},function(t,n){function e(){h&&s&&(h=!1,s.length?c=s.concat(c):p=-1,c.length&&r())}function r(){if(!h){var t=setTimeout(e);h=!0;for(var n=c.length;n;){for(s=c,c=[];++p1)for(var e=1;e=0&&(o.time=o.time+o.period,c(o,n)))}return n}function c(t,n){var e=n.length;if(0===e)return void n.push(p(t.time,[t]));var r=h(t.time,n);r>=e?n.push(p(t.time,[t])):t.time===n[r].time?n[r].events.push(t):n.splice(r,0,p(t.time,[t]))}function h(t,n){for(var e,r,i=0,o=n.length;o>i;){if(e=Math.floor((i+o)/2),r=n[e],t===r.time)return e;t=0&&n=0&&(this._tasks[n].events.splice(e,1),this._reschedule())}},o.prototype.cancelAll=function(t){for(var n=0;nr&&n[r].time<=t;)++r;this._tasks=n.slice(r);for(var i=0;r>i;++i)this._tasks=u(n[i],this._tasks);return this._tasks}},function(t,n){t.exports={now:Date.now,setTimer:function(t,n){return setTimeout(t,n)},clearTimer:function(t){return clearTimeout(t)}}},function(t,n,e){function r(t){this.f=t,this.active=!0}function i(t){var n=new r(t);return o(n),n}var o=e(19);r.prototype.run=function(){if(this.active){var t=this.f;return t()}},r.prototype.error=function(t){throw t},r.prototype.cancel=function(){this.active=!1},t.exports={now:Date.now,setTimer:function(t,n){return 0>=n?i(t):setTimeout(t,n)},clearTimer:function(t){return t instanceof r?t.cancel():clearTimeout(t)}}},function(t,n,e){function r(t,n,e){return new s(new i(t,n,e.source))}function i(t,n,e){this.step=t,this.seed=n,this.source=e}function o(t,n,e){this.step=t,this.seed=n,this.sink=e}var s=e(1),u=e(33);n.loop=r,i.prototype.run=function(t,n){return this.source.run(new o(this.step,this.seed,t),n)},o.prototype.error=u.prototype.error,o.prototype.event=function(t,n){var e=this.step(this.seed,n);this.seed=e.seed,this.sink.event(t,e.value)},o.prototype.end=function(t){this.sink.end(t,this.seed)}},function(t,n){function e(t){this.sink=t}t.exports=e,e.prototype.event=function(t,n){return this.sink.event(t,n)},e.prototype.end=function(t,n){return this.sink.end(t,n)},e.prototype.error=function(t,n){return this.sink.error(t,n)}},function(t,n,e){function r(t,n,e){return new p(new i(t,n,e.source))}function i(t,n,e){this.source=e,this.f=t,this.value=n}function o(t,n,e){this.f=t,this.value=n,this.sink=e}function s(t,n,e){return f.withDefaultScheduler(h,new u(t,n,e.source))}function u(t,n,e){this.source=e,this.f=t,this.value=n}function c(t,n,e){this.f=t,this.value=n,this.sink=e}function h(){}var p=e(1),a=e(33),f=e(25),l=e(4),v=e(8);n.scan=r,n.reduce=s,i.prototype.run=function(t,n){var e=n.asap(v.event(this.value,t)),r=this.source.run(new o(this.f,this.value,t),n);return l.all([e,r])},o.prototype.event=function(t,n){var e=this.f;this.value=e(this.value,n),this.sink.event(t,this.value)},o.prototype.error=a.prototype.error,o.prototype.end=a.prototype.end,u.prototype.run=function(t,n){return this.source.run(new c(this.f,this.value,t),n)},c.prototype.event=function(t,n){var e=this.f;this.value=e(this.value,n),this.sink.event(t,this.value)},c.prototype.error=a.prototype.error,c.prototype.end=function(t){this.sink.end(t,this.value)}},function(t,n,e){function r(t,n){return new c(new i(t,n))}function i(t,n){this.f=t,this.value=n}function o(t,n,e,r){function i(t){u.sink.error(u.scheduler.now(),t)}function o(t){return s(t,n)}this.f=t,this.sink=e,this.scheduler=r,this.active=!0;var u=this;Promise.resolve(this).then(o)["catch"](i)}function s(t,n){var e=t.f;return Promise.resolve(e(n)).then(function(n){return u(t,n)})}function u(t,n){return n.done?(t.sink.end(t.scheduler.now(),n.value),n.value):(t.sink.event(t.scheduler.now(),n.value),t.active?s(t,n.seed):n.value)}var c=e(1);n.unfold=r,i.prototype.run=function(t,n){return new o(this.f,this.value,t,n)},o.prototype.dispose=function(){this.active=!1}},function(t,n,e){function r(t,n){return new c(new i(t,n))}function i(t,n){this.f=t,this.value=n}function o(t,n,e,r){function i(t){c.sink.error(c.scheduler.now(),t)}function o(t){return s(t,u)}this.f=t,this.sink=e,this.scheduler=r,this.active=!0;var u=n,c=this;Promise.resolve(this).then(o)["catch"](i)}function s(t,n){if(t.sink.event(t.scheduler.now(),n),!t.active)return n;var e=t.f;return Promise.resolve(e(n)).then(function(n){return u(t,n)})}function u(t,n){return t.active?s(t,n):t.value}var c=e(1);n.iterate=r,i.prototype.run=function(t,n){return new o(this.f,this.value,t,n)},o.prototype.dispose=function(){this.active=!1}},function(t,n,e){function r(t){return new p(new i(t,a.tail(arguments)))}function i(t,n){this.f=t,this.args=n}function o(t,n,e){function r(t){i.sink.error(i.scheduler.now(),t)}this.iterator=t,this.sink=n,this.scheduler=e,this.active=!0;var i=this;Promise.resolve(this).then(s)["catch"](r)}function s(t,n){return t.active?u(t,t.iterator.next(n)):n}function u(t,n){return n.done?t.sink.end(t.scheduler.now(),n.value):Promise.resolve(n.value).then(function(n){return c(t,n)},function(n){return h(t,n)})}function c(t,n){return t.sink.event(t.scheduler.now(),n),s(t,n)}function h(t,n){return u(t,t.iterator["throw"](n))}var p=e(1),a=e(2);n.generate=r,i.prototype.run=function(t,n){return new o(this.f.apply(void 0,this.args),t,n)},o.prototype.dispose=function(){this.active=!1}},function(t,n,e){function r(t,n){return i(s(t),n)}function i(t,n){return u(function(){return n},t)}function o(t){return u(function(){return o(t)},t)}var s=e(3).of,u=e(39).continueWith;n.concat=i,n.cycle=o,n.cons=r},function(t,n,e){function r(t,n){return new s(new i(t,n.source))}function i(t,n){this.f=t,this.source=n}function o(t,n,e,r){this.f=t,this.sink=e,this.scheduler=r,this.active=!0,this.disposable=c.once(n.run(this,r))}var s=e(1),u=e(33),c=e(4);e(7).isPromise;n.continueWith=r,i.prototype.run=function(t,n){return new o(this.f,this.source,t,n)},o.prototype.error=u.prototype.error,o.prototype.event=function(t,n){this.active&&this.sink.event(t,n)},o.prototype.end=function(t,n){this.active&&(c.tryDispose(t,this.disposable,this.sink),this._startNext(t,n,this.sink))},o.prototype._startNext=function(t,n,e){try{this.disposable=this._continue(this.f,n,e)}catch(r){e.error(t,r)}},o.prototype._continue=function(t,n,e){return t(n).source.run(e,this.scheduler)},o.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()}},function(t,n,e){function r(t,n){return new s(u.create(t,n.source))}function i(t,n){return r(function(){return t},n)}function o(t,n){return r(function(n){return t(n),n},n)}var s=e(1),u=e(41);n.map=r,n.constant=i,n.tap=o},function(t,n,e){function r(t,n){this.f=t,this.source=n}function i(t,n){this.f=t,this.sink=n}var o=e(33),s=e(42),u=e(43),c=e(2);t.exports=r,r.create=function(t,n){return n instanceof r?new r(c.compose(t,n.f),n.source):n instanceof s?new u(n.p,t,n.source):new r(t,n)},r.prototype.run=function(t,n){return this.source.run(new i(this.f,t),n)},i.prototype.end=o.prototype.end,i.prototype.error=o.prototype.error,i.prototype.event=function(t,n){var e=this.f;this.sink.event(t,e(n))}},function(t,n,e){function r(t,n){this.p=t,this.source=n}function i(t,n){this.p=t,this.sink=n}function o(t,n){return function(e){return t(e)&&n(e)}}var s=e(33);t.exports=r,r.create=function(t,n){return n instanceof r?new r(o(n.p,t),n.source):new r(t,n)},r.prototype.run=function(t,n){return this.source.run(new i(this.p,t),n)},i.prototype.end=s.prototype.end,i.prototype.error=s.prototype.error,i.prototype.event=function(t,n){var e=this.p;e(n)&&this.sink.event(t,n)}},function(t,n,e){function r(t,n,e){this.p=t,this.f=n,this.source=e}function i(t,n,e){this.p=t,this.f=n,this.sink=e}var o=e(33);t.exports=r,r.prototype.run=function(t,n){return this.source.run(new i(this.p,this.f,t),n)},i.prototype.event=function(t,n){var e=this.f,r=this.p;r(n)&&this.sink.event(t,e(n))},i.prototype.end=o.prototype.end,i.prototype.error=o.prototype.error},function(t,n,e){function r(t,n){return i(o,t,n)}var i=e(45).combine,o=e(2).apply;n.ap=r},function(t,n,e){function r(t){return i(t,m(arguments))}function i(t,n){var e=n.length;return 0===e?a.empty():1===e?p.map(t,n[0]):new h(o(t,n))}function o(t,n){return new u(t,k(s,n))}function s(t){return t.source}function u(t,n){this.f=t,this.sources=n}function c(t,n,e,r){this.sink=e,this.disposables=t,this.sinks=n,this.f=r;var i=n.length;this.awaiting=i,this.values=new Array(i),this.hasValue=new Array(i);for(var o=0;i>o;++o)this.hasValue[o]=!1;this.activeCount=n.length}var h=e(1),p=e(40),a=e(3),f=e(33),l=e(46),v=e(4),d=e(2),y=e(47),k=d.map,m=d.tail;n.combineArray=i,n.combine=r,u.prototype.run=function(t,n){for(var e,r=this.sources.length,i=new Array(r),o=new Array(r),s=new c(i,o,t,this.f),u=0;r>u;++u)e=o[u]=new l(u,s),i[u]=this.sources[u].run(e,n);return v.all(i)},c.prototype.error=f.prototype.error,c.prototype.event=function(t,n){var e=n.index,r=this._updateReady(e);this.values[e]=n.value,0===r&&this.sink.event(t,y(this.f,this.values))},c.prototype._updateReady=function(t){return this.awaiting>0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},c.prototype.end=function(t,n){v.tryDispose(t,this.disposables[n.index],this.sink),0===--this.activeCount&&this.sink.end(t,n.value)}},function(t,n,e){function r(t,n){this.sink=n,this.index=t,this.active=!0,this.value=void 0}var i=e(33);t.exports=r,r.prototype.event=function(t,n){this.active&&(this.value=n,this.sink.event(t,this))},r.prototype.end=function(t,n){this.active&&(this.active=!1,this.sink.end(t,{index:this.index,value:n}))},r.prototype.error=i.prototype.error},function(t,n){function e(t,n){switch(n.length){case 0:return t();case 1:return t(n[0]);case 2:return t(n[0],n[1]);case 3:return t(n[0],n[1],n[2]);case 4:return t(n[0],n[1],n[2],n[3]);case 5:return t(n[0],n[1],n[2],n[3],n[4]);default:return t.apply(void 0,n)}}t.exports=e},function(t,n,e){function r(t,n){return new p(new i(t,n.source))}function i(t,n){this.transducer=t,this.source=n}function o(t,n){this.xf=t,this.sink=n}function s(t){this.time=-(1/0),this.sink=t}function u(t){return"function"==typeof t["@@transducer/step"]?new c(t):new h(t)}function c(t){this.tx=t}function h(t){this.tx=t}var p=e(1);n.transduce=r,i.prototype.run=function(t,n){var e=this.transducer(new s(t));return this.source.run(new o(u(e),t),n)},o.prototype.event=function(t,n){var e=this.xf.step(t,n);return this.xf.isReduced(e)?this.sink.end(t,this.xf.getResult(e)):e},o.prototype.end=function(t,n){return this.xf.result(n)},o.prototype.error=function(t,n){return this.sink.error(t,n)},s.prototype["@@transducer/init"]=s.prototype.init=function(){},s.prototype["@@transducer/step"]=s.prototype.step=function(t,n){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,n)},s.prototype["@@transducer/result"]=s.prototype.result=function(t){return this.sink.end(this.time,t)},c.prototype.step=function(t,n){return this.tx["@@transducer/step"](t,n)},c.prototype.result=function(t){return this.tx["@@transducer/result"](t)},c.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},c.prototype.getResult=function(t){return t["@@transducer/value"]},h.prototype.step=function(t,n){return this.tx.step(t,n)},h.prototype.result=function(t){return this.tx.result(t)},h.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},h.prototype.getResult=function(t){ +return t.value}},function(t,n,e){function r(t,n){return s(t,1/0,n)}function i(t){return o(1/0,t)}var o=e(50).mergeConcurrently,s=e(50).mergeMapConcurrently;n.flatMap=r,n.join=i},function(t,n,e){function r(t,n){return i(f,t,n)}function i(t,n,e){return new h(new o(t,n,e.source))}function o(t,n,e){this.f=t,this.concurrency=n,this.source=e}function s(t,n,e,r,i){this.f=t,this.concurrency=n,this.sink=r,this.scheduler=i,this.pending=[],this.current=new a,this.disposable=p.once(e.run(this,i)),this.active=!0}function u(t,n,e,r){return t(n).source.run(e,r)}function c(t,n,e){this.prev=this.next=null,this.time=t,this.outer=n,this.sink=e,this.disposable=void 0}var h=e(1),p=e(4),a=e(51),f=e(2).id;n.mergeConcurrently=r,n.mergeMapConcurrently=i,o.prototype.run=function(t,n){return new s(this.f,this.concurrency,this.source,t,n)},s.prototype.event=function(t,n){this._addInner(t,n)},s.prototype._addInner=function(t,n){this.current.lengthu;++u)e=o[u]=new a(u,s),i[u]=this.sources[u].run(e,n);return l.all(i)},c.prototype.error=p.prototype.error,c.prototype.event=function(t,n){this.sink.event(t,n.value)},c.prototype.end=function(t,n){l.tryDispose(t,this.disposables[n.index],this.sink),0===--this.activeCount&&this.sink.end(t,n.value)}},function(t,n,e){function r(t,n){return o(t,n,d.drop(2,arguments))}function i(t,n){return new f(new u(d.id,t.source,[n.source]))}function o(t,n,e){return new f(new u(t,n.source,d.map(s,e)))}function s(t){return t.source}function u(t,n,e){this.f=t,this.sampler=n,this.sources=e}function c(t){this.sink=t,this.hasValue=!1}function h(t,n,e){this.f=t,this.sinks=n,this.sink=e,this.active=!1}function p(t){return t.hasValue}function a(t){return t.value}var f=e(1),l=e(33),v=e(4),d=e(2),y=e(47);n.sample=r,n.sampleWith=i,n.sampleArray=o,u.prototype.run=function(t,n){for(var e,r=this.sources.length,i=new Array(r+1),o=new Array(r),s=new h(this.f,o,t),u=0;r>u;++u)e=o[u]=new c(s),i[u]=this.sources[u].run(e,n);return i[u]=this.sampler.run(s,n),v.all(i)},c.prototype.event=function(t,n){this.value=n,this.hasValue=!0,this.sink._notify(this)},c.prototype.end=function(){},c.prototype.error=l.prototype.error,h.prototype._notify=function(){this.active||(this.active=this.sinks.every(p))},h.prototype.event=function(t){this.active&&this.sink.event(t,y(this.f,d.map(a,this.sinks)))},h.prototype.end=l.prototype.end,h.prototype.error=l.prototype.error},function(t,n,e){function r(t){return i(t,b(arguments))}function i(t,n){return 0===n.length?v.empty():1===n.length?l.map(t,n[0]):new f(new s(t,g(o,n)))}function o(t){return t.source}function s(t,n){this.f=t,this.sources=n}function u(t,n,e,r){this.f=t,this.sinks=e,this.sink=r,this.buffers=n}function c(t,n,e,r){r.event(n,w(t,g(h,e)))}function h(t){return t.shift()}function p(t,n){for(var e=0,r=t.length;r>e;++e)if(t[e].isEmpty()&&!n[e].active)return!0;return!1}function a(t){for(var n=0,e=t.length;e>n;++n)if(t[n].isEmpty())return!1;return!0}var f=e(1),l=e(40),v=e(3),d=e(33),y=e(46),k=e(4),m=e(2),w=e(47),_=e(56),g=m.map,b=m.tail;n.zip=r,n.zipArray=i,s.prototype.run=function(t,n){for(var e,r=this.sources.length,i=new Array(r),o=new Array(r),s=new Array(r),c=new u(this.f,s,o,t),h=0;r>h;++h)s[h]=new _,e=o[h]=new y(h,c),i[h]=this.sources[h].run(e,n);return k.all(i)},u.prototype.event=function(t,n){var e=this.buffers,r=e[n.index];if(r.push(n.value),1===r.length()){if(!a(this.buffers))return;c(this.f,t,e,this.sink),p(this.buffers,this.sinks)&&this.sink.end(t,void 0)}},u.prototype.end=function(t,n){var e=this.buffers[n.index];e.isEmpty()&&this.sink.end(t,n.value)},u.prototype.error=d.prototype.error},function(t,n){function e(t){this._capacity=t||32,this._length=0,this._head=0}function r(t,n,e,r,i){for(var o=0;i>o;++o)e[o+r]=t[o+n],t[o+n]=void 0}t.exports=e,e.prototype.push=function(t){var n=this._length;this._checkCapacity(n+1);var e=this._head+n&this._capacity-1;this[e]=t,this._length=n+1},e.prototype.shift=function(){var t=this._head,n=this[t];return this[t]=void 0,this._head=t+1&this._capacity-1,this._length--,n},e.prototype.isEmpty=function(){return 0===this._length},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(t){this._capacityn&&r(this,0,this,n,e&n-1)}},function(t,n,e){function r(t){return new u(new i(t.source))}function i(t){this.source=t}function o(t,n){this.sink=t,this.scheduler=n,this.current=null,this.ended=!1}function s(t,n,e,r){this.min=t,this.max=n,this.outer=e,this.sink=r,this.disposable=c.empty()}var u=e(1),c=e(4);n["switch"]=r,i.prototype.run=function(t,n){var e=new o(t,n);return c.all(e,this.source.run(e,n))},o.prototype.event=function(t,n){this._disposeCurrent(t),this.current=new s(t,1/0,this,this.sink),this.current.disposable=n.source.run(this.current,this.scheduler)},o.prototype.end=function(t,n){this.ended=!0,this._checkEnd(t,n)},o.prototype.error=function(t,n){this.ended=!0,this.sink.error(t,n)},o.prototype.dispose=function(){return this._disposeCurrent(0)},o.prototype._disposeCurrent=function(t){return null!==this.current?this.current._dispose(t):void 0},o.prototype._disposeInner=function(t,n){n._dispose(t),n===this.current&&(this.current=null)},o.prototype._checkEnd=function(t,n){this.ended&&null===this.current&&this.sink.end(t,n)},o.prototype._endInner=function(t,n,e){this._disposeInner(t,e),this._checkEnd(t,n)},o.prototype._errorInner=function(t,n,e){this._disposeInner(t,e),this.sink.error(t,n)},s.prototype.event=function(t,n){t=n?w.empty():new k(s(t,n,e.source))}function s(t,n,e){return e instanceof g?u(t,n,e):e instanceof h?c(t,n,e):new h(t,n,e)}function u(t,n,e){return g.create(e.f,s(t,n,e.source))}function c(t,n,e){return t+=e.min,n=Math.min(n+e.min,e.max),new h(t,n,e.source)}function h(t,n,e){this.source=e,this.min=t,this.max=n}function p(t,n,e,r,i){this.sink=r,this.skip=t,this.take=n,this.disposable=_.once(e.run(this,i))}function a(t,n){return new k(new f(t,n.source))}function f(t,n){this.p=t,this.source=n}function l(t,n,e,r){this.p=t,this.sink=e,this.active=!0,this.disposable=_.once(n.run(this,r))}function v(t,n){return new k(new d(t,n.source))}function d(t,n){this.p=t,this.source=n}function y(t,n){this.p=t,this.sink=n,this.skipping=!0}var k=e(1),m=e(33),w=e(3),_=e(4),g=e(41);n.take=r,n.skip=i,n.slice=o,n.takeWhile=a,n.skipWhile=v,h.prototype.run=function(t,n){return new p(this.min,this.max-this.min,this.source,t,n)},p.prototype.end=m.prototype.end,p.prototype.error=m.prototype.error,p.prototype.event=function(t,n){return this.skip>0?void(this.skip-=1):void(0!==this.take&&(this.take-=1,this.sink.event(t,n),0===this.take&&(this.dispose(),this.sink.end(t,n))))},p.prototype.dispose=function(){return this.disposable.dispose()},f.prototype.run=function(t,n){return new l(this.p,this.source,t,n)},l.prototype.end=m.prototype.end,l.prototype.error=m.prototype.error,l.prototype.event=function(t,n){if(this.active){var e=this.p;this.active=e(n),this.active?this.sink.event(t,n):(this.dispose(),this.sink.end(t,n))}},l.prototype.dispose=function(){return this.disposable.dispose()},d.prototype.run=function(t,n){return this.source.run(new y(this.p,t),n)},y.prototype.end=m.prototype.end,y.prototype.error=m.prototype.error,y.prototype.event=function(t,n){if(this.skipping){var e=this.p;if(this.skipping=e(n),this.skipping)return}this.sink.event(t,n)}},function(t,n,e){function r(t,n){return new l(new s(t.source,n.source))}function i(t,n){return new l(new u(t.source,n.source))}function o(t,n){return r(y(t),i(t,n))}function s(t,n){this.maxSignal=t,this.source=n}function u(t,n){this.minSignal=t,this.source=n}function c(t,n){this.value=t,this.sink=n}function h(t,n,e){this.min=t,this.max=n,this.sink=e}function p(t,n,e){this.value=1/0,this.sink=n,this.disposable=t.run(this,e)}function a(t,n,e){this.value=1/0,this.sink=n,this.disposable=t.run(this,e)}function f(){}var l=e(1),v=e(33),d=e(4),y=e(49).join;n.during=o,n.takeUntil=r,n.skipUntil=i,s.prototype.run=function(t,n){var e=new c(-(1/0),t),r=new a(this.maxSignal,t,n),i=this.source.run(new h(e,r,t),n);return d.all([e,r,i])},u.prototype.run=function(t,n){var e=new p(this.minSignal,t,n),r=new c(1/0,t),i=this.source.run(new h(e,r,t),n);return d.all([e,r,i])},c.prototype.error=v.prototype.error,c.prototype.event=f,c.prototype.end=f,c.prototype.dispose=f,h.prototype.event=function(t,n){t>=this.min.value&&t=t?n:new s(new i(t,n.source))}function i(t,n){this.dt=t,this.source=n}function o(t,n,e){this.dt=t,this.sink=n,this.scheduler=e}var s=e(1),u=e(33),c=e(4),h=e(8);n.delay=r,i.prototype.run=function(t,n){var e=new o(this.dt,t,n);return c.all([e,this.source.run(e,n)])},o.prototype.dispose=function(){var t=this;this.scheduler.cancelAll(function(n){return n.sink===t.sink})},o.prototype.event=function(t,n){this.scheduler.delay(this.dt,h.event(n,this.sink))},o.prototype.end=function(t,n){this.scheduler.delay(this.dt,h.end(n,this.sink))},o.prototype.error=u.prototype.error},function(t,n,e){function r(t){return new s(new i(t.source))}function i(t){this.source=t}function o(t){this.sink=t}var s=e(1),u=e(33);n.timestamp=r,i.prototype.run=function(t,n){return this.source.run(new o(t),n)},o.prototype.end=u.prototype.end,o.prototype.error=u.prototype.error,o.prototype.event=function(t,n){this.sink.event(t,{time:t,value:n})}},function(t,n,e){function r(t,n){return new f(i(t,n.source))}function i(t,n){return n instanceof y?o(t,n):n instanceof u?s(t,n):new u(t,n)}function o(t,n){return y.create(n.f,i(t,n.source))}function s(t,n){return new u(Math.max(t,n.period),n.source)}function u(t,n){this.period=t,this.source=n}function c(t,n){this.time=0,this.period=t,this.sink=n}function h(t,n){return new f(new p(t,n.source))}function p(t,n){this.dt=t,this.source=n}function a(t,n,e,r){this.dt=t,this.sink=e,this.scheduler=r,this.value=void 0,this.timer=null;var i=n.run(this,r);this.disposable=v.all([this,i])}var f=e(1),l=e(33),v=e(4),d=e(8),y=e(41);n.throttle=r,n.debounce=h,u.prototype.run=function(t,n){return this.source.run(new c(this.period,t),n)},c.prototype.event=function(t,n){t>=this.time&&(this.time=t+this.period,this.sink.event(t,n))},c.prototype.end=l.prototype.end,c.prototype.error=l.prototype.error,p.prototype.run=function(t,n){return new a(this.dt,this.source,t,n)},a.prototype.event=function(t,n){this._clearTimer(),this.value=n,this.timer=this.scheduler.delay(this.dt,d.event(n,this.sink))},a.prototype.end=function(t,n){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,n)},a.prototype.error=function(t,n){this._clearTimer(),this.sink.error(t,n)},a.prototype.dispose=function(){this._clearTimer()},a.prototype._clearTimer=function(){return null===this.timer?!1:(this.timer.dispose(),this.timer=null,!0)}},function(t,n,e){function r(t){return i(h(t))}function i(t){return new u(new o(t.source))}function o(t){this.source=t}function s(t,n){this.sink=t,this.scheduler=n,this.queue=Promise.resolve();var e=this;this._eventBound=function(t){e.sink.event(e.scheduler.now(),t)},this._endBound=function(t){e.sink.end(e.scheduler.now(),t)},this._errorBound=function(t){e.sink.error(e.scheduler.now(),t)}}var u=e(1),c=e(9),h=e(3).of;n.fromPromise=r,n.awaitPromises=i,o.prototype.run=function(t,n){return this.source.run(new s(t,n),n)},s.prototype.event=function(t,n){var e=this;this.queue=this.queue.then(function(){return e._event(n)})["catch"](this._errorBound)},s.prototype.end=function(t,n){var e=this;this.queue=this.queue.then(function(){return e._end(n)})["catch"](this._errorBound)},s.prototype.error=function(t,n){var e=this;this.queue=this.queue.then(function(){return e._errorBound(n)})["catch"](c)},s.prototype._event=function(t){return t.then(this._eventBound)},s.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)}},function(t,n,e){function r(t,n){return new h(new u(t,n.source))}function i(t){return new h(new o(t))}function o(t){this.value=t}function s(t,n,e){e.error(t,n)}function u(t,n){this.f=t,this.source=n}function c(t,n,e,r){this.f=t,this.sink=new p(e),this.scheduler=r,this.disposable=n.run(this,r)}var h=e(1),p=e(66),a=(e(33),e(4)),f=e(20),l=(e(7).isPromise,e(8));n.flatMapError=r,n.recoverWith=r,n.throwError=i,o.prototype.run=function(t,n){return n.asap(new l(s,this.value,t))},u.prototype.run=function(t,n){return new c(this.f,this.source,t,n)},c.prototype.event=function(t,n){f.tryEvent(t,n,this.sink)},c.prototype.end=function(t,n){f.tryEnd(t,n,this.sink)},c.prototype.error=function(t,n){var e=this.sink.disable();a.tryDispose(t,this.disposable,this.sink),this._startNext(t,n,e)},c.prototype._startNext=function(t,n,e){try{this.disposable=this._continue(this.f,n,e)}catch(r){e.error(t,r)}},c.prototype._continue=function(t,n,e){return t(n).source.run(e,this.scheduler)},c.prototype.dispose=function(){return this.disposable.dispose()}},function(t,n){function e(t){this.sink=t,this.active=!0}t.exports=e,e.prototype.event=function(t,n){this.active&&this.sink.event(t,n)},e.prototype.end=function(t,n){this.active&&(this.disable(),this.sink.end(t,n))},e.prototype.error=function(t,n){this.disable(),this.sink.error(t,n)},e.prototype.disable=function(){return this.active=!1,this.sink}}])}); \ No newline at end of file diff --git a/package.json b/package.json index 918c4578..f2166a42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "most", - "version": "0.19.3", + "version": "0.19.4", "description": "Monadic streams", "main": "most.js", "files": [ @@ -46,7 +46,7 @@ "babel-register": "^6.8.0", "buster": "^0.8.0", "eslint": "^2.10.0", - "markdown-doctest": "^0.5.0", + "markdown-doctest": "^0.6.0", "transducers-js": "^0.4.174", "uglify-js": "^2.4.23", "webpack": "^1.12.14"