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

rambda

Package Overview
Dependencies
Maintainers
1
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rambda - npm Package Compare versions

Comparing version 7.2.1 to 7.3.0

src/_internals/constants.js

12

CHANGELOG.md

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

7.3.0
- Add `R.modify`
- Allow multiple inputs in Typescript versions of `R.anyPass` and `R.allPass` - [Issue #642](https://github.com/selfrefactor/rambda/issues/604)
- Using wrong clone of object in `R.mergeDeepRight` - [Issue #650](https://github.com/selfrefactor/rambda/issues/650)
- Missing early return in `R.where` - [Issue #648](https://github.com/selfrefactor/rambda/issues/648)
- `R.allPass` doesn't accept more than 1 parameters for function predicates- [Issue #604](https://github.com/selfrefactor/rambda/issues/604)
7.2.1

@@ -2,0 +14,0 @@

150

dist/rambda.js

@@ -116,3 +116,5 @@ 'use strict';

const _isArray = Array.isArray;
const {
isArray
} = Array;

@@ -157,3 +159,3 @@ function __findHighestArity(spec, max = 0) {

if (_isArray(spec)) {
if (isArray(spec)) {
const ret = [];

@@ -164,3 +166,3 @@ let i = 0;

for (; i < l; i++) {
if (typeof spec[i] === 'object' || _isArray(spec[i])) {
if (typeof spec[i] === 'object' || isArray(spec[i])) {
ret[i] = __applySpecWithArity(spec[i], arity, cache);

@@ -218,6 +220,7 @@ }

}
var _isInteger$1 = Number.isInteger || _isInteger;
const isInteger = Number.isInteger || _isInteger;
function assocPathFn(path, newValue, input) {
const pathArrValue = typeof path === 'string' ? path.split('.').map(x => _isInteger(Number(x)) ? Number(x) : x) : path;
const pathArrValue = typeof path === 'string' ? path.split('.').map(x => isInteger(Number(x)) ? Number(x) : x) : path;

@@ -232,7 +235,7 @@ if (pathArrValue.length === 0) {

const condition = typeof input !== 'object' || input === null || !input.hasOwnProperty(index);
const nextinput = condition ? _isInteger(pathArrValue[1]) ? [] : {} : input[index];
newValue = assocPathFn(Array.prototype.slice.call(pathArrValue, 1), newValue, nextinput);
const nextInput = condition ? isInteger(pathArrValue[1]) ? [] : {} : input[index];
newValue = assocPathFn(Array.prototype.slice.call(pathArrValue, 1), newValue, nextInput);
}
if (_isInteger(index) && _isArray(input)) {
if (isInteger(index) && isArray(input)) {
const arr = cloneList(input);

@@ -374,3 +377,3 @@ arr[index] = newValue;

function clone(input) {
const out = _isArray(input) ? Array(input.length) : {};
const out = isArray(input) ? Array(input.length) : {};
if (input && input.getTime) return new Date(input.getTime());

@@ -390,4 +393,2 @@

const _keys = Object.keys;
class ReduceStopper {

@@ -401,3 +402,3 @@ constructor(value) {

function reduceFn(reducer, acc, list) {
if (!_isArray(list)) {
if (!isArray(list)) {
throw new TypeError('reduce: list must be array or iterable');

@@ -525,2 +526,6 @@ }

const {
keys: keys$1
} = Object;
function mapArray(fn, list, isIndexed = false) {

@@ -543,10 +548,8 @@ let index = 0;

let index = 0;
const keys = _keys(obj);
const len = keys.length;
const objKeys = keys$1(obj);
const len = objKeys.length;
const willReturn = {};
while (index < len) {
const key = keys[index];
const key = objKeys[index];
willReturn[key] = fn(obj[key], key, obj);

@@ -563,6 +566,6 @@ index++;

if (!iterable) {
throw new Error('Incorrect iterable input');
throw new Error(INCORRECT_ITERABLE_INPUT);
}
if (_isArray(iterable)) return mapArray(fn, iterable);
if (isArray(iterable)) return mapArray(fn, iterable);
return mapObject(fn, iterable);

@@ -589,3 +592,3 @@ }

if (!_isArray(list)) return 0;
if (!isArray(list)) return 0;
return list.filter(x => predicate(x)).length;

@@ -640,3 +643,3 @@ }

function _lastIndexOf(valueToFind, list) {
if (!_isArray(list)) {
if (!isArray(list)) {
throw new Error(`Cannot read property 'indexOf' of ${list}`);

@@ -662,3 +665,3 @@ }

function _indexOf(valueToFind, list) {
if (!_isArray(list)) {
if (!isArray(list)) {
throw new Error(`Cannot read property 'indexOf' of ${list}`);

@@ -824,3 +827,3 @@ }

if (!_isArray(iterable)) return false;
if (!isArray(iterable)) return false;
return _indexOf(valueToFind, iterable) > -1;

@@ -921,5 +924,4 @@ }

if (iterable.length === 0) return iterable;
const isArray$1 = isArray(iterable);
const isArray = _isArray(iterable);
if (typeof predicate !== 'function') {

@@ -929,3 +931,3 @@ throw new Error(`'predicate' is from wrong type ${typeof predicate}`);

if (!isArray && typeof iterable !== 'string') {
if (!isArray$1 && typeof iterable !== 'string') {
throw new Error(`'iterable' is from wrong type ${typeof iterable}`);

@@ -949,7 +951,7 @@ }

return isArray ? toReturn.reverse() : toReturn.reverse().join('');
return isArray$1 ? toReturn.reverse() : toReturn.reverse().join('');
}
function dropRepeats(list) {
if (!_isArray(list)) {
if (!isArray(list)) {
throw new Error(`${list} is not a list`);

@@ -974,3 +976,3 @@ }

if (!_isArray(list)) {
if (!isArray(list)) {
throw new Error(`${list} is not a list`);

@@ -1000,5 +1002,5 @@ }

const isArray = _isArray(iterable);
const isArray$1 = isArray(iterable);
if (!isArray && typeof iterable !== 'string') {
if (!isArray$1 && typeof iterable !== 'string') {
throw new Error('`iterable` is neither list nor a string');

@@ -1020,3 +1022,3 @@ }

return isArray ? holder : holder.join('');
return isArray$1 ? holder : holder.join('');
}

@@ -1039,3 +1041,3 @@

if (!_isArray(target)) return false;
if (!isArray(target)) return false;
const diff = iterable.length - target.length;

@@ -1154,3 +1156,3 @@ let correct = true;

if (_isArray(iterable)) return filterArray(predicate, iterable, false);
if (isArray(iterable)) return filterArray(predicate, iterable, false);
return filterObject(predicate, iterable);

@@ -1219,3 +1221,3 @@ }

for (let i = 0; i < list.length; i++) {
if (_isArray(list[i])) {
if (isArray(list[i])) {
flatten(list[i], willReturn);

@@ -1257,3 +1259,3 @@ } else {

if (_isArray(list)) {
if (isArray(list)) {
let index = 0;

@@ -1268,9 +1270,7 @@ const len = list.length;

let index = 0;
const listKeys = keys$1(list);
const len = listKeys.length;
const keys = _keys(list);
const len = keys.length;
while (index < len) {
const key = keys[index];
const key = listKeys[index];
fn(list[key], key, list);

@@ -1309,3 +1309,3 @@ index++;

function groupWith(compareFn, list) {
if (!_isArray(list)) throw new TypeError('list.reduce is not a function');
if (!isArray(list)) throw new TypeError('list.reduce is not a function');
const clone = cloneList(list);

@@ -1396,7 +1396,8 @@ if (list.length === 1) return [clone];

}
var _objectIs$1 = Object.is || _objectIs;
const objectIs = Object.is || _objectIs;
function identical(a, b) {
if (arguments.length === 1) return _b => identical(a, _b);
return _objectIs$1(a, b);
return objectIs(a, b);
}

@@ -1566,3 +1567,3 @@

function length(x) {
if (_isArray(x)) return x.length;
if (isArray(x)) return x.length;
if (typeof x === 'string') return x.length;

@@ -1591,3 +1592,2 @@ return NaN;

}
const update = curry(updateFn);

@@ -1615,3 +1615,3 @@

if (arguments.length === 1) return _y => mathMod(x, _y);
if (!_isInteger$1(x) || !_isInteger$1(y) || y < 1) return NaN;
if (!isInteger(x) || !isInteger(y) || y < 1) return NaN;
return (x % y + y) % y;

@@ -1662,3 +1662,3 @@ }

const willReturn = JSON.parse(JSON.stringify(target));
const willReturn = clone(target);
Object.keys(source).forEach(key => {

@@ -1757,2 +1757,21 @@ if (type(source[key]) === 'Object') {

function isIterable(input) {
return Array.isArray(input) || type(input) === 'Object';
}
function modifyFn(property, fn, iterable) {
if (!isIterable(iterable)) return iterable;
if (iterable[property] === undefined) return iterable;
if (isArray(iterable)) {
return updateFn(property, fn(iterable[property]), iterable);
}
return _objectSpread2(_objectSpread2({}, iterable), {}, {
[property]: fn(iterable[property])
});
}
const modify = curry(modifyFn);
function modifyPathFn(pathInput, fn, object) {

@@ -1914,11 +1933,3 @@ const path$1 = createPath(pathInput);

function partialObject(fn, input) {
return rest => {
if (type(fn) === 'Async') {
return new Promise((resolve, reject) => {
fn(mergeDeepRight(rest, input)).then(resolve).catch(reject);
});
}
return fn(mergeDeepRight(rest, input));
};
return nextInput => fn(mergeDeepRight(nextInput, input));
}

@@ -1958,3 +1969,3 @@

if (!_isArray(iterable)) return partitionObject(predicate, iterable);
if (!isArray(iterable)) return partitionObject(predicate, iterable);
return partitionArray(predicate, iterable);

@@ -2079,3 +2090,3 @@ }

if (!_isArray(propsToPick)) {
if (!isArray(propsToPick)) {
throw new Error('propsToPick is not a list');

@@ -2185,3 +2196,3 @@ }

if (!input) throw new TypeError(`Cannot read property 'slice' of ${input}`);
if (!_isArray(input) && typeof input !== 'string') return [[], []];
if (!isArray(input) && typeof input !== 'string') return [[], []];
const correctIndex = maybe(index < 0, input.length + index < 0 ? 0 : input.length + index, index);

@@ -2242,3 +2253,3 @@ return [take(correctIndex, input), drop(correctIndex, input)];

if (!_isArray(target)) return false;
if (!isArray(target)) return false;
let correct = true;

@@ -2301,3 +2312,3 @@ const filtered = target.filter((x, index) => {

return _isArray(input) ? toReturn.reverse() : toReturn.reverse().join('');
return isArray(input) ? toReturn.reverse() : toReturn.reverse().join('');
}

@@ -2310,5 +2321,5 @@

const isArray = _isArray(iterable);
const isArray$1 = isArray(iterable);
if (!isArray && typeof iterable !== 'string') {
if (!isArray$1 && typeof iterable !== 'string') {
throw new Error('`iterable` is neither list nor a string');

@@ -2328,3 +2339,3 @@ }

}
return isArray ? holder : holder.join('');
return isArray$1 ? holder : holder.join('');
}

@@ -2351,3 +2362,3 @@

if (!Number.isInteger(howMany) || howMany < 0) {
if (!isInteger(howMany) || howMany < 0) {
throw new RangeError('n must be an integer');

@@ -2377,3 +2388,3 @@ }

return array.reduce((acc, el) => {
el.forEach((nestedEl, i) => _isArray(acc[i]) ? acc[i].push(nestedEl) : acc.push([nestedEl]));
el.forEach((nestedEl, i) => isArray(acc[i]) ? acc[i].push(nestedEl) : acc.push([nestedEl]));
return acc;

@@ -2476,3 +2487,3 @@ }, []);

if (!_isArray(obj[property])) return [obj];
if (!isArray(obj[property])) return [obj];
return mapArray(x => _objectSpread2(_objectSpread2({}, obj), {}, {

@@ -2513,2 +2524,3 @@ [property]: x

for (const prop in conditions) {
if (!flag) continue;
const result = conditions[prop](input[prop]);

@@ -2697,2 +2709,3 @@

exports.minByFn = minByFn;
exports.modify = modify;
exports.modifyPath = modifyPath;

@@ -2779,2 +2792,3 @@ exports.modifyPathFn = modifyPathFn;

exports.update = update;
exports.updateFn = updateFn;
exports.values = values;

@@ -2781,0 +2795,0 @@ exports.view = view;

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

!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).R={})}(this,function(n){"use strict";function a(n){return Array.prototype.slice.call(n)}function R(r,n){var t,e=Object.keys(r);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(r),n&&(t=t.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),e.push.apply(e,t)),e}function u(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach(function(n){i(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function l(n){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function B(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}function C(n,r){for(var t=0;t<r.length;t++){var e=r[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function D(n,r,t){return r&&C(n.prototype,r),t&&C(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function i(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function o(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var e,u,i=[],o=!0,f=!1;try{for(t=t.call(n);!(o=(e=t.next()).done)&&(i.push(e.value),!r||i.length!==r);o=!0);}catch(n){f=!0,u=n}finally{try{o||null==t.return||t.return()}finally{if(f)throw u}}return i}}(n,r)||L(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(n){return function(n){if(Array.isArray(n))return e(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||L(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(n,r){if(n){if("string"==typeof n)return e(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Map"===(t="Object"===t&&n.constructor?n.constructor.name:t)||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?e(n,r):void 0}}function e(n,r){for(var t=0,e=Array(r=null!=r&&r<=n.length?r:n.length);t<r;t++)e[t]=n[t];return e}function f(u){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n,r=arguments.length,t=Array(r),e=0;e<r;e++)t[e]=arguments[e];return(n=[].concat(h(i),t)).length<u.length?f(u,n):u.apply(void 0,h(n))}}var U=f(function(n,r,t){var e=n<0?t.length+n:n;return t.length<=n||e<0?t:((n=a(t))[e]=r(n[e]),n)});function z(r){return function(n){return r}}var s=Array.isArray;function c(n){var r,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;for(r in n)!1!=n.hasOwnProperty(r)&&"constructor"!==r&&("object"===l(n[r])&&(t=Math.max(t,c(n[r]))),"function"==typeof n[r]&&(t=Math.max(t,n[r].length)));return t}function p(){for(var n=[],r=0,t=arguments.length;r<t&&void 0!==arguments[r];)n[r]=arguments[r],r++;return n}var g=f(function(n,r,t){return Object.assign({},t,i({},n,r))});function y(n){return n<<0===n}var M=Number.isInteger||y;var J=f(function n(r,t,e){r="string"==typeof r?r.split(".").map(function(n){return y(+(""+n))?+(""+n):n}):r;if(0===r.length)return t;var u,i=r[0];return 1<r.length&&(u="object"===l(e)&&null!==e&&e.hasOwnProperty(i)?e[i]:y(r[1])?[]:{},t=n(Array.prototype.slice.call(r,1),t,u)),y(i)&&s(e)?((r=a(e))[i]=t,r):g(i,t,e)});function H(n,l){switch(n){case 0:return function(){return l.apply(this,arguments)};case 1:return function(n){return l.apply(this,arguments)};case 2:return function(n,r){return l.apply(this,arguments)};case 3:return function(n,r,t){return l.apply(this,arguments)};case 4:return function(n,r,t,e){return l.apply(this,arguments)};case 5:return function(n,r,t,e,u){return l.apply(this,arguments)};case 6:return function(n,r,t,e,u,i){return l.apply(this,arguments)};case 7:return function(n,r,t,e,u,i,o){return l.apply(this,arguments)};case 8:return function(n,r,t,e,u,i,o,f){return l.apply(this,arguments)};case 9:return function(n,r,t,e,u,i,o,f,c){return l.apply(this,arguments)};default:return function(n,r,t,e,u,i,o,f,c,a){return l.apply(this,arguments)}}}function t(r,n){if(1===arguments.length)return function(n){return t(r,n)};if(10<r)throw Error("First argument to _arity must be a non-negative integer no greater than ten");return H(r,function i(o,f,c){return function(){for(var n=0,r=0,t=f.length,e=arguments.length,u=Array(t+e);n<t;)u[n]=f[n],n++;for(;r<e;)u[t+r]=arguments[r],r++;return u.length<o?H(o-u.length,i(o,u,c)):c.apply(this,u)}}(r,[],n))}var $=f(function(n,r,t){if(r<n)throw Error("min must not be greater than max in clamp(min, max, value)");return t<n||r<t?r<t?r:t<n?n:void 0:t});var G=Object.keys,K=D(function n(r){B(this,n),this.value=r});function r(n,r,t){if(!s(t))throw new TypeError("reduce: list must be array or iterable");for(var e=0,u=t.length;e<u;){if((r=n(r,t[e],e,t))instanceof K)return r.value;e++}return r}var v=f(r);function Q(n,l){switch(n){case 0:return function(){return l.apply(this,arguments)};case 1:return function(n){return l.apply(this,arguments)};case 2:return function(n,r){return l.apply(this,arguments)};case 3:return function(n,r,t){return l.apply(this,arguments)};case 4:return function(n,r,t,e){return l.apply(this,arguments)};case 5:return function(n,r,t,e,u){return l.apply(this,arguments)};case 6:return function(n,r,t,e,u,i){return l.apply(this,arguments)};case 7:return function(n,r,t,e,u,i,o){return l.apply(this,arguments)};case 8:return function(n,r,t,e,u,i,o,f){return l.apply(this,arguments)};case 9:return function(n,r,t,e,u,i,o,f,c){return l.apply(this,arguments)};case 10:return function(n,r,t,e,u,i,o,f,c,a){return l.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}}function V(n,r){return function(){return r.call(this,n.apply(this,arguments))}}function X(){if(0===arguments.length)throw Error("pipe requires at least one argument");return Q(arguments[0].length,r(V,arguments[0],Array.prototype.slice.call(arguments,1,1/0)))}function d(r,n){return 1===arguments.length?function(n){return d(r,n)}:"string"==typeof r?"".concat(r).concat(n):[].concat(h(r),h(n))}function m(n,r){for(var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],e=0,u=Array(r.length);e<r.length;)u[e]=t?n(r[e],e):n(r[e]),e++;return u}function b(r,n){if(1===arguments.length)return function(n){return b(r,n)};for(var t=0,e=G(n),u=e.length,i={};t<u;){var o=e[t];i[o]=r(n[o],o,n),t++}return i}var Y=b;function w(r,n){if(1===arguments.length)return function(n){return w(r,n)};if(n)return(s(n)?m:b)(r,n);throw Error("Incorrect iterable input")}function O(r,n){return 1===arguments.length?function(n){return O(r,n)}:r<n?n:r}function j(r,n){return 1===arguments.length?function(n){return j(r,n)}:null==(t=n)||!0===Number.isNaN(t)?r:n;var t}function E(n){if(null===n)return"Null";if(void 0===n)return"Undefined";if(Number.isNaN(n))return"NaN";n=Object.prototype.toString.call(n).slice(8,-1);return"AsyncFunction"===n?"Promise":n}function Z(n,r){if(!s(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=E(n);if(!["Object","Array","NaN","RegExp"].includes(t))return r.lastIndexOf(n);for(var e=r.length,u=-1;-1<--e&&-1===u;)N(r[e],n)&&(u=e);return u}function A(n,r){if(!s(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=E(n);if(!["Object","Array","NaN","RegExp"].includes(t))return r.indexOf(n);for(var e=-1,u=-1,i=r.length;++e<i&&-1===u;)N(r[e],n)&&(u=e);return u}function nn(n){for(var r,t=[];!(r=n.next()).done;)t.push(r.value);return t}function rn(n){var r=""+n.__proto__;return["Error","TypeError"].includes(r)?[r,n.message]:[]}function tn(n){return n.toDateString?[!0,n.getTime()]:[!1]}function en(n){return n.constructor!==RegExp?[!1]:[!0,""+n]}function N(t,e){if(1===arguments.length)return function(n){return N(t,n)};var n=E(t);if(n!==E(e))return!1;if("Function"===n)return void 0!==t.name&&t.name===e.name;if(["NaN","Undefined","Null"].includes(n))return!0;if("Number"===n)return Object.is(-0,t)===Object.is(-0,e)&&""+t==""+e;if(["String","Boolean"].includes(n))return""+t==""+e;if("Array"===n){var r=Array.from(t),u=Array.from(e);if(""+r!=""+u)return!1;var i=!0;return r.forEach(function(n,r){!i||n===u[r]||N(n,u[r])||(i=!1)}),i}var r=en(t),o=en(e);if(r[0])return!!o[0]&&r[1]===o[1];if(o[0])return!1;r=tn(t),o=tn(e);if(r[0])return!!o[0]&&r[1]===o[1];if(o[0])return!1;r=rn(t),o=rn(e);if(r[0])return!!o[0]&&(r[0]===o[0]&&r[1]===o[1]);if("Set"===n){r=t,o=e;if(r.size!==o.size)return!1;var r=nn(r.values()),f=nn(o.values());return 0===r.filter(function(n){return-1===A(n,f)}).length}if("Object"!==n)return!1;o=Object.keys(t);if(o.length!==Object.keys(e).length)return!1;var c=!0;return o.forEach(function(n){var r;c&&(r=t[n])!==(n=e[n])&&!N(r,n)&&(c=!1)}),c}function x(r,n){if(1===arguments.length)return function(n){return x(r,n)};if("string"==typeof n)return n.includes(r);if(n)return!!s(n)&&-1<A(r,n);throw new TypeError("Cannot read property 'indexOf' of ".concat(n))}var un=function(){function n(){B(this,n),this.set=new Set,this.items={}}return D(n,[{key:"checkUniqueness",value:function(n){var r=E(n);return["Null","Undefined","NaN"].includes(r)?!(r in this.items)&&(this.items[r]=!0):["Object","Array"].includes(r)?r in this.items?-1===A(n,this.items[r])&&(this.items[r].push(n),!0):(this.items[r]=[n],!0):(r=this.set.size,this.set.add(n),this.set.size!==r)}}]),n}();function on(n){var r=new un,t=[];return n.forEach(function(n){r.checkUniqueness(n)&&t.push(n)}),t}function P(r,n){return 1===arguments.length?function(n){return P(r,n)}:n.slice(0<r?r:0)}function S(r,n){return 1===arguments.length?function(n){return S(r,n)}:n?n[r]:void 0}var fn=f(function(n,r,t){return N(S(n,r),S(n,t))});function cn(t,n){return m(function(n,r){return"Function"===E(t[r])?t[r](n):n},n,!0)}function an(e,n){return b(function(n,r){var t;return"Object"===E(n)?"Function"===(t=E(e[r]))?e[r](n):"Object"===t?ln(e[r],n):n:"Function"===E(e[r])?e[r](n):n},n)}function ln(r,n){if(1===arguments.length)return function(n){return ln(r,n)};var t=E(r),e=E(n);if(e!==t)throw Error("iterableType !== rulesType");if(["Object","Array"].includes(t))return("Object"===e?an:cn)(r,n);throw Error("'iterable' and 'rules' are from wrong type ".concat(t))}function hn(n,r){var t,e={};for(t in r)n(r[t],t,r)&&(e[t]=r[t]);return e}function sn(n,r){for(var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],e=0,u=r.length,i=[];e<u;)(t?n(r[e],e):n(r[e]))&&i.push(r[e]),e++;return i}function k(r,n){if(1===arguments.length)return function(n){return k(r,n)};if(n)return s(n)?sn(r,n,!1):hn(r,n);throw Error("Incorrect iterable input")}function T(n,r){return"string"==typeof n?n.split(1<arguments.length&&void 0!==r?r:"."):n}function I(r,n){if(1===arguments.length)return function(n){return I(r,n)};if(null!=n){for(var t=n,e=0,u=T(r);e<u.length;){if(null==t)return;if(null===t[u[e]])return;t=t[u[e]],e++}return t}}var pn=Object.is||function(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r};var gn=f(function(n,r,t){return function(){return(!0===("boolean"==typeof n?n:n.apply(void 0,arguments))?r:t).apply(void 0,arguments)}});function yn(n,r,t){for(var e=-1,u=n.length,i=((t=u<t?u:t)<0&&(t+=u),u=t<r?0:t-r>>>0,r>>>=0,Array(u));++e<u;)i[e]=n[e+r];return i}function vn(r,n){return 1===arguments.length?function(n){return vn(r,n)}:null!=n&&n.constructor===r||n instanceof r}function F(t,e){return function(n){return function(r){return n(t(r)).map(function(n){return e(n,r)})}}}function dn(r,n){if(1===arguments.length)return function(n){return dn(r,n)};var t=r<0?n.length+r:r;return"[object String]"===Object.prototype.toString.call(n)?n[0|t]||"":n[t]}var mn=f(function(n,r,t){return t=a(t),-1===n?t.fill(r,n):t.fill(r,n,n+1)});function bn(n,r,t){return n(t)>n(r)?t:r}var wn=f(bn);function On(n){return n.reduce(function(n,r){return n+r},0)}function jn(n){return On(n)/n.length}function W(r,n){return 1===arguments.length?function(n){return W(r,n)}:Object.assign({},r||{},n||{})}function _(r,t){if(1===arguments.length)return function(n){return _(r,n)};var e=JSON.parse(JSON.stringify(r));return Object.keys(t).forEach(function(n){"Object"===E(t[n])&&"Object"===E(r[n])?e[n]=_(r[n],t[n]):e[n]=t[n]}),e}var En=f(function(r,t,e){var u={};return Object.keys(t).forEach(function(n){u[n]=void 0===e[n]?t[n]:r(t[n],e[n])}),Object.keys(e).forEach(function(n){void 0===u[n]&&(u[n]=void 0===t[n]?e[n]:r(t[n],e[n]))}),u});function An(n,r,t){return n(t)<n(r)?t:r}var Nn=f(An);function xn(n,r,t){n=T(n);if(1===n.length)return u(u({},t),{},i({},n[0],r(t[n[0]])));if(void 0===I(n,t))return t;r=Pn(Array.prototype.slice.call(n,1),r,t[n[0]]);return r===t[n[0]]?t:g(n[0],r,t)}var Pn=f(xn);var Sn=f(function(n,r,t){if(n<0||r<0)throw Error("Rambda.move does not support negative indexes");if(t.length-1<n||t.length-1<r)return t;var e=a(t);return e[n]=t[r],e[r]=t[n],e});function kn(r,n){return 1===arguments.length?function(n){return kn(r,n)}:r*n}function Tn(n,r){var t;return function(){return n&&(t=n.apply(r||this,arguments),n=null),t}}function In(r){return{x:r,map:function(n){return In(n(r))}}}var Fn=f(function(n,r,t){return n(function(n){return In(r(n))})(t).x});function Wn(e){for(var n=arguments.length,u=Array(1<n?n-1:0),r=1;r<n;r++)u[r-1]=arguments[r];var i=e.length;return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return u.length+r.length<i?Wn.apply(void 0,[e].concat([].concat(u,r))):e.apply(void 0,u.concat(r))}}function _n(t,n){var e={},u={};return Object.entries(n).forEach(function(n){var n=o(n,2),r=n[0],n=n[1];t(n,r)?e[r]=n:u[r]=n}),[e,u]}function qn(n,r){for(var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],e=[],u=[],i=-1;i++<r.length-1;)((t?n(r[i],i):n(r[i]))?e:u).push(r[i]);return[e,u]}var Rn=f(function(n,r,t){return N(I(n,t),r)});var Bn=f(function(n,r,t){return j(n,I(r,t))});var Cn=v(kn,1);var Dn=f(function(n,r,t){return!!t&&N(r,S(n,t))});var Ln=f(function(n,r,t){return vn(n,t[r])});var Un=f(function(n,r,t){return t?j(n,t[r]):n});var zn=f(function(n,r,t){return n(S(r,t))});function Mn(r,n){if(1===arguments.length)return function(n){return Mn(r,n)};if(Number.isNaN(+(""+r))||Number.isNaN(+(""+n)))throw new TypeError("Both arguments to range must be numbers");if(n<r)return[];for(var t=n-r,e=Array(t),u=0;u<t;u++)e[u]=r+u;return e}var Jn=f(function(n,r,t){return t.replace(n,r)});var Hn=f(function(n,r,t){return Fn(n,z(r),t)});var $n=f(function(n,r,t){return t.slice(n,r)});function q(r,n){return 1===arguments.length?function(n){return q(r,n)}:r<0?n.slice():"string"==typeof n?n.slice(0,r):yn(n,0,r)}function Gn(n){return["Promise","Function"].includes(E(n))}function Kn(r){return{x:r,map:function(n){return Kn(r)}}}var Qn=f(function(n,r,t){return n(t)?r(t):t});var Vn=f(function(t,n,e){return q((e.length<n.length?e:n).length,n).map(function(n,r){return t(n,e[r])})});n.F=function(){return!1},n.T=function(){return!0},n.__findHighestArity=c,n._arity=Q,n._indexOf=A,n._lastIndexOf=Z,n._pipe=V,n.add=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:+(""+t)+ +(""+n)},n.adjust=U,n.all=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0;e<n.length;e++)if(!t(n[e]))return!1;return!0},n.allPass=function(r){return function(){for(var n=0;n<r.length;){if(!r[n].apply(r,arguments))return!1;n++}return!0}},n.always=z,n.and=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t&&n},n.any=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0;e<n.length;){if(t(n[e],e))return!0;e++}return!1},n.anyPass=function(r){return function(){for(var n=0;n<r.length;){if(r[n].apply(r,arguments))return!0;n++}return!1}},n.append=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof n)return n.split("").concat(t);n=a(n);return n.push(t),n},n.apply=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t.apply(this,n)},n.applySpec=function(n){var r=c(n);if(0===r)return function(){return{}};for(var t=arguments.length,e=Array(1<t?t-1:0),u=1;u<t;u++)e[u-1]=arguments[u];return function u(i,o,f){var n=o-f.length;if(1==n)return function(n){return u(i,o,p.apply(void 0,h(f).concat([n])))};if(2==n)return function(n,r){return u(i,o,p.apply(void 0,h(f).concat([n,r])))};if(3==n)return function(n,r,t){return u(i,o,p.apply(void 0,h(f).concat([n,r,t])))};if(4==n)return function(n,r,t,e){return u(i,o,p.apply(void 0,h(f).concat([n,r,t,e])))};if(4<n)return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return u(i,o,p.apply(void 0,h(f).concat(r)))};if(s(i)){for(var r=[],t=0,e=i.length;t<e;t++)"object"!==l(i[t])&&!s(i[t])||(r[t]=u(i[t],o,f)),"function"==typeof i[t]&&(r[t]=i[t].apply(i,h(f)));return r}var c,a={};for(c in i)0!=i.hasOwnProperty(c)&&"constructor"!==c&&("object"===l(i[c])?a[c]=u(i[c],o,f):"function"==typeof i[c]&&(a[c]=i[c].apply(i,h(f))));return a}(n,r,e)},n.assoc=g,n.assocPath=J,n.bind=function r(e,u){return 1===arguments.length?function(n){return r(e,n)}:t(e.length,function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.apply(u,r)})},n.both=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:function(){return t.apply(void 0,arguments)&&n.apply(void 0,arguments)}},n.chain=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=[]).concat.apply(e,h(n.map(t)))},n.clamp=$,n.clone=function n(r){var t,e=s(r)?Array(r.length):{};if(r&&r.getTime)return new Date(r.getTime());for(t in r){var u=r[t];e[t]="object"===l(u)&&null!==u?u.getTime?new Date(u.getTime()):n(u):u}return e},n.complement=function(n){return function(){return!n.apply(void 0,arguments)}},n.compose=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return X.apply(this,Array.prototype.slice.call(arguments,0).reverse())},n.concat=d,n.cond=function(n){return function(t){var e,u=!1;return n.forEach(function(n){var n=o(n,2),r=n[0],n=n[1];!u&&r(t)&&(u=!0,e=n(t))}),e}},n.converge=function r(e,n){return 1===arguments.length?function(n){return r(e,n)}:t(v(function(n,r){return O(n,r.length)},0,n),function(){var r=arguments,t=this;return e.apply(this,w(function(n){return n.apply(t,r)},n))})},n.count=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:s(n)?n.filter(function(n){return t(n)}).length:0},n.countBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e={};return n.forEach(function(n){n=t(n),e[n]?e[n]++:e[n]=1}),e},n.curry=f,n.curryN=t,n.dec=function(n){return n-1},n.defaultTo=j,n.difference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:on(t).filter(function(n){return!x(n,e)})},n.dissoc=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null==n)return{};var e,u={};for(e in n)u[e]=n[e];return delete u[t],u},n.divide=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t/n},n.drop=P,n.dropLast=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:0<t?n.slice(0,-t):n.slice()},n.dropLastWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(0===n.length)return n;var e=s(n);if("function"!=typeof t)throw Error("'predicate' is from wrong type ".concat(l(t)));if(!e&&"string"!=typeof n)throw Error("'iterable' is from wrong type ".concat(l(n)));for(var u=!1,i=[],o=n.length;0<o;)o--,u||!1!==t(n[o])?u&&i.push(n[o]):(u=!0,i.push(n[o]));return e?i.reverse():i.reverse().join("")},n.dropRepeats=function(n){if(!s(n))throw Error("".concat(n," is not a list"));var t=[];return n.reduce(function(n,r){return N(n,r)||t.push(r),r},void 0),t},n.dropRepeatsWith=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!s(n))throw Error("".concat(n," is not a list"));var e=[];return n.reduce(function(n,r){return void 0!==n&&t(n,r)||e.push(r),r},void 0),e},n.dropWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=s(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=!1,i=[],o=-1;o++<n.length-1;)u?i.push(n[o]):t(n[o])||(u=u||!0,i.push(n[o]));return e?i:i.join("")},n.either=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:function(){return!(!t.apply(void 0,arguments)&&!n.apply(void 0,arguments))}},n.endsWith=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof e)return e.endsWith(t);if(!s(t))return!1;var u=e.length-t.length,i=!0;return t.filter(function(n,r){return!!i&&((n=N(n,e[r+u]))||(i=!1),n)}).length===t.length},n.eqProps=fn,n.equals=N,n.evolve=ln,n.evolveArray=cn,n.evolveObject=an,n.filter=k,n.filterArray=sn,n.filterObject=hn,n.find=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0,u=n.length;e<u;){var i=n[e];if(t(i))return i;e++}},n.findIndex=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=n.length,u=-1;++u<e;)if(t(n[u]))return u;return-1},n.findLast=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=n.length;0<=--e;)if(t(n[e]))return n[e]},n.findLastIndex=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=n.length;0<=--e;)if(t(n[e]))return e;return-1},n.flatten=function n(r,t){for(var e=void 0===t?[]:t,u=0;u<r.length;u++)s(r[u])?n(r[u],e):e.push(r[u]);return e},n.flip=function(n){return e=n,function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];if(1===r.length)return function(n){return e(n,r[0])};if(2===r.length)return e(r[1],r[0]);if(3===r.length)return e(r[1],r[0],r[2]);if(4===r.length)return e(r[1],r[0],r[2],r[3]);throw Error("R.flip doesn't work with arity > 4")};var e},n.forEach=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(void 0!==n){if(s(n))for(var e=0,u=n.length;e<u;)t(n[e]),e++;else for(var i=0,o=G(n),f=o.length;i<f;){var c=o[i];t(n[c],c,n),i++}return n}},n.fromPairs=function(n){var r={};return n.forEach(function(n){n=o(n,2);return r[n[0]]=n[1]}),r},n.groupBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e={},u=0;u<n.length;u++){var i=n[u],o=t(i);e[o]||(e[o]=[]),e[o].push(i)}return e},n.groupWith=function(i,o){if(!s(o))throw new TypeError("list.reduce is not a function");var n=a(o);if(1===o.length)return[n];var f=[],c=[];return n.reduce(function(n,r,t){var e,u;return 0!==t&&(e=i(n,r),u=0===c.length,t=t===o.length-1,e?(u&&c.push(n),c.push(r),t&&f.push(c)):u?(f.push([n]),t&&f.push([r])):(f.push(c),t&&f.push([r]),c=[])),r},void 0),f},n.has=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:!!n&&n.hasOwnProperty(t)},n.hasPath=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:void 0!==I(t,n)},n.head=function(n){return"string"==typeof n?n[0]||"":n[0]},n.identical=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:pn(t,n)},n.identity=function(n){return n},n.ifElse=gn,n.inc=function(n){return n+1},n.includes=x,n.indexBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof t){for(var e=t,u=n,i={},o=0;o<u.length;o++){var f=u[o];i[I(e,f)]=f}return i}for(var c={},a=0;a<n.length;a++){var l=n[a];c[t(l)]=l}return c},n.indexOf=function(r,n){return 1===arguments.length?function(n){return A(r,n)}:A(r,n)},n.init=function(n){return"string"==typeof n?n.slice(0,-1):n.length?yn(n,0,-1):[]},n.intersection=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:k(function(n){return x(n,t)},n)},n.intersperse=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=-1,u=n.length,i=[];++e<u;)e===u-1?i.push(n[e]):i.push(n[e],t);return i},n.is=vn,n.isEmpty=function(n){var r=E(n);return!["Undefined","NaN","Number","Null"].includes(r)&&(!n||("Object"===r?0===Object.keys(n).length:"Array"===r&&0===n.length))},n.isNil=function(n){return null==n},n.join=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n.join(t)},n.juxt=function(e){return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.map(function(n){return n.apply(void 0,r)})}},n.keys=function(n){return Object.keys(n)},n.last=function(n){return"string"==typeof n?n[n.length-1]||"":n[n.length-1]},n.lastIndexOf=function(r,n){return 1===arguments.length?function(n){return Z(r,n)}:Z(r,n)},n.length=function(n){return s(n)||"string"==typeof n?n.length:NaN},n.lens=F,n.lensIndex=function(n){return F(dn(n),mn(n))},n.lensPath=function(n){return F(I(n),J(n))},n.lensProp=function(n){return F(S(n),g(n))},n.map=w,n.mapArray=m,n.mapObjIndexed=Y,n.mapObject=b,n.match=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};n=n.match(t);return null===n?[]:n},n.mathMod=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:M(t)&&M(n)&&1<=n?(t%n+n)%n:NaN},n.max=O,n.maxBy=wn,n.maxByFn=bn,n.mean=jn,n.median=function(n){if(0===(t=n.length))return NaN;var r=2-t%2,t=(t-r)/2;return jn(Array.prototype.slice.call(n,0).sort(function(n,r){return n===r?0:n<r?-1:1}).slice(t,t+r))},n.merge=W,n.mergeAll=function(n){var r={};return w(function(n){r=W(r,n)},n),r},n.mergeDeepRight=_,n.mergeLeft=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:W(n,t)},n.mergeRight=W,n.mergeWith=En,n.min=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n<t?n:t},n.minBy=Nn,n.minByFn=An,n.modifyPath=Pn,n.modifyPathFn=xn,n.modulo=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t%n},n.move=Sn,n.multiply=kn,n.negate=function(n){return-n},n.none=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0;e<n.length;e++)if(t(n[e]))return!1;return!0},n.not=function(n){return!n},n.nth=dn,n.objOf=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:i({},t,n)},n.of=function(n){return[n]},n.omit=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null!=n){var e,u=T(t,","),i={};for(e in n)u.includes(e)||(i[e]=n[e]);return i}},n.on=function t(e,u,r,n){return 3===arguments.length?function(n){return t(e,u,r,n)}:2===arguments.length?function(n,r){return t(e,u,n,r)}:e(u(r),u(n))},n.once=function(n,r){return 1===arguments.length?f(Tn(n,r)):Tn(n,r)},n.or=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t||n},n.over=Fn,n.partial=Wn,n.partialObject=function(e,u){return function(t){return"Async"===E(e)?new Promise(function(n,r){e(_(t,u)).then(n).catch(r)}):e(_(t,u))}},n.partition=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:(s(n)?qn:_n)(t,n)},n.partitionArray=qn,n.partitionObject=_n,n.path=I,n.pathEq=Rn,n.pathOr=Bn,n.paths=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:t.map(function(n){return I(n,e)})},n.pick=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null!=n){for(var e=T(t,","),u={},i=0;i<e.length;)e[i]in n&&(u[e[i]]=n[e[i]]),i++;return u}},n.pickAll=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null!=n){for(var e=T(t,","),u={},i=0;i<e.length;)u[e[i]]=e[i]in n?n[e[i]]:void 0,i++;return u}},n.pipe=X,n.pluck=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=[];return w(function(n){void 0!==n[t]&&e.push(n[t])},n),e},n.prepend=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:[t].concat("string"==typeof n?n.split(""):n)},n.product=Cn,n.prop=S,n.propEq=Dn,n.propIs=Ln,n.propOr=Un,n.propSatisfies=zn,n.props=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if(s(t))return m(function(n){return e[n]},t);throw Error("propsToPick is not a list")},n.range=Mn,n.reduce=v,n.reduceFn=r,n.reduceStopper=function(n){return new K(n)},n.reject=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:k(function(n){return!t(n)},n)},n.repeat=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:Array(n).fill(t)},n.replace=Jn,n.reverse=function(n){return"string"==typeof n?n.split("").reverse().join(""):n.slice().reverse()},n.set=Hn,n.slice=$n,n.sort=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:a(n).sort(t)},n.sortBy=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:a(n).sort(function(n,r){return n=t(n),r=t(r),n===r?0:n<r?-1:1})},n.split=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n.split(t)},n.splitAt=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!n)throw new TypeError("Cannot read property 'slice' of ".concat(n));if(!s(n)&&"string"!=typeof n)return[[],[]];e=n.length+t<0?0:n.length+t,e=(i=(u=t)<0)&&"Function"===E(e)?e():e,u=i||"Function"!==E(u)?u:u();var e,u,i=i?e:u;return[q(i,n),P(i,n)]},n.splitEvery=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(t<1)throw Error("First argument to splitEvery must be a positive integer");for(var e=[],u=0;u<n.length;)e.push(n.slice(u,u+=t));return e},n.splitWhen=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!n)throw new TypeError("Cannot read property 'length' of ".concat(n));for(var e=[],u=[],i=!1,o=-1;o++<n.length-1;)i?u.push(n[o]):t(n[o])?(u.push(n[o]),i=!0):e.push(n[o]);return[e,u]},n.startsWith=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof e)return e.startsWith(t);if(!s(t))return!1;var u=!0;return t.filter(function(n,r){return!!u&&((n=N(n,e[r]))||(u=!1),n)}).length===t.length},n.subtract=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t-n},n.sum=On,n.symmetricDifference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:d(k(function(n){return!x(n,e)},t),k(function(n){return!x(n,t)},e))},n.tail=function(n){return P(1,n)},n.take=q,n.takeLast=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=n.length;if(t<0)return n.slice();var u=e<t?e:t;return"string"==typeof n?n.slice(e-u):yn(n,u=e-u,e)},n.takeLastWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(0===n.length)return n;for(var e=!1,u=[],i=n.length;!e||0===i;)!1===t(n[--i])?e=!0:e||u.push(n[i]);return s(n)?u.reverse():u.reverse().join("")},n.takeWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=s(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=!0,i=[],o=-1;o++<n.length-1;)t(n[o])?u&&i.push(n[o]):u=u&&!1;return e?i:i.join("")},n.tap=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:(t(n),n)},n.test=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof t)throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received "'.concat(t,'"'));return-1!=n.search(t)},n.times=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!Number.isInteger(n)||n<0)throw new RangeError("n must be an integer");return w(t,Mn(0,n))},n.toLower=function(n){return n.toLowerCase()},n.toPairs=function(n){return Object.entries(n)},n.toString=function(n){return""+n},n.toUpper=function(n){return n.toUpperCase()},n.transpose=function(n){return n.reduce(function(t,n){return n.forEach(function(n,r){return s(t[r])?t[r].push(n):t.push([n])}),t},[])},n.trim=function(n){return n.trim()},n.tryCatch=function(e,u){if(!Gn(e))throw Error("R.tryCatch | fn '".concat(e,"'"));var i=Gn(u);return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];try{return e.apply(void 0,r)}catch(n){return i?u.apply(void 0,[n].concat(r)):u}}},n.type=E,n.unapply=function(e){return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.call(this,r)}},n.union=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=a(t);return n.forEach(function(n){x(n,t)||e.push(n)}),e},n.uniq=on,n.uniqBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=new Set;return n.filter(function(n){return!e.has(t(n))&&(e.add(t(n)),!0)})},n.uniqWith=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=-1,u=[];++e<n.length;){var i=n[e];!function(n,r,t){for(var e=!1,u=-1;++u<t.length&&!e;)n(r,t[u])&&(e=!0);return e}(t,i,u)&&u.push(i)}return u},n.unless=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:function(n){return t(n)?n:e(n)}},n.unwind=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:s(e[t])?m(function(n){return u(u({},e),{},i({},t,n))},e[t]):[e]},n.update=mn,n.values=function(n){return"Object"!==E(n)?[]:Object.values(n)},n.view=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t(Kn)(n).x},n.when=Qn,n.where=function r(t,n){if(void 0===n)return function(n){return r(t,n)};var e,u=!0;for(e in t){var i=t[e](n[e]);u&&!1===i&&(u=!1)}return u},n.whereAny=function r(t,n){if(void 0===n)return function(n){return r(t,n)};for(var e in t)if(t[e](n[e]))return!0;return!1},n.whereEq=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};var n=k(function(n,r){return N(n,e[r])},t);return Object.keys(n).length===Object.keys(t).length},n.without=function r(t,n){return void 0===n?function(n){return r(t,n)}:v(function(n,r){return-1<A(r,t)?n:n.concat(r)},[],n)},n.xor=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:!!t&&!n||!!n&&!t},n.zip=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=[],u=Math.min(t.length,n.length),i=0;i<u;i++)e[i]=[t[i],n[i]];return e},n.zipObj=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:q(e.length,t).reduce(function(n,r,t){return n[r]=e[t],n},{})},n.zipWith=Vn,Object.defineProperty(n,"__esModule",{value:!0})});
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).R={})}(this,function(n){"use strict";function a(n){return Array.prototype.slice.call(n)}function q(r,n){var t,e=Object.keys(r);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(r),n&&(t=t.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),e.push.apply(e,t)),e}function u(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach(function(n){i(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function l(n){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function C(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}function B(n,r){for(var t=0;t<r.length;t++){var e=r[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function L(n,r,t){return r&&B(n.prototype,r),t&&B(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function i(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function o(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var e,u,i=[],o=!0,f=!1;try{for(t=t.call(n);!(o=(e=t.next()).done)&&(i.push(e.value),!r||i.length!==r);o=!0);}catch(n){f=!0,u=n}finally{try{o||null==t.return||t.return()}finally{if(f)throw u}}return i}}(n,r)||U(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(n){return function(n){if(Array.isArray(n))return e(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||U(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(n,r){if(n){if("string"==typeof n)return e(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Map"===(t="Object"===t&&n.constructor?n.constructor.name:t)||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?e(n,r):void 0}}function e(n,r){for(var t=0,e=Array(r=null!=r&&r<=n.length?r:n.length);t<r;t++)e[t]=n[t];return e}function f(u){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n,r=arguments.length,t=Array(r),e=0;e<r;e++)t[e]=arguments[e];return(n=[].concat(h(i),t)).length<u.length?f(u,n):u.apply(void 0,h(n))}}var D=f(function(n,r,t){var e=n<0?t.length+n:n;return t.length<=n||e<0?t:((n=a(t))[e]=r(n[e]),n)});function z(r){return function(n){return r}}var s=Array.isArray;function c(n){var r,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;for(r in n)!1!=n.hasOwnProperty(r)&&"constructor"!==r&&("object"===l(n[r])&&(t=Math.max(t,c(n[r]))),"function"==typeof n[r]&&(t=Math.max(t,n[r].length)));return t}function p(){for(var n=[],r=0,t=arguments.length;r<t&&void 0!==arguments[r];)n[r]=arguments[r],r++;return n}var g=f(function(n,r,t){return Object.assign({},t,i({},n,r))});var y=Number.isInteger||function(n){return n<<0===n};var M=f(function n(r,t,e){r="string"==typeof r?r.split(".").map(function(n){return y(+(""+n))?+(""+n):n}):r;if(0===r.length)return t;var u,i=r[0];return 1<r.length&&(u="object"===l(e)&&null!==e&&e.hasOwnProperty(i)?e[i]:y(r[1])?[]:{},t=n(Array.prototype.slice.call(r,1),t,u)),y(i)&&s(e)?((r=a(e))[i]=t,r):g(i,t,e)});function H(n,l){switch(n){case 0:return function(){return l.apply(this,arguments)};case 1:return function(n){return l.apply(this,arguments)};case 2:return function(n,r){return l.apply(this,arguments)};case 3:return function(n,r,t){return l.apply(this,arguments)};case 4:return function(n,r,t,e){return l.apply(this,arguments)};case 5:return function(n,r,t,e,u){return l.apply(this,arguments)};case 6:return function(n,r,t,e,u,i){return l.apply(this,arguments)};case 7:return function(n,r,t,e,u,i,o){return l.apply(this,arguments)};case 8:return function(n,r,t,e,u,i,o,f){return l.apply(this,arguments)};case 9:return function(n,r,t,e,u,i,o,f,c){return l.apply(this,arguments)};default:return function(n,r,t,e,u,i,o,f,c,a){return l.apply(this,arguments)}}}function t(r,n){if(1===arguments.length)return function(n){return t(r,n)};if(10<r)throw Error("First argument to _arity must be a non-negative integer no greater than ten");return H(r,function i(o,f,c){return function(){for(var n=0,r=0,t=f.length,e=arguments.length,u=Array(t+e);n<t;)u[n]=f[n],n++;for(;r<e;)u[t+r]=arguments[r],r++;return u.length<o?H(o-u.length,i(o,u,c)):c.apply(this,u)}}(r,[],n))}var $=f(function(n,r,t){if(r<n)throw Error("min must not be greater than max in clamp(min, max, value)");return t<n||r<t?r<t?r:t<n?n:void 0:t});function v(n){var r,t=s(n)?Array(n.length):{};if(n&&n.getTime)return new Date(n.getTime());for(r in n){var e=n[r];t[r]="object"===l(e)&&null!==e?e.getTime?new Date(e.getTime()):v(e):e}return t}var G=L(function n(r){C(this,n),this.value=r});function r(n,r,t){if(!s(t))throw new TypeError("reduce: list must be array or iterable");for(var e=0,u=t.length;e<u;){if((r=n(r,t[e],e,t))instanceof G)return r.value;e++}return r}var d=f(r);function J(n,l){switch(n){case 0:return function(){return l.apply(this,arguments)};case 1:return function(n){return l.apply(this,arguments)};case 2:return function(n,r){return l.apply(this,arguments)};case 3:return function(n,r,t){return l.apply(this,arguments)};case 4:return function(n,r,t,e){return l.apply(this,arguments)};case 5:return function(n,r,t,e,u){return l.apply(this,arguments)};case 6:return function(n,r,t,e,u,i){return l.apply(this,arguments)};case 7:return function(n,r,t,e,u,i,o){return l.apply(this,arguments)};case 8:return function(n,r,t,e,u,i,o,f){return l.apply(this,arguments)};case 9:return function(n,r,t,e,u,i,o,f,c){return l.apply(this,arguments)};case 10:return function(n,r,t,e,u,i,o,f,c,a){return l.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}}function K(n,r){return function(){return r.call(this,n.apply(this,arguments))}}function Q(){if(0===arguments.length)throw Error("pipe requires at least one argument");return J(arguments[0].length,r(K,arguments[0],Array.prototype.slice.call(arguments,1,1/0)))}function m(r,n){return 1===arguments.length?function(n){return m(r,n)}:"string"==typeof r?"".concat(r).concat(n):[].concat(h(r),h(n))}var V=Object.keys;function b(n,r){for(var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],e=0,u=Array(r.length);e<r.length;)u[e]=t?n(r[e],e):n(r[e]),e++;return u}function w(r,n){if(1===arguments.length)return function(n){return w(r,n)};for(var t=0,e=V(n),u=e.length,i={};t<u;){var o=e[t];i[o]=r(n[o],o,n),t++}return i}var X=w;function O(r,n){if(1===arguments.length)return function(n){return O(r,n)};if(n)return(s(n)?b:w)(r,n);throw Error(INCORRECT_ITERABLE_INPUT)}function Y(r,n){return 1===arguments.length?function(n){return Y(r,n)}:r<n?n:r}function j(r,n){return 1===arguments.length?function(n){return j(r,n)}:null==(t=n)||!0===Number.isNaN(t)?r:n;var t}function E(n){if(null===n)return"Null";if(void 0===n)return"Undefined";if(Number.isNaN(n))return"NaN";n=Object.prototype.toString.call(n).slice(8,-1);return"AsyncFunction"===n?"Promise":n}function Z(n,r){if(!s(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=E(n);if(!["Object","Array","NaN","RegExp"].includes(t))return r.lastIndexOf(n);for(var e=r.length,u=-1;-1<--e&&-1===u;)N(r[e],n)&&(u=e);return u}function A(n,r){if(!s(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=E(n);if(!["Object","Array","NaN","RegExp"].includes(t))return r.indexOf(n);for(var e=-1,u=-1,i=r.length;++e<i&&-1===u;)N(r[e],n)&&(u=e);return u}function nn(n){for(var r,t=[];!(r=n.next()).done;)t.push(r.value);return t}function rn(n){var r=""+n.__proto__;return["Error","TypeError"].includes(r)?[r,n.message]:[]}function tn(n){return n.toDateString?[!0,n.getTime()]:[!1]}function en(n){return n.constructor!==RegExp?[!1]:[!0,""+n]}function N(t,e){if(1===arguments.length)return function(n){return N(t,n)};var n=E(t);if(n!==E(e))return!1;if("Function"===n)return void 0!==t.name&&t.name===e.name;if(["NaN","Undefined","Null"].includes(n))return!0;if("Number"===n)return Object.is(-0,t)===Object.is(-0,e)&&""+t==""+e;if(["String","Boolean"].includes(n))return""+t==""+e;if("Array"===n){var r=Array.from(t),u=Array.from(e);if(""+r!=""+u)return!1;var i=!0;return r.forEach(function(n,r){!i||n===u[r]||N(n,u[r])||(i=!1)}),i}var r=en(t),o=en(e);if(r[0])return!!o[0]&&r[1]===o[1];if(o[0])return!1;r=tn(t),o=tn(e);if(r[0])return!!o[0]&&r[1]===o[1];if(o[0])return!1;r=rn(t),o=rn(e);if(r[0])return!!o[0]&&(r[0]===o[0]&&r[1]===o[1]);if("Set"===n){r=t,o=e;if(r.size!==o.size)return!1;var r=nn(r.values()),f=nn(o.values());return 0===r.filter(function(n){return-1===A(n,f)}).length}if("Object"!==n)return!1;o=Object.keys(t);if(o.length!==Object.keys(e).length)return!1;var c=!0;return o.forEach(function(n){var r;c&&(r=t[n])!==(n=e[n])&&!N(r,n)&&(c=!1)}),c}function x(r,n){if(1===arguments.length)return function(n){return x(r,n)};if("string"==typeof n)return n.includes(r);if(n)return!!s(n)&&-1<A(r,n);throw new TypeError("Cannot read property 'indexOf' of ".concat(n))}var un=function(){function n(){C(this,n),this.set=new Set,this.items={}}return L(n,[{key:"checkUniqueness",value:function(n){var r=E(n);return["Null","Undefined","NaN"].includes(r)?!(r in this.items)&&(this.items[r]=!0):["Object","Array"].includes(r)?r in this.items?-1===A(n,this.items[r])&&(this.items[r].push(n),!0):(this.items[r]=[n],!0):(r=this.set.size,this.set.add(n),this.set.size!==r)}}]),n}();function on(n){var r=new un,t=[];return n.forEach(function(n){r.checkUniqueness(n)&&t.push(n)}),t}function P(r,n){return 1===arguments.length?function(n){return P(r,n)}:n.slice(0<r?r:0)}function S(r,n){return 1===arguments.length?function(n){return S(r,n)}:n?n[r]:void 0}var fn=f(function(n,r,t){return N(S(n,r),S(n,t))});function cn(t,n){return b(function(n,r){return"Function"===E(t[r])?t[r](n):n},n,!0)}function an(e,n){return w(function(n,r){var t;return"Object"===E(n)?"Function"===(t=E(e[r]))?e[r](n):"Object"===t?ln(e[r],n):n:"Function"===E(e[r])?e[r](n):n},n)}function ln(r,n){if(1===arguments.length)return function(n){return ln(r,n)};var t=E(r),e=E(n);if(e!==t)throw Error("iterableType !== rulesType");if(["Object","Array"].includes(t))return("Object"===e?an:cn)(r,n);throw Error("'iterable' and 'rules' are from wrong type ".concat(t))}function hn(n,r){var t,e={};for(t in r)n(r[t],t,r)&&(e[t]=r[t]);return e}function sn(n,r){for(var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],e=0,u=r.length,i=[];e<u;)(t?n(r[e],e):n(r[e]))&&i.push(r[e]),e++;return i}function T(r,n){if(1===arguments.length)return function(n){return T(r,n)};if(n)return s(n)?sn(r,n,!1):hn(r,n);throw Error("Incorrect iterable input")}function k(n,r){return"string"==typeof n?n.split(1<arguments.length&&void 0!==r?r:"."):n}function I(r,n){if(1===arguments.length)return function(n){return I(r,n)};if(null!=n){for(var t=n,e=0,u=k(r);e<u.length;){if(null==t)return;if(null===t[u[e]])return;t=t[u[e]],e++}return t}}var pn=Object.is||function(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r};var gn=f(function(n,r,t){return function(){return(!0===("boolean"==typeof n?n:n.apply(void 0,arguments))?r:t).apply(void 0,arguments)}});function yn(n,r,t){for(var e=-1,u=n.length,i=((t=u<t?u:t)<0&&(t+=u),u=t<r?0:t-r>>>0,r>>>=0,Array(u));++e<u;)i[e]=n[e+r];return i}function vn(r,n){return 1===arguments.length?function(n){return vn(r,n)}:null!=n&&n.constructor===r||n instanceof r}function F(t,e){return function(n){return function(r){return n(t(r)).map(function(n){return e(n,r)})}}}function dn(r,n){if(1===arguments.length)return function(n){return dn(r,n)};var t=r<0?n.length+r:r;return"[object String]"===Object.prototype.toString.call(n)?n[0|t]||"":n[t]}function mn(n,r,t){t=a(t);return-1===n?t.fill(r,n):t.fill(r,n,n+1)}var bn=f(mn);function wn(n,r,t){return n(t)>n(r)?t:r}var On=f(wn);function jn(n){return n.reduce(function(n,r){return n+r},0)}function En(n){return jn(n)/n.length}function R(r,n){return 1===arguments.length?function(n){return R(r,n)}:Object.assign({},r||{},n||{})}function _(r,t){if(1===arguments.length)return function(n){return _(r,n)};var e=v(r);return Object.keys(t).forEach(function(n){"Object"===E(t[n])&&"Object"===E(r[n])?e[n]=_(r[n],t[n]):e[n]=t[n]}),e}var An=f(function(r,t,e){var u={};return Object.keys(t).forEach(function(n){u[n]=void 0===e[n]?t[n]:r(t[n],e[n])}),Object.keys(e).forEach(function(n){void 0===u[n]&&(u[n]=void 0===t[n]?e[n]:r(t[n],e[n]))}),u});function Nn(n,r,t){return n(t)<n(r)?t:r}var xn=f(Nn);var Pn=f(function(n,r,t){return!Array.isArray(e=t)&&"Object"!==E(e)||void 0===t[n]?t:s(t)?mn(n,r(t[n]),t):u(u({},t),{},i({},n,r(t[n])));var e});function Sn(n,r,t){n=k(n);if(1===n.length)return u(u({},t),{},i({},n[0],r(t[n[0]])));if(void 0===I(n,t))return t;r=Tn(Array.prototype.slice.call(n,1),r,t[n[0]]);return r===t[n[0]]?t:g(n[0],r,t)}var Tn=f(Sn);var kn=f(function(n,r,t){if(n<0||r<0)throw Error("Rambda.move does not support negative indexes");if(t.length-1<n||t.length-1<r)return t;var e=a(t);return e[n]=t[r],e[r]=t[n],e});function In(r,n){return 1===arguments.length?function(n){return In(r,n)}:r*n}function Fn(n,r){var t;return function(){return n&&(t=n.apply(r||this,arguments),n=null),t}}function Rn(r){return{x:r,map:function(n){return Rn(n(r))}}}var _n=f(function(n,r,t){return n(function(n){return Rn(r(n))})(t).x});function Wn(e){for(var n=arguments.length,u=Array(1<n?n-1:0),r=1;r<n;r++)u[r-1]=arguments[r];var i=e.length;return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return u.length+r.length<i?Wn.apply(void 0,[e].concat([].concat(u,r))):e.apply(void 0,u.concat(r))}}function qn(t,n){var e={},u={};return Object.entries(n).forEach(function(n){var n=o(n,2),r=n[0],n=n[1];t(n,r)?e[r]=n:u[r]=n}),[e,u]}function Cn(n,r){for(var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],e=[],u=[],i=-1;i++<r.length-1;)((t?n(r[i],i):n(r[i]))?e:u).push(r[i]);return[e,u]}var Bn=f(function(n,r,t){return N(I(n,t),r)});var Ln=f(function(n,r,t){return j(n,I(r,t))});var Un=d(In,1);var Dn=f(function(n,r,t){return!!t&&N(r,S(n,t))});var zn=f(function(n,r,t){return vn(n,t[r])});var Mn=f(function(n,r,t){return t?j(n,t[r]):n});var Hn=f(function(n,r,t){return n(S(r,t))});function $n(r,n){if(1===arguments.length)return function(n){return $n(r,n)};if(Number.isNaN(+(""+r))||Number.isNaN(+(""+n)))throw new TypeError("Both arguments to range must be numbers");if(n<r)return[];for(var t=n-r,e=Array(t),u=0;u<t;u++)e[u]=r+u;return e}var Gn=f(function(n,r,t){return t.replace(n,r)});var Jn=f(function(n,r,t){return _n(n,z(r),t)});var Kn=f(function(n,r,t){return t.slice(n,r)});function W(r,n){return 1===arguments.length?function(n){return W(r,n)}:r<0?n.slice():"string"==typeof n?n.slice(0,r):yn(n,0,r)}function Qn(n){return["Promise","Function"].includes(E(n))}function Vn(r){return{x:r,map:function(n){return Vn(r)}}}var Xn=f(function(n,r,t){return n(t)?r(t):t});var Yn=f(function(t,n,e){return W((e.length<n.length?e:n).length,n).map(function(n,r){return t(n,e[r])})});n.F=function(){return!1},n.T=function(){return!0},n.__findHighestArity=c,n._arity=J,n._indexOf=A,n._lastIndexOf=Z,n._pipe=K,n.add=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:+(""+t)+ +(""+n)},n.adjust=D,n.all=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0;e<n.length;e++)if(!t(n[e]))return!1;return!0},n.allPass=function(r){return function(){for(var n=0;n<r.length;){if(!r[n].apply(r,arguments))return!1;n++}return!0}},n.always=z,n.and=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t&&n},n.any=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0;e<n.length;){if(t(n[e],e))return!0;e++}return!1},n.anyPass=function(r){return function(){for(var n=0;n<r.length;){if(r[n].apply(r,arguments))return!0;n++}return!1}},n.append=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof n)return n.split("").concat(t);n=a(n);return n.push(t),n},n.apply=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t.apply(this,n)},n.applySpec=function(n){var r=c(n);if(0===r)return function(){return{}};for(var t=arguments.length,e=Array(1<t?t-1:0),u=1;u<t;u++)e[u-1]=arguments[u];return function u(i,o,f){var n=o-f.length;if(1==n)return function(n){return u(i,o,p.apply(void 0,h(f).concat([n])))};if(2==n)return function(n,r){return u(i,o,p.apply(void 0,h(f).concat([n,r])))};if(3==n)return function(n,r,t){return u(i,o,p.apply(void 0,h(f).concat([n,r,t])))};if(4==n)return function(n,r,t,e){return u(i,o,p.apply(void 0,h(f).concat([n,r,t,e])))};if(4<n)return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return u(i,o,p.apply(void 0,h(f).concat(r)))};if(s(i)){for(var r=[],t=0,e=i.length;t<e;t++)"object"!==l(i[t])&&!s(i[t])||(r[t]=u(i[t],o,f)),"function"==typeof i[t]&&(r[t]=i[t].apply(i,h(f)));return r}var c,a={};for(c in i)0!=i.hasOwnProperty(c)&&"constructor"!==c&&("object"===l(i[c])?a[c]=u(i[c],o,f):"function"==typeof i[c]&&(a[c]=i[c].apply(i,h(f))));return a}(n,r,e)},n.assoc=g,n.assocPath=M,n.bind=function r(e,u){return 1===arguments.length?function(n){return r(e,n)}:t(e.length,function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.apply(u,r)})},n.both=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:function(){return t.apply(void 0,arguments)&&n.apply(void 0,arguments)}},n.chain=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=[]).concat.apply(e,h(n.map(t)))},n.clamp=$,n.clone=v,n.complement=function(n){return function(){return!n.apply(void 0,arguments)}},n.compose=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return Q.apply(this,Array.prototype.slice.call(arguments,0).reverse())},n.concat=m,n.cond=function(n){return function(t){var e,u=!1;return n.forEach(function(n){var n=o(n,2),r=n[0],n=n[1];!u&&r(t)&&(u=!0,e=n(t))}),e}},n.converge=function r(e,n){return 1===arguments.length?function(n){return r(e,n)}:t(d(function(n,r){return Y(n,r.length)},0,n),function(){var r=arguments,t=this;return e.apply(this,O(function(n){return n.apply(t,r)},n))})},n.count=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:s(n)?n.filter(function(n){return t(n)}).length:0},n.countBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e={};return n.forEach(function(n){n=t(n),e[n]?e[n]++:e[n]=1}),e},n.curry=f,n.curryN=t,n.dec=function(n){return n-1},n.defaultTo=j,n.difference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:on(t).filter(function(n){return!x(n,e)})},n.dissoc=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null==n)return{};var e,u={};for(e in n)u[e]=n[e];return delete u[t],u},n.divide=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t/n},n.drop=P,n.dropLast=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:0<t?n.slice(0,-t):n.slice()},n.dropLastWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(0===n.length)return n;var e=s(n);if("function"!=typeof t)throw Error("'predicate' is from wrong type ".concat(l(t)));if(!e&&"string"!=typeof n)throw Error("'iterable' is from wrong type ".concat(l(n)));for(var u=!1,i=[],o=n.length;0<o;)o--,u||!1!==t(n[o])?u&&i.push(n[o]):(u=!0,i.push(n[o]));return e?i.reverse():i.reverse().join("")},n.dropRepeats=function(n){if(!s(n))throw Error("".concat(n," is not a list"));var t=[];return n.reduce(function(n,r){return N(n,r)||t.push(r),r},void 0),t},n.dropRepeatsWith=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!s(n))throw Error("".concat(n," is not a list"));var e=[];return n.reduce(function(n,r){return void 0!==n&&t(n,r)||e.push(r),r},void 0),e},n.dropWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=s(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=!1,i=[],o=-1;o++<n.length-1;)u?i.push(n[o]):t(n[o])||(u=u||!0,i.push(n[o]));return e?i:i.join("")},n.either=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:function(){return!(!t.apply(void 0,arguments)&&!n.apply(void 0,arguments))}},n.endsWith=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof e)return e.endsWith(t);if(!s(t))return!1;var u=e.length-t.length,i=!0;return t.filter(function(n,r){return!!i&&((n=N(n,e[r+u]))||(i=!1),n)}).length===t.length},n.eqProps=fn,n.equals=N,n.evolve=ln,n.evolveArray=cn,n.evolveObject=an,n.filter=T,n.filterArray=sn,n.filterObject=hn,n.find=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0,u=n.length;e<u;){var i=n[e];if(t(i))return i;e++}},n.findIndex=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=n.length,u=-1;++u<e;)if(t(n[u]))return u;return-1},n.findLast=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=n.length;0<=--e;)if(t(n[e]))return n[e]},n.findLastIndex=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=n.length;0<=--e;)if(t(n[e]))return e;return-1},n.flatten=function n(r,t){for(var e=void 0===t?[]:t,u=0;u<r.length;u++)s(r[u])?n(r[u],e):e.push(r[u]);return e},n.flip=function(n){return e=n,function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];if(1===r.length)return function(n){return e(n,r[0])};if(2===r.length)return e(r[1],r[0]);if(3===r.length)return e(r[1],r[0],r[2]);if(4===r.length)return e(r[1],r[0],r[2],r[3]);throw Error("R.flip doesn't work with arity > 4")};var e},n.forEach=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(void 0!==n){if(s(n))for(var e=0,u=n.length;e<u;)t(n[e]),e++;else for(var i=0,o=V(n),f=o.length;i<f;){var c=o[i];t(n[c],c,n),i++}return n}},n.fromPairs=function(n){var r={};return n.forEach(function(n){n=o(n,2);return r[n[0]]=n[1]}),r},n.groupBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e={},u=0;u<n.length;u++){var i=n[u],o=t(i);e[o]||(e[o]=[]),e[o].push(i)}return e},n.groupWith=function(i,o){if(!s(o))throw new TypeError("list.reduce is not a function");var n=a(o);if(1===o.length)return[n];var f=[],c=[];return n.reduce(function(n,r,t){var e,u;return 0!==t&&(e=i(n,r),u=0===c.length,t=t===o.length-1,e?(u&&c.push(n),c.push(r),t&&f.push(c)):u?(f.push([n]),t&&f.push([r])):(f.push(c),t&&f.push([r]),c=[])),r},void 0),f},n.has=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:!!n&&n.hasOwnProperty(t)},n.hasPath=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:void 0!==I(t,n)},n.head=function(n){return"string"==typeof n?n[0]||"":n[0]},n.identical=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:pn(t,n)},n.identity=function(n){return n},n.ifElse=gn,n.inc=function(n){return n+1},n.includes=x,n.indexBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof t){for(var e=t,u=n,i={},o=0;o<u.length;o++){var f=u[o];i[I(e,f)]=f}return i}for(var c={},a=0;a<n.length;a++){var l=n[a];c[t(l)]=l}return c},n.indexOf=function(r,n){return 1===arguments.length?function(n){return A(r,n)}:A(r,n)},n.init=function(n){return"string"==typeof n?n.slice(0,-1):n.length?yn(n,0,-1):[]},n.intersection=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:T(function(n){return x(n,t)},n)},n.intersperse=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=-1,u=n.length,i=[];++e<u;)e===u-1?i.push(n[e]):i.push(n[e],t);return i},n.is=vn,n.isEmpty=function(n){var r=E(n);return!["Undefined","NaN","Number","Null"].includes(r)&&(!n||("Object"===r?0===Object.keys(n).length:"Array"===r&&0===n.length))},n.isNil=function(n){return null==n},n.join=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n.join(t)},n.juxt=function(e){return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.map(function(n){return n.apply(void 0,r)})}},n.keys=function(n){return Object.keys(n)},n.last=function(n){return"string"==typeof n?n[n.length-1]||"":n[n.length-1]},n.lastIndexOf=function(r,n){return 1===arguments.length?function(n){return Z(r,n)}:Z(r,n)},n.length=function(n){return s(n)||"string"==typeof n?n.length:NaN},n.lens=F,n.lensIndex=function(n){return F(dn(n),bn(n))},n.lensPath=function(n){return F(I(n),M(n))},n.lensProp=function(n){return F(S(n),g(n))},n.map=O,n.mapArray=b,n.mapObjIndexed=X,n.mapObject=w,n.match=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};n=n.match(t);return null===n?[]:n},n.mathMod=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:y(t)&&y(n)&&1<=n?(t%n+n)%n:NaN},n.max=Y,n.maxBy=On,n.maxByFn=wn,n.mean=En,n.median=function(n){if(0===(t=n.length))return NaN;var r=2-t%2,t=(t-r)/2;return En(Array.prototype.slice.call(n,0).sort(function(n,r){return n===r?0:n<r?-1:1}).slice(t,t+r))},n.merge=R,n.mergeAll=function(n){var r={};return O(function(n){r=R(r,n)},n),r},n.mergeDeepRight=_,n.mergeLeft=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:R(n,t)},n.mergeRight=R,n.mergeWith=An,n.min=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n<t?n:t},n.minBy=xn,n.minByFn=Nn,n.modify=Pn,n.modifyPath=Tn,n.modifyPathFn=Sn,n.modulo=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t%n},n.move=kn,n.multiply=In,n.negate=function(n){return-n},n.none=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=0;e<n.length;e++)if(t(n[e]))return!1;return!0},n.not=function(n){return!n},n.nth=dn,n.objOf=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:i({},t,n)},n.of=function(n){return[n]},n.omit=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null!=n){var e,u=k(t,","),i={};for(e in n)u.includes(e)||(i[e]=n[e]);return i}},n.on=function t(e,u,r,n){return 3===arguments.length?function(n){return t(e,u,r,n)}:2===arguments.length?function(n,r){return t(e,u,n,r)}:e(u(r),u(n))},n.once=function(n,r){return 1===arguments.length?f(Fn(n,r)):Fn(n,r)},n.or=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t||n},n.over=_n,n.partial=Wn,n.partialObject=function(r,t){return function(n){return r(_(n,t))}},n.partition=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:(s(n)?Cn:qn)(t,n)},n.partitionArray=Cn,n.partitionObject=qn,n.path=I,n.pathEq=Bn,n.pathOr=Ln,n.paths=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:t.map(function(n){return I(n,e)})},n.pick=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null!=n){for(var e=k(t,","),u={},i=0;i<e.length;)e[i]in n&&(u[e[i]]=n[e[i]]),i++;return u}},n.pickAll=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(null!=n){for(var e=k(t,","),u={},i=0;i<e.length;)u[e[i]]=e[i]in n?n[e[i]]:void 0,i++;return u}},n.pipe=Q,n.pluck=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=[];return O(function(n){void 0!==n[t]&&e.push(n[t])},n),e},n.prepend=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:[t].concat("string"==typeof n?n.split(""):n)},n.product=Un,n.prop=S,n.propEq=Dn,n.propIs=zn,n.propOr=Mn,n.propSatisfies=Hn,n.props=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if(s(t))return b(function(n){return e[n]},t);throw Error("propsToPick is not a list")},n.range=$n,n.reduce=d,n.reduceFn=r,n.reduceStopper=function(n){return new G(n)},n.reject=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:T(function(n){return!t(n)},n)},n.repeat=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:Array(n).fill(t)},n.replace=Gn,n.reverse=function(n){return"string"==typeof n?n.split("").reverse().join(""):n.slice().reverse()},n.set=Jn,n.slice=Kn,n.sort=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:a(n).sort(t)},n.sortBy=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:a(n).sort(function(n,r){return n=t(n),r=t(r),n===r?0:n<r?-1:1})},n.split=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n.split(t)},n.splitAt=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!n)throw new TypeError("Cannot read property 'slice' of ".concat(n));if(!s(n)&&"string"!=typeof n)return[[],[]];e=n.length+t<0?0:n.length+t,e=(i=(u=t)<0)&&"Function"===E(e)?e():e,u=i||"Function"!==E(u)?u:u();var e,u,i=i?e:u;return[W(i,n),P(i,n)]},n.splitEvery=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(t<1)throw Error("First argument to splitEvery must be a positive integer");for(var e=[],u=0;u<n.length;)e.push(n.slice(u,u+=t));return e},n.splitWhen=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!n)throw new TypeError("Cannot read property 'length' of ".concat(n));for(var e=[],u=[],i=!1,o=-1;o++<n.length-1;)i?u.push(n[o]):t(n[o])?(u.push(n[o]),i=!0):e.push(n[o]);return[e,u]},n.startsWith=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof e)return e.startsWith(t);if(!s(t))return!1;var u=!0;return t.filter(function(n,r){return!!u&&((n=N(n,e[r]))||(u=!1),n)}).length===t.length},n.subtract=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t-n},n.sum=jn,n.symmetricDifference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:m(T(function(n){return!x(n,e)},t),T(function(n){return!x(n,t)},e))},n.tail=function(n){return P(1,n)},n.take=W,n.takeLast=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=n.length;if(t<0)return n.slice();var u=e<t?e:t;return"string"==typeof n?n.slice(e-u):yn(n,u=e-u,e)},n.takeLastWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(0===n.length)return n;for(var e=!1,u=[],i=n.length;!e||0===i;)!1===t(n[--i])?e=!0:e||u.push(n[i]);return s(n)?u.reverse():u.reverse().join("")},n.takeWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=s(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=!0,i=[],o=-1;o++<n.length-1;)t(n[o])?u&&i.push(n[o]):u=u&&!1;return e?i:i.join("")},n.tap=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:(t(n),n)},n.test=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if("string"==typeof t)throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received "'.concat(t,'"'));return-1!=n.search(t)},n.times=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(!y(n)||n<0)throw new RangeError("n must be an integer");return O(t,$n(0,n))},n.toLower=function(n){return n.toLowerCase()},n.toPairs=function(n){return Object.entries(n)},n.toString=function(n){return""+n},n.toUpper=function(n){return n.toUpperCase()},n.transpose=function(n){return n.reduce(function(t,n){return n.forEach(function(n,r){return s(t[r])?t[r].push(n):t.push([n])}),t},[])},n.trim=function(n){return n.trim()},n.tryCatch=function(e,u){if(!Qn(e))throw Error("R.tryCatch | fn '".concat(e,"'"));var i=Qn(u);return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];try{return e.apply(void 0,r)}catch(n){return i?u.apply(void 0,[n].concat(r)):u}}},n.type=E,n.unapply=function(e){return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.call(this,r)}},n.union=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=a(t);return n.forEach(function(n){x(n,t)||e.push(n)}),e},n.uniq=on,n.uniqBy=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=new Set;return n.filter(function(n){return!e.has(t(n))&&(e.add(t(n)),!0)})},n.uniqWith=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=-1,u=[];++e<n.length;){var i=n[e];!function(n,r,t){for(var e=!1,u=-1;++u<t.length&&!e;)n(r,t[u])&&(e=!0);return e}(t,i,u)&&u.push(i)}return u},n.unless=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:function(n){return t(n)?n:e(n)}},n.unwind=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:s(e[t])?b(function(n){return u(u({},e),{},i({},t,n))},e[t]):[e]},n.update=bn,n.updateFn=mn,n.values=function(n){return"Object"!==E(n)?[]:Object.values(n)},n.view=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t(Vn)(n).x},n.when=Xn,n.where=function r(t,n){if(void 0===n)return function(n){return r(t,n)};var e,u,i=!0;for(e in t)i&&(u=t[e](n[e]),i&&!1===u&&(i=!1));return i},n.whereAny=function r(t,n){if(void 0===n)return function(n){return r(t,n)};for(var e in t)if(t[e](n[e]))return!0;return!1},n.whereEq=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};var n=T(function(n,r){return N(n,e[r])},t);return Object.keys(n).length===Object.keys(t).length},n.without=function r(t,n){return void 0===n?function(n){return r(t,n)}:d(function(n,r){return-1<A(r,t)?n:n.concat(r)},[],n)},n.xor=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:!!t&&!n||!!n&&!t},n.zip=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};for(var e=[],u=Math.min(t.length,n.length),i=0;i<u;i++)e[i]=[t[i],n[i]];return e},n.zipObj=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:W(e.length,t).reduce(function(n,r,t){return n[r]=e[t],n},{})},n.zipWith=Yn,Object.defineProperty(n,"__esModule",{value:!0})});
{
"name": "rambda",
"version": "7.2.1",
"version": "7.3.0",
"scripts": {
"publishx": "node files/publish",
"populatedocs": "cd ../rambda-scripts && yarn populate:docs",

@@ -27,16 +28,18 @@ "populatedocs:x": "cd ../rambda-scripts && yarn populate:docs:rambdax",

"new": "cd ../rambda-scripts && yarn new",
"test:all": "jest source -u --bail=false",
"test": "jest -o --watch",
"cover:spec": "jest source --coverage --no-cache -w 1",
"cover": "yarn typings && yarn cover:spec",
"run:ramda:test": "cd ../rambda-scripts && yarn run:ramda:test",
"consume-typings:clone": "cd .. && git clone --depth 1 https://github.com/selfrefactor/rambda-scripts.git rambda-scripts-clone",
"consume-typings:execute": "cd ../rambda-scripts-clone/scripts/consume-typings && yarn start",
"consume-typings": "yarn consume-typings:clone && yarn consume-typings:execute",
"test:consume-typings": "jest source/_consumeTypings.test.js",
"test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
"test:all": "jest source/*.spec.js -u --bail=false",
"test": "jest -o -u --watch",
"test:ci": "jest source/*.spec.js --coverage --no-cache -w 1",
"build:step": "yarn populatedocs && yarn populatereadme && yarn build:main",
"benchmark:all": "yarn build:step && cd ../rambda-scripts && yarn benchmark:all",
"benchmark:check": "yarn build:step && METHOD=compose yarn benchmark:check:apply",
"benchmark:check:apply": "cd ../rambda-scripts && yarn check-benchmark",
"benchmark:check": "yarn build:step && METHOD=compose yarn benchmark:check:apply",
"benchmark:single": "cd ../rambda-scripts && METHOD=uniqWith RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark",
"benchmark:all": "yarn build:step && cd ../rambda-scripts && yarn benchmark:all",
"benchmark": "yarn build:step && yarn benchmark:single",
"typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source",
"benchmark": "cd ../rambda-scripts && RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark",
"d:rambda-scripts": "cd ../rambda-scripts && run d",
"d": "yarn out && yarn lint && run d && yarn d:rambda-scripts",
"fix": "mkdir $HOME/.dts/perf -p"
"d": "yarn out && yarn lint && run d && yarn d:rambda-scripts"
},

@@ -73,3 +76,3 @@ "dependencies": {},

"testEnvironment": "node",
"testRegex": ".*\\.spec\\.js$",
"testRegex": ".*\\.(spec|test)\\.js$",
"setupFilesAfterEnv": [

@@ -76,0 +79,0 @@ "./files/testSetup.js"

import { type } from '../type.js'
import { _isArray } from './_isArray.js'
import { isArray } from './isArray.js'
export function isFalsy(x){
if (_isArray(x)){
if (isArray(x)){
return x.length === 0

@@ -7,0 +7,0 @@ }

import { type } from '../type.js'
export function _isObject(input){
export function isObject(input){
return type(input) === 'Object'
}
import { type } from '../type.js'
import { _isArray } from './_isArray.js'
import { isArray } from './isArray.js'
export function isTruthy(x){
if (_isArray(x)){
if (isArray(x)){
return x.length > 0

@@ -7,0 +7,0 @@ }

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -77,3 +77,3 @@ // recursively traverse the given spec object to find the highest arity function

// handle spec as Array
if (_isArray(spec)){
if (isArray(spec)){
const ret = []

@@ -84,3 +84,3 @@ let i = 0

// handle recursive spec inside array
if (typeof spec[ i ] === 'object' || _isArray(spec[ i ])){
if (typeof spec[ i ] === 'object' || isArray(spec[ i ])){
ret[ i ] = __applySpecWithArity(

@@ -87,0 +87,0 @@ spec[ i ], arity, cache

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

import { _isArray } from './_internals/_isArray.js'
import { _isInteger } from './_internals/_isInteger.js'
import { cloneList } from './_internals/cloneList.js'
import { isArray } from './_internals/isArray.js'
import { isInteger } from './_internals/isInteger.js'
import { assoc } from './assoc.js'

@@ -12,3 +12,3 @@ import { curry } from './curry.js'

typeof path === 'string' ?
path.split('.').map(x => _isInteger(Number(x)) ? Number(x) : x) :
path.split('.').map(x => isInteger(Number(x)) ? Number(x) : x) :
path

@@ -26,4 +26,4 @@ if (pathArrValue.length === 0){

const nextinput = condition ?
_isInteger(pathArrValue[ 1 ]) ?
const nextInput = condition ?
isInteger(pathArrValue[ 1 ]) ?
[] :

@@ -36,7 +36,7 @@ {} :

newValue,
nextinput
nextInput
)
}
if (_isInteger(index) && _isArray(input)){
if (isInteger(index) && isArray(input)){
const arr = cloneList(input)

@@ -43,0 +43,0 @@ arr[ index ] = newValue

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
export function clone(input){
const out = _isArray(input) ? Array(input.length) : {}
const out = isArray(input) ? Array(input.length) : {}
if (input && input.getTime) return new Date(input.getTime())

@@ -6,0 +6,0 @@

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -7,5 +7,5 @@ export function count(predicate, list){

}
if (!_isArray(list)) return 0
if (!isArray(list)) return 0
return list.filter(x => predicate(x)).length
}

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

import { _isArray } from './_internals/_isArray.js'
import { isArray as isArrayMethod } from './_internals/isArray.js'

@@ -8,3 +8,3 @@ export function dropLastWhile(predicate, iterable){

if (iterable.length === 0) return iterable
const isArray = _isArray(iterable)
const isArray = isArrayMethod(iterable)

@@ -11,0 +11,0 @@ if (typeof predicate !== 'function'){

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { equals } from './equals.js'
export function dropRepeats(list){
if (!_isArray(list)){
if (!isArray(list)){
throw new Error(`${ list } is not a list`)

@@ -7,0 +7,0 @@ }

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -8,3 +8,3 @@ export function dropRepeatsWith(predicate, list){

if (!_isArray(list)){
if (!isArray(list)){
throw new Error(`${ list } is not a list`)

@@ -11,0 +11,0 @@ }

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

import { _isArray } from '../src/_internals/_isArray.js'
import { isArray as isArrayMethod } from './_internals/isArray.js'

@@ -7,3 +7,3 @@ export function dropWhile(predicate, iterable){

}
const isArray = _isArray(iterable)
const isArray = isArrayMethod(iterable)
if (!isArray && typeof iterable !== 'string'){

@@ -10,0 +10,0 @@ throw new Error('`iterable` is neither list nor a string')

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { equals } from './equals.js'

@@ -10,3 +10,3 @@

}
if (!_isArray(target)) return false
if (!isArray(target)) return false

@@ -13,0 +13,0 @@ const diff = iterable.length - target.length

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { type } from './type.js'
export function _lastIndexOf(valueToFind, list){
if (!_isArray(list)){
if (!isArray(list)){
throw new Error(`Cannot read property 'indexOf' of ${ list }`)

@@ -26,3 +26,3 @@ }

export function _indexOf(valueToFind, list){
if (!_isArray(list)){
if (!isArray(list)){
throw new Error(`Cannot read property 'indexOf' of ${ list }`)

@@ -29,0 +29,0 @@ }

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { mapArray, mapObject } from './map.js'

@@ -3,0 +3,0 @@ import { type } from './type.js'

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -45,3 +45,3 @@ export function filterObject(predicate, obj){

if (_isArray(iterable)) return filterArray(
if (isArray(iterable)) return filterArray(
predicate, iterable, false

@@ -48,0 +48,0 @@ )

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -7,3 +7,3 @@ export function flatten(list, input){

for (let i = 0; i < list.length; i++){
if (_isArray(list[ i ])){
if (isArray(list[ i ])){
flatten(list[ i ], willReturn)

@@ -10,0 +10,0 @@ } else {

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

import { _isArray } from './_internals/_isArray.js'
import { _keys } from './_internals/_keys.js'
import { isArray } from './_internals/isArray.js'
import { keys } from './_internals/keys.js'

@@ -11,3 +11,3 @@ export function forEach(fn, list){

if (_isArray(list)){
if (isArray(list)){
let index = 0

@@ -22,7 +22,7 @@ const len = list.length

let index = 0
const keys = _keys(list)
const len = keys.length
const listKeys = keys(list)
const len = listKeys.length
while (index < len){
const key = keys[ index ]
const key = listKeys[ index ]
fn(

@@ -29,0 +29,0 @@ list[ key ], key, list

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

import { _isArray } from './_internals/_isArray.js'
import { cloneList } from './_internals/cloneList.js'
import { isArray } from './_internals/isArray.js'
export function groupWith(compareFn, list){
if (!_isArray(list)) throw new TypeError('list.reduce is not a function')
if (!isArray(list)) throw new TypeError('list.reduce is not a function')

@@ -7,0 +7,0 @@ const clone = cloneList(list)

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

import _objectIs from './_internals/_objectIs.js'
import { objectIs } from './_internals/objectIs.js'

@@ -6,3 +6,3 @@ export function identical(a, b){

return _objectIs(a, b)
return objectIs(a, b)
}

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { _indexOf } from './equals.js'

@@ -13,5 +13,5 @@

}
if (!_isArray(iterable)) return false
if (!isArray(iterable)) return false
return _indexOf(valueToFind, iterable) > -1
}
import { type } from './type.js'
export function isPromise(x){
return [ 'Async', 'Promise' ].includes(type(x))
return 'Promise' === type(x)
}

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
export function length(x){
if (_isArray(x)) return x.length
if (isArray(x)) return x.length
if (typeof x === 'string') return x.length

@@ -6,0 +6,0 @@

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

import { _isArray } from './_internals/_isArray.js'
import { _keys } from './_internals/_keys.js'
import { isArray } from './_internals/isArray.js'
import { keys } from './_internals/keys.js'

@@ -24,8 +24,8 @@ export function mapArray(

let index = 0
const keys = _keys(obj)
const len = keys.length
const objKeys = keys(obj)
const len = objKeys.length
const willReturn = {}
while (index < len){
const key = keys[ index ]
const key = objKeys[ index ]
willReturn[ key ] = fn(

@@ -45,8 +45,8 @@ obj[ key ], key, obj

if (!iterable){
throw new Error('Incorrect iterable input')
throw new Error(INCORRECT_ITERABLE_INPUT)
}
if (_isArray(iterable)) return mapArray(fn, iterable)
if (isArray(iterable)) return mapArray(fn, iterable)
return mapObject(fn, iterable)
}

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

import _isInteger from './_internals/_isInteger.js'
import { isInteger } from './_internals/isInteger.js'
export function mathMod(x, y){
if (arguments.length === 1) return _y => mathMod(x, _y)
if (!_isInteger(x) || !_isInteger(y) || y < 1) return NaN
if (!isInteger(x) || !isInteger(y) || y < 1) return NaN
return (x % y + y) % y
}

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

export {mergeRight as merge} from './mergeRight.js'
export { mergeRight as merge } from './mergeRight.js'

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

import { clone } from './clone.js'
import { type } from './type.js'

@@ -8,3 +9,3 @@

const willReturn = JSON.parse(JSON.stringify(target))
const willReturn = clone(target)

@@ -11,0 +12,0 @@ Object.keys(source).forEach(key => {

export function mergeRight(target, newProps){
if (arguments.length === 1) return _newProps => mergeRight(target, _newProps)
if (arguments.length === 1)
return _newProps => mergeRight(target, _newProps)

@@ -4,0 +5,0 @@ return Object.assign(

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

import { _isArray } from './_internals/_isArray.js'
import { createPath } from './_internals/createPath.js'
import { isArray } from './_internals/isArray.js'
import { assoc } from './assoc.js'

@@ -14,3 +14,3 @@ import { curry } from './curry.js'

...object,
[ path[0] ] : fn(object[ path[0] ]),
[ path[ 0 ] ] : fn(object[ path[ 0 ] ]),
}

@@ -17,0 +17,0 @@ }

import { mergeDeepRight } from './mergeDeepRight.js'
import { type } from './type.js'
export function partialObject(fn, input){
return rest => {
if (type(fn) === 'Async'){
return new Promise((resolve, reject) => {
fn(mergeDeepRight(rest, input)).then(resolve)
.catch(reject)
})
}
return fn(mergeDeepRight(rest, input))
}
return nextInput => fn(mergeDeepRight(nextInput, input))
}

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -41,5 +41,5 @@ export function partitionObject(predicate, iterable){

}
if (!_isArray(iterable)) return partitionObject(predicate, iterable)
if (!isArray(iterable)) return partitionObject(predicate, iterable)
return partitionArray(predicate, iterable)
}

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { mapArray } from './map.js'

@@ -8,3 +8,3 @@

}
if (!_isArray(propsToPick)){
if (!isArray(propsToPick)){
throw new Error('propsToPick is not a list')

@@ -11,0 +11,0 @@ }

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

import { _isArray } from './_internals/_isArray.js'
import { _keys } from './_internals/_keys.js'
import { isArray } from './_internals/isArray.js'
import { curry } from './curry.js'

@@ -14,3 +13,3 @@

){
if (!_isArray(list)){
if (!isArray(list)){
throw new TypeError('reduce: list must be array or iterable')

@@ -17,0 +16,0 @@ }

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { drop } from './drop.js'

@@ -12,3 +12,3 @@ import { maybe } from './maybe.js'

if (!_isArray(input) && typeof input !== 'string') return [ [], [] ]
if (!isArray(input) && typeof input !== 'string') return [ [], [] ]

@@ -15,0 +15,0 @@ const correctIndex = maybe(

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { equals } from './equals.js'

@@ -11,3 +11,3 @@

}
if (!_isArray(target)) return false
if (!isArray(target)) return false

@@ -14,0 +14,0 @@ let correct = true

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -21,3 +21,3 @@ export function takeLastWhile(predicate, input){

return _isArray(input) ? toReturn.reverse() : toReturn.reverse().join('')
return isArray(input) ? toReturn.reverse() : toReturn.reverse().join('')
}

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

import { _isArray } from '../src/_internals/_isArray.js'
import { isArray as isArrayModule } from './_internals/isArray.js'

@@ -7,3 +7,3 @@ export function takeWhile(predicate, iterable){

}
const isArray = _isArray(iterable)
const isArray = isArrayModule(iterable)
if (!isArray && typeof iterable !== 'string'){

@@ -10,0 +10,0 @@ throw new Error('`iterable` is neither list nor a string')

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

import { isInteger } from './_internals/isInteger.js'
import { map } from './map.js'

@@ -6,3 +7,3 @@ import { range } from './range.js'

if (arguments.length === 1) return _howMany => times(fn, _howMany)
if (!Number.isInteger(howMany) || howMany < 0){
if (!isInteger(howMany) || howMany < 0){
throw new RangeError('n must be an integer')

@@ -9,0 +10,0 @@ }

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'

@@ -6,3 +6,3 @@ export function transpose(array){

el.forEach((nestedEl, i) =>
_isArray(acc[ i ]) ? acc[ i ].push(nestedEl) : acc.push([ nestedEl ]))
isArray(acc[ i ]) ? acc[ i ].push(nestedEl) : acc.push([ nestedEl ]))

@@ -9,0 +9,0 @@ return acc

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

import { _isArray } from './_internals/_isArray.js'
import { isArray } from './_internals/isArray.js'
import { mapArray } from './map.js'

@@ -9,3 +9,3 @@

if (!_isArray(obj[ property ])) return [ obj ]
if (!isArray(obj[ property ])) return [ obj ]

@@ -15,3 +15,4 @@ return mapArray(x => ({

[ property ] : x,
}), obj[ property ])
}),
obj[ property ])
}
import { cloneList } from './_internals/cloneList.js'
import { curry } from './curry.js'
function updateFn(
export function updateFn(
index, newValue, list

@@ -6,0 +6,0 @@ ){

@@ -7,2 +7,3 @@ export function where(conditions, input){

for (const prop in conditions){
if (!flag) continue
const result = conditions[ prop ](input[ prop ])

@@ -9,0 +10,0 @@ if (flag && result === false){

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc