summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-05 23:56:12 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-05 23:56:12 +0200
commit8c8e2e08d2ae89ba18ca05bab446e4642798dce2 (patch)
treed3153ba1fc32faa19d4094b2b5a18943f1e45dfa /public/bundle.js
parentc4dd63e487588cfa8e104a840af75854972b5ddb (diff)
pulling in wav2pix code
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js334
1 files changed, 2 insertions, 332 deletions
diff --git a/public/bundle.js b/public/bundle.js
index 22ebad3..cef61ad 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -9320,339 +9320,9 @@ exports.default = {
!*** ./app/client/util/index.js ***!
\**********************************/
/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.allProgress = exports.is_desktop = exports.is_mobile = exports.is_android = exports.is_ipad = exports.is_iphone = exports.sort = undefined;
-exports.clamp = clamp;
-exports.norm = norm;
-exports.lerp = lerp;
-exports.mix = mix;
-exports.randint = randint;
-exports.randrange = randrange;
-exports.timeInSeconds = timeInSeconds;
-exports.gerund = gerund;
-exports.commatize = commatize;
-exports.carbon_date = carbon_date;
-exports.hush_views = hush_views;
-exports.hush_threads = hush_threads;
-exports.hush_size = hush_size;
-exports.hush_null = hush_null;
-exports.get_age = get_age;
-exports.courtesy_s = courtesy_s;
-
-var _sort = __webpack_require__(/*! ./sort */ "./app/client/util/sort.js");
-
-var sort = _interopRequireWildcard(_sort);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-exports.sort = sort;
-var is_iphone = exports.is_iphone = !!(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i));
-var is_ipad = exports.is_ipad = !!navigator.userAgent.match(/iPad/i);
-var is_android = exports.is_android = !!navigator.userAgent.match(/Android/i);
-var is_mobile = exports.is_mobile = is_iphone || is_ipad || is_android;
-var is_desktop = exports.is_desktop = !is_mobile;
-
-var htmlClassList = document.body.parentNode.classList;
-htmlClassList.add(is_desktop ? 'desktop' : 'mobile');
-htmlClassList.remove('loading');
-
-// window.debug = false
-
-function clamp(n, a, b) {
- return n < a ? a : n < b ? n : b;
-}
-function norm(n, a, b) {
- return (n - a) / (b - a);
-}
-function lerp(n, a, b) {
- return (b - a) * n + a;
-}
-function mix(n, a, b) {
- return a * (1 - n) + b * n;
-}
-function randint(n) {
- return Math.floor(Math.random() * n);
-}
-function randrange(a, b) {
- return Math.random() * (b - a) + a;
-}
-
-document.body.style.backgroundImage = 'linear-gradient(' + (randint(40) + 40) + 'deg, #fde, #ffe)';
-
-var allProgress = exports.allProgress = function allProgress(promises, progress_cb) {
- var d = 0;
- progress_cb(0, 0, promises.length);
- promises.forEach(function (p) {
- p.then(function (s) {
- d += 1;
- progress_cb(Math.floor(d * 100 / promises.length), d, promises.length);
- return s;
- });
- });
- return Promise.all(promises);
-};
-
-function timeInSeconds(n) {
- return (n / 10).toFixed(1) + ' s.';
-}
-function gerund(s) {
- return s.replace(/e?$/, 'ing');
-}
-function commatize(n, radix) {
- radix = radix || 1024;
- var nums = [],
- i,
- counter = 0,
- r = Math.floor;
- if (n > radix) {
- n /= radix;
- nums.unshift(r(n * 10 % 10));
- nums.unshift(".");
- }
- do {
- i = n % 10;
- n = r(n / 10);
- if (n && !(++counter % 3)) {
- i = ' ' + r(i);
- }
- nums.unshift(r(i));
- } while (n);
- return nums.join("");
-}
-function carbon_date(date, no_bold) {
- var span = (+new Date() - new Date(date)) / 1000,
- color;
- if (!no_bold && span < 86400) // modified today
- {
- color = "new";
- } else if (span < 604800) // modifed this week
- {
- color = "recent";
- } else if (span < 1209600) // modifed 2 weeks ago
- {
- color = "med";
- } else if (span < 3024000) // modifed 5 weeks ago
- {
- color = "old";
- } else if (span < 12315200) // modifed 6 months ago
- {
- color = "older";
- } else {
- color = "quiet";
- }
- return color;
-}
-function hush_views(n, bias, no_bold) {
- var txt = commatize(n, 1000);
- bias = bias || 1;
- n = n || 0;
- if (n < 30) {
- return ["quiet", n + " v."];
- }
- if (n < 200) {
- return ["quiet", txt + " v."];
- } else if (n < 500) {
- return ["quiet", txt + " v."];
- } else if (n < 1000) {
- return ["old", txt + " v."];
- } else if (n < 5000) {
- return ["med", txt + " kv."];
- } else if (no_bold || n < 10000) {
- return ["recent", txt + " kv."];
- } else {
- return ["new", txt + " kv."];
- }
-}
-function hush_threads(n, bias, no_bold) {
- var txt = commatize(n, 1000);
- bias = bias || 1;
- n = n || 0;
- if (n < 10) {
- return ["quiet", n + " t."];
- } else if (n < 25) {
- return ["old", txt + " t."];
- } else if (n < 50) {
- return ["med", txt + " t."];
- } else if (no_bold || n < 100) {
- return ["recent", txt + " t."];
- } else {
- return ["new", txt + " t."];
- }
-}
-function hush_size(n, bias, no_bold) {
- var txt = commatize(Math.round(n / 1024));
- bias = 1 || bias;
- n = n || 0;
- if (!n) {
- return ['', ''];
- }
- if (n < 1000) {
- return ["quiet", n + " b."];
- }
- if (n < 1000000) {
- return ["quiet", txt + " kb."];
- } else if (n < 20000000 / bias) {
- return ["quiet", txt + " mb."];
- } else if (n < 50000000 / bias) {
- return ["old", txt + " mb."];
- } else if (n < 80000000 / bias) {
- return ["med", txt + " mb."];
- } else if (no_bold || n < 170000000 / bias) {
- return ["recent", txt + " mb."];
- } else {
- return ["new", txt + " mb."];
- }
-}
-function hush_null(n, unit, no_bold) {
- var s = unit ? n + " " + unit + "." : n;
- if (n < 3) {
- return ["quiet", s];
- } else if (n < 6) {
- return ["older", s];
- } else if (n < 10) {
- return ["old", s];
- } else if (n < 16) {
- return ["med", s];
- } else if (no_bold || n < 21) {
- return ["recent", s];
- } else {
- return ["new", s];
- }
-}
-function get_age(t) {
- var age = Math.abs(+Date.now() - new Date(t)) / 1000;
- var r = Math.floor;
- var m;
- if (age < 5) {
- return "now";
- }
- if (age < 60) {
- return r(age) + "s";
- }
- age /= 60;
- if (age < 60) {
- return r(age) + "m";
- }
- m = r(age % 60);
- age /= 60;
- if (m > 0 && age < 2) {
- return r(age) + "h" + m + "m";
- }
- if (age < 24) {
- return r(age) + "h";
- }
- age /= 24;
- if (age < 7) {
- return r(age) + "d";
- }
- age /= 7;
- if (age < 12) {
- return r(age) + "w";
- }
- age /= 4;
- if (age < 12) {
- return r(age) + "m";
- }
- age /= 12;
- return r(age) + "y";
-}
-function courtesy_s(n, s) {
- return n == 1 ? "" : s || "s";
-}
-
-/***/ }),
-
-/***/ "./app/client/util/sort.js":
-/*!*********************************!*\
- !*** ./app/client/util/sort.js ***!
- \*********************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-
-var numericSort = exports.numericSort = {
- asc: function asc(a, b) {
- return a[0] - b[0];
- },
- desc: function desc(a, b) {
- return b[0] - a[0];
- }
-};
-var stringSort = exports.stringSort = {
- asc: function asc(a, b) {
- return a[0].localeCompare(b[0]);
- },
- desc: function desc(a, b) {
- return b[0].localeCompare(a[0]);
- }
-};
-var orderByFn = exports.orderByFn = function orderByFn() {
- var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name asc';
-
- var _s$split = s.split(' '),
- _s$split2 = _slicedToArray(_s$split, 2),
- _s$split2$ = _s$split2[0],
- field = _s$split2$ === undefined ? 'name' : _s$split2$,
- _s$split2$2 = _s$split2[1],
- direction = _s$split2$2 === undefined ? 'asc' : _s$split2$2;
+/***/ (function(module, exports) {
- var mapFn = void 0,
- sortFn = void 0;
- switch (field) {
- case 'epoch':
- mapFn = function mapFn(a) {
- return [parseInt(a.epoch || a.epochs) || 0, a];
- };
- sortFn = numericSort[direction];
- break;
- case 'size':
- mapFn = function mapFn(a) {
- return [parseInt(a.size) || 0, a];
- };
- sortFn = numericSort[direction];
- break;
- case 'date':
- mapFn = function mapFn(a) {
- return [+new Date(a.date || a.created_at), a];
- };
- sortFn = numericSort[direction];
- break;
- case 'updated_at':
- mapFn = function mapFn(a) {
- return [+new Date(a.updated_at), a];
- };
- sortFn = numericSort[direction];
- break;
- case 'priority':
- mapFn = function mapFn(a) {
- return [parseInt(a.priority) || parseInt(a.id) || 1000, a];
- };
- sortFn = numericSort[direction];
- case 'name':
- default:
- mapFn = function mapFn(a) {
- return [a.name || "", a];
- };
- sortFn = stringSort[direction];
- break;
- }
- return { mapFn: mapFn, sortFn: sortFn };
-};
+throw new Error("Module build failed: SyntaxError: Unexpected token (7:2)\n\n\u001b[0m \u001b[90m 5 | \u001b[39m\u001b[36mexport\u001b[39m {\n \u001b[90m 6 | \u001b[39m sort\u001b[33m,\u001b[39m\n\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 7 | \u001b[39m \u001b[33m...\u001b[39mmaths\u001b[33m,\u001b[39m\n \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n \u001b[90m 8 | \u001b[39m \u001b[33m...\u001b[39mformat\u001b[33m,\u001b[39m\n \u001b[90m 9 | \u001b[39m}\n \u001b[90m 10 | \u001b[39m\u001b[0m\n");
/***/ }),