UNPKG

plait

Version:

A minimal JavaScript framework for building isomorphic reactive web components

1,582 lines (1,320 loc) 137 kB
var Plait = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/browser-split/index.js": /*!*********************************************!*\ !*** ./node_modules/browser-split/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { /*! * Cross-Browser Split 1.1.1 * Copyright 2007-2012 Steven Levithan <stevenlevithan.com> * Available under the MIT License * ECMAScript compliant, uniform cross-browser split method */ /** * Splits a string into an array of strings using a regex or string separator. Matches of the * separator are not included in the result array. However, if `separator` is a regex that contains * capturing groups, backreferences are spliced into the result each time `separator` is matched. * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably * cross-browser. * @param {String} str String to split. * @param {RegExp|String} separator Regex or string to use for separating the string. * @param {Number} [limit] Maximum number of items to include in the result array. * @returns {Array} Array of substrings. * @example * * // Basic use * split('a b c d', ' '); * // -> ['a', 'b', 'c', 'd'] * * // With limit * split('a b c d', ' ', 2); * // -> ['a', 'b'] * * // Backreferences in result array * split('..word1 word2..', /([a-z]+)(\d+)/i); * // -> ['..', 'word', '1', ' ', 'word', '2', '..'] */ module.exports = (function split(undef) { var nativeSplit = String.prototype.split, compliantExecNpcg = /()??/.exec("")[1] === undef, // NPCG: nonparticipating capturing group self; self = function(str, separator, limit) { // If `separator` is not a regex, use `nativeSplit` if (Object.prototype.toString.call(separator) !== "[object RegExp]") { return nativeSplit.call(str, separator, limit); } var output = [], flags = (separator.ignoreCase ? "i" : "") + (separator.multiline ? "m" : "") + (separator.extended ? "x" : "") + // Proposed for ES6 (separator.sticky ? "y" : ""), // Firefox 3+ lastLastIndex = 0, // Make `global` and avoid `lastIndex` issues by working with a copy separator = new RegExp(separator.source, flags + "g"), separator2, match, lastIndex, lastLength; str += ""; // Type-convert if (!compliantExecNpcg) { // Doesn't need flags gy, but they don't hurt separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags); } /* Values for `limit`, per the spec: * If undefined: 4294967295 // Math.pow(2, 32) - 1 * If 0, Infinity, or NaN: 0 * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; * If negative number: 4294967296 - Math.floor(Math.abs(limit)) * If other: Type-convert, then use the above rules */ limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1 limit >>> 0; // ToUint32(limit) while (match = separator.exec(str)) { // `separator.lastIndex` is not reliable cross-browser lastIndex = match.index + match[0].length; if (lastIndex > lastLastIndex) { output.push(str.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for // nonparticipating capturing groups if (!compliantExecNpcg && match.length > 1) { match[0].replace(separator2, function() { for (var i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undef) { match[i] = undef; } } }); } if (match.length > 1 && match.index < str.length) { Array.prototype.push.apply(output, match.slice(1)); } lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= limit) { break; } } if (separator.lastIndex === match.index) { separator.lastIndex++; // Avoid an infinite loop } } if (lastLastIndex === str.length) { if (lastLength || !separator.test("")) { output.push(""); } } else { output.push(str.slice(lastLastIndex)); } return output.length > limit ? output.slice(0, limit) : output; }; return self; })(); /***/ }), /***/ "./node_modules/dom-delegator/add-event.js": /*!*************************************************!*\ !*** ./node_modules/dom-delegator/add-event.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var EvStore = __webpack_require__(/*! ev-store */ "./node_modules/ev-store/index.js") module.exports = addEvent function addEvent(target, type, handler) { var events = EvStore(target) var event = events[type] if (!event) { events[type] = handler } else if (Array.isArray(event)) { if (event.indexOf(handler) === -1) { event.push(handler) } } else if (event !== handler) { events[type] = [event, handler] } } /***/ }), /***/ "./node_modules/dom-delegator/dom-delegator.js": /*!*****************************************************!*\ !*** ./node_modules/dom-delegator/dom-delegator.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var globalDocument = __webpack_require__(/*! global/document */ "./node_modules/global/document.js") var EvStore = __webpack_require__(/*! ev-store */ "./node_modules/ev-store/index.js") var createStore = __webpack_require__(/*! weakmap-shim/create-store */ "./node_modules/weakmap-shim/create-store.js") var addEvent = __webpack_require__(/*! ./add-event.js */ "./node_modules/dom-delegator/add-event.js") var removeEvent = __webpack_require__(/*! ./remove-event.js */ "./node_modules/dom-delegator/remove-event.js") var ProxyEvent = __webpack_require__(/*! ./proxy-event.js */ "./node_modules/dom-delegator/proxy-event.js") var HANDLER_STORE = createStore() module.exports = DOMDelegator function DOMDelegator(document) { if (!(this instanceof DOMDelegator)) { return new DOMDelegator(document); } document = document || globalDocument this.target = document.documentElement this.events = {} this.rawEventListeners = {} this.globalListeners = {} } DOMDelegator.prototype.addEventListener = addEvent DOMDelegator.prototype.removeEventListener = removeEvent DOMDelegator.allocateHandle = function allocateHandle(func) { var handle = new Handle() HANDLER_STORE(handle).func = func; return handle } DOMDelegator.transformHandle = function transformHandle(handle, broadcast) { var func = HANDLER_STORE(handle).func return this.allocateHandle(function (ev) { broadcast(ev, func); }) } DOMDelegator.prototype.addGlobalEventListener = function addGlobalEventListener(eventName, fn) { var listeners = this.globalListeners[eventName] || []; if (listeners.indexOf(fn) === -1) { listeners.push(fn) } this.globalListeners[eventName] = listeners; } DOMDelegator.prototype.removeGlobalEventListener = function removeGlobalEventListener(eventName, fn) { var listeners = this.globalListeners[eventName] || []; var index = listeners.indexOf(fn) if (index !== -1) { listeners.splice(index, 1) } } DOMDelegator.prototype.listenTo = function listenTo(eventName) { if (!(eventName in this.events)) { this.events[eventName] = 0; } this.events[eventName]++; if (this.events[eventName] !== 1) { return } var listener = this.rawEventListeners[eventName] if (!listener) { listener = this.rawEventListeners[eventName] = createHandler(eventName, this) } this.target.addEventListener(eventName, listener, true) } DOMDelegator.prototype.unlistenTo = function unlistenTo(eventName) { if (!(eventName in this.events)) { this.events[eventName] = 0; } if (this.events[eventName] === 0) { throw new Error("already unlistened to event."); } this.events[eventName]--; if (this.events[eventName] !== 0) { return } var listener = this.rawEventListeners[eventName] if (!listener) { throw new Error("dom-delegator#unlistenTo: cannot " + "unlisten to " + eventName) } this.target.removeEventListener(eventName, listener, true) } function createHandler(eventName, delegator) { var globalListeners = delegator.globalListeners; var delegatorTarget = delegator.target; return handler function handler(ev) { var globalHandlers = globalListeners[eventName] || [] if (globalHandlers.length > 0) { var globalEvent = new ProxyEvent(ev); globalEvent.currentTarget = delegatorTarget; callListeners(globalHandlers, globalEvent) } findAndInvokeListeners(ev.target, ev, eventName) } } function findAndInvokeListeners(elem, ev, eventName) { var listener = getListener(elem, eventName) if (listener && listener.handlers.length > 0) { var listenerEvent = new ProxyEvent(ev); listenerEvent.currentTarget = listener.currentTarget callListeners(listener.handlers, listenerEvent) if (listenerEvent._bubbles) { var nextTarget = listener.currentTarget.parentNode findAndInvokeListeners(nextTarget, ev, eventName) } } } function getListener(target, type) { // terminate recursion if parent is `null` if (target === null || typeof target === "undefined") { return null } var events = EvStore(target) // fetch list of handler fns for this event var handler = events[type] var allHandler = events.event if (!handler && !allHandler) { return getListener(target.parentNode, type) } var handlers = [].concat(handler || [], allHandler || []) return new Listener(target, handlers) } function callListeners(handlers, ev) { handlers.forEach(function (handler) { if (typeof handler === "function") { handler(ev) } else if (typeof handler.handleEvent === "function") { handler.handleEvent(ev) } else if (handler.type === "dom-delegator-handle") { HANDLER_STORE(handler).func(ev) } else { throw new Error("dom-delegator: unknown handler " + "found: " + JSON.stringify(handlers)); } }) } function Listener(target, handlers) { this.currentTarget = target this.handlers = handlers } function Handle() { this.type = "dom-delegator-handle" } /***/ }), /***/ "./node_modules/dom-delegator/proxy-event.js": /*!***************************************************!*\ !*** ./node_modules/dom-delegator/proxy-event.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js") var ALL_PROPS = [ "altKey", "bubbles", "cancelable", "ctrlKey", "eventPhase", "metaKey", "relatedTarget", "shiftKey", "target", "timeStamp", "type", "view", "which" ] var KEY_PROPS = ["char", "charCode", "key", "keyCode"] var MOUSE_PROPS = [ "button", "buttons", "clientX", "clientY", "layerX", "layerY", "offsetX", "offsetY", "pageX", "pageY", "screenX", "screenY", "toElement" ] var rkeyEvent = /^key|input/ var rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/ module.exports = ProxyEvent function ProxyEvent(ev) { if (!(this instanceof ProxyEvent)) { return new ProxyEvent(ev) } if (rkeyEvent.test(ev.type)) { return new KeyEvent(ev) } else if (rmouseEvent.test(ev.type)) { return new MouseEvent(ev) } for (var i = 0; i < ALL_PROPS.length; i++) { var propKey = ALL_PROPS[i] this[propKey] = ev[propKey] } this._rawEvent = ev this._bubbles = false; } ProxyEvent.prototype.preventDefault = function () { this._rawEvent.preventDefault() } ProxyEvent.prototype.startPropagation = function () { this._bubbles = true; } function MouseEvent(ev) { for (var i = 0; i < ALL_PROPS.length; i++) { var propKey = ALL_PROPS[i] this[propKey] = ev[propKey] } for (var j = 0; j < MOUSE_PROPS.length; j++) { var mousePropKey = MOUSE_PROPS[j] this[mousePropKey] = ev[mousePropKey] } this._rawEvent = ev } inherits(MouseEvent, ProxyEvent) function KeyEvent(ev) { for (var i = 0; i < ALL_PROPS.length; i++) { var propKey = ALL_PROPS[i] this[propKey] = ev[propKey] } for (var j = 0; j < KEY_PROPS.length; j++) { var keyPropKey = KEY_PROPS[j] this[keyPropKey] = ev[keyPropKey] } this._rawEvent = ev } inherits(KeyEvent, ProxyEvent) /***/ }), /***/ "./node_modules/dom-delegator/remove-event.js": /*!****************************************************!*\ !*** ./node_modules/dom-delegator/remove-event.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var EvStore = __webpack_require__(/*! ev-store */ "./node_modules/ev-store/index.js") module.exports = removeEvent function removeEvent(target, type, handler) { var events = EvStore(target) var event = events[type] if (!event) { return } else if (Array.isArray(event)) { var index = event.indexOf(handler) if (index !== -1) { event.splice(index, 1) } } else if (event === handler) { events[type] = null } } /***/ }), /***/ "./node_modules/ev-store/index.js": /*!****************************************!*\ !*** ./node_modules/ev-store/index.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var OneVersionConstraint = __webpack_require__(/*! individual/one-version */ "./node_modules/ev-store/node_modules/individual/one-version.js"); var MY_VERSION = '7'; OneVersionConstraint('ev-store', MY_VERSION); var hashKey = '__EV_STORE_KEY@' + MY_VERSION; module.exports = EvStore; function EvStore(elem) { var hash = elem[hashKey]; if (!hash) { hash = elem[hashKey] = {}; } return hash; } /***/ }), /***/ "./node_modules/ev-store/node_modules/individual/index.js": /*!****************************************************************!*\ !*** ./node_modules/ev-store/node_modules/individual/index.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) { /*global window, global*/ var root = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {}; module.exports = Individual; function Individual(key, value) { if (key in root) { return root[key]; } root[key] = value; return value; } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/ev-store/node_modules/individual/one-version.js": /*!**********************************************************************!*\ !*** ./node_modules/ev-store/node_modules/individual/one-version.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Individual = __webpack_require__(/*! ./index.js */ "./node_modules/ev-store/node_modules/individual/index.js"); module.exports = OneVersion; function OneVersion(moduleName, version, defaultValue) { var key = '__INDIVIDUAL_ONE_VERSION_' + moduleName; var enforceKey = key + '_ENFORCE_SINGLETON'; var versionValue = Individual(enforceKey, version); if (versionValue !== version) { throw new Error('Can only have one copy of ' + moduleName + '.\n' + 'You already have version ' + versionValue + ' installed.\n' + 'This means you cannot install version ' + version); } return Individual(key, defaultValue); } /***/ }), /***/ "./node_modules/global/document.js": /*!*****************************************!*\ !*** ./node_modules/global/document.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : {} var minDoc = __webpack_require__(/*! min-document */ 0); var doccy; if (typeof document !== 'undefined') { doccy = document; } else { doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; if (!doccy) { doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; } } module.exports = doccy; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/inherits/inherits_browser.js": /*!***************************************************!*\ !*** ./node_modules/inherits/inherits_browser.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } /***/ }), /***/ "./node_modules/is-object/index.js": /*!*****************************************!*\ !*** ./node_modules/is-object/index.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function isObject(x) { return typeof x === "object" && x !== null; }; /***/ }), /***/ "./node_modules/ramda/src/assoc.js": /*!*****************************************!*\ !*** ./node_modules/ramda/src/assoc.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/src/internal/_curry3.js"); /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig String -> a -> {k: v} -> {k: v} * @param {String} prop The property name to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @see R.dissoc * @example * * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} */ var assoc = /*#__PURE__*/_curry3(function assoc(prop, val, obj) { var result = {}; for (var p in obj) { result[p] = obj[p]; } result[prop] = val; return result; }); module.exports = assoc; /***/ }), /***/ "./node_modules/ramda/src/assocPath.js": /*!*********************************************!*\ !*** ./node_modules/ramda/src/assocPath.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry3 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry3 */ "./node_modules/ramda/src/internal/_curry3.js"); var _has = /*#__PURE__*/__webpack_require__(/*! ./internal/_has */ "./node_modules/ramda/src/internal/_has.js"); var _isArray = /*#__PURE__*/__webpack_require__(/*! ./internal/_isArray */ "./node_modules/ramda/src/internal/_isArray.js"); var _isInteger = /*#__PURE__*/__webpack_require__(/*! ./internal/_isInteger */ "./node_modules/ramda/src/internal/_isInteger.js"); var assoc = /*#__PURE__*/__webpack_require__(/*! ./assoc */ "./node_modules/ramda/src/assoc.js"); var isNil = /*#__PURE__*/__webpack_require__(/*! ./isNil */ "./node_modules/ramda/src/isNil.js"); /** * Makes a shallow clone of an object, setting or overriding the nodes required * to create the given path, and placing the specific value at the tail end of * that path. Note that this copies and flattens prototype properties onto the * new object as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> a -> {a} -> {a} * @param {Array} path the path to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except along the specified path. * @see R.dissocPath * @example * * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} * * // Any missing or non-object keys in path will be overridden * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} */ var assocPath = /*#__PURE__*/_curry3(function assocPath(path, val, obj) { if (path.length === 0) { return val; } var idx = path[0]; if (path.length > 1) { var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); } if (_isInteger(idx) && _isArray(obj)) { var arr = [].concat(obj); arr[idx] = val; return arr; } else { return assoc(idx, val, obj); } }); module.exports = assocPath; /***/ }), /***/ "./node_modules/ramda/src/curry.js": /*!*****************************************!*\ !*** ./node_modules/ramda/src/curry.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/src/internal/_curry1.js"); var curryN = /*#__PURE__*/__webpack_require__(/*! ./curryN */ "./node_modules/ramda/src/curryN.js"); /** * Returns a curried equivalent of the provided function. The curried function * has two unusual capabilities. First, its arguments needn't be provided one * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> a) -> (* -> a) * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curryN * @example * * var addFourNumbers = (a, b, c, d) => a + b + c + d; * * var curriedAddFourNumbers = R.curry(addFourNumbers); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curry = /*#__PURE__*/_curry1(function curry(fn) { return curryN(fn.length, fn); }); module.exports = curry; /***/ }), /***/ "./node_modules/ramda/src/curryN.js": /*!******************************************!*\ !*** ./node_modules/ramda/src/curryN.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./internal/_arity */ "./node_modules/ramda/src/internal/_arity.js"); var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/src/internal/_curry1.js"); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/src/internal/_curry2.js"); var _curryN = /*#__PURE__*/__webpack_require__(/*! ./internal/_curryN */ "./node_modules/ramda/src/internal/_curryN.js"); /** * Returns a curried equivalent of the provided function, with the specified * arity. The curried function has two unusual capabilities. First, its * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.5.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curry * @example * * var sumArgs = (...args) => R.sum(args); * * var curriedAddFourNumbers = R.curryN(4, sumArgs); * var f = curriedAddFourNumbers(1, 2); * var g = f(3); * g(4); //=> 10 */ var curryN = /*#__PURE__*/_curry2(function curryN(length, fn) { if (length === 1) { return _curry1(fn); } return _arity(length, _curryN(length, [], fn)); }); module.exports = curryN; /***/ }), /***/ "./node_modules/ramda/src/internal/_arity.js": /*!***************************************************!*\ !*** ./node_modules/ramda/src/internal/_arity.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _arity(n, fn) { /* eslint-disable no-unused-vars */ switch (n) { case 0: return function () { return fn.apply(this, arguments); }; case 1: return function (a0) { return fn.apply(this, arguments); }; case 2: return function (a0, a1) { return fn.apply(this, arguments); }; case 3: return function (a0, a1, a2) { return fn.apply(this, arguments); }; case 4: return function (a0, a1, a2, a3) { return fn.apply(this, arguments); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.apply(this, arguments); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); }; default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); } } module.exports = _arity; /***/ }), /***/ "./node_modules/ramda/src/internal/_curry1.js": /*!****************************************************!*\ !*** ./node_modules/ramda/src/internal/_curry1.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/src/internal/_isPlaceholder.js"); /** * Optimized internal one-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry1(fn) { return function f1(a) { if (arguments.length === 0 || _isPlaceholder(a)) { return f1; } else { return fn.apply(this, arguments); } }; } module.exports = _curry1; /***/ }), /***/ "./node_modules/ramda/src/internal/_curry2.js": /*!****************************************************!*\ !*** ./node_modules/ramda/src/internal/_curry2.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/src/internal/_curry1.js"); var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/src/internal/_isPlaceholder.js"); /** * Optimized internal two-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry2(fn) { return function f2(a, b) { switch (arguments.length) { case 0: return f2; case 1: return _isPlaceholder(a) ? f2 : _curry1(function (_b) { return fn(a, _b); }); default: return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) { return fn(_a, b); }) : _isPlaceholder(b) ? _curry1(function (_b) { return fn(a, _b); }) : fn(a, b); } }; } module.exports = _curry2; /***/ }), /***/ "./node_modules/ramda/src/internal/_curry3.js": /*!****************************************************!*\ !*** ./node_modules/ramda/src/internal/_curry3.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./_curry1 */ "./node_modules/ramda/src/internal/_curry1.js"); var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./_curry2 */ "./node_modules/ramda/src/internal/_curry2.js"); var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/src/internal/_isPlaceholder.js"); /** * Optimized internal three-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry3(fn) { return function f3(a, b, c) { switch (arguments.length) { case 0: return f3; case 1: return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { return fn(a, _b, _c); }); case 2: return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { return fn(_a, b, _c); }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { return fn(a, _b, _c); }) : _curry1(function (_c) { return fn(a, b, _c); }); default: return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { return fn(_a, _b, c); }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { return fn(_a, b, _c); }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { return fn(a, _b, _c); }) : _isPlaceholder(a) ? _curry1(function (_a) { return fn(_a, b, c); }) : _isPlaceholder(b) ? _curry1(function (_b) { return fn(a, _b, c); }) : _isPlaceholder(c) ? _curry1(function (_c) { return fn(a, b, _c); }) : fn(a, b, c); } }; } module.exports = _curry3; /***/ }), /***/ "./node_modules/ramda/src/internal/_curryN.js": /*!****************************************************!*\ !*** ./node_modules/ramda/src/internal/_curryN.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _arity = /*#__PURE__*/__webpack_require__(/*! ./_arity */ "./node_modules/ramda/src/internal/_arity.js"); var _isPlaceholder = /*#__PURE__*/__webpack_require__(/*! ./_isPlaceholder */ "./node_modules/ramda/src/internal/_isPlaceholder.js"); /** * Internal curryN function. * * @private * @category Function * @param {Number} length The arity of the curried function. * @param {Array} received An array of arguments received thus far. * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curryN(length, received, fn) { return function () { var combined = []; var argsIdx = 0; var left = length; var combinedIdx = 0; while (combinedIdx < received.length || argsIdx < arguments.length) { var result; if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { result = received[combinedIdx]; } else { result = arguments[argsIdx]; argsIdx += 1; } combined[combinedIdx] = result; if (!_isPlaceholder(result)) { left -= 1; } combinedIdx += 1; } return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn)); }; } module.exports = _curryN; /***/ }), /***/ "./node_modules/ramda/src/internal/_has.js": /*!*************************************************!*\ !*** ./node_modules/ramda/src/internal/_has.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _has(prop, obj) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = _has; /***/ }), /***/ "./node_modules/ramda/src/internal/_isArray.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/src/internal/_isArray.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * Tests whether or not an object is an array. * * @private * @param {*} val The object to test. * @return {Boolean} `true` if `val` is an array, `false` otherwise. * @example * * _isArray([]); //=> true * _isArray(null); //=> false * _isArray({}); //=> false */ module.exports = Array.isArray || function _isArray(val) { return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; }; /***/ }), /***/ "./node_modules/ramda/src/internal/_isInteger.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/src/internal/_isInteger.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** * Determine if the passed argument is an integer. * * @private * @param {*} n * @category Type * @return {Boolean} */ module.exports = Number.isInteger || function _isInteger(n) { return n << 0 === n; }; /***/ }), /***/ "./node_modules/ramda/src/internal/_isPlaceholder.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/src/internal/_isPlaceholder.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _isPlaceholder(a) { return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; } module.exports = _isPlaceholder; /***/ }), /***/ "./node_modules/ramda/src/is.js": /*!**************************************!*\ !*** ./node_modules/ramda/src/is.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/src/internal/_curry2.js"); /** * See if an object (`val`) is an instance of the supplied constructor. This * function will check up the inheritance chain, if any. * * @func * @memberOf R * @since v0.3.0 * @category Type * @sig (* -> {*}) -> a -> Boolean * @param {Object} ctor A constructor * @param {*} val The value to test * @return {Boolean} * @example * * R.is(Object, {}); //=> true * R.is(Number, 1); //=> true * R.is(Object, 1); //=> false * R.is(String, 's'); //=> true * R.is(String, new String('')); //=> true * R.is(Object, new String('')); //=> true * R.is(Object, 's'); //=> false * R.is(Number, {}); //=> false */ var is = /*#__PURE__*/_curry2(function is(Ctor, val) { return val != null && val.constructor === Ctor || val instanceof Ctor; }); module.exports = is; /***/ }), /***/ "./node_modules/ramda/src/isNil.js": /*!*****************************************!*\ !*** ./node_modules/ramda/src/isNil.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry1 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry1 */ "./node_modules/ramda/src/internal/_curry1.js"); /** * Checks if the input value is `null` or `undefined`. * * @func * @memberOf R * @since v0.9.0 * @category Type * @sig * -> Boolean * @param {*} x The value to test. * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. * @example * * R.isNil(null); //=> true * R.isNil(undefined); //=> true * R.isNil(0); //=> false * R.isNil([]); //=> false */ var isNil = /*#__PURE__*/_curry1(function isNil(x) { return x == null; }); module.exports = isNil; /***/ }), /***/ "./node_modules/ramda/src/path.js": /*!****************************************!*\ !*** ./node_modules/ramda/src/path.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _curry2 = /*#__PURE__*/__webpack_require__(/*! ./internal/_curry2 */ "./node_modules/ramda/src/internal/_curry2.js"); /** * Retrieve the value at a given path. * * @func * @memberOf R * @since v0.2.0 * @category Object * @typedefn Idx = String | Int * @sig [Idx] -> {a} -> a | Undefined * @param {Array} path The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path`. * @see R.prop * @example * * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined */ var path = /*#__PURE__*/_curry2(function path(paths, obj) { var val = obj; var idx = 0; while (idx < paths.length) { if (val == null) { return; } val = val[paths[idx]]; idx += 1; } return val; }); module.exports = path; /***/ }), /***/ "./node_modules/redux-thunk/es/index.js": /*!**********************************************!*\ !*** ./node_modules/redux-thunk/es/index.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function createThunkMiddleware(extraArgument) { return function (_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; return function (next) { return function (action) { if (typeof action === 'function') { return action(dispatch, getState, extraArgument); } return next(action); }; }; }; } var thunk = createThunkMiddleware(); thunk.withExtraArgument = createThunkMiddleware; /* harmony default export */ __webpack_exports__["default"] = (thunk); /***/ }), /***/ "./node_modules/redux/es/redux.js": /*!****************************************!*\ !*** ./node_modules/redux/es/redux.js ***! \****************************************/ /*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose, __DO_NOT_USE__ActionTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; }); /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! symbol-observable */ "./node_modules/symbol-observable/es/index.js"); /** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ var ActionTypes = { INIT: '@@redux/INIT' + Math.random().toString(36).substring(7).split('').join('.'), REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.') }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false; var proto = obj; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(obj) === proto; } /** * Creates a Redux store that holds the state tree. * The only way to change the data in the store is to call `dispatch()` on it. * * There should only be a single store in your app. To specify how different * parts of the state tree respond to actions, you may combine several reducers * into a single reducer function by using `combineReducers`. * * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * * @param {any} [preloadedState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be * an object with the same shape as `combineReducers` keys. * * @param {Function} [enhancer] The store enhancer. You may optionally specify it * to enhance the store with third-party capabilities such as middleware, * time travel, persistence, etc. The only store enhancer that ships with Redux * is `applyMiddleware()`. * * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { enhancer = preloadedState; preloadedState = undefined; } if (typeof enhancer !== 'undefined') { if (typeof enhancer !== 'function') { throw new Error('Expected the enhancer to be a function.'); } return enhancer(createStore)(reducer, preloadedState); } if (typeof reducer !== 'function') { throw new Error('Expected the reducer to be a function.'); } var currentReducer = reducer; var currentState = preloadedState; var currentListeners = []; var nextListeners = currentListeners; var isDispatching = false; function ensureCanMutateNextListeners() { if (nextListeners === currentListeners) { nextListeners = currentListeners.slice(); } } /** * Reads the state tree managed by the store. * * @returns {any} The current state tree of your application. */ function getState() { if (isDispatching) { throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.'); } return currentState; } /** * Adds a change listener. It will be called any time an action is dispatched, * and some part of the state tree may potentially have changed. You may then * call `getState()` to read the current state tree inside t