Comparing version 0.23.0 to 0.24.0
@@ -1,7 +0,7 @@ | ||
// Ramda v0.23.0 | ||
// Ramda v0.24.0 | ||
// https://github.com/ramda/ramda | ||
// (c) 2013-2016 Scott Sauyet, Michael Hurley, and David Chambers | ||
// (c) 2013-2017 Scott Sauyet, Michael Hurley, and David Chambers | ||
// Ramda may be freely distributed under the MIT license. | ||
(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u},r=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},e=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},a=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},f=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},l=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},p=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},h=function(t){return t},g=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return p("callee",t)}}(),y=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},m=Number.isInteger||function(t){return t<<0===t},v=function(t){return"[object Number]"===Object.prototype.toString.call(t)},w=function(t){return"[object Object]"===Object.prototype.toString.call(t)},b=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},x=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},A=function(t){return"[object String]"===Object.prototype.toString.call(t)},j=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)p(i,u)&&(n[i]=u[i]);r+=1}return n},E=function(t){return[t]},_=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},k=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},N=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},I=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},q=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),W={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},C=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),P="function"==typeof Object.assign?Object.assign:S,T=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return y(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},F=function(t){return function n(r){return 0===arguments.length||b(r)?n:t.apply(this,arguments)}},B=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return b(r)?n:F(function(n){return t(r,n)});default:return b(r)&&b(e)?n:b(r)?F(function(n){return t(n,e)}):b(e)?F(function(n){return t(r,n)}):t(r,e)}}},U=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return b(r)?n:B(function(n,e){return t(r,n,e)});case 2:return b(r)&&b(e)?n:b(r)?B(function(n,r){return t(n,e,r)}):b(e)?B(function(n,e){return t(r,n,e)}):F(function(n){return t(r,e,n)});default:return b(r)&&b(e)&&b(u)?n:b(r)&&b(e)?B(function(n,r){return t(n,r,u)}):b(r)&&b(u)?B(function(n,r){return t(n,e,r)}):b(e)&&b(u)?B(function(n,e){return t(r,n,e)}):b(r)?F(function(n){return t(n,e,u)}):b(e)?F(function(n){return t(r,n,u)}):b(u)?F(function(n){return t(r,e,n)}):t(r,e,u)}}},R=function Mu(t,n,e){return function(){for(var u=[],i=0,o=t,c=0;c<n.length||i<arguments.length;){var a;c<n.length&&(!b(n[c])||i>=arguments.length)?a=n[c]:(a=arguments[i],i+=1),u[c]=a,b(a)||(o-=1),c+=1}return 0>=o?e.apply(this,u):r(o,Mu(t,u,e))}},M=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!y(u)){for(var i=0;i<t.length;){if("function"==typeof u[t[i]])return u[t[i]].apply(u,e);i+=1}if(j(u)){var o=n.apply(null,e);return o(u)}}return r.apply(this,arguments)}},L=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=I(this.xf["@@transducer/step"](t,!1))),t},B(function(n,r){return new t(n,r)})}(),D=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=I(this.xf["@@transducer/step"](t,!0))),t},B(function(n,r){return new t(n,r)})}(),z=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},B(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},B(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},B(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=I(this.xf["@@transducer/step"](t,n))),t},B(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=I(this.xf["@@transducer/step"](t,this.idx))),t},B(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},B(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},B(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},B(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(p(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},R(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),nt=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.i>=this.n?I(r):r},B(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):I(t)},B(function(n,r){return new t(n,r)})}(),et=B(function(t,n){return Number(t)+Number(n)}),ut=U(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),it=B(M(["all"],L,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),ot=F(function(t){return function(){return t}}),ct=B(function(t,n){return t&&n}),at=B(M(["any"],D,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),st=B(M([],z,n)),ft=B(function(t,n){return o(n,[t])}),lt=B(function(t,n){return t.apply(this,n)}),pt=U(function(t,n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0}),ht=U(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),gt=U(function Lu(t,n,r){if(0===t.length)return n;var e=t[0];if(t.length>1){var u=p(e,r)?r[e]:m(t[1])?[]:{};n=Lu(Array.prototype.slice.call(t,1),n,u)}if(m(e)&&y(r)){var i=[].concat(r);return i[e]=n,i}return ht(e,n,r)}),yt=B(function(t,n){return r(t.length,function(){return t.apply(n,arguments)})}),dt=U(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),mt=F(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),vt=B(function(t,n){return 1===t?F(n):r(t,R(t,[],n))}),wt=et(-1),bt=B(function(t,n){return null==n||n!==n?t:n}),xt=U(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),At=U(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),jt=B(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),Ot=B(function Du(t,n){switch(t.length){case 0:return n;case 1:return jt(t[0],n);default:var r=t[0],e=Array.prototype.slice.call(t,1);return null==n[r]?n:ht(r,Du(e,n[r]),n)}}),St=B(function(t,n){return t/n}),Et=B(M(["dropWhile"],H,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),_t=F(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():y(t)?[]:A(t)?"":w(t)?{}:g(t)?function(){return arguments}():void 0}),kt=B(function zu(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):r&&"object"===u?zu(r,n[e]):n[e];return i}),Nt=B(M(["find"],Y,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),It=B(M([],Z,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),qt=B(M([],G,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Wt=B(M([],J,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Ct=B(T("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Pt=F(function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n}),Tt=B(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[e],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Ft=B(function(t,n){return t>n}),Bt=B(function(t,n){return t>=n}),Ut=B(p),Rt=B(function(t,n){return t in n}),Mt=B(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Lt=F(h),Dt=U(function(t,n,r){return vt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),zt=et(1),Vt=U(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),Kt=U(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),$t=B(T("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Ht=B(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Xt=F(function(t){return y(t)?!0:t?"object"!=typeof t?!1:A(t)?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),Yt=F(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return F("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],a=r&&g(u);for(i in u)!p(i,u)||a&&"length"===i||(c[c.length]=i);if(t)for(o=n.length-1;o>=0;)i=n[o],p(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=F(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Jt=F(function(t){return null!=t&&v(t.length)?t.length:NaN}),Qt=B(function(t,n){return n>t}),tn=B(function(t,n){return n>=t}),nn=U(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),rn=U(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),en=B(function(t,n){return n.match(t)||[]}),un=B(function(t,n){return m(t)?!m(n)||1>n?NaN:(t%n+n)%n:NaN}),on=B(function(t,n){return n>t?n:t}),cn=U(function(t,n,r){return t(r)>t(n)?r:n}),an=B(function(t,n){return P({},t,n)}),sn=F(function(t){return P.apply(null,[{}].concat(t))}),fn=U(function(t,n,r){var e,u={};for(e in n)p(e,n)&&(u[e]=p(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)p(e,r)&&!p(e,u)&&(u[e]=r[e]);return u}),ln=B(function(t,n){return t>n?n:t}),pn=U(function(t,n,r){return t(r)<t(n)?r:n}),hn=B(function(t,n){return t%n}),gn=B(function(t,n){return t*n}),yn=B(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.call(this,t,r,e,u,i,o,c,a,s)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.call(this,t,r,e,u,i,o,c,a,s,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),dn=F(function(t){return-t}),mn=B(i(M(["any"],D,at))),vn=F(function(t){return!t}),wn=B(function(t,n){var r=0>t?n.length+t:t;return A(n)?n.charAt(r):n[r]}),bn=F(function(t){var n=0>t?1:t+1;return vt(n,function(){return wn(t,arguments)})}),xn=B(function(t,n){var r={};return r[t]=n,r}),An=F(E),jn=F(function(t){var n,e=!1;return r(t.length,function(){return e?n:(e=!0,n=t.apply(this,arguments))})}),On=B(function(t,n){return t||n}),Sn=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return U(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),En=B(function(t,n){return[t,n]}),_n=B(function(t,n){for(var r=n,e=0;e<t.length;){if(null==r)return;r=r[t[e]],e+=1}return r}),kn=U(function(t,n,r){return bt(t,_n(n,r))}),Nn=U(function(t,n,r){return n.length>0&&t(_n(n,r))}),In=B(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),qn=B(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Wn=B(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Cn=B(function(t,n){return o([t],n)}),Pn=B(function(t,n){return n[t]}),Tn=U(function(t,n,r){return Ht(t,r[n])}),Fn=U(function(t,n,r){return null!=r&&p(n,r)?r[n]:t}),Bn=U(function(t,n,r){return t(r[n])}),Un=B(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Rn=B(function(t,n){if(!v(t)||!v(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Mn=U(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),Ln=F(I),Dn=U(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),zn=U(function(t,n,r){return r.replace(t,n)}),Vn=F(function(t){return A(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Kn=U(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),$n=U(function(t,n,r){return Sn(t,ot(n),r)}),Hn=U(T("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Xn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),Yn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Zn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&u<t.length;)e=t[u](n,r),u+=1;return e})}),Gn=B(function(t,n){return[Hn(0,t,n),Hn(t,Jt(n),n)]}),Jn=B(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push(Hn(e,e+=t,n));return r}),Qn=B(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),tr=B(function(t,n){return Number(t)-Number(n)}),nr=F(T("tail",Hn(1,1/0))),rr=B(M(["take"],nt,function(t,n){return Hn(0,0>t?1/0:t,n)})),er=B(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),ur=B(M(["takeWhile"],rt,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),ir=B(function(t,n){return t(n),n}),or=B(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),cr=F(function(t){var n=[];for(var r in t)p(r,t)&&(n[n.length]=[r,t[r]]);return n}),ar=F(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),sr=F(function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)"undefined"==typeof r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),fr=function(){var t=" \n\f\r \u2028\u2029\ufeff",n="",r="function"==typeof String.prototype.trim;return F(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),lr=B(function(t,n){return r(t.length,function(){try{return t.apply(this,arguments)}catch(r){return n.apply(this,o([r],arguments))}})}),pr=F(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),hr=F(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}}),gr=F(function(t){return yn(1,t)}),yr=B(function(t,n){return vt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),dr=B(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),mr=B(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),vr=U(function(t,n,r){return t(r)?r:n(r)}),wr=U(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),br=U(function(t,n,r){return ut(ot(n),t,r)}),xr=B(function(t,n){return vt(n.length,function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Ar=F(function(t){for(var n=Zt(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),jr=F(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Or=function(){var t=function(t){return{value:t,map:function(){return this}}};return B(function(n,r){return n(t)(r).value})}(),Sr=U(function(t,n,r){return t(r)?n(r):r}),Er=B(function(t,n){for(var r in t)if(p(r,t)&&!t[r](n[r]))return!1;return!0}),_r=B(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),kr=B(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Nr=B(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Ir=U(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),qr=ot(!1),Wr=ot(!0),Cr=function Vu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Vu(t[c],n,r,!0):t[c];return u};switch(pr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Pr=function(t){return B(function(n,e){return r(Math.max(0,n.length-e.length),function(){return n.apply(this,t(e,arguments))})})},Tr=function(t,n){return rr(t<n.length?n.length-t:0,n)},Fr=function Ku(t,n,r,u){if(Mt(t,n))return!0;if(pr(t)!==pr(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(pr(t)){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===l(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Ku(e(t.entries()),e(n.entries()),r,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Zt(t);if(i.length!==Zt(n).length)return!1;for(var o=r.length-1;o>=0;){if(r[o]===t)return u[o]===n;o-=1}for(r.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!p(c,n)||!Ku(n[c],t[c],r,u))return!1;o-=1}return r.pop(),u.pop(),!0},Br=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(Xt(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},Ur=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r){return t["@@transducer/result"](r.reduce(yt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=C(u)),Xt(o))return t(u,i,o);if("function"==typeof o.reduce)return r(u,i,o);if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);throw new TypeError("reduce: list must be array or iterable")}}(),Rr=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":h},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":h},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return P(t,Xt(n)?xn(n[0],n[1]):n)},"@@transducer/result":h};return function(e){if(j(e))return e;if(Xt(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Mr=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Ur(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},B(function(n,r){return new t(n,r)})}(),Lr=F(function(t){return vt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),Dr=F(function(t){return yn(2,t)}),zr=F(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Cr(t,[],[],!0)}),Vr=F(function(t){return vt(t.length,t)}),Kr=B(M(["drop"],V,function(t,n){return Hn(Math.max(0,t),1/0,n)})),$r=B(M([],K,Tr)),Hr=B(M([],Mr,a)),Xr=B(function(t,n){return Fr(t,n,[],[])}),Yr=B(M(["filter"],X,function(t,n){return w(n)?Ur(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),Zr=F(Br(!0)),Gr=F(function(t){return Vr(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),Jr=B(function(t,n){for(var r=Zt(n),e=0;e<r.length;){var u=r[e];t(n[u],u,n),e+=1}return n}),Qr=wn(0),te=Hn(0,-1),ne=U(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;o<u.length;)c(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return mr(t,i)}),re=U(function(t,n,r){return j(t)?Ur(n(t),t["@@transducer/init"](),r):Ur(n(Rr(t)),Cr(t,[],[],!1),r)}),ee=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=p(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ue=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ie=F(function(t){return null!=t&&Xr(t,_t(t))}),oe=wn(-1),ce=B(function(t,n){if("function"!=typeof n.lastIndexOf||y(n)){for(var r=n.length-1;r>=0;){if(Xr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),ae=B(M(["map"],Q,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return vt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Ur(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),se=B(function(t,n){return Ur(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),fe=U(function(t,n,r){return fn(function(n,r,e){return t(r,e)},n,r)}),le=Pr(o),pe=Pr(Gr(o)),he=U(function(t,n,r){return Xr(_n(t,r),n)}),ge=B(function(t,n){return ae(Pn(t),n)}),ye=xr(O,[qn,Lt]),de=U(function(t,n,r){return Xr(n,r[t])}),me=U(Ur),ve=R(4,[],M([],tt,function(t,n,r,e){return Ur(function(e,u){var i=r(u);return e[i]=t(p(i,e)?e[i]:n,u),e},{},e)})),we=R(4,[],function(t,n,r,e){return Ur(function(r,e){return t(r,e)?n(r,e):I(r)},r,e)}),be=B(function(t,n){return Yr(i(t),n)}),xe=B(function(t,n){return or(ot(t),n)}),Ae=me(et,0),je=B(function(t,n){return Kr(t>=0?n.length-t:0,n)}),Oe=vt(4,function(t,n,r,e){return Ur(t("function"==typeof n?C(n):n),r,e)}),Se=U(function(t,n,r){return mr(t,o(n,r))}),Ee=B(function(t,n){return Er(ae(Xr,t),n)}),_e=function(){var t=function(t){return{"@@transducer/init":W.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?f(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":W.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return Xt(n)?Ur(r,t,n):Ur(r,t,[n])}}}}(),ke=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;r<t.length;){if(u=t[r],0===u&&1/u===e)return r; | ||
r+=1}return-1}if(n!==n){for(;r<t.length;){if(u=t[r],"number"==typeof u&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;r<t.length;){if(Xr(t[r],n))return r;r+=1}return-1},Ne=B(function(t,n){return ae(t,_e(n))}),Ie=F(function(t){return vt(me(on,0,ge("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),qe=F(function(t){return vt(me(on,0,ge("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),We=B(function(t,n){return"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Ur(function(t,r){return o(t,ae(r,n))},[],t)}),Ce=F(function $u(t){return t=ae(function(t){return"function"==typeof t?t:$u(t)},t),vt(me(on,0,ge("length",Ar(t))),function(){var n=arguments;return ae(function(t){return lt(t,n)},t)})}),Pe=Vr(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),Te=B(M(["chain"],Ne,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:Br(!1)(ae(t,n))})),Fe=F(function(t){var n=me(on,0,ae(function(t){return t[0].length},t));return r(n,function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),Be=B(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Vr(yn(t,function(t,r,e,u,i,o,c,a,s,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,s);case 10:return new n(t,r,e,u,i,o,c,a,s,f)}}))}),Ue=B(function(t,n){return vt(me(on,0,ge("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Re=ve(function(t,n){return t+1},0),Me=B(M([],$,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(oe(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Le=U(function(t,n,r){return Xr(t(n),t(r))}),De=U(function(t,n,r){return Xr(n[t],r[t])}),ze=B(T("groupBy",ve(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),Ve=ve(function(t,n){return n},null),Ke=B(function(t,n){return"function"!=typeof n.indexOf||y(n)?ke(n,t,0):n.indexOf(t)}),$e=F(function(t){return Ue(function(){return Array.prototype.slice.call(arguments,0)},t)}),He=B(function(t,n){return function(r){return function(e){return ae(function(t){return n(t,e)},r(t(e)))}}}),Xe=F(function(t){return He(wn(t),br(t))}),Ye=F(function(t){return He(_n(t),gt(t))}),Ze=F(function(t){return He(Pn(t),ht(t))}),Ge=B(function(t,n){var r=vt(t,n);return vt(t,function(){return Ur(We,ae(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Je=F(function(t){return Ae(t)/t.length}),Qe=F(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return Je(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),tu=$e([Yr,be]),nu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return r(arguments[0].length,me(_,arguments[0],nr(arguments)))},ru=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,me(k,arguments[0],nr(arguments)))},eu=me(gn,1),uu=B(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Mn(function(t,n){return We(ae(Cn,t),n)},t([]),n)}),iu=U(function(t,n,r){return uu(t,ae(n,r))}),ou=Te(h),cu=function(t,n){return ke(n,t,0)>=0},au=function Hu(t,n){var r=function(r){var e=n.concat([t]);return cu(r,e)?"<Circular>":Hu(r,e)},e=function(t,n){return O(function(n){return N(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,be(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):N(q(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":N(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},su=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return nu.apply(this,Vn(arguments))},fu=function(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return su(su.apply(this,ae(Te,t)),n)},lu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return ru.apply(this,Vn(arguments))},pu=F(function(t){return Be(t.length,t)}),hu=B(cu),gu=B(function(t,n){for(var r=[],e=0,u=t.length;u>e;)cu(t[e],n)||cu(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),yu=F(M([],$(Xr),Me(Xr))),du=F(function(t){return Ge(t.length,t)}),mu=B(function(t,n){var r={};for(var e in n)cu(e,t)||(r[e]=n[e]);return r}),vu=function(){if(0===arguments.length)throw new Error("pipeK requires at least one argument");return fu.apply(this,Vn(arguments))},wu=F(function(t){return au(t,[])}),bu=B(function(t,n){return be(Gr(cu)(t),n)}),xu=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?cu(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?cu(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),Au=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:du(ct)(t,n)}),ju=du(vn),Ou=B(function(t,n){if(null==t||!d(t.concat))throw new TypeError(wu(t)+' does not have a method named "concat"');if(y(t)&&!y(n))throw new TypeError(wu(n)+" is not an array");return t.concat(n)}),Su=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:du(On)(t,n)}),Eu=B(function(t,n){return vt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(wu(r)+' does not have a method named "'+n+'"')})}),_u=Eu(1,"join"),ku=F(function(t){var n={};return r(t.length,function(){var r=wu(arguments);return p(r,n)||(n[r]=t.apply(this,arguments)),n[r]})}),Nu=Eu(1,"split"),Iu=B(function(t,n){return Ou(gu(t,n),gu(n,t))}),qu=U(function(t,n,r){return Ou(At(t,n,r),At(t,r,n))}),Wu=B(function(t,n){if(!x(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+wu(t));return u(t).test(n)}),Cu=Eu(0,"toLowerCase"),Pu=Eu(0,"toUpperCase"),Tu=B(function(t,n){for(var r,e,u=new xu,i=[],o=0;o<n.length;)e=n[o],r=t(e),u.add(r)&&i.push(e),o+=1;return i}),Fu=Tu(Lt),Bu=B(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),Fu(s(Gr(cu)(r),e))}),Uu=B(su(Fu,o)),Ru={F:qr,T:Wr,__:t,add:et,addIndex:Lr,adjust:ut,all:it,allPass:Ie,always:ot,and:ct,any:at,anyPass:qe,ap:We,aperture:st,append:ft,apply:lt,applySpec:Ce,ascend:pt,assoc:ht,assocPath:gt,binary:Dr,bind:yt,both:Au,call:Pe,chain:Te,clamp:dt,clone:zr,comparator:mt,complement:ju,compose:su,composeK:fu,composeP:lu,concat:Ou,cond:Fe,construct:pu,constructN:Be,contains:hu,converge:Ue,countBy:Re,curry:Vr,curryN:vt,dec:wt,defaultTo:bt,descend:xt,difference:gu,differenceWith:At,dissoc:jt,dissocPath:Ot,divide:St,drop:Kr,dropLast:$r,dropLastWhile:Hr,dropRepeats:yu,dropRepeatsWith:Me,dropWhile:Et,either:Su,empty:_t,eqBy:Le,eqProps:De,equals:Xr,evolve:kt,filter:Yr,find:Nt,findIndex:It,findLast:qt,findLastIndex:Wt,flatten:Zr,flip:Gr,forEach:Ct,forEachObjIndexed:Jr,fromPairs:Pt,groupBy:ze,groupWith:Tt,gt:Ft,gte:Bt,has:Ut,hasIn:Rt,head:Qr,identical:Mt,identity:Lt,ifElse:Dt,inc:zt,indexBy:Ve,indexOf:Ke,init:te,insert:Vt,insertAll:Kt,intersection:Bu,intersectionWith:ne,intersperse:$t,into:re,invert:ee,invertObj:ue,invoker:Eu,is:Ht,isArrayLike:Xt,isEmpty:ie,isNil:Yt,join:_u,juxt:$e,keys:Zt,keysIn:Gt,last:oe,lastIndexOf:ce,length:Jt,lens:He,lensIndex:Xe,lensPath:Ye,lensProp:Ze,lift:du,liftN:Ge,lt:Qt,lte:tn,map:ae,mapAccum:nn,mapAccumRight:rn,mapObjIndexed:se,match:en,mathMod:un,max:on,maxBy:cn,mean:Je,median:Qe,memoize:ku,merge:an,mergeAll:sn,mergeWith:fe,mergeWithKey:fn,min:ln,minBy:pn,modulo:hn,multiply:gn,nAry:yn,negate:dn,none:mn,not:vn,nth:wn,nthArg:bn,objOf:xn,of:An,omit:mu,once:jn,or:On,over:Sn,pair:En,partial:le,partialRight:pe,partition:tu,path:_n,pathEq:he,pathOr:kn,pathSatisfies:Nn,pick:In,pickAll:qn,pickBy:Wn,pipe:nu,pipeK:vu,pipeP:ru,pluck:ge,prepend:Cn,product:eu,project:ye,prop:Pn,propEq:de,propIs:Tn,propOr:Fn,propSatisfies:Bn,props:Un,range:Rn,reduce:me,reduceBy:ve,reduceRight:Mn,reduceWhile:we,reduced:Ln,reject:be,remove:Dn,repeat:xe,replace:zn,reverse:Vn,scan:Kn,sequence:uu,set:$n,slice:Hn,sort:Xn,sortBy:Yn,sortWith:Zn,split:Nu,splitAt:Gn,splitEvery:Jn,splitWhen:Qn,subtract:tr,sum:Ae,symmetricDifference:Iu,symmetricDifferenceWith:qu,tail:nr,take:rr,takeLast:je,takeLastWhile:er,takeWhile:ur,tap:ir,test:Wu,times:or,toLower:Cu,toPairs:cr,toPairsIn:ar,toString:wu,toUpper:Pu,transduce:Oe,transpose:sr,traverse:iu,trim:fr,tryCatch:lr,type:pr,unapply:hr,unary:gr,uncurryN:yr,unfold:dr,union:Uu,unionWith:Se,uniq:Fu,uniqBy:Tu,uniqWith:mr,unless:vr,unnest:ou,until:wr,update:br,useWith:xr,values:Ar,valuesIn:jr,view:Or,when:Sr,where:Er,whereEq:Ee,without:bu,xprod:_r,zip:kr,zipObj:Nr,zipWith:Ir};"object"==typeof exports?module.exports=Ru:"function"==typeof define&&define.amd?define(function(){return Ru}):this.R=Ru}).call(this); | ||
(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u},r=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},e=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},a=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},f=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},l=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},p=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},h=function(t){return t},y=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return p("callee",t)}}(),g=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},m=Number.isInteger||function(t){return t<<0===t},v=function(t){return"[object Number]"===Object.prototype.toString.call(t)},w=function(t){return"[object Object]"===Object.prototype.toString.call(t)},b=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},x=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},j=function(t){return"[object String]"===Object.prototype.toString.call(t)},A=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)p(i,u)&&(n[i]=u[i]);r+=1}return n},E=function(t){return[t]},_=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},q=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},N=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},k=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},I=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),W={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},C=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),P="function"==typeof Object.assign?Object.assign:S,T=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return g(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},F=function(t){return function n(r){return 0===arguments.length||b(r)?n:t.apply(this,arguments)}},B=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return b(r)?n:F(function(n){return t(r,n)});default:return b(r)&&b(e)?n:b(r)?F(function(n){return t(n,e)}):b(e)?F(function(n){return t(r,n)}):t(r,e)}}},R=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return b(r)?n:B(function(n,e){return t(r,n,e)});case 2:return b(r)&&b(e)?n:b(r)?B(function(n,r){return t(n,e,r)}):b(e)?B(function(n,e){return t(r,n,e)}):F(function(n){return t(r,e,n)});default:return b(r)&&b(e)&&b(u)?n:b(r)&&b(e)?B(function(n,r){return t(n,r,u)}):b(r)&&b(u)?B(function(n,r){return t(n,e,r)}):b(e)&&b(u)?B(function(n,e){return t(r,n,e)}):b(r)?F(function(n){return t(n,e,u)}):b(e)?F(function(n){return t(r,n,u)}):b(u)?F(function(n){return t(r,e,n)}):t(r,e,u)}}},U=function Xu(t,n,e){return function(){for(var u=[],i=0,o=t,c=0;c<n.length||i<arguments.length;){var a;c<n.length&&(!b(n[c])||i>=arguments.length)?a=n[c]:(a=arguments[i],i+=1),u[c]=a,b(a)||(o-=1),c+=1}return 0>=o?e.apply(this,u):r(o,Xu(t,u,e))}},D=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!g(u)){for(var i=0;i<t.length;){if("function"==typeof u[t[i]])return u[t[i]].apply(u,e);i+=1}if(A(u)){var o=n.apply(null,e);return o(u)}}return r.apply(this,arguments)}},M=F(function(t){return g(t)?!0:t?"object"!=typeof t?!1:j(t)?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),L=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(M(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},z=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=k(this.xf["@@transducer/step"](t,!1))),t},B(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=k(this.xf["@@transducer/step"](t,!0))),t},B(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},B(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},B(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},B(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=k(this.xf["@@transducer/step"](t,n))),t},B(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=k(this.xf["@@transducer/step"](t,this.idx))),t},B(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},B(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},B(function(n,r){return new t(n,r)})}(),nt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},B(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(p(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},U(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),et=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.n>=0&&this.i>=this.n?k(r):r},B(function(n,r){return new t(n,r)})}(),ut=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):k(t)},B(function(n,r){return new t(n,r)})}(),it=B(function(t,n){return Number(t)+Number(n)}),ot=R(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),ct=B(D(["all"],z,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),at=F(function(t){return function(){return t}}),st=B(function(t,n){return t&&n}),ft=B(D(["any"],K,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),lt=B(D([],V,n)),pt=B(function(t,n){return o(n,[t])}),ht=B(function(t,n){return t.apply(this,n)}),yt=R(function(t,n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0}),gt=R(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),dt=B(function(t,n){return r(t.length,function(){return t.apply(n,arguments)})}),mt=R(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),vt=F(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),wt=B(function(t,n){return 1===t?F(n):r(t,U(t,[],n))}),bt=it(-1),xt=B(function(t,n){return null==n||n!==n?t:n}),jt=R(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),At=R(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),Ot=B(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),St=B(function(t,n){return t/n}),Et=B(D(["dropWhile"],X,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),_t=F(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():g(t)?[]:j(t)?"":w(t)?{}:y(t)?function(){return arguments}():void 0}),qt=B(function Yu(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):r&&"object"===u?Yu(r,n[e]):n[e];return i}),Nt=B(D(["find"],Z,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),kt=B(D([],G,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),It=B(D([],Q,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Wt=B(D([],tt,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Ct=F(L(!0)),Pt=B(T("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Tt=F(function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n}),Ft=B(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[i-1],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Bt=B(function(t,n){return t>n}),Rt=B(function(t,n){return t>=n}),Ut=B(p),Dt=B(function(t,n){return t in n}),Mt=B(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Lt=F(h),zt=R(function(t,n,r){return wt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),Kt=it(1),Vt=R(function(t,n,r){return s(function(n){return c(t,n,r)},n)}),$t=R(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),Ht=R(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),Jt=B(T("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Xt=B(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Yt=F(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return F("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],a=r&&y(u);for(i in u)!p(i,u)||a&&"length"===i||(c[c.length]=i);if(t)for(o=n.length-1;o>=0;)i=n[o],p(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=F(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Qt=F(function(t){return null!=t&&v(t.length)?t.length:NaN}),tn=B(function(t,n){return n>t}),nn=B(function(t,n){return n>=t}),rn=R(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),en=R(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),un=B(function(t,n){return n.match(t)||[]}),on=B(function(t,n){return m(t)?!m(n)||1>n?NaN:(t%n+n)%n:NaN}),cn=B(function(t,n){return n>t?n:t}),an=R(function(t,n,r){return t(r)>t(n)?r:n}),sn=B(function(t,n){var e={};return r(n.length,function(){var r=t.apply(this,arguments);return p(r,e)||(e[r]=n.apply(this,arguments)),e[r]})}),fn=B(function(t,n){return P({},t,n)}),ln=F(function(t){return P.apply(null,[{}].concat(t))}),pn=R(function(t,n,r){var e,u={};for(e in n)p(e,n)&&(u[e]=p(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)p(e,r)&&!p(e,u)&&(u[e]=r[e]);return u}),hn=B(function(t,n){return t>n?n:t}),yn=R(function(t,n,r){return t(r)<t(n)?r:n}),gn=B(function(t,n){return t%n}),dn=B(function(t,n){return t*n}),mn=B(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.call(this,t,r,e,u,i,o,c,a,s)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.call(this,t,r,e,u,i,o,c,a,s,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),vn=F(function(t){return-t}),wn=B(i(D(["any"],K,ft))),bn=F(function(t){return!t}),xn=B(function(t,n){var r=0>t?n.length+t:t;return j(n)?n.charAt(r):n[r]}),jn=F(function(t){var n=0>t?1:t+1;return wt(n,function(){return xn(t,arguments)})}),An=R(function(t,n,r){return t(n(r))}),On=B(function(t,n){var r={};return r[t]=n,r}),Sn=F(E),En=F(function(t){var n,e=!1;return r(t.length,function(){return e?n:(e=!0,n=t.apply(this,arguments))})}),_n=B(function(t,n){return t||n}),qn=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return R(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),Nn=B(function(t,n){return[t,n]}),kn=B(function(t,n){for(var r=n,e=0;e<t.length;){if(null==r)return;r=r[t[e]],e+=1}return r}),In=R(function(t,n,r){return xt(t,kn(n,r))}),Wn=R(function(t,n,r){return n.length>0&&t(kn(n,r))}),Cn=B(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),Pn=B(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Tn=B(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Fn=B(function(t,n){return o([t],n)}),Bn=B(function(t,n){return n[t]}),Rn=R(function(t,n,r){return Xt(t,r[n])}),Un=R(function(t,n,r){return null!=r&&p(n,r)?r[n]:t}),Dn=R(function(t,n,r){return t(r[n])}),Mn=B(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Ln=B(function(t,n){if(!v(t)||!v(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),zn=R(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),Kn=F(k),Vn=R(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),$n=R(function(t,n,r){return r.replace(t,n)}),Hn=F(function(t){return j(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Jn=R(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),Xn=R(function(t,n,r){return qn(t,at(n),r)}),Yn=R(T("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Zn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),Gn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Qn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&u<t.length;)e=t[u](n,r),u+=1;return e})}),tr=B(function(t,n){return[Yn(0,t,n),Yn(t,Qt(n),n)]}),nr=B(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push(Yn(e,e+=t,n));return r}),rr=B(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),er=B(function(t,n){return Number(t)-Number(n)}),ur=F(T("tail",Yn(1,1/0))),ir=B(D(["take"],et,function(t,n){return Yn(0,0>t?1/0:t,n)})),or=B(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),cr=B(D(["takeWhile"],ut,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),ar=B(function(t,n){return t(n),n}),sr=B(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),fr=F(function(t){var n=[];for(var r in t)p(r,t)&&(n[n.length]=[r,t[r]]);return n}),lr=F(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),pr=F(function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)"undefined"==typeof r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),hr=function(){var t=" \n\f\r \u2028\u2029\ufeff",n="",r="function"==typeof String.prototype.trim;return F(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),yr=B(function(t,n){return r(t.length,function(){try{return t.apply(this,arguments)}catch(r){return n.apply(this,o([r],arguments))}})}),gr=F(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),dr=F(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}}),mr=F(function(t){return mn(1,t)}),vr=B(function(t,n){return wt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),wr=B(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),br=B(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),xr=R(function(t,n,r){return t(r)?r:n(r)}),jr=R(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),Ar=R(function(t,n,r){return ot(at(n),t,r)}),Or=B(function(t,n){return wt(n.length,function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Sr=F(function(t){for(var n=Zt(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),Er=F(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),_r=function(){var t=function(t){return{value:t,"fantasy-land/map":function(){return this}}};return B(function(n,r){return n(t)(r).value})}(),qr=R(function(t,n,r){return t(r)?n(r):r}),Nr=B(function(t,n){for(var r in t)if(p(r,t)&&!t[r](n[r]))return!1;return!0}),kr=B(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),Ir=B(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Wr=B(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Cr=R(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),Pr=at(!1),Tr=at(!0),Fr=function Zu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Zu(t[c],n,r,!0):t[c];return u};switch(gr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Br=function(t){return B(function(n,e){return r(Math.max(0,n.length-e.length),function(){return n.apply(this,t(e,arguments))})})},Rr=function(t,n){return ir(t<n.length?n.length-t:0,n)},Ur=function Gu(t,n,r,u){if(Mt(t,n))return!0;if(gr(t)!==gr(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(gr(t)){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===l(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Gu(e(t.entries()),e(n.entries()),r,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Zt(t);if(i.length!==Zt(n).length)return!1;for(var o=r.length-1;o>=0;){if(r[o]===t)return u[o]===n;o-=1}for(r.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!p(c,n)||!Gu(n[c],t[c],r,u))return!1;o-=1}return r.pop(),u.pop(),!0},Dr=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r,e){return t["@@transducer/result"](r[e](dt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=C(u)),M(o))return t(u,i,o);if("function"==typeof o["fantasy-land/reduce"])return r(u,i,o,"fantasy-land/reduce");if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);if("function"==typeof o.reduce)return r(u,i,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}(),Mr=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":h},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":h},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return P(t,M(n)?On(n[0],n[1]):n)},"@@transducer/result":h};return function(e){if(A(e))return e;if(M(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Lr=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Dr(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},B(function(n,r){return new t(n,r)})}(),zr=F(function(t){return wt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),Kr=R(function Qu(t,n,r){if(0===t.length)return n;var e=t[0];if(t.length>1){var u=!Yt(r)&&p(e,r)?r[e]:m(t[1])?[]:{};n=Qu(Array.prototype.slice.call(t,1),n,u)}if(m(e)&&g(r)){var i=[].concat(r);return i[e]=n,i}return gt(e,n,r)}),Vr=F(function(t){return mn(2,t)}),$r=F(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Fr(t,[],[],!0)}),Hr=F(function(t){return wt(t.length,t)}),Jr=B(function ti(t,n){switch(t.length){case 0:return n;case 1:return m(t[0])?Vn(t[0],1,n):Ot(t[0],n);default:var r=t[0],e=Array.prototype.slice.call(t,1);return null==n[r]?n:m(t[0])?Ar(r,ti(e,n[r]),n):gt(r,ti(e,n[r]),n)}}),Xr=B(D(["drop"],$,function(t,n){return Yn(Math.max(0,t),1/0,n)})),Yr=B(D([],H,Rr)),Zr=B(D([],Lr,a)),Gr=B(function(t,n){return Ur(t,n,[],[])}),Qr=B(D(["filter"],Y,function(t,n){return w(n)?Dr(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),te=F(function(t){return Hr(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),ne=B(function(t,n){for(var r=Zt(n),e=0;e<r.length;){var u=r[e];t(n[u],u,n),e+=1}return n}),re=xn(0),ee=Yn(0,-1),ue=R(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;o<u.length;)c(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return br(t,i)}),ie=R(function(t,n,r){return A(t)?Dr(n(t),t["@@transducer/init"](),r):Dr(n(Mr(t)),Fr(t,[],[],!1),r)}),oe=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=p(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ce=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ae=F(function(t){return null!=t&&Gr(t,_t(t))}),se=xn(-1),fe=B(function(t,n){if("function"!=typeof n.lastIndexOf||g(n)){for(var r=n.length-1;r>=0;){if(Gr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),le=B(D(["fantasy-land/map","map"],nt,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return wt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Dr(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),pe=B(function(t,n){return Dr(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),he=R(function ni(t,n,r){return pn(function(n,r,e){return w(r)&&w(e)?ni(t,r,e):t(n,r,e)},n,r)}),ye=R(function(t,n,r){return pn(function(n,r,e){return t(r,e)},n,r)}),ge=Br(o),de=Br(te(o)),me=R(function(t,n,r){return Gr(kn(t,r),n)}),ve=B(function(t,n){return le(Bn(t),n)}),we=Or(O,[Pn,Lt]),be=R(function(t,n,r){return Gr(n,r[t])}),xe=R(Dr),je=U(4,[],D([],rt,function(t,n,r,e){return Dr(function(e,u){var i=r(u);return e[i]=t(p(i,e)?e[i]:n,u),e},{},e)})),Ae=U(4,[],function(t,n,r,e){ | ||
return Dr(function(r,e){return t(r,e)?n(r,e):k(r)},r,e)}),Oe=B(function(t,n){return Qr(i(t),n)}),Se=B(function(t,n){return sr(at(t),n)}),Ee=B(function(t,n){return Gr(ir(t.length,n),t)}),_e=xe(it,0),qe=B(function(t,n){return Xr(t>=0?n.length-t:0,n)}),Ne=wt(4,function(t,n,r,e){return Dr(t("function"==typeof n?C(n):n),r,e)}),ke=R(function(t,n,r){return br(t,o(n,r))}),Ie=B(function(t,n){return Nr(le(Gr,t),n)}),We=function(){var t=function(t){return{"@@transducer/init":W.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?f(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":W.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return M(n)?Dr(r,t,n):Dr(r,t,[n])}}}}(),Ce=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;r<t.length;){if(u=t[r],0===u&&1/u===e)return r;r+=1}return-1}if(n!==n){for(;r<t.length;){if(u=t[r],"number"==typeof u&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;r<t.length;){if(Gr(t[r],n))return r;r+=1}return-1},Pe=B(function(t,n){return le(t,We(n))}),Te=F(function(t){return wt(xe(cn,0,ve("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),Fe=F(function(t){return wt(xe(cn,0,ve("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),Be=B(function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Dr(function(t,r){return o(t,le(r,n))},[],t)}),Re=F(function ri(t){return t=le(function(t){return"function"==typeof t?t:ri(t)},t),wt(xe(cn,0,ve("length",Sr(t))),function(){var n=arguments;return le(function(t){return ht(t,n)},t)})}),Ue=Hr(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),De=B(D(["fantasy-land/chain","chain"],Pe,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:L(!1)(le(t,n))})),Me=F(function(t){var n=xe(cn,0,le(function(t){return t[0].length},t));return r(n,function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),Le=B(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Hr(mn(t,function(t,r,e,u,i,o,c,a,s,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,s);case 10:return new n(t,r,e,u,i,o,c,a,s,f)}}))}),ze=B(function(t,n){return wt(xe(cn,0,ve("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Ke=je(function(t,n){return t+1},0),Ve=B(D([],J,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(se(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),$e=B(function(t,n){return Gr(qe(t.length,n),t)}),He=R(function(t,n,r){return Gr(t(n),t(r))}),Je=R(function(t,n,r){return Gr(n[t],r[t])}),Xe=B(T("groupBy",je(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),Ye=je(function(t,n){return n},null),Ze=B(function(t,n){return"function"!=typeof n.indexOf||g(n)?Ce(n,t,0):n.indexOf(t)}),Ge=F(function(t){return ze(function(){return Array.prototype.slice.call(arguments,0)},t)}),Qe=B(function(t,n){return function(r){return function(e){return le(function(t){return n(t,e)},r(t(e)))}}}),tu=F(function(t){return Qe(xn(t),Ar(t))}),nu=F(function(t){return Qe(kn(t),Kr(t))}),ru=F(function(t){return Qe(Bn(t),gt(t))}),eu=B(function(t,n){var r=wt(t,n);return wt(t,function(){return Dr(Be,le(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),uu=F(function(t){return _e(t)/t.length}),iu=F(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return uu(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),ou=B(function(t,n){return he(function(t,n,r){return n},t,n)}),cu=B(function(t,n){return he(function(t,n,r){return r},t,n)}),au=R(function(t,n,r){return he(function(n,r,e){return t(r,e)},n,r)}),su=Ge([Qr,Oe]),fu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return r(arguments[0].length,xe(_,arguments[0],ur(arguments)))},lu=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,xe(q,arguments[0],ur(arguments)))},pu=xe(dn,1),hu=B(function(t,n){return"function"==typeof n.sequence?n.sequence(t):zn(function(t,n){return Be(le(Fn,t),n)},t([]),n)}),yu=R(function(t,n,r){return"function"==typeof r["fantasy-land/traverse"]?r["fantasy-land/traverse"](n,t):hu(t,le(n,r))}),gu=De(h),du=function(t,n){return Ce(n,t,0)>=0},mu=function ei(t,n){var r=function(r){var e=n.concat([t]);return du(r,e)?"<Circular>":ei(r,e)},e=function(t,n){return O(function(n){return N(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,Oe(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):N(I(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":N(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},vu=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return fu.apply(this,Hn(arguments))},wu=function(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return vu(vu.apply(this,le(De,t)),n)},bu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return lu.apply(this,Hn(arguments))},xu=F(function(t){return Le(t.length,t)}),ju=B(du),Au=B(function(t,n){for(var r=[],e=0,u=t.length;u>e;)du(t[e],n)||du(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),Ou=F(D([],J(Gr),Ve(Gr))),Su=F(function(t){return eu(t.length,t)}),Eu=B(function(t,n){var r={};for(var e in n)du(e,t)||(r[e]=n[e]);return r}),_u=function(){if(0===arguments.length)throw new Error("pipeK requires at least one argument");return wu.apply(this,Hn(arguments))},qu=F(function(t){return mu(t,[])}),Nu=B(function(t,n){return Oe(te(du)(t),n)}),ku=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?du(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?du(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),Iu=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:Su(st)(t,n)}),Wu=Su(bn),Cu=B(function(t,n){if(g(t)){if(g(n))return t.concat(n);throw new TypeError(qu(n)+" is not an array")}if(j(t)){if(j(n))return t+n;throw new TypeError(qu(n)+" is not a string")}if(null!=t&&d(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&d(t.concat))return t.concat(n);throw new TypeError(qu(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),Pu=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:Su(_n)(t,n)}),Tu=B(function(t,n){return wt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(qu(r)+' does not have a method named "'+n+'"')})}),Fu=Tu(1,"join"),Bu=sn(qu),Ru=Tu(1,"split"),Uu=B(function(t,n){return Cu(Au(t,n),Au(n,t))}),Du=R(function(t,n,r){return Cu(At(t,n,r),At(t,r,n))}),Mu=B(function(t,n){if(!x(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+qu(t));return u(t).test(n)}),Lu=Tu(0,"toLowerCase"),zu=Tu(0,"toUpperCase"),Ku=B(function(t,n){for(var r,e,u=new ku,i=[],o=0;o<n.length;)e=n[o],r=t(e),u.add(r)&&i.push(e),o+=1;return i}),Vu=Ku(Lt),$u=B(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),Vu(s(te(du)(r),e))}),Hu=B(vu(Vu,o)),Ju={F:Pr,T:Tr,__:t,add:it,addIndex:zr,adjust:ot,all:ct,allPass:Te,always:at,and:st,any:ft,anyPass:Fe,ap:Be,aperture:lt,append:pt,apply:ht,applySpec:Re,ascend:yt,assoc:gt,assocPath:Kr,binary:Vr,bind:dt,both:Iu,call:Ue,chain:De,clamp:mt,clone:$r,comparator:vt,complement:Wu,compose:vu,composeK:wu,composeP:bu,concat:Cu,cond:Me,construct:xu,constructN:Le,contains:ju,converge:ze,countBy:Ke,curry:Hr,curryN:wt,dec:bt,defaultTo:xt,descend:jt,difference:Au,differenceWith:At,dissoc:Ot,dissocPath:Jr,divide:St,drop:Xr,dropLast:Yr,dropLastWhile:Zr,dropRepeats:Ou,dropRepeatsWith:Ve,dropWhile:Et,either:Pu,empty:_t,endsWith:$e,eqBy:He,eqProps:Je,equals:Gr,evolve:qt,filter:Qr,find:Nt,findIndex:kt,findLast:It,findLastIndex:Wt,flatten:Ct,flip:te,forEach:Pt,forEachObjIndexed:ne,fromPairs:Tt,groupBy:Xe,groupWith:Ft,gt:Bt,gte:Rt,has:Ut,hasIn:Dt,head:re,identical:Mt,identity:Lt,ifElse:zt,inc:Kt,indexBy:Ye,indexOf:Ze,init:ee,innerJoin:Vt,insert:$t,insertAll:Ht,intersection:$u,intersectionWith:ue,intersperse:Jt,into:ie,invert:oe,invertObj:ce,invoker:Tu,is:Xt,isEmpty:ae,isNil:Yt,join:Fu,juxt:Ge,keys:Zt,keysIn:Gt,last:se,lastIndexOf:fe,length:Qt,lens:Qe,lensIndex:tu,lensPath:nu,lensProp:ru,lift:Su,liftN:eu,lt:tn,lte:nn,map:le,mapAccum:rn,mapAccumRight:en,mapObjIndexed:pe,match:un,mathMod:on,max:cn,maxBy:an,mean:uu,median:iu,memoize:Bu,memoizeWith:sn,merge:fn,mergeAll:ln,mergeDeepLeft:ou,mergeDeepRight:cu,mergeDeepWith:au,mergeDeepWithKey:he,mergeWith:ye,mergeWithKey:pn,min:hn,minBy:yn,modulo:gn,multiply:dn,nAry:mn,negate:vn,none:wn,not:bn,nth:xn,nthArg:jn,o:An,objOf:On,of:Sn,omit:Eu,once:En,or:_n,over:qn,pair:Nn,partial:ge,partialRight:de,partition:su,path:kn,pathEq:me,pathOr:In,pathSatisfies:Wn,pick:Cn,pickAll:Pn,pickBy:Tn,pipe:fu,pipeK:_u,pipeP:lu,pluck:ve,prepend:Fn,product:pu,project:we,prop:Bn,propEq:be,propIs:Rn,propOr:Un,propSatisfies:Dn,props:Mn,range:Ln,reduce:xe,reduceBy:je,reduceRight:zn,reduceWhile:Ae,reduced:Kn,reject:Oe,remove:Vn,repeat:Se,replace:$n,reverse:Hn,scan:Jn,sequence:hu,set:Xn,slice:Yn,sort:Zn,sortBy:Gn,sortWith:Qn,split:Ru,splitAt:tr,splitEvery:nr,splitWhen:rr,startsWith:Ee,subtract:er,sum:_e,symmetricDifference:Uu,symmetricDifferenceWith:Du,tail:ur,take:ir,takeLast:qe,takeLastWhile:or,takeWhile:cr,tap:ar,test:Mu,times:sr,toLower:Lu,toPairs:fr,toPairsIn:lr,toString:qu,toUpper:zu,transduce:Ne,transpose:pr,traverse:yu,trim:hr,tryCatch:yr,type:gr,unapply:dr,unary:mr,uncurryN:vr,unfold:wr,union:Hu,unionWith:ke,uniq:Vu,uniqBy:Ku,uniqWith:br,unless:xr,unnest:gu,until:jr,update:Ar,useWith:Or,values:Sr,valuesIn:Er,view:_r,when:qr,where:Nr,whereEq:Ie,without:Nu,xprod:kr,zip:Ir,zipObj:Wr,zipWith:Cr};"object"==typeof exports?module.exports=Ju:"function"==typeof define&&define.amd?define(function(){return Ju}):this.R=Ju}).call(this); |
12
index.js
@@ -44,4 +44,4 @@ module.exports = { | ||
dec: require('./src/dec'), | ||
defaultTo: require('./src/defaultTo'), | ||
descend: require('./src/descend'), | ||
defaultTo: require('./src/defaultTo'), | ||
difference: require('./src/difference'), | ||
@@ -60,2 +60,3 @@ differenceWith: require('./src/differenceWith'), | ||
empty: require('./src/empty'), | ||
endsWith: require('./src/endsWith'), | ||
eqBy: require('./src/eqBy'), | ||
@@ -89,2 +90,3 @@ eqProps: require('./src/eqProps'), | ||
init: require('./src/init'), | ||
innerJoin: require('./src/innerJoin'), | ||
insert: require('./src/insert'), | ||
@@ -100,3 +102,2 @@ insertAll: require('./src/insertAll'), | ||
is: require('./src/is'), | ||
isArrayLike: require('./src/isArrayLike'), | ||
isEmpty: require('./src/isEmpty'), | ||
@@ -130,4 +131,9 @@ isNil: require('./src/isNil'), | ||
memoize: require('./src/memoize'), | ||
memoizeWith: require('./src/memoizeWith'), | ||
merge: require('./src/merge'), | ||
mergeAll: require('./src/mergeAll'), | ||
mergeDeepLeft: require('./src/mergeDeepLeft'), | ||
mergeDeepRight: require('./src/mergeDeepRight'), | ||
mergeDeepWith: require('./src/mergeDeepWith'), | ||
mergeDeepWithKey: require('./src/mergeDeepWithKey'), | ||
mergeWith: require('./src/mergeWith'), | ||
@@ -145,2 +151,3 @@ mergeWithKey: require('./src/mergeWithKey'), | ||
nthArg: require('./src/nthArg'), | ||
o: require('./src/o'), | ||
objOf: require('./src/objOf'), | ||
@@ -198,2 +205,3 @@ of: require('./src/of'), | ||
splitWhen: require('./src/splitWhen'), | ||
startsWith: require('./src/startsWith'), | ||
subtract: require('./src/subtract'), | ||
@@ -200,0 +208,0 @@ sum: require('./src/sum'), |
@@ -27,3 +27,3 @@ { | ||
"description": "A practical functional library for JavaScript programmers.", | ||
"version": "0.23.0", | ||
"version": "0.24.0", | ||
"homepage": "http://ramdajs.com/", | ||
@@ -36,2 +36,7 @@ "license": "MIT", | ||
"main": "index.js", | ||
"files": [ | ||
"index.js", | ||
"src", | ||
"dist" | ||
], | ||
"scripts": { | ||
@@ -38,0 +43,0 @@ "bench": "scripts/benchRunner", |
@@ -85,3 +85,3 @@ Ramda | ||
```javascript | ||
var R = require('ramda'); | ||
const R = require('ramda'); | ||
``` | ||
@@ -104,3 +104,3 @@ | ||
```html | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.23.0/ramda.min.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.24.0/ramda.min.js"></script> | ||
``` | ||
@@ -111,4 +111,4 @@ | ||
```html | ||
<script src="//cdn.jsdelivr.net/ramda/0.23.0/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/0.23/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/0.24.0/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/0.24/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/latest/ramda.min.js"></script> | ||
@@ -176,7 +176,5 @@ ``` | ||
To run the test suite in the browser, you can simply open `test/index.html`. | ||
Alternatively, you can use [testem](https://github.com/airportyh/testem) to | ||
You can use [testem](https://github.com/airportyh/testem) to | ||
test across different browsers (or even headlessly), with livereloading of | ||
tests too. Install testem (`npm install -g testem`) and run `testem`. Open the | ||
tests. Install testem (`npm install -g testem`) and run `testem`. Open the | ||
link provided in your browser and you will see the results in your terminal. | ||
@@ -188,4 +186,8 @@ | ||
Translations | ||
----------------- | ||
[Chinese(中文)](http://ramda.cn/) | ||
Acknowledgements | ||
@@ -192,0 +194,0 @@ ----------------- |
@@ -10,3 +10,3 @@ var _concat = require('./internal/_concat'); | ||
* | ||
* This would turn, for instance, Ramda's simple `map` function into one that | ||
* This would turn, for instance, [`R.map`](#map) function into one that | ||
* more closely resembles `Array.prototype.map`. Note that this will only work | ||
@@ -13,0 +13,0 @@ * for functions in which the iteration callback function is the first |
@@ -19,5 +19,5 @@ var _concat = require('./internal/_concat'); | ||
* @sig Apply f => f (a -> b) -> f a -> f b | ||
* @param {Array} fns An array of functions | ||
* @param {Array} vs An array of values | ||
* @return {Array} An array of results of applying each of `fns` to all of `vs` in turn. | ||
* @param {*} applyF | ||
* @param {*} applyX | ||
* @return {*} | ||
* @example | ||
@@ -29,11 +29,13 @@ * | ||
*/ | ||
module.exports = _curry2(function ap(applicative, fn) { | ||
module.exports = _curry2(function ap(applyF, applyX) { | ||
return ( | ||
typeof applicative.ap === 'function' ? | ||
applicative.ap(fn) : | ||
typeof applicative === 'function' ? | ||
function(x) { return applicative(x)(fn(x)); } : | ||
typeof applyX['fantasy-land/ap'] === 'function' ? | ||
applyX['fantasy-land/ap'](applyF) : | ||
typeof applyF.ap === 'function' ? | ||
applyF.ap(applyX) : | ||
typeof applyF === 'function' ? | ||
function(x) { return applyF(x)(applyX(x)); } : | ||
// else | ||
_reduce(function(acc, f) { return _concat(acc, map(f, fn)); }, [], applicative) | ||
_reduce(function(acc, f) { return _concat(acc, map(f, applyX)); }, [], applyF) | ||
); | ||
}); |
@@ -8,3 +8,3 @@ var _aperture = require('./internal/_aperture'); | ||
/** | ||
* Returns a new list, composed of n-tuples of consecutive elements If `n` is | ||
* Returns a new list, composed of n-tuples of consecutive elements. If `n` is | ||
* greater than the length of the list, an empty list is returned. | ||
@@ -11,0 +11,0 @@ * |
@@ -17,2 +17,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` | ||
* @see R.descend | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -6,2 +6,3 @@ var _curry3 = require('./internal/_curry3'); | ||
var assoc = require('./assoc'); | ||
var isNil = require('./isNil'); | ||
@@ -39,3 +40,3 @@ | ||
if (path.length > 1) { | ||
var nextObj = _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; | ||
var nextObj = (!isNil(obj) && _has(idx, obj)) ? obj[idx] : _isInteger(path[1]) ? [] : {}; | ||
val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); | ||
@@ -42,0 +43,0 @@ } |
@@ -18,2 +18,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* arity 2. | ||
* @see R.nAry, R.unary | ||
* @example | ||
@@ -20,0 +21,0 @@ * |
@@ -7,4 +7,5 @@ var curry = require('./curry'); | ||
* arguments. This is occasionally useful as a converging function for | ||
* `R.converge`: the left branch can produce a function while the right branch | ||
* produces a value to be passed to that function as an argument. | ||
* [`R.converge`](#converge): the first branch can produce a function while the | ||
* remaining branches produce values to be passed to that function as its | ||
* arguments. | ||
* | ||
@@ -11,0 +12,0 @@ * @func |
@@ -30,3 +30,3 @@ var _curry2 = require('./internal/_curry2'); | ||
*/ | ||
module.exports = _curry2(_dispatchable(['chain'], _xchain, function chain(fn, monad) { | ||
module.exports = _curry2(_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) { | ||
if (typeof monad === 'function') { | ||
@@ -33,0 +33,0 @@ return function(x) { return fn(monad(x))(x); }; |
var _curry2 = require('./internal/_curry2'); | ||
var _isArray = require('./internal/_isArray'); | ||
var _isFunction = require('./internal/_isFunction'); | ||
var _isString = require('./internal/_isString'); | ||
var toString = require('./toString'); | ||
@@ -34,9 +35,21 @@ | ||
module.exports = _curry2(function concat(a, b) { | ||
if (a == null || !_isFunction(a.concat)) { | ||
throw new TypeError(toString(a) + ' does not have a method named "concat"'); | ||
} | ||
if (_isArray(a) && !_isArray(b)) { | ||
if (_isArray(a)) { | ||
if (_isArray(b)) { | ||
return a.concat(b); | ||
} | ||
throw new TypeError(toString(b) + ' is not an array'); | ||
} | ||
return a.concat(b); | ||
if (_isString(a)) { | ||
if (_isString(b)) { | ||
return a + b; | ||
} | ||
throw new TypeError(toString(b) + ' is not a string'); | ||
} | ||
if (a != null && _isFunction(a['fantasy-land/concat'])) { | ||
return a['fantasy-land/concat'](b); | ||
} | ||
if (a != null && _isFunction(a.concat)) { | ||
return a.concat(b); | ||
} | ||
throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); | ||
}); |
@@ -16,2 +16,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Function} A wrapped, curried constructor function. | ||
* @see R.invoker | ||
* @example | ||
@@ -18,0 +19,0 @@ * |
@@ -6,4 +6,4 @@ var _contains = require('./internal/_contains'); | ||
/** | ||
* Returns `true` if the specified value is equal, in `R.equals` terms, to at | ||
* least one element of the given list; `false` otherwise. | ||
* Returns `true` if the specified value is equal, in [`R.equals`](#equals) | ||
* terms, to at least one element of the given list; `false` otherwise. | ||
* | ||
@@ -10,0 +10,0 @@ * @func |
@@ -16,6 +16,6 @@ var _curry1 = require('./internal/_curry1'); | ||
* | ||
* Secondly, the special placeholder value `R.__` may be used to specify | ||
* Secondly, the special placeholder value [`R.__`](#__) may be used to specify | ||
* "gaps", allowing partial application of any combination of arguments, | ||
* regardless of their positions. If `g` is as above and `_` is `R.__`, the | ||
* following are equivalent: | ||
* regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), | ||
* the following are equivalent: | ||
* | ||
@@ -22,0 +22,0 @@ * - `g(1, 2, 3)` |
@@ -18,6 +18,6 @@ var _arity = require('./internal/_arity'); | ||
* | ||
* Secondly, the special placeholder value `R.__` may be used to specify | ||
* Secondly, the special placeholder value [`R.__`](#__) may be used to specify | ||
* "gaps", allowing partial application of any combination of arguments, | ||
* regardless of their positions. If `g` is as above and `_` is `R.__`, the | ||
* following are equivalent: | ||
* regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), | ||
* the following are equivalent: | ||
* | ||
@@ -24,0 +24,0 @@ * - `g(1, 2, 3)` |
@@ -5,3 +5,3 @@ var _curry2 = require('./internal/_curry2'); | ||
/** | ||
* Returns the second argument if it is not `null`, `undefined` or `NaN` | ||
* Returns the second argument if it is not `null`, `undefined` or `NaN`; | ||
* otherwise the first argument is returned. | ||
@@ -8,0 +8,0 @@ * |
@@ -17,2 +17,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` | ||
* @see R.ascend | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -7,4 +7,4 @@ var _contains = require('./internal/_contains'); | ||
* Finds the set (i.e. no duplicates) of all elements in the first list not | ||
* contained in the second list. Objects and Arrays are compared are compared | ||
* in terms of value equality, not reference equality. | ||
* contained in the second list. Objects and Arrays are compared in terms of | ||
* value equality, not reference equality. | ||
* | ||
@@ -19,3 +19,3 @@ * @func | ||
* @return {Array} The elements in `list1` that are not in `list2`. | ||
* @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith | ||
* @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without | ||
* @example | ||
@@ -22,0 +22,0 @@ * |
var _curry2 = require('./internal/_curry2'); | ||
var _isInteger = require('./internal/_isInteger'); | ||
var assoc = require('./assoc'); | ||
var dissoc = require('./dissoc'); | ||
var remove = require('./remove'); | ||
var update = require('./update'); | ||
@@ -15,3 +18,4 @@ | ||
* @category Object | ||
* @sig [String] -> {k: v} -> {k: v} | ||
* @typedefn Idx = String | Int | ||
* @sig [Idx] -> {k: v} -> {k: v} | ||
* @param {Array} path The path to the value to omit | ||
@@ -30,8 +34,14 @@ * @param {Object} obj The object to clone | ||
case 1: | ||
return dissoc(path[0], obj); | ||
return _isInteger(path[0]) ? remove(path[0], 1, obj) : dissoc(path[0], obj); | ||
default: | ||
var head = path[0]; | ||
var tail = Array.prototype.slice.call(path, 1); | ||
return obj[head] == null ? obj : assoc(head, dissocPath(tail, obj[head]), obj); | ||
if (obj[head] == null) { | ||
return obj; | ||
} else if (_isInteger(path[0])) { | ||
return update(head, dissocPath(tail, obj[head]), obj); | ||
} else { | ||
return assoc(head, dissocPath(tail, obj[head]), obj); | ||
} | ||
} | ||
}); |
@@ -20,4 +20,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* @param {Number} n | ||
* @param {[a]} list | ||
* @return {[a]} A copy of list without the first `n` elements | ||
* @param {*} list | ||
* @return {*} A copy of list without the first `n` elements | ||
* @see R.take, R.transduce, R.dropLast, R.dropWhile | ||
@@ -24,0 +24,0 @@ * @example |
@@ -9,4 +9,4 @@ var _curry1 = require('./internal/_curry1'); | ||
/** | ||
* Returns a new list without any consecutively repeating elements. `R.equals` | ||
* is used to determine equality. | ||
* Returns a new list without any consecutively repeating elements. | ||
* [`R.equals`](#equals) is used to determine equality. | ||
* | ||
@@ -13,0 +13,0 @@ * Acts as a transducer if a transformer is given in list position. |
@@ -32,2 +32,6 @@ var _curry1 = require('./internal/_curry1'); | ||
return ( | ||
(x != null && typeof x['fantasy-land/empty'] === 'function') ? | ||
x['fantasy-land/empty']() : | ||
(x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function') ? | ||
x.constructor['fantasy-land/empty']() : | ||
(x != null && typeof x.empty === 'function') ? | ||
@@ -34,0 +38,0 @@ x.empty() : |
@@ -6,4 +6,4 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* Reports whether two objects have the same value, in `R.equals` terms, for | ||
* the specified property. Useful as a curried predicate. | ||
* Reports whether two objects have the same value, in [`R.equals`](#equals) | ||
* terms, for the specified property. Useful as a curried predicate. | ||
* | ||
@@ -10,0 +10,0 @@ * @func |
@@ -11,5 +11,6 @@ var _curry2 = require('./internal/_curry2'); | ||
/** | ||
* Takes a predicate and a "filterable", and returns a new filterable of the | ||
* Takes a predicate and a `Filterable`, and returns a new filterable of the | ||
* same type containing the members of the given filterable which satisfy the | ||
* given predicate. | ||
* given predicate. Filterable objects include plain objects or any object | ||
* that has a filter method such as `Array`. | ||
* | ||
@@ -27,3 +28,3 @@ * Dispatches to the `filter` method of the second argument, if present. | ||
* @param {Array} filterable | ||
* @return {Array} | ||
* @return {Array} Filterable | ||
* @see R.reject, R.transduce, R.addIndex | ||
@@ -30,0 +31,0 @@ * @example |
@@ -5,3 +5,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* Takes a list and returns a list of lists where each sublist's elements are | ||
* all "equal" according to the provided equality function. | ||
* all satisfied pairwise comparison according to the provided function. | ||
* Only adjacent elements are passed to the comparison function. | ||
* | ||
@@ -17,3 +18,3 @@ * @func | ||
* treated as a list of characters. | ||
* @return {List} A list that contains sublists of equal elements, | ||
* @return {List} A list that contains sublists of elements, | ||
* whose concatenations are equal to the original list. | ||
@@ -25,2 +26,5 @@ * @example | ||
* | ||
* R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) | ||
* //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] | ||
* | ||
* R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) | ||
@@ -38,3 +42,3 @@ * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] | ||
var nextidx = idx + 1; | ||
while (nextidx < len && fn(list[idx], list[nextidx])) { | ||
while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { | ||
nextidx += 1; | ||
@@ -41,0 +45,0 @@ } |
@@ -8,4 +8,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* Returns the position of the first occurrence of an item in an array, or -1 | ||
* if the item is not included in the array. `R.equals` is used to determine | ||
* equality. | ||
* if the item is not included in the array. [`R.equals`](#equals) is used to | ||
* determine equality. | ||
* | ||
@@ -12,0 +12,0 @@ * @func |
@@ -5,3 +5,4 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* Inserts the supplied element into the list, at index `index`. _Note that | ||
* Inserts the supplied element into the list, at the specified `index`. _Note that | ||
* this is not destructive_: it returns a copy of the list with the changes. | ||
@@ -8,0 +9,0 @@ * <small>No lists have been harmed in the application of this function.</small> |
@@ -5,3 +5,3 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* Inserts the sub-list into the list, at index `index`. _Note that this is not | ||
* Inserts the sub-list into the list, at the specified `index`. _Note that this is not | ||
* destructive_: it returns a copy of the list with the changes. | ||
@@ -8,0 +8,0 @@ * <small>No lists have been harmed in the application of this function.</small> |
@@ -22,2 +22,7 @@ var _arrayFromIterator = require('./_arrayFromIterator'); | ||
if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { | ||
return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && | ||
typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); | ||
} | ||
if (typeof a.equals === 'function' || typeof b.equals === 'function') { | ||
@@ -24,0 +29,0 @@ return typeof a.equals === 'function' && a.equals(b) && |
var _forceReduced = require('./_forceReduced'); | ||
var _isArrayLike = require('./_isArrayLike'); | ||
var _reduce = require('./_reduce'); | ||
var _xfBase = require('./_xfBase'); | ||
var isArrayLike = require('../isArrayLike'); | ||
@@ -28,3 +28,3 @@ module.exports = (function() { | ||
'@@transducer/step': function(result, input) { | ||
return !isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); | ||
return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); | ||
} | ||
@@ -31,0 +31,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
var isArrayLike = require('../isArrayLike'); | ||
var _isArrayLike = require('./_isArrayLike'); | ||
@@ -18,3 +18,3 @@ | ||
while (idx < ilen) { | ||
if (isArrayLike(list[idx])) { | ||
if (_isArrayLike(list[idx])) { | ||
value = recursive ? flatt(list[idx]) : list[idx]; | ||
@@ -21,0 +21,0 @@ j = 0; |
@@ -0,4 +1,4 @@ | ||
var _isArrayLike = require('./_isArrayLike'); | ||
var _xwrap = require('./_xwrap'); | ||
var bind = require('../bind'); | ||
var isArrayLike = require('../isArrayLike'); | ||
@@ -34,4 +34,4 @@ | ||
function _methodReduce(xf, acc, obj) { | ||
return xf['@@transducer/result'](obj.reduce(bind(xf['@@transducer/step'], xf), acc)); | ||
function _methodReduce(xf, acc, obj, methodName) { | ||
return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc)); | ||
} | ||
@@ -44,7 +44,7 @@ | ||
} | ||
if (isArrayLike(list)) { | ||
if (_isArrayLike(list)) { | ||
return _arrayReduce(fn, acc, list); | ||
} | ||
if (typeof list.reduce === 'function') { | ||
return _methodReduce(fn, acc, list); | ||
if (typeof list['fantasy-land/reduce'] === 'function') { | ||
return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); | ||
} | ||
@@ -57,4 +57,8 @@ if (list[symIterator] != null) { | ||
} | ||
if (typeof list.reduce === 'function') { | ||
return _methodReduce(fn, acc, list, 'reduce'); | ||
} | ||
throw new TypeError('reduce: list must be array or iterable'); | ||
}; | ||
}()); |
var _assign = require('./_assign'); | ||
var _identity = require('./_identity'); | ||
var _isArrayLike = require('./_isArrayLike'); | ||
var _isTransformer = require('./_isTransformer'); | ||
var isArrayLike = require('../isArrayLike'); | ||
var objOf = require('../objOf'); | ||
@@ -27,3 +27,3 @@ | ||
result, | ||
isArrayLike(input) ? objOf(input[0], input[1]) : input | ||
_isArrayLike(input) ? objOf(input[0], input[1]) : input | ||
); | ||
@@ -38,3 +38,3 @@ }, | ||
} | ||
if (isArrayLike(obj)) { | ||
if (_isArrayLike(obj)) { | ||
return _stepCatArray; | ||
@@ -41,0 +41,0 @@ } |
@@ -16,3 +16,3 @@ var _curry2 = require('./_curry2'); | ||
var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); | ||
return this.i >= this.n ? _reduced(ret) : ret; | ||
return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret; | ||
}; | ||
@@ -19,0 +19,0 @@ |
@@ -20,3 +20,3 @@ var _contains = require('./internal/_contains'); | ||
* @return {Array} The list of elements found in both `list1` and `list2`. | ||
* @see R.intersectionWith | ||
* @see R.innerJoin | ||
* @example | ||
@@ -23,0 +23,0 @@ * |
@@ -21,3 +21,4 @@ var _containsWith = require('./internal/_containsWith'); | ||
* @return {Array} A new list containing those elements common to both lists. | ||
* @see R.intersection | ||
* @see R.innerJoin | ||
* @deprecated since v0.24.0 | ||
* @example | ||
@@ -24,0 +25,0 @@ * |
@@ -24,3 +24,4 @@ var _clone = require('./internal/_clone'); | ||
* | ||
* The iteration is performed with R.reduce after initializing the transducer. | ||
* The iteration is performed with [`R.reduce`](#reduce) after initializing the | ||
* transducer. | ||
* | ||
@@ -27,0 +28,0 @@ * @func |
@@ -7,4 +7,4 @@ var _curry1 = require('./internal/_curry1'); | ||
/** | ||
* Same as R.invertObj, however this accounts for objects with duplicate values | ||
* by putting the values into an array. | ||
* Same as [`R.invertObj`](#invertObj), however this accounts for objects with | ||
* duplicate values by putting the values into an array. | ||
* | ||
@@ -17,4 +17,4 @@ * @func | ||
* @param {Object} obj The object or array to invert | ||
* @return {Object} out A new object with keys | ||
* in an array. | ||
* @return {Object} out A new object with keys in an array. | ||
* @see R.invertObj | ||
* @example | ||
@@ -21,0 +21,0 @@ * |
@@ -17,2 +17,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Object} out A new object | ||
* @see R.invert | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -23,2 +23,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* @return {Function} A new curried function. | ||
* @see R.construct | ||
* @example | ||
@@ -25,0 +26,0 @@ * |
@@ -19,2 +19,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Array} An array of the object's own properties. | ||
* @see R.keysIn, R.values | ||
* @example | ||
@@ -21,0 +22,0 @@ * |
@@ -17,2 +17,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Array} An array of the object's own and prototype properties. | ||
* @see R.keys, R.valuesIn | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -8,4 +8,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* Returns the position of the last occurrence of an item in an array, or -1 if | ||
* the item is not included in the array. `R.equals` is used to determine | ||
* equality. | ||
* the item is not included in the array. [`R.equals`](#equals) is used to | ||
* determine equality. | ||
* | ||
@@ -12,0 +12,0 @@ * @func |
@@ -45,3 +45,3 @@ var _curry2 = require('./internal/_curry2'); | ||
*/ | ||
module.exports = _curry2(_dispatchable(['map'], _xmap, function map(fn, functor) { | ||
module.exports = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) { | ||
switch (Object.prototype.toString.call(functor)) { | ||
@@ -48,0 +48,0 @@ case '[object Function]': |
@@ -5,3 +5,3 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* The mapAccum function behaves like a combination of map and reduce; it | ||
* The `mapAccum` function behaves like a combination of map and reduce; it | ||
* applies a function to each element of a list, passing an accumulating | ||
@@ -8,0 +8,0 @@ * parameter from left to right, and returning a final value of this |
@@ -5,3 +5,3 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* The mapAccumRight function behaves like a combination of map and reduce; it | ||
* The `mapAccumRight` function behaves like a combination of map and reduce; it | ||
* applies a function to each element of a list, passing an accumulating | ||
@@ -11,4 +11,4 @@ * parameter from right to left, and returning a final value of this | ||
* | ||
* Similar to `mapAccum`, except moves through the input list from the right to | ||
* the left. | ||
* Similar to [`mapAccum`](#mapAccum), except moves through the input list from | ||
* the right to the left. | ||
* | ||
@@ -15,0 +15,0 @@ * The iterator function receives two arguments, *value* and *acc*, and should |
@@ -7,5 +7,5 @@ var _curry2 = require('./internal/_curry2'); | ||
/** | ||
* An Object-specific version of `map`. The function is applied to three | ||
* An Object-specific version of [`map`](#map). The function is applied to three | ||
* arguments: *(value, key, obj)*. If only the value is significant, use | ||
* `map` instead. | ||
* [`map`](#map) instead. | ||
* | ||
@@ -12,0 +12,0 @@ * @func |
@@ -6,6 +6,6 @@ var _curry2 = require('./internal/_curry2'); | ||
/** | ||
* mathMod behaves like the modulo operator should mathematically, unlike the | ||
* `%` operator (and by extension, R.modulo). So while "-17 % 5" is -2, | ||
* mathMod(-17, 5) is 3. mathMod requires Integer arguments, and returns NaN | ||
* when the modulus is zero or negative. | ||
* `mathMod` behaves like the modulo operator should mathematically, unlike the | ||
* `%` operator (and by extension, [`R.modulo`](#modulo)). So while | ||
* `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer | ||
* arguments, and returns NaN when the modulus is zero or negative. | ||
* | ||
@@ -20,2 +20,3 @@ * @func | ||
* @return {Number} The result of `b mod a`. | ||
* @see R.modulo | ||
* @example | ||
@@ -22,0 +23,0 @@ * |
@@ -15,2 +15,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Number} | ||
* @see R.median | ||
* @example | ||
@@ -17,0 +18,0 @@ * |
@@ -15,2 +15,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Number} | ||
* @see R.mean | ||
* @example | ||
@@ -17,0 +18,0 @@ * |
@@ -1,4 +0,2 @@ | ||
var _arity = require('./internal/_arity'); | ||
var _curry1 = require('./internal/_curry1'); | ||
var _has = require('./internal/_has'); | ||
var memoizeWith = require('./memoizeWith'); | ||
var toString = require('./toString'); | ||
@@ -21,6 +19,7 @@ | ||
* @return {Function} Memoized version of `fn`. | ||
* @see R.memoizeWith | ||
* @example | ||
* | ||
* var count = 0; | ||
* var factorial = R.memoize(n => { | ||
* let count = 0; | ||
* const factorial = R.memoize(n => { | ||
* count += 1; | ||
@@ -34,11 +33,2 @@ * return R.product(R.range(1, n + 1)); | ||
*/ | ||
module.exports = _curry1(function memoize(fn) { | ||
var cache = {}; | ||
return _arity(fn.length, function() { | ||
var key = toString(arguments); | ||
if (!_has(key, cache)) { | ||
cache[key] = fn.apply(this, arguments); | ||
} | ||
return cache[key]; | ||
}); | ||
}); | ||
module.exports = memoizeWith(toString); |
@@ -18,3 +18,3 @@ var _assign = require('./internal/_assign'); | ||
* @return {Object} | ||
* @see R.mergeWith, R.mergeWithKey | ||
* @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey | ||
* @example | ||
@@ -21,0 +21,0 @@ * |
@@ -9,4 +9,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* associated with the key in each object, with the result being used as the | ||
* value associated with the key in the returned object. The key will be | ||
* excluded from the returned object if the resulting value is `undefined`. | ||
* value associated with the key in the returned object. | ||
* | ||
@@ -22,3 +21,3 @@ * @func | ||
* @return {Object} | ||
* @see R.merge, R.mergeWithKey | ||
* @see R.mergeDeepWith, R.merge, R.mergeWithKey | ||
* @example | ||
@@ -25,0 +24,0 @@ * |
@@ -9,5 +9,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* and the values associated with the key in each object, with the result being | ||
* used as the value associated with the key in the returned object. The key | ||
* will be excluded from the returned object if the resulting value is | ||
* `undefined`. | ||
* used as the value associated with the key in the returned object. | ||
* | ||
@@ -23,3 +21,3 @@ * @func | ||
* @return {Object} | ||
* @see R.merge, R.mergeWith | ||
* @see R.mergeDeepWithKey, R.merge, R.mergeWith | ||
* @example | ||
@@ -26,0 +24,0 @@ * |
@@ -7,3 +7,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* that this function preserves the JavaScript-style behavior for modulo. For | ||
* mathematical modulo see `mathMod`. | ||
* mathematical modulo see [`mathMod`](#mathMod). | ||
* | ||
@@ -10,0 +10,0 @@ * @func |
@@ -18,2 +18,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* arity `n`. | ||
* @see R.binary, R.unary | ||
* @example | ||
@@ -20,0 +21,0 @@ * |
@@ -7,5 +7,6 @@ var filter = require('./filter'); | ||
/** | ||
* Takes a predicate and a list or other "filterable" object and returns the | ||
* Takes a predicate and a list or other `Filterable` object and returns the | ||
* pair of filterable objects of the same type of elements which do and do not | ||
* satisfy, the predicate, respectively. | ||
* satisfy, the predicate, respectively. Filterable objects include plain objects or any object | ||
* that has a filter method such as `Array`. | ||
* | ||
@@ -12,0 +13,0 @@ * @func |
@@ -8,3 +8,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* Determines whether a nested path on an object has a specific value, in | ||
* `R.equals` terms. Most likely used to filter a list. | ||
* [`R.equals`](#equals) terms. Most likely used to filter a list. | ||
* | ||
@@ -11,0 +11,0 @@ * @func |
@@ -10,2 +10,6 @@ var _curry2 = require('./internal/_curry2'); | ||
* | ||
* `pluck` will work on | ||
* any [functor](https://github.com/fantasyland/fantasy-land#functor) in | ||
* addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. | ||
* | ||
* @func | ||
@@ -15,5 +19,5 @@ * @memberOf R | ||
* @category List | ||
* @sig k -> [{k: v}] -> [v] | ||
* @sig Functor f => k -> f {k: v} -> f v | ||
* @param {Number|String} key The key name to pluck off of each object. | ||
* @param {Array} list The array to consider. | ||
* @param {Array} f The array or functor to consider. | ||
* @return {Array} The list of values for the given key. | ||
@@ -25,2 +29,3 @@ * @see R.props | ||
* R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] | ||
* R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} | ||
* @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] | ||
@@ -27,0 +32,0 @@ * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] |
@@ -6,4 +6,4 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* Returns `true` if the specified object property is equal, in `R.equals` | ||
* terms, to the given value; `false` otherwise. | ||
* Returns `true` if the specified object property is equal, in | ||
* [`R.equals`](#equals) terms, to the given value; `false` otherwise. | ||
* | ||
@@ -10,0 +10,0 @@ * @func |
@@ -11,5 +11,6 @@ var _curry3 = require('./internal/_curry3'); | ||
* The iterator function receives two values: *(acc, value)*. It may use | ||
* `R.reduced` to shortcut the iteration. | ||
* [`R.reduced`](#reduced) to shortcut the iteration. | ||
* | ||
* The arguments' order of `reduceRight`'s iterator function is *(value, acc)*. | ||
* The arguments' order of [`reduceRight`](#reduceRight)'s iterator function | ||
* is *(value, acc)*. | ||
* | ||
@@ -21,3 +22,5 @@ * Note: `R.reduce` does not skip deleted or unassigned indices (sparse | ||
* | ||
* Dispatches to the `reduce` method of the third argument, if present. | ||
* Dispatches to the `reduce` method of the third argument, if present. When | ||
* doing so, it is up to the user to handle the [`R.reduced`](#reduced) | ||
* shortcuting, as this is not implemented by `reduce`. | ||
* | ||
@@ -24,0 +27,0 @@ * @func |
@@ -13,3 +13,3 @@ var _curryN = require('./internal/_curryN'); | ||
* | ||
* This function is basically a more general `groupBy` function. | ||
* This function is basically a more general [`groupBy`](#groupBy) function. | ||
* | ||
@@ -16,0 +16,0 @@ * Acts as a transducer if a transformer is given in list position. |
@@ -10,3 +10,4 @@ var _curry1 = require('./internal/_curry1'); | ||
* Note: this optimization is unavailable to functions not explicitly listed | ||
* above. For instance, it is not currently supported by reduceRight. | ||
* above. For instance, it is not currently supported by | ||
* [`reduceRight`](#reduceRight). | ||
* | ||
@@ -23,8 +24,8 @@ * @func | ||
* | ||
* R.reduce( | ||
* R.pipe(R.add, R.when(R.gte(R.__, 10), R.reduced)), | ||
* 0, | ||
* [1, 2, 3, 4, 5]) // 10 | ||
* R.reduce( | ||
* (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), | ||
* [], | ||
* [1, 2, 3, 4, 5]) // [1, 2, 3] | ||
*/ | ||
module.exports = _curry1(_reduced); |
@@ -9,4 +9,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* | ||
* Similar to `reduce`, except moves through the input list from the right to | ||
* the left. | ||
* Similar to [`reduce`](#reduce), except moves through the input list from the | ||
* right to the left. | ||
* | ||
@@ -17,3 +17,3 @@ * The iterator function receives two values: *(value, acc)*, while the arguments' | ||
* Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse | ||
* arrays), unlike the native `Array.prototype.reduce` method. For more details | ||
* arrays), unlike the native `Array.prototype.reduceRight` method. For more details | ||
* on this behavior, see: | ||
@@ -20,0 +20,0 @@ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description |
@@ -7,7 +7,7 @@ var _curryN = require('./internal/_curryN'); | ||
/** | ||
* Like `reduce`, `reduceWhile` returns a single item by iterating through | ||
* the list, successively calling the iterator function. `reduceWhile` also | ||
* takes a predicate that is evaluated before each step. If the predicate returns | ||
* `false`, it "short-circuits" the iteration and returns the current value | ||
* of the accumulator. | ||
* Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating | ||
* through the list, successively calling the iterator function. `reduceWhile` | ||
* also takes a predicate that is evaluated before each step. If the predicate | ||
* returns `false`, it "short-circuits" the iteration and returns the current | ||
* value of the accumulator. | ||
* | ||
@@ -14,0 +14,0 @@ * @func |
@@ -7,5 +7,7 @@ var _complement = require('./internal/_complement'); | ||
/** | ||
* The complement of `filter`. | ||
* The complement of [`filter`](#filter). | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
* Acts as a transducer if a transformer is given in list position. Filterable | ||
* objects include plain objects or any object that has a filter method such | ||
* as `Array`. | ||
* | ||
@@ -12,0 +14,0 @@ * @func |
@@ -17,2 +17,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* @return {Array} A new array containing `n` `value`s. | ||
* @see R.times | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -5,4 +5,4 @@ var _curry3 = require('./internal/_curry3'); | ||
/** | ||
* Scan is similar to reduce, but returns a list of successively reduced values | ||
* from the left | ||
* Scan is similar to [`reduce`](#reduce), but returns a list of successively | ||
* reduced values from the left | ||
* | ||
@@ -19,2 +19,3 @@ * @func | ||
* @return {Array} A list of all intermediately reduced values. | ||
* @see R.reduce | ||
* @example | ||
@@ -21,0 +22,0 @@ * |
@@ -19,2 +19,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* @return {Array} An array containing the return values of all calls to `fn`. | ||
* @see R.repeat | ||
* @example | ||
@@ -21,0 +22,0 @@ * |
@@ -15,3 +15,3 @@ var _reduce = require('./internal/_reduce'); | ||
* passed directly in place of an iterator function. In both cases, iteration | ||
* may be stopped early with the `R.reduced` function. | ||
* may be stopped early with the [`R.reduced`](#reduced) function. | ||
* | ||
@@ -25,7 +25,7 @@ * A transducer is a function that accepts a transformer and returns a | ||
* function in reduce. The result function is used to convert the final | ||
* accumulator into the return type and in most cases is R.identity. The init | ||
* function can be used to provide an initial accumulator, but is ignored by | ||
* transduce. | ||
* accumulator into the return type and in most cases is | ||
* [`R.identity`](#identity). The init function can be used to provide an | ||
* initial accumulator, but is ignored by transduce. | ||
* | ||
* The iteration is performed with R.reduce after initializing the transducer. | ||
* The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. | ||
* | ||
@@ -32,0 +32,0 @@ * @func |
@@ -22,4 +22,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* | ||
* If some of the rows are shorter than the following rows, their elements are skipped: | ||
* | ||
* // If some of the rows are shorter than the following rows, their elements are skipped: | ||
* R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] | ||
@@ -26,0 +25,0 @@ * @symb R.transpose([[a], [b], [c]]) = [a, b, c] |
@@ -33,3 +33,5 @@ var _curry3 = require('./internal/_curry3'); | ||
module.exports = _curry3(function traverse(of, f, traversable) { | ||
return sequence(of, map(f, traversable)); | ||
return typeof traversable['fantasy-land/traverse'] === 'function' ? | ||
traversable['fantasy-land/traverse'](f, of) : | ||
sequence(of, map(f, traversable)); | ||
}); |
@@ -26,2 +26,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* R.type(/[A-z]/); //=> "RegExp" | ||
* R.type(() => {}); //=> "Function" | ||
*/ | ||
@@ -28,0 +29,0 @@ module.exports = _curry1(function type(val) { |
@@ -12,4 +12,4 @@ var _curry1 = require('./internal/_curry1'); | ||
* | ||
* In other words, R.unapply derives a variadic function from a function which | ||
* takes an array. R.unapply is the inverse of R.apply. | ||
* In other words, `R.unapply` derives a variadic function from a function which | ||
* takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). | ||
* | ||
@@ -16,0 +16,0 @@ * @func |
@@ -18,2 +18,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* arity 1. | ||
* @see R.binary, R.nAry | ||
* @example | ||
@@ -20,0 +21,0 @@ * |
@@ -7,3 +7,3 @@ var identity = require('./identity'); | ||
* Returns a new list containing only one copy of each element in the original | ||
* list. `R.equals` is used to determine equality. | ||
* list. [`R.equals`](#equals) is used to determine equality. | ||
* | ||
@@ -10,0 +10,0 @@ * @func |
@@ -9,3 +9,3 @@ var _Set = require('./internal/_Set'); | ||
* each list element. Prefers the first item if the supplied function produces | ||
* the same value on two items. `R.equals` is used for comparison. | ||
* the same value on two items. [`R.equals`](#equals) is used for comparison. | ||
* | ||
@@ -12,0 +12,0 @@ * @func |
@@ -24,6 +24,5 @@ var _curry3 = require('./internal/_curry3'); | ||
* | ||
* // coerceArray :: (a|[a]) -> [a] | ||
* var coerceArray = R.unless(R.isArrayLike, R.of); | ||
* coerceArray([1, 2, 3]); //=> [1, 2, 3] | ||
* coerceArray(1); //=> [1] | ||
* let safeInc = R.unless(R.isNil, R.inc); | ||
* safeInc(null); //=> null | ||
* safeInc(1); //=> 2 | ||
*/ | ||
@@ -30,0 +29,0 @@ module.exports = _curry3(function unless(pred, whenFalseFn, x) { |
@@ -17,2 +17,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Array} An array of the values of the object's own properties. | ||
* @see R.valuesIn, R.keys | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -17,2 +17,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Array} An array of the values of the object's own and prototype properties. | ||
* @see R.values, R.keysIn | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -28,3 +28,3 @@ var _curry2 = require('./internal/_curry2'); | ||
var Const = function(x) { | ||
return {value: x, map: function() { return this; }}; | ||
return {value: x, 'fantasy-land/map': function() { return this; }}; | ||
}; | ||
@@ -31,0 +31,0 @@ |
@@ -13,3 +13,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* `where` is well suited to declaratively expressing constraints for other | ||
* functions such as `filter` and `find`. | ||
* functions such as [`filter`](#filter) and [`find`](#find). | ||
* | ||
@@ -30,4 +30,4 @@ * @func | ||
* b: R.complement(R.equals('bar')), | ||
* x: R.gt(__, 10), | ||
* y: R.lt(__, 20) | ||
* x: R.gt(R.__, 10), | ||
* y: R.lt(R.__, 20) | ||
* }); | ||
@@ -34,0 +34,0 @@ * |
@@ -11,3 +11,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* spec's own properties, accessing that property of the object gives the same | ||
* value (in `R.equals` terms) as accessing that property of the spec. | ||
* value (in [`R.equals`](#equals) terms) as accessing that property of the | ||
* spec. | ||
* | ||
@@ -14,0 +15,0 @@ * `whereEq` is a specialization of [`where`](#where). |
@@ -9,3 +9,3 @@ var _contains = require('./internal/_contains'); | ||
* Returns a new list without values in the first argument. | ||
* `R.equals` is used to determine equality. | ||
* [`R.equals`](#equals) is used to determine equality. | ||
* | ||
@@ -22,3 +22,3 @@ * Acts as a transducer if a transformer is given in list position. | ||
* @return {Array} The new array without values in `list1`. | ||
* @see R.transduce | ||
* @see R.transduce, R.difference | ||
* @example | ||
@@ -25,0 +25,0 @@ * |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
194
682107
325
18740
2