Comparing version 8.3.0 to 8.4.0
@@ -0,1 +1,25 @@ | ||
8.4.0 | ||
- Add `R.dissocPath` | ||
- Fix TS definitions of `R.head/R.last` and add missing handle of empty string | ||
- Add `R.removeIndex` - method was before only in `Rambdax`, but now since `R.dissocPath` is using it, it is added to main library. | ||
- Allow `R.omit` to pass numbers as part of properties to omit, i.e. `R.omit(['a', 1], {a: {1: 1, 2: 2}})` | ||
- R.keys always returns strings - [MR #700](https://github.com/selfrefactor/rambda/pull/700) | ||
- Improve `R.prepend/R.append` type interference - [MR #699](https://github.com/selfrefactor/rambda/pull/699) | ||
- Change `R.reduce` TS definitions so index is always received - [MR #696](https://github.com/selfrefactor/rambda/pull/696) | ||
- Functions as a type guard in `R.anyPass` TS definitions - [MR #695](https://github.com/selfrefactor/rambda/pull/695) | ||
- Fix R.append's curried type - [MR #694](https://github.com/selfrefactor/rambda/pull/694) | ||
- Fix cannot compare errors in `Deno` with `R.equals` - [Issue #704](https://github.com/selfrefactor/rambda/issues/704). | ||
- Fix cannot compare `BigInt` with `R.equals` | ||
8.3.0 | ||
@@ -2,0 +26,0 @@ |
@@ -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,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 a(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?a(o-u.length,i(o,u,c)):c.apply(this,u)}}(r,[],n))}function B(u){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return 0},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(n){return n+1};return t(u.length,function(){var r=arguments[0],t=arguments[arguments.length-1],e=i(t.length),n=Array.prototype.slice.call(arguments,0);return n[0]=function(){var n=r.apply(this,function(n,r){for(var t=(n=n||[]).length,e=(r=r||[]).length,u=[],i=0;i<t;)u[u.length]=n[i],i+=1;for(i=0;i<e;)u[u.length]=r[i],i+=1;return u}(arguments,[e,t]));return e=o(e),n},u.apply(this,n)})}function l(n){return Array.prototype.slice.call(n)}function C(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?C(Object(t),!0).forEach(function(n){i(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function h(n){return(h="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 U(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}function _(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,z(e.key),e)}}function D(n,r,t){return r&&_(n.prototype,r),t&&_(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function i(n,r,t){return(r=z(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,f=[],c=!0,a=!1;try{if(i=(t=t.call(n)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(e=i.call(t)).done)&&(f.push(e.value),f.length!==r);c=!0);}catch(n){a=!0,u=n}finally{try{if(!c&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(a)throw u}}return f}}(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 s(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){var t;if(n)return"string"==typeof n?e(n,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(n).slice(8,-1))&&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 z(n){n=function(n,r){if("object"!=typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(n);if("object"!=typeof(t=t.call(n,r||"default")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(n,"string");return"symbol"==typeof n?n:""+n}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(s(i),t)).length<u.length?f(u,n):u.apply(void 0,s(n))}}var M=f(function(n,r,t){var e=n<0?t.length+n:n;return t.length<=n||e<0?t:((n=l(t))[e]=r(n[e]),n)});function H(r){return function(n){return r}}var p=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"===h(n[r])&&(t=Math.max(t,c(n[r]))),"function"==typeof n[r])&&(t=Math.max(t,n[r].length));return t}function g(){for(var n=[],r=0,t=arguments.length;r<t&&void 0!==arguments[r];)n[r]=arguments[r],r++;return n}function v(n,r,t,e){return n===r?0:n<r?t:e}var y=f(function(n,r,t){return Object.assign({},t,i({},n,r))});var d=Number.isInteger||function(n){return n<<0===n};var $=f(function n(r,t,e){var u,i,r="string"==typeof r?r.split(".").map(function(n){return d(+(""+n))?+(""+n):n}):r;return 0===r.length?t:(u=r[0],1<r.length&&(i="object"===h(e)&&null!==e&&e.hasOwnProperty(u)?e[u]:d(r[1])?[]:{},t=n(Array.prototype.slice.call(r,1),t,i)),d(u)&&p(e)?((r=l(e))[u]=t,r):y(u,t,e))});var G=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 m(n){var r,t=p(n)?Array(n.length):{};if(n&&n.getTime)return new Date(n.getTime());for(r in n){var e=n[r];t[r]="object"===h(e)&&null!==e?e.getTime?new Date(e.getTime()):m(e):e}return t}var J=D(function n(r){U(this,n),this.value=r});function K(n,r,t){if(null!=t){if(!p(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 J)return r.value;e++}}return r}var b=f(K);function Q(n,r){return function(){return r.call(this,n.apply(this,arguments))}}function V(){if(0===arguments.length)throw Error("pipe requires at least one argument");return a(arguments[0].length,K(Q,arguments[0],Array.prototype.slice.call(arguments,1,1/0)))}function X(n){return"string"==typeof n?n[0]||"":n[0]}function Y(n){return n}function Z(n){return"string"==typeof n?n.split("").reverse().join(""):n.slice().reverse()}function w(r,n){return 1===arguments.length?function(n){return w(r,n)}:n.slice(0<r?r:0)}function nn(n){return w(1,n)}function rn(t,n){var r,e;return 0<n.length?(r=X(n),e=nn(n),a(r.length,function(){return b(function(n,r){return t.call(this,r,n)},r.apply(this,arguments),e)})):Y}function tn(r,n){return 1===arguments.length?function(n){return tn(r,n)}:"string"==typeof r?"".concat(r).concat(n):[].concat(s(r),s(n))}var en="Incorrect iterable input",un=Object.keys;function j(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 O(r,n){if(1===arguments.length)return function(n){return O(r,n)};for(var t=0,e=un(n),u=e.length,i={};t<u;){var o=e[t];i[o]=r(n[o],o,n),t++}return i}var on=O;function E(r,n){if(1===arguments.length)return function(n){return E(r,n)};if(n)return(p(n)?j:O)(r,n);throw Error(en)}function fn(r,n){return 1===arguments.length?function(n){return fn(r,n)}:r<n?n:r}function A(r,n){return 1===arguments.length?function(n){return A(r,n)}:null==(t=n)||!0===Number.isNaN(t)?r:n;var t}function N(n){return null===n?"Null":void 0===n?"Undefined":Number.isNaN(n)?"NaN":"AsyncFunction"===(n=Object.prototype.toString.call(n).slice(8,-1))?"Promise":n}function cn(n,r){if(!p(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=N(n);if(!["Object","Array","NaN","RegExp"].includes(t))return r.lastIndexOf(n);for(var e=r.length,u=-1;-1<--e&&-1===u;)P(r[e],n)&&(u=e);return u}function x(n,r){if(!p(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=N(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;)P(r[e],n)&&(u=e);return u}function an(n){for(var r,t=[];!(r=n.next()).done;)t.push(r.value);return t}function ln(n){var r=""+n.__proto__;return["Error","TypeError"].includes(r)?[r,n.message]:[]}function hn(n){return n.toDateString?[!0,n.getTime()]:[!1]}function sn(n){return n.constructor!==RegExp?[!1]:[!0,""+n]}function P(t,e){var n,u,i,r,o,f,c;return 1===arguments.length?function(n){return P(t,n)}:(n=N(t))===N(e)&&("Function"===n?void 0!==t.name&&t.name===e.name:!!["NaN","Undefined","Null"].includes(n)||("Number"===n?Object.is(-0,t)===Object.is(-0,e)&&""+t==""+e:["String","Boolean"].includes(n)?""+t==""+e:"Array"===n?""+(r=Array.from(t))==""+(u=Array.from(e))&&(i=!0,r.forEach(function(n,r){!i||n===u[r]||P(n,u[r])||(i=!1)}),i):(r=sn(t),f=sn(e),r[0]?!!f[0]&&r[1]===f[1]:!f[0]&&(r=hn(t),f=hn(e),r[0]?!!f[0]&&r[1]===f[1]:!f[0]&&(r=ln(t),f=ln(e),r[0]?!!f[0]&&r[0]===f[0]&&r[1]===f[1]:"Set"===n?(r=t).size===(f=e).size&&(r=an(r.values()),o=an(f.values()),0===r.filter(function(n){return-1===x(n,o)}).length):"Object"===n&&(f=Object.keys(t)).length===Object.keys(e).length&&(c=!0,f.forEach(function(n){var r;c&&(r=t[n])!==(n=e[n])&&!P(r,n)&&(c=!1)}),c))))))}function k(r,n){if(1===arguments.length)return function(n){return k(r,n)};if("string"==typeof n)return n.includes(r);if(n)return!!p(n)&&-1<x(r,n);throw new TypeError("Cannot read property 'indexOf' of ".concat(n))}var pn=function(){function n(){U(this,n),this.set=new Set,this.items={}}return D(n,[{key:"checkUniqueness",value:function(n){var r=N(n);return["Null","Undefined","NaN"].includes(r)?!(r in this.items)&&(this.items[r]=!0):["Object","Array"].includes(r)?r in this.items?-1===x(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 gn(n){var r=new pn,t=[];return n.forEach(function(n){r.checkUniqueness(n)&&t.push(n)}),t}function vn(t,n,r){var e=[],r=o(r.length<n.length?[n,r]:[r,n],2),n=r[0],u=r[1];return n.forEach(function(r){u.some(function(n){return t(r,n)})||-1!==x(r,e)||e.push(r)}),e}var yn=f(vn);function S(r,n){return 1===arguments.length?function(n){return S(r,n)}:n?n[r]:void 0}var dn=f(function(n,r,t){return P(S(n,r),S(n,t))});function mn(t,n){return j(function(n,r){return"Function"===N(t[r])?t[r](n):n},n,!0)}function bn(e,n){return O(function(n,r){var t;return"Object"===N(n)?"Function"===(t=N(e[r]))?e[r](n):"Object"===t?wn(e[r],n):n:"Function"===N(e[r])?e[r](n):n},n)}function wn(r,n){if(1===arguments.length)return function(n){return wn(r,n)};var t=N(r),e=N(n);if(e!==t)throw Error("iterableType !== rulesType");if(["Object","Array"].includes(t))return("Object"===e?bn:mn)(r,n);throw Error("'iterable' and 'rules' are from wrong type ".concat(t))}function jn(n,r){var t,e={};for(t in r)n(r[t],t,r)&&(e[t]=r[t]);return e}function On(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 p(n)?On(r,n,!1):jn(r,n);throw Error("Incorrect iterable input")}function F(n,r){return"string"==typeof n?n.split(1<arguments.length&&void 0!==r?r:"."):n}function En(n,r){for(var t=r,e=0,u=F(n);e<u.length;){if(null==t)return;if(null===t[u[e]])return;t=t[u[e]],e++}return t}function I(r,n){return 1===arguments.length?function(n){return I(r,n)}:null!=n?En(r,n):void 0}var An=Object.is||function(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r};var Nn=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 xn(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 Pn(r,n){return 1===arguments.length?function(n){return Pn(r,n)}:null!=n&&n.constructor===r||n instanceof r}function r(t,e){return function(n){return function(r){return n(t(r)).map(function(n){return e(n,r)})}}}function kn(r,n){var t;return 1===arguments.length?function(n){return kn(r,n)}:(t=r<0?n.length+r:r,"[object String]"===Object.prototype.toString.call(n)?n[0|t]||"":n[t])}function Sn(n,r,t){t=l(t);return-1===n?t.fill(r,n):t.fill(r,n,n+1)}var Tn=f(Sn);function Fn(n,r,t){return n(t)>n(r)?t:r}var In=f(Fn);function Wn(n){return n.reduce(function(n,r){return n+r},0)}function Rn(n){return Wn(n)/n.length}function W(r,n){return 1===arguments.length?function(n){return W(r,n)}:Object.assign({},r||{},n||{})}function R(r,t){var e;return 1===arguments.length?function(n){return R(r,n)}:(e=m(r),Object.keys(t).forEach(function(n){"Object"===N(t[n])&&"Object"===N(r[n])?e[n]=R(r[n],t[n]):e[n]=t[n]}),e)}var qn=f(function(r,n,t){var e=null!=n?n:{},u=null!=t?t:{},i={};return Object.keys(e).forEach(function(n){i[n]=void 0===u[n]?e[n]:r(e[n],u[n])}),Object.keys(u).forEach(function(n){void 0===i[n]&&(i[n]=void 0===e[n]?u[n]:r(e[n],u[n]))}),i});function Bn(n,r,t){return n(t)<n(r)?t:r}var Cn=f(Bn);var Un=f(function(n,r,t){var e;return!Array.isArray(e=t)&&"Object"!==N(e)||void 0===t[n]?t:p(t)?Sn(n,r(t[n]),t):u(u({},t),{},i({},n,r(t[n])))});function _n(n,r,t){n=F(n);return 1===n.length?u(u({},t),{},i({},n[0],r(t[n[0]]))):void 0===I(n,t)||(r=Dn(Array.prototype.slice.call(n,1),r,t[n[0]]))===t[n[0]]?t:y(n[0],r,t)}var Dn=f(_n);var Ln=f(function(n,r,t){if(n<0||r<0)throw Error("Rambda.move does not support negative indexes");var e;return t.length-1<n||t.length-1<r?t:((e=l(t))[n]=t[r],e[r]=t[n],e)});function zn(r,n){return 1===arguments.length?function(n){return zn(r,n)}:r*n}function Mn(n,r){var t;return function(){return n&&(t=n.apply(r||this,arguments),n=null),t}}function Hn(r){return{x:r,map:function(n){return Hn(n(r))}}}var $n=f(function(n,r,t){return n(function(n){return Hn(r(n))})(t).x});function Gn(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?Gn.apply(void 0,[e].concat([].concat(u,r))):e.apply(void 0,u.concat(r))}}function Jn(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 Kn(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 Qn=f(function(n,r,t){return P(I(n,t),r)});var Vn=f(function(n,r,t){return A(n,I(r,t))});var Xn=b(zn,1);var Yn=f(function(n,r,t){return!!t&&P(n,S(r,t))});var Zn=f(function(n,r,t){return Pn(n,t[r])});var nr=f(function(n,r,t){return t?A(n,t[r]):n});var rr=f(function(n,r,t){return n(S(r,t))});function tr(r,n){if(1===arguments.length)return function(n){return tr(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 er=f(function(n,r,t){return t.replace(n,r)});var ur=f(function(n,r,t){return $n(n,H(r),t)});var ir=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):xn(n,0,r)}function or(n){return["Promise","Function"].includes(N(n))}function fr(r){return{x:r,map:function(n){return fr(r)}}}var cr=f(function(n,r,t){return n(t)?r(t):t});var ar=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._indexOf=x,n._lastIndexOf=cn,n._pipe=Q,n.add=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:+(""+t)+ +(""+n)},n.addIndex=B,n.addIndexRight=function(n){return B(n,function(n){return n-1},function(n){return n-1})},n.adjust=M,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=H,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.ap=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:t.reduce(function(n,r){return[].concat(s(n),s(e.map(r)))},[])},n.aperture=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(n.length<t)return[];for(var e=0,u=n.length-(t-1),i=Array(u);e<u;)i[e]=n.slice(e,e+t),e+=1;return i},n.append=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:"string"==typeof n?n.split("").concat(t):((n=l(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,g.apply(void 0,s(f).concat([n])))};if(2==n)return function(n,r){return u(i,o,g.apply(void 0,s(f).concat([n,r])))};if(3==n)return function(n,r,t){return u(i,o,g.apply(void 0,s(f).concat([n,r,t])))};if(4==n)return function(n,r,t,e){return u(i,o,g.apply(void 0,s(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,g.apply(void 0,s(f).concat(r)))};if(p(i)){for(var r=[],t=0,e=i.length;t<e;t++)"object"!==h(i[t])&&!p(i[t])||(r[t]=u(i[t],o,f)),"function"==typeof i[t]&&(r[t]=i[t].apply(i,s(f)));return r}var c,a={};for(c in i)0!=i.hasOwnProperty(c)&&"constructor"!==c&&("object"===h(i[c])?a[c]=u(i[c],o,f):"function"==typeof i[c]&&(a[c]=i[c].apply(i,s(f))));return a}(n,r,e)},n.applyTo=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n(t)},n.ascend=function t(e,n,r){return 1===arguments.length?function(n,r){return t(e,n,r)}:v(e(n),e(r),-1,1)},n.assoc=y,n.assocPath=$,n.binary=function(t){return 2<t.length?function(n,r){return t(n,r)}:t},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.call=function(n){for(var r=arguments.length,t=Array(1<r?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];return n.apply(void 0,t)},n.chain=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=[]).concat.apply(e,s(n.map(t)))},n.clamp=G,n.clone=m,n.collectBy=function r(e,n){if(1===arguments.length)return function(n){return r(e,n)};var t,u=b(function(n,r){var t=e(r);return void 0===n[t]&&(n[t]=[]),n[t].push(r),n},{},n),i=[];for(t in u)i.push(u[t]);return i},n.comparator=function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}},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 V.apply(this,Array.prototype.slice.call(arguments,0).reverse())},n.composeWith=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:rn(t,Z(n))},n.concat=tn,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(b(function(n,r){return fn(n,r.length)},0,n),function(){var r=arguments,t=this;return e.apply(this,E(function(n){return n.apply(t,r)},n))})},n.count=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:p(n)?n.filter(function(n){return t(n)}).length:0},n.countBy=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e={},n.forEach(function(n){n=t(n),e[n]?e[n]++:e[n]=1}),e)},n.createCompareFunction=v,n.curry=f,n.curryN=t,n.dec=function(n){return n-1},n.defaultTo=A,n.descend=function t(e,n,r){return 1===arguments.length?function(n,r){return t(e,n,r)}:v(e(n),e(r),1,-1)},n.difference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:gn(t).filter(function(n){return!k(n,e)})},n.differenceWith=yn,n.differenceWithFn=vn,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=w,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=p(n);if("function"!=typeof t)throw Error("'predicate' is from wrong type ".concat(h(t)));if(!e&&"string"!=typeof n)throw Error("'iterable' is from wrong type ".concat(h(n)));for(var u=[],i=n.length;i;){var o=n[--i];if(!t(o)){u.push(o);break}}for(;i;)u.push(n[--i]);return e?u.reverse():u.reverse().join("")},n.dropRepeats=function(n){var t;if(p(n))return t=[],n.reduce(function(n,r){return P(n,r)||t.push(r),r},void 0),t;throw Error("".concat(n," is not a list"))},n.dropRepeatsWith=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e;if(p(n))return e=[],n.reduce(function(n,r){return void 0!==n&&t(n,r)||e.push(r),r},void 0),e;throw Error("".concat(n," is not a list"))},n.dropWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=p(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=[],i=0;i<n.length;){var o=n[i++];if(!t(o)){u.push(o);break}}for(;i<n.length;)u.push(n[i++]);return e?u:u.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){var u,i;return 1===arguments.length?function(n){return r(t,n)}:"string"==typeof e?e.endsWith(t):!!p(t)&&(u=e.length-t.length,i=!0,t.filter(function(n,r){return!!i&&((n=P(n,e[r+u]))||(i=!1),n)}).length===t.length)},n.eqProps=dn,n.equals=P,n.evolve=wn,n.evolveArray=mn,n.evolveObject=bn,n.filter=T,n.filterArray=On,n.filterObject=jn,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++)p(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(p(n))for(var e=0,u=n.length;e<u;)t(n[e]),e++;else for(var i=0,o=un(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){var n,f,c;if(p(o))return n=l(o),1===o.length?[n]:(f=[],c=[],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);throw new TypeError("list.reduce is not a function")},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=X,n.identical=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:An(t,n)},n.identity=Y,n.ifElse=Nn,n.inc=function(n){return n+1},n.includes=k,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 x(r,n)}:x(r,n)},n.init=function(n){return"string"==typeof n?n.slice(0,-1):n.length?xn(n,0,-1):[]},n.intersection=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:T(function(n){return k(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=Pn,n.isEmpty=function(n){var r=N(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 cn(r,n)}:cn(r,n)},n.length=function(n){return p(n)||"string"==typeof n?n.length:NaN},n.lens=r,n.lensIndex=function(n){return r(kn(n),Tn(n))},n.lensPath=function(n){return r(I(n),$(n))},n.lensProp=function(n){return r(S(n),y(n))},n.map=E,n.mapArray=j,n.mapObjIndexed=on,n.mapObject=O,n.match=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:null===(n=n.match(t))?[]:n},n.mathMod=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:d(t)&&d(n)&&1<=n?(t%n+n)%n:NaN},n.max=fn,n.maxBy=In,n.maxByFn=Fn,n.mean=Rn,n.median=function(n){var r,t=n.length;return 0===t?NaN:(r=(t-(t=2-t%2))/2,Rn(Array.prototype.slice.call(n,0).sort(function(n,r){return n===r?0:n<r?-1:1}).slice(r,r+t)))},n.merge=W,n.mergeAll=function(n){var r={};return E(function(n){r=W(r,n)},n),r},n.mergeDeepRight=R,n.mergeLeft=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:W(n,t)},n.mergeRight=W,n.mergeWith=qn,n.min=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n<t?n:t},n.minBy=Cn,n.minByFn=Bn,n.modify=Un,n.modifyPath=Dn,n.modifyPathFn=_n,n.modulo=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t%n},n.move=Ln,n.multiply=zn,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=kn,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=F(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(Mn(n,r)):Mn(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=Gn,n.partialObject=function(r,t){return function(n){return r(R(n,t))}},n.partition=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:(p(n)?Kn:Jn)(t,n)},n.partitionArray=Kn,n.partitionObject=Jn,n.path=I,n.pathEq=Qn,n.pathFn=En,n.pathOr=Vn,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=F(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=F(t,","),u={},i=0;i<e.length;)u[e[i]]=e[i]in n?n[e[i]]:void 0,i++;return u}},n.pipe=V,n.pipeWith=rn,n.pluck=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=[],E(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=Xn,n.prop=S,n.propEq=Yn,n.propIs=Zn,n.propOr=nr,n.propSatisfies=rr,n.props=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if(p(t))return j(function(n){return e[n]},t);throw Error("propsToPick is not a list")},n.range=tr,n.reduce=b,n.reduceFn=K,n.reduceStopper=function(n){return new J(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=er,n.reverse=Z,n.set=ur,n.slice=ir,n.sort=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:l(n).sort(t)},n.sortBy=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:l(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)};var e,u,i;if(n)return p(n)||"string"==typeof n?(u=n.length+t<0?0:n.length+t,u=(e=(i=t)<0)&&"Function"===N(u)?u():u,i=e||"Function"!==N(i)?i:i(),[q(e=e?u:i,n),w(e,n)]):[[],[]];throw new TypeError("Cannot read property 'slice' of ".concat(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){var u;return 1===arguments.length?function(n){return r(t,n)}:"string"==typeof e?e.startsWith(t):!!p(t)&&(u=!0,t.filter(function(n,r){return!!u&&((n=P(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=Wn,n.symmetricDifference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:tn(T(function(n){return!k(n,e)},t),T(function(n){return!k(n,t)},e))},n.tail=nn,n.take=q,n.takeLast=function r(t,n){var e,u;return 1===arguments.length?function(n){return r(t,n)}:(e=n.length,t<0?n.slice():(u=e<t?e:t,"string"==typeof n?n.slice(e-u):xn(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=[],u=n.length;u;){var i=n[--u];if(!t(i))break;e.push(i)}return p(n)?e.reverse():e.reverse().join("")},n.takeWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=p(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=[],i=0;i<n.length;){var o=n[i++];if(!t(o))break;u.push(o)}return e?u:u.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('R.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(!d(n)||n<0)throw new RangeError("n must be an integer");return E(t,tr(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 p(t[r])?t[r].push(n):t.push([n])}),t},[])},n.trim=function(n){return n.trim()},n.tryCatch=function(e,u){var i;if(or(e))return i=or(u),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}};throw Error("R.tryCatch | fn '".concat(e,"'"))},n.type=N,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){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=l(t),n.forEach(function(n){k(n,t)||e.push(n)}),e)},n.uniq=gn,n.uniqBy=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=new pn,n.filter(function(n){return e.checkUniqueness(t(n))}))},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.unnest=function(n){return n.reduce(function(n,r){return[].concat(s(n),Array.isArray(r)?s(r):[r])},[])},n.unwind=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:p(e[t])?j(function(n){return u(u({},e),{},i({},t,n))},e[t]):[e]},n.update=Tn,n.updateFn=Sn,n.values=function(n){return"Object"!==N(n)?[]:Object.values(n)},n.view=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t(fr)(n).x},n.when=cr,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){var n;return 1===arguments.length?function(n){return r(t,n)}:(n=T(function(n,r){return P(n,e[r])},t),Object.keys(n).length===Object.keys(t).length)},n.without=function r(t,n){return void 0===n?function(n){return r(t,n)}:b(function(n,r){return-1<x(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=ar}); | ||
!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,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 a(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?a(o-u.length,i(o,u,c)):c.apply(this,u)}}(r,[],n))}function B(u){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return 0},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(n){return n+1};return t(u.length,function(){var r=arguments[0],t=arguments[arguments.length-1],e=i(t.length),n=Array.prototype.slice.call(arguments,0);return n[0]=function(){var n=r.apply(this,function(n,r){for(var t=(n=n||[]).length,e=(r=r||[]).length,u=[],i=0;i<t;)u[u.length]=n[i],i+=1;for(i=0;i<e;)u[u.length]=r[i],i+=1;return u}(arguments,[e,t]));return e=o(e),n},u.apply(this,n)})}function l(n){return Array.prototype.slice.call(n)}function C(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 o(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach(function(n){f(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function h(n){return(h="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 U(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}function D(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&&D(n.prototype,r),t&&D(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function f(n,r,t){return(r=_(r))in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function i(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,f=[],c=!0,a=!1;try{if(i=(t=t.call(n)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(e=i.call(t)).done)&&(f.push(e.value),f.length!==r);c=!0);}catch(n){a=!0,u=n}finally{try{if(!c&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(a)throw u}}return f}}(n,r)||z(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 s(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)||z(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 z(n,r){var t;if(n)return"string"==typeof n?e(n,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(n).slice(8,-1))&&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 _(n){n=function(n,r){if("object"!=typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(n);if("object"!=typeof(t=t.call(n,r||"default")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(n,"string");return"symbol"==typeof n?n:""+n}function c(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(s(i),t)).length<u.length?c(u,n):u.apply(void 0,s(n))}}var M=c(function(n,r,t){var e=n<0?t.length+n:n;return t.length<=n||e<0?t:((n=l(t))[e]=r(n[e]),n)});function H(r){return function(n){return r}}var p=Array.isArray;function g(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"===h(n[r])&&(t=Math.max(t,g(n[r]))),"function"==typeof n[r])&&(t=Math.max(t,n[r].length));return t}function v(){for(var n=[],r=0,t=arguments.length;r<t&&void 0!==arguments[r];)n[r]=arguments[r],r++;return n}function u(n,r,t,e){return n===r?0:n<r?t:e}function y(n,r,t){return Object.assign({},t,f({},n,r))}var d=c(y);function $(n){return Number.isInteger(+(""+n))}var m=Number.isInteger||function(n){return n<<0===n};function b(n,r){return"string"==typeof n?n.split(1<arguments.length&&void 0!==r?r:".").map(function(n){return m(n)?+(""+n):n}):n}function G(n,r,t){var e,u,n=b(n);return 0===n.length?r:(e=n[0],1<n.length&&(u="object"!==h(t)||null===t||!t.hasOwnProperty(e)?$(n[1])?[]:{}:t[e],r=G(Array.prototype.slice.call(n,1),r,u)),$(e)&&p(t)?((n=l(t))[e]=r,n):y(e,r,t))}var J=c(G);var K=c(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 Q(n){var r,t=p(n)?Array(n.length):{};if(n&&n.getTime)return new Date(n.getTime());for(r in n){var e=n[r];t[r]="object"===h(e)&&null!==e?e.getTime?new Date(e.getTime()):Q(e):e}return t}var V=L(function n(r){U(this,n),this.value=r});function X(n,r,t){if(null!=t){if(!p(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 V)return r.value;e++}}return r}var w=c(X);function Y(n,r){return function(){return r.call(this,n.apply(this,arguments))}}function Z(){if(0===arguments.length)throw Error("pipe requires at least one argument");return a(arguments[0].length,X(Y,arguments[0],Array.prototype.slice.call(arguments,1,1/0)))}function nn(n){return"string"==typeof n?n[0]||"":n[0]}function rn(n){return n}function tn(n){return"string"==typeof n?n.split("").reverse().join(""):n.slice().reverse()}function j(r,n){return 1===arguments.length?function(n){return j(r,n)}:n.slice(0<r?r:0)}function en(n){return j(1,n)}function un(t,n){var r,e;return 0<n.length?(r=nn(n),e=en(n),a(r.length,function(){return w(function(n,r){return t.call(this,r,n)},r.apply(this,arguments),e)})):rn}function on(r,n){return 1===arguments.length?function(n){return on(r,n)}:"string"==typeof r?"".concat(r).concat(n):[].concat(s(r),s(n))}var fn="Incorrect iterable input",cn=Object.keys;function O(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 E(r,n){if(1===arguments.length)return function(n){return E(r,n)};for(var t=0,e=cn(n),u=e.length,i={};t<u;){var o=e[t];i[o]=r(n[o],o,n),t++}return i}var an=E;function A(r,n){if(1===arguments.length)return function(n){return A(r,n)};if(n)return(p(n)?O:E)(r,n);throw Error(fn)}function ln(r,n){return 1===arguments.length?function(n){return ln(r,n)}:r<n?n:r}function N(r,n){return 1===arguments.length?function(n){return N(r,n)}:null==(t=n)||!0===Number.isNaN(t)?r:n;var t}function x(n){return null===n?"Null":void 0===n?"Undefined":Number.isNaN(n)?"NaN":"AsyncFunction"===(n=Object.prototype.toString.call(n).slice(8,-1))?"Promise":n}function hn(n,r){if(!p(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=x(n);if(!["Array","NaN","Object","RegExp"].includes(t))return r.lastIndexOf(n);for(var e=r.length,u=-1;-1<--e&&-1===u;)k(r[e],n)&&(u=e);return u}function P(n,r){if(!p(r))throw Error("Cannot read property 'indexOf' of ".concat(r));var t=x(n);if(!["Array","NaN","Object","RegExp"].includes(t))return r.indexOf(n);for(var e=-1,u=-1,i=r.length;++e<i&&-1===u;)k(r[e],n)&&(u=e);return u}function sn(n){for(var r,t=[];!(r=n.next()).done;)t.push(r.value);return t}function pn(n){return n.toDateString?[!0,n.getTime()]:[!1]}function gn(n){return n.constructor!==RegExp?[!1]:[!0,""+n]}function k(t,e){var n,u,i,r,o,f,c,a;return 1===arguments.length?function(n){return k(t,n)}:(n=x(t))===x(e)&&("Function"===n?void 0!==t.name&&t.name===e.name:!!["NaN","Null","Undefined"].includes(n)||(["BigInt","Number"].includes(n)?Object.is(-0,t)===Object.is(-0,e)&&""+t==""+e:["Boolean","String"].includes(n)?""+t==""+e:"Array"===n?""+(r=Array.from(t))==""+(u=Array.from(e))&&(i=!0,r.forEach(function(n,r){!i||n===u[r]||k(n,u[r])||(i=!1)}),i):(r=gn(t),o=gn(e),r[0]?!!o[0]&&r[1]===o[1]:!o[0]&&(r=pn(t),o=pn(e),r[0]?!!o[0]&&r[1]===o[1]:!o[0]&&(t instanceof Error?e instanceof Error&&(r=t).message===(o=e).message&&r.toString===o.toString&&""+r==""+o:"Set"===n?(o=t).size===(c=e).size&&(o=sn(o.values()),f=sn(c.values()),0===o.filter(function(n){return-1===P(n,f)}).length):"Object"===n&&(c=Object.keys(t)).length===Object.keys(e).length&&(a=!0,c.forEach(function(n){var r;a&&(r=t[n])!==(n=e[n])&&!k(r,n)&&(a=!1)}),a))))))}function S(r,n){if(1===arguments.length)return function(n){return S(r,n)};if("string"==typeof n)return n.includes(r);if(n)return!!p(n)&&-1<P(r,n);throw new TypeError("Cannot read property 'indexOf' of ".concat(n))}var vn=function(){function n(){U(this,n),this.set=new Set,this.items={}}return L(n,[{key:"checkUniqueness",value:function(n){var r=x(n);return["Null","Undefined","NaN"].includes(r)?!(r in this.items)&&(this.items[r]=!0):["Object","Array"].includes(r)?r in this.items?-1===P(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 yn(n){var r=new vn,t=[];return n.forEach(function(n){r.checkUniqueness(n)&&t.push(n)}),t}function dn(t,n,r){var e=[],r=i(r.length<n.length?[n,r]:[r,n],2),n=r[0],u=r[1];return n.forEach(function(r){u.some(function(n){return t(r,n)})||-1!==P(r,e)||e.push(r)}),e}var mn=c(dn);function bn(r,n){if(1===arguments.length)return function(n){return bn(r,n)};if(null!=n){var t,e=b(r,","),u={};for(t in n)!function(n,r){for(var t=-1,e=r.length;++t<e;)if(""+r[t]==""+n)return 1}(t,e)&&(u[t]=n[t]);return u}}function wn(n,r){for(var t=r,e=0,u=b(n);e<u.length;){if(null==t)return;if(null===t[u[e]])return;t=t[u[e]],e++}return t}function T(r,n){return 1===arguments.length?function(n){return T(r,n)}:null!=n?wn(r,n):void 0}function jn(r,n){return 1===arguments.length?function(n){return jn(r,n)}:0<r?r<n.length-1?[].concat(s(n.slice(0,r)),s(n.slice(r+1))):n.slice(0,n.length-1):n.slice(1)}function On(n,r,t){t=l(t);return-1===n?t.fill(r,n):t.fill(r,n,n+1)}var En=c(On);function F(r,n){return 1===arguments.length?function(n){return F(r,n)}:n?n[r]:void 0}var An=c(function(n,r,t){return k(F(n,r),F(n,t))});function Nn(t,n){return O(function(n,r){return"Function"===x(t[r])?t[r](n):n},n,!0)}function xn(e,n){return E(function(n,r){var t;return"Object"===x(n)?"Function"===(t=x(e[r]))?e[r](n):"Object"===t?Pn(e[r],n):n:"Function"===x(e[r])?e[r](n):n},n)}function Pn(r,n){if(1===arguments.length)return function(n){return Pn(r,n)};var t=x(r),e=x(n);if(e!==t)throw Error("iterableType !== rulesType");if(["Object","Array"].includes(t))return("Object"===e?xn:Nn)(r,n);throw Error("'iterable' and 'rules' are from wrong type ".concat(t))}function kn(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 I(r,n){if(1===arguments.length)return function(n){return I(r,n)};if(n)return p(n)?Sn(r,n,!1):kn(r,n);throw Error("Incorrect iterable input")}var Tn=Object.is||function(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r};var Fn=c(function(n,r,t){return function(){return(!0===("boolean"==typeof n?n:n.apply(void 0,arguments))?r:t).apply(void 0,arguments)}});function In(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 Wn(r,n){return 1===arguments.length?function(n){return Wn(r,n)}:null!=n&&n.constructor===r||n instanceof r}function r(t,e){return function(n){return function(r){return n(t(r)).map(function(n){return e(n,r)})}}}function Rn(r,n){var t;return 1===arguments.length?function(n){return Rn(r,n)}:(t=r<0?n.length+r:r,"[object String]"===Object.prototype.toString.call(n)?n[0|t]||"":n[t])}function qn(n,r,t){return n(t)>n(r)?t:r}var Bn=c(qn);function Cn(n){return n.reduce(function(n,r){return n+r},0)}function Un(n){return Cn(n)/n.length}function W(r,n){return 1===arguments.length?function(n){return W(r,n)}:Object.assign({},r||{},n||{})}function R(r,t){var e;return 1===arguments.length?function(n){return R(r,n)}:(e=Q(r),Object.keys(t).forEach(function(n){"Object"===x(t[n])&&"Object"===x(r[n])?e[n]=R(r[n],t[n]):e[n]=t[n]}),e)}var Dn=c(function(r,n,t){var e=null!=n?n:{},u=null!=t?t:{},i={};return Object.keys(e).forEach(function(n){i[n]=void 0===u[n]?e[n]:r(e[n],u[n])}),Object.keys(u).forEach(function(n){void 0===i[n]&&(i[n]=void 0===e[n]?u[n]:r(e[n],u[n]))}),i});function Ln(n,r,t){return n(t)<n(r)?t:r}var zn=c(Ln);var _n=c(function(n,r,t){var e;return!Array.isArray(e=t)&&"Object"!==x(e)||void 0===t[n]?t:p(t)?On(n,r(t[n]),t):o(o({},t),{},f({},n,r(t[n])))});function Mn(n,r,t){n=b(n);return 1===n.length?o(o({},t),{},f({},n[0],r(t[n[0]]))):void 0===T(n,t)||(r=Hn(Array.prototype.slice.call(n,1),r,t[n[0]]))===t[n[0]]?t:d(n[0],r,t)}var Hn=c(Mn);var $n=c(function(n,r,t){if(n<0||r<0)throw Error("Rambda.move does not support negative indexes");var e;return t.length-1<n||t.length-1<r?t:((e=l(t))[n]=t[r],e[r]=t[n],e)});function Gn(r,n){return 1===arguments.length?function(n){return Gn(r,n)}:r*n}function Jn(n,r){var t;return function(){return n&&(t=n.apply(r||this,arguments),n=null),t}}function Kn(r){return{x:r,map:function(n){return Kn(n(r))}}}var Qn=c(function(n,r,t){return n(function(n){return Kn(r(n))})(t).x});function Vn(e){for(var u=e.length,n=arguments.length,r=Array(1<n?n-1:0),t=1;t<n;t++)r[t-1]=arguments[t];var i=1===r.length&&p(r[0])?r[0]:r;return function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return i.length+r.length<u?Vn.apply(void 0,[e].concat([].concat(s(i),r))):e.apply(void 0,s(i).concat(r))}}function Xn(t,n){var e={},u={};return Object.entries(n).forEach(function(n){var n=i(n,2),r=n[0],n=n[1];t(n,r)?e[r]=n:u[r]=n}),[e,u]}function Yn(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 Zn=c(function(n,r,t){return k(T(n,t),r)});var nr=c(function(n,r,t){return N(n,T(r,t))});var rr=w(Gn,1);var tr=c(function(n,r,t){return!!t&&k(n,F(r,t))});var er=c(function(n,r,t){return Wn(n,t[r])});var ur=c(function(n,r,t){return t?N(n,t[r]):n});var ir=c(function(n,r,t){return n(F(r,t))});function or(r,n){if(1===arguments.length)return function(n){return or(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 fr=c(function(n,r,t){return t.replace(n,r)});var cr=c(function(n,r,t){return Qn(n,H(r),t)});var ar=c(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):In(n,0,r)}function lr(n){return["Promise","Function"].includes(x(n))}function hr(r){return{x:r,map:function(n){return hr(r)}}}var sr=c(function(n,r,t){return n(t)?r(t):t});var pr=c(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=g,n._indexOf=P,n._lastIndexOf=hn,n._pipe=Y,n.add=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:+(""+t)+ +(""+n)},n.addIndex=B,n.addIndexRight=function(n){return B(n,function(n){return n-1},function(n){return n-1})},n.adjust=M,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=H,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.ap=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:t.reduce(function(n,r){return[].concat(s(n),s(e.map(r)))},[])},n.aperture=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};if(n.length<t)return[];for(var e=0,u=n.length-(t-1),i=Array(u);e<u;)i[e]=n.slice(e,e+t),e+=1;return i},n.append=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:"string"==typeof n?n.split("").concat(t):((n=l(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=g(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,v.apply(void 0,s(f).concat([n])))};if(2==n)return function(n,r){return u(i,o,v.apply(void 0,s(f).concat([n,r])))};if(3==n)return function(n,r,t){return u(i,o,v.apply(void 0,s(f).concat([n,r,t])))};if(4==n)return function(n,r,t,e){return u(i,o,v.apply(void 0,s(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,v.apply(void 0,s(f).concat(r)))};if(p(i)){for(var r=[],t=0,e=i.length;t<e;t++)"object"!==h(i[t])&&!p(i[t])||(r[t]=u(i[t],o,f)),"function"==typeof i[t]&&(r[t]=i[t].apply(i,s(f)));return r}var c,a={};for(c in i)0!=i.hasOwnProperty(c)&&"constructor"!==c&&("object"===h(i[c])?a[c]=u(i[c],o,f):"function"==typeof i[c]&&(a[c]=i[c].apply(i,s(f))));return a}(n,r,e)},n.applyTo=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n(t)},n.ascend=function t(e,n,r){return 1===arguments.length?function(n,r){return t(e,n,r)}:u(e(n),e(r),-1,1)},n.assoc=d,n.assocFn=y,n.assocPath=J,n.assocPathFn=G,n.binary=function(t){return 2<t.length?function(n,r){return t(n,r)}:t},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.call=function(n){for(var r=arguments.length,t=Array(1<r?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];return n.apply(void 0,t)},n.chain=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=[]).concat.apply(e,s(n.map(t)))},n.clamp=K,n.clone=Q,n.collectBy=function r(e,n){if(1===arguments.length)return function(n){return r(e,n)};var t,u=w(function(n,r){var t=e(r);return void 0===n[t]&&(n[t]=[]),n[t].push(r),n},{},n),i=[];for(t in u)i.push(u[t]);return i},n.comparator=function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}},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 Z.apply(this,Array.prototype.slice.call(arguments,0).reverse())},n.composeWith=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:un(t,tn(n))},n.concat=on,n.cond=function(n){return function(t){var e,u=!1;return n.forEach(function(n){var n=i(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(w(function(n,r){return ln(n,r.length)},0,n),function(){var r=arguments,t=this;return e.apply(this,A(function(n){return n.apply(t,r)},n))})},n.count=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:p(n)?n.filter(function(n){return t(n)}).length:0},n.countBy=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e={},n.forEach(function(n){n=t(n),e[n]?e[n]++:e[n]=1}),e)},n.createCompareFunction=u,n.curry=c,n.curryN=t,n.dec=function(n){return n-1},n.defaultTo=N,n.descend=function t(e,n,r){return 1===arguments.length?function(n,r){return t(e,n,r)}:u(e(n),e(r),1,-1)},n.difference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:yn(t).filter(function(n){return!S(n,e)})},n.differenceWith=mn,n.differenceWithFn=dn,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.dissocPath=function r(t,n){var e,u,i;return 1===arguments.length?function(n){return r(t,n)}:0===(i=b(t)).length||void 0===T(i,n)?n:(e=i[0],u="object"!==h(n)||null===n||!n.hasOwnProperty(e),1<i.length?(u=u?$(i[1])?[]:{}:n[e],i=r(Array.prototype.slice.call(i,1),u,n),p(n)?En(e,i,n):o(o({},n),{},f({},e,i))):p(n)?jn(e,n):bn([e],n))},n.divide=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t/n},n.drop=j,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=p(n);if("function"!=typeof t)throw Error("'predicate' is from wrong type ".concat(h(t)));if(!e&&"string"!=typeof n)throw Error("'iterable' is from wrong type ".concat(h(n)));for(var u=[],i=n.length;i;){var o=n[--i];if(!t(o)){u.push(o);break}}for(;i;)u.push(n[--i]);return e?u.reverse():u.reverse().join("")},n.dropRepeats=function(n){var t;if(p(n))return t=[],n.reduce(function(n,r){return k(n,r)||t.push(r),r},void 0),t;throw Error("".concat(n," is not a list"))},n.dropRepeatsWith=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e;if(p(n))return e=[],n.reduce(function(n,r){return void 0!==n&&t(n,r)||e.push(r),r},void 0),e;throw Error("".concat(n," is not a list"))},n.dropWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=p(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=[],i=0;i<n.length;){var o=n[i++];if(!t(o)){u.push(o);break}}for(;i<n.length;)u.push(n[i++]);return e?u:u.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){var u,i;return 1===arguments.length?function(n){return r(t,n)}:"string"==typeof e?e.endsWith(t):!!p(t)&&(u=e.length-t.length,i=!0,t.filter(function(n,r){return!!i&&((n=k(n,e[r+u]))||(i=!1),n)}).length===t.length)},n.eqProps=An,n.equals=k,n.evolve=Pn,n.evolveArray=Nn,n.evolveObject=xn,n.filter=I,n.filterArray=Sn,n.filterObject=kn,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++)p(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(p(n))for(var e=0,u=n.length;e<u;)t(n[e]),e++;else for(var i=0,o=cn(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=i(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){var n,f,c;if(p(o))return n=l(o),1===o.length?[n]:(f=[],c=[],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);throw new TypeError("list.reduce is not a function")},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!==T(t,n)},n.head=nn,n.identical=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:Tn(t,n)},n.identity=rn,n.ifElse=Fn,n.inc=function(n){return n+1},n.includes=S,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[T(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 P(r,n)}:P(r,n)},n.init=function(n){return"string"==typeof n?n.slice(0,-1):n.length?In(n,0,-1):[]},n.intersection=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:I(function(n){return S(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=Wn,n.isEmpty=function(n){var r=x(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 hn(r,n)}:hn(r,n)},n.length=function(n){return p(n)||"string"==typeof n?n.length:NaN},n.lens=r,n.lensIndex=function(n){return r(Rn(n),En(n))},n.lensPath=function(n){return r(T(n),J(n))},n.lensProp=function(n){return r(F(n),d(n))},n.map=A,n.mapArray=O,n.mapObjIndexed=an,n.mapObject=E,n.match=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:null===(n=n.match(t))?[]: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=ln,n.maxBy=Bn,n.maxByFn=qn,n.mean=Un,n.median=function(n){var r,t=n.length;return 0===t?NaN:(r=(t-(t=2-t%2))/2,Un(Array.prototype.slice.call(n,0).sort(function(n,r){return n===r?0:n<r?-1:1}).slice(r,r+t)))},n.merge=W,n.mergeAll=function(n){var r={};return A(function(n){r=W(r,n)},n),r},n.mergeDeepRight=R,n.mergeLeft=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:W(n,t)},n.mergeRight=W,n.mergeWith=Dn,n.min=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:n<t?n:t},n.minBy=zn,n.minByFn=Ln,n.modify=_n,n.modifyPath=Hn,n.modifyPathFn=Mn,n.modulo=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t%n},n.move=$n,n.multiply=Gn,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=Rn,n.objOf=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:f({},t,n)},n.of=function(n){return[n]},n.omit=bn,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?c(Jn(n,r)):Jn(n,r)},n.or=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t||n},n.over=Qn,n.partial=Vn,n.partialObject=function(r,t){return function(n){return r(R(n,t))}},n.partition=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:(p(n)?Yn:Xn)(t,n)},n.partitionArray=Yn,n.partitionObject=Xn,n.path=T,n.pathEq=Zn,n.pathFn=wn,n.pathOr=nr,n.paths=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:t.map(function(n){return T(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=b(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=b(t,","),u={},i=0;i<e.length;)u[e[i]]=e[i]in n?n[e[i]]:void 0,i++;return u}},n.pipe=Z,n.pipeWith=un,n.pluck=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=[],A(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=rr,n.prop=F,n.propEq=tr,n.propIs=er,n.propOr=ur,n.propSatisfies=ir,n.props=function r(t,e){if(1===arguments.length)return function(n){return r(t,n)};if(p(t))return O(function(n){return e[n]},t);throw Error("propsToPick is not a list")},n.range=or,n.reduce=w,n.reduceFn=X,n.reduceStopper=function(n){return new V(n)},n.reject=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:I(function(n){return!t(n)},n)},n.removeIndex=jn,n.repeat=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:Array(n).fill(t)},n.replace=fr,n.reverse=tn,n.set=cr,n.slice=ar,n.sort=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:l(n).sort(t)},n.sortBy=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:l(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)};var e,u,i;if(n)return p(n)||"string"==typeof n?(u=n.length+t<0?0:n.length+t,u=(e=(i=t)<0)&&"Function"===x(u)?u():u,i=e||"Function"!==x(i)?i:i(),[q(e=e?u:i,n),j(e,n)]):[[],[]];throw new TypeError("Cannot read property 'slice' of ".concat(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){var u;return 1===arguments.length?function(n){return r(t,n)}:"string"==typeof e?e.startsWith(t):!!p(t)&&(u=!0,t.filter(function(n,r){return!!u&&((n=k(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=Cn,n.symmetricDifference=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:on(I(function(n){return!S(n,e)},t),I(function(n){return!S(n,t)},e))},n.tail=en,n.take=q,n.takeLast=function r(t,n){var e,u;return 1===arguments.length?function(n){return r(t,n)}:(e=n.length,t<0?n.slice():(u=e<t?e:t,"string"==typeof n?n.slice(e-u):In(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=[],u=n.length;u;){var i=n[--u];if(!t(i))break;e.push(i)}return p(n)?e.reverse():e.reverse().join("")},n.takeWhile=function r(t,n){if(1===arguments.length)return function(n){return r(t,n)};var e=p(n);if(!e&&"string"!=typeof n)throw Error("`iterable` is neither list nor a string");for(var u=[],i=0;i<n.length;){var o=n[i++];if(!t(o))break;u.push(o)}return e?u:u.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('R.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(!m(n)||n<0)throw new RangeError("n must be an integer");return A(t,or(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 p(t[r])?t[r].push(n):t.push([n])}),t},[])},n.trim=function(n){return n.trim()},n.tryCatch=function(e,u){var i;if(lr(e))return i=lr(u),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}};throw Error("R.tryCatch | fn '".concat(e,"'"))},n.type=x,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){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=l(t),n.forEach(function(n){S(n,t)||e.push(n)}),e)},n.uniq=yn,n.uniqBy=function r(t,n){var e;return 1===arguments.length?function(n){return r(t,n)}:(e=new vn,n.filter(function(n){return e.checkUniqueness(t(n))}))},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.unnest=function(n){return n.reduce(function(n,r){return[].concat(s(n),Array.isArray(r)?s(r):[r])},[])},n.unwind=function r(t,e){return 1===arguments.length?function(n){return r(t,n)}:p(e[t])?O(function(n){return o(o({},e),{},f({},t,n))},e[t]):[e]},n.update=En,n.updateFn=On,n.values=function(n){return"Object"!==x(n)?[]:Object.values(n)},n.view=function r(t,n){return 1===arguments.length?function(n){return r(t,n)}:t(hr)(n).x},n.when=sr,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){var n;return 1===arguments.length?function(n){return r(t,n)}:(n=I(function(n,r){return k(n,e[r])},t),Object.keys(n).length===Object.keys(t).length)},n.without=function r(t,n){return void 0===n?function(n){return r(t,n)}:w(function(n,r){return-1<P(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=pr}); |
212
package.json
{ | ||
"name": "rambda", | ||
"version": "8.3.0", | ||
"scripts": { | ||
"benchmark": "cd ../rambda-scripts && RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark", | ||
"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", | ||
"build": "yarn build:main && yarn build:web", | ||
"build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.mjs", | ||
"build:step": "yarn populatereadme && yarn build:main", | ||
"build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.mjs", | ||
"d": "yarn out && yarn lint && run d", | ||
"docs": "npx docsify-cli init ./docs && yarn fix-docsify", | ||
"fix-docsify": "cd ../rambda-scripts && yarn fix-docsify:rambda", | ||
"git:add": "git add -A", | ||
"github": "cd ../rambda-scripts && yarn github", | ||
"immutable": "cd ../rambda-scripts && yarn immutable:rambda", | ||
"immutable:x": "cd ../rambda-scripts && yarn immutable:rambdax", | ||
"lint": "yarn git:add && yarn lint:staged && yarn git:add", | ||
"lint:all": "cd ../rambda-scripts && yarn lint", | ||
"lint:staged": "cd ../rambda-scripts && yarn lint:staged", | ||
"new": "cd ../rambda-scripts && yarn new", | ||
"out": "yarn populatedocs && yarn populatereadme && yarn immutable && yarn build", | ||
"populatedocs": "cd ../rambda-scripts && yarn populate:docs", | ||
"populatedocs:x": "cd ../rambda-scripts && yarn populate:docs:rambdax", | ||
"populatereadme": "cd ../rambda-scripts && yarn populate:readme", | ||
"populatereadme:x": "cd ../rambda-scripts && yarn populate:readme:rambdax", | ||
"publish:experimental": "node files/publish", | ||
"run:ramda:test": "cd ../rambda-scripts && yarn run:ramda:test", | ||
"test": "jest -o -u --watch", | ||
"test:all": "jest source/*.spec.js -u --bail=false", | ||
"test:ci": "jest source/*.spec.js --coverage --no-cache -w 1", | ||
"test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source", | ||
"usedby": "cd ../rambda-scripts && yarn usedby", | ||
"x": "yarn populatedocs:x && yarn populatereadme:x && yarn immutable:x" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "7.21.8", | ||
"@babel/plugin-proposal-object-rest-spread": "7.20.7", | ||
"@babel/preset-env": "7.21.5", | ||
"@rollup/plugin-babel": "6.0.3", | ||
"@rollup/plugin-commonjs": "25.0.0", | ||
"@rollup/plugin-node-resolve": "15.0.2", | ||
"@rollup/plugin-replace": "5.0.2", | ||
"@types/jest": "29.5.1", | ||
"combinate": "1.1.11", | ||
"cross-env": "7.0.3", | ||
"dtslint": "4.2.1", | ||
"fast-check": "^3.11.0", | ||
"helpers-fn": "1.8.1", | ||
"is-ci": "3.0.1", | ||
"jest": "29.5.0", | ||
"jest-extended": "3.2.4", | ||
"lodash": "4.17.21", | ||
"rambdax": "9.1.1", | ||
"ramda": "0.29.0", | ||
"rollup": "3.22.0", | ||
"rollup-plugin-cleanup": "3.2.1", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"rollup-plugin-uglify": "6.0.4", | ||
"types-ramda": "0.29.2", | ||
"typescript": "5.0.4" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node", | ||
"testRegex": ".*\\.(spec|test)\\.js$", | ||
"setupFilesAfterEnv": [ | ||
"./files/testSetup.js" | ||
], | ||
"collectCoverageFrom": [ | ||
"source/*.js", | ||
"!_internals", | ||
"!benchmarks" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/selfrefactor/rambda.git" | ||
}, | ||
"license": "MIT", | ||
"author": "self_refactor", | ||
"description": "Lightweight and faster alternative to Ramda with included TS definitions", | ||
"keywords": [ | ||
"ramda", | ||
"fp", | ||
"functional", | ||
"utility", | ||
"lodash" | ||
], | ||
"homepage": "https://github.com/selfrefactor/rambda#readme", | ||
"files": [ | ||
"dist", | ||
"src", | ||
"README.md", | ||
"CHANGELOG.md", | ||
"index.d.ts", | ||
"immutable.d.ts", | ||
"rambda.js", | ||
"immutable.js" | ||
], | ||
"sideEffects": false, | ||
"main": "./dist/rambda.js", | ||
"umd": "./dist/rambda.umd.js", | ||
"module": "./rambda.js", | ||
"types": "./index.d.ts" | ||
"name": "rambda", | ||
"version": "8.4.0", | ||
"scripts": { | ||
"benchmark": "cd ../rambda-scripts && RAMBDA_RUN_ALL=ON RAMBDA_RUN_INDEXES=ON yarn benchmark", | ||
"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", | ||
"build": "yarn build:main && yarn build:web", | ||
"build:main": "cross-env NODE_ENV=build rollup -c files/rollup.config.mjs", | ||
"build:step": "yarn populatereadme && yarn build:main", | ||
"build:web": "cross-env NODE_ENV=build rollup -c files/rollup.web.config.mjs", | ||
"d": "yarn out && yarn lint && run d", | ||
"docs": "npx docsify-cli init ./docs && yarn fix-docsify", | ||
"fix-docsify": "cd ../rambda-scripts && yarn fix-docsify:rambda", | ||
"git:add": "git add -A", | ||
"github": "cd ../rambda-scripts && yarn github", | ||
"immutable": "cd ../rambda-scripts && yarn immutable:rambda", | ||
"immutable:x": "cd ../rambda-scripts && yarn immutable:rambdax", | ||
"lint": "yarn git:add && yarn lint:staged && yarn git:add", | ||
"lint:all": "cd ../rambda-scripts && yarn lint", | ||
"lint:staged": "cd ../rambda-scripts && yarn lint:staged", | ||
"new": "cd ../rambda-scripts && yarn new", | ||
"out": "yarn populatedocs && yarn populatereadme && yarn immutable && yarn build", | ||
"before": "yarn out && yarn docs", | ||
"populatedocs": "cd ../rambda-scripts && yarn populate:docs", | ||
"populatedocs:x": "cd ../rambda-scripts && yarn populate:docs:rambdax", | ||
"populatereadme": "cd ../rambda-scripts && yarn populate:readme", | ||
"populatereadme:x": "cd ../rambda-scripts && yarn populate:readme:rambdax", | ||
"run:ramda:test": "cd ../rambda-scripts && yarn run:ramda:test", | ||
"test": "jest -o -u --watch", | ||
"test:all": "jest source/*.spec.js -u --bail=false", | ||
"test:ci": "jest source/*.spec.js --coverage --no-cache -w 1", | ||
"test:typings": "dtslint --localTs ./node_modules/typescript/lib --expectOnly ./source", | ||
"usedby": "cd ../rambda-scripts && yarn usedby", | ||
"x": "yarn populatedocs:x && yarn populatereadme:x && yarn immutable:x" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "7.21.8", | ||
"@babel/plugin-proposal-object-rest-spread": "7.20.7", | ||
"@babel/preset-env": "7.21.5", | ||
"@definitelytyped/dtslint": "0.0.176", | ||
"@rollup/plugin-babel": "6.0.3", | ||
"@rollup/plugin-commonjs": "25.0.0", | ||
"@rollup/plugin-node-resolve": "15.0.2", | ||
"@rollup/plugin-replace": "5.0.2", | ||
"@types/jest": "29.5.1", | ||
"combinate": "1.1.11", | ||
"cross-env": "7.0.3", | ||
"fast-check": "^3.11.0", | ||
"helpers-fn": "1.8.1", | ||
"is-ci": "3.0.1", | ||
"jest": "29.5.0", | ||
"jest-extended": "3.2.4", | ||
"lodash": "4.17.21", | ||
"rambdax": "9.1.1", | ||
"ramda": "0.29.0", | ||
"rollup": "3.22.0", | ||
"rollup-plugin-cleanup": "3.2.1", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"rollup-plugin-uglify": "6.0.4", | ||
"types-ramda": "0.29.2", | ||
"typescript": "5.2.2" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node", | ||
"testRegex": ".*\\.(spec|test)\\.js$", | ||
"setupFilesAfterEnv": [ | ||
"./files/testSetup.js" | ||
], | ||
"collectCoverageFrom": [ | ||
"source/*.js", | ||
"!_internals", | ||
"!benchmarks" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/selfrefactor/rambda.git" | ||
}, | ||
"license": "MIT", | ||
"author": "self_refactor", | ||
"description": "Lightweight and faster alternative to Ramda with included TS definitions", | ||
"keywords": [ | ||
"ramda", | ||
"fp", | ||
"functional", | ||
"utility", | ||
"lodash" | ||
], | ||
"homepage": "https://github.com/selfrefactor/rambda#readme", | ||
"files": [ | ||
"dist", | ||
"src", | ||
"README.md", | ||
"CHANGELOG.md", | ||
"index.d.ts", | ||
"immutable.d.ts", | ||
"rambda.js", | ||
"immutable.js" | ||
], | ||
"sideEffects": false, | ||
"main": "./dist/rambda.js", | ||
"umd": "./dist/rambda.umd.js", | ||
"module": "./rambda.js", | ||
"types": "./index.d.ts" | ||
} |
@@ -48,2 +48,3 @@ /// <reference types="./index.d.ts" /> | ||
export * from './src/dissoc.js' | ||
export * from './src/dissocPath.js' | ||
export * from './src/divide.js' | ||
@@ -151,2 +152,3 @@ export * from './src/drop.js' | ||
export * from './src/reject.js' | ||
export * from './src/removeIndex.js' | ||
export * from './src/repeat.js' | ||
@@ -153,0 +155,0 @@ export * from './src/replace.js' |
@@ -0,3 +1,7 @@ | ||
import { isInteger } from './isInteger.js' | ||
export function createPath(path, delimiter = '.'){ | ||
return typeof path === 'string' ? path.split(delimiter) : path | ||
return typeof path === 'string' ? | ||
path.split(delimiter).map(x => isInteger(x) ? Number(x) : x) : | ||
path | ||
} |
@@ -6,1 +6,6 @@ function _isInteger(n){ | ||
export const isInteger = Number.isInteger || _isInteger | ||
/** | ||
* Check if `index` is integer even if it is a string. | ||
*/ | ||
export const isIndexInteger = index => Number.isInteger(Number(index)) |
import { curry } from './curry.js' | ||
function assocFn( | ||
export function assocFn( | ||
prop, newValue, obj | ||
@@ -5,0 +5,0 @@ ){ |
import { cloneList } from './_internals/cloneList.js' | ||
import { createPath } from './_internals/createPath.js' | ||
import { isArray } from './_internals/isArray.js' | ||
import { isInteger } from './_internals/isInteger.js' | ||
import { assoc } from './assoc.js' | ||
import { isIndexInteger } from './_internals/isInteger.js' | ||
import { assocFn } from './assoc.js' | ||
import { curry } from './curry.js' | ||
function assocPathFn( | ||
export function assocPathFn( | ||
path, newValue, input | ||
){ | ||
const pathArrValue = | ||
typeof path === 'string' ? | ||
path.split('.').map(x => isInteger(Number(x)) ? Number(x) : x) : | ||
path | ||
if (pathArrValue.length === 0){ | ||
return newValue | ||
} | ||
const pathArrValue = createPath(path) | ||
if (pathArrValue.length === 0) return newValue | ||
@@ -26,3 +22,3 @@ const index = pathArrValue[ 0 ] | ||
const nextInput = condition ? | ||
isInteger(pathArrValue[ 1 ]) ? | ||
isIndexInteger(pathArrValue[ 1 ]) ? | ||
[] : | ||
@@ -39,3 +35,3 @@ {} : | ||
if (isInteger(index) && isArray(input)){ | ||
if (isIndexInteger(index) && isArray(input)){ | ||
const arr = cloneList(input) | ||
@@ -47,3 +43,3 @@ arr[ index ] = newValue | ||
return assoc( | ||
return assocFn( | ||
index, newValue, input | ||
@@ -50,0 +46,0 @@ ) |
@@ -5,7 +5,7 @@ import { isArray } from './_internals/isArray.js' | ||
export function _lastIndexOf(valueToFind, list){ | ||
if (!isArray(list)){ | ||
if (!isArray(list)) | ||
throw new Error(`Cannot read property 'indexOf' of ${ list }`) | ||
} | ||
const typeOfValue = type(valueToFind) | ||
if (![ 'Object', 'Array', 'NaN', 'RegExp' ].includes(typeOfValue)) | ||
if (![ 'Array', 'NaN', 'Object', 'RegExp' ].includes(typeOfValue)) | ||
return list.lastIndexOf(valueToFind) | ||
@@ -17,7 +17,5 @@ | ||
while (--index > -1 && foundIndex === -1){ | ||
if (equals(list[ index ], valueToFind)){ | ||
while (--index > -1 && foundIndex === -1) | ||
if (equals(list[ index ], valueToFind)) | ||
foundIndex = index | ||
} | ||
} | ||
@@ -28,7 +26,7 @@ return foundIndex | ||
export function _indexOf(valueToFind, list){ | ||
if (!isArray(list)){ | ||
if (!isArray(list)) | ||
throw new Error(`Cannot read property 'indexOf' of ${ list }`) | ||
} | ||
const typeOfValue = type(valueToFind) | ||
if (![ 'Object', 'Array', 'NaN', 'RegExp' ].includes(typeOfValue)) | ||
if (![ 'Array', 'NaN', 'Object', 'RegExp' ].includes(typeOfValue)) | ||
return list.indexOf(valueToFind) | ||
@@ -40,7 +38,5 @@ | ||
while (++index < length && foundIndex === -1){ | ||
if (equals(list[ index ], valueToFind)){ | ||
while (++index < length && foundIndex === -1) | ||
if (equals(list[ index ], valueToFind)) | ||
foundIndex = index | ||
} | ||
} | ||
@@ -53,5 +49,4 @@ return foundIndex | ||
let next | ||
while (!(next = iter.next()).done){ | ||
while (!(next = iter.next()).done) | ||
list.push(next.value) | ||
} | ||
@@ -61,6 +56,6 @@ return list | ||
function _equalsSets(a, b){ | ||
if (a.size !== b.size){ | ||
function _compareSets(a, b){ | ||
if (a.size !== b.size) | ||
return false | ||
} | ||
const aList = _arrayFromIterator(a.values()) | ||
@@ -74,7 +69,7 @@ const bList = _arrayFromIterator(b.values()) | ||
function parseError(maybeError){ | ||
const typeofError = maybeError.__proto__.toString() | ||
if (![ 'Error', 'TypeError' ].includes(typeofError)) return [] | ||
function compareErrors(a, b){ | ||
if (a.message !== b.message) return false | ||
if (a.toString !== b.toString) return false | ||
return [ typeofError, maybeError.message ] | ||
return a.toString() === b.toString() | ||
} | ||
@@ -100,9 +95,8 @@ | ||
if (aType !== type(b)) return false | ||
if (aType === 'Function'){ | ||
if (aType === 'Function') | ||
return a.name === undefined ? false : a.name === b.name | ||
} | ||
if ([ 'NaN', 'Undefined', 'Null' ].includes(aType)) return true | ||
if ([ 'NaN', 'Null', 'Undefined' ].includes(aType)) return true | ||
if (aType === 'Number'){ | ||
if ([ 'BigInt', 'Number' ].includes(aType)){ | ||
if (Object.is(-0, a) !== Object.is(-0, b)) return false | ||
@@ -113,5 +107,4 @@ | ||
if ([ 'String', 'Boolean' ].includes(aType)){ | ||
if ([ 'Boolean', 'String' ].includes(aType)) | ||
return a.toString() === b.toString() | ||
} | ||
@@ -122,16 +115,14 @@ if (aType === 'Array'){ | ||
if (aClone.toString() !== bClone.toString()){ | ||
if (aClone.toString() !== bClone.toString()) | ||
return false | ||
} | ||
let loopArrayFlag = true | ||
aClone.forEach((aCloneInstance, aCloneIndex) => { | ||
if (loopArrayFlag){ | ||
if (loopArrayFlag) | ||
if ( | ||
aCloneInstance !== bClone[ aCloneIndex ] && | ||
!equals(aCloneInstance, bClone[ aCloneIndex ]) | ||
){ | ||
) | ||
loopArrayFlag = false | ||
} | ||
} | ||
}) | ||
@@ -145,5 +136,5 @@ | ||
if (aRegex[ 0 ]){ | ||
if (aRegex[ 0 ]) | ||
return bRegex[ 0 ] ? aRegex[ 1 ] === bRegex[ 1 ] : false | ||
} else if (bRegex[ 0 ]) return false | ||
else if (bRegex[ 0 ]) return false | ||
@@ -153,23 +144,20 @@ const aDate = parseDate(a) | ||
if (aDate[ 0 ]){ | ||
if (aDate[ 0 ]) | ||
return bDate[ 0 ] ? aDate[ 1 ] === bDate[ 1 ] : false | ||
} else if (bDate[ 0 ]) return false | ||
else if (bDate[ 0 ]) return false | ||
const aError = parseError(a) | ||
const bError = parseError(b) | ||
if (a instanceof Error){ | ||
if (!(b instanceof Error)) return false | ||
if (aError[ 0 ]){ | ||
return bError[ 0 ] ? | ||
aError[ 0 ] === bError[ 0 ] && aError[ 1 ] === bError[ 1 ] : | ||
false | ||
return compareErrors(a, b) | ||
} | ||
if (aType === 'Set'){ | ||
return _equalsSets(a, b) | ||
} | ||
if (aType === 'Set') | ||
return _compareSets(a, b) | ||
if (aType === 'Object'){ | ||
const aKeys = Object.keys(a) | ||
if (aKeys.length !== Object.keys(b).length){ | ||
if (aKeys.length !== Object.keys(b).length) | ||
return false | ||
} | ||
@@ -182,5 +170,5 @@ let loopObjectFlag = true | ||
if (aValue !== bValue && !equals(aValue, bValue)){ | ||
if (aValue !== bValue && !equals(aValue, bValue)) | ||
loopObjectFlag = false | ||
} | ||
} | ||
@@ -187,0 +175,0 @@ }) |
import { createPath } from './_internals/createPath.js' | ||
import { includes } from './_internals/includes.js' | ||
@@ -6,5 +7,4 @@ export function omit(propsToOmit, obj){ | ||
if (obj === null || obj === undefined){ | ||
if (obj === null || obj === undefined) | ||
return undefined | ||
} | ||
@@ -14,9 +14,7 @@ const propsToOmitValue = createPath(propsToOmit, ',') | ||
for (const key in obj){ | ||
if (!propsToOmitValue.includes(key)){ | ||
for (const key in obj) | ||
if (!includes(key, propsToOmitValue)) | ||
willReturn[ key ] = obj[ key ] | ||
} | ||
} | ||
return willReturn | ||
} |
@@ -0,11 +1,17 @@ | ||
import { isArray } from './_internals/isArray.js' | ||
export function partial(fn, ...args){ | ||
const len = fn.length | ||
// If a single array argument is given, those are the args (a la Ramda). | ||
// Otherwise, the variadic arguments are the args. | ||
const argList = args.length === 1 && isArray(args[0]) ? args[0] : args | ||
return (...rest) => { | ||
if (args.length + rest.length >= len){ | ||
return fn(...args, ...rest) | ||
if (argList.length + rest.length >= len){ | ||
return fn(...argList, ...rest) | ||
} | ||
return partial(fn, ...[ ...args, ...rest ]) | ||
return partial(fn, ...[ ...argList, ...rest ]) | ||
} | ||
} |
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
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
813938
231
8312
17864