From edf55f3d8dac41d050ed8b8ddd352ff53086c43e Mon Sep 17 00:00:00 2001 From: Vesa Karvonen Date: Fri, 18 May 2018 00:07:31 +0300 Subject: [PATCH] 13.12.0 --- dist/partial.lenses.cjs.js | 38 +++++++++++++++++++++++++++++++++++ dist/partial.lenses.es.js | 39 ++++++++++++++++++++++++++++++++++-- dist/partial.lenses.js | 38 +++++++++++++++++++++++++++++++++++ dist/partial.lenses.min.js | 2 +- docs/index.html | 41 ++++++++++++++++++++++++++++++++++++++ docs/partial.lenses.js | 38 +++++++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 8 files changed, 195 insertions(+), 5 deletions(-) diff --git a/dist/partial.lenses.cjs.js b/dist/partial.lenses.cjs.js index 1a9b5450..6ab9a00d 100644 --- a/dist/partial.lenses.cjs.js +++ b/dist/partial.lenses.cjs.js @@ -145,6 +145,18 @@ var toRegExpU = function toRegExpU(str, flags) { return I.isString(str) ? new RegExp(replace(/[|\\{}()[\]^$+*?.]/g, '\\$&', str), flags) : str; }; +// + +var returnAsync = function returnAsync(x) { + return Promise.resolve(x); +}; + +var chainAsync = function chainAsync(xyP, xP) { + return null != xP && I.isFunction(xP.then) ? xP.then(xyP) : xyP(xP); +}; + +// + var toStringPartial = function toStringPartial(x) { return void 0 !== x ? String(x) : ''; }; @@ -554,6 +566,10 @@ var modifyU = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : par(0 } }); +var modifyAsyncU = function modifyAsyncU(o, f, s) { + return returnAsync(toFunction(o)(s, void 0, IdentityAsync, f)); +}; + function makeIx(i) { var ix = function ix(s, j) { return ix.v = j, s; @@ -1006,6 +1022,19 @@ var Identity = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : I.fr chain: I.applyU }); +var IdentityAsync = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : I.freeze)({ + map: chainAsync, + ap: function ap(xyP, xP) { + return chainAsync(function (xP) { + return chainAsync(function (xyP) { + return xyP(xP); + }, xyP); + }, xP); + }, + of: I.id, + chain: chainAsync +}); + var Constant = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? I.id : I.freeze)({ map: I.sndU }); @@ -1031,6 +1060,8 @@ var assign = /*#__PURE__*/I.curry(function (o, x, s) { var modify = /*#__PURE__*/I.curry(modifyU); +var modifyAsync = /*#__PURE__*/I.curry(modifyAsyncU); + var remove = /*#__PURE__*/I.curry(function (o, s) { return setU(o, void 0, s); }); @@ -1041,6 +1072,10 @@ var transform = /*#__PURE__*/I.curry(function (o, s) { return modifyU(o, I.id, s); }); +var transformAsync = /*#__PURE__*/I.curry(function (o, s) { + return modifyAsyncU(o, I.id, s); +}); + var traverse = /*#__PURE__*/I.curry(traverseU); // Nesting @@ -1867,13 +1902,16 @@ var pointer = function pointer(s) { exports.seemsArrayLike = seemsArrayLike; exports.Identity = Identity; +exports.IdentityAsync = IdentityAsync; exports.Constant = Constant; exports.toFunction = toFunction; exports.assign = assign; exports.modify = modify; +exports.modifyAsync = modifyAsync; exports.remove = remove; exports.set = set; exports.transform = transform; +exports.transformAsync = transformAsync; exports.traverse = traverse; exports.compose = compose; exports.flat = flat; diff --git a/dist/partial.lenses.es.js b/dist/partial.lenses.es.js index cc7d2b8d..ca806d0f 100644 --- a/dist/partial.lenses.es.js +++ b/dist/partial.lenses.es.js @@ -1,4 +1,4 @@ -import { isString, isArray, freeze, isObject, id, acyclicEqualsU, array0, object0, sndU, always, curry, isFunction, curryN, assocPartialU, dissocPartialU, isNumber, constructorOf, toObject, applyU, isDefined, keys, hasU, arityN, assign } from 'infestines'; +import { isString, isFunction, isArray, freeze, isObject, id, acyclicEqualsU, array0, object0, sndU, always, curry, curryN, arityN, assocPartialU, dissocPartialU, isNumber, constructorOf, toObject, applyU, isDefined, keys, hasU, assign } from 'infestines'; var addU = function addU(x, y) { return x + y; @@ -141,6 +141,18 @@ var toRegExpU = function toRegExpU(str, flags) { return isString(str) ? new RegExp(replace(/[|\\{}()[\]^$+*?.]/g, '\\$&', str), flags) : str; }; +// + +var returnAsync = function returnAsync(x) { + return Promise.resolve(x); +}; + +var chainAsync = function chainAsync(xyP, xP) { + return null != xP && isFunction(xP.then) ? xP.then(xyP) : xyP(xP); +}; + +// + var toStringPartial = function toStringPartial(x) { return void 0 !== x ? String(x) : ''; }; @@ -550,6 +562,10 @@ var modifyU = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : par(0, } }); +var modifyAsyncU = function modifyAsyncU(o, f, s) { + return returnAsync(toFunction(o)(s, void 0, IdentityAsync, f)); +}; + function makeIx(i) { var ix = function ix(s, j) { return ix.v = j, s; @@ -1002,6 +1018,19 @@ var Identity = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : freeze chain: applyU }); +var IdentityAsync = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : freeze)({ + map: chainAsync, + ap: function ap(xyP, xP) { + return chainAsync(function (xP) { + return chainAsync(function (xyP) { + return xyP(xP); + }, xyP); + }, xP); + }, + of: id, + chain: chainAsync +}); + var Constant = /*#__PURE__*/(process.env.NODE_ENV === 'production' ? id : freeze)({ map: sndU }); @@ -1027,6 +1056,8 @@ var assign$1 = /*#__PURE__*/curry(function (o, x, s) { var modify = /*#__PURE__*/curry(modifyU); +var modifyAsync = /*#__PURE__*/curry(modifyAsyncU); + var remove = /*#__PURE__*/curry(function (o, s) { return setU(o, void 0, s); }); @@ -1037,6 +1068,10 @@ var transform = /*#__PURE__*/curry(function (o, s) { return modifyU(o, id, s); }); +var transformAsync = /*#__PURE__*/curry(function (o, s) { + return modifyAsyncU(o, id, s); +}); + var traverse = /*#__PURE__*/curry(traverseU); // Nesting @@ -1861,4 +1896,4 @@ var pointer = function pointer(s) { return ts; }; -export { seemsArrayLike, Identity, Constant, toFunction, assign$1 as assign, modify, remove, set, transform, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, iftes, orElse, chain, choice, unless, when, optional, zero, assignOp, modifyOp, setOp, removeOp, log, seq, branchOr, branch, branches, elems, elemsTotal, entries, keys$1 as keys, matches, values, children, flatten, query, satisfying, leafs, all, and$1 as and, any, collectAs, collect, concatAs, concat, countIf, count, countsAs, counts, foldl, foldr, forEach, forEachWith, isDefined$1 as isDefined, isEmpty, joinAs, join, maximumBy, maximum, meanAs, mean, minimumBy, minimum, none, or$1 as or, productAs, product, selectAs, select, sumAs, sum, get, lens, setter, foldTraversalLens, defaults, define, normalize, required, reread, rewrite, append, filter, find, findWith, first, index, last, prefix, slice, suffix, pickIn, prop, props, propsOf, removable, valueOr, pick, replace$1 as replace, getInverse, iso, array, inverse, complement, identity, indexed, is, keyed, reverse, singleton, uri, uriComponent, json, dropPrefix, dropSuffix, replaces, split, uncouple, add$1 as add, divide, multiply$1 as multiply, negate$1 as negate, subtract, pointer }; +export { seemsArrayLike, Identity, IdentityAsync, Constant, toFunction, assign$1 as assign, modify, modifyAsync, remove, set, transform, transformAsync, traverse, compose, flat, lazy, choices, choose, cond, condOf, ifElse, iftes, orElse, chain, choice, unless, when, optional, zero, assignOp, modifyOp, setOp, removeOp, log, seq, branchOr, branch, branches, elems, elemsTotal, entries, keys$1 as keys, matches, values, children, flatten, query, satisfying, leafs, all, and$1 as and, any, collectAs, collect, concatAs, concat, countIf, count, countsAs, counts, foldl, foldr, forEach, forEachWith, isDefined$1 as isDefined, isEmpty, joinAs, join, maximumBy, maximum, meanAs, mean, minimumBy, minimum, none, or$1 as or, productAs, product, selectAs, select, sumAs, sum, get, lens, setter, foldTraversalLens, defaults, define, normalize, required, reread, rewrite, append, filter, find, findWith, first, index, last, prefix, slice, suffix, pickIn, prop, props, propsOf, removable, valueOr, pick, replace$1 as replace, getInverse, iso, array, inverse, complement, identity, indexed, is, keyed, reverse, singleton, uri, uriComponent, json, dropPrefix, dropSuffix, replaces, split, uncouple, add$1 as add, divide, multiply$1 as multiply, negate$1 as negate, subtract, pointer }; diff --git a/dist/partial.lenses.js b/dist/partial.lenses.js index 16395bc3..5e808f4d 100644 --- a/dist/partial.lenses.js +++ b/dist/partial.lenses.js @@ -145,6 +145,18 @@ return I.isString(str) ? new RegExp(replace(/[|\\{}()[\]^$+*?.]/g, '\\$&', str), flags) : str; }; + // + + var returnAsync = function returnAsync(x) { + return Promise.resolve(x); + }; + + var chainAsync = function chainAsync(xyP, xP) { + return null != xP && I.isFunction(xP.then) ? xP.then(xyP) : xyP(xP); + }; + + // + var toStringPartial = function toStringPartial(x) { return void 0 !== x ? String(x) : ''; }; @@ -554,6 +566,10 @@ } }); + var modifyAsyncU = function modifyAsyncU(o, f, s) { + return returnAsync(toFunction(o)(s, void 0, IdentityAsync, f)); + }; + function makeIx(i) { var ix = function ix(s, j) { return ix.v = j, s; @@ -1006,6 +1022,19 @@ chain: I.applyU }); + var IdentityAsync = /*#__PURE__*/(0, I.freeze)({ + map: chainAsync, + ap: function ap(xyP, xP) { + return chainAsync(function (xP) { + return chainAsync(function (xyP) { + return xyP(xP); + }, xyP); + }, xP); + }, + of: I.id, + chain: chainAsync + }); + var Constant = /*#__PURE__*/(0, I.freeze)({ map: I.sndU }); @@ -1031,6 +1060,8 @@ var modify = /*#__PURE__*/I.curry(modifyU); + var modifyAsync = /*#__PURE__*/I.curry(modifyAsyncU); + var remove = /*#__PURE__*/I.curry(function (o, s) { return setU(o, void 0, s); }); @@ -1041,6 +1072,10 @@ return modifyU(o, I.id, s); }); + var transformAsync = /*#__PURE__*/I.curry(function (o, s) { + return modifyAsyncU(o, I.id, s); + }); + var traverse = /*#__PURE__*/I.curry(traverseU); // Nesting @@ -1867,13 +1902,16 @@ exports.seemsArrayLike = seemsArrayLike; exports.Identity = Identity; + exports.IdentityAsync = IdentityAsync; exports.Constant = Constant; exports.toFunction = toFunction; exports.assign = assign; exports.modify = modify; + exports.modifyAsync = modifyAsync; exports.remove = remove; exports.set = set; exports.transform = transform; + exports.transformAsync = transformAsync; exports.traverse = traverse; exports.compose = compose; exports.flat = flat; diff --git a/dist/partial.lenses.min.js b/dist/partial.lenses.min.js index 57844000..6ca22d80 100644 --- a/dist/partial.lenses.min.js +++ b/dist/partial.lenses.min.js @@ -1 +1 @@ -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],r):r(n.L={},n.I)}(this,function(n,r){"use strict";function t(n,r){for(var t=0,u=r.length;t1?arguments[1]:{hint:0};return function(t,u,e,i){var o=En(t)?t:"",c=r.hint=function(n,r,t){var u=n.hint,e=t.length;e<=u&&(u=e-1),u<0&&(u=0);for(var i=u-1;0<=i&&u>0&&0<=n||r.isString(n)},Rn=(0,r.id)({map:r.applyU,of:r.id,ap:r.applyU,chain:r.applyU}),Nn=(0,r.id)({map:r.sndU}),qn=(0,r.id)(function(n){switch(typeof n){case"string":return K(n);case"number":return X(n);case"object":return e(0,n);default:return 4===n.length?n:(t=n,function(n,u,e,i){return e.map(r.always(n),i(t(n,u),u))})}var t}),Mn=r.curry(function(n,r,t){return Z([n,tt(r)],r,t)}),Cn=r.curry(nn),zn=r.curry(function(n,r){return Z(n,void 0,r)}),Dn=r.curry(Z),Pn=r.curry(function(n,t){return nn(n,r.id,t)}),Wn=r.curry(B),Ln=function(n){return function(r,t,u,e){return qn(n(r,t))(r,t,u,e)}},$n=(0,r.id)(function(){for(var n=arguments.length,r=Qn;n--;){var t=arguments[n];r=t.length<2?qn(t[0]):On(qn(t[1]),r)(t[0])}return r}),Bn=(0,r.id)(function(n){n=qn(n);for(var t=kn,u=arguments.length;--u;){var e=arguments[u];t=1===e.length?r.always(qn(e[0])):In(e[0],qn(e[1]),t)}return function(r,u,e,i){return n(r,u,Nn,t)(r,u,e,i)}}),Jn=r.curry(function(n,r,t){return On(qn(r),qn(t))(n)}),Tn=(0,r.id)(function(n,r){for(var t=arguments.length,u=1&t?qn(arguments[--t]):Qn;0<=(t-=2);)u=On(qn(arguments[t+1]),u)(arguments[t]);return u}),_n=r.curry(xn),Fn=r.curry(function(n,r){return[r,Ln(function(r,t){return void 0!==r?n(r,t):Qn})]}),Gn=On(f,vn),Hn=On(vn,f),Kn=Hn(r.isDefined),Qn=function(n,r,t,u){return f(n,r,t,u)},Vn=function(n){return function(r,t,u,e){return f(n,t,u,e,n)}},Xn=Vn(),Yn=(0,r.id)(function(){var n=arguments.length,r=Qn;if(n)for(r=qn(arguments[--n]);n;)r=Un(qn(arguments[--n]),r);return r}),Zn=(0,r.id)(r.curryN(2,function(n){return n=qn(n),function(t){return function n(t,u){var e=j(null);for(var i in u){var o=u[i];e[i]=r.isObject(o)?n(t,o):qn(o)}return ln(t,e)}(n,t)}})),nr=Zn(Qn),rr=(0,r.id)(function(n,r,t,u){return En(n)?wn(n,0,t,u):t.of(n)}),tr=qn([jn,rr]),ur=qn([jn,rr,0]),er=(0,r.id)(function(n){return function(t,u,e,i){if(r.isString(t)){var o=e.map;if(n.global){var c=[""];return c.input=t,c.index=0,P===e?function(n,r,t){for(;t=bn(t,r);){var u=n(yn(t),gn(t));if(void 0!==u)return u}}(i,n,c):o((v=t,function(n){for(var r="",t=0,u=function(n){for(var r=[];An!==n;)r.push(n[0],n[1]),n=n[2];return r}(n),e=u.length-2;-2!==e;e+=-2){var i=u[e];r+=v.slice(t,gn(i));var o=u[e+1];void 0!==o&&(r+=o),t=mn(i)}return r+v.slice(t)}),function(n,r,t,u,e,i){for(var o=t(An);i=bn(i,e);)o=r(r(n(An,t(i)),o),u(yn(i),gn(i)));return o}(o,e.ap,e.of,i,n,c))}var a=t.match(n);if(a)return o(function(r){return t.replace(n,void 0!==r?r:"")},i(a[0],gn(a)))}var v;return f(t,void 0,e,i)}}),ir=(0,r.id)(ln(vn,O)),or=(0,r.id)(function(n,t,u,e){return r.isArray(n)?wn(n,0,u,e):r.isObject(n)?ir(n,t,u,e):u.of(n)}),cr=(0,r.id)(function(n,t,u,e){return function n(t,i){return r.isArray(t)?wn(t,0,u,n):void 0!==t?e(t,i):u.of(t)}(n,t)}),fr=function(n){return function(r,t,u,e){return function r(t,i){return n(t,i)?e(t,i):or(t,i,u,r)}(r,t)}},ar=fr(function(n){return void 0!==n&&!r.isArray(n)&&!r.isObject(n)}),vr=r.curry(function(n,r,t){return!B(P,function(r,t){if(!n(r,t))return!0},r,t)}),sr=vr(r.id),dr=r.curry(function(n,r,t){return!!B(P,function(r,t){if(n(r,t))return!0},r,t)}),lr=(0,r.curry)(function(n,r,t){var u=[];return B(P,function(r,t){var e=n(r,t);void 0!==e&&u.push(e)},r,t),u}),hr=lr(r.id),pr=J(r.id,function(n){return W(n.concat,n.empty())}),yr=pr(r.id),gr=r.curry(function(n,r,t){return B(L,function(r,t){return n(r,t)?1:0},r,t)}),mr=gr(r.isDefined),br=r.curry(function(n,r,t){var u=new Map;return B(P,function(r,t){var e=n(r,t),i=u.get(e);u.set(e,void 0!==i?i+1:1)},r,t),u}),Ar=br(r.id),jr=r.curry(function(n,r,t,u){return B(P,function(t,u){r=n(r,t,u)},t,u),r}),Or=r.curry(function(n,r,t,u){var e=[],i=[];B(P,function(n,r){i.push(n),e.push(r)},t,u);for(var o=i.length-1;0<=o;--o)r=n(r,i[o],e[o]);return r}),xr=r.curry(function(n,r,t){return B(P,function(r,t){n(r,t)},r,t)}),wr=r.curry(function(n,r,t,u){var e=n();return B(P,function(n,t){r(e,n,t)},t,u),e}),Ur=r.curry(function(n,t){return void 0!==B(P,r.id,n,t)}),Sr=r.curry(function(n,t){return!B(P,r.always(!0),n,t)}),kr=J(function(n){return void 0!==n?String(n):""},(0,r.id)(function(n){return W(function(r,t){return void 0!==r?void 0!==t?r+n+t:r:t})})),Ir=kr(r.id),Er=$(function(n,r){return n>r}),Rr=Er(r.id),Nr=r.curry(function(n,r,t){var u=0,e=0;return B(P,function(r,t){var i=n(r,t);void 0!==i&&(e+=1,u+=i)},r,t),u/e}),qr=Nr(r.id),Mr=$(function(n,r){return n1?arguments[1]:n;return un(N(r.isString,function(n){return n.split(t)}),N(r.isArray,function(r){return r.join(n)}))}),pt=(0,r.id)(function(n){var t=w(arguments.length>1?arguments[1]:n,"");return un(N(r.isString,function(n){var r=t.exec(n);return r?[n.slice(0,gn(r)),n.slice(mn(r))]:[n,""]}),function(t){if(r.isArray(t)&&2===t.length){var u=t[0],e=t[1];return e?u+n+e:u}})}),yt=on(b,b);n.seemsArrayLike=En,n.Identity=Rn,n.Constant=Nn,n.toFunction=qn,n.assign=Mn,n.modify=Cn,n.remove=zn,n.set=Dn,n.transform=Pn,n.traverse=Wn,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:vn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[cr],r=0,t=arguments.length;r1?r-1:0),u=1;u1?s(t,arguments[1]):s(t),r]},n.first=0,n.index=Xr,n.last=Yr,n.prefix=function(n){return Zr(0,n)},n.slice=Zr,n.suffix=function(n){return Zr(0===n?1/0:n?-n:0,void 0)},n.pickIn=nt,n.prop=rt,n.props=d,n.propsOf=tt,n.removable=function(){function n(n){if(!(n instanceof Object))return n;for(var t=0,e=u.length;t1?arguments[1]:{hint:0};return function(t,u,e,i){var o=Nn(t)?t:"",c=r.hint=function(n,r,t){var u=n.hint,e=t.length;e<=u&&(u=e-1),u<0&&(u=0);for(var i=u-1;0<=i&&u>0&&0<=n||r.isString(n)},qn=(0,r.id)({map:r.applyU,of:r.id,ap:r.applyU,chain:r.applyU}),Mn=(0,r.id)({map:U,ap:function(n,r){return U(function(r){return U(function(n){return n(r)},n)},r)},of:r.id,chain:U}),Cn=(0,r.id)({map:r.sndU}),Pn=(0,r.id)(function(n){switch(typeof n){case"string":return Q(n);case"number":return Y(n);case"object":return e(0,n);default:return 4===n.length?n:(t=n,function(n,u,e,i){return e.map(r.always(n),i(t(n,u),u))})}var t}),zn=r.curry(function(n,r,t){return nn([n,ct(r)],r,t)}),Dn=r.curry(rn),Wn=r.curry(tn),Ln=r.curry(function(n,r){return nn(n,void 0,r)}),$n=r.curry(nn),Bn=r.curry(function(n,t){return rn(n,r.id,t)}),Fn=r.curry(function(n,t){return tn(n,r.id,t)}),Jn=r.curry(F),Tn=function(n){return function(r,t,u,e){return Pn(n(r,t))(r,t,u,e)}},_n=(0,r.id)(function(){for(var n=arguments.length,r=nr;n--;){var t=arguments[n];r=t.length<2?Pn(t[0]):wn(Pn(t[1]),r)(t[0])}return r}),Gn=(0,r.id)(function(n){n=Pn(n);for(var t=En,u=arguments.length;--u;){var e=arguments[u];t=1===e.length?r.always(Pn(e[0])):Rn(e[0],Pn(e[1]),t)}return function(r,u,e,i){return n(r,u,Cn,t)(r,u,e,i)}}),Hn=r.curry(function(n,r,t){return wn(Pn(r),Pn(t))(n)}),Kn=(0,r.id)(function(n,r){for(var t=arguments.length,u=1&t?Pn(arguments[--t]):nr;0<=(t-=2);)u=wn(Pn(arguments[t+1]),u)(arguments[t]);return u}),Qn=r.curry(Un),Vn=r.curry(function(n,r){return[r,Tn(function(r,t){return void 0!==r?n(r,t):nr})]}),Xn=wn(f,dn),Yn=wn(dn,f),Zn=Yn(r.isDefined),nr=function(n,r,t,u){return f(n,r,t,u)},rr=function(n){return function(r,t,u,e){return f(n,t,u,e,n)}},tr=rr(),ur=(0,r.id)(function(){var n=arguments.length,r=nr;if(n)for(r=Pn(arguments[--n]);n;)r=Sn(Pn(arguments[--n]),r);return r}),er=(0,r.id)(r.curryN(2,function(n){return n=Pn(n),function(t){return function n(t,u){var e=j(null);for(var i in u){var o=u[i];e[i]=r.isObject(o)?n(t,o):Pn(o)}return pn(t,e)}(n,t)}})),ir=er(nr),or=(0,r.id)(function(n,r,t,u){return Nn(n)?In(n,0,t,u):t.of(n)}),cr=Pn([xn,or]),fr=Pn([xn,or,0]),ar=(0,r.id)(function(n){return function(t,u,e,i){if(r.isString(t)){var o=e.map;if(n.global){var c=[""];return c.input=t,c.index=0,W===e?function(n,r,t){for(;t=jn(t,r);){var u=n(mn(t),bn(t));if(void 0!==u)return u}}(i,n,c):o((v=t,function(n){for(var r="",t=0,u=function(n){for(var r=[];On!==n;)r.push(n[0],n[1]),n=n[2];return r}(n),e=u.length-2;-2!==e;e+=-2){var i=u[e];r+=v.slice(t,bn(i));var o=u[e+1];void 0!==o&&(r+=o),t=An(i)}return r+v.slice(t)}),function(n,r,t,u,e,i){for(var o=t(On);i=jn(i,e);)o=r(r(n(On,t(i)),o),u(mn(i),bn(i)));return o}(o,e.ap,e.of,i,n,c))}var a=t.match(n);if(a)return o(function(r){return t.replace(n,void 0!==r?r:"")},i(a[0],bn(a)))}var v;return f(t,void 0,e,i)}}),vr=(0,r.id)(pn(dn,O)),sr=(0,r.id)(function(n,t,u,e){return r.isArray(n)?In(n,0,u,e):r.isObject(n)?vr(n,t,u,e):u.of(n)}),dr=(0,r.id)(function(n,t,u,e){return function n(t,i){return r.isArray(t)?In(t,0,u,n):void 0!==t?e(t,i):u.of(t)}(n,t)}),lr=function(n){return function(r,t,u,e){return function r(t,i){return n(t,i)?e(t,i):sr(t,i,u,r)}(r,t)}},hr=lr(function(n){return void 0!==n&&!r.isArray(n)&&!r.isObject(n)}),pr=r.curry(function(n,r,t){return!F(W,function(r,t){if(!n(r,t))return!0},r,t)}),yr=pr(r.id),gr=r.curry(function(n,r,t){return!!F(W,function(r,t){if(n(r,t))return!0},r,t)}),mr=(0,r.curry)(function(n,r,t){var u=[];return F(W,function(r,t){var e=n(r,t);void 0!==e&&u.push(e)},r,t),u}),br=mr(r.id),Ar=J(r.id,function(n){return L(n.concat,n.empty())}),jr=Ar(r.id),Or=r.curry(function(n,r,t){return F($,function(r,t){return n(r,t)?1:0},r,t)}),xr=Or(r.isDefined),wr=r.curry(function(n,r,t){var u=new Map;return F(W,function(r,t){var e=n(r,t),i=u.get(e);u.set(e,void 0!==i?i+1:1)},r,t),u}),Ur=wr(r.id),Ir=r.curry(function(n,r,t,u){return F(W,function(t,u){r=n(r,t,u)},t,u),r}),Sr=r.curry(function(n,r,t,u){var e=[],i=[];F(W,function(n,r){i.push(n),e.push(r)},t,u);for(var o=i.length-1;0<=o;--o)r=n(r,i[o],e[o]);return r}),kr=r.curry(function(n,r,t){return F(W,function(r,t){n(r,t)},r,t)}),Er=r.curry(function(n,r,t,u){var e=n();return F(W,function(n,t){r(e,n,t)},t,u),e}),Rr=r.curry(function(n,t){return void 0!==F(W,r.id,n,t)}),Nr=r.curry(function(n,t){return!F(W,r.always(!0),n,t)}),qr=J(function(n){return void 0!==n?String(n):""},(0,r.id)(function(n){return L(function(r,t){return void 0!==r?void 0!==t?r+n+t:r:t})})),Mr=qr(r.id),Cr=B(function(n,r){return n>r}),Pr=Cr(r.id),zr=r.curry(function(n,r,t){var u=0,e=0;return F(W,function(r,t){var i=n(r,t);void 0!==i&&(e+=1,u+=i)},r,t),u/e}),Dr=zr(r.id),Wr=B(function(n,r){return n1?arguments[1]:n;return on(q(r.isString,function(n){return n.split(t)}),q(r.isArray,function(r){return r.join(n)}))}),At=(0,r.id)(function(n){var t=w(arguments.length>1?arguments[1]:n,"");return on(q(r.isString,function(n){var r=t.exec(n);return r?[n.slice(0,bn(r)),n.slice(An(r))]:[n,""]}),function(t){if(r.isArray(t)&&2===t.length){var u=t[0],e=t[1];return e?u+n+e:u}})}),jt=fn(b,b);n.seemsArrayLike=Nn,n.Identity=qn,n.IdentityAsync=Mn,n.Constant=Cn,n.toFunction=Pn,n.assign=zn,n.modify=Dn,n.modifyAsync=Wn,n.remove=Ln,n.set=$n,n.transform=Bn,n.transformAsync=Fn,n.traverse=Jn,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:dn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[dr],r=0,t=arguments.length;r1?r-1:0),u=1;u1?s(t,arguments[1]):s(t),r]},n.first=0,n.index=tt,n.last=ut,n.prefix=function(n){return et(0,n)},n.slice=et,n.suffix=function(n){return et(0===n?1/0:n?-n:0,void 0)},n.pickIn=it,n.prop=ot,n.props=d,n.propsOf=ct,n.removable=function(){function n(n){if(!(n instanceof Object))return n;for(var t=0,e=u.length;t Operations on optics