New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ix

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ix - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

bower.json
{
"name": "Ix",
"version": "1.0.4",
"version": "1.0.5",
"main": [

@@ -5,0 +5,0 @@ "l2o.js",

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

# Ix.js <sup>v1.0.4</sup>
# Ix.js <sup>v1.0.5</sup>

@@ -25,10 +25,7 @@ # Enumerable object #

<!-- div -->
<!-- div -->
## <a id="Observable2"></a>`Observable Instance Methods`
## <a id="Enumerable2"></a>`Enumerable Instance Methods`
- [aggregate](#aggregate)

@@ -89,1 +86,84 @@ - [all](#all)

### <a id="switchCase"></a>`Ix.Enumerable.case`
<a href="#switchCase">#</a> [&#x24C8;](https://github.com/Reactive-Extensions/IxJS/blob/master/ix.js#L1224-L1233 "View in source") [&#x24C9;][1]
Returns a sequence from a dictionary based on the result of evaluating a selector function, also specifying a default sequence.
An alias for this method is switchCase for browsers <IE9.
#### Arguments
1. `selector` *(Function)*: Selector function used to pick a sequence from the given sources.
2. `sources` *(Object)*: Dictionary mapping selector values onto resulting sequences.
3. [`defaultSource`] *(Enumerable*): Default sequence to return in case there's no corresponding source for the computed selector value; if not provided defaults to empty Enumerable.
#### Returns
*(Enumerable)*: The source sequence corresponding with the evaluated selector value; otherwise, the default source.
#### Example
```js
var source = Ix.Enumerable.case(
Ix.Enumerable.return(42), {
42: 'foo',
24: 'bar'
},
Ix.Enumerable.return(56));
console.log(source.first());
// => 'foo'
```
* * *
### <a id="catchException"></a>`Ix.Enumerable.catch`
<a href="#catchException">#</a> [&#x24C8;](https://github.com/Reactive-Extensions/IxJS/blob/master/ix.js#L998-L1055 "View in source") [&#x24C9;][1]
Creates a sequence by concatenating source sequences until a source sequence completes successfully. An alias for this method is catchException for browsers <IE9.
#### Arguments
1. `array` *(arguments)*: An arguments array containing Enumerable sequences.
#### Returns
*(Enumerable)*: Sequence that continues to concatenate source sequences while errors occur.
#### Example
```js
var source = Ix.Enumerable.catch(
Ix.Enumerable.throw(new Error('first')),
Ix.Enumerable.throw(new Error('second')),
Ix.Enumerable.return(42)
);
console.log(source.first());
// => 42
```
* * *
### <a id="concat1"></a>`Ix.Enumerable.concat`
<a href="#concat1">#</a> [&#x24C8;](https://github.com/Reactive-Extensions/IxJS/blob/master/l2o.js#L2009-L2011 "View in source") [&#x24C9;][1]
Concatenates all given sequences as arguments.
#### Arguments
1. `array` *(arguments)*: An arguments array containing Enumerable sequences.
#### Returns
*(Enumerable)*: An Enumerable that contains the concatenated elements of the input sequences.
#### Example
```js
var source = Ix.Enumerable.concat(
Ix.Enumerable.return(42),
Ix.Enumerable.return(56)
);
source.forEach(function (item) {
console.log(item);
});
// => 42
// => 56
```
* * *

@@ -469,8 +469,9 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

/**
* Returns a sequence that throws an exception upon enumeration.
*
* @param exception Exception to throw upon enumerating the resulting sequence.
* @return Sequence that throws the specified exception upon enumeration.
* Returns a sequence that throws an exception upon enumeration. An alias for this method is throwException for <IE9.
* @example
* var result = Enumerable.throw(new Error('error'));
* @param {Object} exception Exception to throw upon enumerating the resulting sequence.
* @returns {Enumerable} Sequence that throws the specified exception upon enumeration.
*/
Enumerable.throwException = function (value) {
Enumerable['throw'] = Enumerable.throwException = function (value) {
return new Enumerable(function () {

@@ -485,5 +486,6 @@ return enumeratorCreate(

* Creates an enumerable sequence based on an enumerable factory function.
*
* @param enumerableFactory Enumerable factory function.
* @return Sequence that will invoke the enumerable factory upon a call to GetEnumerator.
* @example
* var result = Enumerable.defer(function () { return Enumerable.range(0, 10); });
* @param {Function} enumerableFactory Enumerable factory function.
* @returns {Enumerable} Sequence that will invoke the enumerable factory upon a call to GetEnumerator.
*/

@@ -506,8 +508,13 @@ var enumerableDefer = Enumerable.defer = function (enumerableFactory) {

* Generates a sequence by mimicking a for loop.
*
* @param initialState Initial state of the generator loop.
* @param condition Loop condition.
* @param iterate State update function to run after every iteration of the generator loop.
* @param resultSelector Result selector to compute resulting sequence elements.
* @return Sequence obtained by running the generator loop, yielding computed elements.
* @example
* var result = Enumerable.generate(
* 0,
* function (x) { return x < 10; },
* function (x) { return x + 1; },
* function (x) { return x * x });
* @param {Any} initialState Initial state of the generator loop.
* @param {Function} condition Loop condition.
* @param {Function} iterate State update function to run after every iteration of the generator loop.
* @param {Function} resultSelector Result selector to compute resulting sequence elements.
* @returns {Enumerable} Sequence obtained by running the generator loop, yielding computed elements.
*/

@@ -535,6 +542,7 @@ Enumerable.generate = function (initialState, condition, iterate, resultSelector) {

* Generates a sequence that's dependent on a resource object whose lifetime is determined by the sequence usage duration.
*
* @param resourceFactory Resource factory function.
* @param enumerableFactory Enumerable factory function, having access to the obtained resource.
* @return Sequence whose use controls the lifetime of the associated obtained resource.
* @example
* var result = Enumerable.using(function () { return new QuerySource(); }, function (x) { return x.get(42); });
* @param {Function} resourceFactory Resource factory function.
* @param {Function} enumerableFactory Enumerable factory function, having access to the obtained resource.
* @returns {Enumerable} Sequence whose use controls the lifetime of the associated obtained resource.
*/

@@ -573,7 +581,8 @@ Enumerable.using = function (resourceFactory, enumerableFactory) {

* Lazily invokes an action for each value in the sequence, and executes an action upon successful or exceptional termination.
*
* e.doAction(onNext);
* e.doAction(onNext, onError);
* e.doAction(onNExt, onError, onCompleted);
* e.doAction(observer);
* There is an alias for this method doAction for browsers <IE9.
* @example
* e.do(onNext);
* e.do(onNext, onError);
* e.do(onNExt, onError, onCompleted);
* e.do(observer);

@@ -583,5 +592,5 @@ * @param onNext Action to invoke for each element or Observer.

* @param onCompleted Action to invoke on successful termination of the sequence.
* @return Sequence exhibiting the specified side-effects upon enumeration.
* @returns {Enumerable} Sequence exhibiting the specified side-effects upon enumeration.
*/
EnumerablePrototype.doAction = function (onNext, onError, onCompleted) {
EnumerablePrototype['do'] = EnumerablePrototype.doAction = function (onNext, onError, onCompleted) {
var oN, oE, oC, self = this;

@@ -623,5 +632,8 @@ if (typeof onNext === 'object') {

* Generates a sequence of buffers over the source sequence, with specified length and possible overlap.
* @param count Number of elements for allocated buffers.
* @param skip Number of elements to skip between the start of consecutive buffers.
* @return Sequence of buffers containing source sequence elements.
* @example
* var result = Enumerable.range(0, 10).bufferWithCount(2);
* var result = Enumerable.range(0, 10).bufferWithCount(5, 1);
* @param {Number} count Number of elements for allocated buffers.
* @param {Number} [skip] Number of elements to skip between the start of consecutive buffers.
* @returns {Enumerable} Sequence of buffers containing source sequence elements.
*/

@@ -669,3 +681,3 @@ EnumerablePrototype.bufferWithCount = function (count, skip) {

* Ignores all elements in the source sequence.
* @return Source sequence without its elements.
* @returns {Enumerable} Source sequence without its elements.
*/

@@ -694,3 +706,3 @@ EnumerablePrototype.ignoreElements = function() {

* @param comparer Comparer used to compare key values.
* @return Sequence that contains the elements from the source sequence with distinct key values.
* @returns {Enumerable} Sequence that contains the elements from the source sequence with distinct key values.
*/

@@ -725,3 +737,3 @@ EnumerablePrototype.distinctBy = function(keySelector, comparer) {

* @param comparer Comparer used to compare key values.
* @return Sequence without adjacent non-distinct elements.
* @returns {Enumerable} Sequence without adjacent non-distinct elements.
*/

@@ -763,3 +775,3 @@ EnumerablePrototype.distinctUntilChanged = function (keySelector, comparer) {

* @param selector Selector function to retrieve the next sequence to expand.
* @return Sequence with results from the recursive expansion of the source sequence.
* @returns {Enumerable} Sequence with results from the recursive expansion of the source sequence.
*/

@@ -796,3 +808,3 @@ EnumerablePrototype.expand = function(selector) {

* @param values Values to prefix the sequence with.
* @return Sequence starting with the specified prefix value, followed by the source sequence.
* @returns {Enumerable} Sequence starting with the specified prefix value, followed by the source sequence.
*/

@@ -856,3 +868,3 @@ EnumerablePrototype.startWith = function () {

* @param accumulator Accumulation function to apply to the current accumulation value and each element of the sequence.
* @return Sequence with all intermediate accumulation values resulting from scanning the sequence.
* @returns {Enumerable} Sequence with all intermediate accumulation values resulting from scanning the sequence.
*/

@@ -867,3 +879,3 @@ EnumerablePrototype.scan = function (/* seed, accumulator */) {

* @param count The number of elements to take from the end of the sequence.
* @return Sequence with the specified number of elements counting from the end of the source sequence.
* @returns {Enumerable} Sequence with the specified number of elements counting from the end of the source sequence.
*/

@@ -901,3 +913,3 @@ EnumerablePrototype.takeLast = function (count) {

* @param count The number of elements to skip from the end of the sequence before returning the remaining elements.
* @return Sequence bypassing the specified number of elements counting from the end of the source sequence.
* @returns {Enumerable} Sequence bypassing the specified number of elements counting from the end of the source sequence.
*/

@@ -931,3 +943,3 @@ EnumerablePrototype.skipLast = function (count) {

* @param count Number of times to repeat the source sequence.
* @return Sequence obtained by concatenating the source sequence to itself the specified number of times.
* @returns {Enumerable} Sequence obtained by concatenating the source sequence to itself the specified number of times.
*/

@@ -981,6 +993,7 @@ EnumerablePrototype.repeat = function (count) {

* Creates a sequence that returns the elements of the first sequence, switching to the second in case of an error.
* An alias for this method is catchException for browsers <IE9.
* @param second Second sequence, concatenated to the result in case the first sequence completes exceptionally or handler to invoke when an exception of the specified type occurs.
* @return The first sequence, followed by the second sequence in case an error is produced.
* @returns {Enumerable} The first sequence, followed by the second sequence in case an error is produced.
*/
EnumerablePrototype.catchException = function (secondOrHandler) {
EnumerablePrototype['catch'] = EnumerablePrototype.catchException = function (secondOrHandler) {
if (arguments.length === 0) {

@@ -999,5 +1012,6 @@ return enumerableCatch(this); // Already IE<IE<T>>

* Creates a sequence by concatenating source sequences until a source sequence completes successfully.
* @return Sequence that continues to concatenate source sequences while errors occur.
* An alias for this method is catchException for browsers <IE9.
* @returns {Enumerable} Sequence that continues to concatenate source sequences while errors occur.
*/
var enumerableCatch = Enumerable.catchException = function () {
var enumerableCatch = Enumerable['catch'] = Enumerable.catchException = function () {
// Check arguments

@@ -1063,6 +1077,9 @@ var sources = Enumerable.fromArray(arguments);

* Creates a sequence whose termination or disposal of an enumerator causes a finally action to be executed.
* @param finallyAction Action to run upon termination of the sequence, or when an enumerator is disposed.
* @return Source sequence with guarantees on the invocation of the finally action.
* An alias for this method is finallyDo for browsers <IE9.
* @example
* var result = Enumerable.range(1, 10).finally(function () { console.log('done!'); });
* @param {Function} finallyAction Action to run upon termination of the sequence, or when an enumerator is disposed.
* @returns {Enumerable} Source sequence with guarantees on the invocation of the finally action.
*/
EnumerablePrototype.finallyDo = function (finallyAction) {
EnumerablePrototype['finally'] = EnumerablePrototype.finallyDo = function (finallyAction) {
var parent = this;

@@ -1101,4 +1118,4 @@ return new Enumerable(function () {

* Creates a sequence that concatenates both given sequences, regardless of whether an error occurs.
* @param second Second sequence.
* @return Sequence concatenating the elements of both sequences, ignoring errors.
* @param {Enumerable} second Second sequence.
* @returns {Enumerable} Sequence concatenating the elements of both sequences, ignoring errors.
*/

@@ -1111,3 +1128,3 @@ EnumerablePrototype.onErrorResumeNext = function (second) {

* Creates a sequence that concatenates the given sequences, regardless of whether an error occurs in any of the sequences.
* @return Sequence concatenating the elements of the given sequences, ignoring errors.
* @returns {Enumerable} Sequence concatenating the elements of the given sequences, ignoring errors.
*/

@@ -1142,4 +1159,4 @@ var onErrorResumeNext = Enumerable.onErrorResumeNext = function () {

* Creates a sequence that retries enumerating the source sequence as long as an error occurs, with the specified maximum number of retries.
* @param retryCount Maximum number of retries.
* @return Sequence concatenating the results of the source sequence as long as an error occurs.
* @param {Number} retryCount Maximum number of retries.
* @returns {Enumerable} Sequence concatenating the results of the source sequence as long as an error occurs.
*/

@@ -1179,7 +1196,10 @@ EnumerablePrototype.retry = function (retryCount) {

* Generates an enumerable sequence by repeating a source sequence as long as the given loop condition holds.
* @param condition Loop condition.
* @param source Sequence to repeat while the condition evaluates true.
* @return Sequence generated by repeating the given sequence while the condition evaluates to true.
* An alias for this method is whileDo for browsers <IE9.
* @example
* var result = Enumerable.while(function () { return true; }, Enumerable.range(1, 10));
* @param {Function} condition Loop condition.
* @param {Enumerable} source Sequence to repeat while the condition evaluates true.
* @returns {Enumerable} Sequence generated by repeating the given sequence while the condition evaluates to true.
*/
var enumerableWhileDo = Enumerable.whileDo = function (condition, source) {
var enumerableWhileDo = Enumerable['while'] = Enumerable.whileDo = function (condition, source) {
return enumerableRepeat(source).takeWhile(condition).selectMany(identity);

@@ -1190,8 +1210,12 @@ };

* Returns an enumerable sequence based on the evaluation result of the given condition.
* @param condition Condition to evaluate.
* @param thenSource Sequence to return in case the condition evaluates true.
* @param elseSource Sequence to return in case the condition evaluates false.
* An alias for this method is ifThen for browsers <IE9
* @example
* var result = Enumerable.if(function () { return true; }, Enumerable.range(0, 10));
* var result = Enumerable.if(function () { return false; }, Enumerable.range(0, 10), Enumerable.return(42));
* @param {Function} condition Condition to evaluate.
* @param {Enumerable} thenSource Sequence to return in case the condition evaluates true.
* @param {Enumerable} [elseSource] Optional sequence to return in case the condition evaluates false; else an empty sequence.
* @return Either of the two input sequences based on the result of evaluating the condition.
*/
Enumerable.ifThen = function (condition, thenSource, elseSource) {
Enumerable['if'] = Enumerable.ifThen = function (condition, thenSource, elseSource) {
elseSource || (elseSource = enumerableEmpty());

@@ -1203,5 +1227,7 @@ return enumerableDefer(function () { return condition() ? thenSource : elseSource; });

* Generates an enumerable sequence by repeating a source sequence as long as the given loop postcondition holds.
* @param source Source sequence to repeat while the condition evaluates true.
* @param condition Loop condition.
* @return Sequence generated by repeating the given sequence until the condition evaluates to false.
* @example
* var result = Enumerable.doWhile(Enumerable.range(0, 10), function () { return true; });
* @param {Enumerable} source Source sequence to repeat while the condition evaluates true.
* @param {Function} condition Loop condition.
* @returns {Enumerable} Sequence generated by repeating the given sequence until the condition evaluates to false.
*/

@@ -1214,8 +1240,12 @@ Enumerable.doWhile = function (source, condition) {

* Returns a sequence from a dictionary based on the result of evaluating a selector function, also specifying a default sequence.
* @param selector Selector function used to pick a sequence from the given sources.
* @param sources Dictionary mapping selector values onto resulting sequences.
* @param defaultSource Default sequence to return in case there's no corresponding source for the computed selector value.
* @return The source sequence corresponding with the evaluated selector value; otherwise, the default source.
* An alias for this method is switchCase for browsers <IE9.
* @example
* var result = Enumerable.case(function (x) { return x; }, {1: 42, 2: 25});
* var result = Enumerable.case(function (x) { return x; }, {1: 42, 2: 25}, Enumerable.return(56));
* @param {Function} selector Selector function used to pick a sequence from the given sources.
* @param {Object} sources Dictionary mapping selector values onto resulting sequences.
* @param {Enumerable} [defaultSource] Default sequence to return in case there's no corresponding source for the computed selector value; if not provided defaults to empty Enumerable.
* @returns {Enumerable} The source sequence corresponding with the evaluated selector value; otherwise, the default source.
*/
Enumerable.cases = function (selector, sources, defaultSource) {
Enumerable['case'] = Enumerable.switchCase = function (selector, sources, defaultSource) {
defaultSource || (defaultSource = enumerableEmpty());

@@ -1233,7 +1263,10 @@ return enumerableDefer(function () {

* Generates a sequence by enumerating a source sequence, mapping its elements on result sequences, and concatenating those sequences.
* @param source Source sequence.
* @param resultSelector Result selector to evaluate for each iteration over the source.
* @return Sequence concatenating the inner sequences that result from evaluating the result selector on elements from the source.
* An alias for this method is forIn for browsers <IE9.
* @example
* var result = Enumerable.for(Enumerable.range(0, 10), function (x) { return Enumerable.return(x); });
* @param {Enumerable} source Source sequence.
* @param {Function} resultSelector Result selector to evaluate for each iteration over the source.
* @return {Enumerable} Sequence concatenating the inner sequences that result from evaluating the result selector on elements from the source.
*/
Enumerable.forIn = function (source, resultSelector) {
Enumerable['for'] = Enumerable.forIn = function (source, resultSelector) {
return source.select(resultSelector);

@@ -1240,0 +1273,0 @@ };

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

(function(t,r){var e="object"==typeof exports&&exports&&("object"==typeof t&&t&&t==t.global&&(window=t),exports);"function"==typeof define&&define.amd?define(["Ix","exports"],function(e,n){return t.Ix=r(t,n,e),t.Ix}):"object"==typeof module&&module&&module.exports==e?module.exports=r(t,module.exports,require("./l2o")):t.Ix=r(t,{},t.Ix)})(this,function(t,r,e){function n(){}function u(t){return t}function i(t,r){return t>r?1:r>t?-1:0}function o(t,r){return m(t,r)}function f(t,r){r||(r=o);for(var e=0,n=this.length;n>e;e++)if(r(t,this[e]))return e;return-1}function s(t,r,e){var n=[],u=t.getEnumerator();try{if(!u.moveNext())throw Error(p);var i=u.getCurrent(),o=r(i);for(n.push(i);u.moveNext();){var f=u.getCurrent(),s=r(f),c=e(s,o);0===c?n.push(f):c>0&&(n=[f],o=s)}}finally{u.dispose()}return b(n)}function c(t){this.readerCount=t,this.list={},this.length=0}function a(){this.list=[],this.length=0}function h(t,r){return function(){t.apply(r,arguments)}}function l(t,r){var e=this;return new d(function(){var n,u,i=t;return N(function(){if(u||(u=e.getEnumerator()),!u.moveNext())return!1;var t=u.getCurrent();return i=r(i,t),n=i,!0},function(){return n},function(){u&&u.dispose()})})}function v(t){var r=this;return new d(function(){var e,n,u,i=!1;return N(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;var o=n.getCurrent();{if(i)return u=t(u,o),e=u,!0;i=!0,u=o}}},function(){return e},function(){n&&n.dispose()})})}function g(t,r){return new d(function(){var e,n,u;return N(function(){for(o||(o=t.getEnumerator());;){var n,i;try{n=o.moveNext(),i=o.getCurrent()}catch(o){u=r(o);break}return n?(e=i,!0):!1}return u?(o.dispose(),o=u.getEnumerator(),o.moveNext()?(e=o.getCurrent(),!0):!1):undefined},function(){return e},function(){n&&n.dispose()})})}var m=Ix.Internals.isEqual,p="Sequence contains no elements.",y=Array.prototype.slice,d=e.Enumerable,E=d.prototype,w=d.concat,x=d.empty,b=d.fromArray,C=d.repeat,N=e.Enumerator.create;inherits=e.Internals.inherits,E.isEmpty=function(){return!this.any()},E.minBy=function(t,r){return r||(r=i),s(this,t,function(t,e){return-r(t,e)})},E.maxBy=function(t,r){return r||(r=i),s(this,t,r)};var k=function(){function t(t){this.disposed=!1,this.source=t}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=this;return N(function(){return r.source.moveNext()?(t=r.source.getCurrent(),!0):!1},function(){return t})},t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.source.dispose(),this.source=null)},t}();E.share=function(t){var r=this;return t?new d(function(){return t(r.share()).getEnumerator()}):new k(r.getEnumerator())};var j=c.prototype;j.clear=function(){this.list={},this.length=0},j.get=function(t){if(!this.list[t])throw Error("Element no longer available in the buffer.");var r=this.list[t];return 0===--r.length&&delete this.list[t],r.value},j.push=function(t){this.list[this.length]={value:t,length:this.readerCount},this.length++},j.done=function(t){for(var r=t;this.length>r;r++)this.get(r);this.readerCount--};var D=function(){function t(t){this.source=t,this.buffer=new c(0),this.disposed=!1,this.stopped=!1,this.error=null}function r(t){var r,e=this,n=!1,u=!0,i=!1;return N(function(){if(e.disposed)throw Error("Object disposed");u||t++;var o,f=!1;if(t>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(o=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(t+1),i=!0,e.error;return e.buffer&&e.buffer.done(t+1),i=!0,!1}f&&e.buffer.push(o)}else f=!0;return f?(r=e.buffer.get(t),u=!1,!0):(e.buffer&&e.buffer.done(t+1),i=!0,!1)},function(){return r},function(){i&&e.buffer&&e.buffer.done(t)})}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t=this.buffer.length;return this.buffer.readerCount++,r.call(this,t)},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();E.publish=function(t){var r=this;return t?new d(function(){return t(r.publish()).getEnumerator()}):new D(r.getEnumerator())};var z=a.prototype;z.done=n,z.push=function(t){this.list[this.length++]=t},z.clear=function(){this.list=[],this.length=0},z.get=function(t){return this.list[t]};var A=function(){function t(t,r){this.source=t,this.buffer=r,this.stopped=!1,this.error=null,this.disposed=!1}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=0,e=this,n=!1,u=!0,i=!1;return N(function(){if(e.disposed)throw Error("Object disposed");u||r++;var o,f=!1;if(r>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(o=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(r+1),i=!0,e.error;return e.buffer&&e.buffer.done(r+1),i=!0,!1}f&&e.buffer.push(o)}else f=!0;return f?(t=e.buffer.get(r),u=!1,!0):(e.buffer&&e.buffer.done(r+1),i=!0,!1)},function(){return t},function(){i&&e.buffer&&e.buffer.done(r)})},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();E.memoize=function(){var t=this;return 0===arguments.length?new A(t.getEnumerator(),new a):1===arguments.length&&"function"==typeof arguments[0]?new d(function(){return arguments[1](t.memoize()).getEnumerator()}):1===arguments.length&&"number"==typeof arguments[0]?new A(t.getEnumerator(),new c(arguments[0])):new d(function(){return arguments[1](t.memoize(arguments[0])).getEnumerator()})},d.throwException=function(t){return new d(function(){return N(function(){throw t},n)})};var O=d.defer=function(t){return new d(function(){var r;return N(function(){return r||(r=t().getEnumerator()),r.moveNext()},function(){return r.getCurrent()},function(){r.dispose()})})};d.generate=function(t,r,e,n){return new d(function(){var u,i,o=!1;return N(function(){if(o){if(u=e(u),!r(u))return!1}else u=t,o=!0;return i=n(u),!0},function(){return i})})},d.using=function(t,r){return new d(function(){var e,n,u,i=!0;return N(function(){return i&&(u=t(),n=r(u).getEnumerator(),i=!1),n.moveNext()?(e=n.getCurrent(),!0):!1},function(){return e},function(){n&&n.dispose(),u&&u.dispose()})})},E.doAction=function(t,r,e){var u,i,o,f=this;return"object"==typeof t?(u=h(t.onNext,t),i=h(t.onError,t),o=h(t.onCompleted,t)):(u=t,i=r||n,o=e||n),new d(function(){var t,r;return N(function(){t||(t=f.getEnumerator());try{if(!t.moveNext())return o(),!1;r=t.getCurrent()}catch(t){throw i(t),t}return u(r),!0},function(){return r},function(){t&&t.dispose()})})},E.bufferWithCount=function(t,r){var e=this;return null==r&&(r=t),new d(function(){var n,u,i=[],o=0;return N(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return i.length>0?(u=d.fromArray(i.shift()),!0):!1;0===o%r&&i.push([]);for(var f=0,s=i.length;s>f;f++)i[f].push(n.getCurrent());if(i.length>0&&i[0].length===t)return u=d.fromArray(i.shift()),++o,!0;++o}},function(){return u},function(){n.dispose()})})},E.ignoreElements=function(){var t=this;return new d(function(){var r;return N(function(){for(r=t.getEnumerator();r.moveNext(););return!1},function(){throw Error("Operation is not valid due to the current state of the object.")},function(){r.dispose()})})},E.distinctBy=function(t,r){r||(r=o);var e=this;return new d(function(){var n,u,i=[];return N(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var o=u.getCurrent(),s=t(o);if(-1===f.call(i,s,r))return i.push(o),n=o,!0}},function(){return n},function(){u&&u.dispose()})})},E.distinctUntilChanged=function(t,r){t||(t=u),r||(r=o);var e=this;return new d(function(){var n,u,i,o;return N(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var f=u.getCurrent(),s=t(f),c=!1;if(o&&(c=r(i,s)),!o||!c)return n=f,i=s,o=!0,!0}},function(){return n},function(){u&&u.dispose()})})},E.expand=function(t){var r=this;return new d(function(){var e,n,u=[r];return N(function(){for(;;){if(!n){if(0===u.length)return!1;n=u.shift().getEnumerator()}if(n.moveNext())return e=n.getCurrent(),u.push(t(e)),!0;n.dispose(),n=null}},function(){return e},function(){n&&n.dispose()})})},E.startWith=function(){return w(b(y.call(arguments)),this)},E.scan=function(){var t=1===arguments.length?v:l;return t.apply(this,arguments)},E.takeLast=function(t){var r=this;return new d(function(){var e,n,u;return N(function(){if(n||(n=r.getEnumerator()),!u)for(u=[];n.moveNext();)u.push(n.getCurrent()),u.length>t&&u.shift();return 0===u.length?!1:(e=u.shift(),!0)},function(){return e},function(){n&&n.dispose()})})},E.skipLast=function(t){var r=this;return new d(function(){var e,n,u=[];return N(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;if(u.push(n.getCurrent()),u.length>t)return e=u.shift(),!0}},function(){return e},function(){n&&n.dispose()})})},E.repeat=function(t){var r=this;return C(0,t).selectMany(function(){return r})},E.catchException=function(t){if(0===arguments.length)return P(this);if("function"==typeof t)return g(this,t);var r=y.call(arguments);return r.unshift(this),P.apply(null,r)};var P=d.catchException=function(){var t=d.fromArray(arguments);return new d(function(){var r,e,n,u;return N(function(){for(r||(r=t.getEnumerator());;){for(;;){if(!e){if(!r.moveNext()){if(u)throw u;return!1}u=null,e=r.getCurrent().getEnumerator()}var i,o;try{i=e.moveNext(),o=e.getCurrent()}catch(f){u=f,e.dispose(),e=null;break}if(!i){e.dispose(),e=null;break}return n=o,!0}if(null==u)break}},function(){return n},function(){e&&e.dispose(),r&&r.dispose()})})};E.finallyDo=function(t){var r=this;return new d(function(){var e,n=!1;return N(function(){u||(u=r.getEnumerator());var e;try{return e=u.moveNext(),e?e:(t(),n=!0,!1)}catch(u){throw t(),n=!0,u}},function(){return e.getCurrent()},function(){!n&&t(),e&&e.dispose()})})},E.onErrorResumeNext=function(t){return S.apply(null,[this,t])};var S=d.onErrorResumeNext=function(){var t=arguments;return new d(function(){var r,e,n=0;return N(function(){for(;t.length>n;){e||(e=t[n].getEnumerator());try{var u=e.moveNext();if(u)return r=e.getCurrent(),!0}catch(i){}e.dispose(),e=null,n++}return!1},function(){return r},function(){e&&e.dispose()})})};E.retry=function(t){var r=this;return new d(function(){var e,n,u=t,i=null!=t;return N(function(){for(n||(n=r.getEnumerator());;)try{return n.moveNext()?(e=n.getCurrent(),!0):!1}catch(t){if(i&&0===--u)throw t;n=r.getEnumerator(),error=null}},function(){return e},function(){n.dispose()})})};var I=d.whileDo=function(t,r){return C(r).takeWhile(t).selectMany(u)};return d.ifThen=function(t,r,e){return e||(e=x()),O(function(){return t()?r:e})},d.doWhile=function(t,r){return t.concat(I(r,t))},d.cases=function(t,r,e){return e||(e=x()),O(function(){var n=r[t()];return n||(n=e),n})},d.forIn=function(t,r){return t.select(r)},e});
(function(t,r){var e="object"==typeof exports&&exports&&("object"==typeof t&&t&&t==t.global&&(window=t),exports);"function"==typeof define&&define.amd?define(["Ix","exports"],function(e,n){return t.Ix=r(t,n,e),t.Ix}):"object"==typeof module&&module&&module.exports==e?module.exports=r(t,module.exports,require("./l2o")):t.Ix=r(t,{},t.Ix)})(this,function(t,r,e){function n(){}function u(t){return t}function i(t,r){return t>r?1:r>t?-1:0}function o(t,r){return m(t,r)}function f(t,r){r||(r=o);for(var e=0,n=this.length;n>e;e++)if(r(t,this[e]))return e;return-1}function s(t,r,e){var n=[],u=t.getEnumerator();try{if(!u.moveNext())throw Error(p);var i=u.getCurrent(),o=r(i);for(n.push(i);u.moveNext();){var f=u.getCurrent(),s=r(f),c=e(s,o);0===c?n.push(f):c>0&&(n=[f],o=s)}}finally{u.dispose()}return b(n)}function c(t){this.readerCount=t,this.list={},this.length=0}function a(){this.list=[],this.length=0}function h(t,r){return function(){t.apply(r,arguments)}}function l(t,r){var e=this;return new d(function(){var n,u,i=t;return N(function(){if(u||(u=e.getEnumerator()),!u.moveNext())return!1;var t=u.getCurrent();return i=r(i,t),n=i,!0},function(){return n},function(){u&&u.dispose()})})}function v(t){var r=this;return new d(function(){var e,n,u,i=!1;return N(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;var o=n.getCurrent();{if(i)return u=t(u,o),e=u,!0;i=!0,u=o}}},function(){return e},function(){n&&n.dispose()})})}function g(t,r){return new d(function(){var e,n,u;return N(function(){for(o||(o=t.getEnumerator());;){var n,i;try{n=o.moveNext(),i=o.getCurrent()}catch(o){u=r(o);break}return n?(e=i,!0):!1}return u?(o.dispose(),o=u.getEnumerator(),o.moveNext()?(e=o.getCurrent(),!0):!1):undefined},function(){return e},function(){n&&n.dispose()})})}var m=Ix.Internals.isEqual,p="Sequence contains no elements.",y=Array.prototype.slice,d=e.Enumerable,E=d.prototype,w=d.concat,x=d.empty,b=d.fromArray,C=d.repeat,N=e.Enumerator.create;inherits=e.Internals.inherits,E.isEmpty=function(){return!this.any()},E.minBy=function(t,r){return r||(r=i),s(this,t,function(t,e){return-r(t,e)})},E.maxBy=function(t,r){return r||(r=i),s(this,t,r)};var k=function(){function t(t){this.disposed=!1,this.source=t}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=this;return N(function(){return r.source.moveNext()?(t=r.source.getCurrent(),!0):!1},function(){return t})},t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.source.dispose(),this.source=null)},t}();E.share=function(t){var r=this;return t?new d(function(){return t(r.share()).getEnumerator()}):new k(r.getEnumerator())};var j=c.prototype;j.clear=function(){this.list={},this.length=0},j.get=function(t){if(!this.list[t])throw Error("Element no longer available in the buffer.");var r=this.list[t];return 0===--r.length&&delete this.list[t],r.value},j.push=function(t){this.list[this.length]={value:t,length:this.readerCount},this.length++},j.done=function(t){for(var r=t;this.length>r;r++)this.get(r);this.readerCount--};var D=function(){function t(t){this.source=t,this.buffer=new c(0),this.disposed=!1,this.stopped=!1,this.error=null}function r(t){var r,e=this,n=!1,u=!0,i=!1;return N(function(){if(e.disposed)throw Error("Object disposed");u||t++;var o,f=!1;if(t>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(o=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(t+1),i=!0,e.error;return e.buffer&&e.buffer.done(t+1),i=!0,!1}f&&e.buffer.push(o)}else f=!0;return f?(r=e.buffer.get(t),u=!1,!0):(e.buffer&&e.buffer.done(t+1),i=!0,!1)},function(){return r},function(){i&&e.buffer&&e.buffer.done(t)})}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t=this.buffer.length;return this.buffer.readerCount++,r.call(this,t)},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();E.publish=function(t){var r=this;return t?new d(function(){return t(r.publish()).getEnumerator()}):new D(r.getEnumerator())};var z=a.prototype;z.done=n,z.push=function(t){this.list[this.length++]=t},z.clear=function(){this.list=[],this.length=0},z.get=function(t){return this.list[t]};var A=function(){function t(t,r){this.source=t,this.buffer=r,this.stopped=!1,this.error=null,this.disposed=!1}return inherits(t,d),t.prototype.getEnumerator=function(){if(this.disposed)throw Error("Object disposed");var t,r=0,e=this,n=!1,u=!0,i=!1;return N(function(){if(e.disposed)throw Error("Object disposed");u||r++;var o,f=!1;if(r>=e.buffer.length){if(!e.stopped)try{f=e.source.moveNext(),f&&(o=e.source.getCurrent())}catch(s){e.stopped=!0,e.error=s,e.source.dispose(),n=!0}if(e.stopped){if(e.error)throw e.buffer&&e.buffer.done(r+1),i=!0,e.error;return e.buffer&&e.buffer.done(r+1),i=!0,!1}f&&e.buffer.push(o)}else f=!0;return f?(t=e.buffer.get(r),u=!1,!0):(e.buffer&&e.buffer.done(r+1),i=!0,!1)},function(){return t},function(){i&&e.buffer&&e.buffer.done(r)})},t.prototype.dispose=function(){this.disposed||(this.source.dispose(),this.source=null,this.buffer.clear(),this.buffer=null,this.disposed=!0)},t}();E.memoize=function(){var t=this;return 0===arguments.length?new A(t.getEnumerator(),new a):1===arguments.length&&"function"==typeof arguments[0]?new d(function(){return arguments[1](t.memoize()).getEnumerator()}):1===arguments.length&&"number"==typeof arguments[0]?new A(t.getEnumerator(),new c(arguments[0])):new d(function(){return arguments[1](t.memoize(arguments[0])).getEnumerator()})},d["throw"]=d.throwException=function(t){return new d(function(){return N(function(){throw t},n)})};var O=d.defer=function(t){return new d(function(){var r;return N(function(){return r||(r=t().getEnumerator()),r.moveNext()},function(){return r.getCurrent()},function(){r.dispose()})})};d.generate=function(t,r,e,n){return new d(function(){var u,i,o=!1;return N(function(){if(o){if(u=e(u),!r(u))return!1}else u=t,o=!0;return i=n(u),!0},function(){return i})})},d.using=function(t,r){return new d(function(){var e,n,u,i=!0;return N(function(){return i&&(u=t(),n=r(u).getEnumerator(),i=!1),n.moveNext()?(e=n.getCurrent(),!0):!1},function(){return e},function(){n&&n.dispose(),u&&u.dispose()})})},E["do"]=E.doAction=function(t,r,e){var u,i,o,f=this;return"object"==typeof t?(u=h(t.onNext,t),i=h(t.onError,t),o=h(t.onCompleted,t)):(u=t,i=r||n,o=e||n),new d(function(){var t,r;return N(function(){t||(t=f.getEnumerator());try{if(!t.moveNext())return o(),!1;r=t.getCurrent()}catch(t){throw i(t),t}return u(r),!0},function(){return r},function(){t&&t.dispose()})})},E.bufferWithCount=function(t,r){var e=this;return null==r&&(r=t),new d(function(){var n,u,i=[],o=0;return N(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return i.length>0?(u=d.fromArray(i.shift()),!0):!1;0===o%r&&i.push([]);for(var f=0,s=i.length;s>f;f++)i[f].push(n.getCurrent());if(i.length>0&&i[0].length===t)return u=d.fromArray(i.shift()),++o,!0;++o}},function(){return u},function(){n.dispose()})})},E.ignoreElements=function(){var t=this;return new d(function(){var r;return N(function(){for(r=t.getEnumerator();r.moveNext(););return!1},function(){throw Error("Operation is not valid due to the current state of the object.")},function(){r.dispose()})})},E.distinctBy=function(t,r){r||(r=o);var e=this;return new d(function(){var n,u,i=[];return N(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var o=u.getCurrent(),s=t(o);if(-1===f.call(i,s,r))return i.push(o),n=o,!0}},function(){return n},function(){u&&u.dispose()})})},E.distinctUntilChanged=function(t,r){t||(t=u),r||(r=o);var e=this;return new d(function(){var n,u,i,o;return N(function(){for(u||(u=e.getEnumerator());;){if(!u.moveNext())return!1;var f=u.getCurrent(),s=t(f),c=!1;if(o&&(c=r(i,s)),!o||!c)return n=f,i=s,o=!0,!0}},function(){return n},function(){u&&u.dispose()})})},E.expand=function(t){var r=this;return new d(function(){var e,n,u=[r];return N(function(){for(;;){if(!n){if(0===u.length)return!1;n=u.shift().getEnumerator()}if(n.moveNext())return e=n.getCurrent(),u.push(t(e)),!0;n.dispose(),n=null}},function(){return e},function(){n&&n.dispose()})})},E.startWith=function(){return w(b(y.call(arguments)),this)},E.scan=function(){var t=1===arguments.length?v:l;return t.apply(this,arguments)},E.takeLast=function(t){var r=this;return new d(function(){var e,n,u;return N(function(){if(n||(n=r.getEnumerator()),!u)for(u=[];n.moveNext();)u.push(n.getCurrent()),u.length>t&&u.shift();return 0===u.length?!1:(e=u.shift(),!0)},function(){return e},function(){n&&n.dispose()})})},E.skipLast=function(t){var r=this;return new d(function(){var e,n,u=[];return N(function(){for(n||(n=r.getEnumerator());;){if(!n.moveNext())return!1;if(u.push(n.getCurrent()),u.length>t)return e=u.shift(),!0}},function(){return e},function(){n&&n.dispose()})})},E.repeat=function(t){var r=this;return C(0,t).selectMany(function(){return r})},E["catch"]=E.catchException=function(t){if(0===arguments.length)return P(this);if("function"==typeof t)return g(this,t);var r=y.call(arguments);return r.unshift(this),P.apply(null,r)};var P=d["catch"]=d.catchException=function(){var t=d.fromArray(arguments);return new d(function(){var r,e,n,u;return N(function(){for(r||(r=t.getEnumerator());;){for(;;){if(!e){if(!r.moveNext()){if(u)throw u;return!1}u=null,e=r.getCurrent().getEnumerator()}var i,o;try{i=e.moveNext(),o=e.getCurrent()}catch(f){u=f,e.dispose(),e=null;break}if(!i){e.dispose(),e=null;break}return n=o,!0}if(null==u)break}},function(){return n},function(){e&&e.dispose(),r&&r.dispose()})})};E["finally"]=E.finallyDo=function(t){var r=this;return new d(function(){var e,n=!1;return N(function(){u||(u=r.getEnumerator());var e;try{return e=u.moveNext(),e?e:(t(),n=!0,!1)}catch(u){throw t(),n=!0,u}},function(){return e.getCurrent()},function(){!n&&t(),e&&e.dispose()})})},E.onErrorResumeNext=function(t){return S.apply(null,[this,t])};var S=d.onErrorResumeNext=function(){var t=arguments;return new d(function(){var r,e,n=0;return N(function(){for(;t.length>n;){e||(e=t[n].getEnumerator());try{var u=e.moveNext();if(u)return r=e.getCurrent(),!0}catch(i){}e.dispose(),e=null,n++}return!1},function(){return r},function(){e&&e.dispose()})})};E.retry=function(t){var r=this;return new d(function(){var e,n,u=t,i=null!=t;return N(function(){for(n||(n=r.getEnumerator());;)try{return n.moveNext()?(e=n.getCurrent(),!0):!1}catch(t){if(i&&0===--u)throw t;n=r.getEnumerator(),error=null}},function(){return e},function(){n.dispose()})})};var I=d["while"]=d.whileDo=function(t,r){return C(r).takeWhile(t).selectMany(u)};return d["if"]=d.ifThen=function(t,r,e){return e||(e=x()),O(function(){return t()?r:e})},d.doWhile=function(t,r){return t.concat(I(r,t))},d["case"]=d.switchCase=function(t,r,e){return e||(e=x()),O(function(){var n=r[t()];return n||(n=e),n})},d["for"]=d.forIn=function(t,r){return t.select(r)},e});

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

(function(t,r){function e(){}function n(t){return t}function i(t,r){return t>r?1:r>t?-1:0}function u(t,r){return H(t,r)}function o(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function a(t){return t&&"object"==typeof t?L.call(t)==D:!1}function f(t){return"function"==typeof t}function s(t,r,e,n){var i;if(t===r)return 0!==t||1/t==1/r;var u=typeof t,c=typeof r;if(!(t!==t||t&&N[u]||r&&N[c]))return!1;if(null==t||null==r)return t===r;var h=L.call(t),l=L.call(r);if(h==D&&(h=O),l==D&&(l=O),h!=l)return!1;switch(h){case z:case P:return+t==+r;case S:return t!=+t?r!=+r:0==t?1/t==1/r:t==+r;case q:case _:return t==r+""}var v=h==j;if(!v){if(h!=O||!k&&(o(t)||o(r)))return!1;var g=!K&&a(t)?Object:t.constructor,m=!K&&a(r)?Object:r.constructor;if(g!=m&&!(f(g)&&g instanceof g&&f(m)&&m instanceof m))return!1}for(var y=e.length;y--;)if(e[y]==t)return n[y]==r;var p=0;if(i=!0,e.push(t),n.push(r),v){for(y=t.length,p=r.length,i=p==t.length;p--;){var E=r[p];if(!(i=s(t[p],E,e,n)))break}return i}for(var w in r)if(I.call(r,w))return p++,i=I.call(t,w)&&s(t[w],r[w],e,n);if(i)for(var w in t)if(I.call(t,w))return i=--p>-1;return e.pop(),n.pop(),i}function c(t){if(false&t)return 2===t;for(var r=Math.sqrt(t),e=3;r>=e;){if(0===t%e)return!1;e+=2}return!0}function h(t){var r,e,n;for(r=0;M.length>r;++r)if(e=M[r],e>=t)return e;for(n=1|t;M[M.length-1]>n;){if(c(n))return n;n+=2}return t}function l(t){var r=0;if(!t.length)return r;for(var e=0,n=t.length;n>e;e++){var i=t.charCodeAt(e);r=(r<<5)-r+i,r&=r}return r}function v(t){var r=668265261;return t=61^t^t>>>16,t+=t<<3,t^=t>>>4,t*=r,t^=t>>>15}function g(){return{key:null,value:null,next:0,hashCode:0}}function m(t){t&&t.dispose()}function y(t,r,e,n){this.keySelector=t,this.comparer=r,this.descending=e,this.next=n}var p="object"==typeof exports&&exports,E=("object"==typeof module&&module&&module.exports==p&&module,"object"==typeof global&&global);E.global===E&&(t=E);var w={Internals:{}},x="Sequence contains no elements.",d="Invalid operation",C=Array.prototype.slice;({}).hasOwnProperty;var b=this.inherits=w.Internals.inherits=function(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e};w.Internals.addProperties=function(t){for(var r=C.call(arguments,1),e=0,n=r.length;n>e;e++){var i=r[e];for(var u in i)t[u]=i[u]}};var k,N={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},D="[object Arguments]",j="[object Array]",z="[object Boolean]",P="[object Date]",A="[object Function]",S="[object Number]",O="[object Object]",q="[object RegExp]",_="[object String]",L=Object.prototype.toString,I=Object.prototype.hasOwnProperty,K=L.call(arguments)==D;try{k=!(L.call(document)==O&&!({toString:0}+""))}catch(B){k=!0}K||(a=function(t){return t&&"object"==typeof t?I.call(t,"callee"):!1}),f(/x/)&&(f=function(t){return"function"==typeof t&&L.call(t)==A});var H=w.Internals.isEqual=function(t,r){return s(t,r,[],[])},M=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],V="no such key",W="duplicate key",F=function(){var t=0;return function(r){if(null==r)throw Error(V);if("string"==typeof r)return l(r);if("number"==typeof r)return v(r);if("boolean"==typeof r)return r===!0?1:0;if(r instanceof Date)return r.getTime();if(r.getHashCode)return r.getHashCode();var e=17*t++;return r.getHashCode=function(){return e},e}}(),G=function(t,r){if(0>t)throw Error("out of range");t>0&&this._initialize(t),this.comparer=r||i,this.freeCount=0,this.size=0,this.freeList=-1};DictionaryPrototype=G.prototype,DictionaryPrototype._initialize=function(t){var r,e=h(t);for(this.buckets=Array(e),this.entries=Array(e),r=0;e>r;r++)this.buckets[r]=-1,this.entries[r]=g();this.freeList=-1},DictionaryPrototype.add=function(t,r){return this._insert(t,r,!0)},DictionaryPrototype._insert=function(t,e,n){this.buckets||this._initialize(0);for(var i,u=2147483647&F(t),o=u%this.buckets.length,a=this.buckets[o];a>=0;a=this.entries[a].next)if(this.entries[a].hashCode===u&&this.comparer(this.entries[a].key,t)){if(n)throw Error(W);return this.entries[a].value=e,r}this.freeCount>0?(i=this.freeList,this.freeList=this.entries[i].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),o=u%this.buckets.length),i=this.size,++this.size),this.entries[i].hashCode=u,this.entries[i].next=this.buckets[o],this.entries[i].key=t,this.entries[i].value=e,this.buckets[o]=i},DictionaryPrototype._resize=function(){var t=h(2*this.size),r=Array(t);for(n=0;r.length>n;++n)r[n]=-1;var e=Array(t);for(n=0;this.size>n;++n)e[n]=this.entries[n];for(var n=this.size;t>n;++n)e[n]=g();for(var i=0;this.size>i;++i){var u=e[i].hashCode%t;e[i].next=r[u],r[u]=i}this.buckets=r,this.entries=e},DictionaryPrototype.remove=function(t){if(this.buckets)for(var r=2147483647&F(t),e=r%this.buckets.length,n=-1,i=this.buckets[e];i>=0;i=this.entries[i].next){if(this.entries[i].hashCode===r&&this.comparer(this.entries[i].key,t))return 0>n?this.buckets[e]=this.entries[i].next:this.entries[n].next=this.entries[i].next,this.entries[i].hashCode=-1,this.entries[i].next=this.freeList,this.entries[i].key=null,this.entries[i].value=null,this.freeList=i,++this.freeCount,!0;n=i}return!1},DictionaryPrototype.clear=function(){var t,r;if(!(0>=this.size)){for(t=0,r=this.buckets.length;r>t;++t)this.buckets[t]=-1;for(t=0;this.size>t;++t)this.entries[t]=g();this.freeList=-1,this.size=0}},DictionaryPrototype._findEntry=function(t){if(this.buckets)for(var r=2147483647&F(t),e=this.buckets[r%this.buckets.length];e>=0;e=this.entries[e].next)if(this.entries[e].hashCode===r&&this.comparer(this.entries[e].key,t))return e;return-1},DictionaryPrototype.length=function(){return this.size-this.freeCount},DictionaryPrototype.tryGetValue=function(t){var e=this._findEntry(t);return e>=0?this.entries[e].value:r},DictionaryPrototype.getValues=function(){var t=0,r=[];if(this.entries)for(var e=0;this.size>e;e++)this.entries[e].hashCode>=0&&(r[t++]=this.entries[e].value);return r},DictionaryPrototype.get=function(t){var r=this._findEntry(t);if(r>=0)return this.entries[r].value;throw Error(V)},DictionaryPrototype.set=function(t,r){this._insert(t,r,!1)},DictionaryPrototype.has=function(t){return this._findEntry(t)>=0},DictionaryPrototype.toEnumerable=function(){var t=this;return new Q(function(){var r,n=0;return T(function(){if(!t.entries)return!1;for(;;){if(!(t.size>n))return!1;if(t.entries[n].hashCode>=0){var e=t.entries[n];return r={key:e.key,value:e.value},n++,!0}}},function(){return r},e)})};var J=function(){function t(t){this.map=t}var r=t.prototype;return r.has=function(t){return this.map.has(t)},r.length=function(){return this.map.length()},r.get=function(t){return Y(this.map.get(t))},r.toEnumerable=function(){return this.map.toEnumerable().select(function(t){var r=Y(t.value);return r.key=t.key,r})},t}(),R=w.Enumerator=function(t,r,e){this.moveNext=t,this.getCurrent=r,this.dispose=e},T=R.create=function(t,r,n){var i=!1;return n||(n=e),new R(function(){if(i)return!1;var r=t();return r||(i=!0,n()),r},function(){return r()},function(){i||(n(),i=!0)})},Q=w.Enumerable=function(){function t(t){this.getEnumerator=t}function r(t,r,e){e||(e=n);var i=t,u=this.getEnumerator(),o=0;try{for(;u.moveNext();)i=r(i,u.getCurrent(),o++,this)}finally{u.dispose()}return e?e(i):i}function e(t){var r,e=this.getEnumerator(),n=0;try{if(!e.moveNext())throw Error(x);for(r=e.getCurrent();e.moveNext();)r=t(r,e.getCurrent(),n++,this)}catch(i){throw i}finally{e.dispose()}return r}function i(t,r){r||(r=u);for(var e=this.length;e--;)if(r(this[e],t))return e;return-1}function o(t,r){var e=i.call(this,t,r);return-1===e?!1:(this.splice(e,1),!0)}var a=t.prototype;return a.aggregate=function(){var t=1===arguments.length?e:r;return t.apply(this,arguments)},a.reduce=function(){return 2===arguments.length?r.call(this,arguments[1],arguments[0]):e.apply(this,arguments)},a.all=a.every=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)if(!t.call(r,e.getCurrent(),n++,this))return!1}catch(i){throw i}finally{m(e)}return!0},a.every=a.all,a.any=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)if(!t||t.call(r,e.getCurrent(),n++,this))return!0}catch(i){throw i}finally{m(e)}return!1},a.some=a.any,a.average=function(t){if(t)return this.select(t).average();var r=this.getEnumerator(),e=0,n=0;try{for(;r.moveNext();)e++,n+=r.getCurrent()}catch(i){throw i}finally{m(r)}if(0===e)throw Error(x);return n/e},a.concat=function(){var t=C.call(arguments,0);return t.unshift(this),U.apply(null,t)},a.contains=function(t,r){r||(r=u);var e=this.getEnumerator();try{for(;e.moveNext();)if(r(t,e.getCurrent()))return!0}catch(n){throw n}finally{m(e)}return!1},a.count=function(t,r){var e=0,n=0,i=this.getEnumerator();try{for(;i.moveNext();)(!t||t.call(r,i.getCurrent(),n++,this))&&e++}catch(u){throw u}finally{m(i)}return e},a.defaultIfEmpty=function(r){var e=this;return new t(function(){var t,n,i=!0,u=!1;return T(function(){return n||(n=e.getEnumerator()),u?!1:i?(i=!1,n.moveNext()?(t=n.getCurrent(),!0):(t=r,u=!0,!0)):n.moveNext()?(t=n.getCurrent(),!0):!1},function(){return t},function(){m(n)})})},a.distinct=function(r){r||(r=u);var e=this;return new t(function(){var t,n,u=[];return T(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return!1;var o=n.getCurrent();if(-1===i.call(u,o,r))return t=o,u.push(t),!0}},function(){return t},function(){m(n)})})},a.elementAt=function(t){return this.skip(t).first()},a.elementAtOrDefault=function(t){return this.skip(t).firstOrDefault()},a.except=function(r,e){e||(e=u);var n=this;return new t(function(){var t,u,o=[],a=r.getEnumerator();try{for(;a.moveNext();)o.push(a.getCurrent())}catch(f){throw f}finally{m(a)}return T(function(){for(u||(u=n.getEnumerator());;){if(!u.moveNext())return!1;if(t=u.getCurrent(),-1===i.call(o,t,e))return o.push(t),!0}},function(){return t},function(){m(u)})})},a.first=function(t){var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(!t||t(e))return e}}catch(n){throw n}finally{m(r)}throw Error(x)},a.firstOrDefault=function(t){var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(!t||t(e))return e}}catch(n){throw n}finally{m(r)}return null},a.forEach=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)t.call(r,e.getCurrent(),n++,this)}catch(i){throw i}finally{m(e)}},a.groupBy=function(r,e,i,o){e||(e=n),o||(o=u);var a=this;return new t(function(){var t,n,u,f,s,c=new G(0,o),h=[],l=0,v=a.getEnumerator();try{for(;v.moveNext();)u=v.getCurrent(),f=r(u),c.has(f)||(c.add(f,[]),h.push(f)),s=e(u),c.get(f).push(s)}catch(g){throw g}finally{m(v)}return T(function(){var r;return h.length>l?(n=h[l++],r=Y(c.get(n)),i?t=i(n,r):(r.key=n,t=r),!0):!1},function(){return t})})},a.groupJoin=function(r,e,i,o,a){var f=this;return a||(a=u),new t(function(){var t,u,s;return T(function(){if(t||(t=f.getEnumerator()),u||(u=r.toLookup(i,n,a)),!t.moveNext())return!1;var c=t.getCurrent(),h=u.get(e(c));return s=o(c,h),!0},function(){return s},function(){m(t)})})},a.join=function(r,e,i,o,a){var f=this;return a||(a=u),new t(function(){var t,u,s,c,h=0;return T(function(){for(t||(t=f.getEnumerator()),s||(s=r.toLookup(i,n,a));;){if(null!=c){var l=c[h++];if(l)return u=o(t.getCurrent(),l),!0;l=null,h=0}if(!t.moveNext())return!1;var v=e(t.getCurrent());c=s.has(v)?s.get(v).toArray():[]}},function(){return u},function(){m(t)})})},a.intersect=function(r,e){e||(e=u);var n=this;return new t(function(){var t,i,u=[],a=r.getEnumerator();try{for(;a.moveNext();)u.push(a.getCurrent())}catch(f){throw f}finally{m(a)}return T(function(){for(i||(i=n.getEnumerator());;){if(!i.moveNext())return!1;var r=i.getCurrent();if(o.call(u,r,e))return t=r,!0}},function(){return t},function(){m(i)})})},a.last=function(t){var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();(!t||t(i))&&(e=!0,r=i)}}catch(u){throw u}finally{m(n)}if(e)return r;throw Error(x)},a.lastOrDefault=function(t){var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();(!t||t(i))&&(e=!0,r=i)}}catch(u){throw u}finally{n.dispose()}return e?r:null},a.max=function(t){if(t)return this.select(t).max();var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();e?i>r&&(r=i):(r=i,e=!0)}}catch(u){throw u}finally{n.dispose()}if(!e)throw Error(x);return r},a.min=function(t){if(t)return this.select(t).min();var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();e?r>i&&(r=i):(r=i,e=!0)}}catch(u){throw u}finally{m(n)}if(!e)throw Error(x);return r},a.orderBy=function(t,r){return new $(this,t,r,!1)},a.orderByDescending=function(t,r){return new $(this,t,r,!0)},a.reverse=function(){var t=[],r=this.getEnumerator();try{for(;r.moveNext();)t.unshift(r.getCurrent())}catch(e){throw e}finally{m(r)}return Y(t)},a.select=function(r,e){var n=this;return new t(function(){var t,i,u=0;return T(function(){return i||(i=n.getEnumerator()),i.moveNext()?(t=r.call(e,i.getCurrent(),u++,n),!0):!1},function(){return t},function(){m(i)})})},a.map=a.select,a.selectMany=function(r,e){var n=this;return new t(function(){var t,i,u,o=0;return T(function(){for(i||(i=n.getEnumerator());;){if(!u){if(!i.moveNext())return!1;u=r(i.getCurrent(),o++).getEnumerator()}if(u.moveNext()){if(t=u.getCurrent(),e){var a=i.getCurrent();t=e(a,t)}return!0}m(u),u=null}},function(){return t},function(){m(u),m(i)})})},t.sequenceEqual=function(t,r,e){return t.sequenceEqual(r,e)},a.sequenceEqual=function(t,r){r||(r=u);var e=this.getEnumerator(),n=t.getEnumerator();try{for(;e.moveNext();)if(!n.moveNext()||!r(e.getCurrent(),n.getCurrent()))return!1;return n.moveNext()?!1:!0}catch(i){throw i}finally{m(e),m(n)}},a.single=function(t){if(t)return this.where(t).single();var r=this.getEnumerator();try{if(!r.moveNext())throw Error(x);var e=r.getCurrent();if(r.moveNext())throw Error(d);return e}catch(n){throw n}finally{m(r)}},a.singleOrDefault=function(t){if(t)return this.where(t).single();var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(r.moveNext())throw Error(d);return e}}catch(n){throw n}finally{m(r)}return null},a.skip=function(r){var e=this;return new t(function(){var t,n,i=!1;return T(function(){if(n||(n=e.getEnumerator()),!i){for(var u=0;r>u;u++)if(!n.moveNext())return!1;i=!0}return n.moveNext()?(t=n.getCurrent(),!0):!1},function(){return t},function(){m(n)})})},a.skipWhile=function(r,e){var n=this;return new t(function(){var t,i,u=!1,o=0;return T(function(){if(i||(i=n.getEnumerator()),!u){for(;;){if(!i.moveNext())return!1;var a=i.getCurrent();if(!r.call(e,a,o++,n))return t=a,!0}u=!0}return i.moveNext()?(t=i.getCurrent(),!0):!1},function(){return t},function(){m(i)})})},a.sum=function(t){if(t)return this.select(t).sum();var r=0,e=this.getEnumerator();try{for(;e.moveNext();)r+=e.getCurrent()}catch(n){throw n}finally{m(e)}return r},a.take=function(r){var e=this;return new t(function(){var t,n,i=r;return T(function(){return n||(n=e.getEnumerator()),0===i?!1:n.moveNext()?(i--,t=n.getCurrent(),!0):(i=0,!1)},function(){return t},function(){m(n)})})},a.takeWhile=function(r,e){var n=this;return new t(function(){var t,i,u=0;return T(function(){return i||(i=n.getEnumerator()),i.moveNext()?(t=i.getCurrent(),r.call(e,t,u++,n)?!0:!1):!1},function(){return t},function(){m(i)})})},a.toArray=function(){var t=[],r=this.getEnumerator();try{for(;r.moveNext();)t.push(r.getCurrent());return t}catch(r){throw r}finally{m(r)}},a.toDictionary=function(t,r,e){r||(r=n),e||(e=u);var i=new G(0,e),o=this.getEnumerator();try{for(;o.moveNext();){var a=o.getCurrent(),f=t(a);elem=r(a),i.add(f,elem)}return i}catch(s){throw s}finally{m(o)}},a.toLookup=function(t,r,e){r||(r=n),e||(e=u);var i=new G(0,e),o=this.getEnumerator();try{for(;o.moveNext();){var a=o.getCurrent(),f=t(a);elem=r(a),i.has(f)||i.add(f,[]),i.get(f).push(elem)}return new J(i)}catch(s){throw s}finally{m(o)}},a.where=function(r,e){var n=this;return new t(function(){var t,i,u=0;return T(function(){for(i||(i=n.getEnumerator());;){if(!i.moveNext())return!1;var o=i.getCurrent();if(r.call(e,o,u++,n))return t=o,!0}},function(){return t},function(){m(i)})})},a.filter=a.where,a.union=function(t,r){r||(r=u);var e=this;return X(function(){var n,u,o=[],a=!1,f=!1;return T(function(){for(;;){if(!u){if(f)return!1;a?(u=t.getEnumerator(),f=!0):(u=e.getEnumerator(),a=!0)}if(u.moveNext()){if(n=u.getCurrent(),-1===i.call(o,n,r))return o.push(n),!0}else m(u),u=null}},function(){return n},function(){m(u)})})},a.zip=function(r,e){var n=this;return new t(function(){var t,i,u;return T(function(){return t||i||(t=n.getEnumerator(),i=r.getEnumerator()),t.moveNext()&&i.moveNext()?(u=e(t.getCurrent(),i.getCurrent()),!0):!1},function(){return u},function(){m(t),m(i)})})},t}(),U=Q.concat=function(){return Y(arguments).selectMany(n)},X=Q.create=function(t){return new Q(t)};Q.empty=function(){return new Q(function(){return T(function(){return!1},function(){throw Error(x)})})};var Y=Q.fromArray=function(t){return new Q(function(){var r,e=0;return T(function(){return t.length>e?(r=t[e++],!0):!1},function(){return r})})},Z=Q.returnValue=function(t){return new Q(function(){var r=!1;return T(function(){return r?!1:r=!0},function(){return t})})};Q["return"]=Z,Q.range=function(t,r){return new Q(function(){var e=t-1,n=t+r-1;return T(function(){return n>e?(e++,!0):!1},function(){return e})})},Q.repeat=function(t,r){return new Q(function(){var e=null==r?-1:r,n=null!=r;return T(function(){return 0!==e?(n&&e--,!0):!1},function(){return t})})},y.prototype={computeKeys:function(t,r){this.keys=Array(r);for(var e=0;r>e;e++)this.keys[e]=this.keySelector(t[e]);this.next&&this.next.computeKeys(t,r)},compareKeys:function(t,r){var e=this.comparer(this.keys[t],this.keys[r]);return 0===e?null==this.next?t-r:this.next.compareKeys(t,r):this.descending?-e:e},sort:function(t,r){this.computeKeys(t,r);for(var e=Array(r),n=0;r>n;n++)e[n]=n;return this.quickSort(e,0,r-1),e},quickSort:function(t,r,e){do{var n=r,i=e,u=t[n+(i-n>>1)];do{for(;t.length>n&&this.compareKeys(u,t[n])>0;)n++;for(;i>=0&&0>this.compareKeys(u,t[i]);)i--;if(n>i)break;if(i>n){var o=t[n];t[n]=t[i],t[i]=o}n++,i--}while(i>=n);e-n>=i-r?(i>r&&this.quickSort(t,r,i),r=n):(e>n&&this.quickSort(t,n,e),e=i)}while(e>r)}};var $=function(){function t(t,r,e,u){this.source=t,this.keySelector=r||n,this.comparer=e||i,this.descending=u}b(t,Q);var r=t.prototype;return r.getEnumerableSorter=function(t){var r=new y(this.keySelector,this.comparer,this.descending,t);return null!=this.parent&&(r=this.parent.getEnumerableSorter(r)),r},r.createOrderedEnumerable=function(r,e,n){var i=new t(this.source,r,e,n);return i.parent=this,i},r.getEnumerator=function(){var t,r=this.source.toArray(),e=r.length,n=this.getEnumerableSorter(),i=n.sort(r,e),u=0;return T(function(){return e>u?(t=r[i[u++]],!0):!1},function(){return t})},r.thenBy=function(t){return this.createOrderedEnumerable(t,null,!1)},r.thenByDescending=function(t,r){return this.createOrderedEnumerable(t,r,!1)},t}();return"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t.Ix=w,define(function(){return w})):(p?"object"==typeof module&&module&&module.exports==p?module.exports=w:p=w:t.Ix=w,r)})(this);
(function(t,r){function e(){}function n(t){return t}function i(t,r){return t>r?1:r>t?-1:0}function u(t,r){return H(t,r)}function o(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function a(t){return t&&"object"==typeof t?L.call(t)==D:!1}function f(t){return"function"==typeof t}function s(t,r,e,n){var i;if(t===r)return 0!==t||1/t==1/r;var u=typeof t,c=typeof r;if(!(t!==t||t&&N[u]||r&&N[c]))return!1;if(null==t||null==r)return t===r;var h=L.call(t),l=L.call(r);if(h==D&&(h=O),l==D&&(l=O),h!=l)return!1;switch(h){case z:case P:return+t==+r;case S:return t!=+t?r!=+r:0==t?1/t==1/r:t==+r;case q:case _:return t==r+""}var v=h==j;if(!v){if(h!=O||!k&&(o(t)||o(r)))return!1;var g=!K&&a(t)?Object:t.constructor,m=!K&&a(r)?Object:r.constructor;if(g!=m&&!(f(g)&&g instanceof g&&f(m)&&m instanceof m))return!1}for(var y=e.length;y--;)if(e[y]==t)return n[y]==r;var p=0;if(i=!0,e.push(t),n.push(r),v){for(y=t.length,p=r.length,i=p==t.length;p--;){var E=r[p];if(!(i=s(t[p],E,e,n)))break}return i}for(var w in r)if(I.call(r,w))return p++,i=I.call(t,w)&&s(t[w],r[w],e,n);if(i)for(var w in t)if(I.call(t,w))return i=--p>-1;return e.pop(),n.pop(),i}function c(t){if(false&t)return 2===t;for(var r=Math.sqrt(t),e=3;r>=e;){if(0===t%e)return!1;e+=2}return!0}function h(t){var r,e,n;for(r=0;M.length>r;++r)if(e=M[r],e>=t)return e;for(n=1|t;M[M.length-1]>n;){if(c(n))return n;n+=2}return t}function l(t){var r=0;if(!t.length)return r;for(var e=0,n=t.length;n>e;e++){var i=t.charCodeAt(e);r=(r<<5)-r+i,r&=r}return r}function v(t){var r=668265261;return t=61^t^t>>>16,t+=t<<3,t^=t>>>4,t*=r,t^=t>>>15}function g(){return{key:null,value:null,next:0,hashCode:0}}function m(t){t&&t.dispose()}function y(t,r,e,n){this.keySelector=t,this.comparer=r,this.descending=e,this.next=n}var p="object"==typeof exports&&exports,E=("object"==typeof module&&module&&module.exports==p&&module,"object"==typeof global&&global);E.global===E&&(t=E);var w={Internals:{}},x="Sequence contains no elements.",d="Invalid operation",C=Array.prototype.slice;({}).hasOwnProperty;var b=this.inherits=w.Internals.inherits=function(t,r){function e(){this.constructor=t}e.prototype=r.prototype,t.prototype=new e};w.Internals.addProperties=function(t){for(var r=C.call(arguments,1),e=0,n=r.length;n>e;e++){var i=r[e];for(var u in i)t[u]=i[u]}};var k,N={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},D="[object Arguments]",j="[object Array]",z="[object Boolean]",P="[object Date]",A="[object Function]",S="[object Number]",O="[object Object]",q="[object RegExp]",_="[object String]",L=Object.prototype.toString,I=Object.prototype.hasOwnProperty,K=L.call(arguments)==D;try{k=!(L.call(document)==O&&!({toString:0}+""))}catch(B){k=!0}K||(a=function(t){return t&&"object"==typeof t?I.call(t,"callee"):!1}),f(/x/)&&(f=function(t){return"function"==typeof t&&L.call(t)==A});var H=w.Internals.isEqual=function(t,r){return s(t,r,[],[])},M=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],V="no such key",W="duplicate key",F=function(){var t=0;return function(r){if(null==r)throw Error(V);if("string"==typeof r)return l(r);if("number"==typeof r)return v(r);if("boolean"==typeof r)return r===!0?1:0;if(r instanceof Date)return r.getTime();if(r.getHashCode)return r.getHashCode();var e=17*t++;return r.getHashCode=function(){return e},e}}(),G=function(t,r){if(0>t)throw Error("out of range");t>0&&this._initialize(t),this.comparer=r||i,this.freeCount=0,this.size=0,this.freeList=-1};DictionaryPrototype=G.prototype,DictionaryPrototype._initialize=function(t){var r,e=h(t);for(this.buckets=Array(e),this.entries=Array(e),r=0;e>r;r++)this.buckets[r]=-1,this.entries[r]=g();this.freeList=-1},DictionaryPrototype.add=function(t,r){return this._insert(t,r,!0)},DictionaryPrototype._insert=function(t,e,n){this.buckets||this._initialize(0);for(var i,u=2147483647&F(t),o=u%this.buckets.length,a=this.buckets[o];a>=0;a=this.entries[a].next)if(this.entries[a].hashCode===u&&this.comparer(this.entries[a].key,t)){if(n)throw Error(W);return this.entries[a].value=e,r}this.freeCount>0?(i=this.freeList,this.freeList=this.entries[i].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),o=u%this.buckets.length),i=this.size,++this.size),this.entries[i].hashCode=u,this.entries[i].next=this.buckets[o],this.entries[i].key=t,this.entries[i].value=e,this.buckets[o]=i},DictionaryPrototype._resize=function(){var t=h(2*this.size),r=Array(t);for(n=0;r.length>n;++n)r[n]=-1;var e=Array(t);for(n=0;this.size>n;++n)e[n]=this.entries[n];for(var n=this.size;t>n;++n)e[n]=g();for(var i=0;this.size>i;++i){var u=e[i].hashCode%t;e[i].next=r[u],r[u]=i}this.buckets=r,this.entries=e},DictionaryPrototype.remove=function(t){if(this.buckets)for(var r=2147483647&F(t),e=r%this.buckets.length,n=-1,i=this.buckets[e];i>=0;i=this.entries[i].next){if(this.entries[i].hashCode===r&&this.comparer(this.entries[i].key,t))return 0>n?this.buckets[e]=this.entries[i].next:this.entries[n].next=this.entries[i].next,this.entries[i].hashCode=-1,this.entries[i].next=this.freeList,this.entries[i].key=null,this.entries[i].value=null,this.freeList=i,++this.freeCount,!0;n=i}return!1},DictionaryPrototype.clear=function(){var t,r;if(!(0>=this.size)){for(t=0,r=this.buckets.length;r>t;++t)this.buckets[t]=-1;for(t=0;this.size>t;++t)this.entries[t]=g();this.freeList=-1,this.size=0}},DictionaryPrototype._findEntry=function(t){if(this.buckets)for(var r=2147483647&F(t),e=this.buckets[r%this.buckets.length];e>=0;e=this.entries[e].next)if(this.entries[e].hashCode===r&&this.comparer(this.entries[e].key,t))return e;return-1},DictionaryPrototype.length=function(){return this.size-this.freeCount},DictionaryPrototype.tryGetValue=function(t){var e=this._findEntry(t);return e>=0?this.entries[e].value:r},DictionaryPrototype.getValues=function(){var t=0,r=[];if(this.entries)for(var e=0;this.size>e;e++)this.entries[e].hashCode>=0&&(r[t++]=this.entries[e].value);return r},DictionaryPrototype.get=function(t){var r=this._findEntry(t);if(r>=0)return this.entries[r].value;throw Error(V)},DictionaryPrototype.set=function(t,r){this._insert(t,r,!1)},DictionaryPrototype.has=function(t){return this._findEntry(t)>=0},DictionaryPrototype.toEnumerable=function(){var t=this;return new Q(function(){var r,n=0;return T(function(){if(!t.entries)return!1;for(;;){if(!(t.size>n))return!1;if(t.entries[n].hashCode>=0){var e=t.entries[n];return r={key:e.key,value:e.value},n++,!0}}},function(){return r},e)})};var J=function(){function t(t){this.map=t}var r=t.prototype;return r.has=function(t){return this.map.has(t)},r.length=function(){return this.map.length()},r.get=function(t){return Y(this.map.get(t))},r.toEnumerable=function(){return this.map.toEnumerable().select(function(t){var r=Y(t.value);return r.key=t.key,r})},t}(),R=w.Enumerator=function(t,r,e){this.moveNext=t,this.getCurrent=r,this.dispose=e},T=R.create=function(t,r,n){var i=!1;return n||(n=e),new R(function(){if(i)return!1;var r=t();return r||(i=!0,n()),r},function(){return r()},function(){i||(n(),i=!0)})},Q=w.Enumerable=function(){function t(t){this.getEnumerator=t}function r(t,r,e){e||(e=n);var i=t,u=this.getEnumerator(),o=0;try{for(;u.moveNext();)i=r(i,u.getCurrent(),o++,this)}finally{u.dispose()}return e?e(i):i}function e(t){var r,e=this.getEnumerator(),n=0;try{if(!e.moveNext())throw Error(x);for(r=e.getCurrent();e.moveNext();)r=t(r,e.getCurrent(),n++,this)}catch(i){throw i}finally{e.dispose()}return r}function i(t,r){r||(r=u);for(var e=this.length;e--;)if(r(this[e],t))return e;return-1}function o(t,r){var e=i.call(this,t,r);return-1===e?!1:(this.splice(e,1),!0)}var a=t.prototype;return a.aggregate=function(){var t=1===arguments.length?e:r;return t.apply(this,arguments)},a.reduce=function(){return 2===arguments.length?r.call(this,arguments[1],arguments[0]):e.apply(this,arguments)},a.all=a.every=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)if(!t.call(r,e.getCurrent(),n++,this))return!1}catch(i){throw i}finally{m(e)}return!0},a.every=a.all,a.any=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)if(!t||t.call(r,e.getCurrent(),n++,this))return!0}catch(i){throw i}finally{m(e)}return!1},a.some=a.any,a.average=function(t){if(t)return this.select(t).average();var r=this.getEnumerator(),e=0,n=0;try{for(;r.moveNext();)e++,n+=r.getCurrent()}catch(i){throw i}finally{m(r)}if(0===e)throw Error(x);return n/e},a.concat=function(){var t=C.call(arguments,0);return t.unshift(this),U.apply(null,t)},a.contains=function(t,r){r||(r=u);var e=this.getEnumerator();try{for(;e.moveNext();)if(r(t,e.getCurrent()))return!0}catch(n){throw n}finally{m(e)}return!1},a.count=function(t,r){var e=0,n=0,i=this.getEnumerator();try{for(;i.moveNext();)(!t||t.call(r,i.getCurrent(),n++,this))&&e++}catch(u){throw u}finally{m(i)}return e},a.defaultIfEmpty=function(r){var e=this;return new t(function(){var t,n,i=!0,u=!1;return T(function(){return n||(n=e.getEnumerator()),u?!1:i?(i=!1,n.moveNext()?(t=n.getCurrent(),!0):(t=r,u=!0,!0)):n.moveNext()?(t=n.getCurrent(),!0):!1},function(){return t},function(){m(n)})})},a.distinct=function(r){r||(r=u);var e=this;return new t(function(){var t,n,u=[];return T(function(){for(n||(n=e.getEnumerator());;){if(!n.moveNext())return!1;var o=n.getCurrent();if(-1===i.call(u,o,r))return t=o,u.push(t),!0}},function(){return t},function(){m(n)})})},a.elementAt=function(t){return this.skip(t).first()},a.elementAtOrDefault=function(t){return this.skip(t).firstOrDefault()},a.except=function(r,e){e||(e=u);var n=this;return new t(function(){var t,u,o=[],a=r.getEnumerator();try{for(;a.moveNext();)o.push(a.getCurrent())}catch(f){throw f}finally{m(a)}return T(function(){for(u||(u=n.getEnumerator());;){if(!u.moveNext())return!1;if(t=u.getCurrent(),-1===i.call(o,t,e))return o.push(t),!0}},function(){return t},function(){m(u)})})},a.first=function(t){var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(!t||t(e))return e}}catch(n){throw n}finally{m(r)}throw Error(x)},a.firstOrDefault=function(t){var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(!t||t(e))return e}}catch(n){throw n}finally{m(r)}return null},a.forEach=function(t,r){var e=this.getEnumerator(),n=0;try{for(;e.moveNext();)t.call(r,e.getCurrent(),n++,this)}catch(i){throw i}finally{m(e)}},a.groupBy=function(r,e,i,o){e||(e=n),o||(o=u);var a=this;return new t(function(){var t,n,u,f,s,c=new G(0,o),h=[],l=0,v=a.getEnumerator();try{for(;v.moveNext();)u=v.getCurrent(),f=r(u),c.has(f)||(c.add(f,[]),h.push(f)),s=e(u),c.get(f).push(s)}catch(g){throw g}finally{m(v)}return T(function(){var r;return h.length>l?(n=h[l++],r=Y(c.get(n)),i?t=i(n,r):(r.key=n,t=r),!0):!1},function(){return t})})},a.groupJoin=function(r,e,i,o,a){var f=this;return a||(a=u),new t(function(){var t,u,s;return T(function(){if(t||(t=f.getEnumerator()),u||(u=r.toLookup(i,n,a)),!t.moveNext())return!1;var c=t.getCurrent(),h=u.get(e(c));return s=o(c,h),!0},function(){return s},function(){m(t)})})},a.join=function(r,e,i,o,a){var f=this;return a||(a=u),new t(function(){var t,u,s,c,h=0;return T(function(){for(t||(t=f.getEnumerator()),s||(s=r.toLookup(i,n,a));;){if(null!=c){var l=c[h++];if(l)return u=o(t.getCurrent(),l),!0;l=null,h=0}if(!t.moveNext())return!1;var v=e(t.getCurrent());c=s.has(v)?s.get(v).toArray():[]}},function(){return u},function(){m(t)})})},a.intersect=function(r,e){e||(e=u);var n=this;return new t(function(){var t,i,u=[],a=r.getEnumerator();try{for(;a.moveNext();)u.push(a.getCurrent())}catch(f){throw f}finally{m(a)}return T(function(){for(i||(i=n.getEnumerator());;){if(!i.moveNext())return!1;var r=i.getCurrent();if(o.call(u,r,e))return t=r,!0}},function(){return t},function(){m(i)})})},a.last=function(t){var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();(!t||t(i))&&(e=!0,r=i)}}catch(u){throw u}finally{m(n)}if(e)return r;throw Error(x)},a.lastOrDefault=function(t){var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();(!t||t(i))&&(e=!0,r=i)}}catch(u){throw u}finally{n.dispose()}return e?r:null},a.max=function(t){if(t)return this.select(t).max();var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();e?i>r&&(r=i):(r=i,e=!0)}}catch(u){throw u}finally{n.dispose()}if(!e)throw Error(x);return r},a.min=function(t){if(t)return this.select(t).min();var r,e=!1,n=this.getEnumerator();try{for(;n.moveNext();){var i=n.getCurrent();e?r>i&&(r=i):(r=i,e=!0)}}catch(u){throw u}finally{m(n)}if(!e)throw Error(x);return r},a.orderBy=function(t,r){return new Z(this,t,r,!1)},a.orderByDescending=function(t,r){return new Z(this,t,r,!0)},a.reverse=function(){var t=[],r=this.getEnumerator();try{for(;r.moveNext();)t.unshift(r.getCurrent())}catch(e){throw e}finally{m(r)}return Y(t)},a.select=function(r,e){var n=this;return new t(function(){var t,i,u=0;return T(function(){return i||(i=n.getEnumerator()),i.moveNext()?(t=r.call(e,i.getCurrent(),u++,n),!0):!1},function(){return t},function(){m(i)})})},a.map=a.select,a.selectMany=function(r,e){var n=this;return new t(function(){var t,i,u,o=0;return T(function(){for(i||(i=n.getEnumerator());;){if(!u){if(!i.moveNext())return!1;u=r(i.getCurrent(),o++).getEnumerator()}if(u.moveNext()){if(t=u.getCurrent(),e){var a=i.getCurrent();t=e(a,t)}return!0}m(u),u=null}},function(){return t},function(){m(u),m(i)})})},t.sequenceEqual=function(t,r,e){return t.sequenceEqual(r,e)},a.sequenceEqual=function(t,r){r||(r=u);var e=this.getEnumerator(),n=t.getEnumerator();try{for(;e.moveNext();)if(!n.moveNext()||!r(e.getCurrent(),n.getCurrent()))return!1;return n.moveNext()?!1:!0}catch(i){throw i}finally{m(e),m(n)}},a.single=function(t){if(t)return this.where(t).single();var r=this.getEnumerator();try{if(!r.moveNext())throw Error(x);var e=r.getCurrent();if(r.moveNext())throw Error(d);return e}catch(n){throw n}finally{m(r)}},a.singleOrDefault=function(t){if(t)return this.where(t).single();var r=this.getEnumerator();try{for(;r.moveNext();){var e=r.getCurrent();if(r.moveNext())throw Error(d);return e}}catch(n){throw n}finally{m(r)}return null},a.skip=function(r){var e=this;return new t(function(){var t,n,i=!1;return T(function(){if(n||(n=e.getEnumerator()),!i){for(var u=0;r>u;u++)if(!n.moveNext())return!1;i=!0}return n.moveNext()?(t=n.getCurrent(),!0):!1},function(){return t},function(){m(n)})})},a.skipWhile=function(r,e){var n=this;return new t(function(){var t,i,u=!1,o=0;return T(function(){if(i||(i=n.getEnumerator()),!u){for(;;){if(!i.moveNext())return!1;var a=i.getCurrent();if(!r.call(e,a,o++,n))return t=a,!0}u=!0}return i.moveNext()?(t=i.getCurrent(),!0):!1},function(){return t},function(){m(i)})})},a.sum=function(t){if(t)return this.select(t).sum();var r=0,e=this.getEnumerator();try{for(;e.moveNext();)r+=e.getCurrent()}catch(n){throw n}finally{m(e)}return r},a.take=function(r){var e=this;return new t(function(){var t,n,i=r;return T(function(){return n||(n=e.getEnumerator()),0===i?!1:n.moveNext()?(i--,t=n.getCurrent(),!0):(i=0,!1)},function(){return t},function(){m(n)})})},a.takeWhile=function(r,e){var n=this;return new t(function(){var t,i,u=0;return T(function(){return i||(i=n.getEnumerator()),i.moveNext()?(t=i.getCurrent(),r.call(e,t,u++,n)?!0:!1):!1},function(){return t},function(){m(i)})})},a.toArray=function(){var t=[],r=this.getEnumerator();try{for(;r.moveNext();)t.push(r.getCurrent());return t}catch(r){throw r}finally{m(r)}},a.toDictionary=function(t,r,e){r||(r=n),e||(e=u);var i=new G(0,e),o=this.getEnumerator();try{for(;o.moveNext();){var a=o.getCurrent(),f=t(a);elem=r(a),i.add(f,elem)}return i}catch(s){throw s}finally{m(o)}},a.toLookup=function(t,r,e){r||(r=n),e||(e=u);var i=new G(0,e),o=this.getEnumerator();try{for(;o.moveNext();){var a=o.getCurrent(),f=t(a);elem=r(a),i.has(f)||i.add(f,[]),i.get(f).push(elem)}return new J(i)}catch(s){throw s}finally{m(o)}},a.where=function(r,e){var n=this;return new t(function(){var t,i,u=0;return T(function(){for(i||(i=n.getEnumerator());;){if(!i.moveNext())return!1;var o=i.getCurrent();if(r.call(e,o,u++,n))return t=o,!0}},function(){return t},function(){m(i)})})},a.filter=a.where,a.union=function(t,r){r||(r=u);var e=this;return X(function(){var n,u,o=[],a=!1,f=!1;return T(function(){for(;;){if(!u){if(f)return!1;a?(u=t.getEnumerator(),f=!0):(u=e.getEnumerator(),a=!0)}if(u.moveNext()){if(n=u.getCurrent(),-1===i.call(o,n,r))return o.push(n),!0}else m(u),u=null}},function(){return n},function(){m(u)})})},a.zip=function(r,e){var n=this;return new t(function(){var t,i,u;return T(function(){return t||i||(t=n.getEnumerator(),i=r.getEnumerator()),t.moveNext()&&i.moveNext()?(u=e(t.getCurrent(),i.getCurrent()),!0):!1},function(){return u},function(){m(t),m(i)})})},t}(),U=Q.concat=function(){return Y(arguments).selectMany(n)},X=Q.create=function(t){return new Q(t)};Q.empty=function(){return new Q(function(){return T(function(){return!1},function(){throw Error(x)})})};var Y=Q.fromArray=function(t){return new Q(function(){var r,e=0;return T(function(){return t.length>e?(r=t[e++],!0):!1},function(){return r})})};Q["return"]=Q.returnValue=function(t){return new Q(function(){var r=!1;return T(function(){return r?!1:r=!0},function(){return t})})},Q.range=function(t,r){return new Q(function(){var e=t-1,n=t+r-1;return T(function(){return n>e?(e++,!0):!1},function(){return e})})},Q.repeat=function(t,r){return new Q(function(){var e=null==r?-1:r,n=null!=r;return T(function(){return 0!==e?(n&&e--,!0):!1},function(){return t})})},y.prototype={computeKeys:function(t,r){this.keys=Array(r);for(var e=0;r>e;e++)this.keys[e]=this.keySelector(t[e]);this.next&&this.next.computeKeys(t,r)},compareKeys:function(t,r){var e=this.comparer(this.keys[t],this.keys[r]);return 0===e?null==this.next?t-r:this.next.compareKeys(t,r):this.descending?-e:e},sort:function(t,r){this.computeKeys(t,r);for(var e=Array(r),n=0;r>n;n++)e[n]=n;return this.quickSort(e,0,r-1),e},quickSort:function(t,r,e){do{var n=r,i=e,u=t[n+(i-n>>1)];do{for(;t.length>n&&this.compareKeys(u,t[n])>0;)n++;for(;i>=0&&0>this.compareKeys(u,t[i]);)i--;if(n>i)break;if(i>n){var o=t[n];t[n]=t[i],t[i]=o}n++,i--}while(i>=n);e-n>=i-r?(i>r&&this.quickSort(t,r,i),r=n):(e>n&&this.quickSort(t,n,e),e=i)}while(e>r)}};var Z=function(){function t(t,r,e,u){this.source=t,this.keySelector=r||n,this.comparer=e||i,this.descending=u}b(t,Q);var r=t.prototype;return r.getEnumerableSorter=function(t){var r=new y(this.keySelector,this.comparer,this.descending,t);return null!=this.parent&&(r=this.parent.getEnumerableSorter(r)),r},r.createOrderedEnumerable=function(r,e,n){var i=new t(this.source,r,e,n);return i.parent=this,i},r.getEnumerator=function(){var t,r=this.source.toArray(),e=r.length,n=this.getEnumerableSorter(),i=n.sort(r,e),u=0;return T(function(){return e>u?(t=r[i[u++]],!0):!1},function(){return t})},r.thenBy=function(t){return this.createOrderedEnumerable(t,null,!1)},r.thenByDescending=function(t,r){return this.createOrderedEnumerable(t,r,!1)},t}();return"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t.Ix=w,define(function(){return w})):(p?"object"==typeof module&&module&&module.exports==p?module.exports=w:p=w:t.Ix=w,r)})(this);

@@ -5,3 +5,3 @@ {

"description": "Library for composing asynchronous and event-based operations in JavaScript",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "http://rx.codeplex.com",

@@ -8,0 +8,0 @@ "author": {

@@ -29,3 +29,3 @@ # The Interactive Extensions for JavaScript... #

This project has moved to [CodePlex](http://rx.codeplex.com/) and only serves as a mirror.
This project is a mirror of the [CodePlex](http://rx.codeplex.com/) repository.

@@ -41,3 +41,3 @@ ## About the Interactive Extensions Extensions ##

- [Ix.Enumerable class](https://github.com/Reactive-Extensions/IxJS/wiki/Enumerable)
You can find the documentation [here](https://github.com/Reactive-Extensions/IxJS/tree/master/doc) as well as examples [here](https://github.com/Reactive-Extensions/IxJS/tree/master/examples).

@@ -44,0 +44,0 @@ ## Installation and Usage ##

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