rxjs-rails 2.3.10 → 2.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +120 -70
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +3 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +1810 -1849
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +5 -3
  7. data/vendor/assets/javascripts/rx.all.js +1776 -1815
  8. data/vendor/assets/javascripts/rx.all.min.js +5 -3
  9. data/vendor/assets/javascripts/rx.async.compat.js +45 -45
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +3 -1
  11. data/vendor/assets/javascripts/rx.async.js +39 -39
  12. data/vendor/assets/javascripts/rx.async.min.js +3 -1
  13. data/vendor/assets/javascripts/rx.backpressure.js +21 -19
  14. data/vendor/assets/javascripts/rx.backpressure.min.js +3 -1
  15. data/vendor/assets/javascripts/rx.binding.js +90 -90
  16. data/vendor/assets/javascripts/rx.binding.min.js +3 -1
  17. data/vendor/assets/javascripts/rx.coincidence.js +184 -179
  18. data/vendor/assets/javascripts/rx.coincidence.min.js +3 -1
  19. data/vendor/assets/javascripts/rx.compat.js +1019 -1001
  20. data/vendor/assets/javascripts/rx.compat.min.js +4 -2
  21. data/vendor/assets/javascripts/rx.experimental.js +65 -64
  22. data/vendor/assets/javascripts/rx.experimental.min.js +3 -1
  23. data/vendor/assets/javascripts/rx.joinpatterns.js +265 -363
  24. data/vendor/assets/javascripts/rx.joinpatterns.min.js +3 -1
  25. data/vendor/assets/javascripts/rx.js +969 -951
  26. data/vendor/assets/javascripts/rx.lite.compat.js +1014 -1182
  27. data/vendor/assets/javascripts/rx.lite.compat.min.js +4 -2
  28. data/vendor/assets/javascripts/rx.lite.extras.js +101 -109
  29. data/vendor/assets/javascripts/rx.lite.extras.min.js +3 -1
  30. data/vendor/assets/javascripts/rx.lite.js +1008 -1176
  31. data/vendor/assets/javascripts/rx.lite.min.js +4 -2
  32. data/vendor/assets/javascripts/rx.min.js +4 -2
  33. data/vendor/assets/javascripts/rx.testing.js +196 -196
  34. data/vendor/assets/javascripts/rx.testing.min.js +3 -1
  35. data/vendor/assets/javascripts/rx.time.js +162 -178
  36. data/vendor/assets/javascripts/rx.time.min.js +3 -1
  37. data/vendor/assets/javascripts/rx.virtualtime.js +30 -30
  38. data/vendor/assets/javascripts/rx.virtualtime.min.js +3 -1
  39. metadata +2 -6
  40. data/vendor/assets/javascripts/rx.core.compat.js +0 -2548
  41. data/vendor/assets/javascripts/rx.core.compat.min.js +0 -1
  42. data/vendor/assets/javascripts/rx.core.js +0 -2430
  43. data/vendor/assets/javascripts/rx.core.min.js +0 -1
@@ -1,4 +1,4 @@
1
- // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
2
 
3
3
  ;(function (factory) {
4
4
  var objectTypes = {
@@ -15,16 +15,15 @@
15
15
  freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
16
16
  moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
17
17
  freeGlobal = objectTypes[typeof global] && global;
18
-
18
+
19
19
  if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
20
20
  root = freeGlobal;
21
21
  }
22
22
 
23
23
  // Because of build optimizers
24
24
  if (typeof define === 'function' && define.amd) {
25
- define(['rx', 'exports'], function (Rx, exports) {
26
- root.Rx = factory(root, exports, Rx);
27
- return root.Rx;
25
+ define(['rx'], function (Rx, exports) {
26
+ return factory(root, exports, Rx);
28
27
  });
29
28
  } else if (typeof module === 'object' && module && module.exports === freeExports) {
30
29
  module.exports = factory(root, module.exports, require('./rx'));
@@ -32,7 +31,7 @@
32
31
  root.Rx = factory(root, {}, root.Rx);
33
32
  }
34
33
  }.call(this, function (root, exp, Rx, undefined) {
35
-
34
+
36
35
  // References
37
36
  var Observable = Rx.Observable,
38
37
  observableProto = Observable.prototype,
@@ -43,7 +42,7 @@
43
42
  disposableEmpty = Rx.Disposable.empty,
44
43
  disposableCreate = Rx.Disposable.create,
45
44
  inherits = Rx.internals.inherits,
46
- addProperties = Rx.internals.addProperties,
45
+ addProperties = Rx.internals.addProperties,
47
46
  timeoutScheduler = Rx.Scheduler.timeout,
48
47
  identity = Rx.helpers.identity;
49
48
 
@@ -107,6 +106,7 @@
107
106
  observableProto.pausable = function (pauser) {
108
107
  return new PausableObservable(this, pauser);
109
108
  };
109
+
110
110
  function combineLatestSource(source, subject, resultSelector) {
111
111
  return new AnonymousObservable(function (observer) {
112
112
  var n = 2,
@@ -157,13 +157,13 @@
157
157
 
158
158
  function subscribe(observer) {
159
159
  var q = [], previousShouldFire;
160
-
161
- var subscription =
160
+
161
+ var subscription =
162
162
  combineLatestSource(
163
163
  this.source,
164
164
  this.pauser.distinctUntilChanged().startWith(false),
165
165
  function (data, shouldFire) {
166
- return { data: data, shouldFire: shouldFire };
166
+ return { data: data, shouldFire: shouldFire };
167
167
  })
168
168
  .subscribe(
169
169
  function (results) {
@@ -197,10 +197,10 @@
197
197
  while (q.length > 0) {
198
198
  observer.onNext(q.shift());
199
199
  }
200
- observer.onCompleted();
200
+ observer.onCompleted();
201
201
  }
202
202
  );
203
- return subscription;
203
+ return subscription;
204
204
  }
205
205
 
206
206
  function PausableBufferedObservable(source, pauser) {
@@ -224,7 +224,7 @@
224
224
  this.controller.onNext(true);
225
225
  };
226
226
 
227
- return PausableBufferedObservable;
227
+ return PausableBufferedObservable;
228
228
 
229
229
  }(Observable));
230
230
 
@@ -236,7 +236,7 @@
236
236
  * var source = Rx.Observable.interval(100).pausableBuffered(pauser);
237
237
  * @param {Observable} pauser The observable sequence used to pause the underlying sequence.
238
238
  * @returns {Observable} The observable sequence which is paused based upon the pauser.
239
- */
239
+ */
240
240
  observableProto.pausableBuffered = function (subject) {
241
241
  return new PausableBufferedObservable(this, subject);
242
242
  };
@@ -248,11 +248,12 @@
248
248
  * source.request(3); // Reads 3 values
249
249
  * @param {Observable} pauser The observable sequence used to pause the underlying sequence.
250
250
  * @returns {Observable} The observable sequence which is paused based upon the pauser.
251
- */
251
+ */
252
252
  observableProto.controlled = function (enableQueue) {
253
253
  if (enableQueue == null) { enableQueue = true; }
254
254
  return new ControlledObservable(this, enableQueue);
255
255
  };
256
+
256
257
  var ControlledObservable = (function (_super) {
257
258
 
258
259
  inherits(ControlledObservable, _super);
@@ -317,7 +318,7 @@
317
318
 
318
319
  if (!this.enableQueue || this.queue.length === 0) {
319
320
  this.subject.onError(error);
320
- }
321
+ }
321
322
  },
322
323
  onNext: function (value) {
323
324
  checkDisposed.call(this);
@@ -364,7 +365,7 @@
364
365
  } else if (this.hasCompleted) {
365
366
  this.subject.onCompleted();
366
367
  this.controlledDisposable.dispose();
367
- this.controlledDisposable = disposableEmpty;
368
+ this.controlledDisposable = disposableEmpty;
368
369
  }
369
370
 
370
371
  return { numberOfItems: numberOfItems, returnValue: false };
@@ -402,5 +403,6 @@
402
403
 
403
404
  return ControlledSubject;
404
405
  }(Observable));
405
- return Rx;
406
- }));
406
+
407
+ return Rx;
408
+ }));
@@ -1 +1,3 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){if(this.isDisposed)throw new Error(r)}function f(a,b,c){return new i(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(q))){try{e=c.apply(null,k)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,k=new Array(f);return new j(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=c.CompositeDisposable,k=c.Subject,l=c.Observer,m=c.Disposable.empty,n=c.Disposable.create,o=c.internals.inherits,p=c.internals.addProperties,q=(c.Scheduler.timeout,c.helpers.identity),r="Object has been disposed",s=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=m,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=m)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausable=function(a){return new s(this,a)};var t=function(a){function b(a){var b,c=[],e=f(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return e}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausableBuffered=function(a){return new t(this,a)},h.controlled=function(a){return null==a&&(a=!0),new u(this,a)};var u=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new v(d),this.source=c.multicast(this.subject).refCount()}return o(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(g),v=c.ControlledSubject=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new k,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=m,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=m}return o(c,a),p(c.prototype,l,{onCompleted:function(){e.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){e.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){e.call(this);var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=m):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=m),{numberOfItems:a,returnValue:!1}},request:function(a){e.call(this),this.disposeCurrentRequest();var b=this,c=this._processRequest(a);return a=c.numberOfItems,c.returnValue?m:(this.requestedCount=a,this.requestedDisposable=n(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=m},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),c}(g);return c});
1
+ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){if(this.isDisposed)throw new Error(r)}function f(a,b,c){return new i(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(q))){try{e=c.apply(null,k)}catch(f){return void d.onError(f)}d.onNext(e)}else i&&d.onCompleted()}var f=2,g=[!1,!1],h=!1,i=!1,k=new Array(f);return new j(a.subscribe(function(a){e(a,0)},d.onError.bind(d),function(){i=!0,d.onCompleted()}),b.subscribe(function(a){e(a,1)},d.onError.bind(d)))})}var g=c.Observable,h=g.prototype,i=c.AnonymousObservable,j=c.CompositeDisposable,k=c.Subject,l=c.Observer,m=c.Disposable.empty,n=c.Disposable.create,o=c.internals.inherits,p=c.internals.addProperties,q=(c.Scheduler.timeout,c.helpers.identity),r="Object has been disposed",s=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=m,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=m)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausable=function(a){return new s(this,a)};var t=function(a){function b(a){var b,c=[],e=f(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return e}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(g);h.pausableBuffered=function(a){return new t(this,a)},h.controlled=function(a){return null==a&&(a=!0),new u(this,a)};var u=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b),this.subject=new v(d),this.source=c.multicast(this.subject).refCount()}return o(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(g),v=c.ControlledSubject=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new k,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=m,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=m}return o(c,a),p(c.prototype,l,{onCompleted:function(){e.call(this),this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length||this.subject.onCompleted()},onError:function(a){e.call(this),this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length||this.subject.onError(a)},onNext:function(a){e.call(this);var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=m):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=m),{numberOfItems:a,returnValue:!1}},request:function(a){e.call(this),this.disposeCurrentRequest();var b=this,c=this._processRequest(a);return a=c.numberOfItems,c.returnValue?m:(this.requestedCount=a,this.requestedDisposable=n(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=m},dispose:function(){this.isDisposed=!0,this.error=null,this.subject.dispose(),this.requestedDisposable.dispose()}}),c}(g);return c});
3
+ //# sourceMappingURL=rx.backpressure.map
@@ -1,4 +1,4 @@
1
- // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
2
 
3
3
  ;(function (factory) {
4
4
  var objectTypes = {
@@ -15,16 +15,15 @@
15
15
  freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
16
16
  moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
17
17
  freeGlobal = objectTypes[typeof global] && global;
18
-
18
+
19
19
  if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
20
20
  root = freeGlobal;
21
21
  }
22
22
 
23
23
  // Because of build optimizers
24
24
  if (typeof define === 'function' && define.amd) {
25
- define(['rx', 'exports'], function (Rx, exports) {
26
- root.Rx = factory(root, exports, Rx);
27
- return root.Rx;
25
+ define(['rx'], function (Rx, exports) {
26
+ return factory(root, exports, Rx);
28
27
  });
29
28
  } else if (typeof module === 'object' && module && module.exports === freeExports) {
30
29
  module.exports = factory(root, module.exports, require('./rx'));
@@ -32,7 +31,7 @@
32
31
  root.Rx = factory(root, {}, root.Rx);
33
32
  }
34
33
  }.call(this, function (root, exp, Rx, undefined) {
35
-
34
+
36
35
  var Observable = Rx.Observable,
37
36
  observableProto = Observable.prototype,
38
37
  AnonymousObservable = Rx.AnonymousObservable,
@@ -58,16 +57,16 @@
58
57
  * Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each
59
58
  * subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's
60
59
  * invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay.
61
- *
60
+ *
62
61
  * @example
63
62
  * 1 - res = source.multicast(observable);
64
63
  * 2 - res = source.multicast(function () { return new Subject(); }, function (x) { return x; });
65
- *
66
- * @param {Function|Subject} subjectOrSubjectSelector
64
+ *
65
+ * @param {Function|Subject} subjectOrSubjectSelector
67
66
  * Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function.
68
67
  * Or:
69
68
  * Subject to push source elements into.
70
- *
69
+ *
71
70
  * @param {Function} [selector] Optional selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. Specified only if <paramref name="subjectOrSubjectSelector" is a factory function.
72
71
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
73
72
  */
@@ -84,11 +83,11 @@
84
83
  /**
85
84
  * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence.
86
85
  * This operator is a specialization of Multicast using a regular Subject.
87
- *
86
+ *
88
87
  * @example
89
88
  * var resres = source.publish();
90
89
  * var res = source.publish(function (x) { return x; });
91
- *
90
+ *
92
91
  * @param {Function} [selector] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription on.
93
92
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
94
93
  */
@@ -101,10 +100,10 @@
101
100
  /**
102
101
  * Returns an observable sequence that shares a single subscription to the underlying sequence.
103
102
  * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
104
- *
103
+ *
105
104
  * @example
106
105
  * var res = source.share();
107
- *
106
+ *
108
107
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
109
108
  */
110
109
  observableProto.share = function () {
@@ -114,11 +113,11 @@
114
113
  /**
115
114
  * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification.
116
115
  * This operator is a specialization of Multicast using a AsyncSubject.
117
- *
116
+ *
118
117
  * @example
119
118
  * var res = source.publishLast();
120
119
  * var res = source.publishLast(function (x) { return x; });
121
- *
120
+ *
122
121
  * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will only receive the last notification of the source.
123
122
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
124
123
  */
@@ -131,11 +130,11 @@
131
130
  /**
132
131
  * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue.
133
132
  * This operator is a specialization of Multicast using a BehaviorSubject.
134
- *
133
+ *
135
134
  * @example
136
135
  * var res = source.publishValue(42);
137
136
  * var res = source.publishValue(function (x) { return x.select(function (y) { return y * y; }) }, 42);
138
- *
137
+ *
139
138
  * @param {Function} [selector] Optional selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive immediately receive the initial value, followed by all notifications of the source from the time of the subscription on.
140
139
  * @param {Mixed} initialValue Initial value received by observers upon subscription.
141
140
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
@@ -151,10 +150,10 @@
151
150
  /**
152
151
  * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue.
153
152
  * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
154
- *
153
+ *
155
154
  * @example
156
155
  * var res = source.shareValue(42);
157
- *
156
+ *
158
157
  * @param {Mixed} initialValue Initial value received by observers upon subscription.
159
158
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
160
159
  */
@@ -165,13 +164,13 @@
165
164
  /**
166
165
  * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
167
166
  * This operator is a specialization of Multicast using a ReplaySubject.
168
- *
167
+ *
169
168
  * @example
170
169
  * var res = source.replay(null, 3);
171
170
  * var res = source.replay(null, 3, 500);
172
171
  * var res = source.replay(null, 3, 500, scheduler);
173
172
  * var res = source.replay(function (x) { return x.take(6).repeat(); }, 3, 500, scheduler);
174
- *
173
+ *
175
174
  * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all the notifications of the source subject to the specified replay buffer trimming policy.
176
175
  * @param bufferSize [Optional] Maximum element count of the replay buffer.
177
176
  * @param window [Optional] Maximum time length of the replay buffer.
@@ -187,12 +186,12 @@
187
186
  /**
188
187
  * Returns an observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer.
189
188
  * This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
190
- *
189
+ *
191
190
  * @example
192
191
  * var res = source.shareReplay(3);
193
192
  * var res = source.shareReplay(3, 500);
194
193
  * var res = source.shareReplay(3, 500, scheduler);
195
- *
194
+ *
196
195
 
197
196
  * @param bufferSize [Optional] Maximum element count of the replay buffer.
198
197
  * @param window [Optional] Maximum time length of the replay buffer.
@@ -203,23 +202,23 @@
203
202
  return this.replay(null, bufferSize, window, scheduler).refCount();
204
203
  };
205
204
 
206
- /** @private */
207
- var InnerSubscription = function (subject, observer) {
208
- this.subject = subject;
209
- this.observer = observer;
210
- };
211
-
212
- /**
213
- * @private
214
- * @memberOf InnerSubscription
215
- */
216
- InnerSubscription.prototype.dispose = function () {
217
- if (!this.subject.isDisposed && this.observer !== null) {
218
- var idx = this.subject.observers.indexOf(this.observer);
219
- this.subject.observers.splice(idx, 1);
220
- this.observer = null;
221
- }
222
- };
205
+ /** @private */
206
+ var InnerSubscription = function (subject, observer) {
207
+ this.subject = subject;
208
+ this.observer = observer;
209
+ };
210
+
211
+ /**
212
+ * @private
213
+ * @memberOf InnerSubscription
214
+ */
215
+ InnerSubscription.prototype.dispose = function () {
216
+ if (!this.subject.isDisposed && this.observer !== null) {
217
+ var idx = this.subject.observers.indexOf(this.observer);
218
+ this.subject.observers.splice(idx, 1);
219
+ this.observer = null;
220
+ }
221
+ };
223
222
 
224
223
  /**
225
224
  * Represents a value that changes over time.
@@ -248,7 +247,7 @@
248
247
  * @constructor
249
248
  * Initializes a new instance of the BehaviorSubject class which creates a subject that caches its last value and starts with the specified value.
250
249
  * @param {Mixed} value Initial value sent to observers when no other value has been received by the subject yet.
251
- */
250
+ */
252
251
  function BehaviorSubject(value) {
253
252
  __super__.call(this, subscribe);
254
253
  this.value = value,
@@ -262,13 +261,13 @@
262
261
  /**
263
262
  * Indicates whether the subject has observers subscribed to it.
264
263
  * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
265
- */
264
+ */
266
265
  hasObservers: function () {
267
266
  return this.observers.length > 0;
268
267
  },
269
268
  /**
270
269
  * Notifies all subscribed observers about the end of the sequence.
271
- */
270
+ */
272
271
  onCompleted: function () {
273
272
  checkDisposed.call(this);
274
273
  if (this.isStopped) { return; }
@@ -282,7 +281,7 @@
282
281
  /**
283
282
  * Notifies all subscribed observers about the exception.
284
283
  * @param {Mixed} error The exception to send to all observers.
285
- */
284
+ */
286
285
  onError: function (error) {
287
286
  checkDisposed.call(this);
288
287
  if (this.isStopped) { return; }
@@ -298,7 +297,7 @@
298
297
  /**
299
298
  * Notifies all subscribed observers about the arrival of the specified element in the sequence.
300
299
  * @param {Mixed} value The value to send to all observers.
301
- */
300
+ */
302
301
  onNext: function (value) {
303
302
  checkDisposed.call(this);
304
303
  if (this.isStopped) { return; }
@@ -309,7 +308,7 @@
309
308
  },
310
309
  /**
311
310
  * Unsubscribe all observers and release resources.
312
- */
311
+ */
313
312
  dispose: function () {
314
313
  this.isDisposed = true;
315
314
  this.observers = null;
@@ -324,7 +323,7 @@
324
323
  /**
325
324
  * Represents an object that is both an observable sequence as well as an observer.
326
325
  * Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies.
327
- */
326
+ */
328
327
  var ReplaySubject = Rx.ReplaySubject = (function (__super__) {
329
328
 
330
329
  function createRemovableDisposable(subject, observer) {
@@ -384,7 +383,7 @@
384
383
  /**
385
384
  * Indicates whether the subject has observers subscribed to it.
386
385
  * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
387
- */
386
+ */
388
387
  hasObservers: function () {
389
388
  return this.observers.length > 0;
390
389
  },
@@ -399,7 +398,7 @@
399
398
  /**
400
399
  * Notifies all subscribed observers about the arrival of the specified element in the sequence.
401
400
  * @param {Mixed} value The value to send to all observers.
402
- */
401
+ */
403
402
  onNext: function (value) {
404
403
  checkDisposed.call(this);
405
404
  if (this.isStopped) { return; }
@@ -417,7 +416,7 @@
417
416
  /**
418
417
  * Notifies all subscribed observers about the exception.
419
418
  * @param {Mixed} error The exception to send to all observers.
420
- */
419
+ */
421
420
  onError: function (error) {
422
421
  checkDisposed.call(this);
423
422
  if (this.isStopped) { return; }
@@ -436,7 +435,7 @@
436
435
  },
437
436
  /**
438
437
  * Notifies all subscribed observers about the end of the sequence.
439
- */
438
+ */
440
439
  onCompleted: function () {
441
440
  checkDisposed.call(this);
442
441
  if (this.isStopped) { return; }
@@ -453,7 +452,7 @@
453
452
  },
454
453
  /**
455
454
  * Unsubscribe all observers and release resources.
456
- */
455
+ */
457
456
  dispose: function () {
458
457
  this.isDisposed = true;
459
458
  this.observers = null;
@@ -463,41 +462,42 @@
463
462
  return ReplaySubject;
464
463
  }(Observable));
465
464
 
466
- var ConnectableObservable = Rx.ConnectableObservable = (function (__super__) {
467
- inherits(ConnectableObservable, __super__);
468
-
469
- function ConnectableObservable(source, subject) {
470
- var hasSubscription = false,
471
- subscription,
472
- sourceObservable = source.asObservable();
473
-
474
- this.connect = function () {
475
- if (!hasSubscription) {
476
- hasSubscription = true;
477
- subscription = new CompositeDisposable(sourceObservable.subscribe(subject), disposableCreate(function () {
478
- hasSubscription = false;
479
- }));
480
- }
481
- return subscription;
482
- };
483
-
484
- __super__.call(this, subject.subscribe.bind(subject));
485
- }
486
-
487
- ConnectableObservable.prototype.refCount = function () {
488
- var connectableSubscription, count = 0, source = this;
489
- return new AnonymousObservable(function (observer) {
490
- var shouldConnect = ++count === 1,
491
- subscription = source.subscribe(observer);
492
- shouldConnect && (connectableSubscription = source.connect());
493
- return function () {
494
- subscription.dispose();
495
- --count === 0 && connectableSubscription.dispose();
496
- };
497
- });
498
- };
499
-
500
- return ConnectableObservable;
465
+ var ConnectableObservable = Rx.ConnectableObservable = (function (__super__) {
466
+ inherits(ConnectableObservable, __super__);
467
+
468
+ function ConnectableObservable(source, subject) {
469
+ var hasSubscription = false,
470
+ subscription,
471
+ sourceObservable = source.asObservable();
472
+
473
+ this.connect = function () {
474
+ if (!hasSubscription) {
475
+ hasSubscription = true;
476
+ subscription = new CompositeDisposable(sourceObservable.subscribe(subject), disposableCreate(function () {
477
+ hasSubscription = false;
478
+ }));
479
+ }
480
+ return subscription;
481
+ };
482
+
483
+ __super__.call(this, subject.subscribe.bind(subject));
484
+ }
485
+
486
+ ConnectableObservable.prototype.refCount = function () {
487
+ var connectableSubscription, count = 0, source = this;
488
+ return new AnonymousObservable(function (observer) {
489
+ var shouldConnect = ++count === 1,
490
+ subscription = source.subscribe(observer);
491
+ shouldConnect && (connectableSubscription = source.connect());
492
+ return function () {
493
+ subscription.dispose();
494
+ --count === 0 && connectableSubscription.dispose();
495
+ };
496
+ });
497
+ };
498
+
499
+ return ConnectableObservable;
501
500
  }(Observable));
502
- return Rx;
503
- }));
501
+
502
+ return Rx;
503
+ }));
@@ -1 +1,3 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(s)}var e=c.Observable,f=e.prototype,g=c.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.helpers.isFunction,q=c.internals.inherits,r=c.internals.addProperties,s="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())}):new w(c,a)},f.publish=function(a){return a&&p(a)?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish().refCount()},f.publishLast=function(a){return a&&p(a)?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new u(b)},a):this.multicast(new u(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a&&p(a)?this.multicast(function(){return new v(b,c,d)},a):this.multicast(new v(b,c,d))},f.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var t=function(a,b){this.subject=a,this.observer=b};t.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var u=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new t(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return q(c,a),r(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=this.observers.slice(0),c=b.length;c>a;a++)b[a].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),v=c.ReplaySubject=function(a){function b(a,b){return l(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new k(this.scheduler,a),e=b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)c.onNext(this.q[g].value);return this.hasError?(f++,c.onError(this.error)):this.isStopped&&(f++,c.onCompleted()),c.ensureActive(f),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return q(e,a),r(e.prototype,j,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(d.call(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++){var f=b[c];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),w=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new n(f.subscribe(c),l(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return q(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new g(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(e);return c});
1
+ /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){function d(){if(this.isDisposed)throw new Error(s)}var e=c.Observable,f=e.prototype,g=c.AnonymousObservable,h=c.Subject,i=c.AsyncSubject,j=c.Observer,k=c.internals.ScheduledObserver,l=c.Disposable.create,m=c.Disposable.empty,n=c.CompositeDisposable,o=c.Scheduler.currentThread,p=c.helpers.isFunction,q=c.internals.inherits,r=c.internals.addProperties,s="Object has been disposed";f.multicast=function(a,b){var c=this;return"function"==typeof a?new g(function(d){var e=c.multicast(a());return new n(b(e).subscribe(d),e.connect())}):new w(c,a)},f.publish=function(a){return a&&p(a)?this.multicast(function(){return new h},a):this.multicast(new h)},f.share=function(){return this.publish().refCount()},f.publishLast=function(a){return a&&p(a)?this.multicast(function(){return new i},a):this.multicast(new i)},f.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new u(b)},a):this.multicast(new u(a))},f.shareValue=function(a){return this.publishValue(a).refCount()},f.replay=function(a,b,c,d){return a&&p(a)?this.multicast(function(){return new v(b,c,d)},a):this.multicast(new v(b,c,d))},f.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var t=function(a,b){this.subject=a,this.observer=b};t.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var u=c.BehaviorSubject=function(a){function b(a){if(d.call(this),!this.isStopped)return this.observers.push(a),a.onNext(this.value),new t(this,a);var b=this.exception;return b?a.onError(b):a.onCompleted(),m}function c(c){a.call(this,b),this.value=c,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.exception=null}return q(c,a),r(c.prototype,j,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=this.observers.slice(0),c=b.length;c>a;a++)b[a].onCompleted();this.observers=[]}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.exception=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onError(a);this.observers=[]}},onNext:function(a){if(d.call(this),!this.isStopped){this.value=a;for(var b=0,c=this.observers.slice(0),e=c.length;e>b;b++)c[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),c}(e),v=c.ReplaySubject=function(a){function b(a,b){return l(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function c(a){var c=new k(this.scheduler,a),e=b(this,c);d.call(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=this.q.length,g=0,h=this.q.length;h>g;g++)c.onNext(this.q[g].value);return this.hasError?(f++,c.onError(this.error)):this.isStopped&&(f++,c.onCompleted()),c.ensureActive(f),e}function e(b,d,e){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==d?Number.MAX_VALUE:d,this.scheduler=e||o,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,c)}return q(e,a),r(e.prototype,j,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(d.call(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onNext(a),g.ensureActive()}}},onError:function(a){if(d.call(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var c=this.observers.slice(0),e=0,f=c.length;f>e;e++){var g=c[e];g.onError(a),g.ensureActive()}this.observers=[]}},onCompleted:function(){if(d.call(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=this.observers.slice(0),c=0,e=b.length;e>c;c++){var f=b[c];f.onCompleted(),f.ensureActive()}this.observers=[]}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(e),w=c.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new n(f.subscribe(c),l(function(){e=!1}))),d},a.call(this,c.subscribe.bind(c))}return q(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new g(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(e);return c});
3
+ //# sourceMappingURL=rx.binding.map