Best JavaScript code snippet using playwright-internal
crocks.js
Source:crocks.js
...465var Pred = __webpack_require__(17).proxy('Pred')466var isFunction = __webpack_require__(4)467var isSameType = __webpack_require__(18)468// isPredOrFunc :: ((a -> b) | pred) -> bool469var isPredOrFunc = function (predOrFunc) { return isFunction(predOrFunc) || isSameType(Pred, predOrFunc); }470module.exports = isPredOrFunc471/***/ }),472/* 17 */473/***/ (function(module, exports) {474/** @license ISC License (c) copyright 2017 original and current authors */475/** @author Ian Hofmann-Hicks (evil) */476var _types = {477 'unk': function () { return 'unknown'; },478 'All': function () { return 'All'; },479 'Any': function () { return 'Any'; },480 'Arrow': function () { return 'Arrow'; },481 'Assign': function () { return 'Assign'; },482 'Async': function () { return 'Async'; },483 'Const': function (inner) { return ("Const(" + inner + ")"); },484 'Either': function () { return 'Either'; },485 'Endo': function () { return 'Endo'; },486 'Equiv': function () { return 'Equiv'; },487 'First': function () { return 'First'; },488 'Identity': function () { return 'Identity'; },489 'IO': function () { return 'IO'; },490 'Last': function () { return 'Last'; },491 'List': function () { return 'List'; },492 'Max': function () { return 'Max'; },493 'Maybe': function () { return 'Maybe'; },494 'Min': function () { return 'Min'; },495 'Pair': function () { return 'Pair'; },496 'Pred': function () { return 'Pred'; },497 'Prod': function () { return 'Prod'; },498 'Reader': function () { return 'Reader'; },499 'Result': function () { return 'Result'; },500 'Star': function () { return 'Star'; },501 'State': function () { return 'State'; },502 'Sum': function () { return 'Sum'; },503 'Tuple': function (n) { return (n + "-Tuple"); },504 'Unit': function () { return 'Unit'; },505 'Writer': function () { return 'Writer'; }506}507var type =508 function (type) { return _types[type] || _types['unk']; }509var proxy =510 function (t, ctx) { return ({ type: function () { return type(t)(ctx); } }); }511var typeFn = function (t, ver, ctx) {512 var typeStr = type(t)(ctx)513 return ("crocks/" + typeStr + "@" + (ver || 0))514}515module.exports = {516 proxy: proxy, type: type, typeFn: typeFn517}518/***/ }),519/* 18 */520/***/ (function(module, exports, __webpack_require__) {521/** @license ISC License (c) copyright 2016 original and current authors */522/** @author Ian Hofmann-Hicks (evil) */523var curry = __webpack_require__(3)524var isFunction = __webpack_require__(4)525var type = __webpack_require__(19)526// isSameType :: Container m => (m, m) -> Boolean527function isSameType(x, y) {528 var tX = type(x)529 var tY = type(y)530 return tX === tY531 || isFunction(x) && x.name === tY532 || isFunction(y) && y.name === tX533}534module.exports = curry(isSameType)535/***/ }),536/* 19 */537/***/ (function(module, exports, __webpack_require__) {538/** @license ISC License (c) copyright 2017 original and current authors */539/** @author Ian Hofmann-Hicks (evil) */540var isFunction = __webpack_require__(4)541function type(x) {542 if(x) {543 if(isFunction(x.type)) {544 return x.type()545 }546 }547 return {}.toString.call(x).slice(8, -1)548}549module.exports = type550/***/ }),551/* 20 */552/***/ (function(module, exports, __webpack_require__) {553/** @license ISC License (c) copyright 2017 original and current authors */554/** @author Ian Hofmann-Hicks (evil) */555var isFunction = __webpack_require__(4)556function predOrFunc(pred, x) {557 if(isFunction(pred)) {558 return pred(x)559 }560 return pred.runWith(x)561}562module.exports = predOrFunc563/***/ }),564/* 21 */565/***/ (function(module, exports, __webpack_require__) {566/** @license ISC License (c) copyright 2016 original and current authors */567/** @author Ian Hofmann-Hicks (evil) */568var curry = __webpack_require__(3)569var isFunction = __webpack_require__(4)570var isPredOrFunc = __webpack_require__(16)571var predOrFunc = __webpack_require__(20)572// ifElse : (a -> Boolean) | Pred -> (a -> b) -> (a -> c) -> a -> (a | c)573function ifElse(pred, f, g) {574 if(!isPredOrFunc(pred)) {575 throw new TypeError(576 'ifElse: Pred or predicate function required for first argument'577 )578 }579 if(!(isFunction(f) && isFunction(g))) {580 throw new TypeError(581 'ifElse: Functions required for second and third arguments'582 )583 }584 return function (x) { return predOrFunc(pred, x) ? f(x) : g(x); }585}586module.exports = curry(ifElse)587/***/ }),588/* 22 */589/***/ (function(module, exports, __webpack_require__) {590/** @license ISC License (c) copyright 2018 original and current authors */591/** @author Ian Hofmann-Hicks (evil) */592var curry = __webpack_require__(3)593var isPredOrFunc = __webpack_require__(16)594var predOrFunc = __webpack_require__(20)595// implies :: (a -> Boolean) | Pred -> (a -> Boolean) -> a -> Boolean596function implies(p, q) {597 if(!(isPredOrFunc(p) && isPredOrFunc(q))) {598 throw new TypeError(599 'implies: Preds or predicate functions required for first two arguments'600 )601 }602 return function (x) { return !predOrFunc(p, x) || !!predOrFunc(q, x); }603}604module.exports = curry(implies)605/***/ }),606/* 23 */607/***/ (function(module, exports, __webpack_require__) {608/** @license ISC License (c) copyright 2017 original and current authors */609/** @author Ian Hofmann-Hicks (evil) */610var curry = __webpack_require__(3)611var isPredOrFunc = __webpack_require__(16)612var predOrFunc = __webpack_require__(20)613// not : (a -> Boolean) | Pred -> a -> Boolean614function not(pred, x) {615 if(!isPredOrFunc(pred)) {616 throw new TypeError(617 'not: Pred or predicate function required for first argument'618 )619 }620 return !predOrFunc(pred, x)621}622module.exports = curry(not)623/***/ }),624/* 24 */625/***/ (function(module, exports, __webpack_require__) {626/** @license ISC License (c) copyright 2017 original and current authors */627/** @author Ian Hofmann-Hicks (evil) */628var curry = __webpack_require__(3)629var isPredOrFunc = __webpack_require__(16)630var predOrFunc = __webpack_require__(20)631// or : (a -> Boolean) | Pred -> (a -> Boolean) | Pred -> a -> Boolean632function or(f, g) {633 if(!(isPredOrFunc(f) && isPredOrFunc(g))) {634 throw new TypeError(635 'or: Preds or predicate functions required for first two arguments'636 )637 }638 return function (x) { return !!(predOrFunc(f, x) || predOrFunc(g, x)); }639}640module.exports = curry(or)641/***/ }),642/* 25 */643/***/ (function(module, exports, __webpack_require__) {644/** @license ISC License (c) copyright 2016 original and current authors */645/** @author Ian Hofmann-Hicks (evil) */646var curry = __webpack_require__(3)647var isPredOrFunc = __webpack_require__(16)648var isFunction = __webpack_require__(4)649var predOrFunc = __webpack_require__(20)650// unless : (a -> Boolean) | Pred -> (a -> b) -> a | b651function unless(pred, f) {652 if(!isPredOrFunc(pred)) {653 throw new TypeError(654 'unless: Pred or predicate function required for first argument'655 )656 }657 if(!isFunction(f)) {658 throw new TypeError(659 'unless: Function required for second argument'660 )661 }662 return function (x) { return !predOrFunc(pred, x) ? f(x) : x; }663}664module.exports = curry(unless)665/***/ }),666/* 26 */667/***/ (function(module, exports, __webpack_require__) {668/** @license ISC License (c) copyright 2016 original and current authors */669/** @author Ian Hofmann-Hicks (evil) */670var curry = __webpack_require__(3)671var predOrFunc = __webpack_require__(20)672var isPredOrFunc = __webpack_require__(16)673var isFunction = __webpack_require__(4)674// when : (a -> Boolean) | Pred -> (a -> b) -> a -> b | a675function when(pred, f) {676 if(!isPredOrFunc(pred)) {677 throw new TypeError(678 'when: Pred or predicate function required for first argument'679 )680 }681 if(!isFunction(f)) {682 throw new TypeError(683 'when: Function required for second argument'684 )685 }686 return function (x) { return predOrFunc(pred, x) ? f(x) : x; }687}688module.exports = curry(when)689/***/ }),690/* 27 */691/***/ (function(module, exports, __webpack_require__) {692module.exports = {693 hasProp: __webpack_require__(28),694 hasProps: __webpack_require__(42),695 hasPropPath: __webpack_require__(44),696 isAlt: __webpack_require__(46),697 isAlternative: __webpack_require__(49),698 isApplicative: __webpack_require__(53),699 isApply: __webpack_require__(54),700 isArray: __webpack_require__(55),701 isBifunctor: __webpack_require__(56),702 isBichain: __webpack_require__(58),703 isBoolean: __webpack_require__(60),704 isCategory: __webpack_require__(61),705 isChain: __webpack_require__(63),706 isContravariant: __webpack_require__(65),707 isDate: __webpack_require__(67),708 isDefined: __webpack_require__(69),709 isEmpty: __webpack_require__(70),710 isExtend: __webpack_require__(71),711 isFalse: __webpack_require__(73),712 isFalsy: __webpack_require__(74),713 isFoldable: __webpack_require__(75),714 isFunction: __webpack_require__(76),715 isFunctor: __webpack_require__(77),716 isInteger: __webpack_require__(78),717 isIterable: __webpack_require__(79),718 isMap: __webpack_require__(81),719 isMonad: __webpack_require__(83),720 isMonoid: __webpack_require__(85),721 isNil: __webpack_require__(86),722 isNumber: __webpack_require__(87),723 isObject: __webpack_require__(88),724 isPlus: __webpack_require__(89),725 isProfunctor: __webpack_require__(90),726 isPromise: __webpack_require__(92),727 isSame: __webpack_require__(94),728 isSameType: __webpack_require__(95),729 isSemigroup: __webpack_require__(96),730 isSemigroupoid: __webpack_require__(97),731 isSetoid: __webpack_require__(98),732 isString: __webpack_require__(99),733 isSymbol: __webpack_require__(100),734 isTraversable: __webpack_require__(102),735 isTrue: __webpack_require__(103),736 isTruthy: __webpack_require__(104),737 pathEq: __webpack_require__(105),738 pathSatisfies: __webpack_require__(106),739 propEq: __webpack_require__(107),740 propPathEq: __webpack_require__(108),741 propSatisfies: __webpack_require__(109),742 propPathSatisfies: __webpack_require__(110)743}744/***/ }),745/* 28 */746/***/ (function(module, exports, __webpack_require__) {747/** @license ISC License (c) copyright 2017 original and current authors */748/** @author Ian Hofmann-Hicks (evil) */749var curry = __webpack_require__(3)750var isDefined = __webpack_require__(29)751var isEmpty = __webpack_require__(30)752var isInteger = __webpack_require__(39)753var isNil = __webpack_require__(41)754var isString = __webpack_require__(36)755// hasProp : (String | Integer) -> a -> Boolean756function hasProp(key, x) {757 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {758 throw new TypeError(759 'hasProp: Non-empty String or Integer required for first argument'760 )761 }762 if(isNil(x)) {763 return false764 }765 return isDefined(x[key])766}767module.exports = curry(hasProp)768/***/ }),769/* 29 */770/***/ (function(module, exports) {771/** @license ISC License (c) copyright 2017 original and current authors */772/** @author Ian Hofmann-Hicks (evil) */773function isDefined(x) {774 return x !== undefined775}776module.exports = isDefined777/***/ }),778/* 30 */779/***/ (function(module, exports, __webpack_require__) {780/** @license ISC License (c) copyright 2016 original and current authors */781/** @author Ian Hofmann-Hicks (evil) */782var isObject = __webpack_require__(31)783var isMonoid = __webpack_require__(32)784var equals = __webpack_require__(37)785var fl = __webpack_require__(34)786function isEmpty(x) {787 if(isMonoid(x)) {788 var empty = x.constructor[fl['empty']] || x.constructor['empty'] || x['empty']789 return equals(x, empty())790 }791 if(isObject(x)) {792 return !Object.keys(x).length793 }794 if(x && x.length !== undefined) {795 return !x.length796 }797 return true798}799module.exports = isEmpty800/***/ }),801/* 31 */802/***/ (function(module, exports) {803/** @license ISC License (c) copyright 2016 original and current authors */804/** @author Ian Hofmann-Hicks (evil) */805var toString = Object.prototype.toString806// isObject : a -> Boolean807function isObject(x) {808 return !!x809 && toString.call(x) === '[object Object]'810}811module.exports = isObject812/***/ }),813/* 32 */814/***/ (function(module, exports, __webpack_require__) {815/** @license ISC License (c) copyright 2016 original and current authors */816/** @author Ian Hofmann-Hicks (evil) */817var hasAlg = __webpack_require__(33)818var isSemigroup = __webpack_require__(35)819// isMonoid :: a -> Boolean820function isMonoid(m) {821 return isSemigroup(m)822 && (hasAlg('empty', m) || hasAlg('empty', m.constructor))823}824module.exports = isMonoid825/***/ }),826/* 33 */827/***/ (function(module, exports, __webpack_require__) {828/** @license ISC License (c) copyright 2017 original and current authors */829/** @author Ian Hofmann-Hicks (evil) */830var isFunction = __webpack_require__(4)831var fl = __webpack_require__(34)832var check = function (alg, m) { return isFunction(m[fl[alg]]) || isFunction(m[alg]); }833var checkImpl = function (alg, m) { return isFunction(m['@@implements']) && !!m['@@implements'](alg); }834var hasAlg = function (alg, m) { return !!m && (check(alg, m) || checkImpl(alg, m)); }835module.exports = hasAlg836/***/ }),837/* 34 */838/***/ (function(module, exports) {839/** @license ISC License (c) copyright 2018 original and current authors */840/** @author Ian Hofmann-Hicks (evil) */841module.exports = {842 alt: 'fantasy-land/alt',843 bimap: 'fantasy-land/bimap',844 chain: 'fantasy-land/chain',845 compose: 'fantasy-land/compose',846 concat: 'fantasy-land/concat',847 contramap: 'fantasy-land/contramap',848 empty: 'fantasy-land/empty',849 equals: 'fantasy-land/equals',850 extend: 'fantasy-land/extend',851 filter: 'fantasy-land/filter',852 id: 'fantasy-land/id',853 map: 'fantasy-land/map',854 of: 'fantasy-land/of',855 promap: 'fantasy-land/promap',856 reduce: 'fantasy-land/reduce',857 zero: 'fantasy-land/zero'858}859/***/ }),860/* 35 */861/***/ (function(module, exports, __webpack_require__) {862/** @license ISC License (c) copyright 2016 original and current authors */863/** @author Ian Hofmann-Hicks (evil) */864var isString = __webpack_require__(36)865var hasAlg = __webpack_require__(33)866// isSemigroup : a -> Boolean867function isSemigroup(m) {868 return isString(m)869 || !!m && hasAlg('concat', m)870}871module.exports = isSemigroup872/***/ }),873/* 36 */874/***/ (function(module, exports) {875/** @license ISC License (c) copyright 2016 original and current authors */876/** @author Ian Hofmann-Hicks (evil) */877// isString : a -> Boolean878function isString(x) {879 return typeof x === 'string'880}881module.exports = isString882/***/ }),883/* 37 */884/***/ (function(module, exports, __webpack_require__) {885/** @license ISC License (c) copyright 2017 original and current authors */886/** @author Ian Hofmann-Hicks (evil) */887var isSameType = __webpack_require__(18)888var isSame = __webpack_require__(38)889var hasAlg = __webpack_require__(33)890var type = __webpack_require__(19)891var fl = __webpack_require__(34)892var comp = function (a, b) { return a.valueOf() === b.valueOf(); }893var strats = {894 'Array': function (a, b) { return a.length === b.length895 && deepEquals(a, b); },896 'Date': function (a, b) { return isSame(a.valueOf(), b.valueOf()); },897 'Error': function (a, b) { return a.name === b.name898 && a.message === b.message; },899 'Object': function (a, b) { return Object.keys(a).length === Object.keys(b).length900 && deepEquals(a, b); },901 'RegExp': function (a, b) { return a.source === b.source902 && a.ignoreCase === b.ignoreCase903 && a.global === b.global904 && a.multiline === b.multiline905 && a.unicode === b.unicode; }906}907function deepEquals(a, b) {908 for(var key in a) {909 if(!equals(a[key], b[key])) {910 return false911 }912 }913 return true914}915function equals(a, b) {916 if(isSame(a, b)) {917 return true918 }919 if(!isSameType(a, b)) {920 return false921 }922 if(hasAlg('equals', a)) {923 return (b[fl.equals] || b.equals).call(b, a)924 }925 return (strats[type(a)] || comp)(a, b)926}927module.exports = equals928/***/ }),929/* 38 */930/***/ (function(module, exports) {931/** @license ISC License (c) copyright 2017 original and current authors */932/** @author Ian Hofmann-Hicks (evil) */933// isSame : (a, b) -> Boolean934function isSame(x, y) {935 if(x === y) {936 return x !== 0 || 1 / x === 1 / y937 }938 return x !== x && y !== y939}940module.exports = isSame941/***/ }),942/* 39 */943/***/ (function(module, exports, __webpack_require__) {944/** @license ISC License (c) copyright 2017 original and current authors */945/** @author Ian Hofmann-Hicks (evil) */946var isNumber = __webpack_require__(40)947// isInteger : a -> Boolean948function isInteger(x) {949 return isNumber(x)950 && isFinite(x)951 && Math.floor(x) === x952}953module.exports = isInteger954/***/ }),955/* 40 */956/***/ (function(module, exports) {957/** @license ISC License (c) copyright 2016 original and current authors */958/** @author Ian Hofmann-Hicks (evil) */959// isNumber : a -> Boolean960function isNumber(x) {961 return typeof x === 'number'962 && !isNaN(x)963}964module.exports = isNumber965/***/ }),966/* 41 */967/***/ (function(module, exports) {968/** @license ISC License (c) copyright 2017 original and current authors */969/** @author Ian Hofmann-Hicks (evil) */970/* eslint eqeqeq: "off" */971// isNil : a -> Boolean972function isNil(x) {973 return x == null || x !== x974}975module.exports = isNil976/***/ }),977/* 42 */978/***/ (function(module, exports, __webpack_require__) {979/** @license ISC License (c) copyright 2019 original and current authors */980/** @author Dale Francis (dalefrancis88) */981var curry = __webpack_require__(3)982var isDefined = __webpack_require__(29)983var isEmpty = __webpack_require__(30)984var isFoldable = __webpack_require__(43)985var isInteger = __webpack_require__(39)986var isNil = __webpack_require__(41)987var isString = __webpack_require__(36)988// err :: String989var err =990 'hasProps: First argument must be a Foldable of Non-empty Strings or Integers'991// isKeyValid :: a -> Boolean992var isKeyValid = function (key) { return isString(key) && !isEmpty(key) || isInteger(key); }993// hasKey :: a -> (String | Integer) -> Boolean994var hasKey = function (obj) { return function (key) {995 if(!isKeyValid(key)) {996 throw new TypeError(err)997 }998 return isDefined(obj[key])999}; }1000// every :: (a -> Boolean) -> ((Null | Boolean), a) -> Boolean1001var every = function (fn) { return function (acc, x) { return (acc === null ? true : acc) && fn(x); }; }1002// hasProps :: Foldable f => f (String | Integer) -> a -> Boolean1003function hasProps(keys, x) {1004 if(!isFoldable(keys)) {1005 throw new TypeError(err)1006 }1007 if(isNil(x)) {1008 return false1009 }1010 var result = keys.reduce(1011 every(hasKey(x)),1012 null1013 )1014 return result === null || result1015}1016module.exports = curry(hasProps)1017/***/ }),1018/* 43 */1019/***/ (function(module, exports, __webpack_require__) {1020/** @license ISC License (c) copyright 2017 original and current authors */1021/** @author Ian Hofmann-Hicks (evil) */1022var hasAlg = __webpack_require__(33)1023// isFoldable : a -> Boolean1024function isFoldable(m) {1025 return !!m1026 && hasAlg('reduce', m)1027}1028module.exports = isFoldable1029/***/ }),1030/* 44 */1031/***/ (function(module, exports, __webpack_require__) {1032/** @license ISC License (c) copyright 2017 original and current authors */1033/** @author Ian Hofmann-Hicks (evil) */1034var curry = __webpack_require__(3)1035var isArray = __webpack_require__(45)1036var isDefined = __webpack_require__(29)1037var isEmpty = __webpack_require__(30)1038var isInteger = __webpack_require__(39)1039var isNil = __webpack_require__(41)1040var isString = __webpack_require__(36)1041// hasPropPath : [ String | Integer ] -> a -> Boolean1042function hasPropPath(keys, target) {1043 if(!isArray(keys)) {1044 throw new TypeError(1045 'hasPropPath: Array of Non-empty Strings or Integers required for first argument'1046 )1047 }1048 if(isNil(target)) {1049 return false1050 }1051 var value = target1052 for(var i = 0; i < keys.length; i++) {1053 var key = keys[i]1054 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {1055 throw new TypeError(1056 'hasPropPath: Array of Non-empty Strings or Integers required for first argument'1057 )1058 }1059 if(isNil(value)) {1060 return false1061 }1062 value = value[key]1063 if(!isDefined(value)) {1064 return false1065 }1066 }1067 return true1068}1069module.exports = curry(hasPropPath)1070/***/ }),1071/* 45 */1072/***/ (function(module, exports) {1073/** @license ISC License (c) copyright 2016 original and current authors */1074/** @author Ian Hofmann-Hicks (evil) */1075function isArray(x) {1076 return Array.isArray(x)1077}1078module.exports = isArray1079/***/ }),1080/* 46 */1081/***/ (function(module, exports, __webpack_require__) {1082/** @license ISC License (c) copyright 2017 original and current authors */1083/** @author Ian Hofmann-Hicks (evil) */1084module.exports =1085 __webpack_require__(47)1086/***/ }),1087/* 47 */1088/***/ (function(module, exports, __webpack_require__) {1089/** @license ISC License (c) copyright 2017 original and current authors */1090/** @author Ian Hofmann-Hicks (evil) */1091var hasAlg = __webpack_require__(33)1092var isFunctor = __webpack_require__(48)1093// isAlt : a -> Boolean1094function isAlt(m) {1095 return isFunctor(m)1096 && hasAlg('alt', m)1097}1098module.exports = isAlt1099/***/ }),1100/* 48 */1101/***/ (function(module, exports, __webpack_require__) {1102/** @license ISC License (c) copyright 2016 original and current authors */1103/** @author Ian Hofmann-Hicks (evil) */1104var hasAlg = __webpack_require__(33)1105// isFunctor : a -> Boolean1106function isFunctor(m) {1107 return !!m && hasAlg('map', m)1108}1109module.exports = isFunctor1110/***/ }),1111/* 49 */1112/***/ (function(module, exports, __webpack_require__) {1113/** @license ISC License (c) copyright 2016 original and current authors */1114/** @author Ian Hofmann-Hicks (evil) */1115var isApplicative = __webpack_require__(50)1116var isPlus = __webpack_require__(52)1117// isAlternative : a -> Boolean1118function isAlternative(m) {1119 return isPlus(m)1120 && isApplicative(m)1121}1122module.exports = isAlternative1123/***/ }),1124/* 50 */1125/***/ (function(module, exports, __webpack_require__) {1126/** @license ISC License (c) copyright 2016 original and current authors */1127/** @author Ian Hofmann-Hicks (evil) */1128var hasAlg = __webpack_require__(33)1129var isApply = __webpack_require__(51)1130// isApplicative : a -> Boolean1131function isApplicative(m) {1132 return isApply(m)1133 && (hasAlg('of', m) || hasAlg('of', m.constructor))1134}1135module.exports = isApplicative1136/***/ }),1137/* 51 */1138/***/ (function(module, exports, __webpack_require__) {1139/** @license ISC License (c) copyright 2016 original and current authors */1140/** @author Ian Hofmann-Hicks (evil) */1141var hasAlg = __webpack_require__(33)1142var isFunctor = __webpack_require__(48)1143// isApply : a -> Boolean1144function isApply(m) {1145 return isFunctor(m)1146 && hasAlg('ap', m)1147}1148module.exports = isApply1149/***/ }),1150/* 52 */1151/***/ (function(module, exports, __webpack_require__) {1152/** @license ISC License (c) copyright 2016 original and current authors */1153/** @author Ian Hofmann-Hicks (evil) */1154var hasAlg = __webpack_require__(33)1155var isAlt = __webpack_require__(47)1156// isPlus : a -> Boolean1157function isPlus(m) {1158 return isAlt(m)1159 && (hasAlg('zero', m) || hasAlg('zero', m.constructor))1160}1161module.exports = isPlus1162/***/ }),1163/* 53 */1164/***/ (function(module, exports, __webpack_require__) {1165/** @license ISC License (c) copyright 2017 original and current authors */1166/** @author Ian Hofmann-Hicks (evil) */1167module.exports =1168 __webpack_require__(50)1169/***/ }),1170/* 54 */1171/***/ (function(module, exports, __webpack_require__) {1172/** @license ISC License (c) copyright 2017 original and current authors */1173/** @author Ian Hofmann-Hicks (evil) */1174module.exports =1175 __webpack_require__(51)1176/***/ }),1177/* 55 */1178/***/ (function(module, exports, __webpack_require__) {1179/** @license ISC License (c) copyright 2017 original and current authors */1180/** @author Ian Hofmann-Hicks (evil) */1181module.exports =1182 __webpack_require__(45)1183/***/ }),1184/* 56 */1185/***/ (function(module, exports, __webpack_require__) {1186/** @license ISC License (c) copyright 2017 original and current authors */1187/** @author Ian Hofmann-Hicks (evil) */1188module.exports =1189 __webpack_require__(57)1190/***/ }),1191/* 57 */1192/***/ (function(module, exports, __webpack_require__) {1193/** @license ISC License (c) copyright 2017 original and current authors */1194/** @author Ian Hofmann-Hicks (evil) */1195var hasAlg = __webpack_require__(33)1196var isFunctor = __webpack_require__(48)1197// isBifunctor : a -> Boolean1198function isBifunctor(m) {1199 return isFunctor(m)1200 && hasAlg('bimap', m)1201}1202module.exports = isBifunctor1203/***/ }),1204/* 58 */1205/***/ (function(module, exports, __webpack_require__) {1206/** @license ISC License (c) copyright 2019 original and current authors */1207/** @author Dale Francis (dalefrancis88) */1208module.exports =1209 __webpack_require__(59)1210/***/ }),1211/* 59 */1212/***/ (function(module, exports, __webpack_require__) {1213/** @license ISC License (c) copyright 2019 original and current authors */1214/** @author Dale Francis (dalefrancis88) */1215var hasAlg = __webpack_require__(33)1216// isBichain : a -> Boolean1217function isBichain(m) {1218 return hasAlg('bichain', m)1219}1220module.exports = isBichain1221/***/ }),1222/* 60 */1223/***/ (function(module, exports) {1224/** @license ISC License (c) copyright 2017 original and current authors */1225/** @author Ian Hofmann-Hicks (evil) */1226// isBoolean : a -> Boolean1227function isBoolean(x) {1228 return typeof x === 'boolean'1229}1230module.exports = isBoolean1231/***/ }),1232/* 61 */1233/***/ (function(module, exports, __webpack_require__) {1234/** @license ISC License (c) copyright 2017 original and current authors */1235/** @author Ian Hofmann-Hicks (evil) */1236var hasAlg = __webpack_require__(33)1237var isSemigroupoid = __webpack_require__(62)1238// isCategory : a -> Boolean1239function isCategory(m) {1240 return isSemigroupoid(m)1241 && (hasAlg('id', m) || hasAlg('id', m.constructor))1242}1243module.exports = isCategory1244/***/ }),1245/* 62 */1246/***/ (function(module, exports, __webpack_require__) {1247/** @license ISC License (c) copyright 2017 original and current authors */1248/** @author Ian Hofmann-Hicks (evil) */1249var hasAlg = __webpack_require__(33)1250// isSemigroupoid : a -> Boolean1251function isSemigroupoid(m) {1252 return !!m && hasAlg('compose', m)1253}1254module.exports = isSemigroupoid1255/***/ }),1256/* 63 */1257/***/ (function(module, exports, __webpack_require__) {1258/** @license ISC License (c) copyright 2017 original and current authors */1259/** @author Ian Hofmann-Hicks (evil) */1260module.exports =1261 __webpack_require__(64)1262/***/ }),1263/* 64 */1264/***/ (function(module, exports, __webpack_require__) {1265/** @license ISC License (c) copyright 2016 original and current authors */1266/** @author Ian Hofmann-Hicks (evil) */1267var hasAlg = __webpack_require__(33)1268var isApply = __webpack_require__(51)1269// isChain : a -> Boolean1270function isChain(m) {1271 return isApply(m)1272 && hasAlg('chain', m)1273}1274module.exports = isChain1275/***/ }),1276/* 65 */1277/***/ (function(module, exports, __webpack_require__) {1278/** @license ISC License (c) copyright 2017 original and current authors */1279/** @author Ian Hofmann-Hicks (evil) */1280module.exports =1281 __webpack_require__(66)1282/***/ }),1283/* 66 */1284/***/ (function(module, exports, __webpack_require__) {1285/** @license ISC License (c) copyright 2017 original and current authors */1286/** @author Ian Hofmann-Hicks (evil) */1287var hasAlg = __webpack_require__(33)1288// isContravariant : a -> Boolean1289function isContravariant(m) {1290 return !!m && hasAlg('contramap', m)1291}1292module.exports = isContravariant1293/***/ }),1294/* 67 */1295/***/ (function(module, exports, __webpack_require__) {1296/** @license ISC License (c) copyright 2018 original and current authors */1297/** @author Dale Francis (dalefrancis88) */1298module.exports =1299 __webpack_require__(68)1300/***/ }),1301/* 68 */1302/***/ (function(module, exports) {1303/** @license ISC License (c) copyright 2018 original and current authors */1304/** @author Dale Francis (dalefrancis88) */1305// isDate : a -> Boolean1306function isDate(x) {1307 return Object.prototype.toString.apply(x) === '[object Date]'1308 && !isNaN(x.valueOf())1309}1310module.exports = isDate1311/***/ }),1312/* 69 */1313/***/ (function(module, exports, __webpack_require__) {1314/** @license ISC License (c) copyright 2017 original and current authors */1315/** @author Ian Hofmann-Hicks (evil) */1316module.exports =1317 __webpack_require__(29)1318/***/ }),1319/* 70 */1320/***/ (function(module, exports, __webpack_require__) {1321/** @license ISC License (c) copyright 2017 original and current authors */1322/** @author Ian Hofmann-Hicks (evil) */1323module.exports =1324 __webpack_require__(30)1325/***/ }),1326/* 71 */1327/***/ (function(module, exports, __webpack_require__) {1328/** @license ISC License (c) copyright 2017 original and current authors */1329/** @author Ian Hofmann-Hicks (evil) */1330module.exports =1331 __webpack_require__(72)1332/***/ }),1333/* 72 */1334/***/ (function(module, exports, __webpack_require__) {1335/** @license ISC License (c) copyright 2016 original and current authors */1336/** @author Ian Hofmann-Hicks (evil) */1337var hasAlg = __webpack_require__(33)1338var isFunctor = __webpack_require__(48)1339// isExtend : a -> Boolean1340function isExtend(m) {1341 return isFunctor(m)1342 && hasAlg('extend', m)1343}1344module.exports = isExtend1345/***/ }),1346/* 73 */1347/***/ (function(module, exports) {1348/** @license ISC License (c) copyright 2019 original and current authors */1349/** @author Dale Francis (dalefrancis88) */1350// isFalse : a -> Boolean1351function isFalse(x) {1352 return x === false1353}1354module.exports = isFalse1355/***/ }),1356/* 74 */1357/***/ (function(module, exports) {1358/** @license ISC License (c) copyright 2019 original and current authors */1359/** @author Dale Francis (dalefrancis88) */1360// isFalsy : a -> Boolean1361function isFalsy(x) {1362 return !x1363}1364module.exports = isFalsy1365/***/ }),1366/* 75 */1367/***/ (function(module, exports, __webpack_require__) {1368/** @license ISC License (c) copyright 2017 original and current authors */1369/** @author Ian Hofmann-Hicks (evil) */1370module.exports =1371 __webpack_require__(43)1372/***/ }),1373/* 76 */1374/***/ (function(module, exports, __webpack_require__) {1375/** @license ISC License (c) copyright 2017 original and current authors */1376/** @author Ian Hofmann-Hicks (evil) */1377module.exports =1378 __webpack_require__(4)1379/***/ }),1380/* 77 */1381/***/ (function(module, exports, __webpack_require__) {1382/** @license ISC License (c) copyright 2017 original and current authors */1383/** @author Ian Hofmann-Hicks (evil) */1384module.exports =1385 __webpack_require__(48)1386/***/ }),1387/* 78 */1388/***/ (function(module, exports, __webpack_require__) {1389/** @license ISC License (c) copyright 2017 original and current authors */1390/** @author Ian Hofmann-Hicks (evil) */1391module.exports =1392 __webpack_require__(39)1393/***/ }),1394/* 79 */1395/***/ (function(module, exports, __webpack_require__) {1396/** @license ISC License (c) copyright 2018 original and current authors */1397/** @author Dale Francis (dalefrancis88) */1398module.exports =1399 __webpack_require__(80)1400/***/ }),1401/* 80 */1402/***/ (function(module, exports, __webpack_require__) {1403/** @license ISC License (c) copyright 2018 original and current authors */1404/** @author Dale Francis (dalefrancis88) */1405var isFunction = __webpack_require__(4)1406var isNil = __webpack_require__(41)1407function isIterable(iterable) {1408 return !isNil(iterable) && isFunction(iterable[Symbol.iterator])1409}1410module.exports = isIterable1411/***/ }),1412/* 81 */1413/***/ (function(module, exports, __webpack_require__) {1414/** @license ISC License (c) copyright 2019 original and current authors */1415/** @author Benny Powers (bennypowers) */1416module.exports =1417 __webpack_require__(82)1418/***/ }),1419/* 82 */1420/***/ (function(module, exports) {1421/** @license ISC License (c) copyright 2019 original and current authors */1422/** @author Benny Powers (bennypowers) */1423function isMap(x) {1424 return x instanceof Map1425}1426module.exports = isMap1427/***/ }),1428/* 83 */1429/***/ (function(module, exports, __webpack_require__) {1430/** @license ISC License (c) copyright 2017 original and current authors */1431/** @author Ian Hofmann-Hicks (evil) */1432module.exports =1433 __webpack_require__(84)1434/***/ }),1435/* 84 */1436/***/ (function(module, exports, __webpack_require__) {1437/** @license ISC License (c) copyright 2017 original and current authors */1438/** @author Ian Hofmann-Hicks (evil) */1439var hasAlg = __webpack_require__(33)1440var isApplicative = __webpack_require__(50)1441// isMonad : a -> Boolean1442function isMonad(m) {1443 return isApplicative(m)1444 && hasAlg('chain', m)1445}1446module.exports = isMonad1447/***/ }),1448/* 85 */1449/***/ (function(module, exports, __webpack_require__) {1450/** @license ISC License (c) copyright 2017 original and current authors */1451/** @author Ian Hofmann-Hicks (evil) */1452module.exports =1453 __webpack_require__(32)1454/***/ }),1455/* 86 */1456/***/ (function(module, exports, __webpack_require__) {1457/** @license ISC License (c) copyright 2017 original and current authors */1458/** @author Ian Hofmann-Hicks (evil) */1459module.exports =1460 __webpack_require__(41)1461/***/ }),1462/* 87 */1463/***/ (function(module, exports, __webpack_require__) {1464/** @license ISC License (c) copyright 2017 original and current authors */1465/** @author Ian Hofmann-Hicks (evil) */1466module.exports =1467 __webpack_require__(40)1468/***/ }),1469/* 88 */1470/***/ (function(module, exports, __webpack_require__) {1471/** @license ISC License (c) copyright 2017 original and current authors */1472/** @author Ian Hofmann-Hicks (evil) */1473module.exports =1474 __webpack_require__(31)1475/***/ }),1476/* 89 */1477/***/ (function(module, exports, __webpack_require__) {1478/** @license ISC License (c) copyright 2017 original and current authors */1479/** @author Ian Hofmann-Hicks (evil) */1480module.exports =1481 __webpack_require__(52)1482/***/ }),1483/* 90 */1484/***/ (function(module, exports, __webpack_require__) {1485/** @license ISC License (c) copyright 2017 original and current authors */1486/** @author Ian Hofmann-Hicks (evil) */1487module.exports =1488 __webpack_require__(91)1489/***/ }),1490/* 91 */1491/***/ (function(module, exports, __webpack_require__) {1492/** @license ISC License (c) copyright 2017 original and current authors */1493/** @author Ian Hofmann-Hicks (evil) */1494var hasAlg = __webpack_require__(33)1495var isContravariant = __webpack_require__(66)1496var isFunctor = __webpack_require__(48)1497// isProfunctor :: a -> Boolean1498function isProfunctor(m) {1499 return isContravariant(m)1500 && isFunctor(m)1501 && hasAlg('promap', m)1502}1503module.exports = isProfunctor1504/***/ }),1505/* 92 */1506/***/ (function(module, exports, __webpack_require__) {1507/** @license ISC License (c) copyright 2017 original and current authors */1508/** @author Ian Hofmann-Hicks (evil) */1509module.exports =1510 __webpack_require__(93)1511/***/ }),1512/* 93 */1513/***/ (function(module, exports, __webpack_require__) {1514/** @license ISC License (c) copyright 2017 original and current authors */1515/** @author Ian Hofmann-Hicks (evil) */1516var isFunction = __webpack_require__(4)1517// isPromise : a -> Boolean1518function isPromise(p) {1519 return !!p1520 && isFunction(p.then)1521 && isFunction(p.catch)1522}1523module.exports = isPromise1524/***/ }),1525/* 94 */1526/***/ (function(module, exports, __webpack_require__) {1527/** @license ISC License (c) copyright 2017 original and current authors */1528/** @author Ian Hofmann-Hicks (evil) */1529var curry = __webpack_require__(3)1530var isSame = __webpack_require__(38)1531module.exports = curry(isSame)1532/***/ }),1533/* 95 */1534/***/ (function(module, exports, __webpack_require__) {1535/** @license ISC License (c) copyright 2017 original and current authors */1536/** @author Ian Hofmann-Hicks (evil) */1537module.exports =1538 __webpack_require__(18)1539/***/ }),1540/* 96 */1541/***/ (function(module, exports, __webpack_require__) {1542/** @license ISC License (c) copyright 2017 original and current authors */1543/** @author Ian Hofmann-Hicks (evil) */1544module.exports =1545 __webpack_require__(35)1546/***/ }),1547/* 97 */1548/***/ (function(module, exports, __webpack_require__) {1549/** @license ISC License (c) copyright 2017 original and current authors */1550/** @author Ian Hofmann-Hicks (evil) */1551module.exports =1552 __webpack_require__(62)1553/***/ }),1554/* 98 */1555/***/ (function(module, exports, __webpack_require__) {1556/** @license ISC License (c) copyright 2017 original and current authors */1557/** @author Ian Hofmann-Hicks (evil) */1558var hasAlg = __webpack_require__(33)1559// isSetoid : a -> Boolean1560function isSetoid(m) {1561 return !!m1562 && hasAlg('equals', m)1563}1564module.exports = isSetoid1565/***/ }),1566/* 99 */1567/***/ (function(module, exports, __webpack_require__) {1568/** @license ISC License (c) copyright 2017 original and current authors */1569/** @author Ian Hofmann-Hicks (evil) */1570module.exports =1571 __webpack_require__(36)1572/***/ }),1573/* 100 */1574/***/ (function(module, exports, __webpack_require__) {1575/** @license ISC License (c) copyright 2018 original and current authors */1576/** @author Robert Pearce (rpearce) */1577module.exports =1578 __webpack_require__(101)1579/***/ }),1580/* 101 */1581/***/ (function(module, exports) {1582/** @license ISC License (c) copyright 2018 original and current authors */1583/** @author Robert Pearce (rpearce) */1584// isSymbol : a -> Boolean1585function isSymbol(x) {1586 return typeof x === 'symbol'1587}1588module.exports = isSymbol1589/***/ }),1590/* 102 */1591/***/ (function(module, exports, __webpack_require__) {1592/** @license ISC License (c) copyright 2017 original and current authors */1593/** @author Ian Hofmann-Hicks (evil) */1594var hasAlg = __webpack_require__(33)1595var isFunctor = __webpack_require__(48)1596// isTraversable : a -> Boolean1597function isTraversable(m) {1598 return isFunctor(m)1599 && hasAlg('traverse', m)1600}1601module.exports = isTraversable1602/***/ }),1603/* 103 */1604/***/ (function(module, exports) {1605/** @license ISC License (c) copyright 2019 original and current authors */1606/** @author Dale Francis (dalefrancis88) */1607// isTrue : a -> Boolean1608function isTrue(x) {1609 return x === true1610}1611module.exports = isTrue1612/***/ }),1613/* 104 */1614/***/ (function(module, exports) {1615/** @license ISC License (c) copyright 2019 original and current authors */1616/** @author Dale Francis (dalefrancis88) */1617// isTruthy : a -> Boolean1618function isTruthy(x) {1619 return !!x1620}1621module.exports = isTruthy1622/***/ }),1623/* 105 */1624/***/ (function(module, exports, __webpack_require__) {1625/** @license ISC License (c) copyright 2019 original and current authors */1626/** @author Karthik Iyengar (karthikiyengar) */1627/** @author Ian Hofmann-Hicks */1628var curry = __webpack_require__(3)1629var equals = __webpack_require__(37)1630var isArray = __webpack_require__(45)1631var isDefined = __webpack_require__(29)1632var isEmpty = __webpack_require__(30)1633var isInteger = __webpack_require__(39)1634var isNil = __webpack_require__(41)1635var isString = __webpack_require__(36)1636var err = function (name) { return (name + ": First argument must be an Array of non-empty Strings or Integers"); }1637function fn(name) {1638 // pathEq :: [ String | Number ] -> a -> Object -> Boolean1639 function pathEq(keys, value, target) {1640 if(!isArray(keys)) {1641 throw new TypeError(err(name))1642 }1643 if(isNil(target)) {1644 return false1645 }1646 var acc = target1647 for(var i = 0; i < keys.length; i++) {1648 var key = keys[i]1649 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {1650 throw new TypeError(err(name))1651 }1652 if(isNil(acc)) {1653 return false1654 }1655 acc = acc[key]1656 if(!isDefined(acc)) {1657 return false1658 }1659 }1660 return equals(acc, value)1661 }1662 return curry(pathEq)1663}1664var pathEq =1665 fn('pathEq')1666pathEq.origFn =1667 fn1668module.exports = pathEq1669/***/ }),1670/* 106 */1671/***/ (function(module, exports, __webpack_require__) {1672/** @license ISC License (c) copyright 2019 original and current authors */1673/** @author Ian Hofmann-Hicks (evilsoft) */1674var curry = __webpack_require__(3)1675var isArray = __webpack_require__(45)1676var isEmpty = __webpack_require__(30)1677var isInteger = __webpack_require__(39)1678var isNil = __webpack_require__(41)1679var isPredOrFunc = __webpack_require__(16)1680var isString = __webpack_require__(36)1681var predOrFunc = __webpack_require__(20)1682var err = function (name) { return (name + ": First argument must be an Array of non-empty Strings or Integers"); }1683function fn(name) {1684 // pathSatisfies: [ (String | Integer) ] -> (a -> Boolean) -> b -> Boolean1685 // pathSatisfies: [ (String | Integer) ] -> Pred a -> b -> Boolean1686 function pathSatisfies(keys, pred, x) {1687 if(!isArray(keys)) {1688 throw new TypeError(err(name))1689 }1690 if(!isPredOrFunc(pred)) {1691 throw new TypeError(1692 (name + ": Second argument must be a Pred or predicate Function")1693 )1694 }1695 if(isNil(x)) {1696 return false1697 }1698 var target = x1699 for(var i = 0; i < keys.length; i++) {1700 var key = keys[i]1701 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {1702 throw new TypeError(err(name))1703 }1704 if(isNil(target)) {1705 return false1706 }1707 target = target[key]1708 }1709 return !!predOrFunc(pred, target)1710 }1711 return curry(pathSatisfies)1712}1713var pathSatisfies =1714 fn('pathSatisfies')1715pathSatisfies.origFn =1716 fn1717module.exports = pathSatisfies1718/***/ }),1719/* 107 */1720/***/ (function(module, exports, __webpack_require__) {1721/** @license ISC License (c) copyright 2017 original and current authors */1722/** @author Karthik Iyengar (karthikiyengar) */1723var curry = __webpack_require__(3)1724var equals = __webpack_require__(37)1725var isDefined = __webpack_require__(29)1726var isEmpty = __webpack_require__(30)1727var isInteger = __webpack_require__(39)1728var isNil = __webpack_require__(41)1729var isString = __webpack_require__(36)1730// propEq: (String | Integer) -> a -> b -> Boolean1731function propEq(key, value, x) {1732 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {1733 throw new TypeError(1734 'propEq: Non-empty String or Integer required for first argument'1735 )1736 }1737 if(isNil(x)) {1738 return false1739 }1740 var target = x[key]1741 return isDefined(target) && equals(target, value)1742}1743module.exports = curry(propEq)1744/***/ }),1745/* 108 */1746/***/ (function(module, exports, __webpack_require__) {1747/** @license ISC License (c) copyright 2017 original and current authors */1748/** @author Karthik Iyengar (karthikiyengar) */1749/** @author Ian Hofmann-Hicks */1750var pathEq = __webpack_require__(105)1751module.exports =1752 pathEq.origFn('propPathEq')1753/***/ }),1754/* 109 */1755/***/ (function(module, exports, __webpack_require__) {1756/** @license ISC License (c) copyright 2018 original and current authors */1757/** @author Ian Hofmann-Hicks (evilsoft) */1758var curry = __webpack_require__(3)1759var isEmpty = __webpack_require__(30)1760var isInteger = __webpack_require__(39)1761var isNil = __webpack_require__(41)1762var isPredOrFunc = __webpack_require__(16)1763var isString = __webpack_require__(36)1764var predOrFunc = __webpack_require__(20)1765// propSatisfies: (String | Integer) -> (a -> Boolean) -> b -> Boolean1766// propSatisfies: (String | Integer) -> Pred a -> b -> Boolean1767function propSatisfies(key, pred, x) {1768 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {1769 throw new TypeError(1770 'propSatisfies: Non-empty String or Integer required for first argument'1771 )1772 }1773 if(!isPredOrFunc(pred)) {1774 throw new TypeError(1775 'propSatisfies: Pred or predicate function required for second argument'1776 )1777 }1778 return isNil(x) ? false : !!predOrFunc(pred, x[key])1779}1780module.exports = curry(propSatisfies)1781/***/ }),1782/* 110 */1783/***/ (function(module, exports, __webpack_require__) {1784/** @license ISC License (c) copyright 2018 original and current authors */1785/** @author Ian Hofmann-Hicks (evilsoft) */1786var pathSatisfies = __webpack_require__(106)1787module.exports =1788 pathSatisfies.origFn('propPathSatisfies')1789/***/ }),1790/* 111 */1791/***/ (function(module, exports, __webpack_require__) {1792/** @license ISC License (c) copyright 2016 original and current authors */1793/** @author Ian Hofmann-Hicks (evil) */1794var VERSION = 21795var _implements = __webpack_require__(112)1796var _inspect = __webpack_require__(113)1797var type = __webpack_require__(17).type('Arrow')1798var _type = __webpack_require__(17).typeFn(type(), VERSION)1799var fl = __webpack_require__(34)1800var isFunction = __webpack_require__(4)1801var isSameType = __webpack_require__(18)1802var Pair = __webpack_require__(17).proxy('Pair')1803var _id =1804 function () { return Arrow(function (x) { return x; }); }1805function Arrow(runWith) {1806 var obj;1807 if(!isFunction(runWith)) {1808 throw new TypeError('Arrow: Function required')1809 }1810 var inspect =1811 function () { return ("Arrow" + (_inspect(runWith))); }1812 var id =1813 _id1814 var _map = function (fn) { return Arrow(function (x) { return fn(runWith(x)); }); }1815 function compose(method) {1816 return function(m) {1817 if(!isSameType(Arrow, m)) {1818 throw new TypeError(("Arrow." + method + ": Arrow required"))1819 }1820 return _map(m.runWith)1821 }1822 }1823 function map(method) {1824 return function(fn) {1825 if(!isFunction(fn)) {1826 throw new TypeError(("Arrow." + method + ": Function required"))1827 }1828 return _map(fn)1829 }1830 }1831 function contramap(method) {1832 return function(fn) {1833 if(!isFunction(fn)) {1834 throw new TypeError(("Arrow." + method + ": Function required"))1835 }1836 return Arrow(function (x) { return runWith(fn(x)); })1837 }1838 }1839 function promap(method) {1840 return function(l, r) {1841 if(!isFunction(l) || !isFunction(r)) {1842 throw new TypeError(("Arrow." + method + ": Functions required for both arguments"))1843 }1844 return Arrow(function (x) { return r(runWith(l(x))); })1845 }1846 }1847 function first() {1848 return Arrow(function(x) {1849 if(!isSameType(Pair, x)) {1850 throw TypeError('Arrow.first: Pair required for inner argument')1851 }1852 return x.bimap(runWith, function (x) { return x; })1853 })1854 }1855 function second() {1856 return Arrow(function(x) {1857 if(!isSameType(Pair, x)) {1858 throw TypeError('Arrow.second: Pair required for inner argument')1859 }1860 return x.bimap(function (x) { return x; }, runWith)1861 })1862 }1863 function both() {1864 return Arrow(function(x) {1865 if(!isSameType(Pair, x)) {1866 throw TypeError('Arrow.both: Pair required for inner argument')1867 }1868 return x.bimap(runWith, runWith)1869 })1870 }1871 return ( obj = {1872 inspect: inspect, toString: inspect, type: type,1873 runWith: runWith, id: id, first: first, second: second, both: both,1874 compose: compose('compose'),1875 map: map('map'),1876 contramap: contramap('contramap'),1877 promap: promap('promap')1878 }, obj[fl.id] = id, obj[fl.compose] = compose(fl.compose), obj[fl.map] = map(fl.map), obj[fl.contramap] = contramap(fl.contramap), obj[fl.promap] = promap(fl.promap), obj['@@type'] = _type, obj.constructor = Arrow, obj )1879}1880Arrow.id = _id1881Arrow.type = type1882Arrow[fl.id] = _id1883Arrow['@@type'] = _type1884Arrow['@@implements'] = _implements(1885 [ 'compose', 'contramap', 'id', 'map', 'promap' ]1886)1887module.exports = Arrow1888/***/ }),1889/* 112 */1890/***/ (function(module, exports) {1891/** @license ISC License (c) copyright 2017 original and current authors */1892/** @author Ian Hofmann-Hicks (evil) */1893var fulfills =1894 function (algs) { return function (test) { return algs.indexOf(test) !== -1; }; }1895module.exports = fulfills1896/***/ }),1897/* 113 */1898/***/ (function(module, exports, __webpack_require__) {1899/** @license ISC License (c) copyright 2016 original and current authors */1900/** @author Ian Hofmann-Hicks (evil) */1901var isArray = __webpack_require__(45)1902var isFunction = __webpack_require__(4)1903var isObject = __webpack_require__(31)1904var isString = __webpack_require__(36)1905var isSymbol = __webpack_require__(101)1906var isDate = __webpack_require__(68)1907function arrayInspect(xs) {1908 return xs.length1909 ? xs.map(inspect).reduce(function (a, x) { return a + ',' + x; })1910 : xs1911}1912// inspect : a -> String1913function inspect(x) {1914 if(x && isFunction(x.inspect)) {1915 return (" " + (x.inspect()))1916 }1917 if(isFunction(x)) {1918 return ' Function'1919 }1920 if(isArray(x)) {1921 return (" [" + (arrayInspect(x)) + " ]")1922 }1923 if(isObject(x)) {1924 return (" { " + (Object.keys(x).reduce(function (acc, key) {1925 return acc.concat([ (key + ":" + (inspect(x[key]))) ])1926 }, []).join(', ')) + " }")1927 }1928 if(isString(x)) {1929 return (" \"" + x + "\"")1930 }1931 if(isSymbol(x) || isDate(x)) {1932 return (" " + (x.toString()))1933 }1934 return (" " + x)1935}1936module.exports = inspect1937/***/ }),1938/* 114 */1939/***/ (function(module, exports, __webpack_require__) {1940/** @license ISC License (c) copyright 2017 original and current authors */1941/** @author Ian Hofmann-Hicks (evil) */1942var VERSION = 51943var _implements = __webpack_require__(112)1944var _inspect = __webpack_require__(113)1945var type = __webpack_require__(17).type('Async')1946var _type = __webpack_require__(17).typeFn(type(), VERSION)1947var fl = __webpack_require__(34)1948var array = __webpack_require__(115)1949var compose = __webpack_require__(7)1950var once = __webpack_require__(118)1951var unit = __webpack_require__(119)1952var isArray = __webpack_require__(45)1953var isFoldable = __webpack_require__(43)1954var isFunction = __webpack_require__(4)1955var isInteger = __webpack_require__(39)1956var isPromise = __webpack_require__(93)1957var isSameType = __webpack_require__(18)1958var allAsyncs = function (xs) { return xs.reduce(function (acc, x) { return acc && isSameType(Async, x); }, true); }1959var _of =1960 function (x) { return Async(function (_, resolve) { return resolve(x); }); }1961var Rejected =1962 function (x) { return Async(function (reject) { return reject(x); }); }1963function all(asyncs) {1964 if(!(isFoldable(asyncs) && allAsyncs(asyncs))) {1965 throw new TypeError('Async.all: Foldable structure of Asyncs required')1966 }1967 if(isArray(asyncs)) {1968 return array.sequence(Async.of, asyncs)1969 }1970 return asyncs.sequence(Async.of)1971}1972function fromNode(fn, ctx) {1973 if(!isFunction(fn)) {1974 throw new TypeError('Async.fromNode: CPS function required')1975 }1976 return function () {1977 var args = [], len = arguments.length;1978 while ( len-- ) args[ len ] = arguments[ len ];1979 return Async(function (reject, resolve) {1980 fn.apply(ctx,1981 args.concat(1982 function (err, data) { return err ? reject(err) : resolve(data); }1983 )1984 )1985 });1986 }1987}1988function fromPromise(fn) {1989 if(!isFunction(fn)) {1990 throw new TypeError('Async.fromPromise: Promise returning function required')1991 }1992 return function() {1993 var promiseArgs = arguments1994 return Async(function(reject, resolve) {1995 var promise = fn.apply(null, promiseArgs)1996 if(!isPromise(promise)) {1997 throw new TypeError('Async.fromPromise: Promise returning function required')1998 }1999 promise2000 .then(resolve, reject)2001 })2002 }2003}2004function rejectAfter(ms, value) {2005 if(!(isInteger(ms) && ms >= 0)) {2006 throw new TypeError(2007 'Async.rejectAfter: Positive Integer required for first argument'2008 )2009 }2010 return Async(function (rej) {2011 var token = setTimeout(function () {2012 rej(value)2013 }, ms)2014 return function () { clearTimeout(token) }2015 })2016}2017function resolveAfter(ms, value) {2018 if(!(isInteger(ms) && ms >= 0)) {2019 throw new TypeError(2020 'Async.resolveAfter: Positive Integer required for first argument'2021 )2022 }2023 return Async(function (_, res) {2024 var token = setTimeout(function () {2025 res(value)2026 }, ms)2027 return function () { clearTimeout(token) }2028 })2029}2030function Async(fn) {2031 var obj;2032 if(!isFunction(fn)) {2033 throw new TypeError('Async: Function required')2034 }2035 var of =2036 _of2037 var inspect =2038 function () { return ("Async" + (_inspect(fn))); }2039 function fork(reject, resolve, cleanup) {2040 if(!isFunction(reject) || !isFunction(resolve)) {2041 throw new TypeError('Async.fork: Reject and resolve functions required')2042 }2043 var cancelled = false2044 var settled = false2045 var cancel =2046 function () { cancelled = true }2047 var forkCancel =2048 isFunction(cleanup) ? cleanup : unit2049 var settle = function (f, x) {2050 if(!settled) {2051 settled = true2052 if(cancelled) {2053 return unit()2054 }2055 return f(x)2056 }2057 }2058 var internal = fn(2059 settle.bind(null, reject),2060 settle.bind(null, resolve)2061 )2062 var internalFn = isFunction(internal) ? internal : unit2063 return once(function () { return forkCancel(cancel(internalFn())); })2064 }2065 function toPromise() {2066 return new Promise(function(resolve, reject) {2067 fork(reject, resolve)2068 })2069 }2070 function race(m) {2071 if(!isSameType(Async, m)) {2072 throw new TypeError('Async.race: Async required')2073 }2074 return Async(function(reject, resolve) {2075 var settle = once(2076 function (resolved, value) { return resolved ? resolve(value) : reject(value); }2077 )2078 var res = settle.bind(null, true)2079 var rej = settle.bind(null, false)2080 var cancelOne = fork(rej, res)2081 var cancelTwo = m.fork(rej, res)2082 return function () { cancelOne(); cancelTwo() }2083 })2084 }2085 function swap(l, r) {2086 if(!isFunction(l) || !isFunction(r)) {2087 throw new TypeError('Async.swap: Functions required for both arguments')2088 }2089 return Async(function(reject, resolve) {2090 return fork(2091 compose(resolve, l),2092 compose(reject, r)2093 )2094 })2095 }2096 function coalesce(l, r) {2097 if(!isFunction(l) || !isFunction(r)) {2098 throw new TypeError('Async.coalesce: Functions required for both arguments')2099 }2100 return Async(function(reject, resolve) {2101 return fork(2102 compose(resolve, l),2103 compose(resolve, r)2104 )2105 })2106 }2107 function map(method) {2108 return function(mapFn) {2109 if(!isFunction(mapFn)) {2110 throw new TypeError(("Async." + method + ": Function required"))2111 }2112 return Async(function(reject, resolve) {2113 return fork(reject, compose(resolve, mapFn))2114 })2115 }2116 }2117 function bimap(method) {2118 return function(l, r) {2119 if(!isFunction(l) || !isFunction(r)) {2120 throw new TypeError(("Async." + method + ": Functions required for both arguments"))2121 }2122 return Async(function(reject, resolve) {2123 return fork(2124 compose(reject, l),2125 compose(resolve, r)2126 )2127 })2128 }2129 }2130 function alt(method) {2131 return function(m) {2132 if(!isSameType(Async, m)) {2133 throw new TypeError(("Async." + method + ": Async required"))2134 }2135 return Async(function (rej, res) {2136 var cancel = unit2137 var innerCancel = unit2138 cancel = fork(2139 function () { innerCancel = m.fork(rej, res) },2140 res2141 )2142 return once(function () { return innerCancel(cancel()); })2143 })2144 }2145 }2146 function ap(m) {2147 if(!isSameType(Async, m)) {2148 throw new TypeError('Async.ap: Async required')2149 }2150 return Async(function(reject, resolve) {2151 var apFn = null2152 var value = null2153 var fnDone = false2154 var valueDone = false2155 var cancelled = false2156 var cancel = function () { cancelled = true }2157 var rejectOnce = once(reject)2158 function resolveBoth() {2159 if(!cancelled && fnDone && valueDone) {2160 compose(resolve, apFn)(value)2161 }2162 }2163 var fnCancel = fork(rejectOnce, function(f) {2164 if(!isFunction(f)) {2165 throw new TypeError('Async.ap: Wrapped value must be a function')2166 }2167 fnDone = true2168 apFn = f2169 resolveBoth()2170 })2171 var valueCancel = m.fork(rejectOnce, function (x) {2172 valueDone = true2173 value = x2174 resolveBoth()2175 })2176 return function () { fnCancel(); valueCancel(); cancel() }2177 })2178 }2179 function chain(method) {2180 return function(mapFn) {2181 if(!isFunction(mapFn)) {2182 throw new TypeError(2183 ("Async." + method + ": Async returning function required")2184 )2185 }2186 return Async(function(reject, resolve) {2187 var cancel = unit2188 var innerCancel = unit2189 cancel = fork(reject, function(x) {2190 var m = mapFn(x)2191 if(!isSameType(Async, m)) {2192 throw new TypeError(2193 ("Async." + method + ": Function must return another Async")2194 )2195 }2196 innerCancel = m.fork(reject, resolve)2197 })2198 return once(function () { return innerCancel(cancel()); })2199 })2200 }2201 }2202 function bichain(l, r) {2203 var bichainErr = 'Async.bichain: Both arguments must be Async returning functions'2204 if(!isFunction(l) || !isFunction(r)) {2205 throw new TypeError(bichainErr)2206 }2207 return Async(function(rej, res) {2208 var cancel = unit2209 var innerCancel = unit2210 function setInnerCancel(mapFn) {2211 return function(x) {2212 var m = mapFn(x)2213 if(!isSameType(Async, m)) {2214 throw new TypeError(bichainErr)2215 }2216 innerCancel = m.fork(rej, res)2217 }2218 }2219 cancel = fork(setInnerCancel(l), setInnerCancel(r))2220 return once(function () { return innerCancel(cancel()); })2221 })2222 }2223 return ( obj = {2224 fork: fork, toPromise: toPromise, inspect: inspect,2225 toString: inspect, type: type,2226 swap: swap, race: race, coalesce: coalesce, ap: ap,2227 of: of,2228 alt: alt('alt'),2229 bimap: bimap('bimap'),2230 map: map('map'),2231 chain: chain('chain'),2232 bichain: bichain2233 }, obj[fl.of] = of, obj[fl.alt] = alt(fl.alt), obj[fl.bimap] = bimap(fl.bimap), obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Async, obj )2234}2235Async.of = _of2236Async.type = type2237Async[fl.of] = _of2238Async['@@type'] = _type2239Async.Rejected = Rejected2240Async.Resolved = _of2241Async.fromPromise = fromPromise2242Async.fromNode = fromNode2243Async.all = all2244Async.rejectAfter = rejectAfter2245Async.resolveAfter = resolveAfter2246Async['@@implements'] = _implements(2247 [ 'alt', 'ap', 'bimap', 'chain', 'map', 'of' ]2248)2249module.exports = Async2250/***/ }),2251/* 115 */2252/***/ (function(module, exports, __webpack_require__) {2253/** @license ISC License (c) copyright 2017 original and current authors */2254/** @author Ian Hofmann-Hicks (evil) */2255var isApply = __webpack_require__(51)2256var isArray = __webpack_require__(45)2257var isEmpty = __webpack_require__(30)2258var isFunction = __webpack_require__(4)2259var isSameType = __webpack_require__(18)2260var isSemigroup = __webpack_require__(35)2261var apOrFunc = __webpack_require__(116)2262var identity =2263 function (x) { return x; }2264var concat =2265 function (x) { return function (m) { return x.concat(m); }; }2266function runTraverse(name, fn) {2267 return function(acc, x) {2268 var m = fn(x)2269 if(!((isApply(acc) || isArray(acc)) && isSameType(acc, m))) {2270 throw new TypeError(("Array." + name + ": Must wrap Applys of the same type"))2271 }2272 if(isArray(m)) {2273 return ap(acc, map(function (v) { return concat([ v ]); }, m))2274 }2275 return m2276 .map(function (v) { return concat([ v ]); })2277 .ap(acc)2278 }2279}2280var allFuncs =2281 function (xs) { return xs.reduce(function (b, i) { return b && isFunction(i); }, true); }2282var map =2283 function (f, m) { return m.map(function (x) { return f(x); }); }2284function ap(x, m) {2285 if(!(m.length && allFuncs(m))) {2286 throw new TypeError('Array.ap: Second Array must all be functions')2287 }2288 return m.reduce(function (acc, f) { return acc.concat(map(f, x)); }, [])2289}2290function chain(f, m) {2291 return m.reduce(function(y, x) {2292 var n = f(x)2293 if(!isArray(n)) {2294 throw new TypeError('Array.chain: Function must return an Array')2295 }2296 return y.concat(n)2297 }, [])2298}2299function sequence(f, m) {2300 var fn = apOrFunc(f)2301 return m.reduceRight(runTraverse('sequence', identity), fn([]))2302}2303function traverse(f, fn, m) {2304 var af = apOrFunc(f)2305 return m.reduceRight(runTraverse('traverse', fn), af([]))2306}2307function fold(m) {2308 if(isEmpty(m)) {2309 throw new TypeError(2310 'Array.fold: Non-empty Array of Semigroups required'2311 )2312 }2313 var head =2314 m[0]2315 if(!isSemigroup(head)) {2316 throw new TypeError('Array.fold: Must contain Semigroups of the same type')2317 }2318 return m.reduce(function(x, y) {2319 if(!isSameType(x, y)) {2320 throw new TypeError('Array.fold: Must contain Semigroups of the same type')2321 }2322 return x.concat(y)2323 })2324}2325function foldMap(fn, m) {2326 if(isEmpty(m)) {2327 throw new TypeError(2328 'Array.foldMap: Non-empty Array required'2329 )2330 }2331 var head =2332 fn(m[0])2333 if(!isSemigroup(head)) {2334 throw new TypeError(2335 'Array.foldMap: Provided function must return Semigroups of the same type'2336 )2337 }2338 return m.length === 12339 ? head2340 : m.slice(1).reduce(function(semi, x) {2341 var val = fn(x)2342 if(!(isSameType(semi, val) && isSemigroup(val))) {2343 throw new TypeError(2344 'Array.foldMap: Provided function must return Semigroups of the same type'2345 )2346 }2347 return semi.concat(val)2348 }, head)2349}2350function set(indx, val, m) {2351 var arr = m.slice()2352 arr[indx] = val2353 return arr2354}2355function unset(indx, m) {2356 return m.slice(0, indx)2357 .concat(m.slice(indx + 1))2358}2359module.exports = {2360 ap: ap, chain: chain, fold: fold,2361 foldMap: foldMap, map: map,2362 sequence: sequence, set: set,2363 traverse: traverse, unset: unset2364}2365/***/ }),2366/* 116 */2367/***/ (function(module, exports, __webpack_require__) {2368/** @license ISC License (c) copyright 2018 original and current authors */2369/** @author Ian Hofmann-Hicks (evil) */2370var isApplicative = __webpack_require__(50)2371var isTypeRepOf = __webpack_require__(117)2372var apOrFunc = function (af) { return function (x) { return isApplicative(af)2373 ? af.of(x)2374 : isTypeRepOf(Array, af) ? [ x ] : af(x); }; }2375module.exports = apOrFunc2376/***/ }),2377/* 117 */2378/***/ (function(module, exports, __webpack_require__) {2379/** @license ISC License (c) copyright 2018 original and current authors */2380/** @author Ian Hofmann-Hicks (evil) */2381var isFunction = __webpack_require__(4)2382var isTypeRepOf = function (x, y) { return isFunction(y)2383 && (x === y || x.name === y.name); }2384module.exports = isTypeRepOf2385/***/ }),2386/* 118 */2387/***/ (function(module, exports) {2388/** @license ISC License (c) copyright 2017 original and current authors */2389/** @author Ian Hofmann-Hicks (evil) */2390// once : ((*) -> b) -> ((*) -> b)2391function once(fn) {2392 var called, result2393 return function() {2394 if(!called) {2395 called = true2396 result = fn.apply(null, arguments)2397 }2398 return result2399 }2400}2401module.exports = once2402/***/ }),2403/* 119 */2404/***/ (function(module, exports) {2405/** @license ISC License (c) copyright 2017 original and current authors */2406/** @author Ian Hofmann-Hicks (evil) */2407module.exports =2408 Function.prototype2409/***/ }),2410/* 120 */2411/***/ (function(module, exports, __webpack_require__) {2412/** @license ISC License (c) copyright 2016 original and current authors */2413/** @author Ian Hofmann-Hicks (evil) */2414var VERSION = 32415var _equals = __webpack_require__(37)2416var _implements = __webpack_require__(112)2417var _inspect = __webpack_require__(113)2418var _type = __webpack_require__(17).type('Const')2419var typeFn = __webpack_require__(17).typeFn2420var fl = __webpack_require__(34)2421var isFunction = __webpack_require__(4)2422var isMonoid = __webpack_require__(32)2423var isSameType = __webpack_require__(18)2424var isSemigroup = __webpack_require__(35)2425var typeOrName =2426 function (m) { return isFunction(m.type) ? m.type() : m.name; }2427var constant = function (x) { return function () { return x; }; }2428var empties = {2429 Array: function () { return []; },2430 String: function () { return ''; }2431}2432var getEmpty = function (T) { return T[fl.empty] || T.empty || empties[T.name]; }2433var validMonoid = function (T) { return isMonoid(T) || T.name === 'String' || T.name === 'Array'; }2434function _Const(T) {2435 if(!isFunction(T)) {2436 throw new TypeError('Const: TypeRep required for construction')2437 }2438 var type =2439 constant(_type(typeOrName(T)))2440 var typeString =2441 typeFn('Const', VERSION, typeOrName(T))2442 function empty(method) {2443 return function() {2444 if(!validMonoid(T)) {2445 throw new TypeError(((type()) + "." + method + ": Must be fixed to a Monoid"))2446 }2447 return Const(getEmpty(T)())2448 }2449 }2450 function of(method) {2451 return function() {2452 if(!validMonoid(T)) {2453 throw new TypeError(((type()) + "." + method + ": Must be fixed to a Monoid"))2454 }2455 return Const(getEmpty(T)())2456 }2457 }2458 function Const(value) {2459 var obj;2460 if(!isSameType(T, value)) {2461 throw new TypeError(((type()) + ": " + (typeOrName(T)) + " required"))2462 }2463 var inspect =2464 constant(("" + (type()) + (_inspect(value))))2465 var valueOf =2466 constant(value)2467 var equals =2468 function (m) { return isSameType(Const, m)2469 && _equals(value, m.valueOf()); }2470 function concat(method) {2471 return function(m) {2472 if(!isSemigroup(value)) {2473 throw new TypeError(((type()) + "." + method + ": Must be fixed to a Semigroup"))2474 }2475 if(!isSameType(Const, m)) {2476 throw new TypeError(((type()) + "." + method + ": " + (type()) + " required"))2477 }2478 return Const(value.concat(m.valueOf()))2479 }2480 }2481 function map(method) {2482 return function(fn) {2483 if(!isFunction(fn)) {2484 throw new TypeError(((type()) + "." + method + ": Function required"))2485 }2486 return Const(value)2487 }2488 }2489 function ap(m) {2490 if(!isSemigroup(value)) {2491 throw new TypeError(((type()) + ".ap: Must be fixed to a Semigroup"))2492 }2493 if(!isSameType(Const, m)) {2494 throw new TypeError(((type()) + ".ap: " + (type()) + " required"))2495 }2496 return Const(value.concat(m.valueOf()))2497 }2498 return ( obj = {2499 inspect: inspect, toString: inspect,2500 valueOf: valueOf, type: type, ap: ap, equals: equals,2501 concat: concat('concat'),2502 empty: empty('empty'),2503 map: map('map'),2504 of: of('of')2505 }, obj[fl.concat] = concat(fl.concat), obj[fl.empty] = empty(fl.empty), obj[fl.equals] = equals, obj[fl.map] = map(fl.map), obj[fl.of] = of(fl.of), obj['@@type'] = typeString, obj.constructor = Const, obj )2506 }2507 Const.empty = empty('empty')2508 Const.of = of('of')2509 Const.type = type2510 Const[fl.empty] = empty(fl.empty)2511 Const[fl.of] = of(fl.of)2512 Const['@@type'] = typeString2513 Const['@@implements'] = _implements(2514 [ 'ap', 'concat', 'empty', 'equals', 'map', 'of' ]2515 )2516 return Const2517}2518module.exports = _Const2519/***/ }),2520/* 121 */2521/***/ (function(module, exports, __webpack_require__) {2522/** @license ISC License (c) copyright 2016 original and current authors */2523/** @author Ian Hofmann-Hicks (evil) */2524var VERSION = 42525var _defineUnion = __webpack_require__(122)2526var _equals = __webpack_require__(37)2527var _implements = __webpack_require__(112)2528var _innerConcat = __webpack_require__(123)2529var _inspect = __webpack_require__(113)2530var type = __webpack_require__(17).type('Either')2531var _type = __webpack_require__(17).typeFn(type(), VERSION)2532var fl = __webpack_require__(34)2533var apOrFunc = __webpack_require__(116)2534var compose = __webpack_require__(7)2535var isArray = __webpack_require__(45)2536var isApplicative = __webpack_require__(50)2537var isApply = __webpack_require__(51)2538var isFunction = __webpack_require__(4)2539var isSameType = __webpack_require__(18)2540var constant =2541 function (x) { return function () { return x; }; }2542var _either =2543 _defineUnion({ Left: [ 'a' ], Right: [ 'b' ] })2544var Left = _either.Left;2545var Right = _either.Right;2546Either.Left =2547 compose(Either, Left)2548Either.Right =2549 compose(Either, Right)2550var _of =2551 Either.Right2552function runSequence(x) {2553 if(!(isApply(x) || isArray(x))) {2554 throw new TypeError('Either.sequence: Must wrap an Apply')2555 }2556 return x.map(_of)2557}2558function Either(u) {2559 var obj;2560 if(!arguments.length) {2561 throw new TypeError('Either: Must wrap something, try using Left or Right constructors')2562 }2563 var x = !_either.includes(u)2564 ? Right(u)2565 : u2566 var equals =2567 function (m) { return isSameType(Either, m) && either(2568 function (x) { return m.either(function (y) { return _equals(y, x); }, constant(false)); },2569 function (x) { return m.either(constant(false), function (y) { return _equals(y, x); }); }2570 ); }2571 var of =2572 _of2573 var inspect = function () { return either(2574 function (l) { return ("Left" + (_inspect(l))); },2575 function (r) { return ("Right" + (_inspect(r))); }2576 ); }2577 function either(f, g) {2578 if(!isFunction(f) || !isFunction(g)) {2579 throw new TypeError('Either.either: Requires both left and right functions')2580 }2581 return _either.caseOf({2582 Left: f,2583 Right: g2584 }, x)2585 }2586 function concat(method) {2587 return function(m) {2588 if(!isSameType(Either, m)) {2589 throw new TypeError(("Either." + method + ": Either of Semigroup required"))2590 }2591 return either(2592 Either.Left,2593 _innerConcat(("Either." + method), m)2594 )2595 }2596 }2597 function swap(f, g) {2598 if(!isFunction(f) || !isFunction(g)) {2599 throw new TypeError('Either.swap: Requires both left and right functions')2600 }2601 return either(2602 compose(Either.Right, f),2603 compose(Either.Left, g)2604 )2605 }2606 function coalesce(f, g) {2607 if(!isFunction(f) || !isFunction(g)) {2608 throw new TypeError('Either.coalesce: Requires both left and right functions')2609 }2610 return Either.Right(either(f, g))2611 }2612 function bichain(l, r) {2613 var bichainErr =2614 'Either.bichain: Both arguments must be Either returning functions'2615 if(!(isFunction(l) && isFunction(r))) {2616 throw new TypeError(bichainErr)2617 }2618 var m = either(l, r)2619 if(!isSameType(Either, m)) {2620 throw new TypeError(bichainErr)2621 }2622 return m2623 }2624 function map(method) {2625 return function(fn) {2626 if(!isFunction(fn)) {2627 throw new TypeError(("Either." + method + ": Function required"))2628 }2629 return either(Either.Left, compose(Either.Right, fn))2630 }2631 }2632 function bimap(method) {2633 return function(f, g) {2634 if(!isFunction(f) || !isFunction(g)) {2635 throw new TypeError(("Either." + method + ": Requires both left and right functions"))2636 }2637 return either(2638 compose(Either.Left, f),2639 compose(Either.Right, g)2640 )2641 }2642 }2643 function alt(method) {2644 return function(m) {2645 if(!isSameType(Either, m)) {2646 throw new TypeError(("Either." + method + ": Either required"))2647 }2648 return either(2649 constant(m),2650 Either.Right2651 )2652 }2653 }2654 function ap(m) {2655 if(!either(constant(true), isFunction)) {2656 throw new TypeError('Either.ap: Wrapped value must be a function')2657 }2658 else if(!either(constant(true), constant(isSameType(Either, m)))) {2659 throw new TypeError('Either.ap: Either required')2660 }2661 return either(2662 Either.Left,2663 function (fn) { return m.map(fn); }2664 )2665 }2666 function chain(method) {2667 return function(fn) {2668 if(!isFunction(fn)) {2669 throw new TypeError(("Either." + method + ": Function required"))2670 }2671 var m = either(Either.Left, fn)2672 if(!isSameType(Either, m)) {2673 throw new TypeError(("Either." + method + ": Function must return an Either"))2674 }2675 return m2676 }2677 }2678 function sequence(f) {2679 if(!(isApplicative(f) || isFunction(f))) {2680 throw new TypeError(2681 'Either.sequence: Applicative TypeRep or Apply returning function required'2682 )2683 }2684 var af =2685 apOrFunc(f)2686 return either(2687 compose(af, Either.Left),2688 runSequence2689 )2690 }2691 function traverse(f, fn) {2692 if(!(isApplicative(f) || isFunction(f))) {2693 throw new TypeError(2694 'Either.traverse: Applicative TypeRep or Apply returning function required for first argument'2695 )2696 }2697 if(!isFunction(fn)) {2698 throw new TypeError(2699 'Either.traverse: Apply returning function required for second argument'2700 )2701 }2702 var af =2703 apOrFunc(f)2704 var m =2705 either(compose(af, Either.Left), fn)2706 if(!(isApply(m) || isArray(m))) {2707 throw new TypeError(2708 'Either.traverse: Both functions must return an Apply of the same type'2709 )2710 }2711 return either(2712 constant(m),2713 constant(m.map(_of))2714 )2715 }2716 return ( obj = {2717 inspect: inspect, toString: inspect, either: either,2718 type: type, swap: swap, coalesce: coalesce, bichain: bichain,2719 equals: equals, ap: ap, of: of, sequence: sequence, traverse: traverse,2720 alt: alt('alt'),2721 bimap: bimap('bimap'),2722 concat: concat('concat'),2723 chain: chain('chain'),2724 map: map('map')2725 }, obj[fl.of] = of, obj[fl.equals] = equals, obj[fl.alt] = alt(fl.alt), obj[fl.bimap] = bimap(fl.bimap), obj[fl.concat] = concat(fl.concat), obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Either, obj )2726}2727Either.of = _of2728Either.type = type2729Either[fl.of] = _of2730Either['@@type'] = _type2731Either['@@implements'] = _implements(2732 [ 'alt', 'ap', 'bimap', 'chain', 'concat', 'equals', 'map', 'of', 'traverse' ]2733)2734module.exports = Either2735/***/ }),2736/* 122 */2737/***/ (function(module, exports, __webpack_require__) {2738/** @license ISC License (c) copyright 2016 original and current authors */2739/** @author Ian Hofmann-Hicks (evil) */2740var curry = __webpack_require__(3)2741var isArray = __webpack_require__(45)2742var isEmpty = __webpack_require__(30)2743var isFunction = __webpack_require__(4)2744var isObject = __webpack_require__(31)2745var isString = __webpack_require__(36)2746var constant = function (x) { return function () { return x; }; }2747var isDefinition =2748 function (x) { return isString(x) && x.length; }2749function caseOf(defs) {2750 return function(cases, m) {2751 var tag = m.tag2752 var def = defs[tag()]2753 var args = def.reduce(2754 function (xs, x) { return xs.concat([ m[x].value() ]); },2755 []2756 )2757 return cases[tag()].apply(null, args)2758 }2759}2760var includes =2761 function (defs) { return function (m) { return !!m && isFunction(m.tag) && Object.keys(defs).indexOf(m.tag()) !== -1; }; }2762function construction(def, tag) {2763 return function() {2764 var args = [], len = arguments.length;2765 while ( len-- ) args[ len ] = arguments[ len ];2766 return def.reduce(function(obj, key, index) {2767 obj[key] = { value: constant(args[index]) }2768 return obj2769 }, { tag: constant(tag) })2770 }2771}2772function defineUnion(defs) {2773 if(!isObject(defs) || isEmpty(defs)) {2774 throw new TypeError('defineUnion: Argument must be an Object containing definition lists')2775 }2776 return Object.keys(defs).reduce(function(obj, tag) {2777 var def = defs[tag]2778 if(!isArray(def) || !def.reduce(function (x, y) { return x && isDefinition(y); }, true)) {2779 throw new TypeError('defineUnion: Definitions must be a list of non-empty string identifiers')2780 }2781 obj[tag] = construction(def, tag)2782 return obj2783 }, { caseOf: curry(caseOf(defs)), includes: curry(includes(defs)) })2784}2785module.exports = defineUnion2786/***/ }),2787/* 123 */2788/***/ (function(module, exports, __webpack_require__) {2789/** @license ISC License (c) copyright 2017 original and current authors */2790/** @author Ian Hofmann-Hicks (evil) */2791var isSameType = __webpack_require__(18)2792var isSemigroup = __webpack_require__(35)2793function innerConcat(method, m) {2794 return function(left) {2795 if(!isSemigroup(left)) {2796 throw new TypeError((method + ": Both containers must contain Semigroups of the same type"))2797 }2798 return m.map(function (right) {2799 if(!isSameType(left, right)) {2800 throw new TypeError((method + ": Both containers must contain Semigroups of the same type"))2801 }2802 return left.concat(right)2803 })2804 }2805}2806module.exports = innerConcat2807/***/ }),2808/* 124 */2809/***/ (function(module, exports, __webpack_require__) {2810/** @license ISC License (c) copyright 2017 original and current authors */2811/** @author Ian Hofmann-Hicks (evil) */2812var VERSION = 22813var _implements = __webpack_require__(112)2814var _inspect = __webpack_require__(113)2815var curry = __webpack_require__(3)2816var isFunction = __webpack_require__(4)2817var isSameType = __webpack_require__(18)2818var type = __webpack_require__(17).type('Equiv')2819var _type = __webpack_require__(17).typeFn(type(), VERSION)2820var fl = __webpack_require__(34)2821var _empty =2822 function () { return Equiv(function () { return true; }); }2823function Equiv(compare) {2824 var obj;2825 if(!isFunction(compare)) {2826 throw new TypeError('Equiv: Comparison function required')2827 }2828 var compareWith = curry(2829 function (x, y) { return !!compare(x, y); }2830 )2831 var inspect =2832 function () { return ("Equiv" + (_inspect(compare))); }2833 var empty =2834 _empty2835 var valueOf =2836 function () { return compareWith; }2837 function contramap(method) {2838 return function(fn) {2839 if(!isFunction(fn)) {2840 throw new TypeError(("Equiv." + method + ": Function required"))2841 }2842 return Equiv(2843 function (x, y) { return compareWith(fn(x), fn(y)); }2844 )2845 }2846 }2847 function concat(method) {2848 return function(m) {2849 if(!isSameType(Equiv, m)) {2850 throw new TypeError(("Equiv." + method + ": Equiv required"))2851 }2852 return Equiv(function (x, y) { return compareWith(x, y) && m.compareWith(x, y); }2853 )2854 }2855 }2856 return ( obj = {2857 inspect: inspect, toString: inspect, type: type,2858 compareWith: compareWith, valueOf: valueOf, empty: empty,2859 concat: concat('concat'),2860 contramap: contramap('contramap')2861 }, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj[fl.contramap] = contramap(fl.contramap), obj['@@type'] = _type, obj.constructor = Equiv, obj )2862}2863Equiv.empty = _empty2864Equiv.type = type2865Equiv[fl.empty] = _empty2866Equiv['@@type'] = _type2867Equiv['@@implements'] = _implements(2868 [ 'concat', 'contramap', 'empty' ]2869)2870module.exports = Equiv2871/***/ }),2872/* 125 */2873/***/ (function(module, exports, __webpack_require__) {2874/** @license ISC License (c) copyright 2016 original and current authors */2875/** @author Ian Hofmann-Hicks (evil) */2876var VERSION = 32877var _equals = __webpack_require__(37)2878var _implements = __webpack_require__(112)2879var _innerConcat = __webpack_require__(123)2880var _inspect = __webpack_require__(113)2881var type = __webpack_require__(17).type('Identity')2882var _type = __webpack_require__(17).typeFn(type(), VERSION)2883var fl = __webpack_require__(34)2884var isArray = __webpack_require__(45)2885var isApply = __webpack_require__(51)2886var isApplicative = __webpack_require__(50)2887var isFunction = __webpack_require__(4)2888var isSameType = __webpack_require__(18)2889var _of =2890 Identity2891function Identity(x) {2892 var obj;2893 if(!arguments.length) {2894 throw new TypeError('Identity: Must wrap something')2895 }2896 var valueOf =2897 function () { return x; }2898 var of =2899 _of2900 var equals =2901 function (m) { return isSameType(Identity, m)2902 && _equals(x, m.valueOf()); }2903 var inspect =2904 function () { return ("Identity" + (_inspect(x))); }2905 function concat(method) {2906 return function(m) {2907 if(!isSameType(Identity, m)) {2908 throw new TypeError(("Identity." + method + ": Identity of Semigroup required"))2909 }2910 return _innerConcat(("Identity." + method), m)(x)2911 }2912 }2913 function map(method) {2914 return function(fn) {2915 if(!isFunction(fn)) {2916 throw new TypeError(("Identity." + method + ": Function required"))2917 }2918 return Identity(fn(x))2919 }2920 }2921 function ap(m) {2922 if(!isFunction(x)) {2923 throw new TypeError('Identity.ap: Wrapped value must be a function')2924 }2925 else if(!isSameType(Identity, m)) {2926 throw new TypeError('Identity.ap: Identity required')2927 }2928 return m.map(x)2929 }2930 function chain(method) {2931 return function(fn) {2932 if(!isFunction(fn)) {2933 throw new TypeError(("Identity." + method + ": Function required"))2934 }2935 var m = fn(x)2936 if(!isSameType(Identity, m)) {2937 throw new TypeError(("Identity." + method + ": Function must return an Identity"))2938 }2939 return m2940 }2941 }2942 function sequence(f) {2943 if(!(isApplicative(f) || isFunction(f))) {2944 throw new TypeError(2945 'Identity.sequence: Applicative TypeRep or Apply returning function required'2946 )2947 }2948 if(!(isApply(x) || isArray(x))) {2949 throw new TypeError('Identity.sequence: Must wrap an Apply')2950 }2951 return x.map(_of)2952 }2953 function traverse(f, fn) {2954 if(!(isApplicative(f) || isFunction(f))) {2955 throw new TypeError(2956 'Identity.traverse: Applicative TypeRep or Apply returning function required for first argument'2957 )2958 }2959 if(!isFunction(fn)) {2960 throw new TypeError(2961 'Identity.traverse: Apply returning functions required for second argument'2962 )2963 }2964 var m = fn(x)2965 if(!(isApply(m) || isArray(m))) {2966 throw new TypeError(2967 'Identity.traverse: Both functions must return an Apply of the same type'2968 )2969 }2970 return m.map(_of)2971 }2972 return ( obj = {2973 inspect: inspect, toString: inspect, valueOf: valueOf,2974 type: type, equals: equals, ap: ap, of: of, sequence: sequence, traverse: traverse,2975 concat: concat('concat'),2976 map: map('map'),2977 chain: chain('chain')2978 }, obj[fl.of] = of, obj[fl.equals] = equals, obj[fl.concat] = concat(fl.concat), obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Identity, obj )2979}2980Identity.of = _of2981Identity.type = type2982Identity[fl.of] = _of2983Identity['@@type'] = _type2984Identity['@@implements'] = _implements(2985 [ 'ap', 'chain', 'concat', 'equals', 'map', 'of', 'traverse' ]2986)2987module.exports = Identity2988/***/ }),2989/* 126 */2990/***/ (function(module, exports, __webpack_require__) {2991/** @license ISC License (c) copyright 2016 original and current authors */2992/** @author Ian Hofmann-Hicks (evil) */2993var VERSION = 22994var _implements = __webpack_require__(112)2995var _inspect = __webpack_require__(113)2996var type = __webpack_require__(17).type('IO')2997var _type = __webpack_require__(17).typeFn(type(), VERSION)2998var fl = __webpack_require__(34)2999var compose = __webpack_require__(7)3000var isFunction = __webpack_require__(4)3001var isSameType = __webpack_require__(18)3002var _of =3003 function (x) { return IO(function () { return x; }); }3004function IO(run) {3005 var obj;3006 if(!isFunction(run)) {3007 throw new TypeError('IO: Must wrap a function')3008 }3009 var of =3010 _of3011 var inspect =3012 function () { return ("IO" + (_inspect(run))); }3013 function map(method) {3014 return function(fn) {3015 if(!isFunction(fn)) {3016 throw new TypeError(("IO." + method + ": Function required"))3017 }3018 return IO(compose(fn, run))3019 }3020 }3021 function ap(m) {3022 if(!isSameType(IO, m)) {3023 throw new TypeError('IO.ap: IO required')3024 }3025 return IO(function () {3026 var fn = run()3027 if(!isFunction(fn)) {3028 throw new TypeError('IO.ap: Wrapped value must be a function')3029 }3030 return m.map(fn).run()3031 })3032 }3033 function chain(method) {3034 return function(fn) {3035 if(!isFunction(fn)) {3036 throw new TypeError(("IO." + method + ": Function required"))3037 }3038 return IO(function() {3039 var m = fn(run())3040 if(!isSameType(IO, m)) {3041 throw new TypeError(("IO." + method + ": Function must return an IO"))3042 }3043 return m.run()3044 })3045 }3046 }3047 return ( obj = {3048 inspect: inspect, toString: inspect,3049 run: run, type: type, ap: ap, of: of,3050 map: map('map'),3051 chain: chain('chain')3052 }, obj[fl.of] = of, obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = IO, obj )3053}3054IO.of = _of3055IO.type = type3056IO[fl.of] = _of3057IO['@@type'] = _type3058IO['@@implements'] = _implements(3059 [ 'ap', 'chain', 'map', 'of' ]3060)3061module.exports = IO3062/***/ }),3063/* 127 */3064/***/ (function(module, exports, __webpack_require__) {3065/** @license ISC License (c) copyright 2016 original and current authors */3066/** @author Ian Hofmann-Hicks (evil) */3067module.exports =3068 __webpack_require__(128)3069/***/ }),3070/* 128 */3071/***/ (function(module, exports, __webpack_require__) {3072/** @license ISC License (c) copyright 2016 original and current authors */3073/** @author Ian Hofmann-Hicks (evil) */3074var VERSION = 43075var _equals = __webpack_require__(37)3076var _implements = __webpack_require__(112)3077var _inspect = __webpack_require__(113)3078var type = __webpack_require__(17).type('List')3079var _type = __webpack_require__(17).typeFn(type(), VERSION)3080var fl = __webpack_require__(34)3081var array = __webpack_require__(115)3082var apOrFunc = __webpack_require__(116)3083var isApplicative = __webpack_require__(50)3084var isApply = __webpack_require__(51)3085var isArray = __webpack_require__(45)3086var isEmpty = __webpack_require__(30)3087var isFunction = __webpack_require__(4)3088var isPredOrFunc = __webpack_require__(16)3089var isSameType = __webpack_require__(18)3090var isSemigroup = __webpack_require__(35)3091var predOrFunc = __webpack_require__(20)3092var not =3093 function (fn) { return function (x) { return !fn(x); }; }3094var _prepend =3095 function (x) { return function (m) { return x.concat(m); }; }3096var ref = __webpack_require__(129);3097var Nothing = ref.Nothing;3098var Just = ref.Just;3099var _of =3100 function (x) { return List([ x ]); }3101var _empty =3102 function () { return List([]); }3103function fromArray(xs) {3104 if(!isArray(xs)) {3105 throw new TypeError('List.fromArray: Array required')3106 }3107 return xs.reduce(function (res, x) { return res.concat(List.of(x)); }, List.empty())3108}3109function applyTraverse(x, y) {3110 if(isArray(x)) {3111 return array.ap(x, array.map(function (v) { return _prepend(List.of(v)); }, y))3112 }3113 return y3114 .map(function (v) { return _prepend(List.of(v)); })3115 .ap(x)3116}3117function runSequence(acc, x) {3118 if(!((isApply(acc) || isArray(acc)) && isSameType(acc, x))) {3119 throw new TypeError(3120 'List.sequence: Must wrap Applys of the same type'3121 )3122 }3123 return applyTraverse(acc, x)3124}3125function runTraverse(f) {3126 return function(acc, x) {3127 var m = f(x)3128 if(!((isApply(acc) || isArray(acc)) && isSameType(acc, m))) {3129 throw new TypeError('List.traverse: Both functions must return an Apply of the same type')3130 }3131 return applyTraverse(acc, m)3132 }3133}3134function List(x) {3135 var obj;3136 if(!arguments.length) {3137 throw new TypeError('List: List must wrap something')3138 }3139 var xs =3140 isArray(x) ? x.slice() : [ x ]3141 function flatMap(method, fn) {3142 return function(y, x) {3143 var m = fn(x)3144 if(!isSameType(List, m)) {3145 throw new TypeError(("List." + method + ": Function must return a List"))3146 }3147 return y.concat(m.valueOf())3148 }3149 }3150 var of =3151 _of3152 var valueOf =3153 function () { return xs.slice(); }3154 var toArray =3155 valueOf3156 var empty =3157 _empty3158 var inspect =3159 function () { return ("List" + (_inspect(xs))); }3160 var head =3161 function () { return xs.length3162 ? Just(xs[0])3163 : Nothing(); }3164 var tail =3165 function () { return xs.length && xs.length > 13166 ? Just(List(xs.slice(1)))3167 : Nothing(); }3168 var cons =3169 function (x) { return List([ x ].concat(xs)); }3170 var equals = function (m) { return isSameType(List, m)3171 && _equals(xs, m.valueOf()); }3172 function concat(method) {3173 return function(m) {3174 if(!isSameType(List, m)) {3175 throw new TypeError(("List." + method + ": List required"))3176 }3177 return List(xs.concat(m.valueOf()))3178 }3179 }3180 function reduce(method) {3181 return function(fn, i) {3182 if(!isFunction(fn)) {3183 throw new TypeError(("List." + method + ": Function required for first argument"))3184 }3185 return xs.reduce(fn, i)3186 }3187 }3188 function reduceRight(fn, i) {3189 if(!isFunction(fn)) {3190 throw new TypeError('List.reduceRight: Function required for first argument')3191 }3192 return xs.reduceRight(fn, i)3193 }3194 function fold() {3195 if(isEmpty(xs)) {3196 throw new TypeError('List.fold: List must contain at least one Semigroup')3197 }3198 var head =3199 xs[0]3200 if(!isSemigroup(head)) {3201 throw new TypeError('List.fold: List must contain Semigroups of the same type')3202 }3203 return xs.reduce(function(x, y) {3204 if(!isSameType(x, y)) {3205 throw new TypeError('List.fold: List must contain Semigroups of the same type')3206 }3207 return x.concat(y)3208 })3209 }3210 function foldMap(fn) {3211 if(!isFunction(fn)) {3212 throw new TypeError(3213 'List.foldMap: Semigroup returning function required'3214 )3215 }3216 if(isEmpty(xs)) {3217 throw new TypeError(3218 'List.foldMap: List must not be empty'3219 )3220 }3221 var head =3222 fn(xs[0])3223 if(!isSemigroup(head)) {3224 throw new TypeError(3225 'List.foldMap: Provided function must return Semigroups of the same type'3226 )3227 }3228 return xs.length !== 13229 ? xs.slice(1).reduce(function(semi, x) {3230 var val = fn(x)3231 if(!(isSameType(semi, val) && isSemigroup(val))) {3232 throw new TypeError(3233 'List.foldMap: Provided function must return Semigroups of the same type'3234 )3235 }3236 return semi.concat(val)3237 }, head) : head3238 }3239 function filter(method) {3240 return function(pred) {3241 if(!isPredOrFunc(pred)) {3242 throw new TypeError(("List." + method + ": Pred or predicate function required"))3243 }3244 return List(3245 xs.reduce(3246 function (x, y) { return predOrFunc(pred, y) ? x.concat([ y ]) : x; },3247 []3248 )3249 )3250 }3251 }3252 function reject(pred) {3253 if(!isPredOrFunc(pred)) {3254 throw new TypeError('List.reject: Pred or predicate function required')3255 }3256 var fn = not(function (x) { return predOrFunc(pred, x); })3257 return List(3258 xs.reduce(3259 function (x, y) { return fn(y) ? x.concat([ y ]) : x; },3260 []3261 )3262 )3263 }3264 function map(method) {3265 return function(fn) {3266 if(!isFunction(fn)) {3267 throw new TypeError(("List." + method + ": Function required"))3268 }3269 return List(xs.map(function (x) { return fn(x); }))3270 }3271 }3272 function ap(m) {3273 if(!isSameType(List, m)) {3274 throw new TypeError('List.ap: List required')3275 }3276 var ar = m.valueOf()3277 return List(3278 xs.reduce(function (acc, fn) {3279 if(!isFunction(fn)) {3280 throw new TypeError('List.ap: Wrapped values must all be functions')3281 }3282 return acc.concat(ar.map(function (x) { return fn(x); }))3283 }, [])3284 )3285 }3286 function chain(method) {3287 return function(fn) {3288 if(!isFunction(fn)) {3289 throw new TypeError(("List." + method + ": Function required"))3290 }3291 return List(xs.reduce(flatMap(method, fn), []))3292 }3293 }3294 function sequence(f) {3295 if(!(isApplicative(f) || isFunction(f))) {3296 throw new TypeError(3297 'List.sequence: Applicative TypeRep or Apply returning function required'3298 )3299 }3300 var af =3301 apOrFunc(f)3302 return reduceRight(3303 runSequence,3304 af(List.empty())3305 )3306 }3307 function traverse(f, fn) {3308 if(!(isApplicative(f) || isFunction(f))) {3309 throw new TypeError(3310 'List.traverse: Applicative TypeRep or Apply returning function required for first argument'3311 )3312 }3313 if(!isFunction(fn)) {3314 throw new TypeError(3315 'List.traverse: Apply returning functions required for second argument'3316 )3317 }3318 var af =3319 apOrFunc(f)3320 return reduceRight(3321 runTraverse(fn),3322 af(List.empty())3323 )3324 }3325 return ( obj = {3326 inspect: inspect, toString: inspect, valueOf: valueOf, toArray: toArray,3327 head: head, tail: tail, cons: cons, type: type, equals: equals, empty: empty,3328 reduceRight: reduceRight, fold: fold, foldMap: foldMap, reject: reject,3329 ap: ap, of: of, sequence: sequence, traverse: traverse,3330 concat: concat('concat'),3331 map: map('map'),3332 chain: chain('chain'),3333 reduce: reduce('reduce'),3334 filter: filter('filter')3335 }, obj[fl.of] = of, obj[fl.equals] = equals, obj[fl.concat] = concat(fl.concat), obj[fl.empty] = empty, obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj[fl.reduce] = reduce(fl.reduce), obj[fl.filter] = filter(fl.filter), obj['@@type'] = _type, obj.constructor = List, obj )3336}3337List.of = _of3338List.empty = _empty3339List.type = type3340List[fl.of] = _of3341List[fl.empty] = _empty3342List['@@type'] = _type3343List.fromArray =3344 fromArray3345List['@@implements'] = _implements(3346 [ 'ap', 'chain', 'concat', 'empty', 'equals', 'map', 'of', 'reduce', 'traverse' ]3347)3348module.exports = List3349/***/ }),3350/* 129 */3351/***/ (function(module, exports, __webpack_require__) {3352/** @license ISC License (c) copyright 2016 original and current authors */3353/** @author Ian Hofmann-Hicks (evil) */3354var VERSION = 43355var _defineUnion = __webpack_require__(122)3356var _equals = __webpack_require__(37)3357var _implements = __webpack_require__(112)3358var _innerConcat = __webpack_require__(123)3359var _inspect = __webpack_require__(113)3360var type = __webpack_require__(17).type('Maybe')3361var _type = __webpack_require__(17).typeFn(type(), VERSION)3362var fl = __webpack_require__(34)3363var apOrFunc = __webpack_require__(116)3364var compose = __webpack_require__(7)3365var isApplicative = __webpack_require__(50)3366var isApply = __webpack_require__(51)3367var isArray = __webpack_require__(45)3368var isFunction = __webpack_require__(4)3369var isSameType = __webpack_require__(18)3370var constant = function (x) { return function () { return x; }; }3371var identity = function (x) { return x; }3372var _maybe =3373 _defineUnion({ Nothing: [], Just: [ 'a' ] })3374var Nothing =3375 _maybe.Nothing3376var Just =3377 _maybe.Just3378Maybe.Nothing =3379 compose(Maybe, Nothing)3380Maybe.Just =3381 compose(Maybe, Just)3382var _of =3383 compose(Maybe, Just)3384var _zero =3385 compose(Maybe, Nothing)3386function runSequence(x) {3387 if(!(isApply(x) || isArray(x))) {3388 throw new TypeError(3389 'Maybe.sequence: Must wrap an Apply'3390 )3391 }3392 return x.map(_of)3393}3394function Maybe(u) {3395 var obj;3396 if(!arguments.length) {3397 throw new TypeError('Maybe: Must wrap something, try using Nothing or Just constructors')3398 }3399 var x =3400 !_maybe.includes(u) ? Just(u) : u3401 var of =3402 _of3403 var zero =3404 _zero3405 var option =3406 function (n) { return either(constant(n), identity); }3407 var equals =3408 function (m) { return isSameType(Maybe, m) && either(3409 constant(m.either(constant(true), constant(false))),3410 function (x) { return m.either(constant(false), function (y) { return _equals(y, x); }); }3411 ); }3412 var inspect = function () { return either(3413 constant('Nothing'),3414 function (x) { return ("Just" + (_inspect(x))); }3415 ); }3416 function either(f, g) {3417 if(!isFunction(f) || !isFunction(g)) {3418 throw new TypeError('Maybe.either: Requires both left and right functions')3419 }3420 return _maybe.caseOf({3421 Nothing: f,3422 Just: g3423 }, x)3424 }3425 function concat(method) {3426 return function(m) {3427 if(!isSameType(Maybe, m)) {3428 throw new TypeError(("Maybe." + method + ": Maybe of Semigroup required"))3429 }3430 return either(3431 Maybe.Nothing,3432 _innerConcat(("Maybe." + method), m)3433 )3434 }3435 }3436 function coalesce(f, g) {3437 if(!isFunction(f) || !isFunction(g)) {3438 throw new TypeError('Maybe.coalesce: Requires both left and right functions')3439 }3440 return Maybe.Just(either(f, g))3441 }3442 function bichain(l, r) {3443 var bichainErr =3444 'Maybe.bichain: Both arguments must be Maybe returning functions'3445 if(!(isFunction(l) && isFunction(r))) {3446 throw new TypeError(bichainErr)3447 }3448 var m = either(l, r)3449 if(!isSameType(Maybe, m)) {3450 throw new TypeError(bichainErr)3451 }3452 return m3453 }3454 function map(method) {3455 return function(fn) {3456 if(!isFunction(fn)) {3457 throw new TypeError(("Maybe." + method + ": Function required"))3458 }3459 return either(3460 Maybe.Nothing,3461 compose(Maybe.Just, fn)3462 )3463 }3464 }3465 function alt(method) {3466 return function(m) {3467 if(!isSameType(Maybe, m)) {3468 throw new TypeError(("Maybe." + method + ": Maybe required"))3469 }3470 return either(3471 constant(m),3472 Maybe.Just3473 )3474 }3475 }3476 function ap(m) {3477 var fn = option(constant(undefined))3478 if(!isFunction(fn)) {3479 throw new TypeError('Maybe.ap: Wrapped value must be a function')3480 }3481 else if(!isSameType(Maybe, m)) {3482 throw new TypeError('Maybe.ap: Maybe required')3483 }3484 return either(3485 Maybe.Nothing,3486 m.map3487 )3488 }3489 function chain(method) {3490 return function(fn) {3491 if(!isFunction(fn)) {3492 throw new TypeError(("Maybe." + method + ": Function required"))3493 }3494 var m = either(Maybe.Nothing, fn)3495 if(!isSameType(Maybe, m)) {3496 throw new TypeError(("Maybe." + method + ": Function must return a Maybe"))3497 }3498 return m3499 }3500 }3501 function sequence(f) {3502 if(!(isApplicative(f) || isFunction(f))) {3503 throw new TypeError(3504 'Maybe.sequence: Applicative TypeRep or Apply returning function required'3505 )3506 }3507 var af =3508 apOrFunc(f)3509 return either(3510 compose(af, Maybe.Nothing),3511 runSequence3512 )3513 }3514 function traverse(f, fn) {3515 if(!(isApplicative(f) || isFunction(f))) {3516 throw new TypeError(3517 'Maybe.traverse: Applicative TypeRep or Apply returning function required for first argument'3518 )3519 }3520 if(!isFunction(fn)) {3521 throw new TypeError(3522 'Maybe.traverse: Apply returning function required for second argument'3523 )3524 }3525 var af =3526 apOrFunc(f)3527 var m =3528 either(compose(af, Maybe.Nothing), fn)3529 if(!(isApply(m) || isArray(m))) {3530 throw new TypeError(3531 'Maybe.traverse: Both functions must return an Apply of the same type'3532 )3533 }3534 return either(3535 constant(m),3536 constant(m.map(_of))3537 )3538 }3539 return ( obj = {3540 inspect: inspect, toString: inspect, either: either,3541 option: option, type: type, equals: equals, bichain: bichain, coalesce: coalesce,3542 zero: zero, ap: ap, of: of, sequence: sequence,3543 traverse: traverse,3544 alt: alt('alt'),3545 chain: chain('chain'),3546 concat: concat('concat'),3547 map: map('map')3548 }, obj[fl.zero] = zero, obj[fl.of] = of, obj[fl.equals] = equals, obj[fl.alt] = alt(fl.alt), obj[fl.concat] = concat(fl.concat), obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Maybe, obj )3549}3550Maybe.of = _of3551Maybe.zero = _zero3552Maybe.type = type3553Maybe[fl.of] = _of3554Maybe[fl.zero] = _zero3555Maybe['@@type'] = _type3556Maybe['@@implements'] = _implements(3557 [ 'alt', 'ap', 'chain', 'concat', 'equals', 'map', 'of', 'traverse', 'zero' ]3558)3559module.exports = Maybe3560/***/ }),3561/* 130 */3562/***/ (function(module, exports, __webpack_require__) {3563/** @license ISC License (c) copyright 2016 original and current authors */3564/** @author Ian Hofmann-Hicks (evil) */3565module.exports =3566 __webpack_require__(129)3567/***/ }),3568/* 131 */3569/***/ (function(module, exports, __webpack_require__) {3570/** @license ISC License (c) copyright 2016 original and current authors */3571/** @author Ian Hofmann-Hicks (evil) */3572module.exports =3573 __webpack_require__(132)3574/***/ }),3575/* 132 */3576/***/ (function(module, exports, __webpack_require__) {3577/** @license ISC License (c) copyright 2016 original and current authors */3578/** @author Ian Hofmann-Hicks (evil) */3579var VERSION = 43580var _equals = __webpack_require__(37)3581var _implements = __webpack_require__(112)3582var _inspect = __webpack_require__(113)3583var type = __webpack_require__(17).type('Pair')3584var _type = __webpack_require__(17).typeFn(type(), VERSION)3585var fl = __webpack_require__(34)3586var isApplicative = __webpack_require__(50)3587var isApply = __webpack_require__(51)3588var isArray = __webpack_require__(45)3589var isFunction = __webpack_require__(4)3590var isSameType = __webpack_require__(18)3591var isSemigroup = __webpack_require__(35)3592function Pair(l, r) {3593 var obj;3594 if(arguments.length < 2) {3595 throw new TypeError('Pair: Must provide a first and second value')3596 }3597 var fst =3598 function () { return l; }3599 var snd =3600 function () { return r; }3601 var inspect =3602 function () { return ("Pair(" + (_inspect(l)) + "," + (_inspect(r)) + " )"); }3603 var toArray =3604 function () { return [ l, r ]; }3605 function merge(fn) {3606 if(!isFunction(fn)) {3607 throw new TypeError('Pair.merge: Binary function required')3608 }3609 return fn(fst(), snd())3610 }3611 function equals(m) {3612 return isSameType(Pair, m)3613 && _equals(m.fst(), fst())3614 && _equals(m.snd(), snd())3615 }3616 function concat(method) {3617 return function(m) {3618 if(!isSameType(Pair, m)) {3619 throw new TypeError(("Pair." + method + ": Pair required"))3620 }3621 var lf = fst()3622 var ls = snd()3623 var rf = m.fst()3624 var rs = m.snd()3625 if(!(isSemigroup(lf) && isSemigroup(ls))) {3626 throw new TypeError(("Pair." + method + ": Both Pairs must contain Semigroups of the same type"))3627 }3628 if(!(isSameType(lf, rf) && isSameType(ls, rs))) {3629 throw new TypeError(("Pair." + method + ": Both Pairs must contain Semigroups of the same type"))3630 }3631 return Pair(3632 lf.concat(rf),3633 ls.concat(rs)3634 )3635 }3636 }3637 function swap(f, g) {3638 if(!isFunction(f) || !isFunction(g)) {3639 throw new TypeError('Pair.swap: Requires both left and right functions')3640 }3641 return Pair(g(r), f(l))3642 }3643 function map(method) {3644 return function(fn) {3645 if(!isFunction(fn)) {3646 throw new TypeError(("Pair." + method + ": Function required"))3647 }3648 return Pair(l, fn(r))3649 }3650 }3651 function bimap(method) {3652 return function(f, g) {3653 if(!isFunction(f) || !isFunction(g)) {3654 throw new TypeError(("Pair." + method + ": Function required for both arguments"))3655 }3656 return Pair(f(l), g(r))3657 }3658 }3659 function ap(m) {3660 if(!isSameType(Pair, m)) {3661 throw new TypeError('Pair.ap: Pair required')3662 }3663 var fn = snd()3664 if(!isFunction(fn)) {3665 throw new TypeError('Pair.ap: Function required for second value')3666 }3667 var l = fst()3668 var r = m.fst()3669 if(!(isSemigroup(l) && isSameType(l, r))) {3670 throw new TypeError('Pair.ap: Semigroups of the same type is required for first values')3671 }3672 return Pair(l.concat(r), fn(m.snd()))3673 }3674 function chain(method) {3675 return function(fn) {3676 var l = fst()3677 if(!isFunction(fn)) {3678 throw new TypeError(("Pair." + method + ": Function required"))3679 }3680 if(!isSemigroup(l)) {3681 throw new TypeError(("Pair." + method + ": Semigroups of the same type required for first values"))3682 }3683 var m = fn(snd())3684 if(!isSameType(Pair, m)) {3685 throw new TypeError(("Pair." + method + ": Function must return a Pair"))3686 }3687 var r = m.fst()3688 if(!isSameType(l, r)) {3689 throw new TypeError(("Pair." + method + ": Semigroups of the same type required for first values"))3690 }3691 return Pair(3692 l.concat(r),3693 m.snd()3694 )3695 }3696 }3697 function sequence(f) {3698 if(!(isApplicative(f) || isFunction(f))) {3699 throw new TypeError(3700 'Pair.sequence: Applicative TypeRep or Apply returning function required'3701 )3702 }3703 if(!(isApply(r) || isArray(r))) {3704 throw new TypeError(3705 'Pair.sequence: Must wrap an Apply in the second'3706 )3707 }3708 return r.map(function (v) { return Pair(l, v); })3709 }3710 function traverse(f, fn) {3711 if(!(isApplicative(f) || isFunction(f))) {3712 throw new TypeError(3713 'Pair.traverse: Applicative TypeRep or Apply returning function required for first argument'3714 )3715 }3716 if(!isFunction(fn)) {3717 throw new TypeError(3718 'Pair.traverse: Apply returning function required for second argument'3719 )3720 }3721 var m = fn(r)3722 if(!(isApply(m) || isArray(m))) {3723 throw new TypeError(3724 'Pair.traverse: Both functions must return an Apply of the same type'3725 )3726 }3727 return m.map(function (v) { return Pair(l, v); })3728 }3729 function extend(method) {3730 return function(fn) {3731 if(!isFunction(fn)) {3732 throw new TypeError(("Pair." + method + ": Function required"))3733 }3734 return Pair(l, fn(Pair(l, r)))3735 }3736 }3737 return ( obj = {3738 inspect: inspect, toString: inspect, fst: fst,3739 snd: snd, toArray: toArray, type: type, merge: merge, equals: equals,3740 swap: swap, ap: ap, sequence: sequence, traverse: traverse,3741 concat: concat('concat'),3742 map: map('map'),3743 bimap: bimap('bimap'),3744 chain: chain('chain'),3745 extend: extend('extend')3746 }, obj[fl.equals] = equals, obj[fl.concat] = concat(fl.concat), obj[fl.map] = map(fl.map), obj[fl.bimap] = bimap(fl.bimap), obj[fl.chain] = chain(fl.chain), obj[fl.extend] = extend(fl.extend), obj['@@type'] = _type, obj.constructor = Pair, obj )3747}3748Pair.type = type3749Pair['@@type'] = _type3750Pair['@@implements'] = _implements(3751 [ 'ap', 'bimap', 'chain', 'concat', 'extend', 'equals', 'map', 'traverse' ]3752)3753module.exports = Pair3754/***/ }),3755/* 133 */3756/***/ (function(module, exports, __webpack_require__) {3757/** @license ISC License (c) copyright 2016 original and current authors */3758/** @author Ian Hofmann-Hicks (evil) */3759module.exports =3760 __webpack_require__(134)3761/***/ }),3762/* 134 */3763/***/ (function(module, exports, __webpack_require__) {3764/** @license ISC License (c) copyright 2016 original and current authors */3765/** @author Ian Hofmann-Hicks (evil) */3766var VERSION = 23767var _implements = __webpack_require__(112)3768var _inspect = __webpack_require__(113)3769var type = __webpack_require__(17).type('Pred')3770var _type = __webpack_require__(17).typeFn(type(), VERSION)3771var fl = __webpack_require__(34)3772var compose = __webpack_require__(7)3773var isFunction = __webpack_require__(4)3774var isSameType = __webpack_require__(18)3775var _empty =3776 function () { return Pred(function () { return true; }); }3777function Pred(pred) {3778 var obj;3779 if(!isFunction(pred)) {3780 throw new TypeError('Pred: Predicate function required')3781 }3782 var runWith =3783 function (x) { return !!pred(x); }3784 var inspect =3785 function () { return ("Pred" + (_inspect(runWith))); }3786 var empty =3787 _empty3788 var valueOf =3789 function () { return runWith; }3790 function concat(method) {3791 return function(m) {3792 if(!isSameType(Pred, m)) {3793 throw new TypeError(("Pred." + method + ": Pred required"))3794 }3795 return Pred(function (x) { return !!runWith(x) && !!m.runWith(x); })3796 }3797 }3798 function contramap(method) {3799 return function(fn) {3800 if(!isFunction(fn)) {3801 throw new TypeError(("Pred." + method + ": Function required"))3802 }3803 return Pred(compose(runWith, fn))3804 }3805 }3806 return ( obj = {3807 inspect: inspect, toString: inspect,3808 runWith: runWith, type: type, valueOf: valueOf, empty: empty,3809 concat: concat('concat'),3810 contramap: contramap('contramap')3811 }, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj[fl.contramap] = contramap(fl.contramap), obj['@@type'] = _type, obj.constructor = Pred, obj )3812}3813Pred.empty = _empty3814Pred.type = type3815Pred[fl.empty] = _empty3816Pred['@@type'] = _type3817Pred['@@implements'] = _implements(3818 [ 'concat', 'contramap', 'empty' ]3819)3820module.exports = Pred3821/***/ }),3822/* 135 */3823/***/ (function(module, exports, __webpack_require__) {3824/** @license ISC License (c) copyright 2016 original and current authors */3825/** @author Ian Hofmann-Hicks (evil) */3826var VERSION = 23827var _implements = __webpack_require__(112)3828var _inspect = __webpack_require__(113)3829var type = __webpack_require__(17).type('Reader')3830var _type = __webpack_require__(17).typeFn(type(), VERSION)3831var fl = __webpack_require__(34)3832var compose = __webpack_require__(7)3833var isFunction = __webpack_require__(4)3834var isSameType = __webpack_require__(18)3835var _of =3836 function (x) { return Reader(function () { return x; }); }3837function ask(fn) {3838 if(!arguments.length) {3839 return Reader(function (x) { return x; })3840 }3841 if(isFunction(fn)) {3842 return Reader(fn)3843 }3844 throw new TypeError('Reader.ask: No argument or function required')3845}3846function Reader(runWith) {3847 var obj;3848 if(!arguments.length || !isFunction(runWith)) {3849 throw new TypeError('Reader: Must wrap a function')3850 }3851 var of =3852 _of3853 var inspect =3854 function () { return ("Reader" + (_inspect(runWith))); }3855 function map(method) {3856 return function(fn) {3857 if(!isFunction(fn)) {3858 throw new TypeError(("Reader." + method + ": Function required"))3859 }3860 return Reader(compose(fn, runWith))3861 }3862 }3863 function ap(m) {3864 if(!isSameType(Reader, m)) {3865 throw new TypeError('Reader.ap: Reader required')3866 }3867 return Reader(function(e) {3868 var fn = runWith(e)3869 if(!isFunction(fn)) {3870 throw new TypeError('Reader.ap: Wrapped function must return a function')3871 }3872 return m.map(fn).runWith(e)3873 })3874 }3875 function chain(method) {3876 return function(fn) {3877 if(!isFunction(fn)) {3878 throw new TypeError(("Reader." + method + ": Function required"))3879 }3880 return Reader(function(e) {3881 var m = fn(runWith(e))3882 if(!isSameType(Reader, m)) {3883 throw new TypeError(("Reader." + method + ": Function must return a Reader"))3884 }3885 return m.runWith(e)3886 })3887 }3888 }3889 return ( obj = {3890 inspect: inspect, toString: inspect, runWith: runWith,3891 type: type, ap: ap, of: of,3892 map: map('map'),3893 chain: chain('chain')3894 }, obj[fl.of] = of, obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Reader, obj )3895}3896Reader.of = _of3897Reader.ask = ask3898Reader.type = type3899Reader[fl.of] = _of3900Reader['@@type'] = _type3901Reader['@@implements'] = _implements(3902 [ 'ap', 'chain', 'map', 'of' ]3903)3904module.exports = Reader3905/***/ }),3906/* 136 */3907/***/ (function(module, exports, __webpack_require__) {3908/** @license ISC License (c) copyright 2017 original and current authors */3909/** @author Ian Hofmann-Hicks (evil) */3910var VERSION = 13911var _implements = __webpack_require__(112)3912var _inspect = __webpack_require__(113)3913var _type = __webpack_require__(17).type('Reader')()3914var _typeString = __webpack_require__(17).typeFn(_type, VERSION)3915var fl = __webpack_require__(34)3916var curry = __webpack_require__(3)3917var isFunction = __webpack_require__(4)3918var isMonad = __webpack_require__(84)3919var isSameType = __webpack_require__(18)3920function _ReaderT(Monad) {3921 if(!isMonad(Monad)) {3922 throw new TypeError('ReaderT: Monad required for construction')3923 }3924 var type =3925 function () { return (_type + "( " + (Monad.type()) + " )"); }3926 var typeString =3927 _typeString + "( " + (Monad['@@type']) + " )"3928 var of =3929 function (x) { return ReaderT(function () { return Monad.of(x); }); }3930 function ask(fn) {3931 if(!arguments.length) {3932 return ReaderT(Monad.of)3933 }3934 if(isFunction(fn)) {3935 return ReaderT(Monad.of).map(fn)3936 }3937 throw new TypeError(((type()) + ".ask: No argument or function required"))3938 }3939 function lift(m) {3940 if(!isSameType(Monad, m)) {3941 throw new TypeError(((type()) + ".lift: " + (Monad.type()) + " instance required"))3942 }3943 return ReaderT(function () { return m; })3944 }3945 function liftFn(fn, x) {3946 if(!isFunction(fn)) {3947 throw new TypeError(((type()) + ".liftFn: " + (Monad.type()) + " returning function required"))3948 }3949 return ReaderT(function() {3950 var m = fn(x)3951 if(!isSameType(Monad, m)) {3952 throw new TypeError(((type()) + ".liftFn: " + (Monad.type()) + " returning function required"))3953 }3954 return m3955 })3956 }3957 function ReaderT(wrapped) {3958 var obj;3959 if(!isFunction(wrapped)) {3960 throw new TypeError(((type()) + ": " + (Monad.type()) + " returning function required"))3961 }3962 var inspect =3963 function () { return ("" + (type()) + (_inspect(wrapped))); }3964 function runWith(x) {3965 var result = wrapped(x)3966 if(!isSameType(Monad, result)) {3967 throw new TypeError(((type()) + ": " + (Monad.type()) + " must be returned by wrapped function"))3968 }3969 return result3970 }3971 function map(fn) {3972 if(!isFunction(fn)) {3973 throw new TypeError(((type()) + ".map: Function required"))3974 }3975 return ReaderT(function (e) { return runWith(e).map(fn); })3976 }3977 function ap(m) {3978 if(!isSameType(ReaderT, m)) {3979 throw new TypeError(((type()) + ".ap: " + (type()) + " required"))3980 }3981 return ReaderT(function (e) { return runWith(e).ap(m.runWith(e)); })3982 }3983 function chain(fn) {3984 if(!isFunction(fn)) {3985 throw new TypeError(((type()) + ".chain: " + (type()) + " returning function required"))3986 }3987 return ReaderT(function (e) { return runWith(e).chain(function (inner) {3988 var m = fn(inner)3989 if(!isSameType(ReaderT, m)) {3990 throw new TypeError(((type()) + ".chain: Function must return a " + (type())))3991 }3992 return m.runWith(e)3993 }); }3994 )3995 }3996 return ( obj = {3997 inspect: inspect, toString: inspect, type: type,3998 runWith: runWith, of: of, map: map, ap: ap, chain: chain3999 }, obj[fl.of] = of, obj[fl.map] = map, obj[fl.chain] = chain, obj['@@type'] = typeString, obj.constructor = ReaderT, obj )4000 }4001 ReaderT.type = type4002 ReaderT.of = of4003 ReaderT.ask = ask4004 ReaderT.lift = lift4005 ReaderT.liftFn = curry(liftFn)4006 ReaderT[fl.of] = of4007 ReaderT['@@type'] = typeString4008 ReaderT['@@implements'] = _implements(4009 [ 'ap', 'chain', 'map', 'of' ]4010 )4011 return ReaderT4012}4013module.exports = _ReaderT4014/***/ }),4015/* 137 */4016/***/ (function(module, exports, __webpack_require__) {4017/** @license ISC License (c) copyright 2017 original and current authors */4018/** @author Ian Hofmann-Hicks (evil) */4019var VERSION = 44020var _defineUnion = __webpack_require__(122)4021var _equals = __webpack_require__(37)4022var _implements = __webpack_require__(112)4023var _innerConcat = __webpack_require__(123)4024var _inspect = __webpack_require__(113)4025var type = __webpack_require__(17).type('Result')4026var _type = __webpack_require__(17).typeFn(type(), VERSION)4027var fl = __webpack_require__(34)4028var apOrFunc = __webpack_require__(116)4029var compose = __webpack_require__(7)4030var isApplicative = __webpack_require__(50)4031var isApply = __webpack_require__(51)4032var isArray = __webpack_require__(45)4033var isFunction = __webpack_require__(4)4034var isSameType = __webpack_require__(18)4035var isSemigroup = __webpack_require__(35)4036var constant =4037 function (x) { return function () { return x; }; }4038var _result =4039 _defineUnion({ Err: [ 'a' ], Ok: [ 'b' ] })4040Result.Err =4041 compose(Result, _result.Err)4042Result.Ok =4043 compose(Result, _result.Ok)4044var _of =4045 Result.Ok4046var concatApErr =4047 function (m) { return function (x) { return Result.Err(m.either(4048 function (y) { return isSemigroup(x) && isSameType(y, x) ? x.concat(y) : x; },4049 function () { return x; }4050 )); }; }4051var concatAltErr =4052 function (r) { return function (l) { return Result.Err(isSemigroup(r) && isSameType(l, r) ? l.concat(r) : r); }; }4053function runSequence(x) {4054 if(!(isApply(x) || isArray(x))) {4055 throw new TypeError(4056 'Result.sequence: Must wrap an Apply'4057 )4058 }4059 return x.map(_of)4060}4061function Result(u) {4062 var obj;4063 if(!arguments.length) {4064 throw new TypeError('Result: Must wrap something, try using Err or Ok constructors')4065 }4066 var x =4067 !_result.includes(u) ? _result.Ok(u) : u4068 var equals =4069 function (m) { return isSameType(Result, m) && either(4070 function (x) { return m.either(function (y) { return _equals(y, x); }, constant(false)); },4071 function (x) { return m.either(constant(false), function (y) { return _equals(y, x); }); }4072 ); }4073 var of =4074 _of4075 var inspect = function () { return either(4076 function (l) { return ("Err" + (_inspect(l))); },4077 function (r) { return ("Ok" + (_inspect(r))); }4078 ); }4079 function either(f, g) {4080 if(!isFunction(f) || !isFunction(g)) {4081 throw new TypeError('Result.either: Requires both invalid and valid functions')4082 }4083 return _result.caseOf({4084 Err: f,4085 Ok: g4086 }, x)4087 }4088 function concat(method) {4089 return function(m) {4090 if(!isSameType(Result, m)) {4091 throw new TypeError(("Result." + method + ": Result of Semigroup required"))4092 }4093 return either(4094 Result.Err,4095 _innerConcat(("Result." + method), m)4096 )4097 }4098 }4099 function swap(f, g) {4100 if(!isFunction(f) || !isFunction(g)) {4101 throw new TypeError('Result.swap: Requires both left and right functions')4102 }4103 return either(4104 compose(Result.Ok, f),4105 compose(Result.Err, g)4106 )4107 }4108 function coalesce(f, g) {4109 if(!isFunction(f) || !isFunction(g)) {4110 throw new TypeError('Result.coalesce: Requires both left and right functions')4111 }4112 return Result.Ok(either(f, g))4113 }4114 function bichain(l, r) {4115 var bichainErr =4116 'Result.bichain: Both arguments must be Result returning functions'4117 if(!(isFunction(l) && isFunction(r))) {4118 throw new TypeError(bichainErr)4119 }4120 var m = either(l, r)4121 if(!isSameType(Result, m)) {4122 throw new TypeError(bichainErr)4123 }4124 return m4125 }4126 function map(method) {4127 return function(fn) {4128 if(!isFunction(fn)) {4129 throw new TypeError(("Result." + method + ": Function required"))4130 }4131 return either(4132 Result.Err,4133 compose(Result.Ok, fn)4134 )4135 }4136 }4137 function bimap(method) {4138 return function(f, g) {4139 if(!isFunction(f) || !isFunction(g)) {4140 throw new TypeError(("Result." + method + ": Requires both left and right functions"))4141 }4142 return either(4143 compose(Result.Err, f),4144 compose(Result.Ok, g)4145 )4146 }4147 }4148 function alt(method) {4149 return function(m) {4150 if(!isSameType(Result, m)) {4151 throw new TypeError(("Result." + method + ": Result required"))4152 }4153 return m.either(4154 function (r) { return either(concatAltErr(r), Result.Ok); },4155 function (r) { return either(function () { return Result.Ok(r); }, Result.Ok); }4156 )4157 }4158 }4159 function ap(m) {4160 if(!isSameType(Result, m)) {4161 throw new TypeError('Result.ap: Result required')4162 }4163 return either(4164 concatApErr(m),4165 function(fn) {4166 if(!isFunction(fn)) {4167 throw new TypeError('Result.ap: Wrapped value must be a function')4168 }4169 return m.either(Result.Err, function () { return m.map(fn); })4170 }4171 )4172 }4173 function chain(method) {4174 return function(fn) {4175 if(!isFunction(fn)) {4176 throw new TypeError(("Result." + method + ": Result returning function required"))4177 }4178 var m = either(Result.Err, fn)4179 if(!isSameType(Result, m)) {4180 throw new TypeError(("Result." + method + ": Function must return a Result"))4181 }4182 return m4183 }4184 }4185 function sequence(f) {4186 if(!(isApplicative(f) || isFunction(f))) {4187 throw new TypeError(4188 'Result.sequence: Applicative TypeRep or Apply returning function required'4189 )4190 }4191 var af =4192 apOrFunc(f)4193 return either(4194 compose(af, Result.Err),4195 runSequence4196 )4197 }4198 function traverse(f, fn) {4199 if(!(isApplicative(f) || isFunction(f))) {4200 throw new TypeError(4201 'Result.traverse: Applicative TypeRep of Apply returning function required for first argument'4202 )4203 }4204 if(!isFunction(fn)) {4205 throw new TypeError(4206 'Result.traverse: Apply returning functions required for both arguments'4207 )4208 }4209 var af =4210 apOrFunc(f)4211 var m = either(compose(af, Result.Err), fn)4212 if(!(isApply(m) || isArray(m))) {4213 throw new TypeError('Result.traverse: Both functions must return an Apply of the same type')4214 }4215 return either(4216 constant(m),4217 constant(m.map(_of))4218 )4219 }4220 return ( obj = {4221 inspect: inspect, toString: inspect, equals: equals,4222 type: type, either: either, swap: swap, coalesce: coalesce, bichain: bichain,4223 ap: ap, of: of, sequence: sequence, traverse: traverse,4224 alt: alt('alt'),4225 bimap: bimap('bimap'),4226 concat: concat('concat'),4227 map: map('map'),4228 chain: chain('chain')4229 }, obj[fl.of] = of, obj[fl.equals] = equals, obj[fl.alt] = alt(fl.alt), obj[fl.bimap] = bimap(fl.bimap), obj[fl.concat] = concat(fl.concat), obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Result, obj )4230}4231Result.of = _of4232Result.type = type4233Result[fl.of] = _of4234Result['@@type'] = _type4235Result['@@implements'] = _implements(4236 [ 'alt', 'ap', 'bimap', 'chain', 'concat', 'equals', 'map', 'of', 'traverse' ]4237)4238module.exports = Result4239/***/ }),4240/* 138 */4241/***/ (function(module, exports, __webpack_require__) {4242/** @license ISC License (c) copyright 2016 original and current authors */4243/** @author Ian Hofmann-Hicks (evil) */4244var VERSION = 24245var _implements = __webpack_require__(112)4246var _inspect = __webpack_require__(113)4247var _type = __webpack_require__(17).type('Star')4248var __type = __webpack_require__(17).typeFn(_type(), VERSION)4249var fl = __webpack_require__(34)4250var array = __webpack_require__(115)4251var isFunction = __webpack_require__(4)4252var isMonad = __webpack_require__(84)4253var isSameType = __webpack_require__(18)4254var Pair = __webpack_require__(132)4255var merge =4256 function (fn, m) { return m.merge(fn); }4257var sequence =4258 function (af, m) { return array.sequence(af, m); }4259function _Star(Monad) {4260 if(!isMonad(Monad)) {4261 throw new TypeError('Star: Monad required for construction')4262 }4263 var _id =4264 function () { return Star(Monad.of); }4265 var innerType =4266 Monad.type()4267 var innerFullType =4268 Monad['@@type']4269 var outerType =4270 (_type()) + "( " + innerType + " )"4271 var typeString =4272 __type + "( " + innerFullType + " )"4273 var type =4274 function () { return outerType; }4275 function Star(runWith) {4276 var obj;4277 if(!isFunction(runWith)) {4278 throw new TypeError((outerType + ": Function in the form (a -> m b) required"))4279 }4280 var inspect =4281 function () { return ("" + outerType + (_inspect(runWith))); }4282 var id =4283 _id4284 function compose(method) {4285 return function(s) {4286 if(!isSameType(Star, s)) {4287 throw new TypeError((outerType + "." + method + ": " + outerType + " required"))4288 }4289 return Star(function(x) {4290 var m = runWith(x)4291 if(!isSameType(Monad, m)) {4292 throw new TypeError((outerType + "." + method + ": Computations must return a type of " + innerType))4293 }4294 return m.chain(function(val) {4295 var inner = s.runWith(val)4296 if(!isSameType(m, inner)) {4297 throw new TypeError((outerType + "." + method + ": Both computations must return a type of " + innerType))4298 }4299 return inner4300 })4301 })4302 }4303 }4304 function map(method) {4305 return function(fn) {4306 if(!isFunction(fn)) {4307 throw new TypeError((outerType + "." + method + ": Function required"))4308 }4309 return Star(function(x) {4310 var m = runWith(x)4311 if(!isSameType(Monad, m)) {4312 throw new TypeError((outerType + "." + method + ": Computations must return a type of " + innerType))4313 }4314 return m.map(fn)4315 })4316 }4317 }4318 function contramap(method) {4319 return function(fn) {4320 if(!isFunction(fn)) {4321 throw new TypeError((outerType + "." + method + ": Function required"))4322 }4323 return Star(function (x) { return runWith(fn(x)); })4324 }4325 }4326 function promap(method) {4327 return function(l, r) {4328 if(!isFunction(l) || !isFunction(r)) {4329 throw new TypeError((outerType + "." + method + ": Functions required for both arguments"))4330 }4331 return Star(function(x) {4332 var m = runWith(l(x))4333 if(!isSameType(Monad, m)) {4334 throw new TypeError((outerType + "." + method + ": Computation must return a type of " + innerType))4335 }4336 return m.map(r)4337 })4338 }4339 }4340 function first() {4341 return Star(function(x) {4342 if(!isSameType(Pair, x)) {4343 throw TypeError((outerType + ".first: Pair required for computation input"))4344 }4345 var m = runWith(x.fst())4346 if(!isSameType(Monad, m)) {4347 throw new TypeError((outerType + ".first: Computation must return a type of " + innerType))4348 }4349 return m.map(function (l) { return Pair(l, x.snd()); })4350 })4351 }4352 function second() {4353 return Star(function(x) {4354 if(!isSameType(Pair, x)) {4355 throw TypeError((outerType + ".second: Pair required for computation input"))4356 }4357 var m = runWith(x.snd())4358 if(!isSameType(Monad, m)) {4359 throw new TypeError((outerType + ".second: Computation must return a type of " + innerType))4360 }4361 return m.map(function (r) { return Pair(x.fst(), r); })4362 })4363 }4364 function both() {4365 return Star(function(x) {4366 if(!isSameType(Pair, x)) {4367 throw TypeError((outerType + ".both: Pair required for computation input"))4368 }4369 var p = x.bimap(runWith, runWith)4370 var m = p.fst()4371 if(!isSameType(Monad, m)) {4372 throw new TypeError((outerType + ".both: Computation must return a type of " + innerType))4373 }4374 return sequence(m.of, merge(function (x, y) { return [ x, y ]; }, p)).map(function (x) { return Pair(x[0], x[1]); })4375 })4376 }4377 return ( obj = {4378 inspect: inspect, toString: inspect, type: type,4379 runWith: runWith, id: id, first: first, second: second, both: both,4380 compose: compose('compose'),4381 contramap: contramap('contramap'),4382 map: map('map'),4383 promap: promap('promap')4384 }, obj[fl.id] = id, obj[fl.compose] = compose(fl.compose), obj[fl.contramap] = contramap(fl.contramap), obj[fl.map] = map(fl.map), obj[fl.promap] = promap(fl.promap), obj['@@type'] = typeString, obj.constructor = Star, obj )4385 }4386 Star.id = _id4387 Star.type = type4388 Star[fl.id] = _id4389 Star['@@type'] = typeString4390 Star['@@implements'] = _implements(4391 [ 'compose', 'contramap', 'id', 'map', 'promap' ]4392 )4393 return Star4394}4395module.exports = _Star4396/***/ }),4397/* 139 */4398/***/ (function(module, exports, __webpack_require__) {4399/** @license ISC License (c) copyright 2016 original and current authors */4400/** @author Ian Hofmann-Hicks (evil) */4401var VERSION = 24402var _implements = __webpack_require__(112)4403var _inspect = __webpack_require__(113)4404var type = __webpack_require__(17).type('State')4405var _type = __webpack_require__(17).typeFn(type(), VERSION)4406var fl = __webpack_require__(34)4407var Pair = __webpack_require__(132)4408var Unit = __webpack_require__(140)4409var isFunction = __webpack_require__(4)4410var isSameType = __webpack_require__(18)4411var _of =4412 function (x) { return State(function (s) { return Pair(x, s); }); }4413function get(fn) {4414 if(!arguments.length) {4415 return State(function (s) { return Pair(s, s); })4416 }4417 if(isFunction(fn)) {4418 return State(function (s) { return Pair(fn(s), s); })4419 }4420 throw new TypeError('State.get: No arguments or function required')4421}4422function modify(fn) {4423 if(!isFunction(fn)) {4424 throw new TypeError('State.modify: Function Required')4425 }4426 return State(function (s) { return Pair(Unit(), fn(s)); })4427}4428function State(fn) {4429 var obj;4430 if(!isFunction(fn)) {4431 throw new TypeError('State: Must wrap a function in the form (s -> Pair a s)')4432 }4433 var of =4434 _of4435 var inspect =4436 function () { return ("State" + (_inspect(fn))); }4437 function runWith(state) {4438 var params = [], len = arguments.length - 1;4439 while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];4440 var func = params[0]; if ( func === void 0 ) func = 'runWith';4441 var m = fn(state)4442 if(!isSameType(Pair, m)) {4443 throw new TypeError(("State." + func + ": Must wrap a function in the form (s -> Pair a s)"))4444 }4445 return m4446 }4447 function execWith(s) {4448 var pair = runWith(s, 'execWith')4449 return pair.snd()4450 }4451 function evalWith(s) {4452 var pair = runWith(s, 'evalWith')4453 return pair.fst()4454 }4455 function map(method) {4456 return function(fn) {4457 if(!isFunction(fn)) {4458 throw new TypeError(("State." + method + ": Function required"))4459 }4460 return State(function (s) {4461 var m = runWith(s, method)4462 return Pair(fn(m.fst()), m.snd())4463 })4464 }4465 }4466 function ap(m) {4467 if(!isSameType(State, m)) {4468 throw new TypeError('State.ap: State required')4469 }4470 return State(function (s) {4471 var pair = runWith(s, 'ap')4472 var fn = pair.fst()4473 if(!isFunction(fn)) {4474 throw new TypeError('State.ap: Source value must be a function')4475 }4476 return m.map(fn).runWith(pair.snd())4477 })4478 }4479 function chain(method) {4480 return function(fn) {4481 if(!isFunction(fn)) {4482 throw new TypeError(("State." + method + ": State returning function required"))4483 }4484 return State(function (s) {4485 var pair = runWith(s, method)4486 var m = fn(pair.fst())4487 if(!isSameType(State, m)) {4488 throw new TypeError(("State." + method + ": Function must return another State"))4489 }4490 return m.runWith(pair.snd())4491 })4492 }4493 }4494 return ( obj = {4495 inspect: inspect, toString: inspect, runWith: runWith,4496 execWith: execWith, evalWith: evalWith, type: type, ap: ap, of: of,4497 map: map('map'),4498 chain: chain('chain')4499 }, obj[fl.of] = of, obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = State, obj )4500}4501State.of = _of4502State.get = get4503State.modify = modify4504State.put =4505 function (x) { return modify(function () { return x; }); }4506State.type = type4507State[fl.of] = _of4508State['@@type'] = _type4509State['@@implements'] = _implements(4510 [ 'ap', 'chain', 'map', 'of' ]4511)4512module.exports = State4513/***/ }),4514/* 140 */4515/***/ (function(module, exports, __webpack_require__) {4516/** @license ISC License (c) copyright 2016 original and current authors */4517/** @author Ian Hofmann-Hicks (evil) */4518var VERSION = 24519var _implements = __webpack_require__(112)4520var type = __webpack_require__(17).type('Unit')4521var _type = __webpack_require__(17).typeFn(type(), VERSION)4522var fl = __webpack_require__(34)4523var isFunction = __webpack_require__(4)4524var isSameType = __webpack_require__(18)4525var _of =4526 Unit4527var _empty =4528 Unit4529function Unit() {4530 var obj;4531 var equals =4532 function (m) { return isSameType(Unit, m); }4533 var inspect =4534 function () { return '()'; }4535 var valueOf =4536 function () { return undefined; }4537 var of =4538 _of4539 var empty =4540 _empty4541 function concat(method) {4542 return function(m) {4543 if(!isSameType(Unit, m)) {4544 throw new TypeError(("Unit." + method + ": Unit required"))4545 }4546 return Unit()4547 }4548 }4549 function map(method) {4550 return function(fn) {4551 if(!isFunction(fn)) {4552 throw new TypeError(("Unit." + method + ": Function required"))4553 }4554 return Unit()4555 }4556 }4557 function ap(m) {4558 if(!isSameType(Unit, m)) {4559 throw new TypeError('Unit.ap: Unit required')4560 }4561 return Unit()4562 }4563 function chain(method) {4564 return function(fn) {4565 if(!isFunction(fn)) {4566 throw new TypeError(("Unit." + method + ": Function required"))4567 }4568 return Unit()4569 }4570 }4571 return ( obj = {4572 inspect: inspect, toString: inspect, valueOf: valueOf,4573 type: type, equals: equals, empty: empty, ap: ap, of: of,4574 concat: concat('concat'),4575 map: map('map'),4576 chain: chain('chain')4577 }, obj[fl.of] = of, obj[fl.empty] = empty, obj[fl.equals] = equals, obj[fl.concat] = concat(fl.concat), obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = _type, obj.constructor = Unit, obj )4578}4579Unit.of = _of4580Unit.empty = _empty4581Unit.type = type4582Unit[fl.of] = _of4583Unit[fl.empty] = _empty4584Unit['@@type'] = _type4585Unit['@@implements'] = _implements(4586 [ 'ap', 'chain', 'concat', 'empty', 'equals', 'map', 'of' ]4587)4588module.exports = Unit4589/***/ }),4590/* 141 */4591/***/ (function(module, exports, __webpack_require__) {4592/** @license ISC License (c) copyright 2018 original and current authors */4593/** @author Karthik Iyengar (karthikiyengar) */4594var VERSION = 14595var _implements = __webpack_require__(112)4596var _equals = __webpack_require__(37)4597var _inspect = __webpack_require__(113)4598var _type = __webpack_require__(17).type('Tuple')4599var typeFn = __webpack_require__(17).typeFn4600var fl = __webpack_require__(34)4601var isFunction = __webpack_require__(4)4602var isInteger = __webpack_require__(39)4603var isSameType = __webpack_require__(18)4604var isSemigroup = __webpack_require__(35)4605var constant = function (x) { return function () { return x; }; }4606function _Tuple(n) {4607 if (!(isInteger(n) && n >= 1)) {4608 throw new TypeError('Tuple: First argument must be an integer')4609 }4610 var tupleLength = constant(n)4611 var type =4612 constant(_type(n))4613 var typeString =4614 typeFn('Tuple', VERSION, n)4615 var withProps = function (fn) {4616 fn.type = type4617 fn.tupleLength = tupleLength4618 fn['@@type'] = typeString4619 fn['@@implements'] = _implements([ 'map', 'concat', 'equals' ])4620 return fn4621 }4622 var withLength = function (n, fn) {4623 return Object.defineProperty(fn, 'length', {4624 value: n4625 })4626 }4627 /* eslint-disable no-unused-vars */4628 switch (n) {4629 case 1: return withProps(function(a) { return Tuple(n, arguments) })4630 case 2: return withProps(function(a, b) { return Tuple(n, arguments) })4631 case 3: return withProps(function(a, b, c) { return Tuple(n, arguments) })4632 case 4: return withProps(function(a, b, c, d) { return Tuple(n, arguments) })4633 case 5: return withProps(function(a, b, c, d, e) { return Tuple(n, arguments) })4634 case 6: return withProps(function(a, b, c, d, e, f) { return Tuple(n, arguments) })4635 case 7: return withProps(function(a, b, c, d, e, f, g) { return Tuple(n, arguments) })4636 case 8: return withProps(function(a, b, c, d, e, f, g, h) { return Tuple(n, arguments) })4637 case 9: return withProps(function(a, b, c, d, e, f, g, h, i) { return Tuple(n, arguments) })4638 case 10: return withProps(function(a, b, c, d, e, f, g, h, i, j) { return Tuple(n, arguments) })4639 default: return withLength(n, withProps(function() {4640 var parts = [], len = arguments.length;4641 while ( len-- ) parts[ len ] = arguments[ len ];4642 return Tuple(n, parts) }))4643 }4644 /* eslint-enable no-unused-vars */4645 function Tuple(n, args) {4646 var obj;4647 var parts = [].slice.call(args)4648 if (n !== parts.length) {4649 throw new TypeError(4650 (n + "-Tuple: Expected " + n + " values, but got " + (parts.length))4651 )4652 }4653 var inspect = function () { return (n + "-Tuple(" + (parts.map(_inspect).join(',')) + " )"); }4654 function map(method) {4655 return function(fn) {4656 if (!isFunction(fn)) {4657 throw new TypeError((n + "-Tuple." + method + ": Function required"))4658 }4659 return Tuple(n, parts4660 .slice(0, parts.length - 1)4661 .concat(fn(parts[parts.length - 1]))4662 )4663 }4664 }4665 var equals = function (m) { return isSameType({ type: type }, m)4666 && _equals(parts, m.toArray()); }4667 function concat(method) {4668 return function(t) {4669 if (!isSameType({ type: type }, t)) {4670 throw new TypeError((n + "-Tuple." + method + ": Tuple of the same length required"))4671 }4672 var a = t.toArray()4673 return Tuple(n, parts.map(function (v, i, o) {4674 if (!(isSemigroup(a[i]) && isSemigroup(o[i]))) {4675 throw new TypeError(4676 (n + "-Tuple." + method + ": Both Tuples must contain Semigroups of the same type")4677 )4678 }4679 if (!isSameType(a[i], o[i])) {4680 throw new TypeError(4681 (n + "-Tuple." + method + ": Both Tuples must contain Semigroups of the same type")4682 )4683 }4684 return o[i].concat(a[i])4685 }))4686 }4687 }4688 function merge(fn) {4689 if (!isFunction(fn)) {4690 throw new TypeError((n + "-Tuple.merge: Function required"))4691 }4692 return fn.apply(void 0, parts)4693 }4694 function mapAll() {4695 var args = [], len = arguments.length;4696 while ( len-- ) args[ len ] = arguments[ len ];4697 if (args.length !== parts.length) {4698 throw new TypeError(4699 (n + "-Tuple.mapAll: Requires " + (parts.length) + " functions")4700 )4701 }4702 return Tuple(4703 n,4704 parts.map(function (v, i) {4705 if (!isFunction(args[i])) {4706 throw new TypeError(4707 (n + "-Tuple.mapAll: Functions required for all arguments")4708 )4709 }4710 return args[i](v)4711 })4712 )4713 }4714 function project(index) {4715 if (!isInteger(index) || index < 1 || index > n) {4716 throw new TypeError(4717 (n + "-Tuple.project: Index should be an integer between 1 and " + n)4718 )4719 }4720 return parts[index - 1]4721 }4722 function toArray() {4723 return parts.slice()4724 }4725 return ( obj = {4726 inspect: inspect, toString: inspect, merge: merge,4727 project: project, mapAll: mapAll, toArray: toArray,4728 tupleLength: tupleLength, type: type, equals: equals,4729 map: map('map'),4730 concat: concat('concat')4731 }, obj[fl.map] = map(fl.map), obj[fl.concat] = concat(fl.concat), obj[fl.equals] = equals, obj['@@type'] = typeString, obj.constructor = Tuple, obj )4732 }4733}4734module.exports = _Tuple4735/***/ }),4736/* 142 */4737/***/ (function(module, exports, __webpack_require__) {4738/** @license ISC License (c) copyright 2016 original and current authors */4739/** @author Ian Hofmann-Hicks (evil) */4740module.exports =4741 __webpack_require__(140)4742/***/ }),4743/* 143 */4744/***/ (function(module, exports, __webpack_require__) {4745/** @license ISC License (c) copyright 2016 original and current authors */4746/** @author Ian Hofmann-Hicks (evil) */4747var VERSION = 24748var _equals = __webpack_require__(37)4749var _implements = __webpack_require__(112)4750var _inspect = __webpack_require__(113)4751var __type = __webpack_require__(17).type('Writer')()4752var _typeString = __webpack_require__(17).typeFn(__type, VERSION)4753var fl = __webpack_require__(34)4754var Pair = __webpack_require__(132)4755var isFunction = __webpack_require__(4)4756var isMonoid = __webpack_require__(32)4757var isSameType = __webpack_require__(18)4758var constant = function (x) { return function () { return x; }; }4759function _Writer(Monoid) {4760 if(!isMonoid(Monoid)) {4761 throw new TypeError('Writer: Monoid required for construction')4762 }4763 var _of =4764 function (x) { return Writer(Monoid.empty().valueOf(), x); }4765 var _type =4766 constant((__type + "( " + (Monoid.type()) + " )"))4767 var typeString =4768 _typeString + "( " + (Monoid['@@type']) + " )"4769 function Writer(entry, val) {4770 var obj;4771 if(arguments.length !== 2) {4772 throw new TypeError('Writer: Log entry and a value required')4773 }4774 var type =4775 _type4776 var of =4777 _of4778 var equals =4779 function (m) { return isSameType(Writer, m)4780 && _equals(m.valueOf(), val); }4781 var valueOf =4782 constant(val)4783 var log =4784 constant(Monoid(entry))4785 var inspect =4786 constant(("Writer(" + (_inspect(log())) + (_inspect(valueOf())) + " )"))4787 var read = function () { return Pair(log(), val); }4788 function map(method) {4789 return function(fn) {4790 if(!isFunction(fn)) {4791 throw new TypeError(("Writer." + method + ": Function required"))4792 }4793 return Writer(log().valueOf(), fn(valueOf()))4794 }4795 }4796 function ap(m) {4797 if(!isFunction(val)) {4798 throw new TypeError('Writer.ap: Wrapped value must be a function')4799 }4800 if(!isSameType(Writer, m)) {4801 throw new TypeError('Writer.ap: Writer required')4802 }4803 return Writer(4804 log().concat(m.log()).valueOf(),4805 val(m.valueOf())4806 )4807 }4808 function chain(method) {4809 return function(fn) {4810 if(!isFunction(fn)) {4811 throw new TypeError(("Writer." + method + ": Function required"))4812 }4813 var w = fn(valueOf())4814 if(!isSameType(Writer, w)) {4815 throw new TypeError(("Writer." + method + ": Function must return a Writer"))4816 }4817 return Writer(log().concat(w.log()).valueOf(), w.valueOf())4818 }4819 }4820 return ( obj = {4821 inspect: inspect, toString: inspect, read: read,4822 valueOf: valueOf, log: log, type: type, equals: equals,4823 ap: ap, of: of,4824 chain: chain('chain'),4825 map: map('map')4826 }, obj[fl.of] = of, obj[fl.equals] = equals, obj[fl.map] = map(fl.map), obj[fl.chain] = chain(fl.chain), obj['@@type'] = typeString, obj.constructor = Writer, obj )4827 }4828 Writer.of = _of4829 Writer.type = _type4830 Writer[fl.of] = _of4831 Writer['@@type'] = typeString4832 Writer['@@implements'] = _implements(4833 [ 'ap', 'chain', 'equals', 'map', 'of' ]4834 )4835 return Writer4836}4837module.exports = _Writer4838/***/ }),4839/* 144 */4840/***/ (function(module, exports, __webpack_require__) {4841module.exports = {4842 assign: __webpack_require__(145),4843 assoc: __webpack_require__(147),4844 binary: __webpack_require__(149),4845 compose: __webpack_require__(151),4846 composeK: __webpack_require__(152),4847 composeP: __webpack_require__(153),4848 composeS: __webpack_require__(154),4849 curry: __webpack_require__(155),4850 defaultProps: __webpack_require__(156),4851 defaultTo: __webpack_require__(157),4852 dissoc: __webpack_require__(158),4853 fromPairs: __webpack_require__(160),4854 getPathOr: __webpack_require__(161),4855 liftA2: __webpack_require__(162),4856 liftA3: __webpack_require__(163),4857 liftN: __webpack_require__(164),4858 getPropOr: __webpack_require__(165),4859 mapProps: __webpack_require__(166),4860 mapReduce: __webpack_require__(167),4861 mconcat: __webpack_require__(168),4862 mconcatMap: __webpack_require__(170),4863 mreduce: __webpack_require__(171),4864 mreduceMap: __webpack_require__(172),4865 nAry: __webpack_require__(173),4866 objOf: __webpack_require__(174),4867 omit: __webpack_require__(175),4868 once: __webpack_require__(176),4869 partial: __webpack_require__(177),4870 pick: __webpack_require__(178),4871 pipe: __webpack_require__(179),4872 pipeK: __webpack_require__(180),4873 pipeP: __webpack_require__(181),4874 pipeS: __webpack_require__(182),4875 propOr: __webpack_require__(183),4876 propPathOr: __webpack_require__(184),4877 setPath: __webpack_require__(185),4878 setProp: __webpack_require__(148),4879 tap: __webpack_require__(186),4880 unary: __webpack_require__(187),4881 unit: __webpack_require__(188),4882 unsetPath: __webpack_require__(189),4883 unsetProp: __webpack_require__(159)4884}4885/***/ }),4886/* 145 */4887/***/ (function(module, exports, __webpack_require__) {4888/** @license ISC License (c) copyright 2017 original and current authors */4889/** @author Ian Hofmann-Hicks (evil) */4890var curry = __webpack_require__(3)4891var isObject = __webpack_require__(31)4892var object = __webpack_require__(146)4893// assign : Object -> Object -> Object4894function assign(x, m) {4895 if(!(isObject(x) && isObject(m))) {4896 throw new TypeError('assign: Objects required for both arguments')4897 }4898 return object.assign(x, m)4899}4900module.exports = curry(assign)4901/***/ }),4902/* 146 */4903/***/ (function(module, exports) {4904/** @license ISC License (c) copyright 2017 original and current authors */4905/** @author Ian Hofmann-Hicks (evil) */4906function rejectUnit(obj) {4907 return function(acc, key) {4908 var value = obj[key]4909 if(value !== undefined) {4910 acc[key] = value4911 }4912 return acc4913 }4914}4915function assign(x, m) {4916 var result = Object.keys(m).reduce(rejectUnit(m), {})4917 return Object.keys(x).reduce(rejectUnit(x), result)4918}4919function filter(f, m) {4920 return Object.keys(m).reduce(function (acc, key) {4921 if(f(m[key])) {4922 acc[key] = m[key]4923 }4924 return acc4925 }, {})4926}4927function map(f, m) {4928 return Object.keys(m).reduce(function (acc, key) {4929 acc[key] = f(m[key])4930 return acc4931 }, {})4932}4933function set(key, val, m) {4934 var obj;4935 return assign(( obj = {}, obj[key] = val, obj ), m)4936}4937function unset(key, m) {4938 return Object.keys(m).reduce(function (acc, k) {4939 if(m[k] !== undefined && k !== key) {4940 acc[k] = m[k]4941 }4942 return acc4943 }, {})4944}4945module.exports = {4946 assign: assign, filter: filter,4947 map: map, set: set, unset: unset4948}4949/***/ }),4950/* 147 */4951/***/ (function(module, exports, __webpack_require__) {4952/** @license ISC License (c) copyright 2017 original and current authors */4953/** @author Ian Hofmann-Hicks (evil) */4954var setProp = __webpack_require__(148)4955module.exports =4956 setProp.origFn('assoc')4957/***/ }),4958/* 148 */4959/***/ (function(module, exports, __webpack_require__) {4960/** @license ISC License (c) copyright 2018 original and current authors */4961/** @author Ian Hofmann-Hicks (evil) */4962var curry = __webpack_require__(3)4963var isArray = __webpack_require__(45)4964var isInteger = __webpack_require__(39)4965var isObject = __webpack_require__(31)4966var isString = __webpack_require__(36)4967var array = __webpack_require__(115)4968var object = __webpack_require__(146)4969function fn(name) {4970 function setProp(key, val, x) {4971 if(isObject(x)) {4972 if(isString(key)) {4973 return object.set(key, val, x)4974 }4975 throw new TypeError(4976 (name + ": String required for first argument when third argument is an Object")4977 )4978 }4979 if(isArray(x)) {4980 if(isInteger(key) && key >= 0) {4981 return array.set(key, val, x)4982 }4983 throw new TypeError(4984 (name + ": Positive Integer required for first argument when third argument is an Array")4985 )4986 }4987 throw new TypeError(4988 (name + ": Object or Array required for third argument")4989 )4990 }4991 return curry(setProp)4992}4993// setProp :: (String | Integer) -> a -> (Object | Array) -> (Object | Array)4994var setProp =4995 fn('setProp')4996setProp.origFn =4997 fn4998module.exports = setProp4999/***/ }),5000/* 149 */5001/***/ (function(module, exports, __webpack_require__) {5002/** @license ISC License (c) copyright 2017 original and current authors */5003/** @author Ian Hofmann-Hicks (evil) */5004var curryN = __webpack_require__(150)5005var isFunction = __webpack_require__(4)5006// binary : (* -> c) -> a -> b -> c5007function binary(fn) {5008 if(!isFunction(fn)) {5009 throw new TypeError('binary: Function required')5010 }5011 return curryN(2, fn)5012}5013module.exports = binary5014/***/ }),5015/* 150 */5016/***/ (function(module, exports) {5017/** @license ISC License (c) copyright 2017 original and current authors */5018/** @author Ian Hofmann-Hicks (evil) */5019function curryN(n, fn) {5020 return function() {5021 var xs = [], len = arguments.length;5022 while ( len-- ) xs[ len ] = arguments[ len ];5023 var args =5024 xs.length ? xs : [ undefined ]5025 var remaining =5026 Math.floor(n) - args.length5027 return remaining > 05028 ? curryN(remaining, Function.bind.apply(fn, [ null ].concat(args)))5029 : fn.apply(null, args.slice(0, n))5030 }5031}5032module.exports = curryN5033/***/ }),5034/* 151 */5035/***/ (function(module, exports, __webpack_require__) {5036/** @license ISC License (c) copyright 2016 original and current authors */5037/** @author Ian Hofmann-Hicks (evil) */5038var isFunction = __webpack_require__(4)5039var err = 'compose: Functions required'5040function applyPipe(f, g) {5041 if(!isFunction(g)) {5042 throw new TypeError(err)5043 }5044 return function () {5045 var args = [], len = arguments.length;5046 while ( len-- ) args[ len ] = arguments[ len ];5047 return g.call(null, f.apply(null, args));5048 }5049}5050// compose : ((y -> z), (x -> y), ..., (a -> b)) -> a -> z5051function compose() {5052 var args = [], len = arguments.length;5053 while ( len-- ) args[ len ] = arguments[ len ];5054 if(!arguments.length) {5055 throw new TypeError(err)5056 }5057 var fns =5058 args.slice().reverse()5059 var head =5060 fns[0]5061 if(!isFunction(head)) {5062 throw new TypeError(err)5063 }5064 var tail =5065 fns.slice(1).concat(function (x) { return x; })5066 return tail.reduce(applyPipe, head)5067}5068module.exports = compose5069/***/ }),5070/* 152 */5071/***/ (function(module, exports, __webpack_require__) {5072/** @license ISC License (c) copyright 2017 original and current authors */5073/** @author Ian Hofmann-Hicks (evil) */5074var isChain = __webpack_require__(64)5075var isFunction = __webpack_require__(4)5076var err = 'composeK: Chain returning functions of the same type required'5077// composeK : Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> a -> m z5078function composeK() {5079 var args = [], len = arguments.length;5080 while ( len-- ) args[ len ] = arguments[ len ];5081 if(!arguments.length) {5082 throw new TypeError(err)5083 }5084 var fns =5085 args.slice().reverse()5086 var head =5087 fns[0]5088 if(!isFunction(head)) {5089 throw new TypeError(err)5090 }5091 if(fns.length === 1) {5092 return head5093 }5094 var tail = fns.slice(1).reduce(function (comp, fn) {5095 if(!isFunction(fn)) {5096 throw new TypeError(err)5097 }5098 return function(m) {5099 if(!isChain(m)) {5100 throw new TypeError(err)5101 }5102 return comp(m).chain(fn)5103 }5104 }, function (x) { return x; })5105 return function() {5106 return tail(head.apply(null, arguments))5107 }5108}5109module.exports = composeK5110/***/ }),5111/* 153 */5112/***/ (function(module, exports, __webpack_require__) {5113/** @license ISC License (c) copyright 2017 original and current authors */5114/** @author Ian Hofmann-Hicks (evil) */5115var isFunction = __webpack_require__(4)5116var isPromise = __webpack_require__(93)5117var err = 'composeP: Promise returning functions required'5118function applyPipe(f, g) {5119 if(!isFunction(g)) {5120 throw new TypeError(err)5121 }5122 return function() {5123 var p = f.apply(null, arguments)5124 if(!isPromise(p)) {5125 throw new TypeError(err)5126 }5127 return p.then(g)5128 }5129}5130function composeP() {5131 var args = [], len = arguments.length;5132 while ( len-- ) args[ len ] = arguments[ len ];5133 if(!arguments.length) {5134 throw new TypeError(err)5135 }5136 var fns =5137 args.reverse()5138 var head =5139 fns[0]5140 if(!isFunction(head)) {5141 throw new TypeError(err)5142 }5143 var tail =5144 fns.slice(1).concat(function (x) { return x; })5145 return tail.reduce(applyPipe, head)5146}5147module.exports = composeP5148/***/ }),5149/* 154 */5150/***/ (function(module, exports, __webpack_require__) {5151/** @license ISC License (c) copyright 2017 original and current authors */5152/** @author Ian Hofmann-Hicks (evil) */5153var isSameType = __webpack_require__(18)5154var isSemigroupoid = __webpack_require__(62)5155var err = 'composeS: Semigroupoids of the same type required'5156// composeS : Semigroupoid s => (s y z, s x y, ..., s a b) -> s a z5157function composeS() {5158 var args = [], len = arguments.length;5159 while ( len-- ) args[ len ] = arguments[ len ];5160 if(!arguments.length) {5161 throw new TypeError(err)5162 }5163 var ms =5164 args.slice().reverse()5165 var head =5166 ms[0]5167 if(!isSemigroupoid(head)) {5168 throw new TypeError(err)5169 }5170 if(ms.length === 1) {5171 return head5172 }5173 return ms.slice().reduce(function (comp, m) {5174 if(!isSameType(comp, m)) {5175 throw new TypeError(err)5176 }5177 return comp.compose(m)5178 })5179}5180module.exports = composeS5181/***/ }),5182/* 155 */5183/***/ (function(module, exports, __webpack_require__) {5184/** @license ISC License (c) copyright 2016 original and current authors */5185/** @author Ian Hofmann-Hicks (evil) */5186var _curry = __webpack_require__(3)5187var isFunction = __webpack_require__(4)5188// curry : ((a, b, c) -> d) -> a -> b -> c -> d5189function curry(fn) {5190 if(!isFunction(fn)) {5191 throw new TypeError('curry: Function required')5192 }5193 return _curry(fn)5194}5195module.exports = curry5196/***/ }),5197/* 156 */5198/***/ (function(module, exports, __webpack_require__) {5199/** @license ISC License (c) copyright 2017 original and current authors */5200/** @author Ian Hofmann-Hicks (evil) */5201var curry = __webpack_require__(3)5202var isObject = __webpack_require__(31)5203var object = __webpack_require__(146)5204// defaultProps : Object -> Object -> Object5205function defaultProps(x, m) {5206 if(!isObject(x) || !isObject(m)) {5207 throw new TypeError('defaultProps: Objects required for both arguments')5208 }5209 return object.assign(m, x)5210}5211module.exports = curry(defaultProps)5212/***/ }),5213/* 157 */5214/***/ (function(module, exports, __webpack_require__) {5215/** @license ISC License (c) copyright 2017 original and current authors */5216/** @author Ian Hofmann-Hicks (evil) */5217var curry = __webpack_require__(3)5218var isNil = __webpack_require__(41)5219// defaultTo : a -> b -> (a | b)5220function defaultTo(def, val) {5221 return isNil(val) ? def : val5222}5223module.exports = curry(defaultTo)5224/***/ }),5225/* 158 */5226/***/ (function(module, exports, __webpack_require__) {5227/** @license ISC License (c) copyright 2017 original and current authors */5228/** @author Ian Hofmann-Hicks (evil) */5229var unsetProp = __webpack_require__(159)5230module.exports =5231 unsetProp.origFn('dissoc')5232/***/ }),5233/* 159 */5234/***/ (function(module, exports, __webpack_require__) {5235/** @license ISC License (c) copyright 2019 original and current authors */5236/** @author Ian Hofmann-Hicks (evil) */5237var curry = __webpack_require__(3)5238var isArray = __webpack_require__(45)5239var isEmpty = __webpack_require__(30)5240var isInteger = __webpack_require__(39)5241var isObject = __webpack_require__(31)5242var isString = __webpack_require__(36)5243var array = __webpack_require__(115)5244var object = __webpack_require__(146)5245function fn(name) {5246 function unsetProp(key, obj) {5247 if(!(isObject(obj) || isArray(obj))) {5248 return obj5249 }5250 if(!(isString(key) && !isEmpty(key) || isInteger(key) && key >= 0)) {5251 throw new TypeError(5252 (name + ": Non-empty String required or Positive Integer required for first argument")5253 )5254 }5255 if(isObject(obj)) {5256 if(isString(key) && !isEmpty(key)) {5257 return object.unset(key, obj)5258 }5259 }5260 if(isArray(obj)) {5261 if(isInteger(key) && key >= 0) {5262 return array.unset(key, obj)5263 }5264 }5265 return obj5266 }5267 return curry(unsetProp)5268}5269var unsetProp =5270 fn('unsetProp')5271unsetProp.origFn =5272 fn5273module.exports =5274 unsetProp5275/***/ }),5276/* 160 */5277/***/ (function(module, exports, __webpack_require__) {5278/** @license ISC License (c) copyright 2017 original and current authors */5279/** @author Ian Hofmann-Hicks (evil) */5280var Pair = __webpack_require__(17).proxy('Pair')5281var isFoldable = __webpack_require__(43)5282var isSameType = __webpack_require__(18)5283var isString = __webpack_require__(36)5284function foldPairs(acc, pair) {5285 var obj;5286 if(!isSameType(Pair, pair)) {5287 throw new TypeError('fromPairs: Foldable of Pairs required for argument')5288 }5289 var key = pair.fst()5290 var value = pair.snd()5291 if(!isString(key)) {5292 throw new TypeError('fromPairs: String required for fst of every Pair')5293 }5294 return value !== undefined5295 ? Object.assign(acc, ( obj = {}, obj[key] = value, obj ))5296 : acc5297}5298// fromPairs : Foldable f => f (Pair String a) -> Object5299function fromPairs(xs) {5300 if(!isFoldable(xs)) {5301 throw new TypeError('fromPairs: Foldable of Pairs required for argument')5302 }5303 return xs.reduce(foldPairs, {})5304}5305module.exports = fromPairs5306/***/ }),5307/* 161 */5308/***/ (function(module, exports, __webpack_require__) {5309/** @license ISC License (c) copyright 2019 original and current authors */5310/** @author Ian Hofmann-Hicks */5311var curry = __webpack_require__(3)5312var isArray = __webpack_require__(45)5313var isDefined = __webpack_require__(29)5314var isEmpty = __webpack_require__(30)5315var isInteger = __webpack_require__(39)5316var isNil = __webpack_require__(41)5317var isString = __webpack_require__(36)5318var errFn = function (name) { return (name + ": Array of Non-empty Strings or Integers required for second argument"); }5319function fn(name) {5320 function getPathOr(def, keys, target) {5321 if(!isArray(keys)) {5322 throw new TypeError(errFn(name))5323 }5324 if(isNil(target)) {5325 return def5326 }5327 var value = target5328 for(var i = 0; i < keys.length; i++) {5329 var key = keys[i]5330 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {5331 throw new TypeError(errFn(name))5332 }5333 if(isNil(value)) {5334 return def5335 }5336 value = value[key]5337 if(!isDefined(value)) {5338 return def5339 }5340 }5341 return value5342 }5343 return curry(getPathOr)5344}5345// getPathOr :: a -> [ String | Integer ] -> b -> c5346var getPathOr =5347 fn('getPathOr')5348getPathOr.origFn =5349 fn5350module.exports =5351 getPathOr5352/***/ }),5353/* 162 */5354/***/ (function(module, exports, __webpack_require__) {5355/** @license ISC License (c) copyright 2016 original and current authors */5356/** @author Ian Hofmann-Hicks (evil) */5357var array = __webpack_require__(115)5358var curry = __webpack_require__(3)5359var isApply = __webpack_require__(51)5360var isArray = __webpack_require__(45)5361var isFunction = __webpack_require__(4)5362var isSameType = __webpack_require__(18)5363var map = array.map5364var ap = array.ap5365// liftA2 :: Applicative m => (a -> b -> c) -> m a -> m b -> m c5366function liftA2(fn, x, y) {5367 if(!isFunction(fn)) {5368 throw new TypeError('liftA2: Function required for first argument')5369 }5370 if(!((isApply(x) || isArray(x)) && isSameType(x, y))) {5371 throw new TypeError('liftA2: Applys of same type required for last two arguments')5372 }5373 if(isArray(x)) {5374 return ap(y, map(fn, x))5375 }5376 return x.map(fn).ap(y)5377}5378module.exports = curry(liftA2)5379/***/ }),5380/* 163 */5381/***/ (function(module, exports, __webpack_require__) {5382/** @license ISC License (c) copyright 2016 original and current authors */5383/** @author Ian Hofmann-Hicks (evil) */5384var array = __webpack_require__(115)5385var curry = __webpack_require__(3)5386var isApply = __webpack_require__(51)5387var isArray = __webpack_require__(45)5388var isFunction = __webpack_require__(4)5389var isSameType = __webpack_require__(18)5390var map = array.map5391var ap = array.ap5392// liftA3 :: Applicative m => (a -> b -> c -> d) -> m a -> m b -> m c -> m d5393function liftA3(fn, x, y, z) {5394 if(!isFunction(fn)) {5395 throw new TypeError('liftA3: Function required for first argument')5396 }5397 else if(!((isApply(x) || isArray(x)) && isSameType(x, y) && isSameType(x, z))) {5398 throw new TypeError('liftA3: Applys of same type required for last three arguments')5399 }5400 if(isArray(x)) {5401 return ap(z, ap(y, map(fn, x)))5402 }5403 return x.map(fn).ap(y).ap(z)5404}5405module.exports = curry(liftA3)5406/***/ }),5407/* 164 */5408/***/ (function(module, exports, __webpack_require__) {5409/** @license ISC License (c) copyright 2017 original and current authors */5410/** @author Ian Hofmann-Hicks (evil) */5411var array = __webpack_require__(115)5412var curry = __webpack_require__(3)5413var curryN = __webpack_require__(150)5414var isApply = __webpack_require__(51)5415var isArray = __webpack_require__(45)5416var isFunction = __webpack_require__(4)5417var isFunctor = __webpack_require__(48)5418var isInteger = __webpack_require__(39)5419var isSameType = __webpack_require__(18)5420var ap = array.ap5421var applyAp = function (x, y) {5422 if(!(isSameType(x, y) && (isArray(y) || isApply(y)))) {5423 throw new TypeError('liftN: Applys of same type are required')5424 }5425 if(isArray(x)) {5426 return ap(y, x)5427 }5428 return x.ap(y)5429}5430function liftN(n, fn) {5431 if(!isInteger(n)) {5432 throw new TypeError('liftN: Integer required for first argument')5433 }5434 if(!isFunction(fn)) {5435 throw new TypeError('liftN: Function required for second argument')5436 }5437 return curryN(n, function() {5438 var args = [], len = arguments.length;5439 while ( len-- ) args[ len ] = arguments[ len ];5440 if(!isFunctor(args[0])) {5441 throw new TypeError('liftN: Applys of same type are required')5442 }5443 return args.slice(1, n).reduce(5444 applyAp,5445 args[0].map(function (x) { return curryN(n, fn)(x); })5446 )5447 })5448}5449module.exports = curry(liftN)5450/***/ }),5451/* 165 */5452/***/ (function(module, exports, __webpack_require__) {5453/** @license ISC License (c) copyright 2019 original and current authors */5454/** @author Ian Hofmann-Hicks */5455var curry = __webpack_require__(3)5456var isDefined = __webpack_require__(29)5457var isEmpty = __webpack_require__(30)5458var isInteger = __webpack_require__(39)5459var isNil = __webpack_require__(41)5460var isString = __webpack_require__(36)5461function fn(name) {5462 function getPropOr(def, key, target) {5463 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {5464 throw new TypeError((name + ": Non-empty String or Integer required for second argument"))5465 }5466 if(isNil(target)) {5467 return def5468 }5469 var value = target[key]5470 return isDefined(value)5471 ? value5472 : def5473 }5474 return curry(getPropOr)5475}5476// getPropOr : a -> (String | Integer) -> b -> c5477var getPropOr =5478 fn('getPropOr')5479getPropOr.origFn =5480 fn5481module.exports = getPropOr5482/***/ }),5483/* 166 */5484/***/ (function(module, exports, __webpack_require__) {5485/** @license ISC License (c) copyright 2017 original and current authors */5486/** @author Ian Hofmann-Hicks (evil) */5487var curry = __webpack_require__(3)5488var isObject = __webpack_require__(31)5489var isFunction = __webpack_require__(4)5490var isNil = __webpack_require__(41)5491// applyMap :: ({ (* -> *) }, Object) -> (Object , String) -> Object5492var applyMap = function (fns, obj) { return function(acc, key) {5493 var obj$1, obj$2, obj$3;5494 if(isNil(fns[key])) {5495 return Object.assign({}, acc, ( obj$1 = {}, obj$1[key] = obj[key], obj$1 ))5496 }5497 if(isObject(fns[key])) {5498 return Object.assign({}, acc, ( obj$2 = {}, obj$2[key] = isObject(obj[key]) ? mapProps(fns[key], obj[key]) : obj[key], obj$2 ))5499 }5500 if(!isFunction(fns[key])) {5501 throw new TypeError('mapProps: Object of functions required for first argument')5502 }5503 return Object.assign({}, acc, ( obj$3 = {}, obj$3[key] = fns[key](obj[key]), obj$3 ))5504 }; }5505// mapProps :: { (* -> *) } -> Object -> Object5506function mapProps(fns, obj) {5507 if(!(isObject(fns) && isObject(obj))) {5508 throw new TypeError('mapProps: Objects required for both arguments')5509 }5510 return Object.keys(obj)5511 .reduce(applyMap(fns, obj), {})5512}5513module.exports = curry(mapProps)5514/***/ }),5515/* 167 */5516/***/ (function(module, exports, __webpack_require__) {5517/** @license ISC License (c) copyright 2017 original and current authors */5518/** @author Ian Hofmann-Hicks (evil) */5519var curry = __webpack_require__(3)5520var isFoldable = __webpack_require__(43)5521var isFunction = __webpack_require__(4)5522function mapReduce(mapFn, reduceFn, empty, xs) {5523 if(!isFunction(mapFn)) {5524 throw new TypeError('mapReduce: Unary mapping function required for first argument')5525 }5526 if(!isFunction(reduceFn)) {5527 throw new TypeError('mapReduce: Binary reduction function required for second argument')5528 }5529 if(!isFoldable(xs)) {5530 throw new TypeError('mapReduce: Foldable required for fourth argument')5531 }5532 return xs.reduce(5533 function (acc, x) { return reduceFn(acc, mapFn(x)); },5534 empty5535 )5536}5537module.exports = curry(mapReduce)5538/***/ }),5539/* 168 */5540/***/ (function(module, exports, __webpack_require__) {5541/** @license ISC License (c) copyright 2016 original and current authors */5542/** @author Ian Hofmann-Hicks (evil) */5543var curry = __webpack_require__(3)5544var isFoldable = __webpack_require__(43)5545var isMonoid = __webpack_require__(32)5546var mconcatMap = __webpack_require__(169)5547var identity = function (x) { return x; }5548// mconcat : Monoid m => m -> ([ a ] | List a) -> m a5549function mconcat(m, xs) {5550 if(!isMonoid(m)) {5551 throw new TypeError(5552 'mconcat: Monoid required for first argument'5553 )5554 }5555 if(!isFoldable(xs)) {5556 throw new TypeError(5557 'mconcat: Foldable required for second argument'5558 )5559 }5560 return mconcatMap(m, identity, xs)5561}5562module.exports = curry(mconcat)5563/***/ }),5564/* 169 */5565/***/ (function(module, exports, __webpack_require__) {5566/** @license ISC License (c) copyright 2016 original and current authors */5567/** @author Ian Hofmann-Hicks (evil) */5568var compose = __webpack_require__(7)5569var foldWith =5570 function (m) { return function (x, y) { return x.concat(m(y)); }; }5571// mconcatMap :: Monoid M => M -> (b -> a) -> ([ b ] | List b) -> M a5572function mconcatMap(M, f, xs) {5573 return xs.reduce(foldWith(compose(M, f)), M.empty())5574}5575module.exports = mconcatMap5576/***/ }),5577/* 170 */5578/***/ (function(module, exports, __webpack_require__) {5579/** @license ISC License (c) copyright 2016 original and current authors */5580/** @author Ian Hofmann-Hicks (evil) */5581var _mconcatMap = __webpack_require__(169)5582var curry = __webpack_require__(3)5583var isFoldable = __webpack_require__(43)5584var isFunction = __webpack_require__(4)5585var isMonoid = __webpack_require__(32)5586// mconcatMap : Monoid M => M -> (b -> a) -> ([ b ] | List b) -> M a5587function mconcatMap(m, f, xs) {5588 if(!isMonoid(m)) {5589 throw new TypeError(5590 'mconcatMap: Monoid required for first argument'5591 )5592 }5593 if(!isFunction(f)) {5594 throw new TypeError(5595 'mconcatMap: Function required for second argument'5596 )5597 }5598 if(!isFoldable(xs)) {5599 throw new TypeError(5600 'mconcatMap: Foldable required for third argument'5601 )5602 }5603 return _mconcatMap(m, f, xs)5604}5605module.exports = curry(mconcatMap)5606/***/ }),5607/* 171 */5608/***/ (function(module, exports, __webpack_require__) {5609/** @license ISC License (c) copyright 2016 original and current authors */5610/** @author Ian Hofmann-Hicks (evil) */5611var curry = __webpack_require__(3)5612var isFoldable = __webpack_require__(43)5613var isMonoid = __webpack_require__(32)5614var mconcatMap = __webpack_require__(169)5615var identity = function (x) { return x; }5616// mreduce : Monoid M => M -> ([ a ] | List a) -> a5617function mreduce(m, xs) {5618 if(!isMonoid(m)) {5619 throw new TypeError(5620 'mreduce: Monoid required for first argument'5621 )5622 }5623 if(!isFoldable(xs)) {5624 throw new TypeError(5625 'mreduce: Foldable required for second argument'5626 )5627 }5628 return mconcatMap(m, identity, xs).valueOf()5629}5630module.exports = curry(mreduce)5631/***/ }),5632/* 172 */5633/***/ (function(module, exports, __webpack_require__) {5634/** @license ISC License (c) copyright 2016 original and current authors */5635/** @author Ian Hofmann-Hicks (evil) */5636var curry = __webpack_require__(3)5637var isFoldable = __webpack_require__(43)5638var isFunction = __webpack_require__(4)5639var isMonoid = __webpack_require__(32)5640var mconcatMap = __webpack_require__(169)5641// mreduceMap :: Monoid M => M -> (b -> a) -> ( [ b ] | List b ) -> a5642function mreduceMap(m, f, xs) {5643 if(!isMonoid(m)) {5644 throw new TypeError(5645 'mreduceMap: Monoid required for first argument'5646 )5647 }5648 if(!isFunction(f)) {5649 throw new TypeError(5650 'mreduceMap: Function required for second argument'5651 )5652 }5653 if(!isFoldable(xs)) {5654 throw new TypeError(5655 'mreduceMap: Foldable required for third argument'5656 )5657 }5658 return mconcatMap(m, f, xs).valueOf()5659}5660module.exports = curry(mreduceMap)5661/***/ }),5662/* 173 */5663/***/ (function(module, exports, __webpack_require__) {5664/** @license ISC License (c) copyright 2017 original and current authors */5665/** @author Ian Hofmann-Hicks (evil) */5666var curry = __webpack_require__(3)5667var curryN = __webpack_require__(150)5668var isFunction = __webpack_require__(4)5669var isNumber = __webpack_require__(40)5670// nAry : Number -> (* -> a) -> * -> * -> a5671function nAry(num, fn) {5672 if(!isNumber(num)) {5673 throw new TypeError('nAry: Number required for first argument')5674 }5675 if(!isFunction(fn)) {5676 throw new TypeError('nAry: Function required for second argument')5677 }5678 return curryN(num, fn)5679}5680module.exports = curry(nAry)5681/***/ }),5682/* 174 */5683/***/ (function(module, exports, __webpack_require__) {5684/** @license ISC License (c) copyright 2017 original and current authors */5685/** @author Ian Hofmann-Hicks (evil) */5686var curry = __webpack_require__(3)5687var isString = __webpack_require__(36)5688// objOf : String -> a -> Object5689function objOf(key, value) {5690 var obj;5691 if(!(key && isString(key))) {5692 throw new TypeError('objOf: Non-empty String required for first argument')5693 }5694 return ( obj = {}, obj[key] = value, obj )5695}5696module.exports = curry(objOf)5697/***/ }),5698/* 175 */5699/***/ (function(module, exports, __webpack_require__) {5700/** @license ISC License (c) copyright 2017 original and current authors */5701/** @author Ian Hofmann-Hicks (evil) */5702var curry = __webpack_require__(3)5703var isFoldable = __webpack_require__(43)5704var isObject = __webpack_require__(31)5705function omitKeys(keys, obj) {5706 return function(acc, key) {5707 var obj$1;5708 return keys.indexOf(key) === -1 && obj[key] !== undefined5709 ? Object.assign(acc, ( obj$1 = {}, obj$1[key] = obj[key], obj$1 ))5710 : acc5711 }5712}5713// omit : [ String ] -> Object -> Object5714function omit(keys, obj) {5715 if(!isFoldable(keys)) {5716 throw new TypeError('omit: Foldable required for first argument')5717 }5718 else if(!isObject(obj)) {5719 throw new TypeError('omit: Object required for second argument')5720 }5721 return Object.keys(obj).reduce(omitKeys(keys, obj), {})5722}5723module.exports = curry(omit)5724/***/ }),5725/* 176 */5726/***/ (function(module, exports, __webpack_require__) {5727/** @license ISC License (c) copyright 2017 original and current authors */5728/** @author Ian Hofmann-Hicks (evil) */5729var isFunction = __webpack_require__(4)5730var _once = __webpack_require__(118)5731// once : ((*) -> b) -> ((*) -> b)5732function once(fn) {5733 if(!isFunction(fn)) {5734 throw new TypeError('once: Function required')5735 }5736 return _once(fn)5737}5738module.exports = once5739/***/ }),5740/* 177 */5741/***/ (function(module, exports, __webpack_require__) {5742/** @license ISC License (c) copyright 2017 original and current authors */5743/** @author Ian Hofmann-Hicks (evil) */5744var curry = __webpack_require__(3)5745var isFunction = __webpack_require__(4)5746// partial : ((* -> c), *) -> * -> c5747function partial() {5748 var args = [], len = arguments.length;5749 while ( len-- ) args[ len ] = arguments[ len ];5750 var fn = args[0]5751 var xs = args.slice(1)5752 if(!isFunction(fn)) {5753 throw new TypeError('partial: Function required for first argument')5754 }5755 return curry(5756 Function.bind.apply(fn, [ null ].concat(xs))5757 )5758}5759module.exports = partial5760/***/ }),5761/* 178 */5762/***/ (function(module, exports, __webpack_require__) {5763/** @license ISC License (c) copyright 2017 original and current authors */5764/** @author Ian Hofmann-Hicks (evil) */5765var curry = __webpack_require__(3)5766var isFoldable = __webpack_require__(43)5767var isObject = __webpack_require__(31)5768var isString = __webpack_require__(36)5769function pickKeys(obj) {5770 return function(acc, key) {5771 var obj$1;5772 if(!isString(key)) {5773 throw new TypeError('pick: Foldable of Strings is required for first argument')5774 }5775 return key && obj[key] !== undefined5776 ? Object.assign(acc, ( obj$1 = {}, obj$1[key] = obj[key], obj$1 ))5777 : acc5778 }5779}5780// pick : ([ String ] | List String) -> Object -> Object5781function pick(keys, obj) {5782 if(!isFoldable(keys)) {5783 throw new TypeError('pick: Foldable required for first argument')5784 }5785 else if(!isObject(obj)) {5786 throw new TypeError('pick: Object required for second argument')5787 }5788 return keys.reduce(pickKeys(obj), {})5789}5790module.exports = curry(pick)5791/***/ }),5792/* 179 */5793/***/ (function(module, exports, __webpack_require__) {5794/** @license ISC License (c) copyright 2016 original and current authors */5795/** @author Ian Hofmann-Hicks (evil) */5796var isFunction = __webpack_require__(4)5797var err = 'pipe: Functions required'5798function applyPipe(f, g) {5799 if(!isFunction(g)) {5800 throw new TypeError(err)5801 }5802 return function() {5803 var args = [], len = arguments.length;5804 while ( len-- ) args[ len ] = arguments[ len ];5805 return g.call(null, f.apply(null, args))5806 }5807}5808// pipe : ((a -> b), (b -> c), ..., (y -> z)) -> a -> z5809function pipe() {5810 var fns = [], len = arguments.length;5811 while ( len-- ) fns[ len ] = arguments[ len ];5812 if(!arguments.length) {5813 throw new TypeError(err)5814 }5815 var head =5816 fns[0]5817 if(!isFunction(head)) {5818 throw new TypeError(err)5819 }5820 var tail =5821 fns.slice(1).concat(function (x) { return x; })5822 return tail.reduce(applyPipe, head)5823}5824module.exports = pipe5825/***/ }),5826/* 180 */5827/***/ (function(module, exports, __webpack_require__) {5828/** @license ISC License (c) copyright 2017 original and current authors */5829/** @author Ian Hofmann-Hicks (evil) */5830var isChain = __webpack_require__(64)5831var isFunction = __webpack_require__(4)5832var err = 'pipeK: Chain returning functions of the same type required'5833function pipeK(head) {5834 var fns = [], len = arguments.length - 1;5835 while ( len-- > 0 ) fns[ len ] = arguments[ len + 1 ];5836 if(!(arguments.length && isFunction(head))) {5837 throw new TypeError(err)5838 }5839 if(arguments.length === 1) {5840 return head5841 }5842 var tail = fns.reduce(function (comp, fn) {5843 if(!isFunction(fn)) {5844 throw new TypeError(err)5845 }5846 return function(m) {5847 if(!isChain(m)) {5848 throw new TypeError(err)5849 }5850 return comp(m).chain(fn)5851 }5852 }, function (x) { return x; })5853 return function() {5854 return tail(head.apply(null, arguments))5855 }5856}5857module.exports = pipeK5858/***/ }),5859/* 181 */5860/***/ (function(module, exports, __webpack_require__) {5861/** @license ISC License (c) copyright 2017 original and current authors */5862/** @author Ian Hofmann-Hicks (evil) */5863var isFunction = __webpack_require__(4)5864var isPromise = __webpack_require__(93)5865var err = 'pipeP: Promise returning functions required'5866function applyPipe(f, g) {5867 if(!isFunction(g)) {5868 throw new TypeError(err)5869 }5870 return function() {5871 var p = f.apply(null, arguments)5872 if(!isPromise(p)) {5873 throw new TypeError(err)5874 }5875 return p.then(g)5876 }5877}5878// pipeP : Promise p => ((a -> p b), (b -> p c), ..., (y -> p z)) -> a -> p z5879function pipeP() {5880 var fns = [], len = arguments.length;5881 while ( len-- ) fns[ len ] = arguments[ len ];5882 if(!arguments.length) {5883 throw new TypeError(err)5884 }5885 var head =5886 fns[0]5887 if(!isFunction(head)) {5888 throw new TypeError(err)5889 }5890 var tail =5891 fns.slice(1).concat(function (x) { return x; })5892 return tail.reduce(applyPipe, head)5893}5894module.exports = pipeP5895/***/ }),5896/* 182 */5897/***/ (function(module, exports, __webpack_require__) {5898/** @license ISC License (c) copyright 2017 original and current authors */5899/** @author Ian Hofmann-Hicks (evil) */5900var isSameType = __webpack_require__(18)5901var isSemigroupoid = __webpack_require__(62)5902var err = 'pipeS: Semigroupoids of the same type required'5903// pipeS : Semigroupoid s => (s a b, s b c, ..., s y z) -> s a z5904function pipeS() {5905 var ms = [], len = arguments.length;5906 while ( len-- ) ms[ len ] = arguments[ len ];5907 if(!arguments.length) {5908 throw new TypeError(err)5909 }5910 var head =5911 ms[0]5912 if(!isSemigroupoid(head)) {5913 throw new TypeError(err)5914 }5915 if(ms.length === 1) {5916 return head5917 }5918 return ms.slice().reduce(function (comp, m) {5919 if(!isSameType(comp, m)) {5920 throw new TypeError(err)5921 }5922 return comp.compose(m)5923 })5924}5925module.exports = pipeS5926/***/ }),5927/* 183 */5928/***/ (function(module, exports, __webpack_require__) {5929/** @license ISC License (c) copyright 2017 original and current authors */5930/** @author Henrique Limas */5931/** @author Ian Hofmann-Hicks */5932var getPropOr = __webpack_require__(165)5933module.exports =5934 getPropOr.origFn('propOr')5935/***/ }),5936/* 184 */5937/***/ (function(module, exports, __webpack_require__) {5938/** @license ISC License (c) copyright 2017 original and current authors */5939/** @author Henrique Limas */5940/** @author Ian Hofmann-Hicks */5941var getPathOr = __webpack_require__(161)5942module.exports =5943 getPathOr.origFn('propPathOr')5944/***/ }),5945/* 185 */5946/***/ (function(module, exports, __webpack_require__) {5947/** @license ISC License (c) copyright 2018 original and current authors */5948/** @author Ian Hofmann-Hicks (evil) */5949var array = __webpack_require__(115)5950var curry = __webpack_require__(3)5951var isArray = __webpack_require__(45)5952var isEmpty = __webpack_require__(30)5953var isInteger = __webpack_require__(39)5954var isObject = __webpack_require__(31)5955var isString = __webpack_require__(36)5956var object = __webpack_require__(146)5957var isValid = function (x) { return isObject(x) || isArray(x); }5958var pathErr =5959 'setPath: Non-empty Array of non-empty Strings and/or Positive Integers required for first argument'5960// setPath :: [ String | Integer ] -> a -> (Object | Array) -> (Object | Array)5961function setPath(path, val, obj) {5962 if(!isArray(path) || isEmpty(path)) {5963 throw new TypeError(pathErr)5964 }5965 if(!isValid(obj)) {5966 throw new TypeError(5967 'setPath: Object or Array required for third argument'5968 )5969 }5970 var key = path[0]5971 var newVal = val5972 if(!(isString(key) && !isEmpty(key) || isInteger(key) && key >= 0)) {5973 throw new TypeError(pathErr)5974 }5975 if(path.length > 1) {5976 var next = !isValid(obj[key])5977 ? isInteger(path[1]) ? [] : {}5978 : obj[key]5979 newVal = setPath(path.slice(1), val, next)5980 }5981 if(isObject(obj)) {5982 if(isString(key)) {5983 return object.set(key, newVal, obj)5984 }5985 throw new TypeError(5986 'setPath: Non-empty String required in path when referencing an Object'5987 )5988 }5989 if(isInteger(key)) {5990 return array.set(key, newVal, obj)5991 }5992 throw new TypeError(5993 'setPath: Positive Integers required in path when referencing an Array'5994 )5995}5996module.exports = curry(setPath)5997/***/ }),5998/* 186 */5999/***/ (function(module, exports, __webpack_require__) {6000/** @license ISC License (c) copyright 2017 original and current authors */6001/** @author Ian Hofmann-Hicks (evil) */6002var curry = __webpack_require__(3)6003var compose = __webpack_require__(7)6004var isFunction = __webpack_require__(4)6005var constant = function (x) { return function () { return x; }; }6006// tap : (a -> b) -> a -> a6007function tap(fn, x) {6008 if(!isFunction(fn)) {6009 throw new TypeError(6010 'tap: Function required for first argument'6011 )6012 }6013 return compose(constant(x), fn)(x)6014}6015module.exports = curry(tap)6016/***/ }),6017/* 187 */6018/***/ (function(module, exports, __webpack_require__) {6019/** @license ISC License (c) copyright 2017 original and current authors */6020/** @author Ian Hofmann-Hicks (evil) */6021var isFunction = __webpack_require__(4)6022// unary : (* -> b) -> a -> b6023function unary(fn) {6024 if(!isFunction(fn)) {6025 throw new TypeError('unary: Function required')6026 }6027 return function(x) {6028 return fn(x)6029 }6030}6031module.exports = unary6032/***/ }),6033/* 188 */6034/***/ (function(module, exports, __webpack_require__) {6035/** @license ISC License (c) copyright 2017 original and current authors */6036/** @author Ian Hofmann-Hicks (evil) */6037module.exports =6038 __webpack_require__(119)6039/***/ }),6040/* 189 */6041/***/ (function(module, exports, __webpack_require__) {6042/** @license ISC License (c) copyright 2018 original and current authors */6043/** @author Ian Hofmann-Hicks (evil) */6044var curry = __webpack_require__(3)6045var isArray = __webpack_require__(45)6046var isEmpty = __webpack_require__(30)6047var isInteger = __webpack_require__(39)6048var isObject = __webpack_require__(31)6049var isString = __webpack_require__(36)6050var array = __webpack_require__(115)6051var object = __webpack_require__(146)6052var pathError =6053 'unsetPath: Non-empty Array of non-empty Strings and/or Positive Integers required for first argument'6054// unsetPath :: [ String | Integer ] -> a -> a6055function unsetPath(path, obj) {6056 if(!isArray(path) || isEmpty(path)) {6057 throw new TypeError(pathError)6058 }6059 if(!(isObject(obj) || isArray(obj))) {6060 return obj6061 }6062 var key = path[0]6063 if(!(isString(key) && !isEmpty(key) || isInteger(key) && key >= 0)) {6064 throw new TypeError(pathError)6065 }6066 if(path.length === 1) {6067 if(isArray(obj) && isInteger(key)) {6068 return array.unset(key, obj)6069 }6070 if(isObject(obj) && isString(key)) {6071 return object.unset(key, obj)6072 }6073 return obj6074 }6075 var next =6076 obj[key]6077 if(!(isObject(next) || isArray(next))) {6078 return obj6079 }6080 if(isArray(obj)) {6081 return array.set(key, unsetPath(path.slice(1), next), obj)6082 }6083 return object.set(key, unsetPath(path.slice(1), next), obj)6084}6085module.exports = curry(unsetPath)6086/***/ }),6087/* 190 */6088/***/ (function(module, exports, __webpack_require__) {6089/** @license ISC License (c) copyright 2016 original and current authors */6090/** @author Ian Hofmann-Hicks (evil) */6091var Pair = __webpack_require__(132)6092// branch : a -> Pair a a6093function branch(x) {6094 return Pair(x, x)6095}6096module.exports = branch6097/***/ }),6098/* 191 */6099/***/ (function(module, exports, __webpack_require__) {6100/** @license ISC License (c) copyright 2017 original and current authors */6101/** @author Ian Hofmann-Hicks (evil) */6102var Pair = __webpack_require__(132)6103var curry = __webpack_require__(3)6104var isContravariant = __webpack_require__(66)6105var isFunction = __webpack_require__(4)6106var isSameType = __webpack_require__(18)6107var isSemigroupoid = __webpack_require__(62)6108var valid = function (x, y) { return isSameType(x, y)6109 && isSemigroupoid(x)6110 && isContravariant(x)6111 && isFunction(x.first)6112 && isFunction(x.second); }6113// fanout : m a b -> m a c -> m a (b, c)6114function fanout(fst, snd) {6115 if(isFunction(fst) && isFunction(snd)) {6116 return function (x) { return Pair(fst(x), snd(x)); }6117 }6118 if(valid(fst, snd)) {6119 return fst.first()6120 .compose(snd.second())6121 .contramap(function (x) { return Pair(x, x); })6122 }6123 throw new TypeError(6124 'fanout: Arrows, Functions or Stars of the same type required for both arguments'6125 )6126}6127module.exports = curry(fanout)6128/***/ }),6129/* 192 */6130/***/ (function(module, exports, __webpack_require__) {6131/** @license ISC License (c) copyright 2018 original and current authors */6132/** @author Dale Francis (dalefrancis88) */6133var Pred = __webpack_require__(17).proxy('Pred')6134var curry = __webpack_require__(3)6135var predOrFunc = __webpack_require__(20)6136var isFunction = __webpack_require__(4)6137var isFoldable = __webpack_require__(43)6138var isSameType = __webpack_require__(18)6139var ref = __webpack_require__(130);6140var Just = ref.Just;6141var Nothing = ref.Nothing;6142var accumulator = function (fn) { return function (acc, cur) { return !acc.found && predOrFunc(fn, cur) ? { found: true, value: cur } : acc; }; }6143// find :: Foldable f => ((a -> Boolean) | Pred) -> f a -> Maybe a6144function find(fn, foldable) {6145 if(!isFunction(fn) && !isSameType(Pred, fn)) {6146 throw new TypeError('find: First argument must be a Pred or predicate')6147 }6148 if(!isFoldable(foldable)) {6149 throw new TypeError('find: Second argument must be a Foldable')6150 }6151 var result = foldable.reduce(accumulator(fn), { found: false })6152 return result.found ? Just(result.value) : Nothing()6153}6154module.exports = curry(find)6155/***/ }),6156/* 193 */6157/***/ (function(module, exports, __webpack_require__) {6158/** @license ISC License (c) copyright 2019 original and current authors */6159/** @author Ian Hofmann-Hicks (evil) */6160var ref = __webpack_require__(129);6161var Nothing = ref.Nothing;6162var Just = ref.Just;6163var curry = __webpack_require__(3)6164var isArray = __webpack_require__(45)6165var isDefined = __webpack_require__(29)6166var isEmpty = __webpack_require__(30)6167var isInteger = __webpack_require__(39)6168var isNil = __webpack_require__(41)6169var isString = __webpack_require__(36)6170function fn(name) {6171 function getPath(keys, target) {6172 if(!isArray(keys)) {6173 throw new TypeError((name + ": Array of Non-empty Strings or Integers required for first argument"))6174 }6175 if(isNil(target)) {6176 return Nothing()6177 }6178 var value = target6179 for(var i = 0; i < keys.length; i++) {6180 var key = keys[i]6181 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {6182 throw new TypeError((name + ": Array of Non-empty Strings or Integers required for first argument"))6183 }6184 if(isNil(value)) {6185 return Nothing()6186 }6187 value = value[key]6188 if(!isDefined(value)) {6189 return Nothing()6190 }6191 }6192 return Just(value)6193 }6194 return curry(getPath)6195}6196var getPath =6197 fn('getPath')6198getPath.origFn =6199 fn6200module.exports = getPath6201/***/ }),6202/* 194 */6203/***/ (function(module, exports, __webpack_require__) {6204/** @license ISC License (c) copyright 2019 original and current authors */6205/** @author Ian Hofmann-Hicks (evil) */6206var curry = __webpack_require__(3)6207var isDefined = __webpack_require__(29)6208var isEmpty = __webpack_require__(30)6209var isNil = __webpack_require__(41)6210var isInteger = __webpack_require__(39)6211var isString = __webpack_require__(36)6212var ref = __webpack_require__(129);6213var Nothing = ref.Nothing;6214var Just = ref.Just;6215function fn(name) {6216 function getProp(key, target) {6217 if(!(isString(key) && !isEmpty(key) || isInteger(key))) {6218 throw new TypeError((name + ": Non-empty String or Integer required for first argument"))6219 }6220 if(isNil(target)) {6221 return Nothing()6222 }6223 var value = target[key]6224 return isDefined(value)6225 ? Just(value)6226 : Nothing()6227 }6228 return curry(getProp)6229}6230var getProp =6231 fn('getProp')6232getProp.origFn =6233 fn6234module.exports = getProp6235/***/ }),6236/* 195 */6237/***/ (function(module, exports, __webpack_require__) {6238/** @license ISC License (c) copyright 2017 original and current authors */6239/** @author Ian Hofmann-Hicks (evil) */6240var getProp = __webpack_require__(194)6241module.exports =6242 getProp.origFn('prop')6243/***/ }),6244/* 196 */6245/***/ (function(module, exports, __webpack_require__) {6246/** @license ISC License (c) copyright 2017 original and current authors */6247/** @author Ian Hofmann-Hicks (evil) */6248var getPath = __webpack_require__(193)6249module.exports =6250 getPath.origFn('propPath')6251/***/ }),6252/* 197 */6253/***/ (function(module, exports, __webpack_require__) {6254/** @license ISC License (c) copyright 2016 original and current authors */6255/** @author Ian Hofmann-Hicks (evil) */6256var ref = __webpack_require__(129);6257var Nothing = ref.Nothing;6258var Just = ref.Just;6259var predOrFunc = __webpack_require__(20)6260var curry = __webpack_require__(3)6261var isPredOrFunc = __webpack_require__(16)6262// safe : ((a -> Boolean) | Pred) -> a -> Maybe a6263function safe(pred, x) {6264 if(!isPredOrFunc(pred)) {6265 throw new TypeError('safe: Pred or predicate function required for first argument')6266 }6267 return predOrFunc(pred, x)6268 ? Just(x)6269 : Nothing()6270}6271module.exports = curry(safe)6272/***/ }),6273/* 198 */6274/***/ (function(module, exports, __webpack_require__) {6275var ref = __webpack_require__(129);6276var Just = ref.Just;6277var Nothing = ref.Nothing;6278var curry = __webpack_require__(3)6279var isPredOrFunc = __webpack_require__(16)6280var isFunction = __webpack_require__(4)6281var predOrFunc = __webpack_require__(20)6282// safeAfter :: ((b -> Boolean) | Pred) -> (a -> b) -> a -> Maybe b6283function safeAfter(pred, fn) {6284 if(!isPredOrFunc(pred)) {6285 throw new TypeError('safeAfter: Pred or predicate function required for first argument')6286 }6287 if(!isFunction(fn)) {6288 throw new TypeError('safeAfter: Function required for second argument')6289 }6290 return function (x) {6291 var result = fn(x)6292 return predOrFunc(pred, result)6293 ? Just(result)6294 : Nothing()6295 }6296}6297module.exports = curry(safeAfter)6298/***/ }),6299/* 199 */6300/***/ (function(module, exports, __webpack_require__) {6301/** @license ISC License (c) copyright 2017 original and current authors */6302/** @author Ian Hofmann-Hicks (evil) */6303var compose = __webpack_require__(7)6304var curry = __webpack_require__(3)6305var isPredOrFunc = __webpack_require__(16)6306var isFunction = __webpack_require__(4)6307var safe = __webpack_require__(197)6308var map =6309 function (fn) { return function (m) { return m.map(fn); }; }6310// safeLift : ((a -> Boolean) | Pred) -> (a -> b) -> a -> Maybe b6311function safeLift(pred, fn) {6312 if(!isPredOrFunc(pred)) {6313 throw new TypeError('safeLift: Pred or predicate function required for first argument')6314 }6315 else if(!isFunction(fn)) {6316 throw new TypeError('safeLift: Function required for second argument')6317 }6318 return compose(map(fn), safe(pred))6319}6320module.exports = curry(safeLift)6321/***/ }),6322/* 200 */6323/***/ (function(module, exports, __webpack_require__) {6324/** @license ISC License (c) copyright 2017 original and current authors */6325/** @author Ian Hofmann-Hicks (evil) */6326var List = __webpack_require__(128)6327var Pair = __webpack_require__(132)6328var isObject = __webpack_require__(31)6329// toPairs : Object -> List (Pair String a)6330function toPairs(obj) {6331 if(!isObject(obj)) {6332 throw new TypeError('toPairs: Object required for argument')6333 }6334 return Object.keys(obj).reduce(6335 function (acc, key) { return obj[key] !== undefined6336 ? acc.concat(List.of(Pair(key, obj[key])))6337 : acc; },6338 List.empty()6339 )6340}6341module.exports = toPairs6342/***/ }),6343/* 201 */6344/***/ (function(module, exports, __webpack_require__) {6345/** @license ISC License (c) copyright 2017 original and current authors */6346/** @author Ian Hofmann-Hicks (evil) */6347var ref = __webpack_require__(137);6348var Err = ref.Err;6349var Ok = ref.Ok;6350var curry = __webpack_require__(3)6351var isFunction = __webpack_require__(4)6352function tryCatch(fn) {6353 if(!isFunction(fn)) {6354 throw new TypeError('tryCatch: Function required for first argument')6355 }6356 var safe = function() {6357 try { return Ok(fn.apply(this, arguments)) }6358 catch(e) { return Err(e) }6359 }6360 Object.defineProperty(safe, 'length', { value: fn.length })6361 return safe6362}6363module.exports = curry(tryCatch)6364/***/ }),6365/* 202 */6366/***/ (function(module, exports, __webpack_require__) {6367/** @license ISC License (c) copyright 2016 original and current authors */6368/** @author Ian Hofmann-Hicks (evil) */6369var VERSION = 26370var _implements = __webpack_require__(112)6371var _inspect = __webpack_require__(113)6372var _equals = __webpack_require__(37)6373var type = __webpack_require__(17).type('All')6374var _type = __webpack_require__(17).typeFn(type(), VERSION)6375var fl = __webpack_require__(34)6376var isFunction = __webpack_require__(4)6377var isNil = __webpack_require__(41)6378var isSameType = __webpack_require__(18)6379var _empty =6380 function () { return All(true); }6381function All(b) {6382 var obj;6383 var x = isNil(b) ? _empty().valueOf() : b6384 if(!arguments.length || isFunction(x)) {6385 throw new TypeError('All: Non-function value required')6386 }6387 var valueOf =6388 function () { return !!x; }6389 var empty =6390 _empty6391 var equals =6392 function (m) { return isSameType(All, m)6393 && _equals(x, m.valueOf()); }6394 var inspect =6395 function () { return ("All" + (_inspect(valueOf()))); }6396 function concat(method) {6397 return function(m) {6398 if(!isSameType(All, m)) {6399 throw new TypeError(("All." + method + ": All required"))6400 }6401 return All(m.valueOf() && valueOf())6402 }6403 }6404 return ( obj = {6405 inspect: inspect, toString: inspect,6406 equals: equals, valueOf: valueOf, type: type, empty: empty6407 }, obj['@@type'] = _type, obj.concat = concat('concat'), obj[fl.equals] = equals, obj[fl.concat] = concat(fl.concat), obj[fl.empty] = empty, obj.constructor = All, obj )6408}6409All['@@implements'] = _implements(6410 [ 'equals', 'concat', 'empty' ]6411)6412All.empty = _empty6413All.type = type6414All[fl.empty] = _empty6415All['@@type'] = _type6416module.exports = All6417/***/ }),6418/* 203 */6419/***/ (function(module, exports, __webpack_require__) {6420/** @license ISC License (c) copyright 2016 original and current authors */6421/** @author Ian Hofmann-Hicks (evil) */6422var VERSION = 26423var _implements = __webpack_require__(112)6424var _inspect = __webpack_require__(113)6425var _equals = __webpack_require__(37)6426var type = __webpack_require__(17).type('Any')6427var _type = __webpack_require__(17).typeFn(type(), VERSION)6428var fl = __webpack_require__(34)6429var isFunction = __webpack_require__(4)6430var isNil = __webpack_require__(41)6431var isSameType = __webpack_require__(18)6432var _empty =6433 function () { return Any(false); }6434function Any(b) {6435 var obj;6436 var x = isNil(b) ? _empty().valueOf() : b6437 if(!arguments.length || isFunction(x)) {6438 throw new TypeError('Any: Non-function value required')6439 }6440 var valueOf =6441 function () { return !!x; }6442 var empty =6443 _empty6444 var inspect =6445 function () { return ("Any" + (_inspect(valueOf()))); }6446 var equals =6447 function (m) { return isSameType(Any, m)6448 && _equals(x, m.valueOf()); }6449 function concat(method) {6450 return function(m) {6451 if(!isSameType(Any, m)) {6452 throw new TypeError(("Any." + method + ": Any required"))6453 }6454 return Any(m.valueOf() || valueOf())6455 }6456 }6457 return ( obj = {6458 inspect: inspect, toString: inspect,6459 equals: equals, valueOf: valueOf, type: type, empty: empty6460 }, obj['@@type'] = _type, obj.concat = concat('concat'), obj[fl.equals] = equals, obj[fl.concat] = concat(fl.concat), obj[fl.empty] = empty, obj.constructor = Any, obj )6461}6462Any['@@implements'] = _implements(6463 [ 'equals', 'concat', 'empty' ]6464)6465Any.empty = _empty6466Any.type = type6467Any[fl.empty] = _empty6468Any['@@type'] = _type6469module.exports = Any6470/***/ }),6471/* 204 */6472/***/ (function(module, exports, __webpack_require__) {6473/** @license ISC License (c) copyright 2016 original and current authors */6474/** @author Ian Hofmann-Hicks (evil) */6475var VERSION = 26476var _implements = __webpack_require__(112)6477var _inspect = __webpack_require__(113)6478var _object = __webpack_require__(146)6479var _equals = __webpack_require__(37)6480var type = __webpack_require__(17).type('Assign')6481var _type = __webpack_require__(17).typeFn(type(), VERSION)6482var fl = __webpack_require__(34)6483var isNil = __webpack_require__(41)6484var isObject = __webpack_require__(31)6485var isSameType = __webpack_require__(18)6486var _empty =6487 function () { return Assign({}); }6488function Assign(o) {6489 var obj;6490 var x = isNil(o) ? _empty().valueOf() : o6491 if(!arguments.length || !isObject(x)) {6492 throw new TypeError('Assign: Object required')6493 }6494 var valueOf =6495 function () { return x; }6496 var empty =6497 _empty6498 var inspect =6499 function () { return ("Assign" + (_inspect(valueOf()))); }6500 var equals =6501 function (m) { return isSameType(Assign, m)6502 && _equals(x, m.valueOf()); }6503 function concat(method) {6504 return function(m) {6505 if(!isSameType(Assign, m)) {6506 throw new TypeError(("Assign." + method + ": Assign required"))6507 }6508 return Assign(_object.assign(m.valueOf(), x))6509 }6510 }6511 return ( obj = {6512 inspect: inspect, toString: inspect,6513 equals: equals, valueOf: valueOf, type: type, empty: empty,6514 concat: concat('concat')6515 }, obj[fl.equals] = equals, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Assign, obj )6516}6517Assign['@@implements'] = _implements(6518 [ 'equals', 'concat', 'empty' ]6519)6520Assign.empty = _empty6521Assign.type = type6522Assign[fl.empty] = _empty6523Assign['@@type'] = _type6524module.exports = Assign6525/***/ }),6526/* 205 */6527/***/ (function(module, exports, __webpack_require__) {6528/** @license ISC License (c) copyright 2017 original and current authors */6529/** @author Ian Hofmann-Hicks (evil) */6530var VERSION = 26531var _implements = __webpack_require__(112)6532var _inspect = __webpack_require__(113)6533var type = __webpack_require__(17).type('Endo')6534var _type = __webpack_require__(17).typeFn(type(), VERSION)6535var fl = __webpack_require__(34)6536var compose = __webpack_require__(7)6537var isFunction = __webpack_require__(4)6538var isSameType = __webpack_require__(18)6539var _empty =6540 function () { return Endo(function (x) { return x; }); }6541function Endo(runWith) {6542 var obj;6543 if(!isFunction(runWith)) {6544 throw new TypeError('Endo: Function value required')6545 }6546 var valueOf =6547 function () { return runWith; }6548 var empty =6549 _empty6550 var inspect =6551 function () { return ("Endo" + (_inspect(valueOf()))); }6552 function concat(method) {6553 return function(m) {6554 if(!isSameType(Endo, m)) {6555 throw new TypeError(("Endo." + method + ": Endo required"))6556 }6557 return Endo(compose(m.valueOf(), valueOf()))6558 }6559 }6560 return ( obj = {6561 inspect: inspect, toString: inspect,6562 valueOf: valueOf, type: type, empty: empty, runWith: runWith,6563 concat: concat('concat')6564 }, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Endo, obj )6565}6566Endo['@@implements'] = _implements(6567 [ 'concat', 'empty' ]6568)6569Endo.empty = _empty6570Endo.type = type6571Endo[fl.empty] = _empty6572Endo['@@type'] = _type6573module.exports = Endo6574/***/ }),6575/* 206 */6576/***/ (function(module, exports, __webpack_require__) {6577/** @license ISC License (c) copyright 2017 original and current authors */6578/** @author Ian Hofmann-Hicks (evil) */6579var VERSION = 26580var _implements = __webpack_require__(112)6581var _inspect = __webpack_require__(113)6582var _equals = __webpack_require__(37)6583var type = __webpack_require__(17).type('First')6584var _type = __webpack_require__(17).typeFn(type(), VERSION)6585var fl = __webpack_require__(34)6586var isSameType = __webpack_require__(18)6587var Maybe = __webpack_require__(129)6588var _empty =6589 function () { return First(Maybe.Nothing()); }6590function First(x) {6591 var obj;6592 if(!arguments.length) {6593 throw new TypeError('First: Requires one argument')6594 }6595 var maybe =6596 !isSameType(Maybe, x) ? Maybe.of(x) : x.map(function (x) { return x; })6597 var empty =6598 _empty6599 var inspect =6600 function () { return ("First(" + (_inspect(maybe)) + " )"); }6601 var equals =6602 function (m) { return isSameType(First, m)6603 && _equals(maybe, m.valueOf()); }6604 var valueOf =6605 function () { return maybe; }6606 var option =6607 maybe.option6608 function concat(method) {6609 return function(m) {6610 if(!isSameType(First, m)) {6611 throw new TypeError(("First." + method + ": First required"))6612 }6613 var n =6614 m.valueOf().map(function (x) { return x; })6615 return First(6616 maybe.either(function () { return n; }, Maybe.Just)6617 )6618 }6619 }6620 return ( obj = {6621 inspect: inspect, toString: inspect,6622 equals: equals, empty: empty, option: option, type: type, valueOf: valueOf,6623 concat: concat('concat')6624 }, obj[fl.equals] = equals, obj[fl.empty] = _empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = First, obj )6625}6626First['@@implements'] = _implements(6627 [ 'equals', 'concat', 'empty' ]6628)6629First.empty = _empty6630First.type = type6631First[fl.empty] = _empty6632First['@@type'] = _type6633module.exports = First6634/***/ }),6635/* 207 */6636/***/ (function(module, exports, __webpack_require__) {6637/** @license ISC License (c) copyright 2017 original and current authors */6638/** @author Ian Hofmann-Hicks (evil) */6639var VERSION = 26640var _implements = __webpack_require__(112)6641var _inspect = __webpack_require__(113)6642var _equals = __webpack_require__(37)6643var type = __webpack_require__(17).type('Last')6644var _type = __webpack_require__(17).typeFn(type(), VERSION)6645var fl = __webpack_require__(34)6646var isSameType = __webpack_require__(18)6647var Maybe = __webpack_require__(129)6648var _empty =6649 function () { return Last(Maybe.Nothing()); }6650function Last(x) {6651 var obj;6652 if(!arguments.length) {6653 throw new TypeError('Last: Requires one argument')6654 }6655 var maybe =6656 !isSameType(Maybe, x) ? Maybe.of(x) : x.map(function (x) { return x; })6657 var valueOf =6658 function () { return maybe; }6659 var empty =6660 _empty6661 var inspect =6662 function () { return ("Last(" + (_inspect(maybe)) + " )"); }6663 var equals =6664 function (m) { return isSameType(Last, m)6665 && _equals(maybe, m.valueOf()); }6666 var option =6667 maybe.option6668 function concat(method) {6669 return function(m) {6670 if(!isSameType(Last, m)) {6671 throw new TypeError(("Last." + method + ": Last required"))6672 }6673 var n =6674 m.valueOf().map(function (x) { return x; })6675 return Last(6676 maybe.either(6677 function () { return n; },6678 function () { return n.either(function () { return maybe; }, function () { return n; }); }6679 )6680 )6681 }6682 }6683 return ( obj = {6684 inspect: inspect, toString: inspect,6685 equals: equals, empty: empty, option: option, type: type, valueOf: valueOf,6686 concat: concat('concat')6687 }, obj[fl.equals] = equals, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Last, obj )6688}6689Last['@@implements'] = _implements(6690 [ 'equals', 'concat', 'empty' ]6691)6692Last.empty = _empty6693Last.type = type6694Last[fl.empty] = _empty6695Last['@@type'] = _type6696module.exports = Last6697/***/ }),6698/* 208 */6699/***/ (function(module, exports, __webpack_require__) {6700/** @license ISC License (c) copyright 2016 original and current authors */6701/** @author Ian Hofmann-Hicks (evil) */6702var VERSION = 26703var _implements = __webpack_require__(112)6704var _inspect = __webpack_require__(113)6705var _equals = __webpack_require__(37)6706var type = __webpack_require__(17).type('Max')6707var _type = __webpack_require__(17).typeFn(type(), VERSION)6708var fl = __webpack_require__(34)6709var isNil = __webpack_require__(41)6710var isNumber = __webpack_require__(40)6711var isSameType = __webpack_require__(18)6712var _empty =6713 function () { return Max(-Infinity); }6714function Max(n) {6715 var obj;6716 var x = isNil(n) ? _empty().valueOf() : n6717 if(!arguments.length || !isNumber(x)) {6718 throw new TypeError('Max: Numeric value required')6719 }6720 var valueOf =6721 function () { return x; }6722 var empty =6723 _empty6724 var inspect =6725 function () { return ("Max" + (_inspect(valueOf()))); }6726 var equals =6727 function (m) { return isSameType(Max, m)6728 && _equals(x, m.valueOf()); }6729 function concat(method) {6730 return function(m) {6731 if(!isSameType(Max, m)) {6732 throw new TypeError(("Max." + method + ": Max requried"))6733 }6734 return Max(Math.max(x, m.valueOf()))6735 }6736 }6737 return ( obj = {6738 inspect: inspect, toString: inspect,6739 equals: equals, valueOf: valueOf, type: type, empty: empty,6740 concat: concat('concat')6741 }, obj[fl.equals] = equals, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Max, obj )6742}6743Max['@@implements'] = _implements(6744 [ 'equals', 'concat', 'empty' ]6745)6746Max.empty = _empty6747Max.type = type6748Max[fl.empty] = _empty6749Max['@@type'] = _type6750module.exports = Max6751/***/ }),6752/* 209 */6753/***/ (function(module, exports, __webpack_require__) {6754/** @license ISC License (c) copyright 2016 original and current authors */6755/** @author Ian Hofmann-Hicks (evil) */6756var VERSION = 26757var _implements = __webpack_require__(112)6758var _inspect = __webpack_require__(113)6759var _equals = __webpack_require__(37)6760var type = __webpack_require__(17).type('Min')6761var _type = __webpack_require__(17).typeFn(type(), VERSION)6762var fl = __webpack_require__(34)6763var isNil = __webpack_require__(41)6764var isNumber = __webpack_require__(40)6765var isSameType = __webpack_require__(18)6766var _empty =6767 function () { return Min(Infinity); }6768function Min(n) {6769 var obj;6770 var x = isNil(n) ? _empty().valueOf() : n6771 if(!arguments.length || !isNumber(x)) {6772 throw new TypeError('Min: Numeric value required')6773 }6774 var valueOf =6775 function () { return x; }6776 var empty =6777 _empty6778 var inspect =6779 function () { return ("Min" + (_inspect(valueOf()))); }6780 var equals =6781 function (m) { return isSameType(Min, m)6782 && _equals(x, m.valueOf()); }6783 function concat(method) {6784 return function(m) {6785 if(!isSameType(Min, m)) {6786 throw new TypeError(("Min." + method + ": Min required"))6787 }6788 return Min(Math.min(x, m.valueOf()))6789 }6790 }6791 return ( obj = {6792 inspect: inspect, toString: inspect,6793 equals: equals, valueOf: valueOf, type: type, empty: empty,6794 concat: concat('concat')6795 }, obj[fl.equals] = equals, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Min, obj )6796}6797Min['@@implements'] = _implements(6798 [ 'equals', 'concat', 'empty' ]6799)6800Min.empty = _empty6801Min.type = type6802Min[fl.empty] = _empty6803Min['@@type'] = _type6804module.exports = Min6805/***/ }),6806/* 210 */6807/***/ (function(module, exports, __webpack_require__) {6808/** @license ISC License (c) copyright 2016 original and current authors */6809/** @author Ian Hofmann-Hicks (evil) */6810var VERSION = 26811var _implements = __webpack_require__(112)6812var _inspect = __webpack_require__(113)6813var _equals = __webpack_require__(37)6814var type = __webpack_require__(17).type('Prod')6815var _type = __webpack_require__(17).typeFn(type(), VERSION)6816var fl = __webpack_require__(34)6817var isNil = __webpack_require__(41)6818var isNumber = __webpack_require__(40)6819var isSameType = __webpack_require__(18)6820var _empty =6821 function () { return Prod(1); }6822function Prod(n) {6823 var obj;6824 var x = isNil(n) ? _empty().valueOf() : n6825 if(!arguments.length || !isNumber(x)) {6826 throw new TypeError('Prod: Numeric value required')6827 }6828 var valueOf =6829 function () { return x; }6830 var empty =6831 _empty6832 var inspect =6833 function () { return ("Prod" + (_inspect(valueOf()))); }6834 var equals =6835 function (m) { return isSameType(Prod, m)6836 && _equals(x, m.valueOf()); }6837 function concat(method) {6838 return function(m) {6839 if(!isSameType(Prod, m)) {6840 throw new TypeError(("Prod." + method + ": Prod required"))6841 }6842 return Prod(x * m.valueOf())6843 }6844 }6845 return ( obj = {6846 inspect: inspect, toString: inspect,6847 equals: equals, valueOf: valueOf, type: type, empty: empty,6848 concat: concat('concat')6849 }, obj[fl.equals] = equals, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Prod, obj )6850}6851Prod['@@implements'] = _implements(6852 [ 'equals', 'concat', 'empty' ]6853)6854Prod.empty = _empty6855Prod.type = type6856Prod[fl.empty] = _empty6857Prod['@@type'] = _type6858module.exports = Prod6859/***/ }),6860/* 211 */6861/***/ (function(module, exports, __webpack_require__) {6862/** @license ISC License (c) copyright 2016 original and current authors */6863/** @author Ian Hofmann-Hicks (evil) */6864var VERSION = 26865var _implements = __webpack_require__(112)6866var _inspect = __webpack_require__(113)6867var _equals = __webpack_require__(37)6868var type = __webpack_require__(17).type('Sum')6869var _type = __webpack_require__(17).typeFn(type(), VERSION)6870var fl = __webpack_require__(34)6871var isNil = __webpack_require__(41)6872var isNumber = __webpack_require__(40)6873var isSameType = __webpack_require__(18)6874var _empty =6875 function () { return Sum(0); }6876function Sum(n) {6877 var obj;6878 var x = isNil(n) ? _empty().valueOf() : n6879 if(!arguments.length || !isNumber(x)) {6880 throw new TypeError('Sum: Numeric value required')6881 }6882 var valueOf =6883 function () { return x; }6884 var empty=6885 _empty6886 var inspect =6887 function () { return ("Sum" + (_inspect(valueOf()))); }6888 var equals =6889 function (m) { return isSameType(Sum, m)6890 && _equals(x, m.valueOf()); }6891 function concat(method) {6892 return function(m) {6893 if(!isSameType(Sum, m)) {6894 throw new TypeError(("Sum." + method + ": Sum required"))6895 }6896 return Sum(x + m.valueOf())6897 }6898 }6899 return ( obj = {6900 inspect: inspect, toString: inspect, valueOf: valueOf,6901 equals: equals, type: type, empty: empty,6902 concat: concat('concat')6903 }, obj[fl.equals] = equals, obj[fl.empty] = empty, obj[fl.concat] = concat(fl.concat), obj['@@type'] = _type, obj.constructor = Sum, obj )6904}6905Sum['@@implements'] = _implements(6906 [ 'equals', 'concat', 'empty' ]6907)6908Sum.empty = _empty6909Sum.type = type6910Sum[fl.empty] = _empty6911Sum['@@type'] = _type6912module.exports = Sum6913/***/ }),6914/* 212 */6915/***/ (function(module, exports, __webpack_require__) {6916module.exports = {6917 alt: __webpack_require__(213),6918 ap: __webpack_require__(214),6919 bimap: __webpack_require__(215),6920 bichain: __webpack_require__(216),6921 both: __webpack_require__(217),6922 chain: __webpack_require__(218),6923 coalesce: __webpack_require__(219),6924 compareWith: __webpack_require__(220),6925 concat: __webpack_require__(221),6926 cons: __webpack_require__(222),6927 contramap: __webpack_require__(223),6928 either: __webpack_require__(224),6929 empty: __webpack_require__(225),6930 equals: __webpack_require__(226),6931 extend: __webpack_require__(227),6932 filter: __webpack_require__(228),6933 first: __webpack_require__(229),6934 fold: __webpack_require__(230),6935 foldMap: __webpack_require__(231),6936 head: __webpack_require__(232),6937 init: __webpack_require__(234),6938 last: __webpack_require__(235),6939 map: __webpack_require__(236),6940 merge: __webpack_require__(237),6941 option: __webpack_require__(238),6942 promap: __webpack_require__(239),6943 reduce: __webpack_require__(240),6944 reduceRight: __webpack_require__(241),6945 reject: __webpack_require__(242),6946 run: __webpack_require__(243),6947 runWith: __webpack_require__(244),6948 second: __webpack_require__(245),6949 sequence: __webpack_require__(246),6950 swap: __webpack_require__(247),6951 tail: __webpack_require__(248),6952 traverse: __webpack_require__(249),6953 valueOf: __webpack_require__(250)6954}6955/***/ }),6956/* 213 */6957/***/ (function(module, exports, __webpack_require__) {6958/** @license ISC License (c) copyright 2017 original and current authors */6959/** @author Ian Hofmann-Hicks (evil) */6960var curry = __webpack_require__(3)6961var fl = __webpack_require__(34)6962var isAlt = __webpack_require__(47)6963var isSameType = __webpack_require__(18)6964// alt : Alt m => m a -> m a -> m a6965function alt(m, x) {6966 if(!(isAlt(m) && isSameType(m, x))) {6967 throw new TypeError(6968 'alt: Both arguments must be Alts of the same type'6969 )6970 }6971 return (x[fl.alt] || x.alt).call(x, m)6972}6973module.exports = curry(alt)6974/***/ }),6975/* 214 */6976/***/ (function(module, exports, __webpack_require__) {6977/** @license ISC License (c) copyright 2016 original and current authors */6978/** @author Ian Hofmann-Hicks (evil) */6979var array = __webpack_require__(115)6980var curry = __webpack_require__(3)6981var isApplicative = __webpack_require__(50)6982var isArray = __webpack_require__(45)6983var isSameType = __webpack_require__(18)6984// ap :: Applicative m => m a -> m (a -> b) -> m b6985function ap(m, x) {6986 if(!((isApplicative(m) || isArray(m)) && isSameType(m, x))) {6987 throw new TypeError('ap: Both arguments must be Applys of the same type')6988 }6989 if(isArray(x)) {6990 return array.ap(m, x)6991 }6992 return x.ap(m)6993}6994module.exports = curry(ap)6995/***/ }),6996/* 215 */6997/***/ (function(module, exports, __webpack_require__) {6998/** @license ISC License (c) copyright 2016 original and current authors */6999/** @author Ian Hofmann-Hicks (evil) */7000var curry = __webpack_require__(3)7001var isBifunctor = __webpack_require__(57)7002var isFunction = __webpack_require__(4)7003var fl = __webpack_require__(34)7004function bimap(f, g, m) {7005 if(!(isFunction(f) && isFunction(g))) {7006 throw new TypeError(7007 'bimap: Functions required for first two arguments'7008 )7009 }7010 if(!isBifunctor(m)) {7011 throw new TypeError(7012 'bimap: Bifunctor required for third argument'7013 )7014 }7015 return (m[fl.bimap] || m.bimap).call(m, f, g)7016}7017module.exports = curry(bimap)7018/***/ }),7019/* 216 */7020/***/ (function(module, exports, __webpack_require__) {7021/** @license ISC License (c) copyright 2019 original and current authors */7022/** @author Dale Francis (dalefrancis88) */7023var curry = __webpack_require__(3)7024var isFunction = __webpack_require__(4)7025// bichain : bichain m => (e -> m c b) -> (a -> m c b) -> m e a -> m c b7026function bichain(f, g, m) {7027 if(!isFunction(f) || !isFunction(g)) {7028 throw new TypeError('bichain: First two arguments must be Sum Type returning functions')7029 }7030 if(m && isFunction(m.bichain)) {7031 return m.bichain.call(m, f, g)7032 }7033 throw new TypeError(7034 'bichain: Third argument must be a Sum Type'7035 )7036}7037module.exports = curry(bichain)7038/***/ }),7039/* 217 */7040/***/ (function(module, exports, __webpack_require__) {7041/** @license ISC License (c) copyright 2017 original and current authors */7042/** @author Ian Hofmann-Hicks (evil) */7043var Pair = __webpack_require__(17).proxy('Pair')7044var isFunction = __webpack_require__(4)7045var isSameType = __webpack_require__(18)7046function both(m) {7047 if(isFunction(m)) {7048 return function(x) {7049 if(!isSameType(Pair, x)) {7050 throw new TypeError('both: Pair required as input')7051 }7052 return x.bimap(m, m)7053 }7054 }7055 if(m && isFunction(m.both)) {7056 return m.both()7057 }7058 throw new TypeError('both: Strong Function or Profunctor required')7059}7060module.exports = both7061/***/ }),7062/* 218 */7063/***/ (function(module, exports, __webpack_require__) {7064/** @license ISC License (c) copyright 2016 original and current authors */7065/** @author Ian Hofmann-Hicks (evil) */7066var _chain = __webpack_require__(115).chain7067var curry = __webpack_require__(3)7068var isArray = __webpack_require__(45)7069var isChain = __webpack_require__(64)7070var isFunction = __webpack_require__(4)7071var fl = __webpack_require__(34)7072// chain : Chain m => (a -> m b) -> m a -> m b7073function chain(fn, m) {7074 if(!isFunction(fn)) {7075 throw new TypeError('chain: Chain returning function required for first argument')7076 }7077 if(!(isChain(m) || isArray(m))) {7078 throw new TypeError('chain: Chain of the same type required for second argument')7079 }7080 if(isArray(m)) {7081 return _chain(fn, m)7082 }7083 return (m[fl.chain] || m.chain).call(m, fn)7084}7085module.exports = curry(chain)7086/***/ }),7087/* 219 */7088/***/ (function(module, exports, __webpack_require__) {7089/** @license ISC License (c) copyright 2016 original and current authors */7090/** @author Ian Hofmann-Hicks (evil) */7091var curry = __webpack_require__(3)7092var isFunction = __webpack_require__(4)7093function coalesce(f, g, m) {7094 if(!(isFunction(f) && isFunction(g))) {7095 throw new TypeError(7096 'coalesce: Functions required for first two arguments'7097 )7098 }7099 if(m && isFunction(m.coalesce)) {7100 return m.coalesce(f, g)7101 }7102 throw new TypeError(7103 'coalesce: Sum Type required for third argument'7104 )7105}7106module.exports = curry(coalesce)7107/***/ }),7108/* 220 */7109/***/ (function(module, exports, __webpack_require__) {7110/** @license ISC License (c) copyright 2017 original and current authors */7111/** @author Ian Hofmann-Hicks (evil) */7112var curry = __webpack_require__(3)7113var isFunction = __webpack_require__(4)7114function compareWith(x, y, m) {7115 if(!(m && isFunction(m.compareWith))) {7116 throw new TypeError('compareWith: Equiv required for third argument')7117 }7118 return m.compareWith(x, y)7119}7120module.exports = curry(compareWith)7121/***/ }),7122/* 221 */7123/***/ (function(module, exports, __webpack_require__) {7124/** @license ISC License (c) copyright 2016 original and current authors */7125/** @author Ian Hofmann-Hicks (evil) */7126var curry = __webpack_require__(3)7127var isSameType = __webpack_require__(18)7128var isSemigroup = __webpack_require__(35)7129var fl = __webpack_require__(34)7130function concat(x, m) {7131 if(!(isSemigroup(m) && isSameType(x, m))) {7132 throw new TypeError(7133 'concat: Semigroups of the same type required for both arguments'7134 )7135 }7136 return (m[fl.concat] || m.concat).call(m, x)7137}7138module.exports = curry(concat)7139/***/ }),7140/* 222 */7141/***/ (function(module, exports, __webpack_require__) {7142/** @license ISC License (c) copyright 2016 original and current authors */7143/** @author Ian Hofmann-Hicks (evil) */7144var curry = __webpack_require__(3)7145var isArray = __webpack_require__(45)7146var isFunction = __webpack_require__(4)7147function cons(x, m) {7148 if(m && isFunction(m.cons)) {7149 return m.cons(x)7150 }7151 else if(isArray(m)) {7152 return [ x ].concat(m)7153 }7154 throw new TypeError('cons: List or Array required for second argument')7155}7156module.exports = curry(cons)7157/***/ }),7158/* 223 */7159/***/ (function(module, exports, __webpack_require__) {7160/** @license ISC License (c) copyright 2016 original and current authors */7161/** @author Ian Hofmann-Hicks (evil) */7162var compose = __webpack_require__(7)7163var curry = __webpack_require__(3)7164var isFunction = __webpack_require__(4)7165var isContravariant = __webpack_require__(66)7166var fl = __webpack_require__(34)7167// contramap : Functor f => (b -> a) -> f b -> f a7168function contramap(fn, m) {7169 if(!isFunction(fn)) {7170 throw new TypeError(7171 'contramap: Function required for first argument'7172 )7173 }7174 if(isFunction(m)) {7175 return compose(m, fn)7176 }7177 if(isContravariant(m)) {7178 return (m[fl.contramap] || m.contramap).call(m, fn)7179 }7180 throw new TypeError(7181 'contramap: Function or Contavariant Functor of the same type required for second argument'7182 )7183}7184module.exports = curry(contramap)7185/***/ }),7186/* 224 */7187/***/ (function(module, exports, __webpack_require__) {7188/** @license ISC License (c) copyright 2016 original and current authors */7189/** @author Ian Hofmann-Hicks (evil) */7190var curry = __webpack_require__(3)7191var isFunction = __webpack_require__(4)7192function either(lf, rf, m) {7193 if(!(isFunction(lf) && isFunction(rf))) {7194 throw new TypeError(7195 'either: First two arguments must be functions'7196 )7197 }7198 if(!(m && isFunction(m.either))) {7199 throw new TypeError(7200 'either: Last argument must be a Sum Type'7201 )7202 }7203 return m.either(lf, rf)7204}7205module.exports = curry(either)7206/***/ }),7207/* 225 */7208/***/ (function(module, exports, __webpack_require__) {7209/** @license ISC License (c) copyright 2017 original and current authors */7210/** @author Ian Hofmann-Hicks (evil) */7211var hasAlg = __webpack_require__(33)7212var isSameType = __webpack_require__(18)7213var fl = __webpack_require__(34)7214function empty(m) {7215 if(m && hasAlg('empty', m)) {7216 return (m[fl.empty] || m.empty).call(m)7217 }7218 if(m && hasAlg('empty', m.constructor)) {7219 return (m.constructor[fl.empty] || m.constructor.empty).call(m)7220 }7221 if(isSameType([], m)) {7222 return []7223 }7224 if(isSameType('', m)) {7225 return ''7226 }7227 if(isSameType({}, m)) {7228 return {}7229 }7230 throw new TypeError('empty: Monoid, Array, String or Object required')7231}7232module.exports = empty7233/***/ }),7234/* 226 */7235/***/ (function(module, exports, __webpack_require__) {7236/** @license ISC License (c) copyright 2017 original and current authors */7237/** @author Ian Hofmann-Hicks (evil) */7238var _equals = __webpack_require__(37)7239var curry = __webpack_require__(3)7240function equals(x, y) {7241 return _equals(x, y)7242}7243module.exports =7244 curry(equals)7245/***/ }),7246/* 227 */7247/***/ (function(module, exports, __webpack_require__) {7248/** @license ISC License (c) copyright 2017 original and current authors */7249/** @author Ian Hofmann-Hicks (evil) */7250var curry = __webpack_require__(3)7251var fl = __webpack_require__(34)7252var isExtend = __webpack_require__(72)7253var isFunction = __webpack_require__(4)7254// extend : Extend w => (w a -> b) -> w a -> w b7255function extend(fn, m) {7256 if(!isFunction(fn)) {7257 throw new TypeError('extend: Function required for first argument')7258 }7259 if(!isExtend(m)) {7260 throw new TypeError('extend: Extend required for second argument')7261 }7262 return (m[fl.extend] || m.extend).call(m, fn)7263}7264module.exports = curry(extend)7265/***/ }),7266/* 228 */7267/***/ (function(module, exports, __webpack_require__) {7268/** @license ISC License (c) copyright 2016 original and current authors */7269/** @author Ian Hofmann-Hicks (evil) */7270var curry = __webpack_require__(3)7271var isFunction = __webpack_require__(4)7272var isPredOrFunc = __webpack_require__(16)7273var isObject = __webpack_require__(31)7274var object = __webpack_require__(146)7275var predOrFunc = __webpack_require__(20)7276// filter : Filterable f => (a -> Boolean) -> f a -> f a7277function filter(pred, m) {7278 if(!isPredOrFunc(pred)) {7279 throw new TypeError('filter: Pred or predicate function required for first argument')7280 }7281 var fn =7282 function (x) { return predOrFunc(pred, x); }7283 if(m && isFunction(m.filter)) {7284 return m.filter(fn)7285 }7286 if(m && isObject(m)) {7287 return object.filter(fn, m)7288 }7289 throw new TypeError('filter: Filterable or Object required for second argument')7290}7291module.exports = curry(filter)7292/***/ }),7293/* 229 */7294/***/ (function(module, exports, __webpack_require__) {7295/** @license ISC License (c) copyright 2016 original and current authors */7296/** @author Ian Hofmann-Hicks (evil) */7297var Pair = __webpack_require__(17).proxy('Pair')7298var isFunction = __webpack_require__(4)7299var isSameType = __webpack_require__(18)7300var identity = function (x) { return x; }7301function first(m) {7302 if(isFunction(m)) {7303 return function(x) {7304 if(!isSameType(Pair, x)) {7305 throw new TypeError('first: Pair required as input')7306 }7307 return x.bimap(m, identity)7308 }7309 }7310 if(m && isFunction(m.first)) {7311 return m.first()7312 }7313 throw new TypeError('first: Arrow, Function or Star required')7314}7315module.exports = first7316/***/ }),7317/* 230 */7318/***/ (function(module, exports, __webpack_require__) {7319/** @license ISC License (c) copyright 2017 original and current authors */7320/** @author Ian Hofmann-Hicks (evil) */7321var _array = __webpack_require__(115)7322var isArray = __webpack_require__(45)7323var isFunction = __webpack_require__(4)7324// fold : Foldable f, Semigroup s => f s -> s7325function fold(m) {7326 if(isArray(m)) {7327 return _array.fold(m)7328 }7329 if(m && isFunction(m.fold)) {7330 return m.fold()7331 }7332 throw new TypeError('fold: Non-empty Foldable with at least one Semigroup is required')7333}7334module.exports = fold7335/***/ }),7336/* 231 */7337/***/ (function(module, exports, __webpack_require__) {7338/** @license ISC License (c) copyright 2018 original and current authors */7339/** @author Ian Hofmann-Hicks (evil) */7340var _array = __webpack_require__(115)7341var curry = __webpack_require__(3)7342var isArray = __webpack_require__(45)7343var isFunction = __webpack_require__(4)7344// foldMap :: Foldable f, Semigroup s => (a -> s) -> f a -> s7345function foldMap(fn, m) {7346 if(!isFunction(fn)) {7347 throw new TypeError(7348 'foldMap: Function returning Semigroups of the same type required for first argument'7349 )7350 }7351 if(isArray(m)) {7352 return _array.foldMap(fn, m)7353 }7354 if(m && isFunction(m.foldMap)) {7355 return m.foldMap(fn)7356 }7357 throw new TypeError(7358 'foldMap: Non-empty Foldable with at least one Semigroup required for second argument'7359 )7360}7361module.exports = curry(foldMap)7362/***/ }),7363/* 232 */7364/***/ (function(module, exports, __webpack_require__) {7365/** @license ISC License (c) copyright 2016 original and current authors */7366/** @author Ian Hofmann-Hicks (evil) */7367var cloneIterable = __webpack_require__(233)7368var isArray = __webpack_require__(45)7369var isFunction = __webpack_require__(4)7370var isIterable = __webpack_require__(80)7371var isString = __webpack_require__(36)7372var ref = __webpack_require__(129);7373var Nothing = ref.Nothing;7374var Just = ref.Just;7375function head(m) {7376 if(m && isFunction(m.head)) {7377 return m.head()7378 }7379 if(isArray(m) || isString(m)) {7380 return !m.length ? Nothing() : Just(m[0])7381 }7382 if(isIterable(m)) {7383 var cloned = cloneIterable(m)7384 var iterator = cloned[Symbol.iterator]()7385 var head = iterator.next()7386 return head.done ? Nothing() : Just(head.value)7387 }7388 throw new TypeError('head: List or iterable required')7389}7390module.exports = head7391/***/ }),7392/* 233 */7393/***/ (function(module, exports) {7394/** @license ISC License (c) copyright 2018 original and current authors */7395/** @author Henrique Limas (HenriqueLimas) */7396function cloneIterable(source) {7397 var copy = Object.create(Object.getPrototypeOf(source))7398 Object.assign(copy, source)7399 var symbols = Object.getOwnPropertySymbols(source)7400 symbols.forEach(function (symbol) {7401 copy[symbol] = source[symbol]7402 })7403 return copy7404}7405module.exports = cloneIterable7406/***/ }),7407/* 234 */7408/***/ (function(module, exports, __webpack_require__) {7409/** @license ISC License (c) copyright 2019 original and current authors */7410/** @author RichardForrester */7411var isFunction = __webpack_require__(4)7412var isNil = __webpack_require__(41)7413var ref = __webpack_require__(129);7414var Nothing = ref.Nothing;7415var Just = ref.Just;7416function init(m) {7417 if(!isNil(m)) {7418 if(isFunction(m.init)) {7419 return m.init()7420 }7421 if(isFunction(m.slice)) {7422 return m.length < 27423 ? Nothing()7424 : Just(m.slice(0, -1))7425 }7426 }7427 throw new TypeError('init: Argument must be an Array, String, or List')7428}7429module.exports = init7430/***/ }),7431/* 235 */7432/***/ (function(module, exports, __webpack_require__) {7433/** @license ISC License (c) copyright 2019 original and current authors */7434/** @author RichardForrester */7435var cloneIterable = __webpack_require__(233)7436var isArray = __webpack_require__(45)7437var isFunction = __webpack_require__(4)7438var isIterable = __webpack_require__(80)7439var isString = __webpack_require__(36)7440var ref = __webpack_require__(129);7441var Nothing = ref.Nothing;7442var Just = ref.Just;7443function last(m) {7444 if (m && isFunction(m.last)) {7445 return m.last()7446 }7447 if (isArray(m) || isString(m)) {7448 return !m.length ? Nothing() : Just(m[m.length - 1])7449 }7450 if (isIterable(m)) {7451 var cloned = cloneIterable(m)7452 var iterator = cloned[Symbol.iterator]()7453 var curr = iterator.next()7454 if (curr.done) {7455 return Nothing()7456 }7457 var val7458 while (!curr.done) {7459 val = curr.value7460 curr = iterator.next()7461 }7462 return Just(val)7463 }7464 throw new TypeError('last: Argument must be a List, String, or Iterable')7465}7466module.exports = last7467/***/ }),7468/* 236 */7469/***/ (function(module, exports, __webpack_require__) {7470/** @license ISC License (c) copyright 2016 original and current authors */7471/** @author Ian Hofmann-Hicks (evil) */7472var compose = __webpack_require__(7)7473var curry = __webpack_require__(3)7474var isArray = __webpack_require__(45)7475var isObject = __webpack_require__(31)7476var isFunction = __webpack_require__(4)7477var isFunctor= __webpack_require__(48)7478var array = __webpack_require__(115)7479var object = __webpack_require__(146)7480var fl = __webpack_require__(34)7481// map : Functor f => (a -> b) -> f a -> f b7482function map(fn, m) {7483 if(!isFunction(fn)) {7484 throw new TypeError('map: Function required for first argument')7485 }7486 if(isFunction(m)) {7487 return compose(fn, m)7488 }7489 if(isArray(m)) {7490 return array.map(fn, m)7491 }7492 if(m && isFunctor(m)) {7493 return (m[fl.map] || m.map).call(m, fn)7494 }7495 if(isObject(m)) {7496 return object.map(fn, m)7497 }7498 throw new TypeError('map: Object, Function or Functor of the same type required for second argument')7499}7500module.exports = curry(map)7501/***/ }),7502/* 237 */7503/***/ (function(module, exports, __webpack_require__) {7504/** @license ISC License (c) copyright 2016 original and current authors */7505/** @author Ian Hofmann-Hicks (evil) */7506var curry = __webpack_require__(3)7507var isFunction = __webpack_require__(4)7508function merge(fn, m) {7509 if(!isFunction(fn)) {7510 throw new TypeError('merge: Function required for first argument')7511 }7512 if(!(m && isFunction(m.merge))) {7513 throw new TypeError('merge: Pair or Tuple required for second argument')7514 }7515 return m.merge(fn)7516}7517module.exports = curry(merge)7518/***/ }),7519/* 238 */7520/***/ (function(module, exports, __webpack_require__) {7521/** @license ISC License (c) copyright 2016 original and current authors */7522/** @author Ian Hofmann-Hicks (evil) */7523var curry = __webpack_require__(3)7524var isFunction = __webpack_require__(4)7525function option(x, m) {7526 if(!(m && isFunction(m.option))) {7527 throw new TypeError('option: Last argument must be a Maybe, First or Last')7528 }7529 return m.option(x)7530}7531module.exports = curry(option)7532/***/ }),7533/* 239 */7534/***/ (function(module, exports, __webpack_require__) {7535/** @license ISC License (c) copyright 2016 original and current authors */7536/** @author Ian Hofmann-Hicks (evil) */7537var compose = __webpack_require__(7)7538var curry = __webpack_require__(3)7539var fl = __webpack_require__(34)7540var isFunction = __webpack_require__(4)7541var isProfunctor = __webpack_require__(91)7542function promap(l, r, m) {7543 if(!(isFunction(l) && isFunction(r))) {7544 throw new TypeError(7545 'promap: Functions required for first two arguments'7546 )7547 }7548 if(isFunction(m)) {7549 return compose(compose(r, m), l)7550 }7551 if(isProfunctor(m)) {7552 return (m[fl.promap] || m.promap).call(m, l, r)7553 }7554 throw new TypeError(7555 'promap: Function or Profunctor required for third argument'7556 )7557}7558module.exports = curry(promap)7559/***/ }),7560/* 240 */7561/***/ (function(module, exports, __webpack_require__) {7562/** @license ISC License (c) copyright 2016 original and current authors */7563/** @author Ian Hofmann-Hicks (evil) */7564var curry = __webpack_require__(3)7565var isFoldable = __webpack_require__(43)7566var isFunction = __webpack_require__(4)7567var fl = __webpack_require__(34)7568function reduce(fn, init, m) {7569 if(!isFunction(fn)) {7570 throw new TypeError(7571 'reduce: Function required for first argument'7572 )7573 }7574 if(!isFoldable(m)) {7575 throw new TypeError(7576 'reduce: Foldable required for third argument'7577 )7578 }7579 return (m[fl.reduce] || m.reduce).call(m, fn, init)7580}7581module.exports = curry(reduce)7582/***/ }),7583/* 241 */7584/***/ (function(module, exports, __webpack_require__) {7585/** @license ISC License (c) copyright 2017 original and current authors */7586/** @author Ian Hofmann-Hicks (evil) */7587var curry = __webpack_require__(3)7588var isFunction = __webpack_require__(4)7589function reduceRight(fn, init, m) {7590 if(!isFunction(fn)) {7591 throw new TypeError('reduceRight: Function required for first argument')7592 }7593 else if(!(m && isFunction(m.reduceRight))) {7594 throw new TypeError('reduceRight: Right Foldable required for third argument')7595 }7596 return m.reduceRight(fn, init)7597}7598module.exports = curry(reduceRight)7599/***/ }),7600/* 242 */7601/***/ (function(module, exports, __webpack_require__) {7602/** @license ISC License (c) copyright 2017 original and current authors */7603/** @author Ian Hofmann-Hicks (evil) */7604var curry = __webpack_require__(3)7605var isArray = __webpack_require__(45)7606var isPredOrFunc = __webpack_require__(16)7607var isFunction = __webpack_require__(4)7608var isObject = __webpack_require__(31)7609var object = __webpack_require__(146)7610var predOrFunc = __webpack_require__(20)7611var not =7612 function (fn) { return function (x) { return !fn(x); }; }7613// reject : Foldable f => (a -> Boolean) -> f a -> f a7614function reject(pred, m) {7615 if(!isPredOrFunc(pred)) {7616 throw new TypeError(7617 'reject: Pred or predicate function required for first argument'7618 )7619 }7620 var fn =7621 function (x) { return predOrFunc(pred, x); }7622 if(m && isFunction(m.reject)) {7623 return m.reject(fn)7624 }7625 if(isArray(m)) {7626 return m.filter(not(fn))7627 }7628 if(isObject(m)) {7629 return object.filter(not(fn), m)7630 }7631 throw new TypeError('reject: Foldable or Object required for second argument')7632}7633module.exports = curry(reject)7634/***/ }),7635/* 243 */7636/***/ (function(module, exports, __webpack_require__) {7637/** @license ISC License (c) copyright 2016 original and current authors */7638/** @author Ian Hofmann-Hicks (evil) */7639var isFunction = __webpack_require__(4)7640function run(m) {7641 if(!(m && isFunction(m.run))) {7642 throw new TypeError('run: IO required')7643 }7644 return m.run()7645}7646module.exports = run7647/***/ }),7648/* 244 */7649/***/ (function(module, exports, __webpack_require__) {7650/** @license ISC License (c) copyright 2016 original and current authors */7651/** @author Ian Hofmann-Hicks (evil) */7652var curry = __webpack_require__(3)7653var isFunction = __webpack_require__(4)7654function runWith(x, m) {7655 if(!(m && isFunction(m.runWith))) {7656 throw new TypeError('runWith: Arrow, Endo, Pred, Reader, Star or State required for second argument')7657 }7658 return m.runWith(x)7659}7660module.exports = curry(runWith)7661/***/ }),7662/* 245 */7663/***/ (function(module, exports, __webpack_require__) {7664/** @license ISC License (c) copyright 2016 original and current authors */7665/** @author Ian Hofmann-Hicks (evil) */7666var Pair = __webpack_require__(17).proxy('Pair')7667var isFunction = __webpack_require__(4)7668var isSameType = __webpack_require__(18)7669var identity = function (x) { return x; }7670function second(m) {7671 if(isFunction(m)) {7672 return function(x) {7673 if(!isSameType(Pair, x)) {7674 throw new TypeError('second: Pair required as input')7675 }7676 return x.bimap(identity, m)7677 }7678 }7679 if(m && isFunction(m.second)) {7680 return m.second()7681 }7682 throw new TypeError('second: Strong Function or Profunctor required')7683}7684module.exports = second7685/***/ }),7686/* 246 */7687/***/ (function(module, exports, __webpack_require__) {7688/** @license ISC License (c) copyright 2016 original and current authors */7689/** @author Ian Hofmann-Hicks (evil) */7690var array = __webpack_require__(115)7691var curry = __webpack_require__(3)7692var isArray = __webpack_require__(45)7693var isApplicative = __webpack_require__(50)7694var isFunction = __webpack_require__(4)7695function sequence(af, m) {7696 if(!(isApplicative(af) || isFunction(af))) {7697 throw new TypeError(7698 'sequence: Applicative TypeRep or Apply returning function required for first argument'7699 )7700 }7701 if(m && isFunction(m.sequence)) {7702 return m.sequence(af)7703 }7704 if(isArray(m)) {7705 return array.sequence(af, m)7706 }7707 throw new TypeError('sequence: Traversable or Array required for second argument')7708}7709module.exports = curry(sequence)7710/***/ }),7711/* 247 */7712/***/ (function(module, exports, __webpack_require__) {7713/** @license ISC License (c) copyright 2016 original and current authors */7714/** @author Ian Hofmann-Hicks (evil) */7715var curry = __webpack_require__(3)7716var isFunction = __webpack_require__(4)7717function swap(f, g, m) {7718 if(!(isFunction(f) && isFunction(g))) {7719 throw new TypeError(7720 'swap: Function required for first two arguments'7721 )7722 }7723 if(m && isFunction(m.swap)) {7724 return m.swap(f, g)7725 }7726 throw new TypeError(7727 'swap: Async, Either, Pair or Result required for third arguments'7728 )7729}7730module.exports = curry(swap)7731/***/ }),7732/* 248 */7733/***/ (function(module, exports, __webpack_require__) {7734/** @license ISC License (c) copyright 2016 original and current authors */7735/** @author Ian Hofmann-Hicks (evil) */7736var isFunction = __webpack_require__(4)7737var isNil = __webpack_require__(41)7738var ref = __webpack_require__(129);7739var Nothing = ref.Nothing;7740var Just = ref.Just;7741function tail(m) {7742 if(!isNil(m)) {7743 if(isFunction(m.tail)) {7744 return m.tail()7745 }7746 if(isFunction(m.slice)) {7747 return m.length < 27748 ? Nothing()7749 : Just(m.slice(1))7750 }7751 }7752 throw new TypeError('tail: Array, String or List required')7753}7754module.exports = tail7755/***/ }),7756/* 249 */7757/***/ (function(module, exports, __webpack_require__) {7758/** @license ISC License (c) copyright 2016 original and current authors */7759/** @author Ian Hofmann-Hicks (evil) */7760var array = __webpack_require__(115)7761var curry = __webpack_require__(3)7762var isApplicative = __webpack_require__(50)7763var isArray = __webpack_require__(45)7764var isFunction = __webpack_require__(4)7765function traverse(af, fn, m) {7766 if(!(isApplicative(af) || isFunction(af))) {7767 throw new TypeError(7768 'traverse: Applicative TypeRep or Apply returning function required for first argument'7769 )7770 }7771 if(!isFunction(fn)) {7772 throw new TypeError(7773 'traverse: Apply returning function required for second argument'7774 )7775 }7776 if(m && isFunction(m.traverse)) {7777 return m.traverse(af, fn)7778 }7779 if(isArray(m)) {7780 return array.traverse(af, fn, m)7781 }7782 throw new TypeError('traverse: Traversable or Array required for third argument')7783}7784module.exports = curry(traverse)7785/***/ }),7786/* 250 */7787/***/ (function(module, exports, __webpack_require__) {7788/** @license ISC License (c) copyright 2016 original and current authors */7789/** @author Ian Hofmann-Hicks (evil) */7790var isNil = __webpack_require__(41)7791function valueOf(m) {7792 if(isNil(m)) {7793 return m7794 }7795 return m.valueOf()7796}7797module.exports = valueOf7798/***/ }),7799/* 251 */7800/***/ (function(module, exports, __webpack_require__) {7801/** @license ISC License (c) copyright 2016 original and current authors */7802/** @author Ian Hofmann-Hicks (evil) */7803var curry = __webpack_require__(3)7804var isFunction = __webpack_require__(4)7805function evalWith(x, m) {7806 if(!(m && isFunction(m.evalWith))) {7807 throw new TypeError('evalWith: State required for second argument')7808 }7809 return m.evalWith(x)7810}7811module.exports = curry(evalWith)7812/***/ }),7813/* 252 */7814/***/ (function(module, exports, __webpack_require__) {7815/** @license ISC License (c) copyright 2016 original and current authors */7816/** @author Ian Hofmann-Hicks (evil) */7817var curry = __webpack_require__(3)7818var isFunction = __webpack_require__(4)7819function execWith(x, m) {7820 if(!(m && isFunction(m.execWith))) {7821 throw new TypeError('execWith: State required for second argument')7822 }7823 return m.execWith(x)7824}7825module.exports = curry(execWith)7826/***/ }),7827/* 253 */7828/***/ (function(module, exports, __webpack_require__) {7829/** @license ISC License (c) copyright 2016 original and current authors */7830/** @author Ian Hofmann-Hicks (evil) */7831var isFunction = __webpack_require__(4)7832function fst(m) {7833 if(!(m && isFunction(m.fst))) {7834 throw new TypeError('fst: Pair required')7835 }7836 return m.fst()7837}7838module.exports = fst7839/***/ }),7840/* 254 */7841/***/ (function(module, exports, __webpack_require__) {7842/** @license ISC License (c) copyright 2016 original and current authors */7843/** @author Ian Hofmann-Hicks (evil) */7844var isFunction = __webpack_require__(4)7845function log(m) {7846 if(!(m && isFunction(m.log))) {7847 throw new TypeError('log: Writer required')7848 }7849 return m.log()7850}7851module.exports = log7852/***/ }),7853/* 255 */7854/***/ (function(module, exports, __webpack_require__) {7855/** @license ISC License (c) copyright 2018 original and current authors */7856/** @author Karthik Iyengar (karthikiyengar) */7857var curry = __webpack_require__(3)7858var isFunction = __webpack_require__(4)7859var isInteger = __webpack_require__(39)7860var isSameType = __webpack_require__(18)7861var Tuple = __webpack_require__(141)7862var validTuple = function (n, m) { return isSameType(Tuple(n), m); }7863function runMap(m, fns) {7864 var n = fns.length7865 if (!validTuple(n, m)) {7866 throw new TypeError(("nmap: " + n + "-Tuple required"))7867 }7868 fns.forEach(function (fn) {7869 if (!isFunction(fn)) {7870 throw new TypeError('nmap: Functions required for all arguments')7871 }7872 })7873 return m.mapAll.apply(m, fns)7874}7875var withLength = function (n, fn) {7876 return Object.defineProperty(fn, 'length', {7877 value: n7878 })7879}7880function nmap(n) {7881 if (!(isInteger(n) && n >= 1)) {7882 throw new TypeError('nmap: Integer required for first argument')7883 }7884 switch (n) {7885 case 1:7886 return function (a, m) { return runMap(m, [ a ]); }7887 case 2:7888 return function (a, b, m) { return runMap(m, [ a, b ]); }7889 case 3:7890 return function (a, b, c, m) { return runMap(m, [ a, b, c ]); }7891 case 4:7892 return function (a, b, c, d, m) { return runMap(m, [ a, b, c, d ]); }7893 case 5:7894 return function (a, b, c, d, e, m) { return runMap(m, [ a, b, c, d, e ]); }7895 case 6:7896 return function (a, b, c, d, e, f, m) { return runMap(m, [ a, b, c, d, e, f ]); }7897 case 7:7898 return function (a, b, c, d, e, f, g, m) { return runMap(m, [ a, b, c, d, e, f, g ]); }7899 case 8:7900 return function (a, b, c, d, e, f, g, h, m) { return runMap(m, [ a, b, c, d, e, f, g, h ]); }7901 case 9:7902 return function (a, b, c, d, e, f, g, h, i, m) { return runMap(m, [ a, b, c, d, e, f, g, h, i ]); }7903 case 10:7904 return function (a, b, c, d, e, f, g, h, i, j, m) { return runMap(m, [ a, b, c, d, e, f, g, h, i, j ]); }7905 default:7906 return withLength(n + 1, function() {7907 var parts = [].slice.call(arguments)7908 return runMap(parts[parts.length - 1], parts.slice(0, parts.length - 1))7909 })7910 }7911}7912module.exports =7913 curry(nmap)7914/***/ }),7915/* 256 */7916/***/ (function(module, exports, __webpack_require__) {7917/** @license ISC License (c) copyright 2018 original and current authors */7918/** @author Karthik Iyengar (karthikiyengar) */7919var isFunction = __webpack_require__(4)7920var curry = __webpack_require__(3)7921function project(index, m) {7922 if(!(m && isFunction(m.project))) {7923 throw new TypeError('project: Tuple required')7924 }7925 return m.project(index)7926}7927module.exports = curry(project)7928/***/ }),7929/* 257 */7930/***/ (function(module, exports, __webpack_require__) {7931/** @license ISC License (c) copyright 2018 original and current authors */7932/** @author Ian Hofmann-Hicks (evil) */7933var curry = __webpack_require__(3)7934var isSameType = __webpack_require__(18)7935var Async = __webpack_require__(17).proxy('Async')7936function race(m, a) {7937 if(!(isSameType(m, a) && isSameType(Async, m))) {7938 throw new TypeError('race: Both arguments must be Asyncs')7939 }7940 return a.race(m)7941}7942module.exports =7943 curry(race)7944/***/ }),7945/* 258 */7946/***/ (function(module, exports, __webpack_require__) {7947/** @license ISC License (c) copyright 2016 original and current authors */7948/** @author Ian Hofmann-Hicks (evil) */7949var isFunction = __webpack_require__(4)7950function read(m) {7951 if(!(m && isFunction(m.read))) {7952 throw new TypeError('read: Writer required')7953 }7954 return m.read()7955}7956module.exports = read7957/***/ }),7958/* 259 */7959/***/ (function(module, exports, __webpack_require__) {7960/** @license ISC License (c) copyright 2016 original and current authors */7961/** @author Ian Hofmann-Hicks (evil) */7962var isFunction = __webpack_require__(4)7963function snd(m) {7964 if(!(m && isFunction(m.snd))) {7965 throw new TypeError('snd: Pair required')7966 }7967 return m.snd()7968}7969module.exports = snd7970/***/ }),7971/* 260 */7972/***/ (function(module, exports, __webpack_require__) {7973/** @license ISC License (c) copyright 2017 original and current authors */7974/** @author Ian Hofmann-Hicks (evil) */7975var List = __webpack_require__(127)7976var curry = __webpack_require__(3)7977var isArray = __webpack_require__(45)7978var isFunction = __webpack_require__(4)7979// arrayToList : [ a ] -> List a7980// arrayToList : (a -> [ b ]) -> a -> List b7981function arrayToList(array) {7982 if(isArray(array)) {7983 return List.fromArray(array)7984 }7985 else if(isFunction(array)) {7986 return function(x) {7987 var g = array(x)7988 if(!isArray(g)) {7989 throw new TypeError('arrayToList: Array returning function required')7990 }7991 return List.fromArray(g)7992 }7993 }7994 throw new TypeError('arrayToList: Array or Array returning function required')7995}7996module.exports = curry(arrayToList)7997/***/ }),7998/* 261 */7999/***/ (function(module, exports, __webpack_require__) {8000/** @license ISC License (c) copyright 2018 original and current authors */8001/** @author Dale Francis */8002var curry = __webpack_require__(3)8003var isSameType = __webpack_require__(18)8004var isFunction = __webpack_require__(4)8005var Async = __webpack_require__(17).proxy('Async')8006var toPromise = function (m) {8007 if(!isSameType(Async, m)) {8008 throw new TypeError('asyncToPromise: Async or a function returning an Async required')8009 }8010 return m.toPromise()8011}8012// asyncToPromise :: m e a -> Promise a e8013// asyncToPromise :: (a -> m e b) -> a -> Promise b e8014function asyncToPromise(m) {8015 return isFunction(m)8016 ? function (x) { return toPromise(m(x)); }8017 : toPromise(m)8018}8019module.exports = curry(asyncToPromise)8020/***/ }),8021/* 262 */8022/***/ (function(module, exports, __webpack_require__) {8023/** @license ISC License (c) copyright 2017 original and current authors */8024/** @author Ian Hofmann-Hicks (evil) */8025var Async = __webpack_require__(114)8026var Either = __webpack_require__(17).proxy('Either')8027var curry = __webpack_require__(3)8028var isFunction = __webpack_require__(4)8029var isSameType = __webpack_require__(18)8030var applyTransform = function (either) { return either.either(Async.Rejected, Async.Resolved); }8031// eitherToAsync : Either e a -> Async e a8032// eitherToAsync : (a -> Either e b) -> a -> Async e b8033function eitherToAsync(either) {8034 if(isFunction(either)) {8035 return function(x) {8036 var m = either(x)8037 if(!isSameType(Either, m)) {8038 throw new TypeError('eitherToAsync: Either returning function required')8039 }8040 return applyTransform(m)8041 }8042 }8043 if(isSameType(Either, either)) {8044 return applyTransform(either)8045 }8046 throw new TypeError('eitherToAsync: Either or Either returning function required')8047}8048module.exports = curry(eitherToAsync)8049/***/ }),8050/* 263 */8051/***/ (function(module, exports, __webpack_require__) {8052/** @license ISC License (c) copyright 2017 original and current authors */8053/** @author Ian Hofmann-Hicks (evil) */8054var First = __webpack_require__(206)8055var Either = __webpack_require__(17).proxy('Either')8056var curry = __webpack_require__(3)8057var isFunction = __webpack_require__(4)8058var isSameType = __webpack_require__(18)8059var applyTransform = function (either) { return either.either(First.empty, First); }8060// eitherToFirst : Either b a -> First a8061// eitherToFirst : (a -> Either c b) -> a -> First b8062function eitherToFirst(either) {8063 if(isFunction(either)) {8064 return function(x) {8065 var m = either(x)8066 if(!isSameType(Either, m)) {8067 throw new TypeError('eitherToFirst: Either returning function required')8068 }8069 return applyTransform(m)8070 }8071 }8072 if(isSameType(Either, either)) {8073 return applyTransform(either)8074 }8075 throw new TypeError('eitherToFirst: Either or Either returning function required')8076}8077module.exports = curry(eitherToFirst)8078/***/ }),8079/* 264 */8080/***/ (function(module, exports, __webpack_require__) {8081/** @license ISC License (c) copyright 2017 original and current authors */8082/** @author Ian Hofmann-Hicks (evil) */8083var Last = __webpack_require__(207)8084var Either = __webpack_require__(17).proxy('Either')8085var curry = __webpack_require__(3)8086var isFunction = __webpack_require__(4)8087var isSameType = __webpack_require__(18)8088var applyTransform = function (either) { return either.either(Last.empty, Last); }8089// eitherToLast : Either b a -> Last a8090// eitherToLast : (a -> Either c b) -> a -> Last b8091function eitherToLast(either) {8092 if(isFunction(either)) {8093 return function(x) {8094 var m = either(x)8095 if(!isSameType(Either, m)) {8096 throw new TypeError('eitherToLast: Either returning function required')8097 }8098 return applyTransform(m)8099 }8100 }8101 if(isSameType(Either, either)) {8102 return applyTransform(either)8103 }8104 throw new TypeError('eitherToLast: Either or Either returning function required')8105}8106module.exports = curry(eitherToLast)8107/***/ }),8108/* 265 */8109/***/ (function(module, exports, __webpack_require__) {8110/** @license ISC License (c) copyright 2017 original and current authors */8111/** @author Ian Hofmann-Hicks (evil) */8112var Maybe = __webpack_require__(130)8113var Either = __webpack_require__(17).proxy('Either')8114var curry = __webpack_require__(3)8115var isFunction = __webpack_require__(4)8116var isSameType = __webpack_require__(18)8117var applyTransform = function (either) { return either.either(Maybe.Nothing, Maybe.Just); }8118// eitherToMaybe : Either b a -> Maybe a8119// eitherToMaybe : (a -> Either c b) -> a -> Maybe b8120function eitherToMaybe(either) {8121 if(isFunction(either)) {8122 return function(x) {8123 var m = either(x)8124 if(!isSameType(Either, m)) {8125 throw new TypeError('eitherToMaybe: Either returning function required')8126 }8127 return applyTransform(m)8128 }8129 }8130 if(isSameType(Either, either)) {8131 return applyTransform(either)8132 }8133 throw new TypeError('eitherToMaybe: Either or Either returning function required')8134}8135module.exports = curry(eitherToMaybe)8136/***/ }),8137/* 266 */8138/***/ (function(module, exports, __webpack_require__) {8139/** @license ISC License (c) copyright 2017 original and current authors */8140/** @author Ian Hofmann-Hicks (evil) */8141var Result = __webpack_require__(137)8142var Either = __webpack_require__(17).proxy('Either')8143var curry = __webpack_require__(3)8144var isFunction = __webpack_require__(4)8145var isSameType = __webpack_require__(18)8146var applyTransform = function (either) { return either.either(Result.Err, Result.Ok); }8147// eitherToResult : Either e a -> Result e a8148// eitherToResult : (a -> Either e b) -> a -> Result e b8149function eitherToResult(either) {8150 if(isFunction(either)) {8151 return function(x) {8152 var m = either(x)8153 if(!isSameType(Either, m)) {8154 throw new TypeError('eitherToResult: Either returning function required')8155 }8156 return applyTransform(m)8157 }8158 }8159 if(isSameType(Either, either)) {8160 return applyTransform(either)8161 }8162 throw new TypeError('eitherToResult: Either or Either returning function required')8163}8164module.exports = curry(eitherToResult)8165/***/ }),8166/* 267 */8167/***/ (function(module, exports, __webpack_require__) {8168/** @license ISC License (c) copyright 2017 original and current authors */8169/** @author Ian Hofmann-Hicks (evil) */8170var Async = __webpack_require__(114)8171var First = __webpack_require__(17).proxy('First')8172var curry = __webpack_require__(3)8173var isFunction = __webpack_require__(4)8174var isSameType = __webpack_require__(18)8175var constant = function (x) { return function () { return x; }; }8176var applyTransform = function (left, first) { return first.valueOf().either(8177 constant(Async.Rejected(left)),8178 Async.Resolved8179 ); }8180// firstToAsync : e -> First a -> Async e a8181// firstToAsync : e -> (a -> First b) -> a -> Async e b8182function firstToAsync(left, first) {8183 if(isFunction(first)) {8184 return function(x) {8185 var m = first(x)8186 if(!isSameType(First, m)) {8187 throw new TypeError('firstToAsync: First returning function required for second argument')8188 }8189 return applyTransform(left, m)8190 }8191 }8192 if(isSameType(First, first)) {8193 return applyTransform(left, first)8194 }8195 throw new TypeError('firstToAsync: First or First returning function required for second argument')8196}8197module.exports = curry(firstToAsync)8198/***/ }),8199/* 268 */8200/***/ (function(module, exports, __webpack_require__) {8201/** @license ISC License (c) copyright 2017 original and current authors */8202/** @author Ian Hofmann-Hicks (evil) */8203var Either = __webpack_require__(121)8204var First = __webpack_require__(17).proxy('First')8205var curry = __webpack_require__(3)8206var isFunction = __webpack_require__(4)8207var isSameType = __webpack_require__(18)8208var constant = function (x) { return function () { return x; }; }8209var applyTransform = function (left, first) { return first.valueOf().either(8210 constant(Either.Left(left)),8211 Either.Right8212 ); }8213// firstToEither : c -> First a -> Either c a8214// firstToEither : c -> (a -> First b) -> a -> Either c b8215function firstToEither(left, first) {8216 if(isFunction(first)) {8217 return function(x) {8218 var m = first(x)8219 if(!isSameType(First, m)) {8220 throw new TypeError('firstToEither: First returning function required for second argument')8221 }8222 return applyTransform(left, m)8223 }8224 }8225 if(isSameType(First, first)) {8226 return applyTransform(left, first)8227 }8228 throw new TypeError('firstToEither: First or First returning function required for second argument')8229}8230module.exports = curry(firstToEither)8231/***/ }),8232/* 269 */8233/***/ (function(module, exports, __webpack_require__) {8234/** @license ISC License (c) copyright 2017 original and current authors */8235/** @author Ian Hofmann-Hicks (evil) */8236var Last = __webpack_require__(207)8237var First = __webpack_require__(17).proxy('First')8238var curry = __webpack_require__(3)8239var isFunction = __webpack_require__(4)8240var isSameType = __webpack_require__(18)8241var applyTransform = function (first) { return Last(first.valueOf()); }8242// firstToLast : First a -> Last a8243// firstToLast : (a -> First b) -> a -> Last b8244function firstToLast(first) {8245 if(isFunction(first)) {8246 return function(x) {8247 var m = first(x)8248 if(!isSameType(First, m)) {8249 throw new TypeError('firstToLast: First returning function required')8250 }8251 return applyTransform(m)8252 }8253 }8254 if(isSameType(First, first)) {8255 return applyTransform(first)8256 }8257 throw new TypeError('firstToLast: First or First returning function required')8258}8259module.exports = curry(firstToLast)8260/***/ }),8261/* 270 */8262/***/ (function(module, exports, __webpack_require__) {8263/** @license ISC License (c) copyright 2017 original and current authors */8264/** @author Ian Hofmann-Hicks (evil) */8265var First = __webpack_require__(17).proxy('First')8266var curry = __webpack_require__(3)8267var isFunction = __webpack_require__(4)8268var isSameType = __webpack_require__(18)8269var applyTransform = function (first) { return first.valueOf(); }8270// firstToMaybe : First a -> Maybe a8271// firstToMaybe : (a -> First b) -> a -> Maybe b8272function firstToMaybe(first) {8273 if(isFunction(first)) {8274 return function(x) {8275 var m = first(x)8276 if(!isSameType(First, m)) {8277 throw new TypeError('firstToMaybe: First returning function required')8278 }8279 return applyTransform(m)8280 }8281 }8282 if(isSameType(First, first)) {8283 return applyTransform(first)8284 }8285 throw new TypeError('firstToMaybe: First or First returning function required')8286}8287module.exports = curry(firstToMaybe)8288/***/ }),8289/* 271 */8290/***/ (function(module, exports, __webpack_require__) {8291/** @license ISC License (c) copyright 2017 original and current authors */8292/** @author Ian Hofmann-Hicks (evil) */8293var Result = __webpack_require__(137)8294var First = __webpack_require__(17).proxy('First')8295var curry = __webpack_require__(3)8296var isFunction = __webpack_require__(4)8297var isSameType = __webpack_require__(18)8298var constant = function (x) { return function () { return x; }; }8299var applyTransform = function (left, first) { return first.valueOf().either(8300 constant(Result.Err(left)),8301 Result.Ok8302 ); }8303// firstToResult : c -> First a -> Result c a8304// firstToResult : c -> (a -> First b) -> a -> Result c b8305function firstToResult(left, first) {8306 if(isFunction(first)) {8307 return function(x) {8308 var m = first(x)8309 if(!isSameType(First, m)) {8310 throw new TypeError('firstToResult: First returning function required for second argument')8311 }8312 return applyTransform(left, m)8313 }8314 }8315 if(isSameType(First, first)) {8316 return applyTransform(left, first)8317 }8318 throw new TypeError('firstToResult: First or First returning function required for second argument')8319}8320module.exports = curry(firstToResult)8321/***/ }),8322/* 272 */8323/***/ (function(module, exports, __webpack_require__) {8324/** @license ISC License (c) copyright 2017 original and current authors */8325/** @author Ian Hofmann-Hicks (evil) */8326var Async = __webpack_require__(114)8327var Last = __webpack_require__(17).proxy('Last')8328var curry = __webpack_require__(3)8329var isFunction = __webpack_require__(4)8330var isSameType = __webpack_require__(18)8331var constant = function (x) { return function () { return x; }; }8332var applyTransform = function (left, last) { return last.valueOf().either(8333 constant(Async.Rejected(left)),8334 Async.Resolved8335 ); }8336// lastToAsync : e -> Last a -> Async e a8337// lastToAsync : e -> (a -> Last b) -> a -> Async e b8338function lastToAsync(left, last) {8339 if(isFunction(last)) {8340 return function(x) {8341 var m = last(x)8342 if(!isSameType(Last, m)) {8343 throw new TypeError('lastToAsync: Last returning function required for second argument')8344 }8345 return applyTransform(left, m)8346 }8347 }8348 if(isSameType(Last, last)) {8349 return applyTransform(left, last)8350 }8351 throw new TypeError('lastToAsync: Last or Last returning function required for second argument')8352}8353module.exports = curry(lastToAsync)8354/***/ }),8355/* 273 */8356/***/ (function(module, exports, __webpack_require__) {8357/** @license ISC License (c) copyright 2017 original and current authors */8358/** @author Ian Hofmann-Hicks (evil) */8359var Either = __webpack_require__(121)8360var Last = __webpack_require__(17).proxy('Last')8361var curry = __webpack_require__(3)8362var isFunction = __webpack_require__(4)8363var isSameType = __webpack_require__(18)8364var constant = function (x) { return function () { return x; }; }8365var applyTransform = function (left, last) { return last.valueOf().either(8366 constant(Either.Left(left)),8367 Either.Right8368 ); }8369// lastToEither : c -> Last a -> Either c a8370// lastToEither : c -> (a -> Last b) -> a -> Either c b8371function lastToEither(left, last) {8372 if(isFunction(last)) {8373 return function(x) {8374 var m = last(x)8375 if(!isSameType(Last, m)) {8376 throw new TypeError('lastToEither: Last returning function required for second argument')8377 }8378 return applyTransform(left, m)8379 }8380 }8381 if(isSameType(Last, last)) {8382 return applyTransform(left, last)8383 }8384 throw new TypeError('lastToEither: Last or Last returning function required for second argument')8385}8386module.exports = curry(lastToEither)8387/***/ }),8388/* 274 */8389/***/ (function(module, exports, __webpack_require__) {8390/** @license ISC License (c) copyright 2017 original and current authors */8391/** @author Ian Hofmann-Hicks (evil) */8392var First = __webpack_require__(206)8393var Last = __webpack_require__(17).proxy('Last')8394var curry = __webpack_require__(3)8395var isFunction = __webpack_require__(4)8396var isSameType = __webpack_require__(18)8397var applyTransform = function (last) { return First(last.valueOf()); }8398// lastToFirst : Last a -> First a8399// lastToFirst : (a -> Last b) -> a -> First b8400function lastToFirst(last) {8401 if(isFunction(last)) {8402 return function(x) {8403 var m = last(x)8404 if(!isSameType(Last, m)) {8405 throw new TypeError('lastToFirst: Last returning function required')8406 }8407 return applyTransform(m)8408 }8409 }8410 if(isSameType(Last, last)) {8411 return applyTransform(last)8412 }8413 throw new TypeError('lastToFirst: Last or Last returning function required')8414}8415module.exports = curry(lastToFirst)8416/***/ }),8417/* 275 */8418/***/ (function(module, exports, __webpack_require__) {8419/** @license ISC License (c) copyright 2017 original and current authors */8420/** @author Ian Hofmann-Hicks (evil) */8421var Last = __webpack_require__(17).proxy('Last')8422var curry = __webpack_require__(3)8423var isFunction = __webpack_require__(4)8424var isSameType = __webpack_require__(18)8425var applyTransform = function (last) { return last.valueOf(); }8426// lastToMaybe : Last a -> Maybe a8427// lastToMaybe : (a -> Last b) -> a -> Maybe b8428function lastToMaybe(last) {8429 if(isFunction(last)) {8430 return function(x) {8431 var m = last(x)8432 if(!isSameType(Last, m)) {8433 throw new TypeError('lastToMaybe: Last returning function required')8434 }8435 return applyTransform(m)8436 }8437 }8438 if(isSameType(Last, last)) {8439 return applyTransform(last)8440 }8441 throw new TypeError('lastToMaybe: Last or Last returning function required')8442}8443module.exports = curry(lastToMaybe)8444/***/ }),8445/* 276 */8446/***/ (function(module, exports, __webpack_require__) {8447/** @license ISC License (c) copyright 2017 original and current authors */8448/** @author Ian Hofmann-Hicks (evil) */8449var Result = __webpack_require__(137)8450var Last = __webpack_require__(17).proxy('Last')8451var curry = __webpack_require__(3)8452var isFunction = __webpack_require__(4)8453var isSameType = __webpack_require__(18)8454var constant = function (x) { return function () { return x; }; }8455var applyTransform = function (left, last) { return last.valueOf().either(8456 constant(Result.Err(left)),8457 Result.Ok8458 ); }8459// lastToResult : c -> Last a -> Result c a8460// lastToResult : c -> (a -> Last b) -> a -> Result c b8461function lastToResult(left, last) {8462 if(isFunction(last)) {8463 return function(x) {8464 var m = last(x)8465 if(!isSameType(Last, m)) {8466 throw new TypeError('lastToResult: Last returning function required for second argument')8467 }8468 return applyTransform(left, m)8469 }8470 }8471 if(isSameType(Last, last)) {8472 return applyTransform(left, last)8473 }8474 throw new TypeError('lastToResult: Last or Last returning function required for second argument')8475}8476module.exports = curry(lastToResult)8477/***/ }),8478/* 277 */8479/***/ (function(module, exports, __webpack_require__) {8480/** @license ISC License (c) copyright 2017 original and current authors */8481/** @author Ian Hofmann-Hicks (evil) */8482var List = __webpack_require__(127)8483var curry = __webpack_require__(3)8484var isFunction = __webpack_require__(4)8485var isSameType = __webpack_require__(18)8486// listToArray : List a -> [ a ]8487// listToArray : (a -> List b) -> a -> [ b ]8488function listToArray(list) {8489 if(isFunction(list)) {8490 return function(x) {8491 var m = list(x)8492 if(!isSameType(List, m)) {8493 throw new TypeError('listToArray: List returning function required')8494 }8495 return m.toArray()8496 }8497 }8498 if(isSameType(List, list)) {8499 return list.toArray()8500 }8501 throw new TypeError('listToArray: List or List returning function required')8502}8503module.exports = curry(listToArray)8504/***/ }),8505/* 278 */8506/***/ (function(module, exports, __webpack_require__) {8507/** @license ISC License (c) copyright 2019 original and current authors */8508/** @author Ian Hofmann-Hicks (evil) */8509var Maybe = __webpack_require__(130)8510var curry = __webpack_require__(3)8511var isFunction = __webpack_require__(4)8512var isSameType = __webpack_require__(18)8513var applyTransform = function (maybe) { return maybe.either(function () { return []; }, function (x) { return [ x ]; }); }8514var err =8515 'maybeToArray: Argument must be a Maybe instanstace or a Maybe returning function'8516function maybeToArray(maybe) {8517 if(isFunction(maybe)) {8518 return function(x) {8519 var m = maybe(x)8520 if(!isSameType(Maybe, m)) {8521 throw new TypeError(err)8522 }8523 return applyTransform(m)8524 }8525 }8526 if(isSameType(Maybe, maybe)) {8527 return applyTransform(maybe)8528 }8529 throw new TypeError(err)8530}8531module.exports = curry(maybeToArray)8532/***/ }),8533/* 279 */8534/***/ (function(module, exports, __webpack_require__) {8535/** @license ISC License (c) copyright 2017 original and current authors */8536/** @author Ian Hofmann-Hicks (evil) */8537var Async = __webpack_require__(114)8538var Maybe = __webpack_require__(17).proxy('Maybe')8539var curry = __webpack_require__(3)8540var isFunction = __webpack_require__(4)8541var isSameType = __webpack_require__(18)8542var constant = function (x) { return function () { return x; }; }8543var applyTransform = function (left, maybe) { return maybe.either(8544 constant(Async.Rejected(left)),8545 Async.Resolved8546 ); }8547// maybeToAsync : e -> Maybe a -> Async e a8548// maybeToAsync : e -> (a -> Maybe b) -> a -> Async e b8549function maybeToAsync(left, maybe) {8550 if(isFunction(maybe)) {8551 return function(x) {8552 var m = maybe(x)8553 if(!isSameType(Maybe, m)) {8554 throw new TypeError('maybeToAsync: Maybe returning function required for second argument')8555 }8556 return applyTransform(left, m)8557 }8558 }8559 if(isSameType(Maybe, maybe)) {8560 return applyTransform(left, maybe)8561 }8562 throw new TypeError('maybeToAsync: Maybe or Maybe returning function required for second argument')8563}8564module.exports = curry(maybeToAsync)8565/***/ }),8566/* 280 */8567/***/ (function(module, exports, __webpack_require__) {8568/** @license ISC License (c) copyright 2017 original and current authors */8569/** @author Ian Hofmann-Hicks (evil) */8570var Either = __webpack_require__(121)8571var Maybe = __webpack_require__(17).proxy('Maybe')8572var curry = __webpack_require__(3)8573var isFunction = __webpack_require__(4)8574var isSameType = __webpack_require__(18)8575var constant = function (x) { return function () { return x; }; }8576var applyTransform = function (left, maybe) { return maybe.either(8577 constant(Either.Left(left)),8578 Either.Right8579 ); }8580// maybeToEither : c -> Maybe a -> Either c a8581// maybeToEither : c -> (a -> Maybe b) -> a -> Either c b8582function maybeToEither(left, maybe) {8583 if(isFunction(maybe)) {8584 return function(x) {8585 var m = maybe(x)8586 if(!isSameType(Maybe, m)) {8587 throw new TypeError('maybeToEither: Maybe returning function required for second argument')8588 }8589 return applyTransform(left, m)8590 }8591 }8592 if(isSameType(Maybe, maybe)) {8593 return applyTransform(left, maybe)8594 }8595 throw new TypeError('maybeToEither: Maybe or Maybe returning function required for second argument')8596}8597module.exports = curry(maybeToEither)8598/***/ }),8599/* 281 */8600/***/ (function(module, exports, __webpack_require__) {8601/** @license ISC License (c) copyright 2017 original and current authors */8602/** @author Ian Hofmann-Hicks (evil) */8603var First = __webpack_require__(206)8604var Maybe = __webpack_require__(17).proxy('Maybe')8605var curry = __webpack_require__(3)8606var isFunction = __webpack_require__(4)8607var isSameType = __webpack_require__(18)8608var applyTransform = function (maybe) { return First(maybe); }8609// maybeToFirst : Maybe a -> First a8610// maybeToFirst : (a -> Maybe b) -> a -> First b8611function maybeToFirst(maybe) {8612 if(isFunction(maybe)) {8613 return function(x) {8614 var m = maybe(x)8615 if(!isSameType(Maybe, m)) {8616 throw new TypeError('maybeToFirst: Maybe returning function required')8617 }8618 return applyTransform(m)8619 }8620 }8621 if(isSameType(Maybe, maybe)) {8622 return applyTransform(maybe)8623 }8624 throw new TypeError('maybeToFirst: Maybe or Maybe returning function required')8625}8626module.exports = curry(maybeToFirst)8627/***/ }),8628/* 282 */8629/***/ (function(module, exports, __webpack_require__) {8630/** @license ISC License (c) copyright 2017 original and current authors */8631/** @author Ian Hofmann-Hicks (evil) */8632var Last = __webpack_require__(207)8633var Maybe = __webpack_require__(17).proxy('Maybe')8634var curry = __webpack_require__(3)8635var isFunction = __webpack_require__(4)8636var isSameType = __webpack_require__(18)8637var applyTransform = function (maybe) { return Last(maybe); }8638// maybeToLast : Maybe a -> Last a8639// maybeToLast : (a -> Maybe b) -> a -> Last b8640function maybeToLast(maybe) {8641 if(isFunction(maybe)) {8642 return function(x) {8643 var m = maybe(x)8644 if(!isSameType(Maybe, m)) {8645 throw new TypeError('maybeToLast: Maybe returning function required')8646 }8647 return applyTransform(m)8648 }8649 }8650 if(isSameType(Maybe, maybe)) {8651 return applyTransform(maybe)8652 }8653 throw new TypeError('maybeToLast: Maybe or Maybe returning function required')8654}8655module.exports = curry(maybeToLast)8656/***/ }),8657/* 283 */8658/***/ (function(module, exports, __webpack_require__) {8659/** @license ISC License (c) copyright 2019 original and current authors */8660/** @author Ian Hofmann-Hicks (evil) */8661var List = __webpack_require__(127)8662var Maybe = __webpack_require__(17).proxy('Maybe')8663var curry = __webpack_require__(3)8664var isFunction = __webpack_require__(4)8665var isSameType = __webpack_require__(18)8666var applyTransform = function (maybe) { return maybe.either(8667 List.empty,8668 List.of8669 ); }8670var err =8671 'maybeToList: Argument must be a Maybe instanstace or a Maybe returning function'8672// maybeToList : Maybe a -> List a8673// maybeToList : (a -> Maybe b) -> a -> List b8674function maybeToList(maybe) {8675 if(isFunction(maybe)) {8676 return function(x) {8677 var m = maybe(x)8678 if(!isSameType(Maybe, m)) {8679 throw new TypeError(err)8680 }8681 return applyTransform(m)8682 }8683 }8684 if(isSameType(Maybe, maybe)) {8685 return applyTransform(maybe)8686 }8687 throw new TypeError(err)8688}8689module.exports = curry(maybeToList)8690/***/ }),8691/* 284 */8692/***/ (function(module, exports, __webpack_require__) {8693/** @license ISC License (c) copyright 2017 original and current authors */8694/** @author Ian Hofmann-Hicks (evil) */8695var Result = __webpack_require__(137)8696var Maybe = __webpack_require__(17).proxy('Maybe')8697var curry = __webpack_require__(3)8698var isFunction = __webpack_require__(4)8699var isSameType = __webpack_require__(18)8700var constant = function (x) { return function () { return x; }; }8701var applyTransform = function (left, maybe) { return maybe.either(8702 constant(Result.Err(left)),8703 Result.Ok8704 ); }8705// maybeToResult : c -> Maybe a -> Result c a8706// maybeToResult : c -> (a -> Maybe b) -> a -> Result c b8707function maybeToResult(left, maybe) {8708 if(isFunction(maybe)) {8709 return function(x) {8710 var m = maybe(x)8711 if(!isSameType(Maybe, m)) {8712 throw new TypeError('maybeToResult: Maybe returning function required for second argument')8713 }8714 return applyTransform(left, m)8715 }8716 }8717 if(isSameType(Maybe, maybe)) {8718 return applyTransform(left, maybe)8719 }8720 throw new TypeError('maybeToResult: Maybe or Maybe returning function required for second argument')8721}8722module.exports = curry(maybeToResult)8723/***/ }),8724/* 285 */8725/***/ (function(module, exports, __webpack_require__) {8726/** @license ISC License (c) copyright 2017 original and current authors */8727/** @author Ian Hofmann-Hicks (evil) */8728var Async = __webpack_require__(114)8729var Result = __webpack_require__(17).proxy('Result')8730var curry = __webpack_require__(3)8731var isFunction = __webpack_require__(4)8732var isSameType = __webpack_require__(18)8733var applyTransform = function (either) { return either.either(Async.Rejected, Async.Resolved); }8734// resultToAsync : Result e a -> Async e a8735// resultToAsync : (a -> Result e b) -> a -> Async e b8736function resultToAsync(result) {8737 if(isFunction(result)) {8738 return function(x) {8739 var m = result(x)8740 if(!isSameType(Result, m)) {8741 throw new TypeError('resultToAsync: Result returning function required')8742 }8743 return applyTransform(m)8744 }8745 }8746 if(isSameType(Result, result)) {8747 return applyTransform(result)8748 }8749 throw new TypeError('resultToAsync: Result or Result returning function required')8750}8751module.exports = curry(resultToAsync)8752/***/ }),8753/* 286 */8754/***/ (function(module, exports, __webpack_require__) {8755/** @license ISC License (c) copyright 2017 original and current authors */8756/** @author Ian Hofmann-Hicks (evil) */8757var Either = __webpack_require__(121)8758var Result = __webpack_require__(17).proxy('Result')8759var curry = __webpack_require__(3)8760var isFunction = __webpack_require__(4)8761var isSameType = __webpack_require__(18)8762var applyTransform = function (result) { return result.either(Either.Left, Either.Right); }8763// resultToEither : Result e a -> Either e a8764// resultToEither : (a -> Result e b) -> a -> Either e b8765function resultToEither(result) {8766 if(isFunction(result)) {8767 return function(x) {8768 var m = result(x)8769 if(!isSameType(Result, m)) {8770 throw new TypeError('resultToEither: Result returning function required')8771 }8772 return applyTransform(m)8773 }8774 }8775 if(isSameType(Result, result)) {8776 return applyTransform(result)8777 }8778 throw new TypeError('resultToEither: Result or Result returning function required')8779}8780module.exports = curry(resultToEither)8781/***/ }),8782/* 287 */8783/***/ (function(module, exports, __webpack_require__) {8784/** @license ISC License (c) copyright 2017 original and current authors */8785/** @author Ian Hofmann-Hicks (evil) */8786var First = __webpack_require__(206)8787var Result = __webpack_require__(17).proxy('Result')8788var curry = __webpack_require__(3)8789var isFunction = __webpack_require__(4)8790var isSameType = __webpack_require__(18)8791var applyTransform = function (result) { return result.either(First.empty, First); }8792// resultToFirst : Result b a -> First a8793// resultToFirst : (a -> Result c b) -> a -> First b8794function resultToFirst(result) {8795 if(isFunction(result)) {8796 return function(x) {8797 var m = result(x)8798 if(!isSameType(Result, m)) {8799 throw new TypeError('resultToFirst: Result returning function required')8800 }8801 return applyTransform(m)8802 }8803 }8804 if(isSameType(Result, result)) {8805 return applyTransform(result)8806 }8807 throw new TypeError('resultToFirst: Result or Result returning function required')8808}8809module.exports = curry(resultToFirst)8810/***/ }),8811/* 288 */8812/***/ (function(module, exports, __webpack_require__) {8813/** @license ISC License (c) copyright 2017 original and current authors */8814/** @author Ian Hofmann-Hicks (evil) */8815var Last = __webpack_require__(207)8816var Result = __webpack_require__(17).proxy('Result')8817var curry = __webpack_require__(3)8818var isFunction = __webpack_require__(4)8819var isSameType = __webpack_require__(18)8820var applyTransform = function (result) { return result.either(Last.empty, Last); }8821// resultToLast : Result b a -> Last a8822// resultToLast : (a -> Result c b) -> a -> Last b8823function resultToLast(result) {8824 if(isFunction(result)) {8825 return function(x) {8826 var m = result(x)8827 if(!isSameType(Result, m)) {8828 throw new TypeError('resultToLast: Result returning function required')8829 }8830 return applyTransform(m)8831 }8832 }8833 if(isSameType(Result, result)) {8834 return applyTransform(result)8835 }8836 throw new TypeError('resultToLast: Result or Result returning function required')8837}8838module.exports = curry(resultToLast)8839/***/ }),8840/* 289 */8841/***/ (function(module, exports, __webpack_require__) {8842/** @license ISC License (c) copyright 2017 original and current authors */8843/** @author Ian Hofmann-Hicks (evil) */8844var Maybe = __webpack_require__(130)8845var Result = __webpack_require__(17).proxy('Result')8846var curry = __webpack_require__(3)8847var isFunction = __webpack_require__(4)8848var isSameType = __webpack_require__(18)8849var applyTransform = function (result) { return result.either(Maybe.Nothing, Maybe.Just); }8850// resultToMaybe : Result b a -> Maybe a8851// resultToMaybe : (a -> Result c b) -> a -> Maybe b8852function resultToMaybe(result) {8853 if(isFunction(result)) {8854 return function(x) {8855 var m = result(x)8856 if(!isSameType(Result, m)) {8857 throw new TypeError('resultToMaybe: Result returning function required')8858 }8859 return applyTransform(m)8860 }8861 }8862 if(isSameType(Result, result)) {8863 return applyTransform(result)8864 }8865 throw new TypeError('resultToMaybe: Result or Result returning function required')8866}8867module.exports = curry(resultToMaybe)8868/***/ }),8869/* 290 */8870/***/ (function(module, exports, __webpack_require__) {8871/** @license ISC License (c) copyright 2018 original and current authors */8872/** @author Jasmina Jacquelina (jasminabasurita) */8873var curry = __webpack_require__(3)8874var isFunction = __webpack_require__(4)8875// tupleToArray : Tuple a -> [ a ]8876// tupleToArray : (a -> Tuple b) -> a -> [ b ]...
isSameType.spec.js
Source:isSameType.spec.js
...8})9test('isSameType (ADTs)', t => {10 const first = { type: () => 'first' }11 const second = { type: () => 'second' }12 t.equal(isSameType(first, first), true, 'reports true when they are the same')13 t.equal(isSameType(first, second), false, 'reports false when they are the different containers')14 t.equal(isSameType(first, []), false, 'reports false when one is not a container')15 t.end()16})17test('isSameType (Nils)', t => {18 t.equal(isSameType(undefined, undefined), true, 'reports true when both are undefined')19 t.equal(isSameType(null, null), true, 'reports true when both are null')20 t.equal(isSameType(undefined, null), false, 'reports false with undefined and null')21 t.equal(isSameType(undefined, 0), false, 'reports false with undefined and falsey number')22 t.equal(isSameType(undefined, 1), false, 'reports false with undefined and truthy number')23 t.equal(isSameType(undefined, ''), false, 'reports false with undefined and falsey string')24 t.equal(isSameType(undefined, 'string'), false, 'reports false with undefined and truthy string')25 t.equal(isSameType(undefined, false), false, 'reports false with undefined and false')26 t.equal(isSameType(undefined, true), false, 'reports false with undefined and true')27 t.equal(isSameType(undefined, []), false, 'reports false with undefined and array')28 t.equal(isSameType(undefined, {}), false, 'reports false with undefined and an object')29 t.equal(isSameType(undefined, unit), false, 'reports false with undefined and a function')30 t.equal(isSameType(null, undefined), false, 'reports false with null and undefined')31 t.equal(isSameType(0, undefined), false, 'reports false with falsey number and undefined')32 t.equal(isSameType(1, undefined), false, 'reports false with truthy number and undefined')33 t.equal(isSameType('', undefined), false, 'reports false with falsey string and undefined')34 t.equal(isSameType('string', undefined), false, 'reports false with truthy string and undefined')35 t.equal(isSameType(false, undefined), false, 'reports false with false and undefined')36 t.equal(isSameType(true, undefined), false, 'reports false with true and undefined')37 t.equal(isSameType([], undefined), false, 'reports false with array and undefined')38 t.equal(isSameType({}, undefined), false, 'reports false with an object and undefined')39 t.equal(isSameType(unit, undefined), false, 'reports false with a function and undefined')40 t.equal(isSameType(null, undefined), false, 'reports false null and undefined')41 t.equal(isSameType(null, 0), false, 'reports false with null and falsey number')42 t.equal(isSameType(null, 1), false, 'reports false with null and truthy number')43 t.equal(isSameType(null, ''), false, 'reports false with null and falsey string')44 t.equal(isSameType(null, 'string'), false, 'reports false with null and truthy string')45 t.equal(isSameType(null, false), false, 'reports false with null and false')46 t.equal(isSameType(null, true), false, 'reports false with null and true')47 t.equal(isSameType(null, []), false, 'reports false with null and array')48 t.equal(isSameType(null, {}), false, 'reports false with null and an object')49 t.equal(isSameType(null, unit), false, 'reports false with null and a function')50 t.equal(isSameType(null, undefined), false, 'reports false undefined and null')51 t.equal(isSameType(0, null), false, 'reports false with falsey number and null')52 t.equal(isSameType(1, null), false, 'reports false with truthy number and null')53 t.equal(isSameType('', null), false, 'reports false with falsey string and null')54 t.equal(isSameType('string', null), false, 'reports false with truthy string and null')55 t.equal(isSameType(false, null), false, 'reports false with false and null')56 t.equal(isSameType(true, null), false, 'reports false with true and null')57 t.equal(isSameType([], null), false, 'reports false with array and null')58 t.equal(isSameType({}, null), false, 'reports false with an object and null')59 t.equal(isSameType(unit, null), false, 'reports false with a function and null')60 t.end()61})62test('isSameType (Numbers)', t => {63 t.equal(isSameType(Number, 0), true, 'reports true with Number and falsey number')64 t.equal(isSameType(Number, 1), true, 'reports true with Number and truthy number')65 t.equal(isSameType(0, Number), true, 'reports true with falsey number and Number')66 t.equal(isSameType(1, Number), true, 'reports true with truthy number and Number')67 t.equal(isSameType(0, 1), true, 'reports true with falsey number and truthy number')68 t.equal(isSameType(1, 0), true, 'reports true with truthy number and falsey number')69 t.equal(isSameType(Number, ''), false, 'reports false with Number and falsey string')70 t.equal(isSameType(Number, 'string'), false, 'reports false with Number and truthy string')71 t.equal(isSameType(Number, false), false, 'reports false with Number and false')72 t.equal(isSameType(Number, true), false, 'reports false with Number and true')73 t.equal(isSameType(Number, {}), false, 'reports false with Number and object')74 t.equal(isSameType(Number, []), false, 'reports false with Number and array')75 t.equal(isSameType('', Number), false, 'reports false with falsey string and Number')76 t.equal(isSameType('string', Number), false, 'reports false with truthy string and Number')77 t.equal(isSameType(false, Number), false, 'reports false with false and Number')78 t.equal(isSameType(true, Number), false, 'reports false with true and Number')79 t.equal(isSameType({}, Number), false, 'reports false with object and Number')80 t.equal(isSameType([], Number), false, 'reports false with array and Number')81 t.equal(isSameType(0, ''), false, 'reports false with falsey number and falsey string')82 t.equal(isSameType(0, 'string'), false, 'reports false with falsey number and truthy string')83 t.equal(isSameType(0, false), false, 'reports false with falsey number and false')84 t.equal(isSameType(0, true), false, 'reports false with falsey number and true')85 t.equal(isSameType(0, {}), false, 'reports false with falsey number and object')86 t.equal(isSameType(0, []), false, 'reports false with falsey number and array')87 t.equal(isSameType(0, unit), false, 'reports false with falsey number and function')88 t.equal(isSameType('', 0), false, 'reports false with falsey string and falsey number')89 t.equal(isSameType('string', 0), false, 'reports false with truthy string and falsey number')90 t.equal(isSameType(false, 0), false, 'reports false with false and falsey number')91 t.equal(isSameType(true, 0), false, 'reports false with true and falsey number')92 t.equal(isSameType({}, 0), false, 'reports false with object and falsey number')93 t.equal(isSameType([], 0), false, 'reports false with array and falsey number')94 t.equal(isSameType(unit, 0), false, 'reports false with function and falsey number')95 t.equal(isSameType(1, ''), false, 'reports false with truthy number and falsey string')96 t.equal(isSameType(1, 'string'), false, 'reports false with truthy number and truthy string')97 t.equal(isSameType(1, false), false, 'reports false with truthy number and false')98 t.equal(isSameType(1, true), false, 'reports false with truthy number and true')99 t.equal(isSameType(1, {}), false, 'reports false with truthy number and object')100 t.equal(isSameType(1, []), false, 'reports false with truthy number and array')101 t.equal(isSameType(1, unit), false, 'reports false with truthy number and function')102 t.equal(isSameType('', 1), false, 'reports false with falsey string and truthy number')103 t.equal(isSameType('string', 1), false, 'reports false with truthy string and truthy number')104 t.equal(isSameType(false, 1), false, 'reports false with false and truthy number')105 t.equal(isSameType(true, 1), false, 'reports false with true and truthy number')106 t.equal(isSameType({}, 1), false, 'reports false with object and truthy number')107 t.equal(isSameType([], 1), false, 'reports false with array and truthy number')108 t.equal(isSameType(unit, 1), false, 'reports false with function and truthy number')109 t.end()110})111test('isSameType (Strings)', t => {112 t.equal(isSameType(String, ''), true, 'reports true with String and falsey string')113 t.equal(isSameType(String, 'string'), true, 'reports true with String and truthy string')114 t.equal(isSameType('', String), true, 'reports true with falsey string and String')115 t.equal(isSameType('string', String), true, 'reports true with truthy string and String')116 t.equal(isSameType('', 'string'), true, 'reports true with falsey string and truthy string')117 t.equal(isSameType('string', ''), true, 'reports true with truthy string and falsey string')118 t.equal(isSameType(String, 0), false, 'reports false with String and falsey number')119 t.equal(isSameType(String, 1), false, 'reports false with String and truthy number')120 t.equal(isSameType(String, false), false, 'reports false with String and false')121 t.equal(isSameType(String, true), false, 'reports false with String and true')122 t.equal(isSameType(String, {}), false, 'reports false with String and object')123 t.equal(isSameType(String, []), false, 'reports false with String and array')124 t.equal(isSameType(0, String), false, 'reports false with falsey number and String')125 t.equal(isSameType(0, String), false, 'reports false with truthy number and String')126 t.equal(isSameType(false, String), false, 'reports false with false and String')127 t.equal(isSameType(true, String), false, 'reports false with true and String')128 t.equal(isSameType({}, String), false, 'reports false with object and String')129 t.equal(isSameType([], String), false, 'reports false with array and String')130 t.equal(isSameType('', false), false, 'reports false with falsey string and false')131 t.equal(isSameType('', true), false, 'reports false with falsey string and true')132 t.equal(isSameType('', {}), false, 'reports false with falsey string and object')133 t.equal(isSameType('', []), false, 'reports false with falsey string and array')134 t.equal(isSameType('', unit), false, 'reports false with falsey string and function')135 t.equal(isSameType(false, ''), false, 'reports false with false and falsey string')136 t.equal(isSameType(true, ''), false, 'reports false with true and falsey string')137 t.equal(isSameType({}, ''), false, 'reports false with object and falsey string')138 t.equal(isSameType([], ''), false, 'reports false with array and falsey string')139 t.equal(isSameType(unit, ''), false, 'reports false with function and falsey string')140 t.equal(isSameType('string', false), false, 'reports false with truthy string and false')141 t.equal(isSameType('string', true), false, 'reports false with truthy string and true')142 t.equal(isSameType('string', {}), false, 'reports false with truthy string and object')143 t.equal(isSameType('string', []), false, 'reports false with truthy string and array')144 t.equal(isSameType('string', unit), false, 'reports false with truthy string and function')145 t.equal(isSameType(false, 'string'), false, 'reports false with false and truthy string')146 t.equal(isSameType(true, 'string'), false, 'reports false with true and truthy string')147 t.equal(isSameType({}, 'string'), false, 'reports false with object and truthy string')148 t.equal(isSameType([], 'string'), false, 'reports false with array and truthy string')149 t.equal(isSameType(unit, 'string'), false, 'reports false with function and truthy string')150 t.end()151})152test('isSameType (Booleans)', t => {153 t.equal(isSameType(Boolean, false), true, 'reports true with Boolean and false')154 t.equal(isSameType(Boolean, true), true, 'reports true with Boolean and true')155 t.equal(isSameType(false, Boolean), true, 'reports true with false and Boolean')156 t.equal(isSameType(true, Boolean), true, 'reports true with true and Boolean')157 t.equal(isSameType(false, true), true, 'reports true with false and true')158 t.equal(isSameType(true, false), true, 'reports true with true and false')159 t.equal(isSameType(true, true), true, 'reports true with true and true')160 t.equal(isSameType(false, false), true, 'reports true with false and false')161 t.equal(isSameType(Boolean, 0), false, 'reports false with Boolean and falsey number')162 t.equal(isSameType(Boolean, 1), false, 'reports false with Boolean and truthy number')163 t.equal(isSameType(Boolean, ''), false, 'reports false with Boolean and falsey string')164 t.equal(isSameType(Boolean, 'string'), false, 'reports false with Boolean and truthy string')165 t.equal(isSameType(Boolean, {}), false, 'reports false with Boolean and object')166 t.equal(isSameType(Boolean, []), false, 'reports false with Boolean and array')167 t.equal(isSameType(0, Boolean), false, 'reports false with falsey number and Boolean')168 t.equal(isSameType(1, Boolean), false, 'reports false with truthy number and Boolean')169 t.equal(isSameType('', Boolean), false, 'reports false with falsey string and Boolean')170 t.equal(isSameType('string', Boolean), false, 'reports false with truthy string and Boolean')171 t.equal(isSameType({}, Boolean), false, 'reports false with object and Boolean')172 t.equal(isSameType([], Boolean), false, 'reports false with array and Boolean')173 t.equal(isSameType(false, {}), false, 'reports false with false string and object')174 t.equal(isSameType(false, []), false, 'reports false with false string and array')175 t.equal(isSameType(false, unit), false, 'reports false with false string and function')176 t.equal(isSameType({}, false), false, 'reports false with object and false string')177 t.equal(isSameType([], false), false, 'reports false with array and false string')178 t.equal(isSameType(unit, false), false, 'reports false with function and false string')179 t.equal(isSameType(true, {}), false, 'reports false with true and object')180 t.equal(isSameType(true, []), false, 'reports false with true and array')181 t.equal(isSameType(true, unit), false, 'reports false with true and function')182 t.equal(isSameType({}, true), false, 'reports false with object and true')183 t.equal(isSameType([], true), false, 'reports false with array and true')184 t.equal(isSameType(unit, true), false, 'reports false with function and true')185 t.end()186})187test('isSameType (Objects)', t => {188 t.equal(isSameType(Object, {}), true, 'reports true with Object and object')189 t.equal(isSameType({}, Object), true, 'reports true with object and Object')190 t.equal(isSameType({}, {}), true, 'reports true with object and object')191 t.equal(isSameType(Object, 0), false, 'reports false with Object and falsey number')192 t.equal(isSameType(Object, 1), false, 'reports false with Object and truthy number')193 t.equal(isSameType(Object, ''), false, 'reports false with Object and falsey string')194 t.equal(isSameType(Object, 'string'), false, 'reports false with Object and truthy string')195 t.equal(isSameType(Object, false), false, 'reports false with Object and false')196 t.equal(isSameType(Object, true), false, 'reports false with Object and true')197 t.equal(isSameType(Object, []), false, 'reports false with Object and array')198 t.equal(isSameType(0, Object), false, 'reports false with falsey number and Object')199 t.equal(isSameType(1, Object), false, 'reports false with truthy number and Object')200 t.equal(isSameType('', Object), false, 'reports false with falsey string and Object')201 t.equal(isSameType('string', Object), false, 'reports false with truthy string and Object')202 t.equal(isSameType(false, Object), false, 'reports false with false and Object')203 t.equal(isSameType(true, Object), false, 'reports false with true and Object')204 t.equal(isSameType([], Object), false, 'reports false with array and Object')205 t.equal(isSameType({}, []), false, 'reports false with object and array')206 t.equal(isSameType({}, unit), false, 'reports false with object and function')207 t.equal(isSameType([], {}), false, 'reports false with array and object')208 t.equal(isSameType(unit, {}), false, 'reports false with unit and object')209 t.end()210})211test('isSameType (Arrays)', t => {212 t.equal(isSameType(Array, []), true, 'reports true with Array and array')213 t.equal(isSameType([], Array), true, 'reports true with array and Array')214 t.equal(isSameType([], []), true, 'reports true with array and array')215 t.equal(isSameType(Array, 0), false, 'reports false with Array and falsey number')216 t.equal(isSameType(Array, 1), false, 'reports false with Array and truthy number')217 t.equal(isSameType(Array, ''), false, 'reports false with Array and falsey string')218 t.equal(isSameType(Array, 'string'), false, 'reports false with Array and truthy string')219 t.equal(isSameType(Array, false), false, 'reports false with Array and false')220 t.equal(isSameType(Array, true), false, 'reports false with Array and true')221 t.equal(isSameType(Array, {}), false, 'reports false with Array and object')222 t.equal(isSameType(0, Array), false, 'reports false with falsey number and Array')223 t.equal(isSameType(1, Array), false, 'reports false with truthy number and Array')224 t.equal(isSameType('', Array), false, 'reports false with falsey string and Array')225 t.equal(isSameType('string', Array), false, 'reports false with truthy string and Array')226 t.equal(isSameType(false, Array), false, 'reports false with false and Array')227 t.equal(isSameType(true, Array), false, 'reports false with true and Array')228 t.equal(isSameType({}, Array), false, 'reports false with object and Array')229 t.equal(isSameType(unit, []), false, 'reports false with function and array')230 t.equal(isSameType([], unit), false, 'reports false with array and function')231 t.end()232})233test('isSameType (Functions)', t => {234 t.equal(isSameType(Function, unit), true, 'reports true with Function and function')235 t.equal(isSameType(unit, Function), true, 'reports true with function and Function')236 t.equal(isSameType(unit, x => x), true, 'reports true with function and function')237 t.equal(isSameType(Function, 0), false, 'reports false with Function and falsey number')238 t.equal(isSameType(Function, 1), false, 'reports false with Function and truthy number')239 t.equal(isSameType(Function, ''), false, 'reports false with Function and falsey string')240 t.equal(isSameType(Function, 'string'), false, 'reports false with Function and truthy string')241 t.equal(isSameType(Function, false), false, 'reports false with Function and false')242 t.equal(isSameType(Function, true), false, 'reports false with Function and true')243 t.equal(isSameType(Function, {}), false, 'reports false with Function and object')244 t.equal(isSameType(Function, []), false, 'reports false with Function and array')245 t.equal(isSameType(0, Function), false, 'reports false with falsey number and Function')246 t.equal(isSameType(1, Function), false, 'reports false with truthy number and Function')247 t.equal(isSameType('', Function), false, 'reports false with falsey string and Function')248 t.equal(isSameType('string', Function), false, 'reports false with truthy string and Function')249 t.equal(isSameType(false, Function), false, 'reports false with false string and Function')250 t.equal(isSameType(true, Function), false, 'reports false with true and Function')251 t.equal(isSameType({}, Function), false, 'reports false with object and Function')252 t.equal(isSameType([], Function), false, 'reports false with array and Function')253 t.equal(isSameType(false, {}), false, 'reports false with false string and object')254 t.equal(isSameType(false, []), false, 'reports false with false string and array')255 t.equal(isSameType({}, false), false, 'reports false with object and false string')256 t.equal(isSameType([], false), false, 'reports false with array and false string')257 t.equal(isSameType(true, {}), false, 'reports false with true and object')258 t.equal(isSameType(true, []), false, 'reports false with true and array')259 t.equal(isSameType({}, true), false, 'reports false with object and true')260 t.equal(isSameType([], true), false, 'reports false with array and true')261 t.end()...
queue.test.js
Source:queue.test.js
...65test('The function .last() returns null for an empty queue', () => {66 const queue = new Queue();67 expect(queue.last()).toBeNull();68});69test('The function .isSameType() is true for queues that have items of the same type', () => {70 const queue = new Queue();71 queue.enqueue(1);72 queue.enqueue(2);73 queue.enqueue(3);74 expect(queue.isSameType()).toBe(true);75});76test('The function .isSameType() is true for empty queues', () => {77 const queue = new Queue();78 expect(queue.isSameType()).toBe(true);79});80test('The function .isSameType() is false for queues that have items of different types', () => {81 const queue = new Queue();82 queue.enqueue(1);83 queue.enqueue('test');84 queue.enqueue(3);85 expect(queue.isSameType()).toBe(false);86});87test('Removing an item from an empty queue should return null', () => {88 const queue = new Queue();89 queue.enqueue(1);90 queue.enqueue(2);91 queue.enqueue(3);92 queue.dequeue();93 queue.dequeue();94 queue.dequeue();95 expect(queue.dequeue()).toBeNull();96});97test('Initializing a queue with a value will have a length of 1', () => {98 const queue = new Queue(1);99 expect(queue.length).toBe(1);...
common.js
Source:common.js
...9 return getType(a) === getType(b)10}11function getTypeIndex (type, expectedTypes) {12 if (!Array.isArray(expectedTypes)) {13 return isSameType(expectedTypes, type) ? 0 : -114 }15 for (var i = 0, len = expectedTypes.length; i < len; i++) {16 if (isSameType(expectedTypes[i], type)) {17 return i18 }19 }20 return -121}22function mergeObject (source, target) {23 // å并对象ï¼éå°å¯¹è±¡åå并ï¼å
¶ä»è¦ç24 let handler = function (source, target) {25 let keys = Object.keys(source)26 // 1.å¤ææºå¯¹è±¡æ¯å¦éè¦å¤ç27 if (keys.length) {28 keys.map(key => {29 // æºå±æ§30 let item = source[key]...
main.js
Source:main.js
...28* @param {*} b - second input value29* @returns {boolean} boolean indicating whether two arguments have the same type30*31* @example32* var bool = isSameType( true, true );33* // returns true34*35* @example36* var bool = isSameType( 3.14, 3.14 );37* // returns true38*39* @example40* var bool = isSameType( {}, [] );41* // returns true42*43* @example44* var bool = isSameType( NaN, NaN );45* // returns true46*47* @example48* var bool = isSameType( 0.0, '0.0' );49* // returns false50*/51function isSameType( a, b ) {52 return ( typeof a ) === ( typeof b );53}54// EXPORTS //...
utils.test.js
Source:utils.test.js
...4const types = cheetah.types;5const typeList = types.typeList;6describe("Test function 'isSameType' for JavaScript Types", function () {7 // true tests8 it('isSameType(Boolean, Boolean) => true', async function () {9 assert.equal(utils.isSameType(Boolean, Boolean), true);10 });11 it('isSameType(Number, Number) => true', async function () {12 assert.equal(utils.isSameType(Number, Number), true);13 });14 // false tests15 it('isSameType(Boolean, Number) => false', async function () {16 assert.equal(utils.isSameType(Boolean, Number), false);17 });18});19describe("Test function 'isSameType' for Custom Schema Types", function () {20 // true tests21 for (let i = 0; i < typeList.length; i++) {22 it(`isSameType(types.${typeList[i].name}, types.${typeList[i].name}) => true`, async function () {23 assert.equal(utils.isSameType(typeList[i], typeList[i]), true);24 });25 }26 // false tests27 for (let i = 0; i < typeList.length; i++) {28 for (let j = 0; j < typeList.length; j++) {29 if (i !== j) {30 it(`isSameType(types.${typeList[i].name}, types.${typeList[j].name}) => false`, async function () {31 assert.equal(utils.isSameType(typeList[i], typeList[j]), false);32 });33 }34 }35 }...
same.mjs
Source:same.mjs
1import is, { isSameType } from '../../src/index.mjs'2export default [3 { fn: isSameType('', ''), info: 'isSame can compare two strings' },4 { fn: isSameType(23, 1), info: 'isSame can compare two numbers' },5 { fn: isSameType(true, false), info: 'isSame can compare two booleans' },6 {7 fn: isSameType(8 () => {},9 function () {},10 ),11 info: 'isSame can compare two functions',12 },13 { fn: isSameType(new Date(), new Date()), info: 'isSame can compare two Dates' },14 { fn: isSameType(`temp 1`, `temp 2`), info: 'isSame can compare two templatestrings' },15 { fn: is.same(23, ''), expect: false, info: 'isSame can compare a number and a string' },16 { fn: is.same('', 23), expect: false, info: 'isSame can compare a string and a number' },17 {18 fn: is.sameType('', true),19 expect: false,20 info: 'isSame can compare a string and a boolean true',21 },22 {23 fn: is.sameType('', false),24 expect: false,25 info: 'isSame can compare a string and a boolean false',26 },27 {28 fn: is.isSameType(() => {}, false),29 expect: false,30 info: 'isSame can compare a function and a boolean false',31 },32 {33 fn: is.isSame(23, false),34 expect: false,35 info: 'isSame can compare a number and a boolean false',36 },...
index.js
Source:index.js
...16* limitations under the License.17*/18'use strict';19var isSameType = require( './../lib' );20console.log( isSameType( true, false ) );21// => true22console.log( isSameType( 3.14, -3.14 ) );23// => true24console.log( isSameType( {}, [] ) );25// => true26console.log( isSameType( null, null ) );27// => true28console.log( isSameType( NaN, NaN ) );29// => true30console.log( isSameType( null, NaN ) );31// => false32console.log( isSameType( 0.0, '0.0' ) );...
Using AI Code Generation
1const { isSameType } = require('playwright/lib/utils/utils');2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 console.log(isSameType('string', 'string'));8 await browser.close();9})();
Using AI Code Generation
1const { isSameType } = require('playwright/lib/helper');2const assert = require('assert');3const { chromium } = require('playwright');4(async () => {5 const browser = await chromium.launch();6 const page = await browser.newPage();7 const title = await page.title();8 assert.ok(isSameType(title, 'string'));9 await browser.close();10})();11const { isSameType } = require('playwright/lib/helper');12const assert = require('assert');13const { chromium } = require('playwright');14(async () => {15 const browser = await chromium.launch();16 const page = await browser.newPage();17 const title = await page.title();18 assert.ok(isSameType(title, 'string'));19 await browser.close();20})();21const { isSameType } = require('playwright/lib/helper');22const assert = require('assert');23const { chromium } = require('playwright');24(async () => {25 const browser = await chromium.launch();26 const page = await browser.newPage();27 const title = await page.title();28 assert.ok(isSameType(title, 'string'));29 await browser.close();30})();31const { isSameType } = require('playwright/lib/helper');32const assert = require('assert');33const { chromium } = require('playwright');34(async () => {35 const browser = await chromium.launch();36 const page = await browser.newPage();37 const title = await page.title();38 assert.ok(isSameType(title, 'string'));39 await browser.close();40})();41const { isSameType } = require('playwright/lib/helper');42const assert = require('assert');43const { chromium } = require('playwright');44(async () => {45 const browser = await chromium.launch();46 const page = await browser.newPage();
Using AI Code Generation
1const { isSameType } = require('playwright/lib/internal/utils/utils');2const { assert } = require('chai');3describe('Test', () => {4 it('test', () => {5 assert.isTrue(isSameType('string', 'string'));6 assert.isFalse(isSameType('string', 1));7 });8});9const { isSameType } = require('playwright/lib/internal/utils/utils');10const { assert } = require('chai');11describe('Test', () => {12 it('test', () => {13 assert.isTrue(isSameType('string', 'string'));14 assert.isFalse(isSameType('string', 1));15 });16});17const { isSameType } = require('playwright/lib/internal/utils/utils');18const { assert } = require('chai');19describe('Test', () => {20 it('test', () => {21 assert.isTrue(isSameType('string', 'string'));22 assert.isFalse(isSameType('string', 1));23 });24});25const { isSameType } = require('playwright/lib/internal/utils/utils');26const { assert } = require('chai');27describe('Test', () => {28 it('test', () => {29 assert.isTrue(isSameType('string', 'string'));30 assert.isFalse(isSameType('string', 1));31 });32});33const { isSameType } = require('playwright/lib/internal/utils/utils');34const { assert } = require('chai');35describe('Test', () => {36 it('test', () => {
LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.
Get 100 minutes of automation test minutes FREE!!