partial.lenses
Advanced tools
Comparing version 14.13.0 to 14.14.0
# Partial Lenses Changelog | ||
## 14.14.0 | ||
Renamed `L.append` to `L.appendTo`. This means that `L.append` is deprecated. | ||
Code using it should be switched to use `L.appendTo`. This change was made due | ||
to introducing new `L.prependTo` and `L.assignTo` lenses for similar partial | ||
updates. | ||
```diff | ||
-L.append | ||
+L.appendTo | ||
``` | ||
Deprecated `L.propsOf`. `L.propsOf` was introduced to implement `L.assign`. | ||
Now `L.assignTo` allows for a simpler implementation of `L.assign` and more. | ||
## 14.11.1 | ||
@@ -4,0 +19,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],n):n(r.L={},r.I)}(this,function(r,g){"use strict";function n(r){switch(typeof r){case"boolean":case"number":case"string":return!0;default:return!1}}function i(r,n){for(var t=0,u=n[I];t<u;++t){var i=r(n[t],t);if(void 0!==i)return i}}function e(r,n,t,u){var i=r.map,e=r.ap,o=r.of(yr),f=t[I];if(i===g.sndU){for(var c=0;c<f;++c)o=e(o,n(t[c],c));return o}for(var a=yr(u),v=0;v<f;++v)o=e(i(a,o),n(t[v],v));return i(lr,o)}function a(r,n){var t=n[I]-r;if(t<2)return t?Cn(n[r]):Br;for(var i=Cn(n[r+--t]),e=function(t,u){return function(r,n){return i(r,n,t,u)}};--t;)e=Ir(Cn(n[r+t]),e);var o=Cn(n[r]);return function(r,n,t,u){return o(r,n,t,e(t,u))}}function u(r,n,t,u){for(var i,e,o=r[I],f=Array(o),c=0;c<o;++c)switch(f[c]=t,typeof(i=r[c])){case"string":t=Ar(i,t);break;case"number":t=jr(i,t);break;default:t=a(c,r)(t,r[c-1],g.Identity,n||g.always(u)),o=c}for(o===r[I]&&(t=n?n(t,r[o-1]):u);0<=--o;)t=g.isString(e=r[o])?gr(e,t,f[o]):Or(e,t,f[o]);return t}function t(r){this[On]=r,g.freeze(this)}function o(r){for(;Sn[I]<r;)Sn.push(new wn(Sn[I]));return Sn}function p(r,n,t,u){if(void 0!==u){if(n in t)return g.acyclicEqualsU(t[n],u);t[n]=u;var i=r[n];return!i||i(u)}}function l(f,o){if(void 0===o||It(En,jt,o))return function(r,n){return g.acyclicEqualsU(o,n)};if(Un(o)){var t=o[On][0][On];return t<0?P:function(r,n){return p(f,t,r,n)}}if(g.isArray(o)){for(var c=[],a=[],v=void 0,s=o[I],r=0;r<s;++r){var n=o[r];In(n)?f[v=n[On]]=Fn:(void 0!==v?a:c).push(l(f,n))}return function(r,n){if(Pn(n)){var t=n[I];if(!(void 0!==v?t<s-1:t!==s)){for(var u=c[I],i=0;i<u;++i)if(!c[i](r,n[i]))return;var e=a[I];t-=e;for(var o=0;o<e;++o)if(!a[o](r,n[t+o]))return;return!(0<=v)||p(f,v,r,or(Array(t-u),0,n,u,t))}}}}var d=o[On];d&&(f[d=d[0][On]]=kn),o=$n(gt,function(r,n){return xn(n)?void 0:l(f,r)},o);var y=Nt(gt,o);return function(r,n){if(!En(n)&&!g.isArray(n)){n=Pr(n);var t=0<=d&&{},u=0;for(var i in n){var e=o[i];if(e){if(!e(r,n[i]))return;u++}else{if(void 0===d)return;t&&(t[i]=n[i])}}return u===y&&(!t||p(f,d,r,Z(t)))}}}function f(e,r){if(!xn(r)){if(void 0===e||It(En,jt,e))return g.always(e);if(Un(e)){var n=e[On][0][On];return function(r){return r[n]}}if(g.isArray(e)){for(var a=[],v=[],s=void 0,t=e[I],u=0;u<t;++u){var i=e[u];In(i)?s=i[On]:(void 0!==s?v:a).push(f(i))}return rr(function(r){for(var n=[],t=0,u=a[I];t<u;++t)Mn(n,a[t](r));if(0<=s){var i=r[s];if(i)for(var e=0,o=i[I];e<o;++e)Mn(n,i[e])}for(var f=0,c=v[I];f<c;++f)Mn(n,v[f](r));return n})}var o=e[On];return o&&(o=o[0][On]),e=$n(gt,f,e),rr(function(r){var n={};for(var t in e)qn(n,t,e[t](r));if(0<=o){var u=r[o];if(u)for(var i in u)qn(n,i,u[i])}return n})}}function c(i){function e(r,n,t,u){return o(r,n,t,u)}var o=function(r,n,t,u){return(o=Cn(i(e)))(r,n,t,u)};return e}function v(r,n,t,u){return Pn(r)?yn(r,n,t,u):t.of(r)}function s(r,n,t,u){return g.isArray(r)?yn(r,n,t,u):g.isObject(r)?gt(r,n,t,u):t.of(r)}function d(r,n,u,i){return function r(n,t){return g.isArray(n)?yn(n,t,u,r):void 0!==n?i(n,t):u.of(n)}(r,n)}function y(n,r){return 1<arguments[I]?kr(P,n,r):function(r){return kr(P,n,r)}}function m(n,r,t,u){var i=Pn(n)?n[I]:0;return t.map(function(r){return Or(i,r,n)},u(void 0,i))}function h(o){var f=1<arguments[I]?arguments[1]:{hint:0};return function(r,n,t,u){var i=Pn(r)?r:"",e=f.hint=function(r,n,t){var u=r.hint,i=t[I];i<=u&&(u=i-1),u<0&&(u=0);for(var e=u-1;0<=e&&u<i;++u,--e){if(n(t[u],u,r))return u;if(n(t[e],e,r))return e}for(;u<i;++u)if(n(t[u],u,r))return u;for(;0<=e;--e)if(n(t[e],e,r))return e;return i}(f,o,i);return t.map(function(r){return Or(e,r,i)},u(i[e],e))}}function A(){for(var r,n=arguments[I],t={},u=0;u<n;++u)t[r=arguments[u]]=r;return bu(t)}function b(n,r){return 1<arguments[I]?Sr(n,r):function(r){return Sr(n,r)}}function j(r){var n=0;g.isFunction(r)&&(r=r.apply(null,o(n=r[I])));var t=Array(n),u=r.map(function(r){return l(t,r)}),i=r.map(f);return zr(zn(n,u[0],i[1]),zn(n,u[1],i[0]))}function O(r){var n=0;g.isFunction(r)&&(r=r.apply(null,o(n=r[I])));var t=l(Array(n),r);return x(function(r){return t(Array(n),r)})}function x(r){var n=gn(r);return zr(n,n)}var I="length",w=function(r,n){return r+n},U=function(r,n){return r*n},S=g.curry(w),E=g.curry(U),F=g.curry(function(r,n){return n/r}),k=function(r){return-r},q=function(r,n){return r<n},M=function(r,n){return n<r},z=g.curry(g.isInstanceOfU),N=function(r){return g.assign(g.create(null),r)},R=g.freeze(N(g.object0)),D=g.curry(function(r,n,t){return t.replace(r,n)}),W=Symbol.iterator,P=function(r){return r},B=function(r){return r},C=function(r){return r},L=function(r,n){return g.isString(r)?new RegExp(D(/[|\\{}()[\]^$+*?.]/g,"\\$&",r),n):r},T=function(r){return g.isArray(r)&&2===r[I]},$=function(n){return C(function(r){try{return n(r)}catch(r){return r}})},_=function(r){return void 0!==r?String(r):""},J=function(r,n,t,u){return void 0!==u?Math.min(Math.max(r,u<0?n+u:u),n):t},G=function(n){return function(r){return[r,n]}},H=function(n){return function(r){return void 0!==n&&void 0!==r?[n,r]:void 0}},K=function(n){return function(r){return void 0!==r?r:n}},Q=K(0),V=g.always(!0),X=function(r){return void 0!==r?!r:r},Y=function(n,t){return C(function(r){return n(r)?t(r):void 0})},Z=P,rr=P,nr=function(r){return!(r instanceof Object)||g.isArray(r)},tr=P(function(r){if(Pn(r)){for(var n=r[I],t=Array(n),u=0;n;)t[u++]=r[--n];return t}}),ur=P(function(r,n,t){for(var u=n[I],i=Array(u),e=0,o=!0,f=0;f<u;++f){var c=n[f],a=r(c,f);t!==a&&(i[e++]=a,o&&(o=c===a&&(0!==c||1/c==1/a)||c!=c&&a!=a))}return e!==u?(i[I]=e,i):o?n:i}),ir=function(r,n){return Pn(n)?ur(r,n,void 0):void 0},er=P(function(r,n){if(g.isArray(n)){for(var t=n[I],u=Array(),i=0;i<t;++i)if(void 0===(u[i]=r(n[i])))return;return u}}),or=P(function(r,n,t,u,i){for(;u<i;)r[n++]=t[u++];return r}),fr=function(r,n){return g.Applicative(g.sndU,g.always(n),r)},cr=function(r){return fr(r.concat,(0,r.empty)())},ar=fr(w,0),vr=function(o){return g.curry(function(u,r,n){var i=void 0,e=void 0;return kr(function(r,n){var t=u(r,n);void 0===t||void 0!==e&&!o(t,e)||(i=r,e=t)},r,n),i})},sr=function(r,n,t,u){return Cn(t)(u,void 0,r,n)},dr=function(i,r){return g.curryN(4,C(function(t,u){return u=r(u),function(r,n){return i(sr(u,t,r,n))}}))},yr=function(t){return function(n){return function(r){return t!==r?[r,n]:n}}},pr=function(r,n){for(;yr!==r;)n.push(r[0]),r=r[1];return n},lr=P(function(r){return pr(r,[]).reverse()}),mr=g.Applicative(function(r,n){var t=n.p,u=n.x,i=n.c;return u=r(u),g.isFunction(u)||(t=[u,t]),{p:t,x:u,c:i}},function(r){return{p:[],x:r,c:void 0}},function(r,n){var t=void 0!==r.c?r:n;return{p:t.p,x:r.x(n.x),c:t.c}}),hr=function(e,o){return function(i){return function(n,r,t,u){return t.map(function(r){return o(i,r,n)},u(e(i,n),i))}}},Ar=function(r,n){return n instanceof Object?n[r]:void 0},gr=P(function(r,n,t){return void 0!==n?g.assocPartialU(r,n,t):g.dissocPartialU(r,t)||g.object0}),br=hr(Ar,gr),jr=function(r,n){return Pn(n)?n[r]:void 0},Or=P(function(r,n,t){Pn(t)||(t="");var u=t[I];if(void 0!==n){for(var i=Math.max(r+1,u),e=Array(i),o=0;o<i;++o)e[o]=t[o];return e[r]=n,e}if(u<=r)return or(Array(u),0,t,0,u);for(var f=Array(u-1),c=0;c<r;++c)f[c]=t[c];for(var a=r+1;a<u;++a)f[a-1]=t[a];return f}),xr=hr(jr,Or),Ir=function(i,r){return function(t,u){return u=r(t,u),function(r,n){return i(r,n,t,u)}}},wr=function(r,n,t){Pn(n)||(n="");var u=0;return Er(r,function(){return n[u++]},t)},Ur=P(function(r,n,t){switch(typeof r){case"string":return gr(r,n,t);case"number":return Or(r,n,t);case"object":return u(r,0,t,n);default:return 4===r[I]?r(t,void 0,g.Identity,g.always(n)):t}}),Sr=function(r,n){return Ur(r,n,void 0)},Er=P(function(r,n,t){switch(typeof r){case"string":return gr(r,n(Ar(r,t),r),t);case"number":return Or(r,n(jr(r,t),r),t);case"object":return u(r,n,t);default:return 4===r[I]?r(t,void 0,g.Identity,n):(n(r(t,void 0),void 0),t)}}),Fr=function(r,n,t){return g.resolve(Cn(r)(t,void 0,g.IdentityAsync,n))},kr=P(function(r,n,t){switch(typeof n){case"string":return r(Ar(n,t),n);case"number":return r(jr(n,t),n);case"object":for(var u,i=n[I],e=0;e<i;++e)switch(typeof(u=n[e])){case"string":t=Ar(u,t);break;case"number":t=jr(u,t);break;default:return a(e,n)(t,n[e-1],Bn,r)}return r(t,n[i-1]);default:return r!==P&&4!==n[I]?r(n(t,void 0),void 0):n(t,void 0,Bn,r)}}),qr=function(r,n){return kr(P,r,n)},Mr=function(i,e){return C(function(n,t,r,u){return r.map(function(r){return e(r,n,t)},u(i(n,t),t))})},zr=function(i,e){return C(function(r,n,t,u){return t.map(e,u(i(r),n))})},Nr=function(r,n){return zr(Y(g.isString,r),Y(g.isString,n))},Rr=function(r,n){return zr(Y(g.isNumber,r),Y(g.isNumber,n))},Dr=P(function(r,n){var t=void 0;for(var u in r){var i=r[u],e=g.isObject(i)?Dr(i,n):kr(P,i,n);void 0!==e&&(t||(t={}),t[u]=e)}return t}),Wr=P(function(r,n,t){for(var u in r){var i=n&&n[u],e=r[u];t=g.isObject(e)?Wr(e,i,t):Ur(e,i,t)}return t}),Pr=function(r){return g.constructorOf(r)!==Object?g.toObject(r):r},Br=function(r,n,t,u){return u(r,n)},Cr=P(function(i){return function(r){for(var n={},t=i[I];t--;){var u=r[0];void 0!==u&&(n[i[t]]=u),r=r[1]}return n}}),Lr=P(function(r,n,t,u,i,e){var o=void 0,f=!0,c={};for(var a in n){o=1;var v=t[a],s=n[a](v,a,i,e);void 0!==s?(c[a]=s,f&&(f=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):f=!1}var d=o;for(var y in t)if(void 0===(d&&n[y])){o=1;var p=t[y],l=r(p,y,i,e);void 0!==l?(c[y]=l,f&&(f=p===l&&(0!==p||1/p==1/l)||p!=p&&l!=l)):f=!1}return o?f&&t===u?u:c:u}),Tr=function(h,A){return function(r,n,t,u){var i=r instanceof Object?Pr(r):g.object0;if(g.Identity===t)return Lr(h,A,i,r,t,u);if(Bn!==t){var e=t.map,o=t.ap,f=t.of,c=f(G),a=[];for(var v in A)a.push(v),c=o(e(G,c),A[v](i[v],v,t,u));var s=!!a[I]||void 0;for(var d in i)void 0===(s&&A[d])&&(a.push(d),c=o(e(G,c),h(i[d],d,t,u)));return a[I]?e(Cr(a),c):f(r)}for(var y in A){var p=A[y](i[y],y,t,u);if(void 0!==p)return p}for(var l in i)if(void 0===A[l]){var m=h(i[l],l,t,u);if(void 0!==m)return m}}},$r=function(r,n,t){return g.acyclicEqualsU(t,r)?n:t},_r=P(function(r,n,t,u){for(var i,e=0,o=n[I];e<o;++e)(r(i=n[e],e)?t:u).push(i)}),Jr="lastIndex",Gr="index",Hr=function(r){return r[Gr]+r[0][I]},Kr=P(function(r,n){var t=n[Jr];n[Jr]=Hr(r);var u=n.exec(r.input);return n[Jr]=t,u&&u[0]&&u}),Qr=function(t){return function(n){return function(r){return[t,r,n]}}},Vr=zr(Y(z(Object),P(function(r){r=Pr(r);var n=[];for(var t in r)n.push([t,r[t]]);return n})),Y(g.isArray,P(function(r){for(var n={},t=0,u=r[I];t<u;++t){var i=r[t];2===i[I]&&(n[i[0]]=i[1])}return n}))),Xr=P(function(r,n){if(n instanceof Object){var t={};for(var u in n=Pr(n)){var i=r(u),e=t[i];void 0===e&&(t[i]=e={}),e[u]=n[u]}return t}}),Yr=P(function(e){return function(r){if(r instanceof Object){var n={};for(var t in r=Pr(r)){var u=r[t];if(u instanceof Object)for(var i in u=Pr(u))e(i)===t&&(n[i]=u[i])}return n}}}),Zr=function(e,o,f){return f=Cn(f),C(function(r,n,t,u){var i=-1;return f(r,n,t,function(r,n){return e<=++i&&!(o<=i)?u(r,n):t.of(r)})})},rn=function(r,n){if(void 0!==n){var t=r(n);if(void 0!==t)return t}return n},nn=function(i){return function(r,n,t,u){return t.map(function(r){return rn(i,r)},u(r,n))}},tn=function(i){return function(r,n,t,u){return u(rn(i,r),n)}},un=function(n){return ft(c(function(r){return[n,s,r]}))},en=function(n){return ft(c(function(r){return Kn(fu(n),[s,r])}))},on=function(r,n,t){return void 0!==r(n,t,Bn,P)},fn=function(t){return function(r,n){return on(t,r,n)}},cn=function(e,o){return function(i){return function(r,n,t,u){return(i(r,n)?e:o)(r,n,t,u)}}},an=function(i,e){return e=Cn(e),i=Cn(i),function(r,n,t,u){return(on(e,r,n)?e:i)(r,n,t,u)}},vn=function(e,o){o=Cn(o),e=Cn(e);var f=function(r){r=g.always(r);var n=o(void 0,void 0,g.Identity,r);return void 0===n?e(void 0,void 0,g.Identity,r):n};return function(r,n,t,u){var i=o(r,n,Bn,P);return t.map(f,u(void 0===i?e(r,n,Bn,P):i,n))}},sn=function(u){return C(function(r){for(var n=arguments[I],t=arguments[--n];n;)t=u(t,arguments[--n]);return t})},dn=function(r,n,t,u){return t.of(r)},yn=function(r,n,t,u){return t===g.Identity?ur(u,r,void 0):t===Bn?i(u,r):e(t,u,r,void 0)},pn=function(i,e){return function(r,n,t,u){return t.chain(function(r){return e(r,n,t,u)},i(r,n,t,u))}},ln=function(r,n){return[n,hu(r)]},mn=function(t){return function(r){for(var n=r;void 0!==r;)r=t(n=r);return n}},hn=function(o,f,c){return function(r,n){var t=f[I];if(Pn(r)){Pn(n)||(n="");for(var u=Math.max(t,r[I],n[I]),i=Array(u),e=0;e<u;++e)if(void 0===(i[e]=o(e<t?f[e]:c,r[e],n[e])))return;return i}}},An=(0,g.curry)(function(r,n){return Mr(hn(qr,n,r),hn(Ur,n,r))}),gn=function(n){return function(r){return void 0!==r&&n(r)?r:void 0}},bn=(0,g.id)(function(u){return function(r){for(var n=[];;){var t=u(r);if(!T(t))return[r,n];r=t[0],n.push(t[1])}}}),jn=function(i){return function(r){if(T(r)){var n=r[1];if(g.isArray(n)){for(var t=r[0],u=n[I];u--;)t=i(Z([t,n[u]]));return t}}}},On="珳襱댎纚䤤鬖罺좴",xn=function(r){return g.isString(r)&&0===r.indexOf(On)},In=z(t),wn=g.inherit(function(r){this[On+r]=this[On]=g.freeze([new t(r)]),g.freeze(this)},Object,g.assocPartialU(W,function(){return this[On][W]()})),Un=z(wn),Sn=[],En=function(r){return null==r||"object"!=typeof r},Fn=function(r){return void 0===r||g.isArray(r)},kn=function(r){return void 0===r||z(Object)},qn=function(r,n,t){void 0!==t&&(r[n]=t)},Mn=function(r,n){void 0!==n&&r.push(n)},zn=function(t,u,i){return function(r){var n=Array(t);if(u(n,r))return i(n)}},Nn=P(function(a){return function(r){if(g.isArray(r)){for(var n=[],t=0,u=r.length;t<u;++t){var i=r[t];if(!g.isArray(i))return;if(!i.length)return;var e=a(i[0]);if(void 0===e)return;for(var o=0,f=i.length;o<f;++o){var c=i[o];if(!g.identicalU(e,a(c)))return;n.push(c)}}return n}}}),Rn=P(function(c){return function(r){if(g.isArray(r)){for(var n=new Map,t=0,u=r.length;t<u;++t){var i=r[t],e=c(i);if(void 0===e)return;var o=n.get(e);void 0!==o?o.push(i):n.set(e,[i])}var f=[];return n.forEach(function(r){return f.push(r)}),f}}}),Dn=P(function(o){return function(r){if(T(r)){var n=r[1],t=n[I];if(t){for(var u=r[0],i=Array(t),e=0;e<t;++e)if(void 0===(i[e]=o([u,n[e]])))return;return i}}}}),Wn=P(function(f){return function(r){if(g.isArray(r)){var n=r[I];if(n){var t=f(r[0]);if(T(t)){var u=Array(n),i=t[0];u[0]=t[1];for(var e=1;e<n;++e){var o=f(r[e]);if(!T(o)||!g.acyclicEqualsU(i,o[0]))return;u[e]=o[1]}return[i,u]}}}}}),Pn=function(r){return r instanceof Object&&(r=r[I])===r>>0&&0<=r||g.isString(r)},Bn=fr(function(r,n){return void 0!==r?r:n}),Cn=P(function(r){switch(typeof r){case"string":return br(r);case"number":return xr(r);case"object":return a(0,r);default:return 4===r[I]?r:(i=r,C(function(r,n,t,u){return t.map(g.always(r),u(i(r,n),n))}))}var i}),Ln=g.curry(function(r,n,t){return Ur([r,gu(n)],n,t)}),Tn=g.curry(wr),$n=g.curry(Er),_n=g.curry(Fr),Jn=g.curry(function(r,n){return Ur(r,void 0,n)}),Gn=g.curry(Ur),Hn=g.curry(sr),Kn=sn(an),Qn=function(i){return C(function(r,n,t,u){return Cn(i(r,n))(r,n,t,u)})},Vn=P(function(){for(var r=arguments[I],n=dn;r--;){var t=arguments[r];n=t[I]<2?Cn(t[0]):cn(Cn(t[1]),n)(t[0])}return n}),Xn=P(function(e){e=Cn(e);var o=arguments[I]-1;if(!o)return dn;var r=arguments[o];r=1===r[I]?(--o,Cn(r[0])):dn;for(var f=Array(o),c=Array(o+1),n=0;n<o;++n){var t=arguments[n+1];f[n]=t[0],c[n]=Cn(t[1])}return c[o]=r,function(r,n,t,u){var i=o;return e(r,n,Bn,function(r,n){for(var t=0;t<i;++t)if(f[t](r,n)){if(0===(i=t))return 0;break}}),c[i](r,n,t,u)}}),Yn=g.curry(function(r,n,t){return cn(Cn(n),Cn(t))(r)}),Zn=g.curry(an),rt=g.curry(function(t,r){return[r,Qn(function(r,n){return void 0!==r?t(r,n):dn})]}),nt=cn(dn,Br),tt=cn(Br,dn),ut=tt(g.isDefined),it=g.curry(function(i,e){return e=Cn(e),C(function(r,t,n,u){return e(r,t,n,function(r,n){return u(r,i(n,t))})})}),et=B(it(function(r,n){return void 0!==n?void 0!==r?[n,r]:n:r})),ot=B(it(g.sndU)),ft=g.curry(function(r,n){return Er(r,P,n)}),ct=g.curry(function(r,n){return Fr(r,P,n)}),at=P(function(){var r=arguments[I],n=dn;if(r)for(n=Cn(arguments[--r]);r;)n=pn(Cn(arguments[--r]),n);return n}),vt=function(i){return function(r,n,t,u){return t.of(i)}},st=vt(),dt=P(g.curryN(2,function(n){return n=Cn(n),function(r){return function r(n,t){var u=g.create(null);for(var i in t){var e=t[i];u[i]=g.isObject(e)?r(n,e):Cn(e)}return Tr(n,u)}(n,r)}})),yt=dt(dn),pt=B(Cn([Vr,v])),lt=B(Cn([Vr,v,0])),mt=g.curry(Zr),ht=mt(0),At=g.curry(function(r,n){return Zr(r,void 0,n)}),gt=B(Tr(Br,R)),bt=function(e){return function(r,n,u,i){return function r(n,t){return e(n,t)?i(n,t):s(n,t,u,r)}(r,n)}},jt=bt(function(r){return void 0!==r&&!g.isArray(r)&&!g.isObject(r)}),Ot=g.curry(function(t,r,n){return!kr(function(r,n){if(!t(r,n))return!0},r,n)}),xt=Ot(P),It=g.curry(function(t,r,n){var u=!1;return kr(function(r,n){if(!t(r,n))return u=!1;u=!0},r,n),u}),wt=It(P),Ut=g.curry(function(t,r,n){return!!kr(function(r,n){if(t(r,n))return!0},r,n)}),St=(0,g.curry)(function(u,r,n){var i=[];return kr(function(r,n){var t=u(r,n);void 0!==t&&i.push(t)},r,n),i}),Et=St(P),Ft=(0,g.curry)(function(t,r,n){var u=[];return kr(function(r,n){u.push(t(r,n))},r,n),u}),kt=Ft(P),qt=dr(P,cr),Mt=qt(P),zt=g.curry(function(t,r,n){return sr(ar,function(r,n){return t(r,n)?1:0},r,n)}),Nt=zt(g.isDefined),Rt=g.curry(function(i,r,n){var e=new Map;return kr(function(r,n){var t=i(r,n),u=e.get(t);e.set(t,void 0!==u?u+1:1)},r,n),e}),Dt=Rt(P),Wt=g.curry(function(t,u,r,n){return kr(function(r,n){u=t(u,r,n)},r,n),u}),Pt=g.curry(function(r,n,t,u){var i=[],e=[];kr(function(r,n){e.push(r),i.push(n)},t,u);for(var o=e[I]-1;0<=o;--o)n=r(n,e[o],i[o]);return n}),Bt=g.curry(function(t,r,n){return kr(function(r,n){t(r,n)},r,n)}),Ct=g.curry(function(r,t,n,u){var i=r();return kr(function(r,n){t(i,r,n)},n,u),i}),Lt=g.curry(kr),Tt=g.curry(function(r,n){return void 0!==kr(P,r,n)}),$t=g.curry(function(r,n){return!kr(V,r,n)}),_t=dr(_,P(function(t){return fr(function(r,n){return void 0!==r?void 0!==n?r+t+n:r:n})})),Jt=_t(P),Gt=vr(M),Ht=Gt(P),Kt=g.curry(function(u,r,n){var i=0,e=0;return kr(function(r,n){var t=u(r,n);void 0!==t&&(e+=1,i+=t)},r,n),i/e}),Qt=Kt(P),Vt=vr(q),Xt=Vt(P),Yt=g.curry(function(t,r,n){return!kr(function(r,n){if(t(r,n))return!0},r,n)}),Zt=Ut(P),ru=Hn(fr(U,1)),nu=ru(K(1)),tu=y,uu=Lt,iu=Hn(ar),eu=iu(Q),ou=g.curry(function(r,n){return Mr(r(n),Gn(n))}),fu=function(i){return function(r,n,t,u){return u(i(r,n),n)}},cu=g.curry(Mr),au=cu(P),vu=function(i){return function(r,n,t,u){return u(void 0!==r?i(r,n):r,n)}},su=function(i){return function(r,n,t,u){return t.map(function(r){return void 0!==r?i(r,n):r},u(r,n))}},du=B(An(st)),yu=P(function(o){return function(r,n,t,u){var i=void 0,e=g.array0;return Pn(r)&&_r(o,r,i=[],e=[]),t.map(function(r){var n=r?r[I]:0,t=e[I],u=n+t;return u===t?e:or(or(Array(u),0,r,0,n),n,e,0,t)},u(i,n))}}),pu=P,lu=Qn(function(r){return Pn(r)&&r[I]?r[I]-1:0}),mu=(0,g.curry)(function(c,a){return function(u,r,n,t){var i=Pn(u),e=i&&u[I],o=J(0,e,0,c),f=J(o,e,e,a);return n.map(function(r){var n=r?r[I]:0,t=o+n;return or(or(or(Array(e-f+t),0,u,0,o),o,r,0,n),t,u,f,e)},t(i?or(Array(Math.max(0,f-o)),0,u,o,f):void 0,r))}}),hu=function(r){return g.isObject(r)?bu($n(gt,ln,r)):r},Au=P,gu=function(r){return A.apply(null,g.keys(r))},bu=P(function(i){return function(n,r,t,u){return t.map(function(r){return Wr(i,r,n)},u(Dr(i,n),r))}}),ju=g.curry(function(i,e){function o(r){return $r(e,i,r)}return function(r,n,t,u){return t.map(o,u($r(i,e,r),n))}}),Ou=g.curry(zr),xu=new wn(-1),Iu=sn(vn),wu=g.curry(function(r,n){return zr($n(r,y(n)),$n(r,b(n)))}),Uu=g.curry(function(r,n){return[r,n,Su(r)]}),Su=function(i){return function(r,n,t,u){return t.map(function(r){return kr(P,i,r)},u(Ur(i,r,void 0),n))}},Eu=g.curry(vn),Fu=zr(X,X),ku=function(r){var n=b(r),i=y(r),e=function(r){return ir(n,r)};return function(r,n,t,u){return t.map(e,u(ir(i,r),n))}},qu=zr(Y(Pn,P(function(r){for(var n=r[I],t=Array(n),u=0;u<n;++u)t[u]=[u,r[u]];return t})),Y(g.isArray,P(function(r){for(var n=r[I],t=Array(n),u=0;u<n;++u){var i=r[u];2===i[I]&&(t[i[0]]=i[1])}n=t[I];for(var e=0,o=0;o<n;++o){var f=t[o];void 0!==f&&(o!==e&&(t[e]=f),++e)}return t[I]=e,t}))),Mu=zr(tr,tr),zu=B(j(function(r){return[[r],r]})),Nu=function(e){return function(r,n,t,u){var i=Yr(e);return t.map(i,u(Xr(e,r),n))}},Ru=zr(Y(z(Object),P(function(r){r=Pr(r);var n=[];for(var t in r){var u=r[t];if(g.isArray(u))for(var i=0,e=u[I];i<e;++i)n.push([t,u[i]]);else n.push([t,u])}return n})),Y(g.isArray,P(function(r){for(var n=g.create(null),t=0,u=r[I];t<u;++t){var i=r[t];if(2===i[I]){var e=i[0],o=i[1],f=n[e];void 0===f?n[e]=o:g.isArray(f)?f.push(o):n[e]=[f,o]}}return g.assign({},n)}))),Du=P(function(r){var n=r||g.object0,t=n.reviver,u=n.replacer,i=n.space;return zr(Y(g.isString,$(function(r){return JSON.parse(r,t)})),Y(g.isDefined,function(r){return JSON.stringify(r,u,i)}))}),Wu=Nr($(decodeURI),encodeURI),Pu=zr(Y(g.isString,$(decodeURIComponent)),Y(n,encodeURIComponent)),Bu=g.curry(function(r,n){return Nr(D(L(r,"g"),n),D(L(n,"g"),r))}),Cu=P(function(n){var t=1<arguments[I]?arguments[1]:n;return zr(Y(g.isString,function(r){return r.split(t)}),Y(g.isArray,function(r){return r.join(n)}))}),Lu=P(function(u){var t=L(1<arguments[I]?arguments[1]:u,"");return zr(Y(g.isString,function(r){var n=t.exec(r);return n?[r.slice(0,n[Gr]),r.slice(Hr(n))]:[r,""]}),function(r){if(T(r)){var n=r[0],t=r[1];return t?n+u+t:n}})}),Tu=B(Cn([vu(function(r){return g.isString(r)?r.replace(/\+/g,"%20"):r}),Cu("&"),ku([Lu("="),ku(Pu)]),Su(Ru)])),$u=Rr(k,k);r.Identity=g.Identity,r.IdentityAsync=g.IdentityAsync,r.FantasyFunctor=g.FantasyFunctor,r.fromFantasy=g.fromFantasy,r.fromFantasyApplicative=g.fromFantasyApplicative,r.fromFantasyMonad=g.fromFantasyMonad,r.seemsArrayLike=Pn,r.Select=Bn,r.toFunction=Cn,r.assign=Ln,r.disperse=Tn,r.modify=$n,r.modifyAsync=_n,r.remove=Jn,r.set=Gn,r.traverse=Hn,r.compose=function(){var r=arguments[I];if(r<2)return r?arguments[0]:Br;for(var n=Array(r);r--;)n[r]=arguments[r];return n},r.flat=function(){for(var r=[d],n=0,t=arguments[I];n<t;++n)r.push(arguments[n],d);return r},r.lazy=c,r.choices=Kn,r.choose=Qn,r.cond=Vn,r.condOf=Xn,r.ifElse=Yn,r.orElse=Zn,r.chain=rt,r.choice=function(){for(var r=arguments.length,n=Array(r),t=0;t<r;t++)n[t]=arguments[t];return n.reduceRight(an,dn)},r.unless=nt,r.when=tt,r.optional=ut,r.zero=dn,r.mapIx=function(i){return function(r,n,t,u){return u(r,i(n,r))}},r.setIx=function(i){return function(r,n,t,u){return u(r,i)}},r.tieIx=it,r.joinIx=et,r.reIx=function(e){return e=Cn(e),C(function(r,n,t,u){var i=0;return e(r,n,t,function(r){return u(r,i++)})})},r.skipIx=ot,r.getLog=function(r,n){var t=sr(mr,function(r){return{p:[r,yr],x:r,c:r}},r,n),u=t.p,i=t.c;u=pr(u,["%O"]);for(var e=2;e<u[I];++e)u[0]+=" <= %O";return console.log.apply(console,u),i},r.log=function(){var r=g.curry(function(r,n){return console.log.apply(console,or([],0,arguments,0,arguments[I]).concat([r,n])),n});return zr(r("get"),r("set"))},r.transform=ft,r.transformAsync=ct,r.seq=at,r.assignOp=function(r){return[gu(r),vt(r)]},r.modifyOp=function(i){return function(r,n,t,u){return t.of(i(r,n))}},r.setOp=vt,r.removeOp=st,r.branchOr=dt,r.branch=yt,r.branches=function(){for(var r=arguments[I],n={},t=0;t<r;++t)n[arguments[t]]=Br;return yt(n)},r.elems=v,r.elemsTotal=function(r,n,t,u){return Pn(r)?t===g.Identity?ur(u,r,ur):t===Bn?i(u,r):e(t,u,r,e):t.of(r)},r.entries=pt,r.keys=lt,r.keysEverywhere=function(r,n,u,t){var i=function(r,n){return u.ap(u.map(H,t(r[0],n)),e(r[1],n))},e=function r(n,t){return g.isArray(n)?yn(n,t,u,r):g.isObject(n)?pt(n,t,u,i):u.of(n)};return e(r,n)},r.subseq=mt,r.limit=ht,r.offset=At,r.matches=function(c){return function(n,r,t,u){if(g.isString(n)){var i=t.map;if(c.global){var e=[""];return e.input=n,e[Gr]=0,Bn===t?function(r,n,t){for(;t=Kr(t,n);){var u=r(t[0],t[Gr]);if(void 0!==u)return u}}(u,c,e):i((f=n,function(r){for(var n="",t=0,u=function(r){for(var n=[];Qr!==r;)n.push(r[0],r[1]),r=r[2];return n}(r),i=u[I]-2;-2!==i;i+=-2){var e=u[i];n+=f.slice(t,e[Gr]);var o=u[i+1];void 0!==o&&(n+=o),t=Hr(e)}return n+f.slice(t)}),function(r,n,t,u,i,e){for(var o=t(Qr);e=Kr(e,i);)o=n(n(r(Qr,t(e)),o),u(e[0],e[Gr]));return o}(i,t.ap,t.of,u,c,e))}var o=n.match(c);if(o)return i(function(r){return n.replace(c,void 0!==r?r:"")},u(o[0],o[Gr]))}var f;return t.of(n)}},r.values=gt,r.children=s,r.flatten=d,r.query=function(){for(var r=[],n=0,t=arguments[I];n<t;++n){var u=Cn(arguments[n]);r.push(bt(fn(u)),u)}return r},r.satisfying=bt,r.leafs=jt,r.all=Ot,r.and=xt,r.all1=It,r.and1=wt,r.any=Ut,r.collectAs=St,r.collect=Et,r.collectTotalAs=Ft,r.collectTotal=kt,r.concatAs=qt,r.concat=Mt,r.countIf=zt,r.count=Nt,r.countsAs=Rt,r.counts=Dt,r.foldl=Wt,r.foldr=Pt,r.forEach=Bt,r.forEachWith=Ct,r.get=y,r.getAs=Lt,r.isDefined=Tt,r.isEmpty=$t,r.joinAs=_t,r.join=Jt,r.maximumBy=Gt,r.maximum=Ht,r.meanAs=Kt,r.mean=Qt,r.minimumBy=Vt,r.minimum=Xt,r.none=Yt,r.or=Zt,r.productAs=ru,r.product=nu,r.select=tu,r.selectAs=uu,r.sumAs=iu,r.sum=eu,r.foldTraversalLens=ou,r.getter=fu,r.lens=cu,r.partsOf=function(i){return function(n,r,t,u){return t.map(function(r){return wr(i,r,n)},u(kt(i,n),r))}},r.setter=au,r.defaults=function(i){function e(r){return $r(i,void 0,r)}return function(r,n,t,u){return t.map(e,u(void 0!==r?r:i,n))}},r.define=function(i){var e=K(i);return function(r,n,t,u){return t.map(e,u(void 0!==r?r:i,n))}},r.normalize=function(r){return[vu(r),su(r)]},r.required=function(r){return ju(r,void 0)},r.reread=vu,r.rewrite=su,r.append=m,r.cross=du,r.filter=yu,r.find=h,r.findWith=function(r){var n=Cn(r),t=fn(n);return[1<arguments[I]?h(t,arguments[1]):h(t),n]},r.first=0,r.index=pu,r.last=lu,r.prefix=function(r){return mu(0,r)},r.slice=mu,r.suffix=function(r){return mu(0===r?1/0:r?-r:0,void 0)},r.pickIn=hu,r.prop=Au,r.props=A,r.propsExcept=function(){for(var n=g.create(null),r=0,t=arguments[I];r<t;++r)n[arguments[r]]="d";return[Nu(function(r){return n[r]||"t"}),"t"]},r.propsOf=gu,r.removable=function(){function i(r){if(!(r instanceof Object))return r;for(var n=0,t=u[I];n<t;++n)if(g.hasU(u[n],r))return r}for(var r=arguments.length,u=Array(r),n=0;n<r;n++)u[n]=arguments[n];return function(r,n,t,u){return t.map(i,u(r,n))}},r.valueOr=function(i){return function(r,n,t,u){return u(null!=r?r:i,n)}},r.pick=bu,r.replace=ju,r.getInverse=b,r.iso=Ou,r._=xu,r.mapping=j,r.mappings=function(r){return g.isFunction(r)&&(r=r.apply(null,o(r[I]))),Iu.apply(null,r.map(j))},r.pattern=O,r.patterns=function(r){return g.isFunction(r)&&(r=r.apply(null,o(r[I]))),Iu.apply(null,r.map(O))},r.alternatives=Iu,r.applyAt=wu,r.attemptEveryDown=function(r){return zr(un(tn(y(r))),un(nn(b(r))))},r.attemptEveryUp=function(r){return zr(un(nn(y(r))),un(tn(b(r))))},r.attemptSomeDown=function(r){return zr(en(y(r)),en(b(r)))},r.conjugate=Uu,r.inverse=Su,r.iterate=function(r){return zr(mn(y(r)),mn(b(r)))},r.orAlternatively=Eu,r.fold=function(r){return zr(jn(y(r)),bn(b(r)))},r.unfold=function(r){return zr(bn(y(r)),jn(b(r)))},r.complement=Fu,r.identity=Br,r.is=function(n){return zr(function(r){return g.acyclicEqualsU(n,r)},function(r){return!0===r?n:void 0})},r.subset=x,r.array=ku,r.arrays=function(r){var n=b(r),i=y(r),e=function(r){return er(n,r)};return function(r,n,t,u){return t.map(e,u(er(i,r),n))}},r.indexed=qu,r.reverse=Mu,r.singleton=zu,r.groupBy=function(r){return zr(Rn(r),Nn(r))},r.ungroupBy=function(r){return zr(Nn(r),Rn(r))},r.zipWith1=function(r){return zr(Dn(y(r)),Wn(b(r)))},r.unzipWith1=function(r){return zr(Wn(y(r)),Dn(b(r)))},r.disjoint=Nu,r.keyed=Vr,r.multikeyed=Ru,r.json=Du,r.uri=Wu,r.uriComponent=Pu,r.dropPrefix=function(n){return Nr(function(r){return r.startsWith(n)?r.slice(n[I]):void 0},function(r){return n+r})},r.dropSuffix=function(n){return Nr(function(r){return r.endsWith(n)?r.slice(0,r[I]-n[I]):void 0},function(r){return r+n})},r.replaces=Bu,r.split=Cu,r.uncouple=Lu,r.querystring=Tu,r.add=function(r){return Rr(S(r),S(-r))},r.divide=function(r){return Rr(F(r),E(r))},r.multiply=function(r){return Rr(E(r),F(r))},r.negate=$u,r.subtract=function(r){return Rr(S(-r),S(r))},r.pointer=function(r){"#"===r[0]&&(r=decodeURIComponent(r));for(var n=r.split("/"),t=n[I],u=1;u<t;++u){var i=n[u];n[u-1]=/^(0|[1-9]\d*)$/.test(i)?Yn(nr,Number(i),i):"-"===i?Yn(nr,m,i):i.replace("~1","/").replace("~0","~")}return n[I]=t-1,n},Object.defineProperty(r,"__esModule",{value:!0})}); | ||
!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],n):n(r.L={},r.I)}(this,function(r,g){"use strict";function n(r){switch(typeof r){case"boolean":case"number":case"string":return!0;default:return!1}}function i(r,n){for(var t=0,u=n[I];t<u;++t){var i=r(n[t],t);if(void 0!==i)return i}}function e(r,n,t,u){var i=r.map,e=r.ap,o=r.of(yr),f=t[I];if(i===g.sndU){for(var c=0;c<f;++c)o=e(o,n(t[c],c));return o}for(var a=yr(u),v=0;v<f;++v)o=e(i(a,o),n(t[v],v));return i(mr,o)}function a(r,n){var t=n[I]-r;if(t<2)return t?Pn(n[r]):Lr;for(var i=Pn(n[r+--t]),e=function(t,u){return function(r,n){return i(r,n,t,u)}};--t;)e=wr(Pn(n[r+t]),e);var o=Pn(n[r]);return function(r,n,t,u){return o(r,n,t,e(t,u))}}function u(r,n,t,u){for(var i,e,o=r[I],f=Array(o),c=0;c<o;++c)switch(f[c]=t,typeof(i=r[c])){case"string":t=gr(i,t);break;case"number":t=jr(i,t);break;default:t=a(c,r)(t,r[c-1],g.Identity,n||g.always(u)),o=c}for(o===r[I]&&(t=n?n(t,r[o-1]):u);0<=--o;)t=g.isString(e=r[o])?br(e,t,f[o]):xr(e,t,f[o]);return t}function t(r){this[xn]=r,g.freeze(this)}function o(r){for(;En[I]<r;)En.push(new Sn(En[I]));return En}function y(r,n,t,u){if(void 0!==u){if(n in t)return g.acyclicEqualsU(t[n],u);t[n]=u;var i=r[n];return!i||i(u)}}function l(f,o){if(void 0===o||xt(Fn,bt,o))return function(r,n){return g.acyclicEqualsU(o,n)};if(Un(o)){var t=o[xn][0][xn];return t<0?W:function(r,n){return y(f,t,r,n)}}if(g.isArray(o)){for(var c=[],a=[],v=void 0,s=o[I],r=0;r<s;++r){var n=o[r];wn(n)?f[v=n[xn]]=kn:(void 0!==v?a:c).push(l(f,n))}return function(r,n){if(Cn(n)){var t=n[I];if(!(void 0!==v?t<s-1:t!==s)){for(var u=c[I],i=0;i<u;++i)if(!c[i](r,n[i]))return;var e=a[I];t-=e;for(var o=0;o<e;++o)if(!a[o](r,n[t+o]))return;return!(0<=v)||y(f,v,r,fr(Array(t-u),0,n,u,t))}}}}var d=o[xn];d&&(f[d=d[0][xn]]=qn),o=_n(At,function(r,n){return In(n)?void 0:l(f,r)},o);var p=zt(At,o);return function(r,n){if(!Fn(n)&&!g.isArray(n)){n=Cr(n);var t=0<=d&&{},u=0;for(var i in n){var e=o[i];if(e){if(!e(r,n[i]))return;u++}else{if(void 0===d)return;t&&(t[i]=n[i])}}return u===p&&(!t||y(f,d,r,rr(t)))}}}function f(e,r){if(!In(r)){if(void 0===e||xt(Fn,bt,e))return g.always(e);if(Un(e)){var n=e[xn][0][xn];return function(r){return r[n]}}if(g.isArray(e)){for(var a=[],v=[],s=void 0,t=e[I],u=0;u<t;++u){var i=e[u];wn(i)?s=i[xn]:(void 0!==s?v:a).push(f(i))}return nr(function(r){for(var n=[],t=0,u=a[I];t<u;++t)zn(n,a[t](r));if(0<=s){var i=r[s];if(i)for(var e=0,o=i[I];e<o;++e)zn(n,i[e])}for(var f=0,c=v[I];f<c;++f)zn(n,v[f](r));return n})}var o=e[xn];return o&&(o=o[0][xn]),e=_n(At,f,e),nr(function(r){var n={};for(var t in e)Mn(n,t,e[t](r));if(0<=o){var u=r[o];if(u)for(var i in u)Mn(n,i,u[i])}return n})}}function c(i){function e(r,n,t,u){return o(r,n,t,u)}var o=function(r,n,t,u){return(o=Pn(i(e)))(r,n,t,u)};return e}function v(r,n,t,u){return Cn(r)?yn(r,n,t,u):t.of(r)}function s(r,n,t,u){return g.isArray(r)?yn(r,n,t,u):g.isObject(r)?At(r,n,t,u):t.of(r)}function d(r,n,u,i){return function r(n,t){return g.isArray(n)?yn(n,t,u,r):void 0!==n?i(n,t):u.of(n)}(r,n)}function p(n,r){return 1<arguments[I]?qr(W,n,r):function(r){return qr(W,n,r)}}function m(o){var f=1<arguments[I]?arguments[1]:{hint:0};return function(r,n,t,u){var i=Cn(r)?r:"",e=f.hint=function(r,n,t){var u=r.hint,i=t[I];i<=u&&(u=i-1),u<0&&(u=0);for(var e=u-1;0<=e&&u<i;++u,--e){if(n(t[u],u,r))return u;if(n(t[e],e,r))return e}for(;u<i;++u)if(n(t[u],u,r))return u;for(;0<=e;--e)if(n(t[e],e,r))return e;return i}(f,o,i);return t.map(function(r){return xr(e,r,i)},u(i[e],e))}}function h(){for(var r,n=arguments[I],t={},u=0;u<n;++u)t[r=arguments[u]]=r;return Au(t)}function A(n,r,t,u){var i=Cn(n)?n[I]:0;return t.map(function(r){return xr(i,r,n)},u(void 0,i))}function b(n,r){return 1<arguments[I]?Er(n,r):function(r){return Er(n,r)}}function O(r){var n=0;g.isFunction(r)&&(r=r.apply(null,o(n=r[I])));var t=Array(n),u=r.map(function(r){return l(t,r)}),i=r.map(f);return Nr(Nn(n,u[0],i[1]),Nn(n,u[1],i[0]))}function j(r){var n=0;g.isFunction(r)&&(r=r.apply(null,o(n=r[I])));var t=l(Array(n),r);return x(function(r){return t(Array(n),r)})}function x(r){var n=bn(r);return Nr(n,n)}var I="length",w=function(r,n){return r+n},S=function(r,n){return r*n},U=g.curry(w),E=g.curry(S),F=g.curry(function(r,n){return n/r}),k=function(r){return-r},q=function(r,n){return r<n},M=function(r,n){return n<r},z=g.curry(g.isInstanceOfU),N=function(r){return g.assign(g.create(null),r)},R=g.freeze(N(g.object0)),T=g.curry(function(r,n,t){return t.replace(r,n)}),D=Symbol.iterator,W=function(r){return r},C=function(r){return r},L=function(r){return r},P=function(r,n){return g.isString(r)?new RegExp(T(/[|\\{}()[\]^$+*?.]/g,"\\$&",r),n):r},B=function(r){return g.isArray(r)&&2===r[I]},$=g.curry(function(r,n){return[r,Su(n)]}),_=function(n){return L(function(r){try{return n(r)}catch(r){return r}})},G=function(r){return void 0!==r?String(r):""},J=function(r,n,t,u){return void 0!==u?Math.min(Math.max(r,u<0?n+u:u),n):t},H=function(n){return function(r){return[r,n]}},K=function(n){return function(r){return void 0!==n&&void 0!==r?[n,r]:void 0}},Q=function(n){return function(r){return void 0!==r?r:n}},V=Q(0),X=g.always(!0),Y=function(r){return void 0!==r?!r:r},Z=function(n,t){return L(function(r){return n(r)?t(r):void 0})},rr=W,nr=W,tr=function(r){return!(r instanceof Object)||g.isArray(r)},ur=W(function(r){if(Cn(r)){for(var n=r[I],t=Array(n),u=0;n;)t[u++]=r[--n];return t}}),ir=W(function(r,n,t){for(var u=n[I],i=Array(u),e=0,o=!0,f=0;f<u;++f){var c=n[f],a=r(c,f);t!==a&&(i[e++]=a,o&&(o=c===a&&(0!==c||1/c==1/a)||c!=c&&a!=a))}return e!==u?(i[I]=e,i):o?n:i}),er=function(r,n){return Cn(n)?ir(r,n,void 0):void 0},or=W(function(r,n){if(g.isArray(n)){for(var t=n[I],u=Array(),i=0;i<t;++i)if(void 0===(u[i]=r(n[i])))return;return u}}),fr=W(function(r,n,t,u,i){for(;u<i;)r[n++]=t[u++];return r}),cr=function(r,n){return g.Applicative(g.sndU,g.always(n),r)},ar=function(r){return cr(r.concat,(0,r.empty)())},vr=cr(w,0),sr=function(o){return g.curry(function(u,r,n){var i=void 0,e=void 0;return qr(function(r,n){var t=u(r,n);void 0===t||void 0!==e&&!o(t,e)||(i=r,e=t)},r,n),i})},dr=function(r,n,t,u){return Pn(t)(u,void 0,r,n)},pr=function(i,r){return g.curryN(4,L(function(t,u){return u=r(u),function(r,n){return i(dr(u,t,r,n))}}))},yr=function(t){return function(n){return function(r){return t!==r?[r,n]:n}}},lr=function(r,n){for(;yr!==r;)n.push(r[0]),r=r[1];return n},mr=W(function(r){return lr(r,[]).reverse()}),hr=g.Applicative(function(r,n){var t=n.p,u=n.x,i=n.c;return u=r(u),g.isFunction(u)||(t=[u,t]),{p:t,x:u,c:i}},function(r){return{p:[],x:r,c:void 0}},function(r,n){var t=void 0!==r.c?r:n;return{p:t.p,x:r.x(n.x),c:t.c}}),Ar=function(e,o){return function(i){return function(n,r,t,u){return t.map(function(r){return o(i,r,n)},u(e(i,n),i))}}},gr=function(r,n){return n instanceof Object?n[r]:void 0},br=W(function(r,n,t){return void 0!==n?g.assocPartialU(r,n,t):g.dissocPartialU(r,t)||g.object0}),Or=Ar(gr,br),jr=function(r,n){return Cn(n)?n[r]:void 0},xr=W(function(r,n,t){Cn(t)||(t="");var u=t[I];if(void 0!==n){for(var i=Math.max(r+1,u),e=Array(i),o=0;o<i;++o)e[o]=t[o];return e[r]=n,e}if(u<=r)return fr(Array(u),0,t,0,u);for(var f=Array(u-1),c=0;c<r;++c)f[c]=t[c];for(var a=r+1;a<u;++a)f[a-1]=t[a];return f}),Ir=Ar(jr,xr),wr=function(i,r){return function(t,u){return u=r(t,u),function(r,n){return i(r,n,t,u)}}},Sr=function(r,n,t){Cn(n)||(n="");var u=0;return Fr(r,function(){return n[u++]},t)},Ur=W(function(r,n,t){switch(typeof r){case"string":return br(r,n,t);case"number":return xr(r,n,t);case"object":return u(r,0,t,n);default:return 4===r[I]?r(t,void 0,g.Identity,g.always(n)):t}}),Er=function(r,n){return Ur(r,n,void 0)},Fr=W(function(r,n,t){switch(typeof r){case"string":return br(r,n(gr(r,t),r),t);case"number":return xr(r,n(jr(r,t),r),t);case"object":return u(r,n,t);default:return 4===r[I]?r(t,void 0,g.Identity,n):(n(r(t,void 0),void 0),t)}}),kr=function(r,n,t){return g.resolve(Pn(r)(t,void 0,g.IdentityAsync,n))},qr=W(function(r,n,t){switch(typeof n){case"string":return r(gr(n,t),n);case"number":return r(jr(n,t),n);case"object":for(var u,i=n[I],e=0;e<i;++e)switch(typeof(u=n[e])){case"string":t=gr(u,t);break;case"number":t=jr(u,t);break;default:return a(e,n)(t,n[e-1],Ln,r)}return r(t,n[i-1]);default:return r!==W&&4!==n[I]?r(n(t,void 0),void 0):n(t,void 0,Ln,r)}}),Mr=function(r,n){return qr(W,r,n)},zr=function(i,e){return L(function(n,t,r,u){return r.map(function(r){return e(r,n,t)},u(i(n,t),t))})},Nr=function(i,e){return L(function(r,n,t,u){return t.map(e,u(i(r),n))})},Rr=function(r,n){return Nr(Z(g.isString,r),Z(g.isString,n))},Tr=function(r,n){return Nr(Z(g.isNumber,r),Z(g.isNumber,n))},Dr=W(function(r,n){var t=void 0;for(var u in r){var i=r[u],e=g.isObject(i)?Dr(i,n):qr(W,i,n);void 0!==e&&(t||(t={}),t[u]=e)}return t}),Wr=W(function(r,n,t){for(var u in r){var i=n&&n[u],e=r[u];t=g.isObject(e)?Wr(e,i,t):Ur(e,i,t)}return t}),Cr=function(r){return g.constructorOf(r)!==Object?g.toObject(r):r},Lr=function(r,n,t,u){return u(r,n)},Pr=W(function(i){return function(r){for(var n={},t=i[I];t--;){var u=r[0];void 0!==u&&(n[i[t]]=u),r=r[1]}return n}}),Br=W(function(r,n,t,u,i,e){var o=void 0,f=!0,c={};for(var a in n){o=1;var v=t[a],s=n[a](v,a,i,e);void 0!==s?(c[a]=s,f&&(f=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):f=!1}var d=o;for(var p in t)if(void 0===(d&&n[p])){o=1;var y=t[p],l=r(y,p,i,e);void 0!==l?(c[p]=l,f&&(f=y===l&&(0!==y||1/y==1/l)||y!=y&&l!=l)):f=!1}return o?f&&t===u?u:c:u}),$r=function(h,A){return function(r,n,t,u){var i=r instanceof Object?Cr(r):g.object0;if(g.Identity===t)return Br(h,A,i,r,t,u);if(Ln!==t){var e=t.map,o=t.ap,f=t.of,c=f(H),a=[];for(var v in A)a.push(v),c=o(e(H,c),A[v](i[v],v,t,u));var s=!!a[I]||void 0;for(var d in i)void 0===(s&&A[d])&&(a.push(d),c=o(e(H,c),h(i[d],d,t,u)));return a[I]?e(Pr(a),c):f(r)}for(var p in A){var y=A[p](i[p],p,t,u);if(void 0!==y)return y}for(var l in i)if(void 0===A[l]){var m=h(i[l],l,t,u);if(void 0!==m)return m}}},_r=function(r,n,t){return g.acyclicEqualsU(t,r)?n:t},Gr=W(function(r,n,t,u){for(var i,e=0,o=n[I];e<o;++e)(r(i=n[e],e)?t:u).push(i)}),Jr="lastIndex",Hr="index",Kr=function(r){return r[Hr]+r[0][I]},Qr=W(function(r,n){var t=n[Jr];n[Jr]=Kr(r);var u=n.exec(r.input);return n[Jr]=t,u&&u[0]&&u}),Vr=function(t){return function(n){return function(r){return[t,r,n]}}},Xr=Nr(Z(z(Object),W(function(r){r=Cr(r);var n=[];for(var t in r)n.push([t,r[t]]);return n})),Z(g.isArray,W(function(r){for(var n={},t=0,u=r[I];t<u;++t){var i=r[t];2===i[I]&&(n[i[0]]=i[1])}return n}))),Yr=W(function(r,n){if(n instanceof Object){var t={};for(var u in n=Cr(n)){var i=r(u),e=t[i];void 0===e&&(t[i]=e={}),e[u]=n[u]}return t}}),Zr=W(function(e){return function(r){if(r instanceof Object){var n={};for(var t in r=Cr(r)){var u=r[t];if(u instanceof Object)for(var i in u=Cr(u))e(i)===t&&(n[i]=u[i])}return n}}}),rn=function(e,o,f){return f=Pn(f),L(function(r,n,t,u){var i=-1;return f(r,n,t,function(r,n){return e<=++i&&!(o<=i)?u(r,n):t.of(r)})})},nn=function(r,n){if(void 0!==n){var t=r(n);if(void 0!==t)return t}return n},tn=function(i){return function(r,n,t,u){return t.map(function(r){return nn(i,r)},u(r,n))}},un=function(i){return function(r,n,t,u){return u(nn(i,r),n)}},en=function(n){return ct(c(function(r){return[n,s,r]}))},on=function(n){return ct(c(function(r){return Qn(ou(n),[s,r])}))},fn=function(r,n,t){return void 0!==r(n,t,Ln,W)},cn=function(t){return function(r,n){return fn(t,r,n)}},an=function(e,o){return function(i){return function(r,n,t,u){return(i(r,n)?e:o)(r,n,t,u)}}},vn=function(i,e){return e=Pn(e),i=Pn(i),function(r,n,t,u){return(fn(e,r,n)?e:i)(r,n,t,u)}},sn=function(e,o){o=Pn(o),e=Pn(e);var f=function(r){r=g.always(r);var n=o(void 0,void 0,g.Identity,r);return void 0===n?e(void 0,void 0,g.Identity,r):n};return function(r,n,t,u){var i=o(r,n,Ln,W);return t.map(f,u(void 0===i?e(r,n,Ln,W):i,n))}},dn=function(u){return L(function(r){for(var n=arguments[I],t=arguments[--n];n;)t=u(t,arguments[--n]);return t})},pn=function(r,n,t,u){return t.of(r)},yn=function(r,n,t,u){return t===g.Identity?ir(u,r,void 0):t===Ln?i(u,r):e(t,u,r,void 0)},ln=function(i,e){return function(r,n,t,u){return t.chain(function(r){return e(r,n,t,u)},i(r,n,t,u))}},mn=function(r,n){return[n,mu(r)]},hn=function(t){return function(r){for(var n=r;void 0!==r;)r=t(n=r);return n}},An=function(o,f,c){return function(r,n){var t=f[I];if(Cn(r)){Cn(n)||(n="");for(var u=Math.max(t,r[I],n[I]),i=Array(u),e=0;e<u;++e)if(void 0===(i[e]=o(e<t?f[e]:c,r[e],n[e])))return;return i}}},gn=(0,g.curry)(function(r,n){return zr(An(Mr,n,r),An(Ur,n,r))}),bn=function(n){return function(r){return void 0!==r&&n(r)?r:void 0}},On=(0,g.id)(function(u){return function(r){for(var n=[];;){var t=u(r);if(!B(t))return[r,n];r=t[0],n.push(t[1])}}}),jn=function(i){return function(r){if(B(r)){var n=r[1];if(g.isArray(n)){for(var t=r[0],u=n[I];u--;)t=i(rr([t,n[u]]));return t}}}},xn="珳襱댎纚䤤鬖罺좴",In=function(r){return g.isString(r)&&0===r.indexOf(xn)},wn=z(t),Sn=g.inherit(function(r){this[xn+r]=this[xn]=g.freeze([new t(r)]),g.freeze(this)},Object,g.assocPartialU(D,function(){return this[xn][D]()})),Un=z(Sn),En=[],Fn=function(r){return null==r||"object"!=typeof r},kn=function(r){return void 0===r||g.isArray(r)},qn=function(r){return void 0===r||z(Object)},Mn=function(r,n,t){void 0!==t&&(r[n]=t)},zn=function(r,n){void 0!==n&&r.push(n)},Nn=function(t,u,i){return function(r){var n=Array(t);if(u(n,r))return i(n)}},Rn=W(function(a){return function(r){if(g.isArray(r)){for(var n=[],t=0,u=r.length;t<u;++t){var i=r[t];if(!g.isArray(i))return;if(!i.length)return;var e=a(i[0]);if(void 0===e)return;for(var o=0,f=i.length;o<f;++o){var c=i[o];if(!g.identicalU(e,a(c)))return;n.push(c)}}return n}}}),Tn=W(function(c){return function(r){if(g.isArray(r)){for(var n=new Map,t=0,u=r.length;t<u;++t){var i=r[t],e=c(i);if(void 0===e)return;var o=n.get(e);void 0!==o?o.push(i):n.set(e,[i])}var f=[];return n.forEach(function(r){return f.push(r)}),f}}}),Dn=W(function(o){return function(r){if(B(r)){var n=r[1],t=n[I];if(t){for(var u=r[0],i=Array(t),e=0;e<t;++e)if(void 0===(i[e]=o([u,n[e]])))return;return i}}}}),Wn=W(function(f){return function(r){if(g.isArray(r)){var n=r[I];if(n){var t=f(r[0]);if(B(t)){var u=Array(n),i=t[0];u[0]=t[1];for(var e=1;e<n;++e){var o=f(r[e]);if(!B(o)||!g.acyclicEqualsU(i,o[0]))return;u[e]=o[1]}return[i,u]}}}}}),Cn=function(r){return r instanceof Object&&(r=r[I])===r>>0&&0<=r||g.isString(r)},Ln=cr(function(r,n){return void 0!==r?r:n}),Pn=W(function(r){switch(typeof r){case"string":return Or(r);case"number":return Ir(r);case"object":return a(0,r);default:return 4===r[I]?r:(i=r,L(function(r,n,t,u){return t.map(g.always(r),u(i(r,n),n))}))}var i}),Bn=g.curry(function(r,n,t){return Ur([r,Ou],n,t)}),$n=g.curry(Sr),_n=g.curry(Fr),Gn=g.curry(kr),Jn=g.curry(function(r,n){return Ur(r,void 0,n)}),Hn=g.curry(Ur),Kn=g.curry(dr),Qn=dn(vn),Vn=function(i){return L(function(r,n,t,u){return Pn(i(r,n))(r,n,t,u)})},Xn=W(function(){for(var r=arguments[I],n=pn;r--;){var t=arguments[r];n=t[I]<2?Pn(t[0]):an(Pn(t[1]),n)(t[0])}return n}),Yn=W(function(e){e=Pn(e);var o=arguments[I]-1;if(!o)return pn;var r=arguments[o];r=1===r[I]?(--o,Pn(r[0])):pn;for(var f=Array(o),c=Array(o+1),n=0;n<o;++n){var t=arguments[n+1];f[n]=t[0],c[n]=Pn(t[1])}return c[o]=r,function(r,n,t,u){var i=o;return e(r,n,Ln,function(r,n){for(var t=0;t<i;++t)if(f[t](r,n)){if(0===(i=t))return 0;break}}),c[i](r,n,t,u)}}),Zn=g.curry(function(r,n,t){return an(Pn(n),Pn(t))(r)}),rt=g.curry(vn),nt=g.curry(function(t,r){return[r,Vn(function(r,n){return void 0!==r?t(r,n):pn})]}),tt=an(pn,Lr),ut=an(Lr,pn),it=ut(g.isDefined),et=g.curry(function(i,e){return e=Pn(e),L(function(r,t,n,u){return e(r,t,n,function(r,n){return u(r,i(n,t))})})}),ot=C(et(function(r,n){return void 0!==n?void 0!==r?[n,r]:n:r})),ft=C(et(g.sndU)),ct=g.curry(function(r,n){return Fr(r,W,n)}),at=g.curry(function(r,n){return kr(r,W,n)}),vt=W(function(){var r=arguments[I],n=pn;if(r)for(n=Pn(arguments[--r]);r;)n=ln(Pn(arguments[--r]),n);return n}),st=W(g.curryN(2,function(n){return n=Pn(n),function(r){return function r(n,t){var u=g.create(null);for(var i in t){var e=t[i];u[i]=g.isObject(e)?r(n,e):Pn(e)}return $r(n,u)}(n,r)}})),dt=st(pn),pt=C(Pn([Xr,v])),yt=C(Pn([Xr,v,0])),lt=g.curry(rn),mt=lt(0),ht=g.curry(function(r,n){return rn(r,void 0,n)}),At=C($r(Lr,R)),gt=function(e){return function(r,n,u,i){return function r(n,t){return e(n,t)?i(n,t):s(n,t,u,r)}(r,n)}},bt=gt(function(r){return void 0!==r&&!g.isArray(r)&&!g.isObject(r)}),Ot=g.curry(function(t,r,n){return!qr(function(r,n){if(!t(r,n))return!0},r,n)}),jt=Ot(W),xt=g.curry(function(t,r,n){var u=!1;return qr(function(r,n){if(!t(r,n))return u=!1;u=!0},r,n),u}),It=xt(W),wt=g.curry(function(t,r,n){return!!qr(function(r,n){if(t(r,n))return!0},r,n)}),St=(0,g.curry)(function(u,r,n){var i=[];return qr(function(r,n){var t=u(r,n);void 0!==t&&i.push(t)},r,n),i}),Ut=St(W),Et=(0,g.curry)(function(t,r,n){var u=[];return qr(function(r,n){u.push(t(r,n))},r,n),u}),Ft=Et(W),kt=pr(W,ar),qt=kt(W),Mt=g.curry(function(t,r,n){return dr(vr,function(r,n){return t(r,n)?1:0},r,n)}),zt=Mt(g.isDefined),Nt=g.curry(function(i,r,n){var e=new Map;return qr(function(r,n){var t=i(r,n),u=e.get(t);e.set(t,void 0!==u?u+1:1)},r,n),e}),Rt=Nt(W),Tt=g.curry(function(t,u,r,n){return qr(function(r,n){u=t(u,r,n)},r,n),u}),Dt=g.curry(function(r,n,t,u){var i=[],e=[];qr(function(r,n){e.push(r),i.push(n)},t,u);for(var o=e[I]-1;0<=o;--o)n=r(n,e[o],i[o]);return n}),Wt=g.curry(function(t,r,n){return qr(function(r,n){t(r,n)},r,n)}),Ct=g.curry(function(r,t,n,u){var i=r();return qr(function(r,n){t(i,r,n)},n,u),i}),Lt=g.curry(qr),Pt=g.curry(function(r,n){return void 0!==qr(W,r,n)}),Bt=g.curry(function(r,n){return!qr(X,r,n)}),$t=pr(G,W(function(t){return cr(function(r,n){return void 0!==r?void 0!==n?r+t+n:r:n})})),_t=$t(W),Gt=sr(M),Jt=Gt(W),Ht=g.curry(function(u,r,n){var i=0,e=0;return qr(function(r,n){var t=u(r,n);void 0!==t&&(e+=1,i+=t)},r,n),i/e}),Kt=Ht(W),Qt=sr(q),Vt=Qt(W),Xt=g.curry(function(t,r,n){return!qr(function(r,n){if(t(r,n))return!0},r,n)}),Yt=wt(W),Zt=Kn(cr(S,1)),ru=Zt(Q(1)),nu=p,tu=Lt,uu=Kn(vr),iu=uu(V),eu=g.curry(function(r,n){return zr(r(n),Hn(n))}),ou=function(i){return function(r,n,t,u){return u(i(r,n),n)}},fu=g.curry(zr),cu=fu(W),au=function(i){return function(r,n,t,u){return u(void 0!==r?i(r,n):r,n)}},vu=function(i){return function(r,n,t,u){return t.map(function(r){return void 0!==r?i(r,n):r},u(r,n))}},su=W(function(o){return function(r,n,t,u){var i=void 0,e=g.array0;return Cn(r)&&Gr(o,r,i=[],e=[]),t.map(function(r){var n=r?r[I]:0,t=e[I],u=n+t;return u===t?e:fr(fr(Array(u),0,r,0,n),n,e,0,t)},u(i,n))}}),du=W,pu=Vn(function(r){return Cn(r)&&r[I]?r[I]-1:0}),yu=function(r){return lu(0,r)},lu=(0,g.curry)(function(c,a){return function(u,r,n,t){var i=Cn(u),e=i&&u[I],o=J(0,e,0,c),f=J(o,e,e,a);return n.map(function(r){var n=r?r[I]:0,t=o+n;return fr(fr(fr(Array(e-f+t),0,u,0,o),o,r,0,n),t,u,f,e)},t(i?fr(Array(Math.max(0,f-o)),0,u,o,f):void 0,r))}}),mu=function(r){return g.isObject(r)?Au(_n(At,mn,r)):r},hu=W,Au=W(function(i){return function(n,r,t,u){return t.map(function(r){return Wr(i,r,n)},u(Dr(i,n),r))}}),gu=g.curry(function(i,e){function o(r){return _r(e,i,r)}return function(r,n,t,u){return t.map(o,u(_r(i,e,r),n))}}),bu=A,Ou=W(function(n,r,t,u){return t.map(function(r){return g.assign({},n instanceof Object?n:null,r)},u(void 0,r))}),ju=C(Pn([yu(0),0])),xu=C($(A)),Iu=C($(Ou)),wu=C($(ju)),Su=function(i){return function(r,n,t,u){return t.of(i)}},Uu=Su(),Eu=C(gn(Uu)),Fu=g.curry(Nr),ku=new Sn(-1),qu=dn(sn),Mu=g.curry(function(r,n){return Nr(_n(r,p(n)),_n(r,b(n)))}),zu=g.curry(function(r,n){return[r,n,Nu(r)]}),Nu=function(i){return function(r,n,t,u){return t.map(function(r){return qr(W,i,r)},u(Ur(i,r,void 0),n))}},Ru=g.curry(sn),Tu=Nr(Y,Y),Du=function(r){var n=b(r),i=p(r),e=function(r){return er(n,r)};return function(r,n,t,u){return t.map(e,u(er(i,r),n))}},Wu=Nr(Z(Cn,W(function(r){for(var n=r[I],t=Array(n),u=0;u<n;++u)t[u]=[u,r[u]];return t})),Z(g.isArray,W(function(r){for(var n=r[I],t=Array(n),u=0;u<n;++u){var i=r[u];2===i[I]&&(t[i[0]]=i[1])}n=t[I];for(var e=0,o=0;o<n;++o){var f=t[o];void 0!==f&&(o!==e&&(t[e]=f),++e)}return t[I]=e,t}))),Cu=Nr(ur,ur),Lu=C(O(function(r){return[[r],r]})),Pu=function(e){return function(r,n,t,u){var i=Zr(e);return t.map(i,u(Yr(e,r),n))}},Bu=Nr(Z(z(Object),W(function(r){r=Cr(r);var n=[];for(var t in r){var u=r[t];if(g.isArray(u))for(var i=0,e=u[I];i<e;++i)n.push([t,u[i]]);else n.push([t,u])}return n})),Z(g.isArray,W(function(r){for(var n=g.create(null),t=0,u=r[I];t<u;++t){var i=r[t];if(2===i[I]){var e=i[0],o=i[1],f=n[e];void 0===f?n[e]=o:g.isArray(f)?f.push(o):n[e]=[f,o]}}return g.assign({},n)}))),$u=W(function(r){var n=r||g.object0,t=n.reviver,u=n.replacer,i=n.space;return Nr(Z(g.isString,_(function(r){return JSON.parse(r,t)})),Z(g.isDefined,function(r){return JSON.stringify(r,u,i)}))}),_u=Rr(_(decodeURI),encodeURI),Gu=Nr(Z(g.isString,_(decodeURIComponent)),Z(n,encodeURIComponent)),Ju=g.curry(function(r,n){return Rr(T(P(r,"g"),n),T(P(n,"g"),r))}),Hu=W(function(n){var t=1<arguments[I]?arguments[1]:n;return Nr(Z(g.isString,function(r){return r.split(t)}),Z(g.isArray,function(r){return r.join(n)}))}),Ku=W(function(u){var t=P(1<arguments[I]?arguments[1]:u,"");return Nr(Z(g.isString,function(r){var n=t.exec(r);return n?[r.slice(0,n[Hr]),r.slice(Kr(n))]:[r,""]}),function(r){if(B(r)){var n=r[0],t=r[1];return t?n+u+t:n}})}),Qu=C(Pn([au(function(r){return g.isString(r)?r.replace(/\+/g,"%20"):r}),Hu("&"),Du([Ku("="),Du(Gu)]),Nu(Bu)])),Vu=Tr(k,k);r.Identity=g.Identity,r.IdentityAsync=g.IdentityAsync,r.FantasyFunctor=g.FantasyFunctor,r.fromFantasy=g.fromFantasy,r.fromFantasyApplicative=g.fromFantasyApplicative,r.fromFantasyMonad=g.fromFantasyMonad,r.seemsArrayLike=Cn,r.Select=Ln,r.toFunction=Pn,r.assign=Bn,r.disperse=$n,r.modify=_n,r.modifyAsync=Gn,r.remove=Jn,r.set=Hn,r.traverse=Kn,r.compose=function(){var r=arguments[I];if(r<2)return r?arguments[0]:Lr;for(var n=Array(r);r--;)n[r]=arguments[r];return n},r.flat=function(){for(var r=[d],n=0,t=arguments[I];n<t;++n)r.push(arguments[n],d);return r},r.lazy=c,r.choices=Qn,r.choose=Vn,r.cond=Xn,r.condOf=Yn,r.ifElse=Zn,r.orElse=rt,r.chain=nt,r.choice=function(){for(var r=arguments.length,n=Array(r),t=0;t<r;t++)n[t]=arguments[t];return n.reduceRight(vn,pn)},r.unless=tt,r.when=ut,r.optional=it,r.zero=pn,r.mapIx=function(i){return function(r,n,t,u){return u(r,i(n,r))}},r.setIx=function(i){return function(r,n,t,u){return u(r,i)}},r.tieIx=et,r.joinIx=ot,r.reIx=function(e){return e=Pn(e),L(function(r,n,t,u){var i=0;return e(r,n,t,function(r){return u(r,i++)})})},r.skipIx=ft,r.getLog=function(r,n){var t=dr(hr,function(r){return{p:[r,yr],x:r,c:r}},r,n),u=t.p,i=t.c;u=lr(u,["%O"]);for(var e=2;e<u[I];++e)u[0]+=" <= %O";return console.log.apply(console,u),i},r.log=function(){var r=g.curry(function(r,n){return console.log.apply(console,fr([],0,arguments,0,arguments[I]).concat([r,n])),n});return Nr(r("get"),r("set"))},r.transform=ct,r.transformAsync=at,r.seq=vt,r.branchOr=st,r.branch=dt,r.branches=function(){for(var r=arguments[I],n={},t=0;t<r;++t)n[arguments[t]]=Lr;return dt(n)},r.elems=v,r.elemsTotal=function(r,n,t,u){return Cn(r)?t===g.Identity?ir(u,r,ir):t===Ln?i(u,r):e(t,u,r,e):t.of(r)},r.entries=pt,r.keys=yt,r.keysEverywhere=function(r,n,u,t){var i=function(r,n){return u.ap(u.map(K,t(r[0],n)),e(r[1],n))},e=function r(n,t){return g.isArray(n)?yn(n,t,u,r):g.isObject(n)?pt(n,t,u,i):u.of(n)};return e(r,n)},r.subseq=lt,r.limit=mt,r.offset=ht,r.matches=function(c){return function(n,r,t,u){if(g.isString(n)){var i=t.map;if(c.global){var e=[""];return e.input=n,e[Hr]=0,Ln===t?function(r,n,t){for(;t=Qr(t,n);){var u=r(t[0],t[Hr]);if(void 0!==u)return u}}(u,c,e):i((f=n,function(r){for(var n="",t=0,u=function(r){for(var n=[];Vr!==r;)n.push(r[0],r[1]),r=r[2];return n}(r),i=u[I]-2;-2!==i;i+=-2){var e=u[i];n+=f.slice(t,e[Hr]);var o=u[i+1];void 0!==o&&(n+=o),t=Kr(e)}return n+f.slice(t)}),function(r,n,t,u,i,e){for(var o=t(Vr);e=Qr(e,i);)o=n(n(r(Vr,t(e)),o),u(e[0],e[Hr]));return o}(i,t.ap,t.of,u,c,e))}var o=n.match(c);if(o)return i(function(r){return n.replace(c,void 0!==r?r:"")},u(o[0],o[Hr]))}var f;return t.of(n)}},r.values=At,r.children=s,r.flatten=d,r.query=function(){for(var r=[],n=0,t=arguments[I];n<t;++n){var u=Pn(arguments[n]);r.push(gt(cn(u)),u)}return r},r.satisfying=gt,r.leafs=bt,r.all=Ot,r.and=jt,r.all1=xt,r.and1=It,r.any=wt,r.collectAs=St,r.collect=Ut,r.collectTotalAs=Et,r.collectTotal=Ft,r.concatAs=kt,r.concat=qt,r.countIf=Mt,r.count=zt,r.countsAs=Nt,r.counts=Rt,r.foldl=Tt,r.foldr=Dt,r.forEach=Wt,r.forEachWith=Ct,r.get=p,r.getAs=Lt,r.isDefined=Pt,r.isEmpty=Bt,r.joinAs=$t,r.join=_t,r.maximumBy=Gt,r.maximum=Jt,r.meanAs=Ht,r.mean=Kt,r.minimumBy=Qt,r.minimum=Vt,r.none=Xt,r.or=Yt,r.productAs=Zt,r.product=ru,r.select=nu,r.selectAs=tu,r.sumAs=uu,r.sum=iu,r.foldTraversalLens=eu,r.getter=ou,r.lens=fu,r.partsOf=function(i){return function(n,r,t,u){return t.map(function(r){return Sr(i,r,n)},u(Ft(i,n),r))}},r.setter=cu,r.defaults=function(i){function e(r){return _r(i,void 0,r)}return function(r,n,t,u){return t.map(e,u(void 0!==r?r:i,n))}},r.define=function(i){var e=Q(i);return function(r,n,t,u){return t.map(e,u(void 0!==r?r:i,n))}},r.normalize=function(r){return[au(r),vu(r)]},r.required=function(r){return gu(r,void 0)},r.reread=au,r.rewrite=vu,r.filter=su,r.find=m,r.findWith=function(r){var n=Pn(r),t=cn(n);return[1<arguments[I]?m(t,arguments[1]):m(t),n]},r.first=0,r.index=du,r.last=pu,r.prefix=yu,r.slice=lu,r.suffix=function(r){return lu(0===r?1/0:r?-r:0,void 0)},r.pickIn=mu,r.prop=hu,r.props=h,r.propsExcept=function(){for(var n=g.create(null),r=0,t=arguments[I];r<t;++r)n[arguments[r]]="d";return[Pu(function(r){return n[r]||"t"}),"t"]},r.propsOf=function r(n){var t;return(t=r).warned||(t.warned=1,console.warn("partial.lenses: `propsOf` has been deprecated and there is no replacement. See CHANGELOG for details.")),h.apply(null,g.keys(n))},r.removable=function(){function i(r){if(!(r instanceof Object))return r;for(var n=0,t=u[I];n<t;++n)if(g.hasU(u[n],r))return r}for(var r=arguments.length,u=Array(r),n=0;n<r;n++)u[n]=arguments[n];return function(r,n,t,u){return t.map(i,u(r,n))}},r.valueOr=function(i){return function(r,n,t,u){return u(null!=r?r:i,n)}},r.pick=Au,r.replace=gu,r.appendTo=A,r.append=bu,r.assignTo=Ou,r.prependTo=ju,r.appendOp=xu,r.assignOp=Iu,r.modifyOp=function(i){return function(r,n,t,u){return t.of(i(r,n))}},r.prependOp=wu,r.setOp=Su,r.removeOp=Uu,r.cross=Eu,r.getInverse=b,r.iso=Fu,r._=ku,r.mapping=O,r.mappings=function(r){return g.isFunction(r)&&(r=r.apply(null,o(r[I]))),qu.apply(null,r.map(O))},r.pattern=j,r.patterns=function(r){return g.isFunction(r)&&(r=r.apply(null,o(r[I]))),qu.apply(null,r.map(j))},r.alternatives=qu,r.applyAt=Mu,r.attemptEveryDown=function(r){return Nr(en(un(p(r))),en(tn(b(r))))},r.attemptEveryUp=function(r){return Nr(en(tn(p(r))),en(un(b(r))))},r.attemptSomeDown=function(r){return Nr(on(p(r)),on(b(r)))},r.conjugate=zu,r.inverse=Nu,r.iterate=function(r){return Nr(hn(p(r)),hn(b(r)))},r.orAlternatively=Ru,r.fold=function(r){return Nr(jn(p(r)),On(b(r)))},r.unfold=function(r){return Nr(On(p(r)),jn(b(r)))},r.complement=Tu,r.identity=Lr,r.is=function(n){return Nr(function(r){return g.acyclicEqualsU(n,r)},function(r){return!0===r?n:void 0})},r.subset=x,r.array=Du,r.arrays=function(r){var n=b(r),i=p(r),e=function(r){return or(n,r)};return function(r,n,t,u){return t.map(e,u(or(i,r),n))}},r.indexed=Wu,r.reverse=Cu,r.singleton=Lu,r.groupBy=function(r){return Nr(Tn(r),Rn(r))},r.ungroupBy=function(r){return Nr(Rn(r),Tn(r))},r.zipWith1=function(r){return Nr(Dn(p(r)),Wn(b(r)))},r.unzipWith1=function(r){return Nr(Wn(p(r)),Dn(b(r)))},r.disjoint=Pu,r.keyed=Xr,r.multikeyed=Bu,r.json=$u,r.uri=_u,r.uriComponent=Gu,r.dropPrefix=function(n){return Rr(function(r){return r.startsWith(n)?r.slice(n[I]):void 0},function(r){return n+r})},r.dropSuffix=function(n){return Rr(function(r){return r.endsWith(n)?r.slice(0,r[I]-n[I]):void 0},function(r){return r+n})},r.replaces=Ju,r.split=Hu,r.uncouple=Ku,r.querystring=Qu,r.add=function(r){return Tr(U(r),U(-r))},r.divide=function(r){return Tr(F(r),E(r))},r.multiply=function(r){return Tr(E(r),F(r))},r.negate=Vu,r.subtract=function(r){return Tr(U(-r),U(r))},r.pointer=function(r){"#"===r[0]&&(r=decodeURIComponent(r));for(var n=r.split("/"),t=n[I],u=1;u<t;++u){var i=n[u];n[u-1]=/^(0|[1-9]\d*)$/.test(i)?Zn(tr,Number(i),i):"-"===i?Zn(tr,bu,i):i.replace("~1","/").replace("~0","~")}return n[I]=t-1,n},Object.defineProperty(r,"__esModule",{value:!0})}); |
{ | ||
"name": "partial.lenses", | ||
"version": "14.13.0", | ||
"version": "14.14.0", | ||
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript", | ||
@@ -79,3 +79,3 @@ "module": "dist/partial.lenses.es.js", | ||
"ramda": "^0.25.0", | ||
"rollup": "^0.66.6", | ||
"rollup": "^0.67.0", | ||
"rollup-plugin-babel": "^3.0.7", | ||
@@ -82,0 +82,0 @@ "rollup-plugin-node-resolve": "^3.4.0", |
@@ -27,2 +27,6 @@ import * as I from './ext/infestines' | ||
const inserterOp = I.curry((inserter, value) => [inserter, setOp(value)]) | ||
// | ||
const tryCatch = fn => | ||
@@ -1383,3 +1387,3 @@ copyName(x => { | ||
export const assign = I.curry(function assign(o, x, s) { | ||
return setU([o, propsOf(x)], x, s) | ||
return setU([o, assignTo], x, s) | ||
}) | ||
@@ -1607,18 +1611,2 @@ | ||
// Transforming | ||
export const assignOp = x => [propsOf(x), setOp(x)] | ||
export const modifyOp = xi2y => | ||
function modifyOp(x, i, C, _xi2yC) { | ||
return C.of(xi2y(x, i)) | ||
} | ||
export const setOp = y => | ||
function setOp(_x, _i, C, _xi2yC) { | ||
return C.of(y) | ||
} | ||
export const removeOp = setOp() | ||
// Creating new traversals | ||
@@ -2042,9 +2030,2 @@ | ||
export function append(xs, _, F, xi2yF) { | ||
const i = seemsArrayLike(xs) ? xs[I.LENGTH] : 0 | ||
return F.map(x => setIndex(i, x, xs), xi2yF(void 0, i)) | ||
} | ||
export const cross = setName(crossOr(removeOp), 'cross') | ||
export const filter = (process.env.NODE_ENV === 'production' | ||
@@ -2171,3 +2152,9 @@ ? id | ||
export const propsOf = o => props.apply(null, I.keys(o)) | ||
export const propsOf = o => { | ||
warn( | ||
propsOf, | ||
'`propsOf` has been deprecated and there is no replacement. See CHANGELOG for details.' | ||
) | ||
return props.apply(null, I.keys(o)) | ||
} | ||
@@ -2204,2 +2191,55 @@ export function removable(...ps) { | ||
// Inserters | ||
export function appendTo(xs, _, F, xi2yF) { | ||
const i = seemsArrayLike(xs) ? xs[I.LENGTH] : 0 | ||
return F.map(x => setIndex(i, x, xs), xi2yF(void 0, i)) | ||
} | ||
export const append = | ||
process.env.NODE_ENV === 'production' | ||
? appendTo | ||
: function append(x, i, F, xi2yF) { | ||
warn( | ||
append, | ||
'`append` has been renamed to `appendTo`. See CHANGELOG for details.' | ||
) | ||
return appendTo(x, i, F, xi2yF) | ||
} | ||
export const assignTo = (process.env.NODE_ENV === 'production' | ||
? id | ||
: iso => copyName(toFunction([isoU(id, I.freeze), iso]), iso))( | ||
function assignTo(x, i, F, xi2yF) { | ||
return F.map( | ||
y => I.assign({}, x instanceof Object ? x : null, y), | ||
xi2yF(void 0, i) | ||
) | ||
} | ||
) | ||
export const prependTo = setName(toFunction([prefix(0), 0]), 'prependTo') | ||
// Transforming | ||
export const appendOp = setName(inserterOp(appendTo), 'appendOp') | ||
export const assignOp = setName(inserterOp(assignTo), 'assignOp') | ||
export const modifyOp = xi2y => | ||
function modifyOp(x, i, C, _xi2yC) { | ||
return C.of(xi2y(x, i)) | ||
} | ||
export const prependOp = setName(inserterOp(prependTo), 'prependOp') | ||
export const setOp = y => | ||
function setOp(_x, _i, C, _xi2yC) { | ||
return C.of(y) | ||
} | ||
export const removeOp = setOp() | ||
export const cross = setName(crossOr(removeOp), 'cross') | ||
// Operations on isomorphisms | ||
@@ -2206,0 +2246,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
647464
9642
6171
171