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

baconjs

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baconjs - npm Package Compare versions

Comparing version 0.7.44 to 0.7.45

2

assemble-specs.js

@@ -31,3 +31,3 @@ #!/usr/bin/env node

if (pieceNames.length > 3) return ""
var pieceNames = Deps.resolvePieces(pieceNames, "spec/specs")
var pieceNames = Deps.resolvePieces(pieceNames, "spec/specs", { recursive: false })
.map(function(piece) { return piece.name })

@@ -34,0 +34,0 @@ return pieceNames.join(" ")

@@ -35,3 +35,3 @@ var _ = require("lodash");

function resolve(pieceNames, dir, resolving, pieceCache) {
function resolve(pieceNames, dir, resolving, pieceCache, options) {
resolving = resolving || [];

@@ -47,6 +47,11 @@

var deps = _.chain(piece.deps)
.map(function (x) { return resolve([x], dir, resolving.concat([pieceName]), pieceCache) })
.map(function (x) {
if (options.recursive)
return resolve([x], dir, resolving.concat([pieceName]), pieceCache, options)
else
return readPiece(x, dir, pieceCache)
})
.flatten()
.value();
return deps.concat([piece]);

@@ -56,4 +61,5 @@ })))

module.exports.resolvePieces = function(pieceNames, dir) {
return resolve(pieceNames, dir, [], {})
module.exports.resolvePieces = function(pieceNames, dir, options) {
if (!options) options = { recursive: true }
return resolve(pieceNames, dir, [], {}, options)
}

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

(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib={}.hasOwnProperty,jb=function(a,b){function c(){this.constructor=a}for(var d in b)ib.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},kb=[].slice,lb=function(a,b){return function(){return a.apply(b,arguments)}};a={toString:function(){return"Bacon"}},a.version="0.7.44",l=("undefined"!=typeof global&&null!==global?global:this).Error,U=function(){},M=function(a,b){return b},G=function(a){return a},w=function(a){return a.slice(0)},J=function(a){return a instanceof Array},L=function(a){return a instanceof p},gb={indexOf:Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){var c,d,e,f;for(c=e=0,f=a.length;f>e;c=++e)if(d=a[c],b===d)return c;return-1},indexWhere:function(a,b){var c,d,e,f;for(c=e=0,f=a.length;f>e;c=++e)if(d=a[c],b(d))return c;return-1},head:function(a){return a[0]},always:function(a){return function(){return a}},negate:function(a){return function(b){return!a(b)}},empty:function(a){return 0===a.length},tail:function(a){return a.slice(1,a.length)},filter:function(a,b){var c,d,e,f;for(c=[],e=0,f=b.length;f>e;e++)d=b[e],a(d)&&c.push(d);return c},map:function(a,b){var c,d,e,f;for(f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(a(c));return f},each:function(a,b){var c,d;for(c in a)d=a[c],b(c,d);return void 0},toArray:function(a){return J(a)?a:[a]},contains:function(a,b){return-1!==gb.indexOf(a,b)},id:function(a){return a},last:function(a){return a[a.length-1]},all:function(a,b){var c,d,e;for(null==b&&(b=gb.id),d=0,e=a.length;e>d;d++)if(c=a[d],!b(c))return!1;return!0},any:function(a,b){var c,d,e;for(null==b&&(b=gb.id),d=0,e=a.length;e>d;d++)if(c=a[d],b(c))return!0;return!1},without:function(a,b){return gb.filter(function(b){return b!==a},b)},remove:function(a,b){var c;return c=gb.indexOf(b,a),c>=0?b.splice(c,1):void 0},fold:function(a,b,c){var d,e,f;for(e=0,f=a.length;f>e;e++)d=a[e],b=c(b,d);return b},flatMap:function(a,b){return gb.fold(b,[],function(b,c){return b.concat(a(c))})},cached:function(a){var b;return b=o,function(){return b===o&&(b=a(),a=void 0),b}},isFunction:function(a){return"function"==typeof a},toString:function(a){var b,c,d,e;try{return W++,null==a?"undefined":gb.isFunction(a)?"function":J(a)?W>5?"[..]":"["+gb.map(gb.toString,a).toString()+"]":null!=(null!=a?a.toString:void 0)&&a.toString!==Object.prototype.toString?a.toString():"object"==typeof a?W>5?"{..}":(c=function(){var c;c=[];for(d in a)ib.call(a,d)&&(e=function(){try{return a[d]}catch(c){return b=c}}(),c.push(gb.toString(d)+":"+gb.toString(e)));return c}(),"{"+c+"}"):a}finally{W--}}},W=0,a._=gb,u=a.UpdateBarrier=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return k=void 0,l=[],m={},c=[],d=0,b=function(a){return k?c.push(a):a()},n=function(a,b){var c;return k?(c=m[a.id],null==c?(c=m[a.id]=[b],l.push(a)):c.push(b)):b()},f=function(){for(;l.length>0;)h(0);return void 0},h=function(a){var b,c,d,e,f,h;for(c=l[a],d=c.id,e=m[d],l.splice(a,1),delete m[d],g(c),f=0,h=e.length;h>f;f++)(b=e[f])();return void 0},g=function(a){var b,c,d,e,f;for(c=a.internalDeps(),e=0,f=c.length;f>e;e++)b=c[e],g(b),m[b.id]&&(d=gb.indexOf(l,b),h(d));return void 0},j=function(a,b,e,g){var h,i;if(k)return e.apply(b,g);k=a;try{i=e.apply(b,g),f()}finally{for(k=void 0;d<c.length;)h=c[d],d++,h();d=0,c=[]}return i},e=function(){return k?k.id:void 0},o=function(c,d){var e,f,g,h;return h=!1,f=!1,e=function(){return f=!0},g=function(){return h=!0,e()},e=c.dispatcher.subscribe(function(c){return b(function(){var b;return h||(b=d(c),b!==a.noMore)?void 0:g()})}),f&&e(),g},i=function(){return l.length>0},{whenDoneWith:n,hasWaiters:i,inTransaction:j,currentEventId:e,wrappedSubscribe:o,afterTransaction:b}}(),t=function(){function a(a,b,c){this.obs=a,this.sync=b,this.lazy=null!=c?c:!1,this.queue=[]}return a.prototype.subscribe=function(a){return this.obs.dispatcher.subscribe(a)},a.prototype.toString=function(){return this.obs.toString()},a.prototype.markEnded=function(){return this.ended=!0},a.prototype.consume=function(){return this.lazy?{value:gb.always(this.queue[0])}:this.queue[0]},a.prototype.push=function(a){return this.queue=[a]},a.prototype.mayHave=function(){return!0},a.prototype.hasAtLeast=function(){return this.queue.length},a.prototype.flatten=!0,a}(),e=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return jb(b,a),b.prototype.consume=function(){return this.queue.shift()},b.prototype.push=function(a){return this.queue.push(a)},b.prototype.mayHave=function(a){return!this.ended||this.queue.length>=a},b.prototype.hasAtLeast=function(a){return this.queue.length>=a},b.prototype.flatten=!1,b}(t),b=function(a){function b(a){b.__super__.constructor.call(this,a,!0)}return jb(b,a),b.prototype.consume=function(){var a;return a=this.queue,this.queue=[],{value:function(){return a}}},b.prototype.push=function(a){return this.queue.push(a.value())},b.prototype.hasAtLeast=function(){return!0},b}(t),t.isTrigger=function(a){return a instanceof t?a.sync:a instanceof k},t.fromObservable=function(a){return a instanceof t?a:a instanceof q?new t(a,!1):new e(a,!0)},f=function(){function a(a,b,c){this.context=a,this.method=b,this.args=c,this.cached=void 0}return a.prototype.deps=function(){return this.cached||(this.cached=E([this.context].concat(this.args)))},a.prototype.apply=function(a){return a.desc=this,a},a.prototype.toString=function(){return gb.toString(this.context)+"."+gb.toString(this.method)+"("+gb.map(gb.toString,this.args)+")"},a}(),B=function(){var a,b,c;return b=arguments[0],c=arguments[1],a=3<=arguments.length?kb.call(arguments,2):[],(b||c)instanceof f?b||c:new f(b,c,a)},eb=function(){var a,b,c;return a=2<=arguments.length?kb.call(arguments,0,c=arguments.length-1):(c=0,[]),b=arguments[c++],B.apply(null,a).apply(b)},E=function(a){return J(a)?gb.flatMap(E,a):L(a)?[a]:a instanceof t?[a.obs]:[]},fb=function(a){return function(){var b,c,d,e;return d=arguments[0],b=2<=arguments.length?kb.call(arguments,1):[],"object"==typeof d&&b.length&&(c=d,e=b[0],d=function(){return c[e].apply(c,arguments)},b=b.slice(1)),a.apply(null,[d].concat(kb.call(b)))}},P=function(a){return a=Array.prototype.slice.call(a),Q.apply(null,a)},V=function(a,b){return function(){var c;return c=1<=arguments.length?kb.call(arguments,0):[],a.apply(null,b.concat(c))}},cb=function(a){return function(b){return function(c){var d;return null==c?void 0:(d=c[b],gb.isFunction(d)?d.apply(c,a):d)}}},_=function(a,b){var c,d;return d=a.slice(1).split("."),c=gb.map(cb(b),d),function(b){var d,e;for(d=0,e=c.length;e>d;d++)a=c[d],b=a(b);return b}},K=function(a){return"string"==typeof a&&a.length>1&&"."===a.charAt(0)},Q=fb(function(){var a,b;return b=arguments[0],a=2<=arguments.length?kb.call(arguments,1):[],gb.isFunction(b)?a.length?V(b,a):b:K(b)?_(b,a):gb.always(b)}),O=function(a,b){return Q.apply(null,[a].concat(kb.call(b)))},A=function(a,b,c,d){var e;return b instanceof q?(e=b.sampledBy(a,function(a,b){return[a,b]}),d.call(e,function(a){var b,c;return b=a[0],c=a[1],b}).map(function(a){var b,c;return b=a[0],c=a[1]})):(b=O(b,c),d.call(a,b))},Z=function(a){var b;return gb.isFunction(a)?a:K(a)?(b=ab(a),function(a,c){return a[b](c)}):void 0},ab=function(a){return a.slice(1)},s=function(){function a(a){this.value=a}return a.prototype.getOrElse=function(){return this.value},a.prototype.get=function(){return this.value},a.prototype.filter=function(b){return b(this.value)?new a(this.value):o},a.prototype.map=function(b){return new a(b(this.value))},a.prototype.forEach=function(a){return a(this.value)},a.prototype.isDefined=!0,a.prototype.toArray=function(){return[this.value]},a.prototype.inspect=function(){return"Some("+this.value+")"},a.prototype.toString=function(){return this.inspect()},a}(),o={getOrElse:function(a){return a},filter:function(){return o},map:function(){return o},forEach:function(){},isDefined:!1,toArray:function(){return[]},inspect:function(){return"None"},toString:function(){return this.inspect()}},bb=function(a){return a instanceof s||a===o?a:new s(a)},a.noMore=["<no-more>"],a.more=["<more>"],D=0,j=function(){function a(){this.id=++D}return a.prototype.isEvent=function(){return!0},a.prototype.isEnd=function(){return!1},a.prototype.isInitial=function(){return!1},a.prototype.isNext=function(){return!1},a.prototype.isError=function(){return!1},a.prototype.hasValue=function(){return!1},a.prototype.filter=function(){return!0},a.prototype.inspect=function(){return this.toString()},a.prototype.log=function(){return this.toString()},a}(),n=function(a){function b(a,c){b.__super__.constructor.call(this),!c&&gb.isFunction(a)||a instanceof b?(this.valueF=a,this.valueInternal=void 0):(this.valueF=void 0,this.valueInternal=a)}return jb(b,a),b.prototype.isNext=function(){return!0},b.prototype.hasValue=function(){return!0},b.prototype.value=function(){return this.valueF instanceof b?(this.valueInternal=this.valueF.value(),this.valueF=void 0):this.valueF&&(this.valueInternal=this.valueF(),this.valueF=void 0),this.valueInternal},b.prototype.fmap=function(a){var b,c;return this.valueInternal?(c=this.valueInternal,this.apply(function(){return a(c)})):(b=this,this.apply(function(){return a(b.value())}))},b.prototype.apply=function(a){return new b(a)},b.prototype.filter=function(a){return a(this.value())},b.prototype.toString=function(){return gb.toString(this.value())},b.prototype.log=function(){return this.value()},b}(j),m=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return jb(b,a),b.prototype.isInitial=function(){return!0},b.prototype.isNext=function(){return!1},b.prototype.apply=function(a){return new b(a)},b.prototype.toNext=function(){return new n(this)},b}(n),h=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return jb(b,a),b.prototype.isEnd=function(){return!0},b.prototype.fmap=function(){return this},b.prototype.apply=function(){return this},b.prototype.toString=function(){return"<end>"},b}(j),i=function(a){function b(a){this.error=a}return jb(b,a),b.prototype.isError=function(){return!0},b.prototype.fmap=function(){return this},b.prototype.apply=function(){return this},b.prototype.toString=function(){return"<error> "+gb.toString(this.error)},b}(j),a.Event=j,a.Initial=m,a.Next=n,a.End=h,a.Error=i,I=function(a){return new m(a,!0)},T=function(a){return new n(a,!0)},C=function(){return new h},$=function(a){return a instanceof j?a:T(a)},H=0,X=function(){},p=function(){function a(a){this.id=++H,eb(a,this),this.initialDesc=this.desc}return a.prototype.subscribe=function(a){return u.wrappedSubscribe(this,a)},a.prototype.subscribeInternal=function(a){return this.dispatcher.subscribe(a)},a.prototype.onValue=function(){var a;return a=P(arguments),this.subscribe(function(b){return b.hasValue()?a(b.value()):void 0})},a.prototype.onValues=function(a){return this.onValue(function(b){return a.apply(null,b)})},a.prototype.onError=function(){var a;return a=P(arguments),this.subscribe(function(b){return b.isError()?a(b.error):void 0})},a.prototype.onEnd=function(){var a;return a=P(arguments),this.subscribe(function(b){return b.isEnd()?a():void 0})},a.prototype.errors=function(){return eb(this,"errors",this.filter(function(){return!1}))},a.prototype.name=function(a){return this._name=a,this},a.prototype.withDescription=function(){return B.apply(null,arguments).apply(this)},a.prototype.toString=function(){return this._name?this._name:this.desc.toString()},a.prototype.internalDeps=function(){return this.initialDesc.deps()},a}(),p.prototype.assign=p.prototype.onValue,p.prototype.forEach=p.prototype.onValue,p.prototype.inspect=p.prototype.toString,a.Observable=p,x=function(){var a;return a=1<=arguments.length?kb.call(arguments,0):[],new d(a).unsubscribe},d=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.unsubscribe=lb(this.unsubscribe,this),this.unsubscribed=!1,this.subscriptions=[],this.starting=[],c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.add=function(a){var b,c,d;if(!this.unsubscribed)return b=!1,c=U,this.starting.push(a),d=function(d){return function(){return d.unsubscribed?void 0:(b=!0,d.remove(c),gb.remove(a,d.starting))}}(this),c=a(this.unsubscribe,d),this.unsubscribed||b||this.subscriptions.push(c),gb.remove(a,this.starting),c},a.prototype.remove=function(a){return this.unsubscribed?void 0:void 0!==gb.remove(a,this.subscriptions)?a():void 0},a.prototype.unsubscribe=function(){var a,b,c,d;if(!this.unsubscribed){for(this.unsubscribed=!0,d=this.subscriptions,b=0,c=d.length;c>b;b++)(a=d[b])();return this.subscriptions=[],this.starting=[]}},a.prototype.count=function(){return this.unsubscribed?0:this.subscriptions.length+this.starting.length},a.prototype.empty=function(){return 0===this.count()},a}(),a.CompositeUnsubscribe=d,a.when=function(){var b,c,d,e,f,g,h,i,j,l,m,n,o,p,q,r,s,v,w,A;if(0===arguments.length)return a.never();for(f=arguments.length,q="when: expecting arguments in the form (Observable+,function)+",o=[],j=[],c=0,l=[];f>c;){for(l[c]=arguments[c],l[c+1]=arguments[c+1],i=gb.toArray(arguments[c]),b=y(arguments[c+1]),h={f:b,ixs:[]},p=!1,r=0,v=i.length;v>r;r++){for(n=i[r],d=gb.indexOf(o,n),p||(p=t.isTrigger(n)),0>d&&(o.push(n),d=o.length-1),A=h.ixs,s=0,w=A.length;w>s;s++)e=A[s],e.index===d&&e.count++;h.ixs.push({index:d,count:1})}i.length>0&&j.push(h),c+=2}return o.length?(o=gb.map(t.fromObservable,o),g=gb.any(o,function(a){return a.flatten})&&z(gb.map(function(a){return a.obs},o)),m=new k(B.apply(null,[a,"when"].concat(kb.call(l))),function(b){var d,e,f,h,i,k,l;return l=[],f=!1,h=function(a){var b,d,e;for(e=a.ixs,b=0,d=e.length;d>b;b++)if(c=e[b],!o[c.index].hasAtLeast(c.count))return!1;return!0},e=function(a){return!a.sync||a.ended},d=function(a){var b,d,e;for(e=a.ixs,b=0,d=e.length;d>b;b++)if(c=e[b],!o[c.index].mayHave(c.count))return!0},i=function(a){return!a.source.flatten},k=function(k){return function(n){var p,q,r;return q=function(){return u.whenDoneWith(m,p)},r=function(){var d,e,f,g,k,m;if(!(l.length>0))return a.more;for(f=a.more,g=l.pop(),k=0,m=j.length;m>k;k++)if(e=j[k],h(e))return d=function(){var a,b,d,f;for(d=e.ixs,f=[],a=0,b=d.length;b>a;a++)c=d[a],f.push(o[c.index].consume());return f}(),f=b(g.e.apply(function(){var a,b;return b=function(){var b,c,e;for(e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.value());return e}(),e.f.apply(e,b)})),l.length&&(l=gb.filter(i,l)),f===a.noMore?f:r()},p=function(){var c;return c=r(),f&&(f=!1,(gb.all(o,e)||gb.all(j,d))&&(c=a.noMore,b(C()))),c===a.noMore&&n(),c},k.subscribe(function(c){var d;return c.isEnd()?(f=!0,k.markEnded(),q()):c.isError()?d=b(c):(k.push(c),k.sync&&(l.push({source:k,e:c}),g||u.hasWaiters()?q():p())),d===a.noMore&&n(),d||a.more})}},x.apply(null,function(){var a,b,c;for(c=[],a=0,b=o.length;b>a;a++)n=o[a],c.push(k(n));return c}())})):a.never()},z=function(a,b){var c;return null==b&&(b=[]),c=function(a){var d;return gb.contains(b,a)?!0:(d=a.internalDeps(),d.length?(b.push(a),gb.any(d,c)):(b.push(a),!1))},gb.any(a,c)},y=function(a){return gb.isFunction(a)?a:gb.always(a)},a.groupSimultaneous=function(){var c,d,e;return e=1<=arguments.length?kb.call(arguments,0):[],1===e.length&&J(e[0])&&(e=e[0]),d=function(){var a,d,f;for(f=[],a=0,d=e.length;d>a;a++)c=e[a],f.push(new b(c));return f}(),eb.apply(null,[a,"groupSimultaneous"].concat(kb.call(e),[a.when(d,function(){var a;return a=1<=arguments.length?kb.call(arguments,0):[]})]))},g=function(){function b(a,b){this._subscribe=a,this._handleEvent=b,this.subscribe=lb(this.subscribe,this),this.handleEvent=lb(this.handleEvent,this),this.subscriptions=[],this.queue=[],this.pushing=!1,this.ended=!1,this.prevError=void 0,this.unsubSrc=void 0}return b.prototype.hasSubscribers=function(){return this.subscriptions.length>0},b.prototype.removeSub=function(a){return this.subscriptions=gb.without(a,this.subscriptions)},b.prototype.push=function(a){return a.isEnd()&&(this.ended=!0),u.inTransaction(a,this,this.pushIt,[a])},b.prototype.pushToSubscriptions=function(b){var c,d,e,f,g,h;try{for(f=this.subscriptions,g=0,h=f.length;h>g;g++)e=f[g],d=e.sink(b),(d===a.noMore||b.isEnd())&&this.removeSub(e);return!0}catch(i){throw c=i,this.pushing=!1,this.queue=[],c}},b.prototype.pushIt=function(b){if(this.pushing)return this.queue.push(b),a.more;if(b!==this.prevError){for(b.isError()&&(this.prevError=b),this.pushing=!0,this.pushToSubscriptions(b),this.pushing=!1;this.queue.length;)b=this.queue.shift(),this.push(b);return this.hasSubscribers()?a.more:(this.unsubscribeFromSource(),a.noMore)}},b.prototype.handleEvent=function(a){return this._handleEvent?this._handleEvent(a):this.push(a)},b.prototype.unsubscribeFromSource=function(){return this.unsubSrc&&this.unsubSrc(),this.unsubSrc=void 0},b.prototype.subscribe=function(a){var b;return this.ended?(a(C()),U):(b={sink:a},this.subscriptions.push(b),1===this.subscriptions.length&&(this.unsubSrc=this._subscribe(this.handleEvent)),function(a){return function(){return a.removeSub(b),a.hasSubscribers()?void 0:a.unsubscribeFromSource()}}(this))},b}(),k=function(b){function c(a,b,d){gb.isFunction(a)&&(d=b,b=a,a=[]),c.__super__.constructor.call(this,a),this.dispatcher=new g(b,d),X(this)}return jb(c,b),c.prototype.toProperty=function(b){var c,d;return d=0===arguments.length?o:bb(function(){return b}),c=this.dispatcher,new q(B(this,"toProperty",b),function(b){var e,f,g,h;return e=!1,h=U,f=a.more,g=function(){return e?void 0:d.forEach(function(c){return e=!0,f=b(new m(c)),f===a.noMore?(h(),h=U):void 0})},h=c.subscribe(function(c){return c.hasValue()?e&&c.isInitial()?a.more:(c.isInitial()||g(),e=!0,d=new s(c),b(c)):(c.isEnd()&&(f=g()),f!==a.noMore?b(c):void 0)}),g(),h})},c.prototype.toEventStream=function(){return this},c.prototype.startWith=function(b){return eb(this,"startWith",b,a.once(b).concat(this))},c.prototype.withHandler=function(a){return new c(B(this,"withHandler",a),this.dispatcher.subscribe,a)},c}(p),a.EventStream=k,a.never=function(){return new k(B(a,"never"),function(a){return a(C()),U})},r=function(b){function c(a,b,d){this.property=a,this.subscribe=lb(this.subscribe,this),c.__super__.constructor.call(this,b,d),this.current=o,this.currentValueRootId=void 0,this.propertyEnded=!1}return jb(c,b),c.prototype.push=function(a){return a.isEnd()&&(this.propertyEnded=!0),a.hasValue()&&(this.current=new s(a),this.currentValueRootId=u.currentEventId()),c.__super__.push.call(this,a)},c.prototype.maybeSubSource=function(b,c){return c===a.noMore?U:this.propertyEnded?(b(C()),U):g.prototype.subscribe.call(this,b)},c.prototype.subscribe=function(b){var c,d,e,f;return d=!1,e=a.more,this.current.isDefined&&(this.hasSubscribers()||this.propertyEnded)?(c=u.currentEventId(),f=this.currentValueRootId,!this.propertyEnded&&f&&c&&c!==f?(u.whenDoneWith(this.property,function(a){return function(){return a.currentValueRootId===f?b(I(a.current.get().value())):void 0}}(this)),this.maybeSubSource(b,e)):(u.inTransaction(void 0,this,function(){return e=b(I(this.current.get().value()))},[]),this.maybeSubSource(b,e))):this.maybeSubSource(b,e)},c}(g),q=function(a){function b(a,c,d){gb.isFunction(a)&&(d=c,c=a,a=[]),b.__super__.constructor.call(this,a),this.dispatcher=new r(this,c,d),X(this)}return jb(b,a),b.prototype.changes=function(){return new k(B(this,"changes"),function(a){return function(b){return a.dispatcher.subscribe(function(a){return a.isInitial()?void 0:b(a)})}}(this))},b.prototype.withHandler=function(a){return new b(B(this,"withHandler",a),this.dispatcher.subscribe,a)},b.prototype.toProperty=function(){return this},b.prototype.toEventStream=function(){return new k(B(this,"toEventStream"),function(a){return function(b){return a.dispatcher.subscribe(function(a){return a.isInitial()&&(a=a.toNext()),b(a)})}}(this))},b}(p),a.Property=q,a.constant=function(b){return new q(B(a,"constant",b),function(a){return a(I(b)),a(C()),U})},a.fromBinder=function(b,c){return null==c&&(c=gb.id),new k(B(a,"fromBinder",b,c),function(d){var e,f,g,h;return h=!1,e=!1,f=function(){return h?void 0:"undefined"!=typeof g&&null!==g?(g(),h=!0):e=!0},g=b(function(){var b,e,g,h,i,k;for(b=1<=arguments.length?kb.call(arguments,0):[],h=c.apply(this,b),J(h)&&gb.last(h)instanceof j||(h=[h]),g=a.more,i=0,k=h.length;k>i;i++)if(e=h[i],g=d(e=$(e)),g===a.noMore||e.isEnd())return f(),g;return g}),e&&f(),f})},a.fromEventTarget=function(b,c,d){var e,f,g,h,i,j,k,l;return e=null!=(g=null!=(h=null!=(i=b.addEventListener)?i:b.addListener)?h:b.bind)?g:b.on,f=null!=(j=null!=(k=null!=(l=b.removeEventListener)?l:b.removeListener)?k:b.unbind)?j:b.off,eb(a,"fromEventTarget",b,c,a.fromBinder(function(a){return e.call(b,c,a),function(){return f.call(b,c,a)}},d))},a.fromEvent=a.fromEventTarget,a.once=function(b){return new k(B(a,"once",b),function(a){return a($(b)),a(C()),U})},a.fromArray=function(b){var c;return b.length?(c=0,new k(B(a,"fromArray",b),function(d){var e,f,g;return g=!1,f=a.more,e=function(){var h;return f===a.noMore||g||(h=b[c++],f=d($(h)),f===a.noMore)?void 0:c===b.length?d(C()):u.afterTransaction(e)},e(),function(){return g=!0}})):eb(a,"fromArray",b,a.never())},a.Observable.prototype.map=function(){var a,b;return b=arguments[0],a=2<=arguments.length?kb.call(arguments,1):[],A(this,b,a,function(a){return eb(this,"map",a,this.withHandler(function(b){return this.push(b.fmap(a))}))})},a.combineAsArray=function(){var b,c,d,e,f,g,h;for(f=1<=arguments.length?kb.call(arguments,0):[],1===f.length&&J(f[0])&&(f=f[0]),b=g=0,h=f.length;h>g;b=++g)e=f[b],L(e)||(f[b]=a.constant(e));return f.length?(d=function(){var a,b,d;for(d=[],a=0,b=f.length;b>a;a++)c=f[a],d.push(new t(c,!0));return d}(),eb.apply(null,[a,"combineAsArray"].concat(kb.call(f),[a.when(d,function(){var a;return a=1<=arguments.length?kb.call(arguments,0):[]}).toProperty()]))):a.constant([])},a.onValues=function(){var b,c,d;return c=2<=arguments.length?kb.call(arguments,0,d=arguments.length-1):(d=0,[]),b=arguments[d++],a.combineAsArray(c).onValues(b)},a.combineWith=function(){var b,c;return b=arguments[0],c=2<=arguments.length?kb.call(arguments,1):[],eb.apply(null,[a,"combineWith",b].concat(kb.call(c),[a.combineAsArray(c).map(function(a){return b.apply(null,a)})]))},a.combineTemplate=function(b){var c,d,e,f,g,h,i,j,k,l;return i=[],l=[],h=function(a){return a[a.length-1]},k=function(a,b,c){return h(a)[b]=c},c=function(a,b){return function(c,d){return k(c,a,d[b])}},g=function(a,b){return function(c){return k(c,a,b)}},j=function(a){return J(a)?[]:{}},e=function(a,b){var d,e;return L(b)?(l.push(b),i.push(c(a,l.length-1))):b!==Object(b)||"function"==typeof b||b instanceof RegExp||b instanceof Date?i.push(g(a,b)):(e=function(a){return function(c){var d;return d=j(b),k(c,a,d),c.push(d)}},d=function(a){return a.pop()},i.push(e(a)),f(b),i.push(d))},f=function(a){return gb.each(a,e)},f(b),d=function(a){var c,d,e,f,g;for(e=j(b),c=[e],f=0,g=i.length;g>f;f++)(d=i[f])(c,a);return e},eb(a,"combineTemplate",b,a.combineAsArray(l).map(d))},a.Observable.prototype.combine=function(b,c){var d;return d=Z(c),eb(this,"combine",b,c,a.combineAsArray(this,b).map(function(a){return d(a[0],a[1])}))},a.Observable.prototype.decode=function(b){return eb(this,"decode",b,this.combine(a.combineTemplate(b),function(a,b){return b[a]}))},a.Observable.prototype.withStateMachine=function(b,c){var d;return d=b,eb(this,"withStateMachine",b,c,this.withHandler(function(b){var e,f,g,h,i,j,k;for(e=c(d,b),f=e[0],h=e[1],d=f,i=a.more,j=0,k=h.length;k>j;j++)if(g=h[j],i=this.push(g),i===a.noMore)return i;return i}))},a.Observable.prototype.skipDuplicates=function(a){return null==a&&(a=function(a,b){return a===b}),eb(this,"skipDuplicates",this.withStateMachine(o,function(b,c){return c.hasValue()?c.isInitial()||b===o||!a(b.get(),c.value())?[new s(c.value()),[c]]:[b,[]]:[b,[c]]}))},a.Observable.prototype.awaiting=function(b){return eb(this,"awaiting",b,a.groupSimultaneous(this,b).map(function(a){var b,c;return b=a[0],c=a[1],0===c.length}).toProperty(!1).skipDuplicates())},a.Observable.prototype.not=function(){return eb(this,"not",this.map(function(a){return!a}))},a.Property.prototype.and=function(a){return eb(this,"and",a,this.combine(a,function(a,b){return a&&b}))},a.Property.prototype.or=function(a){return eb(this,"or",a,this.combine(a,function(a,b){return a||b}))},a.scheduler={setTimeout:function(a,b){return setTimeout(a,b)},setInterval:function(a,b){return setInterval(a,b)},clearInterval:function(a){return clearInterval(a)},now:function(){return(new Date).getTime()}},a.EventStream.prototype.bufferWithTime=function(a){return eb(this,"bufferWithTime",a,this.bufferWithTimeOrCount(a,Number.MAX_VALUE))},a.EventStream.prototype.bufferWithCount=function(a){return eb(this,"bufferWithCount",a,this.bufferWithTimeOrCount(void 0,a))},a.EventStream.prototype.bufferWithTimeOrCount=function(a,b){var c;return c=function(c){return c.values.length===b?c.flush():void 0!==a?c.schedule():void 0},eb(this,"bufferWithTimeOrCount",a,b,this.buffer(a,c,c))},a.EventStream.prototype.buffer=function(b,c,d){var e,f,g;return null==c&&(c=U),null==d&&(d=U),e={scheduled:null,end:void 0,values:[],flush:function(){var b;if(this.scheduled&&(a.scheduler.clearTimeout(this.scheduled),this.scheduled=null),this.values.length>0){if(b=this.push(T(this.values)),this.values=[],null!=this.end)return this.push(this.end);if(b!==a.noMore)return d(this)}else if(null!=this.end)return this.push(this.end)},schedule:function(){return this.scheduled?void 0:this.scheduled=b(function(a){return function(){return a.flush()}}(this))}},g=a.more,gb.isFunction(b)||(f=b,b=function(b){return a.scheduler.setTimeout(b,f)}),eb(this,"buffer",this.withHandler(function(a){return e.push=function(a){return function(b){return a.push(b)}}(this),a.isError()?g=this.push(a):a.isEnd()?(e.end=a,e.scheduled||e.flush()):(e.values.push(a.value()),c(e)),g}))},a.Observable.prototype.filter=function(){var b,c;return c=arguments[0],b=2<=arguments.length?kb.call(arguments,1):[],A(this,c,b,function(b){return eb(this,"filter",b,this.withHandler(function(c){return c.filter(b)?this.push(c):a.more}))})},a.EventStream.prototype.concat=function(a){var b;return b=this,new k(B(b,"concat",a),function(c){var d,e;return e=U,d=b.dispatcher.subscribe(function(b){return b.isEnd()?e=a.dispatcher.subscribe(c):c(b)}),function(){return d(),e()}})},a.Observable.prototype.flatMap=function(){return F(this,S(arguments))},a.Observable.prototype.flatMapFirst=function(){return F(this,S(arguments),!0)},F=function(b,c,e,f){var g,h,i;return i=[b],g=[],h=new k(B(b,"flatMap"+(e?"First":""),c),function(h){var i,j,k,l,n;return k=new d,l=[],n=function(b){var d;return d=R(c(b.value())),g.push(d),k.add(function(b,c){return d.dispatcher.subscribe(function(e){var f;return e.isEnd()?(gb.remove(d,g),j(),i(c),a.noMore):(e instanceof m&&(e=e.toNext()),f=h(e),f===a.noMore&&b(),f)})})},j=function(){var a;return a=l.shift(),a?n(a):void 0},i=function(a){return a(),k.empty()?h(C()):void 0},k.add(function(c,d){return b.dispatcher.subscribe(function(b){return b.isEnd()?i(d):b.isError()?h(b):e&&k.count()>1?a.more:k.unsubscribed?a.noMore:f&&k.count()>f?l.push(b):n(b)})}),k.unsubscribe}),h.internalDeps=function(){return g.length?i.concat(g):i},h},S=function(a){return 1===a.length&&L(a[0])?gb.always(a[0]):P(a)},R=function(b){return L(b)?b:a.once(b)},a.Observable.prototype.flatMapWithConcurrencyLimit=function(){var a,b;return b=arguments[0],a=2<=arguments.length?kb.call(arguments,1):[],eb.apply(null,[this,"flatMapWithConcurrencyLimit",b].concat(kb.call(a),[F(this,S(a),!1,b)]))},a.Observable.prototype.flatMapConcat=function(){return eb.apply(null,[this,"flatMapConcat"].concat(kb.call(arguments),[this.flatMapWithConcurrencyLimit.apply(this,[1].concat(kb.call(arguments)))]))},v=function(b,c){var d;return d=new k(B(b,"justInitValue"),function(c){var e,f;return f=void 0,e=b.dispatcher.subscribe(function(b){return b.isEnd()||(f=b),a.noMore}),u.whenDoneWith(d,function(){return null!=f&&c(f),c(C())}),e}),d.concat(c).toProperty()},a.Observable.prototype.mapEnd=function(){var b;return b=P(arguments),eb(this,"mapEnd",b,this.withHandler(function(c){return c.isEnd()?(this.push(T(b(c))),this.push(C()),a.noMore):this.push(c)}))},a.Observable.prototype.skipErrors=function(){return eb(this,"skipErrors",this.withHandler(function(b){return b.isError()?a.more:this.push(b)}))},a.EventStream.prototype.takeUntil=function(b){var c;return c={},eb(this,"takeUntil",b,a.groupSimultaneous(this.mapEnd(c),b.skipErrors()).withHandler(function(d){var e,f,g,h,i,j;if(d.hasValue()){if(j=d.value(),e=j[0],b=j[1],b.length)return this.push(C());for(f=a.more,h=0,i=e.length;i>h;h++)g=e[h],f=this.push(g===c?C():T(g));return f}return this.push(d)}))},a.Property.prototype.takeUntil=function(a){var b;return b=this.changes().takeUntil(a),eb(this,"takeUntil",a,v(this,b))},a.Observable.prototype.flatMapLatest=function(){var a,b;return a=S(arguments),b=this.toEventStream(),eb(this,"flatMapLatest",a,b.flatMap(function(c){return R(a(c)).takeUntil(b)}))},a.fromPoll=function(b,c){return eb(a,"fromPoll",b,c,a.fromBinder(function(c){var d;return d=a.scheduler.setInterval(c,b),function(){return a.scheduler.clearInterval(d)}},c))},a.later=function(b,c){return eb(a,"later",b,c,a.fromPoll(b,function(){return[c,C()]}))},a.sequentially=function(b,c){var d;return d=0,eb(a,"sequentially",b,c,a.fromPoll(b,function(){var a;return a=c[d++],d<c.length?a:d===c.length?[a,C()]:C()}))},a.repeatedly=function(b,c){var d;return d=0,eb(a,"repeatedly",b,c,a.fromPoll(b,function(){return c[d++%c.length]}))},a.interval=function(b,c){return null==c&&(c={}),eb(a,"interval",b,c,a.fromPoll(b,function(){return T(c)}))},a.EventStream.prototype.delay=function(b){return eb(this,"delay",b,this.flatMap(function(c){return a.later(b,c)}))},a.Property.prototype.delay=function(a){return this.delayChanges("delay",a,function(b){return b.delay(a)})},a.Property.prototype.delayChanges=function(){var a,b,c;return a=2<=arguments.length?kb.call(arguments,0,c=arguments.length-1):(c=0,[]),b=arguments[c++],eb.apply(null,[this].concat(kb.call(a),[v(this,b(this.changes()))]))},a.Observable.prototype.bufferingThrottle=function(b){return eb(this,"bufferingThrottle",b,this.flatMapConcat(function(c){return a.once(c).concat(a.later(b).filter(!1))}))},a.Property.prototype.bufferingThrottle=function(){return a.Observable.prototype.bufferingThrottle.apply(this,arguments).toProperty()},c=function(b){function c(){this.guardedSink=lb(this.guardedSink,this),this.subscribeAll=lb(this.subscribeAll,this),this.unsubAll=lb(this.unsubAll,this),this.sink=void 0,this.subscriptions=[],this.ended=!1,c.__super__.constructor.call(this,B(a,"Bus"),this.subscribeAll)}return jb(c,b),c.prototype.unsubAll=function(){var a,b,c,d;for(d=this.subscriptions,b=0,c=d.length;c>b;b++)a=d[b],"function"==typeof a.unsub&&a.unsub();return void 0},c.prototype.subscribeAll=function(a){var b,c,d,e;for(this.sink=a,e=w(this.subscriptions),c=0,d=e.length;d>c;c++)b=e[c],this.subscribeInput(b);return this.unsubAll},c.prototype.guardedSink=function(b){return function(c){return function(d){return d.isEnd()?(c.unsubscribeInput(b),a.noMore):c.sink(d)}}(this)},c.prototype.subscribeInput=function(a){return a.unsub=a.input.dispatcher.subscribe(this.guardedSink(a.input))},c.prototype.unsubscribeInput=function(a){var b,c,d,e,f;for(f=this.subscriptions,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c.input===a)return"function"==typeof c.unsub&&c.unsub(),void this.subscriptions.splice(b,1)},c.prototype.plug=function(a){var b;if(!this.ended)return b={input:a},this.subscriptions.push(b),null!=this.sink&&this.subscribeInput(b),function(b){return function(){return b.unsubscribeInput(a)}}(this)},c.prototype.end=function(){return this.ended=!0,this.unsubAll(),"function"==typeof this.sink?this.sink(C()):void 0},c.prototype.push=function(a){return"function"==typeof this.sink?this.sink(T(a)):void 0},c.prototype.error=function(a){return"function"==typeof this.sink?this.sink(new i(a)):void 0},c}(k),a.Bus=c,N=function(b,c){return fb(function(){var d,e,f;
return e=arguments[0],d=2<=arguments.length?kb.call(arguments,1):[],f=V(c,[function(a,b){return e.apply(null,kb.call(a).concat([b]))}]),eb.apply(null,[a,b,e].concat(kb.call(d),[a.combineAsArray(d).flatMap(f)]))})},a.fromCallback=N("fromCallback",function(){var b,c;return c=arguments[0],b=2<=arguments.length?kb.call(arguments,1):[],a.fromBinder(function(a){return O(c,b)(a),U},function(a){return[a,C()]})}),a.fromNodeCallback=N("fromNodeCallback",function(){var b,c;return c=arguments[0],b=2<=arguments.length?kb.call(arguments,1):[],a.fromBinder(function(a){return O(c,b)(a),U},function(a,b){return a?[new i(a),C()]:[b,C()]})}),a.EventStream.prototype.debounce=function(b){return eb(this,"debounce",b,this.flatMapLatest(function(c){return a.later(b,c)}))},a.Property.prototype.debounce=function(a){return this.delayChanges("debounce",a,function(b){return b.debounce(a)})},a.EventStream.prototype.debounceImmediate=function(b){return eb(this,"debounceImmediate",b,this.flatMapFirst(function(c){return a.once(c).concat(a.later(b).filter(!1))}))},a.Observable.prototype.scan=function(b,c){var d,e,f;return c=Z(c),d=bb(b),f=function(b){return function(f){var g,h,i,j;return g=!1,j=U,h=a.more,i=function(){return g?void 0:d.forEach(function(b){return g=!0,h=f(new m(function(){return b})),h===a.noMore?(j(),j=U):void 0})},j=b.dispatcher.subscribe(function(b){var e,j;return b.hasValue()?g&&b.isInitial()?a.more:(b.isInitial()||i(),g=!0,j=d.getOrElse(void 0),e=c(j,b.value()),d=new s(e),f(b.apply(function(){return e}))):(b.isEnd()&&(h=i()),h!==a.noMore?f(b):void 0)}),u.whenDoneWith(e,i),j}}(this),e=new q(B(this,"scan",b,c),f)},a.Observable.prototype.diff=function(a,b){return b=Z(b),eb(this,"diff",a,b,this.scan([a],function(a,c){return[c,b(a[0],c)]}).filter(function(a){return 2===a.length}).map(function(a){return a[1]}))},a.Observable.prototype.doAction=function(){var a;return a=P(arguments),eb(this,"doAction",a,this.withHandler(function(b){return b.hasValue()&&a(b.value()),this.push(b)}))},a.Observable.prototype.endOnError=function(){var a,b;return b=arguments[0],a=2<=arguments.length?kb.call(arguments,1):[],null==b&&(b=!0),A(this,b,a,function(a){return eb(this,"endOnError",this.withHandler(function(b){return b.isError()&&a(b.error)?(this.push(b),this.push(C())):this.push(b)}))})},db=function(a){return[a,C()]},a.fromPromise=function(b,c){return eb(a,"fromPromise",b,a.fromBinder(function(a){return b.then(a,function(b){return a(new i(b))}),function(){return c&&"function"==typeof b.abort?b.abort():void 0}},db))},a.Observable.prototype.mapError=function(){var a;return a=P(arguments),eb(this,"mapError",a,this.withHandler(function(b){return this.push(b.isError()?T(a(b.error)):b)}))},a.Observable.prototype.flatMapError=function(b){return eb(this,"flatMapError",b,this.mapError(function(a){return new i(a)}).flatMap(function(c){return c instanceof i?b(c.error):a.once(c)}))},a.EventStream.prototype.sampledBy=function(a,b){return eb(this,"sampledBy",a,b,this.toProperty().sampledBy(a,b))},a.Property.prototype.sampledBy=function(b,c){var d,e,f,g,h;return null!=c?c=Z(c):(d=!0,c=function(a){return a.value()}),h=new t(this,!1,d),f=new t(b,!0,d),g=a.when([h,f],c),e=b instanceof q?g.toProperty():g,eb(this,"sampledBy",b,c,e)},a.Property.prototype.sample=function(b){return eb(this,"sample",b,this.sampledBy(a.interval(b,{})))},a.Observable.prototype.map=function(){var a,b;return b=arguments[0],a=2<=arguments.length?kb.call(arguments,1):[],b instanceof q?b.sampledBy(this,G):A(this,b,a,function(a){return eb(this,"map",a,this.withHandler(function(b){return this.push(b.fmap(a))}))})},a.Observable.prototype.fold=function(a,b){return eb(this,"fold",a,b,this.scan(a,b).sampledBy(this.filter(!1).mapEnd().toProperty()))},p.prototype.reduce=p.prototype.fold,a.EventStream.prototype.merge=function(b){var c;return c=this,eb(c,"merge",b,a.mergeAll(this,b))},a.mergeAll=function(){var b;return b=1<=arguments.length?kb.call(arguments,0):[],J(b[0])&&(b=b[0]),b.length?new k(B.apply(null,[a,"mergeAll"].concat(kb.call(b))),function(c){var d,e,f;return d=0,f=function(e){return function(f){return e.dispatcher.subscribe(function(e){var g;return e.isEnd()?(d++,d===b.length?c(C()):a.more):(g=c(e),g===a.noMore&&f(),g)})}},e=gb.map(f,b),x.apply(null,e)}):a.never()},a.Observable.prototype.take=function(b){return 0>=b?a.never():eb(this,"take",b,this.withHandler(function(c){return c.hasValue()?(b--,b>0?this.push(c):(0===b&&this.push(c),this.push(C()),a.noMore)):this.push(c)}))},a.EventStream.prototype.holdWhen=function(b){var c,d,e;return e=b.startWith(!1),d=e.filter(function(a){return!a}),c=e.filter(gb.id),eb(this,"holdWhen",b,this.filter(!1).merge(e.flatMapConcat(function(b){return function(e){return e?b.scan([],function(a,b){return a.concat([b])}).sampledBy(d).take(1).flatMap(a.fromArray):b.takeUntil(c)}}(this))))},a.$={},a.$.asEventStream=function(b,c,d){var e;return gb.isFunction(c)&&(e=[c,void 0],d=e[0],c=e[1]),eb(this.selector||this,"asEventStream",b,a.fromBinder(function(a){return function(d){return a.on(b,c,d),function(){return a.off(b,c,d)}}}(this),d))},null!=(hb="undefined"!=typeof jQuery&&null!==jQuery?jQuery:"undefined"!=typeof Zepto&&null!==Zepto?Zepto:void 0)&&(hb.fn.asEventStream=a.$.asEventStream),a.Observable.prototype.log=function(){var a;return a=1<=arguments.length?kb.call(arguments,0):[],this.subscribe(function(b){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log.apply(console,kb.call(a).concat([b.log()])):void 0}),this},a.retry=function(b){var c,d,e,f,g,h;if(!gb.isFunction(b.source))throw new l("'source' option has to be a function");return h=b.source,f=b.retries||0,e=b.maxRetries||f,c=b.delay||function(){return 0},d=b.isRetryable||function(){return!0},g=function(b){var g,i;return i={source:h,retries:f-1,maxRetries:e,delay:c,isRetryable:d},g=function(){return a.retry(i)},a.later(c(b)).filter(!1).concat(a.once().flatMap(g))},eb(a,"retry",b,h().flatMapError(function(b){return d(b)&&f>0?g({error:b,retriesDone:e-f}):a.once(new i(b))}))},a.Observable.prototype.skip=function(b){return eb(this,"skip",b,this.withHandler(function(c){return c.hasValue()&&b>0?(b--,a.more):this.push(c)}))},a.EventStream.prototype.skipUntil=function(a){var b;return b=a.take(1).map(!0).toProperty(!1),eb(this,"skipUntil",a,this.filter(b))},a.EventStream.prototype.skipWhile=function(){var b,c,d;return c=arguments[0],b=2<=arguments.length?kb.call(arguments,1):[],d=!1,A(this,c,b,function(b){return eb(this,"skipWhile",b,this.withHandler(function(c){return!d&&c.hasValue()&&b(c.value())?a.more:(c.hasValue()&&(d=!0),this.push(c))}))})},a.Observable.prototype.slidingWindow=function(a,b){return null==b&&(b=0),eb(this,"slidingWindow",a,b,this.scan([],function(b,c){return b.concat([c]).slice(-a)}).filter(function(a){return a.length>=b}))},a.spy=function(a){return Y.push(a)},Y=[],X=function(a){var b,c,d;if(Y.length&&!X.running)try{for(X.running=!0,c=0,d=Y.length;d>c;c++)(b=Y[c])(a)}finally{delete X.running}return void 0},a.Property.prototype.startWith=function(a){return eb(this,"startWith",a,this.scan(a,function(a,b){return b}))},a.Observable.prototype.takeWhile=function(){var b,c;return c=arguments[0],b=2<=arguments.length?kb.call(arguments,1):[],A(this,c,b,function(b){return eb(this,"takeWhile",b,this.withHandler(function(c){return c.filter(b)?this.push(c):(this.push(C()),a.noMore)}))})},a.EventStream.prototype.throttle=function(a){return eb(this,"throttle",a,this.bufferWithTime(a).map(function(a){return a[a.length-1]}))},a.Property.prototype.throttle=function(a){return this.delayChanges("throttle",a,function(b){return b.throttle(a)})},a.update=function(){var b,c,d,e;for(c=arguments[0],e=2<=arguments.length?kb.call(arguments,1):[],d=function(a){return function(){var b;return b=1<=arguments.length?kb.call(arguments,0):[],function(c){return a.apply(null,[c].concat(b))}}},b=e.length-1;b>0;)e[b]instanceof Function||(e[b]=function(a){return function(){return a}}(e[b])),e[b]=d(e[b]),b-=2;return eb.apply(null,[a,"update",c].concat(kb.call(e),[a.when.apply(a,e).scan(c,function(a,b){return b(a)})]))},a.zipAsArray=function(){var b;return b=1<=arguments.length?kb.call(arguments,0):[],J(b[0])&&(b=b[0]),eb.apply(null,[a,"zipAsArray"].concat(kb.call(b),[a.zipWith(b,function(){var a;return a=1<=arguments.length?kb.call(arguments,0):[]})]))},a.zipWith=function(){var b,c,d;return b=arguments[0],c=2<=arguments.length?kb.call(arguments,1):[],gb.isFunction(b)||(d=[b,c[0]],c=d[0],b=d[1]),c=gb.map(function(a){return a.toEventStream()},c),eb.apply(null,[a,"zipWith",b].concat(kb.call(c),[a.when(c,b)]))},a.Observable.prototype.zip=function(b,c){return null==c&&(c=Array),eb(this,"zip",b,a.zipWith([this,b],c))},"undefined"!=typeof define&&null!==define&&null!=define.amd?(define([],function(){return a}),this.Bacon=a):"undefined"!=typeof module&&null!==module&&null!=module.exports?(module.exports=a,a.Bacon=a):this.Bacon=a}).call(this);
(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb={}.hasOwnProperty,ib=function(a,b){function c(){this.constructor=a}for(var d in b)hb.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},jb=[].slice,kb=function(a,b){return function(){return a.apply(b,arguments)}};a={toString:function(){return"Bacon"}},a.version="0.7.45",l=("undefined"!=typeof global&&null!==global?global:this).Error,T=function(){},L=function(a,b){return b},F=function(a){return a},w=function(a){return a.slice(0)},I=function(a){return a instanceof Array},K=function(a){return a instanceof p},fb={indexOf:Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){var c,d,e,f;for(c=e=0,f=a.length;f>e;c=++e)if(d=a[c],b===d)return c;return-1},indexWhere:function(a,b){var c,d,e,f;for(c=e=0,f=a.length;f>e;c=++e)if(d=a[c],b(d))return c;return-1},head:function(a){return a[0]},always:function(a){return function(){return a}},negate:function(a){return function(b){return!a(b)}},empty:function(a){return 0===a.length},tail:function(a){return a.slice(1,a.length)},filter:function(a,b){var c,d,e,f;for(c=[],e=0,f=b.length;f>e;e++)d=b[e],a(d)&&c.push(d);return c},map:function(a,b){var c,d,e,f;for(f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(a(c));return f},each:function(a,b){var c,d;for(c in a)d=a[c],b(c,d);return void 0},toArray:function(a){return I(a)?a:[a]},contains:function(a,b){return-1!==fb.indexOf(a,b)},id:function(a){return a},last:function(a){return a[a.length-1]},all:function(a,b){var c,d,e;for(null==b&&(b=fb.id),d=0,e=a.length;e>d;d++)if(c=a[d],!b(c))return!1;return!0},any:function(a,b){var c,d,e;for(null==b&&(b=fb.id),d=0,e=a.length;e>d;d++)if(c=a[d],b(c))return!0;return!1},without:function(a,b){return fb.filter(function(b){return b!==a},b)},remove:function(a,b){var c;return c=fb.indexOf(b,a),c>=0?b.splice(c,1):void 0},fold:function(a,b,c){var d,e,f;for(e=0,f=a.length;f>e;e++)d=a[e],b=c(b,d);return b},flatMap:function(a,b){return fb.fold(b,[],function(b,c){return b.concat(a(c))})},cached:function(a){var b;return b=o,function(){return b===o&&(b=a(),a=void 0),b}},isFunction:function(a){return"function"==typeof a},toString:function(a){var b,c,d,e;try{return V++,null==a?"undefined":fb.isFunction(a)?"function":I(a)?V>5?"[..]":"["+fb.map(fb.toString,a).toString()+"]":null!=(null!=a?a.toString:void 0)&&a.toString!==Object.prototype.toString?a.toString():"object"==typeof a?V>5?"{..}":(c=function(){var c;c=[];for(d in a)hb.call(a,d)&&(e=function(){try{return a[d]}catch(c){return b=c}}(),c.push(fb.toString(d)+":"+fb.toString(e)));return c}(),"{"+c+"}"):a}finally{V--}}},V=0,a._=fb,u=a.UpdateBarrier=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return k=void 0,l=[],m={},c=[],d=0,b=function(a){return k?c.push(a):a()},n=function(a,b){var c;return k?(c=m[a.id],null==c?(c=m[a.id]=[b],l.push(a)):c.push(b)):b()},f=function(){for(;l.length>0;)h(0);return void 0},h=function(a){var b,c,d,e,f,h;for(c=l[a],d=c.id,e=m[d],l.splice(a,1),delete m[d],g(c),f=0,h=e.length;h>f;f++)(b=e[f])();return void 0},g=function(a){var b,c,d,e,f;for(c=a.internalDeps(),e=0,f=c.length;f>e;e++)b=c[e],g(b),m[b.id]&&(d=fb.indexOf(l,b),h(d));return void 0},j=function(a,b,e,g){var h,i;if(k)return e.apply(b,g);k=a;try{i=e.apply(b,g),f()}finally{for(k=void 0;d<c.length;)h=c[d],d++,h();d=0,c=[]}return i},e=function(){return k?k.id:void 0},o=function(c,d){var e,f,g,h;return h=!1,f=!1,e=function(){return f=!0},g=function(){return h=!0,e()},e=c.dispatcher.subscribe(function(c){return b(function(){var b;return h||(b=d(c),b!==a.noMore)?void 0:g()})}),f&&e(),g},i=function(){return l.length>0},{whenDoneWith:n,hasWaiters:i,inTransaction:j,currentEventId:e,wrappedSubscribe:o,afterTransaction:b}}(),t=function(){function a(a,b,c){this.obs=a,this.sync=b,this.lazy=null!=c?c:!1,this.queue=[]}return a.prototype.subscribe=function(a){return this.obs.dispatcher.subscribe(a)},a.prototype.toString=function(){return this.obs.toString()},a.prototype.markEnded=function(){return this.ended=!0},a.prototype.consume=function(){return this.lazy?{value:fb.always(this.queue[0])}:this.queue[0]},a.prototype.push=function(a){return this.queue=[a]},a.prototype.mayHave=function(){return!0},a.prototype.hasAtLeast=function(){return this.queue.length},a.prototype.flatten=!0,a}(),e=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return ib(b,a),b.prototype.consume=function(){return this.queue.shift()},b.prototype.push=function(a){return this.queue.push(a)},b.prototype.mayHave=function(a){return!this.ended||this.queue.length>=a},b.prototype.hasAtLeast=function(a){return this.queue.length>=a},b.prototype.flatten=!1,b}(t),b=function(a){function b(a){b.__super__.constructor.call(this,a,!0)}return ib(b,a),b.prototype.consume=function(){var a;return a=this.queue,this.queue=[],{value:function(){return a}}},b.prototype.push=function(a){return this.queue.push(a.value())},b.prototype.hasAtLeast=function(){return!0},b}(t),t.isTrigger=function(a){return a instanceof t?a.sync:a instanceof k},t.fromObservable=function(a){return a instanceof t?a:a instanceof q?new t(a,!1):new e(a,!0)},f=function(){function a(a,b,c){this.context=a,this.method=b,this.args=c,this.cached=void 0}return a.prototype.deps=function(){return this.cached||(this.cached=D([this.context].concat(this.args)))},a.prototype.apply=function(a){return a.desc=this,a},a.prototype.toString=function(){return fb.toString(this.context)+"."+fb.toString(this.method)+"("+fb.map(fb.toString,this.args)+")"},a}(),A=function(){var a,b,c;return b=arguments[0],c=arguments[1],a=3<=arguments.length?jb.call(arguments,2):[],(b||c)instanceof f?b||c:new f(b,c,a)},db=function(){var a,b,c;return a=2<=arguments.length?jb.call(arguments,0,c=arguments.length-1):(c=0,[]),b=arguments[c++],A.apply(null,a).apply(b)},D=function(a){return I(a)?fb.flatMap(D,a):K(a)?[a]:a instanceof t?[a.obs]:[]},eb=function(a){return function(){var b,c,d,e;return d=arguments[0],b=2<=arguments.length?jb.call(arguments,1):[],"object"==typeof d&&b.length&&(c=d,e=b[0],d=function(){return c[e].apply(c,arguments)},b=b.slice(1)),a.apply(null,[d].concat(jb.call(b)))}},O=function(a){return a=Array.prototype.slice.call(a),P.apply(null,a)},U=function(a,b){return function(){var c;return c=1<=arguments.length?jb.call(arguments,0):[],a.apply(null,b.concat(c))}},bb=function(a){return function(b){return function(c){var d;return null==c?void 0:(d=c[b],fb.isFunction(d)?d.apply(c,a):d)}}},$=function(a,b){var c,d;return d=a.slice(1).split("."),c=fb.map(bb(b),d),function(b){var d,e;for(d=0,e=c.length;e>d;d++)a=c[d],b=a(b);return b}},J=function(a){return"string"==typeof a&&a.length>1&&"."===a.charAt(0)},P=eb(function(){var a,b;return b=arguments[0],a=2<=arguments.length?jb.call(arguments,1):[],fb.isFunction(b)?a.length?U(b,a):b:J(b)?$(b,a):fb.always(b)}),N=function(a,b){return P.apply(null,[a].concat(jb.call(b)))},z=function(a,b,c,d){var e;return b instanceof q?(e=b.sampledBy(a,function(a,b){return[a,b]}),d.call(e,function(a){var b,c;return b=a[0],c=a[1],b}).map(function(a){var b,c;return b=a[0],c=a[1]})):(b=N(b,c),d.call(a,b))},Y=function(a){var b;return fb.isFunction(a)?a:J(a)?(b=_(a),function(a,c){return a[b](c)}):void 0},_=function(a){return a.slice(1)},s=function(){function a(a){this.value=a}return a.prototype.getOrElse=function(){return this.value},a.prototype.get=function(){return this.value},a.prototype.filter=function(b){return b(this.value)?new a(this.value):o},a.prototype.map=function(b){return new a(b(this.value))},a.prototype.forEach=function(a){return a(this.value)},a.prototype.isDefined=!0,a.prototype.toArray=function(){return[this.value]},a.prototype.inspect=function(){return"Some("+this.value+")"},a.prototype.toString=function(){return this.inspect()},a}(),o={getOrElse:function(a){return a},filter:function(){return o},map:function(){return o},forEach:function(){},isDefined:!1,toArray:function(){return[]},inspect:function(){return"None"},toString:function(){return this.inspect()}},ab=function(a){return a instanceof s||a===o?a:new s(a)},a.noMore=["<no-more>"],a.more=["<more>"],C=0,j=function(){function a(){this.id=++C}return a.prototype.isEvent=function(){return!0},a.prototype.isEnd=function(){return!1},a.prototype.isInitial=function(){return!1},a.prototype.isNext=function(){return!1},a.prototype.isError=function(){return!1},a.prototype.hasValue=function(){return!1},a.prototype.filter=function(){return!0},a.prototype.inspect=function(){return this.toString()},a.prototype.log=function(){return this.toString()},a}(),n=function(a){function b(a,c){b.__super__.constructor.call(this),!c&&fb.isFunction(a)||a instanceof b?(this.valueF=a,this.valueInternal=void 0):(this.valueF=void 0,this.valueInternal=a)}return ib(b,a),b.prototype.isNext=function(){return!0},b.prototype.hasValue=function(){return!0},b.prototype.value=function(){return this.valueF instanceof b?(this.valueInternal=this.valueF.value(),this.valueF=void 0):this.valueF&&(this.valueInternal=this.valueF(),this.valueF=void 0),this.valueInternal},b.prototype.fmap=function(a){var b,c;return this.valueInternal?(c=this.valueInternal,this.apply(function(){return a(c)})):(b=this,this.apply(function(){return a(b.value())}))},b.prototype.apply=function(a){return new b(a)},b.prototype.filter=function(a){return a(this.value())},b.prototype.toString=function(){return fb.toString(this.value())},b.prototype.log=function(){return this.value()},b}(j),m=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return ib(b,a),b.prototype.isInitial=function(){return!0},b.prototype.isNext=function(){return!1},b.prototype.apply=function(a){return new b(a)},b.prototype.toNext=function(){return new n(this)},b}(n),h=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return ib(b,a),b.prototype.isEnd=function(){return!0},b.prototype.fmap=function(){return this},b.prototype.apply=function(){return this},b.prototype.toString=function(){return"<end>"},b}(j),i=function(a){function b(a){this.error=a}return ib(b,a),b.prototype.isError=function(){return!0},b.prototype.fmap=function(){return this},b.prototype.apply=function(){return this},b.prototype.toString=function(){return"<error> "+fb.toString(this.error)},b}(j),a.Event=j,a.Initial=m,a.Next=n,a.End=h,a.Error=i,H=function(a){return new m(a,!0)},S=function(a){return new n(a,!0)},B=function(){return new h},Z=function(a){return a instanceof j?a:S(a)},G=0,W=function(){},p=function(){function a(a){this.id=++G,db(a,this),this.initialDesc=this.desc}return a.prototype.subscribe=function(a){return u.wrappedSubscribe(this,a)},a.prototype.subscribeInternal=function(a){return this.dispatcher.subscribe(a)},a.prototype.onValue=function(){var a;return a=O(arguments),this.subscribe(function(b){return b.hasValue()?a(b.value()):void 0})},a.prototype.onValues=function(a){return this.onValue(function(b){return a.apply(null,b)})},a.prototype.onError=function(){var a;return a=O(arguments),this.subscribe(function(b){return b.isError()?a(b.error):void 0})},a.prototype.onEnd=function(){var a;return a=O(arguments),this.subscribe(function(b){return b.isEnd()?a():void 0})},a.prototype.name=function(a){return this._name=a,this},a.prototype.withDescription=function(){return A.apply(null,arguments).apply(this)},a.prototype.toString=function(){return this._name?this._name:this.desc.toString()},a.prototype.internalDeps=function(){return this.initialDesc.deps()},a}(),p.prototype.assign=p.prototype.onValue,p.prototype.forEach=p.prototype.onValue,p.prototype.inspect=p.prototype.toString,a.Observable=p,d=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.unsubscribe=kb(this.unsubscribe,this),this.unsubscribed=!1,this.subscriptions=[],this.starting=[],c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.add=function(a){var b,c,d;if(!this.unsubscribed)return b=!1,c=T,this.starting.push(a),d=function(d){return function(){return d.unsubscribed?void 0:(b=!0,d.remove(c),fb.remove(a,d.starting))}}(this),c=a(this.unsubscribe,d),this.unsubscribed||b||this.subscriptions.push(c),fb.remove(a,this.starting),c},a.prototype.remove=function(a){return this.unsubscribed?void 0:void 0!==fb.remove(a,this.subscriptions)?a():void 0},a.prototype.unsubscribe=function(){var a,b,c,d;if(!this.unsubscribed){for(this.unsubscribed=!0,d=this.subscriptions,b=0,c=d.length;c>b;b++)(a=d[b])();return this.subscriptions=[],this.starting=[]}},a.prototype.count=function(){return this.unsubscribed?0:this.subscriptions.length+this.starting.length},a.prototype.empty=function(){return 0===this.count()},a}(),a.CompositeUnsubscribe=d,g=function(){function b(a,b){this._subscribe=a,this._handleEvent=b,this.subscribe=kb(this.subscribe,this),this.handleEvent=kb(this.handleEvent,this),this.subscriptions=[],this.queue=[],this.pushing=!1,this.ended=!1,this.prevError=void 0,this.unsubSrc=void 0}return b.prototype.hasSubscribers=function(){return this.subscriptions.length>0},b.prototype.removeSub=function(a){return this.subscriptions=fb.without(a,this.subscriptions)},b.prototype.push=function(a){return a.isEnd()&&(this.ended=!0),u.inTransaction(a,this,this.pushIt,[a])},b.prototype.pushToSubscriptions=function(b){var c,d,e,f,g,h;try{for(f=this.subscriptions,g=0,h=f.length;h>g;g++)e=f[g],d=e.sink(b),(d===a.noMore||b.isEnd())&&this.removeSub(e);return!0}catch(i){throw c=i,this.pushing=!1,this.queue=[],c}},b.prototype.pushIt=function(b){if(this.pushing)return this.queue.push(b),a.more;if(b!==this.prevError){for(b.isError()&&(this.prevError=b),this.pushing=!0,this.pushToSubscriptions(b),this.pushing=!1;this.queue.length;)b=this.queue.shift(),this.push(b);return this.hasSubscribers()?a.more:(this.unsubscribeFromSource(),a.noMore)}},b.prototype.handleEvent=function(a){return this._handleEvent?this._handleEvent(a):this.push(a)},b.prototype.unsubscribeFromSource=function(){return this.unsubSrc&&this.unsubSrc(),this.unsubSrc=void 0},b.prototype.subscribe=function(a){var b;return this.ended?(a(B()),T):(b={sink:a},this.subscriptions.push(b),1===this.subscriptions.length&&(this.unsubSrc=this._subscribe(this.handleEvent)),function(a){return function(){return a.removeSub(b),a.hasSubscribers()?void 0:a.unsubscribeFromSource()}}(this))},b}(),k=function(b){function c(a,b,d){fb.isFunction(a)&&(d=b,b=a,a=[]),c.__super__.constructor.call(this,a),this.dispatcher=new g(b,d),W(this)}return ib(c,b),c.prototype.toProperty=function(b){var c,d;return d=0===arguments.length?o:ab(function(){return b}),c=this.dispatcher,new q(A(this,"toProperty",b),function(b){var e,f,g,h;return e=!1,h=T,f=a.more,g=function(){return e?void 0:d.forEach(function(c){return e=!0,f=b(new m(c)),f===a.noMore?(h(),h=T):void 0})},h=c.subscribe(function(c){return c.hasValue()?e&&c.isInitial()?a.more:(c.isInitial()||g(),e=!0,d=new s(c),b(c)):(c.isEnd()&&(f=g()),f!==a.noMore?b(c):void 0)}),g(),h})},c.prototype.toEventStream=function(){return this},c.prototype.withHandler=function(a){return new c(A(this,"withHandler",a),this.dispatcher.subscribe,a)},c}(p),a.EventStream=k,a.never=function(){return new k(A(a,"never"),function(a){return a(B()),T})},a.when=function(){var b,c,d,e,f,g,h,i,j,l,m,n,o,p,q,r,s,v,w,z;if(0===arguments.length)return a.never();for(f=arguments.length,q="when: expecting arguments in the form (Observable+,function)+",o=[],j=[],c=0,l=[];f>c;){for(l[c]=arguments[c],l[c+1]=arguments[c+1],i=fb.toArray(arguments[c]),b=x(arguments[c+1]),h={f:b,ixs:[]},p=!1,r=0,v=i.length;v>r;r++){for(n=i[r],d=fb.indexOf(o,n),p||(p=t.isTrigger(n)),0>d&&(o.push(n),d=o.length-1),z=h.ixs,s=0,w=z.length;w>s;s++)e=z[s],e.index===d&&e.count++;h.ixs.push({index:d,count:1})}i.length>0&&j.push(h),c+=2}return o.length?(o=fb.map(t.fromObservable,o),g=fb.any(o,function(a){return a.flatten})&&y(fb.map(function(a){return a.obs},o)),m=new k(A.apply(null,[a,"when"].concat(jb.call(l))),function(b){var d,e,f,h,i,k,l;return l=[],f=!1,h=function(a){var b,d,e;for(e=a.ixs,b=0,d=e.length;d>b;b++)if(c=e[b],!o[c.index].hasAtLeast(c.count))return!1;return!0},e=function(a){return!a.sync||a.ended},d=function(a){var b,d,e;for(e=a.ixs,b=0,d=e.length;d>b;b++)if(c=e[b],!o[c.index].mayHave(c.count))return!0},i=function(a){return!a.source.flatten},k=function(k){return function(n){var p,q,r;return q=function(){return u.whenDoneWith(m,p)},r=function(){var d,e,f,g,k,m;if(!(l.length>0))return a.more;for(f=a.more,g=l.pop(),k=0,m=j.length;m>k;k++)if(e=j[k],h(e))return d=function(){var a,b,d,f;for(d=e.ixs,f=[],a=0,b=d.length;b>a;a++)c=d[a],f.push(o[c.index].consume());return f}(),f=b(g.e.apply(function(){var a,b;return b=function(){var b,c,e;for(e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.value());return e}(),e.f.apply(e,b)})),l.length&&(l=fb.filter(i,l)),f===a.noMore?f:r()},p=function(){var c;return c=r(),f&&(f=!1,(fb.all(o,e)||fb.all(j,d))&&(c=a.noMore,b(B()))),c===a.noMore&&n(),c},k.subscribe(function(c){var d;return c.isEnd()?(f=!0,k.markEnded(),q()):c.isError()?d=b(c):(k.push(c),k.sync&&(l.push({source:k,e:c}),g||u.hasWaiters()?q():p())),d===a.noMore&&n(),d||a.more})}},new a.CompositeUnsubscribe(function(){var a,b,c;for(c=[],a=0,b=o.length;b>a;a++)n=o[a],c.push(k(n));return c}()).unsubscribe})):a.never()},y=function(a,b){var c;return null==b&&(b=[]),c=function(a){var d;return fb.contains(b,a)?!0:(d=a.internalDeps(),d.length?(b.push(a),fb.any(d,c)):(b.push(a),!1))},fb.any(a,c)},x=function(a){return fb.isFunction(a)?a:fb.always(a)},a.groupSimultaneous=function(){var c,d,e;return e=1<=arguments.length?jb.call(arguments,0):[],1===e.length&&I(e[0])&&(e=e[0]),d=function(){var a,d,f;for(f=[],a=0,d=e.length;d>a;a++)c=e[a],f.push(new b(c));return f}(),db.apply(null,[a,"groupSimultaneous"].concat(jb.call(e),[a.when(d,function(){var a;return a=1<=arguments.length?jb.call(arguments,0):[]})]))},r=function(b){function c(a,b,d){this.property=a,this.subscribe=kb(this.subscribe,this),c.__super__.constructor.call(this,b,d),this.current=o,this.currentValueRootId=void 0,this.propertyEnded=!1}return ib(c,b),c.prototype.push=function(a){return a.isEnd()&&(this.propertyEnded=!0),a.hasValue()&&(this.current=new s(a),this.currentValueRootId=u.currentEventId()),c.__super__.push.call(this,a)},c.prototype.maybeSubSource=function(b,c){return c===a.noMore?T:this.propertyEnded?(b(B()),T):g.prototype.subscribe.call(this,b)},c.prototype.subscribe=function(b){var c,d,e,f;return d=!1,e=a.more,this.current.isDefined&&(this.hasSubscribers()||this.propertyEnded)?(c=u.currentEventId(),f=this.currentValueRootId,!this.propertyEnded&&f&&c&&c!==f?(u.whenDoneWith(this.property,function(a){return function(){return a.currentValueRootId===f?b(H(a.current.get().value())):void 0}}(this)),this.maybeSubSource(b,e)):(u.inTransaction(void 0,this,function(){return e=b(H(this.current.get().value()))},[]),this.maybeSubSource(b,e))):this.maybeSubSource(b,e)},c}(g),q=function(a){function b(a,c,d){fb.isFunction(a)&&(d=c,c=a,a=[]),b.__super__.constructor.call(this,a),this.dispatcher=new r(this,c,d),W(this)}return ib(b,a),b.prototype.changes=function(){return new k(A(this,"changes"),function(a){return function(b){return a.dispatcher.subscribe(function(a){return a.isInitial()?void 0:b(a)})}}(this))},b.prototype.withHandler=function(a){return new b(A(this,"withHandler",a),this.dispatcher.subscribe,a)},b.prototype.toProperty=function(){return this},b.prototype.toEventStream=function(){return new k(A(this,"toEventStream"),function(a){return function(b){return a.dispatcher.subscribe(function(a){return a.isInitial()&&(a=a.toNext()),b(a)})}}(this))},b}(p),a.Property=q,a.constant=function(b){return new q(A(a,"constant",b),function(a){return a(H(b)),a(B()),T})},a.fromBinder=function(b,c){return null==c&&(c=fb.id),new k(A(a,"fromBinder",b,c),function(d){var e,f,g,h;return h=!1,e=!1,f=function(){return h?void 0:"undefined"!=typeof g&&null!==g?(g(),h=!0):e=!0},g=b(function(){var b,e,g,h,i,k;for(b=1<=arguments.length?jb.call(arguments,0):[],h=c.apply(this,b),I(h)&&fb.last(h)instanceof j||(h=[h]),g=a.more,i=0,k=h.length;k>i;i++)if(e=h[i],g=d(e=Z(e)),g===a.noMore||e.isEnd())return f(),g;return g}),e&&f(),f})},a.fromEventTarget=function(b,c,d){var e,f,g,h,i,j,k,l;return e=null!=(g=null!=(h=null!=(i=b.addEventListener)?i:b.addListener)?h:b.bind)?g:b.on,f=null!=(j=null!=(k=null!=(l=b.removeEventListener)?l:b.removeListener)?k:b.unbind)?j:b.off,db(a,"fromEventTarget",b,c,a.fromBinder(function(a){return e.call(b,c,a),function(){return f.call(b,c,a)}},d))},a.fromEvent=a.fromEventTarget,a.once=function(b){return new k(A(a,"once",b),function(a){return a(Z(b)),a(B()),T})},a.fromArray=function(b){var c;return b.length?(c=0,new k(A(a,"fromArray",b),function(d){var e,f,g;return g=!1,f=a.more,e=function(){var h;return f===a.noMore||g||(h=b[c++],f=d(Z(h)),f===a.noMore)?void 0:c===b.length?d(B()):u.afterTransaction(e)},e(),function(){return g=!0}})):db(a,"fromArray",b,a.never())},a.Observable.prototype.map=function(){var a,b;return b=arguments[0],a=2<=arguments.length?jb.call(arguments,1):[],z(this,b,a,function(a){return db(this,"map",a,this.withHandler(function(b){return this.push(b.fmap(a))}))})},a.combineAsArray=function(){var b,c,d,e,f,g,h;for(f=1<=arguments.length?jb.call(arguments,0):[],1===f.length&&I(f[0])&&(f=f[0]),b=g=0,h=f.length;h>g;b=++g)e=f[b],K(e)||(f[b]=a.constant(e));return f.length?(d=function(){var a,b,d;for(d=[],a=0,b=f.length;b>a;a++)c=f[a],d.push(new t(c,!0));return d}(),db.apply(null,[a,"combineAsArray"].concat(jb.call(f),[a.when(d,function(){var a;return a=1<=arguments.length?jb.call(arguments,0):[]}).toProperty()]))):a.constant([])},a.onValues=function(){var b,c,d;return c=2<=arguments.length?jb.call(arguments,0,d=arguments.length-1):(d=0,[]),b=arguments[d++],a.combineAsArray(c).onValues(b)},a.combineWith=function(){var b,c;return b=arguments[0],c=2<=arguments.length?jb.call(arguments,1):[],db.apply(null,[a,"combineWith",b].concat(jb.call(c),[a.combineAsArray(c).map(function(a){return b.apply(null,a)})]))},a.combineTemplate=function(b){var c,d,e,f,g,h,i,j,k,l;return i=[],l=[],h=function(a){return a[a.length-1]},k=function(a,b,c){return h(a)[b]=c},c=function(a,b){return function(c,d){return k(c,a,d[b])}},g=function(a,b){return function(c){return k(c,a,b)}},j=function(a){return I(a)?[]:{}},e=function(a,b){var d,e;return K(b)?(l.push(b),i.push(c(a,l.length-1))):b!==Object(b)||"function"==typeof b||b instanceof RegExp||b instanceof Date?i.push(g(a,b)):(e=function(a){return function(c){var d;return d=j(b),k(c,a,d),c.push(d)}},d=function(a){return a.pop()},i.push(e(a)),f(b),i.push(d))},f=function(a){return fb.each(a,e)},f(b),d=function(a){var c,d,e,f,g;for(e=j(b),c=[e],f=0,g=i.length;g>f;f++)(d=i[f])(c,a);return e},db(a,"combineTemplate",b,a.combineAsArray(l).map(d))},a.Observable.prototype.combine=function(b,c){var d;return d=Y(c),db(this,"combine",b,c,a.combineAsArray(this,b).map(function(a){return d(a[0],a[1])}))},a.Observable.prototype.decode=function(b){return db(this,"decode",b,this.combine(a.combineTemplate(b),function(a,b){return b[a]}))},a.Observable.prototype.withStateMachine=function(b,c){var d;return d=b,db(this,"withStateMachine",b,c,this.withHandler(function(b){var e,f,g,h,i,j,k;for(e=c(d,b),f=e[0],h=e[1],d=f,i=a.more,j=0,k=h.length;k>j;j++)if(g=h[j],i=this.push(g),i===a.noMore)return i;return i}))},a.Observable.prototype.skipDuplicates=function(a){return null==a&&(a=function(a,b){return a===b}),db(this,"skipDuplicates",this.withStateMachine(o,function(b,c){return c.hasValue()?c.isInitial()||b===o||!a(b.get(),c.value())?[new s(c.value()),[c]]:[b,[]]:[b,[c]]}))},a.Observable.prototype.awaiting=function(b){return db(this,"awaiting",b,a.groupSimultaneous(this,b).map(function(a){var b,c;return b=a[0],c=a[1],0===c.length}).toProperty(!1).skipDuplicates())},a.Observable.prototype.not=function(){return db(this,"not",this.map(function(a){return!a}))},a.Property.prototype.and=function(a){return db(this,"and",a,this.combine(a,function(a,b){return a&&b}))},a.Property.prototype.or=function(a){return db(this,"or",a,this.combine(a,function(a,b){return a||b}))},a.scheduler={setTimeout:function(a,b){return setTimeout(a,b)},setInterval:function(a,b){return setInterval(a,b)},clearInterval:function(a){return clearInterval(a)},clearTimeout:function(a){return clearTimeout(a)},now:function(){return(new Date).getTime()}},a.EventStream.prototype.bufferWithTime=function(a){return db(this,"bufferWithTime",a,this.bufferWithTimeOrCount(a,Number.MAX_VALUE))},a.EventStream.prototype.bufferWithCount=function(a){return db(this,"bufferWithCount",a,this.bufferWithTimeOrCount(void 0,a))},a.EventStream.prototype.bufferWithTimeOrCount=function(a,b){var c;return c=function(c){return c.values.length===b?c.flush():void 0!==a?c.schedule():void 0},db(this,"bufferWithTimeOrCount",a,b,this.buffer(a,c,c))},a.EventStream.prototype.buffer=function(b,c,d){var e,f,g;return null==c&&(c=T),null==d&&(d=T),e={scheduled:null,end:void 0,values:[],flush:function(){var b;if(this.scheduled&&(a.scheduler.clearTimeout(this.scheduled),this.scheduled=null),this.values.length>0){if(b=this.push(S(this.values)),this.values=[],null!=this.end)return this.push(this.end);if(b!==a.noMore)return d(this)}else if(null!=this.end)return this.push(this.end)},schedule:function(){return this.scheduled?void 0:this.scheduled=b(function(a){return function(){return a.flush()}}(this))}},g=a.more,fb.isFunction(b)||(f=b,b=function(b){return a.scheduler.setTimeout(b,f)}),db(this,"buffer",this.withHandler(function(a){return e.push=function(a){return function(b){return a.push(b)}}(this),a.isError()?g=this.push(a):a.isEnd()?(e.end=a,e.scheduled||e.flush()):(e.values.push(a.value()),c(e)),g}))},a.Observable.prototype.filter=function(){var b,c;return c=arguments[0],b=2<=arguments.length?jb.call(arguments,1):[],z(this,c,b,function(b){return db(this,"filter",b,this.withHandler(function(c){return c.filter(b)?this.push(c):a.more}))})},a.EventStream.prototype.concat=function(a){var b;return b=this,new k(A(b,"concat",a),function(c){var d,e;return e=T,d=b.dispatcher.subscribe(function(b){return b.isEnd()?e=a.dispatcher.subscribe(c):c(b)}),function(){return d(),e()}})},a.Observable.prototype.flatMap=function(){return E(this,R(arguments))},a.Observable.prototype.flatMapFirst=function(){return E(this,R(arguments),!0)},E=function(b,c,e,f){var g,h,i;return i=[b],g=[],h=new k(A(b,"flatMap"+(e?"First":""),c),function(h){var i,j,k,l,n;return k=new d,l=[],n=function(b){var d;return d=Q(c(b.value())),g.push(d),k.add(function(b,c){return d.dispatcher.subscribe(function(e){var f;return e.isEnd()?(fb.remove(d,g),j(),i(c),a.noMore):(e instanceof m&&(e=e.toNext()),f=h(e),f===a.noMore&&b(),f)})})},j=function(){var a;return a=l.shift(),a?n(a):void 0},i=function(a){return a(),k.empty()?h(B()):void 0},k.add(function(c,d){return b.dispatcher.subscribe(function(b){return b.isEnd()?i(d):b.isError()?h(b):e&&k.count()>1?a.more:k.unsubscribed?a.noMore:f&&k.count()>f?l.push(b):n(b)})}),k.unsubscribe}),h.internalDeps=function(){return g.length?i.concat(g):i},h},R=function(a){return 1===a.length&&K(a[0])?fb.always(a[0]):O(a)},Q=function(b){return K(b)?b:a.once(b)},a.Observable.prototype.flatMapWithConcurrencyLimit=function(){var a,b;return b=arguments[0],a=2<=arguments.length?jb.call(arguments,1):[],db.apply(null,[this,"flatMapWithConcurrencyLimit",b].concat(jb.call(a),[E(this,R(a),!1,b)]))},a.Observable.prototype.flatMapConcat=function(){return db.apply(null,[this,"flatMapConcat"].concat(jb.call(arguments),[this.flatMapWithConcurrencyLimit.apply(this,[1].concat(jb.call(arguments)))]))},v=function(b,c){var d;return d=new k(A(b,"justInitValue"),function(c){var e,f;return f=void 0,e=b.dispatcher.subscribe(function(b){return b.isEnd()||(f=b),a.noMore}),u.whenDoneWith(d,function(){return null!=f&&c(f),c(B())}),e}),d.concat(c).toProperty()},a.Observable.prototype.mapEnd=function(){var b;return b=O(arguments),db(this,"mapEnd",b,this.withHandler(function(c){return c.isEnd()?(this.push(S(b(c))),this.push(B()),a.noMore):this.push(c)}))},a.Observable.prototype.skipErrors=function(){return db(this,"skipErrors",this.withHandler(function(b){return b.isError()?a.more:this.push(b)}))},a.EventStream.prototype.takeUntil=function(b){var c;return c={},db(this,"takeUntil",b,a.groupSimultaneous(this.mapEnd(c),b.skipErrors()).withHandler(function(d){var e,f,g,h,i,j;if(d.hasValue()){if(j=d.value(),e=j[0],b=j[1],b.length)return this.push(B());for(f=a.more,h=0,i=e.length;i>h;h++)g=e[h],f=this.push(g===c?B():S(g));return f}return this.push(d)}))},a.Property.prototype.takeUntil=function(a){var b;return b=this.changes().takeUntil(a),db(this,"takeUntil",a,v(this,b))},a.Observable.prototype.flatMapLatest=function(){var a,b;return a=R(arguments),b=this.toEventStream(),db(this,"flatMapLatest",a,b.flatMap(function(c){return Q(a(c)).takeUntil(b)}))},a.fromPoll=function(b,c){return db(a,"fromPoll",b,c,a.fromBinder(function(c){var d;return d=a.scheduler.setInterval(c,b),function(){return a.scheduler.clearInterval(d)}},c))},a.later=function(b,c){return db(a,"later",b,c,a.fromPoll(b,function(){return[c,B()]}))},a.sequentially=function(b,c){var d;return d=0,db(a,"sequentially",b,c,a.fromPoll(b,function(){var a;return a=c[d++],d<c.length?a:d===c.length?[a,B()]:B()}))},a.repeatedly=function(b,c){var d;return d=0,db(a,"repeatedly",b,c,a.fromPoll(b,function(){return c[d++%c.length]}))},a.interval=function(b,c){return null==c&&(c={}),db(a,"interval",b,c,a.fromPoll(b,function(){return S(c)}))},a.EventStream.prototype.delay=function(b){return db(this,"delay",b,this.flatMap(function(c){return a.later(b,c)}))},a.Property.prototype.delay=function(a){return this.delayChanges("delay",a,function(b){return b.delay(a)})},a.Property.prototype.delayChanges=function(){var a,b,c;return a=2<=arguments.length?jb.call(arguments,0,c=arguments.length-1):(c=0,[]),b=arguments[c++],db.apply(null,[this].concat(jb.call(a),[v(this,b(this.changes()))]))},a.Observable.prototype.bufferingThrottle=function(b){return db(this,"bufferingThrottle",b,this.flatMapConcat(function(c){return a.once(c).concat(a.later(b).filter(!1))}))},a.Property.prototype.bufferingThrottle=function(){return a.Observable.prototype.bufferingThrottle.apply(this,arguments).toProperty()},c=function(b){function c(){this.guardedSink=kb(this.guardedSink,this),this.subscribeAll=kb(this.subscribeAll,this),this.unsubAll=kb(this.unsubAll,this),this.sink=void 0,this.subscriptions=[],this.ended=!1,c.__super__.constructor.call(this,A(a,"Bus"),this.subscribeAll)}return ib(c,b),c.prototype.unsubAll=function(){var a,b,c,d;for(d=this.subscriptions,b=0,c=d.length;c>b;b++)a=d[b],"function"==typeof a.unsub&&a.unsub();return void 0},c.prototype.subscribeAll=function(a){var b,c,d,e;for(this.sink=a,e=w(this.subscriptions),c=0,d=e.length;d>c;c++)b=e[c],this.subscribeInput(b);return this.unsubAll},c.prototype.guardedSink=function(b){return function(c){return function(d){return d.isEnd()?(c.unsubscribeInput(b),a.noMore):c.sink(d)}}(this)},c.prototype.subscribeInput=function(a){return a.unsub=a.input.dispatcher.subscribe(this.guardedSink(a.input))},c.prototype.unsubscribeInput=function(a){var b,c,d,e,f;for(f=this.subscriptions,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c.input===a)return"function"==typeof c.unsub&&c.unsub(),void this.subscriptions.splice(b,1)},c.prototype.plug=function(a){var b;if(!this.ended)return b={input:a},this.subscriptions.push(b),null!=this.sink&&this.subscribeInput(b),function(b){return function(){return b.unsubscribeInput(a)}}(this)},c.prototype.end=function(){return this.ended=!0,this.unsubAll(),"function"==typeof this.sink?this.sink(B()):void 0},c.prototype.push=function(a){return"function"==typeof this.sink?this.sink(S(a)):void 0},c.prototype.error=function(a){return"function"==typeof this.sink?this.sink(new i(a)):void 0},c}(k),a.Bus=c,M=function(b,c){return eb(function(){var d,e,f;return e=arguments[0],d=2<=arguments.length?jb.call(arguments,1):[],f=U(c,[function(a,b){return e.apply(null,jb.call(a).concat([b]))}]),db.apply(null,[a,b,e].concat(jb.call(d),[a.combineAsArray(d).flatMap(f)]))
})},a.fromCallback=M("fromCallback",function(){var b,c;return c=arguments[0],b=2<=arguments.length?jb.call(arguments,1):[],a.fromBinder(function(a){return N(c,b)(a),T},function(a){return[a,B()]})}),a.fromNodeCallback=M("fromNodeCallback",function(){var b,c;return c=arguments[0],b=2<=arguments.length?jb.call(arguments,1):[],a.fromBinder(function(a){return N(c,b)(a),T},function(a,b){return a?[new i(a),B()]:[b,B()]})}),a.EventStream.prototype.debounce=function(b){return db(this,"debounce",b,this.flatMapLatest(function(c){return a.later(b,c)}))},a.Property.prototype.debounce=function(a){return this.delayChanges("debounce",a,function(b){return b.debounce(a)})},a.EventStream.prototype.debounceImmediate=function(b){return db(this,"debounceImmediate",b,this.flatMapFirst(function(c){return a.once(c).concat(a.later(b).filter(!1))}))},a.Observable.prototype.scan=function(b,c){var d,e,f;return c=Y(c),d=ab(b),f=function(b){return function(f){var g,h,i,j;return g=!1,j=T,h=a.more,i=function(){return g?void 0:d.forEach(function(b){return g=!0,h=f(new m(function(){return b})),h===a.noMore?(j(),j=T):void 0})},j=b.dispatcher.subscribe(function(b){var e,j;return b.hasValue()?g&&b.isInitial()?a.more:(b.isInitial()||i(),g=!0,j=d.getOrElse(void 0),e=c(j,b.value()),d=new s(e),f(b.apply(function(){return e}))):(b.isEnd()&&(h=i()),h!==a.noMore?f(b):void 0)}),u.whenDoneWith(e,i),j}}(this),e=new q(A(this,"scan",b,c),f)},a.Observable.prototype.diff=function(a,b){return b=Y(b),db(this,"diff",a,b,this.scan([a],function(a,c){return[c,b(a[0],c)]}).filter(function(a){return 2===a.length}).map(function(a){return a[1]}))},a.Observable.prototype.doAction=function(){var a;return a=O(arguments),db(this,"doAction",a,this.withHandler(function(b){return b.hasValue()&&a(b.value()),this.push(b)}))},a.Observable.prototype.endOnError=function(){var a,b;return b=arguments[0],a=2<=arguments.length?jb.call(arguments,1):[],null==b&&(b=!0),z(this,b,a,function(a){return db(this,"endOnError",this.withHandler(function(b){return b.isError()&&a(b.error)?(this.push(b),this.push(B())):this.push(b)}))})},p.prototype.errors=function(){return db(this,"errors",this.filter(function(){return!1}))},cb=function(a){return[a,B()]},a.fromPromise=function(b,c){return db(a,"fromPromise",b,a.fromBinder(function(a){return b.then(a,function(b){return a(new i(b))}),function(){return c&&"function"==typeof b.abort?b.abort():void 0}},cb))},a.Observable.prototype.mapError=function(){var a;return a=O(arguments),db(this,"mapError",a,this.withHandler(function(b){return this.push(b.isError()?S(a(b.error)):b)}))},a.Observable.prototype.flatMapError=function(b){return db(this,"flatMapError",b,this.mapError(function(a){return new i(a)}).flatMap(function(c){return c instanceof i?b(c.error):a.once(c)}))},a.EventStream.prototype.sampledBy=function(a,b){return db(this,"sampledBy",a,b,this.toProperty().sampledBy(a,b))},a.Property.prototype.sampledBy=function(b,c){var d,e,f,g,h;return null!=c?c=Y(c):(d=!0,c=function(a){return a.value()}),h=new t(this,!1,d),f=new t(b,!0,d),g=a.when([h,f],c),e=b instanceof q?g.toProperty():g,db(this,"sampledBy",b,c,e)},a.Property.prototype.sample=function(b){return db(this,"sample",b,this.sampledBy(a.interval(b,{})))},a.Observable.prototype.map=function(){var a,b;return b=arguments[0],a=2<=arguments.length?jb.call(arguments,1):[],b instanceof q?b.sampledBy(this,F):z(this,b,a,function(a){return db(this,"map",a,this.withHandler(function(b){return this.push(b.fmap(a))}))})},a.Observable.prototype.fold=function(a,b){return db(this,"fold",a,b,this.scan(a,b).sampledBy(this.filter(!1).mapEnd().toProperty()))},p.prototype.reduce=p.prototype.fold,a.EventStream.prototype.merge=function(b){var c;return c=this,db(c,"merge",b,a.mergeAll(this,b))},a.mergeAll=function(){var b;return b=1<=arguments.length?jb.call(arguments,0):[],I(b[0])&&(b=b[0]),b.length?new k(A.apply(null,[a,"mergeAll"].concat(jb.call(b))),function(c){var d,e,f;return d=0,f=function(e){return function(f){return e.dispatcher.subscribe(function(e){var g;return e.isEnd()?(d++,d===b.length?c(B()):a.more):(g=c(e),g===a.noMore&&f(),g)})}},e=fb.map(f,b),new a.CompositeUnsubscribe(e).unsubscribe}):a.never()},a.Observable.prototype.take=function(b){return 0>=b?a.never():db(this,"take",b,this.withHandler(function(c){return c.hasValue()?(b--,b>0?this.push(c):(0===b&&this.push(c),this.push(B()),a.noMore)):this.push(c)}))},a.EventStream.prototype.holdWhen=function(b){var c,d,e;return e=b.startWith(!1),d=e.filter(function(a){return!a}),c=e.filter(fb.id),db(this,"holdWhen",b,this.filter(!1).merge(e.flatMapConcat(function(b){return function(e){return e?b.scan([],function(a,b){return a.concat([b])}).sampledBy(d).take(1).flatMap(a.fromArray):b.takeUntil(c)}}(this))))},a.$={},a.$.asEventStream=function(b,c,d){var e;return fb.isFunction(c)&&(e=[c,void 0],d=e[0],c=e[1]),db(this.selector||this,"asEventStream",b,a.fromBinder(function(a){return function(d){return a.on(b,c,d),function(){return a.off(b,c,d)}}}(this),d))},null!=(gb="undefined"!=typeof jQuery&&null!==jQuery?jQuery:"undefined"!=typeof Zepto&&null!==Zepto?Zepto:void 0)&&(gb.fn.asEventStream=a.$.asEventStream),a.Observable.prototype.log=function(){var a;return a=1<=arguments.length?jb.call(arguments,0):[],this.subscribe(function(b){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log.apply(console,jb.call(a).concat([b.log()])):void 0}),this},a.retry=function(b){var c,d,e,f,g,h;if(!fb.isFunction(b.source))throw new l("'source' option has to be a function");return h=b.source,f=b.retries||0,e=b.maxRetries||f,c=b.delay||function(){return 0},d=b.isRetryable||function(){return!0},g=function(b){var g,i;return i={source:h,retries:f-1,maxRetries:e,delay:c,isRetryable:d},g=function(){return a.retry(i)},a.later(c(b)).filter(!1).concat(a.once().flatMap(g))},db(a,"retry",b,h().flatMapError(function(b){return d(b)&&f>0?g({error:b,retriesDone:e-f}):a.once(new i(b))}))},a.Observable.prototype.skip=function(b){return db(this,"skip",b,this.withHandler(function(c){return c.hasValue()&&b>0?(b--,a.more):this.push(c)}))},a.EventStream.prototype.skipUntil=function(a){var b;return b=a.take(1).map(!0).toProperty(!1),db(this,"skipUntil",a,this.filter(b))},a.EventStream.prototype.skipWhile=function(){var b,c,d;return c=arguments[0],b=2<=arguments.length?jb.call(arguments,1):[],d=!1,z(this,c,b,function(b){return db(this,"skipWhile",b,this.withHandler(function(c){return!d&&c.hasValue()&&b(c.value())?a.more:(c.hasValue()&&(d=!0),this.push(c))}))})},a.Observable.prototype.slidingWindow=function(a,b){return null==b&&(b=0),db(this,"slidingWindow",a,b,this.scan([],function(b,c){return b.concat([c]).slice(-a)}).filter(function(a){return a.length>=b}))},a.spy=function(a){return X.push(a)},X=[],W=function(a){var b,c,d;if(X.length&&!W.running)try{for(W.running=!0,c=0,d=X.length;d>c;c++)(b=X[c])(a)}finally{delete W.running}return void 0},a.Property.prototype.startWith=function(a){return db(this,"startWith",a,this.scan(a,function(a,b){return b}))},a.EventStream.prototype.startWith=function(b){return db(this,"startWith",b,a.once(b).concat(this))},a.Observable.prototype.takeWhile=function(){var b,c;return c=arguments[0],b=2<=arguments.length?jb.call(arguments,1):[],z(this,c,b,function(b){return db(this,"takeWhile",b,this.withHandler(function(c){return c.filter(b)?this.push(c):(this.push(B()),a.noMore)}))})},a.EventStream.prototype.throttle=function(a){return db(this,"throttle",a,this.bufferWithTime(a).map(function(a){return a[a.length-1]}))},a.Property.prototype.throttle=function(a){return this.delayChanges("throttle",a,function(b){return b.throttle(a)})},a.update=function(){var b,c,d,e;for(c=arguments[0],e=2<=arguments.length?jb.call(arguments,1):[],d=function(a){return function(){var b;return b=1<=arguments.length?jb.call(arguments,0):[],function(c){return a.apply(null,[c].concat(b))}}},b=e.length-1;b>0;)e[b]instanceof Function||(e[b]=function(a){return function(){return a}}(e[b])),e[b]=d(e[b]),b-=2;return db.apply(null,[a,"update",c].concat(jb.call(e),[a.when.apply(a,e).scan(c,function(a,b){return b(a)})]))},a.zipAsArray=function(){var b;return b=1<=arguments.length?jb.call(arguments,0):[],I(b[0])&&(b=b[0]),db.apply(null,[a,"zipAsArray"].concat(jb.call(b),[a.zipWith(b,function(){var a;return a=1<=arguments.length?jb.call(arguments,0):[]})]))},a.zipWith=function(){var b,c,d;return b=arguments[0],c=2<=arguments.length?jb.call(arguments,1):[],fb.isFunction(b)||(d=[b,c[0]],c=d[0],b=d[1]),c=fb.map(function(a){return a.toEventStream()},c),db.apply(null,[a,"zipWith",b].concat(jb.call(c),[a.when(c,b)]))},a.Observable.prototype.zip=function(b,c){return null==c&&(c=Array),db(this,"zip",b,a.zipWith([this,b],c))},"undefined"!=typeof define&&null!==define&&null!=define.amd?(define([],function(){return a}),this.Bacon=a):"undefined"!=typeof module&&null!==module&&null!=module.exports?(module.exports=a,a.Bacon=a):this.Bacon=a}).call(this);
{
"name": "baconjs",
"description": "A small functional reactive programming lib for JavaScript.",
"version": "0.7.44",
"version": "0.7.45",
"keywords": [

@@ -6,0 +6,0 @@ "bacon.js",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc