@epam/uui-db 4.8.2 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle-stats.json +1 -1
- package/package.json +4 -4
package/bundle-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"errors":[],"warnings":[],"version":"4.44.2","hash":"ef05eed52d766a912d43","time":12070,"builtAt":1661190203286,"publicPath":"/","outputPath":"/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/build","assetsByChunkName":{"main":["index.js","index.js.map"]},"assets":[{"name":"index.d.ts","size":58,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"index.d.ts.map","size":120,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"index.js","size":79917,"chunks":["main"],"chunkNames":["main"],"info":{},"emitted":true},{"name":"index.js.map","size":116950,"chunks":["main"],"chunkNames":["main"],"info":{"development":true},"emitted":true},{"name":"src/Db.d.ts","size":604,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Db.d.ts.map","size":697,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbRef.d.ts","size":2283,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbRef.d.ts.map","size":2180,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbTable.d.ts","size":1549,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbTable.d.ts.map","size":1792,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/IxSet.d.ts","size":1053,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/IxSet.d.ts.map","size":1178,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/ListLoadingTracker.d.ts","size":855,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/ListLoadingTracker.d.ts.map","size":808,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Loader.d.ts","size":1098,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Loader.d.ts.map","size":1171,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Scheduler.d.ts","size":545,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Scheduler.d.ts.map","size":640,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/SimpleLoadingTracker.d.ts","size":353,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/SimpleLoadingTracker.d.ts.map","size":391,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/filter.d.ts","size":47,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/filter.d.ts.map","size":127,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/index.d.ts","size":74,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/index.d.ts.map","size":165,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkLookup.d.ts","size":49,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkLookup.d.ts.map","size":131,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkUpdate.d.ts","size":49,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkUpdate.d.ts.map","size":131,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/query.d.ts","size":46,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/query.d.ts.map","size":125,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/sorting.d.ts","size":48,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/sorting.d.ts.map","size":129,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/testData.d.ts","size":407,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/testData.d.ts.map","size":405,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/index.d.ts","size":248,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/index.d.ts.map","size":275,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/patchHelpers.d.ts","size":2069,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/patchHelpers.d.ts.map","size":2047,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/reactHooks.d.ts","size":527,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/reactHooks.d.ts.map","size":577,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/tempIds.d.ts","size":1560,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/tempIds.d.ts.map","size":1502,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/types.d.ts","size":5095,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/types.d.ts.map","size":5384,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/utils.d.ts","size":462,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/utils.d.ts.map","size":360,"chunks":[],"chunkNames":[],"info":{},"emitted":true}],"filteredAssets":0,"entrypoints":{"main":{"chunks":["main"],"assets":["index.js","index.js.map"],"children":{},"childAssets":{}}},"namedChunkGroups":{"main":{"chunks":["main"],"assets":["index.js","index.js.map"],"children":{},"childAssets":{}}},"chunks":[{"id":"main","rendered":true,"initial":true,"entry":true,"size":64343,"names":["main"],"files":["index.js","index.js.map"],"hash":"2f974f05473345d1cf44","siblings":[],"parents":[],"children":[],"childrenByOrder":{},"modules":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx","index":0,"index2":29,"size":28,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"multi entry"}],"providedExports":null,"optimizationBailout":[],"depth":0},{"id":"../node_modules/tslib/tslib.es6.js","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/tslib/tslib.es6.js","name":"../node_modules/tslib/tslib.es6.js","index":2,"index2":0,"size":12280,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/ListLoadingTracker.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","module":"./src/ListLoadingTracker.ts","moduleName":"./src/ListLoadingTracker.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"}],"providedExports":["__extends","__assign","__rest","__decorate","__param","__metadata","__awaiter","__generator","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn"],"optimizationBailout":[],"depth":2,"source":"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx","index":1,"index2":28,"size":163,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":0,"issuerName":"multi ./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":0,"moduleIdentifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"multi ./index.tsx","moduleName":"multi ./index.tsx","type":"single entry","userRequest":"/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","loc":"main[0]"}],"providedExports":null,"optimizationBailout":[],"depth":1,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./src\"), exports);\n"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts","index":5,"index2":7,"size":2875,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./Db","loc":"5:26-41"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Db = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\nvar Db = /** @class */ (function () {\n function Db(tables, reusedCache) {\n this.tables = tables;\n this.viewCache = new Map();\n /* Views (cached db projections) */\n this.valueAbsent = Symbol(\"ValueAbsent\");\n if (reusedCache) {\n this.viewCache = new Map(reusedCache);\n }\n else {\n this.viewCache = new Map();\n }\n }\n Db.prototype.update = function (mutate) {\n var clone = new this.constructor(this.tables, this.viewCache);\n clone.tables = (0, tslib_1.__assign)({}, this.tables);\n mutate(clone);\n return clone;\n };\n Db.prototype.with = function (patch) {\n return this.update(function (db) {\n (0, utils_1.objectKeys)(db.tables).forEach(function (entityName) {\n if (patch[entityName]) {\n db.tables[entityName] = db.tables[entityName].with(patch[entityName]);\n }\n });\n });\n };\n Db.prototype.runView = function (view, params) {\n var cache = this.viewCache.get(view);\n if (!cache) {\n cache = new Map();\n this.viewCache.set(view, cache);\n }\n var key = view.getKey ? view.getKey(params) : JSON.stringify(params);\n var cacheItem = cache.get(key);\n if (!cacheItem) {\n cacheItem = {\n dependencies: this.valueAbsent,\n currentValue: this.valueAbsent,\n computedOnDb: this.valueAbsent,\n };\n cache.set(key, cacheItem);\n }\n var shouldUpdate = this !== cacheItem.computedOnDb;\n var dependencies = this.valueAbsent;\n if (view.getDependencies) {\n var compare = view.compareDependencies || utils_1.defaultCompareViewDependencies;\n dependencies = view.getDependencies(this, params);\n shouldUpdate = !compare(cacheItem.dependencies, dependencies);\n }\n var previousValue = cacheItem.currentValue;\n if (shouldUpdate) {\n cacheItem.dependencies = dependencies;\n var newValue = view.compute(this, params, dependencies);\n cacheItem.computedOnDb = this;\n var compareResults = view.compareResults || lodash_isequal_1.default;\n if (!compareResults(previousValue, newValue)) {\n if (view.traceDiff) {\n console.debug((0, utils_1.difference)(previousValue, newValue));\n }\n cacheItem.currentValue = newValue;\n }\n }\n return cacheItem.currentValue;\n };\n return Db;\n}());\nexports.Db = Db;\n"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts","index":14,"index2":24,"size":9346,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbRef","loc":"7:26-44"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRef = void 0;\nvar tslib_1 = require(\"tslib\");\nvar patchHelpers_1 = require(\"./patchHelpers\");\nvar tempIds_1 = require(\"./tempIds\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isempty_1 = (0, tslib_1.__importDefault)(require(\"lodash.isempty\"));\nvar Loader_1 = require(\"./Loader\");\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar SimpleLoadingTracker_1 = require(\"./SimpleLoadingTracker\");\nvar ListLoadingTracker_1 = require(\"./ListLoadingTracker\");\nvar DbRef = /** @class */ (function () {\n function DbRef(blank) {\n var _this = this;\n this.blank = blank;\n this.log = [];\n this.autoSave = true;\n this.savedPoint = 0;\n this.throttleSaveMs = 1000;\n /* Update subscriptions (aka live views) */\n this.lastSubscriptionId = 1;\n this.subscriptions = new Map();\n this.updateHandlers = [];\n /* Error Subscriptions */\n this.saveErrorHandlers = [];\n /* Save scheduling */\n this.enqueueSave = (0, uui_core_1.batch)(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {\n var cumulativePatch, lastLogEntry, response, error_1;\n return (0, tslib_1.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n cumulativePatch = this.makeCumulativePatch();\n lastLogEntry = this.log.length;\n if ((0, lodash_isempty_1.default)(cumulativePatch)) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.savePatch(cumulativePatch)];\n case 2:\n response = _a.sent();\n this.applyResponse(response, lastLogEntry);\n this.update();\n return [3 /*break*/, 4];\n case 3:\n error_1 = _a.sent();\n this.saveError(cumulativePatch, error_1);\n this.update();\n throw error_1;\n case 4: return [2 /*return*/];\n }\n });\n }); });\n this.handleBeforeUnload = function (e) {\n if (_this.enqueueSave.isBusy) {\n e.returnValue = false;\n return false;\n }\n };\n this.loaders = [];\n this.db = blank;\n this.base = blank;\n this.tempIdMap = new tempIds_1.TempIdMap(blank);\n this.idMap = this.tempIdMap;\n window.addEventListener('beforeunload', this.handleBeforeUnload);\n }\n /** Saves all committed patches. Useful only if autoSave is off. */\n DbRef.prototype.save = function () {\n return this.enqueueSave();\n };\n DbRef.prototype.getAutoSave = function () {\n return this.autoSave;\n };\n DbRef.prototype.setAutoSave = function (val) {\n if (this.autoSave != val) {\n this.autoSave = val;\n this.autoSave && this.enqueueSave();\n this.update();\n }\n };\n DbRef.prototype.revert = function () {\n this.db = this.base;\n this.log = this.log.slice(0, this.savedPoint);\n this.update();\n };\n /** Concrete DbRef instances should override and implement their save logic in this method */\n DbRef.prototype.savePatch = function (patch) {\n return Promise.resolve({ submit: {} });\n };\n /* Db Update logic */\n DbRef.prototype.commit = function (patch) {\n var dbBeforeUpdate = this.db.with(patch);\n patch = this.beforeUpdate(patch, dbBeforeUpdate.tables, this.db.tables);\n patch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, patch);\n this.log.push({ patch: patch });\n this.db = this.db.with(patch);\n this.autoSave && this.enqueueSave(null, { throttleMs: this.throttleSaveMs });\n this.update();\n };\n DbRef.prototype.beforeUpdate = function (patch, tables, prevTables) {\n var _this = this;\n var patchAndDependencies = {};\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && !tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n patchAndDependencies[entityName] = patch[entityName];\n });\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n var _a;\n var schema = tables[entityName].schema;\n var beforeUpdate = schema.beforeUpdate;\n var context = {\n clientIdsMap: _this.tempIdMap,\n schema: schema,\n tables: tables,\n prevTables: prevTables,\n };\n var results = patch[entityName].map(function (e) { return beforeUpdate(e, context); });\n var updatedPatch = (_a = {}, _a[entityName] = results.map(function (result) { return result.entity; }), _a);\n var dependentEntityPatchesForUpdate = (0, patchHelpers_1.unionPatches)(results.filter(function (result) { return result.dependentEntities; }).map(function (result) { return result.dependentEntities; }));\n var dependentEntityPatches = _this.beforeUpdate(dependentEntityPatchesForUpdate, tables, prevTables);\n patchAndDependencies = (0, patchHelpers_1.mergeEntityPatches)(tables, (0, patchHelpers_1.unionPatches)([patchAndDependencies, updatedPatch, dependentEntityPatches]));\n });\n return patchAndDependencies;\n };\n DbRef.prototype.commitFetch = function (patch) {\n patch = this.tempIdMap.serverToClientPatch(patch);\n this.rebase(this.base.with(patch));\n this.update();\n };\n DbRef.prototype.rebase = function (newBase) {\n this.base = newBase;\n this.db = newBase;\n for (var n = this.savedPoint; n < this.log.length; n++) {\n this.db = this.db.with(this.log[n].patch);\n }\n };\n DbRef.prototype.makeCumulativePatch = function () {\n var lastLogEntry = this.log.length;\n var logEntriesToSave = this.log.slice(this.savedPoint, lastLogEntry);\n var cumulativePatch = (0, patchHelpers_1.makeCumulativePatch)(this.db, logEntriesToSave.map(function (t) { return t.patch; }), this.tempIdMap);\n cumulativePatch = this.tempIdMap.clientToServerPatch(cumulativePatch);\n return cumulativePatch;\n };\n DbRef.prototype.applyResponse = function (response, newSavedPoint) {\n this.tempIdMap.appendServerMapping(response);\n var serverPatch = (0, patchHelpers_1.flattenResponse)(response.submit, this.db.tables);\n serverPatch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, serverPatch);\n this.savedPoint = newSavedPoint;\n this.base = this.db;\n this.commitFetch(serverPatch);\n };\n DbRef.prototype.subscribe = function (view, params, onUpdate) {\n var _this = this;\n var id = this.lastSubscriptionId++;\n var subscription = {\n update: function (params) {\n subscription.currentParams = params;\n subscription.currentValue = _this.db.runView(view, params);\n return subscription.currentValue;\n },\n currentParams: null,\n currentValue: null,\n onUpdate: onUpdate,\n unsubscribe: function () { _this.subscriptions.delete(id); },\n };\n subscription.update(params);\n this.subscriptions.set(id, subscription);\n return subscription;\n };\n DbRef.prototype.onUpdate = function (handler) {\n this.subscribe({\n compute: function (db) { return db; },\n compareResults: function (a, b) { return a === b; },\n }, null, handler);\n };\n DbRef.prototype.update = function () {\n this.subscriptions.forEach(function (subscription) {\n var previousValue = subscription.currentValue;\n subscription.update(subscription.currentParams);\n if (subscription.currentValue !== previousValue && subscription.onUpdate) {\n subscription.onUpdate(subscription.currentValue);\n }\n });\n };\n DbRef.prototype.onSaveError = function (handler) {\n this.saveErrorHandlers.push(handler);\n };\n DbRef.prototype.saveError = function (request, error) {\n this.saveErrorHandlers.forEach(function (handler) { return handler(request, error); });\n };\n DbRef.prototype.makeLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new SimpleLoadingTracker_1.SimpleLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.makeListLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new ListLoadingTracker_1.ListLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.reload = function () {\n this.loaders = [];\n };\n return DbRef;\n}());\nexports.DbRef = DbRef;\n"},{"id":"./src/DbTable.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","name":"./src/DbTable.ts","index":11,"index2":10,"size":10036,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbTable","loc":"6:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbTable = void 0;\nvar tslib_1 = require(\"tslib\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar immutable_1 = require(\"immutable\");\nvar DbTable = /** @class */ (function () {\n function DbTable(schema, state, q) {\n this.schema = schema;\n this.state = state;\n this.q = q;\n if (!state) {\n var indexes = (schema.indexes || []).map(function (indexDef) {\n return {\n field: indexDef,\n map: I.Map(),\n };\n });\n this.state = { pk: I.Map(), indexes: indexes };\n }\n if (!q) {\n this.q = {};\n }\n }\n DbTable.prototype.keyToImmutable = function (id) {\n if (Array.isArray(id)) {\n return I.List(id);\n }\n else {\n return id;\n }\n };\n DbTable.prototype.byId = function (id) {\n return this.state.pk.get(this.keyToImmutable(id));\n };\n DbTable.prototype.getId = function (entity) {\n if (Array.isArray(this.schema.primaryKey)) {\n return this.schema.primaryKey.map(function (key) { return entity[key]; });\n }\n return entity[this.schema.primaryKey];\n };\n DbTable.prototype.update = function (mutate) {\n var clone = new this.constructor(this.schema, this.state, this.q);\n mutate(clone);\n return clone;\n };\n /* Mutation */\n DbTable.prototype.with = function (patch) {\n var _this = this;\n var updates = patch.map(function (entityPatch) {\n var id = _this.getId(entityPatch);\n var immId = _this.keyToImmutable(id);\n var existing = _this.state.pk.get(immId);\n var isDeleted = false;\n var updated = entityPatch;\n if (existing) {\n updated = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, existing), entityPatch);\n if (_this.schema.deleteFlag) {\n isDeleted = updated[_this.schema.deleteFlag] === true;\n }\n }\n return { id: id, immId: immId, patch: entityPatch, existing: existing, updated: updated, isNew: !existing, isDeleted: isDeleted };\n });\n var idVal = immutable_1.Seq.Keyed(updates.map(function (entity) { return [entity.immId, entity.updated]; }));\n var newPk = this.state.pk.merge(idVal);\n // TBD: replace with deleteAll after migrating to immutable 4\n updates.filter(function (u) { return u.isDeleted; }).forEach(function (u) {\n newPk = newPk.delete(u.immId);\n });\n var newIndexes = this.state.indexes.map(function (index) {\n var newMap = index.map;\n var _loop_1 = function (n) {\n var update = updates[n];\n var newKey = update.updated[index.field];\n if (update.existing) {\n var oldKey = update.existing[index.field];\n if (oldKey !== newKey || update.isDeleted) {\n newMap = newMap.update(oldKey, function (set) { return set.remove(update.immId); });\n }\n }\n if (!update.isDeleted) {\n newMap = newMap.update(newKey, I.Set(), function (set) { return set.add(update.immId); });\n }\n };\n for (var n = 0; n < updates.length; n++) {\n _loop_1(n);\n }\n return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, index), { map: newMap });\n });\n var newState = { pk: newPk, indexes: newIndexes };\n return this.update(function (t) { return t.state = newState; });\n };\n /* Query */\n DbTable.prototype.find = function (filter) {\n var _this = this;\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { filter: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, _this.q.filter), filter) }); });\n };\n DbTable.prototype.order = function (order) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: order }); });\n };\n DbTable.prototype.orderBy = function (field, direction) {\n if (direction === void 0) { direction = 'asc'; }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: [{ field: field, direction: direction }] }); });\n };\n DbTable.prototype.thenBy = function (field, direction) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], t.q.sorting, true), [{ field: field, direction: direction }], false) }); });\n };\n DbTable.prototype.search = function (text) {\n if (!this.schema.searchBy) {\n throw new Error(\"Can't search in the \".concat(this.schema.typeName, \" table - searchBy is not defined in the schema.\"));\n }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { search: text }); });\n };\n /* Materializing */\n DbTable.prototype.range = function (from, count) {\n return this.runQuery((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.q), { range: { from: from, count: count } }));\n };\n DbTable.prototype.count = function () {\n return this.runQuery(this.q).length;\n };\n DbTable.prototype.one = function () {\n return this.runQuery(this.q)[0] || null;\n };\n DbTable.prototype.toArray = function () {\n return this.runQuery(this.q);\n };\n DbTable.prototype.map = function (fn) {\n return this.toArray().map(fn);\n };\n /* Query implementation */\n DbTable.prototype.runQuery = function (q) {\n var _this = this;\n var result = null;\n var filter = q.filter;\n if (filter) {\n var indexes = this.state.indexes;\n // Try to use indexes to fulfill filter conditions\n for (var n = 0; n < indexes.length; n++) {\n var index = indexes[n];\n if (index.field in filter) {\n var _a = filter, _b = index.field, condition = _a[_b], rest = (0, tslib_1.__rest)(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n var conditionValues = null;\n if (condition != null && typeof condition === \"object\") {\n // Attempt to use index for 'in' and 'isNull' criteria.\n // We need to be very conservative here, indexed field should work the same way as getPatternPredicate. So\n // - it's better to leave corner cases to getPatternPredicate\n var _c = condition, inCriteria = _c.in, nullCriteria = _c.isNull, restCriteria = (0, tslib_1.__rest)(_c, [\"in\", \"isNull\"]);\n if (inCriteria && Array.isArray(inCriteria)) {\n conditionValues = inCriteria;\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Conditions in getPatternPredicate are composed with 'and' logic,\n // For now, let's not attempt to handle tricky cases like { in: [1,2] isNull: true }, or { in: [1, null] isNull: false }\n // - just leave this to getPatternPredicate.\n // Let's just handle the a most common case { isNull: true } - find all null and undefined\n if (nullCriteria === true && !conditionValues) {\n conditionValues = [null, undefined];\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Keep other conditions, e.g. { in: [1,2,3], isNull: true } - in works via index, isNull - via filter\n if (Object.keys(restCriteria).length > 0) {\n rest[index.field] = restCriteria;\n }\n }\n else {\n conditionValues = [condition];\n }\n if (conditionValues) {\n result = [];\n for (var i = 0; i < conditionValues.length; i++) {\n var idsSet = index.map.get(conditionValues[i]);\n if (idsSet) {\n var idsArray = idsSet.toArray();\n for (var j = 0; j < idsArray.length; j++) {\n var item = this.state.pk.get(idsArray[j]);\n result.push(item);\n }\n }\n }\n filter = Object.keys(rest).length > 0 ? rest : null;\n break;\n }\n }\n }\n }\n if (!result) {\n result = this.state.pk.toArray();\n }\n if (filter) {\n var predicate = (0, uui_core_1.getFilterPredicate)(q.filter);\n result = result.filter(predicate);\n }\n if (q.search) {\n var searchFilter_1 = (0, uui_core_1.getSearchFilter)(q.search);\n result = result.filter(function (item) { return searchFilter_1(_this.schema.searchBy.map(function (field) { return item[field]; })); });\n }\n if (q.sorting) {\n var comparer = (0, uui_core_1.getOrderComparer)(q.sorting);\n result = result.sort(comparer);\n }\n if (q.range) {\n result = result.slice(q.range.from, q.range.from + q.range.count);\n }\n return result;\n };\n return DbTable;\n}());\nexports.DbTable = DbTable;\n"},{"id":"./src/ListLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","name":"./src/ListLoadingTracker.ts","index":27,"index2":23,"size":3888,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./ListLoadingTracker","loc":"12:27-58"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListLoadingTracker = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ListLoadingTracker = /** @class */ (function () {\n function ListLoadingTracker(options) {\n this.options = options;\n this.cache = new Map();\n this.extractList = (options === null || options === void 0 ? void 0 : options.extractList) || (function (r) { return r; });\n }\n ListLoadingTracker.prototype.prepare = function (request) {\n var filter = request.filter, sorting = request.sorting, search = request.search, range = request.range, unknownFields = (0, tslib_1.__rest)(request, [\"filter\", \"sorting\", \"search\", \"range\"]);\n var options = {};\n if (filter) {\n options.filter = filter;\n }\n if (sorting) {\n options.sorting = sorting;\n }\n if (search) {\n options.search = search;\n }\n var keyObject = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields);\n var key = JSON.stringify(keyObject);\n var entry = this.cache.get(key);\n if (!entry) {\n entry = { options: options, count: 0, maxCount: null, isComplete: false };\n this.cache.set(key, entry);\n }\n return { options: options, range: range, unknownFields: unknownFields, entry: entry };\n };\n ListLoadingTracker.prototype.diff = function (request) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (entry.isComplete) {\n return null;\n }\n if (!request.range) {\n return request;\n }\n else {\n var requestedMax = request.range.from + request.range.count;\n var missingCount = requestedMax - entry.count;\n if (entry.maxCount) {\n missingCount = Math.min(missingCount, entry.maxCount);\n }\n if (missingCount > 0) {\n return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields), { range: { from: entry.count, count: requestedMax - entry.count } });\n }\n else {\n return null;\n }\n }\n };\n ListLoadingTracker.prototype.count = function (request) {\n var entry = this.prepare(request).entry;\n return { knownCount: Math.max(entry.count, entry.maxCount), exactCount: entry.maxCount };\n };\n ListLoadingTracker.prototype.append = function (request, response) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (response) {\n var list = this.extractList(response);\n if (list.count) {\n entry.maxCount = list.count;\n }\n if (!range) {\n entry.count = list.items.length;\n entry.maxCount = list.items.length;\n entry.isComplete = true;\n }\n else {\n var from = (list.from == null) ? range.from : list.from;\n if (list.items.length > 0) {\n entry.count = Math.max(entry.count, from + list.items.length);\n }\n if (list.items.length < range.count) {\n entry.maxCount = from + list.items.length;\n entry.count = entry.maxCount;\n entry.isComplete = true;\n }\n }\n }\n else {\n if (range) {\n entry.count = Math.max(entry.count, request.range.from + request.range.count);\n }\n else {\n entry.isComplete = true;\n }\n }\n };\n return ListLoadingTracker;\n}());\nexports.ListLoadingTracker = ListLoadingTracker;\n"},{"id":"./src/Loader.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Loader.ts","name":"./src/Loader.ts","index":25,"index2":21,"size":3262,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./Loader","loc":"9:15-34"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Loader = void 0;\nvar Loader = /** @class */ (function () {\n function Loader(dbRef, getTracker, options) {\n var _this = this;\n this.dbRef = dbRef;\n this.getTracker = getTracker;\n this.options = options;\n this.currentRequests = new Set();\n this.load = function (inputRequest) {\n var result = {\n isComplete: _this.loaded.diff(inputRequest) == null,\n isLoading: false,\n request: inputRequest,\n missing: _this.loadedAndLoading.diff(inputRequest),\n promise: null,\n reload: null,\n };\n result.reload = function () {\n result.missing = inputRequest;\n _this.loadImpl(result);\n };\n if (result.isComplete) {\n // Everything requested is already loaded\n result.isComplete = true;\n result.isLoading = false;\n result.promise = Promise.resolve();\n return result;\n }\n else {\n if (result.missing == null) {\n // Everything requested is either loaded already, or being loaded\n result.isComplete = false;\n result.isLoading = true;\n // There's no good way to tell which of current requests is querying requested data - there actually can be 2 of them.\n // So we track all running requests, and await all of them in such case.\n result.promise = Promise.all(_this.currentRequests.entries()).then(function () { });\n return result;\n }\n else {\n // Something requested is not loaded, nor being loaded. Need to perform a new request.\n _this.loadImpl(result);\n return result;\n }\n }\n };\n this.loaded = getTracker();\n this.loadedAndLoading = getTracker();\n }\n Loader.prototype.loadImpl = function (state) {\n var _this = this;\n this.loadedAndLoading.append(state.missing);\n state.isLoading = true;\n var serverRequest = state.missing;\n if (this.options.clientToServerRequest) {\n serverRequest = this.options.clientToServerRequest(serverRequest);\n }\n state.promise = this.options.api(serverRequest).then(function (result) {\n _this.loaded.append(state.missing, result);\n _this.loadedAndLoading.append(state.missing, result);\n state.missing = null;\n state.isLoading = false;\n state.isComplete = true;\n state.promise = Promise.resolve();\n var flatten = _this.options.convertToPatch(result);\n _this.options.postProcess && _this.options.postProcess(flatten);\n _this.dbRef.commitFetch(flatten);\n });\n this.currentRequests.add(state.promise);\n state.promise.finally(function () {\n _this.currentRequests.delete(state.promise);\n });\n return state.promise;\n };\n return Loader;\n}());\nexports.Loader = Loader;\n"},{"id":"./src/SimpleLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/SimpleLoadingTracker.ts","name":"./src/SimpleLoadingTracker.ts","index":26,"index2":22,"size":712,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./SimpleLoadingTracker","loc":"11:29-62"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleLoadingTracker = void 0;\nvar SimpleLoadingTracker = /** @class */ (function () {\n function SimpleLoadingTracker() {\n this.set = new Set();\n }\n SimpleLoadingTracker.prototype.getKey = function (request) {\n return JSON.stringify(request);\n };\n SimpleLoadingTracker.prototype.diff = function (request) {\n return this.set.has(this.getKey(request)) ? null : request;\n };\n SimpleLoadingTracker.prototype.append = function (request, result) {\n this.set.add(this.getKey(request));\n };\n return SimpleLoadingTracker;\n}());\nexports.SimpleLoadingTracker = SimpleLoadingTracker;\n"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts","index":3,"index2":27,"size":570,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"./src","loc":"4:26-42"}],"providedExports":null,"optimizationBailout":[],"depth":2,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./types\"), exports);\n(0, tslib_1.__exportStar)(require(\"./Db\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbTable\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbRef\"), exports);\n(0, tslib_1.__exportStar)(require(\"./tempIds\"), exports);\n(0, tslib_1.__exportStar)(require(\"./utils\"), exports);\n(0, tslib_1.__exportStar)(require(\"./patchHelpers\"), exports);\n(0, tslib_1.__exportStar)(require(\"./reactHooks\"), exports);\n"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts","index":15,"index2":18,"size":9041,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"5:21-46"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"10:26-51"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEntityParentDependencies = exports.getParentEntities = exports.hasServerFields = exports.isNew = exports.getId = exports.isClientOnly = exports.makeCumulativePatch = exports.isPatchBlank = exports.flattenResponse = exports.mergeEntityPatches = exports.unionPatches = void 0;\nvar tslib_1 = require(\"tslib\");\nvar types_1 = require(\"./types\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar utils_1 = require(\"./utils\");\nvar lodash_groupby_1 = (0, tslib_1.__importDefault)(require(\"lodash.groupby\"));\nvar lodash_map_1 = (0, tslib_1.__importDefault)(require(\"lodash.map\"));\nvar lodash_merge_1 = (0, tslib_1.__importDefault)(require(\"lodash.merge\"));\nvar lodash_countby_1 = (0, tslib_1.__importDefault)(require(\"lodash.countby\"));\nvar lodash_filter_1 = (0, tslib_1.__importDefault)(require(\"lodash.filter\"));\nvar lodash_foreach_1 = (0, tslib_1.__importDefault)(require(\"lodash.foreach\"));\nvar lodash_pick_1 = (0, tslib_1.__importDefault)(require(\"lodash.pick\"));\nfunction unionPatches(patches) {\n var result = {};\n patches.forEach(function (patch) {\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n result[tableName] = result[tableName] ? (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], result[tableName], true), patch[tableName], true) : patch[tableName];\n });\n });\n return result;\n}\nexports.unionPatches = unionPatches;\nfunction mergeEntityPatches(tables, patch) {\n var result = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var groupedEntities = (0, lodash_groupby_1.default)(patch[key], function (item) { return table.getId(item); });\n var tablePatch = (0, lodash_map_1.default)(groupedEntities, function (entities) {\n var result = lodash_merge_1.default.apply(void 0, (0, tslib_1.__spreadArray)([{}], entities, false));\n if (process.env.NODE_ENV !== 'production') {\n var props = (0, utils_1.objectKeys)(result).filter(function (prop) {\n return Object.keys((0, lodash_countby_1.default)(entities.filter(function (entity) {\n return entity[prop] !== undefined;\n }), function (entity) { return entity[prop]; })).length > 1;\n });\n if (props.length) {\n console.warn.apply(console, (0, tslib_1.__spreadArray)(['mergeEntityPatches: Different property values found for the same entity.\\nProperty names:\\n', props, '\\nEntities:\\n'], entities, false));\n }\n }\n return result;\n });\n result[key] = tablePatch;\n });\n return result;\n}\nexports.mergeEntityPatches = mergeEntityPatches;\nfunction flattenResponseHelper(result, object, tablesByTypeName) {\n if (Array.isArray(object)) {\n object.forEach(function (item) { return flattenResponseHelper(result, item, tablesByTypeName); });\n }\n else if (typeof object === 'object') {\n var clone = {};\n var tableKey = void 0;\n var fields = {};\n if ('__typename' in object) {\n var table = tablesByTypeName[object.__typename];\n if (table) {\n tableKey = table.schema.tableName;\n fields = table.schema.fields;\n }\n }\n for (var key in object) {\n var value = object[key];\n var field = fields[key];\n if ((field && !!field.disableFlatten)\n || typeof value !== 'object'\n || value === null\n || (Array.isArray(value) && value.every(function (item) { return typeof item !== 'object'; }))) {\n clone[key] = value;\n }\n else {\n flattenResponseHelper(result, value, tablesByTypeName);\n }\n }\n if (tableKey) {\n result[tableKey].push(clone);\n }\n }\n}\nfunction flattenResponse(response, tables) {\n var result = {};\n var tablesByTypeName = {};\n Object.values(tables).forEach(function (table) { return tablesByTypeName[table.schema.typeName] = table; });\n (0, utils_1.objectKeys)(tables).forEach(function (tableName) { return tablesByTypeName; });\n (0, utils_1.objectKeys)(tables).forEach(function (key) { return result[key] = []; });\n flattenResponseHelper(result, response, tablesByTypeName);\n return result;\n}\nexports.flattenResponse = flattenResponse;\nfunction isPatchBlank(patch) {\n return !(0, utils_1.objectKeys)(patch).some(function (key) { return patch[key].length > 0; });\n}\nexports.isPatchBlank = isPatchBlank;\n/**\n * Given several patches, creates a new single patch with all fields from all entities in all patches.\n */\nfunction makeCumulativePatch(updatedDb, patches, clientIdsMap) {\n var result = {};\n (0, utils_1.objectKeys)(updatedDb.tables).forEach(function (entityName) {\n var table = updatedDb.tables[entityName];\n var schema = table.schema;\n var ids = I.Set();\n patches.forEach(function (patch) {\n var filteredPatch = (patch[entityName] || []).filter(function (entity) { return hasServerFields(entity, schema, clientIdsMap, updatedDb.tables); });\n ids = ids.union(filteredPatch.map(function (e) { return table.getId(e); }));\n });\n var entities = ids\n .map(function (id) { return table.byId(id); })\n .filter(function (e) { return !isClientOnly(e, schema); })\n .toArray();\n if (entities.length > 0) {\n result[entityName] = entities;\n }\n });\n return result;\n}\nexports.makeCumulativePatch = makeCumulativePatch;\nfunction isClientOnly(entity, schema) {\n if (typeof schema.isClientOnly === 'function') {\n return schema.isClientOnly(entity);\n }\n return !!schema.isClientOnly;\n}\nexports.isClientOnly = isClientOnly;\nfunction getId(entity, schema) {\n if (typeof schema.primaryKey == 'string') {\n return entity[schema.primaryKey];\n }\n var result = [];\n (0, lodash_foreach_1.default)((0, lodash_pick_1.default)(entity, schema.primaryKey), function (value) {\n result.push(value);\n });\n return result;\n}\nexports.getId = getId;\nfunction isNew(entity, schema, clientIdsMap) {\n var id = getId(entity, schema);\n return !clientIdsMap.clientToServer(id);\n}\nexports.isNew = isNew;\nfunction hasServerFields(entity, schema, clientIdsMap, tables) {\n var fullEntity = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, tables[schema.tableName].byId(entity.id) || {}), entity);\n if (isClientOnly(fullEntity, schema)) {\n return false;\n }\n return (0, utils_1.objectKeys)(entity).some(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n return !fieldSchema || !(fieldSchema.isClientOnly || fieldSchema.isReadOnly || (fieldSchema.isGenerated && !isNew(entity, schema, clientIdsMap)));\n });\n}\nexports.hasServerFields = hasServerFields;\nfunction getParentEntities(patch, tables) {\n var dependenciesPatch = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var tableSchema = table.schema;\n var fields = (0, lodash_filter_1.default)((0, lodash_map_1.default)(tableSchema.fields, function (field, name) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, field), { name: name })); }), function (field) { return field.fk && field.fk.relationType == types_1.DbRelationType.Aggregation; });\n var tablePatch = patch[key];\n fields.forEach(function (field) {\n var tableName = field.fk.tableName, name = field.name;\n tablePatch.forEach(function (entity) {\n var actualTableName = (typeof tableName == 'function' ? tableName(entity) : tableName);\n var dbEntity = table.byId(table.getId(entity));\n var parentEntity = tables[actualTableName].byId(dbEntity[name]);\n var idFields = (0, lodash_pick_1.default)(parentEntity, tables[actualTableName].schema.primaryKey);\n if (parentEntity) {\n dependenciesPatch[actualTableName] = dependenciesPatch[actualTableName] || [];\n dependenciesPatch[actualTableName].push(idFields);\n }\n });\n });\n });\n return dependenciesPatch;\n}\nexports.getParentEntities = getParentEntities;\nfunction getEntityParentDependencies(entity, entityName, tables) {\n var _a;\n var patch = (_a = {}, _a[entityName] = [entity], _a);\n var resultPatches = [];\n while (true) {\n var parents = getParentEntities(patch, tables);\n if (isPatchBlank(parents)) {\n break;\n }\n resultPatches.push(parents);\n patch = parents;\n }\n var result = unionPatches((0, tslib_1.__spreadArray)([patch], resultPatches, true));\n result = mergeEntityPatches(tables, result);\n return result;\n}\nexports.getEntityParentDependencies = getEntityParentDependencies;\n"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts","index":28,"index2":26,"size":892,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./reactHooks","loc":"11:26-49"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useDbView = exports.useDbRef = exports.DbContext = void 0;\nvar tslib_1 = require(\"tslib\");\nvar react_1 = require(\"react\");\nexports.DbContext = (0, react_1.createContext)(null);\nfunction useDbRef() {\n return (0, react_1.useContext)(exports.DbContext);\n}\nexports.useDbRef = useDbRef;\nfunction useDbView(fn, params, options) {\n var dbRef = useDbRef();\n var _a = (0, react_1.useState)(), state = _a[0], setState = _a[1];\n var subscription = (0, react_1.useMemo)(function () { return dbRef.subscribe((0, tslib_1.__assign)({ compute: fn }, options), params, setState); }, []);\n subscription.update(params);\n (0, react_1.useEffect)(function () {\n return function () { return subscription.unsubscribe(); };\n }, []);\n return subscription.currentValue;\n}\nexports.useDbView = useDbView;\n"},{"id":"./src/tempIds.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","name":"./src/tempIds.tsx","index":23,"index2":19,"size":8418,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./tempIds","loc":"6:16-36"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./tempIds","loc":"8:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TempIdMap = exports.isTempId = exports.getTempId = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lastTempId = -1;\nfunction getTempId() {\n return --lastTempId;\n}\nexports.getTempId = getTempId;\nfunction isTempId(val) {\n return typeof val === 'number' && val < 0;\n}\nexports.isTempId = isTempId;\nvar TempIdMap = /** @class */ (function () {\n function TempIdMap(db) {\n var _this = this;\n this.db = db;\n this.serverToClientIds = new Map();\n this.clientToServerIds = new Map();\n this.clientToServer = function (id) { return _this.clientToServerIds.get(id); };\n this.serverToClient = function (tableName, id) { return _this.getServerToClientMap(tableName).get(id); };\n this.clientToServerRequest = function (request) {\n request = (0, tslib_1.__assign)({}, request);\n if (request.filter) {\n request.filter = _this.clientToServerDataFilter(request.filter);\n }\n return request;\n };\n this.clientToServerDataFilter = function (filter) {\n filter = (0, tslib_1.__assign)({}, filter);\n var keys = Object.keys(filter);\n // I hope that we can rely that there won't be any negative numbers, which are not IDs, in queries.\n // We need to invent better heuristics or a schema otherwise.\n var clientToServer = function (id) {\n var found = _this.clientToServer(id);\n if (found) {\n return found;\n }\n else {\n return id;\n }\n };\n for (var n = 0; n < keys.length; n++) {\n var key = keys[n];\n var condition = filter[key];\n if (condition != null && typeof condition === \"object\") {\n condition = (0, tslib_1.__assign)({}, condition);\n if ('in' in condition && Array.isArray(condition.in) && condition.in.length) {\n condition.in = condition.in.map(clientToServer);\n }\n }\n else {\n condition = clientToServer(condition);\n }\n filter[key] = condition;\n }\n return filter;\n };\n }\n TempIdMap.prototype.copyPatch = function (patch) {\n var newPatch = (0, tslib_1.__assign)({}, patch);\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var tablePatch = patch[tableName].map(function (entityPatch) { return ((0, tslib_1.__assign)({}, entityPatch)); });\n newPatch[tableName] = tablePatch;\n });\n return newPatch;\n };\n // Iterate thru every field in every patch for every table, matching certain field criteria. The patch is mutated!\n TempIdMap.prototype.mapFields = function (patch, filter, callback) {\n var _this = this;\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var schema = _this.db.tables[tableName].schema;\n var fields = (0, utils_1.objectKeys)(schema.fields || [])\n .map(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n if (filter(fieldSchema, fieldName)) {\n return { name: fieldName, schema: fieldSchema };\n }\n })\n .filter(function (f) { return !!f; });\n if (!fields.length) {\n return;\n }\n patch[tableName].forEach(function (entityPatch) {\n for (var n = 0; n < fields.length; n++) {\n var field = fields[n];\n var fieldValue = entityPatch[field.name];\n callback(field.name, field.schema, fieldValue, entityPatch, tableName);\n }\n });\n });\n };\n TempIdMap.prototype.getServerToClientMap = function (tableName) {\n var existing = this.serverToClientIds.get(tableName);\n if (existing) {\n return existing;\n }\n else {\n var newMap = new Map();\n this.serverToClientIds.set(tableName, newMap);\n return newMap;\n }\n };\n TempIdMap.prototype.serverToClientPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n // We map PK in a separate pass, as we need to remap all PKs before re-mapping FKs\n this.mapFields(patch, function (f) { return f.isGenerated; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var clientId = _this.getServerToClientMap(tableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(tableName).set(fieldValue, clientId);\n }\n entityPatch[fieldName] = clientId;\n });\n this.mapFields(patch, function (f) { return !!(f.fk || (f.default != null) || f.toClient); }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var isUndefined = typeof (fieldValue) === 'undefined';\n if (fieldSchema.default != null && fieldValue == null) {\n fieldValue = fieldSchema.default;\n isUndefined = false;\n }\n if (fieldSchema.fk && fieldValue != null) {\n var fkTableName = typeof fieldSchema.fk.tableName === 'function' ? fieldSchema.fk.tableName(entityPatch) : fieldSchema.fk.tableName;\n var clientId = _this.getServerToClientMap(fkTableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(fkTableName).set(fieldValue, clientId);\n }\n fieldValue = clientId;\n }\n if (!isUndefined && fieldSchema.toClient) {\n fieldValue = fieldSchema.toClient(fieldValue);\n }\n if (!isUndefined) {\n entityPatch[fieldName] = fieldValue;\n }\n });\n return patch;\n };\n TempIdMap.prototype.clientToServerPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n this.mapFields(patch, function (f) { return f.isGenerated || !!f.fk; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n if (fieldValue != null) {\n var existingId = _this.clientToServerIds.get(fieldValue);\n if (existingId) {\n entityPatch[fieldName] = existingId;\n }\n }\n });\n this.mapFields(patch, function (f) { return !(f.isClientOnly || f.isReadOnly) && !!f.toServer; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n entityPatch[fieldName] = fieldSchema.toServer(entityPatch[fieldName]);\n });\n this.mapFields(patch, function (meta) { return meta.isClientOnly || meta.isReadOnly; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n delete entityPatch[fieldName];\n });\n return patch;\n };\n TempIdMap.prototype.appendServerMapping = function (response) {\n var _this = this;\n (0, utils_1.objectKeys)(response.submit).forEach(function (tableName) {\n if (_this.db.tables[tableName]) {\n var tablePatch = response.submit[tableName];\n if (tablePatch) {\n var serverToClientIds_1 = _this.getServerToClientMap(tableName);\n var table_1 = _this.db.tables[tableName];\n tablePatch.forEach(function (patch) {\n if (isTempId(patch.id)) {\n var clientId = patch.id;\n var serverId = table_1.getId(patch.payload);\n serverToClientIds_1.set(serverId, clientId);\n _this.clientToServerIds.set(clientId, serverId);\n }\n });\n }\n }\n });\n };\n return TempIdMap;\n}());\nexports.TempIdMap = TempIdMap;\n"},{"id":"./src/types.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/types.ts","name":"./src/types.ts","index":4,"index2":1,"size":379,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./types","loc":"4:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./types","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRelationType = void 0;\nvar DbRelationType;\n(function (DbRelationType) {\n DbRelationType[DbRelationType[\"Aggregation\"] = 0] = \"Aggregation\";\n DbRelationType[DbRelationType[\"Association\"] = 1] = \"Association\";\n})(DbRelationType = exports.DbRelationType || (exports.DbRelationType = {}));\n"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts","index":6,"index2":6,"size":1823,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"./utils","loc":"5:14-32"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./utils","loc":"9:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"./utils","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.difference = exports.defaultCompareViewDependencies = exports.objectKeys = void 0;\nvar tslib_1 = require(\"tslib\");\nvar shallowequal_1 = (0, tslib_1.__importDefault)(require(\"shallowequal\"));\nvar lodash_zip_1 = (0, tslib_1.__importDefault)(require(\"lodash.zip\"));\nvar lodash_transform_1 = (0, tslib_1.__importDefault)(require(\"lodash.transform\"));\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\n// TBD: New typescript would contain better typing for this. Remove this hack after update.\nexports.objectKeys = Object.keys;\nfunction defaultCompareViewDependencies(prev, next) {\n if (Array.isArray(prev) && Array.isArray(next)) {\n if (prev.length === next.length) {\n return (0, lodash_zip_1.default)(prev, next).every(function (_a) {\n var p = _a[0], n = _a[1];\n return (0, shallowequal_1.default)(p, n);\n });\n }\n return false;\n }\n return (0, shallowequal_1.default)(prev, next);\n}\nexports.defaultCompareViewDependencies = defaultCompareViewDependencies;\n/**\n * Deep diff between two object, using lodash\n * @param {Object} object Object compared\n * @param {Object} base Object to compare with\n * @return {Object} Return a new object who represent the diff\n */\nfunction difference(object, base) {\n function changes(object, base) {\n return (0, lodash_transform_1.default)(object, function (result, value, key) {\n if (!(0, lodash_isequal_1.default)(value, base[key])) {\n result[key] = (typeof value === \"object\" && typeof base[key] === \"object\") ? changes(value, base[key]) : value;\n }\n });\n }\n return changes(object, base);\n}\nexports.difference = difference;\n"},{"id":"@epam/uui-core","identifier":"external \"@epam/uui-core\"","name":"external \"@epam/uui-core\"","index":13,"index2":9,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"10:17-42"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"6:17-42"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"immutable","identifier":"external \"immutable\"","name":"external \"immutable\"","index":12,"index2":8,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"5:34-54"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"7:18-38"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"immutable","loc":"6:34-54"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.countby","identifier":"external \"lodash.countby\"","name":"external \"lodash.countby\"","index":19,"index2":14,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.countby","loc":"11:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.filter","identifier":"external \"lodash.filter\"","name":"external \"lodash.filter\"","index":20,"index2":15,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.filter","loc":"12:51-75"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.foreach","identifier":"external \"lodash.foreach\"","name":"external \"lodash.foreach\"","index":21,"index2":16,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.foreach","loc":"13:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.groupby","identifier":"external \"lodash.groupby\"","name":"external \"lodash.groupby\"","index":16,"index2":11,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.groupby","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isempty","identifier":"external \"lodash.isempty\"","name":"external \"lodash.isempty\"","index":24,"index2":20,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"lodash.isempty","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isequal","identifier":"external \"lodash.isequal\"","name":"external \"lodash.isequal\"","index":10,"index2":5,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","issuerId":"./src/Db.ts","issuerName":"./src/Db.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"6:52-77"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.map","identifier":"external \"lodash.map\"","name":"external \"lodash.map\"","index":17,"index2":12,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.map","loc":"9:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.merge","identifier":"external \"lodash.merge\"","name":"external \"lodash.merge\"","index":18,"index2":13,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.merge","loc":"10:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.pick","identifier":"external \"lodash.pick\"","name":"external \"lodash.pick\"","index":22,"index2":17,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.pick","loc":"14:49-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.transform","identifier":"external \"lodash.transform\"","name":"external \"lodash.transform\"","index":9,"index2":4,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.transform","loc":"7:54-81"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.zip","identifier":"external \"lodash.zip\"","name":"external \"lodash.zip\"","index":8,"index2":3,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.zip","loc":"6:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"react","identifier":"external \"react\"","name":"external \"react\"","index":29,"index2":25,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","issuerId":"./src/reactHooks.ts","issuerName":"./src/reactHooks.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"react","loc":"5:14-30"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"shallowequal","identifier":"external \"shallowequal\"","name":"external \"shallowequal\"","index":7,"index2":2,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"shallowequal","loc":"5:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4}],"filteredModules":0,"origins":[{"module":"","moduleIdentifier":"","moduleName":"","loc":"main","request":null,"reasons":[]}]}],"modules":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx","index":0,"index2":29,"size":28,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"multi entry"}],"providedExports":null,"optimizationBailout":[],"depth":0},{"id":"../node_modules/tslib/tslib.es6.js","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/tslib/tslib.es6.js","name":"../node_modules/tslib/tslib.es6.js","index":2,"index2":0,"size":12280,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/ListLoadingTracker.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","module":"./src/ListLoadingTracker.ts","moduleName":"./src/ListLoadingTracker.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"}],"providedExports":["__extends","__assign","__rest","__decorate","__param","__metadata","__awaiter","__generator","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn"],"optimizationBailout":[],"depth":2,"source":"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx","index":1,"index2":28,"size":163,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":0,"issuerName":"multi ./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":0,"moduleIdentifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"multi ./index.tsx","moduleName":"multi ./index.tsx","type":"single entry","userRequest":"/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","loc":"main[0]"}],"providedExports":null,"optimizationBailout":[],"depth":1,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./src\"), exports);\n"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts","index":5,"index2":7,"size":2875,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./Db","loc":"5:26-41"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Db = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\nvar Db = /** @class */ (function () {\n function Db(tables, reusedCache) {\n this.tables = tables;\n this.viewCache = new Map();\n /* Views (cached db projections) */\n this.valueAbsent = Symbol(\"ValueAbsent\");\n if (reusedCache) {\n this.viewCache = new Map(reusedCache);\n }\n else {\n this.viewCache = new Map();\n }\n }\n Db.prototype.update = function (mutate) {\n var clone = new this.constructor(this.tables, this.viewCache);\n clone.tables = (0, tslib_1.__assign)({}, this.tables);\n mutate(clone);\n return clone;\n };\n Db.prototype.with = function (patch) {\n return this.update(function (db) {\n (0, utils_1.objectKeys)(db.tables).forEach(function (entityName) {\n if (patch[entityName]) {\n db.tables[entityName] = db.tables[entityName].with(patch[entityName]);\n }\n });\n });\n };\n Db.prototype.runView = function (view, params) {\n var cache = this.viewCache.get(view);\n if (!cache) {\n cache = new Map();\n this.viewCache.set(view, cache);\n }\n var key = view.getKey ? view.getKey(params) : JSON.stringify(params);\n var cacheItem = cache.get(key);\n if (!cacheItem) {\n cacheItem = {\n dependencies: this.valueAbsent,\n currentValue: this.valueAbsent,\n computedOnDb: this.valueAbsent,\n };\n cache.set(key, cacheItem);\n }\n var shouldUpdate = this !== cacheItem.computedOnDb;\n var dependencies = this.valueAbsent;\n if (view.getDependencies) {\n var compare = view.compareDependencies || utils_1.defaultCompareViewDependencies;\n dependencies = view.getDependencies(this, params);\n shouldUpdate = !compare(cacheItem.dependencies, dependencies);\n }\n var previousValue = cacheItem.currentValue;\n if (shouldUpdate) {\n cacheItem.dependencies = dependencies;\n var newValue = view.compute(this, params, dependencies);\n cacheItem.computedOnDb = this;\n var compareResults = view.compareResults || lodash_isequal_1.default;\n if (!compareResults(previousValue, newValue)) {\n if (view.traceDiff) {\n console.debug((0, utils_1.difference)(previousValue, newValue));\n }\n cacheItem.currentValue = newValue;\n }\n }\n return cacheItem.currentValue;\n };\n return Db;\n}());\nexports.Db = Db;\n"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts","index":14,"index2":24,"size":9346,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbRef","loc":"7:26-44"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRef = void 0;\nvar tslib_1 = require(\"tslib\");\nvar patchHelpers_1 = require(\"./patchHelpers\");\nvar tempIds_1 = require(\"./tempIds\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isempty_1 = (0, tslib_1.__importDefault)(require(\"lodash.isempty\"));\nvar Loader_1 = require(\"./Loader\");\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar SimpleLoadingTracker_1 = require(\"./SimpleLoadingTracker\");\nvar ListLoadingTracker_1 = require(\"./ListLoadingTracker\");\nvar DbRef = /** @class */ (function () {\n function DbRef(blank) {\n var _this = this;\n this.blank = blank;\n this.log = [];\n this.autoSave = true;\n this.savedPoint = 0;\n this.throttleSaveMs = 1000;\n /* Update subscriptions (aka live views) */\n this.lastSubscriptionId = 1;\n this.subscriptions = new Map();\n this.updateHandlers = [];\n /* Error Subscriptions */\n this.saveErrorHandlers = [];\n /* Save scheduling */\n this.enqueueSave = (0, uui_core_1.batch)(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {\n var cumulativePatch, lastLogEntry, response, error_1;\n return (0, tslib_1.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n cumulativePatch = this.makeCumulativePatch();\n lastLogEntry = this.log.length;\n if ((0, lodash_isempty_1.default)(cumulativePatch)) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.savePatch(cumulativePatch)];\n case 2:\n response = _a.sent();\n this.applyResponse(response, lastLogEntry);\n this.update();\n return [3 /*break*/, 4];\n case 3:\n error_1 = _a.sent();\n this.saveError(cumulativePatch, error_1);\n this.update();\n throw error_1;\n case 4: return [2 /*return*/];\n }\n });\n }); });\n this.handleBeforeUnload = function (e) {\n if (_this.enqueueSave.isBusy) {\n e.returnValue = false;\n return false;\n }\n };\n this.loaders = [];\n this.db = blank;\n this.base = blank;\n this.tempIdMap = new tempIds_1.TempIdMap(blank);\n this.idMap = this.tempIdMap;\n window.addEventListener('beforeunload', this.handleBeforeUnload);\n }\n /** Saves all committed patches. Useful only if autoSave is off. */\n DbRef.prototype.save = function () {\n return this.enqueueSave();\n };\n DbRef.prototype.getAutoSave = function () {\n return this.autoSave;\n };\n DbRef.prototype.setAutoSave = function (val) {\n if (this.autoSave != val) {\n this.autoSave = val;\n this.autoSave && this.enqueueSave();\n this.update();\n }\n };\n DbRef.prototype.revert = function () {\n this.db = this.base;\n this.log = this.log.slice(0, this.savedPoint);\n this.update();\n };\n /** Concrete DbRef instances should override and implement their save logic in this method */\n DbRef.prototype.savePatch = function (patch) {\n return Promise.resolve({ submit: {} });\n };\n /* Db Update logic */\n DbRef.prototype.commit = function (patch) {\n var dbBeforeUpdate = this.db.with(patch);\n patch = this.beforeUpdate(patch, dbBeforeUpdate.tables, this.db.tables);\n patch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, patch);\n this.log.push({ patch: patch });\n this.db = this.db.with(patch);\n this.autoSave && this.enqueueSave(null, { throttleMs: this.throttleSaveMs });\n this.update();\n };\n DbRef.prototype.beforeUpdate = function (patch, tables, prevTables) {\n var _this = this;\n var patchAndDependencies = {};\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && !tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n patchAndDependencies[entityName] = patch[entityName];\n });\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n var _a;\n var schema = tables[entityName].schema;\n var beforeUpdate = schema.beforeUpdate;\n var context = {\n clientIdsMap: _this.tempIdMap,\n schema: schema,\n tables: tables,\n prevTables: prevTables,\n };\n var results = patch[entityName].map(function (e) { return beforeUpdate(e, context); });\n var updatedPatch = (_a = {}, _a[entityName] = results.map(function (result) { return result.entity; }), _a);\n var dependentEntityPatchesForUpdate = (0, patchHelpers_1.unionPatches)(results.filter(function (result) { return result.dependentEntities; }).map(function (result) { return result.dependentEntities; }));\n var dependentEntityPatches = _this.beforeUpdate(dependentEntityPatchesForUpdate, tables, prevTables);\n patchAndDependencies = (0, patchHelpers_1.mergeEntityPatches)(tables, (0, patchHelpers_1.unionPatches)([patchAndDependencies, updatedPatch, dependentEntityPatches]));\n });\n return patchAndDependencies;\n };\n DbRef.prototype.commitFetch = function (patch) {\n patch = this.tempIdMap.serverToClientPatch(patch);\n this.rebase(this.base.with(patch));\n this.update();\n };\n DbRef.prototype.rebase = function (newBase) {\n this.base = newBase;\n this.db = newBase;\n for (var n = this.savedPoint; n < this.log.length; n++) {\n this.db = this.db.with(this.log[n].patch);\n }\n };\n DbRef.prototype.makeCumulativePatch = function () {\n var lastLogEntry = this.log.length;\n var logEntriesToSave = this.log.slice(this.savedPoint, lastLogEntry);\n var cumulativePatch = (0, patchHelpers_1.makeCumulativePatch)(this.db, logEntriesToSave.map(function (t) { return t.patch; }), this.tempIdMap);\n cumulativePatch = this.tempIdMap.clientToServerPatch(cumulativePatch);\n return cumulativePatch;\n };\n DbRef.prototype.applyResponse = function (response, newSavedPoint) {\n this.tempIdMap.appendServerMapping(response);\n var serverPatch = (0, patchHelpers_1.flattenResponse)(response.submit, this.db.tables);\n serverPatch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, serverPatch);\n this.savedPoint = newSavedPoint;\n this.base = this.db;\n this.commitFetch(serverPatch);\n };\n DbRef.prototype.subscribe = function (view, params, onUpdate) {\n var _this = this;\n var id = this.lastSubscriptionId++;\n var subscription = {\n update: function (params) {\n subscription.currentParams = params;\n subscription.currentValue = _this.db.runView(view, params);\n return subscription.currentValue;\n },\n currentParams: null,\n currentValue: null,\n onUpdate: onUpdate,\n unsubscribe: function () { _this.subscriptions.delete(id); },\n };\n subscription.update(params);\n this.subscriptions.set(id, subscription);\n return subscription;\n };\n DbRef.prototype.onUpdate = function (handler) {\n this.subscribe({\n compute: function (db) { return db; },\n compareResults: function (a, b) { return a === b; },\n }, null, handler);\n };\n DbRef.prototype.update = function () {\n this.subscriptions.forEach(function (subscription) {\n var previousValue = subscription.currentValue;\n subscription.update(subscription.currentParams);\n if (subscription.currentValue !== previousValue && subscription.onUpdate) {\n subscription.onUpdate(subscription.currentValue);\n }\n });\n };\n DbRef.prototype.onSaveError = function (handler) {\n this.saveErrorHandlers.push(handler);\n };\n DbRef.prototype.saveError = function (request, error) {\n this.saveErrorHandlers.forEach(function (handler) { return handler(request, error); });\n };\n DbRef.prototype.makeLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new SimpleLoadingTracker_1.SimpleLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.makeListLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new ListLoadingTracker_1.ListLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.reload = function () {\n this.loaders = [];\n };\n return DbRef;\n}());\nexports.DbRef = DbRef;\n"},{"id":"./src/DbTable.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","name":"./src/DbTable.ts","index":11,"index2":10,"size":10036,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbTable","loc":"6:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbTable = void 0;\nvar tslib_1 = require(\"tslib\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar immutable_1 = require(\"immutable\");\nvar DbTable = /** @class */ (function () {\n function DbTable(schema, state, q) {\n this.schema = schema;\n this.state = state;\n this.q = q;\n if (!state) {\n var indexes = (schema.indexes || []).map(function (indexDef) {\n return {\n field: indexDef,\n map: I.Map(),\n };\n });\n this.state = { pk: I.Map(), indexes: indexes };\n }\n if (!q) {\n this.q = {};\n }\n }\n DbTable.prototype.keyToImmutable = function (id) {\n if (Array.isArray(id)) {\n return I.List(id);\n }\n else {\n return id;\n }\n };\n DbTable.prototype.byId = function (id) {\n return this.state.pk.get(this.keyToImmutable(id));\n };\n DbTable.prototype.getId = function (entity) {\n if (Array.isArray(this.schema.primaryKey)) {\n return this.schema.primaryKey.map(function (key) { return entity[key]; });\n }\n return entity[this.schema.primaryKey];\n };\n DbTable.prototype.update = function (mutate) {\n var clone = new this.constructor(this.schema, this.state, this.q);\n mutate(clone);\n return clone;\n };\n /* Mutation */\n DbTable.prototype.with = function (patch) {\n var _this = this;\n var updates = patch.map(function (entityPatch) {\n var id = _this.getId(entityPatch);\n var immId = _this.keyToImmutable(id);\n var existing = _this.state.pk.get(immId);\n var isDeleted = false;\n var updated = entityPatch;\n if (existing) {\n updated = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, existing), entityPatch);\n if (_this.schema.deleteFlag) {\n isDeleted = updated[_this.schema.deleteFlag] === true;\n }\n }\n return { id: id, immId: immId, patch: entityPatch, existing: existing, updated: updated, isNew: !existing, isDeleted: isDeleted };\n });\n var idVal = immutable_1.Seq.Keyed(updates.map(function (entity) { return [entity.immId, entity.updated]; }));\n var newPk = this.state.pk.merge(idVal);\n // TBD: replace with deleteAll after migrating to immutable 4\n updates.filter(function (u) { return u.isDeleted; }).forEach(function (u) {\n newPk = newPk.delete(u.immId);\n });\n var newIndexes = this.state.indexes.map(function (index) {\n var newMap = index.map;\n var _loop_1 = function (n) {\n var update = updates[n];\n var newKey = update.updated[index.field];\n if (update.existing) {\n var oldKey = update.existing[index.field];\n if (oldKey !== newKey || update.isDeleted) {\n newMap = newMap.update(oldKey, function (set) { return set.remove(update.immId); });\n }\n }\n if (!update.isDeleted) {\n newMap = newMap.update(newKey, I.Set(), function (set) { return set.add(update.immId); });\n }\n };\n for (var n = 0; n < updates.length; n++) {\n _loop_1(n);\n }\n return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, index), { map: newMap });\n });\n var newState = { pk: newPk, indexes: newIndexes };\n return this.update(function (t) { return t.state = newState; });\n };\n /* Query */\n DbTable.prototype.find = function (filter) {\n var _this = this;\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { filter: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, _this.q.filter), filter) }); });\n };\n DbTable.prototype.order = function (order) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: order }); });\n };\n DbTable.prototype.orderBy = function (field, direction) {\n if (direction === void 0) { direction = 'asc'; }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: [{ field: field, direction: direction }] }); });\n };\n DbTable.prototype.thenBy = function (field, direction) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], t.q.sorting, true), [{ field: field, direction: direction }], false) }); });\n };\n DbTable.prototype.search = function (text) {\n if (!this.schema.searchBy) {\n throw new Error(\"Can't search in the \".concat(this.schema.typeName, \" table - searchBy is not defined in the schema.\"));\n }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { search: text }); });\n };\n /* Materializing */\n DbTable.prototype.range = function (from, count) {\n return this.runQuery((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.q), { range: { from: from, count: count } }));\n };\n DbTable.prototype.count = function () {\n return this.runQuery(this.q).length;\n };\n DbTable.prototype.one = function () {\n return this.runQuery(this.q)[0] || null;\n };\n DbTable.prototype.toArray = function () {\n return this.runQuery(this.q);\n };\n DbTable.prototype.map = function (fn) {\n return this.toArray().map(fn);\n };\n /* Query implementation */\n DbTable.prototype.runQuery = function (q) {\n var _this = this;\n var result = null;\n var filter = q.filter;\n if (filter) {\n var indexes = this.state.indexes;\n // Try to use indexes to fulfill filter conditions\n for (var n = 0; n < indexes.length; n++) {\n var index = indexes[n];\n if (index.field in filter) {\n var _a = filter, _b = index.field, condition = _a[_b], rest = (0, tslib_1.__rest)(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n var conditionValues = null;\n if (condition != null && typeof condition === \"object\") {\n // Attempt to use index for 'in' and 'isNull' criteria.\n // We need to be very conservative here, indexed field should work the same way as getPatternPredicate. So\n // - it's better to leave corner cases to getPatternPredicate\n var _c = condition, inCriteria = _c.in, nullCriteria = _c.isNull, restCriteria = (0, tslib_1.__rest)(_c, [\"in\", \"isNull\"]);\n if (inCriteria && Array.isArray(inCriteria)) {\n conditionValues = inCriteria;\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Conditions in getPatternPredicate are composed with 'and' logic,\n // For now, let's not attempt to handle tricky cases like { in: [1,2] isNull: true }, or { in: [1, null] isNull: false }\n // - just leave this to getPatternPredicate.\n // Let's just handle the a most common case { isNull: true } - find all null and undefined\n if (nullCriteria === true && !conditionValues) {\n conditionValues = [null, undefined];\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Keep other conditions, e.g. { in: [1,2,3], isNull: true } - in works via index, isNull - via filter\n if (Object.keys(restCriteria).length > 0) {\n rest[index.field] = restCriteria;\n }\n }\n else {\n conditionValues = [condition];\n }\n if (conditionValues) {\n result = [];\n for (var i = 0; i < conditionValues.length; i++) {\n var idsSet = index.map.get(conditionValues[i]);\n if (idsSet) {\n var idsArray = idsSet.toArray();\n for (var j = 0; j < idsArray.length; j++) {\n var item = this.state.pk.get(idsArray[j]);\n result.push(item);\n }\n }\n }\n filter = Object.keys(rest).length > 0 ? rest : null;\n break;\n }\n }\n }\n }\n if (!result) {\n result = this.state.pk.toArray();\n }\n if (filter) {\n var predicate = (0, uui_core_1.getFilterPredicate)(q.filter);\n result = result.filter(predicate);\n }\n if (q.search) {\n var searchFilter_1 = (0, uui_core_1.getSearchFilter)(q.search);\n result = result.filter(function (item) { return searchFilter_1(_this.schema.searchBy.map(function (field) { return item[field]; })); });\n }\n if (q.sorting) {\n var comparer = (0, uui_core_1.getOrderComparer)(q.sorting);\n result = result.sort(comparer);\n }\n if (q.range) {\n result = result.slice(q.range.from, q.range.from + q.range.count);\n }\n return result;\n };\n return DbTable;\n}());\nexports.DbTable = DbTable;\n"},{"id":"./src/ListLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","name":"./src/ListLoadingTracker.ts","index":27,"index2":23,"size":3888,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./ListLoadingTracker","loc":"12:27-58"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListLoadingTracker = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ListLoadingTracker = /** @class */ (function () {\n function ListLoadingTracker(options) {\n this.options = options;\n this.cache = new Map();\n this.extractList = (options === null || options === void 0 ? void 0 : options.extractList) || (function (r) { return r; });\n }\n ListLoadingTracker.prototype.prepare = function (request) {\n var filter = request.filter, sorting = request.sorting, search = request.search, range = request.range, unknownFields = (0, tslib_1.__rest)(request, [\"filter\", \"sorting\", \"search\", \"range\"]);\n var options = {};\n if (filter) {\n options.filter = filter;\n }\n if (sorting) {\n options.sorting = sorting;\n }\n if (search) {\n options.search = search;\n }\n var keyObject = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields);\n var key = JSON.stringify(keyObject);\n var entry = this.cache.get(key);\n if (!entry) {\n entry = { options: options, count: 0, maxCount: null, isComplete: false };\n this.cache.set(key, entry);\n }\n return { options: options, range: range, unknownFields: unknownFields, entry: entry };\n };\n ListLoadingTracker.prototype.diff = function (request) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (entry.isComplete) {\n return null;\n }\n if (!request.range) {\n return request;\n }\n else {\n var requestedMax = request.range.from + request.range.count;\n var missingCount = requestedMax - entry.count;\n if (entry.maxCount) {\n missingCount = Math.min(missingCount, entry.maxCount);\n }\n if (missingCount > 0) {\n return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields), { range: { from: entry.count, count: requestedMax - entry.count } });\n }\n else {\n return null;\n }\n }\n };\n ListLoadingTracker.prototype.count = function (request) {\n var entry = this.prepare(request).entry;\n return { knownCount: Math.max(entry.count, entry.maxCount), exactCount: entry.maxCount };\n };\n ListLoadingTracker.prototype.append = function (request, response) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (response) {\n var list = this.extractList(response);\n if (list.count) {\n entry.maxCount = list.count;\n }\n if (!range) {\n entry.count = list.items.length;\n entry.maxCount = list.items.length;\n entry.isComplete = true;\n }\n else {\n var from = (list.from == null) ? range.from : list.from;\n if (list.items.length > 0) {\n entry.count = Math.max(entry.count, from + list.items.length);\n }\n if (list.items.length < range.count) {\n entry.maxCount = from + list.items.length;\n entry.count = entry.maxCount;\n entry.isComplete = true;\n }\n }\n }\n else {\n if (range) {\n entry.count = Math.max(entry.count, request.range.from + request.range.count);\n }\n else {\n entry.isComplete = true;\n }\n }\n };\n return ListLoadingTracker;\n}());\nexports.ListLoadingTracker = ListLoadingTracker;\n"},{"id":"./src/Loader.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Loader.ts","name":"./src/Loader.ts","index":25,"index2":21,"size":3262,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./Loader","loc":"9:15-34"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Loader = void 0;\nvar Loader = /** @class */ (function () {\n function Loader(dbRef, getTracker, options) {\n var _this = this;\n this.dbRef = dbRef;\n this.getTracker = getTracker;\n this.options = options;\n this.currentRequests = new Set();\n this.load = function (inputRequest) {\n var result = {\n isComplete: _this.loaded.diff(inputRequest) == null,\n isLoading: false,\n request: inputRequest,\n missing: _this.loadedAndLoading.diff(inputRequest),\n promise: null,\n reload: null,\n };\n result.reload = function () {\n result.missing = inputRequest;\n _this.loadImpl(result);\n };\n if (result.isComplete) {\n // Everything requested is already loaded\n result.isComplete = true;\n result.isLoading = false;\n result.promise = Promise.resolve();\n return result;\n }\n else {\n if (result.missing == null) {\n // Everything requested is either loaded already, or being loaded\n result.isComplete = false;\n result.isLoading = true;\n // There's no good way to tell which of current requests is querying requested data - there actually can be 2 of them.\n // So we track all running requests, and await all of them in such case.\n result.promise = Promise.all(_this.currentRequests.entries()).then(function () { });\n return result;\n }\n else {\n // Something requested is not loaded, nor being loaded. Need to perform a new request.\n _this.loadImpl(result);\n return result;\n }\n }\n };\n this.loaded = getTracker();\n this.loadedAndLoading = getTracker();\n }\n Loader.prototype.loadImpl = function (state) {\n var _this = this;\n this.loadedAndLoading.append(state.missing);\n state.isLoading = true;\n var serverRequest = state.missing;\n if (this.options.clientToServerRequest) {\n serverRequest = this.options.clientToServerRequest(serverRequest);\n }\n state.promise = this.options.api(serverRequest).then(function (result) {\n _this.loaded.append(state.missing, result);\n _this.loadedAndLoading.append(state.missing, result);\n state.missing = null;\n state.isLoading = false;\n state.isComplete = true;\n state.promise = Promise.resolve();\n var flatten = _this.options.convertToPatch(result);\n _this.options.postProcess && _this.options.postProcess(flatten);\n _this.dbRef.commitFetch(flatten);\n });\n this.currentRequests.add(state.promise);\n state.promise.finally(function () {\n _this.currentRequests.delete(state.promise);\n });\n return state.promise;\n };\n return Loader;\n}());\nexports.Loader = Loader;\n"},{"id":"./src/SimpleLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/SimpleLoadingTracker.ts","name":"./src/SimpleLoadingTracker.ts","index":26,"index2":22,"size":712,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./SimpleLoadingTracker","loc":"11:29-62"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleLoadingTracker = void 0;\nvar SimpleLoadingTracker = /** @class */ (function () {\n function SimpleLoadingTracker() {\n this.set = new Set();\n }\n SimpleLoadingTracker.prototype.getKey = function (request) {\n return JSON.stringify(request);\n };\n SimpleLoadingTracker.prototype.diff = function (request) {\n return this.set.has(this.getKey(request)) ? null : request;\n };\n SimpleLoadingTracker.prototype.append = function (request, result) {\n this.set.add(this.getKey(request));\n };\n return SimpleLoadingTracker;\n}());\nexports.SimpleLoadingTracker = SimpleLoadingTracker;\n"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts","index":3,"index2":27,"size":570,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"./src","loc":"4:26-42"}],"providedExports":null,"optimizationBailout":[],"depth":2,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./types\"), exports);\n(0, tslib_1.__exportStar)(require(\"./Db\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbTable\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbRef\"), exports);\n(0, tslib_1.__exportStar)(require(\"./tempIds\"), exports);\n(0, tslib_1.__exportStar)(require(\"./utils\"), exports);\n(0, tslib_1.__exportStar)(require(\"./patchHelpers\"), exports);\n(0, tslib_1.__exportStar)(require(\"./reactHooks\"), exports);\n"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts","index":15,"index2":18,"size":9041,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"5:21-46"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"10:26-51"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEntityParentDependencies = exports.getParentEntities = exports.hasServerFields = exports.isNew = exports.getId = exports.isClientOnly = exports.makeCumulativePatch = exports.isPatchBlank = exports.flattenResponse = exports.mergeEntityPatches = exports.unionPatches = void 0;\nvar tslib_1 = require(\"tslib\");\nvar types_1 = require(\"./types\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar utils_1 = require(\"./utils\");\nvar lodash_groupby_1 = (0, tslib_1.__importDefault)(require(\"lodash.groupby\"));\nvar lodash_map_1 = (0, tslib_1.__importDefault)(require(\"lodash.map\"));\nvar lodash_merge_1 = (0, tslib_1.__importDefault)(require(\"lodash.merge\"));\nvar lodash_countby_1 = (0, tslib_1.__importDefault)(require(\"lodash.countby\"));\nvar lodash_filter_1 = (0, tslib_1.__importDefault)(require(\"lodash.filter\"));\nvar lodash_foreach_1 = (0, tslib_1.__importDefault)(require(\"lodash.foreach\"));\nvar lodash_pick_1 = (0, tslib_1.__importDefault)(require(\"lodash.pick\"));\nfunction unionPatches(patches) {\n var result = {};\n patches.forEach(function (patch) {\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n result[tableName] = result[tableName] ? (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], result[tableName], true), patch[tableName], true) : patch[tableName];\n });\n });\n return result;\n}\nexports.unionPatches = unionPatches;\nfunction mergeEntityPatches(tables, patch) {\n var result = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var groupedEntities = (0, lodash_groupby_1.default)(patch[key], function (item) { return table.getId(item); });\n var tablePatch = (0, lodash_map_1.default)(groupedEntities, function (entities) {\n var result = lodash_merge_1.default.apply(void 0, (0, tslib_1.__spreadArray)([{}], entities, false));\n if (process.env.NODE_ENV !== 'production') {\n var props = (0, utils_1.objectKeys)(result).filter(function (prop) {\n return Object.keys((0, lodash_countby_1.default)(entities.filter(function (entity) {\n return entity[prop] !== undefined;\n }), function (entity) { return entity[prop]; })).length > 1;\n });\n if (props.length) {\n console.warn.apply(console, (0, tslib_1.__spreadArray)(['mergeEntityPatches: Different property values found for the same entity.\\nProperty names:\\n', props, '\\nEntities:\\n'], entities, false));\n }\n }\n return result;\n });\n result[key] = tablePatch;\n });\n return result;\n}\nexports.mergeEntityPatches = mergeEntityPatches;\nfunction flattenResponseHelper(result, object, tablesByTypeName) {\n if (Array.isArray(object)) {\n object.forEach(function (item) { return flattenResponseHelper(result, item, tablesByTypeName); });\n }\n else if (typeof object === 'object') {\n var clone = {};\n var tableKey = void 0;\n var fields = {};\n if ('__typename' in object) {\n var table = tablesByTypeName[object.__typename];\n if (table) {\n tableKey = table.schema.tableName;\n fields = table.schema.fields;\n }\n }\n for (var key in object) {\n var value = object[key];\n var field = fields[key];\n if ((field && !!field.disableFlatten)\n || typeof value !== 'object'\n || value === null\n || (Array.isArray(value) && value.every(function (item) { return typeof item !== 'object'; }))) {\n clone[key] = value;\n }\n else {\n flattenResponseHelper(result, value, tablesByTypeName);\n }\n }\n if (tableKey) {\n result[tableKey].push(clone);\n }\n }\n}\nfunction flattenResponse(response, tables) {\n var result = {};\n var tablesByTypeName = {};\n Object.values(tables).forEach(function (table) { return tablesByTypeName[table.schema.typeName] = table; });\n (0, utils_1.objectKeys)(tables).forEach(function (tableName) { return tablesByTypeName; });\n (0, utils_1.objectKeys)(tables).forEach(function (key) { return result[key] = []; });\n flattenResponseHelper(result, response, tablesByTypeName);\n return result;\n}\nexports.flattenResponse = flattenResponse;\nfunction isPatchBlank(patch) {\n return !(0, utils_1.objectKeys)(patch).some(function (key) { return patch[key].length > 0; });\n}\nexports.isPatchBlank = isPatchBlank;\n/**\n * Given several patches, creates a new single patch with all fields from all entities in all patches.\n */\nfunction makeCumulativePatch(updatedDb, patches, clientIdsMap) {\n var result = {};\n (0, utils_1.objectKeys)(updatedDb.tables).forEach(function (entityName) {\n var table = updatedDb.tables[entityName];\n var schema = table.schema;\n var ids = I.Set();\n patches.forEach(function (patch) {\n var filteredPatch = (patch[entityName] || []).filter(function (entity) { return hasServerFields(entity, schema, clientIdsMap, updatedDb.tables); });\n ids = ids.union(filteredPatch.map(function (e) { return table.getId(e); }));\n });\n var entities = ids\n .map(function (id) { return table.byId(id); })\n .filter(function (e) { return !isClientOnly(e, schema); })\n .toArray();\n if (entities.length > 0) {\n result[entityName] = entities;\n }\n });\n return result;\n}\nexports.makeCumulativePatch = makeCumulativePatch;\nfunction isClientOnly(entity, schema) {\n if (typeof schema.isClientOnly === 'function') {\n return schema.isClientOnly(entity);\n }\n return !!schema.isClientOnly;\n}\nexports.isClientOnly = isClientOnly;\nfunction getId(entity, schema) {\n if (typeof schema.primaryKey == 'string') {\n return entity[schema.primaryKey];\n }\n var result = [];\n (0, lodash_foreach_1.default)((0, lodash_pick_1.default)(entity, schema.primaryKey), function (value) {\n result.push(value);\n });\n return result;\n}\nexports.getId = getId;\nfunction isNew(entity, schema, clientIdsMap) {\n var id = getId(entity, schema);\n return !clientIdsMap.clientToServer(id);\n}\nexports.isNew = isNew;\nfunction hasServerFields(entity, schema, clientIdsMap, tables) {\n var fullEntity = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, tables[schema.tableName].byId(entity.id) || {}), entity);\n if (isClientOnly(fullEntity, schema)) {\n return false;\n }\n return (0, utils_1.objectKeys)(entity).some(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n return !fieldSchema || !(fieldSchema.isClientOnly || fieldSchema.isReadOnly || (fieldSchema.isGenerated && !isNew(entity, schema, clientIdsMap)));\n });\n}\nexports.hasServerFields = hasServerFields;\nfunction getParentEntities(patch, tables) {\n var dependenciesPatch = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var tableSchema = table.schema;\n var fields = (0, lodash_filter_1.default)((0, lodash_map_1.default)(tableSchema.fields, function (field, name) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, field), { name: name })); }), function (field) { return field.fk && field.fk.relationType == types_1.DbRelationType.Aggregation; });\n var tablePatch = patch[key];\n fields.forEach(function (field) {\n var tableName = field.fk.tableName, name = field.name;\n tablePatch.forEach(function (entity) {\n var actualTableName = (typeof tableName == 'function' ? tableName(entity) : tableName);\n var dbEntity = table.byId(table.getId(entity));\n var parentEntity = tables[actualTableName].byId(dbEntity[name]);\n var idFields = (0, lodash_pick_1.default)(parentEntity, tables[actualTableName].schema.primaryKey);\n if (parentEntity) {\n dependenciesPatch[actualTableName] = dependenciesPatch[actualTableName] || [];\n dependenciesPatch[actualTableName].push(idFields);\n }\n });\n });\n });\n return dependenciesPatch;\n}\nexports.getParentEntities = getParentEntities;\nfunction getEntityParentDependencies(entity, entityName, tables) {\n var _a;\n var patch = (_a = {}, _a[entityName] = [entity], _a);\n var resultPatches = [];\n while (true) {\n var parents = getParentEntities(patch, tables);\n if (isPatchBlank(parents)) {\n break;\n }\n resultPatches.push(parents);\n patch = parents;\n }\n var result = unionPatches((0, tslib_1.__spreadArray)([patch], resultPatches, true));\n result = mergeEntityPatches(tables, result);\n return result;\n}\nexports.getEntityParentDependencies = getEntityParentDependencies;\n"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts","index":28,"index2":26,"size":892,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./reactHooks","loc":"11:26-49"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useDbView = exports.useDbRef = exports.DbContext = void 0;\nvar tslib_1 = require(\"tslib\");\nvar react_1 = require(\"react\");\nexports.DbContext = (0, react_1.createContext)(null);\nfunction useDbRef() {\n return (0, react_1.useContext)(exports.DbContext);\n}\nexports.useDbRef = useDbRef;\nfunction useDbView(fn, params, options) {\n var dbRef = useDbRef();\n var _a = (0, react_1.useState)(), state = _a[0], setState = _a[1];\n var subscription = (0, react_1.useMemo)(function () { return dbRef.subscribe((0, tslib_1.__assign)({ compute: fn }, options), params, setState); }, []);\n subscription.update(params);\n (0, react_1.useEffect)(function () {\n return function () { return subscription.unsubscribe(); };\n }, []);\n return subscription.currentValue;\n}\nexports.useDbView = useDbView;\n"},{"id":"./src/tempIds.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","name":"./src/tempIds.tsx","index":23,"index2":19,"size":8418,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./tempIds","loc":"6:16-36"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./tempIds","loc":"8:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TempIdMap = exports.isTempId = exports.getTempId = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lastTempId = -1;\nfunction getTempId() {\n return --lastTempId;\n}\nexports.getTempId = getTempId;\nfunction isTempId(val) {\n return typeof val === 'number' && val < 0;\n}\nexports.isTempId = isTempId;\nvar TempIdMap = /** @class */ (function () {\n function TempIdMap(db) {\n var _this = this;\n this.db = db;\n this.serverToClientIds = new Map();\n this.clientToServerIds = new Map();\n this.clientToServer = function (id) { return _this.clientToServerIds.get(id); };\n this.serverToClient = function (tableName, id) { return _this.getServerToClientMap(tableName).get(id); };\n this.clientToServerRequest = function (request) {\n request = (0, tslib_1.__assign)({}, request);\n if (request.filter) {\n request.filter = _this.clientToServerDataFilter(request.filter);\n }\n return request;\n };\n this.clientToServerDataFilter = function (filter) {\n filter = (0, tslib_1.__assign)({}, filter);\n var keys = Object.keys(filter);\n // I hope that we can rely that there won't be any negative numbers, which are not IDs, in queries.\n // We need to invent better heuristics or a schema otherwise.\n var clientToServer = function (id) {\n var found = _this.clientToServer(id);\n if (found) {\n return found;\n }\n else {\n return id;\n }\n };\n for (var n = 0; n < keys.length; n++) {\n var key = keys[n];\n var condition = filter[key];\n if (condition != null && typeof condition === \"object\") {\n condition = (0, tslib_1.__assign)({}, condition);\n if ('in' in condition && Array.isArray(condition.in) && condition.in.length) {\n condition.in = condition.in.map(clientToServer);\n }\n }\n else {\n condition = clientToServer(condition);\n }\n filter[key] = condition;\n }\n return filter;\n };\n }\n TempIdMap.prototype.copyPatch = function (patch) {\n var newPatch = (0, tslib_1.__assign)({}, patch);\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var tablePatch = patch[tableName].map(function (entityPatch) { return ((0, tslib_1.__assign)({}, entityPatch)); });\n newPatch[tableName] = tablePatch;\n });\n return newPatch;\n };\n // Iterate thru every field in every patch for every table, matching certain field criteria. The patch is mutated!\n TempIdMap.prototype.mapFields = function (patch, filter, callback) {\n var _this = this;\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var schema = _this.db.tables[tableName].schema;\n var fields = (0, utils_1.objectKeys)(schema.fields || [])\n .map(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n if (filter(fieldSchema, fieldName)) {\n return { name: fieldName, schema: fieldSchema };\n }\n })\n .filter(function (f) { return !!f; });\n if (!fields.length) {\n return;\n }\n patch[tableName].forEach(function (entityPatch) {\n for (var n = 0; n < fields.length; n++) {\n var field = fields[n];\n var fieldValue = entityPatch[field.name];\n callback(field.name, field.schema, fieldValue, entityPatch, tableName);\n }\n });\n });\n };\n TempIdMap.prototype.getServerToClientMap = function (tableName) {\n var existing = this.serverToClientIds.get(tableName);\n if (existing) {\n return existing;\n }\n else {\n var newMap = new Map();\n this.serverToClientIds.set(tableName, newMap);\n return newMap;\n }\n };\n TempIdMap.prototype.serverToClientPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n // We map PK in a separate pass, as we need to remap all PKs before re-mapping FKs\n this.mapFields(patch, function (f) { return f.isGenerated; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var clientId = _this.getServerToClientMap(tableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(tableName).set(fieldValue, clientId);\n }\n entityPatch[fieldName] = clientId;\n });\n this.mapFields(patch, function (f) { return !!(f.fk || (f.default != null) || f.toClient); }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var isUndefined = typeof (fieldValue) === 'undefined';\n if (fieldSchema.default != null && fieldValue == null) {\n fieldValue = fieldSchema.default;\n isUndefined = false;\n }\n if (fieldSchema.fk && fieldValue != null) {\n var fkTableName = typeof fieldSchema.fk.tableName === 'function' ? fieldSchema.fk.tableName(entityPatch) : fieldSchema.fk.tableName;\n var clientId = _this.getServerToClientMap(fkTableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(fkTableName).set(fieldValue, clientId);\n }\n fieldValue = clientId;\n }\n if (!isUndefined && fieldSchema.toClient) {\n fieldValue = fieldSchema.toClient(fieldValue);\n }\n if (!isUndefined) {\n entityPatch[fieldName] = fieldValue;\n }\n });\n return patch;\n };\n TempIdMap.prototype.clientToServerPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n this.mapFields(patch, function (f) { return f.isGenerated || !!f.fk; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n if (fieldValue != null) {\n var existingId = _this.clientToServerIds.get(fieldValue);\n if (existingId) {\n entityPatch[fieldName] = existingId;\n }\n }\n });\n this.mapFields(patch, function (f) { return !(f.isClientOnly || f.isReadOnly) && !!f.toServer; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n entityPatch[fieldName] = fieldSchema.toServer(entityPatch[fieldName]);\n });\n this.mapFields(patch, function (meta) { return meta.isClientOnly || meta.isReadOnly; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n delete entityPatch[fieldName];\n });\n return patch;\n };\n TempIdMap.prototype.appendServerMapping = function (response) {\n var _this = this;\n (0, utils_1.objectKeys)(response.submit).forEach(function (tableName) {\n if (_this.db.tables[tableName]) {\n var tablePatch = response.submit[tableName];\n if (tablePatch) {\n var serverToClientIds_1 = _this.getServerToClientMap(tableName);\n var table_1 = _this.db.tables[tableName];\n tablePatch.forEach(function (patch) {\n if (isTempId(patch.id)) {\n var clientId = patch.id;\n var serverId = table_1.getId(patch.payload);\n serverToClientIds_1.set(serverId, clientId);\n _this.clientToServerIds.set(clientId, serverId);\n }\n });\n }\n }\n });\n };\n return TempIdMap;\n}());\nexports.TempIdMap = TempIdMap;\n"},{"id":"./src/types.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/types.ts","name":"./src/types.ts","index":4,"index2":1,"size":379,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./types","loc":"4:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./types","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRelationType = void 0;\nvar DbRelationType;\n(function (DbRelationType) {\n DbRelationType[DbRelationType[\"Aggregation\"] = 0] = \"Aggregation\";\n DbRelationType[DbRelationType[\"Association\"] = 1] = \"Association\";\n})(DbRelationType = exports.DbRelationType || (exports.DbRelationType = {}));\n"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts","index":6,"index2":6,"size":1823,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"./utils","loc":"5:14-32"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./utils","loc":"9:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"./utils","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.difference = exports.defaultCompareViewDependencies = exports.objectKeys = void 0;\nvar tslib_1 = require(\"tslib\");\nvar shallowequal_1 = (0, tslib_1.__importDefault)(require(\"shallowequal\"));\nvar lodash_zip_1 = (0, tslib_1.__importDefault)(require(\"lodash.zip\"));\nvar lodash_transform_1 = (0, tslib_1.__importDefault)(require(\"lodash.transform\"));\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\n// TBD: New typescript would contain better typing for this. Remove this hack after update.\nexports.objectKeys = Object.keys;\nfunction defaultCompareViewDependencies(prev, next) {\n if (Array.isArray(prev) && Array.isArray(next)) {\n if (prev.length === next.length) {\n return (0, lodash_zip_1.default)(prev, next).every(function (_a) {\n var p = _a[0], n = _a[1];\n return (0, shallowequal_1.default)(p, n);\n });\n }\n return false;\n }\n return (0, shallowequal_1.default)(prev, next);\n}\nexports.defaultCompareViewDependencies = defaultCompareViewDependencies;\n/**\n * Deep diff between two object, using lodash\n * @param {Object} object Object compared\n * @param {Object} base Object to compare with\n * @return {Object} Return a new object who represent the diff\n */\nfunction difference(object, base) {\n function changes(object, base) {\n return (0, lodash_transform_1.default)(object, function (result, value, key) {\n if (!(0, lodash_isequal_1.default)(value, base[key])) {\n result[key] = (typeof value === \"object\" && typeof base[key] === \"object\") ? changes(value, base[key]) : value;\n }\n });\n }\n return changes(object, base);\n}\nexports.difference = difference;\n"},{"id":"@epam/uui-core","identifier":"external \"@epam/uui-core\"","name":"external \"@epam/uui-core\"","index":13,"index2":9,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"10:17-42"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"6:17-42"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"immutable","identifier":"external \"immutable\"","name":"external \"immutable\"","index":12,"index2":8,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"5:34-54"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"7:18-38"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"immutable","loc":"6:34-54"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.countby","identifier":"external \"lodash.countby\"","name":"external \"lodash.countby\"","index":19,"index2":14,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.countby","loc":"11:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.filter","identifier":"external \"lodash.filter\"","name":"external \"lodash.filter\"","index":20,"index2":15,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.filter","loc":"12:51-75"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.foreach","identifier":"external \"lodash.foreach\"","name":"external \"lodash.foreach\"","index":21,"index2":16,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.foreach","loc":"13:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.groupby","identifier":"external \"lodash.groupby\"","name":"external \"lodash.groupby\"","index":16,"index2":11,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.groupby","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isempty","identifier":"external \"lodash.isempty\"","name":"external \"lodash.isempty\"","index":24,"index2":20,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"lodash.isempty","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isequal","identifier":"external \"lodash.isequal\"","name":"external \"lodash.isequal\"","index":10,"index2":5,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","issuerId":"./src/Db.ts","issuerName":"./src/Db.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"6:52-77"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.map","identifier":"external \"lodash.map\"","name":"external \"lodash.map\"","index":17,"index2":12,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.map","loc":"9:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.merge","identifier":"external \"lodash.merge\"","name":"external \"lodash.merge\"","index":18,"index2":13,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.merge","loc":"10:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.pick","identifier":"external \"lodash.pick\"","name":"external \"lodash.pick\"","index":22,"index2":17,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.pick","loc":"14:49-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.transform","identifier":"external \"lodash.transform\"","name":"external \"lodash.transform\"","index":9,"index2":4,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.transform","loc":"7:54-81"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.zip","identifier":"external \"lodash.zip\"","name":"external \"lodash.zip\"","index":8,"index2":3,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.zip","loc":"6:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"react","identifier":"external \"react\"","name":"external \"react\"","index":29,"index2":25,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","issuerId":"./src/reactHooks.ts","issuerName":"./src/reactHooks.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"react","loc":"5:14-30"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"shallowequal","identifier":"external \"shallowequal\"","name":"external \"shallowequal\"","index":7,"index2":2,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"shallowequal","loc":"5:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4}],"filteredModules":0,"logging":{"webpack.buildChunkGraph.visitModules":{"entries":[],"filteredEntries":2,"debug":false}},"children":[]}
|
|
1
|
+
{"errors":[],"warnings":[],"version":"4.44.2","hash":"1629067c9011b60d9be2","time":12065,"builtAt":1662030739374,"publicPath":"/","outputPath":"/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/build","assetsByChunkName":{"main":["index.js","index.js.map"]},"assets":[{"name":"index.d.ts","size":58,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"index.d.ts.map","size":120,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"index.js","size":79917,"chunks":["main"],"chunkNames":["main"],"info":{},"emitted":true},{"name":"index.js.map","size":116950,"chunks":["main"],"chunkNames":["main"],"info":{"development":true},"emitted":true},{"name":"src/Db.d.ts","size":604,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Db.d.ts.map","size":697,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbRef.d.ts","size":2283,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbRef.d.ts.map","size":2180,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbTable.d.ts","size":1549,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/DbTable.d.ts.map","size":1792,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/IxSet.d.ts","size":1053,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/IxSet.d.ts.map","size":1178,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/ListLoadingTracker.d.ts","size":855,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/ListLoadingTracker.d.ts.map","size":808,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Loader.d.ts","size":1098,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Loader.d.ts.map","size":1171,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Scheduler.d.ts","size":545,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/Scheduler.d.ts.map","size":640,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/SimpleLoadingTracker.d.ts","size":353,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/SimpleLoadingTracker.d.ts.map","size":391,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/filter.d.ts","size":47,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/filter.d.ts.map","size":127,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/index.d.ts","size":74,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/index.d.ts.map","size":165,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkLookup.d.ts","size":49,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkLookup.d.ts.map","size":131,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkUpdate.d.ts","size":49,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/pkUpdate.d.ts.map","size":131,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/query.d.ts","size":46,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/query.d.ts.map","size":125,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/sorting.d.ts","size":48,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/sorting.d.ts.map","size":129,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/testData.d.ts","size":407,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/__benchmarks__/testData.d.ts.map","size":405,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/index.d.ts","size":248,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/index.d.ts.map","size":275,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/patchHelpers.d.ts","size":2069,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/patchHelpers.d.ts.map","size":2047,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/reactHooks.d.ts","size":527,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/reactHooks.d.ts.map","size":577,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/tempIds.d.ts","size":1560,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/tempIds.d.ts.map","size":1502,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/types.d.ts","size":5095,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/types.d.ts.map","size":5384,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/utils.d.ts","size":462,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src/utils.d.ts.map","size":360,"chunks":[],"chunkNames":[],"info":{},"emitted":true}],"filteredAssets":0,"entrypoints":{"main":{"chunks":["main"],"assets":["index.js","index.js.map"],"children":{},"childAssets":{}}},"namedChunkGroups":{"main":{"chunks":["main"],"assets":["index.js","index.js.map"],"children":{},"childAssets":{}}},"chunks":[{"id":"main","rendered":true,"initial":true,"entry":true,"size":64343,"names":["main"],"files":["index.js","index.js.map"],"hash":"2f974f05473345d1cf44","siblings":[],"parents":[],"children":[],"childrenByOrder":{},"modules":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx","index":0,"index2":29,"size":28,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"multi entry"}],"providedExports":null,"optimizationBailout":[],"depth":0},{"id":"../node_modules/tslib/tslib.es6.js","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/tslib/tslib.es6.js","name":"../node_modules/tslib/tslib.es6.js","index":2,"index2":0,"size":12280,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/ListLoadingTracker.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","module":"./src/ListLoadingTracker.ts","moduleName":"./src/ListLoadingTracker.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"}],"providedExports":["__extends","__assign","__rest","__decorate","__param","__metadata","__awaiter","__generator","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn"],"optimizationBailout":[],"depth":2,"source":"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx","index":1,"index2":28,"size":163,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":0,"issuerName":"multi ./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":0,"moduleIdentifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"multi ./index.tsx","moduleName":"multi ./index.tsx","type":"single entry","userRequest":"/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","loc":"main[0]"}],"providedExports":null,"optimizationBailout":[],"depth":1,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./src\"), exports);\n"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts","index":5,"index2":7,"size":2875,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./Db","loc":"5:26-41"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Db = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\nvar Db = /** @class */ (function () {\n function Db(tables, reusedCache) {\n this.tables = tables;\n this.viewCache = new Map();\n /* Views (cached db projections) */\n this.valueAbsent = Symbol(\"ValueAbsent\");\n if (reusedCache) {\n this.viewCache = new Map(reusedCache);\n }\n else {\n this.viewCache = new Map();\n }\n }\n Db.prototype.update = function (mutate) {\n var clone = new this.constructor(this.tables, this.viewCache);\n clone.tables = (0, tslib_1.__assign)({}, this.tables);\n mutate(clone);\n return clone;\n };\n Db.prototype.with = function (patch) {\n return this.update(function (db) {\n (0, utils_1.objectKeys)(db.tables).forEach(function (entityName) {\n if (patch[entityName]) {\n db.tables[entityName] = db.tables[entityName].with(patch[entityName]);\n }\n });\n });\n };\n Db.prototype.runView = function (view, params) {\n var cache = this.viewCache.get(view);\n if (!cache) {\n cache = new Map();\n this.viewCache.set(view, cache);\n }\n var key = view.getKey ? view.getKey(params) : JSON.stringify(params);\n var cacheItem = cache.get(key);\n if (!cacheItem) {\n cacheItem = {\n dependencies: this.valueAbsent,\n currentValue: this.valueAbsent,\n computedOnDb: this.valueAbsent,\n };\n cache.set(key, cacheItem);\n }\n var shouldUpdate = this !== cacheItem.computedOnDb;\n var dependencies = this.valueAbsent;\n if (view.getDependencies) {\n var compare = view.compareDependencies || utils_1.defaultCompareViewDependencies;\n dependencies = view.getDependencies(this, params);\n shouldUpdate = !compare(cacheItem.dependencies, dependencies);\n }\n var previousValue = cacheItem.currentValue;\n if (shouldUpdate) {\n cacheItem.dependencies = dependencies;\n var newValue = view.compute(this, params, dependencies);\n cacheItem.computedOnDb = this;\n var compareResults = view.compareResults || lodash_isequal_1.default;\n if (!compareResults(previousValue, newValue)) {\n if (view.traceDiff) {\n console.debug((0, utils_1.difference)(previousValue, newValue));\n }\n cacheItem.currentValue = newValue;\n }\n }\n return cacheItem.currentValue;\n };\n return Db;\n}());\nexports.Db = Db;\n"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts","index":14,"index2":24,"size":9346,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbRef","loc":"7:26-44"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRef = void 0;\nvar tslib_1 = require(\"tslib\");\nvar patchHelpers_1 = require(\"./patchHelpers\");\nvar tempIds_1 = require(\"./tempIds\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isempty_1 = (0, tslib_1.__importDefault)(require(\"lodash.isempty\"));\nvar Loader_1 = require(\"./Loader\");\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar SimpleLoadingTracker_1 = require(\"./SimpleLoadingTracker\");\nvar ListLoadingTracker_1 = require(\"./ListLoadingTracker\");\nvar DbRef = /** @class */ (function () {\n function DbRef(blank) {\n var _this = this;\n this.blank = blank;\n this.log = [];\n this.autoSave = true;\n this.savedPoint = 0;\n this.throttleSaveMs = 1000;\n /* Update subscriptions (aka live views) */\n this.lastSubscriptionId = 1;\n this.subscriptions = new Map();\n this.updateHandlers = [];\n /* Error Subscriptions */\n this.saveErrorHandlers = [];\n /* Save scheduling */\n this.enqueueSave = (0, uui_core_1.batch)(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {\n var cumulativePatch, lastLogEntry, response, error_1;\n return (0, tslib_1.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n cumulativePatch = this.makeCumulativePatch();\n lastLogEntry = this.log.length;\n if ((0, lodash_isempty_1.default)(cumulativePatch)) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.savePatch(cumulativePatch)];\n case 2:\n response = _a.sent();\n this.applyResponse(response, lastLogEntry);\n this.update();\n return [3 /*break*/, 4];\n case 3:\n error_1 = _a.sent();\n this.saveError(cumulativePatch, error_1);\n this.update();\n throw error_1;\n case 4: return [2 /*return*/];\n }\n });\n }); });\n this.handleBeforeUnload = function (e) {\n if (_this.enqueueSave.isBusy) {\n e.returnValue = false;\n return false;\n }\n };\n this.loaders = [];\n this.db = blank;\n this.base = blank;\n this.tempIdMap = new tempIds_1.TempIdMap(blank);\n this.idMap = this.tempIdMap;\n window.addEventListener('beforeunload', this.handleBeforeUnload);\n }\n /** Saves all committed patches. Useful only if autoSave is off. */\n DbRef.prototype.save = function () {\n return this.enqueueSave();\n };\n DbRef.prototype.getAutoSave = function () {\n return this.autoSave;\n };\n DbRef.prototype.setAutoSave = function (val) {\n if (this.autoSave != val) {\n this.autoSave = val;\n this.autoSave && this.enqueueSave();\n this.update();\n }\n };\n DbRef.prototype.revert = function () {\n this.db = this.base;\n this.log = this.log.slice(0, this.savedPoint);\n this.update();\n };\n /** Concrete DbRef instances should override and implement their save logic in this method */\n DbRef.prototype.savePatch = function (patch) {\n return Promise.resolve({ submit: {} });\n };\n /* Db Update logic */\n DbRef.prototype.commit = function (patch) {\n var dbBeforeUpdate = this.db.with(patch);\n patch = this.beforeUpdate(patch, dbBeforeUpdate.tables, this.db.tables);\n patch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, patch);\n this.log.push({ patch: patch });\n this.db = this.db.with(patch);\n this.autoSave && this.enqueueSave(null, { throttleMs: this.throttleSaveMs });\n this.update();\n };\n DbRef.prototype.beforeUpdate = function (patch, tables, prevTables) {\n var _this = this;\n var patchAndDependencies = {};\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && !tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n patchAndDependencies[entityName] = patch[entityName];\n });\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n var _a;\n var schema = tables[entityName].schema;\n var beforeUpdate = schema.beforeUpdate;\n var context = {\n clientIdsMap: _this.tempIdMap,\n schema: schema,\n tables: tables,\n prevTables: prevTables,\n };\n var results = patch[entityName].map(function (e) { return beforeUpdate(e, context); });\n var updatedPatch = (_a = {}, _a[entityName] = results.map(function (result) { return result.entity; }), _a);\n var dependentEntityPatchesForUpdate = (0, patchHelpers_1.unionPatches)(results.filter(function (result) { return result.dependentEntities; }).map(function (result) { return result.dependentEntities; }));\n var dependentEntityPatches = _this.beforeUpdate(dependentEntityPatchesForUpdate, tables, prevTables);\n patchAndDependencies = (0, patchHelpers_1.mergeEntityPatches)(tables, (0, patchHelpers_1.unionPatches)([patchAndDependencies, updatedPatch, dependentEntityPatches]));\n });\n return patchAndDependencies;\n };\n DbRef.prototype.commitFetch = function (patch) {\n patch = this.tempIdMap.serverToClientPatch(patch);\n this.rebase(this.base.with(patch));\n this.update();\n };\n DbRef.prototype.rebase = function (newBase) {\n this.base = newBase;\n this.db = newBase;\n for (var n = this.savedPoint; n < this.log.length; n++) {\n this.db = this.db.with(this.log[n].patch);\n }\n };\n DbRef.prototype.makeCumulativePatch = function () {\n var lastLogEntry = this.log.length;\n var logEntriesToSave = this.log.slice(this.savedPoint, lastLogEntry);\n var cumulativePatch = (0, patchHelpers_1.makeCumulativePatch)(this.db, logEntriesToSave.map(function (t) { return t.patch; }), this.tempIdMap);\n cumulativePatch = this.tempIdMap.clientToServerPatch(cumulativePatch);\n return cumulativePatch;\n };\n DbRef.prototype.applyResponse = function (response, newSavedPoint) {\n this.tempIdMap.appendServerMapping(response);\n var serverPatch = (0, patchHelpers_1.flattenResponse)(response.submit, this.db.tables);\n serverPatch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, serverPatch);\n this.savedPoint = newSavedPoint;\n this.base = this.db;\n this.commitFetch(serverPatch);\n };\n DbRef.prototype.subscribe = function (view, params, onUpdate) {\n var _this = this;\n var id = this.lastSubscriptionId++;\n var subscription = {\n update: function (params) {\n subscription.currentParams = params;\n subscription.currentValue = _this.db.runView(view, params);\n return subscription.currentValue;\n },\n currentParams: null,\n currentValue: null,\n onUpdate: onUpdate,\n unsubscribe: function () { _this.subscriptions.delete(id); },\n };\n subscription.update(params);\n this.subscriptions.set(id, subscription);\n return subscription;\n };\n DbRef.prototype.onUpdate = function (handler) {\n this.subscribe({\n compute: function (db) { return db; },\n compareResults: function (a, b) { return a === b; },\n }, null, handler);\n };\n DbRef.prototype.update = function () {\n this.subscriptions.forEach(function (subscription) {\n var previousValue = subscription.currentValue;\n subscription.update(subscription.currentParams);\n if (subscription.currentValue !== previousValue && subscription.onUpdate) {\n subscription.onUpdate(subscription.currentValue);\n }\n });\n };\n DbRef.prototype.onSaveError = function (handler) {\n this.saveErrorHandlers.push(handler);\n };\n DbRef.prototype.saveError = function (request, error) {\n this.saveErrorHandlers.forEach(function (handler) { return handler(request, error); });\n };\n DbRef.prototype.makeLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new SimpleLoadingTracker_1.SimpleLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.makeListLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new ListLoadingTracker_1.ListLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.reload = function () {\n this.loaders = [];\n };\n return DbRef;\n}());\nexports.DbRef = DbRef;\n"},{"id":"./src/DbTable.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","name":"./src/DbTable.ts","index":11,"index2":10,"size":10036,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbTable","loc":"6:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbTable = void 0;\nvar tslib_1 = require(\"tslib\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar immutable_1 = require(\"immutable\");\nvar DbTable = /** @class */ (function () {\n function DbTable(schema, state, q) {\n this.schema = schema;\n this.state = state;\n this.q = q;\n if (!state) {\n var indexes = (schema.indexes || []).map(function (indexDef) {\n return {\n field: indexDef,\n map: I.Map(),\n };\n });\n this.state = { pk: I.Map(), indexes: indexes };\n }\n if (!q) {\n this.q = {};\n }\n }\n DbTable.prototype.keyToImmutable = function (id) {\n if (Array.isArray(id)) {\n return I.List(id);\n }\n else {\n return id;\n }\n };\n DbTable.prototype.byId = function (id) {\n return this.state.pk.get(this.keyToImmutable(id));\n };\n DbTable.prototype.getId = function (entity) {\n if (Array.isArray(this.schema.primaryKey)) {\n return this.schema.primaryKey.map(function (key) { return entity[key]; });\n }\n return entity[this.schema.primaryKey];\n };\n DbTable.prototype.update = function (mutate) {\n var clone = new this.constructor(this.schema, this.state, this.q);\n mutate(clone);\n return clone;\n };\n /* Mutation */\n DbTable.prototype.with = function (patch) {\n var _this = this;\n var updates = patch.map(function (entityPatch) {\n var id = _this.getId(entityPatch);\n var immId = _this.keyToImmutable(id);\n var existing = _this.state.pk.get(immId);\n var isDeleted = false;\n var updated = entityPatch;\n if (existing) {\n updated = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, existing), entityPatch);\n if (_this.schema.deleteFlag) {\n isDeleted = updated[_this.schema.deleteFlag] === true;\n }\n }\n return { id: id, immId: immId, patch: entityPatch, existing: existing, updated: updated, isNew: !existing, isDeleted: isDeleted };\n });\n var idVal = immutable_1.Seq.Keyed(updates.map(function (entity) { return [entity.immId, entity.updated]; }));\n var newPk = this.state.pk.merge(idVal);\n // TBD: replace with deleteAll after migrating to immutable 4\n updates.filter(function (u) { return u.isDeleted; }).forEach(function (u) {\n newPk = newPk.delete(u.immId);\n });\n var newIndexes = this.state.indexes.map(function (index) {\n var newMap = index.map;\n var _loop_1 = function (n) {\n var update = updates[n];\n var newKey = update.updated[index.field];\n if (update.existing) {\n var oldKey = update.existing[index.field];\n if (oldKey !== newKey || update.isDeleted) {\n newMap = newMap.update(oldKey, function (set) { return set.remove(update.immId); });\n }\n }\n if (!update.isDeleted) {\n newMap = newMap.update(newKey, I.Set(), function (set) { return set.add(update.immId); });\n }\n };\n for (var n = 0; n < updates.length; n++) {\n _loop_1(n);\n }\n return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, index), { map: newMap });\n });\n var newState = { pk: newPk, indexes: newIndexes };\n return this.update(function (t) { return t.state = newState; });\n };\n /* Query */\n DbTable.prototype.find = function (filter) {\n var _this = this;\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { filter: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, _this.q.filter), filter) }); });\n };\n DbTable.prototype.order = function (order) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: order }); });\n };\n DbTable.prototype.orderBy = function (field, direction) {\n if (direction === void 0) { direction = 'asc'; }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: [{ field: field, direction: direction }] }); });\n };\n DbTable.prototype.thenBy = function (field, direction) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], t.q.sorting, true), [{ field: field, direction: direction }], false) }); });\n };\n DbTable.prototype.search = function (text) {\n if (!this.schema.searchBy) {\n throw new Error(\"Can't search in the \".concat(this.schema.typeName, \" table - searchBy is not defined in the schema.\"));\n }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { search: text }); });\n };\n /* Materializing */\n DbTable.prototype.range = function (from, count) {\n return this.runQuery((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.q), { range: { from: from, count: count } }));\n };\n DbTable.prototype.count = function () {\n return this.runQuery(this.q).length;\n };\n DbTable.prototype.one = function () {\n return this.runQuery(this.q)[0] || null;\n };\n DbTable.prototype.toArray = function () {\n return this.runQuery(this.q);\n };\n DbTable.prototype.map = function (fn) {\n return this.toArray().map(fn);\n };\n /* Query implementation */\n DbTable.prototype.runQuery = function (q) {\n var _this = this;\n var result = null;\n var filter = q.filter;\n if (filter) {\n var indexes = this.state.indexes;\n // Try to use indexes to fulfill filter conditions\n for (var n = 0; n < indexes.length; n++) {\n var index = indexes[n];\n if (index.field in filter) {\n var _a = filter, _b = index.field, condition = _a[_b], rest = (0, tslib_1.__rest)(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n var conditionValues = null;\n if (condition != null && typeof condition === \"object\") {\n // Attempt to use index for 'in' and 'isNull' criteria.\n // We need to be very conservative here, indexed field should work the same way as getPatternPredicate. So\n // - it's better to leave corner cases to getPatternPredicate\n var _c = condition, inCriteria = _c.in, nullCriteria = _c.isNull, restCriteria = (0, tslib_1.__rest)(_c, [\"in\", \"isNull\"]);\n if (inCriteria && Array.isArray(inCriteria)) {\n conditionValues = inCriteria;\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Conditions in getPatternPredicate are composed with 'and' logic,\n // For now, let's not attempt to handle tricky cases like { in: [1,2] isNull: true }, or { in: [1, null] isNull: false }\n // - just leave this to getPatternPredicate.\n // Let's just handle the a most common case { isNull: true } - find all null and undefined\n if (nullCriteria === true && !conditionValues) {\n conditionValues = [null, undefined];\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Keep other conditions, e.g. { in: [1,2,3], isNull: true } - in works via index, isNull - via filter\n if (Object.keys(restCriteria).length > 0) {\n rest[index.field] = restCriteria;\n }\n }\n else {\n conditionValues = [condition];\n }\n if (conditionValues) {\n result = [];\n for (var i = 0; i < conditionValues.length; i++) {\n var idsSet = index.map.get(conditionValues[i]);\n if (idsSet) {\n var idsArray = idsSet.toArray();\n for (var j = 0; j < idsArray.length; j++) {\n var item = this.state.pk.get(idsArray[j]);\n result.push(item);\n }\n }\n }\n filter = Object.keys(rest).length > 0 ? rest : null;\n break;\n }\n }\n }\n }\n if (!result) {\n result = this.state.pk.toArray();\n }\n if (filter) {\n var predicate = (0, uui_core_1.getFilterPredicate)(q.filter);\n result = result.filter(predicate);\n }\n if (q.search) {\n var searchFilter_1 = (0, uui_core_1.getSearchFilter)(q.search);\n result = result.filter(function (item) { return searchFilter_1(_this.schema.searchBy.map(function (field) { return item[field]; })); });\n }\n if (q.sorting) {\n var comparer = (0, uui_core_1.getOrderComparer)(q.sorting);\n result = result.sort(comparer);\n }\n if (q.range) {\n result = result.slice(q.range.from, q.range.from + q.range.count);\n }\n return result;\n };\n return DbTable;\n}());\nexports.DbTable = DbTable;\n"},{"id":"./src/ListLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","name":"./src/ListLoadingTracker.ts","index":27,"index2":23,"size":3888,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./ListLoadingTracker","loc":"12:27-58"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListLoadingTracker = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ListLoadingTracker = /** @class */ (function () {\n function ListLoadingTracker(options) {\n this.options = options;\n this.cache = new Map();\n this.extractList = (options === null || options === void 0 ? void 0 : options.extractList) || (function (r) { return r; });\n }\n ListLoadingTracker.prototype.prepare = function (request) {\n var filter = request.filter, sorting = request.sorting, search = request.search, range = request.range, unknownFields = (0, tslib_1.__rest)(request, [\"filter\", \"sorting\", \"search\", \"range\"]);\n var options = {};\n if (filter) {\n options.filter = filter;\n }\n if (sorting) {\n options.sorting = sorting;\n }\n if (search) {\n options.search = search;\n }\n var keyObject = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields);\n var key = JSON.stringify(keyObject);\n var entry = this.cache.get(key);\n if (!entry) {\n entry = { options: options, count: 0, maxCount: null, isComplete: false };\n this.cache.set(key, entry);\n }\n return { options: options, range: range, unknownFields: unknownFields, entry: entry };\n };\n ListLoadingTracker.prototype.diff = function (request) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (entry.isComplete) {\n return null;\n }\n if (!request.range) {\n return request;\n }\n else {\n var requestedMax = request.range.from + request.range.count;\n var missingCount = requestedMax - entry.count;\n if (entry.maxCount) {\n missingCount = Math.min(missingCount, entry.maxCount);\n }\n if (missingCount > 0) {\n return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields), { range: { from: entry.count, count: requestedMax - entry.count } });\n }\n else {\n return null;\n }\n }\n };\n ListLoadingTracker.prototype.count = function (request) {\n var entry = this.prepare(request).entry;\n return { knownCount: Math.max(entry.count, entry.maxCount), exactCount: entry.maxCount };\n };\n ListLoadingTracker.prototype.append = function (request, response) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (response) {\n var list = this.extractList(response);\n if (list.count) {\n entry.maxCount = list.count;\n }\n if (!range) {\n entry.count = list.items.length;\n entry.maxCount = list.items.length;\n entry.isComplete = true;\n }\n else {\n var from = (list.from == null) ? range.from : list.from;\n if (list.items.length > 0) {\n entry.count = Math.max(entry.count, from + list.items.length);\n }\n if (list.items.length < range.count) {\n entry.maxCount = from + list.items.length;\n entry.count = entry.maxCount;\n entry.isComplete = true;\n }\n }\n }\n else {\n if (range) {\n entry.count = Math.max(entry.count, request.range.from + request.range.count);\n }\n else {\n entry.isComplete = true;\n }\n }\n };\n return ListLoadingTracker;\n}());\nexports.ListLoadingTracker = ListLoadingTracker;\n"},{"id":"./src/Loader.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Loader.ts","name":"./src/Loader.ts","index":25,"index2":21,"size":3262,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./Loader","loc":"9:15-34"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Loader = void 0;\nvar Loader = /** @class */ (function () {\n function Loader(dbRef, getTracker, options) {\n var _this = this;\n this.dbRef = dbRef;\n this.getTracker = getTracker;\n this.options = options;\n this.currentRequests = new Set();\n this.load = function (inputRequest) {\n var result = {\n isComplete: _this.loaded.diff(inputRequest) == null,\n isLoading: false,\n request: inputRequest,\n missing: _this.loadedAndLoading.diff(inputRequest),\n promise: null,\n reload: null,\n };\n result.reload = function () {\n result.missing = inputRequest;\n _this.loadImpl(result);\n };\n if (result.isComplete) {\n // Everything requested is already loaded\n result.isComplete = true;\n result.isLoading = false;\n result.promise = Promise.resolve();\n return result;\n }\n else {\n if (result.missing == null) {\n // Everything requested is either loaded already, or being loaded\n result.isComplete = false;\n result.isLoading = true;\n // There's no good way to tell which of current requests is querying requested data - there actually can be 2 of them.\n // So we track all running requests, and await all of them in such case.\n result.promise = Promise.all(_this.currentRequests.entries()).then(function () { });\n return result;\n }\n else {\n // Something requested is not loaded, nor being loaded. Need to perform a new request.\n _this.loadImpl(result);\n return result;\n }\n }\n };\n this.loaded = getTracker();\n this.loadedAndLoading = getTracker();\n }\n Loader.prototype.loadImpl = function (state) {\n var _this = this;\n this.loadedAndLoading.append(state.missing);\n state.isLoading = true;\n var serverRequest = state.missing;\n if (this.options.clientToServerRequest) {\n serverRequest = this.options.clientToServerRequest(serverRequest);\n }\n state.promise = this.options.api(serverRequest).then(function (result) {\n _this.loaded.append(state.missing, result);\n _this.loadedAndLoading.append(state.missing, result);\n state.missing = null;\n state.isLoading = false;\n state.isComplete = true;\n state.promise = Promise.resolve();\n var flatten = _this.options.convertToPatch(result);\n _this.options.postProcess && _this.options.postProcess(flatten);\n _this.dbRef.commitFetch(flatten);\n });\n this.currentRequests.add(state.promise);\n state.promise.finally(function () {\n _this.currentRequests.delete(state.promise);\n });\n return state.promise;\n };\n return Loader;\n}());\nexports.Loader = Loader;\n"},{"id":"./src/SimpleLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/SimpleLoadingTracker.ts","name":"./src/SimpleLoadingTracker.ts","index":26,"index2":22,"size":712,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./SimpleLoadingTracker","loc":"11:29-62"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleLoadingTracker = void 0;\nvar SimpleLoadingTracker = /** @class */ (function () {\n function SimpleLoadingTracker() {\n this.set = new Set();\n }\n SimpleLoadingTracker.prototype.getKey = function (request) {\n return JSON.stringify(request);\n };\n SimpleLoadingTracker.prototype.diff = function (request) {\n return this.set.has(this.getKey(request)) ? null : request;\n };\n SimpleLoadingTracker.prototype.append = function (request, result) {\n this.set.add(this.getKey(request));\n };\n return SimpleLoadingTracker;\n}());\nexports.SimpleLoadingTracker = SimpleLoadingTracker;\n"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts","index":3,"index2":27,"size":570,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"./src","loc":"4:26-42"}],"providedExports":null,"optimizationBailout":[],"depth":2,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./types\"), exports);\n(0, tslib_1.__exportStar)(require(\"./Db\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbTable\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbRef\"), exports);\n(0, tslib_1.__exportStar)(require(\"./tempIds\"), exports);\n(0, tslib_1.__exportStar)(require(\"./utils\"), exports);\n(0, tslib_1.__exportStar)(require(\"./patchHelpers\"), exports);\n(0, tslib_1.__exportStar)(require(\"./reactHooks\"), exports);\n"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts","index":15,"index2":18,"size":9041,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"5:21-46"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"10:26-51"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEntityParentDependencies = exports.getParentEntities = exports.hasServerFields = exports.isNew = exports.getId = exports.isClientOnly = exports.makeCumulativePatch = exports.isPatchBlank = exports.flattenResponse = exports.mergeEntityPatches = exports.unionPatches = void 0;\nvar tslib_1 = require(\"tslib\");\nvar types_1 = require(\"./types\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar utils_1 = require(\"./utils\");\nvar lodash_groupby_1 = (0, tslib_1.__importDefault)(require(\"lodash.groupby\"));\nvar lodash_map_1 = (0, tslib_1.__importDefault)(require(\"lodash.map\"));\nvar lodash_merge_1 = (0, tslib_1.__importDefault)(require(\"lodash.merge\"));\nvar lodash_countby_1 = (0, tslib_1.__importDefault)(require(\"lodash.countby\"));\nvar lodash_filter_1 = (0, tslib_1.__importDefault)(require(\"lodash.filter\"));\nvar lodash_foreach_1 = (0, tslib_1.__importDefault)(require(\"lodash.foreach\"));\nvar lodash_pick_1 = (0, tslib_1.__importDefault)(require(\"lodash.pick\"));\nfunction unionPatches(patches) {\n var result = {};\n patches.forEach(function (patch) {\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n result[tableName] = result[tableName] ? (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], result[tableName], true), patch[tableName], true) : patch[tableName];\n });\n });\n return result;\n}\nexports.unionPatches = unionPatches;\nfunction mergeEntityPatches(tables, patch) {\n var result = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var groupedEntities = (0, lodash_groupby_1.default)(patch[key], function (item) { return table.getId(item); });\n var tablePatch = (0, lodash_map_1.default)(groupedEntities, function (entities) {\n var result = lodash_merge_1.default.apply(void 0, (0, tslib_1.__spreadArray)([{}], entities, false));\n if (process.env.NODE_ENV !== 'production') {\n var props = (0, utils_1.objectKeys)(result).filter(function (prop) {\n return Object.keys((0, lodash_countby_1.default)(entities.filter(function (entity) {\n return entity[prop] !== undefined;\n }), function (entity) { return entity[prop]; })).length > 1;\n });\n if (props.length) {\n console.warn.apply(console, (0, tslib_1.__spreadArray)(['mergeEntityPatches: Different property values found for the same entity.\\nProperty names:\\n', props, '\\nEntities:\\n'], entities, false));\n }\n }\n return result;\n });\n result[key] = tablePatch;\n });\n return result;\n}\nexports.mergeEntityPatches = mergeEntityPatches;\nfunction flattenResponseHelper(result, object, tablesByTypeName) {\n if (Array.isArray(object)) {\n object.forEach(function (item) { return flattenResponseHelper(result, item, tablesByTypeName); });\n }\n else if (typeof object === 'object') {\n var clone = {};\n var tableKey = void 0;\n var fields = {};\n if ('__typename' in object) {\n var table = tablesByTypeName[object.__typename];\n if (table) {\n tableKey = table.schema.tableName;\n fields = table.schema.fields;\n }\n }\n for (var key in object) {\n var value = object[key];\n var field = fields[key];\n if ((field && !!field.disableFlatten)\n || typeof value !== 'object'\n || value === null\n || (Array.isArray(value) && value.every(function (item) { return typeof item !== 'object'; }))) {\n clone[key] = value;\n }\n else {\n flattenResponseHelper(result, value, tablesByTypeName);\n }\n }\n if (tableKey) {\n result[tableKey].push(clone);\n }\n }\n}\nfunction flattenResponse(response, tables) {\n var result = {};\n var tablesByTypeName = {};\n Object.values(tables).forEach(function (table) { return tablesByTypeName[table.schema.typeName] = table; });\n (0, utils_1.objectKeys)(tables).forEach(function (tableName) { return tablesByTypeName; });\n (0, utils_1.objectKeys)(tables).forEach(function (key) { return result[key] = []; });\n flattenResponseHelper(result, response, tablesByTypeName);\n return result;\n}\nexports.flattenResponse = flattenResponse;\nfunction isPatchBlank(patch) {\n return !(0, utils_1.objectKeys)(patch).some(function (key) { return patch[key].length > 0; });\n}\nexports.isPatchBlank = isPatchBlank;\n/**\n * Given several patches, creates a new single patch with all fields from all entities in all patches.\n */\nfunction makeCumulativePatch(updatedDb, patches, clientIdsMap) {\n var result = {};\n (0, utils_1.objectKeys)(updatedDb.tables).forEach(function (entityName) {\n var table = updatedDb.tables[entityName];\n var schema = table.schema;\n var ids = I.Set();\n patches.forEach(function (patch) {\n var filteredPatch = (patch[entityName] || []).filter(function (entity) { return hasServerFields(entity, schema, clientIdsMap, updatedDb.tables); });\n ids = ids.union(filteredPatch.map(function (e) { return table.getId(e); }));\n });\n var entities = ids\n .map(function (id) { return table.byId(id); })\n .filter(function (e) { return !isClientOnly(e, schema); })\n .toArray();\n if (entities.length > 0) {\n result[entityName] = entities;\n }\n });\n return result;\n}\nexports.makeCumulativePatch = makeCumulativePatch;\nfunction isClientOnly(entity, schema) {\n if (typeof schema.isClientOnly === 'function') {\n return schema.isClientOnly(entity);\n }\n return !!schema.isClientOnly;\n}\nexports.isClientOnly = isClientOnly;\nfunction getId(entity, schema) {\n if (typeof schema.primaryKey == 'string') {\n return entity[schema.primaryKey];\n }\n var result = [];\n (0, lodash_foreach_1.default)((0, lodash_pick_1.default)(entity, schema.primaryKey), function (value) {\n result.push(value);\n });\n return result;\n}\nexports.getId = getId;\nfunction isNew(entity, schema, clientIdsMap) {\n var id = getId(entity, schema);\n return !clientIdsMap.clientToServer(id);\n}\nexports.isNew = isNew;\nfunction hasServerFields(entity, schema, clientIdsMap, tables) {\n var fullEntity = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, tables[schema.tableName].byId(entity.id) || {}), entity);\n if (isClientOnly(fullEntity, schema)) {\n return false;\n }\n return (0, utils_1.objectKeys)(entity).some(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n return !fieldSchema || !(fieldSchema.isClientOnly || fieldSchema.isReadOnly || (fieldSchema.isGenerated && !isNew(entity, schema, clientIdsMap)));\n });\n}\nexports.hasServerFields = hasServerFields;\nfunction getParentEntities(patch, tables) {\n var dependenciesPatch = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var tableSchema = table.schema;\n var fields = (0, lodash_filter_1.default)((0, lodash_map_1.default)(tableSchema.fields, function (field, name) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, field), { name: name })); }), function (field) { return field.fk && field.fk.relationType == types_1.DbRelationType.Aggregation; });\n var tablePatch = patch[key];\n fields.forEach(function (field) {\n var tableName = field.fk.tableName, name = field.name;\n tablePatch.forEach(function (entity) {\n var actualTableName = (typeof tableName == 'function' ? tableName(entity) : tableName);\n var dbEntity = table.byId(table.getId(entity));\n var parentEntity = tables[actualTableName].byId(dbEntity[name]);\n var idFields = (0, lodash_pick_1.default)(parentEntity, tables[actualTableName].schema.primaryKey);\n if (parentEntity) {\n dependenciesPatch[actualTableName] = dependenciesPatch[actualTableName] || [];\n dependenciesPatch[actualTableName].push(idFields);\n }\n });\n });\n });\n return dependenciesPatch;\n}\nexports.getParentEntities = getParentEntities;\nfunction getEntityParentDependencies(entity, entityName, tables) {\n var _a;\n var patch = (_a = {}, _a[entityName] = [entity], _a);\n var resultPatches = [];\n while (true) {\n var parents = getParentEntities(patch, tables);\n if (isPatchBlank(parents)) {\n break;\n }\n resultPatches.push(parents);\n patch = parents;\n }\n var result = unionPatches((0, tslib_1.__spreadArray)([patch], resultPatches, true));\n result = mergeEntityPatches(tables, result);\n return result;\n}\nexports.getEntityParentDependencies = getEntityParentDependencies;\n"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts","index":28,"index2":26,"size":892,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./reactHooks","loc":"11:26-49"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useDbView = exports.useDbRef = exports.DbContext = void 0;\nvar tslib_1 = require(\"tslib\");\nvar react_1 = require(\"react\");\nexports.DbContext = (0, react_1.createContext)(null);\nfunction useDbRef() {\n return (0, react_1.useContext)(exports.DbContext);\n}\nexports.useDbRef = useDbRef;\nfunction useDbView(fn, params, options) {\n var dbRef = useDbRef();\n var _a = (0, react_1.useState)(), state = _a[0], setState = _a[1];\n var subscription = (0, react_1.useMemo)(function () { return dbRef.subscribe((0, tslib_1.__assign)({ compute: fn }, options), params, setState); }, []);\n subscription.update(params);\n (0, react_1.useEffect)(function () {\n return function () { return subscription.unsubscribe(); };\n }, []);\n return subscription.currentValue;\n}\nexports.useDbView = useDbView;\n"},{"id":"./src/tempIds.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","name":"./src/tempIds.tsx","index":23,"index2":19,"size":8418,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./tempIds","loc":"6:16-36"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./tempIds","loc":"8:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TempIdMap = exports.isTempId = exports.getTempId = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lastTempId = -1;\nfunction getTempId() {\n return --lastTempId;\n}\nexports.getTempId = getTempId;\nfunction isTempId(val) {\n return typeof val === 'number' && val < 0;\n}\nexports.isTempId = isTempId;\nvar TempIdMap = /** @class */ (function () {\n function TempIdMap(db) {\n var _this = this;\n this.db = db;\n this.serverToClientIds = new Map();\n this.clientToServerIds = new Map();\n this.clientToServer = function (id) { return _this.clientToServerIds.get(id); };\n this.serverToClient = function (tableName, id) { return _this.getServerToClientMap(tableName).get(id); };\n this.clientToServerRequest = function (request) {\n request = (0, tslib_1.__assign)({}, request);\n if (request.filter) {\n request.filter = _this.clientToServerDataFilter(request.filter);\n }\n return request;\n };\n this.clientToServerDataFilter = function (filter) {\n filter = (0, tslib_1.__assign)({}, filter);\n var keys = Object.keys(filter);\n // I hope that we can rely that there won't be any negative numbers, which are not IDs, in queries.\n // We need to invent better heuristics or a schema otherwise.\n var clientToServer = function (id) {\n var found = _this.clientToServer(id);\n if (found) {\n return found;\n }\n else {\n return id;\n }\n };\n for (var n = 0; n < keys.length; n++) {\n var key = keys[n];\n var condition = filter[key];\n if (condition != null && typeof condition === \"object\") {\n condition = (0, tslib_1.__assign)({}, condition);\n if ('in' in condition && Array.isArray(condition.in) && condition.in.length) {\n condition.in = condition.in.map(clientToServer);\n }\n }\n else {\n condition = clientToServer(condition);\n }\n filter[key] = condition;\n }\n return filter;\n };\n }\n TempIdMap.prototype.copyPatch = function (patch) {\n var newPatch = (0, tslib_1.__assign)({}, patch);\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var tablePatch = patch[tableName].map(function (entityPatch) { return ((0, tslib_1.__assign)({}, entityPatch)); });\n newPatch[tableName] = tablePatch;\n });\n return newPatch;\n };\n // Iterate thru every field in every patch for every table, matching certain field criteria. The patch is mutated!\n TempIdMap.prototype.mapFields = function (patch, filter, callback) {\n var _this = this;\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var schema = _this.db.tables[tableName].schema;\n var fields = (0, utils_1.objectKeys)(schema.fields || [])\n .map(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n if (filter(fieldSchema, fieldName)) {\n return { name: fieldName, schema: fieldSchema };\n }\n })\n .filter(function (f) { return !!f; });\n if (!fields.length) {\n return;\n }\n patch[tableName].forEach(function (entityPatch) {\n for (var n = 0; n < fields.length; n++) {\n var field = fields[n];\n var fieldValue = entityPatch[field.name];\n callback(field.name, field.schema, fieldValue, entityPatch, tableName);\n }\n });\n });\n };\n TempIdMap.prototype.getServerToClientMap = function (tableName) {\n var existing = this.serverToClientIds.get(tableName);\n if (existing) {\n return existing;\n }\n else {\n var newMap = new Map();\n this.serverToClientIds.set(tableName, newMap);\n return newMap;\n }\n };\n TempIdMap.prototype.serverToClientPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n // We map PK in a separate pass, as we need to remap all PKs before re-mapping FKs\n this.mapFields(patch, function (f) { return f.isGenerated; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var clientId = _this.getServerToClientMap(tableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(tableName).set(fieldValue, clientId);\n }\n entityPatch[fieldName] = clientId;\n });\n this.mapFields(patch, function (f) { return !!(f.fk || (f.default != null) || f.toClient); }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var isUndefined = typeof (fieldValue) === 'undefined';\n if (fieldSchema.default != null && fieldValue == null) {\n fieldValue = fieldSchema.default;\n isUndefined = false;\n }\n if (fieldSchema.fk && fieldValue != null) {\n var fkTableName = typeof fieldSchema.fk.tableName === 'function' ? fieldSchema.fk.tableName(entityPatch) : fieldSchema.fk.tableName;\n var clientId = _this.getServerToClientMap(fkTableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(fkTableName).set(fieldValue, clientId);\n }\n fieldValue = clientId;\n }\n if (!isUndefined && fieldSchema.toClient) {\n fieldValue = fieldSchema.toClient(fieldValue);\n }\n if (!isUndefined) {\n entityPatch[fieldName] = fieldValue;\n }\n });\n return patch;\n };\n TempIdMap.prototype.clientToServerPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n this.mapFields(patch, function (f) { return f.isGenerated || !!f.fk; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n if (fieldValue != null) {\n var existingId = _this.clientToServerIds.get(fieldValue);\n if (existingId) {\n entityPatch[fieldName] = existingId;\n }\n }\n });\n this.mapFields(patch, function (f) { return !(f.isClientOnly || f.isReadOnly) && !!f.toServer; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n entityPatch[fieldName] = fieldSchema.toServer(entityPatch[fieldName]);\n });\n this.mapFields(patch, function (meta) { return meta.isClientOnly || meta.isReadOnly; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n delete entityPatch[fieldName];\n });\n return patch;\n };\n TempIdMap.prototype.appendServerMapping = function (response) {\n var _this = this;\n (0, utils_1.objectKeys)(response.submit).forEach(function (tableName) {\n if (_this.db.tables[tableName]) {\n var tablePatch = response.submit[tableName];\n if (tablePatch) {\n var serverToClientIds_1 = _this.getServerToClientMap(tableName);\n var table_1 = _this.db.tables[tableName];\n tablePatch.forEach(function (patch) {\n if (isTempId(patch.id)) {\n var clientId = patch.id;\n var serverId = table_1.getId(patch.payload);\n serverToClientIds_1.set(serverId, clientId);\n _this.clientToServerIds.set(clientId, serverId);\n }\n });\n }\n }\n });\n };\n return TempIdMap;\n}());\nexports.TempIdMap = TempIdMap;\n"},{"id":"./src/types.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/types.ts","name":"./src/types.ts","index":4,"index2":1,"size":379,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./types","loc":"4:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./types","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRelationType = void 0;\nvar DbRelationType;\n(function (DbRelationType) {\n DbRelationType[DbRelationType[\"Aggregation\"] = 0] = \"Aggregation\";\n DbRelationType[DbRelationType[\"Association\"] = 1] = \"Association\";\n})(DbRelationType = exports.DbRelationType || (exports.DbRelationType = {}));\n"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts","index":6,"index2":6,"size":1823,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"./utils","loc":"5:14-32"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./utils","loc":"9:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"./utils","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.difference = exports.defaultCompareViewDependencies = exports.objectKeys = void 0;\nvar tslib_1 = require(\"tslib\");\nvar shallowequal_1 = (0, tslib_1.__importDefault)(require(\"shallowequal\"));\nvar lodash_zip_1 = (0, tslib_1.__importDefault)(require(\"lodash.zip\"));\nvar lodash_transform_1 = (0, tslib_1.__importDefault)(require(\"lodash.transform\"));\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\n// TBD: New typescript would contain better typing for this. Remove this hack after update.\nexports.objectKeys = Object.keys;\nfunction defaultCompareViewDependencies(prev, next) {\n if (Array.isArray(prev) && Array.isArray(next)) {\n if (prev.length === next.length) {\n return (0, lodash_zip_1.default)(prev, next).every(function (_a) {\n var p = _a[0], n = _a[1];\n return (0, shallowequal_1.default)(p, n);\n });\n }\n return false;\n }\n return (0, shallowequal_1.default)(prev, next);\n}\nexports.defaultCompareViewDependencies = defaultCompareViewDependencies;\n/**\n * Deep diff between two object, using lodash\n * @param {Object} object Object compared\n * @param {Object} base Object to compare with\n * @return {Object} Return a new object who represent the diff\n */\nfunction difference(object, base) {\n function changes(object, base) {\n return (0, lodash_transform_1.default)(object, function (result, value, key) {\n if (!(0, lodash_isequal_1.default)(value, base[key])) {\n result[key] = (typeof value === \"object\" && typeof base[key] === \"object\") ? changes(value, base[key]) : value;\n }\n });\n }\n return changes(object, base);\n}\nexports.difference = difference;\n"},{"id":"@epam/uui-core","identifier":"external \"@epam/uui-core\"","name":"external \"@epam/uui-core\"","index":13,"index2":9,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"10:17-42"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"6:17-42"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"immutable","identifier":"external \"immutable\"","name":"external \"immutable\"","index":12,"index2":8,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","issuerId":"./src/DbTable.ts","issuerName":"./src/DbTable.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbTable.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","name":"./src/DbTable.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"5:34-54"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"7:18-38"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"immutable","loc":"6:34-54"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.countby","identifier":"external \"lodash.countby\"","name":"external \"lodash.countby\"","index":19,"index2":14,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.countby","loc":"11:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.filter","identifier":"external \"lodash.filter\"","name":"external \"lodash.filter\"","index":20,"index2":15,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.filter","loc":"12:51-75"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.foreach","identifier":"external \"lodash.foreach\"","name":"external \"lodash.foreach\"","index":21,"index2":16,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.foreach","loc":"13:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.groupby","identifier":"external \"lodash.groupby\"","name":"external \"lodash.groupby\"","index":16,"index2":11,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.groupby","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isempty","identifier":"external \"lodash.isempty\"","name":"external \"lodash.isempty\"","index":24,"index2":20,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"lodash.isempty","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isequal","identifier":"external \"lodash.isequal\"","name":"external \"lodash.isequal\"","index":10,"index2":5,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","issuerId":"./src/Db.ts","issuerName":"./src/Db.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"6:52-77"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.map","identifier":"external \"lodash.map\"","name":"external \"lodash.map\"","index":17,"index2":12,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.map","loc":"9:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.merge","identifier":"external \"lodash.merge\"","name":"external \"lodash.merge\"","index":18,"index2":13,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.merge","loc":"10:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.pick","identifier":"external \"lodash.pick\"","name":"external \"lodash.pick\"","index":22,"index2":17,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.pick","loc":"14:49-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.transform","identifier":"external \"lodash.transform\"","name":"external \"lodash.transform\"","index":9,"index2":4,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.transform","loc":"7:54-81"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.zip","identifier":"external \"lodash.zip\"","name":"external \"lodash.zip\"","index":8,"index2":3,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.zip","loc":"6:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"react","identifier":"external \"react\"","name":"external \"react\"","index":29,"index2":25,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","issuerId":"./src/reactHooks.ts","issuerName":"./src/reactHooks.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"react","loc":"5:14-30"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"shallowequal","identifier":"external \"shallowequal\"","name":"external \"shallowequal\"","index":7,"index2":2,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"shallowequal","loc":"5:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4}],"filteredModules":0,"origins":[{"module":"","moduleIdentifier":"","moduleName":"","loc":"main","request":null,"reasons":[]}]}],"modules":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx","index":0,"index2":29,"size":28,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"multi entry"}],"providedExports":null,"optimizationBailout":[],"depth":0},{"id":"../node_modules/tslib/tslib.es6.js","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/tslib/tslib.es6.js","name":"../node_modules/tslib/tslib.es6.js","index":2,"index2":0,"size":12280,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/ListLoadingTracker.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","module":"./src/ListLoadingTracker.ts","moduleName":"./src/ListLoadingTracker.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"tslib","loc":"3:14-30"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"tslib","loc":"4:14-30"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"tslib","loc":"4:14-30"}],"providedExports":["__extends","__assign","__rest","__decorate","__param","__metadata","__awaiter","__generator","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn"],"optimizationBailout":[],"depth":2,"source":"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx","index":1,"index2":28,"size":163,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":0,"issuerName":"multi ./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":0,"moduleIdentifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"multi ./index.tsx","moduleName":"multi ./index.tsx","type":"single entry","userRequest":"/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","loc":"main[0]"}],"providedExports":null,"optimizationBailout":[],"depth":1,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./src\"), exports);\n"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts","index":5,"index2":7,"size":2875,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./Db","loc":"5:26-41"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Db = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\nvar Db = /** @class */ (function () {\n function Db(tables, reusedCache) {\n this.tables = tables;\n this.viewCache = new Map();\n /* Views (cached db projections) */\n this.valueAbsent = Symbol(\"ValueAbsent\");\n if (reusedCache) {\n this.viewCache = new Map(reusedCache);\n }\n else {\n this.viewCache = new Map();\n }\n }\n Db.prototype.update = function (mutate) {\n var clone = new this.constructor(this.tables, this.viewCache);\n clone.tables = (0, tslib_1.__assign)({}, this.tables);\n mutate(clone);\n return clone;\n };\n Db.prototype.with = function (patch) {\n return this.update(function (db) {\n (0, utils_1.objectKeys)(db.tables).forEach(function (entityName) {\n if (patch[entityName]) {\n db.tables[entityName] = db.tables[entityName].with(patch[entityName]);\n }\n });\n });\n };\n Db.prototype.runView = function (view, params) {\n var cache = this.viewCache.get(view);\n if (!cache) {\n cache = new Map();\n this.viewCache.set(view, cache);\n }\n var key = view.getKey ? view.getKey(params) : JSON.stringify(params);\n var cacheItem = cache.get(key);\n if (!cacheItem) {\n cacheItem = {\n dependencies: this.valueAbsent,\n currentValue: this.valueAbsent,\n computedOnDb: this.valueAbsent,\n };\n cache.set(key, cacheItem);\n }\n var shouldUpdate = this !== cacheItem.computedOnDb;\n var dependencies = this.valueAbsent;\n if (view.getDependencies) {\n var compare = view.compareDependencies || utils_1.defaultCompareViewDependencies;\n dependencies = view.getDependencies(this, params);\n shouldUpdate = !compare(cacheItem.dependencies, dependencies);\n }\n var previousValue = cacheItem.currentValue;\n if (shouldUpdate) {\n cacheItem.dependencies = dependencies;\n var newValue = view.compute(this, params, dependencies);\n cacheItem.computedOnDb = this;\n var compareResults = view.compareResults || lodash_isequal_1.default;\n if (!compareResults(previousValue, newValue)) {\n if (view.traceDiff) {\n console.debug((0, utils_1.difference)(previousValue, newValue));\n }\n cacheItem.currentValue = newValue;\n }\n }\n return cacheItem.currentValue;\n };\n return Db;\n}());\nexports.Db = Db;\n"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts","index":14,"index2":24,"size":9346,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbRef","loc":"7:26-44"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRef = void 0;\nvar tslib_1 = require(\"tslib\");\nvar patchHelpers_1 = require(\"./patchHelpers\");\nvar tempIds_1 = require(\"./tempIds\");\nvar utils_1 = require(\"./utils\");\nvar lodash_isempty_1 = (0, tslib_1.__importDefault)(require(\"lodash.isempty\"));\nvar Loader_1 = require(\"./Loader\");\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar SimpleLoadingTracker_1 = require(\"./SimpleLoadingTracker\");\nvar ListLoadingTracker_1 = require(\"./ListLoadingTracker\");\nvar DbRef = /** @class */ (function () {\n function DbRef(blank) {\n var _this = this;\n this.blank = blank;\n this.log = [];\n this.autoSave = true;\n this.savedPoint = 0;\n this.throttleSaveMs = 1000;\n /* Update subscriptions (aka live views) */\n this.lastSubscriptionId = 1;\n this.subscriptions = new Map();\n this.updateHandlers = [];\n /* Error Subscriptions */\n this.saveErrorHandlers = [];\n /* Save scheduling */\n this.enqueueSave = (0, uui_core_1.batch)(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {\n var cumulativePatch, lastLogEntry, response, error_1;\n return (0, tslib_1.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n cumulativePatch = this.makeCumulativePatch();\n lastLogEntry = this.log.length;\n if ((0, lodash_isempty_1.default)(cumulativePatch)) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.savePatch(cumulativePatch)];\n case 2:\n response = _a.sent();\n this.applyResponse(response, lastLogEntry);\n this.update();\n return [3 /*break*/, 4];\n case 3:\n error_1 = _a.sent();\n this.saveError(cumulativePatch, error_1);\n this.update();\n throw error_1;\n case 4: return [2 /*return*/];\n }\n });\n }); });\n this.handleBeforeUnload = function (e) {\n if (_this.enqueueSave.isBusy) {\n e.returnValue = false;\n return false;\n }\n };\n this.loaders = [];\n this.db = blank;\n this.base = blank;\n this.tempIdMap = new tempIds_1.TempIdMap(blank);\n this.idMap = this.tempIdMap;\n window.addEventListener('beforeunload', this.handleBeforeUnload);\n }\n /** Saves all committed patches. Useful only if autoSave is off. */\n DbRef.prototype.save = function () {\n return this.enqueueSave();\n };\n DbRef.prototype.getAutoSave = function () {\n return this.autoSave;\n };\n DbRef.prototype.setAutoSave = function (val) {\n if (this.autoSave != val) {\n this.autoSave = val;\n this.autoSave && this.enqueueSave();\n this.update();\n }\n };\n DbRef.prototype.revert = function () {\n this.db = this.base;\n this.log = this.log.slice(0, this.savedPoint);\n this.update();\n };\n /** Concrete DbRef instances should override and implement their save logic in this method */\n DbRef.prototype.savePatch = function (patch) {\n return Promise.resolve({ submit: {} });\n };\n /* Db Update logic */\n DbRef.prototype.commit = function (patch) {\n var dbBeforeUpdate = this.db.with(patch);\n patch = this.beforeUpdate(patch, dbBeforeUpdate.tables, this.db.tables);\n patch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, patch);\n this.log.push({ patch: patch });\n this.db = this.db.with(patch);\n this.autoSave && this.enqueueSave(null, { throttleMs: this.throttleSaveMs });\n this.update();\n };\n DbRef.prototype.beforeUpdate = function (patch, tables, prevTables) {\n var _this = this;\n var patchAndDependencies = {};\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && !tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n patchAndDependencies[entityName] = patch[entityName];\n });\n (0, utils_1.objectKeys)(tables).filter(function (entityName) { return patch[entityName] && tables[entityName].schema.beforeUpdate; }).forEach(function (entityName) {\n var _a;\n var schema = tables[entityName].schema;\n var beforeUpdate = schema.beforeUpdate;\n var context = {\n clientIdsMap: _this.tempIdMap,\n schema: schema,\n tables: tables,\n prevTables: prevTables,\n };\n var results = patch[entityName].map(function (e) { return beforeUpdate(e, context); });\n var updatedPatch = (_a = {}, _a[entityName] = results.map(function (result) { return result.entity; }), _a);\n var dependentEntityPatchesForUpdate = (0, patchHelpers_1.unionPatches)(results.filter(function (result) { return result.dependentEntities; }).map(function (result) { return result.dependentEntities; }));\n var dependentEntityPatches = _this.beforeUpdate(dependentEntityPatchesForUpdate, tables, prevTables);\n patchAndDependencies = (0, patchHelpers_1.mergeEntityPatches)(tables, (0, patchHelpers_1.unionPatches)([patchAndDependencies, updatedPatch, dependentEntityPatches]));\n });\n return patchAndDependencies;\n };\n DbRef.prototype.commitFetch = function (patch) {\n patch = this.tempIdMap.serverToClientPatch(patch);\n this.rebase(this.base.with(patch));\n this.update();\n };\n DbRef.prototype.rebase = function (newBase) {\n this.base = newBase;\n this.db = newBase;\n for (var n = this.savedPoint; n < this.log.length; n++) {\n this.db = this.db.with(this.log[n].patch);\n }\n };\n DbRef.prototype.makeCumulativePatch = function () {\n var lastLogEntry = this.log.length;\n var logEntriesToSave = this.log.slice(this.savedPoint, lastLogEntry);\n var cumulativePatch = (0, patchHelpers_1.makeCumulativePatch)(this.db, logEntriesToSave.map(function (t) { return t.patch; }), this.tempIdMap);\n cumulativePatch = this.tempIdMap.clientToServerPatch(cumulativePatch);\n return cumulativePatch;\n };\n DbRef.prototype.applyResponse = function (response, newSavedPoint) {\n this.tempIdMap.appendServerMapping(response);\n var serverPatch = (0, patchHelpers_1.flattenResponse)(response.submit, this.db.tables);\n serverPatch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, serverPatch);\n this.savedPoint = newSavedPoint;\n this.base = this.db;\n this.commitFetch(serverPatch);\n };\n DbRef.prototype.subscribe = function (view, params, onUpdate) {\n var _this = this;\n var id = this.lastSubscriptionId++;\n var subscription = {\n update: function (params) {\n subscription.currentParams = params;\n subscription.currentValue = _this.db.runView(view, params);\n return subscription.currentValue;\n },\n currentParams: null,\n currentValue: null,\n onUpdate: onUpdate,\n unsubscribe: function () { _this.subscriptions.delete(id); },\n };\n subscription.update(params);\n this.subscriptions.set(id, subscription);\n return subscription;\n };\n DbRef.prototype.onUpdate = function (handler) {\n this.subscribe({\n compute: function (db) { return db; },\n compareResults: function (a, b) { return a === b; },\n }, null, handler);\n };\n DbRef.prototype.update = function () {\n this.subscriptions.forEach(function (subscription) {\n var previousValue = subscription.currentValue;\n subscription.update(subscription.currentParams);\n if (subscription.currentValue !== previousValue && subscription.onUpdate) {\n subscription.onUpdate(subscription.currentValue);\n }\n });\n };\n DbRef.prototype.onSaveError = function (handler) {\n this.saveErrorHandlers.push(handler);\n };\n DbRef.prototype.saveError = function (request, error) {\n this.saveErrorHandlers.forEach(function (handler) { return handler(request, error); });\n };\n DbRef.prototype.makeLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new SimpleLoadingTracker_1.SimpleLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.makeListLoader = function (options) {\n var loader = new Loader_1.Loader(this, function () { return new ListLoadingTracker_1.ListLoadingTracker(); }, options);\n this.loaders.push(loader);\n return loader;\n };\n DbRef.prototype.reload = function () {\n this.loaders = [];\n };\n return DbRef;\n}());\nexports.DbRef = DbRef;\n"},{"id":"./src/DbTable.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","name":"./src/DbTable.ts","index":11,"index2":10,"size":10036,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbTable","loc":"6:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbTable = void 0;\nvar tslib_1 = require(\"tslib\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar uui_core_1 = require(\"@epam/uui-core\");\nvar immutable_1 = require(\"immutable\");\nvar DbTable = /** @class */ (function () {\n function DbTable(schema, state, q) {\n this.schema = schema;\n this.state = state;\n this.q = q;\n if (!state) {\n var indexes = (schema.indexes || []).map(function (indexDef) {\n return {\n field: indexDef,\n map: I.Map(),\n };\n });\n this.state = { pk: I.Map(), indexes: indexes };\n }\n if (!q) {\n this.q = {};\n }\n }\n DbTable.prototype.keyToImmutable = function (id) {\n if (Array.isArray(id)) {\n return I.List(id);\n }\n else {\n return id;\n }\n };\n DbTable.prototype.byId = function (id) {\n return this.state.pk.get(this.keyToImmutable(id));\n };\n DbTable.prototype.getId = function (entity) {\n if (Array.isArray(this.schema.primaryKey)) {\n return this.schema.primaryKey.map(function (key) { return entity[key]; });\n }\n return entity[this.schema.primaryKey];\n };\n DbTable.prototype.update = function (mutate) {\n var clone = new this.constructor(this.schema, this.state, this.q);\n mutate(clone);\n return clone;\n };\n /* Mutation */\n DbTable.prototype.with = function (patch) {\n var _this = this;\n var updates = patch.map(function (entityPatch) {\n var id = _this.getId(entityPatch);\n var immId = _this.keyToImmutable(id);\n var existing = _this.state.pk.get(immId);\n var isDeleted = false;\n var updated = entityPatch;\n if (existing) {\n updated = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, existing), entityPatch);\n if (_this.schema.deleteFlag) {\n isDeleted = updated[_this.schema.deleteFlag] === true;\n }\n }\n return { id: id, immId: immId, patch: entityPatch, existing: existing, updated: updated, isNew: !existing, isDeleted: isDeleted };\n });\n var idVal = immutable_1.Seq.Keyed(updates.map(function (entity) { return [entity.immId, entity.updated]; }));\n var newPk = this.state.pk.merge(idVal);\n // TBD: replace with deleteAll after migrating to immutable 4\n updates.filter(function (u) { return u.isDeleted; }).forEach(function (u) {\n newPk = newPk.delete(u.immId);\n });\n var newIndexes = this.state.indexes.map(function (index) {\n var newMap = index.map;\n var _loop_1 = function (n) {\n var update = updates[n];\n var newKey = update.updated[index.field];\n if (update.existing) {\n var oldKey = update.existing[index.field];\n if (oldKey !== newKey || update.isDeleted) {\n newMap = newMap.update(oldKey, function (set) { return set.remove(update.immId); });\n }\n }\n if (!update.isDeleted) {\n newMap = newMap.update(newKey, I.Set(), function (set) { return set.add(update.immId); });\n }\n };\n for (var n = 0; n < updates.length; n++) {\n _loop_1(n);\n }\n return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, index), { map: newMap });\n });\n var newState = { pk: newPk, indexes: newIndexes };\n return this.update(function (t) { return t.state = newState; });\n };\n /* Query */\n DbTable.prototype.find = function (filter) {\n var _this = this;\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { filter: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, _this.q.filter), filter) }); });\n };\n DbTable.prototype.order = function (order) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: order }); });\n };\n DbTable.prototype.orderBy = function (field, direction) {\n if (direction === void 0) { direction = 'asc'; }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: [{ field: field, direction: direction }] }); });\n };\n DbTable.prototype.thenBy = function (field, direction) {\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { sorting: (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], t.q.sorting, true), [{ field: field, direction: direction }], false) }); });\n };\n DbTable.prototype.search = function (text) {\n if (!this.schema.searchBy) {\n throw new Error(\"Can't search in the \".concat(this.schema.typeName, \" table - searchBy is not defined in the schema.\"));\n }\n return this.update(function (t) { return t.q = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, t.q), { search: text }); });\n };\n /* Materializing */\n DbTable.prototype.range = function (from, count) {\n return this.runQuery((0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.q), { range: { from: from, count: count } }));\n };\n DbTable.prototype.count = function () {\n return this.runQuery(this.q).length;\n };\n DbTable.prototype.one = function () {\n return this.runQuery(this.q)[0] || null;\n };\n DbTable.prototype.toArray = function () {\n return this.runQuery(this.q);\n };\n DbTable.prototype.map = function (fn) {\n return this.toArray().map(fn);\n };\n /* Query implementation */\n DbTable.prototype.runQuery = function (q) {\n var _this = this;\n var result = null;\n var filter = q.filter;\n if (filter) {\n var indexes = this.state.indexes;\n // Try to use indexes to fulfill filter conditions\n for (var n = 0; n < indexes.length; n++) {\n var index = indexes[n];\n if (index.field in filter) {\n var _a = filter, _b = index.field, condition = _a[_b], rest = (0, tslib_1.__rest)(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n var conditionValues = null;\n if (condition != null && typeof condition === \"object\") {\n // Attempt to use index for 'in' and 'isNull' criteria.\n // We need to be very conservative here, indexed field should work the same way as getPatternPredicate. So\n // - it's better to leave corner cases to getPatternPredicate\n var _c = condition, inCriteria = _c.in, nullCriteria = _c.isNull, restCriteria = (0, tslib_1.__rest)(_c, [\"in\", \"isNull\"]);\n if (inCriteria && Array.isArray(inCriteria)) {\n conditionValues = inCriteria;\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Conditions in getPatternPredicate are composed with 'and' logic,\n // For now, let's not attempt to handle tricky cases like { in: [1,2] isNull: true }, or { in: [1, null] isNull: false }\n // - just leave this to getPatternPredicate.\n // Let's just handle the a most common case { isNull: true } - find all null and undefined\n if (nullCriteria === true && !conditionValues) {\n conditionValues = [null, undefined];\n }\n else {\n restCriteria.in = inCriteria;\n }\n // Keep other conditions, e.g. { in: [1,2,3], isNull: true } - in works via index, isNull - via filter\n if (Object.keys(restCriteria).length > 0) {\n rest[index.field] = restCriteria;\n }\n }\n else {\n conditionValues = [condition];\n }\n if (conditionValues) {\n result = [];\n for (var i = 0; i < conditionValues.length; i++) {\n var idsSet = index.map.get(conditionValues[i]);\n if (idsSet) {\n var idsArray = idsSet.toArray();\n for (var j = 0; j < idsArray.length; j++) {\n var item = this.state.pk.get(idsArray[j]);\n result.push(item);\n }\n }\n }\n filter = Object.keys(rest).length > 0 ? rest : null;\n break;\n }\n }\n }\n }\n if (!result) {\n result = this.state.pk.toArray();\n }\n if (filter) {\n var predicate = (0, uui_core_1.getFilterPredicate)(q.filter);\n result = result.filter(predicate);\n }\n if (q.search) {\n var searchFilter_1 = (0, uui_core_1.getSearchFilter)(q.search);\n result = result.filter(function (item) { return searchFilter_1(_this.schema.searchBy.map(function (field) { return item[field]; })); });\n }\n if (q.sorting) {\n var comparer = (0, uui_core_1.getOrderComparer)(q.sorting);\n result = result.sort(comparer);\n }\n if (q.range) {\n result = result.slice(q.range.from, q.range.from + q.range.count);\n }\n return result;\n };\n return DbTable;\n}());\nexports.DbTable = DbTable;\n"},{"id":"./src/ListLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/ListLoadingTracker.ts","name":"./src/ListLoadingTracker.ts","index":27,"index2":23,"size":3888,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./ListLoadingTracker","loc":"12:27-58"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListLoadingTracker = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ListLoadingTracker = /** @class */ (function () {\n function ListLoadingTracker(options) {\n this.options = options;\n this.cache = new Map();\n this.extractList = (options === null || options === void 0 ? void 0 : options.extractList) || (function (r) { return r; });\n }\n ListLoadingTracker.prototype.prepare = function (request) {\n var filter = request.filter, sorting = request.sorting, search = request.search, range = request.range, unknownFields = (0, tslib_1.__rest)(request, [\"filter\", \"sorting\", \"search\", \"range\"]);\n var options = {};\n if (filter) {\n options.filter = filter;\n }\n if (sorting) {\n options.sorting = sorting;\n }\n if (search) {\n options.search = search;\n }\n var keyObject = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields);\n var key = JSON.stringify(keyObject);\n var entry = this.cache.get(key);\n if (!entry) {\n entry = { options: options, count: 0, maxCount: null, isComplete: false };\n this.cache.set(key, entry);\n }\n return { options: options, range: range, unknownFields: unknownFields, entry: entry };\n };\n ListLoadingTracker.prototype.diff = function (request) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (entry.isComplete) {\n return null;\n }\n if (!request.range) {\n return request;\n }\n else {\n var requestedMax = request.range.from + request.range.count;\n var missingCount = requestedMax - entry.count;\n if (entry.maxCount) {\n missingCount = Math.min(missingCount, entry.maxCount);\n }\n if (missingCount > 0) {\n return (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), unknownFields), { range: { from: entry.count, count: requestedMax - entry.count } });\n }\n else {\n return null;\n }\n }\n };\n ListLoadingTracker.prototype.count = function (request) {\n var entry = this.prepare(request).entry;\n return { knownCount: Math.max(entry.count, entry.maxCount), exactCount: entry.maxCount };\n };\n ListLoadingTracker.prototype.append = function (request, response) {\n var _a = this.prepare(request), options = _a.options, range = _a.range, unknownFields = _a.unknownFields, entry = _a.entry;\n if (response) {\n var list = this.extractList(response);\n if (list.count) {\n entry.maxCount = list.count;\n }\n if (!range) {\n entry.count = list.items.length;\n entry.maxCount = list.items.length;\n entry.isComplete = true;\n }\n else {\n var from = (list.from == null) ? range.from : list.from;\n if (list.items.length > 0) {\n entry.count = Math.max(entry.count, from + list.items.length);\n }\n if (list.items.length < range.count) {\n entry.maxCount = from + list.items.length;\n entry.count = entry.maxCount;\n entry.isComplete = true;\n }\n }\n }\n else {\n if (range) {\n entry.count = Math.max(entry.count, request.range.from + request.range.count);\n }\n else {\n entry.isComplete = true;\n }\n }\n };\n return ListLoadingTracker;\n}());\nexports.ListLoadingTracker = ListLoadingTracker;\n"},{"id":"./src/Loader.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Loader.ts","name":"./src/Loader.ts","index":25,"index2":21,"size":3262,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./Loader","loc":"9:15-34"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Loader = void 0;\nvar Loader = /** @class */ (function () {\n function Loader(dbRef, getTracker, options) {\n var _this = this;\n this.dbRef = dbRef;\n this.getTracker = getTracker;\n this.options = options;\n this.currentRequests = new Set();\n this.load = function (inputRequest) {\n var result = {\n isComplete: _this.loaded.diff(inputRequest) == null,\n isLoading: false,\n request: inputRequest,\n missing: _this.loadedAndLoading.diff(inputRequest),\n promise: null,\n reload: null,\n };\n result.reload = function () {\n result.missing = inputRequest;\n _this.loadImpl(result);\n };\n if (result.isComplete) {\n // Everything requested is already loaded\n result.isComplete = true;\n result.isLoading = false;\n result.promise = Promise.resolve();\n return result;\n }\n else {\n if (result.missing == null) {\n // Everything requested is either loaded already, or being loaded\n result.isComplete = false;\n result.isLoading = true;\n // There's no good way to tell which of current requests is querying requested data - there actually can be 2 of them.\n // So we track all running requests, and await all of them in such case.\n result.promise = Promise.all(_this.currentRequests.entries()).then(function () { });\n return result;\n }\n else {\n // Something requested is not loaded, nor being loaded. Need to perform a new request.\n _this.loadImpl(result);\n return result;\n }\n }\n };\n this.loaded = getTracker();\n this.loadedAndLoading = getTracker();\n }\n Loader.prototype.loadImpl = function (state) {\n var _this = this;\n this.loadedAndLoading.append(state.missing);\n state.isLoading = true;\n var serverRequest = state.missing;\n if (this.options.clientToServerRequest) {\n serverRequest = this.options.clientToServerRequest(serverRequest);\n }\n state.promise = this.options.api(serverRequest).then(function (result) {\n _this.loaded.append(state.missing, result);\n _this.loadedAndLoading.append(state.missing, result);\n state.missing = null;\n state.isLoading = false;\n state.isComplete = true;\n state.promise = Promise.resolve();\n var flatten = _this.options.convertToPatch(result);\n _this.options.postProcess && _this.options.postProcess(flatten);\n _this.dbRef.commitFetch(flatten);\n });\n this.currentRequests.add(state.promise);\n state.promise.finally(function () {\n _this.currentRequests.delete(state.promise);\n });\n return state.promise;\n };\n return Loader;\n}());\nexports.Loader = Loader;\n"},{"id":"./src/SimpleLoadingTracker.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/SimpleLoadingTracker.ts","name":"./src/SimpleLoadingTracker.ts","index":26,"index2":22,"size":712,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./SimpleLoadingTracker","loc":"11:29-62"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleLoadingTracker = void 0;\nvar SimpleLoadingTracker = /** @class */ (function () {\n function SimpleLoadingTracker() {\n this.set = new Set();\n }\n SimpleLoadingTracker.prototype.getKey = function (request) {\n return JSON.stringify(request);\n };\n SimpleLoadingTracker.prototype.diff = function (request) {\n return this.set.has(this.getKey(request)) ? null : request;\n };\n SimpleLoadingTracker.prototype.append = function (request, result) {\n this.set.add(this.getKey(request));\n };\n return SimpleLoadingTracker;\n}());\nexports.SimpleLoadingTracker = SimpleLoadingTracker;\n"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts","index":3,"index2":27,"size":570,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"./src","loc":"4:26-42"}],"providedExports":null,"optimizationBailout":[],"depth":2,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\n(0, tslib_1.__exportStar)(require(\"./types\"), exports);\n(0, tslib_1.__exportStar)(require(\"./Db\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbTable\"), exports);\n(0, tslib_1.__exportStar)(require(\"./DbRef\"), exports);\n(0, tslib_1.__exportStar)(require(\"./tempIds\"), exports);\n(0, tslib_1.__exportStar)(require(\"./utils\"), exports);\n(0, tslib_1.__exportStar)(require(\"./patchHelpers\"), exports);\n(0, tslib_1.__exportStar)(require(\"./reactHooks\"), exports);\n"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts","index":15,"index2":18,"size":9041,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"5:21-46"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"10:26-51"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEntityParentDependencies = exports.getParentEntities = exports.hasServerFields = exports.isNew = exports.getId = exports.isClientOnly = exports.makeCumulativePatch = exports.isPatchBlank = exports.flattenResponse = exports.mergeEntityPatches = exports.unionPatches = void 0;\nvar tslib_1 = require(\"tslib\");\nvar types_1 = require(\"./types\");\nvar I = (0, tslib_1.__importStar)(require(\"immutable\"));\nvar utils_1 = require(\"./utils\");\nvar lodash_groupby_1 = (0, tslib_1.__importDefault)(require(\"lodash.groupby\"));\nvar lodash_map_1 = (0, tslib_1.__importDefault)(require(\"lodash.map\"));\nvar lodash_merge_1 = (0, tslib_1.__importDefault)(require(\"lodash.merge\"));\nvar lodash_countby_1 = (0, tslib_1.__importDefault)(require(\"lodash.countby\"));\nvar lodash_filter_1 = (0, tslib_1.__importDefault)(require(\"lodash.filter\"));\nvar lodash_foreach_1 = (0, tslib_1.__importDefault)(require(\"lodash.foreach\"));\nvar lodash_pick_1 = (0, tslib_1.__importDefault)(require(\"lodash.pick\"));\nfunction unionPatches(patches) {\n var result = {};\n patches.forEach(function (patch) {\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n result[tableName] = result[tableName] ? (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], result[tableName], true), patch[tableName], true) : patch[tableName];\n });\n });\n return result;\n}\nexports.unionPatches = unionPatches;\nfunction mergeEntityPatches(tables, patch) {\n var result = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var groupedEntities = (0, lodash_groupby_1.default)(patch[key], function (item) { return table.getId(item); });\n var tablePatch = (0, lodash_map_1.default)(groupedEntities, function (entities) {\n var result = lodash_merge_1.default.apply(void 0, (0, tslib_1.__spreadArray)([{}], entities, false));\n if (process.env.NODE_ENV !== 'production') {\n var props = (0, utils_1.objectKeys)(result).filter(function (prop) {\n return Object.keys((0, lodash_countby_1.default)(entities.filter(function (entity) {\n return entity[prop] !== undefined;\n }), function (entity) { return entity[prop]; })).length > 1;\n });\n if (props.length) {\n console.warn.apply(console, (0, tslib_1.__spreadArray)(['mergeEntityPatches: Different property values found for the same entity.\\nProperty names:\\n', props, '\\nEntities:\\n'], entities, false));\n }\n }\n return result;\n });\n result[key] = tablePatch;\n });\n return result;\n}\nexports.mergeEntityPatches = mergeEntityPatches;\nfunction flattenResponseHelper(result, object, tablesByTypeName) {\n if (Array.isArray(object)) {\n object.forEach(function (item) { return flattenResponseHelper(result, item, tablesByTypeName); });\n }\n else if (typeof object === 'object') {\n var clone = {};\n var tableKey = void 0;\n var fields = {};\n if ('__typename' in object) {\n var table = tablesByTypeName[object.__typename];\n if (table) {\n tableKey = table.schema.tableName;\n fields = table.schema.fields;\n }\n }\n for (var key in object) {\n var value = object[key];\n var field = fields[key];\n if ((field && !!field.disableFlatten)\n || typeof value !== 'object'\n || value === null\n || (Array.isArray(value) && value.every(function (item) { return typeof item !== 'object'; }))) {\n clone[key] = value;\n }\n else {\n flattenResponseHelper(result, value, tablesByTypeName);\n }\n }\n if (tableKey) {\n result[tableKey].push(clone);\n }\n }\n}\nfunction flattenResponse(response, tables) {\n var result = {};\n var tablesByTypeName = {};\n Object.values(tables).forEach(function (table) { return tablesByTypeName[table.schema.typeName] = table; });\n (0, utils_1.objectKeys)(tables).forEach(function (tableName) { return tablesByTypeName; });\n (0, utils_1.objectKeys)(tables).forEach(function (key) { return result[key] = []; });\n flattenResponseHelper(result, response, tablesByTypeName);\n return result;\n}\nexports.flattenResponse = flattenResponse;\nfunction isPatchBlank(patch) {\n return !(0, utils_1.objectKeys)(patch).some(function (key) { return patch[key].length > 0; });\n}\nexports.isPatchBlank = isPatchBlank;\n/**\n * Given several patches, creates a new single patch with all fields from all entities in all patches.\n */\nfunction makeCumulativePatch(updatedDb, patches, clientIdsMap) {\n var result = {};\n (0, utils_1.objectKeys)(updatedDb.tables).forEach(function (entityName) {\n var table = updatedDb.tables[entityName];\n var schema = table.schema;\n var ids = I.Set();\n patches.forEach(function (patch) {\n var filteredPatch = (patch[entityName] || []).filter(function (entity) { return hasServerFields(entity, schema, clientIdsMap, updatedDb.tables); });\n ids = ids.union(filteredPatch.map(function (e) { return table.getId(e); }));\n });\n var entities = ids\n .map(function (id) { return table.byId(id); })\n .filter(function (e) { return !isClientOnly(e, schema); })\n .toArray();\n if (entities.length > 0) {\n result[entityName] = entities;\n }\n });\n return result;\n}\nexports.makeCumulativePatch = makeCumulativePatch;\nfunction isClientOnly(entity, schema) {\n if (typeof schema.isClientOnly === 'function') {\n return schema.isClientOnly(entity);\n }\n return !!schema.isClientOnly;\n}\nexports.isClientOnly = isClientOnly;\nfunction getId(entity, schema) {\n if (typeof schema.primaryKey == 'string') {\n return entity[schema.primaryKey];\n }\n var result = [];\n (0, lodash_foreach_1.default)((0, lodash_pick_1.default)(entity, schema.primaryKey), function (value) {\n result.push(value);\n });\n return result;\n}\nexports.getId = getId;\nfunction isNew(entity, schema, clientIdsMap) {\n var id = getId(entity, schema);\n return !clientIdsMap.clientToServer(id);\n}\nexports.isNew = isNew;\nfunction hasServerFields(entity, schema, clientIdsMap, tables) {\n var fullEntity = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, tables[schema.tableName].byId(entity.id) || {}), entity);\n if (isClientOnly(fullEntity, schema)) {\n return false;\n }\n return (0, utils_1.objectKeys)(entity).some(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n return !fieldSchema || !(fieldSchema.isClientOnly || fieldSchema.isReadOnly || (fieldSchema.isGenerated && !isNew(entity, schema, clientIdsMap)));\n });\n}\nexports.hasServerFields = hasServerFields;\nfunction getParentEntities(patch, tables) {\n var dependenciesPatch = {};\n (0, utils_1.objectKeys)(patch).forEach(function (key) {\n var table = tables[key];\n var tableSchema = table.schema;\n var fields = (0, lodash_filter_1.default)((0, lodash_map_1.default)(tableSchema.fields, function (field, name) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, field), { name: name })); }), function (field) { return field.fk && field.fk.relationType == types_1.DbRelationType.Aggregation; });\n var tablePatch = patch[key];\n fields.forEach(function (field) {\n var tableName = field.fk.tableName, name = field.name;\n tablePatch.forEach(function (entity) {\n var actualTableName = (typeof tableName == 'function' ? tableName(entity) : tableName);\n var dbEntity = table.byId(table.getId(entity));\n var parentEntity = tables[actualTableName].byId(dbEntity[name]);\n var idFields = (0, lodash_pick_1.default)(parentEntity, tables[actualTableName].schema.primaryKey);\n if (parentEntity) {\n dependenciesPatch[actualTableName] = dependenciesPatch[actualTableName] || [];\n dependenciesPatch[actualTableName].push(idFields);\n }\n });\n });\n });\n return dependenciesPatch;\n}\nexports.getParentEntities = getParentEntities;\nfunction getEntityParentDependencies(entity, entityName, tables) {\n var _a;\n var patch = (_a = {}, _a[entityName] = [entity], _a);\n var resultPatches = [];\n while (true) {\n var parents = getParentEntities(patch, tables);\n if (isPatchBlank(parents)) {\n break;\n }\n resultPatches.push(parents);\n patch = parents;\n }\n var result = unionPatches((0, tslib_1.__spreadArray)([patch], resultPatches, true));\n result = mergeEntityPatches(tables, result);\n return result;\n}\nexports.getEntityParentDependencies = getEntityParentDependencies;\n"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts","index":28,"index2":26,"size":892,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./reactHooks","loc":"11:26-49"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useDbView = exports.useDbRef = exports.DbContext = void 0;\nvar tslib_1 = require(\"tslib\");\nvar react_1 = require(\"react\");\nexports.DbContext = (0, react_1.createContext)(null);\nfunction useDbRef() {\n return (0, react_1.useContext)(exports.DbContext);\n}\nexports.useDbRef = useDbRef;\nfunction useDbView(fn, params, options) {\n var dbRef = useDbRef();\n var _a = (0, react_1.useState)(), state = _a[0], setState = _a[1];\n var subscription = (0, react_1.useMemo)(function () { return dbRef.subscribe((0, tslib_1.__assign)({ compute: fn }, options), params, setState); }, []);\n subscription.update(params);\n (0, react_1.useEffect)(function () {\n return function () { return subscription.unsubscribe(); };\n }, []);\n return subscription.currentValue;\n}\nexports.useDbView = useDbView;\n"},{"id":"./src/tempIds.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","name":"./src/tempIds.tsx","index":23,"index2":19,"size":8418,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./tempIds","loc":"6:16-36"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./tempIds","loc":"8:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TempIdMap = exports.isTempId = exports.getTempId = void 0;\nvar tslib_1 = require(\"tslib\");\nvar utils_1 = require(\"./utils\");\nvar lastTempId = -1;\nfunction getTempId() {\n return --lastTempId;\n}\nexports.getTempId = getTempId;\nfunction isTempId(val) {\n return typeof val === 'number' && val < 0;\n}\nexports.isTempId = isTempId;\nvar TempIdMap = /** @class */ (function () {\n function TempIdMap(db) {\n var _this = this;\n this.db = db;\n this.serverToClientIds = new Map();\n this.clientToServerIds = new Map();\n this.clientToServer = function (id) { return _this.clientToServerIds.get(id); };\n this.serverToClient = function (tableName, id) { return _this.getServerToClientMap(tableName).get(id); };\n this.clientToServerRequest = function (request) {\n request = (0, tslib_1.__assign)({}, request);\n if (request.filter) {\n request.filter = _this.clientToServerDataFilter(request.filter);\n }\n return request;\n };\n this.clientToServerDataFilter = function (filter) {\n filter = (0, tslib_1.__assign)({}, filter);\n var keys = Object.keys(filter);\n // I hope that we can rely that there won't be any negative numbers, which are not IDs, in queries.\n // We need to invent better heuristics or a schema otherwise.\n var clientToServer = function (id) {\n var found = _this.clientToServer(id);\n if (found) {\n return found;\n }\n else {\n return id;\n }\n };\n for (var n = 0; n < keys.length; n++) {\n var key = keys[n];\n var condition = filter[key];\n if (condition != null && typeof condition === \"object\") {\n condition = (0, tslib_1.__assign)({}, condition);\n if ('in' in condition && Array.isArray(condition.in) && condition.in.length) {\n condition.in = condition.in.map(clientToServer);\n }\n }\n else {\n condition = clientToServer(condition);\n }\n filter[key] = condition;\n }\n return filter;\n };\n }\n TempIdMap.prototype.copyPatch = function (patch) {\n var newPatch = (0, tslib_1.__assign)({}, patch);\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var tablePatch = patch[tableName].map(function (entityPatch) { return ((0, tslib_1.__assign)({}, entityPatch)); });\n newPatch[tableName] = tablePatch;\n });\n return newPatch;\n };\n // Iterate thru every field in every patch for every table, matching certain field criteria. The patch is mutated!\n TempIdMap.prototype.mapFields = function (patch, filter, callback) {\n var _this = this;\n (0, utils_1.objectKeys)(patch).forEach(function (tableName) {\n var schema = _this.db.tables[tableName].schema;\n var fields = (0, utils_1.objectKeys)(schema.fields || [])\n .map(function (fieldName) {\n var fieldSchema = schema.fields[fieldName];\n if (filter(fieldSchema, fieldName)) {\n return { name: fieldName, schema: fieldSchema };\n }\n })\n .filter(function (f) { return !!f; });\n if (!fields.length) {\n return;\n }\n patch[tableName].forEach(function (entityPatch) {\n for (var n = 0; n < fields.length; n++) {\n var field = fields[n];\n var fieldValue = entityPatch[field.name];\n callback(field.name, field.schema, fieldValue, entityPatch, tableName);\n }\n });\n });\n };\n TempIdMap.prototype.getServerToClientMap = function (tableName) {\n var existing = this.serverToClientIds.get(tableName);\n if (existing) {\n return existing;\n }\n else {\n var newMap = new Map();\n this.serverToClientIds.set(tableName, newMap);\n return newMap;\n }\n };\n TempIdMap.prototype.serverToClientPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n // We map PK in a separate pass, as we need to remap all PKs before re-mapping FKs\n this.mapFields(patch, function (f) { return f.isGenerated; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var clientId = _this.getServerToClientMap(tableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(tableName).set(fieldValue, clientId);\n }\n entityPatch[fieldName] = clientId;\n });\n this.mapFields(patch, function (f) { return !!(f.fk || (f.default != null) || f.toClient); }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n var isUndefined = typeof (fieldValue) === 'undefined';\n if (fieldSchema.default != null && fieldValue == null) {\n fieldValue = fieldSchema.default;\n isUndefined = false;\n }\n if (fieldSchema.fk && fieldValue != null) {\n var fkTableName = typeof fieldSchema.fk.tableName === 'function' ? fieldSchema.fk.tableName(entityPatch) : fieldSchema.fk.tableName;\n var clientId = _this.getServerToClientMap(fkTableName).get(fieldValue);\n if (!clientId) {\n clientId = getTempId();\n _this.clientToServerIds.set(clientId, fieldValue);\n _this.getServerToClientMap(fkTableName).set(fieldValue, clientId);\n }\n fieldValue = clientId;\n }\n if (!isUndefined && fieldSchema.toClient) {\n fieldValue = fieldSchema.toClient(fieldValue);\n }\n if (!isUndefined) {\n entityPatch[fieldName] = fieldValue;\n }\n });\n return patch;\n };\n TempIdMap.prototype.clientToServerPatch = function (patch) {\n var _this = this;\n patch = this.copyPatch(patch);\n this.mapFields(patch, function (f) { return f.isGenerated || !!f.fk; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n if (fieldValue != null) {\n var existingId = _this.clientToServerIds.get(fieldValue);\n if (existingId) {\n entityPatch[fieldName] = existingId;\n }\n }\n });\n this.mapFields(patch, function (f) { return !(f.isClientOnly || f.isReadOnly) && !!f.toServer; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n entityPatch[fieldName] = fieldSchema.toServer(entityPatch[fieldName]);\n });\n this.mapFields(patch, function (meta) { return meta.isClientOnly || meta.isReadOnly; }, function (fieldName, fieldSchema, fieldValue, entityPatch, tableName) {\n delete entityPatch[fieldName];\n });\n return patch;\n };\n TempIdMap.prototype.appendServerMapping = function (response) {\n var _this = this;\n (0, utils_1.objectKeys)(response.submit).forEach(function (tableName) {\n if (_this.db.tables[tableName]) {\n var tablePatch = response.submit[tableName];\n if (tablePatch) {\n var serverToClientIds_1 = _this.getServerToClientMap(tableName);\n var table_1 = _this.db.tables[tableName];\n tablePatch.forEach(function (patch) {\n if (isTempId(patch.id)) {\n var clientId = patch.id;\n var serverId = table_1.getId(patch.payload);\n serverToClientIds_1.set(serverId, clientId);\n _this.clientToServerIds.set(clientId, serverId);\n }\n });\n }\n }\n });\n };\n return TempIdMap;\n}());\nexports.TempIdMap = TempIdMap;\n"},{"id":"./src/types.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/types.ts","name":"./src/types.ts","index":4,"index2":1,"size":379,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./types","loc":"4:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./types","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DbRelationType = void 0;\nvar DbRelationType;\n(function (DbRelationType) {\n DbRelationType[DbRelationType[\"Aggregation\"] = 0] = \"Aggregation\";\n DbRelationType[DbRelationType[\"Association\"] = 1] = \"Association\";\n})(DbRelationType = exports.DbRelationType || (exports.DbRelationType = {}));\n"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts","index":6,"index2":6,"size":1823,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"./utils","loc":"5:14-32"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/index.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./utils","loc":"9:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./utils","loc":"7:14-32"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"./utils","loc":"5:14-32"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.difference = exports.defaultCompareViewDependencies = exports.objectKeys = void 0;\nvar tslib_1 = require(\"tslib\");\nvar shallowequal_1 = (0, tslib_1.__importDefault)(require(\"shallowequal\"));\nvar lodash_zip_1 = (0, tslib_1.__importDefault)(require(\"lodash.zip\"));\nvar lodash_transform_1 = (0, tslib_1.__importDefault)(require(\"lodash.transform\"));\nvar lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\n// TBD: New typescript would contain better typing for this. Remove this hack after update.\nexports.objectKeys = Object.keys;\nfunction defaultCompareViewDependencies(prev, next) {\n if (Array.isArray(prev) && Array.isArray(next)) {\n if (prev.length === next.length) {\n return (0, lodash_zip_1.default)(prev, next).every(function (_a) {\n var p = _a[0], n = _a[1];\n return (0, shallowequal_1.default)(p, n);\n });\n }\n return false;\n }\n return (0, shallowequal_1.default)(prev, next);\n}\nexports.defaultCompareViewDependencies = defaultCompareViewDependencies;\n/**\n * Deep diff between two object, using lodash\n * @param {Object} object Object compared\n * @param {Object} base Object to compare with\n * @return {Object} Return a new object who represent the diff\n */\nfunction difference(object, base) {\n function changes(object, base) {\n return (0, lodash_transform_1.default)(object, function (result, value, key) {\n if (!(0, lodash_isequal_1.default)(value, base[key])) {\n result[key] = (typeof value === \"object\" && typeof base[key] === \"object\") ? changes(value, base[key]) : value;\n }\n });\n }\n return changes(object, base);\n}\nexports.difference = difference;\n"},{"id":"@epam/uui-core","identifier":"external \"@epam/uui-core\"","name":"external \"@epam/uui-core\"","index":13,"index2":9,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"10:17-42"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"6:17-42"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"immutable","identifier":"external \"immutable\"","name":"external \"immutable\"","index":12,"index2":8,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","issuerId":"./src/DbTable.ts","issuerName":"./src/DbTable.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbTable.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","name":"./src/DbTable.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"5:34-54"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"7:18-38"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"immutable","loc":"6:34-54"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.countby","identifier":"external \"lodash.countby\"","name":"external \"lodash.countby\"","index":19,"index2":14,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.countby","loc":"11:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.filter","identifier":"external \"lodash.filter\"","name":"external \"lodash.filter\"","index":20,"index2":15,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.filter","loc":"12:51-75"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.foreach","identifier":"external \"lodash.foreach\"","name":"external \"lodash.foreach\"","index":21,"index2":16,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.foreach","loc":"13:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.groupby","identifier":"external \"lodash.groupby\"","name":"external \"lodash.groupby\"","index":16,"index2":11,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.groupby","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isempty","identifier":"external \"lodash.isempty\"","name":"external \"lodash.isempty\"","index":24,"index2":20,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"lodash.isempty","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isequal","identifier":"external \"lodash.isequal\"","name":"external \"lodash.isequal\"","index":10,"index2":5,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","issuerId":"./src/Db.ts","issuerName":"./src/Db.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/Db.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","name":"./src/Db.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"6:52-77"},{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"8:52-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.map","identifier":"external \"lodash.map\"","name":"external \"lodash.map\"","index":17,"index2":12,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.map","loc":"9:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.merge","identifier":"external \"lodash.merge\"","name":"external \"lodash.merge\"","index":18,"index2":13,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.merge","loc":"10:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.pick","identifier":"external \"lodash.pick\"","name":"external \"lodash.pick\"","index":22,"index2":17,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.pick","loc":"14:49-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.transform","identifier":"external \"lodash.transform\"","name":"external \"lodash.transform\"","index":9,"index2":4,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.transform","loc":"7:54-81"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.zip","identifier":"external \"lodash.zip\"","name":"external \"lodash.zip\"","index":8,"index2":3,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.zip","loc":"6:48-69"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"react","identifier":"external \"react\"","name":"external \"react\"","index":29,"index2":25,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","issuerId":"./src/reactHooks.ts","issuerName":"./src/reactHooks.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/reactHooks.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","name":"./src/reactHooks.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"react","loc":"5:14-30"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"shallowequal","identifier":"external \"shallowequal\"","name":"external \"shallowequal\"","index":7,"index2":2,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi /Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"/Users/Aliaksei_Manetau/WebstormProjects/uui/node_modules/ts-loader/index.js??ref--5-oneOf-0-0!/Users/Aliaksei_Manetau/WebstormProjects/uui/uui-db/src/utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"shallowequal","loc":"5:50-73"}],"providedExports":null,"optimizationBailout":[],"depth":4}],"filteredModules":0,"logging":{"webpack.buildChunkGraph.visitModules":{"entries":[],"filteredEntries":2,"debug":false}},"children":[]}
|