@lightningchart/lcjs
Version:
A high-performance charting library.
2 lines • 1.43 MB
JavaScript
/* LightningChart JS v8.0.2 */
var lcjs=function(t){"use strict";class i{constructor(){this.o=!0}u(){return this.o}}class s extends i{constructor(t,i){super(),this.S=t,this.M=t,this.o=i}_(t){return t!==this.S&&(this.M=this.S,this.S=t,this.o=!0),this}C(){return this.S}u(){return super.u()}}const e=(t,i)=>({x:t,y:i}),r=(t,i)=>({x:t,y:i}),n=(t,i,s)=>({position:t,high:i,low:s}),h=(t,i,s)=>({x:t,y:i,z:s}),o=t=>{const i=Array(0),s=Array(0);return t.length>0&&t.forEach((t=>{i.push(e(t.position,t.high)),s.push(e(t.position,t.low))})),[i,s]},a=(t,i)=>({min:t,max:i}),l=(t,i,s,e)=>({x:t,y:i,width:s,height:e}),u=(t,i=!0)=>new s(t,i),c=(t=0,i=0,s=0,e=0)=>({left:t,top:i,right:s,bottom:e}),d=c,f=(t,i)=>({left:void 0!==i.left?i.left:t.left,top:void 0!==i.top?i.top:t.top,right:void 0!==i.right?i.right:t.right,bottom:void 0!==i.bottom?i.bottom:t.bottom});var A="delete",v=32,g=31,y={};function p(t){t&&(t.value=!0)}function m(){}function S(t){return void 0===t.size&&(t.size=t.T(x)),t.size}function b(t,i){if("number"!=typeof i){var s=i>>>0;if(""+s!==i||4294967295===s)return NaN;i=s}return i<0?S(t)+i:i}function x(){return!0}function M(t,i,s){return(0===t&&!C(t)||void 0!==s&&t<=-s)&&(void 0===i||void 0!==s&&i>=s)}function w(t,i){return k(t,i,0)}function _(t,i){return k(t,i,i)}function k(t,i,s){return void 0===t?s:C(t)?i===1/0?i:0|Math.max(0,i+t):void 0===i||i===t?t:0|Math.min(i,t)}function C(t){return t<0||0===t&&1/t==-1/0}var T="@@__IMMUTABLE_ITERABLE__@@";function F(t){return Boolean(t&&t[T])}var I="@@__IMMUTABLE_KEYED__@@";function L(t){return Boolean(t&&t[I])}var P="@@__IMMUTABLE_INDEXED__@@";function B(t){return Boolean(t&&t[P])}function D(t){return L(t)||B(t)}var E=function(t){return F(t)?t:rt(t)},R=function(t){function i(t){return L(t)?t:nt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(E),O=function(t){function i(t){return B(t)?t:ht(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(E),z=function(t){function i(t){return F(t)&&!D(t)?t:ot(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(E);E.Keyed=R,E.Indexed=O,E.Set=z;var V="@@__IMMUTABLE_SEQ__@@";function N(t){return Boolean(t&&t[V])}var G="@@__IMMUTABLE_RECORD__@@";function $(t){return Boolean(t&&t[G])}function j(t){return F(t)||$(t)}var U="@@__IMMUTABLE_ORDERED__@@";function Y(t){return Boolean(t&&t[U])}var H="function"==typeof Symbol&&Symbol.iterator,W="@@iterator",X=H||W,Z=function(t){this.next=t};function J(t,i,s,e){var r=0===t?i:1===t?s:[i,s];return e?e.value=r:e={value:r,done:!1},e}function Q(){return{value:void 0,done:!0}}function K(t){return!!Array.isArray(t)||!!it(t)}function q(t){return t&&"function"==typeof t.next}function tt(t){var i=it(t);return i&&i.call(t)}function it(t){var i=t&&(H&&t[H]||t[W]);if("function"==typeof i)return i}Z.prototype.toString=function(){return"[Iterator]"},Z.KEYS=0,Z.VALUES=1,Z.ENTRIES=2,Z.prototype.inspect=Z.prototype.toSource=function(){return this.toString()},Z.prototype[X]=function(){return this};var st=Object.prototype.hasOwnProperty;function et(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var rt=function(t){function i(t){return null==t?dt():j(t)?t.toSeq():function(t){var i,s,e=vt(t);if(e)return(s=it(i=t))&&s===i.entries?e.fromEntrySeq():function(t){var i=it(t);return i&&i===t.keys}(t)?e.toSetSeq():e;if("object"==typeof t)return new lt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toSeq=function(){return this},i.prototype.toString=function(){return this.F("Seq {","}")},i.prototype.cacheResult=function(){return!this.I&&this.L&&(this.I=this.entrySeq().toArray(),this.size=this.I.length),this},i.prototype.T=function(t,i){var s=this.I;if(s){for(var e=s.length,r=0;r!==e;){var n=s[i?e-++r:r++];if(!1===t(n[1],n[0],this))break}return r}return this.L(t,i)},i.prototype.P=function(t,i){var s=this.I;if(s){var e=s.length,r=0;return new Z((function(){if(r===e)return{value:void 0,done:!0};var n=s[i?e-++r:r++];return J(t,n[0],n[1])}))}return this.D(t,i)},i}(E),nt=function(t){function i(t){return null==t?dt().toKeyedSeq():F(t)?L(t)?t.toSeq():t.fromEntrySeq():$(t)?t.toSeq():ft(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toKeyedSeq=function(){return this},i}(rt),ht=function(t){function i(t){return null==t?dt():F(t)?L(t)?t.entrySeq():t.toIndexedSeq():$(t)?t.toSeq().entrySeq():At(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return i(arguments)},i.prototype.toIndexedSeq=function(){return this},i.prototype.toString=function(){return this.F("Seq [","]")},i}(rt),ot=function(t){function i(t){return(F(t)&&!D(t)?t:ht(t)).toSetSeq()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return i(arguments)},i.prototype.toSetSeq=function(){return this},i}(rt);rt.isSeq=N,rt.Keyed=nt,rt.Set=ot,rt.Indexed=ht,rt.prototype[V]=!0;var at=function(t){function i(t){this.R=t,this.size=t.length}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return this.has(t)?this.R[b(this,t)]:i},i.prototype.T=function(t,i){for(var s=this.R,e=s.length,r=0;r!==e;){var n=i?e-++r:r++;if(!1===t(s[n],n,this))break}return r},i.prototype.P=function(t,i){var s=this.R,e=s.length,r=0;return new Z((function(){if(r===e)return{value:void 0,done:!0};var n=i?e-++r:r++;return J(t,n,s[n])}))},i}(ht),lt=function(t){function i(t){var i=Object.keys(t);this.O=t,this.V=i,this.size=i.length}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return void 0===i||this.has(t)?this.O[t]:i},i.prototype.has=function(t){return st.call(this.O,t)},i.prototype.T=function(t,i){for(var s=this.O,e=this.V,r=e.length,n=0;n!==r;){var h=e[i?r-++n:n++];if(!1===t(s[h],h,this))break}return n},i.prototype.P=function(t,i){var s=this.O,e=this.V,r=e.length,n=0;return new Z((function(){if(n===r)return{value:void 0,done:!0};var h=e[i?r-++n:n++];return J(t,h,s[h])}))},i}(nt);lt.prototype[U]=!0;var ut,ct=function(t){function i(t){this.N=t,this.size=t.length||t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.L=function(t,i){if(i)return this.cacheResult().T(t,i);var s=tt(this.N),e=0;if(q(s))for(var r;!(r=s.next()).done&&!1!==t(r.value,e++,this););return e},i.prototype.D=function(t,i){if(i)return this.cacheResult().P(t,i);var s=tt(this.N);if(!q(s))return new Z(Q);var e=0;return new Z((function(){var i=s.next();return i.done?i:J(t,e++,i.value)}))},i}(ht);function dt(){return ut||(ut=new at([]))}function ft(t){var i=vt(t);if(i)return i.fromEntrySeq();if("object"==typeof t)return new lt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function At(t){var i=vt(t);if(i)return i;throw new TypeError("Expected Array or collection object of values: "+t)}function vt(t){return et(t)?new at(t):K(t)?new ct(t):void 0}var gt="@@__IMMUTABLE_MAP__@@";function yt(t){return Boolean(t&&t[gt])}function pt(t){return yt(t)&&Y(t)}function mt(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function St(t,i){if(t===i||t!=t&&i!=i)return!0;if(!t||!i)return!1;if("function"==typeof t.valueOf&&"function"==typeof i.valueOf){if((t=t.valueOf())===(i=i.valueOf())||t!=t&&i!=i)return!0;if(!t||!i)return!1}return!!(mt(t)&&mt(i)&&t.equals(i))}var bt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,i){var s=65535&(t|=0),e=65535&(i|=0);return s*e+((t>>>16)*e+s*(i>>>16)<<16>>>0)|0};function xt(t){return t>>>1&1073741824|3221225471&t}var Mt=Object.prototype.valueOf;function wt(t){if(null==t)return _t(t);if("function"==typeof t.hashCode)return xt(t.hashCode(t));var i,s,e,r=(i=t).valueOf!==Mt&&"function"==typeof i.valueOf?i.valueOf(i):i;if(null==r)return _t(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var i=0|t;for(i!==t&&(i^=4294967295*t);t>4294967295;)i^=t/=4294967295;return xt(i)}(r);case"string":return r.length>Et?(void 0===(e=zt[s=r])&&(e=kt(s),Ot===Rt&&(Ot=0,zt={}),Ot++,zt[s]=e),e):kt(r);case"object":case"function":return function(t){var i;if(Lt&&void 0!==(i=It.get(t)))return i;if(void 0!==(i=t[Dt]))return i;if(!Tt){if(void 0!==(i=t.propertyIsEnumerable&&t.propertyIsEnumerable[Dt]))return i;if(void 0!==(i=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return i}if(i=Ft(),Lt)It.set(t,i);else{if(void 0!==Ct&&!1===Ct(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Tt)Object.defineProperty(t,Dt,{enumerable:!1,configurable:!1,writable:!1,value:i});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Dt]=i;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Dt]=i}}return i}(r);case"symbol":return function(t){var i=Pt[t];return void 0!==i||(i=Ft(),Pt[t]=i),i}(r);default:if("function"==typeof r.toString)return kt(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function _t(t){return null===t?1108378658:1108378659}function kt(t){for(var i=0,s=0;s<t.length;s++)i=31*i+t.charCodeAt(s)|0;return xt(i)}var Ct=Object.isExtensible,Tt=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function Ft(){var t=++Bt;return 1073741824&Bt&&(Bt=0),t}var It,Lt="function"==typeof WeakMap;Lt&&(It=new WeakMap);var Pt=Object.create(null),Bt=0,Dt="__immutablehash__";"function"==typeof Symbol&&(Dt=Symbol(Dt));var Et=16,Rt=255,Ot=0,zt={},Vt=function(t){function i(t,i){this.G=t,this.$=i,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return this.G.get(t,i)},i.prototype.has=function(t){return this.G.has(t)},i.prototype.valueSeq=function(){return this.G.valueSeq()},i.prototype.reverse=function(){var t=this,i=Yt(this,!0);return this.$||(i.valueSeq=function(){return t.G.toSeq().reverse()}),i},i.prototype.map=function(t,i){var s=this,e=Ut(this,t,i);return this.$||(e.valueSeq=function(){return s.G.toSeq().map(t,i)}),e},i.prototype.T=function(t,i){var s=this;return this.G.T((function(i,e){return t(i,e,s)}),i)},i.prototype.P=function(t,i){return this.G.P(t,i)},i}(nt);Vt.prototype[U]=!0;var Nt=function(t){function i(t){this.G=t,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.includes=function(t){return this.G.includes(t)},i.prototype.T=function(t,i){var s=this,e=0;return i&&S(this),this.G.T((function(r){return t(r,i?s.size-++e:e++,s)}),i)},i.prototype.P=function(t,i){var s=this,e=this.G.P(1,i),r=0;return i&&S(this),new Z((function(){var n=e.next();return n.done?n:J(t,i?s.size-++r:r++,n.value,n)}))},i}(ht),Gt=function(t){function i(t){this.G=t,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.has=function(t){return this.G.includes(t)},i.prototype.T=function(t,i){var s=this;return this.G.T((function(i){return t(i,i,s)}),i)},i.prototype.P=function(t,i){var s=this.G.P(1,i);return new Z((function(){var i=s.next();return i.done?i:J(t,i.value,i.value,i)}))},i}(ot),$t=function(t){function i(t){this.G=t,this.size=t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.entrySeq=function(){return this.G.toSeq()},i.prototype.T=function(t,i){var s=this;return this.G.T((function(i){if(i){ii(i);var e=F(i);return t(e?i.get(1):i[1],e?i.get(0):i[0],s)}}),i)},i.prototype.P=function(t,i){var s=this.G.P(1,i);return new Z((function(){for(;;){var i=s.next();if(i.done)return i;var e=i.value;if(e){ii(e);var r=F(e);return J(t,r?e.get(0):e[0],r?e.get(1):e[1],i)}}}))},i}(nt);function jt(t){var i=ei(t);return i.G=t,i.size=t.size,i.flip=function(){return t},i.reverse=function(){var i=t.reverse.apply(this);return i.flip=function(){return t.reverse()},i},i.has=function(i){return t.includes(i)},i.includes=function(i){return t.has(i)},i.cacheResult=ri,i.L=function(i,s){var e=this;return t.T((function(t,s){return!1!==i(s,t,e)}),s)},i.D=function(i,s){if(2===i){var e=t.P(i,s);return new Z((function(){var t=e.next();if(!t.done){var i=t.value[0];t.value[0]=t.value[1],t.value[1]=i}return t}))}return t.P(1===i?0:1,s)},i}function Ut(t,i,s){var e=ei(t);return e.size=t.size,e.has=function(i){return t.has(i)},e.get=function(e,r){var n=t.get(e,y);return n===y?r:i.call(s,n,e,t)},e.L=function(e,r){var n=this;return t.T((function(t,r,h){return!1!==e(i.call(s,t,r,h),r,n)}),r)},e.D=function(e,r){var n=t.P(2,r);return new Z((function(){var r=n.next();if(r.done)return r;var h=r.value,o=h[0];return J(e,o,i.call(s,h[1],o,t),r)}))},e}function Yt(t,i){var s=this,e=ei(t);return e.G=t,e.size=t.size,e.reverse=function(){return t},t.flip&&(e.flip=function(){var i=jt(t);return i.reverse=function(){return t.flip()},i}),e.get=function(s,e){return t.get(i?s:-1-s,e)},e.has=function(s){return t.has(i?s:-1-s)},e.includes=function(i){return t.includes(i)},e.cacheResult=ri,e.T=function(s,e){var r=this,n=0;return e&&S(t),t.T((function(t,h){return s(t,i?h:e?r.size-++n:n++,r)}),!e)},e.P=function(e,r){var n=0;r&&S(t);var h=t.P(2,!r);return new Z((function(){var t=h.next();if(t.done)return t;var o=t.value;return J(e,i?o[0]:r?s.size-++n:n++,o[1],t)}))},e}function Ht(t,i,s,e){var r=ei(t);return e&&(r.has=function(e){var r=t.get(e,y);return r!==y&&!!i.call(s,r,e,t)},r.get=function(e,r){var n=t.get(e,y);return n!==y&&i.call(s,n,e,t)?n:r}),r.L=function(r,n){var h=this,o=0;return t.T((function(t,n,a){if(i.call(s,t,n,a))return o++,r(t,e?n:o-1,h)}),n),o},r.D=function(r,n){var h=t.P(2,n),o=0;return new Z((function(){for(;;){var n=h.next();if(n.done)return n;var a=n.value,l=a[0],u=a[1];if(i.call(s,u,l,t))return J(r,e?l:o++,u,n)}}))},r}function Wt(t,i,s,e){var r=t.size;if(M(i,s,r))return t;var n=w(i,r),h=_(s,r);if(n!=n||h!=h)return Wt(t.toSeq().cacheResult(),i,s,e);var o,a=h-n;a==a&&(o=a<0?0:a);var l=ei(t);return l.size=0===o?o:t.size&&o||void 0,!e&&N(t)&&o>=0&&(l.get=function(i,s){return(i=b(this,i))>=0&&i<o?t.get(i+n,s):s}),l.L=function(i,s){var r=this;if(0===o)return 0;if(s)return this.cacheResult().T(i,s);var h=0,a=!0,l=0;return t.T((function(t,s){if(!a||!(a=h++<n))return l++,!1!==i(t,e?s:l-1,r)&&l!==o})),l},l.D=function(i,s){if(0!==o&&s)return this.cacheResult().P(i,s);if(0===o)return new Z(Q);var r=t.P(i,s),h=0,a=0;return new Z((function(){for(;h++<n;)r.next();if(++a>o)return{value:void 0,done:!0};var t=r.next();return e||1===i||t.done?t:J(i,a-1,0===i?void 0:t.value[1],t)}))},l}function Xt(t,i,s,e){var r=ei(t);return r.L=function(r,n){var h=this;if(n)return this.cacheResult().T(r,n);var o=!0,a=0;return t.T((function(t,n,l){if(!o||!(o=i.call(s,t,n,l)))return a++,r(t,e?n:a-1,h)})),a},r.D=function(r,n){var h=this;if(n)return this.cacheResult().P(r,n);var o=t.P(2,n),a=!0,l=0;return new Z((function(){var t,n,u;do{if((t=o.next()).done)return e||1===r?t:J(r,l++,0===r?void 0:t.value[1],t);var c=t.value;n=c[0],u=c[1],a&&(a=i.call(s,u,n,h))}while(a);return 2===r?t:J(r,n,u,t)}))},r}function Zt(t,i,s){var e=ei(t);return e.L=function(r,n){if(n)return this.cacheResult().T(r,n);var h=0,o=!1;return function t(a,l){a.T((function(n,a){return(!i||l<i)&&F(n)?t(n,l+1):(h++,!1===r(n,s?a:h-1,e)&&(o=!0)),!o}),n)}(t,0),h},e.D=function(e,r){if(r)return this.cacheResult().P(e,r);var n=t.P(e,r),h=[],o=0;return new Z((function(){for(;n;){var t=n.next();if(!1===t.done){var a=t.value;if(2===e&&(a=a[1]),i&&!(h.length<i)||!F(a))return s?t:J(e,o++,a,t);h.push(n),n=a.P(e,r)}else n=h.pop()}return{value:void 0,done:!0}}))},e}function Jt(t,i,s){i||(i=ni);var e=L(t),r=0,n=t.toSeq().map((function(i,e){return[e,i,r++,s?s(i,e,t):i]})).valueSeq().toArray();return n.sort((function(t,s){return i(t[3],s[3])||t[2]-s[2]})).forEach(e?function(t,i){n[i].length=2}:function(t,i){n[i]=t[1]}),e?nt(n):B(t)?ht(n):ot(n)}function Qt(t,i,s){if(i||(i=ni),s){var e=t.toSeq().map((function(i,e){return[i,s(i,e,t)]})).reduce((function(t,s){return Kt(i,t[1],s[1])?s:t}));return e&&e[0]}return t.reduce((function(t,s){return Kt(i,t,s)?s:t}))}function Kt(t,i,s){var e=t(s,i);return 0===e&&s!==i&&(null==s||s!=s)||e>0}function qt(t,i,s,e){var r=ei(t),n=new at(s).map((function(t){return t.size}));return r.size=e?n.max():n.min(),r.T=function(t,i){for(var s,e=this.P(1,i),r=0;!(s=e.next()).done&&!1!==t(s.value,r++,this););return r},r.D=function(t,r){var n=s.map((function(t){return t=E(t),tt(r?t.reverse():t)})),h=0,o=!1;return new Z((function(){var s;return o||(s=n.map((function(t){return t.next()})),o=e?s.every((function(t){return t.done})):s.some((function(t){return t.done}))),o?{value:void 0,done:!0}:J(t,h++,i.apply(null,s.map((function(t){return t.value}))))}))},r}function ti(t,i){return t===i?t:N(t)?i:t.constructor(i)}function ii(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function si(t){return L(t)?R:B(t)?O:z}function ei(t){return Object.create((L(t)?nt:B(t)?ht:ot).prototype)}function ri(){return this.G.cacheResult?(this.G.cacheResult(),this.size=this.G.size,this):rt.prototype.cacheResult.call(this)}function ni(t,i){return void 0===t&&void 0===i?0:void 0===t?1:void 0===i?-1:t>i?1:t<i?-1:0}function hi(t,i){i=i||0;for(var s=Math.max(0,t.length-i),e=new Array(s),r=0;r<s;r++)e[r]=t[r+i];return e}function oi(t,i){if(!t)throw new Error(i)}function ai(t){oi(t!==1/0,"Cannot perform this action with an infinite size.")}function li(t){if(et(t)&&"string"!=typeof t)return t;if(Y(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}Nt.prototype.cacheResult=Vt.prototype.cacheResult=Gt.prototype.cacheResult=$t.prototype.cacheResult=ri;var ui=Object.prototype.toString;function ci(t){return"object"==typeof t&&(j(t)||Array.isArray(t)||function(t){if(!t||"object"!=typeof t||"[object Object]"!==ui.call(t))return!1;var i=Object.getPrototypeOf(t);if(null===i)return!0;for(var s=i,e=Object.getPrototypeOf(i);null!==e;)s=e,e=Object.getPrototypeOf(s);return s===i}(t))}function di(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(i){return JSON.stringify(t)}}function fi(t,i,s){return j(t)?t.get(i,s):function(t,i){return j(t)?t.has(i):ci(t)&&st.call(t,i)}(t,i)?"function"==typeof t.get?t.get(i):t[i]:s}function Ai(t){if(Array.isArray(t))return hi(t);var i={};for(var s in t)st.call(t,s)&&(i[s]=t[s]);return i}function vi(t,i,s,e){e||(e=s,s=void 0);var r=gi(j(t),t,li(i),0,s,e);return r===y?s:r}function gi(t,i,s,e,r,n){var h=i===y;if(e===s.length){var o=h?r:i,a=n(o);return a===o?i:a}if(!h&&!ci(i))throw new TypeError("Cannot update within non-data-structure value in path ["+s.slice(0,e).map(di)+"]: "+i);var l=s[e],u=h?y:fi(i,l,y),c=gi(u===y?t:j(u),u,s,e+1,r,n);return c===u?i:c===y?function(t,i){if(!ci(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(j(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(i)}if(!st.call(t,i))return t;var s=Ai(t);return Array.isArray(s)?s.splice(i,1):delete s[i],s}(i,l):function(t,i,s){if(!ci(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(j(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(i,s)}if(st.call(t,i)&&s===t[i])return t;var e=Ai(t);return e[i]=s,e}(h?t?Wi():{}:i,l,c)}function yi(t,i){return function(t,i,s){return vi(t,i,y,(function(){return s}))}(this,t,i)}function pi(t){return function(t,i){return vi(t,i,(function(){return y}))}(this,t)}function mi(t,i,s,e){return vi(t,[i],s,e)}function Si(t,i,s){return 1===arguments.length?t(this):mi(this,t,i,s)}function bi(t,i,s){return vi(this,t,i,s)}function xi(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return wi(this,t)}function Mi(t){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return wi(this,i,t)}function wi(t,i,s){for(var e=[],r=0;r<i.length;r++){var n=R(i[r]);0!==n.size&&e.push(n)}return 0===e.length?t:0!==t.toSeq().size||t.j||1!==e.length?t.withMutations((function(t){for(var i=s?function(i,e){mi(t,e,y,(function(t){return t===y?i:s(t,i,e)}))}:function(i,s){t.set(s,i)},r=0;r<e.length;r++)e[r].forEach(i)})):t.constructor(e[0])}function _i(t,i,s){return ki(t,i,function(t){return function i(s,e,r){return ci(s)&&ci(e)&&(n=e,h=rt(s),o=rt(n),B(h)===B(o)&&L(h)===L(o))?ki(s,[e],i):t?t(s,e,r):e;var n,h,o}}(s))}function ki(t,i,s){if(!ci(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(j(t))return"function"==typeof s&&t.mergeWith?t.mergeWith.apply(t,[s].concat(i)):t.merge?t.merge.apply(t,i):t.concat.apply(t,i);for(var e=Array.isArray(t),r=t,n=e?O:R,h=e?function(i){r===t&&(r=Ai(r)),r.push(i)}:function(i,e){var n=st.call(r,e),h=n&&s?s(r[e],i,e):i;n&&h===r[e]||(r===t&&(r=Ai(r)),r[e]=h)},o=0;o<i.length;o++)n(i[o]).forEach(h);return r}function Ci(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return _i(this,t)}function Ti(t){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];return _i(this,i,t)}function Fi(t){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];return vi(this,t,Wi(),(function(t){return ki(t,i)}))}function Ii(t){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];return vi(this,t,Wi(),(function(t){return _i(t,i)}))}function Li(t){var i=this.asMutable();return t(i),i.wasAltered()?i.U(this.j):this}function Pi(){return this.j?this:this.U(new m)}function Bi(){return this.U()}function Di(){return this.Y}var Ei=function(t){function i(i){return null==i?Wi():yt(i)&&!Y(i)?i:Wi().withMutations((function(s){var e=t(i);ai(e.size),e.forEach((function(t,i){return s.set(i,t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return Wi().withMutations((function(i){for(var s=0;s<t.length;s+=2){if(s+1>=t.length)throw new Error("Missing value for key: "+t[s]);i.set(t[s],t[s+1])}}))},i.prototype.toString=function(){return this.F("Map {","}")},i.prototype.get=function(t,i){return this.H?this.H.get(0,void 0,t,i):i},i.prototype.set=function(t,i){return Xi(this,t,i)},i.prototype.remove=function(t){return Xi(this,t,y)},i.prototype.deleteAll=function(t){var i=E(t);return 0===i.size?this:this.withMutations((function(t){i.forEach((function(i){return t.remove(i)}))}))},i.prototype.clear=function(){return 0===this.size?this:this.j?(this.size=0,this.H=null,this.W=void 0,this.Y=!0,this):Wi()},i.prototype.sort=function(t){return ms(Jt(this,t))},i.prototype.sortBy=function(t,i){return ms(Jt(this,i,t))},i.prototype.map=function(t,i){var s=this;return this.withMutations((function(e){e.forEach((function(r,n){e.set(n,t.call(i,r,n,s))}))}))},i.prototype.P=function(t,i){return new ji(this,t,i)},i.prototype.T=function(t,i){var s=this,e=0;return this.H&&this.H.iterate((function(i){return e++,t(i[1],i[0],s)}),i),e},i.prototype.U=function(t){return t===this.j?this:t?Hi(this.size,this.H,t,this.W):0===this.size?Wi():(this.j=t,this.Y=!1,this)},i}(R);Ei.isMap=yt;var Ri=Ei.prototype;Ri[gt]=!0,Ri[A]=Ri.remove,Ri.removeAll=Ri.deleteAll,Ri.setIn=yi,Ri.removeIn=Ri.deleteIn=pi,Ri.update=Si,Ri.updateIn=bi,Ri.merge=Ri.concat=xi,Ri.mergeWith=Mi,Ri.mergeDeep=Ci,Ri.mergeDeepWith=Ti,Ri.mergeIn=Fi,Ri.mergeDeepIn=Ii,Ri.withMutations=Li,Ri.wasAltered=Di,Ri.asImmutable=Bi,Ri["@@transducer/init"]=Ri.asMutable=Pi,Ri["@@transducer/step"]=function(t,i){return t.set(i[0],i[1])},Ri["@@transducer/result"]=function(t){return t.asImmutable()};var Oi=function(t,i){this.ownerID=t,this.entries=i};Oi.prototype.get=function(t,i,s,e){for(var r=this.entries,n=0,h=r.length;n<h;n++)if(St(s,r[n][0]))return r[n][1];return e},Oi.prototype.update=function(t,i,s,e,r,n,h){for(var o=r===y,a=this.entries,l=0,u=a.length;l<u&&!St(e,a[l][0]);l++);var c=l<u;if(c?a[l][1]===r:o)return this;if(p(h),(o||!c)&&p(n),!o||1!==a.length){if(!c&&!o&&a.length>=ts)return function(t,i,s,e){t||(t=new m);for(var r=new Gi(t,wt(s),[s,e]),n=0;n<i.length;n++){var h=i[n];r=r.update(t,0,void 0,h[0],h[1])}return r}(t,a,e,r);var d=t&&t===this.ownerID,f=d?a:hi(a);return c?o?l===u-1?f.pop():f[l]=f.pop():f[l]=[e,r]:f.push([e,r]),d?(this.entries=f,this):new Oi(t,f)}};var zi=function(t,i,s){this.ownerID=t,this.bitmap=i,this.nodes=s};zi.prototype.get=function(t,i,s,e){void 0===i&&(i=wt(s));var r=1<<((0===t?i:i>>>t)&g),n=this.bitmap;return n&r?this.nodes[Ki(n&r-1)].get(t+5,i,s,e):e},zi.prototype.update=function(t,i,s,e,r,n,h){void 0===s&&(s=wt(e));var o=(0===i?s:s>>>i)&g,a=1<<o,l=this.bitmap,u=!!(l&a);if(!u&&r===y)return this;var c=Ki(l&a-1),d=this.nodes,f=u?d[c]:void 0,A=Zi(f,t,i+5,s,e,r,n,h);if(A===f)return this;if(!u&&A&&d.length>=is)return function(t,i,s,e,r){for(var n=0,h=new Array(v),o=0;0!==s;o++,s>>>=1)h[o]=1&s?i[n++]:void 0;return h[e]=r,new Vi(t,n+1,h)}(t,d,l,o,A);if(u&&!A&&2===d.length&&Ji(d[1^c]))return d[1^c];if(u&&A&&1===d.length&&Ji(A))return A;var p=t&&t===this.ownerID,m=u?A?l:l^a:l|a,S=u?A?qi(d,c,A,p):function(t,i,s){var e=t.length-1;if(s&&i===e)return t.pop(),t;for(var r=new Array(e),n=0,h=0;h<e;h++)h===i&&(n=1),r[h]=t[h+n];return r}(d,c,p):function(t,i,s,e){var r=t.length+1;if(e&&i+1===r)return t[i]=s,t;for(var n=new Array(r),h=0,o=0;o<r;o++)o===i?(n[o]=s,h=-1):n[o]=t[o+h];return n}(d,c,A,p);return p?(this.bitmap=m,this.nodes=S,this):new zi(t,m,S)};var Vi=function(t,i,s){this.ownerID=t,this.count=i,this.nodes=s};Vi.prototype.get=function(t,i,s,e){void 0===i&&(i=wt(s));var r=(0===t?i:i>>>t)&g,n=this.nodes[r];return n?n.get(t+5,i,s,e):e},Vi.prototype.update=function(t,i,s,e,r,n,h){void 0===s&&(s=wt(e));var o=(0===i?s:s>>>i)&g,a=r===y,l=this.nodes,u=l[o];if(a&&!u)return this;var c=Zi(u,t,i+5,s,e,r,n,h);if(c===u)return this;var d=this.count;if(u){if(!c&&--d<ss)return function(t,i,s,e){for(var r=0,n=0,h=new Array(s),o=0,a=1,l=i.length;o<l;o++,a<<=1){var u=i[o];void 0!==u&&o!==e&&(r|=a,h[n++]=u)}return new zi(t,r,h)}(t,l,d,o)}else d++;var f=t&&t===this.ownerID,A=qi(l,o,c,f);return f?(this.count=d,this.nodes=A,this):new Vi(t,d,A)};var Ni=function(t,i,s){this.ownerID=t,this.keyHash=i,this.entries=s};Ni.prototype.get=function(t,i,s,e){for(var r=this.entries,n=0,h=r.length;n<h;n++)if(St(s,r[n][0]))return r[n][1];return e},Ni.prototype.update=function(t,i,s,e,r,n,h){void 0===s&&(s=wt(e));var o=r===y;if(s!==this.keyHash)return o?this:(p(h),p(n),Qi(this,t,i,s,[e,r]));for(var a=this.entries,l=0,u=a.length;l<u&&!St(e,a[l][0]);l++);var c=l<u;if(c?a[l][1]===r:o)return this;if(p(h),(o||!c)&&p(n),o&&2===u)return new Gi(t,this.keyHash,a[1^l]);var d=t&&t===this.ownerID,f=d?a:hi(a);return c?o?l===u-1?f.pop():f[l]=f.pop():f[l]=[e,r]:f.push([e,r]),d?(this.entries=f,this):new Ni(t,this.keyHash,f)};var Gi=function(t,i,s){this.ownerID=t,this.keyHash=i,this.entry=s};Gi.prototype.get=function(t,i,s,e){return St(s,this.entry[0])?this.entry[1]:e},Gi.prototype.update=function(t,i,s,e,r,n,h){var o=r===y,a=St(e,this.entry[0]);return(a?r===this.entry[1]:o)?this:(p(h),o?void p(n):a?t&&t===this.ownerID?(this.entry[1]=r,this):new Gi(t,this.keyHash,[e,r]):(p(n),Qi(this,t,i,wt(e),[e,r])))},Oi.prototype.iterate=Ni.prototype.iterate=function(t,i){for(var s=this.entries,e=0,r=s.length-1;e<=r;e++)if(!1===t(s[i?r-e:e]))return!1},zi.prototype.iterate=Vi.prototype.iterate=function(t,i){for(var s=this.nodes,e=0,r=s.length-1;e<=r;e++){var n=s[i?r-e:e];if(n&&!1===n.iterate(t,i))return!1}},Gi.prototype.iterate=function(t,i){return t(this.entry)};var $i,ji=function(t){function i(t,i,s){this.X=i,this.Z=s,this.J=t.H&&Yi(t.H)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.next=function(){for(var t=this.X,i=this.J;i;){var s=i.node,e=i.index++,r=void 0;if(s.entry){if(0===e)return Ui(t,s.entry)}else if(s.entries){if(e<=(r=s.entries.length-1))return Ui(t,s.entries[this.Z?r-e:e])}else if(e<=(r=s.nodes.length-1)){var n=s.nodes[this.Z?r-e:e];if(n){if(n.entry)return Ui(t,n.entry);i=this.J=Yi(n,i)}continue}i=this.J=this.J.K}return{value:void 0,done:!0}},i}(Z);function Ui(t,i){return J(t,i[0],i[1])}function Yi(t,i){return{node:t,index:0,K:i}}function Hi(t,i,s,e){var r=Object.create(Ri);return r.size=t,r.H=i,r.j=s,r.W=e,r.Y=!1,r}function Wi(){return $i||($i=Hi(0))}function Xi(t,i,s){var e,r;if(t.H){var n={value:!1},h={value:!1};if(e=Zi(t.H,t.j,0,void 0,i,s,n,h),!h.value)return t;r=t.size+(n.value?s===y?-1:1:0)}else{if(s===y)return t;r=1,e=new Oi(t.j,[[i,s]])}return t.j?(t.size=r,t.H=e,t.W=void 0,t.Y=!0,t):e?Hi(r,e):Wi()}function Zi(t,i,s,e,r,n,h,o){return t?t.update(i,s,e,r,n,h,o):n===y?t:(p(o),p(h),new Gi(i,e,[r,n]))}function Ji(t){return t.constructor===Gi||t.constructor===Ni}function Qi(t,i,s,e,r){if(t.keyHash===e)return new Ni(i,e,[t.entry,r]);var n,h=(0===s?t.keyHash:t.keyHash>>>s)&g,o=(0===s?e:e>>>s)&g,a=h===o?[Qi(t,i,s+5,e,r)]:(n=new Gi(i,e,r),h<o?[t,n]:[n,t]);return new zi(i,1<<h|1<<o,a)}function Ki(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function qi(t,i,s,e){var r=e?t:hi(t);return r[i]=s,r}var ts=8,is=16,ss=8,es="@@__IMMUTABLE_LIST__@@";function rs(t){return Boolean(t&&t[es])}var ns=function(t){function i(i){var s=ds();if(null==i)return s;if(rs(i))return i;var e=t(i),r=e.size;return 0===r?s:(ai(r),r>0&&r<v?cs(0,r,5,null,new os(e.toArray())):s.withMutations((function(t){t.setSize(r),e.forEach((function(i,s){return t.set(s,i)}))})))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.F("List [","]")},i.prototype.get=function(t,i){if((t=b(this,t))>=0&&t<this.size){var s=vs(this,t+=this.q);return s&&s.array[t&g]}return i},i.prototype.set=function(t,i){return function(t,i,s){if((i=b(t,i))!=i)return t;if(i>=t.size||i<0)return t.withMutations((function(t){i<0?gs(t,i).set(0,s):gs(t,0,i+1).set(i,s)}));i+=t.q;var e=t.tt,r=t.H,n={value:!1};return i>=ys(t.it)?e=fs(e,t.j,0,i,s,n):r=fs(r,t.j,t.st,i,s,n),n.value?t.j?(t.H=r,t.tt=e,t.W=void 0,t.Y=!0,t):cs(t.q,t.it,t.st,r,e):t}(this,t,i)},i.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},i.prototype.insert=function(t,i){return this.splice(t,0,i)},i.prototype.clear=function(){return 0===this.size?this:this.j?(this.size=this.q=this.it=0,this.st=5,this.H=this.tt=this.W=void 0,this.Y=!0,this):ds()},i.prototype.push=function(){var t=arguments,i=this.size;return this.withMutations((function(s){gs(s,0,i+t.length);for(var e=0;e<t.length;e++)s.set(i+e,t[e])}))},i.prototype.pop=function(){return gs(this,0,-1)},i.prototype.unshift=function(){var t=arguments;return this.withMutations((function(i){gs(i,-t.length);for(var s=0;s<t.length;s++)i.set(s,t[s])}))},i.prototype.shift=function(){return gs(this,1)},i.prototype.concat=function(){for(var i=arguments,s=[],e=0;e<arguments.length;e++){var r=i[e],n=t("string"!=typeof r&&K(r)?r:[r]);0!==n.size&&s.push(n)}return 0===s.length?this:0!==this.size||this.j||1!==s.length?this.withMutations((function(t){s.forEach((function(i){return i.forEach((function(i){return t.push(i)}))}))})):this.constructor(s[0])},i.prototype.setSize=function(t){return gs(this,0,t)},i.prototype.map=function(t,i){var s=this;return this.withMutations((function(e){for(var r=0;r<s.size;r++)e.set(r,t.call(i,e.get(r),r,s))}))},i.prototype.slice=function(t,i){var s=this.size;return M(t,i,s)?this:gs(this,w(t,s),_(i,s))},i.prototype.P=function(t,i){var s=i?this.size:0,e=us(this,i);return new Z((function(){var r=e();return r===ls?{value:void 0,done:!0}:J(t,i?--s:s++,r)}))},i.prototype.T=function(t,i){for(var s,e=i?this.size:0,r=us(this,i);(s=r())!==ls&&!1!==t(s,i?--e:e++,this););return e},i.prototype.U=function(t){return t===this.j?this:t?cs(this.q,this.it,this.st,this.H,this.tt,t,this.W):0===this.size?ds():(this.j=t,this.Y=!1,this)},i}(O);ns.isList=rs;var hs=ns.prototype;hs[es]=!0,hs[A]=hs.remove,hs.merge=hs.concat,hs.setIn=yi,hs.deleteIn=hs.removeIn=pi,hs.update=Si,hs.updateIn=bi,hs.mergeIn=Fi,hs.mergeDeepIn=Ii,hs.withMutations=Li,hs.wasAltered=Di,hs.asImmutable=Bi,hs["@@transducer/init"]=hs.asMutable=Pi,hs["@@transducer/step"]=function(t,i){return t.push(i)},hs["@@transducer/result"]=function(t){return t.asImmutable()};var os=function(t,i){this.array=t,this.ownerID=i};os.prototype.removeBefore=function(t,i,s){if(s===i?1<<i:0===this.array.length)return this;var e=s>>>i&g;if(e>=this.array.length)return new os([],t);var r,n=0===e;if(i>0){var h=this.array[e];if((r=h&&h.removeBefore(t,i-5,s))===h&&n)return this}if(n&&!r)return this;var o=As(this,t);if(!n)for(var a=0;a<e;a++)o.array[a]=void 0;return r&&(o.array[e]=r),o},os.prototype.removeAfter=function(t,i,s){if(s===(i?1<<i:0)||0===this.array.length)return this;var e,r=s-1>>>i&g;if(r>=this.array.length)return this;if(i>0){var n=this.array[r];if((e=n&&n.removeAfter(t,i-5,s))===n&&r===this.array.length-1)return this}var h=As(this,t);return h.array.splice(r+1),e&&(h.array[r]=e),h};var as,ls={};function us(t,i){var s=t.q,e=t.it,r=ys(e),n=t.tt;return function t(h,o,a){return 0===o?function(t,h){var o=h===r?n&&n.array:t&&t.array,a=h>s?0:s-h,l=e-h;return l>v&&(l=v),function(){if(a===l)return ls;var t=i?--l:a++;return o&&o[t]}}(h,a):function(r,n,h){var o,a=r&&r.array,l=h>s?0:s-h>>n,u=1+(e-h>>n);return u>v&&(u=v),function(){for(;;){if(o){var s=o();if(s!==ls)return s;o=null}if(l===u)return ls;var e=i?--u:l++;o=t(a&&a[e],n-5,h+(e<<n))}}}(h,o,a)}(t.H,t.st,0)}function cs(t,i,s,e,r,n,h){var o=Object.create(hs);return o.size=i-t,o.q=t,o.it=i,o.st=s,o.H=e,o.tt=r,o.j=n,o.W=h,o.Y=!1,o}function ds(){return as||(as=cs(0,0,5))}function fs(t,i,s,e,r,n){var h,o=e>>>s&g,a=t&&o<t.array.length;if(!a&&void 0===r)return t;if(s>0){var l=t&&t.array[o],u=fs(l,i,s-5,e,r,n);return u===l?t:((h=As(t,i)).array[o]=u,h)}return a&&t.array[o]===r?t:(n&&p(n),h=As(t,i),void 0===r&&o===h.array.length-1?h.array.pop():h.array[o]=r,h)}function As(t,i){return i&&t&&i===t.ownerID?t:new os(t?t.array.slice():[],i)}function vs(t,i){if(i>=ys(t.it))return t.tt;if(i<1<<t.st+5){for(var s=t.H,e=t.st;s&&e>0;)s=s.array[i>>>e&g],e-=5;return s}}function gs(t,i,s){void 0!==i&&(i|=0),void 0!==s&&(s|=0);var e=t.j||new m,r=t.q,n=t.it,h=r+i,o=void 0===s?n:s<0?n+s:r+s;if(h===r&&o===n)return t;if(h>=o)return t.clear();for(var a=t.st,l=t.H,u=0;h+u<0;)l=new os(l&&l.array.length?[void 0,l]:[],e),u+=1<<(a+=5);u&&(h+=u,r+=u,o+=u,n+=u);for(var c=ys(n),d=ys(o);d>=1<<a+5;)l=new os(l&&l.array.length?[l]:[],e),a+=5;var f=t.tt,A=d<c?vs(t,o-1):d>c?new os([],e):f;if(f&&d>c&&h<n&&f.array.length){for(var v=l=As(l,e),y=a;y>5;y-=5){var p=c>>>y&g;v=v.array[p]=As(v.array[p],e)}v.array[c>>>5&g]=f}if(o<n&&(A=A&&A.removeAfter(e,0,o)),h>=d)h-=d,o-=d,a=5,l=null,A=A&&A.removeBefore(e,0,h);else if(h>r||d<c){for(u=0;l;){var S=h>>>a&g;if(S!==d>>>a&g)break;S&&(u+=(1<<a)*S),a-=5,l=l.array[S]}l&&h>r&&(l=l.removeBefore(e,a,h-u)),l&&d<c&&(l=l.removeAfter(e,a,d-u)),u&&(h-=u,o-=u)}return t.j?(t.size=o-h,t.q=h,t.it=o,t.st=a,t.H=l,t.tt=A,t.W=void 0,t.Y=!0,t):cs(h,o,a,l,A)}function ys(t){return t<v?0:t-1>>>5<<5}var ps,ms=function(t){function i(t){return null==t?bs():pt(t)?t:bs().withMutations((function(i){var s=R(t);ai(s.size),s.forEach((function(t,s){return i.set(s,t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.F("OrderedMap {","}")},i.prototype.get=function(t,i){var s=this.et.get(t);return void 0!==s?this.rt.get(s)[1]:i},i.prototype.clear=function(){return 0===this.size?this:this.j?(this.size=0,this.et.clear(),this.rt.clear(),this.Y=!0,this):bs()},i.prototype.set=function(t,i){return xs(this,t,i)},i.prototype.remove=function(t){return xs(this,t,y)},i.prototype.T=function(t,i){var s=this;return this.rt.T((function(i){return i&&t(i[1],i[0],s)}),i)},i.prototype.P=function(t,i){return this.rt.fromEntrySeq().P(t,i)},i.prototype.U=function(t){if(t===this.j)return this;var i=this.et.U(t),s=this.rt.U(t);return t?Ss(i,s,t,this.W):0===this.size?bs():(this.j=t,this.Y=!1,this.et=i,this.rt=s,this)},i}(Ei);function Ss(t,i,s,e){var r=Object.create(ms.prototype);return r.size=t?t.size:0,r.et=t,r.rt=i,r.j=s,r.W=e,r.Y=!1,r}function bs(){return ps||(ps=Ss(Wi(),ds()))}function xs(t,i,s){var e,r,n=t.et,h=t.rt,o=n.get(i),a=void 0!==o;if(s===y){if(!a)return t;h.size>=v&&h.size>=2*n.size?(e=(r=h.filter((function(t,i){return void 0!==t&&o!==i}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.j&&(e.j=r.j=t.j)):(e=n.remove(i),r=o===h.size-1?h.pop():h.set(o,void 0))}else if(a){if(s===h.get(o)[1])return t;e=n,r=h.set(o,[i,s])}else e=n.set(i,h.size),r=h.set(h.size,[i,s]);return t.j?(t.size=e.size,t.et=e,t.rt=r,t.W=void 0,t.Y=!0,t):Ss(e,r)}ms.isOrderedMap=pt,ms.prototype[U]=!0,ms.prototype[A]=ms.prototype.remove;var Ms="@@__IMMUTABLE_STACK__@@";function ws(t){return Boolean(t&&t[Ms])}var _s=function(t){function i(t){return null==t?Fs():ws(t)?t:Fs().pushAll(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.F("Stack [","]")},i.prototype.get=function(t,i){var s=this.nt;for(t=b(this,t);s&&t--;)s=s.next;return s?s.value:i},i.prototype.peek=function(){return this.nt&&this.nt.value},i.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var i=this.size+arguments.length,s=this.nt,e=arguments.length-1;e>=0;e--)s={value:t[e],next:s};return this.j?(this.size=i,this.nt=s,this.W=void 0,this.Y=!0,this):Ts(i,s)},i.prototype.pushAll=function(i){if(0===(i=t(i)).size)return this;if(0===this.size&&ws(i))return i;ai(i.size);var s=this.size,e=this.nt;return i.T((function(t){s++,e={value:t,next:e}}),!0),this.j?(this.size=s,this.nt=e,this.W=void 0,this.Y=!0,this):Ts(s,e)},i.prototype.pop=function(){return this.slice(1)},i.prototype.clear=function(){return 0===this.size?this:this.j?(this.size=0,this.nt=void 0,this.W=void 0,this.Y=!0,this):Fs()},i.prototype.slice=function(i,s){if(M(i,s,this.size))return this;var e=w(i,this.size);if(_(s,this.size)!==this.size)return t.prototype.slice.call(this,i,s);for(var r=this.size-e,n=this.nt;e--;)n=n.next;return this.j?(this.size=r,this.nt=n,this.W=void 0,this.Y=!0,this):Ts(r,n)},i.prototype.U=function(t){return t===this.j?this:t?Ts(this.size,this.nt,t,this.W):0===this.size?Fs():(this.j=t,this.Y=!1,this)},i.prototype.T=function(t,i){var s=this;if(i)return new at(this.toArray()).T((function(i,e){return t(i,e,s)}),i);for(var e=0,r=this.nt;r&&!1!==t(r.value,e++,this);)r=r.next;return e},i.prototype.P=function(t,i){if(i)return new at(this.toArray()).P(t,i);var s=0,e=this.nt;return new Z((function(){if(e){var i=e.value;return e=e.next,J(t,s++,i)}return{value:void 0,done:!0}}))},i}(O);_s.isStack=ws;var ks,Cs=_s.prototype;function Ts(t,i,s,e){var r=Object.create(Cs);return r.size=t,r.nt=i,r.j=s,r.W=e,r.Y=!1,r}function Fs(){return ks||(ks=Ts(0))}Cs[Ms]=!0,Cs.shift=Cs.pop,Cs.unshift=Cs.push,Cs.unshiftAll=Cs.pushAll,Cs.withMutations=Li,Cs.wasAltered=Di,Cs.asImmutable=Bi,Cs["@@transducer/init"]=Cs.asMutable=Pi,Cs["@@transducer/step"]=function(t,i){return t.unshift(i)},Cs["@@transducer/result"]=function(t){return t.asImmutable()};var Is="@@__IMMUTABLE_SET__@@";function Ls(t){return Boolean(t&&t[Is])}function Ps(t){return Ls(t)&&Y(t)}function Bs(t,i){if(t===i)return!0;if(!F(i)||void 0!==t.size&&void 0!==i.size&&t.size!==i.size||void 0!==t.W&&void 0!==i.W&&t.W!==i.W||L(t)!==L(i)||B(t)!==B(i)||Y(t)!==Y(i))return!1;if(0===t.size&&0===i.size)return!0;var s=!D(t);if(Y(t)){var e=t.entries();return i.every((function(t,i){var r=e.next().value;return r&&St(r[1],t)&&(s||St(r[0],i))}))&&e.next().done}var r=!1;if(void 0===t.size)if(void 0===i.size)"function"==typeof t.cacheResult&&t.cacheResult();else{r=!0;var n=t;t=i,i=n}var h=!0,o=i.T((function(i,e){if(s?!t.has(i):r?!St(i,t.get(e,y)):!St(t.get(e,y),i))return h=!1,!1}));return h&&t.size===o}function Ds(t,i){var s=function(s){t.prototype[s]=i[s]};return Object.keys(i).forEach(s),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(s),t}function Es(t){if(!t||"object"!=typeof t)return t;if(!F(t)){if(!ci(t))return t;t=rt(t)}if(L(t)){var i={};return t.T((function(t,s){i[s]=Es(t)})),i}var s=[];return t.T((function(t){s.push(Es(t))})),s}var Rs=function(t){function i(i){return null==i?Gs():Ls(i)&&!Y(i)?i:Gs().withMutations((function(s){var e=t(i);ai(e.size),e.forEach((function(t){return s.add(t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.fromKeys=function(t){return this(R(t).keySeq())},i.intersect=function(t){return(t=E(t).toArray()).length?zs.intersect.apply(i(t.pop()),t):Gs()},i.union=function(t){return(t=E(t).toArray()).length?zs.union.apply(i(t.pop()),t):Gs()},i.prototype.toString=function(){return this.F("Set {","}")},i.prototype.has=function(t){return this.et.has(t)},i.prototype.add=function(t){return Vs(this,this.et.set(t,t))},i.prototype.remove=function(t){return Vs(this,this.et.remove(t))},i.prototype.clear=function(){return Vs(this,this.et.clear())},i.prototype.map=function(t,i){var s=this,e=!1,r=Vs(this,this.et.mapEntries((function(r){var n=r[1],h=t.call(i,n,n,s);return h!==n&&(e=!0),[h,h]}),i));return e?r:this},i.prototype.union=function(){for(var i=[],s=arguments.length;s--;)i[s]=arguments[s];return 0===(i=i.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.j||1!==i.length?this.withMutations((function(s){for(var e=0;e<i.length;e++)t(i[e]).forEach((function(t){return s.add(t)}))})):this.constructor(i[0])},i.prototype.intersect=function(){for(var i=[],s=arguments.length;s--;)i[s]=arguments[s];if(0===i.length)return this;i=i.map((function(i){return t(i)}));var e=[];return this.forEach((function(t){i.every((function(i){return i.includes(t)}))||e.push(t)})),this.withMutations((function(t){e.forEach((function(i){t.remove(i)}))}))},i.prototype.subtract=function(){for(var i=[],s=arguments.length;s--;)i[s]=arguments[s];if(0===i.length)return this;i=i.map((function(i){return t(i)}));var e=[];return this.forEach((function(t){i.some((function(i){return i.includes(t)}))&&e.push(t)})),this.withMutations((function(t){e.forEach((function(i){t.remove(i)}))}))},i.prototype.sort=function(t){return ne(Jt(this,t))},i.prototype.sortBy=function(t,i){return ne(Jt(this,i,t))},i.prototype.wasAltered=function(){return this.et.wasAltered()},i.prototype.T=function(t,i){var s=this;return this.et.T((function(i){return t(i,i,s)}),i)},i.prototype.P=function(t,i){return this.et.P(t,i)},i.prototype.U=function(t){if(t===this.j)return this;var i=this.et.U(t);return t?this.ht(i,t):0===this.size?this.ot():(this.j=t,this.et=i,this)},i}(z);Rs.isSet=Ls;var Os,zs=Rs.prototype;function Vs(t,i){return t.j?(t.size=i.size,t.et=i,t):i===t.et?t:0===i.size?t.ot():t.ht(i)}function Ns(t,i){var s=Object.create(zs);return s.size=t?t.size:0,s.et=t,s.j=i,s}function Gs(){return Os||(Os=Ns(Wi()))}zs[Is]=!0,zs[A]=zs.remove,zs.merge=zs.concat=zs.union,zs.withMutations=Li,zs.asImmutable=Bi,zs["@@transducer/init"]=zs.asMutable=Pi,zs["@@transducer/step"]=function(t,i){return t.add(i)},zs["@@transducer/result"]=function(t){return t.asImmutable()},zs.ot=Gs,zs.ht=Ns;var $s,js=function(t){function i(t,s,e){if(!(this instanceof i))return new i(t,s,e);if(oi(0!==e,"Cannot step a Range by 0"),t=t||0,void 0===s&&(s=1/0),e=void 0===e?1:Math.abs(e),s<t&&(e=-e),this.ut=t,this.ct=s,this.dt=e,this.size=Math.max(0,Math.ceil((s-t)/e-1)+1),0===this.size){if($s)return $s;$s=this}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this.ut+"..."+this.ct+(1!==this.dt?" by "+this.dt:"")+" ]"},i.prototype.get=function(t,i){return this.has(t)?this.ut+b(this,t)*this.dt:i},i.prototype.includes=function(t){var i=(t-this.ut)/this.dt;return i>=0&&i<this.size&&i===Math.floor(i)},i.prototype.slice=function(t,s){return M(t,s,this.size)?this:(t=w(t,this.size),(s=_(s,this.size))<=t?new i(0,0):new i(this.get(t,this.ct),this.get(s,this.ct),this.dt))},i.prototype.indexOf=function(t){var i=t-this.ut;if(i%this.dt==0){var s=i/this.dt;if(s>=0&&s<this.size)return s}return-1},i.prototype.lastIndexOf=function(t){return this.indexOf(t)},i.prototype.T=function(t,i){for(var s=this.size,e=this.dt,r=i?this.ut+(s-1)*e:this.ut,n=0;n!==s&&!1!==t(r,i?s-++n:n++,this);)r+=i?-e:e;return n},i.prototype.P=function(t,i){var s=this.size,e=this.dt,r=i?this.ut+(s-1)*e:this.ut,n=0;return new Z((function(){if(n===s)return{value:void 0,done:!0};var h=r;return r+=i?-e:e,J(t,i?s-++n:n++,h)}))},i.prototype.equals=function(t){return t instanceof i?this.ut===t.ut&&this.ct===t.ct&&this.dt===t.dt:Bs(this,t)},i}(ht);function Us(t,i,s){for(var e=li(i),r=0;r!==e.length;)if((t=fi(t,e[r++],y))===y)return s;return t}function Ys(t,i){return Us(this,t,i)}function Hs(){ai(this.size);var t={};return this.T((function(i,s){t[s]=i})),t}E.isIterable=F,E.isKeyed=L,E.isIndexed=B,E.isAssociative=D,E.isOrdered=Y,E.Iterator=Z,Ds(E,{toArray:function(){ai(this.size);var t=new Array(this.size||0),i=L(this),s=0;return this.T((function(e,r){t[s++]=i?[r,e]:e})),t},toIndexedSeq:function(){return new Nt(this)},toJS:function(){return Es(this)},toKeyedSeq:function(){return new Vt(this,!0)},toMap:function(){return Ei(this.toKeyedSeq())},toObject:Hs,toOrderedMap:function(){return ms(this.toKeyedSeq())},toOrderedSet:function(){return ne(L(this)?this.valueSeq():this)},toSet:function(){return Rs(L(this)?this.valueSeq():this)},toSetSeq:function(){return new Gt(this)},toSeq:function(){return B(this)?this.toIndexedSeq():L(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return _s(L(this)?this.valueSeq():this)},toList:function(){return ns(L(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},F:function(t,i){return 0===this.size?t+i:t+" "+this.toSeq().map(this.ft).join(", ")+" "+i},concat:function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return ti(this,function(t,i){var s=L(t),e=[t].concat(i).map((function(t){return F(t)?s&&(t=R(t)):t=s?ft(t):At(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===e.length)return t;if(1===e.length){var r=e[0];if(r===t||s&&L(r)||B(t)&&B(r))return r}var n=new at(e);return s?n=n.toKeyedSeq():B(t)||(n=n.toSetSeq()),(n=n.flatten(!0)).size=e.reduce((function(t,i){if(void 0!==t){var s=i.size;if(void 0!==s)return t+s}}),0),n}(this,t))},includes:function(t){return this.some((function(i){return St(i,t)}))},entries:function(){return this.P(2)},every:function(t,i){ai(this.size);var s=!0;return this.T((function(e,r,n){if(!t.call(i,e,r,n))return s=!1,!1})),s},filter:function(t,i){return ti(this,Ht(this,t,i,!0))},find:function(t,i,s){var e=this.findEntry(t,i);return e?e[1]:s},forEach:function(t,i){return ai(this.size),this.T(i?t.bind(i):t)},join:function(t){ai(this.size),t=void 0!==t?""+t:",";var i="",s=!0;return this.T((function(e){s?s=!1:i+=t,i+=null!=e?e.toString():""})),i},keys:function(){return this.P(0)},map:function(t,i){return ti(this,Ut(this,t,i))},reduce:function(t,i,s){return Qs(this,t,i,s,arguments.length<2,!1)},reduceRight:function(t,i,s){return Qs(this,t,i,s,arguments.length<2,!0)},reverse:function(){return ti(this,Yt(this,!0))},slice:function(t,i){return ti(this,Wt(this,t,i,!0))},some:function(t,i){return!this.every(te(t),i)},sort:function(t){return ti(this,Jt(this,t))},values:function(){return this.P(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,i){return S(t?this.toSeq().filter(t,i):this)},countBy:function(t,i){return function(t,i,s){var e=Ei().asMutable();return t.T((function(r,n){e.update(i.call(s,r,n,t),0,(function(t){return t+1}))})),e.asImmutable()}(this,t,i)},equals:function(t){return Bs(this,t)},entrySeq:function(){var t=this;if(t.I)return new at(t.I);var i=t.toSeq().map(qs).toIndexedSeq();return i.fromEntrySeq=function(){return t.toSeq()},i},filterNot:function(t,i){return this.filter(te(t),i)},findEntry:function(t,i,s){var e=s;return this.T((function(s,r,n){if(t.call(i,s,r,n))return e=[r,s],!1})),e},findKey:function(t,i){var s=this.findEntry(t,i);return s&&s[0]},findLast:function(t,i,s){return this.toKeyedSeq().reverse().find(t,i,s)},findLastEntry:function(t,i,s){return this.toKeyedSeq().reverse().findEntry(t,i,s)},findLastKey:function(t,i){return this.toKeyedSeq().reverse().findKey(t,i)},first:function(t){return this.find(x,null,t)},flatMap:function(t,i){return ti(this,function(t,i,s){var e=si(t);return t.toSeq().map((function(r,n){return e(i.call(s,r,n,t))})).flatten(!0)}(this,t,i))},flatten:function(t){return ti(this,Zt(this,t,!0))},fromEntrySeq:function(){return new $t(this)},get:function(t,i){return this.find((function(i,s){return St(s,t)}),void 0,i)},getIn:Ys,groupBy:function(t,i){return function(t,i,s){var e=L(t),r=(Y(t)?ms():Ei()).asMutable();t.T((function(n,h){r.update(i.call(s,n,h,t),(function(t){return(t=t||[]).push(e?[h,n]:n),t}))}));var n=si(t);return r.map((function(i){return ti(t,n(i))})).asImmutable()}(this,t,i)},has:function(t){return this.get(t,y)!==y},hasIn:function(t){return Us(this,t,y)!==y},isSubset:function(t)