rxjs-rails 2.2.27 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -3
  3. data/lib/rxjs/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +1545 -1441
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +3 -3
  7. data/vendor/assets/javascripts/rx.all.js +1545 -1441
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -3
  9. data/vendor/assets/javascripts/rx.async.compat.js +149 -152
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.async.js +140 -143
  12. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  14. data/vendor/assets/javascripts/rx.binding.js +18 -18
  15. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  16. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  17. data/vendor/assets/javascripts/rx.compat.js +490 -339
  18. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  19. data/vendor/assets/javascripts/rx.core.compat.js +109 -141
  20. data/vendor/assets/javascripts/rx.core.compat.min.js +1 -1
  21. data/vendor/assets/javascripts/rx.core.js +109 -141
  22. data/vendor/assets/javascripts/rx.core.min.js +1 -1
  23. data/vendor/assets/javascripts/rx.experimental.js +129 -136
  24. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  25. data/vendor/assets/javascripts/rx.joinpatterns.js +59 -59
  26. data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.js +490 -339
  28. data/vendor/assets/javascripts/rx.lite.compat.js +1099 -954
  29. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  30. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  31. data/vendor/assets/javascripts/rx.lite.js +1099 -954
  32. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  33. data/vendor/assets/javascripts/rx.min.js +2 -2
  34. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  35. data/vendor/assets/javascripts/rx.time.js +715 -747
  36. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  37. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  38. metadata +11 -10
@@ -33,164 +33,161 @@
33
33
  }
34
34
  }.call(this, function (root, exp, Rx, undefined) {
35
35
 
36
- // Aliases
37
- var Observable = Rx.Observable,
38
- observableProto = Observable.prototype,
39
- observableFromPromise = Observable.fromPromise,
40
- observableThrow = Observable.throwException,
41
- AnonymousObservable = Rx.AnonymousObservable,
42
- AsyncSubject = Rx.AsyncSubject,
43
- disposableCreate = Rx.Disposable.create,
44
- CompositeDisposable= Rx.CompositeDisposable,
45
- immediateScheduler = Rx.Scheduler.immediate,
46
- timeoutScheduler = Rx.Scheduler.timeout,
47
- slice = Array.prototype.slice;
48
-
49
- /**
50
- * Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
51
- *
52
- * @example
53
- * var res = Rx.Observable.start(function () { console.log('hello'); });
54
- * var res = Rx.Observable.start(function () { console.log('hello'); }, Rx.Scheduler.timeout);
55
- * var res = Rx.Observable.start(function () { this.log('hello'); }, Rx.Scheduler.timeout, console);
56
- *
57
- * @param {Function} func Function to run asynchronously.
58
- * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
59
- * @param [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
60
- * @returns {Observable} An observable sequence exposing the function's result value, or an exception.
61
- *
62
- * Remarks
63
- * * The function is called immediately, not during the subscription of the resulting sequence.
64
- * * Multiple subscriptions to the resulting sequence can observe the function's result.
65
- */
66
- Observable.start = function (func, scheduler, context) {
67
- return observableToAsync(func, scheduler, context)();
68
- };
36
+ // Aliases
37
+ var Observable = Rx.Observable,
38
+ observableProto = Observable.prototype,
39
+ observableFromPromise = Observable.fromPromise,
40
+ observableThrow = Observable.throwException,
41
+ AnonymousObservable = Rx.AnonymousObservable,
42
+ AsyncSubject = Rx.AsyncSubject,
43
+ disposableCreate = Rx.Disposable.create,
44
+ CompositeDisposable= Rx.CompositeDisposable,
45
+ immediateScheduler = Rx.Scheduler.immediate,
46
+ timeoutScheduler = Rx.Scheduler.timeout,
47
+ isScheduler = Rx.helpers.isScheduler,
48
+ slice = Array.prototype.slice;
49
+
50
+ /**
51
+ * Invokes the specified function asynchronously on the specified scheduler, surfacing the result through an observable sequence.
52
+ *
53
+ * @example
54
+ * var res = Rx.Observable.start(function () { console.log('hello'); });
55
+ * var res = Rx.Observable.start(function () { console.log('hello'); }, Rx.Scheduler.timeout);
56
+ * var res = Rx.Observable.start(function () { this.log('hello'); }, Rx.Scheduler.timeout, console);
57
+ *
58
+ * @param {Function} func Function to run asynchronously.
59
+ * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
60
+ * @param [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
61
+ * @returns {Observable} An observable sequence exposing the function's result value, or an exception.
62
+ *
63
+ * Remarks
64
+ * * The function is called immediately, not during the subscription of the resulting sequence.
65
+ * * Multiple subscriptions to the resulting sequence can observe the function's result.
66
+ */
67
+ Observable.start = function (func, context, scheduler) {
68
+ return observableToAsync(func, context, scheduler)();
69
+ };
69
70
 
70
- /**
71
- * Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
72
- *
73
- * @example
74
- * var res = Rx.Observable.toAsync(function (x, y) { return x + y; })(4, 3);
75
- * var res = Rx.Observable.toAsync(function (x, y) { return x + y; }, Rx.Scheduler.timeout)(4, 3);
76
- * var res = Rx.Observable.toAsync(function (x) { this.log(x); }, Rx.Scheduler.timeout, console)('hello');
77
- *
78
- * @param {Function} function Function to convert to an asynchronous function.
79
- * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
80
- * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
81
- * @returns {Function} Asynchronous function.
82
- */
83
- var observableToAsync = Observable.toAsync = function (func, scheduler, context) {
84
- scheduler || (scheduler = timeoutScheduler);
85
- return function () {
86
- var args = arguments,
87
- subject = new AsyncSubject();
88
-
89
- scheduler.schedule(function () {
90
- var result;
91
- try {
92
- result = func.apply(context, args);
93
- } catch (e) {
94
- subject.onError(e);
95
- return;
96
- }
97
- subject.onNext(result);
98
- subject.onCompleted();
99
- });
100
- return subject.asObservable();
101
- };
71
+ /**
72
+ * Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
73
+ *
74
+ * @example
75
+ * var res = Rx.Observable.toAsync(function (x, y) { return x + y; })(4, 3);
76
+ * var res = Rx.Observable.toAsync(function (x, y) { return x + y; }, Rx.Scheduler.timeout)(4, 3);
77
+ * var res = Rx.Observable.toAsync(function (x) { this.log(x); }, Rx.Scheduler.timeout, console)('hello');
78
+ *
79
+ * @param {Function} function Function to convert to an asynchronous function.
80
+ * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
81
+ * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
82
+ * @returns {Function} Asynchronous function.
83
+ */
84
+ var observableToAsync = Observable.toAsync = function (func, context, scheduler) {
85
+ isScheduler(scheduler) || (scheduler = timeoutScheduler);
86
+ return function () {
87
+ var args = arguments,
88
+ subject = new AsyncSubject();
89
+
90
+ scheduler.schedule(function () {
91
+ var result;
92
+ try {
93
+ result = func.apply(context, args);
94
+ } catch (e) {
95
+ subject.onError(e);
96
+ return;
97
+ }
98
+ subject.onNext(result);
99
+ subject.onCompleted();
100
+ });
101
+ return subject.asObservable();
102
102
  };
103
+ };
104
+
105
+ /**
106
+ * Converts a callback function to an observable sequence.
107
+ *
108
+ * @param {Function} function Function with a callback as the last parameter to convert to an Observable sequence.
109
+ * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
110
+ * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next.
111
+ * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array.
112
+ */
113
+ Observable.fromCallback = function (func, context, selector) {
114
+ return function () {
115
+ var args = slice.call(arguments, 0);
116
+
117
+ return new AnonymousObservable(function (observer) {
118
+ function handler(e) {
119
+ var results = e;
120
+
121
+ if (selector) {
122
+ try {
123
+ results = selector(arguments);
124
+ } catch (err) {
125
+ observer.onError(err);
126
+ return;
127
+ }
128
+
129
+ observer.onNext(results);
130
+ } else {
131
+ if (results.length <= 1) {
132
+ observer.onNext.apply(observer, results);
133
+ } else {
134
+ observer.onNext(results);
135
+ }
136
+ }
137
+
138
+ observer.onCompleted();
139
+ }
103
140
 
104
- /**
105
- * Converts a callback function to an observable sequence.
106
- *
107
- * @param {Function} function Function with a callback as the last parameter to convert to an Observable sequence.
108
- * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
109
- * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
110
- * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next.
111
- * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array.
112
- */
113
- Observable.fromCallback = function (func, scheduler, context, selector) {
114
- scheduler || (scheduler = immediateScheduler);
115
- return function () {
116
- var args = slice.call(arguments, 0);
117
-
118
- return new AnonymousObservable(function (observer) {
119
- return scheduler.schedule(function () {
120
- function handler(e) {
121
- var results = e;
122
-
123
- if (selector) {
124
- try {
125
- results = selector(arguments);
126
- } catch (err) {
127
- observer.onError(err);
128
- return;
129
- }
130
- } else {
131
- if (results.length === 1) {
132
- results = results[0];
133
- }
134
- }
135
-
136
- observer.onNext(results);
137
- observer.onCompleted();
138
- }
139
-
140
- args.push(handler);
141
- func.apply(context, args);
142
- });
143
- });
144
- };
141
+ args.push(handler);
142
+ func.apply(context, args);
143
+ });
145
144
  };
145
+ };
146
146
 
147
- /**
148
- * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format.
149
- * @param {Function} func The function to call
150
- * @param {Scheduler} [scheduler] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.
151
- * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
152
- * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next.
153
- * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array.
154
- */
155
- Observable.fromNodeCallback = function (func, scheduler, context, selector) {
156
- scheduler || (scheduler = immediateScheduler);
157
- return function () {
158
- var args = slice.call(arguments, 0);
159
-
160
- return new AnonymousObservable(function (observer) {
161
- return scheduler.schedule(function () {
162
-
163
- function handler(err) {
164
- if (err) {
165
- observer.onError(err);
166
- return;
167
- }
168
-
169
- var results = slice.call(arguments, 1);
170
-
171
- if (selector) {
172
- try {
173
- results = selector(results);
174
- } catch (e) {
175
- observer.onError(e);
176
- return;
177
- }
178
- } else {
179
- if (results.length === 1) {
180
- results = results[0];
181
- }
182
- }
183
-
184
- observer.onNext(results);
185
- observer.onCompleted();
186
- }
187
-
188
- args.push(handler);
189
- func.apply(context, args);
190
- });
191
- });
192
- };
147
+ /**
148
+ * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format.
149
+ * @param {Function} func The function to call
150
+ * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined.
151
+ * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next.
152
+ * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array.
153
+ */
154
+ Observable.fromNodeCallback = function (func, context, selector) {
155
+ return function () {
156
+ var args = slice.call(arguments, 0);
157
+
158
+ return new AnonymousObservable(function (observer) {
159
+ function handler(err) {
160
+ if (err) {
161
+ observer.onError(err);
162
+ return;
163
+ }
164
+
165
+ var results = slice.call(arguments, 1);
166
+
167
+ if (selector) {
168
+ try {
169
+ results = selector(results);
170
+ } catch (e) {
171
+ observer.onError(e);
172
+ return;
173
+ }
174
+ observer.onNext(results);
175
+ } else {
176
+ if (results.length <= 1) {
177
+ observer.onNext.apply(observer, results);
178
+ } else {
179
+ observer.onNext(results);
180
+ }
181
+ }
182
+
183
+ observer.onCompleted();
184
+ }
185
+
186
+ args.push(handler);
187
+ func.apply(context, args);
188
+ });
193
189
  };
190
+ };
194
191
 
195
192
  function fixEvent(event) {
196
193
  var stopPropagation = function () {
@@ -1 +1 @@
1
- (function(t){var e={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},n=e[typeof window]&&window||this,r=e[typeof exports]&&exports&&!exports.nodeType&&exports,i=e[typeof module]&&module&&!module.nodeType&&module,o=(i&&i.exports===r&&r,e[typeof global]&&global);!o||o.global!==o&&o.window!==o||(n=o),"function"==typeof define&&define.amd?define(["rx.binding","exports"],function(e,r){return n.Rx=t(n,r,e),n.Rx}):"object"==typeof module&&module&&module.exports===r?module.exports=t(n,module.exports,require("./rx")):n.Rx=t(n,{},n.Rx)}).call(this,function(t,e,n){function r(e){var n=function(){this.cancelBubble=!0},r=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(t){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(e||(e=t.event),!e.target)switch(e.target=e.target||e.srcElement,"mouseover"==e.type&&(e.relatedTarget=e.fromElement),"mouseout"==e.type&&(e.relatedTarget=e.toElement),e.stopPropagation||(e.stopPropagation=n,e.preventDefault=r),e.type){case"keypress":var i="charCode"in e?e.charCode:e.keyCode;10==i?(i=0,e.keyCode=13):13==i||27==i?i=0:3==i&&(i=99),e.charCode=i,e.keyChar=e.charCode?String.fromCharCode(e.charCode):""}return e}function i(t,e,n){if(t.addListener)return t.addListener(e,n),l(function(){t.removeListener(e,n)});if(t.addEventListener)return t.addEventListener(e,n,!1),l(function(){t.removeEventListener(e,n,!1)});if(t.attachEvent){var i=function(t){n(r(t))};return t.attachEvent("on"+e,i),l(function(){t.detachEvent("on"+e,i)})}return t["on"+e]=n,l(function(){t["on"+e]=null})}function o(t,e,n){var r=new f;if("function"==typeof t.item&&"number"==typeof t.length)for(var s=0,u=t.length;u>s;s++)r.add(o(t.item(s),e,n));else t&&r.add(i(t,e,n));return r}var s=n.Observable,u=(s.prototype,s.fromPromise),c=s.throwException,a=n.AnonymousObservable,h=n.AsyncSubject,l=n.Disposable.create,f=n.CompositeDisposable,p=n.Scheduler.immediate,d=n.Scheduler.timeout,v=Array.prototype.slice;s.start=function(t,e,n){return b(t,e,n)()};var b=s.toAsync=function(t,e,n){return e||(e=d),function(){var r=arguments,i=new h;return e.schedule(function(){var e;try{e=t.apply(n,r)}catch(o){return i.onError(o),undefined}i.onNext(e),i.onCompleted()}),i.asObservable()}};s.fromCallback=function(t,e,n,r){return e||(e=p),function(){var i=v.call(arguments,0);return new a(function(o){return e.schedule(function(){function e(t){var e=t;if(r)try{e=r(arguments)}catch(n){return o.onError(n),undefined}else 1===e.length&&(e=e[0]);o.onNext(e),o.onCompleted()}i.push(e),t.apply(n,i)})})}},s.fromNodeCallback=function(t,e,n,r){return e||(e=p),function(){var i=v.call(arguments,0);return new a(function(o){return e.schedule(function(){function e(t){if(t)return o.onError(t),undefined;var e=v.call(arguments,1);if(r)try{e=r(e)}catch(n){return o.onError(n),undefined}else 1===e.length&&(e=e[0]);o.onNext(e),o.onCompleted()}i.push(e),t.apply(n,i)})})}};var m=t.angular&&angular.element?angular.element:t.jQuery?t.jQuery:t.Zepto?t.Zepto:null,y=!!t.Ember&&"function"==typeof t.Ember.addListener;s.fromEvent=function(t,e,n){if(y)return w(function(n){Ember.addListener(t,e,n)},function(n){Ember.removeListener(t,e,n)},n);if(m){var r=m(t);return w(function(t){r.on(e,t)},function(t){r.off(e,t)},n)}return new a(function(r){return o(t,e,function(t){var e=t;if(n)try{e=n(arguments)}catch(i){return r.onError(i),undefined}r.onNext(e)})}).publish().refCount()};var w=s.fromEventPattern=function(t,e,n){return new a(function(r){function i(t){var e=t;if(n)try{e=n(arguments)}catch(i){return r.onError(i),undefined}r.onNext(e)}var o=t(i);return l(function(){e&&e(i,o)})}).publish().refCount()};return s.startAsync=function(t){var e;try{e=t()}catch(n){return c(n)}return u(e)},n});
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.binding","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(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function e(a,b,c){if(a.addListener)return a.addListener(b,c),l(function(){a.removeListener(b,c)});if(a.addEventListener)return a.addEventListener(b,c,!1),l(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var e=function(a){c(d(a))};return a.attachEvent("on"+b,e),l(function(){a.detachEvent("on"+b,e)})}return a["on"+b]=c,l(function(){a["on"+b]=null})}function f(a,b,c){var d=new m;if("function"==typeof a.item&&"number"==typeof a.length)for(var g=0,h=a.length;h>g;g++)d.add(f(a.item(g),b,c));else a&&d.add(e(a,b,c));return d}var g=c.Observable,h=(g.prototype,g.fromPromise),i=g.throwException,j=c.AnonymousObservable,k=c.AsyncSubject,l=c.Disposable.create,m=c.CompositeDisposable,n=(c.Scheduler.immediate,c.Scheduler.timeout),o=c.helpers.isScheduler,p=Array.prototype.slice;g.start=function(a,b,c){return q(a,b,c)()};var q=g.toAsync=function(a,b,c){return o(c)||(c=n),function(){var d=arguments,e=new k;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};g.fromCallback=function(a,b,c){return function(){var d=p.call(arguments,0);return new j(function(e){function f(a){var b=a;if(c){try{b=c(arguments)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)})}},g.fromNodeCallback=function(a,b,c){return function(){var d=p.call(arguments,0);return new j(function(e){function f(a){if(a)return void e.onError(a);var b=p.call(arguments,1);if(c){try{b=c(b)}catch(d){return void e.onError(d)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)})}};var r=a.angular&&angular.element?angular.element:a.jQuery?a.jQuery:a.Zepto?a.Zepto:null,s=!!a.Ember&&"function"==typeof a.Ember.addListener;g.fromEvent=function(a,b,c){if(s)return t(function(c){Ember.addListener(a,b,c)},function(c){Ember.removeListener(a,b,c)},c);if(r){var d=r(a);return t(function(a){d.on(b,a)},function(a){d.off(b,a)},c)}return new j(function(d){return f(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount()};var t=g.fromEventPattern=function(a,b,c){return new j(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return l(function(){b&&b(e,f)})}).publish().refCount()};return g.startAsync=function(a){var b;try{b=a()}catch(c){return i(c)}return h(b)},c});