diff --git a/dist/common/lib.js b/dist/common/lib.js index bdcb13b..a6ecec4 100644 --- a/dist/common/lib.js +++ b/dist/common/lib.js @@ -4,18 +4,4 @@ function isDev() { return process.env.NODE_ENV !== 'production'; } exports.isDev = isDev; -exports.KNOWN_TYPES = { - img: ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'], - video: ['video/x-ms-wmv', 'video/x-msvideo', 'video/mp4', 'video/x-flv'] -}; -function getTypeOfDoc(mimeType) { - var i; - for (i in exports.KNOWN_TYPES) { - if (exports.KNOWN_TYPES[i].some(function (s) { return s === mimeType; })) { - return i; - } - } - console.error("Unknown mime type " + mimeType); -} -exports.getTypeOfDoc = getTypeOfDoc; //# sourceMappingURL=lib.js.map \ No newline at end of file diff --git a/dist/common/lib.js.map b/dist/common/lib.js.map index 23ef988..3d644fe 100644 --- a/dist/common/lib.js.map +++ b/dist/common/lib.js.map @@ -1 +1 @@ -{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/common/lib.ts"],"names":[],"mappings":";;AAEA,SAAgB,KAAK;IACjB,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAA;AAChD,CAAC;AAFD,sBAEC;AAEY,QAAA,WAAW,GAAG;IACvB,GAAG,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,CAAC;IAC9D,KAAK,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,CAAC;CAC3E,CAAA;AACD,SAAgB,YAAY,CAAC,QAAgB;IACzC,IAAI,CAAY,CAAA;IAChB,KAAK,CAAC,IAAI,mBAAW,EAAE;QACnB,IAAI,mBAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,KAAK,QAAQ,EAAd,CAAc,CAAC,EAAE;YAC5C,OAAO,CAAC,CAAA;SACX;KACJ;IACD,OAAO,CAAC,KAAK,CAAC,uBAAqB,QAAU,CAAC,CAAA;AAClD,CAAC;AARD,oCAQC"} \ No newline at end of file +{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/common/lib.ts"],"names":[],"mappings":";;AAAA,SAAgB,KAAK;IACjB,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAA;AAChD,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/dist/server/controllers/provide-media.js b/dist/server/controllers/provide-media.js index f86785a..50dd240 100644 --- a/dist/server/controllers/provide-media.js +++ b/dist/server/controllers/provide-media.js @@ -41,12 +41,12 @@ var media_1 = require("../media"); var DEFAULT_LIMIT = 20; var MAX_LIMIT = 100; exports.provideMedia = utils_1.asyncHandler(function (req, res) { return __awaiter(_this, void 0, void 0, function () { - var _a, skip, limit, intLimit, normalizedCount, querySkipItems, queryLimitItems, query, itemsCountForQuery, canProvideMoreItems, userMediaItems, respData, err_1; + var _a, skip, limit, tags, intLimit, normalizedCount, querySkipItems, queryLimitItems, query, itemsCountForQuery, canProvideMoreItems, userMediaItems, respData, err_1; return __generator(this, function (_b) { switch (_b.label) { case 0: _b.trys.push([0, 3, , 4]); - _a = req.query, skip = _a.skip, limit = _a.limit; + _a = req.query, skip = _a.skip, limit = _a.limit, tags = _a.tags; intLimit = parseInt(limit); normalizedCount = !intLimit || intLimit <= 0 ? DEFAULT_LIMIT : intLimit; querySkipItems = parseInt(skip) || 0; @@ -54,6 +54,9 @@ exports.provideMedia = utils_1.asyncHandler(function (req, res) { return __await query = { owner: req.user._id }; + if (tags && tags.length) { + query.tags = { $all: tags }; + } return [4 /*yield*/, media_1.MediaModel.find(query).count()]; case 1: itemsCountForQuery = _b.sent(); diff --git a/dist/server/controllers/provide-media.js.map b/dist/server/controllers/provide-media.js.map index 11af148..d1f8dd0 100644 --- a/dist/server/controllers/provide-media.js.map +++ b/dist/server/controllers/provide-media.js.map @@ -1 +1 @@ -{"version":3,"file":"provide-media.js","sourceRoot":"","sources":["../../../src/server/controllers/provide-media.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAqCA;;AArCA,kCAAqC;AAErC,kCAAwD;AAGxD,IAAM,aAAa,GAAG,EAAE,CAAA;AACxB,IAAM,SAAS,GAAG,GAAG,CAAA;AAER,QAAA,YAAY,GAAG,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;;;gBAE1C,KAAgB,GAAG,CAAC,KAAK,EAAxB,IAAI,UAAA,EAAE,KAAK,WAAA,CAAa;gBACzB,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAC1B,eAAe,GAAG,CAAC,QAAQ,IAAI,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAA;gBACvE,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACpC,eAAe,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAA;gBAC3E,KAAK,GAAG;oBACV,KAAK,EAAG,GAAG,CAAC,IAAoB,CAAC,GAAG;iBACvC,CAAA;gBAC0B,qBAAM,kBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAA;;gBAAzD,kBAAkB,GAAG,SAAoC;gBACzD,mBAAmB,GAAG,cAAc,GAAG,eAAe,GAAG,kBAAkB,CAAA;gBAC1D,qBAAM,kBAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;wBACtD,IAAI,EAAE,cAAc;wBACpB,KAAK,EAAE,eAAe;qBACzB,CAAC,EAAA;;gBAHI,cAAc,GAAG,SAGrB;gBACI,QAAQ,GAAmB;oBAC7B,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,2BAAmB,CAAC;oBAC9C,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,mBAAmB;iBAC/B,CAAA;gBACD,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;;;gBAElB,GAAG,CAAC,IAAI,CAAC;oBACL,OAAO,EAAE,KAAK;iBACjB,CAAC,CAAA;gBACF,OAAO,CAAC,KAAK,CAAC,KAAG,CAAC,CAAA;;;;;KAEzB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"provide-media.js","sourceRoot":"","sources":["../../../src/server/controllers/provide-media.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAwCA;;AAxCA,kCAAqC;AAErC,kCAAwD;AAGxD,IAAM,aAAa,GAAG,EAAE,CAAA;AACxB,IAAM,SAAS,GAAG,GAAG,CAAA;AAER,QAAA,YAAY,GAAG,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;;;gBAE1C,KAAsB,GAAG,CAAC,KAAK,EAA9B,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,IAAI,UAAA,CAAa;gBAC/B,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAC1B,eAAe,GAAG,CAAC,QAAQ,IAAI,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAA;gBACvE,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACpC,eAAe,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAA;gBAC3E,KAAK,GAAmC;oBAC1C,KAAK,EAAG,GAAG,CAAC,IAAoB,CAAC,GAAG;iBACvC,CAAA;gBACD,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;oBACrB,KAAK,CAAC,IAAI,GAAG,EAAC,IAAI,EAAE,IAAI,EAAC,CAAA;iBAC5B;gBAC0B,qBAAM,kBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAA;;gBAAzD,kBAAkB,GAAG,SAAoC;gBACzD,mBAAmB,GAAG,cAAc,GAAG,eAAe,GAAG,kBAAkB,CAAA;gBAC1D,qBAAM,kBAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;wBACtD,IAAI,EAAE,cAAc;wBACpB,KAAK,EAAE,eAAe;qBACzB,CAAC,EAAA;;gBAHI,cAAc,GAAG,SAGrB;gBACI,QAAQ,GAAmB;oBAC7B,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,2BAAmB,CAAC;oBAC9C,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,mBAAmB;iBAC/B,CAAA;gBACD,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;;;gBAElB,GAAG,CAAC,IAAI,CAAC;oBACL,OAAO,EAAE,KAAK;iBACjB,CAAC,CAAA;gBACF,OAAO,CAAC,KAAK,CAAC,KAAG,CAAC,CAAA;;;;;KAEzB,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/server/controllers/provide-tags.js b/dist/server/controllers/provide-tags.js new file mode 100644 index 0000000..8a830f1 --- /dev/null +++ b/dist/server/controllers/provide-tags.js @@ -0,0 +1,84 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var _this = this; +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = require("../utils"); +var media_1 = require("../media"); +exports.provideTags = utils_1.asyncHandler(function (req, res) { return __awaiter(_this, void 0, void 0, function () { + var tagsSet_1, tagsArr, responseData, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + tagsSet_1 = new Set(); + return [4 /*yield*/, media_1.MediaModel.find({ + owner: req.user._id + }) + .cursor() + .eachAsync(function (mediaItem) { + var tagsList = mediaItem.tags; + for (var i = 0; i < tagsList.length; i += 1) { + tagsSet_1.add(tagsList[i]); + } + })]; + case 1: + _a.sent(); + tagsArr = Array.from(tagsSet_1); + tagsArr.sort(); + responseData = void 0; + responseData = tagsArr.map(function (tagName) { + return { + name: tagName + }; + }); + res.send({ + success: true, + tags: responseData + }); + return [3 /*break*/, 3]; + case 2: + err_1 = _a.sent(); + res.send({ + success: false + }); + console.error(err_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); +}); }); +//# sourceMappingURL=provide-tags.js.map \ No newline at end of file diff --git a/dist/server/controllers/provide-tags.js.map b/dist/server/controllers/provide-tags.js.map new file mode 100644 index 0000000..47a3af2 --- /dev/null +++ b/dist/server/controllers/provide-tags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"provide-tags.js","sourceRoot":"","sources":["../../../src/server/controllers/provide-tags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAoCA;;AApCA,kCAAqC;AACrC,kCAAmC;AAGtB,QAAA,WAAW,GAAG,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;;;gBAE3C,YAAU,IAAI,GAAG,EAAE,CAAA;gBACvB,qBAAM,kBAAU,CAAC,IAAI,CAAC;wBAClB,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG;qBACtB,CAAC;yBACG,MAAM,EAAE;yBACR,SAAS,CAAC,UAAC,SAAS;wBACjB,IAAI,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAA;wBAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;4BACzC,SAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;yBAC3B;oBACL,CAAC,CAAC,EAAA;;gBATN,SASM,CAAA;gBACF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,SAAO,CAAC,CAAA;gBACjC,OAAO,CAAC,IAAI,EAAE,CAAA;gBACV,YAAY,SAAsB,CAAA;gBACtC,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,UAAC,OAAO;oBAC/B,OAAO;wBACH,IAAI,EAAE,OAAO;qBAChB,CAAA;gBACL,CAAC,CAAC,CAAA;gBACF,GAAG,CAAC,IAAI,CAAC;oBACL,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,YAAY;iBACrB,CAAC,CAAA;;;;gBAEF,GAAG,CAAC,IAAI,CAAC;oBACL,OAAO,EAAE,KAAK;iBACjB,CAAC,CAAA;gBACF,OAAO,CAAC,KAAK,CAAC,KAAG,CAAC,CAAA;;;;;KAEzB,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/server/controllers/upload.js b/dist/server/controllers/upload.js index 1f5f3b5..2285475 100644 --- a/dist/server/controllers/upload.js +++ b/dist/server/controllers/upload.js @@ -50,10 +50,26 @@ var mime_1 = require("mime"); var md5file = require('md5-file/promise'); var uuidv4 = require('uuid/v4'); var fs = require('fs-extra'); +var KNOWN_TYPES = { + img: ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'], + video: ['video/x-ms-wmv', 'video/x-msvideo', 'video/mp4', 'video/x-flv'] +}; +function getTypeOfDoc(mimeType) { + var i; + for (i in KNOWN_TYPES) { + if (KNOWN_TYPES[i].some(function (s) { return s === mimeType; })) { + return i; + } + } + console.error("Unknown mime type " + mimeType); +} +function getTags(extension) { + return ['new', extension]; +} // Returns mongo doc of corresponding file function registerFile(sourcePath, ownerId) { return __awaiter(this, void 0, void 0, function () { - var md5, sameFileForCurrentUser, uuid, fileExtensionWithDot, fileMimeType, extension, fileName, fileTargetPath, res; + var md5, sameFileForCurrentUser, uuid, fileExtensionWithDot, fileMimeType, fileType, extension, fileName, fileTargetPath, tags, docObj, res; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, md5file(sourcePath)]; @@ -72,19 +88,23 @@ function registerFile(sourcePath, ownerId) { fileExtensionWithDot = path.extname(sourcePath) // with dot ; fileMimeType = mime_1.getType(fileExtensionWithDot); + fileType = getTypeOfDoc(fileMimeType); extension = mime_1.getExtension(fileMimeType); fileName = uuid + fileExtensionWithDot; fileTargetPath = utils_1.filePathForPersistence(fileName); return [4 /*yield*/, fs.copy(sourcePath, fileTargetPath)]; case 3: _a.sent(); - res = new media_1.MediaModel({ + tags = getTags(extension); + docObj = { owner: ownerId, uuid: uuid, fileExtension: extension, md5: md5, - type: fileMimeType - }); + type: fileType, + tags: tags + }; + res = new media_1.MediaModel(docObj); return [4 /*yield*/, res.save()]; case 4: _a.sent(); diff --git a/dist/server/controllers/upload.js.map b/dist/server/controllers/upload.js.map index cb3d350..bf6aeb8 100644 --- a/dist/server/controllers/upload.js.map +++ b/dist/server/controllers/upload.js.map @@ -1 +1 @@ -{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/server/controllers/upload.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAgDA;;AAhDA,kCAA6D;AAC7D,kCAAmC;AACnC,yCAA4B;AAC5B,6BAA0C;AAE1C,IAAM,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAC3C,IAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AACjC,IAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAE9B,0CAA0C;AAC1C,SAAe,YAAY,CAAC,UAAkB,EAAE,OAAe;;;;;wBAC/C,qBAAM,OAAO,CAAC,UAAU,CAAC,EAAA;;oBAA/B,GAAG,GAAG,SAAyB;oBACN,qBAAM,kBAAU,CAAC,OAAO,CAAC;4BACpD,KAAK,EAAE,OAAO;4BACd,GAAG,EAAE,GAAG;yBACX,CAAC,EAAA;;oBAHI,sBAAsB,GAAG,SAG7B;oBACF,IAAI,sBAAsB,EAAE;wBACxB,sBAAO,sBAAsB,EAAA;qBAChC;oBACK,IAAI,GAAG,MAAM,EAAE,CAAA;oBACf,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW;oBAAZ,CAAA;oBAC/C,YAAY,GAAG,cAAO,CAAC,oBAAoB,CAAC,CAAA;oBAC5C,SAAS,GAAG,mBAAY,CAAC,YAAY,CAAC,CAAA;oBACtC,QAAQ,GAAG,IAAI,GAAG,oBAAoB,CAAA;oBACtC,cAAc,GAAG,8BAAsB,CAAC,QAAQ,CAAC,CAAA;oBACvD,qBAAM,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAA;;oBAAzC,SAAyC,CAAA;oBACnC,GAAG,GAAG,IAAI,kBAAU,CAAC;wBACvB,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,IAAI;wBACV,aAAa,EAAE,SAAS;wBACxB,GAAG,EAAE,GAAG;wBACR,IAAI,EAAE,YAAY;qBACrB,CAAC,CAAA;oBACF,qBAAM,GAAG,CAAC,IAAI,EAAE,EAAA;;oBAAhB,SAAgB,CAAA;oBAChB,sBAAO,GAAG,EAAA;;;;CACb;AAEY,QAAA,MAAM,GAAG,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;oBACzB,qBAAM,OAAO,CAAC,GAAG,CACjC,GAAG,CAAC,KAA+B,CAAC,GAAG,CAAC,UAAC,IAAI;oBAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBAChD,CAAC,CAAC,CACL,EAAA;;gBAJG,cAAc,GAAG,SAIpB;gBACD,GAAG,CAAC,IAAI,CAAC;oBACL,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,cAAc;iBACxB,CAAC,CAAA;;;;KACL,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/server/controllers/upload.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAwEA;;AAxEA,kCAA6D;AAC7D,kCAA8C;AAC9C,yCAA4B;AAC5B,6BAA0C;AAG1C,IAAM,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAC3C,IAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AACjC,IAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAE9B,IAAM,WAAW,GAAG;IAChB,GAAG,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,CAAC;IAC9D,KAAK,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,CAAC;CAC3E,CAAA;AAED,SAAS,YAAY,CAAC,QAAgB;IAClC,IAAI,CAAY,CAAA;IAChB,KAAK,CAAC,IAAI,WAAW,EAAE;QACnB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,KAAK,QAAQ,EAAd,CAAc,CAAC,EAAE;YAC5C,OAAO,CAAC,CAAA;SACX;KACJ;IACD,OAAO,CAAC,KAAK,CAAC,uBAAqB,QAAU,CAAC,CAAA;AAClD,CAAC;AAED,SAAS,OAAO,CAAC,SAAiB;IAC9B,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AAC7B,CAAC;AAED,0CAA0C;AAC1C,SAAe,YAAY,CAAC,UAAkB,EAAE,OAAe;;;;;wBAC/C,qBAAM,OAAO,CAAC,UAAU,CAAC,EAAA;;oBAA/B,GAAG,GAAG,SAAyB;oBACN,qBAAM,kBAAU,CAAC,OAAO,CAAC;4BACpD,KAAK,EAAE,OAAO;4BACd,GAAG,EAAE,GAAG;yBACX,CAAC,EAAA;;oBAHI,sBAAsB,GAAG,SAG7B;oBACF,IAAI,sBAAsB,EAAE;wBACxB,sBAAO,sBAAsB,EAAA;qBAChC;oBACK,IAAI,GAAG,MAAM,EAAE,CAAA;oBACf,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW;oBAAZ,CAAA;oBAC/C,YAAY,GAAG,cAAO,CAAC,oBAAoB,CAAC,CAAA;oBAC5C,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;oBACrC,SAAS,GAAG,mBAAY,CAAC,YAAY,CAAC,CAAA;oBACtC,QAAQ,GAAG,IAAI,GAAG,oBAAoB,CAAA;oBACtC,cAAc,GAAG,8BAAsB,CAAC,QAAQ,CAAC,CAAA;oBACvD,qBAAM,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAA;;oBAAzC,SAAyC,CAAA;oBACnC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;oBACzB,MAAM,GAAc;wBACtB,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,IAAI;wBACV,aAAa,EAAE,SAAS;wBACxB,GAAG,EAAE,GAAG;wBACR,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,IAAI;qBACb,CAAA;oBACK,GAAG,GAAG,IAAI,kBAAU,CAAC,MAAM,CAAC,CAAA;oBAClC,qBAAM,GAAG,CAAC,IAAI,EAAE,EAAA;;oBAAhB,SAAgB,CAAA;oBAChB,sBAAO,GAAG,EAAA;;;;CACb;AAEY,QAAA,MAAM,GAAG,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;oBACzB,qBAAM,OAAO,CAAC,GAAG,CACjC,GAAG,CAAC,KAA+B,CAAC,GAAG,CAAC,UAAC,IAAI;oBAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBAChD,CAAC,CAAC,CACL,EAAA;;gBAJG,cAAc,GAAG,SAIpB;gBACD,GAAG,CAAC,IAAI,CAAC;oBACL,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,cAAc;iBACxB,CAAC,CAAA;;;;KACL,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/server/middleware.js b/dist/server/middleware.js index 541ad4c..3a9518a 100644 --- a/dist/server/middleware.js +++ b/dist/server/middleware.js @@ -19,13 +19,21 @@ var connectMongo = require('connect-mongo'); var MongoStore = connectMongo(session); function initMiddleware(app) { app.use(express.static(path.resolve(__dirname, '../static'))); + app.use(function (req, res, next) { + if (lib_1.isDev()) { + setTimeout(next, Math.random() * 999 + 500); // 500 - 1500ms of delay + } + else { + next(); + } + }); app.use(session({ secret: env_1.SESSION_SECRET, store: new MongoStore({ mongooseConnection: mongoose.connection, collection: 'sessions' }), - resave: false, + resave: true, saveUninitialized: false, cookie: { secure: !lib_1.isDev() diff --git a/dist/server/middleware.js.map b/dist/server/middleware.js.map index cc19d13..d4693cf 100644 --- a/dist/server/middleware.js.map +++ b/dist/server/middleware.js.map @@ -1 +1 @@ -{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkC;AAElC,yCAA4B;AAC5B,qCAAmC;AACnC,6BAAoC;AACpC,uCAA4C;AAC5C,yCAA2C;AAC3C,wCAA0C;AAE1C,IAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AACpC,IAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAC7C,IAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;AAExC,SAAgB,cAAc,CAAC,GAAY;IACvC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IAC7D,GAAG,CAAC,GAAG,CACH,OAAO,CAAC;QACJ,MAAM,EAAE,oBAAc;QACtB,KAAK,EAAE,IAAI,UAAU,CAAC;YAClB,kBAAkB,EAAE,QAAQ,CAAC,UAAU;YACvC,UAAU,EAAE,UAAU;SACzB,CAAC;QACF,MAAM,EAAE,KAAK;QACb,iBAAiB,EAAE,KAAK;QACxB,MAAM,EAAE;YACJ,MAAM,EAAE,CAAC,WAAK,EAAE;SACnB;KACJ,CAAC,CACL,CAAA;IACD,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;IAC1B,4BAAiB,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC;AAlBD,wCAkBC"} \ No newline at end of file +{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+CAAkC;AAElC,yCAA4B;AAC5B,qCAAmC;AACnC,6BAAoC;AACpC,uCAA4C;AAC5C,yCAA2C;AAC3C,wCAA0C;AAE1C,IAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AACpC,IAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAC7C,IAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;AAExC,SAAgB,cAAc,CAAC,GAAY;IACvC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IAC7D,GAAG,CAAC,GAAG,CAAC,UAAC,GAAG,EAAE,GAAG,EAAE,IAAI;QACnB,IAAI,WAAK,EAAE,EAAE;YACT,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,GAAG,CAAC,CAAA,CAAC,wBAAwB;SACvE;aAAM;YACH,IAAI,EAAE,CAAA;SACT;IACL,CAAC,CAAC,CAAA;IACF,GAAG,CAAC,GAAG,CACH,OAAO,CAAC;QACJ,MAAM,EAAE,oBAAc;QACtB,KAAK,EAAE,IAAI,UAAU,CAAC;YAClB,kBAAkB,EAAE,QAAQ,CAAC,UAAU;YACvC,UAAU,EAAE,UAAU;SACzB,CAAC;QACF,MAAM,EAAE,IAAI;QACZ,iBAAiB,EAAE,KAAK;QACxB,MAAM,EAAE;YACJ,MAAM,EAAE,CAAC,WAAK,EAAE;SACnB;KACJ,CAAC,CACL,CAAA;IACD,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;IAC1B,4BAAiB,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC;AAzBD,wCAyBC"} \ No newline at end of file diff --git a/dist/server/routes.js b/dist/server/routes.js index 764642b..e7b4f39 100644 --- a/dist/server/routes.js +++ b/dist/server/routes.js @@ -43,6 +43,7 @@ var logout_1 = require("./controllers/logout"); var check_1 = require("./controllers/check"); var media_1 = require("./media"); var provide_media_1 = require("./controllers/provide-media"); +var provide_tags_1 = require("./controllers/provide-tags"); var passport = require('passport'); // https://stackoverflow.com/a/47448486 // declare global { @@ -81,6 +82,7 @@ function initRoutes(app) { app.post('/api/v1/upload', isAuthenticated, uploader_1.uploader.array('uploads'), upload_1.upload); app.get('/api/v1/check', isAuthenticated, check_1.check); app.get('/api/v1/media', isAuthenticated, provide_media_1.provideMedia); + app.get('/api/v1/tags', isAuthenticated, provide_tags_1.provideTags); app.get('/m/:fileName', send_media_1.sendMedia); app.get('*', utils_1.asyncHandler(function (req, res) { return __awaiter(_this, void 0, void 0, function () { var appInitialState, _a, _b; diff --git a/dist/server/routes.js.map b/dist/server/routes.js.map index f321cda..ed84d17 100644 --- a/dist/server/routes.js.map +++ b/dist/server/routes.js.map @@ -1 +1 @@ -{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/server/routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAoC;AACpC,+CAA2C;AAC3C,uCAAmC;AACnC,uDAAkD;AAClD,+CAA2C;AAC3C,6CAAyC;AACzC,iCAAuD;AAEvD,6DAAwD;AAExD,IAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAEpC,uCAAuC;AACvC,mBAAmB;AACnB,0BAA0B;AAC1B,8BAA8B;AAC9B,iCAAiC;AACjC,YAAY;AACZ,EAAE;AACF,+BAA+B;AAC/B,wBAAwB;AACxB,iDAAiD;AACjD,gBAAgB;AAChB,YAAY;AACZ,QAAQ;AACR,IAAI;AAEJ,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;IACnC,IAAI,GAAG,CAAC,eAAe,EAAE,EAAE;QACvB,IAAI,EAAE,CAAA;KACT;SAAM;QACH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACjB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,cAAc;SACzB,CAAC,CAAA;KACL;AACL,CAAC;AAED,SAAgB,UAAU,CAAC,GAAY;IAAvC,iBA4BC;IA3BG,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,UAAC,GAAG,EAAE,GAAG;QAC/D,GAAG,CAAC,IAAI,CAAC;YACL,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;SAC1B,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,eAAM,CAAC,CAAA;IAClC,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,eAAe,EAAE,mBAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,eAAM,CAAC,CAAA;IAC9E,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,aAAK,CAAC,CAAA;IAChD,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,4BAAY,CAAC,CAAA;IACvD,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,sBAAS,CAAC,CAAA;IAClC,GAAG,CAAC,GAAG,CACH,GAAG,EACH,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;;oBACxB,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;oBAClD,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAA;oBACtC,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAA;;yBAEnB,GAAG,CAAC,MAAM,CAAC,UAAU,EAArB,wBAAqB;oBACzB,qBAAM,kBAAU,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,EAAC,CAAC,EAAA;;oBAA7C,KAAA,CAAC,SAA4C,CAAC,CAAC,GAAG,CAAC,2BAAmB,CAAC,CAAA;;;oBACvE,KAAA,EAAE,CAAA;;;oBAHN,eAAe,IACjB,YAAS,KAED;wBACR,WAAQ,GAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;2BAC1C;oBACD,GAAG,CAAC,MAAM,CAAC,YAAY,GAAG,eAAe,CAAA;oBACzC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;;;;SACxB,CAAC,CACL,CAAA;AACL,CAAC;AA5BD,gCA4BC"} \ No newline at end of file +{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/server/routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAoC;AACpC,+CAA2C;AAC3C,uCAAmC;AACnC,uDAAkD;AAClD,+CAA2C;AAC3C,6CAAyC;AACzC,iCAAuD;AAEvD,6DAAwD;AACxD,2DAAsD;AAEtD,IAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAEpC,uCAAuC;AACvC,mBAAmB;AACnB,0BAA0B;AAC1B,8BAA8B;AAC9B,iCAAiC;AACjC,YAAY;AACZ,EAAE;AACF,+BAA+B;AAC/B,wBAAwB;AACxB,iDAAiD;AACjD,gBAAgB;AAChB,YAAY;AACZ,QAAQ;AACR,IAAI;AAEJ,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;IACnC,IAAI,GAAG,CAAC,eAAe,EAAE,EAAE;QACvB,IAAI,EAAE,CAAA;KACT;SAAM;QACH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACjB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,cAAc;SACzB,CAAC,CAAA;KACL;AACL,CAAC;AAED,SAAgB,UAAU,CAAC,GAAY;IAAvC,iBA6BC;IA5BG,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,UAAC,GAAG,EAAE,GAAG;QAC/D,GAAG,CAAC,IAAI,CAAC;YACL,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;SAC1B,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,eAAM,CAAC,CAAA;IAClC,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,eAAe,EAAE,mBAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,eAAM,CAAC,CAAA;IAC9E,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,aAAK,CAAC,CAAA;IAChD,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,4BAAY,CAAC,CAAA;IACvD,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,eAAe,EAAE,0BAAW,CAAC,CAAA;IACrD,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,sBAAS,CAAC,CAAA;IAClC,GAAG,CAAC,GAAG,CACH,GAAG,EACH,oBAAY,CAAC,UAAO,GAAG,EAAE,GAAG;;;;;oBACxB,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;oBAClD,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAA;oBACtC,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAA;;yBAEnB,GAAG,CAAC,MAAM,CAAC,UAAU,EAArB,wBAAqB;oBACzB,qBAAM,kBAAU,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,EAAC,CAAC,EAAA;;oBAA7C,KAAA,CAAC,SAA4C,CAAC,CAAC,GAAG,CAAC,2BAAmB,CAAC,CAAA;;;oBACvE,KAAA,EAAE,CAAA;;;oBAHN,eAAe,IACjB,YAAS,KAED;wBACR,WAAQ,GAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;2BAC1C;oBACD,GAAG,CAAC,MAAM,CAAC,YAAY,GAAG,eAAe,CAAA;oBACzC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;;;;SACxB,CAAC,CACL,CAAA;AACL,CAAC;AA7BD,gCA6BC"} \ No newline at end of file diff --git a/dist/static/client/client.css b/dist/static/client/client.css index d58ecb2..bd42f1a 100644 --- a/dist/static/client/client.css +++ b/dist/static/client/client.css @@ -1 +1 @@ -.media-items{position:relative;list-style:none}.media-items-columns-1 .media-item-wrapper-outer{width:100%}.media-items-columns-2 .media-item-wrapper-outer{width:50%}.media-items-columns-3 .media-item-wrapper-outer{width:33%}.media-items-columns-4 .media-item-wrapper-outer{width:25%}.media-item-wrapper-inner{border:5px solid transparent;border-radius:5px;position:relative}.media-item-wrapper-inner.selected{border-color:#fffd00}.media-item-wrapper-inner.focused{border-color:#50e151}.media-item{display:block;margin:0 auto;max-height:100%;max-width:100%}.navigation{overflow:hidden}.navigation__items{float:right}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{position:relative}.dropzone .dz-preview{position:relative;display:inline-block;width:120px;margin:.5em}.dropzone .dz-preview .dz-progress{display:block;height:15px;border:1px solid #aaa}.dropzone .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:green}.dropzone .dz-preview .dz-error-message{color:red;display:none}.dropzone .dz-preview.dz-error .dz-error-mark,.dropzone .dz-preview.dz-error .dz-error-message,.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px}@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,.3);background:#fff;padding:20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(180deg,#eee,#ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:#fff}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid hsla(0,0%,78.4%,.8);background-color:hsla(0,0%,100%,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:hsla(0,0%,100%,.4);padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05);-moz-transform:scale(1.05);-ms-transform:scale(1.05);-o-transform:scale(1.05);transform:scale(1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-moz-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-ms-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-o-animation:passing-through 3s cubic-bezier(.77,0,.175,1);animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-moz-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-ms-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-o-animation:slide-in 3s cubic-bezier(.77,0,.175,1);animation:slide-in 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-error-mark svg,.dropzone .dz-preview .dz-success-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all .2s linear;-moz-transition:all .2s linear;-ms-transition:all .2s linear;-o-transition:all .2s linear;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;-moz-transition:opacity .4s ease-in;-ms-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:hsla(0,0%,100%,.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(180deg,#666,#444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width .3s ease-in-out;-moz-transition:width .3s ease-in-out;-ms-transition:width .3s ease-in-out;-o-transition:width .3s ease-in-out;transition:width .3s ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-ms-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(180deg,#be2626,#a92222);padding:.5em 1.2em;color:#fff}.dropzone .dz-preview .dz-error-message:after{content:"";position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}.DragNDropUpload{background:#00f;border:0;padding:0;bottom:0;left:0;position:fixed;right:0;top:0}.DragNDropUpload__dropzone{overflow:auto;position:absolute;top:0;left:0;right:0;bottom:0}.DragNDropUpload__head{display:flex;align-items:center}.DragNDropUpload__btn-wrapper{padding-left:1em}.ZoomedView{transition:margin-left 2s ease 0ms,margin-right 2s ease,margin-top 2s ease,margin-bottom 2s ease;background:#00f;position:fixed;top:0;left:0;right:0;bottom:0}.ZoomedView__container{max-width:85%;max-height:85%}.layout__side{background:#c71585;bottom:0;left:0;position:fixed;top:0}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{background:#291b09;color:#f5f5f5} \ No newline at end of file +.media-items{position:relative;list-style:none}.media-items-columns-1 .media-item-wrapper-outer{width:100%}.media-items-columns-2 .media-item-wrapper-outer{width:50%}.media-items-columns-3 .media-item-wrapper-outer{width:33%}.media-items-columns-4 .media-item-wrapper-outer{width:25%}.MediaListItem{display:block;margin:0 auto;max-height:100%;max-width:100%}.MediaListItem__outer{border:5px solid transparent;border-radius:5px;position:relative}.MediaListItem__outer.selected{border-color:#fffd00}.MediaListItem__outer.focused{border-color:#50e151}.navigation{overflow:hidden}.navigation__items{float:right}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{position:relative}.dropzone .dz-preview{position:relative;display:inline-block;width:120px;margin:.5em}.dropzone .dz-preview .dz-progress{display:block;height:15px;border:1px solid #aaa}.dropzone .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:green}.dropzone .dz-preview .dz-error-message{color:red;display:none}.dropzone .dz-preview.dz-error .dz-error-mark,.dropzone .dz-preview.dz-error .dz-error-message,.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px}@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,.3);background:#fff;padding:20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(180deg,#eee,#ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:#fff}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid hsla(0,0%,78.4%,.8);background-color:hsla(0,0%,100%,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:hsla(0,0%,100%,.4);padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05);-moz-transform:scale(1.05);-ms-transform:scale(1.05);-o-transform:scale(1.05);transform:scale(1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-moz-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-ms-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-o-animation:passing-through 3s cubic-bezier(.77,0,.175,1);animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-moz-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-ms-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-o-animation:slide-in 3s cubic-bezier(.77,0,.175,1);animation:slide-in 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-error-mark svg,.dropzone .dz-preview .dz-success-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all .2s linear;-moz-transition:all .2s linear;-ms-transition:all .2s linear;-o-transition:all .2s linear;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;-moz-transition:opacity .4s ease-in;-ms-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:hsla(0,0%,100%,.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(180deg,#666,#444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width .3s ease-in-out;-moz-transition:width .3s ease-in-out;-ms-transition:width .3s ease-in-out;-o-transition:width .3s ease-in-out;transition:width .3s ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-ms-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(180deg,#be2626,#a92222);padding:.5em 1.2em;color:#fff}.dropzone .dz-preview .dz-error-message:after{content:"";position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}.DragNDropUpload{background:#00f;border:0;padding:0;bottom:0;left:0;position:fixed;right:0;top:0}.DragNDropUpload__dropzone{overflow:auto;position:absolute;top:0;left:0;right:0;bottom:0}.DragNDropUpload__head{display:flex;align-items:center}.DragNDropUpload__btn-wrapper{padding-left:1em}.remove{background:#000;color:#fff}.add{text-decoration-line:underline;text-decoration-width:.5px;text-decoration-style:dashed}.ZoomedView{transition:margin-left 2s ease 0ms,margin-right 2s ease,margin-top 2s ease,margin-bottom 2s ease;background:#00f;position:fixed;top:0;left:0;right:0;bottom:0}.ZoomedView__container{max-width:85%;max-height:85%}.IsLoading{background:#007bff;height:10px;position:fixed;bottom:0;left:0;right:0;z-index:999}.IsLoading--striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem;animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:normal;animation-fill-mode:none;animation-play-state:running}@keyframes loading{0%{background-position:1rem 0}to{background-position:0 0}}.layout__side{background:#c71585;bottom:0;left:0;position:fixed;top:0}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{background:#291b09;color:#f5f5f5} \ No newline at end of file diff --git a/dist/static/client/client.js b/dist/static/client/client.js index 27eadcc..614eaeb 100644 --- a/dist/static/client/client.js +++ b/dist/static/client/client.js @@ -27,16 +27,77 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0});var n= },{}],"us5U":[function(require,module,exports) { "use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i=e?a():o=setTimeout(a,e-t)),s};function a(){o=0,r=+new Date,s=t.apply(i,n),i=null,n=null}}var v=function(t,e,i){i||("function"==typeof e?(i=e,e=null):i=y);var n=t&&t.length;if(!n)return i(null,[]);var s=!1,o=new Array(n);function r(t){return function(e,r){if(!s){if(e)return i(e,o),void(s=!0);o[t]=r,--n||i(null,o)}}}t.forEach(e?function(t,i){t.call(e,r(i))}:function(t,e){t(r(e))})};function y(){}function g(t){return parseFloat(t)||0}var _=function(){function e(i,n){t(this,e),this.x=g(i),this.y=g(n)}return i(e,null,[{key:"equals",value:function(t,e){return t.x===e.x&&t.y===e.y}}]),e}(),E=function(){function e(i,n,s,o,r){t(this,e),this.id=r,this.left=i,this.top=n,this.width=s,this.height=o}return i(e,null,[{key:"intersects",value:function(t,e){return t.left2&&void 0!==arguments[2]?arguments[2]:window.getComputedStyle(t,null),n=g(i[e]);return k()||"width"!==e?k()||"height"!==e||(n+=g(i.paddingTop)+g(i.paddingBottom)+g(i.borderTopWidth)+g(i.borderBottomWidth)):n+=g(i.paddingLeft)+g(i.paddingRight)+g(i.borderLeftWidth)+g(i.borderRightWidth),n}function C(t){for(var e=t.length;e;){e-=1;var i=Math.floor(Math.random()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}var L={reverse:!1,by:null,compare:null,randomize:!1,key:"element"};function D(t,e){var i=Object.assign({},L,e),n=Array.from(t),s=!1;return t.length?i.randomize?C(t):("function"==typeof i.by?t.sort(function(t,e){if(s)return 0;var n=i.by(t[i.key]),o=i.by(e[i.key]);return void 0===n&&void 0===o?(s=!0,0):no||"sortLast"===n||"sortFirst"===o?1:0}):"function"==typeof i.compare&&t.sort(i.compare),s?n:(i.reverse&&t.reverse(),t)):[]}var z={},M="transitionend",A=0;function F(){return M+(A+=1)}function x(t){return!!z[t]&&(z[t].element.removeEventListener(M,z[t].listener),z[t]=null,!0)}function O(t,e){var i=F(),n=function(t){t.currentTarget===t.target&&(x(i),e(t))};return t.addEventListener(M,n),z[i]={element:t,listener:n},i}function N(t){return Math.max.apply(Math,t)}function H(t){return Math.min.apply(Math,t)}function B(t,e,i,n){var s=t/e;return Math.abs(Math.round(s)-s)=i-e&&t[n]<=i+e)return n;return 0}function V(t){for(var e=t.itemSize,i=t.positions,n=t.gridSize,s=t.total,o=t.threshold,r=t.buffer,a=B(e.width,n,s,o),l=P(i,a,s),u=W(l,r),h=new _(n*u,l[u]),c=l[u]+e.height,f=0;f0){var d=[];(f=r.every(function(t){var e=new E(t.left+h,t.top,t.width,t.height,t.id),i=!n.some(function(t){return E.intersects(e,t)});return d.push(e),i}))&&(c=d)}if(!f&&r.some(function(t){return n.some(function(e){var i=E.intersects(t,e);return i&&(a=e),i})})){var m=o.findIndex(function(t){return t.includes(a)});o.splice(m,1,s[m])}n=n.concat(c),o.push(c)}),[].concat.apply([],o).sort(function(t,e){return t.id-e.id}).map(function(t){return new _(t.left,t.top)})}function j(t){return t.replace(/([A-Z])/g,function(t,e){return"-".concat(e.toLowerCase())})}function q(t){return Array.from(new Set(t))}var U=0,Y=function(e){function o(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),(i=a(this,s(o).call(this))).options=Object.assign({},o.options,n),i.options.delimeter&&(i.options.delimiter=i.options.delimeter),i.lastSort={},i.group=o.ALL_ITEMS,i.lastFilter=o.ALL_ITEMS,i.isEnabled=!0,i.isDestroyed=!1,i.isInitialized=!1,i._transitions=[],i.isTransitioning=!1,i._queue=[];var r=i._getElementOption(e);if(!r)throw new TypeError("Shuffle needs to be initialized with an element.");return i.element=r,i.id="shuffle_"+U,U+=1,i._init(),i.isInitialized=!0,i}return n(o,u),i(o,[{key:"_init",value:function(){if(this.items=this._getItems(),this.options.sizer=this._getElementOption(this.options.sizer),this.element.classList.add(o.Classes.BASE),this._initItems(this.items),this._onResize=this._getResizeFunction(),window.addEventListener("resize",this._onResize),"complete"!==document.readyState){var t=this.layout.bind(this);window.addEventListener("load",function e(){window.removeEventListener("load",e),t()})}var e=window.getComputedStyle(this.element,null),i=o.getSize(this.element).width;this._validateStyles(e),this._setColumns(i),this.filter(this.options.group,this.options.initialSort),this.element.offsetWidth,this.setItemTransitions(this.items),this.element.style.transition="height ".concat(this.options.speed,"ms ").concat(this.options.easing)}},{key:"_getResizeFunction",value:function(){var t=this._handleResize.bind(this);return this.options.throttle?this.options.throttle(t,this.options.throttleTime):t}},{key:"_getElementOption",value:function(t){return"string"==typeof t?this.element.querySelector(t):t&&t.nodeType&&1===t.nodeType?t:t&&t.jquery?t[0]:null}},{key:"_validateStyles",value:function(t){"static"===t.position&&(this.element.style.position="relative"),"hidden"!==t.overflow&&(this.element.style.overflow="hidden")}},{key:"_filter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastFilter,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.items,i=this._getFilteredSets(t,e);return this._toggleFilterClasses(i),this.lastFilter=t,"string"==typeof t&&(this.group=t),i}},{key:"_getFilteredSets",value:function(t,e){var i=this,n=[],s=[];return t===o.ALL_ITEMS?n=e:e.forEach(function(e){i._doesPassFilter(t,e.element)?n.push(e):s.push(e)}),{visible:n,hidden:s}}},{key:"_doesPassFilter",value:function(t,e){if("function"==typeof t)return t.call(e,e,this);var i=e.getAttribute("data-"+o.FILTER_ATTRIBUTE_KEY),n=this.options.delimiter?i.split(this.options.delimiter):JSON.parse(i);function s(t){return n.includes(t)}return Array.isArray(t)?this.options.filterMode===o.FilterMode.ANY?t.some(s):t.every(s):n.includes(t)}},{key:"_toggleFilterClasses",value:function(t){var e=t.visible,i=t.hidden;e.forEach(function(t){t.show()}),i.forEach(function(t){t.hide()})}},{key:"_initItems",value:function(t){t.forEach(function(t){t.init()})}},{key:"_disposeItems",value:function(t){t.forEach(function(t){t.dispose()})}},{key:"_updateItemCount",value:function(){this.visibleItems=this._getFilteredItems().length}},{key:"setItemTransitions",value:function(t){var e=this.options,i=e.speed,n=e.easing,s=this.options.useTransforms?["transform"]:["top","left"],o=Object.keys(S.Css.HIDDEN.before).map(function(t){return j(t)}),r=s.concat(o).join();t.forEach(function(t){t.element.style.transitionDuration=i+"ms",t.element.style.transitionTimingFunction=n,t.element.style.transitionProperty=r})}},{key:"_getItems",value:function(){var t=this;return Array.from(this.element.children).filter(function(e){return f(e,t.options.itemSelector)}).map(function(t){return new S(t)})}},{key:"_mergeNewItems",value:function(t){var e=Array.from(this.element.children);return D(this.items.concat(t),{by:function(t){return e.indexOf(t)}})}},{key:"_getFilteredItems",value:function(){return this.items.filter(function(t){return t.isVisible})}},{key:"_getConcealedItems",value:function(){return this.items.filter(function(t){return!t.isVisible})}},{key:"_getColumnSize",value:function(t,e){var i;return 0===(i="function"==typeof this.options.columnWidth?this.options.columnWidth(t):this.options.sizer?o.getSize(this.options.sizer).width:this.options.columnWidth?this.options.columnWidth:this.items.length>0?o.getSize(this.items[0].element,!0).width:t)&&(i=t),i+e}},{key:"_getGutterSize",value:function(t){return"function"==typeof this.options.gutterWidth?this.options.gutterWidth(t):this.options.sizer?w(this.options.sizer,"marginLeft"):this.options.gutterWidth}},{key:"_setColumns",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.getSize(this.element).width,e=this._getGutterSize(t),i=this._getColumnSize(t,e),n=(t+e)/i;Math.abs(Math.round(n)-n)1&&void 0!==arguments[1]?arguments[1]:{};this.isDestroyed||(e.shuffle=this,this.emit(t,e))}},{key:"_resetCols",value:function(){var t=this.cols;for(this.positions=[];t;)t-=1,this.positions.push(0)}},{key:"_layout",value:function(t){var e=this,i=this._getNextPositions(t),n=0;t.forEach(function(t,s){function o(){t.applyCss(S.Css.VISIBLE.after)}if(_.equals(t.point,i[s])&&!t.isHidden)return t.applyCss(S.Css.VISIBLE.before),void o();t.point=i[s],t.scale=S.Scale.VISIBLE,t.isHidden=!1;var r=e.getStylesForTransition(t,S.Css.VISIBLE.before);r.transitionDelay=e._getStaggerAmount(n)+"ms",e._queue.push({item:t,styles:r,callback:o}),n+=1})}},{key:"_getNextPositions",value:function(t){var e=this;if(this.options.isCentered){var i=t.map(function(t,i){var n=o.getSize(t.element,!0),s=e._getItemPosition(n);return new E(s.x,s.y,n.width,n.height,i)});return this.getTransformedPositions(i,this.containerWidth)}return t.map(function(t){return e._getItemPosition(o.getSize(t.element,!0))})}},{key:"_getItemPosition",value:function(t){return V({itemSize:t,positions:this.positions,gridSize:this.colWidth,total:this.cols,threshold:this.options.columnThreshold,buffer:this.options.buffer})}},{key:"getTransformedPositions",value:function(t,e){return R(t,e)}},{key:"_shrink",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getConcealedItems(),i=0;e.forEach(function(e){function n(){e.applyCss(S.Css.HIDDEN.after)}if(e.isHidden)return e.applyCss(S.Css.HIDDEN.before),void n();e.scale=S.Scale.HIDDEN,e.isHidden=!0;var s=t.getStylesForTransition(e,S.Css.HIDDEN.before);s.transitionDelay=t._getStaggerAmount(i)+"ms",t._queue.push({item:e,styles:s,callback:n}),i+=1})}},{key:"_handleResize",value:function(){this.isEnabled&&!this.isDestroyed&&this.update()}},{key:"getStylesForTransition",value:function(t,e){var i=Object.assign({},e);if(this.options.useTransforms){var n=this.options.roundTransforms?Math.round(t.point.x):t.point.x,s=this.options.roundTransforms?Math.round(t.point.y):t.point.y;i.transform="translate(".concat(n,"px, ").concat(s,"px) scale(").concat(t.scale,")")}else i.left=t.point.x+"px",i.top=t.point.y+"px";return i}},{key:"_whenTransitionDone",value:function(t,e,i){var n=O(t,function(t){e(),i(null,t)});this._transitions.push(n)}},{key:"_getTransitionFunction",value:function(t){var e=this;return function(i){t.item.applyCss(t.styles),e._whenTransitionDone(t.item.element,t.callback,i)}}},{key:"_processQueue",value:function(){this.isTransitioning&&this._cancelMovement();var t=this.options.speed>0,e=this._queue.length>0;e&&t&&this.isInitialized?this._startTransitions(this._queue):e?(this._styleImmediately(this._queue),this._dispatch(o.EventType.LAYOUT)):this._dispatch(o.EventType.LAYOUT),this._queue.length=0}},{key:"_startTransitions",value:function(t){var e=this;this.isTransitioning=!0;var i=t.map(function(t){return e._getTransitionFunction(t)});v(i,this._movementFinished.bind(this))}},{key:"_cancelMovement",value:function(){this._transitions.forEach(x),this._transitions.length=0,this.isTransitioning=!1}},{key:"_styleImmediately",value:function(t){if(t.length){var e=t.map(function(t){return t.item.element});o._skipTransitions(e,function(){t.forEach(function(t){t.item.applyCss(t.styles),t.callback()})})}}},{key:"_movementFinished",value:function(){this._transitions.length=0,this.isTransitioning=!1,this._dispatch(o.EventType.LAYOUT)}},{key:"filter",value:function(t,e){this.isEnabled&&((!t||t&&0===t.length)&&(t=o.ALL_ITEMS),this._filter(t),this._shrink(),this._updateItemCount(),this.sort(e))}},{key:"sort",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastSort;if(this.isEnabled){this._resetCols();var e=D(this._getFilteredItems(),t);this._layout(e),this._processQueue(),this._setContainerSize(),this.lastSort=t}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isEnabled&&(t||this._setColumns(),this.sort())}},{key:"layout",value:function(){this.update(!0)}},{key:"add",value:function(t){var e=this,i=q(t).map(function(t){return new S(t)});this._initItems(i),this._resetCols();var n=D(this._mergeNewItems(i),this.lastSort),s=this._filter(this.lastFilter,n),o=function(t){return i.includes(t)},r=function(t){t.scale=S.Scale.HIDDEN,t.isHidden=!0,t.applyCss(S.Css.HIDDEN.before),t.applyCss(S.Css.HIDDEN.after)},a=this._getNextPositions(s.visible);s.visible.forEach(function(t,i){o(t)&&(t.point=a[i],r(t),t.applyCss(e.getStylesForTransition(t,{})))}),s.hidden.forEach(function(t){o(t)&&r(t)}),this.element.offsetWidth,this.setItemTransitions(i),this.items=this._mergeNewItems(i),this.filter(this.lastFilter)}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isEnabled=!0,t&&this.update()}},{key:"remove",value:function(t){var e=this;if(t.length){var i=q(t),n=i.map(function(t){return e.getItemByElement(t)}).filter(function(t){return!!t});this._toggleFilterClasses({visible:[],hidden:n}),this._shrink(n),this.sort(),this.items=this.items.filter(function(t){return!n.includes(t)}),this._updateItemCount(),this.once(o.EventType.LAYOUT,function(){e._disposeItems(n),i.forEach(function(t){t.parentNode.removeChild(t)}),e._dispatch(o.EventType.REMOVED,{collection:i})})}}},{key:"getItemByElement",value:function(t){return this.items.find(function(e){return e.element===t})}},{key:"resetItems",value:function(){var t=this;this._disposeItems(this.items),this.isInitialized=!1,this.items=this._getItems(),this._initItems(this.items),this.once(o.EventType.LAYOUT,function(){t.setItemTransitions(t.items),t.isInitialized=!0}),this.filter(this.lastFilter)}},{key:"destroy",value:function(){this._cancelMovement(),window.removeEventListener("resize",this._onResize),this.element.classList.remove("shuffle"),this.element.removeAttribute("style"),this._disposeItems(this.items),this.items.length=0,this._transitions.length=0,this.options.sizer=null,this.element=null,this.isDestroyed=!0,this.isEnabled=!1}}],[{key:"getSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=window.getComputedStyle(t,null),n=w(t,"width",i),s=w(t,"height",i);e&&(n+=w(t,"marginLeft",i)+w(t,"marginRight",i),s+=w(t,"marginTop",i)+w(t,"marginBottom",i));return{width:n,height:s}}},{key:"_skipTransitions",value:function(t,e){var i=t.map(function(t){var e=t.style,i=e.transitionDuration,n=e.transitionDelay;return e.transitionDuration="0ms",e.transitionDelay="0ms",{duration:i,delay:n}});e(),t[0].offsetWidth,t.forEach(function(t,e){t.style.transitionDuration=i[e].duration,t.style.transitionDelay=i[e].delay})}}]),o}();Y.ShuffleItem=S,Y.ALL_ITEMS="all",Y.FILTER_ATTRIBUTE_KEY="groups",Y.EventType={LAYOUT:"shuffle:layout",REMOVED:"shuffle:removed"},Y.Classes=I,Y.FilterMode={ANY:"any",ALL:"all"},Y.options={group:Y.ALL_ITEMS,speed:250,easing:"cubic-bezier(0.4, 0.0, 0.2, 1)",itemSelector:"*",sizer:null,gutterWidth:0,columnWidth:0,delimiter:null,buffer:0,columnThreshold:.01,initialSort:null,throttle:m,throttleTime:300,staggerAmount:15,staggerAmountMax:150,useTransforms:!0,filterMode:Y.FilterMode.ANY,isCentered:!1,roundTransforms:!0},Y.Point=_,Y.Rect=E,Y.__sorter=D,Y.__getColumnSpan=B,Y.__getAvailablePositions=P,Y.__getShortColumn=W,Y.__getCenteredPositions=R;var G=Y;exports.default=G; },{}],"B5yx":[function(require,module,exports) { -"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),o=this&&this.__decorate||function(t,o,n,r){var i,c=arguments.length,a=c<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,n):r;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(c<3?i(a):c>3?i(o,n,a):i(o,n))||a);return c>3&&a&&Object.defineProperty(o,n,a),a},n=this&&this.__metadata||function(t,o){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,o)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=require("mobx"),c=r(require("react")),a=require("mobx-react");require("./MediaListItem.less");var u=function(e){function r(t){var o=e.call(this,t)||this;return o.ref=c.createRef(),o.clickHandler=function(e){var t=o.props,n=t.appState,r=t.uuid;e.shiftKey?n.toggleSelected(o.props.uuid):n.setZoomed(r)},o}return t(r,e),r.prototype.componentDidMount=function(){var e=this.props,t=e.appState,o=e.uuid,n=this;this.stopAutoscrollIntoView=i.autorun(function(){var e=n.ref.current.parentNode.parentNode;t.zoomedItemId===o&&(e.getBoundingClientRect().top=0;a--)(i=t[a])&&(u=(c<3?i(u):c>3?i(o,n,u):i(o,n))||u);return c>3&&u&&Object.defineProperty(o,n,u),u},n=this&&this.__metadata||function(t,o){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,o)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=require("mobx"),c=r(require("react")),u=require("mobx-react");require("./MediaListItem.less");var a=function(e){function r(t){var o=e.call(this,t)||this;return o.ref=c.createRef(),o.clickHandler=function(e){var t=o.props,n=t.appState,r=t.uuid;e.shiftKey?n.toggleSelected(o.props.uuid):n.setZoomed(r)},o}return t(r,e),r.prototype.componentDidMount=function(){var e=this.props,t=e.appState,o=e.uuid,n=this;this.stopAutoscrollIntoView=i.autorun(function(){var e=n.ref.current;if(t.zoomedItemId===o){var r=e.getBoundingClientRect(),i=r.top;i+.3*r.height>0&&i+window.innerHeight=0;f--)(i=t[f])&&(u=(s<3?i(u):s>3?i(o,r,u):i(o,r))||u);return s>3&&u&&Object.defineProperty(o,r,u),u},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),require("./MediaList.less");var i=r(require("react")),s=require("mobx-react"),u=n(require("shufflejs")),f=require("./MediaListItem"),a=require("../../common/lib"),c=require("mobx"),l=250,p=17,h=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.listRef=i.createRef(),t}return t(r,e),r.prototype._calcComponentHeight=function(){var e=this.listRef.current?this.listRef.current.offsetHeight:0;this.props.appState.setMediaListFullHeight(e)},r.prototype.componentDidMount=function(){var e=this,t=this.listRef.current;if(this.shuffle)throw Error("Shuffle already instantiated");this.shuffle=new u.default(t,{speed:l}),a.isDev()&&(window.s=this.shuffle);var o=this.props.appState;this.disposeLayoutWatcher=c.autorun(function(){o.layoutRerenderCount&&e.shuffle.update()}),this.shuffle.on(u.default.EventType.LAYOUT,function(){setTimeout(function(){e._calcComponentHeight()},l+2*p)})},r.prototype.componentWillUnmount=function(){this.shuffle.destroy(),this.shuffle=null,this.disposeLayoutWatcher(),this.disposeLayoutWatcher=null},r.prototype.componentDidUpdate=function(){this.shuffle.resetItems(),this.shuffle.update(),this._calcComponentHeight()},r.prototype.render=function(){var e=this,t=this.props.appState,o="media-items-columns-"+t.columnsCount;return i.createElement("ul",{ref:this.listRef,className:"media-items "+o},t.media.map(function(o){var r=o.url,n=o.uuid,s=o.selected,u=o.type;return i.createElement("li",{key:n,className:"media-item-wrapper-outer"},i.createElement("div",{className:"\n media-item-wrapper-inner\n "+(s?"selected":"")+"\n "+(t.focusedId===n?"focused":"")+"\n "},i.createElement(f.MediaListItem,{uuid:n,url:r,type:a.getTypeOfDoc(u),onLoad:function(){e.componentDidUpdate()}})))}))},r=o([s.inject("appState"),s.observer],r)}(i.Component);exports.MediaList=h; -},{"./MediaList.less":"8GRE","react":"ccIB","mobx-react":"/79c","shufflejs":"us5U","./MediaListItem":"B5yx","../../common/lib":"2ie3","mobx":"Tcn4"}],"kLTt":[function(require,module,exports) { -"use strict";function e(e){var o="";for(var n in e)o&&(o+="&"),o=o+(encodeURIComponent(n)+"=")+encodeURIComponent(e[n]);return o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.objToQueryString=e; -},{}],"in7L":[function(require,module,exports) { -"use strict";var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{a(r.next(e))}catch(t){o(t)}}function u(e){try{a(r.throw(e))}catch(t){o(t)}}function a(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;f--)(i=e[f])&&(s=(u<3?i(s):u>3?i(o,r,s):i(o,r))||s);return u>3&&s&&Object.defineProperty(o,r,s),s},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e.default=t,e},n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),require("./MediaList.less");var i=r(require("react")),u=require("mobx-react"),s=n(require("shufflejs")),f=require("./MediaListItem"),a=require("../../common/lib"),c=require("mobx"),l=250,p=17,h=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e.listRef=i.createRef(),e}return e(r,t),r.prototype._calcComponentHeight=function(){var t=this.listRef.current?this.listRef.current.offsetHeight:0;this.props.appState.setMediaListFullHeight(t)},r.prototype.componentDidMount=function(){var t=this,e=this.listRef.current;if(this.shuffle)throw Error("Shuffle already instantiated");this.shuffle=new s.default(e,{speed:l}),a.isDev()&&(window.s=this.shuffle);var o=this.props.appState;this.disposeLayoutWatcher=c.autorun(function(){o.layoutRerenderCount&&t.shuffle.update()}),this.shuffle.on(s.default.EventType.LAYOUT,function(){setTimeout(function(){t._calcComponentHeight()},l+2*p)})},r.prototype.componentWillUnmount=function(){this.shuffle.destroy(),this.shuffle=null,this.disposeLayoutWatcher(),this.disposeLayoutWatcher=null},r.prototype.componentDidUpdate=function(){this.shuffle.resetItems(),this.shuffle.update(),this._calcComponentHeight()},r.prototype.render=function(){var t=this,e=this.props.appState,o="media-items-columns-"+e.columnsCount;return i.createElement("ul",{ref:this.listRef,className:"media-items "+o},e.media.map(function(e){var o=e.uuid;return i.createElement("li",{key:o,className:"media-item-wrapper-outer"},i.createElement(f.MediaListItem,{uuid:o,onLoad:function(){t.componentDidUpdate()}}))}))},r=o([u.inject("appState"),u.observer],r)}(i.Component);exports.MediaList=h; +},{"./MediaList.less":"8GRE","react":"ccIB","mobx-react":"/79c","shufflejs":"us5U","./MediaListItem":"B5yx","../../common/lib":"2ie3","mobx":"Tcn4"}],"KVpb":[function(require,module,exports) { +"use strict";var r=Object.prototype.hasOwnProperty,e=Array.isArray,t=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),o=function(r){for(;r.length>1;){var t=r.pop(),o=t.obj[t.prop];if(e(o)){for(var n=[],c=0;c=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122?c+=n.charAt(u):f<128?c+=t[f]:f<2048?c+=t[192|f>>6]+t[128|63&f]:f<55296||f>=57344?c+=t[224|f>>12]+t[128|f>>6&63]+t[128|63&f]:(u+=1,f=65536+((1023&f)<<10|1023&n.charCodeAt(u)),c+=t[240|f>>18]+t[128|f>>12&63]+t[128|f>>6&63]+t[128|63&f])}return c},i=function(r){for(var e=[{obj:{o:r},prop:"o"}],t=[],n=0;n0?h+m:""}; +},{"./utils":"KVpb","./formats":"TwMK"}],"0fsI":[function(require,module,exports) { +"use strict";var e=require("./utils"),t=Object.prototype.hasOwnProperty,r={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:e.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},i=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},o="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",n=function(n,l){var c,s={},p=l.ignoreQueryPrefix?n.replace(/^\?/,""):n,d=l.parameterLimit===1/0?void 0:l.parameterLimit,u=p.split(l.delimiter,d),f=-1,m=l.charset;if(l.charsetSentinel)for(c=0;c-1&&(h=h.split(",")),t.call(s,y)?s[y]=e.combine(s[y],h):s[y]=h}return s},l=function(e,t,r){for(var i=t,o=e.length-1;o>=0;--o){var a,n=e[o];if("[]"===n&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var l="["===n.charAt(0)&&"]"===n.charAt(n.length-1)?n.slice(1,-1):n,c=parseInt(l,10);r.parseArrays||""!==l?!isNaN(c)&&n!==l&&String(c)===l&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(a=[])[c]=i:a[l]=i:a={0:i}}i=a}return i},c=function(e,r,i){if(e){var o=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,n=/(\[[^[\]]*])/.exec(o),c=n?o.slice(0,n.index):o,s=[];if(c){if(!i.plainObjects&&t.call(Object.prototype,c)&&!i.allowPrototypes)return;s.push(c)}for(var p=0;null!==(n=a.exec(o))&&p=0)return;s[i]="set-cookie"===i?(s[i]?s[i]:[]).concat([o]):s[i]?s[i]+", "+o:o}}),s):s}; +},{"./../utils":"zIVT"}],"1DmB":[function(require,module,exports) { +"use strict";var t=require("./../utils");module.exports=t.isStandardBrowserEnv()?function(){var r,e=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function a(t){var r=t;return e&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return r=a(window.location.href),function(e){var o=t.isString(e)?a(e):e;return o.protocol===r.protocol&&o.host===r.host}}():function(){return!0}; +},{"./../utils":"zIVT"}],"5aBc":[function(require,module,exports) { +"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function t(){this.message="String contains an invalid character"}function o(o){for(var e,a,n=String(o),c="",i=0,h=r;n.charAt(0|i)||(h="=",i%1);c+=h.charAt(63&e>>8-i%1*8)){if((a=n.charCodeAt(i+=.75))>255)throw new t;e=e<<8|a}return c}t.prototype=new Error,t.prototype.code=5,t.prototype.name="InvalidCharacterError",module.exports=o; +},{}],"OhlP":[function(require,module,exports) { +"use strict";var e=require("./../utils");module.exports=e.isStandardBrowserEnv()?{write:function(n,t,o,r,i,u){var s=[];s.push(n+"="+encodeURIComponent(t)),e.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),e.isString(r)&&s.push("path="+r),e.isString(i)&&s.push("domain="+i),!0===u&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}; +},{"./../utils":"zIVT"}],"7LYE":[function(require,module,exports) { +"use strict";var e=require("./../utils"),r=require("./../core/settle"),o=require("./../helpers/buildURL"),t=require("./../helpers/parseHeaders"),n=require("./../helpers/isURLSameOrigin"),s=require("../core/createError"),i="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||require("./../helpers/btoa");module.exports=function(a){return new Promise(function(u,d){var l=a.data,p=a.headers;e.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest,c="onreadystatechange",w=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||n(a.url)||(f=new window.XDomainRequest,c="onload",w=!0,f.onprogress=function(){},f.ontimeout=function(){}),a.auth){var h=a.auth.username||"",m=a.auth.password||"";p.Authorization="Basic "+i(h+":"+m)}if(f.open(a.method.toUpperCase(),o(a.url,a.params,a.paramsSerializer),!0),f.timeout=a.timeout,f[c]=function(){if(f&&(4===f.readyState||w)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in f?t(f.getAllResponseHeaders()):null,o={data:a.responseType&&"text"!==a.responseType?f.response:f.responseText,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:e,config:a,request:f};r(u,d,o),f=null}},f.onerror=function(){d(s("Network Error",a,null,f)),f=null},f.ontimeout=function(){d(s("timeout of "+a.timeout+"ms exceeded",a,"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var y=require("./../helpers/cookies"),q=(a.withCredentials||n(a.url))&&a.xsrfCookieName?y.read(a.xsrfCookieName):void 0;q&&(p[a.xsrfHeaderName]=q)}if("setRequestHeader"in f&&e.forEach(p,function(e,r){void 0===l&&"content-type"===r.toLowerCase()?delete p[r]:f.setRequestHeader(r,e)}),a.withCredentials&&(f.withCredentials=!0),a.responseType)try{f.responseType=a.responseType}catch(T){if("json"!==a.responseType)throw T}"function"==typeof a.onDownloadProgress&&f.addEventListener("progress",a.onDownloadProgress),"function"==typeof a.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",a.onUploadProgress),a.cancelToken&&a.cancelToken.promise.then(function(e){f&&(f.abort(),d(e),f=null)}),void 0===l&&(l=null),f.send(l)})}; +},{"./../utils":"zIVT","./../core/settle":"wZW9","./../helpers/buildURL":"RS1v","./../helpers/parseHeaders":"9T8H","./../helpers/isURLSameOrigin":"1DmB","../core/createError":"0l+G","./../helpers/btoa":"5aBc","./../helpers/cookies":"OhlP"}],"T2kP":[function(require,module,exports) { +var process = require("process"); +var e=require("process"),t=require("./utils"),r=require("./helpers/normalizeHeaderName"),n={"Content-Type":"application/x-www-form-urlencoded"};function a(e,r){!t.isUndefined(e)&&t.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function i(){var t;return"undefined"!=typeof XMLHttpRequest?t=require("./adapters/xhr"):void 0!==e&&(t=require("./adapters/http")),t}var o={adapter:i(),transformRequest:[function(e,n){return r(n,"Content-Type"),t.isFormData(e)||t.isArrayBuffer(e)||t.isBuffer(e)||t.isStream(e)||t.isFile(e)||t.isBlob(e)?e:t.isArrayBufferView(e)?e.buffer:t.isURLSearchParams(e)?(a(n,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):t.isObject(e)?(a(n,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};t.forEach(["delete","get","head"],function(e){o.headers[e]={}}),t.forEach(["post","put","patch"],function(e){o.headers[e]=t.merge(n)}),module.exports=o; +},{"./utils":"zIVT","./helpers/normalizeHeaderName":"TOXd","./adapters/xhr":"7LYE","./adapters/http":"7LYE","process":"rH1J"}],"+GGk":[function(require,module,exports) { +"use strict";var t=require("./../utils");function e(){this.handlers=[]}e.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},e.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},e.prototype.forEach=function(e){t.forEach(this.handlers,function(t){null!==t&&e(t)})},module.exports=e; +},{"./../utils":"zIVT"}],"i7gz":[function(require,module,exports) { +"use strict";var r=require("./../utils");module.exports=function(t,u,e){return r.forEach(e,function(r){t=r(t,u)}),t}; +},{"./../utils":"zIVT"}],"C9l1":[function(require,module,exports) { +"use strict";module.exports=function(t){return!(!t||!t.__CANCEL__)}; +},{}],"Ex+b":[function(require,module,exports) { +"use strict";module.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}; +},{}],"BTlr":[function(require,module,exports) { +"use strict";module.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}; +},{}],"U2+V":[function(require,module,exports) { +"use strict";var e=require("./../utils"),r=require("./transformData"),a=require("../cancel/isCancel"),s=require("../defaults"),t=require("./../helpers/isAbsoluteURL"),n=require("./../helpers/combineURLs");function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}module.exports=function(d){return o(d),d.baseURL&&!t(d.url)&&(d.url=n(d.baseURL,d.url)),d.headers=d.headers||{},d.data=r(d.data,d.headers,d.transformRequest),d.headers=e.merge(d.headers.common||{},d.headers[d.method]||{},d.headers||{}),e.forEach(["delete","get","head","post","put","patch","common"],function(e){delete d.headers[e]}),(d.adapter||s.adapter)(d).then(function(e){return o(d),e.data=r(e.data,e.headers,d.transformResponse),e},function(e){return a(e)||(o(d),e&&e.response&&(e.response.data=r(e.response.data,e.response.headers,d.transformResponse))),Promise.reject(e)})}; +},{"./../utils":"zIVT","./transformData":"i7gz","../cancel/isCancel":"C9l1","../defaults":"T2kP","./../helpers/isAbsoluteURL":"Ex+b","./../helpers/combineURLs":"BTlr"}],"9RB6":[function(require,module,exports) { +"use strict";var e=require("./../defaults"),t=require("./../utils"),r=require("./InterceptorManager"),o=require("./dispatchRequest");function s(e){this.defaults=e,this.interceptors={request:new r,response:new r}}s.prototype.request=function(r){"string"==typeof r&&(r=t.merge({url:arguments[0]},arguments[1])),(r=t.merge(e,{method:"get"},this.defaults,r)).method=r.method.toLowerCase();var s=[o,void 0],u=Promise.resolve(r);for(this.interceptors.request.forEach(function(e){s.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){s.push(e.fulfilled,e.rejected)});s.length;)u=u.then(s.shift(),s.shift());return u},t.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(r,o){return this.request(t.merge(o||{},{method:e,url:r}))}}),t.forEach(["post","put","patch"],function(e){s.prototype[e]=function(r,o,s){return this.request(t.merge(s||{},{method:e,url:r,data:o}))}}),module.exports=s; +},{"./../defaults":"T2kP","./../utils":"zIVT","./InterceptorManager":"+GGk","./dispatchRequest":"U2+V"}],"RlDD":[function(require,module,exports) { +"use strict";function t(t){this.message=t}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,module.exports=t; +},{}],"/VWB":[function(require,module,exports) { +"use strict";var e=require("./Cancel");function n(n){if("function"!=typeof n)throw new TypeError("executor must be a function.");var o;this.promise=new Promise(function(e){o=e});var r=this;n(function(n){r.reason||(r.reason=new e(n),o(r.reason))})}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n(function(n){e=n}),cancel:e}},module.exports=n; +},{"./Cancel":"RlDD"}],"Kbjq":[function(require,module,exports) { +"use strict";module.exports=function(n){return function(t){return n.apply(null,t)}}; +},{}],"HXpE":[function(require,module,exports) { +"use strict";var e=require("./utils"),r=require("./helpers/bind"),n=require("./core/Axios"),t=require("./defaults");function u(t){var u=new n(t),l=r(n.prototype.request,u);return e.extend(l,n.prototype,u),e.extend(l,u),l}var l=u(t);l.Axios=n,l.create=function(r){return u(e.merge(t,r))},l.Cancel=require("./cancel/Cancel"),l.CancelToken=require("./cancel/CancelToken"),l.isCancel=require("./cancel/isCancel"),l.all=function(e){return Promise.all(e)},l.spread=require("./helpers/spread"),module.exports=l,module.exports.default=l; +},{"./utils":"zIVT","./helpers/bind":"4nb4","./core/Axios":"9RB6","./defaults":"T2kP","./cancel/Cancel":"RlDD","./cancel/CancelToken":"/VWB","./cancel/isCancel":"C9l1","./helpers/spread":"Kbjq"}],"uj17":[function(require,module,exports) { +module.exports=require("./lib/axios"); +},{"./lib/axios":"HXpE"}],"in7L":[function(require,module,exports) { +"use strict";var e=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(s,i){function o(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){e.done?s(e.value):new n(function(t){t(e.value)}).then(o,a)}c((r=r.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var n,r,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=(s=o.trys).length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]=0;a--)(i=e[a])&&(c=(u<3?i(c):u>3?i(n,r,c):i(n,r))||c);return u>3&&c&&Object.defineProperty(n,r,c),c},r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(e){i(e)}}function c(t){try{a(r.throw(t))}catch(e){i(e)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;c--)(a=t[c])&&(i=(u<3?a(i):u>3?a(n,r,i):a(n,r))||i);return u>3&&i&&Object.defineProperty(n,r,i),i},r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function u(e){try{c(r.next(e))}catch(t){a(t)}}function i(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(u,i)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0;u--)(i=e[u])&&(f=(c<3?i(f):c>3?i(r,n,f):i(r,n))||f);return c>3&&f&&Object.defineProperty(r,n,f),f},n=this&&this.__metadata||function(e,r){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,r)},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var i=o(require("react")),c=require("mobx-react"),f=function(t){function o(e){return t.call(this,e)||this}return e(o,t),o.prototype.render=function(){var t=this.props.appState;return i.createElement("div",{onClick:function(){t.toggleSide()}},t.sideExpanded?"<<<<<<":">>>>>")},o=r([c.inject("appState"),c.observer,n("design:paramtypes",[Object])],o)}(i.Component);exports.ToggleSidebar=f; },{"react":"ccIB","mobx-react":"/79c"}],"Ii+W":[function(require,module,exports) { "use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),n=this&&this.__decorate||function(e,n,r,o){var c,i=arguments.length,f=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,n,r,o);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(f=(i<3?c(f):i>3?c(n,r,f):c(n,r))||f);return i>3&&f&&Object.defineProperty(n,r,f),f},r=this&&this.__metadata||function(e,n){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var c=o(require("react")),i=require("mobx-react"),f=function(t){function o(e){return t.call(this,e)||this}return e(o,t),o.prototype.render=function(){var t=this.props.appState,e=t.selected.length;return c.createElement("div",null,e?c.createElement("button",{onClick:t.unselectAll},"Убрать выделение ",e," элементов"):"Ничего не выбрано")},o=n([i.inject("appState"),i.observer,r("design:paramtypes",[Object])],o)}(c.Component);exports.ToggleSelection=f; -},{"react":"ccIB","mobx-react":"/79c"}],"XQ5Z":[function(require,module,exports) { -"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=this&&this.__decorate||function(t,r,n,o){var i,c=arguments.length,u=c<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,n):o;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,r,n,o);else for(var f=t.length-1;f>=0;f--)(i=t[f])&&(u=(c<3?i(u):c>3?i(r,n,u):i(r,n))||u);return c>3&&u&&Object.defineProperty(r,n,u),u},n=this&&this.__metadata||function(t,r){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=o(require("react")),c=require("mobx-react"),u=require("./ToggleSidebar"),f=require("./ToggleSelection"),l=function(e){function o(t){return e.call(this,t)||this}return t(o,e),o.prototype.render=function(){this.props.appState;return i.createElement("div",null,i.createElement(u.ToggleSidebar,null),i.createElement(f.ToggleSelection,null))},o=r([c.inject("appState"),c.observer,n("design:paramtypes",[Object])],o)}(i.Component);exports.ContextualActions=l; -},{"react":"ccIB","mobx-react":"/79c","./ToggleSidebar":"10la","./ToggleSelection":"Ii+W"}],"j0KV":[function(require,module,exports) { -"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),o=this&&this.__decorate||function(t,o,n,r){var i,c=arguments.length,u=c<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,n):r;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,o,n,r);else for(var p=t.length-1;p>=0;p--)(i=t[p])&&(u=(c<3?i(u):c>3?i(o,n,u):i(o,n))||u);return c>3&&u&&Object.defineProperty(o,n,u),u},n=this&&this.__metadata||function(t,o){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,o)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=r(require("react")),c=require("mobx-react"),u=require("../../common/lib");require("./ZoomedView.css");var p=function(e){function r(t){var o=e.call(this,t)||this;return o.keyDown=function(e){var t=o.props.appState;if("Space"===e.code){if(t.zoomedItemId)return t.setZoomed(null),void e.preventDefault();if(t.focusedId)return t.setZoomed(t.focusedId),void e.preventDefault()}},o.keyup=function(e){"Escape"===e.code&&o.close(),"ArrowRight"===e.code&&o.viewNext(),"ArrowLeft"===e.code&&o.viewPrev()},o}return t(r,e),r.prototype.viewNext=function(){var e=this.props.appState;e.zoomedItemId&&e.shiftZoomed(1)},r.prototype.viewPrev=function(){var e=this.props.appState;e.zoomedItemId&&e.shiftZoomed(-1)},r.prototype.componentDidMount=function(){document.documentElement.addEventListener("keydown",this.keyDown),document.documentElement.addEventListener("keyup",this.keyup)},r.prototype.componentWillUnmount=function(){document.documentElement.removeEventListener("keydown",this.keyDown),document.documentElement.removeEventListener("keyup",this.keyup)},r.prototype.close=function(){this.props.appState.setZoomed(null)},r.prototype.render=function(){var e,t,o=this,n=this.props.appState,r=n.zoomedItem;return r&&(e=u.getTypeOfDoc(r.type),t=r.url),n.zoomedItemId&&i.createElement("div",{className:"ZoomedView",style:{left:n.sideWidth+"px"}},i.createElement("h1",null,"This is zoomed view"),i.createElement("h1",null,n.zoomedItemId),i.createElement("div",{onClick:function(){o.viewNext()}},"next"),i.createElement("div",{onClick:function(){o.viewPrev()}},"prev"),r?"img"===e&&i.createElement("img",{className:"ZoomedView__container ZoomedView__img",src:t}):null,r?"video"===e&&i.createElement("video",{controls:!0,className:"ZoomedView__container ZoomedView__video",src:t}):null,i.createElement("div",null))},r=o([c.inject("appState"),c.observer,n("design:paramtypes",[Object])],r)}(i.Component);exports.ZoomedView=p; -},{"react":"ccIB","mobx-react":"/79c","../../common/lib":"2ie3","./ZoomedView.css":"8GRE"}],"KHk6":[function(require,module,exports) { -"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),n=this&&this.__decorate||function(t,n,o,r){var i,a=arguments.length,u=a<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,o):r;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,o,r);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(a<3?i(u):a>3?i(n,o,u):i(n,o))||u);return a>3&&u&&Object.defineProperty(n,o,u),u},o=this&&this.__metadata||function(t,n){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=require("./MediaList"),a=r(require("react")),u=require("mobx-react"),c=require("./Navigation"),l=require("./DragNDropUpload"),f=require("./ContextualActions"),p=require("./ZoomedView");require("./Layout.less");var s=function(e){function r(t){return e.call(this,t)||this}return t(r,e),r.prototype.notifyAboutRender=function(){this.props.appState.incLayoutRerenderCount()},r.prototype.componentDidUpdate=function(){this.notifyAboutRender()},r.prototype.componentWillMount=function(){this.notifyAboutRender()},r.prototype.render=function(){var e=this.props.appState;return a.createElement("div",{className:"layout"},a.createElement("div",{className:"layout__navigation"},a.createElement(c.Navigation,null)),e.isAuthenticated?a.createElement(a.Fragment,null,a.createElement("div",{className:"layout__content"},a.createElement("div",{className:"layout__side",style:{width:e.sideWidth+"px"}},a.createElement(f.ContextualActions,null)),a.createElement("div",{className:"layout__main",style:{marginLeft:e.sideWidth+"px"}},a.createElement(i.MediaList,null))),a.createElement(l.DragNDropUpload,null),a.createElement(p.ZoomedView,null)):null)},r=n([u.inject("appState"),u.observer,o("design:paramtypes",[Object])],r)}(a.Component);exports.Layout=s; -},{"./MediaList":"jXAt","react":"ccIB","mobx-react":"/79c","./Navigation":"aFM5","./DragNDropUpload":"ZT5c","./ContextualActions":"XQ5Z","./ZoomedView":"j0KV","./Layout.less":"8GRE"}],"cjTR":[function(require,module,exports) { +},{"react":"ccIB","mobx-react":"/79c"}],"sSMM":[function(require,module,exports) { +"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=this&&this.__decorate||function(e,r,n,o){var i,a=arguments.length,c=a<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,n):o;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,r,n,o);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(c=(a<3?i(c):a>3?i(r,n,c):i(r,n))||c);return a>3&&c&&Object.defineProperty(r,n,c),c},n=this&&this.__metadata||function(e,r){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,r)},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var i=o(require("react")),a=require("mobx-react");require("./TagLink.less");var c=function(t){function o(e){return t.call(this,e)||this}return e(o,t),o.prototype.render=function(){var t,e=this.props,r=e.appState,n=e.tagName,o=r.router,a=-1!==(o.queryParams.tags||[]).indexOf(n);return t=a?o.getFullUrl({without:{queryParams:{tags:[n]}}}):o.getFullUrl({with:{queryParams:{tags:[n]}}}),i.createElement("a",{href:t,className:a?"remove":"with",onClick:function(t){t.preventDefault(),history.replaceState({},document.title,t.target.href)}},n)},o=r([a.inject("appState"),a.observer,n("design:paramtypes",[Object])],o)}(i.Component);exports.TagLink=c; +},{"react":"ccIB","mobx-react":"/79c","./TagLink.less":"8GRE"}],"tlYR":[function(require,module,exports) { +"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),n=this&&this.__decorate||function(e,n,r,o){var c,i=arguments.length,a=i<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,o);else for(var u=e.length-1;u>=0;u--)(c=e[u])&&(a=(i<3?c(a):i>3?c(n,r,a):c(n,r))||a);return i>3&&a&&Object.defineProperty(n,r,a),a},r=this&&this.__metadata||function(e,n){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var c=o(require("react")),i=require("mobx-react"),a=require("../api"),u=require("./TagLink"),f=function(t){function o(e){return t.call(this,e)||this}return e(o,t),o.prototype.componentDidMount=function(){var t=this.props.appState;a.fetchTags().then(function(e){t.setTags(e.tags)}).catch(function(t){console.error(t)})},o.prototype.render=function(){var t=this.props.appState;return c.createElement("div",null,c.createElement("h4",null,"Теги"),c.createElement("ul",null,t.tags.map(function(t){var e=t.name;return c.createElement("li",{key:e},c.createElement(u.TagLink,{tagName:e}))})))},o=n([i.inject("appState"),i.observer,r("design:paramtypes",[Object])],o)}(c.Component);exports.TagsList=f; +},{"react":"ccIB","mobx-react":"/79c","../api":"in7L","./TagLink":"sSMM"}],"XQ5Z":[function(require,module,exports) { +"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),r=this&&this.__decorate||function(t,r,n,o){var i,c=arguments.length,u=c<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,n):o;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,r,n,o);else for(var f=t.length-1;f>=0;f--)(i=t[f])&&(u=(c<3?i(u):c>3?i(r,n,u):i(r,n))||u);return c>3&&u&&Object.defineProperty(r,n,u),u},n=this&&this.__metadata||function(t,r){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=o(require("react")),c=require("mobx-react"),u=require("./ToggleSidebar"),f=require("./ToggleSelection"),l=require("./TagsList"),a=function(e){function o(t){return e.call(this,t)||this}return t(o,e),o.prototype.render=function(){this.props.appState;return i.createElement("div",null,i.createElement(u.ToggleSidebar,null),i.createElement(f.ToggleSelection,null),i.createElement(l.TagsList,null))},o=r([c.inject("appState"),c.observer,n("design:paramtypes",[Object])],o)}(i.Component);exports.ContextualActions=a; +},{"react":"ccIB","mobx-react":"/79c","./ToggleSidebar":"10la","./ToggleSelection":"Ii+W","./TagsList":"tlYR"}],"j0KV":[function(require,module,exports) { +"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),o=this&&this.__decorate||function(t,o,n,r){var i,c=arguments.length,u=c<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,n):r;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,o,n,r);else for(var d=t.length-1;d>=0;d--)(i=t[d])&&(u=(c<3?i(u):c>3?i(o,n,u):i(o,n))||u);return c>3&&u&&Object.defineProperty(o,n,u),u},n=this&&this.__metadata||function(t,o){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,o)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=r(require("react")),c=require("mobx-react");require("./ZoomedView.css");var u=function(e){function r(t){var o=e.call(this,t)||this;return o.keyDown=function(e){var t=o.props.appState;if("Space"===e.code){if(t.zoomedItemId)return t.setZoomed(null),void e.preventDefault();if(t.focusedId)return t.setZoomed(t.focusedId),void e.preventDefault()}},o.keyup=function(e){"Escape"===e.code&&o.close(),"ArrowRight"===e.code&&o.viewNext(),"ArrowLeft"===e.code&&o.viewPrev()},o}return t(r,e),r.prototype.viewNext=function(){var e=this.props.appState;e.zoomedItemId&&e.shiftZoomed(1)},r.prototype.viewPrev=function(){var e=this.props.appState;e.zoomedItemId&&e.shiftZoomed(-1)},r.prototype.componentDidMount=function(){document.documentElement.addEventListener("keydown",this.keyDown),document.documentElement.addEventListener("keyup",this.keyup)},r.prototype.componentWillUnmount=function(){document.documentElement.removeEventListener("keydown",this.keyDown),document.documentElement.removeEventListener("keyup",this.keyup)},r.prototype.close=function(){this.props.appState.setZoomed(null)},r.prototype.render=function(){var e,t,o=this,n=this.props.appState,r=n.zoomedItem;return r&&(e=r.type,t=r.url),n.zoomedItemId&&i.createElement("div",{className:"ZoomedView",style:{left:n.sideWidth+"px"}},i.createElement("h1",null,"This is zoomed view"),i.createElement("h1",null,n.zoomedItemId),i.createElement("div",{onClick:function(){o.viewNext()}},"next"),i.createElement("div",{onClick:function(){o.viewPrev()}},"prev"),r?"img"===e&&i.createElement("img",{className:"ZoomedView__container ZoomedView__img",src:t}):null,r?"video"===e&&i.createElement("video",{controls:!0,className:"ZoomedView__container ZoomedView__video",src:t}):null,i.createElement("div",null))},r=o([c.inject("appState"),c.observer,n("design:paramtypes",[Object])],r)}(i.Component);exports.ZoomedView=u; +},{"react":"ccIB","mobx-react":"/79c","./ZoomedView.css":"8GRE"}],"3GCd":[function(require,module,exports) { +"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),n=this&&this.__decorate||function(e,n,r,o){var i,c=arguments.length,f=c<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,n,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(c<3?i(f):c>3?i(n,r,f):i(n,r))||f);return c>3&&f&&Object.defineProperty(n,r,f),f},r=this&&this.__metadata||function(e,n){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var i=o(require("react")),c=require("mobx-react");require("./IsLoading.less");var f=function(t){function o(e){return t.call(this,e)||this}return e(o,t),o.prototype.render=function(){var t=this.props.appState;return i.createElement("div",{className:"\n IsLoading\n IsLoading--striped\n ",style:{display:t.isLoading?"block":"none"}})},o=n([c.inject("appState"),c.observer,r("design:paramtypes",[Object])],o)}(i.Component);exports.IsLoading=f; +},{"react":"ccIB","mobx-react":"/79c","./IsLoading.less":"8GRE"}],"KHk6":[function(require,module,exports) { +"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),n=this&&this.__decorate||function(t,n,o,r){var i,a=arguments.length,u=a<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,o):r;if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,o,r);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(a<3?i(u):a>3?i(n,o,u):i(n,o))||u);return a>3&&u&&Object.defineProperty(n,o,u),u},o=this&&this.__metadata||function(t,n){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(exports,"__esModule",{value:!0});var i=require("./MediaList"),a=r(require("react")),u=require("mobx-react"),c=require("./Navigation"),l=require("./DragNDropUpload"),s=require("./ContextualActions"),f=require("./ZoomedView"),p=require("./IsLoading");require("./Layout.less");var d=function(e){function r(t){return e.call(this,t)||this}return t(r,e),r.prototype.notifyAboutRender=function(){this.props.appState.incLayoutRerenderCount()},r.prototype.componentDidUpdate=function(){this.notifyAboutRender()},r.prototype.componentWillMount=function(){this.notifyAboutRender()},r.prototype.render=function(){var e=this.props.appState;return a.createElement("div",{className:"layout"},a.createElement("div",{className:"layout__navigation"},a.createElement(c.Navigation,null)),a.createElement(p.IsLoading,null),e.isAuthenticated?a.createElement(a.Fragment,null,a.createElement("div",{className:"layout__content"},a.createElement("div",{className:"layout__side",style:{width:e.sideWidth+"px"}},a.createElement(s.ContextualActions,null)),a.createElement("div",{className:"layout__main",style:{marginLeft:e.sideWidth+"px"}},a.createElement(i.MediaList,null))),a.createElement(l.DragNDropUpload,null),a.createElement(f.ZoomedView,null)):null)},r=n([u.inject("appState"),u.observer,o("design:paramtypes",[Object])],r)}(a.Component);exports.Layout=d; +},{"./MediaList":"jXAt","react":"ccIB","mobx-react":"/79c","./Navigation":"aFM5","./DragNDropUpload":"ZT5c","./ContextualActions":"XQ5Z","./ZoomedView":"j0KV","./IsLoading":"3GCd","./Layout.less":"8GRE"}],"cjTR":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("react")),t=require("mobx-react"),u=require("./Layout");function i(e){return function(){return r.createElement(t.Provider,{appState:e},r.createElement(u.Layout,null))}}require("./App.css"),exports.initApp=i; },{"react":"ccIB","mobx-react":"/79c","./Layout":"KHk6","./App.css":"8GRE"}],"BG8a":[function(require,module,exports) { "use strict";exports.__esModule=!0; -},{}],"tB8c":[function(require,module,exports) { -"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__assign||function(){return(t=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;p--)(r=t[p])&&(s=(d<3?r(s):d>3?r(o,n,s):r(o,n))||s);return d>3&&s&&Object.defineProperty(o,n,s),s},n=this&&this.__metadata||function(t,o){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,o)},i=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(i,r){function d(e){try{p(n.next(e))}catch(t){r(t)}}function s(e){try{p(n.throw(e))}catch(t){r(t)}}function p(e){e.done?i(e.value):new o(function(t){t(e.value)}).then(d,s)}p((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var o,n,i,r,d={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;d;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return d.label++,{value:r[1],done:!1};case 5:d.label++,n=r[1],r=[0];continue;case 7:r=d.ops.pop(),d.trys.pop();continue;default:if(!(i=(i=d.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){d=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]n?this.setZoomed(this.media[n].uuid):o<0?this.setZoomed(this.media[0].uuid):this.setZoomed(this.media[o].uuid)},t.prototype.setHoveredId=function(e){this.zoomedItemId||this.setFocusedId(e),this.hoveredId=e},t.prototype.setFocusedId=function(e){this.focusedId=e},t.prototype.calcViewPortHeight=function(){this.viewportHeight=window.innerHeight},t.prototype.calcPageScrolled=function(){this.pageScrolled=document.body.scrollTop},t.prototype.setMediaListFullHeight=function(e){this.mediaListFullHeight=e},o([d.observable,n("design:type","function"==typeof(g="undefined"!=typeof Array&&Array)?g:Object)],t.prototype,"media",void 0),o([d.observable,n("design:type",String)],t.prototype,"userName",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],t.prototype,"setAuthenticated",null),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"toggleSelected",null),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"unselectAll",null),o([d.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"isAuthenticated",null),o([d.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"columnsCount",null),o([d.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"sideWidth",null),o([d.observable,n("design:type",Boolean)],t.prototype,"sideExpanded",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"toggleSide",null),o([d.observable,n("design:type",Number)],t.prototype,"layoutRerenderCount",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"incLayoutRerenderCount",null),o([d.computed,n("design:type","function"==typeof(h="undefined"!=typeof Array&&Array)?h:Object),n("design:paramtypes",[])],t.prototype,"selected",null),o([d.observable,n("design:type",Boolean)],t.prototype,"isLoading",void 0),o([d.observable,n("design:type",Boolean)],t.prototype,"canLoadMore",void 0),o([d.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"loadedItemsCount",null),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",Promise)],t.prototype,"loadMore",null),o([d.action.bound,n("design:type",Function),n("design:paramtypes",["function"==typeof(m=void 0!==p.IMediaResponse&&p.IMediaResponse)?m:Object]),n("design:returntype",void 0)],t.prototype,"processLoadMoreResponse",null),o([d.observable,n("design:type",String)],t.prototype,"zoomedItemId",void 0),o([d.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"zoomedItem",null),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"setZoomed",null),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"shiftZoomed",null),o([d.observable,n("design:type",String)],t.prototype,"hoveredId",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],t.prototype,"setHoveredId",null),o([d.observable,n("design:type",String)],t.prototype,"focusedId",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"setFocusedId",null),o([d.observable,n("design:type",Number)],t.prototype,"viewportHeight",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"calcViewPortHeight",null),o([d.observable,n("design:type",Number)],t.prototype,"pageScrolled",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"calcPageScrolled",null),o([d.observable,n("design:type",Number)],t.prototype,"mediaListFullHeight",void 0),o([d.action.bound,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"setMediaListFullHeight",null),t}();exports.AppState=g; -},{"mobx":"Tcn4","./api":"in7L","../common/interfaces":"BG8a"}],"wUZ3":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("mobx"),i=1.5;function t(t){e.autorun(function(){var e=t.viewportHeight,r=t.pageScrolled,o=t.mediaListFullHeight;t.userName;o-r-e0&&"number"!=typeof t[0]))}function i(i,u,l){var c,p;if(o(i)||o(u))return!1;if(i.prototype!==u.prototype)return!1;if(r(i))return!!r(u)&&(i=t.call(i),u=t.call(u),n(i,u,l));if(f(i)){if(!f(u))return!1;if(i.length!==u.length)return!1;for(c=0;c=0;c--)if(y[c]!=s[c])return!1;for(c=y.length-1;c>=0;c--)if(p=y[c],!n(i[p],u[p],l))return!1;return typeof i==typeof u} +},{"./lib/keys.js":"WBVD","./lib/is_arguments.js":"lp2L"}],"Poy0":[function(require,module,exports) { +"use strict";module.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}; +},{}],"hgfQ":[function(require,module,exports) { +"use strict";var n,e=Object.prototype.hasOwnProperty;function t(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch(e){return null}}function r(n){try{return encodeURIComponent(n)}catch(e){return null}}function o(n){for(var e,r=/([^=?&]+)=?([^&]*)/g,o={};e=r.exec(n);){var u=t(e[1]),c=t(e[2]);null===u||null===c||u in o||(o[u]=c)}return o}function u(t,r){r=r||"";var o,u,c=[];for(u in"string"!=typeof r&&(r="?"),t)if(e.call(t,u)){if((o=t[u])||null!==o&&o!==n&&!isNaN(o)||(o=""),u=encodeURIComponent(u),o=encodeURIComponent(o),null===u||null===o)continue;c.push(u+"="+o)}return c.length?r+c.join("&"):""}exports.stringify=u,exports.parse=o; +},{}],"t0IB":[function(require,module,exports) { +var global = arguments[3]; +var e=arguments[3],o=require("requires-port"),t=require("querystringify"),s=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,r=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],n={hash:1,query:1};function i(o){var t,s=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},a={},i=typeof(o=o||s);if("blob:"===o.protocol)a=new l(unescape(o.pathname),{});else if("string"===i)for(t in a=new l(o,{}),n)delete a[t];else if("object"===i){for(t in o)t in n||(a[t]=o[t]);void 0===a.slashes&&(a.slashes=r.test(o.href))}return a}function h(e){var o=s.exec(e);return{protocol:o[1]?o[1].toLowerCase():"",slashes:!!o[2],rest:o[3]}}function p(e,o){for(var t=(o||"/").split("/").slice(0,-1).concat(e.split("/")),s=t.length,r=t[s-1],a=!1,n=0;s--;)"."===t[s]?t.splice(s,1):".."===t[s]?(t.splice(s,1),n++):n&&(0===s&&(a=!0),t.splice(s,1),n--);return a&&t.unshift(""),"."!==r&&".."!==r||t.push(""),t.join("/")}function l(e,s,r){if(!(this instanceof l))return new l(e,s,r);var n,c,u,f,m,y,d=a.slice(),g=typeof s,v=this,w=0;for("object"!==g&&"string"!==g&&(r=s,s=null),r&&"function"!=typeof r&&(r=t.parse),s=i(s),n=!(c=h(e||"")).protocol&&!c.slashes,v.slashes=c.slashes||n&&s.slashes,v.protocol=c.protocol||s.protocol||"",e=c.rest,c.slashes||(d[3]=[/(.*)/,"pathname"]);w0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){for(var n,o=h(r),a=o[0],u=o[1],i=new e(c(r,a,u)),f=0,A=u>0?a-4:a,d=0;d>16&255,i[f++]=n>>8&255,i[f++]=255&n;return 2===u&&(n=t[r.charCodeAt(d)]<<2|t[r.charCodeAt(d+1)]>>4,i[f++]=255&n),1===u&&(n=t[r.charCodeAt(d)]<<10|t[r.charCodeAt(d+1)]<<4|t[r.charCodeAt(d+2)]>>2,i[f++]=n>>8&255,i[f++]=255&n),i}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; +},{}],"O1Qa":[function(require,module,exports) { +exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; +},{}],"ZCp3":[function(require,module,exports) { +var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; +},{}],"8fe9":[function(require,module,exports) { + +var global = arguments[3]; +var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} +},{"base64-js":"5QAn","ieee754":"O1Qa","isarray":"ZCp3","buffer":"8fe9"}],"zSgB":[function(require,module,exports) { +var Buffer = require("buffer").Buffer; +var r=require("buffer").Buffer,e=Symbol.prototype.valueOf,a=require("kind-of");function t(r,e){switch(a(r)){case"array":return r.slice();case"object":return Object.assign({},r);case"date":return new r.constructor(+r);case"map":return new Map(r);case"set":return new Set(r);case"buffer":return s(r);case"symbol":return o(r);case"arraybuffer":return c(r);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return u(r);case"regexp":return n(r);case"error":return Object.create(r);default:return r}}function n(r){var e=new r.constructor(r.source,/\w+$/.exec(r));return e.lastIndex=r.lastIndex,e}function c(r){var e=new r.constructor(r.byteLength);return new Uint8Array(e).set(new Uint8Array(r)),e}function u(r,e){return new r.constructor(r.buffer,r.byteOffset,r.length)}function s(e){var a=e.length,t=r.allocUnsafe?r.allocUnsafe(a):new r(a);return e.copy(t),t}function o(r){return e?Object(e.call(r)):{}}module.exports=t; +},{"kind-of":"NHzG","buffer":"8fe9"}],"H/MT":[function(require,module,exports) { +"use strict";module.exports=function(r){return null!=r&&"object"==typeof r&&!1===Array.isArray(r)}; +},{}],"3glh":[function(require,module,exports) { +"use strict";var t=require("isobject");function o(o){return!0===t(o)&&"[object Object]"===Object.prototype.toString.call(o)}module.exports=function(t){var r,e;return!1!==o(t)&&("function"==typeof(r=t.constructor)&&(!1!==o(e=r.prototype)&&!1!==e.hasOwnProperty("isPrototypeOf")))}; +},{"isobject":"H/MT"}],"jRWI":[function(require,module,exports) { +"use strict";var r=require("shallow-clone"),e=require("kind-of"),n=require("is-plain-object");function t(n,t){switch(e(n)){case"object":return u(n,t);case"array":return o(n,t);default:return r(n)}}function u(r,e){if("function"==typeof e)return e(r);if(e||n(r)){var u=new r.constructor;for(var o in r)u[o]=t(r[o],e);return u}return r}function o(r,e){for(var n=new r.constructor(r.length),u=0;u=0;p--)(n=e[p])&&(s=(a<3?n(s):a>3?n(r,o,s):n(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},r=this&&this.__metadata||function(e,r){if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,r)};Object.defineProperty(exports,"__esModule",{value:!0});var o=require("mobx"),i=require("qs"),n=require("deep-equal"),a=require("url-parse"),s=require("deepmerge"),p=require("traverse"),u=require("clone-deep");function h(t){return(t=(t=t.replace(/^\/*|\/*$/g,"")).replace(/\/{2,}/g,"/")).split("/")}function f(){return"undefined"!=typeof window}var l=function(){function t(t){var e=this;if(this.domain="",this.port=null,this.protocol="",this.path="",this.queryString="",this.hash="",this.pathSegments=[],this.queryParams={},f()){var r=this;window.addEventListener("hashchange",function(){e.urlToState(location.href)}),window.addEventListener("popstate",function(){e.urlToState(location.href)});var o=history.pushState;history.pushState=function(){return setTimeout(function(){r.urlToState(location.href)}),o.apply(this,arguments)};var i=history.replaceState;history.replaceState=function(){return setTimeout(function(){r.urlToState(location.href)}),i.apply(this,arguments)}}setTimeout(function(){e.urlToState(t)})}var l,y;return t.prototype.urlToState=function(t){var e=a(t),r=e.protocol.replace(/:/g,""),o=parseInt(e.port),n=o||{http:80,https:443}[r],s=e.query.replace("?",""),p=e.hash.replace("#","");this.assignIfNotEqual("domain",e.hostname),this.assignIfNotEqual("port",n),this.assignIfNotEqual("protocol",r),this.assignIfNotEqual("path",e.pathname),this.assignIfNotEqual("queryString",s),this.assignIfNotEqual("hash",p),this.assignIfNotEqual("pathSegments",h(e.pathname)),this.assignIfNotEqual("queryParams",i.parse(decodeURIComponent(s)))},t.prototype.assignIfNotEqual=function(t,e){n(this[t],e)||(this[t]=e)},t.prototype.getFullUrl=function(t){var e=Object.assign({},u(this.queryParams));t.with&&t.with.queryParams&&(e=s(e,t.with.queryParams)),t.without&&t.without.queryParams&&(e=p(e).map(function(e){var r=function(r){if(o.path[0]===r){var i=t.without.queryParams[r];1===o.path.length&&Array.isArray(e)&&e.every(function(t){return-1!==i.indexOf(t)})&&o.delete(),Array.isArray(i)&&-1!==i.indexOf(e)&&o.delete()}},o=this;for(var i in t.without.queryParams)r(i)}));var r=this.protocol+"://"+this.domain;return 80!==this.port&&443!==this.port&&(r+=":"+this.port),r+=this.path,Object.keys(e).length&&(r+="?"+i.stringify(e,{arrayFormat:"brackets"})),this.hash&&(r+="#"+this.hash),r},e([o.action,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",void 0)],t.prototype,"urlToState",null),e([o.action,r("design:type",Function),r("design:paramtypes",[Object,"function"==typeof(l="undefined"!=typeof T&&T)?l:Object]),r("design:returntype",void 0)],t.prototype,"assignIfNotEqual",null),e([o.observable,r("design:type",String)],t.prototype,"domain",void 0),e([o.observable,r("design:type",Number)],t.prototype,"port",void 0),e([o.observable,r("design:type",String)],t.prototype,"protocol",void 0),e([o.observable,r("design:type",String)],t.prototype,"path",void 0),e([o.observable,r("design:type",String)],t.prototype,"queryString",void 0),e([o.observable,r("design:type",String)],t.prototype,"hash",void 0),e([o.observable,r("design:type","function"==typeof(y="undefined"!=typeof Array&&Array)?y:Object)],t.prototype,"pathSegments",void 0),e([o.observable,r("design:type",Object)],t.prototype,"queryParams",void 0),t}();exports.AppRouter=l; +},{"mobx":"Tcn4","qs":"3iGV","deep-equal":"Nbrj","url-parse":"t0IB","deepmerge":"EyL0","traverse":"yy4f","clone-deep":"jRWI"}],"tB8c":[function(require,module,exports) { +"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=this&&this.__assign||function(){return(t=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;p--)(r=t[p])&&(d=(s<3?r(d):s>3?r(o,n,d):r(o,n))||d);return s>3&&d&&Object.defineProperty(o,n,d),d},n=this&&this.__metadata||function(t,o){if("object"===("undefined"==typeof Reflect?"undefined":e(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,o)},i=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(i,r){function s(e){try{p(n.next(e))}catch(t){r(t)}}function d(e){try{p(n.throw(e))}catch(t){r(t)}}function p(e){e.done?i(e.value):new o(function(t){t(e.value)}).then(s,d)}p((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function d(r){return function(d){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]n?this.setZoomed(this.media[n].uuid):o<0?this.setZoomed(this.media[0].uuid):this.setZoomed(this.media[o].uuid)},t.prototype.setHoveredId=function(e){this.zoomedItemId||this.setFocused(e),this.hoveredId=e},Object.defineProperty(t.prototype,"focusedId",{get:function(){var e=this.media.find(function(e){return e.focused});return e?e.uuid:null},enumerable:!0,configurable:!0}),t.prototype.setFocused=function(e){this.media.forEach(function(t){t.focused=t.uuid===e})},t.prototype.calcViewPortHeight=function(){this.viewportHeight=window.innerHeight},t.prototype.calcPageScrolled=function(){this.pageScrolled=document.body.scrollTop},t.prototype.setMediaListFullHeight=function(e){this.mediaListFullHeight=e},t.prototype.setTags=function(e){this.tags=e},o([s.observable,n("design:type","function"==typeof(m=void 0!==s.IObservableArray&&s.IObservableArray)?m:Object)],t.prototype,"media",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"resetMedia",null),o([s.observable,n("design:type",String)],t.prototype,"userName",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],t.prototype,"setAuthenticated",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"toggleSelected",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"unselectAll",null),o([s.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"isAuthenticated",null),o([s.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"columnsCount",null),o([s.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"sideWidth",null),o([s.observable,n("design:type",Boolean)],t.prototype,"sideExpanded",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"toggleSide",null),o([s.observable,n("design:type",Number)],t.prototype,"layoutRerenderCount",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"incLayoutRerenderCount",null),o([s.computed,n("design:type","function"==typeof(b="undefined"!=typeof Array&&Array)?b:Object),n("design:paramtypes",[])],t.prototype,"selected",null),o([s.observable,n("design:type",Boolean)],t.prototype,"isLoading",void 0),o([s.observable,n("design:type",Boolean)],t.prototype,"canLoadMore",void 0),o([s.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"loadedItemsCount",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",Promise)],t.prototype,"loadMore",null),o([s.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"filters",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",["function"==typeof(v=void 0!==p.IMediaResponse&&p.IMediaResponse)?v:Object]),n("design:returntype",void 0)],t.prototype,"processLoadResponse",null),o([s.observable,n("design:type",String)],t.prototype,"zoomedItemId",void 0),o([s.computed,n("design:type",Object),n("design:paramtypes",[])],t.prototype,"zoomedItem",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"setZoomed",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"shiftZoomed",null),o([s.observable,n("design:type",String)],t.prototype,"hoveredId",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[Object]),n("design:returntype",void 0)],t.prototype,"setHoveredId",null),o([s.computed,n("design:type",String),n("design:paramtypes",[])],t.prototype,"focusedId",null),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"setFocused",null),o([s.observable,n("design:type",Number)],t.prototype,"viewportHeight",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"calcViewPortHeight",null),o([s.observable,n("design:type",Number)],t.prototype,"pageScrolled",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"calcPageScrolled",null),o([s.observable,n("design:type",Number)],t.prototype,"mediaListFullHeight",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"setMediaListFullHeight",null),o([s.observable,n("design:type","function"==typeof(I="undefined"!=typeof Array&&Array)?I:Object)],t.prototype,"tags",void 0),o([s.action.bound,n("design:type",Function),n("design:paramtypes",["function"==typeof(O="undefined"!=typeof Array&&Array)?O:Object]),n("design:returntype",void 0)],t.prototype,"setTags",null),t}();exports.AppState=m; +},{"mobx":"Tcn4","./api":"in7L","../common/interfaces":"BG8a","./app-router":"up+k","axios":"uj17"}],"wUZ3":[function(require,module,exports) { +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("mobx"),t=1.5;function i(i){e.autorun(function(){var e=i.viewportHeight,n=i.pageScrolled,o=i.mediaListFullHeight,r=i.isAuthenticated,c=i.canLoadMore,a=i.isLoading;r&&!a&&c&&o-n-e=0&&t.resetMedia()})}function o(e){n(e),i(e)}exports.initServices=o; },{"mobx":"Tcn4"}],"9Acp":[function(require,module,exports) { "use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("react")),t=require("./components/App"),i=require("react-dom"),n=require("./app-state"),a=require("../common/lib"),u=require("./services"),o=new n.AppState(window.initialState);a.isDev()&&(window.a=o),u.initServices(o);var p=t.initApp(o);i.render(r.createElement(p,null),document.getElementById("app")); },{"react":"ccIB","./components/App":"cjTR","react-dom":"x9tB","./app-state":"tB8c","../common/lib":"2ie3","./services":"wUZ3"}]},{},["9Acp"], null) \ No newline at end of file