diff --git a/dist/most.js b/dist/most.js index c4be616d..1744f3dd 100644 --- a/dist/most.js +++ b/dist/most.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.most = global.most || {}))); + (factory((global.most = {}))); }(this, (function (exports) { 'use strict'; /** @license MIT License (c) copyright 2010-2016 original author or authors */ @@ -207,13 +207,6 @@ var compose = function (f, g) { return function (x) { return f(g(x)); }; }; // apply :: (a -> b) -> a -> b var apply = function (f, x) { return f(x); }; -// curry2 :: ((a, b) -> c) -> (a -> b -> c) - - -// curry3 :: ((a, b, c) -> d) -> (a -> b -> c -> d) - -/** @license MIT License (c) copyright 2016 original author or authors */ - /** @license MIT License (c) copyright 2010-2016 original author or authors */ /** @author Brian Cavalier */ /** @author John Hann */ @@ -3167,13 +3160,18 @@ function Slice (min, max, source) { } Slice.prototype.run = function (sink, scheduler) { - return this.source.run(new SliceSink(this.min, this.max - this.min, sink), scheduler) + var disposable = settable(); + var sliceSink = new SliceSink(this.min, this.max - this.min, sink, disposable); + + disposable.setDisposable(this.source.run(sliceSink, scheduler)); + return disposable }; -function SliceSink (skip, take, sink) { +function SliceSink (skip, take, sink, disposable) { this.sink = sink; this.skip = skip; this.take = take; + this.disposable = disposable; } SliceSink.prototype.end = Pipe.prototype.end; @@ -3193,6 +3191,7 @@ SliceSink.prototype.event = function (t, x) { this.take -= 1; this.sink.event(t, x); if (this.take === 0) { + this.disposable.dispose(); this.sink.end(t, x); } }; @@ -3207,13 +3206,18 @@ function TakeWhile (p, source) { } TakeWhile.prototype.run = function (sink, scheduler) { - return this.source.run(new TakeWhileSink(this.p, sink), scheduler) + var disposable = settable(); + var takeWhileSink = new TakeWhileSink(this.p, sink, disposable); + + disposable.setDisposable(this.source.run(takeWhileSink, scheduler)); + return disposable }; -function TakeWhileSink (p, sink) { +function TakeWhileSink (p, sink, disposable) { this.p = p; this.sink = sink; this.active = true; + this.disposable = disposable; } TakeWhileSink.prototype.end = Pipe.prototype.end; @@ -3229,6 +3233,7 @@ TakeWhileSink.prototype.event = function (t, x) { if (this.active) { this.sink.event(t, x); } else { + this.disposable.dispose(); this.sink.end(t, x); } }; diff --git a/dist/most.js.map b/dist/most.js.map index bbc6aa70..9de0598a 100644 --- a/dist/most.js.map +++ b/dist/most.js.map @@ -1 +1 @@ -{"version":3,"file":"most.js","sources":["../src/Stream.js","../node_modules/@most/prelude/src/array.js","../node_modules/@most/prelude/src/function.js","../node_modules/@most/prelude/src/index.js","../src/disposable/Disposable.js","../src/disposable/SettableDisposable.js","../src/Promise.js","../src/disposable/dispose.js","../src/fatalError.js","../src/scheduler/PropagateTask.js","../src/source/core.js","../src/source/fromArray.js","../src/iterable.js","../src/source/fromIterable.js","../node_modules/symbol-observable/es/ponyfill.js","../node_modules/symbol-observable/es/index.js","../src/observable/getObservable.js","../src/source/tryEvent.js","../src/observable/fromObservable.js","../src/source/from.js","../src/source/periodic.js","../src/scheduler/ScheduledTask.js","../src/task.js","../src/scheduler/Scheduler.js","../src/scheduler/ClockTimer.js","../src/scheduler/Timeline.js","../src/scheduler/defaultScheduler.js","../src/observable/subscribe.js","../src/combinator/thru.js","../src/source/EventTargetSource.js","../src/sink/DeferredSink.js","../src/source/EventEmitterSource.js","../src/source/fromEvent.js","../src/runSource.js","../src/sink/Pipe.js","../src/fusion/Filter.js","../src/fusion/FilterMap.js","../src/fusion/Map.js","../src/combinator/transform.js","../src/combinator/observe.js","../src/combinator/loop.js","../src/combinator/accumulate.js","../src/source/unfold.js","../src/source/iterate.js","../src/source/generate.js","../src/combinator/continueWith.js","../src/combinator/build.js","../src/sink/IndexSink.js","../src/invoke.js","../src/combinator/combine.js","../src/combinator/applicative.js","../src/combinator/transduce.js","../src/LinkedList.js","../src/combinator/mergeConcurrently.js","../src/combinator/flatMap.js","../src/combinator/concatMap.js","../src/combinator/merge.js","../src/combinator/sample.js","../src/Queue.js","../src/combinator/zip.js","../src/combinator/switch.js","../src/combinator/filter.js","../src/combinator/slice.js","../src/combinator/timeslice.js","../src/combinator/delay.js","../src/combinator/timestamp.js","../src/combinator/limit.js","../src/combinator/promises.js","../src/sink/SafeSink.js","../src/combinator/errors.js","../node_modules/@most/multicast/dist/multicast.es.js","../src/index.js"],"sourcesContent":["/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function Stream (source) {\n this.source = source\n}\n\nStream.prototype.run = function (sink, scheduler) {\n return this.source.run(sink, scheduler)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n\n// Non-mutating array operations\n\n// cons :: a -> [a] -> [a]\n// a with x prepended\nexport function cons (x, a) {\n const l = a.length\n const b = new Array(l + 1)\n b[0] = x\n for (let i = 0; i < l; ++i) {\n b[i + 1] = a[i]\n }\n return b\n}\n\n// append :: a -> [a] -> [a]\n// a with x appended\nexport function append (x, a) {\n const l = a.length\n const b = new Array(l + 1)\n for (let i = 0; i < l; ++i) {\n b[i] = a[i]\n }\n\n b[l] = x\n return b\n}\n\n// drop :: Int -> [a] -> [a]\n// drop first n elements\nexport function drop (n, a) { // eslint-disable-line complexity\n if (n < 0) {\n throw new TypeError('n must be >= 0')\n }\n\n const l = a.length\n if (n === 0 || l === 0) {\n return a\n }\n\n if (n >= l) {\n return []\n }\n\n return unsafeDrop(n, a, l - n)\n}\n\n// unsafeDrop :: Int -> [a] -> Int -> [a]\n// Internal helper for drop\nfunction unsafeDrop (n, a, l) {\n const b = new Array(l)\n for (let i = 0; i < l; ++i) {\n b[i] = a[n + i]\n }\n return b\n}\n\n// tail :: [a] -> [a]\n// drop head element\nexport function tail (a) {\n return drop(1, a)\n}\n\n// copy :: [a] -> [a]\n// duplicate a (shallow duplication)\nexport function copy (a) {\n const l = a.length\n const b = new Array(l)\n for (let i = 0; i < l; ++i) {\n b[i] = a[i]\n }\n return b\n}\n\n// map :: (a -> b) -> [a] -> [b]\n// transform each element with f\nexport function map (f, a) {\n const l = a.length\n const b = new Array(l)\n for (let i = 0; i < l; ++i) {\n b[i] = f(a[i])\n }\n return b\n}\n\n// reduce :: (a -> b -> a) -> a -> [b] -> a\n// accumulate via left-fold\nexport function reduce (f, z, a) {\n let r = z\n for (let i = 0, l = a.length; i < l; ++i) {\n r = f(r, a[i], i)\n }\n return r\n}\n\n// replace :: a -> Int -> [a]\n// replace element at index\nexport function replace (x, i, a) { // eslint-disable-line complexity\n if (i < 0) {\n throw new TypeError('i must be >= 0')\n }\n\n const l = a.length\n const b = new Array(l)\n for (let j = 0; j < l; ++j) {\n b[j] = i === j ? x : a[j]\n }\n return b\n}\n\n// remove :: Int -> [a] -> [a]\n// remove element at index\nexport function remove (i, a) { // eslint-disable-line complexity\n if (i < 0) {\n throw new TypeError('i must be >= 0')\n }\n\n const l = a.length\n if (l === 0 || i >= l) { // exit early if index beyond end of array\n return a\n }\n\n if (l === 1) { // exit early if index in bounds and length === 1\n return []\n }\n\n return unsafeRemove(i, a, l - 1)\n}\n\n// unsafeRemove :: Int -> [a] -> Int -> [a]\n// Internal helper to remove element at index\nfunction unsafeRemove (i, a, l) {\n const b = new Array(l)\n let j\n for (j = 0; j < i; ++j) {\n b[j] = a[j]\n }\n for (j = i; j < l; ++j) {\n b[j] = a[j + 1]\n }\n\n return b\n}\n\n// removeAll :: (a -> boolean) -> [a] -> [a]\n// remove all elements matching a predicate\nexport function removeAll (f, a) {\n const l = a.length\n const b = new Array(l)\n let j = 0\n for (let x, i = 0; i < l; ++i) {\n x = a[i]\n if (!f(x)) {\n b[j] = x\n ++j\n }\n }\n\n b.length = j\n return b\n}\n\n// findIndex :: a -> [a] -> Int\n// find index of x in a, from the left\nexport function findIndex (x, a) {\n for (let i = 0, l = a.length; i < l; ++i) {\n if (x === a[i]) {\n return i\n }\n }\n return -1\n}\n\n// isArrayLike :: * -> boolean\n// Return true iff x is array-like\nexport function isArrayLike (x) {\n return x != null && typeof x.length === 'number' && typeof x !== 'function'\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n\n// id :: a -> a\nexport const id = x => x\n\n// compose :: (b -> c) -> (a -> b) -> (a -> c)\nexport const compose = (f, g) => x => f(g(x))\n\n// apply :: (a -> b) -> a -> b\nexport const apply = (f, x) => f(x)\n\n// curry2 :: ((a, b) -> c) -> (a -> b -> c)\nexport function curry2 (f) {\n function curried (a, b) {\n switch (arguments.length) {\n case 0: return curried\n case 1: return b => f(a, b)\n default: return f(a, b)\n }\n }\n return curried\n}\n\n// curry3 :: ((a, b, c) -> d) -> (a -> b -> c -> d)\nexport function curry3 (f) {\n function curried (a, b, c) { // eslint-disable-line complexity\n switch (arguments.length) {\n case 0: return curried\n case 1: return curry2((b, c) => f(a, b, c))\n case 2: return c => f(a, b, c)\n default:return f(a, b, c)\n }\n }\n return curried\n}\n","/** @license MIT License (c) copyright 2016 original author or authors */\n\nexport * from './array'\nexport * from './function'\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * Create a new Disposable which will dispose its underlying resource.\n * @param {function} dispose function\n * @param {*?} data any data to be passed to disposer function\n * @constructor\n */\nexport default function Disposable (dispose, data) {\n this._dispose = dispose\n this._data = data\n}\n\nDisposable.prototype.dispose = function () {\n return this._dispose(this._data)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function SettableDisposable () {\n this.disposable = void 0\n this.disposed = false\n this._resolve = void 0\n\n var self = this\n this.result = new Promise(function (resolve) {\n self._resolve = resolve\n })\n}\n\nSettableDisposable.prototype.setDisposable = function (disposable) {\n if (this.disposable !== void 0) {\n throw new Error('setDisposable called more than once')\n }\n\n this.disposable = disposable\n\n if (this.disposed) {\n this._resolve(disposable.dispose())\n }\n}\n\nSettableDisposable.prototype.dispose = function () {\n if (this.disposed) {\n return this.result\n }\n\n this.disposed = true\n\n if (this.disposable !== void 0) {\n this.result = this.disposable.dispose()\n }\n\n return this.result\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function isPromise (p) {\n return p !== null && typeof p === 'object' && typeof p.then === 'function'\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\nimport Disposable from './Disposable'\nimport SettableDisposable from './SettableDisposable'\nimport { isPromise } from '../Promise'\nimport * as base from '@most/prelude'\n\nvar map = base.map\nvar identity = base.id\n\n/**\n * Call disposable.dispose. If it returns a promise, catch promise\n * error and forward it through the provided sink.\n * @param {number} t time\n * @param {{dispose: function}} disposable\n * @param {{error: function}} sink\n * @return {*} result of disposable.dispose\n */\nexport function tryDispose (t, disposable, sink) {\n var result = disposeSafely(disposable)\n return isPromise(result)\n ? result.catch(function (e) {\n sink.error(t, e)\n })\n : result\n}\n\n/**\n * Create a new Disposable which will dispose its underlying resource\n * at most once.\n * @param {function} dispose function\n * @param {*?} data any data to be passed to disposer function\n * @return {Disposable}\n */\nexport function create (dispose, data) {\n return once(new Disposable(dispose, data))\n}\n\n/**\n * Create a noop disposable. Can be used to satisfy a Disposable\n * requirement when no actual resource needs to be disposed.\n * @return {Disposable|exports|module.exports}\n */\nexport function empty () {\n return new Disposable(identity, void 0)\n}\n\n/**\n * Create a disposable that will dispose all input disposables in parallel.\n * @param {Array} disposables\n * @return {Disposable}\n */\nexport function all (disposables) {\n return create(disposeAll, disposables)\n}\n\nfunction disposeAll (disposables) {\n return Promise.all(map(disposeSafely, disposables))\n}\n\nfunction disposeSafely (disposable) {\n try {\n return disposable.dispose()\n } catch (e) {\n return Promise.reject(e)\n }\n}\n\n/**\n * Create a disposable from a promise for another disposable\n * @param {Promise} disposablePromise\n * @return {Disposable}\n */\nexport function promised (disposablePromise) {\n return create(disposePromise, disposablePromise)\n}\n\nfunction disposePromise (disposablePromise) {\n return disposablePromise.then(disposeOne)\n}\n\nfunction disposeOne (disposable) {\n return disposable.dispose()\n}\n\n/**\n * Create a disposable proxy that allows its underlying disposable to\n * be set later.\n * @return {SettableDisposable}\n */\nexport function settable () {\n return new SettableDisposable()\n}\n\n/**\n * Wrap an existing disposable (which may not already have been once()d)\n * so that it will only dispose its underlying resource at most once.\n * @param {{ dispose: function() }} disposable\n * @return {Disposable} wrapped disposable\n */\nexport function once (disposable) {\n return new Disposable(disposeMemoized, memoized(disposable))\n}\n\nfunction disposeMemoized (memoized) {\n if (!memoized.disposed) {\n memoized.disposed = true\n memoized.value = disposeSafely(memoized.disposable)\n memoized.disposable = void 0\n }\n\n return memoized.value\n}\n\nfunction memoized (disposable) {\n return { disposed: false, disposable: disposable, value: void 0 }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function fatalError (e) {\n setTimeout(function () {\n throw e\n }, 0)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport fatal from '../fatalError'\n\nexport default function PropagateTask (run, value, sink) {\n this._run = run\n this.value = value\n this.sink = sink\n this.active = true\n}\n\nPropagateTask.event = function (value, sink) {\n return new PropagateTask(emit, value, sink)\n}\n\nPropagateTask.end = function (value, sink) {\n return new PropagateTask(end, value, sink)\n}\n\nPropagateTask.error = function (value, sink) {\n return new PropagateTask(error, value, sink)\n}\n\nPropagateTask.prototype.dispose = function () {\n this.active = false\n}\n\nPropagateTask.prototype.run = function (t) {\n if (!this.active) {\n return\n }\n this._run(t, this.value, this.sink)\n}\n\nPropagateTask.prototype.error = function (t, e) {\n if (!this.active) {\n return fatal(e)\n }\n this.sink.error(t, e)\n}\n\nfunction error (t, e, sink) {\n sink.error(t, e)\n}\n\nfunction emit (t, x, sink) {\n sink.event(t, x)\n}\n\nfunction end (t, x, sink) {\n sink.end(t, x)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * Stream containing only x\n * @param {*} x\n * @returns {Stream}\n */\nexport function of (x) {\n return new Stream(new Just(x))\n}\n\nfunction Just (x) {\n this.value = x\n}\n\nJust.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runJust, this.value, sink))\n}\n\nfunction runJust (t, x, sink) {\n sink.event(t, x)\n sink.end(t, void 0)\n}\n\n/**\n * Stream containing no events and ends immediately\n * @returns {Stream}\n */\nexport function empty () {\n return EMPTY\n}\n\nfunction EmptySource () {}\n\nEmptySource.prototype.run = function (sink, scheduler) {\n var task = PropagateTask.end(void 0, sink)\n scheduler.asap(task)\n\n return dispose.create(disposeEmpty, task)\n}\n\nfunction disposeEmpty (task) {\n return task.dispose()\n}\n\nvar EMPTY = new Stream(new EmptySource())\n\n/**\n * Stream containing no events and never ends\n * @returns {Stream}\n */\nexport function never () {\n return NEVER\n}\n\nfunction NeverSource () {}\n\nNeverSource.prototype.run = function () {\n return dispose.empty()\n}\n\nvar NEVER = new Stream(new NeverSource())\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport PropagateTask from '../scheduler/PropagateTask'\n\nexport function fromArray (a) {\n return new Stream(new ArraySource(a))\n}\n\nfunction ArraySource (a) {\n this.array = a\n}\n\nArraySource.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runProducer, this.array, sink))\n}\n\nfunction runProducer (t, array, sink) {\n for (var i = 0, l = array.length; i < l && this.active; ++i) {\n sink.event(t, array[i])\n }\n\n this.active && sink.end(t)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global Set, Symbol*/\nvar iteratorSymbol\n// Firefox ships a partial implementation using the name @@iterator.\n// https://bugzilla.mozilla.org/show_bug.cgi?id=907077#c14\nif (typeof Set === 'function' && typeof new Set()['@@iterator'] === 'function') {\n iteratorSymbol = '@@iterator'\n} else {\n iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator ||\n '_es6shim_iterator_'\n}\n\nexport function isIterable (o) {\n return typeof o[iteratorSymbol] === 'function'\n}\n\nexport function getIterator (o) {\n return o[iteratorSymbol]()\n}\n\nexport function makeIterable (f, o) {\n o[iteratorSymbol] = f\n return o\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport { getIterator } from '../iterable'\nimport PropagateTask from '../scheduler/PropagateTask'\n\nexport function fromIterable (iterable) {\n return new Stream(new IterableSource(iterable))\n}\n\nfunction IterableSource (iterable) {\n this.iterable = iterable\n}\n\nIterableSource.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runProducer, getIterator(this.iterable), sink))\n}\n\nfunction runProducer (t, iterator, sink) {\n var r = iterator.next()\n\n while (!r.done && this.active) {\n sink.event(t, r.value)\n r = iterator.next()\n }\n\n sink.end(t, r.value)\n}\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","/* global window */\nimport ponyfill from './ponyfill';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport symbolObservable from 'symbol-observable'\n\nexport default function getObservable (o) { // eslint-disable-line complexity\n var obs = null\n if (o) {\n // Access foreign method only once\n var method = o[symbolObservable]\n if (typeof method === 'function') {\n obs = method.call(o)\n if (!(obs && typeof obs.subscribe === 'function')) {\n throw new TypeError('invalid observable ' + obs)\n }\n }\n }\n\n return obs\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function tryEvent (t, x, sink) {\n try {\n sink.event(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nexport function tryEnd (t, x, sink) {\n try {\n sink.end(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\nimport { tryEnd, tryEvent } from '../source/tryEvent'\n\nexport function fromObservable (observable) {\n return new Stream(new ObservableSource(observable))\n}\n\nexport function ObservableSource (observable) {\n this.observable = observable\n}\n\nObservableSource.prototype.run = function (sink, scheduler) {\n var sub = this.observable.subscribe(new SubscriberSink(sink, scheduler))\n if (typeof sub === 'function') {\n return dispose.create(sub)\n } else if (sub && typeof sub.unsubscribe === 'function') {\n return dispose.create(unsubscribe, sub)\n }\n\n throw new TypeError('Observable returned invalid subscription ' + String(sub))\n}\n\nexport function SubscriberSink (sink, scheduler) {\n this.sink = sink\n this.scheduler = scheduler\n}\n\nSubscriberSink.prototype.next = function (x) {\n tryEvent(this.scheduler.now(), x, this.sink)\n}\n\nSubscriberSink.prototype.complete = function (x) {\n tryEnd(this.scheduler.now(), x, this.sink)\n}\n\nSubscriberSink.prototype.error = function (e) {\n this.sink.error(this.scheduler.now(), e)\n}\n\nfunction unsubscribe (subscription) {\n return subscription.unsubscribe()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport { fromArray } from './fromArray'\nimport { isIterable } from '../iterable'\nimport { fromIterable } from './fromIterable'\nimport getObservable from '../observable/getObservable'\nimport { fromObservable } from '../observable/fromObservable'\nimport { isArrayLike } from '@most/prelude'\n\nexport function from (a) { // eslint-disable-line complexity\n if (a instanceof Stream) {\n return a\n }\n\n var observable = getObservable(a)\n if (observable != null) {\n return fromObservable(observable)\n }\n\n if (Array.isArray(a) || isArrayLike(a)) {\n return fromArray(a)\n }\n\n if (isIterable(a)) {\n return fromIterable(a)\n }\n\n throw new TypeError('from(x) must be observable, iterable, or array-like: ' + a)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * Create a stream that emits the current time periodically\n * @param {Number} period periodicity of events in millis\n * @param {*} deprecatedValue @deprecated value to emit each period\n * @returns {Stream} new stream that emits the current time every period\n */\nexport function periodic (period, deprecatedValue) {\n return new Stream(new Periodic(period, deprecatedValue))\n}\n\nfunction Periodic (period, value) {\n this.period = period\n this.value = value\n}\n\nPeriodic.prototype.run = function (sink, scheduler) {\n return scheduler.periodic(this.period, PropagateTask.event(this.value, sink))\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function ScheduledTask (delay, period, task, scheduler) {\n this.time = delay\n this.period = period\n this.task = task\n this.scheduler = scheduler\n this.active = true\n}\n\nScheduledTask.prototype.run = function () {\n return this.task.run(this.time)\n}\n\nScheduledTask.prototype.error = function (e) {\n return this.task.error(this.time, e)\n}\n\nScheduledTask.prototype.dispose = function () {\n this.scheduler.cancel(this)\n return this.task.dispose()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function defer (task) {\n return Promise.resolve(task).then(runTask)\n}\n\nexport function runTask (task) {\n try {\n return task.run()\n } catch (e) {\n return task.error(e)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport ScheduledTask from './ScheduledTask'\nimport { runTask } from '../task'\n\nexport default function Scheduler (timer, timeline) {\n this.timer = timer\n this.timeline = timeline\n\n this._timer = null\n this._nextArrival = Infinity\n\n var self = this\n this._runReadyTasksBound = function () {\n self._runReadyTasks(self.now())\n }\n}\n\nScheduler.prototype.now = function () {\n return this.timer.now()\n}\n\nScheduler.prototype.asap = function (task) {\n return this.schedule(0, -1, task)\n}\n\nScheduler.prototype.delay = function (delay, task) {\n return this.schedule(delay, -1, task)\n}\n\nScheduler.prototype.periodic = function (period, task) {\n return this.schedule(0, period, task)\n}\n\nScheduler.prototype.schedule = function (delay, period, task) {\n var now = this.now()\n var st = new ScheduledTask(now + Math.max(0, delay), period, task, this)\n\n this.timeline.add(st)\n this._scheduleNextRun(now)\n return st\n}\n\nScheduler.prototype.cancel = function (task) {\n task.active = false\n if (this.timeline.remove(task)) {\n this._reschedule()\n }\n}\n\nScheduler.prototype.cancelAll = function (f) {\n this.timeline.removeAll(f)\n this._reschedule()\n}\n\nScheduler.prototype._reschedule = function () {\n if (this.timeline.isEmpty()) {\n this._unschedule()\n } else {\n this._scheduleNextRun(this.now())\n }\n}\n\nScheduler.prototype._unschedule = function () {\n this.timer.clearTimer(this._timer)\n this._timer = null\n}\n\nScheduler.prototype._scheduleNextRun = function (now) { // eslint-disable-line complexity\n if (this.timeline.isEmpty()) {\n return\n }\n\n var nextArrival = this.timeline.nextArrival()\n\n if (this._timer === null) {\n this._scheduleNextArrival(nextArrival, now)\n } else if (nextArrival < this._nextArrival) {\n this._unschedule()\n this._scheduleNextArrival(nextArrival, now)\n }\n}\n\nScheduler.prototype._scheduleNextArrival = function (nextArrival, now) {\n this._nextArrival = nextArrival\n var delay = Math.max(0, nextArrival - now)\n this._timer = this.timer.setTimer(this._runReadyTasksBound, delay)\n}\n\nScheduler.prototype._runReadyTasks = function (now) {\n this._timer = null\n this.timeline.runTasks(now, runTask)\n this._scheduleNextRun(this.now())\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { defer } from '../task'\n\n/*global setTimeout, clearTimeout*/\n\nexport default function ClockTimer () {}\n\nClockTimer.prototype.now = Date.now\n\nClockTimer.prototype.setTimer = function (f, dt) {\n return dt <= 0 ? runAsap(f) : setTimeout(f, dt)\n}\n\nClockTimer.prototype.clearTimer = function (t) {\n return t instanceof Asap ? t.cancel() : clearTimeout(t)\n}\n\nfunction Asap (f) {\n this.f = f\n this.active = true\n}\n\nAsap.prototype.run = function () {\n return this.active && this.f()\n}\n\nAsap.prototype.error = function (e) {\n throw e\n}\n\nAsap.prototype.cancel = function () {\n this.active = false\n}\n\nfunction runAsap (f) {\n var task = new Asap(f)\n defer(task)\n return task\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport * as base from '@most/prelude'\n\nexport default function Timeline () {\n this.tasks = []\n}\n\nTimeline.prototype.nextArrival = function () {\n return this.isEmpty() ? Infinity : this.tasks[0].time\n}\n\nTimeline.prototype.isEmpty = function () {\n return this.tasks.length === 0\n}\n\nTimeline.prototype.add = function (st) {\n insertByTime(st, this.tasks)\n}\n\nTimeline.prototype.remove = function (st) {\n var i = binarySearch(st.time, this.tasks)\n\n if (i >= 0 && i < this.tasks.length) {\n var at = base.findIndex(st, this.tasks[i].events)\n if (at >= 0) {\n this.tasks[i].events.splice(at, 1)\n return true\n }\n }\n\n return false\n}\n\nTimeline.prototype.removeAll = function (f) {\n for (var i = 0, l = this.tasks.length; i < l; ++i) {\n removeAllFrom(f, this.tasks[i])\n }\n}\n\nTimeline.prototype.runTasks = function (t, runTask) {\n var tasks = this.tasks\n var l = tasks.length\n var i = 0\n\n while (i < l && tasks[i].time <= t) {\n ++i\n }\n\n this.tasks = tasks.slice(i)\n\n // Run all ready tasks\n for (var j = 0; j < i; ++j) {\n this.tasks = runTasks(runTask, tasks[j], this.tasks)\n }\n}\n\nfunction runTasks (runTask, timeslot, tasks) { // eslint-disable-line complexity\n var events = timeslot.events\n for (var i = 0; i < events.length; ++i) {\n var task = events[i]\n\n if (task.active) {\n runTask(task)\n\n // Reschedule periodic repeating tasks\n // Check active again, since a task may have canceled itself\n if (task.period >= 0 && task.active) {\n task.time = task.time + task.period\n insertByTime(task, tasks)\n }\n }\n }\n\n return tasks\n}\n\nfunction insertByTime (task, timeslots) { // eslint-disable-line complexity\n var l = timeslots.length\n\n if (l === 0) {\n timeslots.push(newTimeslot(task.time, [task]))\n return\n }\n\n var i = binarySearch(task.time, timeslots)\n\n if (i >= l) {\n timeslots.push(newTimeslot(task.time, [task]))\n } else if (task.time === timeslots[i].time) {\n timeslots[i].events.push(task)\n } else {\n timeslots.splice(i, 0, newTimeslot(task.time, [task]))\n }\n}\n\nfunction removeAllFrom (f, timeslot) {\n timeslot.events = base.removeAll(f, timeslot.events)\n}\n\nfunction binarySearch (t, sortedArray) { // eslint-disable-line complexity\n var lo = 0\n var hi = sortedArray.length\n var mid, y\n\n while (lo < hi) {\n mid = Math.floor((lo + hi) / 2)\n y = sortedArray[mid]\n\n if (t === y.time) {\n return mid\n } else if (t < y.time) {\n hi = mid\n } else {\n lo = mid + 1\n }\n }\n return hi\n}\n\nfunction newTimeslot (t, events) {\n return { time: t, events: events }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Scheduler from './Scheduler'\nimport ClockTimer from './ClockTimer'\nimport Timeline from './Timeline'\n\nvar defaultScheduler = new Scheduler(new ClockTimer(), new Timeline())\n\nexport default defaultScheduler\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport defaultScheduler from '../scheduler/defaultScheduler'\nimport * as dispose from '../disposable/dispose'\nimport fatalError from '../fatalError'\n\nexport function subscribe (subscriber, stream) {\n if (Object(subscriber) !== subscriber) {\n throw new TypeError('subscriber must be an object')\n }\n\n var disposable = dispose.settable()\n var observer = new SubscribeObserver(fatalError, subscriber, disposable)\n\n disposable.setDisposable(stream.source.run(observer, defaultScheduler))\n\n return new Subscription(disposable)\n}\n\nexport function SubscribeObserver (fatalError, subscriber, disposable) {\n this.fatalError = fatalError\n this.subscriber = subscriber\n this.disposable = disposable\n}\n\nSubscribeObserver.prototype.event = function (t, x) {\n if (!this.disposable.disposed && typeof this.subscriber.next === 'function') {\n this.subscriber.next(x)\n }\n}\n\nSubscribeObserver.prototype.end = function (t, x) {\n if (!this.disposable.disposed) {\n var s = this.subscriber\n doDispose(this.fatalError, s, s.complete, s.error, this.disposable, x)\n }\n}\n\nSubscribeObserver.prototype.error = function (t, e) {\n var s = this.subscriber\n doDispose(this.fatalError, s, s.error, s.error, this.disposable, e)\n}\n\nexport function Subscription (disposable) {\n this.disposable = disposable\n}\n\nSubscription.prototype.unsubscribe = function () {\n this.disposable.dispose()\n}\n\nfunction doDispose (fatal, subscriber, complete, error, disposable, x) {\n Promise.resolve(disposable.dispose()).then(function () {\n if (typeof complete === 'function') {\n complete.call(subscriber, x)\n }\n }).catch(function (e) {\n if (typeof error === 'function') {\n error.call(subscriber, e)\n }\n }).catch(fatal)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function thru (f, stream) {\n return f(stream)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport * as dispose from '../disposable/dispose'\nimport * as tryEvent from './tryEvent'\n\nexport default function EventTargetSource (event, source, capture) {\n this.event = event\n this.source = source\n this.capture = capture\n}\n\nEventTargetSource.prototype.run = function (sink, scheduler) {\n function addEvent (e) {\n tryEvent.tryEvent(scheduler.now(), e, sink)\n }\n\n this.source.addEventListener(this.event, addEvent, this.capture)\n\n return dispose.create(disposeEventTarget,\n { target: this, addEvent: addEvent })\n}\n\nfunction disposeEventTarget (info) {\n var target = info.target\n target.source.removeEventListener(target.event, info.addEvent, target.capture)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { defer } from '../task'\n\nexport default function DeferredSink (sink) {\n this.sink = sink\n this.events = []\n this.active = true\n}\n\nDeferredSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n\n if (this.events.length === 0) {\n defer(new PropagateAllTask(this.sink, t, this.events))\n }\n\n this.events.push({ time: t, value: x })\n}\n\nDeferredSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n\n this._end(new EndTask(t, x, this.sink))\n}\n\nDeferredSink.prototype.error = function (t, e) {\n this._end(new ErrorTask(t, e, this.sink))\n}\n\nDeferredSink.prototype._end = function (task) {\n this.active = false\n defer(task)\n}\n\nfunction PropagateAllTask (sink, time, events) {\n this.sink = sink\n this.events = events\n this.time = time\n}\n\nPropagateAllTask.prototype.run = function () {\n var events = this.events\n var sink = this.sink\n var event\n\n for (var i = 0, l = events.length; i < l; ++i) {\n event = events[i]\n this.time = event.time\n sink.event(event.time, event.value)\n }\n\n events.length = 0\n}\n\nPropagateAllTask.prototype.error = function (e) {\n this.sink.error(this.time, e)\n}\n\nfunction EndTask (t, x, sink) {\n this.time = t\n this.value = x\n this.sink = sink\n}\n\nEndTask.prototype.run = function () {\n this.sink.end(this.time, this.value)\n}\n\nEndTask.prototype.error = function (e) {\n this.sink.error(this.time, e)\n}\n\nfunction ErrorTask (t, e, sink) {\n this.time = t\n this.value = e\n this.sink = sink\n}\n\nErrorTask.prototype.run = function () {\n this.sink.error(this.time, this.value)\n}\n\nErrorTask.prototype.error = function (e) {\n throw e\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport DeferredSink from '../sink/DeferredSink'\nimport * as dispose from '../disposable/dispose'\nimport * as tryEvent from './tryEvent'\n\nexport default function EventEmitterSource (event, source) {\n this.event = event\n this.source = source\n}\n\nEventEmitterSource.prototype.run = function (sink, scheduler) {\n // NOTE: Because EventEmitter allows events in the same call stack as\n // a listener is added, use a DeferredSink to buffer events\n // until the stack clears, then propagate. This maintains most.js's\n // invariant that no event will be delivered in the same call stack\n // as an observer begins observing.\n var dsink = new DeferredSink(sink)\n\n function addEventVariadic (a) {\n var l = arguments.length\n if (l > 1) {\n var arr = new Array(l)\n for (var i = 0; i < l; ++i) {\n arr[i] = arguments[i]\n }\n tryEvent.tryEvent(scheduler.now(), arr, dsink)\n } else {\n tryEvent.tryEvent(scheduler.now(), a, dsink)\n }\n }\n\n this.source.addListener(this.event, addEventVariadic)\n\n return dispose.create(disposeEventEmitter, { target: this, addEvent: addEventVariadic })\n}\n\nfunction disposeEventEmitter (info) {\n var target = info.target\n target.source.removeListener(target.event, info.addEvent)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport EventTargetSource from './EventTargetSource'\nimport EventEmitterSource from './EventEmitterSource'\n\n/**\n * Create a stream from an EventTarget, such as a DOM Node, or EventEmitter.\n * @param {String} event event type name, e.g. 'click'\n * @param {EventTarget|EventEmitter} source EventTarget or EventEmitter\n * @param {*?} capture for DOM events, whether to use\n * capturing--passed as 3rd parameter to addEventListener.\n * @returns {Stream} stream containing all events of the specified type\n * from the source.\n */\nexport function fromEvent (event, source, capture) { // eslint-disable-line complexity\n var s\n\n if (typeof source.addEventListener === 'function' && typeof source.removeEventListener === 'function') {\n if (arguments.length < 3) {\n capture = false\n }\n\n s = new EventTargetSource(event, source, capture)\n } else if (typeof source.addListener === 'function' && typeof source.removeListener === 'function') {\n s = new EventEmitterSource(event, source)\n } else {\n throw new Error('source must support addEventListener/removeEventListener or addListener/removeListener')\n }\n\n return new Stream(s)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport * as dispose from './disposable/dispose'\nimport defaultScheduler from './scheduler/defaultScheduler'\n\nexport function withDefaultScheduler (source) {\n return withScheduler(source, defaultScheduler)\n}\n\nexport function withScheduler (source, scheduler) {\n return new Promise(function (resolve, reject) {\n runSource(source, scheduler, resolve, reject)\n })\n}\n\nfunction runSource (source, scheduler, resolve, reject) {\n var disposable = dispose.settable()\n var observer = new Drain(resolve, reject, disposable)\n\n disposable.setDisposable(source.run(observer, scheduler))\n}\n\nfunction Drain (end, error, disposable) {\n this._end = end\n this._error = error\n this._disposable = disposable\n this.active = true\n}\n\nDrain.prototype.event = function (t, x) {}\n\nDrain.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n this.active = false\n disposeThen(this._end, this._error, this._disposable, x)\n}\n\nDrain.prototype.error = function (t, e) {\n this.active = false\n disposeThen(this._error, this._error, this._disposable, e)\n}\n\nfunction disposeThen (end, error, disposable, x) {\n Promise.resolve(disposable.dispose()).then(function () {\n end(x)\n }, error)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * A sink mixin that simply forwards event, end, and error to\n * another sink.\n * @param sink\n * @constructor\n */\nexport default function Pipe (sink) {\n this.sink = sink\n}\n\nPipe.prototype.event = function (t, x) {\n return this.sink.event(t, x)\n}\n\nPipe.prototype.end = function (t, x) {\n return this.sink.end(t, x)\n}\n\nPipe.prototype.error = function (t, e) {\n return this.sink.error(t, e)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Pipe from '../sink/Pipe'\n\nexport default function Filter (p, source) {\n this.p = p\n this.source = source\n}\n\n/**\n * Create a filtered source, fusing adjacent filter.filter if possible\n * @param {function(x:*):boolean} p filtering predicate\n * @param {{run:function}} source source to filter\n * @returns {Filter} filtered source\n */\nFilter.create = function createFilter (p, source) {\n if (source instanceof Filter) {\n return new Filter(and(source.p, p), source.source)\n }\n\n return new Filter(p, source)\n}\n\nFilter.prototype.run = function (sink, scheduler) {\n return this.source.run(new FilterSink(this.p, sink), scheduler)\n}\n\nfunction FilterSink (p, sink) {\n this.p = p\n this.sink = sink\n}\n\nFilterSink.prototype.end = Pipe.prototype.end\nFilterSink.prototype.error = Pipe.prototype.error\n\nFilterSink.prototype.event = function (t, x) {\n var p = this.p\n p(x) && this.sink.event(t, x)\n}\n\nfunction and (p, q) {\n return function (x) {\n return p(x) && q(x)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Pipe from '../sink/Pipe'\n\nexport default function FilterMap (p, f, source) {\n this.p = p\n this.f = f\n this.source = source\n}\n\nFilterMap.prototype.run = function (sink, scheduler) {\n return this.source.run(new FilterMapSink(this.p, this.f, sink), scheduler)\n}\n\nfunction FilterMapSink (p, f, sink) {\n this.p = p\n this.f = f\n this.sink = sink\n}\n\nFilterMapSink.prototype.event = function (t, x) {\n var f = this.f\n var p = this.p\n p(x) && this.sink.event(t, f(x))\n}\n\nFilterMapSink.prototype.end = Pipe.prototype.end\nFilterMapSink.prototype.error = Pipe.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Pipe from '../sink/Pipe'\nimport Filter from './Filter'\nimport FilterMap from './FilterMap'\nimport * as base from '@most/prelude'\n\nexport default function Map (f, source) {\n this.f = f\n this.source = source\n}\n\n/**\n * Create a mapped source, fusing adjacent map.map, filter.map,\n * and filter.map.map if possible\n * @param {function(*):*} f mapping function\n * @param {{run:function}} source source to map\n * @returns {Map|FilterMap} mapped source, possibly fused\n */\nMap.create = function createMap (f, source) {\n if (source instanceof Map) {\n return new Map(base.compose(f, source.f), source.source)\n }\n\n if (source instanceof Filter) {\n return new FilterMap(source.p, f, source.source)\n }\n\n return new Map(f, source)\n}\n\nMap.prototype.run = function (sink, scheduler) { // eslint-disable-line no-extend-native\n return this.source.run(new MapSink(this.f, sink), scheduler)\n}\n\nfunction MapSink (f, sink) {\n this.f = f\n this.sink = sink\n}\n\nMapSink.prototype.end = Pipe.prototype.end\nMapSink.prototype.error = Pipe.prototype.error\n\nMapSink.prototype.event = function (t, x) {\n var f = this.f\n this.sink.event(t, f(x))\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Map from '../fusion/Map'\nimport Pipe from '../sink/Pipe'\n\n/**\n * Transform each value in the stream by applying f to each\n * @param {function(*):*} f mapping function\n * @param {Stream} stream stream to map\n * @returns {Stream} stream containing items transformed by f\n */\nexport function map (f, stream) {\n return new Stream(Map.create(f, stream.source))\n}\n\n/**\n* Replace each value in the stream with x\n* @param {*} x\n* @param {Stream} stream\n* @returns {Stream} stream containing items replaced with x\n*/\nexport function constant (x, stream) {\n return map(function () {\n return x\n }, stream)\n}\n\n/**\n* Perform a side effect for each item in the stream\n* @param {function(x:*):*} f side effect to execute for each item. The\n* return value will be discarded.\n* @param {Stream} stream stream to tap\n* @returns {Stream} new stream containing the same items as this stream\n*/\nexport function tap (f, stream) {\n return new Stream(new Tap(f, stream.source))\n}\n\nfunction Tap (f, source) {\n this.source = source\n this.f = f\n}\n\nTap.prototype.run = function (sink, scheduler) {\n return this.source.run(new TapSink(this.f, sink), scheduler)\n}\n\nfunction TapSink (f, sink) {\n this.sink = sink\n this.f = f\n}\n\nTapSink.prototype.end = Pipe.prototype.end\nTapSink.prototype.error = Pipe.prototype.error\n\nTapSink.prototype.event = function (t, x) {\n var f = this.f\n f(x)\n this.sink.event(t, x)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { withDefaultScheduler as run } from '../runSource'\nimport { tap } from './transform'\n\n/**\n * Observe all the event values in the stream in time order. The\n * provided function `f` will be called for each event value\n * @param {function(x:T):*} f function to call with each event value\n * @param {Stream} stream stream to observe\n * @return {Promise} promise that fulfills after the stream ends without\n * an error, or rejects if the stream ends with an error.\n */\nexport function observe (f, stream) {\n return drain(tap(f, stream))\n}\n\n/**\n * \"Run\" a stream by creating demand and consuming all events\n * @param {Stream} stream stream to drain\n * @return {Promise} promise that fulfills after the stream ends without\n * an error, or rejects if the stream ends with an error.\n */\nexport function drain (stream) {\n return run(stream.source)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\n\n/**\n * Generalized feedback loop. Call a stepper function for each event. The stepper\n * will be called with 2 params: the current seed and the an event value. It must\n * return a new { seed, value } pair. The `seed` will be fed back into the next\n * invocation of stepper, and the `value` will be propagated as the event value.\n * @param {function(seed:*, value:*):{seed:*, value:*}} stepper loop step function\n * @param {*} seed initial seed value passed to first stepper call\n * @param {Stream} stream event stream\n * @returns {Stream} new stream whose values are the `value` field of the objects\n * returned by the stepper\n */\nexport function loop (stepper, seed, stream) {\n return new Stream(new Loop(stepper, seed, stream.source))\n}\n\nfunction Loop (stepper, seed, source) {\n this.step = stepper\n this.seed = seed\n this.source = source\n}\n\nLoop.prototype.run = function (sink, scheduler) {\n return this.source.run(new LoopSink(this.step, this.seed, sink), scheduler)\n}\n\nfunction LoopSink (stepper, seed, sink) {\n this.step = stepper\n this.seed = seed\n this.sink = sink\n}\n\nLoopSink.prototype.error = Pipe.prototype.error\n\nLoopSink.prototype.event = function (t, x) {\n var result = this.step(this.seed, x)\n this.seed = result.seed\n this.sink.event(t, result.value)\n}\n\nLoopSink.prototype.end = function (t) {\n this.sink.end(t, this.seed)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport { withDefaultScheduler as runSource } from '../runSource'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * Create a stream containing successive reduce results of applying f to\n * the previous reduce result and the current stream item.\n * @param {function(result:*, x:*):*} f reducer function\n * @param {*} initial initial value\n * @param {Stream} stream stream to scan\n * @returns {Stream} new stream containing successive reduce results\n */\nexport function scan (f, initial, stream) {\n return new Stream(new Scan(f, initial, stream.source))\n}\n\nfunction Scan (f, z, source) {\n this.source = source\n this.f = f\n this.value = z\n}\n\nScan.prototype.run = function (sink, scheduler) {\n var d1 = scheduler.asap(PropagateTask.event(this.value, sink))\n var d2 = this.source.run(new ScanSink(this.f, this.value, sink), scheduler)\n return dispose.all([d1, d2])\n}\n\nfunction ScanSink (f, z, sink) {\n this.f = f\n this.value = z\n this.sink = sink\n}\n\nScanSink.prototype.event = function (t, x) {\n var f = this.f\n this.value = f(this.value, x)\n this.sink.event(t, this.value)\n}\n\nScanSink.prototype.error = Pipe.prototype.error\nScanSink.prototype.end = Pipe.prototype.end\n\n/**\n* Reduce a stream to produce a single result. Note that reducing an infinite\n* stream will return a Promise that never fulfills, but that may reject if an error\n* occurs.\n* @param {function(result:*, x:*):*} f reducer function\n* @param {*} initial initial value\n* @param {Stream} stream to reduce\n* @returns {Promise} promise for the file result of the reduce\n*/\nexport function reduce (f, initial, stream) {\n return runSource(new Reduce(f, initial, stream.source))\n}\n\nfunction Reduce (f, z, source) {\n this.source = source\n this.f = f\n this.value = z\n}\n\nReduce.prototype.run = function (sink, scheduler) {\n return this.source.run(new ReduceSink(this.f, this.value, sink), scheduler)\n}\n\nfunction ReduceSink (f, z, sink) {\n this.f = f\n this.value = z\n this.sink = sink\n}\n\nReduceSink.prototype.event = function (t, x) {\n var f = this.f\n this.value = f(this.value, x)\n this.sink.event(t, this.value)\n}\n\nReduceSink.prototype.error = Pipe.prototype.error\n\nReduceSink.prototype.end = function (t) {\n this.sink.end(t, this.value)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\n\n/**\n * Compute a stream by unfolding tuples of future values from a seed value\n * Event times may be controlled by returning a Promise from f\n * @param {function(seed:*):{value:*, seed:*, done:boolean}|Promise<{value:*, seed:*, done:boolean}>} f unfolding function accepts\n * a seed and returns a new tuple with a value, new seed, and boolean done flag.\n * If tuple.done is true, the stream will end.\n * @param {*} seed seed value\n * @returns {Stream} stream containing all value of all tuples produced by the\n * unfolding function.\n */\nexport function unfold (f, seed) {\n return new Stream(new UnfoldSource(f, seed))\n}\n\nfunction UnfoldSource (f, seed) {\n this.f = f\n this.value = seed\n}\n\nUnfoldSource.prototype.run = function (sink, scheduler) {\n return new Unfold(this.f, this.value, sink, scheduler)\n}\n\nfunction Unfold (f, x, sink, scheduler) {\n this.f = f\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n\n var self = this\n function err (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n\n function start (unfold) {\n return stepUnfold(unfold, x)\n }\n\n Promise.resolve(this).then(start).catch(err)\n}\n\nUnfold.prototype.dispose = function () {\n this.active = false\n}\n\nfunction stepUnfold (unfold, x) {\n var f = unfold.f\n return Promise.resolve(f(x)).then(function (tuple) {\n return continueUnfold(unfold, tuple)\n })\n}\n\nfunction continueUnfold (unfold, tuple) {\n if (tuple.done) {\n unfold.sink.end(unfold.scheduler.now(), tuple.value)\n return tuple.value\n }\n\n unfold.sink.event(unfold.scheduler.now(), tuple.value)\n\n if (!unfold.active) {\n return tuple.value\n }\n return stepUnfold(unfold, tuple.seed)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\n\n/**\n * Compute a stream by iteratively calling f to produce values\n * Event times may be controlled by returning a Promise from f\n * @param {function(x:*):*|Promise<*>} f\n * @param {*} x initial value\n * @returns {Stream}\n */\nexport function iterate (f, x) {\n return new Stream(new IterateSource(f, x))\n}\n\nfunction IterateSource (f, x) {\n this.f = f\n this.value = x\n}\n\nIterateSource.prototype.run = function (sink, scheduler) {\n return new Iterate(this.f, this.value, sink, scheduler)\n}\n\nfunction Iterate (f, initial, sink, scheduler) {\n this.f = f\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n\n var x = initial\n\n var self = this\n function err (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n\n function start (iterate) {\n return stepIterate(iterate, x)\n }\n\n Promise.resolve(this).then(start).catch(err)\n}\n\nIterate.prototype.dispose = function () {\n this.active = false\n}\n\nfunction stepIterate (iterate, x) {\n iterate.sink.event(iterate.scheduler.now(), x)\n\n if (!iterate.active) {\n return x\n }\n\n var f = iterate.f\n return Promise.resolve(f(x)).then(function (y) {\n return continueIterate(iterate, y)\n })\n}\n\nfunction continueIterate (iterate, x) {\n return !iterate.active ? iterate.value : stepIterate(iterate, x)\n}\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as base from '@most/prelude'\n\n/**\n * Compute a stream using an *async* generator, which yields promises\n * to control event times.\n * @param f\n * @returns {Stream}\n */\nexport function generate (f /*, ...args */) {\n return new Stream(new GenerateSource(f, base.tail(arguments)))\n}\n\nfunction GenerateSource (f, args) {\n this.f = f\n this.args = args\n}\n\nGenerateSource.prototype.run = function (sink, scheduler) {\n return new Generate(this.f.apply(void 0, this.args), sink, scheduler)\n}\n\nfunction Generate (iterator, sink, scheduler) {\n this.iterator = iterator\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n\n var self = this\n function err (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n\n Promise.resolve(this).then(next).catch(err)\n}\n\nfunction next (generate, x) {\n return generate.active ? handle(generate, generate.iterator.next(x)) : x\n}\n\nfunction handle (generate, result) {\n if (result.done) {\n return generate.sink.end(generate.scheduler.now(), result.value)\n }\n\n return Promise.resolve(result.value).then(function (x) {\n return emit(generate, x)\n }, function (e) {\n return error(generate, e)\n })\n}\n\nfunction emit (generate, x) {\n generate.sink.event(generate.scheduler.now(), x)\n return next(generate, x)\n}\n\nfunction error (generate, e) {\n return handle(generate, generate.iterator.throw(e))\n}\n\nGenerate.prototype.dispose = function () {\n this.active = false\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\n\nexport function continueWith (f, stream) {\n return new Stream(new ContinueWith(f, stream.source))\n}\n\nfunction ContinueWith (f, source) {\n this.f = f\n this.source = source\n}\n\nContinueWith.prototype.run = function (sink, scheduler) {\n return new ContinueWithSink(this.f, this.source, sink, scheduler)\n}\n\nfunction ContinueWithSink (f, source, sink, scheduler) {\n this.f = f\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n this.disposable = dispose.once(source.run(this, scheduler))\n}\n\nContinueWithSink.prototype.error = Pipe.prototype.error\n\nContinueWithSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n this.sink.event(t, x)\n}\n\nContinueWithSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n\n dispose.tryDispose(t, this.disposable, this.sink)\n this._startNext(t, x, this.sink)\n}\n\nContinueWithSink.prototype._startNext = function (t, x, sink) {\n try {\n this.disposable = this._continue(this.f, x, sink)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nContinueWithSink.prototype._continue = function (f, x, sink) {\n return f(x).source.run(sink, this.scheduler)\n}\n\nContinueWithSink.prototype.dispose = function () {\n this.active = false\n return this.disposable.dispose()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { of as streamOf } from '../source/core'\nimport { continueWith } from './continueWith'\n\n/**\n * @param {*} x value to prepend\n * @param {Stream} stream\n * @returns {Stream} new stream with x prepended\n */\nexport function cons (x, stream) {\n return concat(streamOf(x), stream)\n}\n\n/**\n* @param {Stream} left\n* @param {Stream} right\n* @returns {Stream} new stream containing all events in left followed by all\n* events in right. This *timeshifts* right to the end of left.\n*/\nexport function concat (left, right) {\n return continueWith(function () {\n return right\n }, left)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Sink from './Pipe'\n\nexport default function IndexSink (i, sink) {\n this.sink = sink\n this.index = i\n this.active = true\n this.value = void 0\n}\n\nIndexSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n this.value = x\n this.sink.event(t, this)\n}\n\nIndexSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n this.active = false\n this.sink.end(t, { index: this.index, value: x })\n}\n\nIndexSink.prototype.error = Sink.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function invoke (f, args) {\n\t/*eslint complexity: [2,7]*/\n switch (args.length) {\n case 0: return f()\n case 1: return f(args[0])\n case 2: return f(args[0], args[1])\n case 3: return f(args[0], args[1], args[2])\n case 4: return f(args[0], args[1], args[2], args[3])\n case 5: return f(args[0], args[1], args[2], args[3], args[4])\n default:\n return f.apply(void 0, args)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as transform from './transform'\nimport * as core from '../source/core'\nimport Pipe from '../sink/Pipe'\nimport IndexSink from '../sink/IndexSink'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\nimport invoke from '../invoke'\n\nvar map = base.map\nvar tail = base.tail\n\n/**\n * Combine latest events from all input streams\n * @param {function(...events):*} f function to combine most recent events\n * @returns {Stream} stream containing the result of applying f to the most recent\n * event of each input stream, whenever a new event arrives on any stream.\n */\nexport function combine (f /*, ...streams */) {\n return combineArray(f, tail(arguments))\n}\n\n/**\n* Combine latest events from all input streams\n* @param {function(...events):*} f function to combine most recent events\n* @param {[Stream]} streams most recent events\n* @returns {Stream} stream containing the result of applying f to the most recent\n* event of each input stream, whenever a new event arrives on any stream.\n*/\nexport function combineArray (f, streams) {\n var l = streams.length\n return l === 0 ? core.empty()\n : l === 1 ? transform.map(f, streams[0])\n : new Stream(combineSources(f, streams))\n}\n\nfunction combineSources (f, streams) {\n return new Combine(f, map(getSource, streams))\n}\n\nfunction getSource (stream) {\n return stream.source\n}\n\nfunction Combine (f, sources) {\n this.f = f\n this.sources = sources\n}\n\nCombine.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l)\n var sinks = new Array(l)\n\n var mergeSink = new CombineSink(disposables, sinks, sink, this.f)\n\n for (var indexSink, i = 0; i < l; ++i) {\n indexSink = sinks[i] = new IndexSink(i, mergeSink)\n disposables[i] = this.sources[i].run(indexSink, scheduler)\n }\n\n return dispose.all(disposables)\n}\n\nfunction CombineSink (disposables, sinks, sink, f) {\n this.sink = sink\n this.disposables = disposables\n this.sinks = sinks\n this.f = f\n\n var l = sinks.length\n this.awaiting = l\n this.values = new Array(l)\n this.hasValue = new Array(l)\n for (var i = 0; i < l; ++i) {\n this.hasValue[i] = false\n }\n\n this.activeCount = sinks.length\n}\n\nCombineSink.prototype.error = Pipe.prototype.error\n\nCombineSink.prototype.event = function (t, indexedValue) {\n var i = indexedValue.index\n var awaiting = this._updateReady(i)\n\n this.values[i] = indexedValue.value\n if (awaiting === 0) {\n this.sink.event(t, invoke(this.f, this.values))\n }\n}\n\nCombineSink.prototype._updateReady = function (index) {\n if (this.awaiting > 0) {\n if (!this.hasValue[index]) {\n this.hasValue[index] = true\n this.awaiting -= 1\n }\n }\n return this.awaiting\n}\n\nCombineSink.prototype.end = function (t, indexedValue) {\n dispose.tryDispose(t, this.disposables[indexedValue.index], this.sink)\n if (--this.activeCount === 0) {\n this.sink.end(t, indexedValue.value)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { combine } from './combine'\nimport { apply } from '@most/prelude'\n\n/**\n * Assume fs is a stream containing functions, and apply the latest function\n * in fs to the latest value in xs.\n * fs: --f---------g--------h------>\n * xs: -a-------b-------c-------d-->\n * ap(fs, xs): --fa-----fb-gb---gc--hc--hd->\n * @param {Stream} fs stream of functions to apply to the latest x\n * @param {Stream} xs stream of values to which to apply all the latest f\n * @returns {Stream} stream containing all the applications of fs to xs\n */\nexport function ap (fs, xs) {\n return combine(apply, fs, xs)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\n\n/**\n * Transform a stream by passing its events through a transducer.\n * @param {function} transducer transducer function\n * @param {Stream} stream stream whose events will be passed through the\n * transducer\n * @return {Stream} stream of events transformed by the transducer\n */\nexport function transduce (transducer, stream) {\n return new Stream(new Transduce(transducer, stream.source))\n}\n\nfunction Transduce (transducer, source) {\n this.transducer = transducer\n this.source = source\n}\n\nTransduce.prototype.run = function (sink, scheduler) {\n var xf = this.transducer(new Transformer(sink))\n return this.source.run(new TransduceSink(getTxHandler(xf), sink), scheduler)\n}\n\nfunction TransduceSink (adapter, sink) {\n this.xf = adapter\n this.sink = sink\n}\n\nTransduceSink.prototype.event = function (t, x) {\n var next = this.xf.step(t, x)\n\n return this.xf.isReduced(next)\n ? this.sink.end(t, this.xf.getResult(next))\n : next\n}\n\nTransduceSink.prototype.end = function (t, x) {\n return this.xf.result(x)\n}\n\nTransduceSink.prototype.error = function (t, e) {\n return this.sink.error(t, e)\n}\n\nfunction Transformer (sink) {\n this.time = -Infinity\n this.sink = sink\n}\n\nTransformer.prototype['@@transducer/init'] = Transformer.prototype.init = function () {}\n\nTransformer.prototype['@@transducer/step'] = Transformer.prototype.step = function (t, x) {\n if (!isNaN(t)) {\n this.time = Math.max(t, this.time)\n }\n return this.sink.event(this.time, x)\n}\n\nTransformer.prototype['@@transducer/result'] = Transformer.prototype.result = function (x) {\n return this.sink.end(this.time, x)\n}\n\n/**\n* Given an object supporting the new or legacy transducer protocol,\n* create an adapter for it.\n* @param {object} tx transform\n* @returns {TxAdapter|LegacyTxAdapter}\n*/\nfunction getTxHandler (tx) {\n return typeof tx['@@transducer/step'] === 'function'\n ? new TxAdapter(tx)\n : new LegacyTxAdapter(tx)\n}\n\n/**\n* Adapter for new official transducer protocol\n* @param {object} tx transform\n* @constructor\n*/\nfunction TxAdapter (tx) {\n this.tx = tx\n}\n\nTxAdapter.prototype.step = function (t, x) {\n return this.tx['@@transducer/step'](t, x)\n}\nTxAdapter.prototype.result = function (x) {\n return this.tx['@@transducer/result'](x)\n}\nTxAdapter.prototype.isReduced = function (x) {\n return x != null && x['@@transducer/reduced']\n}\nTxAdapter.prototype.getResult = function (x) {\n return x['@@transducer/value']\n}\n\n/**\n* Adapter for older transducer protocol\n* @param {object} tx transform\n* @constructor\n*/\nfunction LegacyTxAdapter (tx) {\n this.tx = tx\n}\n\nLegacyTxAdapter.prototype.step = function (t, x) {\n return this.tx.step(t, x)\n}\nLegacyTxAdapter.prototype.result = function (x) {\n return this.tx.result(x)\n}\nLegacyTxAdapter.prototype.isReduced = function (x) {\n return x != null && x.__transducers_reduced__\n}\nLegacyTxAdapter.prototype.getResult = function (x) {\n return x.value\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * Doubly linked list\n * @constructor\n */\nexport default function LinkedList () {\n this.head = null\n this.length = 0\n}\n\n/**\n * Add a node to the end of the list\n * @param {{prev:Object|null, next:Object|null, dispose:function}} x node to add\n */\nLinkedList.prototype.add = function (x) {\n if (this.head !== null) {\n this.head.prev = x\n x.next = this.head\n }\n this.head = x\n ++this.length\n}\n\n/**\n * Remove the provided node from the list\n * @param {{prev:Object|null, next:Object|null, dispose:function}} x node to remove\n */\nLinkedList.prototype.remove = function (x) { // eslint-disable-line complexity\n --this.length\n if (x === this.head) {\n this.head = this.head.next\n }\n if (x.next !== null) {\n x.next.prev = x.prev\n x.next = null\n }\n if (x.prev !== null) {\n x.prev.next = x.next\n x.prev = null\n }\n}\n\n/**\n * @returns {boolean} true iff there are no nodes in the list\n */\nLinkedList.prototype.isEmpty = function () {\n return this.length === 0\n}\n\n/**\n * Dispose all nodes\n * @returns {Promise} promise that fulfills when all nodes have been disposed,\n * or rejects if an error occurs while disposing\n */\nLinkedList.prototype.dispose = function () {\n if (this.isEmpty()) {\n return Promise.resolve()\n }\n\n var promises = []\n var x = this.head\n this.head = null\n this.length = 0\n\n while (x !== null) {\n promises.push(x.dispose())\n x = x.next\n }\n\n return Promise.all(promises)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\nimport LinkedList from '../LinkedList'\nimport { id as identity } from '@most/prelude'\n\nexport function mergeConcurrently (concurrency, stream) {\n return mergeMapConcurrently(identity, concurrency, stream)\n}\n\nexport function mergeMapConcurrently (f, concurrency, stream) {\n return new Stream(new MergeConcurrently(f, concurrency, stream.source))\n}\n\nfunction MergeConcurrently (f, concurrency, source) {\n this.f = f\n this.concurrency = concurrency\n this.source = source\n}\n\nMergeConcurrently.prototype.run = function (sink, scheduler) {\n return new Outer(this.f, this.concurrency, this.source, sink, scheduler)\n}\n\nfunction Outer (f, concurrency, source, sink, scheduler) {\n this.f = f\n this.concurrency = concurrency\n this.sink = sink\n this.scheduler = scheduler\n this.pending = []\n this.current = new LinkedList()\n this.disposable = dispose.once(source.run(this, scheduler))\n this.active = true\n}\n\nOuter.prototype.event = function (t, x) {\n this._addInner(t, x)\n}\n\nOuter.prototype._addInner = function (t, x) {\n if (this.current.length < this.concurrency) {\n this._startInner(t, x)\n } else {\n this.pending.push(x)\n }\n}\n\nOuter.prototype._startInner = function (t, x) {\n try {\n this._initInner(t, x)\n } catch (e) {\n this.error(t, e)\n }\n}\n\nOuter.prototype._initInner = function (t, x) {\n var innerSink = new Inner(t, this, this.sink)\n innerSink.disposable = mapAndRun(this.f, x, innerSink, this.scheduler)\n this.current.add(innerSink)\n}\n\nfunction mapAndRun (f, x, sink, scheduler) {\n return f(x).source.run(sink, scheduler)\n}\n\nOuter.prototype.end = function (t, x) {\n this.active = false\n dispose.tryDispose(t, this.disposable, this.sink)\n this._checkEnd(t, x)\n}\n\nOuter.prototype.error = function (t, e) {\n this.active = false\n this.sink.error(t, e)\n}\n\nOuter.prototype.dispose = function () {\n this.active = false\n this.pending.length = 0\n return Promise.all([this.disposable.dispose(), this.current.dispose()])\n}\n\nOuter.prototype._endInner = function (t, x, inner) {\n this.current.remove(inner)\n dispose.tryDispose(t, inner, this)\n\n if (this.pending.length === 0) {\n this._checkEnd(t, x)\n } else {\n this._startInner(t, this.pending.shift())\n }\n}\n\nOuter.prototype._checkEnd = function (t, x) {\n if (!this.active && this.current.isEmpty()) {\n this.sink.end(t, x)\n }\n}\n\nfunction Inner (time, outer, sink) {\n this.prev = this.next = null\n this.time = time\n this.outer = outer\n this.sink = sink\n this.disposable = void 0\n}\n\nInner.prototype.event = function (t, x) {\n this.sink.event(Math.max(t, this.time), x)\n}\n\nInner.prototype.end = function (t, x) {\n this.outer._endInner(Math.max(t, this.time), x, this)\n}\n\nInner.prototype.error = function (t, e) {\n this.outer.error(Math.max(t, this.time), e)\n}\n\nInner.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { mergeConcurrently, mergeMapConcurrently } from './mergeConcurrently'\n\n/**\n * Map each value in the stream to a new stream, and merge it into the\n * returned outer stream. Event arrival times are preserved.\n * @param {function(x:*):Stream} f chaining function, must return a Stream\n * @param {Stream} stream\n * @returns {Stream} new stream containing all events from each stream returned by f\n */\nexport function flatMap (f, stream) {\n return mergeMapConcurrently(f, Infinity, stream)\n}\n\n/**\n * Monadic join. Flatten a Stream> to Stream by merging inner\n * streams to the outer. Event arrival times are preserved.\n * @param {Stream>} stream stream of streams\n * @returns {Stream} new stream containing all events of all inner streams\n */\nexport function join (stream) {\n return mergeConcurrently(Infinity, stream)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { mergeMapConcurrently } from './mergeConcurrently'\n\n/**\n * Map each value in stream to a new stream, and concatenate them all\n * stream: -a---b---cX\n * f(a): 1-1-1-1X\n * f(b): -2-2-2-2X\n * f(c): -3-3-3-3X\n * stream.concatMap(f): -1-1-1-1-2-2-2-2-3-3-3-3X\n * @param {function(x:*):Stream} f function to map each value to a stream\n * @param {Stream} stream\n * @returns {Stream} new stream containing all events from each stream returned by f\n */\nexport function concatMap (f, stream) {\n return mergeMapConcurrently(f, 1, stream)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport IndexSink from '../sink/IndexSink'\nimport { empty } from '../source/core'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\n\nvar copy = base.copy\nvar reduce = base.reduce\n\n/**\n * @returns {Stream} stream containing events from all streams in the argument\n * list in time order. If two events are simultaneous they will be merged in\n * arbitrary order.\n */\nexport function merge (/* ...streams*/) {\n return mergeArray(copy(arguments))\n}\n\n/**\n * @param {Array} streams array of stream to merge\n * @returns {Stream} stream containing events from all input observables\n * in time order. If two events are simultaneous they will be merged in\n * arbitrary order.\n */\nexport function mergeArray (streams) {\n var l = streams.length\n return l === 0 ? empty()\n : l === 1 ? streams[0]\n : new Stream(mergeSources(streams))\n}\n\n/**\n * This implements fusion/flattening for merge. It will\n * fuse adjacent merge operations. For example:\n * - a.merge(b).merge(c) effectively becomes merge(a, b, c)\n * - merge(a, merge(b, c)) effectively becomes merge(a, b, c)\n * It does this by concatenating the sources arrays of\n * any nested Merge sources, in effect \"flattening\" nested\n * merge operations into a single merge.\n */\nfunction mergeSources (streams) {\n return new Merge(reduce(appendSources, [], streams))\n}\n\nfunction appendSources (sources, stream) {\n var source = stream.source\n return source instanceof Merge\n ? sources.concat(source.sources)\n : sources.concat(source)\n}\n\nfunction Merge (sources) {\n this.sources = sources\n}\n\nMerge.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l)\n var sinks = new Array(l)\n\n var mergeSink = new MergeSink(disposables, sinks, sink)\n\n for (var indexSink, i = 0; i < l; ++i) {\n indexSink = sinks[i] = new IndexSink(i, mergeSink)\n disposables[i] = this.sources[i].run(indexSink, scheduler)\n }\n\n return dispose.all(disposables)\n}\n\nfunction MergeSink (disposables, sinks, sink) {\n this.sink = sink\n this.disposables = disposables\n this.activeCount = sinks.length\n}\n\nMergeSink.prototype.error = Pipe.prototype.error\n\nMergeSink.prototype.event = function (t, indexValue) {\n this.sink.event(t, indexValue.value)\n}\n\nMergeSink.prototype.end = function (t, indexedValue) {\n dispose.tryDispose(t, this.disposables[indexedValue.index], this.sink)\n if (--this.activeCount === 0) {\n this.sink.end(t, indexedValue.value)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\nimport invoke from '../invoke'\n\n/**\n * When an event arrives on sampler, emit the result of calling f with the latest\n * values of all streams being sampled\n * @param {function(...values):*} f function to apply to each set of sampled values\n * @param {Stream} sampler streams will be sampled whenever an event arrives\n * on sampler\n * @returns {Stream} stream of sampled and transformed values\n */\nexport function sample (f, sampler /*, ...streams */) {\n return sampleArray(f, sampler, base.drop(2, arguments))\n}\n\n/**\n * When an event arrives on sampler, emit the latest event value from stream.\n * @param {Stream} sampler stream of events at whose arrival time\n * stream's latest value will be propagated\n * @param {Stream} stream stream of values\n * @returns {Stream} sampled stream of values\n */\nexport function sampleWith (sampler, stream) {\n return new Stream(new Sampler(base.id, sampler.source, [stream.source]))\n}\n\nexport function sampleArray (f, sampler, streams) {\n return new Stream(new Sampler(f, sampler.source, base.map(getSource, streams)))\n}\n\nfunction getSource (stream) {\n return stream.source\n}\n\nfunction Sampler (f, sampler, sources) {\n this.f = f\n this.sampler = sampler\n this.sources = sources\n}\n\nSampler.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l + 1)\n var sinks = new Array(l)\n\n var sampleSink = new SampleSink(this.f, sinks, sink)\n\n for (var hold, i = 0; i < l; ++i) {\n hold = sinks[i] = new Hold(sampleSink)\n disposables[i] = this.sources[i].run(hold, scheduler)\n }\n\n disposables[i] = this.sampler.run(sampleSink, scheduler)\n\n return dispose.all(disposables)\n}\n\nfunction Hold (sink) {\n this.sink = sink\n this.hasValue = false\n}\n\nHold.prototype.event = function (t, x) {\n this.value = x\n this.hasValue = true\n this.sink._notify(this)\n}\n\nHold.prototype.end = function () {}\nHold.prototype.error = Pipe.prototype.error\n\nfunction SampleSink (f, sinks, sink) {\n this.f = f\n this.sinks = sinks\n this.sink = sink\n this.active = false\n}\n\nSampleSink.prototype._notify = function () {\n if (!this.active) {\n this.active = this.sinks.every(hasValue)\n }\n}\n\nSampleSink.prototype.event = function (t) {\n if (this.active) {\n this.sink.event(t, invoke(this.f, base.map(getValue, this.sinks)))\n }\n}\n\nSampleSink.prototype.end = Pipe.prototype.end\nSampleSink.prototype.error = Pipe.prototype.error\n\nfunction hasValue (hold) {\n return hold.hasValue\n}\n\nfunction getValue (hold) {\n return hold.value\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n// Based on https://github.com/petkaantonov/deque\n\nexport default function Queue (capPow2) {\n this._capacity = capPow2 || 32\n this._length = 0\n this._head = 0\n}\n\nQueue.prototype.push = function (x) {\n var len = this._length\n this._checkCapacity(len + 1)\n\n var i = (this._head + len) & (this._capacity - 1)\n this[i] = x\n this._length = len + 1\n}\n\nQueue.prototype.shift = function () {\n var head = this._head\n var x = this[head]\n\n this[head] = void 0\n this._head = (head + 1) & (this._capacity - 1)\n this._length--\n return x\n}\n\nQueue.prototype.isEmpty = function () {\n return this._length === 0\n}\n\nQueue.prototype.length = function () {\n return this._length\n}\n\nQueue.prototype._checkCapacity = function (size) {\n if (this._capacity < size) {\n this._ensureCapacity(this._capacity << 1)\n }\n}\n\nQueue.prototype._ensureCapacity = function (capacity) {\n var oldCapacity = this._capacity\n this._capacity = capacity\n\n var last = this._head + this._length\n\n if (last > oldCapacity) {\n copy(this, 0, this, oldCapacity, last & (oldCapacity - 1))\n }\n}\n\nfunction copy (src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex]\n src[j + srcIndex] = void 0\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as transform from './transform'\nimport * as core from '../source/core'\nimport Pipe from '../sink/Pipe'\nimport IndexSink from '../sink/IndexSink'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\nimport invoke from '../invoke'\nimport Queue from '../Queue'\n\nvar map = base.map\nvar tail = base.tail\n\n/**\n * Combine streams pairwise (or tuple-wise) by index by applying f to values\n * at corresponding indices. The returned stream ends when any of the input\n * streams ends.\n * @param {function} f function to combine values\n * @returns {Stream} new stream with items at corresponding indices combined\n * using f\n */\nexport function zip (f /*, ...streams */) {\n return zipArray(f, tail(arguments))\n}\n\n/**\n* Combine streams pairwise (or tuple-wise) by index by applying f to values\n* at corresponding indices. The returned stream ends when any of the input\n* streams ends.\n* @param {function} f function to combine values\n* @param {[Stream]} streams streams to zip using f\n* @returns {Stream} new stream with items at corresponding indices combined\n* using f\n*/\nexport function zipArray (f, streams) {\n return streams.length === 0 ? core.empty()\n: streams.length === 1 ? transform.map(f, streams[0])\n: new Stream(new Zip(f, map(getSource, streams)))\n}\n\nfunction getSource (stream) {\n return stream.source\n}\n\nfunction Zip (f, sources) {\n this.f = f\n this.sources = sources\n}\n\nZip.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l)\n var sinks = new Array(l)\n var buffers = new Array(l)\n\n var zipSink = new ZipSink(this.f, buffers, sinks, sink)\n\n for (var indexSink, i = 0; i < l; ++i) {\n buffers[i] = new Queue()\n indexSink = sinks[i] = new IndexSink(i, zipSink)\n disposables[i] = this.sources[i].run(indexSink, scheduler)\n }\n\n return dispose.all(disposables)\n}\n\nfunction ZipSink (f, buffers, sinks, sink) {\n this.f = f\n this.sinks = sinks\n this.sink = sink\n this.buffers = buffers\n}\n\nZipSink.prototype.event = function (t, indexedValue) { // eslint-disable-line complexity\n var buffers = this.buffers\n var buffer = buffers[indexedValue.index]\n\n buffer.push(indexedValue.value)\n\n if (buffer.length() === 1) {\n if (!ready(this.buffers)) {\n return\n }\n\n emitZipped(this.f, t, buffers, this.sink)\n\n if (ended(this.buffers, this.sinks)) {\n this.sink.end(t, void 0)\n }\n }\n}\n\nZipSink.prototype.end = function (t, indexedValue) {\n var buffer = this.buffers[indexedValue.index]\n if (buffer.isEmpty()) {\n this.sink.end(t, indexedValue.value)\n }\n}\n\nZipSink.prototype.error = Pipe.prototype.error\n\nfunction emitZipped (f, t, buffers, sink) {\n sink.event(t, invoke(f, map(head, buffers)))\n}\n\nfunction head (buffer) {\n return buffer.shift()\n}\n\nfunction ended (buffers, sinks) {\n for (var i = 0, l = buffers.length; i < l; ++i) {\n if (buffers[i].isEmpty() && !sinks[i].active) {\n return true\n }\n }\n return false\n}\n\nfunction ready (buffers) {\n for (var i = 0, l = buffers.length; i < l; ++i) {\n if (buffers[i].isEmpty()) {\n return false\n }\n }\n return true\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\n\n/**\n * Given a stream of streams, return a new stream that adopts the behavior\n * of the most recent inner stream.\n * @param {Stream} stream of streams on which to switch\n * @returns {Stream} switching stream\n */\nexport function switchLatest (stream) {\n return new Stream(new Switch(stream.source))\n}\n\nexport { switchLatest as switch }\n\nfunction Switch (source) {\n this.source = source\n}\n\nSwitch.prototype.run = function (sink, scheduler) {\n var switchSink = new SwitchSink(sink, scheduler)\n return dispose.all([switchSink, this.source.run(switchSink, scheduler)])\n}\n\nfunction SwitchSink (sink, scheduler) {\n this.sink = sink\n this.scheduler = scheduler\n this.current = null\n this.ended = false\n}\n\nSwitchSink.prototype.event = function (t, stream) {\n this._disposeCurrent(t) // TODO: capture the result of this dispose\n this.current = new Segment(t, Infinity, this, this.sink)\n this.current.disposable = stream.source.run(this.current, this.scheduler)\n}\n\nSwitchSink.prototype.end = function (t, x) {\n this.ended = true\n this._checkEnd(t, x)\n}\n\nSwitchSink.prototype.error = function (t, e) {\n this.ended = true\n this.sink.error(t, e)\n}\n\nSwitchSink.prototype.dispose = function () {\n return this._disposeCurrent(this.scheduler.now())\n}\n\nSwitchSink.prototype._disposeCurrent = function (t) {\n if (this.current !== null) {\n return this.current._dispose(t)\n }\n}\n\nSwitchSink.prototype._disposeInner = function (t, inner) {\n inner._dispose(t) // TODO: capture the result of this dispose\n if (inner === this.current) {\n this.current = null\n }\n}\n\nSwitchSink.prototype._checkEnd = function (t, x) {\n if (this.ended && this.current === null) {\n this.sink.end(t, x)\n }\n}\n\nSwitchSink.prototype._endInner = function (t, x, inner) {\n this._disposeInner(t, inner)\n this._checkEnd(t, x)\n}\n\nSwitchSink.prototype._errorInner = function (t, e, inner) {\n this._disposeInner(t, inner)\n this.sink.error(t, e)\n}\n\nfunction Segment (min, max, outer, sink) {\n this.min = min\n this.max = max\n this.outer = outer\n this.sink = sink\n this.disposable = dispose.empty()\n}\n\nSegment.prototype.event = function (t, x) {\n if (t < this.max) {\n this.sink.event(Math.max(t, this.min), x)\n }\n}\n\nSegment.prototype.end = function (t, x) {\n this.outer._endInner(Math.max(t, this.min), x, this)\n}\n\nSegment.prototype.error = function (t, e) {\n this.outer._errorInner(Math.max(t, this.min), e, this)\n}\n\nSegment.prototype._dispose = function (t) {\n this.max = t\n dispose.tryDispose(t, this.disposable, this.sink)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport Filter from '../fusion/Filter'\n\n/**\n * Retain only items matching a predicate\n * @param {function(x:*):boolean} p filtering predicate called for each item\n * @param {Stream} stream stream to filter\n * @returns {Stream} stream containing only items for which predicate returns truthy\n */\nexport function filter (p, stream) {\n return new Stream(Filter.create(p, stream.source))\n}\n\n/**\n * Skip repeated events, using === to detect duplicates\n * @param {Stream} stream stream from which to omit repeated events\n * @returns {Stream} stream without repeated events\n */\nexport function skipRepeats (stream) {\n return skipRepeatsWith(same, stream)\n}\n\n/**\n * Skip repeated events using the provided equals function to detect duplicates\n * @param {function(a:*, b:*):boolean} equals optional function to compare items\n * @param {Stream} stream stream from which to omit repeated events\n * @returns {Stream} stream without repeated events\n */\nexport function skipRepeatsWith (equals, stream) {\n return new Stream(new SkipRepeats(equals, stream.source))\n}\n\nfunction SkipRepeats (equals, source) {\n this.equals = equals\n this.source = source\n}\n\nSkipRepeats.prototype.run = function (sink, scheduler) {\n return this.source.run(new SkipRepeatsSink(this.equals, sink), scheduler)\n}\n\nfunction SkipRepeatsSink (equals, sink) {\n this.equals = equals\n this.sink = sink\n this.value = void 0\n this.init = true\n}\n\nSkipRepeatsSink.prototype.end = Pipe.prototype.end\nSkipRepeatsSink.prototype.error = Pipe.prototype.error\n\nSkipRepeatsSink.prototype.event = function (t, x) {\n if (this.init) {\n this.init = false\n this.value = x\n this.sink.event(t, x)\n } else if (!this.equals(this.value, x)) {\n this.value = x\n this.sink.event(t, x)\n }\n}\n\nfunction same (a, b) {\n return a === b\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as core from '../source/core'\nimport Map from '../fusion/Map'\n\n/**\n * @param {number} n\n * @param {Stream} stream\n * @returns {Stream} new stream containing only up to the first n items from stream\n */\nexport function take (n, stream) {\n return slice(0, n, stream)\n}\n\n/**\n * @param {number} n\n * @param {Stream} stream\n * @returns {Stream} new stream with the first n items removed\n */\nexport function skip (n, stream) {\n return slice(n, Infinity, stream)\n}\n\n/**\n * Slice a stream by index. Negative start/end indexes are not supported\n * @param {number} start\n * @param {number} end\n * @param {Stream} stream\n * @returns {Stream} stream containing items where start <= index < end\n */\nexport function slice (start, end, stream) {\n return end <= start ? core.empty()\n : new Stream(sliceSource(start, end, stream.source))\n}\n\nfunction sliceSource (start, end, source) {\n return source instanceof Map ? commuteMapSlice(start, end, source)\n : source instanceof Slice ? fuseSlice(start, end, source)\n : new Slice(start, end, source)\n}\n\nfunction commuteMapSlice (start, end, source) {\n return Map.create(source.f, sliceSource(start, end, source.source))\n}\n\nfunction fuseSlice (start, end, source) {\n start += source.min\n end = Math.min(end + source.min, source.max)\n return new Slice(start, end, source.source)\n}\n\nfunction Slice (min, max, source) {\n this.source = source\n this.min = min\n this.max = max\n}\n\nSlice.prototype.run = function (sink, scheduler) {\n return this.source.run(new SliceSink(this.min, this.max - this.min, sink), scheduler)\n}\n\nfunction SliceSink (skip, take, sink) {\n this.sink = sink\n this.skip = skip\n this.take = take\n}\n\nSliceSink.prototype.end = Pipe.prototype.end\nSliceSink.prototype.error = Pipe.prototype.error\n\nSliceSink.prototype.event = function (t, x) {\n /* eslint complexity: [1, 4] */\n if (this.skip > 0) {\n this.skip -= 1\n return\n }\n\n if (this.take === 0) {\n return\n }\n\n this.take -= 1\n this.sink.event(t, x)\n if (this.take === 0) {\n this.sink.end(t, x)\n }\n}\n\nexport function takeWhile (p, stream) {\n return new Stream(new TakeWhile(p, stream.source))\n}\n\nfunction TakeWhile (p, source) {\n this.p = p\n this.source = source\n}\n\nTakeWhile.prototype.run = function (sink, scheduler) {\n return this.source.run(new TakeWhileSink(this.p, sink), scheduler)\n}\n\nfunction TakeWhileSink (p, sink) {\n this.p = p\n this.sink = sink\n this.active = true\n}\n\nTakeWhileSink.prototype.end = Pipe.prototype.end\nTakeWhileSink.prototype.error = Pipe.prototype.error\n\nTakeWhileSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n\n var p = this.p\n this.active = p(x)\n if (this.active) {\n this.sink.event(t, x)\n } else {\n this.sink.end(t, x)\n }\n}\n\nexport function skipWhile (p, stream) {\n return new Stream(new SkipWhile(p, stream.source))\n}\n\nfunction SkipWhile (p, source) {\n this.p = p\n this.source = source\n}\n\nSkipWhile.prototype.run = function (sink, scheduler) {\n return this.source.run(new SkipWhileSink(this.p, sink), scheduler)\n}\n\nfunction SkipWhileSink (p, sink) {\n this.p = p\n this.sink = sink\n this.skipping = true\n}\n\nSkipWhileSink.prototype.end = Pipe.prototype.end\nSkipWhileSink.prototype.error = Pipe.prototype.error\n\nSkipWhileSink.prototype.event = function (t, x) {\n if (this.skipping) {\n var p = this.p\n this.skipping = p(x)\n if (this.skipping) {\n return\n }\n }\n\n this.sink.event(t, x)\n}\n\nexport function skipAfter (p, stream) {\n return new Stream(new SkipAfter(p, stream.source))\n}\n\nfunction SkipAfter (p, source) {\n this.p = p\n this.source = source\n}\n\nSkipAfter.prototype.run = function run (sink, scheduler) {\n return this.source.run(new SkipAfterSink(this.p, sink), scheduler)\n}\n\nfunction SkipAfterSink (p, sink) {\n this.p = p\n this.sink = sink\n this.skipping = false\n}\n\nSkipAfterSink.prototype.event = function event (t, x) {\n if (this.skipping) {\n return\n }\n\n var p = this.p\n this.skipping = p(x)\n this.sink.event(t, x)\n\n if (this.skipping) {\n this.sink.end(t, x)\n }\n}\n\nSkipAfterSink.prototype.end = Pipe.prototype.end\nSkipAfterSink.prototype.error = Pipe.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport { join } from '../combinator/flatMap'\n\nexport function takeUntil (signal, stream) {\n return new Stream(new Until(signal.source, stream.source))\n}\n\nexport function skipUntil (signal, stream) {\n return new Stream(new Since(signal.source, stream.source))\n}\n\nexport function during (timeWindow, stream) {\n return takeUntil(join(timeWindow), skipUntil(timeWindow, stream))\n}\n\nfunction Until (maxSignal, source) {\n this.maxSignal = maxSignal\n this.source = source\n}\n\nUntil.prototype.run = function (sink, scheduler) {\n var min = new Bound(-Infinity, sink)\n var max = new UpperBound(this.maxSignal, sink, scheduler)\n var disposable = this.source.run(new TimeWindowSink(min, max, sink), scheduler)\n\n return dispose.all([min, max, disposable])\n}\n\nfunction Since (minSignal, source) {\n this.minSignal = minSignal\n this.source = source\n}\n\nSince.prototype.run = function (sink, scheduler) {\n var min = new LowerBound(this.minSignal, sink, scheduler)\n var max = new Bound(Infinity, sink)\n var disposable = this.source.run(new TimeWindowSink(min, max, sink), scheduler)\n\n return dispose.all([min, max, disposable])\n}\n\nfunction Bound (value, sink) {\n this.value = value\n this.sink = sink\n}\n\nBound.prototype.error = Pipe.prototype.error\nBound.prototype.event = noop\nBound.prototype.end = noop\nBound.prototype.dispose = noop\n\nfunction TimeWindowSink (min, max, sink) {\n this.min = min\n this.max = max\n this.sink = sink\n}\n\nTimeWindowSink.prototype.event = function (t, x) {\n if (t >= this.min.value && t < this.max.value) {\n this.sink.event(t, x)\n }\n}\n\nTimeWindowSink.prototype.error = Pipe.prototype.error\nTimeWindowSink.prototype.end = Pipe.prototype.end\n\nfunction LowerBound (signal, sink, scheduler) {\n this.value = Infinity\n this.sink = sink\n this.disposable = signal.run(this, scheduler)\n}\n\nLowerBound.prototype.event = function (t /*, x */) {\n if (t < this.value) {\n this.value = t\n }\n}\n\nLowerBound.prototype.end = noop\nLowerBound.prototype.error = Pipe.prototype.error\n\nLowerBound.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n\nfunction UpperBound (signal, sink, scheduler) {\n this.value = Infinity\n this.sink = sink\n this.disposable = signal.run(this, scheduler)\n}\n\nUpperBound.prototype.event = function (t, x) {\n if (t < this.value) {\n this.value = t\n this.sink.end(t, x)\n }\n}\n\nUpperBound.prototype.end = noop\nUpperBound.prototype.error = Pipe.prototype.error\n\nUpperBound.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n\nfunction noop () {}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * @param {Number} delayTime milliseconds to delay each item\n * @param {Stream} stream\n * @returns {Stream} new stream containing the same items, but delayed by ms\n */\nexport function delay (delayTime, stream) {\n return delayTime <= 0 ? stream\n : new Stream(new Delay(delayTime, stream.source))\n}\n\nfunction Delay (dt, source) {\n this.dt = dt\n this.source = source\n}\n\nDelay.prototype.run = function (sink, scheduler) {\n var delaySink = new DelaySink(this.dt, sink, scheduler)\n return dispose.all([delaySink, this.source.run(delaySink, scheduler)])\n}\n\nfunction DelaySink (dt, sink, scheduler) {\n this.dt = dt\n this.sink = sink\n this.scheduler = scheduler\n}\n\nDelaySink.prototype.dispose = function () {\n var self = this\n this.scheduler.cancelAll(function (task) {\n return task.sink === self.sink\n })\n}\n\nDelaySink.prototype.event = function (t, x) {\n this.scheduler.delay(this.dt, PropagateTask.event(x, this.sink))\n}\n\nDelaySink.prototype.end = function (t, x) {\n this.scheduler.delay(this.dt, PropagateTask.end(x, this.sink))\n}\n\nDelaySink.prototype.error = Pipe.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\n\nexport function timestamp (stream) {\n return new Stream(new Timestamp(stream.source))\n}\n\nfunction Timestamp (source) {\n this.source = source\n}\n\nTimestamp.prototype.run = function (sink, scheduler) {\n return this.source.run(new TimestampSink(sink), scheduler)\n}\n\nfunction TimestampSink (sink) {\n this.sink = sink\n}\n\nTimestampSink.prototype.end = Pipe.prototype.end\nTimestampSink.prototype.error = Pipe.prototype.error\n\nTimestampSink.prototype.event = function (t, x) {\n this.sink.event(t, { time: t, value: x })\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\nimport Map from '../fusion/Map'\n\n/**\n * Limit the rate of events by suppressing events that occur too often\n * @param {Number} period time to suppress events\n * @param {Stream} stream\n * @returns {Stream}\n */\nexport function throttle (period, stream) {\n return new Stream(throttleSource(period, stream.source))\n}\n\nfunction throttleSource (period, source) {\n return source instanceof Map ? commuteMapThrottle(period, source)\n : source instanceof Throttle ? fuseThrottle(period, source)\n : new Throttle(period, source)\n}\n\nfunction commuteMapThrottle (period, source) {\n return Map.create(source.f, throttleSource(period, source.source))\n}\n\nfunction fuseThrottle (period, source) {\n return new Throttle(Math.max(period, source.period), source.source)\n}\n\nfunction Throttle (period, source) {\n this.period = period\n this.source = source\n}\n\nThrottle.prototype.run = function (sink, scheduler) {\n return this.source.run(new ThrottleSink(this.period, sink), scheduler)\n}\n\nfunction ThrottleSink (period, sink) {\n this.time = 0\n this.period = period\n this.sink = sink\n}\n\nThrottleSink.prototype.event = function (t, x) {\n if (t >= this.time) {\n this.time = t + this.period\n this.sink.event(t, x)\n }\n}\n\nThrottleSink.prototype.end = Pipe.prototype.end\n\nThrottleSink.prototype.error = Pipe.prototype.error\n\n/**\n * Wait for a burst of events to subside and emit only the last event in the burst\n * @param {Number} period events occuring more frequently than this\n * will be suppressed\n * @param {Stream} stream stream to debounce\n * @returns {Stream} new debounced stream\n */\nexport function debounce (period, stream) {\n return new Stream(new Debounce(period, stream.source))\n}\n\nfunction Debounce (dt, source) {\n this.dt = dt\n this.source = source\n}\n\nDebounce.prototype.run = function (sink, scheduler) {\n return new DebounceSink(this.dt, this.source, sink, scheduler)\n}\n\nfunction DebounceSink (dt, source, sink, scheduler) {\n this.dt = dt\n this.sink = sink\n this.scheduler = scheduler\n this.value = void 0\n this.timer = null\n\n var sourceDisposable = source.run(this, scheduler)\n this.disposable = dispose.all([this, sourceDisposable])\n}\n\nDebounceSink.prototype.event = function (t, x) {\n this._clearTimer()\n this.value = x\n this.timer = this.scheduler.delay(this.dt, PropagateTask.event(x, this.sink))\n}\n\nDebounceSink.prototype.end = function (t, x) {\n if (this._clearTimer()) {\n this.sink.event(t, this.value)\n this.value = void 0\n }\n this.sink.end(t, x)\n}\n\nDebounceSink.prototype.error = function (t, x) {\n this._clearTimer()\n this.sink.error(t, x)\n}\n\nDebounceSink.prototype.dispose = function () {\n this._clearTimer()\n}\n\nDebounceSink.prototype._clearTimer = function () {\n if (this.timer === null) {\n return false\n }\n this.timer.dispose()\n this.timer = null\n return true\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport fatal from '../fatalError'\nimport { of as just } from '../source/core'\n\n/**\n * Create a stream containing only the promise's fulfillment\n * value at the time it fulfills.\n * @param {Promise} p promise\n * @return {Stream} stream containing promise's fulfillment value.\n * If the promise rejects, the stream will error\n */\nexport function fromPromise (p) {\n return awaitPromises(just(p))\n}\n\n/**\n * Turn a Stream> into Stream by awaiting each promise.\n * Event order is preserved.\n * @param {Stream>} stream\n * @return {Stream} stream of fulfillment values. The stream will\n * error if any promise rejects.\n */\nexport function awaitPromises (stream) {\n return new Stream(new Await(stream.source))\n}\n\nfunction Await (source) {\n this.source = source\n}\n\nAwait.prototype.run = function (sink, scheduler) {\n return this.source.run(new AwaitSink(sink, scheduler), scheduler)\n}\n\nfunction AwaitSink (sink, scheduler) {\n this.sink = sink\n this.scheduler = scheduler\n this.queue = Promise.resolve()\n var self = this\n\n\t// Pre-create closures, to avoid creating them per event\n this._eventBound = function (x) {\n self.sink.event(self.scheduler.now(), x)\n }\n\n this._endBound = function (x) {\n self.sink.end(self.scheduler.now(), x)\n }\n\n this._errorBound = function (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n}\n\nAwaitSink.prototype.event = function (t, promise) {\n var self = this\n this.queue = this.queue.then(function () {\n return self._event(promise)\n }).catch(this._errorBound)\n}\n\nAwaitSink.prototype.end = function (t, x) {\n var self = this\n this.queue = this.queue.then(function () {\n return self._end(x)\n }).catch(this._errorBound)\n}\n\nAwaitSink.prototype.error = function (t, e) {\n var self = this\n // Don't resolve error values, propagate directly\n this.queue = this.queue.then(function () {\n return self._errorBound(e)\n }).catch(fatal)\n}\n\nAwaitSink.prototype._event = function (promise) {\n return promise.then(this._eventBound)\n}\n\nAwaitSink.prototype._end = function (x) {\n return Promise.resolve(x).then(this._endBound)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function SafeSink (sink) {\n this.sink = sink\n this.active = true\n}\n\nSafeSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n this.sink.event(t, x)\n}\n\nSafeSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n this.disable()\n this.sink.end(t, x)\n}\n\nSafeSink.prototype.error = function (t, e) {\n this.disable()\n this.sink.error(t, e)\n}\n\nSafeSink.prototype.disable = function () {\n this.active = false\n return this.sink\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport SafeSink from '../sink/SafeSink'\nimport * as dispose from '../disposable/dispose'\nimport * as tryEvent from '../source/tryEvent'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * If stream encounters an error, recover and continue with items from stream\n * returned by f.\n * @param {function(error:*):Stream} f function which returns a new stream\n * @param {Stream} stream\n * @returns {Stream} new stream which will recover from an error by calling f\n */\nexport function recoverWith (f, stream) {\n return new Stream(new RecoverWith(f, stream.source))\n}\n\nexport var flatMapError = recoverWith\n\n/**\n * Create a stream containing only an error\n * @param {*} e error value, preferably an Error or Error subtype\n * @returns {Stream} new stream containing only an error\n */\nexport function throwError (e) {\n return new Stream(new ErrorSource(e))\n}\n\nfunction ErrorSource (e) {\n this.value = e\n}\n\nErrorSource.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runError, this.value, sink))\n}\n\nfunction runError (t, e, sink) {\n sink.error(t, e)\n}\n\nfunction RecoverWith (f, source) {\n this.f = f\n this.source = source\n}\n\nRecoverWith.prototype.run = function (sink, scheduler) {\n return new RecoverWithSink(this.f, this.source, sink, scheduler)\n}\n\nfunction RecoverWithSink (f, source, sink, scheduler) {\n this.f = f\n this.sink = new SafeSink(sink)\n this.scheduler = scheduler\n this.disposable = source.run(this, scheduler)\n}\n\nRecoverWithSink.prototype.event = function (t, x) {\n tryEvent.tryEvent(t, x, this.sink)\n}\n\nRecoverWithSink.prototype.end = function (t, x) {\n tryEvent.tryEnd(t, x, this.sink)\n}\n\nRecoverWithSink.prototype.error = function (t, e) {\n var nextSink = this.sink.disable()\n\n dispose.tryDispose(t, this.disposable, this.sink)\n this._startNext(t, e, nextSink)\n}\n\nRecoverWithSink.prototype._startNext = function (t, x, sink) {\n try {\n this.disposable = this._continue(this.f, x, sink)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nRecoverWithSink.prototype._continue = function (f, x, sink) {\n var stream = f(x)\n return stream.source.run(sink, this.scheduler)\n}\n\nRecoverWithSink.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n","import { append, remove, findIndex } from '@most/prelude';\n\nvar MulticastDisposable = function MulticastDisposable (source, sink) {\n this.source = source\n this.sink = sink\n this.disposed = false\n};\n\nMulticastDisposable.prototype.dispose = function dispose () {\n if (this.disposed) {\n return\n }\n this.disposed = true\n var remaining = this.source.remove(this.sink)\n return remaining === 0 && this.source._dispose()\n};\n\nfunction tryEvent (t, x, sink) {\n try {\n sink.event(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nfunction tryEnd (t, x, sink) {\n try {\n sink.end(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nvar dispose = function (disposable) { return disposable.dispose(); }\n\nvar emptyDisposable = {\n dispose: function dispose$1 () {}\n}\n\nvar MulticastSource = function MulticastSource (source) {\n this.source = source\n this.sinks = []\n this._disposable = emptyDisposable\n};\n\nMulticastSource.prototype.run = function run (sink, scheduler) {\n var n = this.add(sink)\n if (n === 1) {\n this._disposable = this.source.run(this, scheduler)\n }\n return new MulticastDisposable(this, sink)\n};\n\nMulticastSource.prototype._dispose = function _dispose () {\n var disposable = this._disposable\n this._disposable = emptyDisposable\n return Promise.resolve(disposable).then(dispose)\n};\n\nMulticastSource.prototype.add = function add (sink) {\n this.sinks = append(sink, this.sinks)\n return this.sinks.length\n};\n\nMulticastSource.prototype.remove = function remove$1 (sink) {\n var i = findIndex(sink, this.sinks)\n // istanbul ignore next\n if (i >= 0) {\n this.sinks = remove(i, this.sinks)\n }\n\n return this.sinks.length\n};\n\nMulticastSource.prototype.event = function event (time, value) {\n var s = this.sinks\n if (s.length === 1) {\n return s[0].event(time, value)\n }\n for (var i = 0; i < s.length; ++i) {\n tryEvent(time, value, s[i])\n }\n};\n\nMulticastSource.prototype.end = function end (time, value) {\n var s = this.sinks\n for (var i = 0; i < s.length; ++i) {\n tryEnd(time, value, s[i])\n }\n};\n\nMulticastSource.prototype.error = function error (time, err) {\n var s = this.sinks\n for (var i = 0; i < s.length; ++i) {\n s[i].error(time, err)\n }\n};\n\nfunction multicast (stream) {\n var source = stream.source\n return source instanceof MulticastSource\n ? stream\n : new stream.constructor(new MulticastSource(source))\n}\n\nexport { MulticastSource };export default multicast;\n//# sourceMappingURL=multicast.es.js.map\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from './Stream'\nimport * as base from '@most/prelude'\nimport { of, empty, never } from './source/core'\nimport { from } from './source/from'\nimport { periodic } from './source/periodic'\nimport symbolObservable from 'symbol-observable'\n\n/**\n * Core stream type\n * @type {Stream}\n */\nexport { Stream }\n\n// Add of and empty to constructor for fantasy-land compat\nStream.of = of\nStream.empty = empty\n// Add from to constructor for ES Observable compat\nStream.from = from\nexport { of, of as just, empty, never, from, periodic }\n\n// -----------------------------------------------------------------------\n// Draft ES Observable proposal interop\n// https://github.com/zenparsing/es-observable\n\nimport { subscribe } from './observable/subscribe'\n\nStream.prototype.subscribe = function (subscriber) {\n return subscribe(subscriber, this)\n}\n\nStream.prototype[symbolObservable] = function () {\n return this\n}\n\n// -----------------------------------------------------------------------\n// Fluent adapter\n\nimport { thru } from './combinator/thru'\n\n/**\n * Adapt a functional stream transform to fluent style.\n * It applies f to the this stream object\n * @param {function(s: Stream): Stream} f function that\n * receives the stream itself and must return a new stream\n * @return {Stream}\n */\nStream.prototype.thru = function (f) {\n return thru(f, this)\n}\n\n// -----------------------------------------------------------------------\n// Adapting other sources\n\n/**\n * Create a stream of events from the supplied EventTarget or EventEmitter\n * @param {String} event event name\n * @param {EventTarget|EventEmitter} source EventTarget or EventEmitter. The source\n * must support either addEventListener/removeEventListener (w3c EventTarget:\n * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget),\n * or addListener/removeListener (node EventEmitter: http://nodejs.org/api/events.html)\n * @returns {Stream} stream of events of the specified type from the source\n */\nexport { fromEvent } from './source/fromEvent'\n\n// -----------------------------------------------------------------------\n// Observing\n\nimport { observe, drain } from './combinator/observe'\n\nexport { observe, observe as forEach, drain }\n\n/**\n * Process all the events in the stream\n * @returns {Promise} promise that fulfills when the stream ends, or rejects\n * if the stream fails with an unhandled error.\n */\nStream.prototype.observe = Stream.prototype.forEach = function (f) {\n return observe(f, this)\n}\n\n/**\n * Consume all events in the stream, without providing a function to process each.\n * This causes a stream to become active and begin emitting events, and is useful\n * in cases where all processing has been setup upstream via other combinators, and\n * there is no need to process the terminal events.\n * @returns {Promise} promise that fulfills when the stream ends, or rejects\n * if the stream fails with an unhandled error.\n */\nStream.prototype.drain = function () {\n return drain(this)\n}\n\n// -------------------------------------------------------\n\nimport { loop } from './combinator/loop'\n\nexport { loop }\n\n/**\n * Generalized feedback loop. Call a stepper function for each event. The stepper\n * will be called with 2 params: the current seed and the an event value. It must\n * return a new { seed, value } pair. The `seed` will be fed back into the next\n * invocation of stepper, and the `value` will be propagated as the event value.\n * @param {function(seed:*, value:*):{seed:*, value:*}} stepper loop step function\n * @param {*} seed initial seed value passed to first stepper call\n * @returns {Stream} new stream whose values are the `value` field of the objects\n * returned by the stepper\n */\nStream.prototype.loop = function (stepper, seed) {\n return loop(stepper, seed, this)\n}\n\n// -------------------------------------------------------\n\nimport { scan, reduce } from './combinator/accumulate'\n\nexport { scan, reduce }\n\n/**\n * Create a stream containing successive reduce results of applying f to\n * the previous reduce result and the current stream item.\n * @param {function(result:*, x:*):*} f reducer function\n * @param {*} initial initial value\n * @returns {Stream} new stream containing successive reduce results\n */\nStream.prototype.scan = function (f, initial) {\n return scan(f, initial, this)\n}\n\n/**\n * Reduce the stream to produce a single result. Note that reducing an infinite\n * stream will return a Promise that never fulfills, but that may reject if an error\n * occurs.\n * @param {function(result:*, x:*):*} f reducer function\n * @param {*} initial optional initial value\n * @returns {Promise} promise for the file result of the reduce\n */\nStream.prototype.reduce = function (f, initial) {\n return reduce(f, initial, this)\n}\n\n// -----------------------------------------------------------------------\n// Building and extending\n\nexport { unfold } from './source/unfold'\nexport { iterate } from './source/iterate'\nexport { generate } from './source/generate'\nimport { concat, cons as startWith } from './combinator/build'\n\nexport { concat, startWith }\n\n/**\n * @param {Stream} tail\n * @returns {Stream} new stream containing all items in this followed by\n * all items in tail\n */\nStream.prototype.concat = function (tail) {\n return concat(this, tail)\n}\n\n/**\n * @param {*} x value to prepend\n * @returns {Stream} a new stream with x prepended\n */\nStream.prototype.startWith = function (x) {\n return startWith(x, this)\n}\n\n// -----------------------------------------------------------------------\n// Transforming\n\nimport { map, constant, tap } from './combinator/transform'\nimport { ap } from './combinator/applicative'\n\nexport { map, constant, tap, ap }\n\n/**\n * Transform each value in the stream by applying f to each\n * @param {function(*):*} f mapping function\n * @returns {Stream} stream containing items transformed by f\n */\nStream.prototype.map = function (f) {\n return map(f, this)\n}\n\n/**\n * Assume this stream contains functions, and apply each function to each item\n * in the provided stream. This generates, in effect, a cross product.\n * @param {Stream} xs stream of items to which\n * @returns {Stream} stream containing the cross product of items\n */\nStream.prototype.ap = function (xs) {\n return ap(this, xs)\n}\n\n/**\n * Replace each value in the stream with x\n * @param {*} x\n * @returns {Stream} stream containing items replaced with x\n */\nStream.prototype.constant = function (x) {\n return constant(x, this)\n}\n\n/**\n * Perform a side effect for each item in the stream\n * @param {function(x:*):*} f side effect to execute for each item. The\n * return value will be discarded.\n * @returns {Stream} new stream containing the same items as this stream\n */\nStream.prototype.tap = function (f) {\n return tap(f, this)\n}\n\n// -----------------------------------------------------------------------\n// Transducer support\n\nimport { transduce } from './combinator/transduce'\n\nexport { transduce }\n\n/**\n * Transform this stream by passing its events through a transducer.\n * @param {function} transducer transducer function\n * @return {Stream} stream of events transformed by the transducer\n */\nStream.prototype.transduce = function (transducer) {\n return transduce(transducer, this)\n}\n\n// -----------------------------------------------------------------------\n// FlatMapping\n\nimport { flatMap, join } from './combinator/flatMap'\n\n// @deprecated flatMap, use chain instead\nexport { flatMap, flatMap as chain, join }\n\n/**\n * Map each value in the stream to a new stream, and merge it into the\n * returned outer stream. Event arrival times are preserved.\n * @param {function(x:*):Stream} f chaining function, must return a Stream\n * @returns {Stream} new stream containing all events from each stream returned by f\n */\nStream.prototype.chain = function (f) {\n return flatMap(f, this)\n}\n\n// @deprecated use chain instead\nStream.prototype.flatMap = Stream.prototype.chain\n\n /**\n * Monadic join. Flatten a Stream> to Stream by merging inner\n * streams to the outer. Event arrival times are preserved.\n * @returns {Stream} new stream containing all events of all inner streams\n */\nStream.prototype.join = function () {\n return join(this)\n}\n\nimport { continueWith } from './combinator/continueWith'\n\n// @deprecated flatMapEnd, use continueWith instead\nexport { continueWith, continueWith as flatMapEnd }\n\n/**\n * Map the end event to a new stream, and begin emitting its values.\n * @param {function(x:*):Stream} f function that receives the end event value,\n * and *must* return a new Stream to continue with.\n * @returns {Stream} new stream that emits all events from the original stream,\n * followed by all events from the stream returned by f.\n */\nStream.prototype.continueWith = function (f) {\n return continueWith(f, this)\n}\n\n// @deprecated use continueWith instead\nStream.prototype.flatMapEnd = Stream.prototype.continueWith\n\nimport { concatMap } from './combinator/concatMap'\n\nexport { concatMap }\n\nStream.prototype.concatMap = function (f) {\n return concatMap(f, this)\n}\n\n// -----------------------------------------------------------------------\n// Concurrent merging\n\nimport { mergeConcurrently } from './combinator/mergeConcurrently'\n\nexport { mergeConcurrently }\n\n/**\n * Flatten a Stream> to Stream by merging inner\n * streams to the outer, limiting the number of inner streams that may\n * be active concurrently.\n * @param {number} concurrency at most this many inner streams will be\n * allowed to be active concurrently.\n * @return {Stream} new stream containing all events of all inner\n * streams, with limited concurrency.\n */\nStream.prototype.mergeConcurrently = function (concurrency) {\n return mergeConcurrently(concurrency, this)\n}\n\n// -----------------------------------------------------------------------\n// Merging\n\nimport { merge, mergeArray } from './combinator/merge'\n\nexport { merge, mergeArray }\n\n/**\n * Merge this stream and all the provided streams\n * @returns {Stream} stream containing items from this stream and s in time\n * order. If two events are simultaneous they will be merged in\n * arbitrary order.\n */\nStream.prototype.merge = function (/* ...streams*/) {\n return mergeArray(base.cons(this, arguments))\n}\n\n// -----------------------------------------------------------------------\n// Combining\n\nimport { combine, combineArray } from './combinator/combine'\n\nexport { combine, combineArray }\n\n/**\n * Combine latest events from all input streams\n * @param {function(...events):*} f function to combine most recent events\n * @returns {Stream} stream containing the result of applying f to the most recent\n * event of each input stream, whenever a new event arrives on any stream.\n */\nStream.prototype.combine = function (f /*, ...streams*/) {\n return combineArray(f, base.replace(this, 0, arguments))\n}\n\n// -----------------------------------------------------------------------\n// Sampling\n\nimport { sample, sampleArray, sampleWith } from './combinator/sample'\n\nexport { sample, sampleArray, sampleWith }\n\n/**\n * When an event arrives on sampler, emit the latest event value from stream.\n * @param {Stream} sampler stream of events at whose arrival time\n * signal's latest value will be propagated\n * @returns {Stream} sampled stream of values\n */\nStream.prototype.sampleWith = function (sampler) {\n return sampleWith(sampler, this)\n}\n\n/**\n * When an event arrives on this stream, emit the result of calling f with the latest\n * values of all streams being sampled\n * @param {function(...values):*} f function to apply to each set of sampled values\n * @returns {Stream} stream of sampled and transformed values\n */\nStream.prototype.sample = function (f /* ...streams */) {\n return sampleArray(f, this, base.tail(arguments))\n}\n\n// -----------------------------------------------------------------------\n// Zipping\n\nimport { zip, zipArray } from './combinator/zip'\n\nexport { zip, zipArray }\n\n/**\n * Pair-wise combine items with those in s. Given 2 streams:\n * [1,2,3] zipWith f [4,5,6] -> [f(1,4),f(2,5),f(3,6)]\n * Note: zip causes fast streams to buffer and wait for slow streams.\n * @param {function(a:Stream, b:Stream, ...):*} f function to combine items\n * @returns {Stream} new stream containing pairs\n */\nStream.prototype.zip = function (f /*, ...streams*/) {\n return zipArray(f, base.replace(this, 0, arguments))\n}\n\n// -----------------------------------------------------------------------\n// Switching\n\nimport { switchLatest } from './combinator/switch'\n\n// @deprecated switch, use switchLatest instead\nexport { switchLatest, switchLatest as switch }\n\n/**\n * Given a stream of streams, return a new stream that adopts the behavior\n * of the most recent inner stream.\n * @returns {Stream} switching stream\n */\nStream.prototype.switchLatest = function () {\n return switchLatest(this)\n}\n\n// @deprecated use switchLatest instead\nStream.prototype.switch = Stream.prototype.switchLatest\n\n// -----------------------------------------------------------------------\n// Filtering\n\nimport { filter, skipRepeats, skipRepeatsWith } from './combinator/filter'\n\n// @deprecated distinct, use skipRepeats instead\n// @deprecated distinctBy, use skipRepeatsWith instead\nexport { filter, skipRepeats, skipRepeats as distinct, skipRepeatsWith, skipRepeatsWith as distinctBy }\n\n/**\n * Retain only items matching a predicate\n * stream: -12345678-\n * filter(x => x % 2 === 0, stream): --2-4-6-8-\n * @param {function(x:*):boolean} p filtering predicate called for each item\n * @returns {Stream} stream containing only items for which predicate returns truthy\n */\nStream.prototype.filter = function (p) {\n return filter(p, this)\n}\n\n/**\n * Skip repeated events, using === to compare items\n * stream: -abbcd-\n * distinct(stream): -ab-cd-\n * @returns {Stream} stream with no repeated events\n */\nStream.prototype.skipRepeats = function () {\n return skipRepeats(this)\n}\n\n/**\n * Skip repeated events, using supplied equals function to compare items\n * @param {function(a:*, b:*):boolean} equals function to compare items\n * @returns {Stream} stream with no repeated events\n */\nStream.prototype.skipRepeatsWith = function (equals) {\n return skipRepeatsWith(equals, this)\n}\n\n// -----------------------------------------------------------------------\n// Slicing\n\nimport { take, skip, slice, takeWhile, skipWhile, skipAfter } from './combinator/slice'\n\nexport { take, skip, slice, takeWhile, skipWhile, skipAfter }\n\n/**\n * stream: -abcd-\n * take(2, stream): -ab|\n * @param {Number} n take up to this many events\n * @returns {Stream} stream containing at most the first n items from this stream\n */\nStream.prototype.take = function (n) {\n return take(n, this)\n}\n\n/**\n * stream: -abcd->\n * skip(2, stream): ---cd->\n * @param {Number} n skip this many events\n * @returns {Stream} stream not containing the first n events\n */\nStream.prototype.skip = function (n) {\n return skip(n, this)\n}\n\n/**\n * Slice a stream by event index. Equivalent to, but more efficient than\n * stream.take(end).skip(start);\n * NOTE: Negative start and end are not supported\n * @param {Number} start skip all events before the start index\n * @param {Number} end allow all events from the start index to the end index\n * @returns {Stream} stream containing items where start <= index < end\n */\nStream.prototype.slice = function (start, end) {\n return slice(start, end, this)\n}\n\n/**\n * stream: -123451234->\n * takeWhile(x => x < 5, stream): -1234|\n * @param {function(x:*):boolean} p predicate\n * @returns {Stream} stream containing items up to, but not including, the\n * first item for which p returns falsy.\n */\nStream.prototype.takeWhile = function (p) {\n return takeWhile(p, this)\n}\n\n/**\n * stream: -123451234->\n * skipWhile(x => x < 5, stream): -----51234->\n * @param {function(x:*):boolean} p predicate\n * @returns {Stream} stream containing items following *and including* the\n * first item for which p returns falsy.\n */\nStream.prototype.skipWhile = function (p) {\n return skipWhile(p, this)\n}\n\n/**\n * stream: -123456789->\n * skipAfter(x => x === 5, stream):-12345|\n * @param {function(x:*):boolean} p predicate\n * @returns {Stream} stream containing items up to, *and including*, the\n * first item for which p returns truthy.\n */\nStream.prototype.skipAfter = function (p) {\n return skipAfter(p, this)\n}\n\n// -----------------------------------------------------------------------\n// Time slicing\n\nimport { takeUntil, skipUntil, during } from './combinator/timeslice'\n\n// @deprecated takeUntil, use until instead\n// @deprecated skipUntil, use since instead\nexport { takeUntil, takeUntil as until, skipUntil, skipUntil as since, during }\n\n/**\n * stream: -a-b-c-d-e-f-g->\n * signal: -------x\n * takeUntil(signal, stream): -a-b-c-|\n * @param {Stream} signal retain only events in stream before the first\n * event in signal\n * @returns {Stream} new stream containing only events that occur before\n * the first event in signal.\n */\nStream.prototype.until = function (signal) {\n return takeUntil(signal, this)\n}\n\n// @deprecated use until instead\nStream.prototype.takeUntil = Stream.prototype.until\n\n /**\n * stream: -a-b-c-d-e-f-g->\n * signal: -------x\n * takeUntil(signal, stream): -------d-e-f-g->\n * @param {Stream} signal retain only events in stream at or after the first\n * event in signal\n * @returns {Stream} new stream containing only events that occur after\n * the first event in signal.\n */\nStream.prototype.since = function (signal) {\n return skipUntil(signal, this)\n}\n\n// @deprecated use since instead\nStream.prototype.skipUntil = Stream.prototype.since\n\n /**\n * stream: -a-b-c-d-e-f-g->\n * timeWindow: -----s\n * s: -----t\n * stream.during(timeWindow): -----c-d-e-|\n * @param {Stream} timeWindow a stream whose first event (s) represents\n * the window start time. That event (s) is itself a stream whose first event (t)\n * represents the window end time\n * @returns {Stream} new stream containing only events within the provided timespan\n */\nStream.prototype.during = function (timeWindow) {\n return during(timeWindow, this)\n}\n\n// -----------------------------------------------------------------------\n// Delaying\n\nimport { delay } from './combinator/delay'\n\nexport { delay }\n\n/**\n * @param {Number} delayTime milliseconds to delay each item\n * @returns {Stream} new stream containing the same items, but delayed by ms\n */\nStream.prototype.delay = function (delayTime) {\n return delay(delayTime, this)\n}\n\n// -----------------------------------------------------------------------\n// Getting event timestamp\n\nimport { timestamp } from './combinator/timestamp'\nexport { timestamp }\n\n/**\n * Expose event timestamps into the stream. Turns a Stream into\n * Stream<{time:t, value:X}>\n * @returns {Stream<{time:number, value:*}>}\n */\nStream.prototype.timestamp = function () {\n return timestamp(this)\n}\n\n// -----------------------------------------------------------------------\n// Rate limiting\n\nimport { throttle, debounce } from './combinator/limit'\n\nexport { throttle, debounce }\n\n/**\n * Limit the rate of events\n * stream: abcd----abcd----\n * throttle(2, stream): a-c-----a-c-----\n * @param {Number} period time to suppress events\n * @returns {Stream} new stream that skips events for throttle period\n */\nStream.prototype.throttle = function (period) {\n return throttle(period, this)\n}\n\n/**\n * Wait for a burst of events to subside and emit only the last event in the burst\n * stream: abcd----abcd----\n * debounce(2, stream): -----d-------d--\n * @param {Number} period events occuring more frequently than this\n * on the provided scheduler will be suppressed\n * @returns {Stream} new debounced stream\n */\nStream.prototype.debounce = function (period) {\n return debounce(period, this)\n}\n\n// -----------------------------------------------------------------------\n// Awaiting Promises\n\nimport { fromPromise, awaitPromises } from './combinator/promises'\n\n// @deprecated await, use awaitPromises instead\nexport { fromPromise, awaitPromises, awaitPromises as await }\n\n/**\n * Await promises, turning a Stream> into Stream. Preserves\n * event order, but timeshifts events based on promise resolution time.\n * @returns {Stream} stream containing non-promise values\n */\nStream.prototype.awaitPromises = function () {\n return awaitPromises(this)\n}\n\n// @deprecated use awaitPromises instead\nStream.prototype.await = Stream.prototype.awaitPromises\n\n// -----------------------------------------------------------------------\n// Error handling\n\nimport { recoverWith, flatMapError, throwError } from './combinator/errors'\n\n// @deprecated flatMapError, use recoverWith instead\nexport { recoverWith, flatMapError, throwError }\n\n/**\n * If this stream encounters an error, recover and continue with items from stream\n * returned by f.\n * stream: -a-b-c-X-\n * f(X): d-e-f-g-\n * flatMapError(f, stream): -a-b-c-d-e-f-g-\n * @param {function(error:*):Stream} f function which returns a new stream\n * @returns {Stream} new stream which will recover from an error by calling f\n */\nStream.prototype.recoverWith = function (f) {\n return flatMapError(f, this)\n}\n\n// @deprecated use recoverWith instead\nStream.prototype.flatMapError = Stream.prototype.recoverWith\n\n// -----------------------------------------------------------------------\n// Multicasting\n\nimport multicast from '@most/multicast'\n\nexport { multicast }\n\n/**\n * Transform the stream into multicast stream. That means that many subscribers\n * to the stream will not cause multiple invocations of the internal machinery.\n * @returns {Stream} new stream which will multicast events to all observers.\n */\nStream.prototype.multicast = function () {\n return multicast(this)\n}\n\n// export the instance of the defaultScheduler for third-party libraries\nimport defaultScheduler from './scheduler/defaultScheduler'\n\nexport { defaultScheduler }\n\n// export an implementation of Task used internally for third-party libraries\nimport PropagateTask from './scheduler/PropagateTask'\n\nexport { PropagateTask }\n"],"names":["const","let","map","base.map","base.id","empty","fatal","dispose.create","dispose.empty","runProducer","ponyfill","symbolObservable","base.findIndex","this","base.removeAll","dispose.settable","fatalError","tryEvent.tryEvent","arguments","base.compose","run","dispose.all","reduce","runSource","base.tail","emit","error","dispose.once","dispose.tryDispose","cons","streamOf","Sink","tail","core.empty","transform.map","identity","copy","base.copy","base.reduce","base.drop","getSource","just","tryEvent.tryEnd","tryEvent","tryEnd","startWith","base.cons","base.replace"],"mappings":";;;;;;AAAA;;;;AAIA,AAAe,SAAS,MAAM,EAAE,MAAM,EAAE;EACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;CACrB;;AAED,MAAM,CAAC,SAAS,CAAC,GAAG,GAAG,UAAU,IAAI,EAAE,SAAS,EAAE;EAChD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;CACxC,CAAA;;ACVD;;;;;;AAMA,AAAO,SAAS,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE;EAC1BA,IAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAA;EAClBA,IAAM,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;EAC1B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;EACR,KAAKC,IAAI,CAAC,GAAG,CAAC,EAAE,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,CAAC,MAAM,EAAE,IAAI,CAAC;CAC9B,CAAA;;;;;;;;;;AAUD,MAAM,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,MAAM,EAAE;EAC5C,OAAO,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;CAC9B,CAAA;;;;;AAKD;;;;;AAUA,MAAM,CAAC,SAAS,CAAC,aAAa,GAAG,YAAY;EAC3C,OAAO,aAAa,CAAC,IAAI,CAAC;CAC3B,CAAA;;;AAGD,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,aAAa,CAAA;;;;;AAKvD;;;;;;;;;AAcA,MAAM,CAAC,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,EAAE;EAC1C,OAAO,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC;CAC7B,CAAA;;;AAGD,MAAM,CAAC,SAAS,CAAC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW,CAAA;;;;;AAK5D,AAEA;;;;;AAOA,MAAM,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY;EACvC,OAAO,SAAS,CAAC,IAAI,CAAC;CACvB,CAAA;;;AAGD,AAEA,6EAGA,AAEA,AAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"most.js","sources":["../src/Stream.js","../node_modules/@most/prelude/dist/index.es.js","../src/disposable/Disposable.js","../src/disposable/SettableDisposable.js","../src/Promise.js","../src/disposable/dispose.js","../src/fatalError.js","../src/scheduler/PropagateTask.js","../src/source/core.js","../src/source/fromArray.js","../src/iterable.js","../src/source/fromIterable.js","../node_modules/symbol-observable/es/ponyfill.js","../node_modules/symbol-observable/es/index.js","../src/observable/getObservable.js","../src/source/tryEvent.js","../src/observable/fromObservable.js","../src/source/from.js","../src/source/periodic.js","../src/scheduler/ScheduledTask.js","../src/task.js","../src/scheduler/Scheduler.js","../src/scheduler/ClockTimer.js","../src/scheduler/Timeline.js","../src/scheduler/defaultScheduler.js","../src/observable/subscribe.js","../src/combinator/thru.js","../src/source/EventTargetSource.js","../src/sink/DeferredSink.js","../src/source/EventEmitterSource.js","../src/source/fromEvent.js","../src/runSource.js","../src/sink/Pipe.js","../src/fusion/Filter.js","../src/fusion/FilterMap.js","../src/fusion/Map.js","../src/combinator/transform.js","../src/combinator/observe.js","../src/combinator/loop.js","../src/combinator/accumulate.js","../src/source/unfold.js","../src/source/iterate.js","../src/source/generate.js","../src/combinator/continueWith.js","../src/combinator/build.js","../src/sink/IndexSink.js","../src/invoke.js","../src/combinator/combine.js","../src/combinator/applicative.js","../src/combinator/transduce.js","../src/LinkedList.js","../src/combinator/mergeConcurrently.js","../src/combinator/flatMap.js","../src/combinator/concatMap.js","../src/combinator/merge.js","../src/combinator/sample.js","../src/Queue.js","../src/combinator/zip.js","../src/combinator/switch.js","../src/combinator/filter.js","../src/combinator/slice.js","../src/combinator/timeslice.js","../src/combinator/delay.js","../src/combinator/timestamp.js","../src/combinator/limit.js","../src/combinator/promises.js","../src/sink/SafeSink.js","../src/combinator/errors.js","../node_modules/@most/multicast/dist/multicast.es.js","../src/index.js"],"sourcesContent":["/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function Stream (source) {\n this.source = source\n}\n\nStream.prototype.run = function (sink, scheduler) {\n return this.source.run(sink, scheduler)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n\n// Non-mutating array operations\n\n// cons :: a -> [a] -> [a]\n// a with x prepended\nfunction cons (x, a) {\n var l = a.length;\n var b = new Array(l + 1);\n b[0] = x;\n for (var i = 0; i < l; ++i) {\n b[i + 1] = a[i];\n }\n return b\n}\n\n// append :: a -> [a] -> [a]\n// a with x appended\nfunction append (x, a) {\n var l = a.length;\n var b = new Array(l + 1);\n for (var i = 0; i < l; ++i) {\n b[i] = a[i];\n }\n\n b[l] = x;\n return b\n}\n\n// drop :: Int -> [a] -> [a]\n// drop first n elements\nfunction drop (n, a) { // eslint-disable-line complexity\n if (n < 0) {\n throw new TypeError('n must be >= 0')\n }\n\n var l = a.length;\n if (n === 0 || l === 0) {\n return a\n }\n\n if (n >= l) {\n return []\n }\n\n return unsafeDrop(n, a, l - n)\n}\n\n// unsafeDrop :: Int -> [a] -> Int -> [a]\n// Internal helper for drop\nfunction unsafeDrop (n, a, l) {\n var b = new Array(l);\n for (var i = 0; i < l; ++i) {\n b[i] = a[n + i];\n }\n return b\n}\n\n// tail :: [a] -> [a]\n// drop head element\nfunction tail (a) {\n return drop(1, a)\n}\n\n// copy :: [a] -> [a]\n// duplicate a (shallow duplication)\nfunction copy (a) {\n var l = a.length;\n var b = new Array(l);\n for (var i = 0; i < l; ++i) {\n b[i] = a[i];\n }\n return b\n}\n\n// map :: (a -> b) -> [a] -> [b]\n// transform each element with f\nfunction map (f, a) {\n var l = a.length;\n var b = new Array(l);\n for (var i = 0; i < l; ++i) {\n b[i] = f(a[i]);\n }\n return b\n}\n\n// reduce :: (a -> b -> a) -> a -> [b] -> a\n// accumulate via left-fold\nfunction reduce (f, z, a) {\n var r = z;\n for (var i = 0, l = a.length; i < l; ++i) {\n r = f(r, a[i], i);\n }\n return r\n}\n\n// replace :: a -> Int -> [a]\n// replace element at index\nfunction replace (x, i, a) { // eslint-disable-line complexity\n if (i < 0) {\n throw new TypeError('i must be >= 0')\n }\n\n var l = a.length;\n var b = new Array(l);\n for (var j = 0; j < l; ++j) {\n b[j] = i === j ? x : a[j];\n }\n return b\n}\n\n// remove :: Int -> [a] -> [a]\n// remove element at index\nfunction remove (i, a) { // eslint-disable-line complexity\n if (i < 0) {\n throw new TypeError('i must be >= 0')\n }\n\n var l = a.length;\n if (l === 0 || i >= l) { // exit early if index beyond end of array\n return a\n }\n\n if (l === 1) { // exit early if index in bounds and length === 1\n return []\n }\n\n return unsafeRemove(i, a, l - 1)\n}\n\n// unsafeRemove :: Int -> [a] -> Int -> [a]\n// Internal helper to remove element at index\nfunction unsafeRemove (i, a, l) {\n var b = new Array(l);\n var j;\n for (j = 0; j < i; ++j) {\n b[j] = a[j];\n }\n for (j = i; j < l; ++j) {\n b[j] = a[j + 1];\n }\n\n return b\n}\n\n// removeAll :: (a -> boolean) -> [a] -> [a]\n// remove all elements matching a predicate\nfunction removeAll (f, a) {\n var l = a.length;\n var b = new Array(l);\n var j = 0;\n for (var x = (void 0), i = 0; i < l; ++i) {\n x = a[i];\n if (!f(x)) {\n b[j] = x;\n ++j;\n }\n }\n\n b.length = j;\n return b\n}\n\n// findIndex :: a -> [a] -> Int\n// find index of x in a, from the left\nfunction findIndex (x, a) {\n for (var i = 0, l = a.length; i < l; ++i) {\n if (x === a[i]) {\n return i\n }\n }\n return -1\n}\n\n// isArrayLike :: * -> boolean\n// Return true iff x is array-like\nfunction isArrayLike (x) {\n return x != null && typeof x.length === 'number' && typeof x !== 'function'\n}\n\n/** @license MIT License (c) copyright 2010-2016 original author or authors */\n\n// id :: a -> a\nvar id = function (x) { return x; };\n\n// compose :: (b -> c) -> (a -> b) -> (a -> c)\nvar compose = function (f, g) { return function (x) { return f(g(x)); }; };\n\n// apply :: (a -> b) -> a -> b\nvar apply = function (f, x) { return f(x); };\n\n// curry2 :: ((a, b) -> c) -> (a -> b -> c)\nfunction curry2 (f) {\n function curried (a, b) {\n switch (arguments.length) {\n case 0: return curried\n case 1: return function (b) { return f(a, b); }\n default: return f(a, b)\n }\n }\n return curried\n}\n\n// curry3 :: ((a, b, c) -> d) -> (a -> b -> c -> d)\nfunction curry3 (f) {\n function curried (a, b, c) { // eslint-disable-line complexity\n switch (arguments.length) {\n case 0: return curried\n case 1: return curry2(function (b, c) { return f(a, b, c); })\n case 2: return function (c) { return f(a, b, c); }\n default:return f(a, b, c)\n }\n }\n return curried\n}\n\n// curry4 :: ((a, b, c, d) -> e) -> (a -> b -> c -> d -> e)\nfunction curry4 (f) {\n function curried (a, b, c, d) { // eslint-disable-line complexity\n switch (arguments.length) {\n case 0: return curried\n case 1: return curry3(function (b, c, d) { return f(a, b, c, d); })\n case 2: return curry2(function (c, d) { return f(a, b, c, d); })\n case 3: return function (d) { return f(a, b, c, d); }\n default:return f(a, b, c, d)\n }\n }\n return curried\n}\n\n/** @license MIT License (c) copyright 2016 original author or authors */\n\nexport { cons, append, drop, tail, copy, map, reduce, replace, remove, removeAll, findIndex, isArrayLike, id, compose, apply, curry2, curry3, curry4 };\n//# sourceMappingURL=index.es.js.map\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * Create a new Disposable which will dispose its underlying resource.\n * @param {function} dispose function\n * @param {*?} data any data to be passed to disposer function\n * @constructor\n */\nexport default function Disposable (dispose, data) {\n this._dispose = dispose\n this._data = data\n}\n\nDisposable.prototype.dispose = function () {\n return this._dispose(this._data)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function SettableDisposable () {\n this.disposable = void 0\n this.disposed = false\n this._resolve = void 0\n\n var self = this\n this.result = new Promise(function (resolve) {\n self._resolve = resolve\n })\n}\n\nSettableDisposable.prototype.setDisposable = function (disposable) {\n if (this.disposable !== void 0) {\n throw new Error('setDisposable called more than once')\n }\n\n this.disposable = disposable\n\n if (this.disposed) {\n this._resolve(disposable.dispose())\n }\n}\n\nSettableDisposable.prototype.dispose = function () {\n if (this.disposed) {\n return this.result\n }\n\n this.disposed = true\n\n if (this.disposable !== void 0) {\n this.result = this.disposable.dispose()\n }\n\n return this.result\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function isPromise (p) {\n return p !== null && typeof p === 'object' && typeof p.then === 'function'\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\nimport Disposable from './Disposable'\nimport SettableDisposable from './SettableDisposable'\nimport { isPromise } from '../Promise'\nimport * as base from '@most/prelude'\n\nvar map = base.map\nvar identity = base.id\n\n/**\n * Call disposable.dispose. If it returns a promise, catch promise\n * error and forward it through the provided sink.\n * @param {number} t time\n * @param {{dispose: function}} disposable\n * @param {{error: function}} sink\n * @return {*} result of disposable.dispose\n */\nexport function tryDispose (t, disposable, sink) {\n var result = disposeSafely(disposable)\n return isPromise(result)\n ? result.catch(function (e) {\n sink.error(t, e)\n })\n : result\n}\n\n/**\n * Create a new Disposable which will dispose its underlying resource\n * at most once.\n * @param {function} dispose function\n * @param {*?} data any data to be passed to disposer function\n * @return {Disposable}\n */\nexport function create (dispose, data) {\n return once(new Disposable(dispose, data))\n}\n\n/**\n * Create a noop disposable. Can be used to satisfy a Disposable\n * requirement when no actual resource needs to be disposed.\n * @return {Disposable|exports|module.exports}\n */\nexport function empty () {\n return new Disposable(identity, void 0)\n}\n\n/**\n * Create a disposable that will dispose all input disposables in parallel.\n * @param {Array} disposables\n * @return {Disposable}\n */\nexport function all (disposables) {\n return create(disposeAll, disposables)\n}\n\nfunction disposeAll (disposables) {\n return Promise.all(map(disposeSafely, disposables))\n}\n\nfunction disposeSafely (disposable) {\n try {\n return disposable.dispose()\n } catch (e) {\n return Promise.reject(e)\n }\n}\n\n/**\n * Create a disposable from a promise for another disposable\n * @param {Promise} disposablePromise\n * @return {Disposable}\n */\nexport function promised (disposablePromise) {\n return create(disposePromise, disposablePromise)\n}\n\nfunction disposePromise (disposablePromise) {\n return disposablePromise.then(disposeOne)\n}\n\nfunction disposeOne (disposable) {\n return disposable.dispose()\n}\n\n/**\n * Create a disposable proxy that allows its underlying disposable to\n * be set later.\n * @return {SettableDisposable}\n */\nexport function settable () {\n return new SettableDisposable()\n}\n\n/**\n * Wrap an existing disposable (which may not already have been once()d)\n * so that it will only dispose its underlying resource at most once.\n * @param {{ dispose: function() }} disposable\n * @return {Disposable} wrapped disposable\n */\nexport function once (disposable) {\n return new Disposable(disposeMemoized, memoized(disposable))\n}\n\nfunction disposeMemoized (memoized) {\n if (!memoized.disposed) {\n memoized.disposed = true\n memoized.value = disposeSafely(memoized.disposable)\n memoized.disposable = void 0\n }\n\n return memoized.value\n}\n\nfunction memoized (disposable) {\n return { disposed: false, disposable: disposable, value: void 0 }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function fatalError (e) {\n setTimeout(function () {\n throw e\n }, 0)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport fatal from '../fatalError'\n\nexport default function PropagateTask (run, value, sink) {\n this._run = run\n this.value = value\n this.sink = sink\n this.active = true\n}\n\nPropagateTask.event = function (value, sink) {\n return new PropagateTask(emit, value, sink)\n}\n\nPropagateTask.end = function (value, sink) {\n return new PropagateTask(end, value, sink)\n}\n\nPropagateTask.error = function (value, sink) {\n return new PropagateTask(error, value, sink)\n}\n\nPropagateTask.prototype.dispose = function () {\n this.active = false\n}\n\nPropagateTask.prototype.run = function (t) {\n if (!this.active) {\n return\n }\n this._run(t, this.value, this.sink)\n}\n\nPropagateTask.prototype.error = function (t, e) {\n if (!this.active) {\n return fatal(e)\n }\n this.sink.error(t, e)\n}\n\nfunction error (t, e, sink) {\n sink.error(t, e)\n}\n\nfunction emit (t, x, sink) {\n sink.event(t, x)\n}\n\nfunction end (t, x, sink) {\n sink.end(t, x)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * Stream containing only x\n * @param {*} x\n * @returns {Stream}\n */\nexport function of (x) {\n return new Stream(new Just(x))\n}\n\nfunction Just (x) {\n this.value = x\n}\n\nJust.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runJust, this.value, sink))\n}\n\nfunction runJust (t, x, sink) {\n sink.event(t, x)\n sink.end(t, void 0)\n}\n\n/**\n * Stream containing no events and ends immediately\n * @returns {Stream}\n */\nexport function empty () {\n return EMPTY\n}\n\nfunction EmptySource () {}\n\nEmptySource.prototype.run = function (sink, scheduler) {\n var task = PropagateTask.end(void 0, sink)\n scheduler.asap(task)\n\n return dispose.create(disposeEmpty, task)\n}\n\nfunction disposeEmpty (task) {\n return task.dispose()\n}\n\nvar EMPTY = new Stream(new EmptySource())\n\n/**\n * Stream containing no events and never ends\n * @returns {Stream}\n */\nexport function never () {\n return NEVER\n}\n\nfunction NeverSource () {}\n\nNeverSource.prototype.run = function () {\n return dispose.empty()\n}\n\nvar NEVER = new Stream(new NeverSource())\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport PropagateTask from '../scheduler/PropagateTask'\n\nexport function fromArray (a) {\n return new Stream(new ArraySource(a))\n}\n\nfunction ArraySource (a) {\n this.array = a\n}\n\nArraySource.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runProducer, this.array, sink))\n}\n\nfunction runProducer (t, array, sink) {\n for (var i = 0, l = array.length; i < l && this.active; ++i) {\n sink.event(t, array[i])\n }\n\n this.active && sink.end(t)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/*global Set, Symbol*/\nvar iteratorSymbol\n// Firefox ships a partial implementation using the name @@iterator.\n// https://bugzilla.mozilla.org/show_bug.cgi?id=907077#c14\nif (typeof Set === 'function' && typeof new Set()['@@iterator'] === 'function') {\n iteratorSymbol = '@@iterator'\n} else {\n iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator ||\n '_es6shim_iterator_'\n}\n\nexport function isIterable (o) {\n return typeof o[iteratorSymbol] === 'function'\n}\n\nexport function getIterator (o) {\n return o[iteratorSymbol]()\n}\n\nexport function makeIterable (f, o) {\n o[iteratorSymbol] = f\n return o\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport { getIterator } from '../iterable'\nimport PropagateTask from '../scheduler/PropagateTask'\n\nexport function fromIterable (iterable) {\n return new Stream(new IterableSource(iterable))\n}\n\nfunction IterableSource (iterable) {\n this.iterable = iterable\n}\n\nIterableSource.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runProducer, getIterator(this.iterable), sink))\n}\n\nfunction runProducer (t, iterator, sink) {\n var r = iterator.next()\n\n while (!r.done && this.active) {\n sink.event(t, r.value)\n r = iterator.next()\n }\n\n sink.end(t, r.value)\n}\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","/* global window */\nimport ponyfill from './ponyfill';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport symbolObservable from 'symbol-observable'\n\nexport default function getObservable (o) { // eslint-disable-line complexity\n var obs = null\n if (o) {\n // Access foreign method only once\n var method = o[symbolObservable]\n if (typeof method === 'function') {\n obs = method.call(o)\n if (!(obs && typeof obs.subscribe === 'function')) {\n throw new TypeError('invalid observable ' + obs)\n }\n }\n }\n\n return obs\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function tryEvent (t, x, sink) {\n try {\n sink.event(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nexport function tryEnd (t, x, sink) {\n try {\n sink.end(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\nimport { tryEnd, tryEvent } from '../source/tryEvent'\n\nexport function fromObservable (observable) {\n return new Stream(new ObservableSource(observable))\n}\n\nexport function ObservableSource (observable) {\n this.observable = observable\n}\n\nObservableSource.prototype.run = function (sink, scheduler) {\n var sub = this.observable.subscribe(new SubscriberSink(sink, scheduler))\n if (typeof sub === 'function') {\n return dispose.create(sub)\n } else if (sub && typeof sub.unsubscribe === 'function') {\n return dispose.create(unsubscribe, sub)\n }\n\n throw new TypeError('Observable returned invalid subscription ' + String(sub))\n}\n\nexport function SubscriberSink (sink, scheduler) {\n this.sink = sink\n this.scheduler = scheduler\n}\n\nSubscriberSink.prototype.next = function (x) {\n tryEvent(this.scheduler.now(), x, this.sink)\n}\n\nSubscriberSink.prototype.complete = function (x) {\n tryEnd(this.scheduler.now(), x, this.sink)\n}\n\nSubscriberSink.prototype.error = function (e) {\n this.sink.error(this.scheduler.now(), e)\n}\n\nfunction unsubscribe (subscription) {\n return subscription.unsubscribe()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport { fromArray } from './fromArray'\nimport { isIterable } from '../iterable'\nimport { fromIterable } from './fromIterable'\nimport getObservable from '../observable/getObservable'\nimport { fromObservable } from '../observable/fromObservable'\nimport { isArrayLike } from '@most/prelude'\n\nexport function from (a) { // eslint-disable-line complexity\n if (a instanceof Stream) {\n return a\n }\n\n var observable = getObservable(a)\n if (observable != null) {\n return fromObservable(observable)\n }\n\n if (Array.isArray(a) || isArrayLike(a)) {\n return fromArray(a)\n }\n\n if (isIterable(a)) {\n return fromIterable(a)\n }\n\n throw new TypeError('from(x) must be observable, iterable, or array-like: ' + a)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * Create a stream that emits the current time periodically\n * @param {Number} period periodicity of events in millis\n * @param {*} deprecatedValue @deprecated value to emit each period\n * @returns {Stream} new stream that emits the current time every period\n */\nexport function periodic (period, deprecatedValue) {\n return new Stream(new Periodic(period, deprecatedValue))\n}\n\nfunction Periodic (period, value) {\n this.period = period\n this.value = value\n}\n\nPeriodic.prototype.run = function (sink, scheduler) {\n return scheduler.periodic(this.period, PropagateTask.event(this.value, sink))\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function ScheduledTask (delay, period, task, scheduler) {\n this.time = delay\n this.period = period\n this.task = task\n this.scheduler = scheduler\n this.active = true\n}\n\nScheduledTask.prototype.run = function () {\n return this.task.run(this.time)\n}\n\nScheduledTask.prototype.error = function (e) {\n return this.task.error(this.time, e)\n}\n\nScheduledTask.prototype.dispose = function () {\n this.scheduler.cancel(this)\n return this.task.dispose()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function defer (task) {\n return Promise.resolve(task).then(runTask)\n}\n\nexport function runTask (task) {\n try {\n return task.run()\n } catch (e) {\n return task.error(e)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport ScheduledTask from './ScheduledTask'\nimport { runTask } from '../task'\n\nexport default function Scheduler (timer, timeline) {\n this.timer = timer\n this.timeline = timeline\n\n this._timer = null\n this._nextArrival = Infinity\n\n var self = this\n this._runReadyTasksBound = function () {\n self._runReadyTasks(self.now())\n }\n}\n\nScheduler.prototype.now = function () {\n return this.timer.now()\n}\n\nScheduler.prototype.asap = function (task) {\n return this.schedule(0, -1, task)\n}\n\nScheduler.prototype.delay = function (delay, task) {\n return this.schedule(delay, -1, task)\n}\n\nScheduler.prototype.periodic = function (period, task) {\n return this.schedule(0, period, task)\n}\n\nScheduler.prototype.schedule = function (delay, period, task) {\n var now = this.now()\n var st = new ScheduledTask(now + Math.max(0, delay), period, task, this)\n\n this.timeline.add(st)\n this._scheduleNextRun(now)\n return st\n}\n\nScheduler.prototype.cancel = function (task) {\n task.active = false\n if (this.timeline.remove(task)) {\n this._reschedule()\n }\n}\n\nScheduler.prototype.cancelAll = function (f) {\n this.timeline.removeAll(f)\n this._reschedule()\n}\n\nScheduler.prototype._reschedule = function () {\n if (this.timeline.isEmpty()) {\n this._unschedule()\n } else {\n this._scheduleNextRun(this.now())\n }\n}\n\nScheduler.prototype._unschedule = function () {\n this.timer.clearTimer(this._timer)\n this._timer = null\n}\n\nScheduler.prototype._scheduleNextRun = function (now) { // eslint-disable-line complexity\n if (this.timeline.isEmpty()) {\n return\n }\n\n var nextArrival = this.timeline.nextArrival()\n\n if (this._timer === null) {\n this._scheduleNextArrival(nextArrival, now)\n } else if (nextArrival < this._nextArrival) {\n this._unschedule()\n this._scheduleNextArrival(nextArrival, now)\n }\n}\n\nScheduler.prototype._scheduleNextArrival = function (nextArrival, now) {\n this._nextArrival = nextArrival\n var delay = Math.max(0, nextArrival - now)\n this._timer = this.timer.setTimer(this._runReadyTasksBound, delay)\n}\n\nScheduler.prototype._runReadyTasks = function (now) {\n this._timer = null\n this.timeline.runTasks(now, runTask)\n this._scheduleNextRun(this.now())\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { defer } from '../task'\n\n/*global setTimeout, clearTimeout*/\n\nexport default function ClockTimer () {}\n\nClockTimer.prototype.now = Date.now\n\nClockTimer.prototype.setTimer = function (f, dt) {\n return dt <= 0 ? runAsap(f) : setTimeout(f, dt)\n}\n\nClockTimer.prototype.clearTimer = function (t) {\n return t instanceof Asap ? t.cancel() : clearTimeout(t)\n}\n\nfunction Asap (f) {\n this.f = f\n this.active = true\n}\n\nAsap.prototype.run = function () {\n return this.active && this.f()\n}\n\nAsap.prototype.error = function (e) {\n throw e\n}\n\nAsap.prototype.cancel = function () {\n this.active = false\n}\n\nfunction runAsap (f) {\n var task = new Asap(f)\n defer(task)\n return task\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport * as base from '@most/prelude'\n\nexport default function Timeline () {\n this.tasks = []\n}\n\nTimeline.prototype.nextArrival = function () {\n return this.isEmpty() ? Infinity : this.tasks[0].time\n}\n\nTimeline.prototype.isEmpty = function () {\n return this.tasks.length === 0\n}\n\nTimeline.prototype.add = function (st) {\n insertByTime(st, this.tasks)\n}\n\nTimeline.prototype.remove = function (st) {\n var i = binarySearch(st.time, this.tasks)\n\n if (i >= 0 && i < this.tasks.length) {\n var at = base.findIndex(st, this.tasks[i].events)\n if (at >= 0) {\n this.tasks[i].events.splice(at, 1)\n return true\n }\n }\n\n return false\n}\n\nTimeline.prototype.removeAll = function (f) {\n for (var i = 0, l = this.tasks.length; i < l; ++i) {\n removeAllFrom(f, this.tasks[i])\n }\n}\n\nTimeline.prototype.runTasks = function (t, runTask) {\n var tasks = this.tasks\n var l = tasks.length\n var i = 0\n\n while (i < l && tasks[i].time <= t) {\n ++i\n }\n\n this.tasks = tasks.slice(i)\n\n // Run all ready tasks\n for (var j = 0; j < i; ++j) {\n this.tasks = runTasks(runTask, tasks[j], this.tasks)\n }\n}\n\nfunction runTasks (runTask, timeslot, tasks) { // eslint-disable-line complexity\n var events = timeslot.events\n for (var i = 0; i < events.length; ++i) {\n var task = events[i]\n\n if (task.active) {\n runTask(task)\n\n // Reschedule periodic repeating tasks\n // Check active again, since a task may have canceled itself\n if (task.period >= 0 && task.active) {\n task.time = task.time + task.period\n insertByTime(task, tasks)\n }\n }\n }\n\n return tasks\n}\n\nfunction insertByTime (task, timeslots) { // eslint-disable-line complexity\n var l = timeslots.length\n\n if (l === 0) {\n timeslots.push(newTimeslot(task.time, [task]))\n return\n }\n\n var i = binarySearch(task.time, timeslots)\n\n if (i >= l) {\n timeslots.push(newTimeslot(task.time, [task]))\n } else if (task.time === timeslots[i].time) {\n timeslots[i].events.push(task)\n } else {\n timeslots.splice(i, 0, newTimeslot(task.time, [task]))\n }\n}\n\nfunction removeAllFrom (f, timeslot) {\n timeslot.events = base.removeAll(f, timeslot.events)\n}\n\nfunction binarySearch (t, sortedArray) { // eslint-disable-line complexity\n var lo = 0\n var hi = sortedArray.length\n var mid, y\n\n while (lo < hi) {\n mid = Math.floor((lo + hi) / 2)\n y = sortedArray[mid]\n\n if (t === y.time) {\n return mid\n } else if (t < y.time) {\n hi = mid\n } else {\n lo = mid + 1\n }\n }\n return hi\n}\n\nfunction newTimeslot (t, events) {\n return { time: t, events: events }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Scheduler from './Scheduler'\nimport ClockTimer from './ClockTimer'\nimport Timeline from './Timeline'\n\nvar defaultScheduler = new Scheduler(new ClockTimer(), new Timeline())\n\nexport default defaultScheduler\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport defaultScheduler from '../scheduler/defaultScheduler'\nimport * as dispose from '../disposable/dispose'\nimport fatalError from '../fatalError'\n\nexport function subscribe (subscriber, stream) {\n if (Object(subscriber) !== subscriber) {\n throw new TypeError('subscriber must be an object')\n }\n\n var disposable = dispose.settable()\n var observer = new SubscribeObserver(fatalError, subscriber, disposable)\n\n disposable.setDisposable(stream.source.run(observer, defaultScheduler))\n\n return new Subscription(disposable)\n}\n\nexport function SubscribeObserver (fatalError, subscriber, disposable) {\n this.fatalError = fatalError\n this.subscriber = subscriber\n this.disposable = disposable\n}\n\nSubscribeObserver.prototype.event = function (t, x) {\n if (!this.disposable.disposed && typeof this.subscriber.next === 'function') {\n this.subscriber.next(x)\n }\n}\n\nSubscribeObserver.prototype.end = function (t, x) {\n if (!this.disposable.disposed) {\n var s = this.subscriber\n doDispose(this.fatalError, s, s.complete, s.error, this.disposable, x)\n }\n}\n\nSubscribeObserver.prototype.error = function (t, e) {\n var s = this.subscriber\n doDispose(this.fatalError, s, s.error, s.error, this.disposable, e)\n}\n\nexport function Subscription (disposable) {\n this.disposable = disposable\n}\n\nSubscription.prototype.unsubscribe = function () {\n this.disposable.dispose()\n}\n\nfunction doDispose (fatal, subscriber, complete, error, disposable, x) {\n Promise.resolve(disposable.dispose()).then(function () {\n if (typeof complete === 'function') {\n complete.call(subscriber, x)\n }\n }).catch(function (e) {\n if (typeof error === 'function') {\n error.call(subscriber, e)\n }\n }).catch(fatal)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport function thru (f, stream) {\n return f(stream)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport * as dispose from '../disposable/dispose'\nimport * as tryEvent from './tryEvent'\n\nexport default function EventTargetSource (event, source, capture) {\n this.event = event\n this.source = source\n this.capture = capture\n}\n\nEventTargetSource.prototype.run = function (sink, scheduler) {\n function addEvent (e) {\n tryEvent.tryEvent(scheduler.now(), e, sink)\n }\n\n this.source.addEventListener(this.event, addEvent, this.capture)\n\n return dispose.create(disposeEventTarget,\n { target: this, addEvent: addEvent })\n}\n\nfunction disposeEventTarget (info) {\n var target = info.target\n target.source.removeEventListener(target.event, info.addEvent, target.capture)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { defer } from '../task'\n\nexport default function DeferredSink (sink) {\n this.sink = sink\n this.events = []\n this.active = true\n}\n\nDeferredSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n\n if (this.events.length === 0) {\n defer(new PropagateAllTask(this.sink, t, this.events))\n }\n\n this.events.push({ time: t, value: x })\n}\n\nDeferredSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n\n this._end(new EndTask(t, x, this.sink))\n}\n\nDeferredSink.prototype.error = function (t, e) {\n this._end(new ErrorTask(t, e, this.sink))\n}\n\nDeferredSink.prototype._end = function (task) {\n this.active = false\n defer(task)\n}\n\nfunction PropagateAllTask (sink, time, events) {\n this.sink = sink\n this.events = events\n this.time = time\n}\n\nPropagateAllTask.prototype.run = function () {\n var events = this.events\n var sink = this.sink\n var event\n\n for (var i = 0, l = events.length; i < l; ++i) {\n event = events[i]\n this.time = event.time\n sink.event(event.time, event.value)\n }\n\n events.length = 0\n}\n\nPropagateAllTask.prototype.error = function (e) {\n this.sink.error(this.time, e)\n}\n\nfunction EndTask (t, x, sink) {\n this.time = t\n this.value = x\n this.sink = sink\n}\n\nEndTask.prototype.run = function () {\n this.sink.end(this.time, this.value)\n}\n\nEndTask.prototype.error = function (e) {\n this.sink.error(this.time, e)\n}\n\nfunction ErrorTask (t, e, sink) {\n this.time = t\n this.value = e\n this.sink = sink\n}\n\nErrorTask.prototype.run = function () {\n this.sink.error(this.time, this.value)\n}\n\nErrorTask.prototype.error = function (e) {\n throw e\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport DeferredSink from '../sink/DeferredSink'\nimport * as dispose from '../disposable/dispose'\nimport * as tryEvent from './tryEvent'\n\nexport default function EventEmitterSource (event, source) {\n this.event = event\n this.source = source\n}\n\nEventEmitterSource.prototype.run = function (sink, scheduler) {\n // NOTE: Because EventEmitter allows events in the same call stack as\n // a listener is added, use a DeferredSink to buffer events\n // until the stack clears, then propagate. This maintains most.js's\n // invariant that no event will be delivered in the same call stack\n // as an observer begins observing.\n var dsink = new DeferredSink(sink)\n\n function addEventVariadic (a) {\n var l = arguments.length\n if (l > 1) {\n var arr = new Array(l)\n for (var i = 0; i < l; ++i) {\n arr[i] = arguments[i]\n }\n tryEvent.tryEvent(scheduler.now(), arr, dsink)\n } else {\n tryEvent.tryEvent(scheduler.now(), a, dsink)\n }\n }\n\n this.source.addListener(this.event, addEventVariadic)\n\n return dispose.create(disposeEventEmitter, { target: this, addEvent: addEventVariadic })\n}\n\nfunction disposeEventEmitter (info) {\n var target = info.target\n target.source.removeListener(target.event, info.addEvent)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport EventTargetSource from './EventTargetSource'\nimport EventEmitterSource from './EventEmitterSource'\n\n/**\n * Create a stream from an EventTarget, such as a DOM Node, or EventEmitter.\n * @param {String} event event type name, e.g. 'click'\n * @param {EventTarget|EventEmitter} source EventTarget or EventEmitter\n * @param {*?} capture for DOM events, whether to use\n * capturing--passed as 3rd parameter to addEventListener.\n * @returns {Stream} stream containing all events of the specified type\n * from the source.\n */\nexport function fromEvent (event, source, capture) { // eslint-disable-line complexity\n var s\n\n if (typeof source.addEventListener === 'function' && typeof source.removeEventListener === 'function') {\n if (arguments.length < 3) {\n capture = false\n }\n\n s = new EventTargetSource(event, source, capture)\n } else if (typeof source.addListener === 'function' && typeof source.removeListener === 'function') {\n s = new EventEmitterSource(event, source)\n } else {\n throw new Error('source must support addEventListener/removeEventListener or addListener/removeListener')\n }\n\n return new Stream(s)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport * as dispose from './disposable/dispose'\nimport defaultScheduler from './scheduler/defaultScheduler'\n\nexport function withDefaultScheduler (source) {\n return withScheduler(source, defaultScheduler)\n}\n\nexport function withScheduler (source, scheduler) {\n return new Promise(function (resolve, reject) {\n runSource(source, scheduler, resolve, reject)\n })\n}\n\nfunction runSource (source, scheduler, resolve, reject) {\n var disposable = dispose.settable()\n var observer = new Drain(resolve, reject, disposable)\n\n disposable.setDisposable(source.run(observer, scheduler))\n}\n\nfunction Drain (end, error, disposable) {\n this._end = end\n this._error = error\n this._disposable = disposable\n this.active = true\n}\n\nDrain.prototype.event = function (t, x) {}\n\nDrain.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n this.active = false\n disposeThen(this._end, this._error, this._disposable, x)\n}\n\nDrain.prototype.error = function (t, e) {\n this.active = false\n disposeThen(this._error, this._error, this._disposable, e)\n}\n\nfunction disposeThen (end, error, disposable, x) {\n Promise.resolve(disposable.dispose()).then(function () {\n end(x)\n }, error)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * A sink mixin that simply forwards event, end, and error to\n * another sink.\n * @param sink\n * @constructor\n */\nexport default function Pipe (sink) {\n this.sink = sink\n}\n\nPipe.prototype.event = function (t, x) {\n return this.sink.event(t, x)\n}\n\nPipe.prototype.end = function (t, x) {\n return this.sink.end(t, x)\n}\n\nPipe.prototype.error = function (t, e) {\n return this.sink.error(t, e)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Pipe from '../sink/Pipe'\n\nexport default function Filter (p, source) {\n this.p = p\n this.source = source\n}\n\n/**\n * Create a filtered source, fusing adjacent filter.filter if possible\n * @param {function(x:*):boolean} p filtering predicate\n * @param {{run:function}} source source to filter\n * @returns {Filter} filtered source\n */\nFilter.create = function createFilter (p, source) {\n if (source instanceof Filter) {\n return new Filter(and(source.p, p), source.source)\n }\n\n return new Filter(p, source)\n}\n\nFilter.prototype.run = function (sink, scheduler) {\n return this.source.run(new FilterSink(this.p, sink), scheduler)\n}\n\nfunction FilterSink (p, sink) {\n this.p = p\n this.sink = sink\n}\n\nFilterSink.prototype.end = Pipe.prototype.end\nFilterSink.prototype.error = Pipe.prototype.error\n\nFilterSink.prototype.event = function (t, x) {\n var p = this.p\n p(x) && this.sink.event(t, x)\n}\n\nfunction and (p, q) {\n return function (x) {\n return p(x) && q(x)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Pipe from '../sink/Pipe'\n\nexport default function FilterMap (p, f, source) {\n this.p = p\n this.f = f\n this.source = source\n}\n\nFilterMap.prototype.run = function (sink, scheduler) {\n return this.source.run(new FilterMapSink(this.p, this.f, sink), scheduler)\n}\n\nfunction FilterMapSink (p, f, sink) {\n this.p = p\n this.f = f\n this.sink = sink\n}\n\nFilterMapSink.prototype.event = function (t, x) {\n var f = this.f\n var p = this.p\n p(x) && this.sink.event(t, f(x))\n}\n\nFilterMapSink.prototype.end = Pipe.prototype.end\nFilterMapSink.prototype.error = Pipe.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Pipe from '../sink/Pipe'\nimport Filter from './Filter'\nimport FilterMap from './FilterMap'\nimport * as base from '@most/prelude'\n\nexport default function Map (f, source) {\n this.f = f\n this.source = source\n}\n\n/**\n * Create a mapped source, fusing adjacent map.map, filter.map,\n * and filter.map.map if possible\n * @param {function(*):*} f mapping function\n * @param {{run:function}} source source to map\n * @returns {Map|FilterMap} mapped source, possibly fused\n */\nMap.create = function createMap (f, source) {\n if (source instanceof Map) {\n return new Map(base.compose(f, source.f), source.source)\n }\n\n if (source instanceof Filter) {\n return new FilterMap(source.p, f, source.source)\n }\n\n return new Map(f, source)\n}\n\nMap.prototype.run = function (sink, scheduler) { // eslint-disable-line no-extend-native\n return this.source.run(new MapSink(this.f, sink), scheduler)\n}\n\nfunction MapSink (f, sink) {\n this.f = f\n this.sink = sink\n}\n\nMapSink.prototype.end = Pipe.prototype.end\nMapSink.prototype.error = Pipe.prototype.error\n\nMapSink.prototype.event = function (t, x) {\n var f = this.f\n this.sink.event(t, f(x))\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Map from '../fusion/Map'\nimport Pipe from '../sink/Pipe'\n\n/**\n * Transform each value in the stream by applying f to each\n * @param {function(*):*} f mapping function\n * @param {Stream} stream stream to map\n * @returns {Stream} stream containing items transformed by f\n */\nexport function map (f, stream) {\n return new Stream(Map.create(f, stream.source))\n}\n\n/**\n* Replace each value in the stream with x\n* @param {*} x\n* @param {Stream} stream\n* @returns {Stream} stream containing items replaced with x\n*/\nexport function constant (x, stream) {\n return map(function () {\n return x\n }, stream)\n}\n\n/**\n* Perform a side effect for each item in the stream\n* @param {function(x:*):*} f side effect to execute for each item. The\n* return value will be discarded.\n* @param {Stream} stream stream to tap\n* @returns {Stream} new stream containing the same items as this stream\n*/\nexport function tap (f, stream) {\n return new Stream(new Tap(f, stream.source))\n}\n\nfunction Tap (f, source) {\n this.source = source\n this.f = f\n}\n\nTap.prototype.run = function (sink, scheduler) {\n return this.source.run(new TapSink(this.f, sink), scheduler)\n}\n\nfunction TapSink (f, sink) {\n this.sink = sink\n this.f = f\n}\n\nTapSink.prototype.end = Pipe.prototype.end\nTapSink.prototype.error = Pipe.prototype.error\n\nTapSink.prototype.event = function (t, x) {\n var f = this.f\n f(x)\n this.sink.event(t, x)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { withDefaultScheduler as run } from '../runSource'\nimport { tap } from './transform'\n\n/**\n * Observe all the event values in the stream in time order. The\n * provided function `f` will be called for each event value\n * @param {function(x:T):*} f function to call with each event value\n * @param {Stream} stream stream to observe\n * @return {Promise} promise that fulfills after the stream ends without\n * an error, or rejects if the stream ends with an error.\n */\nexport function observe (f, stream) {\n return drain(tap(f, stream))\n}\n\n/**\n * \"Run\" a stream by creating demand and consuming all events\n * @param {Stream} stream stream to drain\n * @return {Promise} promise that fulfills after the stream ends without\n * an error, or rejects if the stream ends with an error.\n */\nexport function drain (stream) {\n return run(stream.source)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\n\n/**\n * Generalized feedback loop. Call a stepper function for each event. The stepper\n * will be called with 2 params: the current seed and the an event value. It must\n * return a new { seed, value } pair. The `seed` will be fed back into the next\n * invocation of stepper, and the `value` will be propagated as the event value.\n * @param {function(seed:*, value:*):{seed:*, value:*}} stepper loop step function\n * @param {*} seed initial seed value passed to first stepper call\n * @param {Stream} stream event stream\n * @returns {Stream} new stream whose values are the `value` field of the objects\n * returned by the stepper\n */\nexport function loop (stepper, seed, stream) {\n return new Stream(new Loop(stepper, seed, stream.source))\n}\n\nfunction Loop (stepper, seed, source) {\n this.step = stepper\n this.seed = seed\n this.source = source\n}\n\nLoop.prototype.run = function (sink, scheduler) {\n return this.source.run(new LoopSink(this.step, this.seed, sink), scheduler)\n}\n\nfunction LoopSink (stepper, seed, sink) {\n this.step = stepper\n this.seed = seed\n this.sink = sink\n}\n\nLoopSink.prototype.error = Pipe.prototype.error\n\nLoopSink.prototype.event = function (t, x) {\n var result = this.step(this.seed, x)\n this.seed = result.seed\n this.sink.event(t, result.value)\n}\n\nLoopSink.prototype.end = function (t) {\n this.sink.end(t, this.seed)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport { withDefaultScheduler as runSource } from '../runSource'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * Create a stream containing successive reduce results of applying f to\n * the previous reduce result and the current stream item.\n * @param {function(result:*, x:*):*} f reducer function\n * @param {*} initial initial value\n * @param {Stream} stream stream to scan\n * @returns {Stream} new stream containing successive reduce results\n */\nexport function scan (f, initial, stream) {\n return new Stream(new Scan(f, initial, stream.source))\n}\n\nfunction Scan (f, z, source) {\n this.source = source\n this.f = f\n this.value = z\n}\n\nScan.prototype.run = function (sink, scheduler) {\n var d1 = scheduler.asap(PropagateTask.event(this.value, sink))\n var d2 = this.source.run(new ScanSink(this.f, this.value, sink), scheduler)\n return dispose.all([d1, d2])\n}\n\nfunction ScanSink (f, z, sink) {\n this.f = f\n this.value = z\n this.sink = sink\n}\n\nScanSink.prototype.event = function (t, x) {\n var f = this.f\n this.value = f(this.value, x)\n this.sink.event(t, this.value)\n}\n\nScanSink.prototype.error = Pipe.prototype.error\nScanSink.prototype.end = Pipe.prototype.end\n\n/**\n* Reduce a stream to produce a single result. Note that reducing an infinite\n* stream will return a Promise that never fulfills, but that may reject if an error\n* occurs.\n* @param {function(result:*, x:*):*} f reducer function\n* @param {*} initial initial value\n* @param {Stream} stream to reduce\n* @returns {Promise} promise for the file result of the reduce\n*/\nexport function reduce (f, initial, stream) {\n return runSource(new Reduce(f, initial, stream.source))\n}\n\nfunction Reduce (f, z, source) {\n this.source = source\n this.f = f\n this.value = z\n}\n\nReduce.prototype.run = function (sink, scheduler) {\n return this.source.run(new ReduceSink(this.f, this.value, sink), scheduler)\n}\n\nfunction ReduceSink (f, z, sink) {\n this.f = f\n this.value = z\n this.sink = sink\n}\n\nReduceSink.prototype.event = function (t, x) {\n var f = this.f\n this.value = f(this.value, x)\n this.sink.event(t, this.value)\n}\n\nReduceSink.prototype.error = Pipe.prototype.error\n\nReduceSink.prototype.end = function (t) {\n this.sink.end(t, this.value)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\n\n/**\n * Compute a stream by unfolding tuples of future values from a seed value\n * Event times may be controlled by returning a Promise from f\n * @param {function(seed:*):{value:*, seed:*, done:boolean}|Promise<{value:*, seed:*, done:boolean}>} f unfolding function accepts\n * a seed and returns a new tuple with a value, new seed, and boolean done flag.\n * If tuple.done is true, the stream will end.\n * @param {*} seed seed value\n * @returns {Stream} stream containing all value of all tuples produced by the\n * unfolding function.\n */\nexport function unfold (f, seed) {\n return new Stream(new UnfoldSource(f, seed))\n}\n\nfunction UnfoldSource (f, seed) {\n this.f = f\n this.value = seed\n}\n\nUnfoldSource.prototype.run = function (sink, scheduler) {\n return new Unfold(this.f, this.value, sink, scheduler)\n}\n\nfunction Unfold (f, x, sink, scheduler) {\n this.f = f\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n\n var self = this\n function err (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n\n function start (unfold) {\n return stepUnfold(unfold, x)\n }\n\n Promise.resolve(this).then(start).catch(err)\n}\n\nUnfold.prototype.dispose = function () {\n this.active = false\n}\n\nfunction stepUnfold (unfold, x) {\n var f = unfold.f\n return Promise.resolve(f(x)).then(function (tuple) {\n return continueUnfold(unfold, tuple)\n })\n}\n\nfunction continueUnfold (unfold, tuple) {\n if (tuple.done) {\n unfold.sink.end(unfold.scheduler.now(), tuple.value)\n return tuple.value\n }\n\n unfold.sink.event(unfold.scheduler.now(), tuple.value)\n\n if (!unfold.active) {\n return tuple.value\n }\n return stepUnfold(unfold, tuple.seed)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\n\n/**\n * Compute a stream by iteratively calling f to produce values\n * Event times may be controlled by returning a Promise from f\n * @param {function(x:*):*|Promise<*>} f\n * @param {*} x initial value\n * @returns {Stream}\n */\nexport function iterate (f, x) {\n return new Stream(new IterateSource(f, x))\n}\n\nfunction IterateSource (f, x) {\n this.f = f\n this.value = x\n}\n\nIterateSource.prototype.run = function (sink, scheduler) {\n return new Iterate(this.f, this.value, sink, scheduler)\n}\n\nfunction Iterate (f, initial, sink, scheduler) {\n this.f = f\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n\n var x = initial\n\n var self = this\n function err (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n\n function start (iterate) {\n return stepIterate(iterate, x)\n }\n\n Promise.resolve(this).then(start).catch(err)\n}\n\nIterate.prototype.dispose = function () {\n this.active = false\n}\n\nfunction stepIterate (iterate, x) {\n iterate.sink.event(iterate.scheduler.now(), x)\n\n if (!iterate.active) {\n return x\n }\n\n var f = iterate.f\n return Promise.resolve(f(x)).then(function (y) {\n return continueIterate(iterate, y)\n })\n}\n\nfunction continueIterate (iterate, x) {\n return !iterate.active ? iterate.value : stepIterate(iterate, x)\n}\n","/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as base from '@most/prelude'\n\n/**\n * Compute a stream using an *async* generator, which yields promises\n * to control event times.\n * @param f\n * @returns {Stream}\n */\nexport function generate (f /*, ...args */) {\n return new Stream(new GenerateSource(f, base.tail(arguments)))\n}\n\nfunction GenerateSource (f, args) {\n this.f = f\n this.args = args\n}\n\nGenerateSource.prototype.run = function (sink, scheduler) {\n return new Generate(this.f.apply(void 0, this.args), sink, scheduler)\n}\n\nfunction Generate (iterator, sink, scheduler) {\n this.iterator = iterator\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n\n var self = this\n function err (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n\n Promise.resolve(this).then(next).catch(err)\n}\n\nfunction next (generate, x) {\n return generate.active ? handle(generate, generate.iterator.next(x)) : x\n}\n\nfunction handle (generate, result) {\n if (result.done) {\n return generate.sink.end(generate.scheduler.now(), result.value)\n }\n\n return Promise.resolve(result.value).then(function (x) {\n return emit(generate, x)\n }, function (e) {\n return error(generate, e)\n })\n}\n\nfunction emit (generate, x) {\n generate.sink.event(generate.scheduler.now(), x)\n return next(generate, x)\n}\n\nfunction error (generate, e) {\n return handle(generate, generate.iterator.throw(e))\n}\n\nGenerate.prototype.dispose = function () {\n this.active = false\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\n\nexport function continueWith (f, stream) {\n return new Stream(new ContinueWith(f, stream.source))\n}\n\nfunction ContinueWith (f, source) {\n this.f = f\n this.source = source\n}\n\nContinueWith.prototype.run = function (sink, scheduler) {\n return new ContinueWithSink(this.f, this.source, sink, scheduler)\n}\n\nfunction ContinueWithSink (f, source, sink, scheduler) {\n this.f = f\n this.sink = sink\n this.scheduler = scheduler\n this.active = true\n this.disposable = dispose.once(source.run(this, scheduler))\n}\n\nContinueWithSink.prototype.error = Pipe.prototype.error\n\nContinueWithSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n this.sink.event(t, x)\n}\n\nContinueWithSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n\n dispose.tryDispose(t, this.disposable, this.sink)\n this._startNext(t, x, this.sink)\n}\n\nContinueWithSink.prototype._startNext = function (t, x, sink) {\n try {\n this.disposable = this._continue(this.f, x, sink)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nContinueWithSink.prototype._continue = function (f, x, sink) {\n return f(x).source.run(sink, this.scheduler)\n}\n\nContinueWithSink.prototype.dispose = function () {\n this.active = false\n return this.disposable.dispose()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { of as streamOf } from '../source/core'\nimport { continueWith } from './continueWith'\n\n/**\n * @param {*} x value to prepend\n * @param {Stream} stream\n * @returns {Stream} new stream with x prepended\n */\nexport function cons (x, stream) {\n return concat(streamOf(x), stream)\n}\n\n/**\n* @param {Stream} left\n* @param {Stream} right\n* @returns {Stream} new stream containing all events in left followed by all\n* events in right. This *timeshifts* right to the end of left.\n*/\nexport function concat (left, right) {\n return continueWith(function () {\n return right\n }, left)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Sink from './Pipe'\n\nexport default function IndexSink (i, sink) {\n this.sink = sink\n this.index = i\n this.active = true\n this.value = void 0\n}\n\nIndexSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n this.value = x\n this.sink.event(t, this)\n}\n\nIndexSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n this.active = false\n this.sink.end(t, { index: this.index, value: x })\n}\n\nIndexSink.prototype.error = Sink.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function invoke (f, args) {\n\t/*eslint complexity: [2,7]*/\n switch (args.length) {\n case 0: return f()\n case 1: return f(args[0])\n case 2: return f(args[0], args[1])\n case 3: return f(args[0], args[1], args[2])\n case 4: return f(args[0], args[1], args[2], args[3])\n case 5: return f(args[0], args[1], args[2], args[3], args[4])\n default:\n return f.apply(void 0, args)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as transform from './transform'\nimport * as core from '../source/core'\nimport Pipe from '../sink/Pipe'\nimport IndexSink from '../sink/IndexSink'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\nimport invoke from '../invoke'\n\nvar map = base.map\nvar tail = base.tail\n\n/**\n * Combine latest events from all input streams\n * @param {function(...events):*} f function to combine most recent events\n * @returns {Stream} stream containing the result of applying f to the most recent\n * event of each input stream, whenever a new event arrives on any stream.\n */\nexport function combine (f /*, ...streams */) {\n return combineArray(f, tail(arguments))\n}\n\n/**\n* Combine latest events from all input streams\n* @param {function(...events):*} f function to combine most recent events\n* @param {[Stream]} streams most recent events\n* @returns {Stream} stream containing the result of applying f to the most recent\n* event of each input stream, whenever a new event arrives on any stream.\n*/\nexport function combineArray (f, streams) {\n var l = streams.length\n return l === 0 ? core.empty()\n : l === 1 ? transform.map(f, streams[0])\n : new Stream(combineSources(f, streams))\n}\n\nfunction combineSources (f, streams) {\n return new Combine(f, map(getSource, streams))\n}\n\nfunction getSource (stream) {\n return stream.source\n}\n\nfunction Combine (f, sources) {\n this.f = f\n this.sources = sources\n}\n\nCombine.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l)\n var sinks = new Array(l)\n\n var mergeSink = new CombineSink(disposables, sinks, sink, this.f)\n\n for (var indexSink, i = 0; i < l; ++i) {\n indexSink = sinks[i] = new IndexSink(i, mergeSink)\n disposables[i] = this.sources[i].run(indexSink, scheduler)\n }\n\n return dispose.all(disposables)\n}\n\nfunction CombineSink (disposables, sinks, sink, f) {\n this.sink = sink\n this.disposables = disposables\n this.sinks = sinks\n this.f = f\n\n var l = sinks.length\n this.awaiting = l\n this.values = new Array(l)\n this.hasValue = new Array(l)\n for (var i = 0; i < l; ++i) {\n this.hasValue[i] = false\n }\n\n this.activeCount = sinks.length\n}\n\nCombineSink.prototype.error = Pipe.prototype.error\n\nCombineSink.prototype.event = function (t, indexedValue) {\n var i = indexedValue.index\n var awaiting = this._updateReady(i)\n\n this.values[i] = indexedValue.value\n if (awaiting === 0) {\n this.sink.event(t, invoke(this.f, this.values))\n }\n}\n\nCombineSink.prototype._updateReady = function (index) {\n if (this.awaiting > 0) {\n if (!this.hasValue[index]) {\n this.hasValue[index] = true\n this.awaiting -= 1\n }\n }\n return this.awaiting\n}\n\nCombineSink.prototype.end = function (t, indexedValue) {\n dispose.tryDispose(t, this.disposables[indexedValue.index], this.sink)\n if (--this.activeCount === 0) {\n this.sink.end(t, indexedValue.value)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { combine } from './combine'\nimport { apply } from '@most/prelude'\n\n/**\n * Assume fs is a stream containing functions, and apply the latest function\n * in fs to the latest value in xs.\n * fs: --f---------g--------h------>\n * xs: -a-------b-------c-------d-->\n * ap(fs, xs): --fa-----fb-gb---gc--hc--hd->\n * @param {Stream} fs stream of functions to apply to the latest x\n * @param {Stream} xs stream of values to which to apply all the latest f\n * @returns {Stream} stream containing all the applications of fs to xs\n */\nexport function ap (fs, xs) {\n return combine(apply, fs, xs)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\n\n/**\n * Transform a stream by passing its events through a transducer.\n * @param {function} transducer transducer function\n * @param {Stream} stream stream whose events will be passed through the\n * transducer\n * @return {Stream} stream of events transformed by the transducer\n */\nexport function transduce (transducer, stream) {\n return new Stream(new Transduce(transducer, stream.source))\n}\n\nfunction Transduce (transducer, source) {\n this.transducer = transducer\n this.source = source\n}\n\nTransduce.prototype.run = function (sink, scheduler) {\n var xf = this.transducer(new Transformer(sink))\n return this.source.run(new TransduceSink(getTxHandler(xf), sink), scheduler)\n}\n\nfunction TransduceSink (adapter, sink) {\n this.xf = adapter\n this.sink = sink\n}\n\nTransduceSink.prototype.event = function (t, x) {\n var next = this.xf.step(t, x)\n\n return this.xf.isReduced(next)\n ? this.sink.end(t, this.xf.getResult(next))\n : next\n}\n\nTransduceSink.prototype.end = function (t, x) {\n return this.xf.result(x)\n}\n\nTransduceSink.prototype.error = function (t, e) {\n return this.sink.error(t, e)\n}\n\nfunction Transformer (sink) {\n this.time = -Infinity\n this.sink = sink\n}\n\nTransformer.prototype['@@transducer/init'] = Transformer.prototype.init = function () {}\n\nTransformer.prototype['@@transducer/step'] = Transformer.prototype.step = function (t, x) {\n if (!isNaN(t)) {\n this.time = Math.max(t, this.time)\n }\n return this.sink.event(this.time, x)\n}\n\nTransformer.prototype['@@transducer/result'] = Transformer.prototype.result = function (x) {\n return this.sink.end(this.time, x)\n}\n\n/**\n* Given an object supporting the new or legacy transducer protocol,\n* create an adapter for it.\n* @param {object} tx transform\n* @returns {TxAdapter|LegacyTxAdapter}\n*/\nfunction getTxHandler (tx) {\n return typeof tx['@@transducer/step'] === 'function'\n ? new TxAdapter(tx)\n : new LegacyTxAdapter(tx)\n}\n\n/**\n* Adapter for new official transducer protocol\n* @param {object} tx transform\n* @constructor\n*/\nfunction TxAdapter (tx) {\n this.tx = tx\n}\n\nTxAdapter.prototype.step = function (t, x) {\n return this.tx['@@transducer/step'](t, x)\n}\nTxAdapter.prototype.result = function (x) {\n return this.tx['@@transducer/result'](x)\n}\nTxAdapter.prototype.isReduced = function (x) {\n return x != null && x['@@transducer/reduced']\n}\nTxAdapter.prototype.getResult = function (x) {\n return x['@@transducer/value']\n}\n\n/**\n* Adapter for older transducer protocol\n* @param {object} tx transform\n* @constructor\n*/\nfunction LegacyTxAdapter (tx) {\n this.tx = tx\n}\n\nLegacyTxAdapter.prototype.step = function (t, x) {\n return this.tx.step(t, x)\n}\nLegacyTxAdapter.prototype.result = function (x) {\n return this.tx.result(x)\n}\nLegacyTxAdapter.prototype.isReduced = function (x) {\n return x != null && x.__transducers_reduced__\n}\nLegacyTxAdapter.prototype.getResult = function (x) {\n return x.value\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * Doubly linked list\n * @constructor\n */\nexport default function LinkedList () {\n this.head = null\n this.length = 0\n}\n\n/**\n * Add a node to the end of the list\n * @param {{prev:Object|null, next:Object|null, dispose:function}} x node to add\n */\nLinkedList.prototype.add = function (x) {\n if (this.head !== null) {\n this.head.prev = x\n x.next = this.head\n }\n this.head = x\n ++this.length\n}\n\n/**\n * Remove the provided node from the list\n * @param {{prev:Object|null, next:Object|null, dispose:function}} x node to remove\n */\nLinkedList.prototype.remove = function (x) { // eslint-disable-line complexity\n --this.length\n if (x === this.head) {\n this.head = this.head.next\n }\n if (x.next !== null) {\n x.next.prev = x.prev\n x.next = null\n }\n if (x.prev !== null) {\n x.prev.next = x.next\n x.prev = null\n }\n}\n\n/**\n * @returns {boolean} true iff there are no nodes in the list\n */\nLinkedList.prototype.isEmpty = function () {\n return this.length === 0\n}\n\n/**\n * Dispose all nodes\n * @returns {Promise} promise that fulfills when all nodes have been disposed,\n * or rejects if an error occurs while disposing\n */\nLinkedList.prototype.dispose = function () {\n if (this.isEmpty()) {\n return Promise.resolve()\n }\n\n var promises = []\n var x = this.head\n this.head = null\n this.length = 0\n\n while (x !== null) {\n promises.push(x.dispose())\n x = x.next\n }\n\n return Promise.all(promises)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\nimport LinkedList from '../LinkedList'\nimport { id as identity } from '@most/prelude'\n\nexport function mergeConcurrently (concurrency, stream) {\n return mergeMapConcurrently(identity, concurrency, stream)\n}\n\nexport function mergeMapConcurrently (f, concurrency, stream) {\n return new Stream(new MergeConcurrently(f, concurrency, stream.source))\n}\n\nfunction MergeConcurrently (f, concurrency, source) {\n this.f = f\n this.concurrency = concurrency\n this.source = source\n}\n\nMergeConcurrently.prototype.run = function (sink, scheduler) {\n return new Outer(this.f, this.concurrency, this.source, sink, scheduler)\n}\n\nfunction Outer (f, concurrency, source, sink, scheduler) {\n this.f = f\n this.concurrency = concurrency\n this.sink = sink\n this.scheduler = scheduler\n this.pending = []\n this.current = new LinkedList()\n this.disposable = dispose.once(source.run(this, scheduler))\n this.active = true\n}\n\nOuter.prototype.event = function (t, x) {\n this._addInner(t, x)\n}\n\nOuter.prototype._addInner = function (t, x) {\n if (this.current.length < this.concurrency) {\n this._startInner(t, x)\n } else {\n this.pending.push(x)\n }\n}\n\nOuter.prototype._startInner = function (t, x) {\n try {\n this._initInner(t, x)\n } catch (e) {\n this.error(t, e)\n }\n}\n\nOuter.prototype._initInner = function (t, x) {\n var innerSink = new Inner(t, this, this.sink)\n innerSink.disposable = mapAndRun(this.f, x, innerSink, this.scheduler)\n this.current.add(innerSink)\n}\n\nfunction mapAndRun (f, x, sink, scheduler) {\n return f(x).source.run(sink, scheduler)\n}\n\nOuter.prototype.end = function (t, x) {\n this.active = false\n dispose.tryDispose(t, this.disposable, this.sink)\n this._checkEnd(t, x)\n}\n\nOuter.prototype.error = function (t, e) {\n this.active = false\n this.sink.error(t, e)\n}\n\nOuter.prototype.dispose = function () {\n this.active = false\n this.pending.length = 0\n return Promise.all([this.disposable.dispose(), this.current.dispose()])\n}\n\nOuter.prototype._endInner = function (t, x, inner) {\n this.current.remove(inner)\n dispose.tryDispose(t, inner, this)\n\n if (this.pending.length === 0) {\n this._checkEnd(t, x)\n } else {\n this._startInner(t, this.pending.shift())\n }\n}\n\nOuter.prototype._checkEnd = function (t, x) {\n if (!this.active && this.current.isEmpty()) {\n this.sink.end(t, x)\n }\n}\n\nfunction Inner (time, outer, sink) {\n this.prev = this.next = null\n this.time = time\n this.outer = outer\n this.sink = sink\n this.disposable = void 0\n}\n\nInner.prototype.event = function (t, x) {\n this.sink.event(Math.max(t, this.time), x)\n}\n\nInner.prototype.end = function (t, x) {\n this.outer._endInner(Math.max(t, this.time), x, this)\n}\n\nInner.prototype.error = function (t, e) {\n this.outer.error(Math.max(t, this.time), e)\n}\n\nInner.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { mergeConcurrently, mergeMapConcurrently } from './mergeConcurrently'\n\n/**\n * Map each value in the stream to a new stream, and merge it into the\n * returned outer stream. Event arrival times are preserved.\n * @param {function(x:*):Stream} f chaining function, must return a Stream\n * @param {Stream} stream\n * @returns {Stream} new stream containing all events from each stream returned by f\n */\nexport function flatMap (f, stream) {\n return mergeMapConcurrently(f, Infinity, stream)\n}\n\n/**\n * Monadic join. Flatten a Stream> to Stream by merging inner\n * streams to the outer. Event arrival times are preserved.\n * @param {Stream>} stream stream of streams\n * @returns {Stream} new stream containing all events of all inner streams\n */\nexport function join (stream) {\n return mergeConcurrently(Infinity, stream)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport { mergeMapConcurrently } from './mergeConcurrently'\n\n/**\n * Map each value in stream to a new stream, and concatenate them all\n * stream: -a---b---cX\n * f(a): 1-1-1-1X\n * f(b): -2-2-2-2X\n * f(c): -3-3-3-3X\n * stream.concatMap(f): -1-1-1-1-2-2-2-2-3-3-3-3X\n * @param {function(x:*):Stream} f function to map each value to a stream\n * @param {Stream} stream\n * @returns {Stream} new stream containing all events from each stream returned by f\n */\nexport function concatMap (f, stream) {\n return mergeMapConcurrently(f, 1, stream)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport IndexSink from '../sink/IndexSink'\nimport { empty } from '../source/core'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\n\nvar copy = base.copy\nvar reduce = base.reduce\n\n/**\n * @returns {Stream} stream containing events from all streams in the argument\n * list in time order. If two events are simultaneous they will be merged in\n * arbitrary order.\n */\nexport function merge (/* ...streams*/) {\n return mergeArray(copy(arguments))\n}\n\n/**\n * @param {Array} streams array of stream to merge\n * @returns {Stream} stream containing events from all input observables\n * in time order. If two events are simultaneous they will be merged in\n * arbitrary order.\n */\nexport function mergeArray (streams) {\n var l = streams.length\n return l === 0 ? empty()\n : l === 1 ? streams[0]\n : new Stream(mergeSources(streams))\n}\n\n/**\n * This implements fusion/flattening for merge. It will\n * fuse adjacent merge operations. For example:\n * - a.merge(b).merge(c) effectively becomes merge(a, b, c)\n * - merge(a, merge(b, c)) effectively becomes merge(a, b, c)\n * It does this by concatenating the sources arrays of\n * any nested Merge sources, in effect \"flattening\" nested\n * merge operations into a single merge.\n */\nfunction mergeSources (streams) {\n return new Merge(reduce(appendSources, [], streams))\n}\n\nfunction appendSources (sources, stream) {\n var source = stream.source\n return source instanceof Merge\n ? sources.concat(source.sources)\n : sources.concat(source)\n}\n\nfunction Merge (sources) {\n this.sources = sources\n}\n\nMerge.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l)\n var sinks = new Array(l)\n\n var mergeSink = new MergeSink(disposables, sinks, sink)\n\n for (var indexSink, i = 0; i < l; ++i) {\n indexSink = sinks[i] = new IndexSink(i, mergeSink)\n disposables[i] = this.sources[i].run(indexSink, scheduler)\n }\n\n return dispose.all(disposables)\n}\n\nfunction MergeSink (disposables, sinks, sink) {\n this.sink = sink\n this.disposables = disposables\n this.activeCount = sinks.length\n}\n\nMergeSink.prototype.error = Pipe.prototype.error\n\nMergeSink.prototype.event = function (t, indexValue) {\n this.sink.event(t, indexValue.value)\n}\n\nMergeSink.prototype.end = function (t, indexedValue) {\n dispose.tryDispose(t, this.disposables[indexedValue.index], this.sink)\n if (--this.activeCount === 0) {\n this.sink.end(t, indexedValue.value)\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\nimport invoke from '../invoke'\n\n/**\n * When an event arrives on sampler, emit the result of calling f with the latest\n * values of all streams being sampled\n * @param {function(...values):*} f function to apply to each set of sampled values\n * @param {Stream} sampler streams will be sampled whenever an event arrives\n * on sampler\n * @returns {Stream} stream of sampled and transformed values\n */\nexport function sample (f, sampler /*, ...streams */) {\n return sampleArray(f, sampler, base.drop(2, arguments))\n}\n\n/**\n * When an event arrives on sampler, emit the latest event value from stream.\n * @param {Stream} sampler stream of events at whose arrival time\n * stream's latest value will be propagated\n * @param {Stream} stream stream of values\n * @returns {Stream} sampled stream of values\n */\nexport function sampleWith (sampler, stream) {\n return new Stream(new Sampler(base.id, sampler.source, [stream.source]))\n}\n\nexport function sampleArray (f, sampler, streams) {\n return new Stream(new Sampler(f, sampler.source, base.map(getSource, streams)))\n}\n\nfunction getSource (stream) {\n return stream.source\n}\n\nfunction Sampler (f, sampler, sources) {\n this.f = f\n this.sampler = sampler\n this.sources = sources\n}\n\nSampler.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l + 1)\n var sinks = new Array(l)\n\n var sampleSink = new SampleSink(this.f, sinks, sink)\n\n for (var hold, i = 0; i < l; ++i) {\n hold = sinks[i] = new Hold(sampleSink)\n disposables[i] = this.sources[i].run(hold, scheduler)\n }\n\n disposables[i] = this.sampler.run(sampleSink, scheduler)\n\n return dispose.all(disposables)\n}\n\nfunction Hold (sink) {\n this.sink = sink\n this.hasValue = false\n}\n\nHold.prototype.event = function (t, x) {\n this.value = x\n this.hasValue = true\n this.sink._notify(this)\n}\n\nHold.prototype.end = function () {}\nHold.prototype.error = Pipe.prototype.error\n\nfunction SampleSink (f, sinks, sink) {\n this.f = f\n this.sinks = sinks\n this.sink = sink\n this.active = false\n}\n\nSampleSink.prototype._notify = function () {\n if (!this.active) {\n this.active = this.sinks.every(hasValue)\n }\n}\n\nSampleSink.prototype.event = function (t) {\n if (this.active) {\n this.sink.event(t, invoke(this.f, base.map(getValue, this.sinks)))\n }\n}\n\nSampleSink.prototype.end = Pipe.prototype.end\nSampleSink.prototype.error = Pipe.prototype.error\n\nfunction hasValue (hold) {\n return hold.hasValue\n}\n\nfunction getValue (hold) {\n return hold.value\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n// Based on https://github.com/petkaantonov/deque\n\nexport default function Queue (capPow2) {\n this._capacity = capPow2 || 32\n this._length = 0\n this._head = 0\n}\n\nQueue.prototype.push = function (x) {\n var len = this._length\n this._checkCapacity(len + 1)\n\n var i = (this._head + len) & (this._capacity - 1)\n this[i] = x\n this._length = len + 1\n}\n\nQueue.prototype.shift = function () {\n var head = this._head\n var x = this[head]\n\n this[head] = void 0\n this._head = (head + 1) & (this._capacity - 1)\n this._length--\n return x\n}\n\nQueue.prototype.isEmpty = function () {\n return this._length === 0\n}\n\nQueue.prototype.length = function () {\n return this._length\n}\n\nQueue.prototype._checkCapacity = function (size) {\n if (this._capacity < size) {\n this._ensureCapacity(this._capacity << 1)\n }\n}\n\nQueue.prototype._ensureCapacity = function (capacity) {\n var oldCapacity = this._capacity\n this._capacity = capacity\n\n var last = this._head + this._length\n\n if (last > oldCapacity) {\n copy(this, 0, this, oldCapacity, last & (oldCapacity - 1))\n }\n}\n\nfunction copy (src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex]\n src[j + srcIndex] = void 0\n }\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as transform from './transform'\nimport * as core from '../source/core'\nimport Pipe from '../sink/Pipe'\nimport IndexSink from '../sink/IndexSink'\nimport * as dispose from '../disposable/dispose'\nimport * as base from '@most/prelude'\nimport invoke from '../invoke'\nimport Queue from '../Queue'\n\nvar map = base.map\nvar tail = base.tail\n\n/**\n * Combine streams pairwise (or tuple-wise) by index by applying f to values\n * at corresponding indices. The returned stream ends when any of the input\n * streams ends.\n * @param {function} f function to combine values\n * @returns {Stream} new stream with items at corresponding indices combined\n * using f\n */\nexport function zip (f /*, ...streams */) {\n return zipArray(f, tail(arguments))\n}\n\n/**\n* Combine streams pairwise (or tuple-wise) by index by applying f to values\n* at corresponding indices. The returned stream ends when any of the input\n* streams ends.\n* @param {function} f function to combine values\n* @param {[Stream]} streams streams to zip using f\n* @returns {Stream} new stream with items at corresponding indices combined\n* using f\n*/\nexport function zipArray (f, streams) {\n return streams.length === 0 ? core.empty()\n: streams.length === 1 ? transform.map(f, streams[0])\n: new Stream(new Zip(f, map(getSource, streams)))\n}\n\nfunction getSource (stream) {\n return stream.source\n}\n\nfunction Zip (f, sources) {\n this.f = f\n this.sources = sources\n}\n\nZip.prototype.run = function (sink, scheduler) {\n var l = this.sources.length\n var disposables = new Array(l)\n var sinks = new Array(l)\n var buffers = new Array(l)\n\n var zipSink = new ZipSink(this.f, buffers, sinks, sink)\n\n for (var indexSink, i = 0; i < l; ++i) {\n buffers[i] = new Queue()\n indexSink = sinks[i] = new IndexSink(i, zipSink)\n disposables[i] = this.sources[i].run(indexSink, scheduler)\n }\n\n return dispose.all(disposables)\n}\n\nfunction ZipSink (f, buffers, sinks, sink) {\n this.f = f\n this.sinks = sinks\n this.sink = sink\n this.buffers = buffers\n}\n\nZipSink.prototype.event = function (t, indexedValue) { // eslint-disable-line complexity\n var buffers = this.buffers\n var buffer = buffers[indexedValue.index]\n\n buffer.push(indexedValue.value)\n\n if (buffer.length() === 1) {\n if (!ready(this.buffers)) {\n return\n }\n\n emitZipped(this.f, t, buffers, this.sink)\n\n if (ended(this.buffers, this.sinks)) {\n this.sink.end(t, void 0)\n }\n }\n}\n\nZipSink.prototype.end = function (t, indexedValue) {\n var buffer = this.buffers[indexedValue.index]\n if (buffer.isEmpty()) {\n this.sink.end(t, indexedValue.value)\n }\n}\n\nZipSink.prototype.error = Pipe.prototype.error\n\nfunction emitZipped (f, t, buffers, sink) {\n sink.event(t, invoke(f, map(head, buffers)))\n}\n\nfunction head (buffer) {\n return buffer.shift()\n}\n\nfunction ended (buffers, sinks) {\n for (var i = 0, l = buffers.length; i < l; ++i) {\n if (buffers[i].isEmpty() && !sinks[i].active) {\n return true\n }\n }\n return false\n}\n\nfunction ready (buffers) {\n for (var i = 0, l = buffers.length; i < l; ++i) {\n if (buffers[i].isEmpty()) {\n return false\n }\n }\n return true\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport * as dispose from '../disposable/dispose'\n\n/**\n * Given a stream of streams, return a new stream that adopts the behavior\n * of the most recent inner stream.\n * @param {Stream} stream of streams on which to switch\n * @returns {Stream} switching stream\n */\nexport function switchLatest (stream) {\n return new Stream(new Switch(stream.source))\n}\n\nexport { switchLatest as switch }\n\nfunction Switch (source) {\n this.source = source\n}\n\nSwitch.prototype.run = function (sink, scheduler) {\n var switchSink = new SwitchSink(sink, scheduler)\n return dispose.all([switchSink, this.source.run(switchSink, scheduler)])\n}\n\nfunction SwitchSink (sink, scheduler) {\n this.sink = sink\n this.scheduler = scheduler\n this.current = null\n this.ended = false\n}\n\nSwitchSink.prototype.event = function (t, stream) {\n this._disposeCurrent(t) // TODO: capture the result of this dispose\n this.current = new Segment(t, Infinity, this, this.sink)\n this.current.disposable = stream.source.run(this.current, this.scheduler)\n}\n\nSwitchSink.prototype.end = function (t, x) {\n this.ended = true\n this._checkEnd(t, x)\n}\n\nSwitchSink.prototype.error = function (t, e) {\n this.ended = true\n this.sink.error(t, e)\n}\n\nSwitchSink.prototype.dispose = function () {\n return this._disposeCurrent(this.scheduler.now())\n}\n\nSwitchSink.prototype._disposeCurrent = function (t) {\n if (this.current !== null) {\n return this.current._dispose(t)\n }\n}\n\nSwitchSink.prototype._disposeInner = function (t, inner) {\n inner._dispose(t) // TODO: capture the result of this dispose\n if (inner === this.current) {\n this.current = null\n }\n}\n\nSwitchSink.prototype._checkEnd = function (t, x) {\n if (this.ended && this.current === null) {\n this.sink.end(t, x)\n }\n}\n\nSwitchSink.prototype._endInner = function (t, x, inner) {\n this._disposeInner(t, inner)\n this._checkEnd(t, x)\n}\n\nSwitchSink.prototype._errorInner = function (t, e, inner) {\n this._disposeInner(t, inner)\n this.sink.error(t, e)\n}\n\nfunction Segment (min, max, outer, sink) {\n this.min = min\n this.max = max\n this.outer = outer\n this.sink = sink\n this.disposable = dispose.empty()\n}\n\nSegment.prototype.event = function (t, x) {\n if (t < this.max) {\n this.sink.event(Math.max(t, this.min), x)\n }\n}\n\nSegment.prototype.end = function (t, x) {\n this.outer._endInner(Math.max(t, this.min), x, this)\n}\n\nSegment.prototype.error = function (t, e) {\n this.outer._errorInner(Math.max(t, this.min), e, this)\n}\n\nSegment.prototype._dispose = function (t) {\n this.max = t\n dispose.tryDispose(t, this.disposable, this.sink)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport Filter from '../fusion/Filter'\n\n/**\n * Retain only items matching a predicate\n * @param {function(x:*):boolean} p filtering predicate called for each item\n * @param {Stream} stream stream to filter\n * @returns {Stream} stream containing only items for which predicate returns truthy\n */\nexport function filter (p, stream) {\n return new Stream(Filter.create(p, stream.source))\n}\n\n/**\n * Skip repeated events, using === to detect duplicates\n * @param {Stream} stream stream from which to omit repeated events\n * @returns {Stream} stream without repeated events\n */\nexport function skipRepeats (stream) {\n return skipRepeatsWith(same, stream)\n}\n\n/**\n * Skip repeated events using the provided equals function to detect duplicates\n * @param {function(a:*, b:*):boolean} equals optional function to compare items\n * @param {Stream} stream stream from which to omit repeated events\n * @returns {Stream} stream without repeated events\n */\nexport function skipRepeatsWith (equals, stream) {\n return new Stream(new SkipRepeats(equals, stream.source))\n}\n\nfunction SkipRepeats (equals, source) {\n this.equals = equals\n this.source = source\n}\n\nSkipRepeats.prototype.run = function (sink, scheduler) {\n return this.source.run(new SkipRepeatsSink(this.equals, sink), scheduler)\n}\n\nfunction SkipRepeatsSink (equals, sink) {\n this.equals = equals\n this.sink = sink\n this.value = void 0\n this.init = true\n}\n\nSkipRepeatsSink.prototype.end = Pipe.prototype.end\nSkipRepeatsSink.prototype.error = Pipe.prototype.error\n\nSkipRepeatsSink.prototype.event = function (t, x) {\n if (this.init) {\n this.init = false\n this.value = x\n this.sink.event(t, x)\n } else if (!this.equals(this.value, x)) {\n this.value = x\n this.sink.event(t, x)\n }\n}\n\nfunction same (a, b) {\n return a === b\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as core from '../source/core'\nimport * as dispose from '../disposable/dispose'\nimport Map from '../fusion/Map'\n\n/**\n * @param {number} n\n * @param {Stream} stream\n * @returns {Stream} new stream containing only up to the first n items from stream\n */\nexport function take (n, stream) {\n return slice(0, n, stream)\n}\n\n/**\n * @param {number} n\n * @param {Stream} stream\n * @returns {Stream} new stream with the first n items removed\n */\nexport function skip (n, stream) {\n return slice(n, Infinity, stream)\n}\n\n/**\n * Slice a stream by index. Negative start/end indexes are not supported\n * @param {number} start\n * @param {number} end\n * @param {Stream} stream\n * @returns {Stream} stream containing items where start <= index < end\n */\nexport function slice (start, end, stream) {\n return end <= start ? core.empty()\n : new Stream(sliceSource(start, end, stream.source))\n}\n\nfunction sliceSource (start, end, source) {\n return source instanceof Map ? commuteMapSlice(start, end, source)\n : source instanceof Slice ? fuseSlice(start, end, source)\n : new Slice(start, end, source)\n}\n\nfunction commuteMapSlice (start, end, source) {\n return Map.create(source.f, sliceSource(start, end, source.source))\n}\n\nfunction fuseSlice (start, end, source) {\n start += source.min\n end = Math.min(end + source.min, source.max)\n return new Slice(start, end, source.source)\n}\n\nfunction Slice (min, max, source) {\n this.source = source\n this.min = min\n this.max = max\n}\n\nSlice.prototype.run = function (sink, scheduler) {\n var disposable = dispose.settable()\n var sliceSink = new SliceSink(this.min, this.max - this.min, sink, disposable)\n\n disposable.setDisposable(this.source.run(sliceSink, scheduler))\n return disposable\n}\n\nfunction SliceSink (skip, take, sink, disposable) {\n this.sink = sink\n this.skip = skip\n this.take = take\n this.disposable = disposable\n}\n\nSliceSink.prototype.end = Pipe.prototype.end\nSliceSink.prototype.error = Pipe.prototype.error\n\nSliceSink.prototype.event = function (t, x) {\n /* eslint complexity: [1, 4] */\n if (this.skip > 0) {\n this.skip -= 1\n return\n }\n\n if (this.take === 0) {\n return\n }\n\n this.take -= 1\n this.sink.event(t, x)\n if (this.take === 0) {\n this.disposable.dispose()\n this.sink.end(t, x)\n }\n}\n\nexport function takeWhile (p, stream) {\n return new Stream(new TakeWhile(p, stream.source))\n}\n\nfunction TakeWhile (p, source) {\n this.p = p\n this.source = source\n}\n\nTakeWhile.prototype.run = function (sink, scheduler) {\n var disposable = dispose.settable()\n var takeWhileSink = new TakeWhileSink(this.p, sink, disposable)\n\n disposable.setDisposable(this.source.run(takeWhileSink, scheduler))\n return disposable\n}\n\nfunction TakeWhileSink (p, sink, disposable) {\n this.p = p\n this.sink = sink\n this.active = true\n this.disposable = disposable\n}\n\nTakeWhileSink.prototype.end = Pipe.prototype.end\nTakeWhileSink.prototype.error = Pipe.prototype.error\n\nTakeWhileSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n\n var p = this.p\n this.active = p(x)\n if (this.active) {\n this.sink.event(t, x)\n } else {\n this.disposable.dispose()\n this.sink.end(t, x)\n }\n}\n\nexport function skipWhile (p, stream) {\n return new Stream(new SkipWhile(p, stream.source))\n}\n\nfunction SkipWhile (p, source) {\n this.p = p\n this.source = source\n}\n\nSkipWhile.prototype.run = function (sink, scheduler) {\n return this.source.run(new SkipWhileSink(this.p, sink), scheduler)\n}\n\nfunction SkipWhileSink (p, sink) {\n this.p = p\n this.sink = sink\n this.skipping = true\n}\n\nSkipWhileSink.prototype.end = Pipe.prototype.end\nSkipWhileSink.prototype.error = Pipe.prototype.error\n\nSkipWhileSink.prototype.event = function (t, x) {\n if (this.skipping) {\n var p = this.p\n this.skipping = p(x)\n if (this.skipping) {\n return\n }\n }\n\n this.sink.event(t, x)\n}\n\nexport function skipAfter (p, stream) {\n return new Stream(new SkipAfter(p, stream.source))\n}\n\nfunction SkipAfter (p, source) {\n this.p = p\n this.source = source\n}\n\nSkipAfter.prototype.run = function run (sink, scheduler) {\n return this.source.run(new SkipAfterSink(this.p, sink), scheduler)\n}\n\nfunction SkipAfterSink (p, sink) {\n this.p = p\n this.sink = sink\n this.skipping = false\n}\n\nSkipAfterSink.prototype.event = function event (t, x) {\n if (this.skipping) {\n return\n }\n\n var p = this.p\n this.skipping = p(x)\n this.sink.event(t, x)\n\n if (this.skipping) {\n this.sink.end(t, x)\n }\n}\n\nSkipAfterSink.prototype.end = Pipe.prototype.end\nSkipAfterSink.prototype.error = Pipe.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport { join } from '../combinator/flatMap'\n\nexport function takeUntil (signal, stream) {\n return new Stream(new Until(signal.source, stream.source))\n}\n\nexport function skipUntil (signal, stream) {\n return new Stream(new Since(signal.source, stream.source))\n}\n\nexport function during (timeWindow, stream) {\n return takeUntil(join(timeWindow), skipUntil(timeWindow, stream))\n}\n\nfunction Until (maxSignal, source) {\n this.maxSignal = maxSignal\n this.source = source\n}\n\nUntil.prototype.run = function (sink, scheduler) {\n var min = new Bound(-Infinity, sink)\n var max = new UpperBound(this.maxSignal, sink, scheduler)\n var disposable = this.source.run(new TimeWindowSink(min, max, sink), scheduler)\n\n return dispose.all([min, max, disposable])\n}\n\nfunction Since (minSignal, source) {\n this.minSignal = minSignal\n this.source = source\n}\n\nSince.prototype.run = function (sink, scheduler) {\n var min = new LowerBound(this.minSignal, sink, scheduler)\n var max = new Bound(Infinity, sink)\n var disposable = this.source.run(new TimeWindowSink(min, max, sink), scheduler)\n\n return dispose.all([min, max, disposable])\n}\n\nfunction Bound (value, sink) {\n this.value = value\n this.sink = sink\n}\n\nBound.prototype.error = Pipe.prototype.error\nBound.prototype.event = noop\nBound.prototype.end = noop\nBound.prototype.dispose = noop\n\nfunction TimeWindowSink (min, max, sink) {\n this.min = min\n this.max = max\n this.sink = sink\n}\n\nTimeWindowSink.prototype.event = function (t, x) {\n if (t >= this.min.value && t < this.max.value) {\n this.sink.event(t, x)\n }\n}\n\nTimeWindowSink.prototype.error = Pipe.prototype.error\nTimeWindowSink.prototype.end = Pipe.prototype.end\n\nfunction LowerBound (signal, sink, scheduler) {\n this.value = Infinity\n this.sink = sink\n this.disposable = signal.run(this, scheduler)\n}\n\nLowerBound.prototype.event = function (t /*, x */) {\n if (t < this.value) {\n this.value = t\n }\n}\n\nLowerBound.prototype.end = noop\nLowerBound.prototype.error = Pipe.prototype.error\n\nLowerBound.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n\nfunction UpperBound (signal, sink, scheduler) {\n this.value = Infinity\n this.sink = sink\n this.disposable = signal.run(this, scheduler)\n}\n\nUpperBound.prototype.event = function (t, x) {\n if (t < this.value) {\n this.value = t\n this.sink.end(t, x)\n }\n}\n\nUpperBound.prototype.end = noop\nUpperBound.prototype.error = Pipe.prototype.error\n\nUpperBound.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n\nfunction noop () {}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * @param {Number} delayTime milliseconds to delay each item\n * @param {Stream} stream\n * @returns {Stream} new stream containing the same items, but delayed by ms\n */\nexport function delay (delayTime, stream) {\n return delayTime <= 0 ? stream\n : new Stream(new Delay(delayTime, stream.source))\n}\n\nfunction Delay (dt, source) {\n this.dt = dt\n this.source = source\n}\n\nDelay.prototype.run = function (sink, scheduler) {\n var delaySink = new DelaySink(this.dt, sink, scheduler)\n return dispose.all([delaySink, this.source.run(delaySink, scheduler)])\n}\n\nfunction DelaySink (dt, sink, scheduler) {\n this.dt = dt\n this.sink = sink\n this.scheduler = scheduler\n}\n\nDelaySink.prototype.dispose = function () {\n var self = this\n this.scheduler.cancelAll(function (task) {\n return task.sink === self.sink\n })\n}\n\nDelaySink.prototype.event = function (t, x) {\n this.scheduler.delay(this.dt, PropagateTask.event(x, this.sink))\n}\n\nDelaySink.prototype.end = function (t, x) {\n this.scheduler.delay(this.dt, PropagateTask.end(x, this.sink))\n}\n\nDelaySink.prototype.error = Pipe.prototype.error\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\n\nexport function timestamp (stream) {\n return new Stream(new Timestamp(stream.source))\n}\n\nfunction Timestamp (source) {\n this.source = source\n}\n\nTimestamp.prototype.run = function (sink, scheduler) {\n return this.source.run(new TimestampSink(sink), scheduler)\n}\n\nfunction TimestampSink (sink) {\n this.sink = sink\n}\n\nTimestampSink.prototype.end = Pipe.prototype.end\nTimestampSink.prototype.error = Pipe.prototype.error\n\nTimestampSink.prototype.event = function (t, x) {\n this.sink.event(t, { time: t, value: x })\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport Pipe from '../sink/Pipe'\nimport * as dispose from '../disposable/dispose'\nimport PropagateTask from '../scheduler/PropagateTask'\nimport Map from '../fusion/Map'\n\n/**\n * Limit the rate of events by suppressing events that occur too often\n * @param {Number} period time to suppress events\n * @param {Stream} stream\n * @returns {Stream}\n */\nexport function throttle (period, stream) {\n return new Stream(throttleSource(period, stream.source))\n}\n\nfunction throttleSource (period, source) {\n return source instanceof Map ? commuteMapThrottle(period, source)\n : source instanceof Throttle ? fuseThrottle(period, source)\n : new Throttle(period, source)\n}\n\nfunction commuteMapThrottle (period, source) {\n return Map.create(source.f, throttleSource(period, source.source))\n}\n\nfunction fuseThrottle (period, source) {\n return new Throttle(Math.max(period, source.period), source.source)\n}\n\nfunction Throttle (period, source) {\n this.period = period\n this.source = source\n}\n\nThrottle.prototype.run = function (sink, scheduler) {\n return this.source.run(new ThrottleSink(this.period, sink), scheduler)\n}\n\nfunction ThrottleSink (period, sink) {\n this.time = 0\n this.period = period\n this.sink = sink\n}\n\nThrottleSink.prototype.event = function (t, x) {\n if (t >= this.time) {\n this.time = t + this.period\n this.sink.event(t, x)\n }\n}\n\nThrottleSink.prototype.end = Pipe.prototype.end\n\nThrottleSink.prototype.error = Pipe.prototype.error\n\n/**\n * Wait for a burst of events to subside and emit only the last event in the burst\n * @param {Number} period events occuring more frequently than this\n * will be suppressed\n * @param {Stream} stream stream to debounce\n * @returns {Stream} new debounced stream\n */\nexport function debounce (period, stream) {\n return new Stream(new Debounce(period, stream.source))\n}\n\nfunction Debounce (dt, source) {\n this.dt = dt\n this.source = source\n}\n\nDebounce.prototype.run = function (sink, scheduler) {\n return new DebounceSink(this.dt, this.source, sink, scheduler)\n}\n\nfunction DebounceSink (dt, source, sink, scheduler) {\n this.dt = dt\n this.sink = sink\n this.scheduler = scheduler\n this.value = void 0\n this.timer = null\n\n var sourceDisposable = source.run(this, scheduler)\n this.disposable = dispose.all([this, sourceDisposable])\n}\n\nDebounceSink.prototype.event = function (t, x) {\n this._clearTimer()\n this.value = x\n this.timer = this.scheduler.delay(this.dt, PropagateTask.event(x, this.sink))\n}\n\nDebounceSink.prototype.end = function (t, x) {\n if (this._clearTimer()) {\n this.sink.event(t, this.value)\n this.value = void 0\n }\n this.sink.end(t, x)\n}\n\nDebounceSink.prototype.error = function (t, x) {\n this._clearTimer()\n this.sink.error(t, x)\n}\n\nDebounceSink.prototype.dispose = function () {\n this._clearTimer()\n}\n\nDebounceSink.prototype._clearTimer = function () {\n if (this.timer === null) {\n return false\n }\n this.timer.dispose()\n this.timer = null\n return true\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport fatal from '../fatalError'\nimport { of as just } from '../source/core'\n\n/**\n * Create a stream containing only the promise's fulfillment\n * value at the time it fulfills.\n * @param {Promise} p promise\n * @return {Stream} stream containing promise's fulfillment value.\n * If the promise rejects, the stream will error\n */\nexport function fromPromise (p) {\n return awaitPromises(just(p))\n}\n\n/**\n * Turn a Stream> into Stream by awaiting each promise.\n * Event order is preserved.\n * @param {Stream>} stream\n * @return {Stream} stream of fulfillment values. The stream will\n * error if any promise rejects.\n */\nexport function awaitPromises (stream) {\n return new Stream(new Await(stream.source))\n}\n\nfunction Await (source) {\n this.source = source\n}\n\nAwait.prototype.run = function (sink, scheduler) {\n return this.source.run(new AwaitSink(sink, scheduler), scheduler)\n}\n\nfunction AwaitSink (sink, scheduler) {\n this.sink = sink\n this.scheduler = scheduler\n this.queue = Promise.resolve()\n var self = this\n\n\t// Pre-create closures, to avoid creating them per event\n this._eventBound = function (x) {\n self.sink.event(self.scheduler.now(), x)\n }\n\n this._endBound = function (x) {\n self.sink.end(self.scheduler.now(), x)\n }\n\n this._errorBound = function (e) {\n self.sink.error(self.scheduler.now(), e)\n }\n}\n\nAwaitSink.prototype.event = function (t, promise) {\n var self = this\n this.queue = this.queue.then(function () {\n return self._event(promise)\n }).catch(this._errorBound)\n}\n\nAwaitSink.prototype.end = function (t, x) {\n var self = this\n this.queue = this.queue.then(function () {\n return self._end(x)\n }).catch(this._errorBound)\n}\n\nAwaitSink.prototype.error = function (t, e) {\n var self = this\n // Don't resolve error values, propagate directly\n this.queue = this.queue.then(function () {\n return self._errorBound(e)\n }).catch(fatal)\n}\n\nAwaitSink.prototype._event = function (promise) {\n return promise.then(this._eventBound)\n}\n\nAwaitSink.prototype._end = function (x) {\n return Promise.resolve(x).then(this._endBound)\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nexport default function SafeSink (sink) {\n this.sink = sink\n this.active = true\n}\n\nSafeSink.prototype.event = function (t, x) {\n if (!this.active) {\n return\n }\n this.sink.event(t, x)\n}\n\nSafeSink.prototype.end = function (t, x) {\n if (!this.active) {\n return\n }\n this.disable()\n this.sink.end(t, x)\n}\n\nSafeSink.prototype.error = function (t, e) {\n this.disable()\n this.sink.error(t, e)\n}\n\nSafeSink.prototype.disable = function () {\n this.active = false\n return this.sink\n}\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from '../Stream'\nimport SafeSink from '../sink/SafeSink'\nimport * as dispose from '../disposable/dispose'\nimport * as tryEvent from '../source/tryEvent'\nimport PropagateTask from '../scheduler/PropagateTask'\n\n/**\n * If stream encounters an error, recover and continue with items from stream\n * returned by f.\n * @param {function(error:*):Stream} f function which returns a new stream\n * @param {Stream} stream\n * @returns {Stream} new stream which will recover from an error by calling f\n */\nexport function recoverWith (f, stream) {\n return new Stream(new RecoverWith(f, stream.source))\n}\n\nexport var flatMapError = recoverWith\n\n/**\n * Create a stream containing only an error\n * @param {*} e error value, preferably an Error or Error subtype\n * @returns {Stream} new stream containing only an error\n */\nexport function throwError (e) {\n return new Stream(new ErrorSource(e))\n}\n\nfunction ErrorSource (e) {\n this.value = e\n}\n\nErrorSource.prototype.run = function (sink, scheduler) {\n return scheduler.asap(new PropagateTask(runError, this.value, sink))\n}\n\nfunction runError (t, e, sink) {\n sink.error(t, e)\n}\n\nfunction RecoverWith (f, source) {\n this.f = f\n this.source = source\n}\n\nRecoverWith.prototype.run = function (sink, scheduler) {\n return new RecoverWithSink(this.f, this.source, sink, scheduler)\n}\n\nfunction RecoverWithSink (f, source, sink, scheduler) {\n this.f = f\n this.sink = new SafeSink(sink)\n this.scheduler = scheduler\n this.disposable = source.run(this, scheduler)\n}\n\nRecoverWithSink.prototype.event = function (t, x) {\n tryEvent.tryEvent(t, x, this.sink)\n}\n\nRecoverWithSink.prototype.end = function (t, x) {\n tryEvent.tryEnd(t, x, this.sink)\n}\n\nRecoverWithSink.prototype.error = function (t, e) {\n var nextSink = this.sink.disable()\n\n dispose.tryDispose(t, this.disposable, this.sink)\n this._startNext(t, e, nextSink)\n}\n\nRecoverWithSink.prototype._startNext = function (t, x, sink) {\n try {\n this.disposable = this._continue(this.f, x, sink)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nRecoverWithSink.prototype._continue = function (f, x, sink) {\n var stream = f(x)\n return stream.source.run(sink, this.scheduler)\n}\n\nRecoverWithSink.prototype.dispose = function () {\n return this.disposable.dispose()\n}\n","import { append, remove, findIndex } from '@most/prelude';\n\nvar MulticastDisposable = function MulticastDisposable (source, sink) {\n this.source = source\n this.sink = sink\n this.disposed = false\n};\n\nMulticastDisposable.prototype.dispose = function dispose () {\n if (this.disposed) {\n return\n }\n this.disposed = true\n var remaining = this.source.remove(this.sink)\n return remaining === 0 && this.source._dispose()\n};\n\nfunction tryEvent (t, x, sink) {\n try {\n sink.event(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nfunction tryEnd (t, x, sink) {\n try {\n sink.end(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n\nvar dispose = function (disposable) { return disposable.dispose(); }\n\nvar emptyDisposable = {\n dispose: function dispose$1 () {}\n}\n\nvar MulticastSource = function MulticastSource (source) {\n this.source = source\n this.sinks = []\n this._disposable = emptyDisposable\n};\n\nMulticastSource.prototype.run = function run (sink, scheduler) {\n var n = this.add(sink)\n if (n === 1) {\n this._disposable = this.source.run(this, scheduler)\n }\n return new MulticastDisposable(this, sink)\n};\n\nMulticastSource.prototype._dispose = function _dispose () {\n var disposable = this._disposable\n this._disposable = emptyDisposable\n return Promise.resolve(disposable).then(dispose)\n};\n\nMulticastSource.prototype.add = function add (sink) {\n this.sinks = append(sink, this.sinks)\n return this.sinks.length\n};\n\nMulticastSource.prototype.remove = function remove$1 (sink) {\n var i = findIndex(sink, this.sinks)\n // istanbul ignore next\n if (i >= 0) {\n this.sinks = remove(i, this.sinks)\n }\n\n return this.sinks.length\n};\n\nMulticastSource.prototype.event = function event (time, value) {\n var s = this.sinks\n if (s.length === 1) {\n return s[0].event(time, value)\n }\n for (var i = 0; i < s.length; ++i) {\n tryEvent(time, value, s[i])\n }\n};\n\nMulticastSource.prototype.end = function end (time, value) {\n var s = this.sinks\n for (var i = 0; i < s.length; ++i) {\n tryEnd(time, value, s[i])\n }\n};\n\nMulticastSource.prototype.error = function error (time, err) {\n var s = this.sinks\n for (var i = 0; i < s.length; ++i) {\n s[i].error(time, err)\n }\n};\n\nfunction multicast (stream) {\n var source = stream.source\n return source instanceof MulticastSource\n ? stream\n : new stream.constructor(new MulticastSource(source))\n}\n\nexport { MulticastSource };export default multicast;\n//# sourceMappingURL=multicast.es.js.map\n","/** @license MIT License (c) copyright 2010-2016 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\nimport Stream from './Stream'\nimport * as base from '@most/prelude'\nimport { of, empty, never } from './source/core'\nimport { from } from './source/from'\nimport { periodic } from './source/periodic'\nimport symbolObservable from 'symbol-observable'\n\n/**\n * Core stream type\n * @type {Stream}\n */\nexport { Stream }\n\n// Add of and empty to constructor for fantasy-land compat\nStream.of = of\nStream.empty = empty\n// Add from to constructor for ES Observable compat\nStream.from = from\nexport { of, of as just, empty, never, from, periodic }\n\n// -----------------------------------------------------------------------\n// Draft ES Observable proposal interop\n// https://github.com/zenparsing/es-observable\n\nimport { subscribe } from './observable/subscribe'\n\nStream.prototype.subscribe = function (subscriber) {\n return subscribe(subscriber, this)\n}\n\nStream.prototype[symbolObservable] = function () {\n return this\n}\n\n// -----------------------------------------------------------------------\n// Fluent adapter\n\nimport { thru } from './combinator/thru'\n\n/**\n * Adapt a functional stream transform to fluent style.\n * It applies f to the this stream object\n * @param {function(s: Stream): Stream} f function that\n * receives the stream itself and must return a new stream\n * @return {Stream}\n */\nStream.prototype.thru = function (f) {\n return thru(f, this)\n}\n\n// -----------------------------------------------------------------------\n// Adapting other sources\n\n/**\n * Create a stream of events from the supplied EventTarget or EventEmitter\n * @param {String} event event name\n * @param {EventTarget|EventEmitter} source EventTarget or EventEmitter. The source\n * must support either addEventListener/removeEventListener (w3c EventTarget:\n * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget),\n * or addListener/removeListener (node EventEmitter: http://nodejs.org/api/events.html)\n * @returns {Stream} stream of events of the specified type from the source\n */\nexport { fromEvent } from './source/fromEvent'\n\n// -----------------------------------------------------------------------\n// Observing\n\nimport { observe, drain } from './combinator/observe'\n\nexport { observe, observe as forEach, drain }\n\n/**\n * Process all the events in the stream\n * @returns {Promise} promise that fulfills when the stream ends, or rejects\n * if the stream fails with an unhandled error.\n */\nStream.prototype.observe = Stream.prototype.forEach = function (f) {\n return observe(f, this)\n}\n\n/**\n * Consume all events in the stream, without providing a function to process each.\n * This causes a stream to become active and begin emitting events, and is useful\n * in cases where all processing has been setup upstream via other combinators, and\n * there is no need to process the terminal events.\n * @returns {Promise} promise that fulfills when the stream ends, or rejects\n * if the stream fails with an unhandled error.\n */\nStream.prototype.drain = function () {\n return drain(this)\n}\n\n// -------------------------------------------------------\n\nimport { loop } from './combinator/loop'\n\nexport { loop }\n\n/**\n * Generalized feedback loop. Call a stepper function for each event. The stepper\n * will be called with 2 params: the current seed and the an event value. It must\n * return a new { seed, value } pair. The `seed` will be fed back into the next\n * invocation of stepper, and the `value` will be propagated as the event value.\n * @param {function(seed:*, value:*):{seed:*, value:*}} stepper loop step function\n * @param {*} seed initial seed value passed to first stepper call\n * @returns {Stream} new stream whose values are the `value` field of the objects\n * returned by the stepper\n */\nStream.prototype.loop = function (stepper, seed) {\n return loop(stepper, seed, this)\n}\n\n// -------------------------------------------------------\n\nimport { scan, reduce } from './combinator/accumulate'\n\nexport { scan, reduce }\n\n/**\n * Create a stream containing successive reduce results of applying f to\n * the previous reduce result and the current stream item.\n * @param {function(result:*, x:*):*} f reducer function\n * @param {*} initial initial value\n * @returns {Stream} new stream containing successive reduce results\n */\nStream.prototype.scan = function (f, initial) {\n return scan(f, initial, this)\n}\n\n/**\n * Reduce the stream to produce a single result. Note that reducing an infinite\n * stream will return a Promise that never fulfills, but that may reject if an error\n * occurs.\n * @param {function(result:*, x:*):*} f reducer function\n * @param {*} initial optional initial value\n * @returns {Promise} promise for the file result of the reduce\n */\nStream.prototype.reduce = function (f, initial) {\n return reduce(f, initial, this)\n}\n\n// -----------------------------------------------------------------------\n// Building and extending\n\nexport { unfold } from './source/unfold'\nexport { iterate } from './source/iterate'\nexport { generate } from './source/generate'\nimport { concat, cons as startWith } from './combinator/build'\n\nexport { concat, startWith }\n\n/**\n * @param {Stream} tail\n * @returns {Stream} new stream containing all items in this followed by\n * all items in tail\n */\nStream.prototype.concat = function (tail) {\n return concat(this, tail)\n}\n\n/**\n * @param {*} x value to prepend\n * @returns {Stream} a new stream with x prepended\n */\nStream.prototype.startWith = function (x) {\n return startWith(x, this)\n}\n\n// -----------------------------------------------------------------------\n// Transforming\n\nimport { map, constant, tap } from './combinator/transform'\nimport { ap } from './combinator/applicative'\n\nexport { map, constant, tap, ap }\n\n/**\n * Transform each value in the stream by applying f to each\n * @param {function(*):*} f mapping function\n * @returns {Stream} stream containing items transformed by f\n */\nStream.prototype.map = function (f) {\n return map(f, this)\n}\n\n/**\n * Assume this stream contains functions, and apply each function to each item\n * in the provided stream. This generates, in effect, a cross product.\n * @param {Stream} xs stream of items to which\n * @returns {Stream} stream containing the cross product of items\n */\nStream.prototype.ap = function (xs) {\n return ap(this, xs)\n}\n\n/**\n * Replace each value in the stream with x\n * @param {*} x\n * @returns {Stream} stream containing items replaced with x\n */\nStream.prototype.constant = function (x) {\n return constant(x, this)\n}\n\n/**\n * Perform a side effect for each item in the stream\n * @param {function(x:*):*} f side effect to execute for each item. The\n * return value will be discarded.\n * @returns {Stream} new stream containing the same items as this stream\n */\nStream.prototype.tap = function (f) {\n return tap(f, this)\n}\n\n// -----------------------------------------------------------------------\n// Transducer support\n\nimport { transduce } from './combinator/transduce'\n\nexport { transduce }\n\n/**\n * Transform this stream by passing its events through a transducer.\n * @param {function} transducer transducer function\n * @return {Stream} stream of events transformed by the transducer\n */\nStream.prototype.transduce = function (transducer) {\n return transduce(transducer, this)\n}\n\n// -----------------------------------------------------------------------\n// FlatMapping\n\nimport { flatMap, join } from './combinator/flatMap'\n\n// @deprecated flatMap, use chain instead\nexport { flatMap, flatMap as chain, join }\n\n/**\n * Map each value in the stream to a new stream, and merge it into the\n * returned outer stream. Event arrival times are preserved.\n * @param {function(x:*):Stream} f chaining function, must return a Stream\n * @returns {Stream} new stream containing all events from each stream returned by f\n */\nStream.prototype.chain = function (f) {\n return flatMap(f, this)\n}\n\n// @deprecated use chain instead\nStream.prototype.flatMap = Stream.prototype.chain\n\n /**\n * Monadic join. Flatten a Stream> to Stream by merging inner\n * streams to the outer. Event arrival times are preserved.\n * @returns {Stream} new stream containing all events of all inner streams\n */\nStream.prototype.join = function () {\n return join(this)\n}\n\nimport { continueWith } from './combinator/continueWith'\n\n// @deprecated flatMapEnd, use continueWith instead\nexport { continueWith, continueWith as flatMapEnd }\n\n/**\n * Map the end event to a new stream, and begin emitting its values.\n * @param {function(x:*):Stream} f function that receives the end event value,\n * and *must* return a new Stream to continue with.\n * @returns {Stream} new stream that emits all events from the original stream,\n * followed by all events from the stream returned by f.\n */\nStream.prototype.continueWith = function (f) {\n return continueWith(f, this)\n}\n\n// @deprecated use continueWith instead\nStream.prototype.flatMapEnd = Stream.prototype.continueWith\n\nimport { concatMap } from './combinator/concatMap'\n\nexport { concatMap }\n\nStream.prototype.concatMap = function (f) {\n return concatMap(f, this)\n}\n\n// -----------------------------------------------------------------------\n// Concurrent merging\n\nimport { mergeConcurrently } from './combinator/mergeConcurrently'\n\nexport { mergeConcurrently }\n\n/**\n * Flatten a Stream> to Stream by merging inner\n * streams to the outer, limiting the number of inner streams that may\n * be active concurrently.\n * @param {number} concurrency at most this many inner streams will be\n * allowed to be active concurrently.\n * @return {Stream} new stream containing all events of all inner\n * streams, with limited concurrency.\n */\nStream.prototype.mergeConcurrently = function (concurrency) {\n return mergeConcurrently(concurrency, this)\n}\n\n// -----------------------------------------------------------------------\n// Merging\n\nimport { merge, mergeArray } from './combinator/merge'\n\nexport { merge, mergeArray }\n\n/**\n * Merge this stream and all the provided streams\n * @returns {Stream} stream containing items from this stream and s in time\n * order. If two events are simultaneous they will be merged in\n * arbitrary order.\n */\nStream.prototype.merge = function (/* ...streams*/) {\n return mergeArray(base.cons(this, arguments))\n}\n\n// -----------------------------------------------------------------------\n// Combining\n\nimport { combine, combineArray } from './combinator/combine'\n\nexport { combine, combineArray }\n\n/**\n * Combine latest events from all input streams\n * @param {function(...events):*} f function to combine most recent events\n * @returns {Stream} stream containing the result of applying f to the most recent\n * event of each input stream, whenever a new event arrives on any stream.\n */\nStream.prototype.combine = function (f /*, ...streams*/) {\n return combineArray(f, base.replace(this, 0, arguments))\n}\n\n// -----------------------------------------------------------------------\n// Sampling\n\nimport { sample, sampleArray, sampleWith } from './combinator/sample'\n\nexport { sample, sampleArray, sampleWith }\n\n/**\n * When an event arrives on sampler, emit the latest event value from stream.\n * @param {Stream} sampler stream of events at whose arrival time\n * signal's latest value will be propagated\n * @returns {Stream} sampled stream of values\n */\nStream.prototype.sampleWith = function (sampler) {\n return sampleWith(sampler, this)\n}\n\n/**\n * When an event arrives on this stream, emit the result of calling f with the latest\n * values of all streams being sampled\n * @param {function(...values):*} f function to apply to each set of sampled values\n * @returns {Stream} stream of sampled and transformed values\n */\nStream.prototype.sample = function (f /* ...streams */) {\n return sampleArray(f, this, base.tail(arguments))\n}\n\n// -----------------------------------------------------------------------\n// Zipping\n\nimport { zip, zipArray } from './combinator/zip'\n\nexport { zip, zipArray }\n\n/**\n * Pair-wise combine items with those in s. Given 2 streams:\n * [1,2,3] zipWith f [4,5,6] -> [f(1,4),f(2,5),f(3,6)]\n * Note: zip causes fast streams to buffer and wait for slow streams.\n * @param {function(a:Stream, b:Stream, ...):*} f function to combine items\n * @returns {Stream} new stream containing pairs\n */\nStream.prototype.zip = function (f /*, ...streams*/) {\n return zipArray(f, base.replace(this, 0, arguments))\n}\n\n// -----------------------------------------------------------------------\n// Switching\n\nimport { switchLatest } from './combinator/switch'\n\n// @deprecated switch, use switchLatest instead\nexport { switchLatest, switchLatest as switch }\n\n/**\n * Given a stream of streams, return a new stream that adopts the behavior\n * of the most recent inner stream.\n * @returns {Stream} switching stream\n */\nStream.prototype.switchLatest = function () {\n return switchLatest(this)\n}\n\n// @deprecated use switchLatest instead\nStream.prototype.switch = Stream.prototype.switchLatest\n\n// -----------------------------------------------------------------------\n// Filtering\n\nimport { filter, skipRepeats, skipRepeatsWith } from './combinator/filter'\n\n// @deprecated distinct, use skipRepeats instead\n// @deprecated distinctBy, use skipRepeatsWith instead\nexport { filter, skipRepeats, skipRepeats as distinct, skipRepeatsWith, skipRepeatsWith as distinctBy }\n\n/**\n * Retain only items matching a predicate\n * stream: -12345678-\n * filter(x => x % 2 === 0, stream): --2-4-6-8-\n * @param {function(x:*):boolean} p filtering predicate called for each item\n * @returns {Stream} stream containing only items for which predicate returns truthy\n */\nStream.prototype.filter = function (p) {\n return filter(p, this)\n}\n\n/**\n * Skip repeated events, using === to compare items\n * stream: -abbcd-\n * distinct(stream): -ab-cd-\n * @returns {Stream} stream with no repeated events\n */\nStream.prototype.skipRepeats = function () {\n return skipRepeats(this)\n}\n\n/**\n * Skip repeated events, using supplied equals function to compare items\n * @param {function(a:*, b:*):boolean} equals function to compare items\n * @returns {Stream} stream with no repeated events\n */\nStream.prototype.skipRepeatsWith = function (equals) {\n return skipRepeatsWith(equals, this)\n}\n\n// -----------------------------------------------------------------------\n// Slicing\n\nimport { take, skip, slice, takeWhile, skipWhile, skipAfter } from './combinator/slice'\n\nexport { take, skip, slice, takeWhile, skipWhile, skipAfter }\n\n/**\n * stream: -abcd-\n * take(2, stream): -ab|\n * @param {Number} n take up to this many events\n * @returns {Stream} stream containing at most the first n items from this stream\n */\nStream.prototype.take = function (n) {\n return take(n, this)\n}\n\n/**\n * stream: -abcd->\n * skip(2, stream): ---cd->\n * @param {Number} n skip this many events\n * @returns {Stream} stream not containing the first n events\n */\nStream.prototype.skip = function (n) {\n return skip(n, this)\n}\n\n/**\n * Slice a stream by event index. Equivalent to, but more efficient than\n * stream.take(end).skip(start);\n * NOTE: Negative start and end are not supported\n * @param {Number} start skip all events before the start index\n * @param {Number} end allow all events from the start index to the end index\n * @returns {Stream} stream containing items where start <= index < end\n */\nStream.prototype.slice = function (start, end) {\n return slice(start, end, this)\n}\n\n/**\n * stream: -123451234->\n * takeWhile(x => x < 5, stream): -1234|\n * @param {function(x:*):boolean} p predicate\n * @returns {Stream} stream containing items up to, but not including, the\n * first item for which p returns falsy.\n */\nStream.prototype.takeWhile = function (p) {\n return takeWhile(p, this)\n}\n\n/**\n * stream: -123451234->\n * skipWhile(x => x < 5, stream): -----51234->\n * @param {function(x:*):boolean} p predicate\n * @returns {Stream} stream containing items following *and including* the\n * first item for which p returns falsy.\n */\nStream.prototype.skipWhile = function (p) {\n return skipWhile(p, this)\n}\n\n/**\n * stream: -123456789->\n * skipAfter(x => x === 5, stream):-12345|\n * @param {function(x:*):boolean} p predicate\n * @returns {Stream} stream containing items up to, *and including*, the\n * first item for which p returns truthy.\n */\nStream.prototype.skipAfter = function (p) {\n return skipAfter(p, this)\n}\n\n// -----------------------------------------------------------------------\n// Time slicing\n\nimport { takeUntil, skipUntil, during } from './combinator/timeslice'\n\n// @deprecated takeUntil, use until instead\n// @deprecated skipUntil, use since instead\nexport { takeUntil, takeUntil as until, skipUntil, skipUntil as since, during }\n\n/**\n * stream: -a-b-c-d-e-f-g->\n * signal: -------x\n * takeUntil(signal, stream): -a-b-c-|\n * @param {Stream} signal retain only events in stream before the first\n * event in signal\n * @returns {Stream} new stream containing only events that occur before\n * the first event in signal.\n */\nStream.prototype.until = function (signal) {\n return takeUntil(signal, this)\n}\n\n// @deprecated use until instead\nStream.prototype.takeUntil = Stream.prototype.until\n\n /**\n * stream: -a-b-c-d-e-f-g->\n * signal: -------x\n * takeUntil(signal, stream): -------d-e-f-g->\n * @param {Stream} signal retain only events in stream at or after the first\n * event in signal\n * @returns {Stream} new stream containing only events that occur after\n * the first event in signal.\n */\nStream.prototype.since = function (signal) {\n return skipUntil(signal, this)\n}\n\n// @deprecated use since instead\nStream.prototype.skipUntil = Stream.prototype.since\n\n /**\n * stream: -a-b-c-d-e-f-g->\n * timeWindow: -----s\n * s: -----t\n * stream.during(timeWindow): -----c-d-e-|\n * @param {Stream} timeWindow a stream whose first event (s) represents\n * the window start time. That event (s) is itself a stream whose first event (t)\n * represents the window end time\n * @returns {Stream} new stream containing only events within the provided timespan\n */\nStream.prototype.during = function (timeWindow) {\n return during(timeWindow, this)\n}\n\n// -----------------------------------------------------------------------\n// Delaying\n\nimport { delay } from './combinator/delay'\n\nexport { delay }\n\n/**\n * @param {Number} delayTime milliseconds to delay each item\n * @returns {Stream} new stream containing the same items, but delayed by ms\n */\nStream.prototype.delay = function (delayTime) {\n return delay(delayTime, this)\n}\n\n// -----------------------------------------------------------------------\n// Getting event timestamp\n\nimport { timestamp } from './combinator/timestamp'\nexport { timestamp }\n\n/**\n * Expose event timestamps into the stream. Turns a Stream into\n * Stream<{time:t, value:X}>\n * @returns {Stream<{time:number, value:*}>}\n */\nStream.prototype.timestamp = function () {\n return timestamp(this)\n}\n\n// -----------------------------------------------------------------------\n// Rate limiting\n\nimport { throttle, debounce } from './combinator/limit'\n\nexport { throttle, debounce }\n\n/**\n * Limit the rate of events\n * stream: abcd----abcd----\n * throttle(2, stream): a-c-----a-c-----\n * @param {Number} period time to suppress events\n * @returns {Stream} new stream that skips events for throttle period\n */\nStream.prototype.throttle = function (period) {\n return throttle(period, this)\n}\n\n/**\n * Wait for a burst of events to subside and emit only the last event in the burst\n * stream: abcd----abcd----\n * debounce(2, stream): -----d-------d--\n * @param {Number} period events occuring more frequently than this\n * on the provided scheduler will be suppressed\n * @returns {Stream} new debounced stream\n */\nStream.prototype.debounce = function (period) {\n return debounce(period, this)\n}\n\n// -----------------------------------------------------------------------\n// Awaiting Promises\n\nimport { fromPromise, awaitPromises } from './combinator/promises'\n\n// @deprecated await, use awaitPromises instead\nexport { fromPromise, awaitPromises, awaitPromises as await }\n\n/**\n * Await promises, turning a Stream> into Stream. Preserves\n * event order, but timeshifts events based on promise resolution time.\n * @returns {Stream} stream containing non-promise values\n */\nStream.prototype.awaitPromises = function () {\n return awaitPromises(this)\n}\n\n// @deprecated use awaitPromises instead\nStream.prototype.await = Stream.prototype.awaitPromises\n\n// -----------------------------------------------------------------------\n// Error handling\n\nimport { recoverWith, flatMapError, throwError } from './combinator/errors'\n\n// @deprecated flatMapError, use recoverWith instead\nexport { recoverWith, flatMapError, throwError }\n\n/**\n * If this stream encounters an error, recover and continue with items from stream\n * returned by f.\n * stream: -a-b-c-X-\n * f(X): d-e-f-g-\n * flatMapError(f, stream): -a-b-c-d-e-f-g-\n * @param {function(error:*):Stream} f function which returns a new stream\n * @returns {Stream} new stream which will recover from an error by calling f\n */\nStream.prototype.recoverWith = function (f) {\n return flatMapError(f, this)\n}\n\n// @deprecated use recoverWith instead\nStream.prototype.flatMapError = Stream.prototype.recoverWith\n\n// -----------------------------------------------------------------------\n// Multicasting\n\nimport multicast from '@most/multicast'\n\nexport { multicast }\n\n/**\n * Transform the stream into multicast stream. That means that many subscribers\n * to the stream will not cause multiple invocations of the internal machinery.\n * @returns {Stream} new stream which will multicast events to all observers.\n */\nStream.prototype.multicast = function () {\n return multicast(this)\n}\n\n// export the instance of the defaultScheduler for third-party libraries\nimport defaultScheduler from './scheduler/defaultScheduler'\n\nexport { defaultScheduler }\n\n// export an implementation of Task used internally for third-party libraries\nimport PropagateTask from './scheduler/PropagateTask'\n\nexport { PropagateTask }\n"],"names":["map","base.map","base.id","empty","fatal","dispose.create","dispose.empty","runProducer","ponyfill","symbolObservable","base.findIndex","this","base.removeAll","dispose.settable","fatalError","tryEvent.tryEvent","arguments","base.compose","run","dispose.all","reduce","runSource","base.tail","emit","error","dispose.once","dispose.tryDispose","cons","streamOf","Sink","tail","core.empty","transform.map","identity","copy","base.copy","base.reduce","base.drop","getSource","just","tryEvent.tryEnd","tryEvent","tryEnd","startWith","base.cons","base.replace"],"mappings":";;;;;;AAAA;;;;AAIA,AAAe,SAAS,MAAM,EAAE,MAAM,EAAE;EACtC,IAAI,CAAC,MAAM,GAAG,OAAM;CACrB;;AAED,MAAM,CAAC,SAAS,CAAC,GAAG,GAAG,UAAU,IAAI,EAAE,SAAS,EAAE;EAChD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;CACxC;;ACVD;;;;;;AAMA,SAAS,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE;EACnB,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;EACjB,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;EACzB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;EACT,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;IAC1B,CAAC,CAAC,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C;EACvB;;;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/most.min.js b/dist/most.min.js index 2fe0267d..eee08643 100644 --- a/dist/most.min.js +++ b/dist/most.min.js @@ -1 +1 @@ -!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= 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= 0");for(var i=n.length,r=new Array(i),o=0;o= 0");var n=e.length;return 0===n||t>=n?e:1===n?[]:p(t,e,n-1)}function p(t,e,n){var i,r=new Array(n);for(i=0;i=0&&o.active&&(o.time=o.time+o.period,ft(o,n)))}return n}function ft(t,e){var n=e.length;if(0!==n){var i=dt(t.time,e);i>=n?e.push(yt(t.time,[t])):t.time===e[i].time?e[i].events.push(t):e.splice(i,0,yt(t.time,[t]))}else e.push(yt(t.time,[t]))}function at(t,e){e.events=f(t,e.events)}function dt(t,e){for(var n,i,r=0,o=e.length;r=0&&e=0)return this.tasks[e].events.splice(n,1),!0}return!1},ct.prototype.removeAll=function(t){for(var e=this,n=0,i=this.tasks.length;n1){for(var o=new Array(r),s=0;s0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},Re.prototype.end=function(t,e){w(t,this.disposables[e.index],this.sink),0==--this.activeCount&&this.sink.end(t,e.value)},Le.prototype.run=function(t,e){var n=this.transducer(new Ne(t));return this.source.run(new Ce(Se(n),t),e)},Ce.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},Ce.prototype.end=function(t,e){return this.xf.result(e)},Ce.prototype.error=function(t,e){return this.sink.error(t,e)},Ne.prototype["@@transducer/init"]=Ne.prototype.init=function(){},Ne.prototype["@@transducer/step"]=Ne.prototype.step=function(t,e){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,e)},Ne.prototype["@@transducer/result"]=Ne.prototype.result=function(t){return this.sink.end(this.time,t)},qe.prototype.step=function(t,e){return this.tx["@@transducer/step"](t,e)},qe.prototype.result=function(t){return this.tx["@@transducer/result"](t)},qe.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},qe.prototype.getResult=function(t){return t["@@transducer/value"]},Be.prototype.step=function(t,e){return this.tx.step(t,e)},Be.prototype.result=function(t){return this.tx.result(t)},Be.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},Be.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)},Ue.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.lengthe&&cn(this,0,this,e,n&e-1)};var Oi=u,Fi=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 dn(this.f,u,s,t),c=0;c0?this.skip-=1:0!==this.take&&(this.take-=1,this.sink.event(t,e),0===this.take&&this.sink.end(t,e))},Bn.prototype.run=function(t,e){return this.source.run(new jn(this.p,t),e)},jn.prototype.end=Ct.prototype.end,jn.prototype.error=Ct.prototype.error,jn.prototype.event=function(t,e){if(this.active){var n=this.p;this.active=n(e),this.active?this.sink.event(t,e):this.sink.end(t,e)}},Dn.prototype.run=function(t,e){return this.source.run(new Un(this.p,t),e)},Un.prototype.end=Ct.prototype.end,Un.prototype.error=Ct.prototype.error,Un.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)},On.prototype.run=function(t,e){return this.source.run(new Fn(this.p,t),e)},Fn.prototype.event=function(t,e){if(!this.skipping){var n=this.p;this.skipping=n(e),this.sink.event(t,e),this.skipping&&this.sink.end(t,e)}},Fn.prototype.end=Ct.prototype.end,Fn.prototype.error=Ct.prototype.error,Kn.prototype.run=function(t,e){var n=new Xn(-1/0,t),i=new $n(this.maxSignal,t,e);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Qn.prototype.run=function(t,e){var n=new Zn(this.minSignal,t,e),i=new Xn(1/0,t);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Xn.prototype.error=Ct.prototype.error,Xn.prototype.event=ti,Xn.prototype.end=ti,Xn.prototype.dispose=ti,Yn.prototype.event=function(t,e){t>=this.min.value&&t=this.time&&(this.time=t+this.period,this.sink.event(t,e))},ai.prototype.end=Ct.prototype.end,ai.prototype.error=Ct.prototype.error,yi.prototype.run=function(t,e){return new li(this.dt,this.source,t,e)},li.prototype.event=function(t,e){this._clearTimer(),this.value=e,this.timer=this.scheduler.delay(this.dt,M.event(e,this.sink))},li.prototype.end=function(t,e){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,e)},li.prototype.error=function(t,e){this._clearTimer(),this.sink.error(t,e)},li.prototype.dispose=function(){this._clearTimer()},li.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},wi.prototype.run=function(t,e){return this.source.run(new ki(t,e),e)},ki.prototype.event=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._event(e)}).catch(this._errorBound)},ki.prototype.end=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._end(e)}).catch(this._errorBound)},ki.prototype.error=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._errorBound(e)}).catch(P)},ki.prototype._event=function(t){return t.then(this._eventBound)},ki.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)},mi.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},mi.prototype.end=function(t,e){this.active&&(this.disable(),this.sink.end(t,e))},mi.prototype.error=function(t,e){this.disable(),this.sink.error(t,e)},mi.prototype.disable=function(){return this.active=!1,this.sink};var Gi=_i;bi.prototype.run=function(t,e){return e.asap(new M(gi,this.value,t))},xi.prototype.run=function(t,e){return new Ei(this.f,this.source,t,e)},Ei.prototype.event=function(t,e){K(t,e,this.sink)},Ei.prototype.end=function(t,e){Q(t,e,this.sink)},Ei.prototype.error=function(t,e){var n=this.sink.disable();w(t,this.disposable,this.sink),this._startNext(t,e,n)},Ei.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Ei.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},Ei.prototype.dispose=function(){return this.disposable.dispose()};var Hi=function(t,e){this.source=t,this.sink=e,this.disposed=!1};Hi.prototype.dispose=function(){if(!this.disposed)return this.disposed=!0,0===this.source.remove(this.sink)&&this.source._dispose()};var Ji=function(t){return t.dispose()},Ki={dispose:function(){}},Qi=function(t){this.source=t,this.sinks=[],this._disposable=Ki};Qi.prototype.run=function(t,e){return 1===this.add(t)&&(this._disposable=this.source.run(this,e)),new Hi(this,t)},Qi.prototype._dispose=function(){var t=this._disposable;return this._disposable=Ki,Promise.resolve(t).then(Ji)},Qi.prototype.add=function(t){return this.sinks=i(t,this.sinks),this.sinks.length},Qi.prototype.remove=function(t){var e=a(t,this.sinks);return e>=0&&(this.sinks=c(e,this.sinks)),this.sinks.length},Qi.prototype.event=function(t,e){var n=this.sinks;if(1===n.length)return n[0].event(t,e);for(var i=0;i= 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= 0");for(var i=n.length,r=new Array(i),o=0;o= 0");var n=e.length;return 0===n||t>=n?e:1===n?[]:c(t,e,n-1)}function c(t,e,n){var i,r=new Array(n);for(i=0;i=0&&o.active&&(o.time=o.time+o.period,ft(o,n)))}return n}function ft(t,e){var n=e.length;if(0!==n){var i=dt(t.time,e);i>=n?e.push(lt(t.time,[t])):t.time===e[i].time?e[i].events.push(t):e.splice(i,0,lt(t.time,[t]))}else e.push(lt(t.time,[t]))}function at(t,e){e.events=f(t,e.events)}function dt(t,e){for(var n,i,r=0,o=e.length;r=0&&e=0)return this.tasks[e].events.splice(n,1),!0}return!1},pt.prototype.removeAll=function(t){for(var e=this,n=0,i=this.tasks.length;n1){for(var o=new Array(r),s=0;s0&&(this.hasValue[t]||(this.hasValue[t]=!0,this.awaiting-=1)),this.awaiting},Re.prototype.end=function(t,e){w(t,this.disposables[e.index],this.sink),0==--this.activeCount&&this.sink.end(t,e.value)},Le.prototype.run=function(t,e){var n=this.transducer(new Ne(t));return this.source.run(new Ce(Se(n),t),e)},Ce.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},Ce.prototype.end=function(t,e){return this.xf.result(e)},Ce.prototype.error=function(t,e){return this.sink.error(t,e)},Ne.prototype["@@transducer/init"]=Ne.prototype.init=function(){},Ne.prototype["@@transducer/step"]=Ne.prototype.step=function(t,e){return isNaN(t)||(this.time=Math.max(t,this.time)),this.sink.event(this.time,e)},Ne.prototype["@@transducer/result"]=Ne.prototype.result=function(t){return this.sink.end(this.time,t)},qe.prototype.step=function(t,e){return this.tx["@@transducer/step"](t,e)},qe.prototype.result=function(t){return this.tx["@@transducer/result"](t)},qe.prototype.isReduced=function(t){return null!=t&&t["@@transducer/reduced"]},qe.prototype.getResult=function(t){return t["@@transducer/value"]},Be.prototype.step=function(t,e){return this.tx.step(t,e)},Be.prototype.result=function(t){return this.tx.result(t)},Be.prototype.isReduced=function(t){return null!=t&&t.__transducers_reduced__},Be.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)},Ue.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.lengthe&&pn(this,0,this,e,n&e-1)};var Oi=u,Fi=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 dn(this.f,u,s,t),p=0;p0?this.skip-=1:0!==this.take&&(this.take-=1,this.sink.event(t,e),0===this.take&&(this.disposable.dispose(),this.sink.end(t,e)))},Bn.prototype.run=function(t,e){var n=x(),i=new jn(this.p,t,n);return n.setDisposable(this.source.run(i,e)),n},jn.prototype.end=Ct.prototype.end,jn.prototype.error=Ct.prototype.error,jn.prototype.event=function(t,e){if(this.active){var n=this.p;this.active=n(e),this.active?this.sink.event(t,e):(this.disposable.dispose(),this.sink.end(t,e))}},Vn.prototype.run=function(t,e){return this.source.run(new Un(this.p,t),e)},Un.prototype.end=Ct.prototype.end,Un.prototype.error=Ct.prototype.error,Un.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)},On.prototype.run=function(t,e){return this.source.run(new Fn(this.p,t),e)},Fn.prototype.event=function(t,e){if(!this.skipping){var n=this.p;this.skipping=n(e),this.sink.event(t,e),this.skipping&&this.sink.end(t,e)}},Fn.prototype.end=Ct.prototype.end,Fn.prototype.error=Ct.prototype.error,Kn.prototype.run=function(t,e){var n=new Xn(-1/0,t),i=new $n(this.maxSignal,t,e);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Qn.prototype.run=function(t,e){var n=new Zn(this.minSignal,t,e),i=new Xn(1/0,t);return _([n,i,this.source.run(new Yn(n,i,t),e)])},Xn.prototype.error=Ct.prototype.error,Xn.prototype.event=ti,Xn.prototype.end=ti,Xn.prototype.dispose=ti,Yn.prototype.event=function(t,e){t>=this.min.value&&t=this.time&&(this.time=t+this.period,this.sink.event(t,e))},ai.prototype.end=Ct.prototype.end,ai.prototype.error=Ct.prototype.error,li.prototype.run=function(t,e){return new yi(this.dt,this.source,t,e)},yi.prototype.event=function(t,e){this._clearTimer(),this.value=e,this.timer=this.scheduler.delay(this.dt,M.event(e,this.sink))},yi.prototype.end=function(t,e){this._clearTimer()&&(this.sink.event(t,this.value),this.value=void 0),this.sink.end(t,e)},yi.prototype.error=function(t,e){this._clearTimer(),this.sink.error(t,e)},yi.prototype.dispose=function(){this._clearTimer()},yi.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},wi.prototype.run=function(t,e){return this.source.run(new ki(t,e),e)},ki.prototype.event=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._event(e)}).catch(this._errorBound)},ki.prototype.end=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._end(e)}).catch(this._errorBound)},ki.prototype.error=function(t,e){var n=this;this.queue=this.queue.then(function(){return n._errorBound(e)}).catch(P)},ki.prototype._event=function(t){return t.then(this._eventBound)},ki.prototype._end=function(t){return Promise.resolve(t).then(this._endBound)},mi.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},mi.prototype.end=function(t,e){this.active&&(this.disable(),this.sink.end(t,e))},mi.prototype.error=function(t,e){this.disable(),this.sink.error(t,e)},mi.prototype.disable=function(){return this.active=!1,this.sink};var Gi=_i;bi.prototype.run=function(t,e){return e.asap(new M(gi,this.value,t))},xi.prototype.run=function(t,e){return new Ei(this.f,this.source,t,e)},Ei.prototype.event=function(t,e){K(t,e,this.sink)},Ei.prototype.end=function(t,e){Q(t,e,this.sink)},Ei.prototype.error=function(t,e){var n=this.sink.disable();w(t,this.disposable,this.sink),this._startNext(t,e,n)},Ei.prototype._startNext=function(t,e,n){try{this.disposable=this._continue(this.f,e,n)}catch(e){n.error(t,e)}},Ei.prototype._continue=function(t,e,n){return t(e).source.run(n,this.scheduler)},Ei.prototype.dispose=function(){return this.disposable.dispose()};var Hi=function(t,e){this.source=t,this.sink=e,this.disposed=!1};Hi.prototype.dispose=function(){if(!this.disposed)return this.disposed=!0,0===this.source.remove(this.sink)&&this.source._dispose()};var Ji=function(t){return t.dispose()},Ki={dispose:function(){}},Qi=function(t){this.source=t,this.sinks=[],this._disposable=Ki};Qi.prototype.run=function(t,e){return 1===this.add(t)&&(this._disposable=this.source.run(this,e)),new Hi(this,t)},Qi.prototype._dispose=function(){var t=this._disposable;return this._disposable=Ki,Promise.resolve(t).then(Ji)},Qi.prototype.add=function(t){return this.sinks=i(t,this.sinks),this.sinks.length},Qi.prototype.remove=function(t){var e=a(t,this.sinks);return e>=0&&(this.sinks=p(e,this.sinks)),this.sinks.length},Qi.prototype.event=function(t,e){var n=this.sinks;if(1===n.length)return n[0].event(t,e);for(var i=0;i