UNPKG

cspace-ui

Version:
1 lines 2.78 MB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cspaceUI=t():e.cspaceUI=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1657)}([function(e,t,n){e.exports=n(812)()},function(e,t,n){"use strict";e.exports=n(87)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:W(e)}function r(e){return s(e)?e:V(e)}function o(e){return l(e)?e:Z(e)}function a(e){return i(e)&&!c(e)?e:J(e)}function i(e){return!(!e||!e[d])}function s(e){return!(!e||!e[p])}function l(e){return!(!e||!e[m])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[f])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=a;var d="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",m="@@__IMMUTABLE_INDEXED__@@",f="@@__IMMUTABLE_ORDERED__@@",h=5,g=1<<h,y=g-1,v={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function M(e){e&&(e.value=!0)}function T(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function E(e){return void 0===e.size&&(e.size=e.__iterate(x)),e.size}function C(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?E(e)+t:t}function x(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function D(e,t){return k(e,t,0)}function L(e,t){return k(e,t,t)}function k(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var P=0,I=1,N=2,j="function"==typeof Symbol&&Symbol.iterator,R="@@iterator",A=j||R;function B(e){this.next=e}function Y(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function z(){return{value:void 0,done:!0}}function H(e){return!!G(e)}function F(e){return e&&"function"==typeof e.next}function U(e){var t=G(e);return t&&t.call(e)}function G(e){var t=e&&(j&&e[j]||e[R]);if("function"==typeof t)return t}function q(e){return e&&"number"==typeof e.length}function W(e){return null==e?ae():i(e)?e.toSeq():function(e){var t=le(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function V(e){return null==e?ae().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():ie(e)}function Z(e){return null==e?ae():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():se(e)}function J(e){return(null==e?ae():i(e)?s(e)?e.entrySeq():e:se(e)).toSetSeq()}B.prototype.toString=function(){return"[Iterator]"},B.KEYS=P,B.VALUES=I,B.ENTRIES=N,B.prototype.inspect=B.prototype.toSource=function(){return this.toString()},B.prototype[A]=function(){return this},t(W,n),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(e,t){return ce(this,e,t,!0)},W.prototype.__iterator=function(e,t){return ue(this,e,t,!0)},t(V,W),V.prototype.toKeyedSeq=function(){return this},t(Z,W),Z.of=function(){return Z(arguments)},Z.prototype.toIndexedSeq=function(){return this},Z.prototype.toString=function(){return this.__toString("Seq [","]")},Z.prototype.__iterate=function(e,t){return ce(this,e,t,!1)},Z.prototype.__iterator=function(e,t){return ue(this,e,t,!1)},t(J,W),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},W.isSeq=oe,W.Keyed=V,W.Set=J,W.Indexed=Z;var K,Q,X,$="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function re(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[$])}function ae(){return K||(K=new ee([]))}function ie(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():F(e)?new re(e).fromEntrySeq():H(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function le(e){return q(e)?new ee(e):F(e)?new re(e):H(e)?new ne(e):void 0}function ce(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function ue(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new B(function(){var e=o[n?a-i:i];return i++>a?{value:void 0,done:!0}:Y(t,r?e[0]:i-1,e[1])})}return e.__iteratorUncached(t,n)}function de(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,Z(n).map(function(r,o){return e(t,r,o,n)})):me(n)?t.call(o,r,V(n).map(function(r,o){return e(t,r,o,n)})):n}(t,e,"",{"":e}):pe(e)}function pe(e){return Array.isArray(e)?Z(e).map(pe).toList():me(e)?V(e).map(pe).toMap():e}function me(e){return e&&(e.constructor===Object||void 0===e.constructor)}function fe(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function he(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var o=r.next().value;return o&&fe(o[1],e)&&(n||fe(o[0],t))})&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var d=!0,p=t.__iterate(function(t,r){if(n?!e.has(t):o?!fe(t,e.get(r,v)):!fe(e.get(r,v),t))return d=!1,!1});return d&&e.size===p}function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Q)return Q;Q=this}}function ye(e,t){if(!e)throw new Error(t)}function ve(e,t,n){if(!(this instanceof ve))return new ve(e,t,n);if(ye(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(X)return X;X=this}}function be(){throw TypeError("Abstract")}function _e(){}function we(){}function Me(){}W.prototype[$]=!0,t(ee,Z),ee.prototype.get=function(e,t){return this.has(e)?this._array[C(this,e)]:t},ee.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},ee.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new B(function(){return o>r?{value:void 0,done:!0}:Y(e,o,n[t?r-o++:o++])})},t(te,V),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},te.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new B(function(){var i=r[t?o-a:a];return a++>o?{value:void 0,done:!0}:Y(e,i,n[i])})},te.prototype[f]=!0,t(ne,Z),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=U(n),o=0;if(F(r))for(var a;!(a=r.next()).done&&!1!==e(a.value,o++,this););return o},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=U(n);if(!F(r))return new B(z);var o=0;return new B(function(){var t=r.next();return t.done?t:Y(e,o++,t.value)})},t(re,Z),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a<o.length;)if(!1===e(o[a],a++,this))return a;for(;!(n=r.next()).done;){var i=n.value;if(o[a]=i,!1===e(i,a++,this))break}return a},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new B(function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return Y(e,o,r[o++])})},t(ge,Z),ge.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ge.prototype.get=function(e,t){return this.has(e)?this._value:t},ge.prototype.includes=function(e){return fe(this._value,e)},ge.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:new ge(this._value,L(t,n)-D(e,n))},ge.prototype.reverse=function(){return this},ge.prototype.indexOf=function(e){return fe(this._value,e)?0:-1},ge.prototype.lastIndexOf=function(e){return fe(this._value,e)?this.size:-1},ge.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ge.prototype.__iterator=function(e,t){var n=this,r=0;return new B(function(){return r<n.size?Y(e,r++,n._value):{value:void 0,done:!0}})},ge.prototype.equals=function(e){return e instanceof ge?fe(this._value,e._value):he(e)},t(ve,Z),ve.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},ve.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},ve.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ve.prototype.slice=function(e,t){return O(e,t,this.size)?this:(e=D(e,this.size),(t=L(t,this.size))<=e?new ve(0,0):new ve(this.get(e,this._end),this.get(t,this._end),this._step))},ve.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ve.prototype.lastIndexOf=function(e){return this.indexOf(e)},ve.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;a<=n;a++){if(!1===e(o,a,this))return a+1;o+=t?-r:r}return a},ve.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;return new B(function(){var i=o;return o+=t?-r:r,a>n?{value:void 0,done:!0}:Y(e,a++,i)})},ve.prototype.equals=function(e){return e instanceof ve?this._start===e._start&&this._end===e._end&&this._step===e._step:he(this,e)},t(be,n),t(_e,be),t(we,be),t(Me,be),be.Keyed=_e,be.Indexed=we,be.Set=Me;var Te="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Ee(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>Ie?function(e){var t=Re[e];return void 0===t&&(t=Ce(e),je===Ne&&(je=0,Re={}),je++,Re[e]=t),t}(e):Ce(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Le&&void 0!==(t=xe.get(e)))return t;if(void 0!==(t=e[Pe]))return t;if(!De){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Pe]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++ke,1073741824&ke&&(ke=0),Le)xe.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(De)Object.defineProperty(e,Pe,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Pe]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Pe]=t}}return t}(e);if("function"==typeof e.toString)return Ce(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Ce(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Se(t)}var xe,Oe=Object.isExtensible,De=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Le="function"==typeof WeakMap;Le&&(xe=new WeakMap);var ke=0,Pe="__immutablehash__";"function"==typeof Symbol&&(Pe=Symbol(Pe));var Ie=16,Ne=255,je=0,Re={};function Ae(e){ye(e!==1/0,"Cannot perform this action with an infinite size.")}function Be(e){return null==e?Xe():Ye(e)&&!u(e)?e:Xe().withMutations(function(t){var n=r(e);Ae(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ye(e){return!(!e||!e[He])}t(Be,_e),Be.of=function(){var t=e.call(arguments,0);return Xe().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Be.prototype.toString=function(){return this.__toString("Map {","}")},Be.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Be.prototype.set=function(e,t){return $e(this,e,t)},Be.prototype.setIn=function(e,t){return this.updateIn(e,v,function(){return t})},Be.prototype.remove=function(e){return $e(this,e,v)},Be.prototype.deleteIn=function(e){return this.updateIn(e,function(){return v})},Be.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Be.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var a=t===v,i=n.next();if(i.done){var s=a?r:t,l=o(s);return l===s?t:l}ye(a||t&&t.set,"invalid keyPath");var c=i.value,u=a?v:t.get(c,v),d=e(u,n,r,o);return d===u?t:d===v?t.remove(c):(a?Xe():t).set(c,d)}(this,rn(e),t,n);return r===v?void 0:r},Be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xe()},Be.prototype.merge=function(){return rt(this,void 0,arguments)},Be.prototype.mergeWith=function(t){var n=e.call(arguments,1);return rt(this,t,n)},Be.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Be.prototype.mergeDeep=function(){return rt(this,ot,arguments)},Be.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return rt(this,at(t),n)},Be.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Be.prototype.sort=function(e){return Dt(Wt(this,e))},Be.prototype.sortBy=function(e,t){return Dt(Wt(this,t,e))},Be.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Be.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new T)},Be.prototype.asImmutable=function(){return this.__ensureOwner()},Be.prototype.wasAltered=function(){return this.__altered},Be.prototype.__iterator=function(e,t){return new Ze(this,e,t)},Be.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Be.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Qe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Be.isMap=Ye;var ze,He="@@__IMMUTABLE_MAP__@@",Fe=Be.prototype;function Ue(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function qe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function We(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ze(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Ke(e._root)}function Je(e,t){return Y(e,t[0],t[1])}function Ke(e,t){return{node:e,index:0,__prev:t}}function Qe(e,t,n,r){var o=Object.create(Fe);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Xe(){return ze||(ze=Qe(0))}function $e(e,t,n){var r,o;if(e._root){var a=w(b),i=w(_);if(r=et(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===v?-1:1:0)}else{if(n===v)return e;o=1,r=new Ue(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Qe(o,r):Xe()}function et(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===v?e:(M(s),M(i),new Ve(t,r,[o,a]))}function tt(e){return e.constructor===Ve||e.constructor===We}function nt(e,t,n,r,o){if(e.keyHash===r)return new We(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y,l=i===s?[nt(e,t,n+h,r,o)]:(a=new Ve(t,r,o),i<s?[e,a]:[a,e]);return new Ge(t,1<<i|1<<s,l)}function rt(e,t,n){for(var o=[],a=0;a<n.length;a++){var s=n[a],l=r(s);i(s)||(l=l.map(function(e){return de(e)})),o.push(l)}return it(e,t,o)}function ot(e,t,n){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):fe(e,t)?e:t}function at(e){return function(t,n,r){if(t&&t.mergeDeepWith&&i(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return fe(t,o)?t:o}}function it(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,v,function(e){return e===v?n:t(e,n,r)})}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)}):e.constructor(n[0])}function st(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function lt(e,t,n,r){var o=r?e:S(e);return o[t]=n,o}Fe[He]=!0,Fe.delete=Fe.remove,Fe.removeIn=Fe.deleteIn,Ue.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(fe(n,o[a][0]))return o[a][1];return r},Ue.prototype.update=function(e,t,n,r,o,a,i){for(var s=o===v,l=this.entries,c=0,u=l.length;c<u&&!fe(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(M(i),(s||!d)&&M(a),!s||1!==l.length){if(!d&&!s&&l.length>=ct)return function(e,t,n,r){e||(e=new T);for(var o=new Ve(e,Ee(n),[n,r]),a=0;a<t.length;a++){var i=t[a];o=o.update(e,0,void 0,i[0],i[1])}return o}(e,l,r,o);var p=e&&e===this.ownerID,m=p?l:S(l);return d?s?c===u-1?m.pop():m[c]=m.pop():m[c]=[r,o]:m.push([r,o]),p?(this.entries=m,this):new Ue(e,m)}},Ge.prototype.get=function(e,t,n,r){void 0===t&&(t=Ee(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[st(a&o-1)].get(e+h,t,n,r)},Ge.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Ee(r));var s=(0===t?n:n>>>t)&y,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&o===v)return this;var d=st(c&l-1),p=this.nodes,m=u?p[d]:void 0,f=et(m,e,t+h,n,r,o,a,i);if(f===m)return this;if(!u&&f&&p.length>=ut)return function(e,t,n,r,o){for(var a=0,i=new Array(g),s=0;0!==n;s++,n>>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new qe(e,a+1,i)}(e,p,c,s,f);if(u&&!f&&2===p.length&&tt(p[1^d]))return p[1^d];if(u&&f&&1===p.length&&tt(f))return f;var b=e&&e===this.ownerID,_=u?f?c:c^l:c|l,w=u?f?lt(p,d,f,b):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),a=0,i=0;i<r;i++)i===t&&(a=1),o[i]=e[i+a];return o}(p,d,b):function(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s<o;s++)s===t?(a[s]=n,i=-1):a[s]=e[s+i];return a}(p,d,f,b);return b?(this.bitmap=_,this.nodes=w,this):new Ge(e,_,w)},qe.prototype.get=function(e,t,n,r){void 0===t&&(t=Ee(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+h,t,n,r):r},qe.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Ee(r));var s=(0===t?n:n>>>t)&y,l=o===v,c=this.nodes,u=c[s];if(l&&!u)return this;var d=et(u,e,t+h,n,r,o,a,i);if(d===u)return this;var p=this.count;if(u){if(!d&&--p<dt)return function(e,t,n,r){for(var o=0,a=0,i=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=l,i[a++]=u)}return new Ge(e,o,i)}(e,c,p,s)}else p++;var m=e&&e===this.ownerID,f=lt(c,s,d,m);return m?(this.count=p,this.nodes=f,this):new qe(e,p,f)},We.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(fe(n,o[a][0]))return o[a][1];return r},We.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Ee(r));var s=o===v;if(n!==this.keyHash)return s?this:(M(i),M(a),nt(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!fe(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(M(i),(s||!d)&&M(a),s&&2===u)return new Ve(e,this.keyHash,l[1^c]);var p=e&&e===this.ownerID,m=p?l:S(l);return d?s?c===u-1?m.pop():m[c]=m.pop():m[c]=[r,o]:m.push([r,o]),p?(this.entries=m,this):new We(e,this.keyHash,m)},Ve.prototype.get=function(e,t,n,r){return fe(n,this.entry[0])?this.entry[1]:r},Ve.prototype.update=function(e,t,n,r,o,a,i){var s=o===v,l=fe(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(M(i),s?void M(a):l?e&&e===this.ownerID?(this.entry[1]=o,this):new Ve(e,this.keyHash,[r,o]):(M(a),nt(this,e,t,Ee(r),[r,o])))},Ue.prototype.iterate=We.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Ge.prototype.iterate=qe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var a=n[t?o-r:r];if(a&&!1===a.iterate(e,t))return!1}},Ve.prototype.iterate=function(e,t){return e(this.entry)},t(Ze,B),Ze.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return Je(e,r.entry)}else if(r.entries){if(n=r.entries.length-1,o<=n)return Je(e,r.entries[this._reverse?n-o:o])}else if(n=r.nodes.length-1,o<=n){var a=r.nodes[this._reverse?n-o:o];if(a){if(a.entry)return Je(e,a.entry);t=this._stack=Ke(a,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var ct=g/4,ut=g/2,dt=g/4;function pt(e){var t=Mt();if(null==e)return t;if(mt(e))return e;var n=o(e),r=n.size;return 0===r?t:(Ae(r),r>0&&r<g?wt(0,r,h,null,new gt(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function mt(e){return!(!e||!e[ft])}t(pt,we),pt.of=function(){return this(arguments)},pt.prototype.toString=function(){return this.__toString("List [","]")},pt.prototype.get=function(e,t){if((e=C(this,e))>=0&&e<this.size){var n=Et(this,e+=this._origin);return n&&n.array[e&y]}return t},pt.prototype.set=function(e,t){return function(e,t,n){if((t=C(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Ct(e,t).set(0,n):Ct(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,o=e._root,a=w(_);return t>=Ot(e._capacity)?r=Tt(r,e.__ownerID,0,t,n,a):o=Tt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):wt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},pt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},pt.prototype.insert=function(e,t){return this.splice(e,0,t)},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=h,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Mt()},pt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Ct(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},pt.prototype.pop=function(){return Ct(this,0,-1)},pt.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Ct(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},pt.prototype.shift=function(){return Ct(this,1)},pt.prototype.merge=function(){return xt(this,void 0,arguments)},pt.prototype.mergeWith=function(t){var n=e.call(arguments,1);return xt(this,t,n)},pt.prototype.mergeDeep=function(){return xt(this,ot,arguments)},pt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return xt(this,at(t),n)},pt.prototype.setSize=function(e){return Ct(this,0,e)},pt.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:Ct(this,D(e,n),L(t,n))},pt.prototype.__iterator=function(e,t){var n=0,r=_t(this,t);return new B(function(){var t=r();return t===bt?{value:void 0,done:!0}:Y(e,n++,t)})},pt.prototype.__iterate=function(e,t){for(var n,r=0,o=_t(this,t);(n=o())!==bt&&!1!==e(n,r++,this););return r},pt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?wt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},pt.isList=mt;var ft="@@__IMMUTABLE_LIST__@@",ht=pt.prototype;function gt(e,t){this.array=e,this.ownerID=t}ht[ft]=!0,ht.delete=ht.remove,ht.setIn=Fe.setIn,ht.deleteIn=ht.removeIn=Fe.removeIn,ht.update=Fe.update,ht.updateIn=Fe.updateIn,ht.mergeIn=Fe.mergeIn,ht.mergeDeepIn=Fe.mergeDeepIn,ht.withMutations=Fe.withMutations,ht.asMutable=Fe.asMutable,ht.asImmutable=Fe.asImmutable,ht.wasAltered=Fe.wasAltered,gt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&y;if(r>=this.array.length)return new gt([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-h,n))===i&&a)return this}if(a&&!o)return this;var s=St(this,e);if(!a)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},gt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-h,n))===a&&o===this.array.length-1)return this}var i=St(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var yt,vt,bt={};function _t(e,t){var n=e._origin,r=e._capacity,o=Ot(r),a=e._tail;return i(e._root,e._level,0);function i(e,s,l){return 0===s?function(e,i){var s=i===o?a&&a.array:e&&e.array,l=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(l===c)return bt;var e=t?--c:l++;return s&&s[e]}}(e,l):function(e,o,a){var s,l=e&&e.array,c=a>n?0:n-a>>o,u=1+(r-a>>o);return u>g&&(u=g),function(){for(;;){if(s){var e=s();if(e!==bt)return e;s=null}if(c===u)return bt;var n=t?--u:c++;s=i(l&&l[n],o-h,a+(n<<o))}}}(e,s,l)}}function wt(e,t,n,r,o,a,i){var s=Object.create(ht);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=a,s.__hash=i,s.__altered=!1,s}function Mt(){return yt||(yt=wt(0,0,h))}function Tt(e,t,n,r,o,a){var i,s=r>>>n&y,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(n>0){var c=e&&e.array[s],u=Tt(c,t,n-h,r,o,a);return u===c?e:((i=St(e,t)).array[s]=u,i)}return l&&e.array[s]===o?e:(M(a),i=St(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function St(e,t){return t&&e&&t===e.ownerID?e:new gt(e?e.array.slice():[],t)}function Et(e,t){if(t>=Ot(e._capacity))return e._tail;if(t<1<<e._level+h){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&y],r-=h;return n}}function Ct(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new T,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var l=e._level,c=e._root,u=0;i+u<0;)c=new gt(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=h);u&&(i+=u,o+=u,s+=u,a+=u);for(var d=Ot(a),p=Ot(s);p>=1<<l+h;)c=new gt(c&&c.array.length?[c]:[],r),l+=h;var m=e._tail,f=p<d?Et(e,s-1):p>d?new gt([],r):m;if(m&&p>d&&i<a&&m.array.length){for(var g=c=St(c,r),v=l;v>h;v-=h){var b=d>>>v&y;g=g.array[b]=St(g.array[b],r)}g.array[d>>>h&y]=m}if(s<a&&(f=f&&f.removeAfter(r,0,s)),i>=p)i-=p,s-=p,l=h,c=null,f=f&&f.removeBefore(r,0,i);else if(i>o||p<d){for(u=0;c;){var _=i>>>l&y;if(_!==p>>>l&y)break;_&&(u+=(1<<l)*_),l-=h,c=c.array[_]}c&&i>o&&(c=c.removeBefore(r,l,i-u)),c&&p<d&&(c=c.removeAfter(r,l,p-u)),u&&(i-=u,s-=u)}return e.__ownerID?(e.size=s-i,e._origin=i,e._capacity=s,e._level=l,e._root=c,e._tail=f,e.__hash=void 0,e.__altered=!0,e):wt(i,s,l,c,f)}function xt(e,t,n){for(var r=[],a=0,s=0;s<n.length;s++){var l=n[s],c=o(l);c.size>a&&(a=c.size),i(l)||(c=c.map(function(e){return de(e)})),r.push(c)}return a>e.size&&(e=e.setSize(a)),it(e,t,r)}function Ot(e){return e<g?0:e-1>>>h<<h}function Dt(e){return null==e?Pt():Lt(e)?e:Pt().withMutations(function(t){var n=r(e);Ae(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Lt(e){return Ye(e)&&u(e)}function kt(e,t,n,r){var o=Object.create(Dt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Pt(){return vt||(vt=kt(Xe(),Mt()))}function It(e,t,n){var r,o,a=e._map,i=e._list,s=a.get(t),l=void 0!==s;if(n===v){if(!l)return e;i.size>=g&&i.size>=2*a.size?(o=i.filter(function(e,t){return void 0!==e&&s!==t}),r=o.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(l){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):kt(r,o)}function Nt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function jt(e){this._iter=e,this.size=e.size}function Rt(e){this._iter=e,this.size=e.size}function At(e){this._iter=e,this.size=e.size}function Bt(e){var t=en(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=tn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===N){var r=e.__iterator(t,n);return new B(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===I?P:I,n)},t}function Yt(e,t,n){var r=en(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,v);return a===v?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate(function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)},o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(N,o);return new B(function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return Y(r,s,t.call(n,i[1],s,e),o)})},r}function zt(e,t){var n=en(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Bt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=tn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Ht(e,t,n,r){var o=en(e);return r&&(o.has=function(r){var o=e.get(r,v);return o!==v&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,v);return a!==v&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate(function(e,a,l){if(t.call(n,e,a,l))return s++,o(e,r?a:s-1,i)},a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(N,a),s=0;return new B(function(){for(;;){var a=i.next();if(a.done)return a;var l=a.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return Y(o,r?c:s++,u,a)}})},o}function Ft(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),O(t,n,o))return e;var a=D(t,o),i=L(n,o);if(a!=a||i!=i)return Ft(e.toSeq().cacheResult(),t,n,r);var s,l=i-a;l==l&&(s=l<0?0:l);var c=en(e);return c.size=0===s?s:e.size&&s||void 0,!r&&oe(e)&&s>=0&&(c.get=function(t,n){return(t=C(this,t))>=0&&t<s?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var i=0,l=!0,c=0;return e.__iterate(function(e,n){if(!l||!(l=i++<a))return c++,!1!==t(e,r?n:c-1,o)&&c!==s}),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),i=0,l=0;return new B(function(){for(;i++<a;)o.next();if(++l>s)return{value:void 0,done:!0};var e=o.next();return r||t===I?e:Y(t,l-1,t===P?void 0:e.value[1],e)})},c}function Ut(e,t,n,r){var o=en(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,l=0;return e.__iterate(function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return l++,o(e,r?a:l-1,i)}),l},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(N,a),l=!0,c=0;return new B(function(){var e,a,u;do{if((e=s.next()).done)return r||o===I?e:Y(o,c++,o===P?void 0:e.value[1],e);var d=e.value;a=d[0],u=d[1],l&&(l=t.call(n,u,a,i))}while(l);return o===N?e:Y(o,a,u,e)})},o}function Gt(e,t){var n=s(e),o=[e].concat(t).map(function(e){return i(e)?n&&(e=r(e)):e=n?ie(e):se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||l(e)&&l(a))return a}var c=new ee(o);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function qt(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;return function e(l,c){var u=this;l.__iterate(function(o,l){return(!t||c<t)&&i(o)?e(o,c+1):!1===r(o,n?l:a++,u)&&(s=!0),!s},o)}(e,0),a},r.__iteratorUncached=function(r,o){var a=e.__iterator(r,o),s=[],l=0;return new B(function(){for(;a;){var e=a.next();if(!1===e.done){var c=e.value;if(r===N&&(c=c[1]),t&&!(s.length<t)||!i(c))return n?e:Y(r,l++,c,e);s.push(a),a=c.__iterator(r,o)}else a=s.pop()}return{value:void 0,done:!0}})},r}function Wt(e,t,n){t||(t=nn);var r=s(e),o=0,a=e.toSeq().map(function(t,r){return[r,t,o++,n?n(t,r,e):t]}).toArray();return a.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?V(a):l(e)?Z(a):J(a)}function Vt(e,t,n){if(t||(t=nn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return Zt(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return Zt(t,e,n)?n:e})}function Zt(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function Jt(e,t,r){var o=en(e);return o.size=new ee(r).map(function(e){return e.size}).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(I,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map(function(e){return e=n(e),U(o?e.reverse():e)}),i=0,s=!1;return new B(function(){var n;return s||(n=a.map(function(e){return e.next()}),s=n.some(function(e){return e.done})),s?{value:void 0,done:!0}:Y(e,i++,t.apply(null,n.map(function(e){return e.value})))})},o}function Kt(e,t){return oe(e)?t:e.constructor(t)}function Qt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xt(e){return Ae(e.size),E(e)}function $t(e){return s(e)?r:l(e)?o:a}function en(e){return Object.create((s(e)?V:l(e)?Z:J).prototype)}function tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function nn(e,t){return e>t?1:e<t?-1:0}function rn(e){var t=U(e);if(!t){if(!q(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function on(e,t){var n,r=function(a){if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var i=Object.keys(e);!function(e,t){try{t.forEach(function(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){ye(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}.bind(void 0,e))}catch(e){}}(o,i),o.size=i.length,o._name=t,o._keys=i,o._defaultValues=e}this._map=Be(a)},o=r.prototype=Object.create(an);return o.constructor=r,r}t(Dt,Be),Dt.of=function(){return this(arguments)},Dt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Dt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Dt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Pt()},Dt.prototype.set=function(e,t){return It(this,e,t)},Dt.prototype.remove=function(e){return It(this,e,v)},Dt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Dt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Dt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Dt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?kt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Dt.isOrderedMap=Lt,Dt.prototype[f]=!0,Dt.prototype.delete=Dt.prototype.remove,t(Nt,V),Nt.prototype.get=function(e,t){return this._iter.get(e,t)},Nt.prototype.has=function(e){return this._iter.has(e)},Nt.prototype.valueSeq=function(){return this._iter.valueSeq()},Nt.prototype.reverse=function(){var e=this,t=zt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Nt.prototype.map=function(e,t){var n=this,r=Yt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Nt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Xt(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Nt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(I,t),r=t?Xt(this):0;return new B(function(){var o=n.next();return o.done?o:Y(e,t?--r:r++,o.value,o)})},Nt.prototype[f]=!0,t(jt,Z),jt.prototype.includes=function(e){return this._iter.includes(e)},jt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t),r=0;return new B(function(){var t=n.next();return t.done?t:Y(e,r++,t.value,t)})},t(Rt,J),Rt.prototype.has=function(e){return this._iter.includes(e)},Rt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Rt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t);return new B(function(){var t=n.next();return t.done?t:Y(e,t.value,t.value,t)})},t(At,V),At.prototype.entrySeq=function(){return this._iter.toSeq()},At.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Qt(t);var r=i(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},At.prototype.__iterator=function(e,t){var n=this._iter.__iterator(I,t);return new B(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Qt(r);var o=i(r);return Y(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}})},jt.prototype.cacheResult=Nt.prototype.cacheResult=Rt.prototype.cacheResult=At.prototype.cacheResult=tn,t(on,_e),on.prototype.toString=function(){return this.__toString(ln(this)+" {","}")},on.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},on.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},on.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=sn(this,Xe()))},on.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+ln(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:sn(this,r)},on.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:sn(this,t)},on.prototype.wasAltered=function(){return this._map.wasAltered()},on.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},on.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},on.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?sn(this,t,e):(this.__ownerID=e,this._map=t,this)};var an=on.prototype;function sn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function ln(e){return e._name||e.constructor.name||"Record"}function cn(e){return null==e?gn():un(e)&&!u(e)?e:gn().withMutations(function(t){var n=a(e);Ae(n.size),n.forEach(function(e){return t.add(e)})})}function un(e){return!(!e||!e[pn])}an.delete=an.remove,an.deleteIn=an.removeIn=Fe.removeIn,an.merge=Fe.merge,an.mergeWith=Fe.mergeWith,an.mergeIn=Fe.mergeIn,an.mergeDeep=Fe.mergeDeep,an.mergeDeepWith=Fe.mergeDeepWith,an.mergeDeepIn=Fe.mergeDeepIn,an.setIn=Fe.setIn,an.update=Fe.update,an.updateIn=Fe.updateIn,an.withMutations=Fe.withMutations,an.asMutable=Fe.asMutable,an.asImmutable=Fe.asImmutable,t(cn,Me),cn.of=function(){return this(arguments)},cn.fromKeys=function(e){return this(r(e).keySeq())},cn.prototype.toString=function(){return this.__toString("Set {","}")},cn.prototype.has=function(e){return this._map.has(e)},cn.prototype.add=function(e){return fn(this,this._map.set(e,!0))},cn.prototype.remove=function(e){return fn(this,this._map.remove(e))},cn.prototype.clear=function(){return fn(this,this._map.clear())},cn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)a(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},cn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return a(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},cn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return a(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},cn.prototype.merge=function(){return this.union.apply(this,arguments)},cn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},cn.prototype.sort=function(e){return yn(Wt(this,e))},cn.prototype.sortBy=function(e,t){return yn(Wt(this,t,e))},cn.prototype.wasAltered=function(){return this._map.wasAltered()},cn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},cn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},cn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},cn.isSet=un;var dn,pn="@@__IMMUTABLE_SET__@@",mn=cn.prototype;function fn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function hn(e,t){var n=Object.create(mn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function gn(){return dn||(dn=hn(Xe()))}function yn(e){return null==e?Mn():vn(e)?e:Mn().withMutations(function(t){var n=a(e);Ae(n.size),n.forEach(function(e){return t.add(e)})})}function vn(e){return un(e)&&u(e)}mn[pn]=!0,mn.delete=mn.remove,mn.mergeDeep=mn.merge,mn.mergeDeepWith=mn.mergeWith,mn.withMutations=Fe.withMutations,mn.asMutable=Fe.asMutable,mn.asImmutable=Fe.asImmutable,mn.__empty=gn,mn.__make=hn,t(yn,cn),yn.of=function(){return this(arguments)},yn.fromKeys=function(e){return this(r(e).keySeq())},yn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},yn.isOrderedSet=vn;var bn,_n=yn.prototype;function wn(e,t){var n=Object.create(_n);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Mn(){return bn||(bn=wn(Pt()))}function Tn(e){return null==e?Dn():Sn(e)?e:Dn().unshiftAll(e)}function Sn(e){return!(!e||!e[Cn])}_n[f]=!0,_n.__empty=Mn,_n.__make=wn,t(Tn,we),Tn.of=function(){return this(arguments)},Tn.prototype.toString=function(){return this.__toString("Stack [","]")},Tn.prototype.get=function(e,t){var n=this._head;for(e=C(this,e);n&&e--;)n=n.next;return n?n.value:t},Tn.prototype.peek=function(){return this._head&&this._head.value},Tn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):On(e,t)},Tn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ae(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):On(t,n)},Tn.prototype.pop=function(){return this.slice(1)},Tn.prototype.unshift=function(){return this.push.apply(this,arguments)},Tn.prototype.unshiftAll=function(e){return this.pushAll(e)},Tn.prototype.shift=function(){return this.pop.apply(this,arguments)},Tn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dn()},Tn.prototype.slice=function(e,t){if(O(e,t,this.size))return this;var n=D(e,this.size),r=L(t,this.size);if(r!==this.size)return we.prototype.slice.call(this,e,t);for(var o=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=o,this._head=a,this.__hash=void 0,this.__altered=!0,this):On(o,a)},Tn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?On(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Tn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Tn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new B(function(){if(r){var t=r.value;return r=r.next,Y(e,n++,t)}return{value:void 0,done:!0}})},Tn.isStack=Sn;var En,Cn="@@__IMMUTABLE_STACK__@@",xn=Tn.prototype;function On(e,t,n,r){var o=Object.create(xn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Dn(){return En||(En=On(0))}function Ln(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}xn[Cn]=!0,xn.withMutations=Fe.withMutations,xn.asMutable=Fe.asMutable,xn.asImmutable=Fe.asImmutable,xn.wasAltered=Fe.wasAltered,n.Iterator=B,Ln(n,{toArray:function(){Ae(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new jt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Nt(this,!0)},toMap:function(){return Be(this.toKeyedSeq())},toObject:function(){Ae(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Dt(this.toKeyedSeq())},toOrderedSet:function(){return yn(s(this)?this.valueSeq():this)},toSet:function(){return cn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Rt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Tn(s(this)?this.valueSeq():this)},toList:function(){return pt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Kt(this,Gt(this,t))},includes:function(e){return this.some(function(t){return fe(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Ae(this.size);var n=!0;return this.__iterate(function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1}),n},filter:function(e,t){return Kt(this,Ht(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ae(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ae(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(P)},map:function(e,t){return Kt(this,Yt(this,e,t))},reduce:function(e,t,n){var r,o;return Ae(this.size),arguments.length<2?o=!0:r=t,this.__iterate(function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Kt(this,zt(this,!0))},slice:function(e,t){return Kt(this,Ft(this,e,t,!0))},some:function(e,t){return