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

immutable

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable - npm Package Compare versions

Comparing version 2.3.2 to 2.5.0

102

dist/Immutable.d.ts

@@ -205,2 +205,11 @@ /**

/**
* Converts this sequence to a Stack, discarding keys. Throws if values
* are not hashable.
*
* Note: This is equivalent to `Stack.from(this)`, but provided to allow for
* chained expressions.
*/
toStack(): Stack<V>;
/**
* Converts this sequence to a Vector, discarding keys.

@@ -490,8 +499,17 @@ *

/**
* Flattens nested Sequences by one level.
* Flattens nested Sequences.
*
* Note: `flatten` operates on Sequence<any, Sequence<K, V>> and
* Will deeply flatten the Sequence by default, but a `depth` can be
* provided in the form of a number or boolean (where true means to
* shallowly flatten one level). A depth of 0 (or shallow: false) will
* deeply flatten.
*
* Flattens anything Sequencible (Arrays, Objects) with the exception of
* Strings.
*
* Note: `flatten(true)` operates on Sequence<any, Sequence<K, V>> and
* returns Sequence<K, V>
*/
flatten(): Sequence<any, any>;
flatten(depth?: number): Sequence<any, any>;
flatten(shallow?: boolean): Sequence<any, any>;

@@ -520,3 +538,3 @@ /**

*/
getIn(searchKeyPath: Array<K>, notSetValue?: V): V;
getIn(searchKeyPath: Array<any>, notSetValue?: any): any;

@@ -955,3 +973,4 @@ /**

*/
flatten(): IndexedSequence<any>;
flatten(depth?: number): IndexedSequence<any>;
flatten(shallow?: boolean): IndexedSequence<any>;

@@ -1194,20 +1213,2 @@ /**

/**
* When this cursor's (or any of its sub-cursors') `update` method is called,
* the resulting new data structure will be provided to the `onChange`
* function. Use this callback to keep track of the most current value or
* update the rest of your application.
*/
cursor(
onChange?: (newValue: Map<K, V>, oldValue?: Map<K, V>, keyPath?: Array<any>) => void
): Cursor<Map<K, V>>;
cursor(
keyPath: Array<any>,
onChange?: (newValue: Map<K, V>, oldValue?: Map<K, V>, keyPath?: Array<any>) => void
): Cursor<any>;
cursor(
key: K,
onChange?: (newValue: Map<K, V>, oldValue?: Map<K, V>, keyPath?: Array<any>) => void
): Cursor<V>;
/**
* Returns a new Map having updated the value at this `key` with the return

@@ -1351,2 +1352,20 @@ * value of calling `updater` with the existing value, or `notSetValue` if

asImmutable(): Map<K, V>;
/**
* When this cursor's (or any of its sub-cursors') `update` method is called,
* the resulting new data structure will be provided to the `onChange`
* function. Use this callback to keep track of the most current value or
* update the rest of your application.
*/
cursor(
onChange?: (newValue: Map<K, V>, oldValue?: Map<K, V>, keyPath?: Array<any>) => void
): Cursor<Map<K, V>>;
cursor(
keyPath: Array<any>,
onChange?: (newValue: Map<K, V>, oldValue?: Map<K, V>, keyPath?: Array<any>) => void
): Cursor<any>;
cursor(
key: K,
onChange?: (newValue: Map<K, V>, oldValue?: Map<K, V>, keyPath?: Array<any>) => void
): Cursor<V>;
}

@@ -1670,18 +1689,2 @@

/**
* @see Map.cursor
*/
cursor(
onChange?: (newValue: Vector<T>, oldValue?: Vector<T>, keyPath?: Array<any>) => void
): Cursor<Vector<T>>;
cursor(
keyPath: Array<any>,
onChange?: (newValue: Vector<T>, oldValue?: Vector<T>, keyPath?: Array<any>) => void
): Cursor<any>;
cursor(
key: number,
onChange?: (newValue: Vector<T>, oldValue?: Vector<T>, keyPath?: Array<any>) => void
): Cursor<T>;
/**
* Returns a new Vector with an updated value at `index` with the return

@@ -1772,2 +1775,17 @@ * value of calling `updater` with the existing value, or `notSetValue` if

asImmutable(): Vector<T>;
/**
* @see Map.cursor
*/
cursor(
onChange?: (newValue: Vector<T>, oldValue?: Vector<T>, keyPath?: Array<any>) => void
): Cursor<Vector<T>>;
cursor(
keyPath: Array<any>,
onChange?: (newValue: Vector<T>, oldValue?: Vector<T>, keyPath?: Array<any>) => void
): Cursor<any>;
cursor(
key: number,
onChange?: (newValue: Vector<T>, oldValue?: Vector<T>, keyPath?: Array<any>) => void
): Cursor<T>;
}

@@ -1855,2 +1873,8 @@

/**
* Alias for `Stack#unshiftAll`.
*/
pushAll(seq: Sequence<any, T>): Stack<T>;
pushAll(seq: Array<T>): Stack<T>;
/**
* Alias for `Stack#shift` and is not equivalent to `Vector#pop`.

@@ -1857,0 +1881,0 @@ */

@@ -9,25 +9,25 @@ /**

*/
function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=Ae.create(u)}else i=t.prototype;return Ae.keys(e).forEach(function(t){i[t]=e[t]}),Ae.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return Ae.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(t){return t.value=!1,t}function i(t){t&&(t.value=!0)}function u(){}function a(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function s(t,e){if(!t)throw Error(e)}function o(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if((0|t)===t)return t&Le;t=""+t,e="string"}return"string"===e?t.length>Te?h(t):c(t):t.hashCode?o("function"==typeof t.hashCode?t.hashCode():t.hashCode):f(t)}function h(t){var e=He[t];return null==e&&(e=c(t),Ge===Fe&&(Ge=0,He={}),Ge++,He[t]=e),e}function c(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&Le;return e}function f(t){var e=t[Ne];if(e)return e;if(!Be){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ne])return e;if(e=_(t))return e}if(!Be||Object.isExtensible(t)){if(e=++Ve&Le,Be)Object.defineProperty(t,Ne,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(Je&&t.propertyIsEnumerable===Je)t.propertyIsEnumerable=function(){return Je.apply(this,arguments)},t.propertyIsEnumerable[Ne]=e;else{if(!t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Ne]=e}return e}throw Error("Non-extensible objects are not allowed as keys.")}function _(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function l(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function v(){return{value:void 0,done:!0}}function g(t){return!!d(t)}function p(t){return t&&"function"==typeof t.next}function m(t){var e=d(t);return"function"==typeof e?e.call(t):void 0}function d(t){return t&&(t[$e]||t[Ze])}function y(t){return null==t.length&&t.cacheResult(),s(1/0>t.length,"Cannot reverse infinite range."),t.length
}function w(t,e,r){return(0===t||null!=r&&-r>=t)&&(null==e||null!=r&&e>=r)}function S(t,e){return b(t,e,0)}function I(t,e){return b(t,e,e)}function b(t,e,r){return null==t?r:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function q(t){return t}function x(t,e){return[e,t]}function k(){return!0}function D(t){return function(){return!t.apply(this,arguments)}}function M(t){return"string"==typeof t?JSON.stringify(t):t}function O(t,e){return t>e?1:e>t?-1:0}function C(t,e){return 0>e?(null==t.length&&t.cacheResult(),t.length+e):e}function A(t){s(1/0!==t,"Cannot perform this action with an infinite sequence.")}function E(t,e,r,n){var i=t._cache;if(i){for(var u=i.length-1,a=0;u>=a;a++){var s=i[r?u-a:a];if(e(s[1],n?s[0]:a,t)===!1)return a+1}return a}return t.__iterateUncached(e,r)}function j(t,e,r,n){var i=t._cache;if(i){var u=i.length-1,a=0;return new tr(function(){var t=i[r?u-a:a];return a++>u?v():l(e,n?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,r)}function R(t){var e=t.__makeSequence();return e.length=t.length,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)},e.contains=function(e){return t.has(e)},e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Ye){var n=t.__iterator(e,r);return new tr(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===Xe?Qe:Xe,r)},e}function U(t,e,r){var n=t.__makeSequence();return n.length=t.length,n.has=function(e){return t.has(e)},n.get=function(n,i){var u=t.get(n,We);return u===We?i:e.call(r,u,n,t)},n.__iterateUncached=function(n,i){var u=this;return t.__iterate(function(t,i,a){return n(e.call(r,t,i,a),i,u)!==!1},i)},n.__iteratorUncached=function(n,i){var u=t.__iterator(Ye,i);return new tr(function(){var i=u.next();if(i.done)return i;var a=i.value,s=a[0];return l(n,s,e.call(r,a[1],s,t),i)})},n}function P(t){var e=t.__makeSequence();
return e.length=t.length,e.reverse=function(){return t},e.flip=function(){var e=t.flip.apply(this);return e.reverse=function(){return t.flip()},e},e.get=function(e,r){return t.get(e,r)},e.has=function(e){return t.has(e)},e.contains=function(e){return t.contains(e)},e.cacheResult=function(){return t.cacheResult(),this.length=t.length,this},e.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},e.__iterator=function(e,r){return t.__iterator(e,!r)},e}function W(t,e,r,n){var i=t.__makeSequence();return i.has=function(n){var i=t.get(n,We);return i!==We&&!!e.call(r,i,n,t)},i.get=function(n,i){var u=t.get(n,We);return u!==We&&e.call(r,u,n,t)?u:i},i.__iterateUncached=function(i,u){var a=this,s=0;return t.__iterate(function(t,u,o){return e.call(r,t,u,o)?(s++,i(t,n?u:s-1,a)):void 0},u),s},i.__iteratorUncached=function(i,u){var a=t.__iterator(Ye,u),s=0;return new tr(function(){for(;;){var u=a.next();if(u.done)return u;var o=u.value,h=o[0],c=o[1];if(e.call(r,c,h,t))return l(i,n?h:s++,c,u)}})},i}function K(t,e,r,n){var i={},u=[];return t.__iterate(function(a,s){var h=e.call(r,a,s,t),c=o(h),f=n?[s,a]:a;i.hasOwnProperty(c)?u[i[c]][1].push(f):(i[c]=u.length,u.push([h,[f]]))}),rr(u).fromEntrySeq().map(n?function(t){return rr(t).fromEntrySeq()}:function(t){return rr(t)})}function z(t,e){if(e>t.length)return t;0>e&&(e=0);var r=t.__makeSequence();return r.length=t.length&&Math.min(t.length,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0;return t.__iterate(function(t,n){return++u&&r(t,n,i)!==!1&&e>u}),u},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),u=0;return new tr(function(){return u++>e?v():i.next()})},r}function J(t,e,r){var n=t.__makeSequence();return n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++a&&n(t,i,u)}),a},n.__iteratorUncached=function(n,i){var u=this;
if(i)return this.cacheResult().__iterator(n,i);var a=t.__iterator(Ye,i),s=!0;return new tr(function(){if(!s)return v();var t=a.next();if(t.done)return t;var i=t.value,o=i[0],h=i[1];return e.call(r,h,o,u)?n===Ye?t:l(n,o,h,t):(s=!1,v())})},n}function B(t,e,r){if(0>=e)return t;var n=t.__makeSequence();return n.length=t.length&&Math.max(0,t.length-e),n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var a=0,s=!0,o=0;return t.__iterate(function(t,i){return s&&(s=a++<e)?void 0:(o++,n(t,r?i:o-1,u))}),o},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var u=e&&t.__iterator(n,i),a=0,s=0;return new tr(function(){for(;e>a;)a++,u.next();var t=u.next();return r||n===Xe?t:n===Qe?l(n,s++,null,t):l(n,s++,t.value[1],t)})},n}function L(t,e,r,n){var i=t.__makeSequence();return i.__iterateUncached=function(i,u){var a=this;if(u)return this.cacheResult().__iterate(i,u);var s=!0,o=0;return t.__iterate(function(t,u,h){return s&&(s=e.call(r,t,u,h))?void 0:(o++,i(t,n?u:o-1,a))}),o},i.__iteratorUncached=function(i,u){var a=this;if(u)return this.cacheResult().__iterator(i,u);var s=t.__iterator(Ye,u),o=!0,h=0;return new tr(function(){var t,u,c;do{if(t=s.next(),t.done)return n||i===Xe?t:i===Qe?l(i,h++,null,t):l(i,h++,t.value[1],t);var f=t.value;u=f[0],c=f[1],o&&(o=e.call(r,c,u,a))}while(o);return i===Ye?t:l(i,u,c,t)})},i}function V(t,e,r){var n=[t].concat(e),i=rr(n);return r&&(i=i.toKeyedSeq()),i=i.flatten(),i.length=n.reduce(function(t,e){if(void 0!==t){var r=rr(e).length;if(null!=r)return t+r}},0),i}function N(t,e){var r=t.__makeSequence();return r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){var a=!1;return rr(t).__iterate(function(t,n){return r(t,e?n:u++,i)===!1?(a=!0,!1):void 0},n),!a},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(Xe,n),a=0;return new tr(function(){for(;;){if(i){var t=i.next();if(!t.done)return e||r===Xe?t:r===Qe?l(r,a++,null,t):l(r,a++,t.value[1],t)}var s=u.next();if(s.done)return s;i=rr(s.value).__iterator(r,n)
}})},r}function T(t,e){var r=t.__makeSequence();return r.length=t.length&&2*t.length-1,r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){return(!u||r(e,u++,i)!==!1)&&r(t,u++,i)!==!1},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(Xe,n),a=0;return new tr(function(){return(!i||a%2)&&(i=u.next(),i.done)?i:a%2?l(r,a++,e):l(r,a++,i.value,i)})},r}function F(t,e,r){return r instanceof rr?G(t,e,r):r}function G(t,e,r){return new gr(t._rootData,t._keyPath.concat(e),t._onChange,r)}function H(t,e,r){var n=t._rootData.updateIn(t._keyPath,r?pr.empty():void 0,e),i=t._keyPath||[];return t._onChange&&t._onChange.call(void 0,n,t._rootData,r?i.concat(r):i),new gr(n,t._keyPath,t._onChange)}function Q(t,e){return t instanceof gr&&(t=t.deref()),e instanceof gr&&(e=e.deref()),t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t instanceof rr?t.equals(e):!1}function X(t,e){return l(t,e[0],e[1])}function Y(t,e){return{node:t,index:0,__prev:e}}function Z(t,e,r,n){var i=Object.create(dr);return i.length=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function $(t,e,r){var i=n(Ke),u=n(ze),a=te(t._root,t.__ownerID,0,o(e),e,r,i,u);if(!u.value)return t;var s=t.length+(i.value?r===We?-1:1:0);return t.__ownerID?(t.length=s,t._root=a,t.__hash=void 0,t.__altered=!0,t):a?Z(s,a):pr.empty()}function te(t,e,r,n,u,a,s,o){return t?t.update(e,r,n,u,a,s,o):a===We?t:(i(o),i(s),new xr(e,n,[u,a]))}function ee(t){return t.constructor===xr||t.constructor===br}function re(t,e,r,n,i){if(t.hash===n)return new br(e,n,[t.entry,i]);var u,a=(0===r?t.hash:t.hash>>>r)&Pe,s=(0===r?n:n>>>r)&Pe,o=a===s?[re(t,e,r+Re,n,i)]:(u=new xr(e,n,i),s>a?[t,u]:[u,t]);return new yr(e,1<<a|1<<s,o)}function ne(t,e,r,n){for(var i=0,u=0,a=Array(r),s=0,o=1,h=e.length;h>s;s++,o<<=1){var c=e[s];null!=c&&s!==n&&(i|=o,a[u++]=c)}return new yr(t,i,a)}function ie(t,e,r,n,i){for(var u=0,a=Array(Ue),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[u++]:null;return a[n]=i,new Sr(t,u+1,a)}function ue(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u instanceof rr||(u=rr(u),u instanceof ur&&(u=u.fromEntrySeq())),u&&n.push(u)
}return se(t,e,n)}function ae(t){return function(e,r){return e&&e.mergeDeepWith?e.mergeDeepWith(t,r):t?t(e,r):r}}function se(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){var i=t.get(n,We);t.set(n,i===We?r:e(i,r))}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function oe(t,e,r,n,i){var u=e.length;if(i===u)return n(t);s(t.set,"updateIn with invalid keyPath");var a=i===u-1?r:pr.empty(),o=e[i],h=t.get(o,a),c=oe(h,e,r,n,i+1);return c===h?t:t.set(o,c)}function he(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ce(t,e,r,n){var i=n?t:a(t);return i[e]=r,i}function fe(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),a=0,s=0;i>s;s++)s===e?(u[s]=r,a=-1):u[s]=t[s+a];return u}function _e(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,a=0;n>a;a++)a===e&&(u=1),i[a]=t[a+u];return i}function le(t,e,r,n,i,u){var a,s=t&&t.array;if(0===e){var o=0>r?-r:0,h=n-r;for(h>Ue&&(h=Ue),a=o;h>a;a++)if(i(s&&s[u?o+h-1-a:a])===!1)return!1}else{var c=1<<e,f=e-Re;for(a=0;Pe>=a;a++){var _=u?Pe-a:a,l=r+(_<<e);if(n>l&&l+c>0){var v=s&&s[_];if(!le(v,f,l,n,i,u))return!1}}}return!0}function ve(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,rawMax:n-r>>e,index:0,__prev:i}}function ge(t,e,r,n,i,u,a){var s=Object.create(jr);return s.length=e-t,s._origin=t,s._size=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=u,s.__hash=a,s.__altered=!1,s}function pe(t,e,r){if(e=C(t,e),e>=t.length||0>e)return r===We?t:t.withMutations(function(t){0>e?we(t,e).set(0,r):we(t,0,e+1).set(e,r)});e+=t._origin;var i=t._tail,u=t._root,a=n(ze);return e>=Ie(t._size)?i=me(i,t.__ownerID,0,e,r,a):u=me(u,t.__ownerID,t._level,e,r,a),a.value?t.__ownerID?(t._root=u,t._tail=i,t.__hash=void 0,t.__altered=!0,t):ge(t._origin,t._size,t._level,u,i):t}function me(t,e,r,n,u,a){var s,o=u===We,h=n>>>r&Pe,c=t&&t.array.length>h;if(o&&!c)return t;if(r>0){var f=t&&t.array[h],_=me(f,e,r-Re,n,u,a);return _===f?t:(s=de(t,e),s.array[h]=_,s)
}return!o&&c&&t.array[h]===u?t:(i(a),s=de(t,e),o&&h===s.array.length-1?s.array.pop():s.array[h]=o?void 0:u,s)}function de(t,e){return e&&t&&e===t.ownerID?t:new Rr(t?t.array.slice():[],e)}function ye(t,e){if(e>=Ie(t._size))return t._tail;if(1<<t._level+Re>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&Pe],n-=Re;return r}}function we(t,e,r){var n=t.__ownerID||new u,i=t._origin,a=t._size,s=i+e,o=null==r?a:0>r?a+r:i+r;if(s===i&&o===a)return t;if(s>=o)return t.clear();for(var h=t._level,c=t._root,f=0;0>s+f;)c=new Rr(c&&c.array.length?[null,c]:[],n),h+=Re,f+=1<<h;f&&(s+=f,i+=f,o+=f,a+=f);for(var _=Ie(a),l=Ie(o);l>=1<<h+Re;)c=new Rr(c&&c.array.length?[c]:[],n),h+=Re;var v=t._tail,g=_>l?ye(t,o-1):l>_?new Rr([],n):v;if(v&&l>_&&a>s&&v.array.length){c=de(c,n);for(var p=c,m=h;m>Re;m-=Re){var d=_>>>m&Pe;p=p.array[d]=de(p.array[d],n)}p.array[_>>>Re&Pe]=v}if(a>o&&(g=g&&g.removeAfter(n,0,o)),s>=l)s-=l,o-=l,h=Re,c=null,g=g&&g.removeBefore(n,0,s);else if(s>i||_>l){var y,w;f=0;do y=s>>>h&Pe,w=l-1>>>h&Pe,y===w&&(y&&(f+=(1<<h)*y),h-=Re,c=c&&c.array[y]);while(c&&y===w);c&&s>i&&(c=c&&c.removeBefore(n,h,s-f)),c&&_>l&&(c=c&&c.removeAfter(n,h,l-f)),f&&(s-=f,o-=f)}return t.__ownerID?(t.length=o-s,t._origin=s,t._size=o,t._level=h,t._root=c,t._tail=g,t.__hash=void 0,t.__altered=!0,t):ge(s,o,h,c,g)}function Se(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u&&n.push(rr(u))}var a=Math.max.apply(null,n.map(function(t){return t.length||0}));return a>t.length&&(t=t.setLength(a)),se(t,e,n)}function Ie(t){return Ue>t?0:t-1>>>Re<<Re}function be(t,e,r,n){var i=Object.create(Jr);return i.length=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function qe(t,e){var r=Object.create(Nr);return r.length=t?t.length:0,r._map=t,r.__ownerID=e,r}function xe(t,e,r,n){var i=Object.create(Fr.prototype);return i.length=t?t.length:0,i._map=t,i._vector=e,i.__ownerID=r,i.__hash=n,i}function ke(t,e,r){var n=t._map,i=t._vector,u=n.get(e),a=void 0!==u,s=r===We;if(!a&&s||a&&r===i.get(u)[1])return t;a||(u=i.length);var o=s?n.remove(e):a?n:n.set(e,u),h=s?i.remove(u):i.set(u,[e,r]);
return t.__ownerID?(t.length=o.length,t._map=o,t._vector=h,t.__hash=void 0,t):xe(o,h)}function De(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Me(t,e){return e?Oe(e,t,"",{"":t}):Ce(t)}function Oe(t,e,r,n){return e&&(Array.isArray(e)||e.constructor===Object)?t.call(n,r,rr(e).map(function(r,n){return Oe(t,r,n,e)})):e}function Ce(t){if(t){if(Array.isArray(t))return rr(t).map(Ce).toVector();if(t.constructor===Object)return rr(t).map(Ce).toMap()}return t}var Ae=Object,Ee={};Ee.createClass=t,Ee.superCall=e,Ee.defaultSuperCall=r;var je="delete",Re=5,Ue=1<<Re,Pe=Ue-1,We={},Ke={value:!1},ze={value:!1},Je=Object.prototype.propertyIsEnumerable,Be=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),Le=2147483647,Ve=0,Ne="__immutablehash__";"undefined"!=typeof Symbol&&(Ne=Symbol(Ne));var Te=16,Fe=255,Ge=0,He={},Qe=0,Xe=1,Ye=2,Ze="@@iterator",$e="undefined"!=typeof Symbol?Symbol.iterator:Ze,tr=function(t){this.next=t};Ee.createClass(tr,{toString:function(){return"[Iterator]"}},{});var er=tr.prototype;er.inspect=er.toSource=function(){return""+this},er[$e]=function(){return this};var rr=function(t){return nr.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},nr=rr;Ee.createClass(rr,{toArray:function(){A(this.length);var t=Array(this.length||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toJS:function(){return this.map(function(t){return t instanceof nr?t.toJS():t}).__toJS()},toMap:function(){return A(this.length),pr.from(this)},toObject:function(){A(this.length);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return A(this.length),Fr.from(this)},toSet:function(){return A(this.length),Lr.from(this)},toVector:function(){return A(this.length),Ar.from(this)},toString:function(){return this.__toString("Seq {","}")},__toString:function(t,e){return 0===this.length?t+e:t+" "+this.map(this.__toStringMapper).join(", ")+" "+e},__toStringMapper:function(t,e){return e+": "+M(t)},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];
return V(this,t,!0)},contains:function(t){return this.find(function(e){return Q(e,t)},null,We)!==We},entries:function(){return this.__iterator(Ye)},every:function(t,e){var r=!0;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},filter:function(t,e){return W(this,t,e,!0)},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},join:function(t){t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!=n?n:""}),e},keys:function(){return this.__iterator(Qe)},map:function(t,e){return U(this,t,e)},reduce:function(t,e,r){var n,i;return 2>arguments.length?i=!0:n=e,this.__iterate(function(e,u,a){i?(i=!1,n=e):n=t.call(r,n,e,u,a)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return P(this)},slice:function(t,e){if(w(t,e,this.length))return this;var r=S(t,this.length),n=I(e,this.length);if(r!==r||n!==n)return this.cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return null==n||n===this.length?i:i.take(n-r)},some:function(t,e){return!this.every(D(t),e)},sort:function(t){return this.sortBy(q,t)},values:function(){return this.__iterator(Xe)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return t?this.filter(t,e).count():(null==this.length&&(this.length=this.__iterate(k)),this.length)},countBy:function(t,e){var r=this,n={},i=[];return this.__iterate(function(u,a){var s=t.call(e,u,a,r),h=o(s);n.hasOwnProperty(h)?i[n[h]][1]++:(n[h]=i.length,i.push([s,1]))}),nr(i).fromEntrySeq()},equals:function(t){if(this===t)return!0;if(!(t instanceof nr))return!1;if(null!=this.length&&null!=t.length){if(this.length!==t.length)return!1;if(0===this.length&&0===t.length)return!0}return null!=this.__hash&&null!=t.__hash&&this.__hash!==t.__hash?!1:this.__deepEquals(t)},__deepEquals:function(t){var e=this.entries();return t.every(function(t,r){var n=e.next().value;return n&&Q(n[0],r)&&Q(n[1],t)
})&&e.next().done},entrySeq:function(){var t=this;if(t._cache)return nr(t._cache);var e=t.toKeyedSeq().map(x).valueSeq();return e.fromEntries=function(){return t},e},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(k)},flatMap:function(t,e){return this.map(t,e).flatten()},flatten:function(){return N(this,!0)},flip:function(){return R(this)},get:function(t,e){return this.find(function(e,r){return Q(r,t)},null,e)},getIn:function(t,e){var r=this;if(t)for(var n=0;t.length>n;n++)if(r=r&&r.get?r.get(t[n],We):We,r===We)return e;return r},groupBy:function(t,e){return K(this,t,e,!0)},has:function(t){return this.get(t,We)!==We},keySeq:function(){return this.flip().valueSeq()},last:function(){return this.findLast(k)},mapEntries:function(t,e){var r=this;return this.entrySeq().map(function(n,i){return t.call(e,n,i,r)}).fromEntrySeq()},mapKeys:function(t,e){var r=this;return this.flip().map(function(n,i){return t.call(e,n,i,r)}).flip()},rest:function(){return this.slice(1)},skip:function(t){return B(this,t,!0)},skipLast:function(t){return this.reverse().skip(t).reverse()},skipWhile:function(t,e){return L(this,t,e,!0)},skipUntil:function(t,e){return this.skipWhile(D(t),e)},sortBy:function(t,e){e=e||O;var r=this;return nr(this.entrySeq().entrySeq().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq()},take:function(t){return z(this,t)},takeLast:function(t){return this.reverse().take(t).reverse()},takeWhile:function(t,e){return J(this,t,e)},takeUntil:function(t,e){return this.takeWhile(D(t),e)},toKeyedSeq:function(){return this},valueSeq:function(){return new _r(this)},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(A(this.length),this._cache=this.entrySeq().toArray(),null==this.length&&(this.length=this._cache.length)),this
},hashCode:function(){return this.__hash||(this.__hash=1/0===this.length?0:this.reduce(function(t,e,r){return t+(o(e)^(e===r?0:o(r)))&Le},0))},__makeSequence:function(){return Object.create(ir)},__iterate:function(t,e){return E(this,t,e,!0)},__iterator:function(t,e){return j(this,t,e,!0)}},{from:function(t){if(t instanceof nr)return t;if(!Array.isArray(t)){if(p(t))return new or(t);if(g(t))return new hr(t);if(t&&t.constructor===Object)return new cr(t);t=[t]}return new fr(t)}});var ir=rr.prototype;ir[$e]=ir.entries,ir.toJSON=ir.toJS,ir.__toJS=ir.toObject,ir.inspect=ir.toSource=function(){return""+this},ir.chain=ir.flatMap;var ur=function(){Ee.defaultSuperCall(this,ar.prototype,arguments)},ar=ur;Ee.createClass(ur,{toString:function(){return this.__toString("Seq [","]")},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return V(this,t,!1)},filter:function(t,e){return W(this,t,e,!1)},findIndex:function(t,e){var r=this.findKey(t,e);return null==r?-1:r},indexOf:function(t){return this.findIndex(function(e){return Q(e,t)})},lastIndexOf:function(t){return this.toKeyedSeq().reverse().indexOf(t)},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=S(t,this.length);var n=this.slice(0,t);return 1===r?n:n.concat(a(arguments,2),this.slice(t+e))},findLastIndex:function(t,e){return this.toKeyedSeq().reverse().findIndex(t,e)},first:function(){return this.get(0)},flatten:function(){return N(this,!1)},flip:function(){return R(this.toKeyedSeq())},fromEntrySeq:function(){return new vr(this)},get:function(t,e){return t=C(this,t),0>t||1/0===this.length||null!=this.length&&t>this.length?e:this.find(function(e,r){return r===t},null,e)},groupBy:function(t,e){return K(this,t,e,!1)},has:function(t){return t=C(this,t),t>=0&&(null!=this.length?1/0===this.length||this.length>t:-1!==this.indexOf(t))},interpose:function(t){return T(this,t)},last:function(){return this.get(this.length?this.length-1:0)},skip:function(t){var e=this,r=B(e,t,!1);return r!==e&&(r.get=function(r,n){return r=C(this,r),r>=0?e.get(r+t,n):n
}),r},skipWhile:function(t,e){return L(this,t,e,!1)},sortBy:function(t,e){e=e||O;var r=this;return rr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq()},take:function(t){var e=this,r=z(e,t);return r!==e&&(r.get=function(r,n){return r=C(this,r),r>=0&&t>r?e.get(r,n):n}),r},toKeyedSeq:function(){return new lr(this)},valueSeq:function(){return this},__makeSequence:function(){return Object.create(sr)},__iterate:function(t,e){return E(this,t,e,!1)},__iterator:function(t,e){return j(this,t,e,!1)}},{},rr);var sr=ur.prototype;sr[$e]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=M;var or=function(t){this._iterator=t,this._iteratorCache=[]};Ee.createClass(or,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var a=u.value;if(n[i]=a,t(a,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new tr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return l(t,i,n[i++])})}},{},ur);var hr=function(t){this._iterable=t,this.length=t.length||t.size};Ee.createClass(hr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=m(r),i=0;if(p(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=m(r);if(!p(n))return new tr(function(){return v()});var i=0;return new tr(function(){var e=n.next();return e.done?e:l(t,i++,e.value)})}},{},ur);var cr=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};Ee.createClass(cr,{toObject:function(){return this._object},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var a=n[e?i-u:u];
if(t(r[a],a,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new tr(function(){var a=n[e?i-u:u];return u++>i?v():l(t,a,r[a])})}},{},rr);var fr=function(t){this._array=t,this.length=t.length};Ee.createClass(fr,{toArray:function(){return this._array},get:function(t,e){return this.has(t)?this._array[C(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new tr(function(){return i>n?v():l(t,i,r[e?n-i++:i++])})}},{},ur);var _r=function(t){this._seq=t,this.length=t.length};Ee.createClass(_r,{get:function(t,e){return this._seq.get(t,e)},has:function(t){return this._seq.has(t)},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this,n=0;return this._seq.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Xe,e),n=0;return new tr(function(){var e=r.next();return e.done?e:l(t,n++,e.value,e)})}},{},ur);var lr=function(t){this._seq=t,this.length=t.length};Ee.createClass(lr,{get:function(t,e){return this._seq.get(t,e)},has:function(t){return this._seq.has(t)},valueSeq:function(){return this._seq},reverse:function(){var t=this,e=P(this);return e.valueSeq=function(){return t._seq.reverse()},e},map:function(t,e){var r=this,n=U(this,t,e);return n.valueSeq=function(){return r._seq.map(t,e)},n},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this,n=e?y(this):0;return this._seq.__iterate(function(i){return t(i,e?--n:n++,r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Xe,e),n=e?y(this):0;return new tr(function(){var i=r.next();return i.done?i:l(t,e?--n:n++,i.value,i)})}},{},rr);var vr=function(t){this._seq=t,this.length=t.length};Ee.createClass(vr,{entrySeq:function(){return this._seq},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this
},__iterate:function(t,e){var r=this;return this._seq.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Xe,e);return new tr(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return t===Ye?e:l(t,n[0],n[1],e)}})}},{},rr);var gr=function(t,e,r,n){n=n?n:t.getIn(e),this.length=n instanceof rr?n.length:null,this._rootData=t,this._keyPath=e,this._onChange=r};Ee.createClass(gr,{deref:function(t){return this._rootData.getIn(this._keyPath,t)},get:function(t,e){if(Array.isArray(t)&&0===t.length)return this;var r=this._rootData.getIn(this._keyPath.concat(t),We);return r===We?e:F(this,t,r)},set:function(t,e){return H(this,function(r){return r.set(t,e)},t)},remove:function(t){return H(this,function(e){return e.remove(t)},t)},clear:function(){return H(this,function(t){return t.clear()})},update:function(t,e,r){return 1===arguments.length?H(this,t):H(this,function(n){return n.update(t,e,r)},t)},withMutations:function(t){return H(this,function(e){return(e||pr.empty()).withMutations(t)})},cursor:function(t){return Array.isArray(t)&&0===t.length?this:G(this,t)},__iterate:function(t,e){var r=this,n=this.deref();return n&&n.__iterate?n.__iterate(function(e,n){return t(F(r,n,e),n,r)},e):0},__iterator:function(t,e){var r=this,n=this.deref(),i=n&&n.__iterator&&n.__iterator(Ye,e);return new tr(function(){if(!i)return v();var e=i.next();if(e.done)return e;var n=e.value,u=n[0],a=n[1];return l(t,u,F(r,u,a),e)})}},{},rr),gr.prototype[je]=gr.prototype.remove,gr.prototype.getIn=gr.prototype.get;var pr=function(t){var e=mr.empty();return t?t.constructor===mr?t:e.merge(t):e},mr=pr;Ee.createClass(pr,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,o(t),t,e):e},set:function(t,e){return $(this,t,e)},remove:function(t){return $(this,t,We)},update:function(t,e,r){return 1===arguments.length?this.updateIn([],null,t):this.updateIn([t],e,r)},updateIn:function(t,e,r){var n;return r||(n=[e,r],r=n[0],e=n[1],n),oe(this,t,e,r,0)
},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):mr.empty()},merge:function(){return ue(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return ue(this,t,e)},mergeDeep:function(){return ue(this,ae(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return ue(this,ae(t),e)},cursor:function(t,e){return e||"function"!=typeof t?0===arguments.length?t=[]:Array.isArray(t)||(t=[t]):(e=t,t=[]),new gr(this,t,e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new u)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new Dr(this,t,e)},__iterate:function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Z(this.length,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{empty:function(){return Mr||(Mr=Z(0))}},rr);var dr=pr.prototype;dr[je]=dr.remove,pr.from=pr;var yr=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},wr=yr;Ee.createClass(yr,{get:function(t,e,r,n){var i=1<<((0===t?e:e>>>t)&Pe),u=this.bitmap;return 0===(u&i)?n:this.nodes[he(u&i-1)].get(t+Re,e,r,n)},update:function(t,e,r,n,i,u,a){var s=(0===e?r:r>>>e)&Pe,o=1<<s,h=this.bitmap,c=0!==(h&o);if(!c&&i===We)return this;var f=he(h&o-1),_=this.nodes,l=c?_[f]:null,v=te(l,t,e+Re,r,n,i,u,a);if(v===l)return this;if(!c&&v&&_.length>=Or)return ie(t,_,h,s,v);if(c&&!v&&2===_.length&&ee(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&ee(v))return v;var g=t&&t===this.ownerID,p=c?v?h:h^o:h|o,m=c?v?ce(_,f,v,g):_e(_,f,g):fe(_,f,v,g);return g?(this.bitmap=p,this.nodes=m,this):new wr(t,p,m)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1
}},{});var Sr=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},Ir=Sr;Ee.createClass(Sr,{get:function(t,e,r,n){var i=(0===t?e:e>>>t)&Pe,u=this.nodes[i];return u?u.get(t+Re,e,r,n):n},update:function(t,e,r,n,i,u,a){var s=(0===e?r:r>>>e)&Pe,o=i===We,h=this.nodes,c=h[s];if(o&&!c)return this;var f=te(c,t,e+Re,r,n,i,u,a);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,Cr>_))return ne(t,h,_,s)}else _++;var l=t&&t===this.ownerID,v=ce(h,s,f,l);return l?(this.count=_,this.nodes=v,this):new Ir(t,_,v)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}}},{});var br=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r},qr=br;Ee.createClass(br,{get:function(t,e,r,n){for(var i=this.entries,u=0,a=i.length;a>u;u++)if(Q(r,i[u][0]))return i[u][1];return n},update:function(t,e,r,n,u,s,o){var h=u===We;if(r!==this.hash)return h?this:(i(o),i(s),re(this,t,e,r,[n,u]));for(var c=this.entries,f=0,_=c.length;_>f&&!Q(n,c[f][0]);f++);var l=_>f;if(h&&!l)return this;if(i(o),(h||!l)&&i(s),h&&2===_)return new xr(t,this.hash,c[1^f]);var v=t&&t===this.ownerID,g=v?c:a(c);return l?h?f===_-1?g.pop():g[f]=g.pop():g[f]=[n,u]:g.push([n,u]),v?(this.entries=g,this):new qr(t,this.hash,g)},iterate:function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1}},{});var xr=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},kr=xr;Ee.createClass(xr,{get:function(t,e,r,n){return Q(r,this.entry[0])?this.entry[1]:n},update:function(t,e,r,n,u,a,s){var o=u===We,h=Q(n,this.entry[0]);return(h?u===this.entry[1]:o)?this:(i(s),o?(i(a),null):h?t&&t===this.ownerID?(this.entry[1]=u,this):new kr(t,r,[n,u]):(i(a),re(this,t,e,r,[n,u])))},iterate:function(t){return t(this.entry)}},{});var Dr=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Y(t._root)};Ee.createClass(Dr,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return X(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return X(t,n.entries[this._reverse?r-i:i])
}else if(r=n.nodes.length-1,r>=i){var u=n.nodes[this._reverse?r-i:i];if(u){if(u.entry)return X(t,u.entry);e=this._stack=Y(u,e)}continue}e=this._stack=this._stack.__prev}return v()}},{},tr);var Mr,Or=Ue/2,Cr=Ue/4,Ar=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Er.from(t)},Er=Ar;Ee.createClass(Ar,{toString:function(){return this.__toString("Vector [","]")},get:function(t,e){if(t=C(this,t),0>t||t>=this.length)return e;t+=this._origin;var r=ye(this,t);return r&&r.array[t&Pe]},set:function(t,e){return pe(this,t,e)},remove:function(t){return pe(this,t,We)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=this._origin=this._size=0,this._level=Re,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Er.empty()},push:function(){var t=arguments,e=this.length;return this.withMutations(function(r){we(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return we(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){we(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return we(this,1)},merge:function(){return Se(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Se(this,t,e)},mergeDeep:function(){return Se(this,ae(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Se(this,ae(t),e)},setLength:function(t){return we(this,0,t)},slice:function(t,e){var r=Ee.superCall(this,Er.prototype,"slice",[t,e]);if(r!==this){var n=this,i=n.length;r.toVector=function(){return we(n,0>t?Math.max(0,i+t):i?Math.min(i,t):t,null==e?i:0>e?Math.max(0,i+e):i?Math.min(i,e):e)}}return r},__iterator:function(t,e){return new Pr(this,t,e)},__iterate:function(t,e){var r=this,n=0,i=function(e){return t(e,n++,r)},u=Ie(this._size);return e?le(this._tail,0,u-this._origin,this._size-this._origin,i,e)&&le(this._root,this._level,-this._origin,u-this._origin,i,e):le(this._root,this._level,-this._origin,u-this._origin,i,e)&&le(this._tail,0,u-this._origin,this._size-this._origin,i,e),n
},__ensureOwner:function(t){return t===this.__ownerID?this:t?ge(this._origin,this._size,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{empty:function(){return Wr||(Wr=ge(0,0,Re))},from:function(t){if(!t||0===t.length)return Er.empty();if(t.constructor===Er)return t;var e=Array.isArray(t);return t.length>0&&Ue>t.length?ge(0,t.length,Re,null,new Rr(e?a(t):rr(t).toArray())):(e||(t=rr(t).valueSeq()),Er.empty().merge(t))}},ur);var jr=Ar.prototype;jr[je]=jr.remove,jr.update=dr.update,jr.updateIn=dr.updateIn,jr.cursor=dr.cursor,jr.withMutations=dr.withMutations,jr.asMutable=dr.asMutable,jr.asImmutable=dr.asImmutable,jr.wasAltered=dr.wasAltered;var Rr=function(t,e){this.array=t,this.ownerID=e},Ur=Rr;Ee.createClass(Rr,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&Pe;if(n>=this.array.length)return new Ur([],t);var i,u=0===n;if(e>0){var a=this.array[n];if(i=a&&a.removeBefore(t,e-Re,r),i===a&&u)return this}if(u&&!i)return this;var s=de(this,t);if(!u)for(var o=0;n>o;o++)s.array[o]=void 0;return i&&(s.array[n]=i),s},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&Pe;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var a=this.array[n];if(i=a&&a.removeAfter(t,e-Re,r),i===a&&u)return this}if(u&&!i)return this;var s=de(this,t);return u||s.array.pop(),i&&(s.array[n]=i),s}},{});var Pr=function(t,e,r){this._type=e,this._reverse=!!r,this._maxIndex=t.length-1;var n=Ie(t._size),i=ve(t._root&&t._root.array,t._level,-t._origin,n-t._origin-1),u=ve(t._tail&&t._tail.array,0,n-t._origin,t._size-t._origin-1);this._stack=r?u:i,this._stack.__prev=r?i:u};Ee.createClass(Pr,{next:function(){for(var t=this._stack;t;){var e=t.array,r=t.index++;if(this._reverse&&(r=Pe-r,r>t.rawMax&&(r=t.rawMax,t.index=Ue-r)),r>=0&&Ue>r&&t.rawMax>=r){var n=e&&e[r];if(0===t.level){var i,u=this._type;return 1!==u&&(i=t.offset+(r<<t.level),this._reverse&&(i=this._maxIndex-i)),l(u,i,n)}this._stack=t=ve(n&&n.array,t.level-Re,t.offset+(r<<t.level),t.max,t)
}else t=this._stack=this._stack.__prev}return v()}},{},tr);var Wr,Kr=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return zr.from(t)},zr=Kr;Ee.createClass(Kr,{toString:function(){return this.__toString("Stack [","]")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value},unshift:function(){if(0===arguments.length)return this;for(var t=this.length+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.length=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):be(t,e)},unshiftAll:function(t){if(t=rr(t),0===t.length)return this;var e=this.length,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.length=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):be(e,r)},shift:function(){return this.slice(1)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):zr.empty()},slice:function(t,e){if(w(t,e,this.length))return this;var r=S(t,this.length),n=I(e,this.length);if(n!==this.length)return Ee.superCall(this,zr.prototype,"slice",[t,e]);for(var i=this.length-r,u=this._head;r--;)u=u.next;return this.__ownerID?(this.length=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):be(i,u)},__ensureOwner:function(t){return t===this.__ownerID?this:t?be(this.length,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=0,n=this._head;return new tr(function(){if(n){var e=n.value;return n=n.next,l(t,r++,e)}return v()})}},{empty:function(){return Br||(Br=be(0))},from:function(t){var e=zr.empty();return t?t.constructor===zr?t:e.unshiftAll(t):e}},ur);var Jr=Kr.prototype;Jr.push=Jr.unshift,Jr.pop=Jr.shift,Jr.withMutations=dr.withMutations,Jr.asMutable=dr.asMutable,Jr.asImmutable=dr.asImmutable,Jr.wasAltered=dr.wasAltered;
var Br,Lr=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Vr.from(t)},Vr=Lr;Ee.createClass(Lr,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},get:function(t,e){return this.has(t)?t:e},add:function(t){var e=this._map.set(t,null);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:qe(e)},remove:function(t){var e=this._map.remove(t);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:0===e.length?Vr.empty():qe(e)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this):Vr.empty()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++)rr(t[r]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return rr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return rr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},isSubset:function(t){return t=rr(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=rr(t),t.every(function(t){return e.contains(t)})},wasAltered:function(){return this._map.wasAltered()},hashCode:function(){return this._map.hashCode()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?qe(e,t):(this.__ownerID=t,this._map=e,this)}},{empty:function(){return Tr||(Tr=qe(pr.empty()))},from:function(t){var e=Vr.empty();
return t?t.constructor===Vr?t:e.union(t):e},fromKeys:function(t){return Vr.from(rr(t).flip())}},rr);var Nr=Lr.prototype;Nr[je]=Nr.remove,Nr[$e]=Nr.values,Nr.contains=Nr.has,Nr.mergeDeep=Nr.merge=Nr.union,Nr.mergeDeepWith=Nr.mergeWith=function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.merge.apply(this,t)},Nr.withMutations=dr.withMutations,Nr.asMutable=dr.asMutable,Nr.asImmutable=dr.asImmutable,Nr.__toJS=sr.__toJS,Nr.__toStringMapper=sr.__toStringMapper;var Tr,Fr=function(t){var e=Gr.empty();return t?t.constructor===Gr?t:e.merge(t):e},Gr=Fr;Ee.createClass(Fr,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return null!=r?this._vector.get(r)[1]:e},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this._vector.clear(),this):Gr.empty()},set:function(t,e){return ke(this,t,e)},remove:function(t){return ke(this,t,We)},wasAltered:function(){return this._map.wasAltered()||this._vector.wasAltered()},__iterate:function(t,e){var r=this;return this._vector.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._vector.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._vector.__ensureOwner(t);return t?xe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._vector=r,this)}},{empty:function(){return Hr||(Hr=xe(pr.empty(),Ar.empty()))}},pr),Fr.from=Fr,Fr.prototype[je]=Fr.prototype.remove;var Hr,Qr=function(t,e){var r=function(t){return this instanceof r?void(this._map=pr(t)):new r(t)},n=Object.keys(t),i=r.prototype=Object.create(Yr);i.constructor=r,e&&(i._name=e),i._defaultValues=t,i._keys=n,i.length=n.length;try{rr(t).forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){s(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})})}catch(u){}return r},Xr=Qr;Ee.createClass(Qr,{toString:function(){return this.__toString(this._name+" {","}")
},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues[t]):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;Object.getPrototypeOf(this).constructor;return Xr._empty||(Xr._empty=De(this,pr.empty()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+this._name);var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:De(this,r)},remove:function(t){if(null==t||!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:De(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){return this._map.__iterator(t,e)},__iterate:function(t,e){var r=this;return rr(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?De(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},rr);var Yr=Qr.prototype;Yr._name="Record",Yr[je]=Yr.remove,Yr.merge=dr.merge,Yr.mergeWith=dr.mergeWith,Yr.mergeDeep=dr.mergeDeep,Yr.mergeDeepWith=dr.mergeDeepWith,Yr.update=dr.update,Yr.updateIn=dr.updateIn,Yr.cursor=dr.cursor,Yr.withMutations=dr.withMutations,Yr.asMutable=dr.asMutable,Yr.asImmutable=dr.asImmutable;var Zr=function(t,e,r){return this instanceof $r?(s(0!==r,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&en?en:(r=null==r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.length=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new $r(t,e,r)},$r=Zr;Ee.createClass(Zr,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+C(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)
},slice:function(t,e){return w(t,e,this.length)?this:(t=S(t,this.length),e=I(e,this.length),t>=e?en:new $r(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.length>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.length-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.length-1,n=this._step,i=e?this._start+r*n:this._start,u=0;return new tr(function(){var a=i;return i+=e?-n:n,u>r?v():l(t,u++,a)})},__deepEquals:function(t){return t instanceof $r?this._start===t._start&&this._end===t._end&&this._step===t._step:Ee.superCall(this,$r.prototype,"__deepEquals",[t])}},{},ur);var tn=Zr.prototype;tn.__toJS=tn.toArray,tn.first=jr.first,tn.last=jr.last;var en=Zr(0,0),rn=function(t,e){return 0===e&&an?an:this instanceof nn?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new nn(t,e)},nn=rn;Ee.createClass(rn,{toString:function(){return 0===this.length?"Repeat []":"Repeat [ "+this._value+" "+this.length+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return Q(this._value,t)},slice:function(t,e){var r=this.length;return t=0>t?Math.max(0,r+t):Math.min(r,t),e=null==e?r:e>0?Math.min(r,e):Math.max(0,r+e),e>t?new nn(this._value,e-t):an},reverse:function(){return this},indexOf:function(t){return Q(this._value,t)?0:-1},lastIndexOf:function(t){return Q(this._value,t)?this.length:-1},__iterate:function(t){for(var e=0;this.length>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;return new tr(function(){return e.length>r?l(t,r++,e._value):v()})},__deepEquals:function(t){return t instanceof nn?Q(this._value,t._value):Ee.superCall(this,nn.prototype,"__deepEquals",[t])}},{},ur);var un=rn.prototype;
un.last=un.first,un.has=tn.has,un.take=tn.take,un.skip=tn.skip,un.__toJS=tn.__toJS;var an=new rn(void 0,0),sn={Sequence:rr,Map:pr,Vector:Ar,Stack:Kr,Set:Lr,OrderedMap:Fr,Record:Qr,Range:Zr,Repeat:rn,is:Q,fromJS:Me};return sn}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=Ee.create(u)}else i=t.prototype;return Ee.keys(e).forEach(function(t){i[t]=e[t]}),Ee.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return Ee.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t&&"function"==typeof t.equals?t.equals(e):!1}function i(t){return t.value=!1,t}function u(t){t&&(t.value=!0)}function a(){}function s(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function o(t,e){if(!t)throw Error(e)}function h(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if((0|t)===t)return t&Le;t=""+t,e="string"}return"string"===e?t.length>Fe?c(t):f(t):t.hashCode?h("function"==typeof t.hashCode?t.hashCode():t.hashCode):_(t)}function c(t){var e=Qe[t];return null==e&&(e=f(t),He===Ge&&(He=0,Qe={}),He++,Qe[t]=e),e}function f(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&Le;return e}function _(t){var e=t[Te];if(e)return e;if(!Ve){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Te])return e;if(e=l(t))return e}if(!Ve||Object.isExtensible(t)){if(e=++Ne&Le,Ve)Object.defineProperty(t,Te,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(Be&&t.propertyIsEnumerable===Be)t.propertyIsEnumerable=function(){return Be.apply(this,arguments)},t.propertyIsEnumerable[Te]=e;else{if(!t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Te]=e}return e}throw Error("Non-extensible objects are not allowed as keys.")}function l(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function v(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function g(){return{value:void 0,done:!0}}function p(t){return!!y(t)}function m(t){return t&&"function"==typeof t.next}function d(t){var e=y(t);return"function"==typeof e?e.call(t):void 0}function y(t){return t&&(t[tr]||t[$e])
}function w(t){return null==t.length&&t.cacheResult(),o(1/0>t.length,"Cannot reverse infinite range."),t.length}function S(t,e,r){return(0===t||null!=r&&-r>=t)&&(null==e||null!=r&&e>=r)}function I(t,e){return b(t,e,0)}function q(t,e){return b(t,e,e)}function b(t,e,r){return null==t?r:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function x(t){return t}function k(t,e){return[e,t]}function M(){return!0}function D(t){return function(){return!t.apply(this,arguments)}}function O(t){return"string"==typeof t?JSON.stringify(t):t}function C(t,e){return t>e?1:e>t?-1:0}function A(t,e){return 0>e?(null==t.length&&t.cacheResult(),t.length+e):e}function E(t){o(1/0!==t,"Cannot perform this action with an infinite sequence.")}function j(t,e,r,n){var i=t._cache;if(i){for(var u=i.length-1,a=0;u>=a;a++){var s=i[r?u-a:a];if(e(s[1],n?s[0]:a,t)===!1)return a+1}return a}return t.__iterateUncached(e,r)}function R(t,e,r,n){var i=t._cache;if(i){var u=i.length-1,a=0;return new er(function(){var t=i[r?u-a:a];return a++>u?g():v(e,n?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,r)}function U(t){var e=t.__makeSequence();return e.length=t.length,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)},e.contains=function(e){return t.has(e)},e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Ze){var n=t.__iterator(e,r);return new er(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===Ye?Xe:Ye,r)},e}function P(t,e,r){var n=t.__makeSequence();return n.length=t.length,n.has=function(e){return t.has(e)},n.get=function(n,i){var u=t.get(n,Ke);return u===Ke?i:e.call(r,u,n,t)},n.__iterateUncached=function(n,i){var u=this;return t.__iterate(function(t,i,a){return n(e.call(r,t,i,a),i,u)!==!1},i)},n.__iteratorUncached=function(n,i){var u=t.__iterator(Ze,i);return new er(function(){var i=u.next();
if(i.done)return i;var a=i.value,s=a[0];return v(n,s,e.call(r,a[1],s,t),i)})},n}function W(t,e){var r=t.__makeSequence();return r.length=t.length,r.reverse=function(){return t},r.flip=function(){var e=t.flip.apply(this);return e.reverse=function(){return t.flip()},e},r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=function(){return t.cacheResult(),this.length=t.length,this},r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function K(t,e,r,n){var i=t.__makeSequence();return n&&(i.has=function(n){var i=t.get(n,Ke);return i!==Ke&&!!e.call(r,i,n,t)},i.get=function(n,i){var u=t.get(n,Ke);return u!==Ke&&e.call(r,u,n,t)?u:i}),i.__iterateUncached=function(i,u){var a=this,s=0;return t.__iterate(function(t,u,o){return e.call(r,t,u,o)?(s++,i(t,n?u:s-1,a)):void 0},u),s},i.__iteratorUncached=function(i,u){var a=t.__iterator(Ze,u),s=0;return new er(function(){for(;;){var u=a.next();if(u.done)return u;var o=u.value,h=o[0],c=o[1];if(e.call(r,c,h,t))return v(i,n?h:s++,c,u)}})},i}function z(t,e,r,n){var i={},u=[];return t.__iterate(function(a,s){var o=e.call(r,a,s,t),c=h(o),f=n?[s,a]:a;i.hasOwnProperty(c)?u[i[c]][1].push(f):(i[c]=u.length,u.push([o,[f]]))}),nr(u).fromEntrySeq().map(n?function(t){return nr(t).fromEntrySeq()}:function(t){return nr(t)})}function J(t,e){if(e>t.length)return t;0>e&&(e=0);var r=t.__makeSequence();return r.length=t.length&&Math.min(t.length,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0;return t.__iterate(function(t,n){return++u&&r(t,n,i)!==!1&&e>u}),u},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),u=0;return new er(function(){return u++>e?g():i.next()})},r}function B(t,e,r){var n=t.__makeSequence();return n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);
var a=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++a&&n(t,i,u)}),a},n.__iteratorUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterator(n,i);var a=t.__iterator(Ze,i),s=!0;return new er(function(){if(!s)return g();var t=a.next();if(t.done)return t;var i=t.value,o=i[0],h=i[1];return e.call(r,h,o,u)?n===Ze?t:v(n,o,h,t):(s=!1,g())})},n}function V(t,e,r){if(0>=e)return t;var n=t.__makeSequence();return n.length=t.length&&Math.max(0,t.length-e),n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var a=0,s=!0,o=0;return t.__iterate(function(t,i){return s&&(s=a++<e)?void 0:(o++,n(t,r?i:o-1,u))}),o},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var u=e&&t.__iterator(n,i),a=0,s=0;return new er(function(){for(;e>a;)a++,u.next();var t=u.next();return r||n===Ye?t:n===Xe?v(n,s++,null,t):v(n,s++,t.value[1],t)})},n}function L(t,e,r,n){var i=t.__makeSequence();return i.__iterateUncached=function(i,u){var a=this;if(u)return this.cacheResult().__iterate(i,u);var s=!0,o=0;return t.__iterate(function(t,u,h){return s&&(s=e.call(r,t,u,h))?void 0:(o++,i(t,n?u:o-1,a))}),o},i.__iteratorUncached=function(i,u){var a=this;if(u)return this.cacheResult().__iterator(i,u);var s=t.__iterator(Ze,u),o=!0,h=0;return new er(function(){var t,u,c;do{if(t=s.next(),t.done)return n||i===Ye?t:i===Xe?v(i,h++,null,t):v(i,h++,t.value[1],t);var f=t.value;u=f[0],c=f[1],o&&(o=e.call(r,c,u,a))}while(o);return i===Ze?t:v(i,u,c,t)})},i}function N(t,e,r){var n=[t].concat(e),i=nr(n);return r&&(i=i.toKeyedSeq()),i=i.flatMap(x),i.length=n.reduce(function(t,e){if(void 0!==t){var r=nr(e).length;if(null!=r)return t+r}},0),i}function T(t,e,r){var n=t.__makeSequence();return n.__iterateUncached=function(n,i){function u(t,o){var h=this;t.__iterate(function(t,i){return(!e||e>o)&&t instanceof nr?u(t,o+1):n(t,r?i:a++,h)===!1&&(s=!0),!s},i)}var a=0,s=!1;return u(t,0),a},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),a=[],s=0;return new er(function(){for(;u;){var t=u.next();
if(t.done===!1){var o=t.value;if(n===Ze&&(o=o[1]),!((!e||e>a.length)&&o instanceof nr))return r?t:v(n,s++,o,t);a.push(u),u=o.__iterator(n,i)}else u=a.pop()}return g()})},n}function F(t,e){var r=t.__makeSequence();return r.length=t.length&&2*t.length-1,r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){return(!u||r(e,u++,i)!==!1)&&r(t,u++,i)!==!1},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(Ye,n),a=0;return new er(function(){return(!i||a%2)&&(i=u.next(),i.done)?i:a%2?v(r,a++,e):v(r,a++,i.value,i)})},r}function G(t,e){return v(t,e[0],e[1])}function H(t,e){return{node:t,index:0,__prev:e}}function Q(t,e,r,n){var i=Object.create(dr);return i.length=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function X(t,e,r){var n=i(ze),u=i(Je),a=Y(t._root,t.__ownerID,0,h(e),e,r,n,u);if(!u.value)return t;var s=t.length+(n.value?r===Ke?-1:1:0);return t.__ownerID?(t.length=s,t._root=a,t.__hash=void 0,t.__altered=!0,t):a?Q(s,a):pr.empty()}function Y(t,e,r,n,i,a,s,o){return t?t.update(e,r,n,i,a,s,o):a===Ke?t:(u(o),u(s),new xr(e,n,[i,a]))}function Z(t){return t.constructor===xr||t.constructor===qr}function $(t,e,r,n,i){if(t.hash===n)return new qr(e,n,[t.entry,i]);var u,a=(0===r?t.hash:t.hash>>>r)&We,s=(0===r?n:n>>>r)&We,o=a===s?[$(t,e,r+Ue,n,i)]:(u=new xr(e,n,i),s>a?[t,u]:[u,t]);return new yr(e,1<<a|1<<s,o)}function te(t,e,r,n){for(var i=0,u=0,a=Array(r),s=0,o=1,h=e.length;h>s;s++,o<<=1){var c=e[s];null!=c&&s!==n&&(i|=o,a[u++]=c)}return new yr(t,i,a)}function ee(t,e,r,n,i){for(var u=0,a=Array(Pe),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[u++]:null;return a[n]=i,new Sr(t,u+1,a)}function re(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u instanceof nr||(u=nr(u),u instanceof ar&&(u=u.fromEntrySeq())),u&&n.push(u)}return ie(t,e,n)}function ne(t){return function(e,r){return e&&e.mergeDeepWith?e.mergeDeepWith(t,r):t?t(e,r):r}}function ie(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){var i=t.get(n,Ke);t.set(n,i===Ke?r:e(i,r))}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)
})}function ue(t,e,r,n,i){var u=e.length;if(i===u)return n(t);o(t.set,"updateIn with invalid keyPath");var a=i===u-1?r:pr.empty(),s=e[i],h=t.get(s,a),c=ue(h,e,r,n,i+1);return c===h?t:t.set(s,c)}function ae(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function se(t,e,r,n){var i=n?t:s(t);return i[e]=r,i}function oe(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),a=0,s=0;i>s;s++)s===e?(u[s]=r,a=-1):u[s]=t[s+a];return u}function he(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,a=0;n>a;a++)a===e&&(u=1),i[a]=t[a+u];return i}function ce(t,e,r,n,i,u){var a,s=t&&t.array;if(0===e){var o=0>r?-r:0,h=n-r;for(h>Pe&&(h=Pe),a=o;h>a;a++)if(i(s&&s[u?o+h-1-a:a])===!1)return!1}else{var c=1<<e,f=e-Ue;for(a=0;We>=a;a++){var _=u?We-a:a,l=r+(_<<e);if(n>l&&l+c>0){var v=s&&s[_];if(!ce(v,f,l,n,i,u))return!1}}}return!0}function fe(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,rawMax:n-r>>e,index:0,__prev:i}}function _e(t,e,r,n,i,u,a){var s=Object.create(jr);return s.length=e-t,s._origin=t,s._size=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=u,s.__hash=a,s.__altered=!1,s}function le(t,e,r){if(e=A(t,e),e>=t.length||0>e)return r===Ke?t:t.withMutations(function(t){0>e?me(t,e).set(0,r):me(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,u=t._root,a=i(Je);return e>=ye(t._size)?n=ve(n,t.__ownerID,0,e,r,a):u=ve(u,t.__ownerID,t._level,e,r,a),a.value?t.__ownerID?(t._root=u,t._tail=n,t.__hash=void 0,t.__altered=!0,t):_e(t._origin,t._size,t._level,u,n):t}function ve(t,e,r,n,i,a){var s,o=i===Ke,h=n>>>r&We,c=t&&t.array.length>h;if(o&&!c)return t;if(r>0){var f=t&&t.array[h],_=ve(f,e,r-Ue,n,i,a);return _===f?t:(s=ge(t,e),s.array[h]=_,s)}return!o&&c&&t.array[h]===i?t:(u(a),s=ge(t,e),o&&h===s.array.length-1?s.array.pop():s.array[h]=o?void 0:i,s)}function ge(t,e){return e&&t&&e===t.ownerID?t:new Rr(t?t.array.slice():[],e)}function pe(t,e){if(e>=ye(t._size))return t._tail;if(1<<t._level+Ue>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&We],n-=Ue;
return r}}function me(t,e,r){var n=t.__ownerID||new a,i=t._origin,u=t._size,s=i+e,o=null==r?u:0>r?u+r:i+r;if(s===i&&o===u)return t;if(s>=o)return t.clear();for(var h=t._level,c=t._root,f=0;0>s+f;)c=new Rr(c&&c.array.length?[null,c]:[],n),h+=Ue,f+=1<<h;f&&(s+=f,i+=f,o+=f,u+=f);for(var _=ye(u),l=ye(o);l>=1<<h+Ue;)c=new Rr(c&&c.array.length?[c]:[],n),h+=Ue;var v=t._tail,g=_>l?pe(t,o-1):l>_?new Rr([],n):v;if(v&&l>_&&u>s&&v.array.length){c=ge(c,n);for(var p=c,m=h;m>Ue;m-=Ue){var d=_>>>m&We;p=p.array[d]=ge(p.array[d],n)}p.array[_>>>Ue&We]=v}if(u>o&&(g=g&&g.removeAfter(n,0,o)),s>=l)s-=l,o-=l,h=Ue,c=null,g=g&&g.removeBefore(n,0,s);else if(s>i||_>l){var y,w;f=0;do y=s>>>h&We,w=l-1>>>h&We,y===w&&(y&&(f+=(1<<h)*y),h-=Ue,c=c&&c.array[y]);while(c&&y===w);c&&s>i&&(c=c&&c.removeBefore(n,h,s-f)),c&&_>l&&(c=c&&c.removeAfter(n,h,l-f)),f&&(s-=f,o-=f)}return t.__ownerID?(t.length=o-s,t._origin=s,t._size=o,t._level=h,t._root=c,t._tail=g,t.__hash=void 0,t.__altered=!0,t):_e(s,o,h,c,g)}function de(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u&&n.push(nr(u))}var a=Math.max.apply(null,n.map(function(t){return t.length||0}));return a>t.length&&(t=t.setLength(a)),ie(t,e,n)}function ye(t){return Pe>t?0:t-1>>>Ue<<Ue}function we(t,e,r,n){var i=Object.create(Jr);return i.length=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Se(t,e){var r=Object.create(Nr);return r.length=t?t.length:0,r._map=t,r.__ownerID=e,r}function Ie(t,e,r,n){var i=Object.create(Fr.prototype);return i.length=t?t.length:0,i._map=t,i._vector=e,i.__ownerID=r,i.__hash=n,i}function qe(t,e,r){var n=t._map,i=t._vector,u=n.get(e),a=void 0!==u,s=r===Ke;if(!a&&s||a&&r===i.get(u)[1])return t;a||(u=i.length);var o=s?n.remove(e):a?n:n.set(e,u),h=s?i.remove(u):i.set(u,[e,r]);return t.__ownerID?(t.length=o.length,t._map=o,t._vector=h,t.__hash=void 0,t):Ie(o,h)}function be(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function xe(t,e){return e?ke(e,t,"",{"":t}):Me(t)}function ke(t,e,r,n){return e&&(Array.isArray(e)||e.constructor===Object)?t.call(n,r,nr(e).map(function(r,n){return ke(t,r,n,e)
})):e}function Me(t){if(t){if(Array.isArray(t))return nr(t).map(Me).toVector();if(t.constructor===Object)return nr(t).map(Me).toMap()}return t}function De(t,e,r,n){4>arguments.length&&(n=t.getIn(e));var i=n instanceof nr?n.length:null,u=n instanceof ar?on:an;return new u(t,e,r,i)}function Oe(t,e,r){return r instanceof nr?Ce(t,e,r):r}function Ce(t,e,r){return De(t._rootData,t._keyPath.concat(e),t._onChange,r)}function Ae(t,e,r){var n=t._rootData.updateIn(t._keyPath,r?pr.empty():void 0,e),i=t._keyPath||[];return t._onChange&&t._onChange.call(void 0,n,t._rootData,r?i.concat(r):i),De(n,t._keyPath,t._onChange)}var Ee=Object,je={};je.createClass=t,je.superCall=e,je.defaultSuperCall=r;var Re="delete",Ue=5,Pe=1<<Ue,We=Pe-1,Ke={},ze={value:!1},Je={value:!1},Be=Object.prototype.propertyIsEnumerable,Ve=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),Le=2147483647,Ne=0,Te="__immutablehash__";"undefined"!=typeof Symbol&&(Te=Symbol(Te));var Fe=16,Ge=255,He=0,Qe={},Xe=0,Ye=1,Ze=2,$e="@@iterator",tr="undefined"!=typeof Symbol?Symbol.iterator:$e,er=function(t){this.next=t};je.createClass(er,{toString:function(){return"[Iterator]"}},{});var rr=er.prototype;rr.inspect=rr.toSource=function(){return""+this},rr[tr]=function(){return this};var nr=function(t){return ir.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},ir=nr;je.createClass(nr,{toArray:function(){E(this.length);var t=Array(this.length||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toJS:function(){return this.map(function(t){return t instanceof ir?t.toJS():t}).__toJS()},toMap:function(){return E(this.length),pr.from(this)},toObject:function(){E(this.length);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return E(this.length),Fr.from(this)},toSet:function(){return E(this.length),Vr.from(this)},toStack:function(){return E(this.length),Kr.from(this)},toVector:function(){return E(this.length),Ar.from(this)},toString:function(){return this.__toString("Seq {","}")},__toString:function(t,e){return 0===this.length?t+e:t+" "+this.map(this.__toStringMapper).join(", ")+" "+e
},__toStringMapper:function(t,e){return e+": "+O(t)},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return N(this,t,!0)},contains:function(t){return this.find(function(e){return n(e,t)},null,Ke)!==Ke},entries:function(){return this.__iterator(Ze)},every:function(t,e){var r=!0;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},filter:function(t,e){return K(this,t,e,!0)},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},join:function(t){t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!=n?n:""}),e},keys:function(){return this.__iterator(Xe)},map:function(t,e){return P(this,t,e)},reduce:function(t,e,r){var n,i;return 2>arguments.length?i=!0:n=e,this.__iterate(function(e,u,a){i?(i=!1,n=e):n=t.call(r,n,e,u,a)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return W(this,!0)},slice:function(t,e){if(S(t,e,this.length))return this;var r=I(t,this.length),n=q(e,this.length);if(r!==r||n!==n)return this.cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return null==n||n===this.length?i:i.take(n-r)},some:function(t,e){return!this.every(D(t),e)},sort:function(t){return this.sortBy(x,t)},values:function(){return this.__iterator(Ye)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return t?this.filter(t,e).count():(null==this.length&&(this.length=this.__iterate(M)),this.length)},countBy:function(t,e){var r=this,n={},i=[];return this.__iterate(function(u,a){var s=t.call(e,u,a,r),o=h(s);n.hasOwnProperty(o)?i[n[o]][1]++:(n[o]=i.length,i.push([s,1]))}),ir(i).fromEntrySeq()},equals:function(t){if(this===t)return!0;if(!(t instanceof ir))return!1;if(null!=this.length&&null!=t.length){if(this.length!==t.length)return!1;if(0===this.length&&0===t.length)return!0}return null!=this.__hash&&null!=t.__hash&&this.__hash!==t.__hash?!1:this.__deepEquals(t)
},__deepEquals:function(t){var e=this.entries();return t.every(function(t,r){var i=e.next().value;return i&&n(i[0],r)&&n(i[1],t)})&&e.next().done},entrySeq:function(){var t=this;if(t._cache)return ir(t._cache);var e=t.toKeyedSeq().map(k).valueSeq();return e.fromEntries=function(){return t},e},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(M)},flatMap:function(t,e){return this.map(function(r,n,i){return ir(t.call(e,r,n,i))}).flatten(!0)},flatten:function(t){return T(this,t,!0)},flip:function(){return U(this)},get:function(t,e){return this.find(function(e,r){return n(r,t)},null,e)},getIn:function(t,e){var r=this;if(t)for(var n=0;t.length>n;n++)if(r=r&&r.get?r.get(t[n],Ke):Ke,r===Ke)return e;return r},groupBy:function(t,e){return z(this,t,e,!0)},has:function(t){return this.get(t,Ke)!==Ke},keySeq:function(){return this.flip().valueSeq()},last:function(){return this.reverse().first()},mapEntries:function(t,e){var r=this;return this.entrySeq().map(function(n,i){return t.call(e,n,i,r)}).fromEntrySeq()},mapKeys:function(t,e){var r=this;return this.flip().map(function(n,i){return t.call(e,n,i,r)}).flip()},rest:function(){return this.slice(1)},skip:function(t){return V(this,t,!0)},skipLast:function(t){return this.reverse().skip(t).reverse()},skipWhile:function(t,e){return L(this,t,e,!0)},skipUntil:function(t,e){return this.skipWhile(D(t),e)},sortBy:function(t,e){e=e||C;var r=this;return ir(this.entrySeq().entrySeq().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq()},take:function(t){return J(this,t)},takeLast:function(t){return this.reverse().take(t).reverse()},takeWhile:function(t,e){return B(this,t,e)},takeUntil:function(t,e){return this.takeWhile(D(t),e)},toKeyedSeq:function(){return this},valueSeq:function(){return new lr(this)
},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(E(this.length),this._cache=this.entrySeq().toArray(),null==this.length&&(this.length=this._cache.length)),this},hashCode:function(){return this.__hash||(this.__hash=1/0===this.length?0:this.reduce(function(t,e,r){return t+(h(e)^(e===r?0:h(r)))&Le},0))},__makeSequence:function(){return Object.create(ur)},__iterate:function(t,e){return j(this,t,e,!0)},__iterator:function(t,e){return R(this,t,e,!0)}},{from:function(t){if(t instanceof ir)return t;if(!Array.isArray(t)){if(m(t))return new hr(t);if(p(t))return new cr(t);if(t&&t.constructor===Object)return new fr(t);t=[t]}return new _r(t)}});var ur=nr.prototype;ur[tr]=ur.entries,ur.toJSON=ur.toJS,ur.__toJS=ur.toObject,ur.inspect=ur.toSource=function(){return""+this},ur.chain=ur.flatMap;var ar=function(){je.defaultSuperCall(this,sr.prototype,arguments)},sr=ar;je.createClass(ar,{toString:function(){return this.__toString("Seq [","]")},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return N(this,t,!1)},filter:function(t,e){return K(this,t,e,!1)},findIndex:function(t,e){var r=this.findKey(t,e);return null==r?-1:r},indexOf:function(t){return this.findIndex(function(e){return n(e,t)})},lastIndexOf:function(t){return this.toKeyedSeq().reverse().indexOf(t)},reverse:function(){return W(this,!1)},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=I(t,this.length);var n=this.slice(0,t);return 1===r?n:n.concat(s(arguments,2),this.slice(t+e))},findLastIndex:function(t,e){return this.toKeyedSeq().reverse().findIndex(t,e)},first:function(){return this.get(0)},flatten:function(t){return T(this,t,!1)},flip:function(){return U(this.toKeyedSeq())},fromEntrySeq:function(){return new gr(this)},get:function(t,e){return t=A(this,t),0>t||1/0===this.length||null!=this.length&&t>this.length?e:this.find(function(e,r){return r===t},null,e)},groupBy:function(t,e){return z(this,t,e,!1)},has:function(t){return t=A(this,t),t>=0&&(null!=this.length?1/0===this.length||this.length>t:-1!==this.indexOf(t))
},interpose:function(t){return F(this,t)},last:function(){return this.get(-1)},skip:function(t){var e=this,r=V(e,t,!1);return r!==e&&(r.get=function(r,n){return r=A(this,r),r>=0?e.get(r+t,n):n}),r},skipWhile:function(t,e){return L(this,t,e,!1)},sortBy:function(t,e){e=e||C;var r=this;return nr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq()},take:function(t){var e=this,r=J(e,t);return r!==e&&(r.get=function(r,n){return r=A(this,r),r>=0&&t>r?e.get(r,n):n}),r},toKeyedSeq:function(){return new vr(this)},valueSeq:function(){return this},__makeSequence:function(){return Object.create(or)},__iterate:function(t,e){return j(this,t,e,!1)},__iterator:function(t,e){return R(this,t,e,!1)}},{},nr);var or=ar.prototype;or[tr]=or.values,or.__toJS=or.toArray,or.__toStringMapper=O;var hr=function(t){this._iterator=t,this._iteratorCache=[]};je.createClass(hr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var a=u.value;if(n[i]=a,t(a,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new er(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return v(t,i,n[i++])})}},{},ar);var cr=function(t){this._iterable=t,this.length=t.length||t.size};je.createClass(cr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=d(r),i=0;if(m(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=d(r);if(!m(n))return new er(function(){return g()});var i=0;return new er(function(){var e=n.next();return e.done?e:v(t,i++,e.value)})}},{},ar);var fr=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};je.createClass(fr,{toObject:function(){return this._object
},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var a=n[e?i-u:u];if(t(r[a],a,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new er(function(){var a=n[e?i-u:u];return u++>i?g():v(t,a,r[a])})}},{},nr);var _r=function(t){this._array=t,this.length=t.length};je.createClass(_r,{toArray:function(){return this._array},get:function(t,e){return this.has(t)?this._array[A(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new er(function(){return i>n?g():v(t,i,r[e?n-i++:i++])})}},{},ar);var lr=function(t){this._seq=t,this.length=t.length};je.createClass(lr,{contains:function(t){return this._seq.contains(t)},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this,n=0;return this._seq.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Ye,e),n=0;return new er(function(){var e=r.next();return e.done?e:v(t,n++,e.value,e)})}},{},ar);var vr=function(t){this._seq=t,this.length=t.length};je.createClass(vr,{get:function(t,e){return this._seq.get(t,e)},has:function(t){return this._seq.has(t)},valueSeq:function(){return this._seq},reverse:function(){var t=this,e=W(this,!0);return e.valueSeq=function(){return t._seq.reverse()},e},map:function(t,e){var r=this,n=P(this,t,e);return n.valueSeq=function(){return r._seq.map(t,e)},n},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this,n=e?w(this):0;return this._seq.__iterate(function(i){return t(i,e?--n:n++,r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Ye,e),n=e?w(this):0;return new er(function(){var i=r.next();return i.done?i:v(t,e?--n:n++,i.value,i)
})}},{},nr);var gr=function(t){this._seq=t,this.length=t.length};je.createClass(gr,{entrySeq:function(){return this._seq},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this;return this._seq.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Ye,e);return new er(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return t===Ze?e:v(t,n[0],n[1],e)}})}},{},nr);var pr=function(t){var e=mr.empty();return t?t.constructor===mr?t:e.merge(t):e},mr=pr;je.createClass(pr,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,h(t),t,e):e},set:function(t,e){return X(this,t,e)},remove:function(t){return X(this,t,Ke)},update:function(t,e,r){return 1===arguments.length?this.updateIn([],void 0,t):this.updateIn([t],e,r)},updateIn:function(t,e,r){return r||(r=e,e=void 0),ue(this,t,e,r,0)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):mr.empty()},merge:function(){return re(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return re(this,t,e)},mergeDeep:function(){return re(this,ne(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return re(this,ne(t),e)},cursor:function(t,e){var r=0===arguments.length||"function"==typeof t&&(e=t)?[]:Array.isArray(t)?t:[t];return De(this,r,e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new a)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new Mr(this,t,e)},__iterate:function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Q(this.length,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)
}},{empty:function(){return Dr||(Dr=Q(0))}},nr);var dr=pr.prototype;dr[Re]=dr.remove,pr.from=pr;var yr=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},wr=yr;je.createClass(yr,{get:function(t,e,r,n){var i=1<<((0===t?e:e>>>t)&We),u=this.bitmap;return 0===(u&i)?n:this.nodes[ae(u&i-1)].get(t+Ue,e,r,n)},update:function(t,e,r,n,i,u,a){var s=(0===e?r:r>>>e)&We,o=1<<s,h=this.bitmap,c=0!==(h&o);if(!c&&i===Ke)return this;var f=ae(h&o-1),_=this.nodes,l=c?_[f]:null,v=Y(l,t,e+Ue,r,n,i,u,a);if(v===l)return this;if(!c&&v&&_.length>=Or)return ee(t,_,h,s,v);if(c&&!v&&2===_.length&&Z(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&Z(v))return v;var g=t&&t===this.ownerID,p=c?v?h:h^o:h|o,m=c?v?se(_,f,v,g):he(_,f,g):oe(_,f,v,g);return g?(this.bitmap=p,this.nodes=m,this):new wr(t,p,m)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1}},{});var Sr=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},Ir=Sr;je.createClass(Sr,{get:function(t,e,r,n){var i=(0===t?e:e>>>t)&We,u=this.nodes[i];return u?u.get(t+Ue,e,r,n):n},update:function(t,e,r,n,i,u,a){var s=(0===e?r:r>>>e)&We,o=i===Ke,h=this.nodes,c=h[s];if(o&&!c)return this;var f=Y(c,t,e+Ue,r,n,i,u,a);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,Cr>_))return te(t,h,_,s)}else _++;var l=t&&t===this.ownerID,v=se(h,s,f,l);return l?(this.count=_,this.nodes=v,this):new Ir(t,_,v)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}}},{});var qr=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r},br=qr;je.createClass(qr,{get:function(t,e,r,i){for(var u=this.entries,a=0,s=u.length;s>a;a++)if(n(r,u[a][0]))return u[a][1];return i},update:function(t,e,r,i,a,o,h){var c=a===Ke;if(r!==this.hash)return c?this:(u(h),u(o),$(this,t,e,r,[i,a]));for(var f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(c&&!v)return this;if(u(h),(c||!v)&&u(o),c&&2===l)return new xr(t,this.hash,f[1^_]);var g=t&&t===this.ownerID,p=g?f:s(f);return v?c?_===l-1?p.pop():p[_]=p.pop():p[_]=[i,a]:p.push([i,a]),g?(this.entries=p,this):new br(t,this.hash,p)
},iterate:function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1}},{});var xr=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},kr=xr;je.createClass(xr,{get:function(t,e,r,i){return n(r,this.entry[0])?this.entry[1]:i},update:function(t,e,r,i,a,s,o){var h=a===Ke,c=n(i,this.entry[0]);return(c?a===this.entry[1]:h)?this:(u(o),h?(u(s),null):c?t&&t===this.ownerID?(this.entry[1]=a,this):new kr(t,r,[i,a]):(u(s),$(this,t,e,r,[i,a])))},iterate:function(t){return t(this.entry)}},{});var Mr=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&H(t._root)};je.createClass(Mr,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return G(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return G(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var u=n.nodes[this._reverse?r-i:i];if(u){if(u.entry)return G(t,u.entry);e=this._stack=H(u,e)}continue}e=this._stack=this._stack.__prev}return g()}},{},er);var Dr,Or=Pe/2,Cr=Pe/4,Ar=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Er.from(t)},Er=Ar;je.createClass(Ar,{toString:function(){return this.__toString("Vector [","]")},get:function(t,e){if(t=A(this,t),0>t||t>=this.length)return e;t+=this._origin;var r=pe(this,t);return r&&r.array[t&We]},set:function(t,e){return le(this,t,e)},remove:function(t){return le(this,t,Ke)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=this._origin=this._size=0,this._level=Ue,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Er.empty()},push:function(){var t=arguments,e=this.length;return this.withMutations(function(r){me(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return me(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){me(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return me(this,1)},merge:function(){return de(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];
return de(this,t,e)},mergeDeep:function(){return de(this,ne(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return de(this,ne(t),e)},setLength:function(t){return me(this,0,t)},slice:function(t,e){var r=je.superCall(this,Er.prototype,"slice",[t,e]);if(r!==this){var n=this,i=n.length;r.toVector=function(){return me(n,0>t?Math.max(0,i+t):i?Math.min(i,t):t,null==e?i:0>e?Math.max(0,i+e):i?Math.min(i,e):e)}}return r},__iterator:function(t,e){return new Pr(this,t,e)},__iterate:function(t,e){var r=this,n=0,i=function(e){return t(e,n++,r)},u=ye(this._size);return e?ce(this._tail,0,u-this._origin,this._size-this._origin,i,e)&&ce(this._root,this._level,-this._origin,u-this._origin,i,e):ce(this._root,this._level,-this._origin,u-this._origin,i,e)&&ce(this._tail,0,u-this._origin,this._size-this._origin,i,e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?_e(this._origin,this._size,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{empty:function(){return Wr||(Wr=_e(0,0,Ue))},from:function(t){if(!t||0===t.length)return Er.empty();if(t.constructor===Er)return t;var e=Array.isArray(t);return t.length>0&&Pe>t.length?_e(0,t.length,Ue,null,new Rr(e?s(t):nr(t).toArray())):(e||(t=nr(t).valueSeq()),Er.empty().merge(t))}},ar);var jr=Ar.prototype;jr[Re]=jr.remove,jr.update=dr.update,jr.updateIn=dr.updateIn,jr.cursor=dr.cursor,jr.withMutations=dr.withMutations,jr.asMutable=dr.asMutable,jr.asImmutable=dr.asImmutable,jr.wasAltered=dr.wasAltered;var Rr=function(t,e){this.array=t,this.ownerID=e},Ur=Rr;je.createClass(Rr,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&We;if(n>=this.array.length)return new Ur([],t);var i,u=0===n;if(e>0){var a=this.array[n];if(i=a&&a.removeBefore(t,e-Ue,r),i===a&&u)return this}if(u&&!i)return this;var s=ge(this,t);if(!u)for(var o=0;n>o;o++)s.array[o]=void 0;return i&&(s.array[n]=i),s},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&We;
if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var a=this.array[n];if(i=a&&a.removeAfter(t,e-Ue,r),i===a&&u)return this}if(u&&!i)return this;var s=ge(this,t);return u||s.array.pop(),i&&(s.array[n]=i),s}},{});var Pr=function(t,e,r){this._type=e,this._reverse=!!r,this._maxIndex=t.length-1;var n=ye(t._size),i=fe(t._root&&t._root.array,t._level,-t._origin,n-t._origin-1),u=fe(t._tail&&t._tail.array,0,n-t._origin,t._size-t._origin-1);this._stack=r?u:i,this._stack.__prev=r?i:u};je.createClass(Pr,{next:function(){for(var t=this._stack;t;){var e=t.array,r=t.index++;if(this._reverse&&(r=We-r,r>t.rawMax&&(r=t.rawMax,t.index=Pe-r)),r>=0&&Pe>r&&t.rawMax>=r){var n=e&&e[r];if(0===t.level){var i,u=this._type;return 1!==u&&(i=t.offset+(r<<t.level),this._reverse&&(i=this._maxIndex-i)),v(u,i,n)}this._stack=t=fe(n&&n.array,t.level-Ue,t.offset+(r<<t.level),t.max,t)}else t=this._stack=this._stack.__prev}return g()}},{},er);var Wr,Kr=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return zr.from(t)},zr=Kr;je.createClass(Kr,{toString:function(){return this.__toString("Stack [","]")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value},push:function(){if(0===arguments.length)return this;for(var t=this.length+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.length=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):we(t,e)},pushAll:function(t){if(t=nr(t),0===t.length)return this;var e=this.length,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.length=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):we(e,r)},pop:function(){return this.slice(1)},unshift:function(){return this.push.apply(this,arguments)},unshiftAll:function(t){return this.pushAll(t)},shift:function(){return this.pop.apply(this,arguments)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):zr.empty()
},slice:function(t,e){if(S(t,e,this.length))return this;var r=I(t,this.length),n=q(e,this.length);if(n!==this.length)return je.superCall(this,zr.prototype,"slice",[t,e]);for(var i=this.length-r,u=this._head;r--;)u=u.next;return this.__ownerID?(this.length=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):we(i,u)},__ensureOwner:function(t){return t===this.__ownerID?this:t?we(this.length,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=0,n=this._head;return new er(function(){if(n){var e=n.value;return n=n.next,v(t,r++,e)}return g()})}},{empty:function(){return Br||(Br=we(0))},from:function(t){var e=zr.empty();return t?t.constructor===zr?t:e.unshiftAll(t):e}},ar);var Jr=Kr.prototype;Jr.withMutations=dr.withMutations,Jr.asMutable=dr.asMutable,Jr.asImmutable=dr.asImmutable,Jr.wasAltered=dr.wasAltered;var Br,Vr=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Lr.from(t)},Lr=Vr;je.createClass(Vr,{toString:function(){return this.__toString("Set {","}")},get:function(t,e){return this._map.has(t)?t:e},contains:function(t){return this._map.has(t)},add:function(t){var e=this._map.set(t,null);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:Se(e)},remove:function(t){var e=this._map.remove(t);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:0===e.length?Lr.empty():Se(e)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this):Lr.empty()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++)nr(t[r]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return nr(t)
});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return nr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},isSubset:function(t){return t=nr(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=nr(t),t.every(function(t){return e.contains(t)})},merge:function(){return this.union.apply(this,arguments)},mergeWith:function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.union.apply(this,t)},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?Se(e,t):(this.__ownerID=t,this._map=e,this)}},{empty:function(){return Tr||(Tr=Se(pr.empty()))},from:function(t){var e=Lr.empty();return t?t.constructor===Lr?t:e.union(t):e},fromKeys:function(t){return Lr.from(nr(t).flip())}},nr);var Nr=Vr.prototype;Nr[Re]=Nr.remove,Nr[tr]=Nr.values,Nr.mergeDeep=Nr.merge,Nr.mergeDeepWith=Nr.mergeWith,Nr.withMutations=dr.withMutations,Nr.asMutable=dr.asMutable,Nr.asImmutable=dr.asImmutable,Nr.__toJS=or.__toJS,Nr.__toStringMapper=or.__toStringMapper;var Tr,Fr=function(t){var e=Gr.empty();return t?t.constructor===Gr?t:e.merge(t):e},Gr=Fr;je.createClass(Fr,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return null!=r?this._vector.get(r)[1]:e},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this._vector.clear(),this):Gr.empty()},set:function(t,e){return qe(this,t,e)},remove:function(t){return qe(this,t,Ke)},wasAltered:function(){return this._map.wasAltered()||this._vector.wasAltered()
},__iterate:function(t,e){var r=this;return this._vector.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._vector.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._vector.__ensureOwner(t);return t?Ie(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._vector=r,this)}},{empty:function(){return Hr||(Hr=Ie(pr.empty(),Ar.empty()))}},pr),Fr.from=Fr,Fr.prototype[Re]=Fr.prototype.remove;var Hr,Qr=function(t,e){var r=function(t){return this instanceof r?void(this._map=pr(t)):new r(t)},n=Object.keys(t),i=r.prototype=Object.create(Xr);i.constructor=r,e&&(i._name=e),i._defaultValues=t,i._keys=n,i.length=n.length;try{nr(t).forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){o(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})})}catch(u){}return r};je.createClass(Qr,{toString:function(){return this.__toString(this._name+" {","}")},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues[t]):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=be(this,pr.empty()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+this._name);var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:be(this,r)},remove:function(t){if(null==t||!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:be(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){return this._map.__iterator(t,e)},__iterate:function(t,e){var r=this;return nr(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;
var e=this._map&&this._map.__ensureOwner(t);return t?be(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},nr);var Xr=Qr.prototype;Xr._name="Record",Xr[Re]=Xr.remove,Xr.merge=dr.merge,Xr.mergeWith=dr.mergeWith,Xr.mergeDeep=dr.mergeDeep,Xr.mergeDeepWith=dr.mergeDeepWith,Xr.update=dr.update,Xr.updateIn=dr.updateIn,Xr.cursor=dr.cursor,Xr.withMutations=dr.withMutations,Xr.asMutable=dr.asMutable,Xr.asImmutable=dr.asImmutable;var Yr=function(t,e,r){return this instanceof Zr?(o(0!==r,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&tn?tn:(r=null==r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.length=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new Zr(t,e,r)},Zr=Yr;je.createClass(Yr,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+A(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)},slice:function(t,e){return S(t,e,this.length)?this:(t=I(t,this.length),e=q(e,this.length),t>=e?tn:new Zr(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.length>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.length-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.length-1,n=this._step,i=e?this._start+r*n:this._start,u=0;return new er(function(){var a=i;return i+=e?-n:n,u>r?g():v(t,u++,a)})},__deepEquals:function(t){return t instanceof Zr?this._start===t._start&&this._end===t._end&&this._step===t._step:je.superCall(this,Zr.prototype,"__deepEquals",[t])}},{},ar);var $r=Yr.prototype;$r.__toJS=$r.toArray,$r.first=jr.first,$r.last=jr.last;var tn=Yr(0,0),en=function(t,e){return 0===e&&un?un:this instanceof rn?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new rn(t,e)
},rn=en;je.createClass(en,{toString:function(){return 0===this.length?"Repeat []":"Repeat [ "+this._value+" "+this.length+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return n(this._value,t)},slice:function(t,e){var r=this.length;return t=0>t?Math.max(0,r+t):Math.min(r,t),e=null==e?r:e>0?Math.min(r,e):Math.max(0,r+e),e>t?new rn(this._value,e-t):un},reverse:function(){return this},indexOf:function(t){return n(this._value,t)?0:-1},lastIndexOf:function(t){return n(this._value,t)?this.length:-1},__iterate:function(t){for(var e=0;this.length>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;return new er(function(){return e.length>r?v(t,r++,e._value):g()})},__deepEquals:function(t){return t instanceof rn?n(this._value,t._value):je.superCall(this,rn.prototype,"__deepEquals",[t])}},{},ar);var nn=en.prototype;nn.last=nn.first,nn.has=$r.has,nn.take=$r.take,nn.skip=$r.skip,nn.__toJS=$r.__toJS;var un=new en(void 0,0),an=function(t,e,r,n){this.length=n,this._rootData=t,this._keyPath=e,this._onChange=r};je.createClass(an,{equals:function(t){return n(this.deref(),t&&("function"==typeof t.deref?t.deref():t))},deref:function(t){return this._rootData.getIn(this._keyPath,t)},get:function(t,e){if(Array.isArray(t)&&0===t.length)return this;var r=this._rootData.getIn(this._keyPath.concat(t),Ke);return r===Ke?e:Oe(this,t,r)},set:function(t,e){return Ae(this,function(r){return r.set(t,e)},t)},remove:function(t){return Ae(this,function(e){return e.remove(t)},t)},clear:function(){return Ae(this,function(t){return t.clear()})},update:function(t,e,r){return 1===arguments.length?Ae(this,t):Ae(this,function(n){return n.update(t,e,r)},t)},withMutations:function(t){return Ae(this,function(e){return(e||pr.empty()).withMutations(t)})},cursor:function(t){return Array.isArray(t)&&0===t.length?this:Ce(this,t)},__iterate:function(t,e){var r=this,n=this.deref();return n&&n.__iterate?n.__iterate(function(e,n){return t(Oe(r,n,e),n,r)},e):0},__iterator:function(t,e){var r=this,n=this.deref(),i=n&&n.__iterator&&n.__iterator(Ze,e);
return new er(function(){if(!i)return g();var e=i.next();if(e.done)return e;var n=e.value,u=n[0],a=n[1];return v(t,u,Oe(r,u,a),e)})}},{},nr);var sn=an.prototype;sn[Re]=sn.remove,sn.getIn=sn.get;var on=function(t,e,r,n){this.length=n,this._rootData=t,this._keyPath=e,this._onChange=r};je.createClass(on,{},{},ar);var hn=on.prototype;hn.equals=sn.equals,hn.deref=sn.deref,hn.get=sn.get,hn.getIn=sn.getIn,hn.set=sn.set,hn[Re]=hn.remove=sn.remove,hn.clear=sn.clear,hn.update=sn.update,hn.withMutations=sn.withMutations,hn.cursor=sn.cursor,hn.__iterate=sn.__iterate,hn.__iterator=sn.__iterator;var cn={Sequence:nr,Map:pr,Vector:Ar,Stack:Kr,Set:Vr,OrderedMap:Fr,Record:Qr,Range:Yr,Repeat:en,is:n,fromJS:xe};return cn}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
{
"name": "immutable",
"version": "2.3.2",
"version": "2.5.0",
"description": "Immutable Data Collections",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/facebook/immutable-js",

@@ -34,3 +34,3 @@ Immutable Data Collections

To use `immutable` from a browser, download [dist/Immutable.min.js](./dist/Immutable.min.js).
To use `immutable` from a browser, download [dist/Immutable.min.js](./dist/Immutable.min.js) or use a CDN such as [jsDelivr](http://cdn.jsdelivr.net/immutable.js/latest/Immutable.min.js).

@@ -308,3 +308,3 @@ Then, add it as a script tag to your page:

var data = Immutable.fromJS({ a: { b: { c: 1 } } });
var cursor = data.cursor(['a', 'b', 'c'], newData => {
var cursor = data.cursor(['a', 'b'], newData => {
data = newData;

@@ -315,5 +315,5 @@ });

cursor.deref(); // 1
cursor = cursor.update(x => x + 1);
cursor.deref(); // 2
cursor.get('c'); // 1
cursor = cursor.update('c', x => x + 1);
cursor.get('c'); // 2

@@ -320,0 +320,0 @@ // ... back to data ...

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