diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-29 03:09:00 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-29 03:09:00 +0200 |
| commit | 1726a81b320e92ce412c0fa2b2b05f73798cc4ee (patch) | |
| tree | eb3314621f652098ca8d046ad081b78aa89ba78d /public/bundle.js | |
| parent | 50904f4b010c417d558174005a7b4c5868e7d8d9 (diff) | |
folder browser
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 1543 |
1 files changed, 958 insertions, 585 deletions
diff --git a/public/bundle.js b/public/bundle.js index 526a1a9..4337723 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 20); +/******/ return __webpack_require__(__webpack_require__.s = 22); /******/ }) /************************************************************************/ /******/ ([ @@ -91,14 +91,14 @@ if (process.env.NODE_ENV !== 'production') { // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; - module.exports = __webpack_require__(23)(isValidElement, throwOnDirectAccess); + module.exports = __webpack_require__(26)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(25)(); + module.exports = __webpack_require__(28)(); } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), /* 1 */ @@ -121,7 +121,7 @@ if (process.env.NODE_ENV !== 'production') { /* unused harmony export unstable_renderSubtreeIntoContainer */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_preact__ = __webpack_require__(6); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_preact__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_preact___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_preact__); /* unused harmony reexport PropTypes */ @@ -744,30 +744,30 @@ var index = { /* harmony default export */ __webpack_exports__["a"] = (index); //# sourceMappingURL=preact-compat.es.js.map -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4))) /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(32); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(34); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(35); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(19); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(15); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(35); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(38); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_5__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(39); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_6__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__matchPath__ = __webpack_require__(15); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__matchPath__ = __webpack_require__(16); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_7__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__withRouter__ = __webpack_require__(37); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__withRouter__ = __webpack_require__(40); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_8__withRouter__["a"]; }); @@ -790,331 +790,6 @@ var index = { /***/ }), /* 3 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var warning = function() {}; - -if (process.env.NODE_ENV !== 'production') { - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - - if (format.length < 10 || (/^[s\W]*$/).test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; -} - -module.exports = warning; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) { - return path.charAt(0) === '/' ? path : '/' + path; -}; - -var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) { - return path.charAt(0) === '/' ? path.substr(1) : path; -}; - -var hasBasename = exports.hasBasename = function hasBasename(path, prefix) { - return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); -}; - -var stripBasename = exports.stripBasename = function stripBasename(path, prefix) { - return hasBasename(path, prefix) ? path.substr(prefix.length) : path; -}; - -var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) { - return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; -}; - -var parsePath = exports.parsePath = function parsePath(path) { - var pathname = path || '/'; - var search = ''; - var hash = ''; - - var hashIndex = pathname.indexOf('#'); - if (hashIndex !== -1) { - hash = pathname.substr(hashIndex); - pathname = pathname.substr(0, hashIndex); - } - - var searchIndex = pathname.indexOf('?'); - if (searchIndex !== -1) { - search = pathname.substr(searchIndex); - pathname = pathname.substr(0, searchIndex); - } - - return { - pathname: pathname, - search: search === '?' ? '' : search, - hash: hash === '#' ? '' : hash - }; -}; - -var createPath = exports.createPath = function createPath(location) { - var pathname = location.pathname, - search = location.search, - hash = location.hash; - - - var path = pathname || '/'; - - if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; - - if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; - - return path; -}; - -/***/ }), -/* 6 */ /***/ (function(module, exports, __webpack_require__) { !function() { @@ -1519,12 +1194,202 @@ var createPath = exports.createPath = function createPath(location) { //# sourceMappingURL=preact.js.map /***/ }), -/* 7 */ +/* 4 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-2015, Facebook, Inc. + * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -1535,79 +1400,88 @@ var createPath = exports.createPath = function createPath(location) { /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. */ -var invariant = function(condition, format, a, b, c, d, e, f) { - if (process.env.NODE_ENV !== 'production') { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } +var warning = function() {}; - if (!condition) { - var error; +if (process.env.NODE_ENV !== 'production') { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format ); - error.name = 'Invariant Violation'; } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -}; + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; +} -module.exports = invariant; +module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), -/* 8 */ +/* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(22); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(25); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(42); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HashRouter", function() { return __WEBPACK_IMPORTED_MODULE_1__HashRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(20); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(44); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(45); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return __WEBPACK_IMPORTED_MODULE_4__NavLink__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(46); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(47); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(48); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(49); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_8__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(50); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__StaticRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(51); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__matchPath__ = __webpack_require__(49); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__matchPath__ = __webpack_require__(52); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_11__matchPath__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__withRouter__ = __webpack_require__(50); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__withRouter__ = __webpack_require__(53); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_12__withRouter__["a"]; }); @@ -1637,12 +1511,248 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var addLeadingSlash = exports.addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; +}; + +var stripLeadingSlash = exports.stripLeadingSlash = function stripLeadingSlash(path) { + return path.charAt(0) === '/' ? path.substr(1) : path; +}; + +var hasBasename = exports.hasBasename = function hasBasename(path, prefix) { + return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); +}; + +var stripBasename = exports.stripBasename = function stripBasename(path, prefix) { + return hasBasename(path, prefix) ? path.substr(prefix.length) : path; +}; + +var stripTrailingSlash = exports.stripTrailingSlash = function stripTrailingSlash(path) { + return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; +}; + +var parsePath = exports.parsePath = function parsePath(path) { + var pathname = path || '/'; + var search = ''; + var hash = ''; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substr(hashIndex); + pathname = pathname.substr(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substr(searchIndex); + pathname = pathname.substr(0, searchIndex); + } + + return { + pathname: pathname, + search: search === '?' ? '' : search, + hash: hash === '#' ? '' : hash + }; +}; + +var createPath = exports.createPath = function createPath(location) { + var pathname = location.pathname, + search = location.search, + hash = location.hash; + + + var path = pathname || '/'; + + if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search; + + if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash; + + return path; +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (process.env.NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) + +/***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +function _get(data) { + return { + method: 'GET', + headers: { + 'Accept': 'application/json' + }, + query: data + }; +} +function post(data) { + return { + method: 'POST', + body: JSON.stringify(data), + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + }; +} +function postBody(data) { + return { + method: 'POST', + body: data, + headers: { + 'Accept': 'application/json' + } + }; +} +function put(data) { + return { + method: 'PUT', + body: JSON.stringify(data), + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + }; +} +function _destroy(data) { + return { + method: 'DELETE', + body: JSON.stringify(data), + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + }; +} +function error(err) { + console.warn(err); +} +function crud(type_s) { + var type = '/' + type_s + 's/'; + return { + index: function index(data) { + return fetch(type, _get(data)).then(function (req) { + return req.json(); + }).catch(error); + }, + + show: function show(id) { + return fetch(type + id).then(function (req) { + return req.json(); + }).catch(error); + }, + + create: function create(data) { + return fetch(type, post(data)).then(function (req) { + return req.json(); + }).catch(error); + }, + + update: function update(data) { + return fetch(type + data.id, put(data)).then(function (req) { + return req.json(); + }).catch(error); + }, + + destroy: function destroy(data) { + return fetch(type + data.id, _destroy(data)).then(function (req) { + return req.json(); + }).catch(error); + } + }; +} + +exports.default = { + folder: crud('folder'), + file: crud('file'), + upload: function upload(folder_id, files) { + var data = new FormData(); + for (var i = 0; i < files.length; i++) { + data.append('file', files[i]); + } + return fetch('/folders/' + folder_id, postBody(files)).then(function (req) { + return req.json(); + }).catch(error); + } +}; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. @@ -1681,7 +1791,7 @@ emptyFunction.thatReturnsArgument = function (arg) { module.exports = emptyFunction; /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1740,10 +1850,10 @@ function invariant(condition, format, a, b, c, d, e, f) { } module.exports = invariant; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1764,7 +1874,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1775,15 +1885,15 @@ exports.locationsAreEqual = exports.createLocation = undefined; 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; }; -var _resolvePathname = __webpack_require__(27); +var _resolvePathname = __webpack_require__(30); var _resolvePathname2 = _interopRequireDefault(_resolvePathname); -var _valueEqual = __webpack_require__(28); +var _valueEqual = __webpack_require__(31); var _valueEqual2 = _interopRequireDefault(_valueEqual); -var _PathUtils = __webpack_require__(5); +var _PathUtils = __webpack_require__(7); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1848,7 +1958,7 @@ var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a }; /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1856,7 +1966,7 @@ var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a exports.__esModule = true; -var _warning = __webpack_require__(4); +var _warning = __webpack_require__(5); var _warning2 = _interopRequireDefault(_warning); @@ -1939,13 +2049,13 @@ var createTransitionManager = function createTransitionManager() { exports.default = createTransitionManager; /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(0); @@ -2057,11 +2167,11 @@ Router.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); @@ -2132,7 +2242,7 @@ var matchPath = function matchPath(pathname) { /* harmony default export */ __webpack_exports__["a"] = (matchPath); /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2148,7 +2258,7 @@ var matchPath = function matchPath(pathname) { -var emptyFunction = __webpack_require__(9); +var emptyFunction = __webpack_require__(10); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -2202,10 +2312,10 @@ if (process.env.NODE_ENV !== 'production') { } module.exports = warning; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2266,16 +2376,16 @@ var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isE }; /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matchPath__ = __webpack_require__(15); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matchPath__ = __webpack_require__(16); 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; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2409,7 +2519,7 @@ Route.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2511,19 +2621,70 @@ Link.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Link); /***/ }), -/* 20 */ +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _preact = __webpack_require__(3); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Modal = function (_Component) { + _inherits(Modal, _Component); + + function Modal(props) { + _classCallCheck(this, Modal); + + return _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this)); + } + + _createClass(Modal, [{ + key: 'render', + value: function render() { + var className = this.props.visible ? 'modal visible' : 'modal'; + return (0, _preact.h)( + 'div', + { 'class': className }, + (0, _preact.h)( + 'div', + { 'class': 'inner' }, + this.props.children + ) + ); + } + }]); + + return Modal; +}(_preact.Component); + +exports.default = Modal; + +/***/ }), +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _preact = __webpack_require__(6); +var _preact = __webpack_require__(3); -var _App = __webpack_require__(21); +var _App = __webpack_require__(23); var _App2 = _interopRequireDefault(_App); -var _reactRouterDom = __webpack_require__(8); +var _reactRouterDom = __webpack_require__(6); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -2536,7 +2697,7 @@ var app = (0, _preact.h)( (0, _preact.render)(app, document.getElementById('container')); /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2548,13 +2709,13 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _preact = __webpack_require__(6); +var _preact = __webpack_require__(3); -var _util = __webpack_require__(52); +var _util = __webpack_require__(24); -var _reactRouterDom = __webpack_require__(8); +var _reactRouterDom = __webpack_require__(6); -var _Header = __webpack_require__(51); +var _Header = __webpack_require__(54); var _Header2 = _interopRequireDefault(_Header); @@ -2562,6 +2723,14 @@ var _Folders = __webpack_require__(55); var _Folders2 = _interopRequireDefault(_Folders); +var _Folder = __webpack_require__(57); + +var _Folder2 = _interopRequireDefault(_Folder); + +var _client = __webpack_require__(9); + +var _client2 = _interopRequireDefault(_client); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2581,19 +2750,38 @@ var App = function (_Component) { var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this)); _this.state = { - folders: null + folders: null, + openFolders: [] }; + _client2.default.folder.index().then(function (folders) { + return _this.setState({ folders: folders }); + }); return _this; } _createClass(App, [{ + key: 'openFolder', + value: function openFolder(folder) { + if (this.state.openFolders.indexOf(folder) === -1) { + this.setState({ openFolders: this.state.openFolders.concat([folder]) }); + } + } + }, { key: 'render', value: function render() { + var _this2 = this; + + var openFolders = this.state.openFolders.map(function (folder) { + return (0, _preact.h)(_Folder2.default, { folder: folder }); + }); return (0, _preact.h)( 'div', null, (0, _preact.h)(_Header2.default, null), - (0, _preact.h)(_Folders2.default, null) + (0, _preact.h)(_Folders2.default, { folders: this.state.folders, openFolder: function openFolder(folder) { + return _this2.openFolder(folder); + } }), + openFolders ); } }]); @@ -2604,14 +2792,63 @@ var App = function (_Component) { exports.default = (0, _reactRouterDom.withRouter)(App); /***/ }), -/* 22 */ +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var isIphone = navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i); +var isIpad = navigator.userAgent.match(/iPad/i); +var isAndroid = navigator.userAgent.match(/Android/i); +var isMobile = isIphone || isIpad || isAndroid; +var isDesktop = !isMobile; + +document.body.classList.add(isMobile ? 'mobile' : 'desktop'); + +var browser = { isIphone: isIphone, isIpad: isIpad, isAndroid: isAndroid, isMobile: isMobile, isDesktop: isDesktop }; + +function clamp(n, a, b) { + return n < a ? a : n < b ? n : b; +} +function mod(n, m) { + return n - m * Math.floor(n / m); +} +function choice(a) { + return a[randint(a.length)]; +} +function randint(n) { + return Math.floor(Math.random() * n); +} +function randrange(a, b) { + return Math.random() * (b - a) + a; +} +function firstTouch(f) { + return function (e) { + e.preventDefault();f(e.touches[0]); + }; +} + +exports.browser = browser; +exports.clamp = clamp; +exports.mod = mod; +exports.choice = choice; +exports.randint = randint; +exports.randrange = randrange; +exports.firstTouch = firstTouch; + +/***/ }), +/* 25 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createBrowserHistory__ = __webpack_require__(26); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createBrowserHistory__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_createBrowserHistory__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router__ = __webpack_require__(2); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2663,7 +2900,7 @@ BrowserRouter.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (BrowserRouter); /***/ }), -/* 23 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2678,12 +2915,12 @@ BrowserRouter.propTypes = { -var emptyFunction = __webpack_require__(9); -var invariant = __webpack_require__(10); -var warning = __webpack_require__(16); +var emptyFunction = __webpack_require__(10); +var invariant = __webpack_require__(11); +var warning = __webpack_require__(17); -var ReactPropTypesSecret = __webpack_require__(11); -var checkPropTypes = __webpack_require__(24); +var ReactPropTypesSecret = __webpack_require__(12); +var checkPropTypes = __webpack_require__(27); module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ @@ -3180,10 +3417,10 @@ module.exports = function(isValidElement, throwOnDirectAccess) { return ReactPropTypes; }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), -/* 24 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3199,9 +3436,9 @@ module.exports = function(isValidElement, throwOnDirectAccess) { if (process.env.NODE_ENV !== 'production') { - var invariant = __webpack_require__(10); - var warning = __webpack_require__(16); - var ReactPropTypesSecret = __webpack_require__(11); + var invariant = __webpack_require__(11); + var warning = __webpack_require__(17); + var ReactPropTypesSecret = __webpack_require__(12); var loggedTypeFailures = {}; } @@ -3249,10 +3486,10 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { module.exports = checkPropTypes; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }), -/* 25 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3267,9 +3504,9 @@ module.exports = checkPropTypes; -var emptyFunction = __webpack_require__(9); -var invariant = __webpack_require__(10); -var ReactPropTypesSecret = __webpack_require__(11); +var emptyFunction = __webpack_require__(10); +var invariant = __webpack_require__(11); +var ReactPropTypesSecret = __webpack_require__(12); module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { @@ -3318,7 +3555,7 @@ module.exports = function() { /***/ }), -/* 26 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3330,23 +3567,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol 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; }; -var _warning = __webpack_require__(4); +var _warning = __webpack_require__(5); var _warning2 = _interopRequireDefault(_warning); -var _invariant = __webpack_require__(7); +var _invariant = __webpack_require__(8); var _invariant2 = _interopRequireDefault(_invariant); -var _LocationUtils = __webpack_require__(12); +var _LocationUtils = __webpack_require__(13); -var _PathUtils = __webpack_require__(5); +var _PathUtils = __webpack_require__(7); -var _createTransitionManager = __webpack_require__(13); +var _createTransitionManager = __webpack_require__(14); var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); -var _DOMUtils = __webpack_require__(17); +var _DOMUtils = __webpack_require__(18); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -3631,7 +3868,7 @@ var createBrowserHistory = function createBrowserHistory() { exports.default = createBrowserHistory; /***/ }), -/* 27 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3707,7 +3944,7 @@ var resolvePathname = function resolvePathname(to) { module.exports = resolvePathname; /***/ }), -/* 28 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3753,16 +3990,16 @@ var valueEqual = function valueEqual(a, b) { exports.default = valueEqual; /***/ }), -/* 29 */ +/* 32 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createMemoryHistory__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createMemoryHistory__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_createMemoryHistory__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Router__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Router__ = __webpack_require__(15); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } @@ -3812,7 +4049,7 @@ MemoryRouter.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (MemoryRouter); /***/ }), -/* 30 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3824,15 +4061,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol 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; }; -var _warning = __webpack_require__(4); +var _warning = __webpack_require__(5); var _warning2 = _interopRequireDefault(_warning); -var _PathUtils = __webpack_require__(5); +var _PathUtils = __webpack_require__(7); -var _LocationUtils = __webpack_require__(12); +var _LocationUtils = __webpack_require__(13); -var _createTransitionManager = __webpack_require__(13); +var _createTransitionManager = __webpack_require__(14); var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); @@ -3988,7 +4225,7 @@ var createMemoryHistory = function createMemoryHistory() { exports.default = createMemoryHistory; /***/ }), -/* 31 */ +/* 34 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4073,7 +4310,7 @@ Prompt.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Prompt); /***/ }), -/* 32 */ +/* 35 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4158,10 +4395,10 @@ Redirect.contextTypes = { /* harmony default export */ __webpack_exports__["a"] = (Redirect); /***/ }), -/* 33 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { -var isarray = __webpack_require__(34) +var isarray = __webpack_require__(37) /** * Expose `pathToRegexp`. @@ -4590,7 +4827,7 @@ function pathToRegexp (path, keys, options) { /***/ }), -/* 34 */ +/* 37 */ /***/ (function(module, exports) { module.exports = Array.isArray || function (arr) { @@ -4599,18 +4836,18 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 35 */ +/* 38 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history_PathUtils__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history_PathUtils__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history_PathUtils___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_history_PathUtils__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(15); 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; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -4774,16 +5011,16 @@ StaticRouter.childContextTypes = { /* harmony default export */ __webpack_exports__["a"] = (StaticRouter); /***/ }), -/* 36 */ +/* 39 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matchPath__ = __webpack_require__(15); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matchPath__ = __webpack_require__(16); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } @@ -4859,16 +5096,16 @@ Switch.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (Switch); /***/ }), -/* 37 */ +/* 40 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(38); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(19); 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; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -4903,7 +5140,7 @@ var withRouter = function withRouter(Component) { /* harmony default export */ __webpack_exports__["a"] = (withRouter); /***/ }), -/* 38 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4960,14 +5197,14 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, /***/ }), -/* 39 */ +/* 42 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createHashHistory__ = __webpack_require__(40); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createHashHistory__ = __webpack_require__(43); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_createHashHistory__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router__ = __webpack_require__(2); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -5018,7 +5255,7 @@ HashRouter.propTypes = { /* harmony default export */ __webpack_exports__["a"] = (HashRouter); /***/ }), -/* 40 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5028,23 +5265,23 @@ exports.__esModule = true; 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; }; -var _warning = __webpack_require__(4); +var _warning = __webpack_require__(5); var _warning2 = _interopRequireDefault(_warning); -var _invariant = __webpack_require__(7); +var _invariant = __webpack_require__(8); var _invariant2 = _interopRequireDefault(_invariant); -var _LocationUtils = __webpack_require__(12); +var _LocationUtils = __webpack_require__(13); -var _PathUtils = __webpack_require__(5); +var _PathUtils = __webpack_require__(7); -var _createTransitionManager = __webpack_require__(13); +var _createTransitionManager = __webpack_require__(14); var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); -var _DOMUtils = __webpack_require__(17); +var _DOMUtils = __webpack_require__(18); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -5348,7 +5585,7 @@ var createHashHistory = function createHashHistory() { exports.default = createHashHistory; /***/ }), -/* 41 */ +/* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5357,7 +5594,7 @@ exports.default = createHashHistory; /***/ }), -/* 42 */ +/* 45 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5365,7 +5602,7 @@ exports.default = createHashHistory; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_router__ = __webpack_require__(2); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Link__ = __webpack_require__(20); 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; }; 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; }; @@ -5433,7 +5670,7 @@ NavLink.defaultProps = { /* harmony default export */ __webpack_exports__["a"] = (NavLink); /***/ }), -/* 43 */ +/* 46 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5442,7 +5679,7 @@ NavLink.defaultProps = { /***/ }), -/* 44 */ +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5451,7 +5688,7 @@ NavLink.defaultProps = { /***/ }), -/* 45 */ +/* 48 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5460,7 +5697,7 @@ NavLink.defaultProps = { /***/ }), -/* 46 */ +/* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5469,7 +5706,7 @@ NavLink.defaultProps = { /***/ }), -/* 47 */ +/* 50 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5478,7 +5715,7 @@ NavLink.defaultProps = { /***/ }), -/* 48 */ +/* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5487,7 +5724,7 @@ NavLink.defaultProps = { /***/ }), -/* 49 */ +/* 52 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5496,7 +5733,7 @@ NavLink.defaultProps = { /***/ }), -/* 50 */ +/* 53 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5505,7 +5742,7 @@ NavLink.defaultProps = { /***/ }), -/* 51 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5517,9 +5754,9 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _preact = __webpack_require__(6); +var _preact = __webpack_require__(3); -var _reactRouterDom = __webpack_require__(8); +var _reactRouterDom = __webpack_require__(6); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -5556,7 +5793,7 @@ var Header = function (_Component) { exports.default = Header; /***/ }), -/* 52 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5565,48 +5802,119 @@ exports.default = Header; Object.defineProperty(exports, "__esModule", { value: true }); -var isIphone = navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i); -var isIpad = navigator.userAgent.match(/iPad/i); -var isAndroid = navigator.userAgent.match(/Android/i); -var isMobile = isIphone || isIpad || isAndroid; -var isDesktop = !isMobile; -document.body.classList.add(isMobile ? 'mobile' : 'desktop'); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var browser = { isIphone: isIphone, isIpad: isIpad, isAndroid: isAndroid, isMobile: isMobile, isDesktop: isDesktop }; +var _preact = __webpack_require__(3); -function clamp(n, a, b) { - return n < a ? a : n < b ? n : b; -} -function mod(n, m) { - return n - m * Math.floor(n / m); -} -function choice(a) { - return a[randint(a.length)]; -} -function randint(n) { - return Math.floor(Math.random() * n); -} -function randrange(a, b) { - return Math.random() * (b - a) + a; -} -function firstTouch(f) { - return function (e) { - e.preventDefault();f(e.touches[0]); - }; -} +var _reactRouterDom = __webpack_require__(6); -exports.browser = browser; -exports.clamp = clamp; -exports.mod = mod; -exports.choice = choice; -exports.randint = randint; -exports.randrange = randrange; -exports.firstTouch = firstTouch; +var _Modal = __webpack_require__(21); + +var _Modal2 = _interopRequireDefault(_Modal); + +var _FolderForm = __webpack_require__(56); + +var _FolderForm2 = _interopRequireDefault(_FolderForm); + +var _client = __webpack_require__(9); + +var _client2 = _interopRequireDefault(_client); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Folders = function (_Component) { + _inherits(Folders, _Component); + + function Folders(props) { + _classCallCheck(this, Folders); + + var _this = _possibleConstructorReturn(this, (Folders.__proto__ || Object.getPrototypeOf(Folders)).call(this)); + + _this.state = { + adding: false + }; + return _this; + } + + _createClass(Folders, [{ + key: 'openModal', + value: function openModal() { + this.setState({ adding: true }); + } + }, { + key: 'closeModal', + value: function closeModal() { + this.setState({ adding: false }); + } + }, { + key: 'toggle', + value: function toggle(folder) { + var _this2 = this; + + folder.open = !folder.open; + if (folder.open && !folder.files) { + _client2.default.file.index({ 'folder_id': folder.id }).then(function (files) { + _this2.props.openFolder(folder); + }); + } + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + console.log(this.props); + var folders = (this.props.folders || []).map(function (folder, i) { + return (0, _preact.h)( + 'div', + { key: i, onClick: function onClick() { + return _this3.toggle(folder); + } }, + folder.name + ); + }); + return (0, _preact.h)( + 'div', + { 'class': 'folders' }, + (0, _preact.h)( + 'b', + null, + 'folders' + ), + ' ', + (0, _preact.h)( + 'button', + { onClick: function onClick() { + return _this3.openModal(); + } }, + '+ folder' + ), + folders, + (0, _preact.h)( + _Modal2.default, + { visible: this.state.adding, onClose: function onClose() { + return _this3.closeModal(); + } }, + (0, _preact.h)(_FolderForm2.default, null) + ) + ); + } + }]); + + return Folders; +}(_preact.Component); + +exports.default = Folders; /***/ }), -/* 53 */, -/* 54 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5618,7 +5926,17 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _preact = __webpack_require__(6); +var _preact = __webpack_require__(3); + +var _reactRouterDom = __webpack_require__(6); + +var _client = __webpack_require__(9); + +var _client2 = _interopRequireDefault(_client); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -5626,38 +5944,90 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -var Modal = function (_Component) { - _inherits(Modal, _Component); +var FolderForm = function (_Component) { + _inherits(FolderForm, _Component); - function Modal(props) { - _classCallCheck(this, Modal); + function FolderForm(props) { + _classCallCheck(this, FolderForm); - return _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this)); + var _this = _possibleConstructorReturn(this, (FolderForm.__proto__ || Object.getPrototypeOf(FolderForm)).call(this)); + + _this.state = { + name: '' + }; + _this.updateState = _this.updateState.bind(_this); + _this.handleSubmit = _this.handleSubmit.bind(_this); + return _this; } - _createClass(Modal, [{ + _createClass(FolderForm, [{ + key: 'updateState', + value: function updateState(event) { + var _setState; + + var name = event.target.name; + var value = event.target.value; + console.log(name, value); + this.setState((_setState = {}, _defineProperty(_setState, name, value), _defineProperty(_setState, 'error', null), _setState)); + } + }, { + key: 'handleSubmit', + value: function handleSubmit(event) { + event.preventDefault(); + var rec = Object.assign({}, this.state); + delete rec.error; + _client2.default.folder.create(rec).then(function (data) { + console.log(data); + }); + } + }, { key: 'render', value: function render() { - var className = this.props.visible ? 'modal visible' : 'modal'; return (0, _preact.h)( 'div', - { 'class': className }, + { 'class': 'form' }, + (0, _preact.h)( + 'h1', + null, + 'Create a new folder' + ), (0, _preact.h)( 'div', - { 'class': 'inner' }, - this.props.children + null, + (0, _preact.h)( + 'label', + { 'for': 'folders_folder_name' }, + 'Name' + ), + (0, _preact.h)('input', { type: 'text', id: 'folders_folder_name', name: 'name', value: this.state.name, onChange: this.updateState }), + (0, _preact.h)( + 'label', + { 'for': 'folders_folder_description' }, + 'Description' + ), + (0, _preact.h)('textarea', { id: 'folders_folder_description', name: 'description', value: this.state.description, onChange: this.updateState }) + ), + (0, _preact.h)( + 'div', + null, + (0, _preact.h)('label', null), + (0, _preact.h)( + 'button', + { onClick: this.handleSubmit }, + 'Create' + ) ) ); } }]); - return Modal; + return FolderForm; }(_preact.Component); -exports.default = Modal; +exports.default = FolderForm; /***/ }), -/* 55 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5669,17 +6039,17 @@ Object.defineProperty(exports, "__esModule", { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _preact = __webpack_require__(6); +var _preact = __webpack_require__(3); -var _reactRouterDom = __webpack_require__(8); +var _reactRouterDom = __webpack_require__(6); -var _Modal = __webpack_require__(54); +var _Modal = __webpack_require__(21); var _Modal2 = _interopRequireDefault(_Modal); -var _FolderForm = __webpack_require__(56); +var _client = __webpack_require__(9); -var _FolderForm2 = _interopRequireDefault(_FolderForm); +var _client2 = _interopRequireDefault(_client); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -5689,13 +6059,13 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -var Folders = function (_Component) { - _inherits(Folders, _Component); +var Folder = function (_Component) { + _inherits(Folder, _Component); - function Folders(props) { - _classCallCheck(this, Folders); + function Folder(props) { + _classCallCheck(this, Folder); - var _this = _possibleConstructorReturn(this, (Folders.__proto__ || Object.getPrototypeOf(Folders)).call(this)); + var _this = _possibleConstructorReturn(this, (Folder.__proto__ || Object.getPrototypeOf(Folder)).call(this)); _this.state = { adding: false @@ -5703,53 +6073,56 @@ var Folders = function (_Component) { return _this; } - _createClass(Folders, [{ - key: 'openModal', - value: function openModal() { - this.setState({ adding: true }); - } - }, { - key: 'closeModal', - value: function closeModal() { - this.setState({ adding: false }); + _createClass(Folder, [{ + key: 'toggle', + value: function toggle(folder) { + var _this2 = this; + + folder.open = !folder.open; + if (folder.open && !folder.files) { + _client2.default.files.index({ 'folder_id': folder.id }).then(function (files) { + _this2.props.openFolder(folder); + }); + } } }, { key: 'render', value: function render() { - var _this2 = this; + var _this3 = this; + console.log(this.props); + var folders = (this.props.folders || []).map(function (folder, i) { + return (0, _preact.h)( + 'div', + { key: i, onClick: function onClick() { + return _this3.toggle(folder); + } }, + folder.name + ); + }); return (0, _preact.h)( 'div', { 'class': 'folders' }, (0, _preact.h)( - 'button', - { onClick: function onClick() { - return _this2.openModal(); - } }, - '+' + 'b', + null, + this.props.folder.name ), + ' ', (0, _preact.h)( - _Modal2.default, - { visible: this.state.adding, onClose: function onClose() { - return _this2.closeModal(); - } }, - (0, _preact.h)(_FolderForm2.default, null) - ) + 'button', + { onClick: function onClick() {} }, + '+ file' + ), + folders ); } }]); - return Folders; + return Folder; }(_preact.Component); -exports.default = Folders; - -/***/ }), -/* 56 */ -/***/ (function(module, exports) { - -"use strict"; -throw new Error("Module build failed: SyntaxError: Unterminated regular expression (41:57)\n\n\u001b[0m \u001b[90m 39 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33mdiv\u001b[39m\u001b[33m>\u001b[39m\n \u001b[90m 40 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33mlabel\u001b[39m\u001b[33m>\u001b[39m\u001b[33m<\u001b[39m\u001b[33m/\u001b[39m\u001b[33mlabel\u001b[39m\u001b[33m>\u001b[39m\n\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 41 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33mbutton\u001b[39m onClick\u001b[33m=\u001b[39m{() \u001b[33m=>\u001b[39m \u001b[36mthis\u001b[39m\u001b[33m.\u001b[39mcreate()\u001b[33m>\u001b[39m\u001b[33mCreate\u001b[39m\u001b[33m<\u001b[39m\u001b[33m/\u001b[39m\u001b[33mbutton\u001b[39m\u001b[33m>\u001b[39m\n \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n \u001b[90m 42 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33m/\u001b[39m\u001b[33mdiv\u001b[39m\u001b[33m>\u001b[39m\n \u001b[90m 43 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33m/\u001b[39m\u001b[33mdiv\u001b[39m\u001b[33m>\u001b[39m\n \u001b[90m 44 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33m/\u001b[39m\u001b[33mdiv\u001b[39m\u001b[33m>\u001b[39m\u001b[0m\n"); +exports.default = Folder; /***/ }) /******/ ]); |
