UNPKG

react-data-grid

Version:

Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like

7 lines • 217 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactDataGrid=t(require("react"),require("react-dom")):e.ReactDataGrid=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(136)},,function(t,r){t.exports=e},function(e,t,r){e.exports=r(150)()},,function(e,t,r){var n,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n))e.push(r.apply(null,n));else if("object"===o)for(var a in n)i.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(n=[],o=function(){return r}.apply(t,n),!(void 0!==o&&(e.exports=o)))}()},function(e,t){"use strict";e.exports={getColumn:function(e,t){return Array.isArray(e)?e[t]:"undefined"!=typeof Immutable?e.get(t):void 0},spliceColumn:function(e,t,r){return Array.isArray(e.columns)?e.columns.splice(t,1,r):"undefined"!=typeof Immutable&&(e.columns=e.columns.splice(t,1,r)),e},getSize:function(e){return Array.isArray(e)?e.length:"undefined"!=typeof Immutable?e.size:void 0},canEdit:function(e,t,r){return!!e&&(null!=e.editable&&"function"==typeof e.editable?r===!0&&e.editable(t):!(r!==!0||!e.editor&&!e.editable))},getValue:function(e,t){var r=void 0;return r=e.toJSON&&e.get?e.get(t):e[t]}}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t];r[2]?e.push("@media "+r[2]+"{"+r[1]+"}"):e.push(r[1])}return e.join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(n[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(e,t,r){function n(e,t){for(var r=0;r<e.length;r++){var n=e[r],o=f[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(u(n.parts[i],t))}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(u(n.parts[i],t));f[n.id]={id:n.id,refs:1,parts:a}}}}function o(e){for(var t=[],r={},n=0;n<e.length;n++){var o=e[n],i=o[0],a=o[1],s=o[2],l=o[3],u={css:a,media:s,sourceMap:l};r[i]?r[i].parts.push(u):t.push(r[i]={id:i,parts:[u]})}return t}function i(e,t){var r=v(),n=m[m.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),m.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=m.indexOf(e);t>=0&&m.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function u(e,t){var r,n,o;if(t.singleton){var i=w++;r=y||(y=s(t)),n=c.bind(null,r,i,!1),o=c.bind(null,r,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(t),n=d.bind(null,r),o=function(){a(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(t),n=p.bind(null,r),o=function(){a(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}function c(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function d(e,t){var r=t.css,n=t.sourceMap;n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([r],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var f={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},g=h(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,w=0,m=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=g()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=o(e);return n(r,t),function(e){for(var i=[],a=0;a<r.length;a++){var s=r[a],l=f[s.id];l.refs--,i.push(l)}if(e){var u=o(e);n(u,t)}for(var a=0;a<i.length;a++){var l=i[a];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete f[l.id]}}}};var b=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()},function(e,r){e.exports=t},,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=r(3),i=n(o);e.exports={selected:i.default.object.isRequired,copied:i.default.object,dragged:i.default.object,onCellClick:i.default.func.isRequired,onCellDoubleClick:i.default.func.isRequired,onCommit:i.default.func.isRequired,onCommitCancel:i.default.func.isRequired,handleDragEnterRow:i.default.func.isRequired,handleTerminateDrag:i.default.func.isRequired,getCellActions:i.default.func}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=r(3),i=n(o),a={name:i.default.node.isRequired,key:i.default.string.isRequired,width:i.default.number.isRequired,filterable:i.default.bool};e.exports=a},,function(e,t){"use strict";function r(e,t){for(var r={},n=t,o=Array.isArray(n),i=0,n=o?n:n[Symbol.iterator]();;){var a;if(o){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var s=a;s in e&&(r[s]=e[s])}return r}e.exports=r},function(e,t,r){var n=r(147);"string"==typeof n&&(n=[[e.id,n,""]]);r(8)(n,{});n.locals&&(e.exports=n.locals)},,,function(e,t,r){!function(t,r){e.exports=r()}(this,function(){"use strict";function e(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function t(e){return i(e)?e:O(e)}function r(e){return a(e)?e:M(e)}function n(e){return s(e)?e:k(e)}function o(e){return i(e)&&!l(e)?e:A(e)}function i(e){return!(!e||!e[lr])}function a(e){return!(!e||!e[ur])}function s(e){return!(!e||!e[cr])}function l(e){return a(e)||s(e)}function u(e){return!(!e||!e[pr])}function c(e){return e.value=!1,e}function p(e){e&&(e.value=!0)}function d(){}function f(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),o=0;o<r;o++)n[o]=e[o+t];return n}function h(e){return void 0===e.size&&(e.size=e.__iterate(v)),e.size}function g(e,t){if("number"!=typeof t){var r=t>>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?h(e)+t:t}function v(){return!0}function y(e,t,r){return(0===e||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function w(e,t){return b(e,t,0)}function m(e,t){return b(e,t,t)}function b(e,t,r){return void 0===e?r:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function _(e){this.next=e}function C(e,t,r,n){var o=0===e?t:1===e?r:[t,r];return n?n.value=o:n={value:o,done:!1},n}function x(){return{value:void 0,done:!0}}function S(e){return!!D(e)}function R(e){return e&&"function"==typeof e.next}function I(e){var t=D(e);return t&&t.call(e)}function D(e){var t=e&&(Cr&&e[Cr]||e[xr]);if("function"==typeof t)return t}function E(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?q():i(e)?e.toSeq():K(e)}function M(e){return null===e||void 0===e?q().toKeyedSeq():i(e)?a(e)?e.toSeq():e.fromEntrySeq():H(e)}function k(e){return null===e||void 0===e?q():i(e)?a(e)?e.entrySeq():e.toIndexedSeq():L(e)}function A(e){return(null===e||void 0===e?q():i(e)?a(e)?e.entrySeq():e:L(e)).toSetSeq()}function T(e){this._array=e,this.size=e.length}function j(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function z(e){this._iterable=e,this.size=e.length||e.size}function P(e){this._iterator=e,this._iteratorCache=[]}function N(e){return!(!e||!e[Rr])}function q(){return Ir||(Ir=new T([]))}function H(e){var t=Array.isArray(e)?new T(e).fromEntrySeq():R(e)?new P(e).fromEntrySeq():S(e)?new z(e).fromEntrySeq():"object"==typeof e?new j(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function L(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function K(e){var t=U(e)||"object"==typeof e&&new j(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return E(e)?new T(e):R(e)?new P(e):S(e)?new z(e):void 0}function G(e,t,r,n){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[r?i-a:a];if(t(s[1],n?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,r)}function W(e,t,r,n){var o=e._cache;if(o){var i=o.length-1,a=0;return new _(function(){var e=o[r?i-a:a];return a++>i?x():C(t,n?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,r)}function F(e,t){return t?V(t,e,"",{"":e}):B(e)}function V(e,t,r,n){return Array.isArray(t)?e.call(n,r,k(t).map(function(r,n){return V(e,r,n,t)})):J(t)?e.call(n,r,M(t).map(function(r,n){return V(e,r,n,t)})):t}function B(e){return Array.isArray(e)?k(e).map(B).toList():J(e)?M(e).map(B).toMap():e}function J(e){return e&&(e.constructor===Object||void 0===e.constructor)}function Y(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 X(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||a(e)!==a(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!l(e);if(u(e)){var n=e.entries();return t.every(function(e,t){var o=n.next().value;return o&&Y(o[1],e)&&(r||Y(o[0],t))})&&n.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 c=e;e=t,t=c}var p=!0,d=t.__iterate(function(t,n){if(r?!e.has(t):o?!Y(t,e.get(n,vr)):!Y(e.get(n,vr),t))return p=!1,!1});return p&&e.size===d}function Z(e,t){if(!(this instanceof Z))return new Z(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Dr)return Dr;Dr=this}}function Q(e,t){if(!e)throw new Error(t)}function $(e,t,r){if(!(this instanceof $))return new $(e,t,r);if(Q(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),r=void 0===r?1:Math.abs(r),t<e&&(r=-r),this._start=e,this._end=t,this._step=r,this.size=Math.max(0,Math.ceil((t-e)/r-1)+1),0===this.size){if(Er)return Er;Er=this}}function ee(){throw TypeError("Abstract")}function te(){}function re(){}function ne(){}function oe(e){return e>>>1&1073741824|3221225471&e}function ie(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var r=0|e;for(r!==e&&(r^=4294967295*e);e>4294967295;)e/=4294967295,r^=e;return oe(r)}if("string"===t)return e.length>Pr?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return le(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=Hr[e];return void 0===t&&(t=se(e),qr===Nr&&(qr=0,Hr={}),qr++,Hr[e]=t),t}function se(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return oe(t)}function le(e){var t;if(Tr&&(t=Or.get(e),void 0!==t))return t;if(t=e[zr],void 0!==t)return t;if(!Ar){if(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[zr],void 0!==t)return t;if(t=ue(e),void 0!==t)return t}if(t=++jr,1073741824&jr&&(jr=0),Tr)Or.set(e,t);else{if(void 0!==kr&&kr(e)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Ar)Object.defineProperty(e,zr,{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[zr]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[zr]=t}}return t}function ue(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function ce(e){Q(e!==1/0,"Cannot perform this action with an infinite size.")}function pe(e){return null===e||void 0===e?Ce():de(e)&&!u(e)?e:Ce().withMutations(function(t){var n=r(e);ce(n.size),n.forEach(function(e,r){return t.set(r,e)})})}function de(e){return!(!e||!e[Lr])}function fe(e,t){this.ownerID=e,this.entries=t}function he(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r}function ge(e,t,r){this.ownerID=e,this.count=t,this.nodes=r}function ve(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r}function ye(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r}function we(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&be(e._root)}function me(e,t){return C(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function _e(e,t,r,n){var o=Object.create(Kr);return o.size=e,o._root=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Ce(){return Ur||(Ur=_e(0))}function xe(e,t,r){var n,o;if(e._root){var i=c(yr),a=c(wr);if(n=Se(e._root,e.__ownerID,0,void 0,t,r,i,a),!a.value)return e;o=e.size+(i.value?r===vr?-1:1:0)}else{if(r===vr)return e;o=1,n=new fe(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=o,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?_e(o,n):Ce()}function Se(e,t,r,n,o,i,a,s){return e?e.update(t,r,n,o,i,a,s):i===vr?e:(p(s),p(a),new ye(t,n,[o,i]))}function Re(e){return e.constructor===ye||e.constructor===ve}function Ie(e,t,r,n,o){if(e.keyHash===n)return new ve(t,n,[e.entry,o]);var i,a=(0===r?e.keyHash:e.keyHash>>>r)&gr,s=(0===r?n:n>>>r)&gr,l=a===s?[Ie(e,t,r+fr,n,o)]:(i=new ye(t,n,o),a<s?[e,i]:[i,e]);return new he(t,1<<a|1<<s,l)}function De(e,t,r,n){e||(e=new d);for(var o=new ye(e,ie(r),[r,n]),i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,void 0,a[0],a[1])}return o}function Ee(e,t,r,n){for(var o=0,i=0,a=new Array(r),s=0,l=1,u=t.length;s<u;s++,l<<=1){var c=t[s];void 0!==c&&s!==n&&(o|=l,a[i++]=c)}return new he(e,o,a)}function Oe(e,t,r,n,o){for(var i=0,a=new Array(hr),s=0;0!==r;s++,r>>>=1)a[s]=1&r?t[i++]:void 0;return a[n]=o,new ge(e,i+1,a)}function Me(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 F(e)})),o.push(l)}return Te(e,t,o)}function ke(e,t,r){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):Y(e,t)?e:t}function Ae(e){return function(t,r,n){if(t&&t.mergeDeepWith&&i(r))return t.mergeDeepWith(e,r);var o=e(t,r,n);return Y(t,o)?t:o}}function Te(e,t,r){return r=r.filter(function(e){return 0!==e.size}),0===r.length?e:0!==e.size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var n=t?function(r,n){e.update(n,vr,function(e){return e===vr?r:t(e,r,n)})}:function(t,r){e.set(r,t)},o=0;o<r.length;o++)r[o].forEach(n)}):e.constructor(r[0])}function je(e,t,r,n){var o=e===vr,i=t.next();if(i.done){var a=o?r:e,s=n(a);return s===a?e:s}Q(o||e&&e.set,"invalid keyPath");var l=i.value,u=o?vr:e.get(l,vr),c=je(u,t,r,n);return c===u?e:c===vr?e.remove(l):(o?Ce():e).set(l,c)}function ze(e){return e-=e>>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Pe(e,t,r,n){var o=n?e:f(e);return o[t]=r,o}function Ne(e,t,r,n){var o=e.length+1;if(n&&t+1===o)return e[t]=r,e;for(var i=new Array(o),a=0,s=0;s<o;s++)s===t?(i[s]=r,a=-1):i[s]=e[s+a];return i}function qe(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var o=new Array(n),i=0,a=0;a<n;a++)a===t&&(i=1),o[a]=e[a+i];return o}function He(e){var t=We();if(null===e||void 0===e)return t;if(Le(e))return e;var r=n(e),o=r.size;return 0===o?t:(ce(o),o>0&&o<hr?Ge(0,o,fr,null,new Ke(r.toArray())):t.withMutations(function(e){e.setSize(o),r.forEach(function(t,r){return e.set(r,t)})}))}function Le(e){return!(!e||!e[Vr])}function Ke(e,t){this.array=e,this.ownerID=t}function Ue(e,t){function r(e,t,r){return 0===t?n(e,r):o(e,t,r)}function n(e,r){var n=r===s?l&&l.array:e&&e.array,o=r>i?0:i-r,u=a-r;return u>hr&&(u=hr),function(){if(o===u)return Yr;var e=t?--u:o++;return n&&n[e]}}function o(e,n,o){var s,l=e&&e.array,u=o>i?0:i-o>>n,c=(a-o>>n)+1;return c>hr&&(c=hr),function(){for(;;){if(s){var e=s();if(e!==Yr)return e;s=null}if(u===c)return Yr;var i=t?--c:u++;s=r(l&&l[i],n-fr,o+(i<<n))}}}var i=e._origin,a=e._capacity,s=Ze(a),l=e._tail;return r(e._root,e._level,0)}function Ge(e,t,r,n,o,i,a){var s=Object.create(Br);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=o,s.__ownerID=i,s.__hash=a,s.__altered=!1,s}function We(){return Jr||(Jr=Ge(0,0,fr))}function Fe(e,t,r){if(t=g(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Ye(e,t).set(0,r):Ye(e,0,t+1).set(t,r)});t+=e._origin;var n=e._tail,o=e._root,i=c(wr);return t>=Ze(e._capacity)?n=Ve(n,e.__ownerID,0,t,r,i):o=Ve(o,e.__ownerID,e._level,t,r,i),i.value?e.__ownerID?(e._root=o,e._tail=n,e.__hash=void 0,e.__altered=!0,e):Ge(e._origin,e._capacity,e._level,o,n):e}function Ve(e,t,r,n,o,i){var a=n>>>r&gr,s=e&&a<e.array.length;if(!s&&void 0===o)return e;var l;if(r>0){var u=e&&e.array[a],c=Ve(u,t,r-fr,n,o,i);return c===u?e:(l=Be(e,t),l.array[a]=c,l)}return s&&e.array[a]===o?e:(p(i),l=Be(e,t),void 0===o&&a===l.array.length-1?l.array.pop():l.array[a]=o,l)}function Be(e,t){return t&&e&&t===e.ownerID?e:new Ke(e?e.array.slice():[],t)}function Je(e,t){if(t>=Ze(e._capacity))return e._tail;if(t<1<<e._level+fr){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&gr],n-=fr;return r}}function Ye(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new d,o=e._origin,i=e._capacity,a=o+t,s=void 0===r?i:r<0?i+r:o+r;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var l=e._level,u=e._root,c=0;a+c<0;)u=new Ke(u&&u.array.length?[void 0,u]:[],n),l+=fr,c+=1<<l;c&&(a+=c,o+=c,s+=c,i+=c);for(var p=Ze(i),f=Ze(s);f>=1<<l+fr;)u=new Ke(u&&u.array.length?[u]:[],n),l+=fr;var h=e._tail,g=f<p?Je(e,s-1):f>p?new Ke([],n):h;if(h&&f>p&&a<i&&h.array.length){u=Be(u,n);for(var v=u,y=l;y>fr;y-=fr){var w=p>>>y&gr;v=v.array[w]=Be(v.array[w],n)}v.array[p>>>fr&gr]=h}if(s<i&&(g=g&&g.removeAfter(n,0,s)),a>=f)a-=f,s-=f,l=fr,u=null,g=g&&g.removeBefore(n,0,a);else if(a>o||f<p){for(c=0;u;){var m=a>>>l&gr;if(m!==f>>>l&gr)break;m&&(c+=(1<<l)*m),l-=fr,u=u.array[m]}u&&a>o&&(u=u.removeBefore(n,l,a-c)),u&&f<p&&(u=u.removeAfter(n,l,f-c)),c&&(a-=c,s-=c)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=l,e._root=u,e._tail=g,e.__hash=void 0,e.__altered=!0,e):Ge(a,s,l,u,g)}function Xe(e,t,r){for(var o=[],a=0,s=0;s<r.length;s++){var l=r[s],u=n(l);u.size>a&&(a=u.size),i(l)||(u=u.map(function(e){return F(e)})),o.push(u)}return a>e.size&&(e=e.setSize(a)),Te(e,t,o)}function Ze(e){return e<hr?0:e-1>>>fr<<fr}function Qe(e){return null===e||void 0===e?tt():$e(e)?e:tt().withMutations(function(t){var n=r(e);ce(n.size),n.forEach(function(e,r){return t.set(r,e)})})}function $e(e){return de(e)&&u(e)}function et(e,t,r,n){var o=Object.create(Qe.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=r,o.__hash=n,o}function tt(){return Xr||(Xr=et(Ce(),We()))}function rt(e,t,r){var n,o,i=e._map,a=e._list,s=i.get(t),l=void 0!==s;if(r===vr){if(!l)return e;a.size>=hr&&a.size>=2*i.size?(o=a.filter(function(e,t){return void 0!==e&&s!==t}),n=o.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(n.__ownerID=o.__ownerID=e.__ownerID)):(n=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(r===a.get(s)[1])return e;n=i,o=a.set(s,[t,r])}else n=i.set(t,a.size),o=a.set(a.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=o,e.__hash=void 0,e):et(n,o)}function nt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Et(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=Ot,t.__iterateUncached=function(t,r){var n=this;return e.__iterate(function(e,r){return t(r,e,n)!==!1},r)},t.__iteratorUncached=function(t,r){if(t===_r){var n=e.__iterator(t,r);return new _(function(){var e=n.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===br?mr:br,r)},t}function lt(e,t,r){var n=Et(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,o){var i=e.get(n,vr);return i===vr?o:t.call(r,i,n,e)},n.__iterateUncached=function(n,o){var i=this;return e.__iterate(function(e,o,a){return n(t.call(r,e,o,a),o,i)!==!1},o)},n.__iteratorUncached=function(n,o){var i=e.__iterator(_r,o);return new _(function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return C(n,s,t.call(r,a[1],s,e),o)})},n}function ut(e,t){var r=Et(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),r.get=function(r,n){return e.get(t?r:-1-r,n)},r.has=function(r){return e.has(t?r:-1-r)},r.includes=function(t){return e.includes(t)},r.cacheResult=Ot,r.__iterate=function(t,r){var n=this;return e.__iterate(function(e,r){return t(e,r,n)},!r)},r.__iterator=function(t,r){return e.__iterator(t,!r)},r}function ct(e,t,r,n){var o=Et(e);return n&&(o.has=function(n){var o=e.get(n,vr);return o!==vr&&!!t.call(r,o,n,e)},o.get=function(n,o){var i=e.get(n,vr);return i!==vr&&t.call(r,i,n,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate(function(e,i,l){if(t.call(r,e,i,l))return s++,o(e,n?i:s-1,a)},i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(_r,i),s=0;return new _(function(){for(;;){var i=a.next();if(i.done)return i;var l=i.value,u=l[0],c=l[1];if(t.call(r,c,u,e))return C(o,n?u:s++,c,i)}})},o}function pt(e,t,r){var n=pe().asMutable();return e.__iterate(function(o,i){n.update(t.call(r,o,i,e),0,function(e){return e+1})}),n.asImmutable()}function dt(e,t,r){var n=a(e),o=(u(e)?Qe():pe()).asMutable();e.__iterate(function(i,a){o.update(t.call(r,i,a,e),function(e){return e=e||[],e.push(n?[a,i]:i),e})});var i=Dt(e);return o.map(function(t){return St(e,i(t))})}function ft(e,t,r,n){var o=e.size;if(void 0!==t&&(t|=0),void 0!==r&&(r===1/0?r=o:r|=0),y(t,r,o))return e;var i=w(t,o),a=m(r,o);if(i!==i||a!==a)return ft(e.toSeq().cacheResult(),t,r,n);var s,l=a-i;l===l&&(s=l<0?0:l);var u=Et(e);return u.size=0===s?s:e.size&&s||void 0,!n&&N(e)&&s>=0&&(u.get=function(t,r){return t=g(this,t),t>=0&&t<s?e.get(t+i,r):r}),u.__iterateUncached=function(t,r){var o=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(t,r);var a=0,l=!0,u=0;return e.__iterate(function(e,r){if(!l||!(l=a++<i))return u++,t(e,n?r:u-1,o)!==!1&&u!==s}),u},u.__iteratorUncached=function(t,r){if(0!==s&&r)return this.cacheResult().__iterator(t,r);var o=0!==s&&e.__iterator(t,r),a=0,l=0;return new _(function(){for(;a++<i;)o.next();if(++l>s)return x();var e=o.next();return n||t===br?e:t===mr?C(t,l-1,void 0,e):C(t,l-1,e.value[1],e)})},u}function ht(e,t,r){var n=Et(e);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var a=0;return e.__iterate(function(e,o,s){return t.call(r,e,o,s)&&++a&&n(e,o,i)}),a},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var a=e.__iterator(_r,o),s=!0;return new _(function(){if(!s)return x();var e=a.next();if(e.done)return e;var o=e.value,l=o[0],u=o[1];return t.call(r,u,l,i)?n===_r?e:C(n,l,u,e):(s=!1,x())})},n}function gt(e,t,r,n){var o=Et(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,l=0;return e.__iterate(function(e,i,u){if(!s||!(s=t.call(r,e,i,u)))return l++,o(e,n?i:l-1,a)}),l},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(_r,i),l=!0,u=0;return new _(function(){var e,i,c;do{if(e=s.next(),e.done)return n||o===br?e:o===mr?C(o,u++,void 0,e):C(o,u++,e.value[1],e);var p=e.value;i=p[0],c=p[1],l&&(l=t.call(r,c,i,a))}while(l);return o===_r?e:C(o,i,c,e)})},o}function vt(e,t){var n=a(e),o=[e].concat(t).map(function(e){return i(e)?n&&(e=r(e)):e=n?H(e):L(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===o.length)return e;if(1===o.length){var l=o[0];if(l===e||n&&a(l)||s(e)&&s(l))return l}var u=new T(o);return n?u=u.toKeyedSeq():s(e)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=o.reduce(function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}},0),u}function yt(e,t,r){var n=Et(e);return n.__iterateUncached=function(n,o){function a(e,u){var c=this;e.__iterate(function(e,o){return(!t||u<t)&&i(e)?a(e,u+1):n(e,r?o:s++,c)===!1&&(l=!0),!l},o)}var s=0,l=!1;return a(e,0),s},n.__iteratorUncached=function(n,o){var a=e.__iterator(n,o),s=[],l=0;return new _(function(){for(;a;){var e=a.next();if(e.done===!1){var u=e.value;if(n===_r&&(u=u[1]),t&&!(s.length<t)||!i(u))return r?e:C(n,l++,u,e);s.push(a),a=u.__iterator(n,o)}else a=s.pop()}return x()})},n}function wt(e,t,r){var n=Dt(e);return e.toSeq().map(function(o,i){return n(t.call(r,o,i,e))}).flatten(!0)}function mt(e,t){var r=Et(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return e.__iterate(function(e,n){return(!i||r(t,i++,o)!==!1)&&r(e,i++,o)!==!1},n),i},r.__iteratorUncached=function(r,n){var o,i=e.__iterator(br,n),a=0;return new _(function(){return(!o||a%2)&&(o=i.next(),o.done)?o:a%2?C(r,a++,t):C(r,a++,o.value,o)})},r}function bt(e,t,r){t||(t=Mt);var n=a(e),o=0,i=e.toSeq().map(function(t,n){return[n,t,o++,r?r(t,n,e):t]}).toArray();return i.sort(function(e,r){return t(e[3],r[3])||e[2]-r[2]}).forEach(n?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),n?M(i):s(e)?k(i):A(i)}function _t(e,t,r){if(t||(t=Mt),r){var n=e.toSeq().map(function(t,n){return[t,r(t,n,e)]}).reduce(function(e,r){return Ct(t,e[1],r[1])?r:e});return n&&n[0]}return e.reduce(function(e,r){return Ct(t,e,r)?r:e})}function Ct(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(void 0===r||null===r||r!==r)||n>0}function xt(e,r,n){var o=Et(e);return o.size=new T(n).map(function(e){return e.size}).min(),o.__iterate=function(e,t){for(var r,n=this.__iterator(br,t),o=0;!(r=n.next()).done&&e(r.value,o++,this)!==!1;);return o},o.__iteratorUncached=function(e,o){var i=n.map(function(e){return e=t(e),I(o?e.reverse():e)}),a=0,s=!1;return new _(function(){var t;return s||(t=i.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?x():C(e,a++,r.apply(null,t.map(function(e){return e.value})))})},o}function St(e,t){return N(e)?t:e.constructor(t)}function Rt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function It(e){return ce(e.size),h(e)}function Dt(e){return a(e)?r:s(e)?n:o}function Et(e){return Object.create((a(e)?M:s(e)?k:A).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Mt(e,t){return e>t?1:e<t?-1:0}function kt(e){var r=I(e);if(!r){if(!E(e))throw new TypeError("Expected iterable or array-like: "+e);r=I(t(e))}return r}function At(e,t){var r,n=function(i){if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var a=Object.keys(e);zt(o,a),o.size=a.length,o._name=t,o._keys=a,o._defaultValues=e}this._map=pe(i)},o=n.prototype=Object.create(Zr);return o.constructor=n,n}function Tt(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._map=t,n.__ownerID=r,n}function jt(e){return e._name||e.constructor.name||"Record"}function zt(e,t){try{t.forEach(Pt.bind(void 0,e))}catch(e){}}function Pt(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Q(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Nt(e){return null===e||void 0===e?Kt():qt(e)&&!u(e)?e:Kt().withMutations(function(t){var r=o(e);ce(r.size),r.forEach(function(e){return t.add(e)})})}function qt(e){return!(!e||!e[Qr])}function Ht(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 Lt(e,t){var r=Object.create($r);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Kt(){return en||(en=Lt(Ce()))}function Ut(e){return null===e||void 0===e?Ft():Gt(e)?e:Ft().withMutations(function(t){var r=o(e);ce(r.size),r.forEach(function(e){return t.add(e)})})}function Gt(e){return qt(e)&&u(e)}function Wt(e,t){var r=Object.create(tn);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Ft(){return rn||(rn=Wt(tt()))}function Vt(e){return null===e||void 0===e?Yt():Bt(e)?e:Yt().unshiftAll(e)}function Bt(e){return!(!e||!e[nn])}function Jt(e,t,r,n){var o=Object.create(on);return o.size=e,o._head=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Yt(){return an||(an=Jt(0))}function Xt(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Zt(e,t){return t}function Qt(e,t){return[t,e]}function $t(e){return function(){return!e.apply(this,arguments)}}function er(e){return function(){return-e.apply(this,arguments)}}function tr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function rr(){return f(arguments)}function nr(e,t){return e<t?1:e>t?-1:0}function or(e){if(e.size===1/0)return 0;var t=u(e),r=a(e),n=t?1:0,o=e.__iterate(r?t?function(e,t){n=31*n+ar(ie(e),ie(t))|0}:function(e,t){n=n+ar(ie(e),ie(t))|0}:t?function(e){n=31*n+ie(e)|0}:function(e){n=n+ie(e)|0});return ir(o,n)}function ir(e,t){return t=Mr(t,3432918353),t=Mr(t<<15|t>>>-15,461845907),t=Mr(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Mr(t^t>>>16,2246822507),t=Mr(t^t>>>13,3266489909),t=oe(t^t>>>16)}function ar(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var sr=Array.prototype.slice;e(r,t),e(n,t),e(o,t),t.isIterable=i,t.isKeyed=a,t.isIndexed=s,t.isAssociative=l,t.isOrdered=u,t.Keyed=r,t.Indexed=n,t.Set=o;var lr="@@__IMMUTABLE_ITERABLE__@@",ur="@@__IMMUTABLE_KEYED__@@",cr="@@__IMMUTABLE_INDEXED__@@",pr="@@__IMMUTABLE_ORDERED__@@",dr="delete",fr=5,hr=1<<fr,gr=hr-1,vr={},yr={value:!1},wr={value:!1},mr=0,br=1,_r=2,Cr="function"==typeof Symbol&&Symbol.iterator,xr="@@iterator",Sr=Cr||xr;_.prototype.toString=function(){return"[Iterator]"},_.KEYS=mr,_.VALUES=br,_.ENTRIES=_r,_.prototype.inspect=_.prototype.toSource=function(){return this.toString()},_.prototype[Sr]=function(){return this},e(O,t),O.of=function(){return O(arguments)},O.prototype.toSeq=function(){return this},O.prototype.toString=function(){return this.__toString("Seq {","}")},O.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},O.prototype.__iterate=function(e,t){return G(this,e,t,!0)},O.prototype.__iterator=function(e,t){return W(this,e,t,!0)},e(M,O),M.prototype.toKeyedSeq=function(){return this},e(k,O),k.of=function(){return k(arguments)},k.prototype.toIndexedSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq [","]")},k.prototype.__iterate=function(e,t){return G(this,e,t,!1)},k.prototype.__iterator=function(e,t){return W(this,e,t,!1)},e(A,O),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},O.isSeq=N,O.Keyed=M,O.Set=A,O.Indexed=k;var Rr="@@__IMMUTABLE_SEQ__@@";O.prototype[Rr]=!0,e(T,k),T.prototype.get=function(e,t){return this.has(e)?this._array[g(this,e)]:t},T.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length-1,o=0;o<=n;o++)if(e(r[t?n-o:o],o,this)===!1)return o+1;return o},T.prototype.__iterator=function(e,t){var r=this._array,n=r.length-1,o=0;return new _(function(){return o>n?x():C(e,o,r[t?n-o++:o++])})},e(j,M),j.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},j.prototype.has=function(e){return this._object.hasOwnProperty(e); },j.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,o=n.length-1,i=0;i<=o;i++){var a=n[t?o-i:i];if(e(r[a],a,this)===!1)return i+1}return i},j.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,o=n.length-1,i=0;return new _(function(){var a=n[t?o-i:i];return i++>o?x():C(e,a,r[a])})},j.prototype[pr]=!0,e(z,k),z.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=this._iterable,n=I(r),o=0;if(R(n))for(var i;!(i=n.next()).done&&e(i.value,o++,this)!==!1;);return o},z.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=this._iterable,n=I(r);if(!R(n))return new _(x);var o=0;return new _(function(){var t=n.next();return t.done?t:C(e,o++,t.value)})},e(P,k),P.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var r=this._iterator,n=this._iteratorCache,o=0;o<n.length;)if(e(n[o],o++,this)===!1)return o;for(var i;!(i=r.next()).done;){var a=i.value;if(n[o]=a,e(a,o++,this)===!1)break}return o},P.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=this._iterator,n=this._iteratorCache,o=0;return new _(function(){if(o>=n.length){var t=r.next();if(t.done)return t;n[o]=t.value}return C(e,o,n[o++])})};var Ir;e(Z,k),Z.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Z.prototype.get=function(e,t){return this.has(e)?this._value:t},Z.prototype.includes=function(e){return Y(this._value,e)},Z.prototype.slice=function(e,t){var r=this.size;return y(e,t,r)?this:new Z(this._value,m(t,r)-w(e,r))},Z.prototype.reverse=function(){return this},Z.prototype.indexOf=function(e){return Y(this._value,e)?0:-1},Z.prototype.lastIndexOf=function(e){return Y(this._value,e)?this.size:-1},Z.prototype.__iterate=function(e,t){for(var r=0;r<this.size;r++)if(e(this._value,r,this)===!1)return r+1;return r},Z.prototype.__iterator=function(e,t){var r=this,n=0;return new _(function(){return n<r.size?C(e,n++,r._value):x()})},Z.prototype.equals=function(e){return e instanceof Z?Y(this._value,e._value):X(e)};var Dr;e($,k),$.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},$.prototype.get=function(e,t){return this.has(e)?this._start+g(this,e)*this._step:t},$.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},$.prototype.slice=function(e,t){return y(e,t,this.size)?this:(e=w(e,this.size),t=m(t,this.size),t<=e?new $(0,0):new $(this.get(e,this._end),this.get(t,this._end),this._step))},$.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var r=t/this._step;if(r>=0&&r<this.size)return r}return-1},$.prototype.lastIndexOf=function(e){return this.indexOf(e)},$.prototype.__iterate=function(e,t){for(var r=this.size-1,n=this._step,o=t?this._start+r*n:this._start,i=0;i<=r;i++){if(e(o,i,this)===!1)return i+1;o+=t?-n:n}return i},$.prototype.__iterator=function(e,t){var r=this.size-1,n=this._step,o=t?this._start+r*n:this._start,i=0;return new _(function(){var a=o;return o+=t?-n:n,i>r?x():C(e,i++,a)})},$.prototype.equals=function(e){return e instanceof $?this._start===e._start&&this._end===e._end&&this._step===e._step:X(this,e)};var Er;e(ee,t),e(te,ee),e(re,ee),e(ne,ee),ee.Keyed=te,ee.Indexed=re,ee.Set=ne;var Or,Mr="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e|=0,t|=0;var r=65535&e,n=65535&t;return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0},kr=Object.isExtensible,Ar=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Tr="function"==typeof WeakMap;Tr&&(Or=new WeakMap);var jr=0,zr="__immutablehash__";"function"==typeof Symbol&&(zr=Symbol(zr));var Pr=16,Nr=255,qr=0,Hr={};e(pe,te),pe.of=function(){var e=sr.call(arguments,0);return Ce().withMutations(function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}})},pe.prototype.toString=function(){return this.__toString("Map {","}")},pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},pe.prototype.set=function(e,t){return xe(this,e,t)},pe.prototype.setIn=function(e,t){return this.updateIn(e,vr,function(){return t})},pe.prototype.remove=function(e){return xe(this,e,vr)},pe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return vr})},pe.prototype.update=function(e,t,r){return 1===arguments.length?e(this):this.updateIn([e],t,r)},pe.prototype.updateIn=function(e,t,r){r||(r=t,t=void 0);var n=je(this,kt(e),t,r);return n===vr?void 0:n},pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ce()},pe.prototype.merge=function(){return Me(this,void 0,arguments)},pe.prototype.mergeWith=function(e){var t=sr.call(arguments,1);return Me(this,e,t)},pe.prototype.mergeIn=function(e){var t=sr.call(arguments,1);return this.updateIn(e,Ce(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},pe.prototype.mergeDeep=function(){return Me(this,ke,arguments)},pe.prototype.mergeDeepWith=function(e){var t=sr.call(arguments,1);return Me(this,Ae(e),t)},pe.prototype.mergeDeepIn=function(e){var t=sr.call(arguments,1);return this.updateIn(e,Ce(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},pe.prototype.sort=function(e){return Qe(bt(this,e))},pe.prototype.sortBy=function(e,t){return Qe(bt(this,t,e))},pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},pe.prototype.asImmutable=function(){return this.__ensureOwner()},pe.prototype.wasAltered=function(){return this.__altered},pe.prototype.__iterator=function(e,t){return new we(this,e,t)},pe.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate(function(t){return n++,e(t[1],t[0],r)},t),n},pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?_e(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},pe.isMap=de;var Lr="@@__IMMUTABLE_MAP__@@",Kr=pe.prototype;Kr[Lr]=!0,Kr[dr]=Kr.remove,Kr.removeIn=Kr.deleteIn,fe.prototype.get=function(e,t,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Y(r,o[i][0]))return o[i][1];return n},fe.prototype.update=function(e,t,r,n,o,i,a){for(var s=o===vr,l=this.entries,u=0,c=l.length;u<c&&!Y(n,l[u][0]);u++);var d=u<c;if(d?l[u][1]===o:s)return this;if(p(a),(s||!d)&&p(i),!s||1!==l.length){if(!d&&!s&&l.length>=Gr)return De(e,l,n,o);var h=e&&e===this.ownerID,g=h?l:f(l);return d?s?u===c-1?g.pop():g[u]=g.pop():g[u]=[n,o]:g.push([n,o]),h?(this.entries=g,this):new fe(e,g)}},he.prototype.get=function(e,t,r,n){void 0===t&&(t=ie(r));var o=1<<((0===e?t:t>>>e)&gr),i=this.bitmap;return 0===(i&o)?n:this.nodes[ze(i&o-1)].get(e+fr,t,r,n)},he.prototype.update=function(e,t,r,n,o,i,a){void 0===r&&(r=ie(n));var s=(0===t?r:r>>>t)&gr,l=1<<s,u=this.bitmap,c=0!==(u&l);if(!c&&o===vr)return this;var p=ze(u&l-1),d=this.nodes,f=c?d[p]:void 0,h=Se(f,e,t+fr,r,n,o,i,a);if(h===f)return this;if(!c&&h&&d.length>=Wr)return Oe(e,d,u,s,h);if(c&&!h&&2===d.length&&Re(d[1^p]))return d[1^p];if(c&&h&&1===d.length&&Re(h))return h;var g=e&&e===this.ownerID,v=c?h?u:u^l:u|l,y=c?h?Pe(d,p,h,g):qe(d,p,g):Ne(d,p,h,g);return g?(this.bitmap=v,this.nodes=y,this):new he(e,v,y)},ge.prototype.get=function(e,t,r,n){void 0===t&&(t=ie(r));var o=(0===e?t:t>>>e)&gr,i=this.nodes[o];return i?i.get(e+fr,t,r,n):n},ge.prototype.update=function(e,t,r,n,o,i,a){void 0===r&&(r=ie(n));var s=(0===t?r:r>>>t)&gr,l=o===vr,u=this.nodes,c=u[s];if(l&&!c)return this;var p=Se(c,e,t+fr,r,n,o,i,a);if(p===c)return this;var d=this.count;if(c){if(!p&&(d--,d<Fr))return Ee(e,u,d,s)}else d++;var f=e&&e===this.ownerID,h=Pe(u,s,p,f);return f?(this.count=d,this.nodes=h,this):new ge(e,d,h)},ve.prototype.get=function(e,t,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Y(r,o[i][0]))return o[i][1];return n},ve.prototype.update=function(e,t,r,n,o,i,a){void 0===r&&(r=ie(n));var s=o===vr;if(r!==this.keyHash)return s?this:(p(a),p(i),Ie(this,e,t,r,[n,o]));for(var l=this.entries,u=0,c=l.length;u<c&&!Y(n,l[u][0]);u++);var d=u<c;if(d?l[u][1]===o:s)return this;if(p(a),(s||!d)&&p(i),s&&2===c)return new ye(e,this.keyHash,l[1^u]);var h=e&&e===this.ownerID,g=h?l:f(l);return d?s?u===c-1?g.pop():g[u]=g.pop():g[u]=[n,o]:g.push([n,o]),h?(this.entries=g,this):new ve(e,this.keyHash,g)},ye.prototype.get=function(e,t,r,n){return Y(r,this.entry[0])?this.entry[1]:n},ye.prototype.update=function(e,t,r,n,o,i,a){var s=o===vr,l=Y(n,this.entry[0]);return(l?o===this.entry[1]:s)?this:(p(a),s?void p(i):l?e&&e===this.ownerID?(this.entry[1]=o,this):new ye(e,this.keyHash,[n,o]):(p(i),Ie(this,e,t,ie(n),[n,o])))},fe.prototype.iterate=ve.prototype.iterate=function(e,t){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(e(r[t?o-n:n])===!1)return!1},he.prototype.iterate=ge.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[t?o-n:n];if(i&&i.iterate(e,t)===!1)return!1}},ye.prototype.iterate=function(e,t){return e(this.entry)},e(we,_),we.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r,n=t.node,o=t.index++;if(n.entry){if(0===o)return me(e,n.entry)}else if(n.entries){if(r=n.entries.length-1,o<=r)return me(e,n.entries[this._reverse?r-o:o])}else if(r=n.nodes.length-1,o<=r){var i=n.nodes[this._reverse?r-o:o];if(i){if(i.entry)return me(e,i.entry);t=this._stack=be(i,t)}continue}t=this._stack=this._stack.__prev}return x()};var Ur,Gr=hr/4,Wr=hr/2,Fr=hr/4;e(He,re),He.of=function(){return this(arguments)},He.prototype.toString=function(){return this.__toString("List [","]")},He.prototype.get=function(e,t){if(e=g(this,e),e>=0&&e<this.size){e+=this._origin;var r=Je(this,e);return r&&r.array[e&gr]}return t},He.prototype.set=function(e,t){return Fe(this,e,t)},He.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},He.prototype.insert=function(e,t){return this.splice(e,0,t)},He.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=fr,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):We()},He.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(r){Ye(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n])})},He.prototype.pop=function(){return Ye(this,0,-1)},He.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Ye(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r])})},He.prototype.shift=function(){return Ye(this,1)},He.prototype.merge=function(){return Xe(this,void 0,arguments)},He.prototype.mergeWith=function(e){var t=sr.call(arguments,1);return Xe(this,e,t)},He.prototype.mergeDeep=function(){return Xe(this,ke,arguments)},He.prototype.mergeDeepWith=function(e){var t=sr.call(arguments,1);return Xe(this,Ae(e),t)},He.prototype.setSize=function(e){return Ye(this,0,e)},He.prototype.slice=function(e,t){var r=this.size;return y(e,t,r)?this:Ye(this,w(e,r),m(t,r))},He.prototype.__iterator=function(e,t){var r=0,n=Ue(this,t);return new _(function(){var t=n();return t===Yr?x():C(e,r++,t)})},He.prototype.__iterate=function(e,t){for(var r,n=0,o=Ue(this,t);(r=o())!==Yr&&e(r,n++,this)!==!1;);return n},He.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ge(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},He.isList=Le;var Vr="@@__IMMUTABLE_LIST__@@",Br=He.prototype;Br[Vr]=!0,Br[dr]=Br.remove,Br.setIn=Kr.setIn,Br.deleteIn=Br.removeIn=Kr.removeIn,Br.update=Kr.update,Br.updateIn=Kr.updateIn,Br.mergeIn=Kr.mergeIn,Br.mergeDeepIn=Kr.mergeDeepIn,Br.withMutations=Kr.withMutations,Br.asMutable=Kr.asMutable,Br.asImmutable=Kr.asImmutable,Br.wasAltered=Kr.wasAltered,Ke.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&gr;if(n>=this.array.length)return new Ke([],e);var o,i=0===n;if(t>0){var a=this.array[n];if(o=a&&a.removeBefore(e,t-fr,r),o===a&&i)return this}if(i&&!o)return this;var s=Be(this,e);if(!i)for(var l=0;l<n;l++)s.array[l]=void 0;return o&&(s.array[n]=o),s},Ke.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n=r-1>>>t&gr;if(n>=this.array.length)return this;var o;if(t>0){var i=this.array[n];if(o=i&&i.removeAfter(e,t-fr,r),o===i&&n===this.array.length-1)return this}var a=Be(this,e);return a.array.splice(n+1),o&&(a.array[n]=o),a};var Jr,Yr={};e(Qe,pe),Qe.of=function(){return this(arguments)},Qe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qe.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t},Qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Qe.prototype.set=function(e,t){return rt(this,e,t)},Qe.prototype.remove=function(e){return rt(this,e,vr)},Qe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qe.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],r)},t)},Qe.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Qe.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?et(t,r,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=r,this)},Qe.isOrderedMap=$e,Qe.prototype[pr]=!0,Qe.prototype[dr]=Qe.prototype.remove;var Xr;e(nt,M),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=ut(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},nt.prototype.map=function(e,t){var r=this,n=lt(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},nt.prototype.__iterate=function(e,t){var r,n=this;return this._iter.__iterate(this._useKeys?function(t,r){return e(t,r,n)}:(r=t?It(this):0,function(o){return e(o,t?--r:r++,n)}),t)},nt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var r=this._iter.__iterator(br,t),n=t?It(this):0;return new _(function(){var o=r.next();return o.done?o:C(e,t?--n:n++,o.value,o)})},nt.prototype[pr]=!0,e(ot,k),ot.prototype.includes=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var r=this,n=0;return this._iter.__iterate(function(t){return e(t,n++,r)},t)},ot.prototype.__iterator=function(e,t){var r=this._iter.__iterator(br,t),n=0;return new _(function(){var t=r.next();return t.done?t:C(e,n++,t.value,t)})},e(it,A),it.prototype.has=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){return e(t,t,r)},t)},it.prototype.__iterator=function(e,t){var r=this._iter.__iterator(br,t);return new _(function(){var t=r.next();return t.done?t:C(e,t.value,t.value,t)})},e(at,M),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){if(t){Rt(t);var n=i(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r)}},t)},at.prototype.__iterator=function(e,t){var r=this._iter.__iterator(br,t);return new _(function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){Rt(n);var o=i(n);return C(e,o?n.get(0):n[0],o?n.get(1):n[1],t)}}})},ot.prototype.cacheResult=nt.prototype.cacheResult=it.prototype.cacheResult=at.prototype.cacheResult=Ot,e(At,te),At.prototype.toString=function(){return this.__toString(jt(this)+" {","}")},At.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},At.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._defaultValues[e];return this._map?this._map.get(e,r):r},At.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Tt(this,Ce()))},At.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+jt(this));if(this._map&&!this._map.has(e)){var r=this._defaultValues[e];if(t===r)return this}var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Tt(this,n)},At.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:Tt(this,t)},At.prototype.wasAltered=function(){return this._map.wasAltered()},At.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},At.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},At.prototype.__ensureOwner=function(