text: /*! Kefir.js v2.7.2
   *  https://github.com/rpominov/kefir
   */
  !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):"object"==typeof exports?exports.Kefir=n():t.Kefir=n()}(this,function(){return function(t){function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function i(t,n,e){return function(){if(r.DEPRECATION_WARNINGS&&"undefined"!=typeof console&&console.log){var i="Method `"+t+"` is deprecated, and to be removed in v3.0.0.\nUse `"+n+"` instead.\nTo disable all warnings like this set `Kefir.DEPRECATION_WARNINGS = false`.";console.log(i)}return e.apply(this,arguments)}}var r=t.exports={};r.Kefir=r;var s=r.Observable=e(1);r.Stream=e(6),r.Property=e(7),r.never=e(8),r.later=e(9),r.interval=e(11),r.sequentially=e(12),r.fromPoll=e(13),r.withInterval=e(14),r.fromCallback=e(16),r.fromNodeCallback=e(18),r.fromEvents=e(19),r.stream=e(17),r.constant=e(22),r.constantError=e(23),r.fromPromise=e(24);var u=e(25);s.prototype.toProperty=function(t){return u(this,t)};var a=e(27);s.prototype.changes=function(){return a(this)};var o=e(28);s.prototype.toPromise=function(t){return o(this,t)};var c=e(29);s.prototype.map=function(t){return c(this,t)};var h=e(30);s.prototype.filter=function(t){return h(this,t)};var l=e(31);s.prototype.take=function(t){return l(this,t)};var f=e(32);s.prototype.takeWhile=function(t){return f(this,t)};var _=e(33);s.prototype.last=function(){return _(this)};var d=e(34);s.prototype.skip=function(t){return d(this,t)};var m=e(35);s.prototype.skipWhile=function(t){return m(this,t)};var v=e(36);s.prototype.skipDuplicates=function(t){return v(this,t)};var p=e(37);s.prototype.diff=function(t,n){return p(this,t,n)};var y=e(38);s.prototype.scan=function(t,n){return y(this,t,n)};var g=e(39);s.prototype.flatten=function(t){return g(this,t)};var E=e(40);s.prototype.delay=function(t){return E(this,t)};var S=e(41);s.prototype.throttle=function(t,n){return S(this,t,n)};var A=e(43);s.prototype.debounce=function(t,n){return A(this,t,n)};var x=e(44);s.prototype.valuesToErrors=function(t){return x(this,t)};var b=e(45);s.prototype.errorsToValues=function(t){return b(this,t)};var V=e(46);s.prototype.mapErrors=function(t){return V(this,t)};var w=e(47);s.prototype.filterErrors=function(t){return w(this,t)};var T=e(48);s.prototype.endOnError=function(){return T(this)};var P=e(49);s.prototype.skipValues=function(){return P(this)};var N=e(50);s.prototype.skipErrors=function(){return N(this)};var k=e(51);s.prototype.skipEnd=function(){return k(this)};var $=e(52);s.prototype.beforeEnd=function(t){return $(this,t)};var I=e(53);s.prototype.slidingWindow=function(t,n){return I(this,t,n)};var C=e(54);s.prototype.bufferWhile=function(t,n){return C(this,t,n)};var L=e(55);s.prototype.transduce=function(t){return L(this,t)};var O=e(56);s.prototype.withHandler=function(t){return O(this,t)};var R=r.combine=e(57);s.prototype.combine=function(t,n){return R([this,t],n)};var B=r.zip=e(58);s.prototype.zip=function(t,n){return B([this,t],n)};var D=r.merge=e(59);s.prototype.merge=function(t){return D([this,t])};var H=r.concat=e(61);s.prototype.concat=function(t){return H([this,t])};var U=r.Pool=e(63);r.pool=function(){return new U},r.repeat=e(62);var W=e(64);s.prototype.flatMap=function(t){return new W(this,t).setName(this,"flatMap")},s.prototype.flatMapLatest=function(t){return new W(this,t,{concurLim:1,drop:"old"}).setName(this,"flatMapLatest")},s.prototype.flatMapFirst=function(t){return new W(this,t,{concurLim:1}).setName(this,"flatMapFirst")},s.prototype.flatMapConcat=function(t){return new W(this,t,{queueLim:-1,concurLim:1}).setName(this,"flatMapConcat")},s.prototype.flatMapConcurLimit=function(t,n){return new W(this,t,{queueLim:-1,concurLim:n}).setName(this,"flatMapConcurLimit")};var M=e(65);s.prototype.flatMapErrors=function(t){return new M(this,t).setName(this,"flatMapErrors")};var q=e(66);s.prototype.filterBy=function(t){return q(this,t)};var K=e(68);s.prototype.sampledBy=function(t,n){return K(this,t,n)};var F=e(69);s.prototype.skipUntilBy=function(t){return F(this,t)};var G=e(70);s.prototype.takeUntilBy=function(t){return G(this,t)};var Q=e(71);s.prototype.bufferBy=function(t,n){return Q(this,t,n)};var j=e(72);s.prototype.bufferWhileBy=function(t,n){return j(this,t,n)};var Y=e(73);s.prototype.awaiting=function(t){return Y(this,t)},r.DEPRECATION_WARNINGS=!0;var z=r.Emitter=e(74);r.emitter=i("Kefir.emitter()","Kefir.stream()",function(){return new z});var J=r.Bus=e(75);r.bus=i("Kefir.bus()","Kefir.pool() or Kefir.stream()",function(){return new J});var X=e(76);s.prototype.reduce=i(".reduce(fn, seed)",".scan(fn, seed).last()",function(t,n){return X(this,t,n)});var Z=e(77);r.sampledBy=i("Kefir.sampledBy()","Kefir.combine()",Z);var tt=e(78);r.repeatedly=i("Kefir.repeatedly()","Kefir.repeat(() => Kefir.sequentially(...)})",tt);var nt=e(79);s.prototype.mapTo=i(".mapTo()",".map(() => value)",function(t){return nt(this,t)});var et=e(80);s.prototype.tap=i(".tap()",".map((v) => {fn(v); return v})",function(t){return et(this,t)});var it=e(81);s.prototype.pluck=i(".pluck()",".map((x) => x.foo)",function(t){return it(this,t)});var rt=e(82);s.prototype.invoke=i(".invoke()",".map((x) => x.foo())",function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),i=1;n>i;i++)e[i-1]=arguments[i];return rt(this,t,e)});var st=e(83);s.prototype.timestamp=i(".timestamp()",".map((x) => {value: x, time: Date.now()})",function(){return st(this)});var ut=e(84);r.and=i("Kefir.and()","Kefir.combine([a, b], (a, b) => a && b)",ut),s.prototype.and=i(".and()",".combine(other, (a, b) => a && b)",function(t){return ut([this,t])});var at=e(85);r.or=i("Kefir.or()","Kefir.combine([a, b], (a, b) => a || b)",at),s.prototype.or=i(".or()",".combine(other, (a, b) => a || b)",function(t){return at([this,t])});var ot=e(86);s.prototype.not=i(".not()",".map((x) => !x)",function(){return ot(this)});var ct=e(20);r.fromSubUnsub=i(".fromSubUnsub()","Kefir.stream()",ct);var ht=e(87);s.prototype.takeWhileBy=i(".takeWhileBy(foo)",".skipUntilBy(foo.filter((x) => !x))",function(t){return ht(this,t)});var lt=e(88);s.prototype.skipWhileBy=i(".skipWhileBy(foo)",".takeUntilBy(foo.filter((x) => !x))",function(t){return lt(this,t)})},function(t,n,e){"use strict";function i(){this._dispatcher=new f,this._active=!1,this._alive=!0,this._activating=!1,this._logHandlers=null}var r=e(2),s=r.extend,u=e(3),a=u.VALUE,o=u.ERROR,c=u.ANY,h=u.END,l=e(4),f=l.Dispatcher,_=l.callSubscriber,d=e(5),m=d.findByPred;s(i.prototype,{_name:"observable",_onActivation:function(){},_onDeactivation:function(){},_setActive:function(t){this._active!==t&&(this._active=t,t?(this._activating=!0,this._onActivation(),this._activating=!1):this._onDeactivation())},_clear:function(){this._setActive(!1),this._dispatcher.cleanup(),this._dispatcher=null,this._logHandlers=null},_emit:function(t,n){switch(t){case a:return this._emitValue(n);case o:return this._emitError(n);case h:return this._emitEnd()}},_emitValue:function(t){this._alive&&this._dispatcher.dispatch({type:a,value:t,current:this._activating})},_emitError:function(t){this._alive&&this._dispatcher.dispatch({type:o,value:t,current:this._activating})},_emitEnd:function(){this._alive&&(this._alive=!1,this._dispatcher.dispatch({type:h,current:this._activating}),this._clear())},_on:function(t,n){return this._alive?(this._dispatcher.add(t,n),this._setActive(!0)):_(t,n,{type:h,current:!0}),this},_off:function(t,n){if(this._alive){var e=this._dispatcher.remove(t,n);0===e&&this._setActive(!1)}return this},onValue:function(t){return this._on(a,t)},onError:function(t){return this._on(o,t)},onEnd:function(t){return this._on(h,t)},onAny:function(t){return this._on(c,t)},offValue:function(t){return this._off(a,t)},offError:function(t){return this._off(o,t)},offEnd:function(t){return this._off(h,t)},offAny:function(t){return this._off(c,t)},_ofSameType:function(t,n){return t.prototype.getType()===this.getType()?t:n},setName:function(t,n){return this._name=n?t._name+"."+n:t,this},log:function(){var t=arguments.length<=0||void 0===arguments[0]?this.toString():arguments[0],n=function(n){var e="<"+n.type+(n.current?":current":"")+">";n.type===h?console.log(t,e):console.log(t,e,n.value)};return this._alive&&(this._logHandlers||(this._logHandlers=[]),this._logHandlers.push({name:t,handler:n})),this.onAny(n),this},offLog:function(){var t=arguments.length<=0||void 0===arguments[0]?this.toString():arguments[0];if(this._logHandlers){var n=m(this._logHandlers,function(n){return n.name===t});-1!==n&&(this.offAny(this._logHandlers[n].handler),this._logHandlers.splice(n,1))}return this}}),i.prototype.toString=function(){return"["+this._name+"]"},t.exports=i},function(t,n){"use strict";function e(t){var n=function(){};return n.prototype=t,new n}function i(t){var n=arguments.length,e=void 0,i=void 0;for(e=1;n>e;e++)for(i in arguments[e])t[i]=arguments[e][i];return t}function r(t,n){var r=arguments.length,s=void 0;for(t.prototype=e(n.prototype),t.prototype.constructor=t,s=2;r>s;s++)i(t.prototype,arguments[s]);return t}t.exports={extend:i,inherit:r}},function(t,n){"use strict";n.NOTHING=["<nothing>"],n.END="end",n.VALUE="value",n.ERROR="error",n.ANY="any"},function(t,n,e){"use strict";function i(t,n,e){t===h?n(e):t===e.type&&(t===o||t===c?n(e.value):n())}function r(){this._items=[],this._inLoop=0,this._removedItems=null}var s=e(2),u=s.extend,a=e(3),o=a.VALUE,c=a.ERROR,h=a.ANY,l=e(5),f=l.concat,_=l.findByPred,d=l.remove,m=l.contains;u(r.prototype,{add:function(t,n){return this._items=f(this._items,[{type:t,fn:n}]),this._items.length},remove:function(t,n){var e=_(this._items,function(e){return e.type===t&&e.fn===n});return 0!==this._inLoop&&-1!==e&&(null===this._removedItems&&(this._removedItems=[]),this._removedItems.push(this._items[e])),this._items=d(this._items,e),this._items.length},dispatch:function(t){this._inLoop++;for(var n=0,e=this._items;n<e.length&&null!==this._items;n++)null!==this._removedItems&&m(this._removedItems,e[n])||i(e[n].type,e[n].fn,t);this._inLoop--,0===this._inLoop&&(this._removedItems=null)},cleanup:function(){this._items=null}}),t.exports={callSubscriber:i,Dispatcher:r}},function(t,n){"use strict";function e(t,n){var e=void 0,i=void 0,r=void 0,s=void 0;if(0===t.length)return n;if(0===n.length)return t;for(s=0,e=new Array(t.length+n.length),i=t.length,r=0;i>r;r++,s++)e[s]=t[r];for(i=n.length,r=0;i>r;r++,s++)e[s]=n[r];return e}function i(t,n){var e=t.length,i=new Array(e),r=void 0;for(r=0;e>r;r++)i[(r+n)%e]=t[r];return i}function r(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)if(t[i]===n)return i;return-1}function s(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)if(n(t[i]))return i;return-1}function u(t){var n=t.length,e=new Array(n),i=void 0;for(i=0;n>i;i++)e[i]=t[i];return e}function a(t,n){var e=t.length,i=void 0,r=void 0,s=void 0;if(n>=0&&e>n){if(1===e)return[];for(i=new Array(e-1),r=0,s=0;e>r;r++)r!==n&&(i[s]=t[r],s++);return i}return t}function o(t,n){return a(t,s(t,n))}function c(t,n){var e=t.length,i=new Array(e),r=void 0;for(r=0;e>r;r++)i[r]=n(t[r]);return i}function h(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)n(t[i])}function l(t,n){var e=t.length,i=void 0;for(i=0;e>i;i++)t[i]=n}function f(t,n){return-1!==r(t,n)}function _(t,n,e){var i=Math.min(e,t.length+1),r=t.length-i+1,s=new Array(i),u=void 0;for(u=r;i>u;u++)s[u-r]=t[u];return s[i-1]=n,s}t.exports={concat:e,circleShift:i,find:r,findByPred:s,cloneArray:u,remove:a,removeByPred:o,map:c,forEach:h,fillArray:l,contains:f,slide:_}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(2),s=r.inherit,u=e(1);s(i,u,{_name:"stream",getType:function(){return"stream"}}),t.exports=i},function(t,n,e){"use strict";function i(){f.call(this),this._currentEvent=null}var r=e(2),s=r.inherit,u=e(3),a=u.VALUE,o=u.ERROR,c=u.END,h=e(4),l=h.callSubscriber,f=e(1);s(i,f,{_name:"property",_emitValue:function(t){this._alive&&(this._activating||this._dispatcher.dispatch({type:a,value:t,current:this._activating}),this._currentEvent={type:a,value:t,current:!0})},_emitError:function(t){this._alive&&(this._activating||this._dispatcher.dispatch({type:o,value:t,current:this._activating}),this._currentEvent={type:o,value:t,current:!0})},_emitEnd:function(){this._alive&&(this._alive=!1,this._activating||this._dispatcher.dispatch({type:c,current:this._activating}),this._clear())},_on:function(t,n){return this._alive&&(this._dispatcher.add(t,n),this._setActive(!0)),null!==this._currentEvent&&l(t,n,this._currentEvent),this._alive||l(t,n,{type:c,current:!0}),this},getType:function(){return"property"}}),t.exports=i},function(t,n,e){"use strict";var i=e(6),r=new i;r._emitEnd(),r._name="never",t.exports=function(){return r}},function(t,n,e){"use strict";var i=e(10),r=i({_name:"later",_init:function(t){var n=t.x;this._x=n},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x),this._emitEnd()}});t.exports=function(t,n){return new r(t,{x:n})}},function(t,n,e){"use strict";var i=e(2),r=i.inherit,s=e(6);t.exports=function(t){function n(t,n){var e=this;s.call(this),this._wait=t,this._intervalId=null,this._$onTick=function(){return e._onTick()},this._init(n)}return r(n,s,{_init:function(t){},_free:function(){},_onTick:function(){},_onActivation:function(){this._intervalId=setInterval(this._$onTick,this._wait)},_onDeactivation:function(){null!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},_clear:function(){s.prototype._clear.call(this),this._$onTick=null,this._free()}},t),n}},function(t,n,e){"use strict";var i=e(10),r=i({_name:"interval",_init:function(t){var n=t.x;this._x=n},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x)}});t.exports=function(t,n){return new r(t,{x:n})}},function(t,n,e){"use strict";var i=e(10),r=e(5),s=r.cloneArray,u=e(8),a=i({_name:"sequentially",_init:function(t){var n=t.xs;this._xs=s(n)},_free:function(){this._xs=null},_onTick:function(){1===this._xs.length?(this._emitValue(this._xs[0]),this._emitEnd()):this._emitValue(this._xs.shift())}});t.exports=function(t,n){return 0===n.length?u():new a(t,{xs:n})}},function(t,n,e){"use strict";var i=e(10),r=i({_name:"fromPoll",_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_onTick:function(){var t=this._fn;this._emitValue(t())}});t.exports=function(t,n){return new r(t,{fn:n})}},function(t,n,e){"use strict";var i=e(10),r=e(15),s=i({_name:"withInterval",_init:function(t){var n=t.fn;this._fn=n,this._emitter=r(this)},_free:function(){this._fn=null,this._emitter=null},_onTick:function(){var t=this._fn;t(this._emitter)}});t.exports=function(t,n){return new s(t,{fn:n})}},function(t,n){"use strict";t.exports=function(t){function n(n){return t._emitValue(n),t._active}function e(n){return t._emitError(n),t._active}function i(){return t._emitEnd(),t._active}function r(n){return t._emit(n.type,n.value),t._active}return{value:n,error:e,end:i,event:r,emit:n,emitEvent:r}}},function(t,n,e){"use strict";var i=e(17);t.exports=function(t){var n=!1;return i(function(e){n||(t(function(t){e.emit(t),e.end()}),n=!0)}).setName("fromCallback")}},function(t,n,e){"use strict";function i(t){u.call(this),this._fn=t,this._unsubscribe=null}var r=e(2),s=r.inherit,u=e(6),a=e(15);s(i,u,{_name:"stream",_onActivation:function(){var t=this._fn,n=t(a(this));this._unsubscribe="function"==typeof n?n:null,this._active||this._callUnsubscribe()},_callUnsubscribe:function(){null!==this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null)},_onDeactivation:function(){this._callUnsubscribe()},_clear:function(){u.prototype._clear.call(this),this._fn=null}}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";var i=e(17);t.exports=function(t){var n=!1;return i(function(e){n||(t(function(t,n){t?e.error(t):e.emit(n),e.end()}),n=!0)}).setName("fromNodeCallback")}},function(t,n,e){"use strict";var i=e(20),r=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"]];t.exports=function(t,n,e){for(var s=void 0,u=void 0,a=0;a<r.length;a++)if("function"==typeof t[r[a][0]]&&"function"==typeof t[r[a][1]]){s=r[a][0],u=r[a][1];break}if(void 0===s)throw new Error("target don't support any of addEventListener/removeEventListener, addListener/removeListener, on/off method pair");return i(function(e){return t[s](n,e)},function(e){return t[u](n,e)},e).setName("fromEvents")}},function(t,n,e){"use strict";var i=e(17),r=e(21),s=r.apply;t.exports=function(t,n,e){return i(function(i){var r=e?function(){i.emit(s(e,this,arguments))}:i.emit;return t(r),function(){return n(r)}}).setName("fromSubUnsub")}},function(t,n){"use strict";function e(t,n){switch(n){case 0:return function(n){return t()};case 1:return function(n){return t(n[0])};case 2:return function(n){return t(n[0],n[1])};case 3:return function(n){return t(n[0],n[1],n[2])};case 4:return function(n){return t(n[0],n[1],n[2],n[3])};default:return function(n){return t.apply(null,n)}}}function i(t,n,e){var i=e?e.length:0;if(null==n)switch(i){case 0:return t();case 1:return t(e[0]);case 2:return t(e[0],e[1]);case 3:return t(e[0],e[1],e[2]);case 4:return t(e[0],e[1],e[2],e[3]);default:return t.apply(null,e)}else switch(i){case 0:return t.call(n);default:return t.apply(n,e)}}t.exports={spread:e,apply:i}},function(t,n,e){"use strict";function i(t){this._currentEvent={type:"value",value:t,current:!0}}var r=e(2),s=r.inherit,u=e(7);s(i,u,{_name:"constant",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(t){this._currentEvent={type:"error",value:t,current:!0}}var r=e(2),s=r.inherit,u=e(7);s(i,u,{_name:"constantError",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";var i=e(17),r=e(25);t.exports=function(t){var n=!1,e=i(function(e){if(!n){var i=function(t){e.emit(t),e.end()},r=function(t){e.error(t),e.end()},s=t.then(i,r);s&&"function"==typeof s.done&&s.done(),n=!0}});return r(e,null).setName("fromPromise")}},function(t,n,e){"use strict";var i=e(26),r=i.createProperty,s=r("toProperty",{_init:function(t){var n=t.fn;this._getInitialCurrent=n},_onActivation:function(){if(null!==this._getInitialCurrent){var t=this._getInitialCurrent;this._emitValue(t())}this._source.onAny(this._$handleAny)}});t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(null!==n&&"function"!=typeof n)throw new Error("You should call toProperty() with a function or no arguments.");return new s(t,{fn:n})}},function(t,n,e){"use strict";function i(t,n){return function(e,i){var r=this;t.call(this),this._source=e,this._name=e._name+"."+n,this._init(i),this._$handleAny=function(t){return r._handleAny(t)}}}function r(t){return{_init:function(t){},_free:function(){},_handleValue:function(t){this._emitValue(t)},_handleError:function(t){this._emitError(t)},_handleEnd:function(){this._emitEnd()},_handleAny:function(t){switch(t.type){case f:return this._handleValue(t.value);case _:return this._handleError(t.value);case d:return this._handleEnd()}},_onActivation:function(){this._source.onAny(this._$handleAny)},_onDeactivation:function(){this._source.offAny(this._$handleAny)},_clear:function(){t.prototype._clear.call(this),this._source=null,this._$handleAny=null,this._free()}}}function s(t,n){var e=i(a,t);return h(e,a,r(a),n),e}function u(t,n){var e=i(o,t);return h(e,o,r(o),n),e}var a=e(6),o=e(7),c=e(2),h=c.inherit,l=e(3),f=l.VALUE,_=l.ERROR,d=l.END;t.exports={createStream:s,createProperty:u}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=r("changes",{_handleValue:function(t){this._activating||this._emitValue(t)},_handleError:function(t){this._activating||this._emitError(t)}});t.exports=function(t){return new s(t)}},function(t,n){"use strict";function e(){if("function"==typeof Promise)return Promise;throw new Error("There isn't default Promise, use shim or parameter")}t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?e():arguments[1],i=null;return new n(function(n,e){t.onAny(function(t){"end"===t.type&&null!==i?(("value"===i.type?n:e)(i.value),i=null):i=t})})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;this._emitValue(n(t))}},a=r("map",u),o=s("map",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;n(t)&&this._emitValue(t)}},a=r("filter",u),o=s("filter",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.n;this._n=n,0>=n&&this._emitEnd()},_handleValue:function(t){this._n--,this._emitValue(t),0===this._n&&this._emitEnd()}},a=r("take",u),o=s("take",u);t.exports=function(t,n){return new(t._ofSameType(a,o))(t,{n:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;n(t)?this._emitValue(t):this._emitEnd()}},a=r("takeWhile",u),o=s("takeWhile",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_init:function(){this._lastValue=a},_free:function(){this._lastValue=null},_handleValue:function(t){this._lastValue=t},_handleEnd:function(){this._lastValue!==a&&this._emitValue(this._lastValue),this._emitEnd()}},c=r("last",o),h=s("last",o);t.exports=function(t){return new(t._ofSameType(c,h))(t)}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.n;this._n=Math.max(0,n)},_handleValue:function(t){0===this._n?this._emitValue(t):this._n--}},a=r("skip",u),o=s("skip",u);t.exports=function(t,n){return new(t._ofSameType(a,o))(t,{n:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn;null===this._fn||n(t)||(this._fn=null),null===this._fn&&this._emitValue(t)}},a=r("skipWhile",u),o=s("skipWhile",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_init:function(t){var n=t.fn;this._fn=n,this._prev=a},_free:function(){this._fn=null,this._prev=null},_handleValue:function(t){var n=this._fn;this._prev!==a&&n(this._prev,t)||(this._prev=t,this._emitValue(t))}},c=r("skipDuplicates",o),h=s("skipDuplicates",o),l=function(t,n){return t===n};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?l:arguments[1];return new(t._ofSameType(c,h))(t,{fn:n})}},function(t,n,e){"use strict";function i(t,n){return[t,n]}var r=e(26),s=r.createStream,u=r.createProperty,a=e(3),o=a.NOTHING,c={_init:function(t){var n=t.fn,e=t.seed;this._fn=n,this._prev=e},_free:function(){this._prev=null,this._fn=null},_handleValue:function(t){if(this._prev!==o){var n=this._fn;this._emitValue(n(this._prev,t))}this._prev=t}},h=s("diff",c),l=u("diff",c);t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?o:arguments[2];return new(t._ofSameType(h,l))(t,{fn:n||i,seed:e})}},function(t,n,e){"use strict";var i=e(26),r=i.createProperty,s=e(3),u=s.ERROR,a=s.NOTHING,o=r("scan",{_init:function(t){var n=t.fn,e=t.seed;this._fn=n,e!==a&&this._emitValue(e)},_free:function(){this._fn=null},_handleValue:function(t){if(null!==this._currentEvent&&this._currentEvent.type!==u){var n=this._fn;t=n(this._currentEvent.value,t)}this._emitValue(t)}});t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?a:arguments[2];return new o(t,{fn:n,seed:e})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){for(var n=this._fn,e=n(t),i=0;i<e.length;i++)this._emitValue(e[i])}},a=r("flatten",u),o=s("flatten",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=this,e=t.wait;this._wait=Math.max(0,e),this._buff=[],this._$shiftBuff=function(){return n._emitValue(n._buff.shift())}},_free:function(){this._buff=null,this._$shiftBuff=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._buff.push(t),setTimeout(this._$shiftBuff,this._wait))},_handleEnd:function(){var t=this;this._activating?this._emitEnd():setTimeout(function(){return t._emitEnd()},this._wait)}},a=r("delay",u),o=s("delay",u);t.exports=function(t,n){return new(t._ofSameType(a,o))(t,{wait:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(42),a={_init:function(t){var n=this,e=t.wait,i=t.leading,r=t.trailing;this._wait=Math.max(0,e),this._leading=i,this._trailing=r,this._trailingValue=null,this._timeoutId=null,this._endLater=!1,this._lastCallTime=0,this._$trailingCall=function(){return n._trailingCall()}},_free:function(){this._trailingValue=null,this._$trailingCall=null},_handleValue:function(t){if(this._activating)this._emitValue(t);else{var n=u();0!==this._lastCallTime||this._leading||(this._lastCallTime=n);var e=this._wait-(n-this._lastCallTime);0>=e?(this._cancelTrailing(),this._lastCallTime=n,this._emitValue(t)):this._trailing&&(this._cancelTrailing(),this._trailingValue=t,this._timeoutId=setTimeout(this._$trailingCall,e))}},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId?this._endLater=!0:this._emitEnd()},_cancelTrailing:function(){null!==this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},_trailingCall:function(){this._emitValue(this._trailingValue),this._timeoutId=null,this._trailingValue=null,this._lastCallTime=this._leading?u():0,this._endLater&&this._emitEnd()}},o=r("throttle",a),c=s("throttle",a);t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=e.leading,r=void 0===i?!0:i,s=e.trailing,u=void 0===s?!0:s;return new(t._ofSameType(o,c))(t,{wait:n,leading:r,trailing:u})}},function(t,n){"use strict";t.exports=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(42),a={_init:function(t){var n=this,e=t.wait,i=t.immediate;this._wait=Math.max(0,e),this._immediate=i,this._lastAttempt=0,this._timeoutId=null,this._laterValue=null,this._endLater=!1,this._$later=function(){return n._later()}},_free:function(){this._laterValue=null,this._$later=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._lastAttempt=u(),this._immediate&&!this._timeoutId&&this._emitValue(t),this._timeoutId||(this._timeoutId=setTimeout(this._$later,this._wait)),this._immediate||(this._laterValue=t))},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId&&!this._immediate?this._endLater=!0:this._emitEnd()},_later:function(){var t=u()-this._lastAttempt;t<this._wait&&t>=0?this._timeoutId=setTimeout(this._$later,this._wait-t):(this._timeoutId=null,this._immediate||(this._emitValue(this._laterValue),this._laterValue=null),this._endLater&&this._emitEnd())}},o=r("debounce",a),c=s("debounce",a);t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=e.immediate,r=void 0===i?!1:i;return new(t._ofSameType(o,c))(t,{wait:n,immediate:r})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleValue:function(t){var n=this._fn,e=n(t);e.convert?this._emitError(e.error):this._emitValue(t)}},a=r("valuesToErrors",u),o=s("valuesToErrors",u),c=function(t){return{convert:!0,error:t}};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn,e=n(t);e.convert?this._emitValue(e.value):this._emitError(t)}},a=r("errorsToValues",u),o=s("errorsToValues",u),c=function(t){return{convert:!0,value:t}};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn;this._emitError(n(t))}},a=r("mapErrors",u),o=s("mapErrors",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleError:function(t){var n=this._fn;n(t)&&this._emitError(t)}},a=r("filterErrors",u),o=s("filterErrors",u),c=function(t){return t};t.exports=function(t){var n=arguments.length<=1||void 0===arguments[1]?c:arguments[1];return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_handleError:function(t){this._emitError(t),this._emitEnd()}},a=r("endOnError",u),o=s("endOnError",u);t.exports=function(t){return new(t._ofSameType(a,o))(t)}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_handleValue:function(){}},a=r("skipValues",u),o=s("skipValues",u);t.exports=function(t){return new(t._ofSameType(a,o))(t)}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_handleError:function(){}},a=r("skipErrors",u),o=s("skipErrors",u);t.exports=function(t){return new(t._ofSameType(a,o))(t)}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_handleEnd:function(){}},a=r("skipEnd",u),o=s("skipEnd",u);t.exports=function(t){return new(t._ofSameType(a,o))(t)}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn;this._fn=n},_free:function(){this._fn=null},_handleEnd:function(){var t=this._fn;this._emitValue(t()),this._emitEnd()}},a=r("beforeEnd",u),o=s("beforeEnd",u);t.exports=function(t,n){return new(t._ofSameType(a,o))(t,{fn:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(5),a=u.slide,o={_init:function(t){var n=t.min,e=t.max;this._max=e,this._min=n,this._buff=[]},_free:function(){this._buff=null},_handleValue:function(t){this._buff=a(this._buff,t,this._max),this._buff.length>=this._min&&this._emitValue(this._buff)}},c=r("slidingWindow",o),h=s("slidingWindow",o);t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return new(t._ofSameType(c,h))(t,{min:e,max:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u={_init:function(t){var n=t.fn,e=t.flushOnEnd;this._fn=n,this._flushOnEnd=e,this._buff=[]},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),
  this._buff=[])},_handleValue:function(t){this._buff.push(t);var n=this._fn;n(t)||this._flush()},_handleEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()}},a=r("bufferWhile",u),o=s("bufferWhile",u),c=function(t){return t};t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=e.flushOnEnd,r=void 0===i?!0:i;return new(t._ofSameType(a,o))(t,{fn:n||c,flushOnEnd:r})}},function(t,n,e){"use strict";function i(t){return{"@@transducer/step":function(n,e){return t._emitValue(e),null},"@@transducer/result":function(n){return t._emitEnd(),null}}}var r=e(26),s=r.createStream,u=r.createProperty,a={_init:function(t){var n=t.transducer;this._xform=n(i(this))},_free:function(){this._xform=null},_handleValue:function(t){null!==this._xform["@@transducer/step"](null,t)&&this._xform["@@transducer/result"](null)},_handleEnd:function(){this._xform["@@transducer/result"](null)}},o=s("transduce",a),c=u("transduce",a);t.exports=function(t,n){return new(t._ofSameType(o,c))(t,{transducer:n})}},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(15),a={_init:function(t){var n=t.fn;this._handler=n,this._emitter=u(this)},_free:function(){this._handler=null,this._emitter=null},_handleAny:function(t){this._handler(this._emitter,t)}},o=r("withHandler",a),c=s("withHandler",a);t.exports=function(t,n){return new(t._ofSameType(o,c))(t,{fn:n})}},function(t,n,e){"use strict";function i(t){for(var n=void 0,e=0;e<t.length;e++)void 0!==t[e]&&(void 0===n||n.index<t[e].index)&&(n=t[e]);return n.error}function r(t,n,e){var i=this;s.call(this),this._activeCount=t.length,this._sources=_(t,n),this._combinator=e?v(e,this._sources.length):function(t){return t},this._aliveCount=0,this._latestValues=new Array(this._sources.length),this._latestErrors=new Array(this._sources.length),d(this._latestValues,c),this._emitAfterActivation=!1,this._endAfterActivation=!1,this._latestErrorIndex=0,this._$handlers=[];for(var r=function(t){i._$handlers.push(function(n){return i._handleAny(t,n)})},u=0;u<this._sources.length;u++)r(u)}var s=e(6),u=e(3),a=u.VALUE,o=u.ERROR,c=u.NOTHING,h=e(2),l=h.inherit,f=e(5),_=f.concat,d=f.fillArray,m=e(21),v=m.spread,p=e(8);l(r,s,{_name:"combine",_onActivation:function(){this._aliveCount=this._activeCount;for(var t=this._activeCount;t<this._sources.length;t++)this._sources[t].onAny(this._$handlers[t]);for(var t=0;t<this._activeCount;t++)this._sources[t].onAny(this._$handlers[t]);this._emitAfterActivation&&(this._emitAfterActivation=!1,this._emitIfFull()),this._endAfterActivation&&this._emitEnd()},_onDeactivation:function(){var t=this._sources.length,n=void 0;for(n=0;t>n;n++)this._sources[n].offAny(this._$handlers[n])},_emitIfFull:function(){for(var t=!0,n=!1,e=this._latestValues.length,r=new Array(e),s=new Array(e),u=0;e>u;u++)r[u]=this._latestValues[u],s[u]=this._latestErrors[u],r[u]===c&&(t=!1),void 0!==s[u]&&(n=!0);if(t){var a=this._combinator;this._emitValue(a(r))}n&&this._emitError(i(s))},_handleAny:function(t,n){n.type===a||n.type===o?(n.type===a&&(this._latestValues[t]=n.value,this._latestErrors[t]=void 0),n.type===o&&(this._latestValues[t]=c,this._latestErrors[t]={index:this._latestErrorIndex++,error:n.value}),t<this._activeCount&&(this._activating?this._emitAfterActivation=!0:this._emitIfFull())):t<this._activeCount&&(this._aliveCount--,0===this._aliveCount&&(this._activating?this._endAfterActivation=!0:this._emitEnd()))},_clear:function(){s.prototype._clear.call(this),this._sources=null,this._latestValues=null,this._latestErrors=null,this._combinator=null,this._$handlers=null}}),t.exports=function(t,n,e){return void 0===n&&(n=[]),"function"==typeof n&&(e=n,n=[]),0===t.length?p():new r(t,n,e)}},function(t,n,e){"use strict";function i(t,n){var e=this;r.call(this),this._buffers=f(t,function(t){return p(t)?_(t):[]}),this._sources=f(t,function(t){return p(t)?v():t}),this._combinator=n?m(n,this._sources.length):function(t){return t},this._aliveCount=0,this._$handlers=[];for(var i=function(t){e._$handlers.push(function(n){return e._handleAny(t,n)})},s=0;s<this._sources.length;s++)i(s)}var r=e(6),s=e(3),u=s.VALUE,a=s.ERROR,o=s.END,c=e(2),h=c.inherit,l=e(5),f=l.map,_=l.cloneArray,d=e(21),m=d.spread,v=e(8),p=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};h(i,r,{_name:"zip",_onActivation:function(){for(;this._isFull();)this._emit();var t=this._sources.length;this._aliveCount=t;for(var n=0;t>n&&this._active;n++)this._sources[n].onAny(this._$handlers[n])},_onDeactivation:function(){for(var t=0;t<this._sources.length;t++)this._sources[t].offAny(this._$handlers[t])},_emit:function(){for(var t=new Array(this._buffers.length),n=0;n<this._buffers.length;n++)t[n]=this._buffers[n].shift();var e=this._combinator;this._emitValue(e(t))},_isFull:function(){for(var t=0;t<this._buffers.length;t++)if(0===this._buffers[t].length)return!1;return!0},_handleAny:function(t,n){n.type===u&&(this._buffers[t].push(n.value),this._isFull()&&this._emit()),n.type===a&&this._emitError(n.value),n.type===o&&(this._aliveCount--,0===this._aliveCount&&this._emitEnd())},_clear:function(){r.prototype._clear.call(this),this._sources=null,this._buffers=null,this._combinator=null,this._$handlers=null}}),t.exports=function(t,n){return 0===t.length?v():new i(t,n)}},function(t,n,e){"use strict";function i(t){u.call(this),this._addAll(t),this._initialised=!0}var r=e(2),s=r.inherit,u=e(60),a=e(8);s(i,u,{_name:"merge",_onEmpty:function(){this._initialised&&this._emitEnd()}}),t.exports=function(t){return 0===t.length?a():new i(t)}},function(t,n,e){"use strict";function i(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=n.queueLim,i=void 0===e?0:e,s=n.concurLim,u=void 0===s?-1:s,a=n.drop,o=void 0===a?"new":a;r.call(this),this._queueLim=0>i?-1:i,this._concurLim=0>u?-1:u,this._drop=o,this._queue=[],this._curSources=[],this._$handleSubAny=function(n){return t._handleSubAny(n)},this._$endHandlers=[],this._currentlyAdding=null,0===this._concurLim&&this._emitEnd()}var r=e(6),s=e(3),u=s.VALUE,a=s.ERROR,o=e(2),c=o.inherit,h=e(5),l=h.concat,f=h.forEach,_=h.findByPred,d=h.find,m=h.remove,v=h.cloneArray,p=function(t){return t};c(i,r,{_name:"abstractPool",_add:function(t,n){n=n||p,-1===this._concurLim||this._curSources.length<this._concurLim?this._addToCur(n(t)):-1===this._queueLim||this._queue.length<this._queueLim?this._addToQueue(n(t)):"old"===this._drop&&(this._removeOldest(),this._add(t,n))},_addAll:function(t){var n=this;f(t,function(t){return n._add(t)})},_remove:function(t){-1===this._removeCur(t)&&this._removeQueue(t)},_addToQueue:function(t){this._queue=l(this._queue,[t])},_addToCur:function(t){if(this._active){if(!t._alive)return void(t._currentEvent&&this._emit(t._currentEvent.type,t._currentEvent.value));this._currentlyAdding=t,t.onAny(this._$handleSubAny),this._currentlyAdding=null,t._alive&&(this._curSources=l(this._curSources,[t]),this._active&&this._subToEnd(t))}else this._curSources=l(this._curSources,[t])},_subToEnd:function(t){var n=this,e=function(){return n._removeCur(t)};this._$endHandlers.push({obs:t,handler:e}),t.onEnd(e)},_subscribe:function(t){t.onAny(this._$handleSubAny),this._active&&this._subToEnd(t)},_unsubscribe:function(t){t.offAny(this._$handleSubAny);var n=_(this._$endHandlers,function(n){return n.obs===t});-1!==n&&(t.offEnd(this._$endHandlers[n].handler),this._$endHandlers.splice(n,1))},_handleSubAny:function(t){t.type===u?this._emitValue(t.value):t.type===a&&this._emitError(t.value)},_removeQueue:function(t){var n=d(this._queue,t);return this._queue=m(this._queue,n),n},_removeCur:function(t){this._active&&this._unsubscribe(t);var n=d(this._curSources,t);return this._curSources=m(this._curSources,n),-1!==n&&(0!==this._queue.length?this._pullQueue():0===this._curSources.length&&this._onEmpty()),n},_removeOldest:function(){this._removeCur(this._curSources[0])},_pullQueue:function(){0!==this._queue.length&&(this._queue=v(this._queue),this._addToCur(this._queue.shift()))},_onActivation:function(){for(var t=0,n=this._curSources;t<n.length&&this._active;t++)this._subscribe(n[t])},_onDeactivation:function(){for(var t=0,n=this._curSources;t<n.length;t++)this._unsubscribe(n[t]);null!==this._currentlyAdding&&this._unsubscribe(this._currentlyAdding)},_isEmpty:function(){return 0===this._curSources.length},_onEmpty:function(){},_clear:function(){r.prototype._clear.call(this),this._queue=null,this._curSources=null,this._$handleSubAny=null,this._$endHandlers=null}}),t.exports=i},function(t,n,e){"use strict";var i=e(62);t.exports=function(t){return i(function(n){return t.length>n?t[n]:!1}).setName("concat")}},function(t,n,e){"use strict";function i(t){var n=this;u.call(this),this._generator=t,this._source=null,this._inLoop=!1,this._iteration=0,this._$handleAny=function(t){return n._handleAny(t)}}var r=e(2),s=r.inherit,u=e(6),a=e(3),o=a.END;s(i,u,{_name:"repeat",_handleAny:function(t){t.type===o?(this._source=null,this._getSource()):this._emit(t.type,t.value)},_getSource:function(){if(!this._inLoop){this._inLoop=!0;for(var t=this._generator;null===this._source&&this._alive&&this._active;)this._source=t(this._iteration++),this._source?this._source.onAny(this._$handleAny):this._emitEnd();this._inLoop=!1}},_onActivation:function(){this._source?this._source.onAny(this._$handleAny):this._getSource()},_onDeactivation:function(){this._source&&this._source.offAny(this._$handleAny)},_clear:function(){u.prototype._clear.call(this),this._generator=null,this._source=null,this._$handleAny=null}}),t.exports=function(t){return new i(t)}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(2),s=r.inherit,u=e(60);s(i,u,{_name:"pool",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this}}),t.exports=i},function(t,n,e){"use strict";function i(t,n,e){var i=this;h.call(this,e),this._source=t,this._fn=n,this._mainEnded=!1,this._lastCurrent=null,this._$handleMain=function(t){return i._handleMain(t)}}var r=e(3),s=r.VALUE,u=r.ERROR,a=r.END,o=e(2),c=o.inherit,h=e(60);c(i,h,{_onActivation:function(){h.prototype._onActivation.call(this),this._active&&this._source.onAny(this._$handleMain)},_onDeactivation:function(){h.prototype._onDeactivation.call(this),this._source.offAny(this._$handleMain),this._hadNoEvSinceDeact=!0},_handleMain:function(t){if(t.type===s){var n=this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value;n||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1}t.type===u&&this._emitError(t.value),t.type===a&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)},_onEmpty:function(){this._mainEnded&&this._emitEnd()},_clear:function(){h.prototype._clear.call(this),this._source=null,this._lastCurrent=null,this._$handleMain=null}}),t.exports=i},function(t,n,e){"use strict";function i(t,n){h.call(this,t,n)}var r=e(3),s=r.VALUE,u=r.ERROR,a=r.END,o=e(2),c=o.inherit,h=e(64);c(i,h,{_handleMain:function(t){if(t.type===u){var n=this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value;n||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1}t.type===s&&this._emitValue(t.value),t.type===a&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)}}),t.exports=i},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_handlePrimaryValue:function(t){this._lastSecondary!==a&&this._lastSecondary&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary!==a&&this._lastSecondary||this._emitEnd()}},c=r("filterBy",o),h=s("filterBy",o);t.exports=function(t,n){return new(t._ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";function i(t,n){return function(e,i,r){var s=this;t.call(this),this._primary=e,this._secondary=i,this._name=e._name+"."+n,this._lastSecondary=m,this._$handleSecondaryAny=function(t){return s._handleSecondaryAny(t)},this._$handlePrimaryAny=function(t){return s._handlePrimaryAny(t)},this._init(r)}}function r(t){return{_init:function(t){},_free:function(){},_handlePrimaryValue:function(t){this._emitValue(t)},_handlePrimaryError:function(t){this._emitError(t)},_handlePrimaryEnd:function(){this._emitEnd()},_handleSecondaryValue:function(t){this._lastSecondary=t},_handleSecondaryError:function(t){this._emitError(t)},_handleSecondaryEnd:function(){},_handlePrimaryAny:function(t){switch(t.type){case f:return this._handlePrimaryValue(t.value);case _:return this._handlePrimaryError(t.value);case d:return this._handlePrimaryEnd(t.value)}},_handleSecondaryAny:function(t){switch(t.type){case f:return this._handleSecondaryValue(t.value);case _:return this._handleSecondaryError(t.value);case d:this._handleSecondaryEnd(t.value),this._removeSecondary()}},_removeSecondary:function(){null!==this._secondary&&(this._secondary.offAny(this._$handleSecondaryAny),this._$handleSecondaryAny=null,this._secondary=null)},_onActivation:function(){null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny),this._active&&this._primary.onAny(this._$handlePrimaryAny)},_onDeactivation:function(){null!==this._secondary&&this._secondary.offAny(this._$handleSecondaryAny),this._primary.offAny(this._$handlePrimaryAny)},_clear:function(){t.prototype._clear.call(this),this._primary=null,this._secondary=null,this._lastSecondary=null,this._$handleSecondaryAny=null,this._$handlePrimaryAny=null,this._free()}}}function s(t,n){var e=i(a,t);return h(e,a,r(a),n),e}function u(t,n){var e=i(o,t);return h(e,o,r(o),n),e}var a=e(6),o=e(7),c=e(2),h=c.inherit,l=e(3),f=l.VALUE,_=l.ERROR,d=l.END,m=l.NOTHING;t.exports={createStream:s,createProperty:u}},function(t,n,e){"use strict";var i=e(57),r=function(t,n){return n};t.exports=function(t,n,e){var s=e?function(t,n){return e(n,t)}:r;return i([n],[t],s).setName(t,"sampledBy")}},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_handlePrimaryValue:function(t){this._lastSecondary!==a&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary===a&&this._emitEnd()}},c=r("skipUntilBy",o),h=s("skipUntilBy",o);t.exports=function(t,n){return new(t._ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u={_handleSecondaryValue:function(t){this._emitEnd()}},a=r("takeUntilBy",u),o=s("takeUntilBy",u);t.exports=function(t,n){return new(t._ofSameType(a,o))(t,n)}},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u={_init:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.flushOnEnd,e=void 0===n?!0:n;this._buff=[],this._flushOnEnd=e},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_onActivation:function(){this._primary.onAny(this._$handlePrimaryAny),this._alive&&null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny)},_handlePrimaryValue:function(t){this._buff.push(t)},_handleSecondaryValue:function(t){this._flush()},_handleSecondaryEnd:function(t){this._flushOnEnd||this._emitEnd()}},a=r("bufferBy",u),o=s("bufferBy",u);t.exports=function(t,n,e){return new(t._ofSameType(a,o))(t,n,e)}},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_init:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.flushOnEnd,e=void 0===n?!0:n,i=t.flushOnChange,r=void 0===i?!1:i;this._buff=[],this._flushOnEnd=e,this._flushOnChange=r},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_handlePrimaryValue:function(t){this._buff.push(t),this._lastSecondary===a||this._lastSecondary||this._flush()},_handleSecondaryEnd:function(t){this._flushOnEnd||this._lastSecondary!==a&&!this._lastSecondary||this._emitEnd()},_handleSecondaryValue:function(t){this._flushOnChange&&!t&&this._flush(),this._lastSecondary=t}},c=r("bufferWhileBy",o),h=s("bufferWhileBy",o);t.exports=function(t,n,e){return new(t._ofSameType(c,h))(t,n,e)}},function(t,n,e){"use strict";var i=e(59),r=e(29),s=e(36),u=e(25),a=function(){return!1},o=function(){return!0};t.exports=function(t,n){var e=i([r(t,o),r(n,a)]);return e=s(e),e=u(e,a),e.setName(t,"awaiting")}},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(2),s=r.inherit,u=e(6);s(i,u,{_name:"emitter",emit:function(t){return this._emitValue(t),this},error:function(t){return this._emitError(t),this},end:function(){return this._emitEnd(),this},emitEvent:function(t){this._emit(t.type,t.value)}}),t.exports=i},function(t,n,e){"use strict";function i(){u.call(this)}var r=e(2),s=r.inherit,u=e(60);s(i,u,{_name:"bus",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this},emit:function(t){return this._emitValue(t),this},error:function(t){return this._emitError(t),this},end:function(){return this._emitEnd(),this},emitEvent:function(t){this._emit(t.type,t.value)}}),t.exports=i},function(t,n,e){"use strict";var i=e(26),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_init:function(t){var n=t.fn,e=t.seed;this._fn=n,this._result=e},_free:function(){this._fn=null,this._result=null},_handleValue:function(t){var n=this._fn;this._result=this._result===a?t:n(this._result,t)},_handleEnd:function(){this._result!==a&&this._emitValue(this._result),this._emitEnd()}},c=r("reduce",o),h=s("reduce",o);t.exports=function(t,n){var e=arguments.length<=2||void 0===arguments[2]?a:arguments[2];return new(t._ofSameType(c,h))(t,{fn:n,seed:e})}},function(t,n,e){"use strict";var i=e(57),r=e(21),s=r.apply,u=e(5),a=u.circleShift;t.exports=function(t,n,e){var r=e;return t.length>0&&(r=function(){var n=a(arguments,t.length);return e?s(e,null,n):n}),i(n,t,r).setName("sampledBy")}},function(t,n,e){"use strict";var i=e(10),r=e(5),s=r.cloneArray,u=i({_name:"repeatedly",_init:function(t){var n=t.xs;this._xs=s(n),this._i=-1},_onTick:function(){this._xs.length>0&&(this._i=(this._i+1)%this._xs.length,this._emitValue(this._xs[this._i]))}});t.exports=function(t,n){return new u(t,{xs:n})}},function(t,n,e){"use strict";var i=e(29);t.exports=function(t,n){return i(t,function(){return n}).setName(t,"mapTo")}},function(t,n,e){"use strict";var i=e(29);t.exports=function(t,n){return i(t,function(t){return n(t),t}).setName(t,"tap")}},function(t,n,e){"use strict";var i=e(29);t.exports=function(t,n){return i(t,function(t){return t[n]}).setName(t,"pluck")}},function(t,n,e){"use strict";var i=e(29),r=e(21),s=r.apply;t.exports=function(t,n,e){var r=0===e.length?function(t){return t[n]()}:function(t){return s(t[n],t,e)};return i(t,r).setName(t,"invoke")}},function(t,n,e){"use strict";var i=e(29),r=e(42);t.exports=function(t){return i(t,function(t){return{value:t,time:r()}}).setName(t,"timestamp")}},function(t,n,e){"use strict";function i(){var t=void 0;for(t=0;t<arguments.length;t++)if(!arguments[t])return arguments[t];return arguments[t-1]}var r=e(57);t.exports=function(t){return r(t,[],i).setName("and")}},function(t,n,e){"use strict";function i(){var t=void 0;for(t=0;t<arguments.length;t++)if(arguments[t])return arguments[t];return arguments[t-1]}var r=e(57);t.exports=function(t){return r(t,[],i).setName("or")}},function(t,n,e){"use strict";var i=e(29);t.exports=function(t){return i(t,function(t){return!t}).setName(t,"not")}},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u=e(3),a=u.NOTHING,o={_handlePrimaryValue:function(t){this._lastSecondary!==a&&this._emitValue(t)},_handleSecondaryValue:function(t){this._lastSecondary=t,this._lastSecondary||this._emitEnd()},_handleSecondaryEnd:function(){this._lastSecondary===a&&this._emitEnd()}},c=r("takeWhileBy",o),h=s("takeWhileBy",o);t.exports=function(t,n){return new(t._ofSameType(c,h))(t,n)}},function(t,n,e){"use strict";var i=e(67),r=i.createStream,s=i.createProperty,u={_init:function(){this._hasFalseyFromSecondary=!1},_handlePrimaryValue:function(t){this._hasFalseyFromSecondary&&this._emitValue(t)},_handleSecondaryValue:function(t){this._hasFalseyFromSecondary=this._hasFalseyFromSecondary||!t},_handleSecondaryEnd:function(){this._hasFalseyFromSecondary||this._emitEnd()}},a=r("skipWhileBy",u),o=s("skipWhileBy",u);t.exports=function(t,n){return new(t._ofSameType(a,o))(t,n)}}])});